diff --git a/README.md b/README.md index 9a3414e4..8f31f958 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,12 @@ CRM, Accounting and Invoicing System for small managed IT companies * Past Due Invoices * Software License Expiring * Many more... +* Calendar Integration + * Schedule Jobs + * Overview of Invoices Domains + * Schedule Events +* Dashboard + * Gives a clear overview of your business ### Installation Instructions @@ -44,7 +50,6 @@ CRM, Accounting and Invoicing System for small managed IT companies * Point your browser and away you go #### Requirements -* Linux * Webserver (Apache, NGINX) * PHP7+ * Mysql or MariaDB @@ -55,9 +60,14 @@ CRM, Accounting and Invoicing System for small managed IT companies * fontawesome * datatables * chart.js +* moments.js * Jquery * PHPmailer * mPDF +* FullCalendar.io +* bootstrap-select +* Date Range Picker +* Bootstrap Typeahead * EasyMDE forked from SimpleMDE * parsedown diff --git a/accounts.php b/accounts.php index 73de1f22..dc2991a1 100644 --- a/accounts.php +++ b/accounts.php @@ -49,12 +49,12 @@ Edit Delete - + + diff --git a/add_user_modal.php b/add_user_modal.php index b7c46760..b91e5034 100644 --- a/add_user_modal.php +++ b/add_user_modal.php @@ -65,7 +65,7 @@
- +
- + + diff --git a/client_assets.php b/client_assets.php index b1e60c25..5d7bcb62 100644 --- a/client_assets.php +++ b/client_assets.php @@ -127,12 +127,12 @@ Edit Delete - + + diff --git a/client_contacts.php b/client_contacts.php index f0210233..0b6d74b8 100644 --- a/client_contacts.php +++ b/client_contacts.php @@ -63,13 +63,15 @@ Edit Delete - + + diff --git a/client_domains.php b/client_domains.php index a6662337..de178e64 100644 --- a/client_domains.php +++ b/client_domains.php @@ -51,13 +51,15 @@ Edit Delete - + + diff --git a/client_invoices.php b/client_invoices.php index da07ec5a..7fb45c3e 100644 --- a/client_invoices.php +++ b/client_invoices.php @@ -82,14 +82,15 @@ PDF Delete - + + ">Edit Delete - + + diff --git a/client_logins.php b/client_logins.php index 635039aa..0ef69030 100644 --- a/client_logins.php +++ b/client_logins.php @@ -45,13 +45,15 @@ Edit Delete - + + diff --git a/client_networks.php b/client_networks.php index 66ac2f33..abe9c03c 100644 --- a/client_networks.php +++ b/client_networks.php @@ -43,13 +43,15 @@ Edit Delete - + + diff --git a/client_quotes.php b/client_quotes.php index 7b838f8e..0121b838 100644 --- a/client_quotes.php +++ b/client_quotes.php @@ -71,15 +71,18 @@ PDF Delete - + + diff --git a/client_software.php b/client_software.php index 63c012a0..0c7cc57f 100644 --- a/client_software.php +++ b/client_software.php @@ -73,13 +73,15 @@ Edit Delete - + + diff --git a/client_tickets.php b/client_tickets.php index 5ad7db61..7c32061d 100644 --- a/client_tickets.php +++ b/client_tickets.php @@ -60,14 +60,18 @@ Edit Delete - + + diff --git a/client_vendors.php b/client_vendors.php index a4c16118..095e2802 100644 --- a/client_vendors.php +++ b/client_vendors.php @@ -98,13 +98,15 @@ Edit Delete - + + diff --git a/clients.php b/clients.php index b89730f3..6fd0ee8b 100644 --- a/clients.php +++ b/clients.php @@ -78,13 +78,15 @@ Edit Delete - + + diff --git a/config.php b/config.php index d1be8412..e717c90d 100644 --- a/config.php +++ b/config.php @@ -8,161 +8,5 @@ $mysqli = mysqli_connect($dbhost, $dbusername, $dbpassword, $database); - //General Settings - - $config_date_format = "Y-m-d"; - $config_time_format = "h:ia"; - $config_no_records = "There is nothing here!"; - $config_default_expense_account = ""; - $config_default_payment_account = ""; - $config_default_net_terms = 7; - - $sql = mysqli_query($mysqli,"SELECT * FROM settings WHERE company_id = 1"); - $row = mysqli_fetch_array($sql); - - $config_start_page = $row['config_start_page']; - $config_company_name = $row['config_company_name']; - $config_company_address = $row['config_company_address']; - $config_company_city = $row['config_company_city']; - $config_company_state = $row['config_company_state']; - $config_company_zip = $row['config_company_zip']; - $config_company_phone = $row['config_company_phone']; - if(strlen($config_company_phone)>2){ - $config_company_phone = substr($row['config_company_phone'],0,3)."-".substr($row['config_company_phone'],3,3)."-".substr($row['config_company_phone'],6,4); - } - $config_company_site = $row['config_company_site']; - $config_next_invoice_number = $row['config_next_invoice_number']; - $config_invoice_logo = $row['config_invoice_logo']; - $config_invoice_footer = $row['config_invoice_footer']; - $config_quote_footer = $row['config_quote_footer']; - $config_smtp_host = $row['config_smtp_host']; - $config_smtp_username = $row['config_smtp_username']; - $config_smtp_password = $row['config_smtp_password']; - $config_smtp_port = $row['config_smtp_port']; - $config_mail_from_email = $row['config_mail_from_email']; - $config_mail_from_name = $row['config_mail_from_name']; - $config_account_balance_threshold = $row['config_account_balance_threshold']; - - $config_quote_email_subject = $row['config_quote_email_subject']; - - $config_recurring_email_auto_send = $row['config_recurring_email_auto_send']; - - $config_api_key = $row['config_api_key']; - - $config_base_url = "192.168.10.205/pittpc"; - - $_SESSION['alert_message'] = ''; - $_SESSION['alert_type'] = "warning"; - - $client_types_array = array( - 'Residential', - 'Law', - 'Tax and Accounting', - 'General Contractor', - 'Medical', - 'Non Profit', - 'Industrial', - 'Automotive', - 'Retail', - 'Staffing Agency', - 'Other' - ); - - $net_terms_array = array( - '0'=>'On Reciept', - '7'=>'7 Days', - '14'=>'14 Days', - '30'=>'30 Days' - ); - - $states_array = array( - 'AL'=>'Alabama', - 'AK'=>'Alaska', - 'AZ'=>'Arizona', - 'AR'=>'Arkansas', - 'CA'=>'California', - 'CO'=>'Colorado', - 'CT'=>'Connecticut', - 'DE'=>'Delaware', - 'DC'=>'District of Columbia', - 'FL'=>'Florida', - 'GA'=>'Georgia', - 'HI'=>'Hawaii', - 'ID'=>'Idaho', - 'IL'=>'Illinois', - 'IN'=>'Indiana', - 'IA'=>'Iowa', - 'KS'=>'Kansas', - 'KY'=>'Kentucky', - 'LA'=>'Louisiana', - 'ME'=>'Maine', - 'MD'=>'Maryland', - 'MA'=>'Massachusetts', - 'MI'=>'Michigan', - 'MN'=>'Minnesota', - 'MS'=>'Mississippi', - 'MO'=>'Missouri', - 'MT'=>'Montana', - 'NE'=>'Nebraska', - 'NV'=>'Nevada', - 'NH'=>'New Hampshire', - 'NJ'=>'New Jersey', - 'NM'=>'New Mexico', - 'NY'=>'New York', - 'NC'=>'North Carolina', - 'ND'=>'North Dakota', - 'OH'=>'Ohio', - 'OK'=>'Oklahoma', - 'OR'=>'Oregon', - 'PA'=>'Pennsylvania', - 'RI'=>'Rhode Island', - 'SC'=>'South Carolina', - 'SD'=>'South Dakota', - 'TN'=>'Tennessee', - 'TX'=>'Texas', - 'UT'=>'Utah', - 'VT'=>'Vermont', - 'VA'=>'Virginia', - 'WA'=>'Washington', - 'WV'=>'West Virginia', - 'WI'=>'Wisconsin', - 'WY'=>'Wyoming' - ); - - $timezones_array = array( - 'US/Eastern', - 'US/Central', - 'US/Mountain', - 'US/Pacific' - ); - - $category_types_array = array( - 'Expense', - 'Income', - 'Payment Method' - ); - - $asset_types_array = array( - 'Laptop', - 'Desktop', - 'Server', - 'Mobile Phone', - 'Tablet', - 'Firewall/Router', - 'Switch', - 'Access Point', - 'Printer', - 'Camera', - 'TV', - 'Virtual Machine', - 'Other' - ); - - $software_types_array = array( - 'Operating System', - 'Web App', - 'Desktop App', - 'Other' - ); - + include("get_settings.php"); ?> \ No newline at end of file diff --git a/cron.php b/cron.php index 80cb8e30..bf0ff475 100644 --- a/cron.php +++ b/cron.php @@ -34,7 +34,7 @@ foreach ($domainAlertArray as $day) { $client_id = $row['client_id']; $client_name = $row['client_name']; - mysqli_query($mysqli,"INSERT INTO alerts SET alert_type = 'Domain', alert_message = 'Domain $domain_name will expire in $day Days on $domain_expire', alert_date = CURDATE()"); + mysqli_query($mysqli,"INSERT INTO alerts SET alert_type = 'Domain', alert_message = 'Domain $domain_name will expire in $day Days on $domain_expire', alert_date = NOW()"); } @@ -65,7 +65,7 @@ foreach ($invoiceAlertArray as $day) { $client_id = $row['client_id']; $client_name = $row['client_name']; - mysqli_query($mysqli,"INSERT INTO alerts SET alert_type = 'Invoice', alert_message = 'Invoice INV-$invoice_number for $client_name in the amount of $invoice_amount is overdue by $day days', alert_date = CURDATE()"); + mysqli_query($mysqli,"INSERT INTO alerts SET alert_type = 'Invoice', alert_message = 'Invoice INV-$invoice_number for $client_name in the amount of $invoice_amount is overdue by $day days', alert_date = NOW()"); } } @@ -90,7 +90,7 @@ while($row = mysqli_fetch_array($sql)){ if($balance < $config_account_balance_threshold){ - mysqli_query($mysqli,"INSERT INTO alerts SET alert_type = 'Account Low Balance', alert_message = 'Threshold of $config_account_balance_threshold triggered low balance of $balance on account $account_name', alert_date = CURDATE()"); + mysqli_query($mysqli,"INSERT INTO alerts SET alert_type = 'Account Low Balance', alert_message = 'Threshold of $config_account_balance_threshold triggered low balance of $balance on account $account_name', alert_date = NOW()"); } } @@ -120,7 +120,7 @@ while($row = mysqli_fetch_array($sql_recurring)){ //Generate a unique URL key for clients to access $url_key = keygen(); - mysqli_query($mysqli,"INSERT INTO invoices SET invoice_number = $new_invoice_number, invoice_date = CURDATE(), invoice_due = DATE_ADD(CURDATE(), INTERVAL $client_net_terms day), invoice_amount = '$recurring_amount', invoice_note = '$recurring_note', category_id = $category_id, invoice_status = 'Sent', invoice_url_key = '$url_key', client_id = $client_id"); + mysqli_query($mysqli,"INSERT INTO invoices SET invoice_number = $new_invoice_number, invoice_date = CURDATE(), invoice_due = DATE_ADD(CURDATE(), INTERVAL $client_net_terms day), invoice_amount = '$recurring_amount', invoice_note = '$recurring_note', category_id = $category_id, invoice_status = 'Sent', invoice_url_key = '$url_key', invoice_created_at = NOW(), client_id = $client_id"); $new_invoice_id = mysqli_insert_id($mysqli); @@ -137,13 +137,13 @@ while($row = mysqli_fetch_array($sql_recurring)){ $item_tax = $row['item_tax']; $item_total = $row['item_total']; - mysqli_query($mysqli,"INSERT INTO invoice_items SET item_name = '$item_name', item_description = '$item_description', item_quantity = $item_quantity, item_price = '$item_price', item_subtotal = '$item_subtotal', item_tax = '$item_tax', item_total = '$item_total', invoice_id = $new_invoice_id"); + mysqli_query($mysqli,"INSERT INTO invoice_items SET item_name = '$item_name', item_description = '$item_description', item_quantity = $item_quantity, item_price = '$item_price', item_subtotal = '$item_subtotal', item_tax = '$item_tax', item_total = '$item_total', item_created_at = NOW(), invoice_id = $new_invoice_id"); } - mysqli_query($mysqli,"INSERT INTO history SET history_date = CURDATE(), history_status = 'Sent', history_description = 'Invoice Generated from Recurring!', invoice_id = $new_invoice_id"); + mysqli_query($mysqli,"INSERT INTO history SET history_date = CURDATE(), history_status = 'Sent', history_description = 'Invoice Generated from Recurring!', history_created_at = NOW(), invoice_id = $new_invoice_id"); //update the recurring invoice with the new dates - mysqli_query($mysqli,"UPDATE recurring SET recurring_last_sent = CURDATE(), recurring_next_date = DATE_ADD(CURDATE(), INTERVAL 1 $recurring_frequency) WHERE recurring_id = $recurring_id"); + mysqli_query($mysqli,"UPDATE recurring SET recurring_last_sent = CURDATE(), recurring_next_date = DATE_ADD(CURDATE(), INTERVAL 1 $recurring_frequency), recurring_updated_at = NOW WHERE recurring_id = $recurring_id"); if($config_recurring_email_auto_send == 1){ $sql = mysqli_query($mysqli,"SELECT * FROM invoices, clients @@ -197,14 +197,14 @@ while($row = mysqli_fetch_array($sql_recurring)){ $mail->send(); - mysqli_query($mysqli,"INSERT INTO history SET history_date = CURDATE(), history_status = 'Sent', history_description = 'Auto Emailed Invoice!', invoice_id = $new_invoice_id"); + mysqli_query($mysqli,"INSERT INTO history SET history_date = CURDATE(), history_status = 'Sent', history_description = 'Auto Emailed Invoice!', history_created_at = NOW(), invoice_id = $new_invoice_id"); //Update Invoice Status to Sent mysqli_query($mysqli,"UPDATE invoices SET invoice_status = 'Sent', client_id = $client_id WHERE invoice_id = $new_invoice_id"); }catch (Exception $e) { echo "Message could not be sent. Mailer Error: {$mail->ErrorInfo}"; - mysqli_query($mysqli,"INSERT INTO history SET history_date = CURDATE(), history_status = 'Draft', history_description = 'Failed to send Invoice!', invoice_id = $new_invoice_id"); + mysqli_query($mysqli,"INSERT INTO history SET history_date = CURDATE(), history_status = 'Draft', history_description = 'Failed to send Invoice!', history_created_at = NOW(), invoice_id = $new_invoice_id"); } } } diff --git a/dbconnect.php b/dbconnect.php new file mode 100644 index 00000000..7cc93edb --- /dev/null +++ b/dbconnect.php @@ -0,0 +1,12 @@ + \ No newline at end of file diff --git a/edit_asset_modal.php b/edit_asset_modal.php index c0dd574f..f792ef08 100644 --- a/edit_asset_modal.php +++ b/edit_asset_modal.php @@ -51,7 +51,7 @@
- @@ -99,7 +99,7 @@
- - - -
- diff --git a/edit_client_modal.php b/edit_client_modal.php index 7fcad71a..8d1f4ab9 100644 --- a/edit_client_modal.php +++ b/edit_client_modal.php @@ -48,7 +48,7 @@
-
- $state_name) { ?> @@ -164,7 +164,7 @@
- $net_term_name) { ?> diff --git a/edit_domain_modal.php b/edit_domain_modal.php index cb26626b..138f7f6d 100644 --- a/edit_domain_modal.php +++ b/edit_domain_modal.php @@ -26,7 +26,7 @@
- - - - - - - $state_name) { ?> diff --git a/edit_quote_modal.php b/edit_quote_modal.php index 914a9ca2..f385b758 100644 --- a/edit_quote_modal.php +++ b/edit_quote_modal.php @@ -28,7 +28,7 @@
- - diff --git a/edit_transfer_modal.php b/edit_transfer_modal.php index 6fbfc014..cbaccd91 100644 --- a/edit_transfer_modal.php +++ b/edit_transfer_modal.php @@ -38,7 +38,7 @@
- - - $state_name) { ?> diff --git a/expenses.php b/expenses.php index b84c3e68..938cf3a0 100644 --- a/expenses.php +++ b/expenses.php @@ -76,15 +76,19 @@ Refund Delete - + + diff --git a/footer.php b/footer.php index 03838983..86fba272 100644 --- a/footer.php +++ b/footer.php @@ -33,6 +33,9 @@ + + + diff --git a/get_settings.php b/get_settings.php new file mode 100644 index 00000000..be0c8560 --- /dev/null +++ b/get_settings.php @@ -0,0 +1,153 @@ +2){ + $config_company_phone = substr($row['config_company_phone'],0,3)."-".substr($row['config_company_phone'],3,3)."-".substr($row['config_company_phone'],6,4); +} +$config_company_site = $row['config_company_site']; +$config_next_invoice_number = $row['config_next_invoice_number']; +$config_invoice_logo = $row['config_invoice_logo']; +$config_invoice_footer = $row['config_invoice_footer']; +$config_quote_footer = $row['config_quote_footer']; +$config_smtp_host = $row['config_smtp_host']; +$config_smtp_username = $row['config_smtp_username']; +$config_smtp_password = $row['config_smtp_password']; +$config_smtp_port = $row['config_smtp_port']; +$config_mail_from_email = $row['config_mail_from_email']; +$config_mail_from_name = $row['config_mail_from_name']; +$config_account_balance_threshold = $row['config_account_balance_threshold']; + +$config_quote_email_subject = $row['config_quote_email_subject']; + +$config_recurring_email_auto_send = $row['config_recurring_email_auto_send']; +$config_default_net_terms = $row['default_net_terms']; + +$config_api_key = $row['config_api_key']; + +$config_base_url = $row['config_base_url']; + +$_SESSION['alert_message'] = ''; +$_SESSION['alert_type'] = "warning"; + +$client_types_array = array( + 'Residential', + 'Law', + 'Tax and Accounting', + 'General Contractor', + 'Medical', + 'Non Profit', + 'Industrial', + 'Automotive', + 'Retail', + 'Staffing Agency', + 'Other' +); + +$net_terms_array = array( + '0'=>'On Reciept', + '7'=>'7 Days', + '14'=>'14 Days', + '30'=>'30 Days' +); + +$states_array = array( + 'AL'=>'Alabama', + 'AK'=>'Alaska', + 'AZ'=>'Arizona', + 'AR'=>'Arkansas', + 'CA'=>'California', + 'CO'=>'Colorado', + 'CT'=>'Connecticut', + 'DE'=>'Delaware', + 'DC'=>'District of Columbia', + 'FL'=>'Florida', + 'GA'=>'Georgia', + 'HI'=>'Hawaii', + 'ID'=>'Idaho', + 'IL'=>'Illinois', + 'IN'=>'Indiana', + 'IA'=>'Iowa', + 'KS'=>'Kansas', + 'KY'=>'Kentucky', + 'LA'=>'Louisiana', + 'ME'=>'Maine', + 'MD'=>'Maryland', + 'MA'=>'Massachusetts', + 'MI'=>'Michigan', + 'MN'=>'Minnesota', + 'MS'=>'Mississippi', + 'MO'=>'Missouri', + 'MT'=>'Montana', + 'NE'=>'Nebraska', + 'NV'=>'Nevada', + 'NH'=>'New Hampshire', + 'NJ'=>'New Jersey', + 'NM'=>'New Mexico', + 'NY'=>'New York', + 'NC'=>'North Carolina', + 'ND'=>'North Dakota', + 'OH'=>'Ohio', + 'OK'=>'Oklahoma', + 'OR'=>'Oregon', + 'PA'=>'Pennsylvania', + 'RI'=>'Rhode Island', + 'SC'=>'South Carolina', + 'SD'=>'South Dakota', + 'TN'=>'Tennessee', + 'TX'=>'Texas', + 'UT'=>'Utah', + 'VT'=>'Vermont', + 'VA'=>'Virginia', + 'WA'=>'Washington', + 'WV'=>'West Virginia', + 'WI'=>'Wisconsin', + 'WY'=>'Wyoming' +); + +$timezones_array = array( + 'US/Eastern', + 'US/Central', + 'US/Mountain', + 'US/Pacific' +); + +$category_types_array = array( + 'Expense', + 'Income', + 'Payment Method' +); + +$asset_types_array = array( + 'Laptop', + 'Desktop', + 'Server', + 'Mobile Phone', + 'Tablet', + 'Firewall/Router', + 'Switch', + 'Access Point', + 'Printer', + 'Camera', + 'TV', + 'Virtual Machine', + 'Other' +); + +$software_types_array = array( + 'Operating System', + 'Web App', + 'Desktop App', + 'Other' +); +?> \ No newline at end of file diff --git a/header.php b/header.php index 4273f29d..22b11b58 100644 --- a/header.php +++ b/header.php @@ -41,6 +41,8 @@ + + diff --git a/invoice.php b/invoice.php index 644af160..60ef447a 100644 --- a/invoice.php +++ b/invoice.php @@ -86,7 +86,7 @@ if(isset($_GET['invoice_id'])){ -
+
@@ -222,8 +222,8 @@ if(isset($_GET['invoice_id'])){ - + + -
-
- -
- -
-
- -
- -
-
- -
- -
-
- -
- -
-
- -
- -
-
- -
- -
-
-
- -
- - -
-
-
Create your first user
-
-
- -
-
- -
-
- -
- -
-
- -
- -
-
- -
- -
-
- -
- -
-
- -
- -
-
-
- - -
-
- -
-
-
- -
-
-
Company Settings
-
-
-
-
- -
-
- -
- -
-
- -
- -
-
- -
- -
-
- -
- - -
- -
- - -
- -
- - -
- -
- -
-
- -
- -
-
- -
- -
-
- -
- -
-
- -
- - + + +
+
+
Setup Database
+
+
+ - -
-
- -
-
-
Create an Account
-
-
- -
-
- -
-
- +
+ +
+
+ +
+
-
-
-
- -
-
- -
- -
-
-
- - -
-
- - -
-
-
-
-
Create some categories
-
-
- -
- -
+
+ +
+
+ +
+ +
+
+ +
+ +
+
+ +
+ +
+
-
-
- +
+ +
+
+ +
+
- -
-
-
-
- - -
- -
-
- -
- -
-
- -
-
- - -
- -
-
- -
- -
-
- -
-
-
- - -
-
- - +
+ + +
-
-
-
-
Mail Settings
+ + + + + + +
+
+
Create your first user
+
+
+ +
+
+ +
+
+ +
+ +
+
+ +
+ +
+
+ +
+ +
+
+ +
+ +
+
+ +
+ +
+
+
+ + +
+
+ +
+
-
-
-
- -
-
- -
- -
-
+ -
- -
-
- -
- -
-
- -
- -
-
- -
- -
-
-
- -
-
- -
- -
-
+ -
- +
+
+
Company Settings
+
+
+ +
+ +
+
+ +
+ +
+
- +
+ +
+
+ +
+ +
+
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ +
+
+ +
+ +
+
+ +
+ +
+
+ +
+ +
+
+ +
+ + + + +
-
+ +
diff --git a/setup_side_nav.php b/setup_side_nav.php deleted file mode 100644 index c1be2c58..00000000 --- a/setup_side_nav.php +++ /dev/null @@ -1,41 +0,0 @@ - - \ No newline at end of file diff --git a/setup_top_nav.php b/setup_top_nav.php deleted file mode 100644 index 221e7ee4..00000000 --- a/setup_top_nav.php +++ /dev/null @@ -1,11 +0,0 @@ - \ No newline at end of file diff --git a/tickets.php b/tickets.php index 7450be1a..85b7c61e 100644 --- a/tickets.php +++ b/tickets.php @@ -71,14 +71,18 @@ Edit Delete
-
+
+ diff --git a/transfers.php b/transfers.php index de24a050..993524c5 100644 --- a/transfers.php +++ b/transfers.php @@ -59,13 +59,15 @@ $sql = mysqli_query($mysqli,"SELECT * FROM transfers ORDER BY transfer_date DESC Edit Delete
-
+
+ diff --git a/trips.php b/trips.php index 9c15da2d..62f0a36d 100644 --- a/trips.php +++ b/trips.php @@ -48,13 +48,15 @@ Edit Delete - + + diff --git a/users.php b/users.php index 6a53ca18..905b8d51 100644 --- a/users.php +++ b/users.php @@ -59,13 +59,15 @@ Edit Delete - + + diff --git a/vendor/bootstrap-colorpicker/LICENSE b/vendor/bootstrap-colorpicker/LICENSE new file mode 100644 index 00000000..bc6fc511 --- /dev/null +++ b/vendor/bootstrap-colorpicker/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2017 Javi Aguilar + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/vendor/bootstrap-colorpicker/README.md b/vendor/bootstrap-colorpicker/README.md new file mode 100644 index 00000000..3d21441c --- /dev/null +++ b/vendor/bootstrap-colorpicker/README.md @@ -0,0 +1,127 @@ + + +# Bootstrap Colorpicker + + + +[Bootstrap Colorpicker](https://github.com/farbelous/bootstrap-colorpicker/) is a modular color picker plugin for Bootstrap 4. + +[![Build Status](https://img.shields.io/travis/farbelous/bootstrap-colorpicker/master.svg?style=flat-square)](https://travis-ci.org/farbelous/bootstrap-colorpicker) +[![npm](https://img.shields.io/npm/v/bootstrap-colorpicker.svg?style=flat-square)](https://www.npmjs.com/package/bootstrap-colorpicker) + +## Install +You can get the latest version in many different ways: + +- Downloading [a ZIP file from the releases](https://github.com/farbelous/bootstrap-colorpicker/releases) +- Cloning using Git: `git clone https://github.com/farbelous/bootstrap-colorpicker.git` +- Installing via NPM: `npm install bootstrap-colorpicker` +- Installing via Yarn: `yarn add bootstrap-colorpicker` +- Installing via Composer: `composer require itsjavi/bootstrap-colorpicker` + +Note that the `dist` files are only distributed via the NPM and Yarn installations. + +For the rest methods, you will need to generate the files initializing the project with `yarn install` +and then building the code using `npm run build`. + +## Versions + + + + + + + + + + + + + + + + + + + + + +
Colorpicker versionCompatible Bootstrap versionDependencies
+ v2.x
+ Documentation +
(any) +
    +
  • jQuery >= 1.10
  • +
  • Bootstrap CSS (input addon)
  • +
+
+ v3.x
+ Documentation +
Bootstrap 4 +
    +
  • jQuery >= 2.1.0
  • +
  • Bootstrap CSS (input addon, popover)
  • +
  • Bootstrap JS Bundle (popover)
  • +
+
+ + +Note that the plugin may work without Bootstrap if your code is not using any of the mentioned Bootstrap +dependencies. + + +## Basic example + +```html + + + + + + + + +
+

Bootstrap Colorpicker Demo

+ +
+ + + + + +``` + +## Contributions +* [Issues](https://github.com/farbelous/bootstrap-colorpicker/issues) +* [Pull Requests](https://github.com/farbelous/bootstrap-colorpicker/pulls) +* [Milestones](https://github.com/farbelous/bootstrap-colorpicker/milestones) +* [Planned Features](https://github.com/farbelous/bootstrap-colorpicker/projects) + +This project exists thanks to all the [people who contribute](https://github.com/farbelous/bootstrap-colorpicker/graphs/contributors). + +Please read [CONTRIBUTING](https://github.com/farbelous/bootstrap-colorpicker/blob/master/.github/CONTRIBUTING.md) +before sending a pull request or issue. + +## License +The MIT License (MIT). +Please see the [License File](https://github.com/farbelous/bootstrap-colorpicker/blob/master/LICENSE) for more information. + +## Credits + +Written and maintained by [Javi Aguilar](https://itsjavi.com) and all other contributors. + +*Based on Stefan Petre's color picker (2013).* + +*Thanks to JetBrains for supporting this project.* diff --git a/vendor/bootstrap-colorpicker/css/bootstrap-colorpicker.css b/vendor/bootstrap-colorpicker/css/bootstrap-colorpicker.css new file mode 100644 index 00000000..37e22b34 --- /dev/null +++ b/vendor/bootstrap-colorpicker/css/bootstrap-colorpicker.css @@ -0,0 +1,399 @@ +/*! + * Bootstrap Colorpicker - Bootstrap Colorpicker is a modular color picker plugin for Bootstrap 4. + * @package bootstrap-colorpicker + * @version v3.1.2 + * @license MIT + * @link https://farbelous.github.io/bootstrap-colorpicker/ + * @link https://github.com/farbelous/bootstrap-colorpicker.git + */ +.colorpicker { + position: relative; + display: none; + font-size: inherit; + color: inherit; + text-align: left; + list-style: none; + background-color: #ffffff; + background-clip: padding-box; + border: 1px solid rgba(0, 0, 0, 0.2); + padding: .75rem .75rem; + width: 148px; + border-radius: 4px; + -webkit-box-sizing: content-box; + box-sizing: content-box; } + +.colorpicker.colorpicker-disabled, +.colorpicker.colorpicker-disabled * { + cursor: default !important; } + +.colorpicker div { + position: relative; } + +.colorpicker-popup { + position: absolute; + top: 100%; + left: 0; + float: left; + margin-top: 1px; + z-index: 1060; } + +.colorpicker-popup.colorpicker-bs-popover-content { + position: relative; + top: auto; + left: auto; + float: none; + margin: 0; + z-index: initial; + border: none; + padding: 0.25rem 0; + border-radius: 0; + background: none; + -webkit-box-shadow: none; + box-shadow: none; } + +.colorpicker:before, +.colorpicker:after { + content: ""; + display: table; + clear: both; + line-height: 0; } + +.colorpicker-clear { + clear: both; + display: block; } + +.colorpicker:before { + content: ''; + display: inline-block; + border-left: 7px solid transparent; + border-right: 7px solid transparent; + border-bottom: 7px solid #ccc; + border-bottom-color: rgba(0, 0, 0, 0.2); + position: absolute; + top: -7px; + left: auto; + right: 6px; } + +.colorpicker:after { + content: ''; + display: inline-block; + border-left: 6px solid transparent; + border-right: 6px solid transparent; + border-bottom: 6px solid #ffffff; + position: absolute; + top: -6px; + left: auto; + right: 7px; } + +.colorpicker.colorpicker-with-alpha { + width: 170px; } + +.colorpicker.colorpicker-with-alpha .colorpicker-alpha { + display: block; } + +.colorpicker-saturation { + position: relative; + width: 126px; + height: 126px; + /* FF3.6+ */ + /* Chrome,Safari4+ */ + /* Chrome10+,Safari5.1+ */ + /* Opera 11.10+ */ + /* IE10+ */ + background: -webkit-gradient(linear, left top, left bottom, from(transparent), to(black)), -webkit-gradient(linear, left top, right top, from(white), to(rgba(255, 255, 255, 0))); + background: linear-gradient(to bottom, transparent 0%, black 100%), linear-gradient(to right, white 0%, rgba(255, 255, 255, 0) 100%); + /* W3C */ + cursor: crosshair; + float: left; + -webkit-box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2); + box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2); + margin-bottom: 6px; } + .colorpicker-saturation .colorpicker-guide { + display: block; + height: 6px; + width: 6px; + border-radius: 6px; + border: 1px solid #000; + -webkit-box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.8); + box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.8); + position: absolute; + top: 0; + left: 0; + margin: -3px 0 0 -3px; } + +.colorpicker-hue, +.colorpicker-alpha { + position: relative; + width: 16px; + height: 126px; + float: left; + cursor: row-resize; + margin-left: 6px; + margin-bottom: 6px; } + +.colorpicker-alpha-color { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; } + +.colorpicker-hue, +.colorpicker-alpha-color { + -webkit-box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2); + box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2); } + +.colorpicker-hue .colorpicker-guide, +.colorpicker-alpha .colorpicker-guide { + display: block; + height: 4px; + background: rgba(255, 255, 255, 0.8); + border: 1px solid rgba(0, 0, 0, 0.4); + position: absolute; + top: 0; + left: 0; + margin-left: -2px; + margin-top: -2px; + right: -2px; + z-index: 1; } + +.colorpicker-hue { + /* FF3.6+ */ + /* Chrome,Safari4+ */ + /* Chrome10+,Safari5.1+ */ + /* Opera 11.10+ */ + /* IE10+ */ + background: -webkit-gradient(linear, left bottom, left top, from(red), color-stop(8%, #ff8000), color-stop(17%, yellow), color-stop(25%, #80ff00), color-stop(33%, lime), color-stop(42%, #00ff80), color-stop(50%, cyan), color-stop(58%, #0080ff), color-stop(67%, blue), color-stop(75%, #8000ff), color-stop(83%, magenta), color-stop(92%, #ff0080), to(red)); + background: linear-gradient(to top, red 0%, #ff8000 8%, yellow 17%, #80ff00 25%, lime 33%, #00ff80 42%, cyan 50%, #0080ff 58%, blue 67%, #8000ff 75%, magenta 83%, #ff0080 92%, red 100%); + /* W3C */ } + +.colorpicker-alpha { + background: linear-gradient(45deg, rgba(0, 0, 0, 0.1) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, 0.1) 75%, rgba(0, 0, 0, 0.1) 0), linear-gradient(45deg, rgba(0, 0, 0, 0.1) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, 0.1) 75%, rgba(0, 0, 0, 0.1) 0), white; + background-size: 10px 10px; + background-position: 0 0, 5px 5px; + display: none; } + +.colorpicker-bar { + min-height: 16px; + margin: 6px 0 0 0; + clear: both; + text-align: center; + font-size: 10px; + line-height: normal; + max-width: 100%; + -webkit-box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2); + box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2); } + .colorpicker-bar:before { + content: ""; + display: table; + clear: both; } + +.colorpicker-bar.colorpicker-bar-horizontal { + height: 126px; + width: 16px; + margin: 0 0 6px 0; + float: left; } + +.colorpicker-input-addon { + position: relative; } + +.colorpicker-input-addon i { + display: inline-block; + cursor: pointer; + vertical-align: text-top; + height: 16px; + width: 16px; + position: relative; } + +.colorpicker-input-addon:before { + content: ""; + position: absolute; + width: 16px; + height: 16px; + display: inline-block; + vertical-align: text-top; + background: linear-gradient(45deg, rgba(0, 0, 0, 0.1) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, 0.1) 75%, rgba(0, 0, 0, 0.1) 0), linear-gradient(45deg, rgba(0, 0, 0, 0.1) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, 0.1) 75%, rgba(0, 0, 0, 0.1) 0), white; + background-size: 10px 10px; + background-position: 0 0, 5px 5px; } + +.colorpicker.colorpicker-inline { + position: relative; + display: inline-block; + float: none; + z-index: auto; + vertical-align: text-bottom; } + +.colorpicker.colorpicker-horizontal { + width: 126px; + height: auto; } + +.colorpicker.colorpicker-horizontal .colorpicker-bar { + width: 126px; } + +.colorpicker.colorpicker-horizontal .colorpicker-saturation { + float: none; + margin-bottom: 0; } + +.colorpicker.colorpicker-horizontal .colorpicker-hue, +.colorpicker.colorpicker-horizontal .colorpicker-alpha { + float: none; + width: 126px; + height: 16px; + cursor: col-resize; + margin-left: 0; + margin-top: 6px; + margin-bottom: 0; } + +.colorpicker.colorpicker-horizontal .colorpicker-hue .colorpicker-guide, +.colorpicker.colorpicker-horizontal .colorpicker-alpha .colorpicker-guide { + position: absolute; + display: block; + bottom: -2px; + left: 0; + right: auto; + height: auto; + width: 4px; } + +.colorpicker.colorpicker-horizontal .colorpicker-hue { + /* FF3.6+ */ + /* Chrome,Safari4+ */ + /* Chrome10+,Safari5.1+ */ + /* Opera 11.10+ */ + /* IE10+ */ + background: -webkit-gradient(linear, right top, left top, from(red), color-stop(8%, #ff8000), color-stop(17%, yellow), color-stop(25%, #80ff00), color-stop(33%, lime), color-stop(42%, #00ff80), color-stop(50%, cyan), color-stop(58%, #0080ff), color-stop(67%, blue), color-stop(75%, #8000ff), color-stop(83%, magenta), color-stop(92%, #ff0080), to(red)); + background: linear-gradient(to left, red 0%, #ff8000 8%, yellow 17%, #80ff00 25%, lime 33%, #00ff80 42%, cyan 50%, #0080ff 58%, blue 67%, #8000ff 75%, magenta 83%, #ff0080 92%, red 100%); + /* W3C */ } + +.colorpicker.colorpicker-horizontal .colorpicker-alpha { + background: linear-gradient(45deg, rgba(0, 0, 0, 0.1) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, 0.1) 75%, rgba(0, 0, 0, 0.1) 0), linear-gradient(45deg, rgba(0, 0, 0, 0.1) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, 0.1) 75%, rgba(0, 0, 0, 0.1) 0), white; + background-size: 10px 10px; + background-position: 0 0, 5px 5px; } + +.colorpicker-inline:before, +.colorpicker-no-arrow:before, +.colorpicker-popup.colorpicker-bs-popover-content:before { + content: none; + display: none; } + +.colorpicker-inline:after, +.colorpicker-no-arrow:after, +.colorpicker-popup.colorpicker-bs-popover-content:after { + content: none; + display: none; } + +.colorpicker-alpha, +.colorpicker-saturation, +.colorpicker-hue { + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; } + +.colorpicker.colorpicker-visible, +.colorpicker-alpha.colorpicker-visible, +.colorpicker-saturation.colorpicker-visible, +.colorpicker-hue.colorpicker-visible, +.colorpicker-bar.colorpicker-visible { + display: block; } + +.colorpicker.colorpicker-hidden, +.colorpicker-alpha.colorpicker-hidden, +.colorpicker-saturation.colorpicker-hidden, +.colorpicker-hue.colorpicker-hidden, +.colorpicker-bar.colorpicker-hidden { + display: none; } + +.colorpicker-inline.colorpicker-visible { + display: inline-block; } + +.colorpicker.colorpicker-disabled:after { + border: none; + content: ''; + display: block; + width: 100%; + height: 100%; + background: rgba(233, 236, 239, 0.33); + top: 0; + left: 0; + right: auto; + z-index: 2; + position: absolute; } + +.colorpicker.colorpicker-disabled .colorpicker-guide { + display: none; } + +/** EXTENSIONS **/ +.colorpicker-preview { + background: linear-gradient(45deg, rgba(0, 0, 0, 0.1) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, 0.1) 75%, rgba(0, 0, 0, 0.1) 0), linear-gradient(45deg, rgba(0, 0, 0, 0.1) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, 0.1) 75%, rgba(0, 0, 0, 0.1) 0), white; + background-size: 10px 10px; + background-position: 0 0, 5px 5px; } + +.colorpicker-preview > div { + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; } + +.colorpicker-bar.colorpicker-swatches { + -webkit-box-shadow: none; + box-shadow: none; + height: auto; } + +.colorpicker-swatches--inner { + clear: both; + margin-top: -6px; } + +.colorpicker-swatch { + position: relative; + cursor: pointer; + float: left; + height: 16px; + width: 16px; + margin-right: 6px; + margin-top: 6px; + margin-left: 0; + display: block; + -webkit-box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2); + box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2); + background: linear-gradient(45deg, rgba(0, 0, 0, 0.1) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, 0.1) 75%, rgba(0, 0, 0, 0.1) 0), linear-gradient(45deg, rgba(0, 0, 0, 0.1) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, 0.1) 75%, rgba(0, 0, 0, 0.1) 0), white; + background-size: 10px 10px; + background-position: 0 0, 5px 5px; } + +.colorpicker-swatch--inner { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; } + +.colorpicker-swatch:nth-of-type(7n+0) { + margin-right: 0; } + +.colorpicker-with-alpha .colorpicker-swatch:nth-of-type(7n+0) { + margin-right: 6px; } + +.colorpicker-with-alpha .colorpicker-swatch:nth-of-type(8n+0) { + margin-right: 0; } + +.colorpicker-horizontal .colorpicker-swatch:nth-of-type(6n+0) { + margin-right: 0; } + +.colorpicker-horizontal .colorpicker-swatch:nth-of-type(7n+0) { + margin-right: 6px; } + +.colorpicker-horizontal .colorpicker-swatch:nth-of-type(8n+0) { + margin-right: 6px; } + +.colorpicker-swatch:last-of-type:after { + content: ""; + display: table; + clear: both; } + +*[dir='rtl'] .colorpicker-element input, +.colorpicker-element[dir='rtl'] input, +.colorpicker-element input[dir='rtl'] { + direction: ltr; + text-align: right; } + +/*# sourceMappingURL=bootstrap-colorpicker.css.map */ diff --git a/vendor/bootstrap-colorpicker/css/bootstrap-colorpicker.css.map b/vendor/bootstrap-colorpicker/css/bootstrap-colorpicker.css.map new file mode 100644 index 00000000..f669cff6 --- /dev/null +++ b/vendor/bootstrap-colorpicker/css/bootstrap-colorpicker.css.map @@ -0,0 +1 @@ +{"version":3,"sources":["colorpicker.scss"],"names":[],"mappings":"AAiDA;EACE,mBAAmB;EACnB,cAAc;EACd,mBAAmB;EACnB,eAAe;EACf,iBAAiB;EACjB,iBAAiB;EACjB,0BAA0B;EAC1B,6BAA6B;EAC7B,qCA1DkB;EA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A4ZlB,yCA5ZkB;EAQlB,kRAEG;EACH,2BAJ6B;EAK7B,kCAAuC,EAkZxC;;AAED;EACE,mBAAmB;EACnB,OAAO;EACP,QAAQ;EACR,YAAY;EACZ,aAAa,EACd;;AAGD;EACE,gBAAgB,EACjB;;AAGD;EAEI,kBA7aa,EA8ad;;AAHH;EAMI,gBAAgB,EACjB;;AAIH;EAEI,gBAAgB,EACjB;;AAHH;EAMI,kBA5ba,EA6bd;;AAPH;EAUI,kBAhca,EAicd;;AAGH;EACE,YAAY;EACZ,eAAe;EACf,YAAY,EACb;;AAGD;;;EAGE,eAAe;EACf,kBAAkB,EACnB","file":"bootstrap-colorpicker.css","sourcesContent":["$outline-color: rgba(0, 0, 0, 0.2);\n$box-shadow-outline: 0 0 0 1px $outline-color;\n$bar-size-short: 16px !default;\n$base-margin: 6px !default;\n$columns: 6 !default; // this affects the number of swatches per row and the width of the color picker, saturation, etc.\n$bar-size-large: ($bar-size-short * $columns) + ($base-margin * ($columns - 1));\n\n@mixin bgCheckerBox($size: 10px) {\n background: linear-gradient(45deg, rgba(0, 0, 0, 0.1) 25%, rgba(0, 0, 0, 0) 25%, rgba(0, 0, 0, 0) 75%, rgba(0, 0, 0, 0.1) 75%, rgba(0, 0, 0, 0.1) 0),\n linear-gradient(45deg, rgba(0, 0, 0, 0.1) 25%, rgba(0, 0, 0, 0) 25%, rgba(0, 0, 0, 0) 75%, rgba(0, 0, 0, 0.1) 75%, rgba(0, 0, 0, 0.1) 0),\n rgb(255, 255, 255);\n background-size: $size $size;\n background-position: 0 0, $size/2 $size/2;\n}\n\n@mixin bgSaturation() {\n background: -moz-linear-gradient(top, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 1) 100%),\n -moz-linear-gradient(left, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 100%); /* FF3.6+ */\n background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, rgba(0, 0, 0, 0)), color-stop(100%, rgba(0, 0, 0, 1))),\n -webkit-gradient(linear, left top, right top, color-stop(0%, rgba(255, 255, 255, 1)), color-stop(100%, rgba(255, 255, 255, 0))); /* Chrome,Safari4+ */\n background: -webkit-linear-gradient(top, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 1) 100%),\n -webkit-linear-gradient(left, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 100%); /* Chrome10+,Safari5.1+ */\n background: -o-linear-gradient(top, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 1) 100%),\n -o-linear-gradient(left, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 100%); /* Opera 11.10+ */\n background: -ms-linear-gradient(top, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 1) 100%),\n -ms-linear-gradient(left, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 100%); /* IE10+ */\n background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 1) 100%),\n linear-gradient(to right, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 100%); /* W3C */\n}\n\n@mixin bgHueHorizontal() {\n background: -moz-linear-gradient(right, rgb(255, 0, 0) 0%, rgb(255, 128, 0) 8%, rgb(255, 255, 0) 17%, rgb(128, 255, 0) 25%, rgb(0, 255, 0) 33%, rgb(0, 255, 128) 42%, rgb(0, 255, 255) 50%, rgb(0, 128, 255) 58%, rgb(0, 0, 255) 67%, rgb(128, 0, 255) 75%, rgb(255, 0, 255) 83%, rgb(255, 0, 128) 92%, rgb(255, 0, 0) 100%); /* FF3.6+ */\n background: -webkit-gradient(linear, right top, left top, color-stop(0%, rgb(255, 0, 0)), color-stop(8%, rgb(255, 128, 0)), color-stop(17%, rgb(255, 255, 0)), color-stop(25%, rgb(128, 255, 0)), color-stop(33%, rgb(0, 255, 0)), color-stop(42%, rgb(0, 255, 128)), color-stop(50%, rgb(0, 255, 255)), color-stop(58%, rgb(0, 128, 255)), color-stop(67%, rgb(0, 0, 255)), color-stop(75%, rgb(128, 0, 255)), color-stop(83%, rgb(255, 0, 255)), color-stop(92%, rgb(255, 0, 128)), color-stop(100%, rgb(255, 0, 0))); /* Chrome,Safari4+ */\n background: -webkit-linear-gradient(right, rgb(255, 0, 0) 0%, rgb(255, 128, 0) 8%, rgb(255, 255, 0) 17%, rgb(128, 255, 0) 25%, rgb(0, 255, 0) 33%, rgb(0, 255, 128) 42%, rgb(0, 255, 255) 50%, rgb(0, 128, 255) 58%, rgb(0, 0, 255) 67%, rgb(128, 0, 255) 75%, rgb(255, 0, 255) 83%, rgb(255, 0, 128) 92%, rgb(255, 0, 0) 100%); /* Chrome10+,Safari5.1+ */\n background: -o-linear-gradient(right, rgb(255, 0, 0) 0%, rgb(255, 128, 0) 8%, rgb(255, 255, 0) 17%, rgb(128, 255, 0) 25%, rgb(0, 255, 0) 33%, rgb(0, 255, 128) 42%, rgb(0, 255, 255) 50%, rgb(0, 128, 255) 58%, rgb(0, 0, 255) 67%, rgb(128, 0, 255) 75%, rgb(255, 0, 255) 83%, rgb(255, 0, 128) 92%, rgb(255, 0, 0) 100%); /* Opera 11.10+ */\n background: -ms-linear-gradient(right, rgb(255, 0, 0) 0%, rgb(255, 128, 0) 8%, rgb(255, 255, 0) 17%, rgb(128, 255, 0) 25%, rgb(0, 255, 0) 33%, rgb(0, 255, 128) 42%, rgb(0, 255, 255) 50%, rgb(0, 128, 255) 58%, rgb(0, 0, 255) 67%, rgb(128, 0, 255) 75%, rgb(255, 0, 255) 83%, rgb(255, 0, 128) 92%, rgb(255, 0, 0) 100%); /* IE10+ */\n background: linear-gradient(to left, rgb(255, 0, 0) 0%, rgb(255, 128, 0) 8%, rgb(255, 255, 0) 17%, rgb(128, 255, 0) 25%, rgb(0, 255, 0) 33%, rgb(0, 255, 128) 42%, rgb(0, 255, 255) 50%, rgb(0, 128, 255) 58%, rgb(0, 0, 255) 67%, rgb(128, 0, 255) 75%, rgb(255, 0, 255) 83%, rgb(255, 0, 128) 92%, rgb(255, 0, 0) 100%); /* W3C */\n\n}\n\n@mixin bgHueVertical() {\n background: -moz-linear-gradient(bottom, rgba(255, 0, 0, 1) 0%, rgba(255, 128, 0, 1) 8%, rgba(255, 255, 0, 1) 17%, rgba(128, 255, 0, 1) 25%, rgba(0, 255, 0, 1) 33%, rgba(0, 255, 128, 1) 42%, rgba(0, 255, 255, 1) 50%, rgba(0, 128, 255, 1) 58%, rgba(0, 0, 255, 1) 67%, rgba(128, 0, 255, 1) 75%, rgba(255, 0, 255, 1) 83%, rgba(255, 0, 128, 1) 92%, rgba(255, 0, 0, 1) 100%); /* FF3.6+ */\n background: -webkit-gradient(linear, left bottom, left top, color-stop(0%, rgba(255, 0, 0, 1)), color-stop(8%, rgba(255, 128, 0, 1)), color-stop(17%, rgba(255, 255, 0, 1)), color-stop(25%, rgba(128, 255, 0, 1)), color-stop(33%, rgba(0, 255, 0, 1)), color-stop(42%, rgba(0, 255, 128, 1)), color-stop(50%, rgba(0, 255, 255, 1)), color-stop(58%, rgba(0, 128, 255, 1)), color-stop(67%, rgba(0, 0, 255, 1)), color-stop(75%, rgba(128, 0, 255, 1)), color-stop(83%, rgba(255, 0, 255, 1)), color-stop(92%, rgba(255, 0, 128, 1)), color-stop(100%, rgba(255, 0, 0, 1))); /* Chrome,Safari4+ */\n background: -webkit-linear-gradient(bottom, rgba(255, 0, 0, 1) 0%, rgba(255, 128, 0, 1) 8%, rgba(255, 255, 0, 1) 17%, rgba(128, 255, 0, 1) 25%, rgba(0, 255, 0, 1) 33%, rgba(0, 255, 128, 1) 42%, rgba(0, 255, 255, 1) 50%, rgba(0, 128, 255, 1) 58%, rgba(0, 0, 255, 1) 67%, rgba(128, 0, 255, 1) 75%, rgba(255, 0, 255, 1) 83%, rgba(255, 0, 128, 1) 92%, rgba(255, 0, 0, 1) 100%); /* Chrome10+,Safari5.1+ */\n background: -o-linear-gradient(bottom, rgba(255, 0, 0, 1) 0%, rgba(255, 128, 0, 1) 8%, rgba(255, 255, 0, 1) 17%, rgba(128, 255, 0, 1) 25%, rgba(0, 255, 0, 1) 33%, rgba(0, 255, 128, 1) 42%, rgba(0, 255, 255, 1) 50%, rgba(0, 128, 255, 1) 58%, rgba(0, 0, 255, 1) 67%, rgba(128, 0, 255, 1) 75%, rgba(255, 0, 255, 1) 83%, rgba(255, 0, 128, 1) 92%, rgba(255, 0, 0, 1) 100%); /* Opera 11.10+ */\n background: -ms-linear-gradient(bottom, rgba(255, 0, 0, 1) 0%, rgba(255, 128, 0, 1) 8%, rgba(255, 255, 0, 1) 17%, rgba(128, 255, 0, 1) 25%, rgba(0, 255, 0, 1) 33%, rgba(0, 255, 128, 1) 42%, rgba(0, 255, 255, 1) 50%, rgba(0, 128, 255, 1) 58%, rgba(0, 0, 255, 1) 67%, rgba(128, 0, 255, 1) 75%, rgba(255, 0, 255, 1) 83%, rgba(255, 0, 128, 1) 92%, rgba(255, 0, 0, 1) 100%); /* IE10+ */\n background: linear-gradient(to top, rgba(255, 0, 0, 1) 0%, rgba(255, 128, 0, 1) 8%, rgba(255, 255, 0, 1) 17%, rgba(128, 255, 0, 1) 25%, rgba(0, 255, 0, 1) 33%, rgba(0, 255, 128, 1) 42%, rgba(0, 255, 255, 1) 50%, rgba(0, 128, 255, 1) 58%, rgba(0, 0, 255, 1) 67%, rgba(128, 0, 255, 1) 75%, rgba(255, 0, 255, 1) 83%, rgba(255, 0, 128, 1) 92%, rgba(255, 0, 0, 1) 100%); /* W3C */\n}\n\n.colorpicker {\n position: relative;\n display: none;\n font-size: inherit;\n color: inherit;\n text-align: left;\n list-style: none;\n background-color: #ffffff;\n background-clip: padding-box;\n border: 1px solid $outline-color;\n //box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);\n padding: .75rem .75rem;\n width: ($bar-size-large + $base-margin + $bar-size-short);\n border-radius: 4px;\n box-sizing: content-box;\n}\n\n.colorpicker.colorpicker-disabled,\n.colorpicker.colorpicker-disabled * {\n cursor: default !important;\n}\n\n.colorpicker div {\n position: relative;\n}\n\n.colorpicker-popup {\n position: absolute;\n top: 100%;\n left: 0;\n float: left;\n margin-top: 1px;\n z-index: 1060;\n}\n\n.colorpicker-popup.colorpicker-bs-popover-content {\n position: relative;\n top: auto;\n left: auto;\n float: none;\n margin: 0;\n z-index: initial;\n border: none;\n padding: 0.25rem 0; // popover padding correction\n border-radius: 0;\n background: none;\n box-shadow: none;\n}\n\n.colorpicker:before,\n.colorpicker:after {\n content: \"\";\n display: table;\n clear: both;\n line-height: 0;\n}\n\n.colorpicker-clear {\n clear: both;\n display: block;\n}\n\n.colorpicker:before {\n content: '';\n display: inline-block;\n border-left: 7px solid transparent;\n border-right: 7px solid transparent;\n border-bottom: 7px solid #ccc;\n border-bottom-color: $outline-color;\n position: absolute;\n top: -7px;\n left: auto;\n right: 6px;\n}\n\n.colorpicker:after {\n content: '';\n display: inline-block;\n border-left: 6px solid transparent;\n border-right: 6px solid transparent;\n border-bottom: 6px solid #ffffff;\n position: absolute;\n top: -6px;\n left: auto;\n right: 7px;\n}\n\n.colorpicker.colorpicker-with-alpha {\n width: ($bar-size-large + (($base-margin + $bar-size-short) * 2));\n}\n\n.colorpicker.colorpicker-with-alpha .colorpicker-alpha {\n display: block;\n}\n\n.colorpicker-saturation {\n position: relative;\n width: $bar-size-large;\n height: $bar-size-large;\n @include bgSaturation();\n cursor: crosshair;\n float: left;\n box-shadow: $box-shadow-outline;\n margin-bottom: $base-margin;\n\n .colorpicker-guide {\n display: block;\n height: 6px;\n width: 6px;\n border-radius: 6px;\n border: 1px solid #000;\n box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.8);\n position: absolute;\n top: 0;\n left: 0;\n margin: -3px 0 0 -3px;\n }\n}\n\n.colorpicker-hue,\n.colorpicker-alpha {\n position: relative;\n width: $bar-size-short;\n height: $bar-size-large;\n float: left;\n cursor: row-resize;\n margin-left: $base-margin;\n margin-bottom: $base-margin;\n}\n\n.colorpicker-alpha-color {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n}\n\n.colorpicker-hue,\n.colorpicker-alpha-color {\n box-shadow: $box-shadow-outline;\n}\n\n.colorpicker-hue .colorpicker-guide,\n.colorpicker-alpha .colorpicker-guide {\n display: block;\n height: 4px;\n background: rgba(255, 255, 255, 0.8);\n border: 1px solid rgba(0, 0, 0, 0.4);\n position: absolute;\n top: 0;\n left: 0;\n margin-left: -2px;\n margin-top: -2px;\n right: -2px;\n z-index: 1;\n}\n\n.colorpicker-hue {\n @include bgHueVertical();\n}\n\n.colorpicker-alpha {\n @include bgCheckerBox();\n display: none;\n}\n\n.colorpicker-bar {\n min-height: $bar-size-short;\n margin: $base-margin 0 0 0;\n clear: both;\n text-align: center;\n font-size: 10px;\n line-height: normal;\n max-width: 100%;\n box-shadow: $box-shadow-outline;\n\n &:before {\n content: \"\";\n display: table;\n clear: both;\n }\n}\n\n.colorpicker-bar.colorpicker-bar-horizontal {\n height: $bar-size-large;\n width: $bar-size-short;\n margin: 0 0 $base-margin 0;\n float: left;\n}\n\n.colorpicker-input-addon {\n position: relative;\n}\n\n.colorpicker-input-addon i {\n display: inline-block;\n cursor: pointer;\n vertical-align: text-top;\n height: 16px;\n width: 16px;\n position: relative;\n}\n\n.colorpicker-input-addon:before {\n content: \"\";\n position: absolute;\n width: 16px;\n height: 16px;\n display: inline-block;\n vertical-align: text-top;\n @include bgCheckerBox();\n}\n\n.colorpicker.colorpicker-inline {\n position: relative;\n display: inline-block;\n float: none;\n z-index: auto;\n vertical-align: text-bottom;\n}\n\n.colorpicker.colorpicker-horizontal {\n width: $bar-size-large;\n height: auto;\n}\n\n.colorpicker.colorpicker-horizontal .colorpicker-bar {\n width: $bar-size-large;\n}\n\n.colorpicker.colorpicker-horizontal .colorpicker-saturation {\n float: none;\n margin-bottom: 0;\n}\n\n.colorpicker.colorpicker-horizontal .colorpicker-hue,\n.colorpicker.colorpicker-horizontal .colorpicker-alpha {\n float: none;\n width: $bar-size-large;\n height: $bar-size-short;\n cursor: col-resize;\n margin-left: 0;\n margin-top: $base-margin;\n margin-bottom: 0;\n}\n\n.colorpicker.colorpicker-horizontal .colorpicker-hue .colorpicker-guide,\n.colorpicker.colorpicker-horizontal .colorpicker-alpha .colorpicker-guide {\n position: absolute;\n display: block;\n bottom: -2px;\n left: 0;\n right: auto;\n height: auto;\n width: 4px;\n}\n\n.colorpicker.colorpicker-horizontal .colorpicker-hue {\n @include bgHueHorizontal();\n}\n\n.colorpicker.colorpicker-horizontal .colorpicker-alpha {\n @include bgCheckerBox();\n}\n\n.colorpicker-inline:before,\n.colorpicker-no-arrow:before,\n.colorpicker-popup.colorpicker-bs-popover-content:before {\n content: none;\n display: none;\n}\n\n.colorpicker-inline:after,\n.colorpicker-no-arrow:after,\n.colorpicker-popup.colorpicker-bs-popover-content:after {\n content: none;\n display: none;\n}\n\n\n.colorpicker-alpha,\n.colorpicker-saturation,\n.colorpicker-hue {\n user-select: none;\n}\n\n.colorpicker,\n.colorpicker-alpha,\n.colorpicker-saturation,\n.colorpicker-hue,\n.colorpicker-bar {\n &.colorpicker-visible {\n display: block;\n }\n}\n\n.colorpicker,\n.colorpicker-alpha,\n.colorpicker-saturation,\n.colorpicker-hue,\n.colorpicker-bar {\n &.colorpicker-hidden {\n display: none;\n }\n}\n\n.colorpicker-inline.colorpicker-visible {\n display: inline-block;\n}\n\n.colorpicker.colorpicker-disabled:after {\n border: none;\n content: '';\n display: block;\n width: 100%;\n height: 100%;\n background: rgba(233, 236, 239, 0.33);\n top: 0;\n left: 0;\n right: auto;\n z-index: 2;\n position: absolute;\n}\n\n.colorpicker.colorpicker-disabled .colorpicker-guide {\n display: none;\n}\n\n/** EXTENSIONS **/\n\n.colorpicker-preview {\n @include bgCheckerBox();\n}\n\n.colorpicker-preview > div {\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n}\n\n.colorpicker-bar.colorpicker-swatches {\n box-shadow: none;\n height: auto;\n}\n\n.colorpicker-swatches--inner {\n clear: both;\n margin-top: -$base-margin;\n}\n\n.colorpicker-swatch {\n position: relative;\n cursor: pointer;\n float: left;\n height: $bar-size-short;\n width: $bar-size-short;\n margin-right: $base-margin;\n margin-top: $base-margin;\n margin-left: 0;\n display: block;\n box-shadow: $box-shadow-outline;\n @include bgCheckerBox();\n}\n\n.colorpicker-swatch--inner {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n}\n\n// saturation + hue vertical (clear margin-right on nth column + 1)\n.colorpicker-swatch:nth-of-type(#{$columns + 1}n+0) {\n margin-right: 0;\n}\n\n// saturation + hue + alpha vertical (clear margin-right on nth column + 2)\n.colorpicker-with-alpha {\n .colorpicker-swatch:nth-of-type(#{$columns + 1}n+0) {\n margin-right: $base-margin;\n }\n\n .colorpicker-swatch:nth-of-type(#{$columns + 2}n+0) {\n margin-right: 0;\n }\n}\n\n// horizontal mode (clear margin-right on nth column)\n.colorpicker-horizontal {\n .colorpicker-swatch:nth-of-type(#{$columns}n+0) {\n margin-right: 0;\n }\n\n .colorpicker-swatch:nth-of-type(#{$columns + 1}n+0) {\n margin-right: $base-margin;\n }\n\n .colorpicker-swatch:nth-of-type(#{$columns + 2}n+0) {\n margin-right: $base-margin;\n }\n}\n\n.colorpicker-swatch:last-of-type:after {\n content: \"\";\n display: table;\n clear: both;\n}\n\n// RTL writing mode support\n*[dir='rtl'] .colorpicker-element input,\n.colorpicker-element[dir='rtl'] input,\n.colorpicker-element input[dir='rtl'] {\n direction: ltr;\n text-align: right;\n}\n"]} \ No newline at end of file diff --git a/vendor/bootstrap-colorpicker/css/bootstrap-colorpicker.min.css b/vendor/bootstrap-colorpicker/css/bootstrap-colorpicker.min.css new file mode 100644 index 00000000..52be6908 --- /dev/null +++ b/vendor/bootstrap-colorpicker/css/bootstrap-colorpicker.min.css @@ -0,0 +1,10 @@ +/*! + * Bootstrap Colorpicker - Bootstrap Colorpicker is a modular color picker plugin for Bootstrap 4. + * @package bootstrap-colorpicker + * @version v3.1.2 + * @license MIT + * @link https://farbelous.github.io/bootstrap-colorpicker/ + * @link https://github.com/farbelous/bootstrap-colorpicker.git + */ +.colorpicker{position:relative;display:none;font-size:inherit;color:inherit;text-align:left;list-style:none;background-color:#fff;background-clip:padding-box;border:1px solid rgba(0,0,0,.2);padding:.75rem .75rem;width:148px;border-radius:4px;-webkit-box-sizing:content-box;box-sizing:content-box}.colorpicker.colorpicker-disabled,.colorpicker.colorpicker-disabled *{cursor:default!important}.colorpicker div{position:relative}.colorpicker-popup{position:absolute;top:100%;left:0;float:left;margin-top:1px;z-index:1060}.colorpicker-popup.colorpicker-bs-popover-content{position:relative;top:auto;left:auto;float:none;margin:0;z-index:initial;border:none;padding:.25rem 0;border-radius:0;background:0 0;-webkit-box-shadow:none;box-shadow:none}.colorpicker:after,.colorpicker:before{content:"";display:table;clear:both;line-height:0}.colorpicker-clear{clear:both;display:block}.colorpicker:before{content:'';display:inline-block;border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid #ccc;border-bottom-color:rgba(0,0,0,.2);position:absolute;top:-7px;left:auto;right:6px}.colorpicker:after{content:'';display:inline-block;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #fff;position:absolute;top:-6px;left:auto;right:7px}.colorpicker.colorpicker-with-alpha{width:170px}.colorpicker.colorpicker-with-alpha .colorpicker-alpha{display:block}.colorpicker-saturation{position:relative;width:126px;height:126px;background:-webkit-gradient(linear,left top,left bottom,from(transparent),to(black)),-webkit-gradient(linear,left top,right top,from(white),to(rgba(255,255,255,0)));background:linear-gradient(to bottom,transparent 0,#000 100%),linear-gradient(to right,#fff 0,rgba(255,255,255,0) 100%);cursor:crosshair;float:left;-webkit-box-shadow:0 0 0 1px rgba(0,0,0,.2);box-shadow:0 0 0 1px rgba(0,0,0,.2);margin-bottom:6px}.colorpicker-saturation .colorpicker-guide{display:block;height:6px;width:6px;border-radius:6px;border:1px solid #000;-webkit-box-shadow:0 0 0 1px rgba(255,255,255,.8);box-shadow:0 0 0 1px rgba(255,255,255,.8);position:absolute;top:0;left:0;margin:-3px 0 0 -3px}.colorpicker-alpha,.colorpicker-hue{position:relative;width:16px;height:126px;float:left;cursor:row-resize;margin-left:6px;margin-bottom:6px}.colorpicker-alpha-color{position:absolute;top:0;left:0;width:100%;height:100%}.colorpicker-alpha-color,.colorpicker-hue{-webkit-box-shadow:0 0 0 1px rgba(0,0,0,.2);box-shadow:0 0 0 1px rgba(0,0,0,.2)}.colorpicker-alpha .colorpicker-guide,.colorpicker-hue .colorpicker-guide{display:block;height:4px;background:rgba(255,255,255,.8);border:1px solid rgba(0,0,0,.4);position:absolute;top:0;left:0;margin-left:-2px;margin-top:-2px;right:-2px;z-index:1}.colorpicker-hue{background:-webkit-gradient(linear,left bottom,left top,from(red),color-stop(8%,#ff8000),color-stop(17%,#ff0),color-stop(25%,#80ff00),color-stop(33%,#0f0),color-stop(42%,#00ff80),color-stop(50%,#0ff),color-stop(58%,#0080ff),color-stop(67%,#00f),color-stop(75%,#8000ff),color-stop(83%,#ff00ff),color-stop(92%,#ff0080),to(red));background:linear-gradient(to top,red 0,#ff8000 8%,#ff0 17%,#80ff00 25%,#0f0 33%,#00ff80 42%,#0ff 50%,#0080ff 58%,#00f 67%,#8000ff 75%,#ff00ff 83%,#ff0080 92%,red 100%)}.colorpicker-alpha{background:linear-gradient(45deg,rgba(0,0,0,.1) 25%,transparent 25%,transparent 75%,rgba(0,0,0,.1) 75%,rgba(0,0,0,.1) 0),linear-gradient(45deg,rgba(0,0,0,.1) 25%,transparent 25%,transparent 75%,rgba(0,0,0,.1) 75%,rgba(0,0,0,.1) 0),#fff;background-size:10px 10px;background-position:0 0,5px 5px;display:none}.colorpicker-bar{min-height:16px;margin:6px 0 0 0;clear:both;text-align:center;font-size:10px;line-height:normal;max-width:100%;-webkit-box-shadow:0 0 0 1px rgba(0,0,0,.2);box-shadow:0 0 0 1px rgba(0,0,0,.2)}.colorpicker-bar:before{content:"";display:table;clear:both}.colorpicker-bar.colorpicker-bar-horizontal{height:126px;width:16px;margin:0 0 6px 0;float:left}.colorpicker-input-addon{position:relative}.colorpicker-input-addon i{display:inline-block;cursor:pointer;vertical-align:text-top;height:16px;width:16px;position:relative}.colorpicker-input-addon:before{content:"";position:absolute;width:16px;height:16px;display:inline-block;vertical-align:text-top;background:linear-gradient(45deg,rgba(0,0,0,.1) 25%,transparent 25%,transparent 75%,rgba(0,0,0,.1) 75%,rgba(0,0,0,.1) 0),linear-gradient(45deg,rgba(0,0,0,.1) 25%,transparent 25%,transparent 75%,rgba(0,0,0,.1) 75%,rgba(0,0,0,.1) 0),#fff;background-size:10px 10px;background-position:0 0,5px 5px}.colorpicker.colorpicker-inline{position:relative;display:inline-block;float:none;z-index:auto;vertical-align:text-bottom}.colorpicker.colorpicker-horizontal{width:126px;height:auto}.colorpicker.colorpicker-horizontal .colorpicker-bar{width:126px}.colorpicker.colorpicker-horizontal .colorpicker-saturation{float:none;margin-bottom:0}.colorpicker.colorpicker-horizontal .colorpicker-alpha,.colorpicker.colorpicker-horizontal .colorpicker-hue{float:none;width:126px;height:16px;cursor:col-resize;margin-left:0;margin-top:6px;margin-bottom:0}.colorpicker.colorpicker-horizontal .colorpicker-alpha .colorpicker-guide,.colorpicker.colorpicker-horizontal .colorpicker-hue .colorpicker-guide{position:absolute;display:block;bottom:-2px;left:0;right:auto;height:auto;width:4px}.colorpicker.colorpicker-horizontal .colorpicker-hue{background:-webkit-gradient(linear,right top,left top,from(red),color-stop(8%,#ff8000),color-stop(17%,#ff0),color-stop(25%,#80ff00),color-stop(33%,#0f0),color-stop(42%,#00ff80),color-stop(50%,#0ff),color-stop(58%,#0080ff),color-stop(67%,#00f),color-stop(75%,#8000ff),color-stop(83%,#ff00ff),color-stop(92%,#ff0080),to(red));background:linear-gradient(to left,red 0,#ff8000 8%,#ff0 17%,#80ff00 25%,#0f0 33%,#00ff80 42%,#0ff 50%,#0080ff 58%,#00f 67%,#8000ff 75%,#ff00ff 83%,#ff0080 92%,red 100%)}.colorpicker.colorpicker-horizontal .colorpicker-alpha{background:linear-gradient(45deg,rgba(0,0,0,.1) 25%,transparent 25%,transparent 75%,rgba(0,0,0,.1) 75%,rgba(0,0,0,.1) 0),linear-gradient(45deg,rgba(0,0,0,.1) 25%,transparent 25%,transparent 75%,rgba(0,0,0,.1) 75%,rgba(0,0,0,.1) 0),#fff;background-size:10px 10px;background-position:0 0,5px 5px}.colorpicker-inline:before,.colorpicker-no-arrow:before,.colorpicker-popup.colorpicker-bs-popover-content:before{content:none;display:none}.colorpicker-inline:after,.colorpicker-no-arrow:after,.colorpicker-popup.colorpicker-bs-popover-content:after{content:none;display:none}.colorpicker-alpha,.colorpicker-hue,.colorpicker-saturation{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.colorpicker-alpha.colorpicker-visible,.colorpicker-bar.colorpicker-visible,.colorpicker-hue.colorpicker-visible,.colorpicker-saturation.colorpicker-visible,.colorpicker.colorpicker-visible{display:block}.colorpicker-alpha.colorpicker-hidden,.colorpicker-bar.colorpicker-hidden,.colorpicker-hue.colorpicker-hidden,.colorpicker-saturation.colorpicker-hidden,.colorpicker.colorpicker-hidden{display:none}.colorpicker-inline.colorpicker-visible{display:inline-block}.colorpicker.colorpicker-disabled:after{border:none;content:'';display:block;width:100%;height:100%;background:rgba(233,236,239,.33);top:0;left:0;right:auto;z-index:2;position:absolute}.colorpicker.colorpicker-disabled .colorpicker-guide{display:none}.colorpicker-preview{background:linear-gradient(45deg,rgba(0,0,0,.1) 25%,transparent 25%,transparent 75%,rgba(0,0,0,.1) 75%,rgba(0,0,0,.1) 0),linear-gradient(45deg,rgba(0,0,0,.1) 25%,transparent 25%,transparent 75%,rgba(0,0,0,.1) 75%,rgba(0,0,0,.1) 0),#fff;background-size:10px 10px;background-position:0 0,5px 5px}.colorpicker-preview>div{position:absolute;left:0;top:0;width:100%;height:100%}.colorpicker-bar.colorpicker-swatches{-webkit-box-shadow:none;box-shadow:none;height:auto}.colorpicker-swatches--inner{clear:both;margin-top:-6px}.colorpicker-swatch{position:relative;cursor:pointer;float:left;height:16px;width:16px;margin-right:6px;margin-top:6px;margin-left:0;display:block;-webkit-box-shadow:0 0 0 1px rgba(0,0,0,.2);box-shadow:0 0 0 1px rgba(0,0,0,.2);background:linear-gradient(45deg,rgba(0,0,0,.1) 25%,transparent 25%,transparent 75%,rgba(0,0,0,.1) 75%,rgba(0,0,0,.1) 0),linear-gradient(45deg,rgba(0,0,0,.1) 25%,transparent 25%,transparent 75%,rgba(0,0,0,.1) 75%,rgba(0,0,0,.1) 0),#fff;background-size:10px 10px;background-position:0 0,5px 5px}.colorpicker-swatch--inner{position:absolute;top:0;left:0;width:100%;height:100%}.colorpicker-swatch:nth-of-type(7n+0){margin-right:0}.colorpicker-with-alpha .colorpicker-swatch:nth-of-type(7n+0){margin-right:6px}.colorpicker-with-alpha .colorpicker-swatch:nth-of-type(8n+0){margin-right:0}.colorpicker-horizontal .colorpicker-swatch:nth-of-type(6n+0){margin-right:0}.colorpicker-horizontal .colorpicker-swatch:nth-of-type(7n+0){margin-right:6px}.colorpicker-horizontal .colorpicker-swatch:nth-of-type(8n+0){margin-right:6px}.colorpicker-swatch:last-of-type:after{content:"";display:table;clear:both}.colorpicker-element input[dir=rtl],.colorpicker-element[dir=rtl] input,[dir=rtl] .colorpicker-element input{direction:ltr;text-align:right} +/*# sourceMappingURL=bootstrap-colorpicker.min.css.map */ diff --git a/vendor/bootstrap-colorpicker/css/bootstrap-colorpicker.min.css.map b/vendor/bootstrap-colorpicker/css/bootstrap-colorpicker.min.css.map new file mode 100644 index 00000000..e00c6cc9 --- /dev/null +++ b/vendor/bootstrap-colorpicker/css/bootstrap-colorpicker.min.css.map @@ -0,0 +1 @@ +{"version":3,"sources":["bootstrap-colorpicker.css","bootstrap-colorpicker.css"],"names":[],"mappings":"AAiDA,aACE,SAAA,SACA,QAAA,KACA,UAAA,QACA,MAAA,QACA,WAAA,KACA,WAAA,KACA,iBAAA,KACA,gBAAA,YACA,OAAA,IAAA,MAAA,eAEA,QAAA,OAAA,OACA,MAAA,MACA,cAAA,IAC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I,aAAA,IAFJ,8DAMI,aAAA,EAKJ,8DAEI,aAAA,EAFJ,8DAMI,aAAA,IANJ,8DAUI,aAAA,IAIJ,uCACE,QAAA,GACA,QAAA,MACA,MAAA,KCxEF,oCADA,oCD6EA,qCAGE,UAAA,IACA,WAAA","file":"bootstrap-colorpicker.min.css","sourcesContent":[".colorpicker {\n position: relative;\n display: none;\n font-size: inherit;\n color: inherit;\n text-align: left;\n list-style: none;\n background-color: #ffffff;\n background-clip: padding-box;\n border: 1px solid rgba(0, 0, 0, 0.2);\n padding: .75rem .75rem;\n width: 148px;\n border-radius: 4px;\n -webkit-box-sizing: content-box;\n box-sizing: content-box; }\n\n.colorpicker.colorpicker-disabled,\n.colorpicker.colorpicker-disabled * {\n cursor: default !important; }\n\n.colorpicker div {\n position: relative; }\n\n.colorpicker-popup {\n position: absolute;\n top: 100%;\n left: 0;\n float: left;\n margin-top: 1px;\n z-index: 1060; }\n\n.colorpicker-popup.colorpicker-bs-popover-content {\n position: relative;\n top: auto;\n left: auto;\n float: none;\n margin: 0;\n z-index: initial;\n border: none;\n padding: 0.25rem 0;\n border-radius: 0;\n background: none;\n -webkit-box-shadow: none;\n box-shadow: none; }\n\n.colorpicker:before,\n.colorpicker:after {\n content: \"\";\n display: table;\n clear: both;\n line-height: 0; }\n\n.colorpicker-clear {\n clear: both;\n display: block; }\n\n.colorpicker:before {\n content: '';\n display: inline-block;\n border-left: 7px solid transparent;\n border-right: 7px solid transparent;\n border-bottom: 7px solid #ccc;\n border-bottom-color: rgba(0, 0, 0, 0.2);\n position: absolute;\n top: -7px;\n left: auto;\n right: 6px; }\n\n.colorpicker:after {\n content: '';\n display: inline-block;\n border-left: 6px solid transparent;\n border-right: 6px solid transparent;\n border-bottom: 6px solid #ffffff;\n position: absolute;\n top: -6px;\n left: auto;\n right: 7px; }\n\n.colorpicker.colorpicker-with-alpha {\n width: 170px; }\n\n.colorpicker.colorpicker-with-alpha .colorpicker-alpha {\n display: block; }\n\n.colorpicker-saturation {\n position: relative;\n width: 126px;\n height: 126px;\n /* FF3.6+ */\n /* Chrome,Safari4+ */\n /* Chrome10+,Safari5.1+ */\n /* Opera 11.10+ */\n /* IE10+ */\n background: -webkit-gradient(linear, left top, left bottom, from(transparent), to(black)), -webkit-gradient(linear, left top, right top, from(white), to(rgba(255, 255, 255, 0)));\n background: linear-gradient(to bottom, transparent 0%, black 100%), linear-gradient(to right, white 0%, rgba(255, 255, 255, 0) 100%);\n /* W3C */\n cursor: crosshair;\n float: left;\n -webkit-box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2);\n box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2);\n margin-bottom: 6px; }\n .colorpicker-saturation .colorpicker-guide {\n display: block;\n height: 6px;\n width: 6px;\n border-radius: 6px;\n border: 1px solid #000;\n -webkit-box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.8);\n box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.8);\n position: absolute;\n top: 0;\n left: 0;\n margin: -3px 0 0 -3px; }\n\n.colorpicker-hue,\n.colorpicker-alpha {\n position: relative;\n width: 16px;\n height: 126px;\n float: left;\n cursor: row-resize;\n margin-left: 6px;\n margin-bottom: 6px; }\n\n.colorpicker-alpha-color {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%; }\n\n.colorpicker-hue,\n.colorpicker-alpha-color {\n -webkit-box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2);\n box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2); }\n\n.colorpicker-hue .colorpicker-guide,\n.colorpicker-alpha .colorpicker-guide {\n display: block;\n height: 4px;\n background: rgba(255, 255, 255, 0.8);\n border: 1px solid rgba(0, 0, 0, 0.4);\n position: absolute;\n top: 0;\n left: 0;\n margin-left: -2px;\n margin-top: -2px;\n right: -2px;\n z-index: 1; }\n\n.colorpicker-hue {\n /* FF3.6+ */\n /* Chrome,Safari4+ */\n /* Chrome10+,Safari5.1+ */\n /* Opera 11.10+ */\n /* IE10+ */\n background: -webkit-gradient(linear, left bottom, left top, from(red), color-stop(8%, #ff8000), color-stop(17%, yellow), color-stop(25%, #80ff00), color-stop(33%, lime), color-stop(42%, #00ff80), color-stop(50%, cyan), color-stop(58%, #0080ff), color-stop(67%, blue), color-stop(75%, #8000ff), color-stop(83%, magenta), color-stop(92%, #ff0080), to(red));\n background: linear-gradient(to top, red 0%, #ff8000 8%, yellow 17%, #80ff00 25%, lime 33%, #00ff80 42%, cyan 50%, #0080ff 58%, blue 67%, #8000ff 75%, magenta 83%, #ff0080 92%, red 100%);\n /* W3C */ }\n\n.colorpicker-alpha {\n background: linear-gradient(45deg, rgba(0, 0, 0, 0.1) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, 0.1) 75%, rgba(0, 0, 0, 0.1) 0), linear-gradient(45deg, rgba(0, 0, 0, 0.1) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, 0.1) 75%, rgba(0, 0, 0, 0.1) 0), white;\n background-size: 10px 10px;\n background-position: 0 0, 5px 5px;\n display: none; }\n\n.colorpicker-bar {\n min-height: 16px;\n margin: 6px 0 0 0;\n clear: both;\n text-align: center;\n font-size: 10px;\n line-height: normal;\n max-width: 100%;\n -webkit-box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2);\n box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2); }\n .colorpicker-bar:before {\n content: \"\";\n display: table;\n clear: both; }\n\n.colorpicker-bar.colorpicker-bar-horizontal {\n height: 126px;\n width: 16px;\n margin: 0 0 6px 0;\n float: left; }\n\n.colorpicker-input-addon {\n position: relative; }\n\n.colorpicker-input-addon i {\n display: inline-block;\n cursor: pointer;\n vertical-align: text-top;\n height: 16px;\n width: 16px;\n position: relative; }\n\n.colorpicker-input-addon:before {\n content: \"\";\n position: absolute;\n width: 16px;\n height: 16px;\n display: inline-block;\n vertical-align: text-top;\n background: linear-gradient(45deg, rgba(0, 0, 0, 0.1) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, 0.1) 75%, rgba(0, 0, 0, 0.1) 0), linear-gradient(45deg, rgba(0, 0, 0, 0.1) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, 0.1) 75%, rgba(0, 0, 0, 0.1) 0), white;\n background-size: 10px 10px;\n background-position: 0 0, 5px 5px; }\n\n.colorpicker.colorpicker-inline {\n position: relative;\n display: inline-block;\n float: none;\n z-index: auto;\n vertical-align: text-bottom; }\n\n.colorpicker.colorpicker-horizontal {\n width: 126px;\n height: auto; }\n\n.colorpicker.colorpicker-horizontal .colorpicker-bar {\n width: 126px; }\n\n.colorpicker.colorpicker-horizontal .colorpicker-saturation {\n float: none;\n margin-bottom: 0; }\n\n.colorpicker.colorpicker-horizontal .colorpicker-hue,\n.colorpicker.colorpicker-horizontal .colorpicker-alpha {\n float: none;\n width: 126px;\n height: 16px;\n cursor: col-resize;\n margin-left: 0;\n margin-top: 6px;\n margin-bottom: 0; }\n\n.colorpicker.colorpicker-horizontal .colorpicker-hue .colorpicker-guide,\n.colorpicker.colorpicker-horizontal .colorpicker-alpha .colorpicker-guide {\n position: absolute;\n display: block;\n bottom: -2px;\n left: 0;\n right: auto;\n height: auto;\n width: 4px; }\n\n.colorpicker.colorpicker-horizontal .colorpicker-hue {\n /* FF3.6+ */\n /* Chrome,Safari4+ */\n /* Chrome10+,Safari5.1+ */\n /* Opera 11.10+ */\n /* IE10+ */\n background: -webkit-gradient(linear, right top, left top, from(red), color-stop(8%, #ff8000), color-stop(17%, yellow), color-stop(25%, #80ff00), color-stop(33%, lime), color-stop(42%, #00ff80), color-stop(50%, cyan), color-stop(58%, #0080ff), color-stop(67%, blue), color-stop(75%, #8000ff), color-stop(83%, magenta), color-stop(92%, #ff0080), to(red));\n background: linear-gradient(to left, red 0%, #ff8000 8%, yellow 17%, #80ff00 25%, lime 33%, #00ff80 42%, cyan 50%, #0080ff 58%, blue 67%, #8000ff 75%, magenta 83%, #ff0080 92%, red 100%);\n /* W3C */ }\n\n.colorpicker.colorpicker-horizontal .colorpicker-alpha {\n background: linear-gradient(45deg, rgba(0, 0, 0, 0.1) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, 0.1) 75%, rgba(0, 0, 0, 0.1) 0), linear-gradient(45deg, rgba(0, 0, 0, 0.1) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, 0.1) 75%, rgba(0, 0, 0, 0.1) 0), white;\n background-size: 10px 10px;\n background-position: 0 0, 5px 5px; }\n\n.colorpicker-inline:before,\n.colorpicker-no-arrow:before,\n.colorpicker-popup.colorpicker-bs-popover-content:before {\n content: none;\n display: none; }\n\n.colorpicker-inline:after,\n.colorpicker-no-arrow:after,\n.colorpicker-popup.colorpicker-bs-popover-content:after {\n content: none;\n display: none; }\n\n.colorpicker-alpha,\n.colorpicker-saturation,\n.colorpicker-hue {\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none; }\n\n.colorpicker.colorpicker-visible,\n.colorpicker-alpha.colorpicker-visible,\n.colorpicker-saturation.colorpicker-visible,\n.colorpicker-hue.colorpicker-visible,\n.colorpicker-bar.colorpicker-visible {\n display: block; }\n\n.colorpicker.colorpicker-hidden,\n.colorpicker-alpha.colorpicker-hidden,\n.colorpicker-saturation.colorpicker-hidden,\n.colorpicker-hue.colorpicker-hidden,\n.colorpicker-bar.colorpicker-hidden {\n display: none; }\n\n.colorpicker-inline.colorpicker-visible {\n display: inline-block; }\n\n.colorpicker.colorpicker-disabled:after {\n border: none;\n content: '';\n display: block;\n width: 100%;\n height: 100%;\n background: rgba(233, 236, 239, 0.33);\n top: 0;\n left: 0;\n right: auto;\n z-index: 2;\n position: absolute; }\n\n.colorpicker.colorpicker-disabled .colorpicker-guide {\n display: none; }\n\n/** EXTENSIONS **/\n.colorpicker-preview {\n background: linear-gradient(45deg, rgba(0, 0, 0, 0.1) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, 0.1) 75%, rgba(0, 0, 0, 0.1) 0), linear-gradient(45deg, rgba(0, 0, 0, 0.1) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, 0.1) 75%, rgba(0, 0, 0, 0.1) 0), white;\n background-size: 10px 10px;\n background-position: 0 0, 5px 5px; }\n\n.colorpicker-preview > div {\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%; }\n\n.colorpicker-bar.colorpicker-swatches {\n -webkit-box-shadow: none;\n box-shadow: none;\n height: auto; }\n\n.colorpicker-swatches--inner {\n clear: both;\n margin-top: -6px; }\n\n.colorpicker-swatch {\n position: relative;\n cursor: pointer;\n float: left;\n height: 16px;\n width: 16px;\n margin-right: 6px;\n margin-top: 6px;\n margin-left: 0;\n display: block;\n -webkit-box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2);\n box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2);\n background: linear-gradient(45deg, rgba(0, 0, 0, 0.1) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, 0.1) 75%, rgba(0, 0, 0, 0.1) 0), linear-gradient(45deg, rgba(0, 0, 0, 0.1) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, 0.1) 75%, rgba(0, 0, 0, 0.1) 0), white;\n background-size: 10px 10px;\n background-position: 0 0, 5px 5px; }\n\n.colorpicker-swatch--inner {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%; }\n\n.colorpicker-swatch:nth-of-type(7n+0) {\n margin-right: 0; }\n\n.colorpicker-with-alpha .colorpicker-swatch:nth-of-type(7n+0) {\n margin-right: 6px; }\n\n.colorpicker-with-alpha .colorpicker-swatch:nth-of-type(8n+0) {\n margin-right: 0; }\n\n.colorpicker-horizontal .colorpicker-swatch:nth-of-type(6n+0) {\n margin-right: 0; }\n\n.colorpicker-horizontal .colorpicker-swatch:nth-of-type(7n+0) {\n margin-right: 6px; }\n\n.colorpicker-horizontal .colorpicker-swatch:nth-of-type(8n+0) {\n margin-right: 6px; }\n\n.colorpicker-swatch:last-of-type:after {\n content: \"\";\n display: table;\n clear: both; }\n\n*[dir='rtl'] .colorpicker-element input,\n.colorpicker-element[dir='rtl'] input,\n.colorpicker-element input[dir='rtl'] {\n direction: ltr;\n text-align: right; }\n\n/*# sourceMappingURL=bootstrap-colorpicker.css.map */\n",".colorpicker {\n position: relative;\n display: none;\n font-size: inherit;\n color: inherit;\n text-align: left;\n list-style: none;\n background-color: #ffffff;\n background-clip: padding-box;\n border: 1px solid rgba(0, 0, 0, 0.2);\n padding: .75rem .75rem;\n width: 148px;\n border-radius: 4px;\n -webkit-box-sizing: content-box;\n box-sizing: content-box; }\n\n.colorpicker.colorpicker-disabled,\n.colorpicker.colorpicker-disabled * {\n cursor: default !important; }\n\n.colorpicker div {\n position: relative; }\n\n.colorpicker-popup {\n position: absolute;\n top: 100%;\n left: 0;\n float: left;\n margin-top: 1px;\n z-index: 1060; }\n\n.colorpicker-popup.colorpicker-bs-popover-content {\n position: relative;\n top: auto;\n left: auto;\n float: none;\n margin: 0;\n z-index: initial;\n border: none;\n padding: 0.25rem 0;\n border-radius: 0;\n background: none;\n -webkit-box-shadow: none;\n box-shadow: none; }\n\n.colorpicker:before,\n.colorpicker:after {\n content: \"\";\n display: table;\n clear: both;\n line-height: 0; }\n\n.colorpicker-clear {\n clear: both;\n display: block; }\n\n.colorpicker:before {\n content: '';\n display: inline-block;\n border-left: 7px solid transparent;\n border-right: 7px solid transparent;\n border-bottom: 7px solid #ccc;\n border-bottom-color: rgba(0, 0, 0, 0.2);\n position: absolute;\n top: -7px;\n left: auto;\n right: 6px; }\n\n.colorpicker:after {\n content: '';\n display: inline-block;\n border-left: 6px solid transparent;\n border-right: 6px solid transparent;\n border-bottom: 6px solid #ffffff;\n position: absolute;\n top: -6px;\n left: auto;\n right: 7px; }\n\n.colorpicker.colorpicker-with-alpha {\n width: 170px; }\n\n.colorpicker.colorpicker-with-alpha .colorpicker-alpha {\n display: block; }\n\n.colorpicker-saturation {\n position: relative;\n width: 126px;\n height: 126px;\n /* FF3.6+ */\n /* Chrome,Safari4+ */\n /* Chrome10+,Safari5.1+ */\n /* Opera 11.10+ */\n /* IE10+ */\n background: -webkit-gradient(linear, left top, left bottom, from(transparent), to(black)), -webkit-gradient(linear, left top, right top, from(white), to(rgba(255, 255, 255, 0)));\n background: linear-gradient(to bottom, transparent 0%, black 100%), linear-gradient(to right, white 0%, rgba(255, 255, 255, 0) 100%);\n /* W3C */\n cursor: crosshair;\n float: left;\n -webkit-box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2);\n box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2);\n margin-bottom: 6px; }\n .colorpicker-saturation .colorpicker-guide {\n display: block;\n height: 6px;\n width: 6px;\n border-radius: 6px;\n border: 1px solid #000;\n -webkit-box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.8);\n box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.8);\n position: absolute;\n top: 0;\n left: 0;\n margin: -3px 0 0 -3px; }\n\n.colorpicker-hue,\n.colorpicker-alpha {\n position: relative;\n width: 16px;\n height: 126px;\n float: left;\n cursor: row-resize;\n margin-left: 6px;\n margin-bottom: 6px; }\n\n.colorpicker-alpha-color {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%; }\n\n.colorpicker-hue,\n.colorpicker-alpha-color {\n -webkit-box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2);\n box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2); }\n\n.colorpicker-hue .colorpicker-guide,\n.colorpicker-alpha .colorpicker-guide {\n display: block;\n height: 4px;\n background: rgba(255, 255, 255, 0.8);\n border: 1px solid rgba(0, 0, 0, 0.4);\n position: absolute;\n top: 0;\n left: 0;\n margin-left: -2px;\n margin-top: -2px;\n right: -2px;\n z-index: 1; }\n\n.colorpicker-hue {\n /* FF3.6+ */\n /* Chrome,Safari4+ */\n /* Chrome10+,Safari5.1+ */\n /* Opera 11.10+ */\n /* IE10+ */\n background: -webkit-gradient(linear, left bottom, left top, from(red), color-stop(8%, #ff8000), color-stop(17%, yellow), color-stop(25%, #80ff00), color-stop(33%, lime), color-stop(42%, #00ff80), color-stop(50%, cyan), color-stop(58%, #0080ff), color-stop(67%, blue), color-stop(75%, #8000ff), color-stop(83%, magenta), color-stop(92%, #ff0080), to(red));\n background: linear-gradient(to top, red 0%, #ff8000 8%, yellow 17%, #80ff00 25%, lime 33%, #00ff80 42%, cyan 50%, #0080ff 58%, blue 67%, #8000ff 75%, magenta 83%, #ff0080 92%, red 100%);\n /* W3C */ }\n\n.colorpicker-alpha {\n background: linear-gradient(45deg, rgba(0, 0, 0, 0.1) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, 0.1) 75%, rgba(0, 0, 0, 0.1) 0), linear-gradient(45deg, rgba(0, 0, 0, 0.1) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, 0.1) 75%, rgba(0, 0, 0, 0.1) 0), white;\n background-size: 10px 10px;\n background-position: 0 0, 5px 5px;\n display: none; }\n\n.colorpicker-bar {\n min-height: 16px;\n margin: 6px 0 0 0;\n clear: both;\n text-align: center;\n font-size: 10px;\n line-height: normal;\n max-width: 100%;\n -webkit-box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2);\n box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2); }\n .colorpicker-bar:before {\n content: \"\";\n display: table;\n clear: both; }\n\n.colorpicker-bar.colorpicker-bar-horizontal {\n height: 126px;\n width: 16px;\n margin: 0 0 6px 0;\n float: left; }\n\n.colorpicker-input-addon {\n position: relative; }\n\n.colorpicker-input-addon i {\n display: inline-block;\n cursor: pointer;\n vertical-align: text-top;\n height: 16px;\n width: 16px;\n position: relative; }\n\n.colorpicker-input-addon:before {\n content: \"\";\n position: absolute;\n width: 16px;\n height: 16px;\n display: inline-block;\n vertical-align: text-top;\n background: linear-gradient(45deg, rgba(0, 0, 0, 0.1) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, 0.1) 75%, rgba(0, 0, 0, 0.1) 0), linear-gradient(45deg, rgba(0, 0, 0, 0.1) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, 0.1) 75%, rgba(0, 0, 0, 0.1) 0), white;\n background-size: 10px 10px;\n background-position: 0 0, 5px 5px; }\n\n.colorpicker.colorpicker-inline {\n position: relative;\n display: inline-block;\n float: none;\n z-index: auto;\n vertical-align: text-bottom; }\n\n.colorpicker.colorpicker-horizontal {\n width: 126px;\n height: auto; }\n\n.colorpicker.colorpicker-horizontal .colorpicker-bar {\n width: 126px; }\n\n.colorpicker.colorpicker-horizontal .colorpicker-saturation {\n float: none;\n margin-bottom: 0; }\n\n.colorpicker.colorpicker-horizontal .colorpicker-hue,\n.colorpicker.colorpicker-horizontal .colorpicker-alpha {\n float: none;\n width: 126px;\n height: 16px;\n cursor: col-resize;\n margin-left: 0;\n margin-top: 6px;\n margin-bottom: 0; }\n\n.colorpicker.colorpicker-horizontal .colorpicker-hue .colorpicker-guide,\n.colorpicker.colorpicker-horizontal .colorpicker-alpha .colorpicker-guide {\n position: absolute;\n display: block;\n bottom: -2px;\n left: 0;\n right: auto;\n height: auto;\n width: 4px; }\n\n.colorpicker.colorpicker-horizontal .colorpicker-hue {\n /* FF3.6+ */\n /* Chrome,Safari4+ */\n /* Chrome10+,Safari5.1+ */\n /* Opera 11.10+ */\n /* IE10+ */\n background: -webkit-gradient(linear, right top, left top, from(red), color-stop(8%, #ff8000), color-stop(17%, yellow), color-stop(25%, #80ff00), color-stop(33%, lime), color-stop(42%, #00ff80), color-stop(50%, cyan), color-stop(58%, #0080ff), color-stop(67%, blue), color-stop(75%, #8000ff), color-stop(83%, magenta), color-stop(92%, #ff0080), to(red));\n background: linear-gradient(to left, red 0%, #ff8000 8%, yellow 17%, #80ff00 25%, lime 33%, #00ff80 42%, cyan 50%, #0080ff 58%, blue 67%, #8000ff 75%, magenta 83%, #ff0080 92%, red 100%);\n /* W3C */ }\n\n.colorpicker.colorpicker-horizontal .colorpicker-alpha {\n background: linear-gradient(45deg, rgba(0, 0, 0, 0.1) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, 0.1) 75%, rgba(0, 0, 0, 0.1) 0), linear-gradient(45deg, rgba(0, 0, 0, 0.1) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, 0.1) 75%, rgba(0, 0, 0, 0.1) 0), white;\n background-size: 10px 10px;\n background-position: 0 0, 5px 5px; }\n\n.colorpicker-inline:before,\n.colorpicker-no-arrow:before,\n.colorpicker-popup.colorpicker-bs-popover-content:before {\n content: none;\n display: none; }\n\n.colorpicker-inline:after,\n.colorpicker-no-arrow:after,\n.colorpicker-popup.colorpicker-bs-popover-content:after {\n content: none;\n display: none; }\n\n.colorpicker-alpha,\n.colorpicker-saturation,\n.colorpicker-hue {\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none; }\n\n.colorpicker.colorpicker-visible,\n.colorpicker-alpha.colorpicker-visible,\n.colorpicker-saturation.colorpicker-visible,\n.colorpicker-hue.colorpicker-visible,\n.colorpicker-bar.colorpicker-visible {\n display: block; }\n\n.colorpicker.colorpicker-hidden,\n.colorpicker-alpha.colorpicker-hidden,\n.colorpicker-saturation.colorpicker-hidden,\n.colorpicker-hue.colorpicker-hidden,\n.colorpicker-bar.colorpicker-hidden {\n display: none; }\n\n.colorpicker-inline.colorpicker-visible {\n display: inline-block; }\n\n.colorpicker.colorpicker-disabled:after {\n border: none;\n content: '';\n display: block;\n width: 100%;\n height: 100%;\n background: rgba(233, 236, 239, 0.33);\n top: 0;\n left: 0;\n right: auto;\n z-index: 2;\n position: absolute; }\n\n.colorpicker.colorpicker-disabled .colorpicker-guide {\n display: none; }\n\n/** EXTENSIONS **/\n.colorpicker-preview {\n background: linear-gradient(45deg, rgba(0, 0, 0, 0.1) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, 0.1) 75%, rgba(0, 0, 0, 0.1) 0), linear-gradient(45deg, rgba(0, 0, 0, 0.1) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, 0.1) 75%, rgba(0, 0, 0, 0.1) 0), white;\n background-size: 10px 10px;\n background-position: 0 0, 5px 5px; }\n\n.colorpicker-preview > div {\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%; }\n\n.colorpicker-bar.colorpicker-swatches {\n -webkit-box-shadow: none;\n box-shadow: none;\n height: auto; }\n\n.colorpicker-swatches--inner {\n clear: both;\n margin-top: -6px; }\n\n.colorpicker-swatch {\n position: relative;\n cursor: pointer;\n float: left;\n height: 16px;\n width: 16px;\n margin-right: 6px;\n margin-top: 6px;\n margin-left: 0;\n display: block;\n -webkit-box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2);\n box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2);\n background: linear-gradient(45deg, rgba(0, 0, 0, 0.1) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, 0.1) 75%, rgba(0, 0, 0, 0.1) 0), linear-gradient(45deg, rgba(0, 0, 0, 0.1) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, 0.1) 75%, rgba(0, 0, 0, 0.1) 0), white;\n background-size: 10px 10px;\n background-position: 0 0, 5px 5px; }\n\n.colorpicker-swatch--inner {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%; }\n\n.colorpicker-swatch:nth-of-type(7n+0) {\n margin-right: 0; }\n\n.colorpicker-with-alpha .colorpicker-swatch:nth-of-type(7n+0) {\n margin-right: 6px; }\n\n.colorpicker-with-alpha .colorpicker-swatch:nth-of-type(8n+0) {\n margin-right: 0; }\n\n.colorpicker-horizontal .colorpicker-swatch:nth-of-type(6n+0) {\n margin-right: 0; }\n\n.colorpicker-horizontal .colorpicker-swatch:nth-of-type(7n+0) {\n margin-right: 6px; }\n\n.colorpicker-horizontal .colorpicker-swatch:nth-of-type(8n+0) {\n margin-right: 6px; }\n\n.colorpicker-swatch:last-of-type:after {\n content: \"\";\n display: table;\n clear: both; }\n\n*[dir='rtl'] .colorpicker-element input,\n.colorpicker-element[dir='rtl'] input,\n.colorpicker-element input[dir='rtl'] {\n direction: ltr;\n text-align: right; }\n\n/*# sourceMappingURL=bootstrap-colorpicker.css.map */\n"]} \ No newline at end of file diff --git a/vendor/bootstrap-colorpicker/js/bootstrap-colorpicker.js b/vendor/bootstrap-colorpicker/js/bootstrap-colorpicker.js new file mode 100644 index 00000000..21c566c3 --- /dev/null +++ b/vendor/bootstrap-colorpicker/js/bootstrap-colorpicker.js @@ -0,0 +1,6212 @@ +/*! + * Bootstrap Colorpicker - Bootstrap Colorpicker is a modular color picker plugin for Bootstrap 4. + * @package bootstrap-colorpicker + * @version v3.1.2 + * @license MIT + * @link https://farbelous.github.io/bootstrap-colorpicker/ + * @link https://github.com/farbelous/bootstrap-colorpicker.git + */ +(function webpackUniversalModuleDefinition(root, factory) { + if(typeof exports === 'object' && typeof module === 'object') + module.exports = factory(require("jquery")); + else if(typeof define === 'function' && define.amd) + define("bootstrap-colorpicker", ["jquery"], factory); + else if(typeof exports === 'object') + exports["bootstrap-colorpicker"] = factory(require("jquery")); + else + root["bootstrap-colorpicker"] = factory(root["jQuery"]); +})(typeof self !== 'undefined' ? self : this, function(__WEBPACK_EXTERNAL_MODULE_0__) { +return /******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { +/******/ configurable: false, +/******/ enumerable: true, +/******/ get: getter +/******/ }); +/******/ } +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 7); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports) { + +module.exports = __WEBPACK_EXTERNAL_MODULE_0__; + +/***/ }), +/* 1 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +var _jquery = __webpack_require__(0); + +var _jquery2 = _interopRequireDefault(_jquery); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +/** + * Colorpicker extension class. + */ +var Extension = function () { + /** + * @param {Colorpicker} colorpicker + * @param {Object} options + */ + function Extension(colorpicker) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + _classCallCheck(this, Extension); + + /** + * The colorpicker instance + * @type {Colorpicker} + */ + this.colorpicker = colorpicker; + /** + * Extension options + * + * @type {Object} + */ + this.options = options; + + if (!(this.colorpicker.element && this.colorpicker.element.length)) { + throw new Error('Extension: this.colorpicker.element is not valid'); + } + + this.colorpicker.element.on('colorpickerCreate.colorpicker-ext', _jquery2.default.proxy(this.onCreate, this)); + this.colorpicker.element.on('colorpickerDestroy.colorpicker-ext', _jquery2.default.proxy(this.onDestroy, this)); + this.colorpicker.element.on('colorpickerUpdate.colorpicker-ext', _jquery2.default.proxy(this.onUpdate, this)); + this.colorpicker.element.on('colorpickerChange.colorpicker-ext', _jquery2.default.proxy(this.onChange, this)); + this.colorpicker.element.on('colorpickerInvalid.colorpicker-ext', _jquery2.default.proxy(this.onInvalid, this)); + this.colorpicker.element.on('colorpickerShow.colorpicker-ext', _jquery2.default.proxy(this.onShow, this)); + this.colorpicker.element.on('colorpickerHide.colorpicker-ext', _jquery2.default.proxy(this.onHide, this)); + this.colorpicker.element.on('colorpickerEnable.colorpicker-ext', _jquery2.default.proxy(this.onEnable, this)); + this.colorpicker.element.on('colorpickerDisable.colorpicker-ext', _jquery2.default.proxy(this.onDisable, this)); + } + + /** + * Function called every time a new color needs to be created. + * Return false to skip this resolver and continue with other extensions' ones + * or return anything else to consider the color resolved. + * + * @param {ColorItem|String|*} color + * @param {boolean} realColor if true, the color should resolve into a real (not named) color code + * @return {ColorItem|String|*} + */ + + + _createClass(Extension, [{ + key: 'resolveColor', + value: function resolveColor(color) { + var realColor = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + + return false; + } + + /** + * Method called after the colorpicker is created + * + * @listens Colorpicker#colorpickerCreate + * @param {Event} event + */ + + }, { + key: 'onCreate', + value: function onCreate(event) {} + // to be extended + + + /** + * Method called after the colorpicker is destroyed + * + * @listens Colorpicker#colorpickerDestroy + * @param {Event} event + */ + + }, { + key: 'onDestroy', + value: function onDestroy(event) { + this.colorpicker.element.off('.colorpicker-ext'); + } + + /** + * Method called after the colorpicker is updated + * + * @listens Colorpicker#colorpickerUpdate + * @param {Event} event + */ + + }, { + key: 'onUpdate', + value: function onUpdate(event) {} + // to be extended + + + /** + * Method called after the colorpicker color is changed + * + * @listens Colorpicker#colorpickerChange + * @param {Event} event + */ + + }, { + key: 'onChange', + value: function onChange(event) {} + // to be extended + + + /** + * Method called when the colorpicker color is invalid + * + * @listens Colorpicker#colorpickerInvalid + * @param {Event} event + */ + + }, { + key: 'onInvalid', + value: function onInvalid(event) {} + // to be extended + + + /** + * Method called after the colorpicker is hidden + * + * @listens Colorpicker#colorpickerHide + * @param {Event} event + */ + + }, { + key: 'onHide', + value: function onHide(event) {} + // to be extended + + + /** + * Method called after the colorpicker is shown + * + * @listens Colorpicker#colorpickerShow + * @param {Event} event + */ + + }, { + key: 'onShow', + value: function onShow(event) {} + // to be extended + + + /** + * Method called after the colorpicker is disabled + * + * @listens Colorpicker#colorpickerDisable + * @param {Event} event + */ + + }, { + key: 'onDisable', + value: function onDisable(event) {} + // to be extended + + + /** + * Method called after the colorpicker is enabled + * + * @listens Colorpicker#colorpickerEnable + * @param {Event} event + */ + + }, { + key: 'onEnable', + value: function onEnable(event) { + // to be extended + } + }]); + + return Extension; +}(); + +exports.default = Extension; + +/***/ }), +/* 2 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.ColorItem = exports.HSVAColor = undefined; + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); /** + * Color manipulation class, specific for Bootstrap Colorpicker + */ + + +var _color = __webpack_require__(16); + +var _color2 = _interopRequireDefault(_color); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +/** + * HSVA color data class, containing the hue, saturation, value and alpha + * information. + */ +var HSVAColor = function () { + /** + * @param {number|int} h + * @param {number|int} s + * @param {number|int} v + * @param {number|int} a + */ + function HSVAColor(h, s, v, a) { + _classCallCheck(this, HSVAColor); + + this.h = isNaN(h) ? 0 : h; + this.s = isNaN(s) ? 0 : s; + this.v = isNaN(v) ? 0 : v; + this.a = isNaN(h) ? 1 : a; + } + + _createClass(HSVAColor, [{ + key: 'toString', + value: function toString() { + return this.h + ', ' + this.s + '%, ' + this.v + '%, ' + this.a; + } + }]); + + return HSVAColor; +}(); + +/** + * HSVA color manipulation + */ + + +var ColorItem = function () { + _createClass(ColorItem, [{ + key: 'api', + + + /** + * Applies a method of the QixColor API and returns a new Color object or + * the return value of the method call. + * + * If no argument is provided, the internal QixColor object is returned. + * + * @param {String} fn QixColor function name + * @param args QixColor function arguments + * @example let darkerColor = color.api('darken', 0.25); + * @example let luminosity = color.api('luminosity'); + * @example color = color.api('negate'); + * @example let qColor = color.api().negate(); + * @returns {ColorItem|QixColor|*} + */ + value: function api(fn) { + for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + args[_key - 1] = arguments[_key]; + } + + if (arguments.length === 0) { + return this._color; + } + + var result = this._color[fn].apply(this._color, args); + + if (!(result instanceof _color2.default)) { + // return result of the method call + return result; + } + + return new ColorItem(result, this.format); + } + + /** + * Returns the original ColorItem constructor data, + * plus a 'valid' flag to know if it's valid or not. + * + * @returns {{color: *, format: String, valid: boolean}} + */ + + }, { + key: 'original', + get: function get() { + return this._original; + } + + /** + * @param {ColorItem|HSVAColor|QixColor|String|*|null} color Color data + * @param {String|null} format Color model to convert to by default. Supported: 'rgb', 'hsl', 'hex'. + */ + + }], [{ + key: 'HSVAColor', + + + /** + * Returns the HSVAColor class + * + * @static + * @example let colorData = new ColorItem.HSVAColor(360, 100, 100, 1); + * @returns {HSVAColor} + */ + get: function get() { + return HSVAColor; + } + }]); + + function ColorItem() { + var color = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; + var format = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; + + _classCallCheck(this, ColorItem); + + this.replace(color, format); + } + + /** + * Replaces the internal QixColor object with a new one. + * This also replaces the internal original color data. + * + * @param {ColorItem|HSVAColor|QixColor|String|*|null} color Color data to be parsed (if needed) + * @param {String|null} format Color model to convert to by default. Supported: 'rgb', 'hsl', 'hex'. + * @example color.replace('rgb(255,0,0)', 'hsl'); + * @example color.replace(hsvaColorData); + */ + + + _createClass(ColorItem, [{ + key: 'replace', + value: function replace(color) { + var format = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; + + format = ColorItem.sanitizeFormat(format); + + /** + * @type {{color: *, format: String}} + * @private + */ + this._original = { + color: color, + format: format, + valid: true + }; + /** + * @type {QixColor} + * @private + */ + this._color = ColorItem.parse(color); + + if (this._color === null) { + this._color = (0, _color2.default)(); + this._original.valid = false; + return; + } + + /** + * @type {*|string} + * @private + */ + this._format = format ? format : ColorItem.isHex(color) ? 'hex' : this._color.model; + } + + /** + * Parses the color returning a Qix Color object or null if cannot be + * parsed. + * + * @param {ColorItem|HSVAColor|QixColor|String|*|null} color Color data + * @example let qColor = ColorItem.parse('rgb(255,0,0)'); + * @static + * @returns {QixColor|null} + */ + + }, { + key: 'isValid', + + + /** + * Returns true if the color is valid, false if not. + * + * @returns {boolean} + */ + value: function isValid() { + return this._original.valid === true; + } + + /** + * Hue value from 0 to 360 + * + * @returns {int} + */ + + }, { + key: 'setHueRatio', + + + /** + * Sets the hue ratio, where 1.0 is 0, 0.5 is 180 and 0.0 is 360. + * + * @ignore + * @param {number} h Ratio from 1.0 to 0.0 + */ + value: function setHueRatio(h) { + this.hue = (1 - h) * 360; + } + + /** + * Sets the saturation value + * + * @param {int} value Integer from 0 to 100 + */ + + }, { + key: 'setSaturationRatio', + + + /** + * Sets the saturation ratio, where 1.0 is 100 and 0.0 is 0. + * + * @ignore + * @param {number} s Ratio from 0.0 to 1.0 + */ + value: function setSaturationRatio(s) { + this.saturation = s * 100; + } + + /** + * Sets the 'value' channel value + * + * @param {int} value Integer from 0 to 100 + */ + + }, { + key: 'setValueRatio', + + + /** + * Sets the value ratio, where 1.0 is 0 and 0.0 is 100. + * + * @ignore + * @param {number} v Ratio from 1.0 to 0.0 + */ + value: function setValueRatio(v) { + this.value = (1 - v) * 100; + } + + /** + * Sets the alpha value. It will be rounded to 2 decimals. + * + * @param {int} value Float from 0.0 to 1.0 + */ + + }, { + key: 'setAlphaRatio', + + + /** + * Sets the alpha ratio, where 1.0 is 0.0 and 0.0 is 1.0. + * + * @ignore + * @param {number} a Ratio from 1.0 to 0.0 + */ + value: function setAlphaRatio(a) { + this.alpha = 1 - a; + } + + /** + * Sets the default color format + * + * @param {String} value Supported: 'rgb', 'hsl', 'hex' + */ + + }, { + key: 'isDesaturated', + + + /** + * Returns true if the saturation value is zero, false otherwise + * + * @returns {boolean} + */ + value: function isDesaturated() { + return this.saturation === 0; + } + + /** + * Returns true if the alpha value is zero, false otherwise + * + * @returns {boolean} + */ + + }, { + key: 'isTransparent', + value: function isTransparent() { + return this.alpha === 0; + } + + /** + * Returns true if the alpha value is numeric and less than 1, false otherwise + * + * @returns {boolean} + */ + + }, { + key: 'hasTransparency', + value: function hasTransparency() { + return this.hasAlpha() && this.alpha < 1; + } + + /** + * Returns true if the alpha value is numeric, false otherwise + * + * @returns {boolean} + */ + + }, { + key: 'hasAlpha', + value: function hasAlpha() { + return !isNaN(this.alpha); + } + + /** + * Returns a new HSVAColor object, based on the current color + * + * @returns {HSVAColor} + */ + + }, { + key: 'toObject', + value: function toObject() { + return new HSVAColor(this.hue, this.saturation, this.value, this.alpha); + } + + /** + * Alias of toObject() + * + * @returns {HSVAColor} + */ + + }, { + key: 'toHsva', + value: function toHsva() { + return this.toObject(); + } + + /** + * Returns a new HSVAColor object with the ratio values (from 0.0 to 1.0), + * based on the current color. + * + * @ignore + * @returns {HSVAColor} + */ + + }, { + key: 'toHsvaRatio', + value: function toHsvaRatio() { + return new HSVAColor(this.hue / 360, this.saturation / 100, this.value / 100, this.alpha); + } + + /** + * Converts the current color to its string representation, + * using the internal format of this instance. + * + * @returns {String} + */ + + }, { + key: 'toString', + value: function toString() { + return this.string(); + } + + /** + * Converts the current color to its string representation, + * using the given format. + * + * @param {String|null} format Format to convert to. If empty or null, the internal format will be used. + * @returns {String} + */ + + }, { + key: 'string', + value: function string() { + var format = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; + + format = ColorItem.sanitizeFormat(format ? format : this.format); + + if (!format) { + return this._color.round().string(); + } + + if (this._color[format] === undefined) { + throw new Error('Unsupported color format: \'' + format + '\''); + } + + var str = this._color[format](); + + return str.round ? str.round().string() : str; + } + + /** + * Returns true if the given color values equals this one, false otherwise. + * The format is not compared. + * If any of the colors is invalid, the result will be false. + * + * @param {ColorItem|HSVAColor|QixColor|String|*|null} color Color data + * + * @returns {boolean} + */ + + }, { + key: 'equals', + value: function equals(color) { + color = color instanceof ColorItem ? color : new ColorItem(color); + + if (!color.isValid() || !this.isValid()) { + return false; + } + + return this.hue === color.hue && this.saturation === color.saturation && this.value === color.value && this.alpha === color.alpha; + } + + /** + * Creates a copy of this instance + * + * @returns {ColorItem} + */ + + }, { + key: 'getClone', + value: function getClone() { + return new ColorItem(this._color, this.format); + } + + /** + * Creates a copy of this instance, only copying the hue value, + * and setting the others to its max value. + * + * @returns {ColorItem} + */ + + }, { + key: 'getCloneHueOnly', + value: function getCloneHueOnly() { + return new ColorItem([this.hue, 100, 100, 1], this.format); + } + + /** + * Creates a copy of this instance setting the alpha to the max. + * + * @returns {ColorItem} + */ + + }, { + key: 'getCloneOpaque', + value: function getCloneOpaque() { + return new ColorItem(this._color.alpha(1), this.format); + } + + /** + * Converts the color to a RGB string + * + * @returns {String} + */ + + }, { + key: 'toRgbString', + value: function toRgbString() { + return this.string('rgb'); + } + + /** + * Converts the color to a Hexadecimal string + * + * @returns {String} + */ + + }, { + key: 'toHexString', + value: function toHexString() { + return this.string('hex'); + } + + /** + * Converts the color to a HSL string + * + * @returns {String} + */ + + }, { + key: 'toHslString', + value: function toHslString() { + return this.string('hsl'); + } + + /** + * Returns true if the color is dark, false otherwhise. + * This is useful to decide a text color. + * + * @returns {boolean} + */ + + }, { + key: 'isDark', + value: function isDark() { + return this._color.isDark(); + } + + /** + * Returns true if the color is light, false otherwhise. + * This is useful to decide a text color. + * + * @returns {boolean} + */ + + }, { + key: 'isLight', + value: function isLight() { + return this._color.isLight(); + } + + /** + * Generates a list of colors using the given hue-based formula or the given array of hue values. + * Hue formulas can be extended using ColorItem.colorFormulas static property. + * + * @param {String|Number[]} formula Examples: 'complementary', 'triad', 'tetrad', 'splitcomplement', [180, 270] + * @example let colors = color.generate('triad'); + * @example let colors = color.generate([45, 80, 112, 200]); + * @returns {ColorItem[]} + */ + + }, { + key: 'generate', + value: function generate(formula) { + var hues = []; + + if (Array.isArray(formula)) { + hues = formula; + } else if (!ColorItem.colorFormulas.hasOwnProperty(formula)) { + throw new Error('No color formula found with the name \'' + formula + '\'.'); + } else { + hues = ColorItem.colorFormulas[formula]; + } + + var colors = [], + mainColor = this._color, + format = this.format; + + hues.forEach(function (hue) { + var levels = [hue ? (mainColor.hue() + hue) % 360 : mainColor.hue(), mainColor.saturationv(), mainColor.value(), mainColor.alpha()]; + + colors.push(new ColorItem(levels, format)); + }); + + return colors; + } + }, { + key: 'hue', + get: function get() { + return this._color.hue(); + } + + /** + * Saturation value from 0 to 100 + * + * @returns {int} + */ + , + + + /** + * Sets the hue value + * + * @param {int} value Integer from 0 to 360 + */ + set: function set(value) { + this._color = this._color.hue(value); + } + }, { + key: 'saturation', + get: function get() { + return this._color.saturationv(); + } + + /** + * Value channel value from 0 to 100 + * + * @returns {int} + */ + , + set: function set(value) { + this._color = this._color.saturationv(value); + } + }, { + key: 'value', + get: function get() { + return this._color.value(); + } + + /** + * Alpha value from 0.0 to 1.0 + * + * @returns {number} + */ + , + set: function set(value) { + this._color = this._color.value(value); + } + }, { + key: 'alpha', + get: function get() { + var a = this._color.alpha(); + + return isNaN(a) ? 1 : a; + } + + /** + * Default color format to convert to when calling toString() or string() + * + * @returns {String} 'rgb', 'hsl', 'hex' or '' + */ + , + set: function set(value) { + // 2 decimals max + this._color = this._color.alpha(Math.round(value * 100) / 100); + } + }, { + key: 'format', + get: function get() { + return this._format ? this._format : this._color.model; + }, + set: function set(value) { + this._format = ColorItem.sanitizeFormat(value); + } + }], [{ + key: 'parse', + value: function parse(color) { + if (color instanceof _color2.default) { + return color; + } + + if (color instanceof ColorItem) { + return color._color; + } + + var format = null; + + if (color instanceof HSVAColor) { + color = [color.h, color.s, color.v, isNaN(color.a) ? 1 : color.a]; + } else { + color = ColorItem.sanitizeString(color); + } + + if (color === null) { + return null; + } + + if (Array.isArray(color)) { + format = 'hsv'; + } + + try { + return (0, _color2.default)(color, format); + } catch (e) { + return null; + } + } + + /** + * Sanitizes a color string, adding missing hash to hexadecimal colors + * and converting 'transparent' to a color code. + * + * @param {String|*} str Color string + * @example let colorStr = ColorItem.sanitizeString('ffaa00'); + * @static + * @returns {String|*} + */ + + }, { + key: 'sanitizeString', + value: function sanitizeString(str) { + if (!(typeof str === 'string' || str instanceof String)) { + return str; + } + + if (str.match(/^[0-9a-f]{2,}$/i)) { + return '#' + str; + } + + if (str.toLowerCase() === 'transparent') { + return '#FFFFFF00'; + } + + return str; + } + + /** + * Detects if a value is a string and a color in hexadecimal format (in any variant). + * + * @param {String} str + * @example ColorItem.isHex('rgba(0,0,0)'); // false + * @example ColorItem.isHex('ffaa00'); // true + * @example ColorItem.isHex('#ffaa00'); // true + * @static + * @returns {boolean} + */ + + }, { + key: 'isHex', + value: function isHex(str) { + if (!(typeof str === 'string' || str instanceof String)) { + return false; + } + + return !!str.match(/^#?[0-9a-f]{2,}$/i); + } + + /** + * Sanitizes a color format to one supported by web browsers. + * Returns an empty string of the format can't be recognised. + * + * @param {String|*} format + * @example ColorItem.sanitizeFormat('rgba'); // 'rgb' + * @example ColorItem.isHex('hex8'); // 'hex' + * @example ColorItem.isHex('invalid'); // '' + * @static + * @returns {String} 'rgb', 'hsl', 'hex' or ''. + */ + + }, { + key: 'sanitizeFormat', + value: function sanitizeFormat(format) { + switch (format) { + case 'hex': + case 'hex3': + case 'hex4': + case 'hex6': + case 'hex8': + return 'hex'; + case 'rgb': + case 'rgba': + case 'keyword': + case 'name': + return 'rgb'; + case 'hsl': + case 'hsla': + case 'hsv': + case 'hsva': + case 'hwb': // HWB this is supported by Qix Color, but not by browsers + case 'hwba': + return 'hsl'; + default: + return ''; + } + } + }]); + + return ColorItem; +}(); + +/** + * List of hue-based color formulas used by ColorItem.prototype.generate() + * + * @static + * @type {{complementary: number[], triad: number[], tetrad: number[], splitcomplement: number[]}} + */ + + +ColorItem.colorFormulas = { + complementary: [180], + triad: [0, 120, 240], + tetrad: [0, 90, 180, 270], + splitcomplement: [0, 72, 216] +}; + +exports.default = ColorItem; +exports.HSVAColor = HSVAColor; +exports.ColorItem = ColorItem; + +/***/ }), +/* 3 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/** + * @module + */ + +// adjust these values accordingly to the sass vars + +Object.defineProperty(exports, "__esModule", { + value: true +}); +var sassVars = { + 'bar_size_short': 16, + 'base_margin': 6, + 'columns': 6 +}; + +var sliderSize = sassVars.bar_size_short * sassVars.columns + sassVars.base_margin * (sassVars.columns - 1); + +/** + * Colorpicker default options + */ +exports.default = { + /** + * Custom class to be added to the `.colorpicker-element` element + * + * @type {String|null} + * @default null + */ + customClass: null, + /** + * Sets a initial color, ignoring the one from the element/input value or the data-color attribute. + * + * @type {(String|ColorItem|boolean)} + * @default false + */ + color: false, + /** + * Fallback color to use when the given color is invalid. + * If false, the latest valid color will be used as a fallback. + * + * @type {String|ColorItem|boolean} + * @default false + */ + fallbackColor: false, + /** + * Forces an specific color format. If 'auto', it will be automatically detected the first time only, + * but if null it will be always recalculated. + * + * Note that the ending 'a' of the format meaning "alpha" has currently no effect, meaning that rgb is the same as + * rgba excepting if the alpha channel is disabled (see useAlpha). + * + * @type {('rgb'|'hex'|'hsl'|'auto'|null)} + * @default 'auto' + */ + format: 'auto', + /** + * Horizontal mode layout. + * + * If true, the hue and alpha channel bars will be rendered horizontally, above the saturation selector. + * + * @type {boolean} + * @default false + */ + horizontal: false, + /** + * Forces to show the colorpicker as an inline element. + * + * Note that if there is no container specified, the inline element + * will be added to the body, so you may want to set the container option. + * + * @type {boolean} + * @default false + */ + inline: false, + /** + * Container where the colorpicker is appended to in the DOM. + * + * If is a string (CSS selector), the colorpicker will be placed inside this container. + * If true, the `.colorpicker-element` element itself will be used as the container. + * If false, the document body is used as the container, unless it is a popover (in this case it is appended to the + * popover body instead). + * + * @type {String|boolean} + * @default false + */ + container: false, + /** + * Bootstrap Popover options. + * The trigger, content and html options are always ignored. + * + * @type {boolean} + * @default Object + */ + popover: { + animation: true, + placement: 'bottom', + fallbackPlacement: 'flip' + }, + /** + * If true, loads the 'debugger' extension automatically, which logs the events in the console + * @type {boolean} + * @default false + */ + debug: false, + /** + * Child CSS selector for the colorpicker input. + * + * @type {String} + * @default 'input' + */ + input: 'input', + /** + * Child CSS selector for the colorpicker addon. + * If it exists, the child element background will be changed on color change. + * + * @type {String} + * @default '.colorpicker-trigger, .colorpicker-input-addon' + */ + addon: '.colorpicker-input-addon', + /** + * If true, the input content will be replaced always with a valid color, + * if false, the invalid color will be left in the input, + * while the internal color object will still resolve into a valid one. + * + * @type {boolean} + * @default true + */ + autoInputFallback: true, + /** + * If true a hash will be prepended to hexadecimal colors. + * If false, the hash will be removed. + * This only affects the input values in hexadecimal format. + * + * @type {boolean} + * @default true + */ + useHashPrefix: true, + /** + * If true, the alpha channel bar will be displayed no matter what. + * + * If false, it will be always hidden and alpha channel will be disabled also programmatically, meaning that + * the selected or typed color will be always opaque. + * + * If null, the alpha channel will be automatically disabled/enabled depending if the initial color format supports + * alpha or not. + * + * @type {boolean} + * @default true + */ + useAlpha: true, + /** + * Colorpicker widget template + * @type {String} + * @example + * + *
+ *
+ *
+ *
+ *
+ * + *
+ *
+ */ + template: '
\n
\n
\n
\n
\n \n
\n
', + /** + * + * Associative object with the extension class name and its config. + * Colorpicker comes with many bundled extensions: debugger, palette, preview and swatches (a superset of palette). + * + * @type {Object[]} + * @example + * extensions: [ + * { + * name: 'swatches' + * options: { + * colors: { + * 'primary': '#337ab7', + * 'success': '#5cb85c', + * 'info': '#5bc0de', + * 'warning': '#f0ad4e', + * 'danger': '#d9534f' + * }, + * namesAsValues: true + * } + * } + * ] + */ + extensions: [{ + name: 'preview', + options: { + showText: true + } + }], + /** + * Vertical sliders configuration + * @type {Object} + */ + sliders: { + saturation: { + selector: '.colorpicker-saturation', + maxLeft: sliderSize, + maxTop: sliderSize, + callLeft: 'setSaturationRatio', + callTop: 'setValueRatio' + }, + hue: { + selector: '.colorpicker-hue', + maxLeft: 0, + maxTop: sliderSize, + callLeft: false, + callTop: 'setHueRatio' + }, + alpha: { + selector: '.colorpicker-alpha', + childSelector: '.colorpicker-alpha-color', + maxLeft: 0, + maxTop: sliderSize, + callLeft: false, + callTop: 'setAlphaRatio' + } + }, + /** + * Horizontal sliders configuration + * @type {Object} + */ + slidersHorz: { + saturation: { + selector: '.colorpicker-saturation', + maxLeft: sliderSize, + maxTop: sliderSize, + callLeft: 'setSaturationRatio', + callTop: 'setValueRatio' + }, + hue: { + selector: '.colorpicker-hue', + maxLeft: sliderSize, + maxTop: 0, + callLeft: 'setHueRatio', + callTop: false + }, + alpha: { + selector: '.colorpicker-alpha', + childSelector: '.colorpicker-alpha-color', + maxLeft: sliderSize, + maxTop: 0, + callLeft: 'setAlphaRatio', + callTop: false + } + } +}; + +/***/ }), +/* 4 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +var _Extension2 = __webpack_require__(1); + +var _Extension3 = _interopRequireDefault(_Extension2); + +var _jquery = __webpack_require__(0); + +var _jquery2 = _interopRequireDefault(_jquery); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var defaults = { + /** + * Key-value pairs defining a color alias and its CSS color representation. + * + * They can also be just an array of values. In that case, no special names are used, only the real colors. + * + * @type {Object|Array} + * @default null + * @example + * { + * 'black': '#000000', + * 'white': '#ffffff', + * 'red': '#FF0000', + * 'default': '#777777', + * 'primary': '#337ab7', + * 'success': '#5cb85c', + * 'info': '#5bc0de', + * 'warning': '#f0ad4e', + * 'danger': '#d9534f' + * } + * + * @example ['#f0ad4e', '#337ab7', '#5cb85c'] + */ + colors: null, + /** + * If true, when a color swatch is selected the name (alias) will be used as input value, + * otherwise the swatch real color value will be used. + * + * @type {boolean} + * @default true + */ + namesAsValues: true +}; + +/** + * Palette extension + * @ignore + */ + +var Palette = function (_Extension) { + _inherits(Palette, _Extension); + + _createClass(Palette, [{ + key: 'colors', + + + /** + * @returns {Object|Array} + */ + get: function get() { + return this.options.colors; + } + }]); + + function Palette(colorpicker) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + _classCallCheck(this, Palette); + + var _this = _possibleConstructorReturn(this, (Palette.__proto__ || Object.getPrototypeOf(Palette)).call(this, colorpicker, _jquery2.default.extend(true, {}, defaults, options))); + + if (!Array.isArray(_this.options.colors) && _typeof(_this.options.colors) !== 'object') { + _this.options.colors = null; + } + return _this; + } + + /** + * @returns {int} + */ + + + _createClass(Palette, [{ + key: 'getLength', + value: function getLength() { + if (!this.options.colors) { + return 0; + } + + if (Array.isArray(this.options.colors)) { + return this.options.colors.length; + } + + if (_typeof(this.options.colors) === 'object') { + return Object.keys(this.options.colors).length; + } + + return 0; + } + }, { + key: 'resolveColor', + value: function resolveColor(color) { + var realColor = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + + if (this.getLength() <= 0) { + return false; + } + + // Array of colors + if (Array.isArray(this.options.colors)) { + if (this.options.colors.indexOf(color) >= 0) { + return color; + } + if (this.options.colors.indexOf(color.toUpperCase()) >= 0) { + return color.toUpperCase(); + } + if (this.options.colors.indexOf(color.toLowerCase()) >= 0) { + return color.toLowerCase(); + } + return false; + } + + if (_typeof(this.options.colors) !== 'object') { + return false; + } + + // Map of objects + if (!this.options.namesAsValues || realColor) { + return this.getValue(color, false); + } + return this.getName(color, this.getName('#' + color)); + } + + /** + * Given a color value, returns the corresponding color name or defaultValue. + * + * @param {String} value + * @param {*} defaultValue + * @returns {*} + */ + + }, { + key: 'getName', + value: function getName(value) { + var defaultValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + + if (!(typeof value === 'string') || !this.options.colors) { + return defaultValue; + } + for (var name in this.options.colors) { + if (!this.options.colors.hasOwnProperty(name)) { + continue; + } + if (this.options.colors[name].toLowerCase() === value.toLowerCase()) { + return name; + } + } + return defaultValue; + } + + /** + * Given a color name, returns the corresponding color value or defaultValue. + * + * @param {String} name + * @param {*} defaultValue + * @returns {*} + */ + + }, { + key: 'getValue', + value: function getValue(name) { + var defaultValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + + if (!(typeof name === 'string') || !this.options.colors) { + return defaultValue; + } + if (this.options.colors.hasOwnProperty(name)) { + return this.options.colors[name]; + } + return defaultValue; + } + }]); + + return Palette; +}(_Extension3.default); + +exports.default = Palette; + +/***/ }), +/* 5 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +module.exports = { + "aliceblue": [240, 248, 255], + "antiquewhite": [250, 235, 215], + "aqua": [0, 255, 255], + "aquamarine": [127, 255, 212], + "azure": [240, 255, 255], + "beige": [245, 245, 220], + "bisque": [255, 228, 196], + "black": [0, 0, 0], + "blanchedalmond": [255, 235, 205], + "blue": [0, 0, 255], + "blueviolet": [138, 43, 226], + "brown": [165, 42, 42], + "burlywood": [222, 184, 135], + "cadetblue": [95, 158, 160], + "chartreuse": [127, 255, 0], + "chocolate": [210, 105, 30], + "coral": [255, 127, 80], + "cornflowerblue": [100, 149, 237], + "cornsilk": [255, 248, 220], + "crimson": [220, 20, 60], + "cyan": [0, 255, 255], + "darkblue": [0, 0, 139], + "darkcyan": [0, 139, 139], + "darkgoldenrod": [184, 134, 11], + "darkgray": [169, 169, 169], + "darkgreen": [0, 100, 0], + "darkgrey": [169, 169, 169], + "darkkhaki": [189, 183, 107], + "darkmagenta": [139, 0, 139], + "darkolivegreen": [85, 107, 47], + "darkorange": [255, 140, 0], + "darkorchid": [153, 50, 204], + "darkred": [139, 0, 0], + "darksalmon": [233, 150, 122], + "darkseagreen": [143, 188, 143], + "darkslateblue": [72, 61, 139], + "darkslategray": [47, 79, 79], + "darkslategrey": [47, 79, 79], + "darkturquoise": [0, 206, 209], + "darkviolet": [148, 0, 211], + "deeppink": [255, 20, 147], + "deepskyblue": [0, 191, 255], + "dimgray": [105, 105, 105], + "dimgrey": [105, 105, 105], + "dodgerblue": [30, 144, 255], + "firebrick": [178, 34, 34], + "floralwhite": [255, 250, 240], + "forestgreen": [34, 139, 34], + "fuchsia": [255, 0, 255], + "gainsboro": [220, 220, 220], + "ghostwhite": [248, 248, 255], + "gold": [255, 215, 0], + "goldenrod": [218, 165, 32], + "gray": [128, 128, 128], + "green": [0, 128, 0], + "greenyellow": [173, 255, 47], + "grey": [128, 128, 128], + "honeydew": [240, 255, 240], + "hotpink": [255, 105, 180], + "indianred": [205, 92, 92], + "indigo": [75, 0, 130], + "ivory": [255, 255, 240], + "khaki": [240, 230, 140], + "lavender": [230, 230, 250], + "lavenderblush": [255, 240, 245], + "lawngreen": [124, 252, 0], + "lemonchiffon": [255, 250, 205], + "lightblue": [173, 216, 230], + "lightcoral": [240, 128, 128], + "lightcyan": [224, 255, 255], + "lightgoldenrodyellow": [250, 250, 210], + "lightgray": [211, 211, 211], + "lightgreen": [144, 238, 144], + "lightgrey": [211, 211, 211], + "lightpink": [255, 182, 193], + "lightsalmon": [255, 160, 122], + "lightseagreen": [32, 178, 170], + "lightskyblue": [135, 206, 250], + "lightslategray": [119, 136, 153], + "lightslategrey": [119, 136, 153], + "lightsteelblue": [176, 196, 222], + "lightyellow": [255, 255, 224], + "lime": [0, 255, 0], + "limegreen": [50, 205, 50], + "linen": [250, 240, 230], + "magenta": [255, 0, 255], + "maroon": [128, 0, 0], + "mediumaquamarine": [102, 205, 170], + "mediumblue": [0, 0, 205], + "mediumorchid": [186, 85, 211], + "mediumpurple": [147, 112, 219], + "mediumseagreen": [60, 179, 113], + "mediumslateblue": [123, 104, 238], + "mediumspringgreen": [0, 250, 154], + "mediumturquoise": [72, 209, 204], + "mediumvioletred": [199, 21, 133], + "midnightblue": [25, 25, 112], + "mintcream": [245, 255, 250], + "mistyrose": [255, 228, 225], + "moccasin": [255, 228, 181], + "navajowhite": [255, 222, 173], + "navy": [0, 0, 128], + "oldlace": [253, 245, 230], + "olive": [128, 128, 0], + "olivedrab": [107, 142, 35], + "orange": [255, 165, 0], + "orangered": [255, 69, 0], + "orchid": [218, 112, 214], + "palegoldenrod": [238, 232, 170], + "palegreen": [152, 251, 152], + "paleturquoise": [175, 238, 238], + "palevioletred": [219, 112, 147], + "papayawhip": [255, 239, 213], + "peachpuff": [255, 218, 185], + "peru": [205, 133, 63], + "pink": [255, 192, 203], + "plum": [221, 160, 221], + "powderblue": [176, 224, 230], + "purple": [128, 0, 128], + "rebeccapurple": [102, 51, 153], + "red": [255, 0, 0], + "rosybrown": [188, 143, 143], + "royalblue": [65, 105, 225], + "saddlebrown": [139, 69, 19], + "salmon": [250, 128, 114], + "sandybrown": [244, 164, 96], + "seagreen": [46, 139, 87], + "seashell": [255, 245, 238], + "sienna": [160, 82, 45], + "silver": [192, 192, 192], + "skyblue": [135, 206, 235], + "slateblue": [106, 90, 205], + "slategray": [112, 128, 144], + "slategrey": [112, 128, 144], + "snow": [255, 250, 250], + "springgreen": [0, 255, 127], + "steelblue": [70, 130, 180], + "tan": [210, 180, 140], + "teal": [0, 128, 128], + "thistle": [216, 191, 216], + "tomato": [255, 99, 71], + "turquoise": [64, 224, 208], + "violet": [238, 130, 238], + "wheat": [245, 222, 179], + "white": [255, 255, 255], + "whitesmoke": [245, 245, 245], + "yellow": [255, 255, 0], + "yellowgreen": [154, 205, 50] +}; + + +/***/ }), +/* 6 */ +/***/ (function(module, exports, __webpack_require__) { + +/* MIT license */ +var cssKeywords = __webpack_require__(5); + +// NOTE: conversions should only return primitive values (i.e. arrays, or +// values that give correct `typeof` results). +// do not use box values types (i.e. Number(), String(), etc.) + +var reverseKeywords = {}; +for (var key in cssKeywords) { + if (cssKeywords.hasOwnProperty(key)) { + reverseKeywords[cssKeywords[key]] = key; + } +} + +var convert = module.exports = { + rgb: {channels: 3, labels: 'rgb'}, + hsl: {channels: 3, labels: 'hsl'}, + hsv: {channels: 3, labels: 'hsv'}, + hwb: {channels: 3, labels: 'hwb'}, + cmyk: {channels: 4, labels: 'cmyk'}, + xyz: {channels: 3, labels: 'xyz'}, + lab: {channels: 3, labels: 'lab'}, + lch: {channels: 3, labels: 'lch'}, + hex: {channels: 1, labels: ['hex']}, + keyword: {channels: 1, labels: ['keyword']}, + ansi16: {channels: 1, labels: ['ansi16']}, + ansi256: {channels: 1, labels: ['ansi256']}, + hcg: {channels: 3, labels: ['h', 'c', 'g']}, + apple: {channels: 3, labels: ['r16', 'g16', 'b16']}, + gray: {channels: 1, labels: ['gray']} +}; + +// hide .channels and .labels properties +for (var model in convert) { + if (convert.hasOwnProperty(model)) { + if (!('channels' in convert[model])) { + throw new Error('missing channels property: ' + model); + } + + if (!('labels' in convert[model])) { + throw new Error('missing channel labels property: ' + model); + } + + if (convert[model].labels.length !== convert[model].channels) { + throw new Error('channel and label counts mismatch: ' + model); + } + + var channels = convert[model].channels; + var labels = convert[model].labels; + delete convert[model].channels; + delete convert[model].labels; + Object.defineProperty(convert[model], 'channels', {value: channels}); + Object.defineProperty(convert[model], 'labels', {value: labels}); + } +} + +convert.rgb.hsl = function (rgb) { + var r = rgb[0] / 255; + var g = rgb[1] / 255; + var b = rgb[2] / 255; + var min = Math.min(r, g, b); + var max = Math.max(r, g, b); + var delta = max - min; + var h; + var s; + var l; + + if (max === min) { + h = 0; + } else if (r === max) { + h = (g - b) / delta; + } else if (g === max) { + h = 2 + (b - r) / delta; + } else if (b === max) { + h = 4 + (r - g) / delta; + } + + h = Math.min(h * 60, 360); + + if (h < 0) { + h += 360; + } + + l = (min + max) / 2; + + if (max === min) { + s = 0; + } else if (l <= 0.5) { + s = delta / (max + min); + } else { + s = delta / (2 - max - min); + } + + return [h, s * 100, l * 100]; +}; + +convert.rgb.hsv = function (rgb) { + var rdif; + var gdif; + var bdif; + var h; + var s; + + var r = rgb[0] / 255; + var g = rgb[1] / 255; + var b = rgb[2] / 255; + var v = Math.max(r, g, b); + var diff = v - Math.min(r, g, b); + var diffc = function (c) { + return (v - c) / 6 / diff + 1 / 2; + }; + + if (diff === 0) { + h = s = 0; + } else { + s = diff / v; + rdif = diffc(r); + gdif = diffc(g); + bdif = diffc(b); + + if (r === v) { + h = bdif - gdif; + } else if (g === v) { + h = (1 / 3) + rdif - bdif; + } else if (b === v) { + h = (2 / 3) + gdif - rdif; + } + if (h < 0) { + h += 1; + } else if (h > 1) { + h -= 1; + } + } + + return [ + h * 360, + s * 100, + v * 100 + ]; +}; + +convert.rgb.hwb = function (rgb) { + var r = rgb[0]; + var g = rgb[1]; + var b = rgb[2]; + var h = convert.rgb.hsl(rgb)[0]; + var w = 1 / 255 * Math.min(r, Math.min(g, b)); + + b = 1 - 1 / 255 * Math.max(r, Math.max(g, b)); + + return [h, w * 100, b * 100]; +}; + +convert.rgb.cmyk = function (rgb) { + var r = rgb[0] / 255; + var g = rgb[1] / 255; + var b = rgb[2] / 255; + var c; + var m; + var y; + var k; + + k = Math.min(1 - r, 1 - g, 1 - b); + c = (1 - r - k) / (1 - k) || 0; + m = (1 - g - k) / (1 - k) || 0; + y = (1 - b - k) / (1 - k) || 0; + + return [c * 100, m * 100, y * 100, k * 100]; +}; + +/** + * See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance + * */ +function comparativeDistance(x, y) { + return ( + Math.pow(x[0] - y[0], 2) + + Math.pow(x[1] - y[1], 2) + + Math.pow(x[2] - y[2], 2) + ); +} + +convert.rgb.keyword = function (rgb) { + var reversed = reverseKeywords[rgb]; + if (reversed) { + return reversed; + } + + var currentClosestDistance = Infinity; + var currentClosestKeyword; + + for (var keyword in cssKeywords) { + if (cssKeywords.hasOwnProperty(keyword)) { + var value = cssKeywords[keyword]; + + // Compute comparative distance + var distance = comparativeDistance(rgb, value); + + // Check if its less, if so set as closest + if (distance < currentClosestDistance) { + currentClosestDistance = distance; + currentClosestKeyword = keyword; + } + } + } + + return currentClosestKeyword; +}; + +convert.keyword.rgb = function (keyword) { + return cssKeywords[keyword]; +}; + +convert.rgb.xyz = function (rgb) { + var r = rgb[0] / 255; + var g = rgb[1] / 255; + var b = rgb[2] / 255; + + // assume sRGB + r = r > 0.04045 ? Math.pow(((r + 0.055) / 1.055), 2.4) : (r / 12.92); + g = g > 0.04045 ? Math.pow(((g + 0.055) / 1.055), 2.4) : (g / 12.92); + b = b > 0.04045 ? Math.pow(((b + 0.055) / 1.055), 2.4) : (b / 12.92); + + var x = (r * 0.4124) + (g * 0.3576) + (b * 0.1805); + var y = (r * 0.2126) + (g * 0.7152) + (b * 0.0722); + var z = (r * 0.0193) + (g * 0.1192) + (b * 0.9505); + + return [x * 100, y * 100, z * 100]; +}; + +convert.rgb.lab = function (rgb) { + var xyz = convert.rgb.xyz(rgb); + var x = xyz[0]; + var y = xyz[1]; + var z = xyz[2]; + var l; + var a; + var b; + + x /= 95.047; + y /= 100; + z /= 108.883; + + x = x > 0.008856 ? Math.pow(x, 1 / 3) : (7.787 * x) + (16 / 116); + y = y > 0.008856 ? Math.pow(y, 1 / 3) : (7.787 * y) + (16 / 116); + z = z > 0.008856 ? Math.pow(z, 1 / 3) : (7.787 * z) + (16 / 116); + + l = (116 * y) - 16; + a = 500 * (x - y); + b = 200 * (y - z); + + return [l, a, b]; +}; + +convert.hsl.rgb = function (hsl) { + var h = hsl[0] / 360; + var s = hsl[1] / 100; + var l = hsl[2] / 100; + var t1; + var t2; + var t3; + var rgb; + var val; + + if (s === 0) { + val = l * 255; + return [val, val, val]; + } + + if (l < 0.5) { + t2 = l * (1 + s); + } else { + t2 = l + s - l * s; + } + + t1 = 2 * l - t2; + + rgb = [0, 0, 0]; + for (var i = 0; i < 3; i++) { + t3 = h + 1 / 3 * -(i - 1); + if (t3 < 0) { + t3++; + } + if (t3 > 1) { + t3--; + } + + if (6 * t3 < 1) { + val = t1 + (t2 - t1) * 6 * t3; + } else if (2 * t3 < 1) { + val = t2; + } else if (3 * t3 < 2) { + val = t1 + (t2 - t1) * (2 / 3 - t3) * 6; + } else { + val = t1; + } + + rgb[i] = val * 255; + } + + return rgb; +}; + +convert.hsl.hsv = function (hsl) { + var h = hsl[0]; + var s = hsl[1] / 100; + var l = hsl[2] / 100; + var smin = s; + var lmin = Math.max(l, 0.01); + var sv; + var v; + + l *= 2; + s *= (l <= 1) ? l : 2 - l; + smin *= lmin <= 1 ? lmin : 2 - lmin; + v = (l + s) / 2; + sv = l === 0 ? (2 * smin) / (lmin + smin) : (2 * s) / (l + s); + + return [h, sv * 100, v * 100]; +}; + +convert.hsv.rgb = function (hsv) { + var h = hsv[0] / 60; + var s = hsv[1] / 100; + var v = hsv[2] / 100; + var hi = Math.floor(h) % 6; + + var f = h - Math.floor(h); + var p = 255 * v * (1 - s); + var q = 255 * v * (1 - (s * f)); + var t = 255 * v * (1 - (s * (1 - f))); + v *= 255; + + switch (hi) { + case 0: + return [v, t, p]; + case 1: + return [q, v, p]; + case 2: + return [p, v, t]; + case 3: + return [p, q, v]; + case 4: + return [t, p, v]; + case 5: + return [v, p, q]; + } +}; + +convert.hsv.hsl = function (hsv) { + var h = hsv[0]; + var s = hsv[1] / 100; + var v = hsv[2] / 100; + var vmin = Math.max(v, 0.01); + var lmin; + var sl; + var l; + + l = (2 - s) * v; + lmin = (2 - s) * vmin; + sl = s * vmin; + sl /= (lmin <= 1) ? lmin : 2 - lmin; + sl = sl || 0; + l /= 2; + + return [h, sl * 100, l * 100]; +}; + +// http://dev.w3.org/csswg/css-color/#hwb-to-rgb +convert.hwb.rgb = function (hwb) { + var h = hwb[0] / 360; + var wh = hwb[1] / 100; + var bl = hwb[2] / 100; + var ratio = wh + bl; + var i; + var v; + var f; + var n; + + // wh + bl cant be > 1 + if (ratio > 1) { + wh /= ratio; + bl /= ratio; + } + + i = Math.floor(6 * h); + v = 1 - bl; + f = 6 * h - i; + + if ((i & 0x01) !== 0) { + f = 1 - f; + } + + n = wh + f * (v - wh); // linear interpolation + + var r; + var g; + var b; + switch (i) { + default: + case 6: + case 0: r = v; g = n; b = wh; break; + case 1: r = n; g = v; b = wh; break; + case 2: r = wh; g = v; b = n; break; + case 3: r = wh; g = n; b = v; break; + case 4: r = n; g = wh; b = v; break; + case 5: r = v; g = wh; b = n; break; + } + + return [r * 255, g * 255, b * 255]; +}; + +convert.cmyk.rgb = function (cmyk) { + var c = cmyk[0] / 100; + var m = cmyk[1] / 100; + var y = cmyk[2] / 100; + var k = cmyk[3] / 100; + var r; + var g; + var b; + + r = 1 - Math.min(1, c * (1 - k) + k); + g = 1 - Math.min(1, m * (1 - k) + k); + b = 1 - Math.min(1, y * (1 - k) + k); + + return [r * 255, g * 255, b * 255]; +}; + +convert.xyz.rgb = function (xyz) { + var x = xyz[0] / 100; + var y = xyz[1] / 100; + var z = xyz[2] / 100; + var r; + var g; + var b; + + r = (x * 3.2406) + (y * -1.5372) + (z * -0.4986); + g = (x * -0.9689) + (y * 1.8758) + (z * 0.0415); + b = (x * 0.0557) + (y * -0.2040) + (z * 1.0570); + + // assume sRGB + r = r > 0.0031308 + ? ((1.055 * Math.pow(r, 1.0 / 2.4)) - 0.055) + : r * 12.92; + + g = g > 0.0031308 + ? ((1.055 * Math.pow(g, 1.0 / 2.4)) - 0.055) + : g * 12.92; + + b = b > 0.0031308 + ? ((1.055 * Math.pow(b, 1.0 / 2.4)) - 0.055) + : b * 12.92; + + r = Math.min(Math.max(0, r), 1); + g = Math.min(Math.max(0, g), 1); + b = Math.min(Math.max(0, b), 1); + + return [r * 255, g * 255, b * 255]; +}; + +convert.xyz.lab = function (xyz) { + var x = xyz[0]; + var y = xyz[1]; + var z = xyz[2]; + var l; + var a; + var b; + + x /= 95.047; + y /= 100; + z /= 108.883; + + x = x > 0.008856 ? Math.pow(x, 1 / 3) : (7.787 * x) + (16 / 116); + y = y > 0.008856 ? Math.pow(y, 1 / 3) : (7.787 * y) + (16 / 116); + z = z > 0.008856 ? Math.pow(z, 1 / 3) : (7.787 * z) + (16 / 116); + + l = (116 * y) - 16; + a = 500 * (x - y); + b = 200 * (y - z); + + return [l, a, b]; +}; + +convert.lab.xyz = function (lab) { + var l = lab[0]; + var a = lab[1]; + var b = lab[2]; + var x; + var y; + var z; + + y = (l + 16) / 116; + x = a / 500 + y; + z = y - b / 200; + + var y2 = Math.pow(y, 3); + var x2 = Math.pow(x, 3); + var z2 = Math.pow(z, 3); + y = y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787; + x = x2 > 0.008856 ? x2 : (x - 16 / 116) / 7.787; + z = z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787; + + x *= 95.047; + y *= 100; + z *= 108.883; + + return [x, y, z]; +}; + +convert.lab.lch = function (lab) { + var l = lab[0]; + var a = lab[1]; + var b = lab[2]; + var hr; + var h; + var c; + + hr = Math.atan2(b, a); + h = hr * 360 / 2 / Math.PI; + + if (h < 0) { + h += 360; + } + + c = Math.sqrt(a * a + b * b); + + return [l, c, h]; +}; + +convert.lch.lab = function (lch) { + var l = lch[0]; + var c = lch[1]; + var h = lch[2]; + var a; + var b; + var hr; + + hr = h / 360 * 2 * Math.PI; + a = c * Math.cos(hr); + b = c * Math.sin(hr); + + return [l, a, b]; +}; + +convert.rgb.ansi16 = function (args) { + var r = args[0]; + var g = args[1]; + var b = args[2]; + var value = 1 in arguments ? arguments[1] : convert.rgb.hsv(args)[2]; // hsv -> ansi16 optimization + + value = Math.round(value / 50); + + if (value === 0) { + return 30; + } + + var ansi = 30 + + ((Math.round(b / 255) << 2) + | (Math.round(g / 255) << 1) + | Math.round(r / 255)); + + if (value === 2) { + ansi += 60; + } + + return ansi; +}; + +convert.hsv.ansi16 = function (args) { + // optimization here; we already know the value and don't need to get + // it converted for us. + return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]); +}; + +convert.rgb.ansi256 = function (args) { + var r = args[0]; + var g = args[1]; + var b = args[2]; + + // we use the extended greyscale palette here, with the exception of + // black and white. normal palette only has 4 greyscale shades. + if (r === g && g === b) { + if (r < 8) { + return 16; + } + + if (r > 248) { + return 231; + } + + return Math.round(((r - 8) / 247) * 24) + 232; + } + + var ansi = 16 + + (36 * Math.round(r / 255 * 5)) + + (6 * Math.round(g / 255 * 5)) + + Math.round(b / 255 * 5); + + return ansi; +}; + +convert.ansi16.rgb = function (args) { + var color = args % 10; + + // handle greyscale + if (color === 0 || color === 7) { + if (args > 50) { + color += 3.5; + } + + color = color / 10.5 * 255; + + return [color, color, color]; + } + + var mult = (~~(args > 50) + 1) * 0.5; + var r = ((color & 1) * mult) * 255; + var g = (((color >> 1) & 1) * mult) * 255; + var b = (((color >> 2) & 1) * mult) * 255; + + return [r, g, b]; +}; + +convert.ansi256.rgb = function (args) { + // handle greyscale + if (args >= 232) { + var c = (args - 232) * 10 + 8; + return [c, c, c]; + } + + args -= 16; + + var rem; + var r = Math.floor(args / 36) / 5 * 255; + var g = Math.floor((rem = args % 36) / 6) / 5 * 255; + var b = (rem % 6) / 5 * 255; + + return [r, g, b]; +}; + +convert.rgb.hex = function (args) { + var integer = ((Math.round(args[0]) & 0xFF) << 16) + + ((Math.round(args[1]) & 0xFF) << 8) + + (Math.round(args[2]) & 0xFF); + + var string = integer.toString(16).toUpperCase(); + return '000000'.substring(string.length) + string; +}; + +convert.hex.rgb = function (args) { + var match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i); + if (!match) { + return [0, 0, 0]; + } + + var colorString = match[0]; + + if (match[0].length === 3) { + colorString = colorString.split('').map(function (char) { + return char + char; + }).join(''); + } + + var integer = parseInt(colorString, 16); + var r = (integer >> 16) & 0xFF; + var g = (integer >> 8) & 0xFF; + var b = integer & 0xFF; + + return [r, g, b]; +}; + +convert.rgb.hcg = function (rgb) { + var r = rgb[0] / 255; + var g = rgb[1] / 255; + var b = rgb[2] / 255; + var max = Math.max(Math.max(r, g), b); + var min = Math.min(Math.min(r, g), b); + var chroma = (max - min); + var grayscale; + var hue; + + if (chroma < 1) { + grayscale = min / (1 - chroma); + } else { + grayscale = 0; + } + + if (chroma <= 0) { + hue = 0; + } else + if (max === r) { + hue = ((g - b) / chroma) % 6; + } else + if (max === g) { + hue = 2 + (b - r) / chroma; + } else { + hue = 4 + (r - g) / chroma + 4; + } + + hue /= 6; + hue %= 1; + + return [hue * 360, chroma * 100, grayscale * 100]; +}; + +convert.hsl.hcg = function (hsl) { + var s = hsl[1] / 100; + var l = hsl[2] / 100; + var c = 1; + var f = 0; + + if (l < 0.5) { + c = 2.0 * s * l; + } else { + c = 2.0 * s * (1.0 - l); + } + + if (c < 1.0) { + f = (l - 0.5 * c) / (1.0 - c); + } + + return [hsl[0], c * 100, f * 100]; +}; + +convert.hsv.hcg = function (hsv) { + var s = hsv[1] / 100; + var v = hsv[2] / 100; + + var c = s * v; + var f = 0; + + if (c < 1.0) { + f = (v - c) / (1 - c); + } + + return [hsv[0], c * 100, f * 100]; +}; + +convert.hcg.rgb = function (hcg) { + var h = hcg[0] / 360; + var c = hcg[1] / 100; + var g = hcg[2] / 100; + + if (c === 0.0) { + return [g * 255, g * 255, g * 255]; + } + + var pure = [0, 0, 0]; + var hi = (h % 1) * 6; + var v = hi % 1; + var w = 1 - v; + var mg = 0; + + switch (Math.floor(hi)) { + case 0: + pure[0] = 1; pure[1] = v; pure[2] = 0; break; + case 1: + pure[0] = w; pure[1] = 1; pure[2] = 0; break; + case 2: + pure[0] = 0; pure[1] = 1; pure[2] = v; break; + case 3: + pure[0] = 0; pure[1] = w; pure[2] = 1; break; + case 4: + pure[0] = v; pure[1] = 0; pure[2] = 1; break; + default: + pure[0] = 1; pure[1] = 0; pure[2] = w; + } + + mg = (1.0 - c) * g; + + return [ + (c * pure[0] + mg) * 255, + (c * pure[1] + mg) * 255, + (c * pure[2] + mg) * 255 + ]; +}; + +convert.hcg.hsv = function (hcg) { + var c = hcg[1] / 100; + var g = hcg[2] / 100; + + var v = c + g * (1.0 - c); + var f = 0; + + if (v > 0.0) { + f = c / v; + } + + return [hcg[0], f * 100, v * 100]; +}; + +convert.hcg.hsl = function (hcg) { + var c = hcg[1] / 100; + var g = hcg[2] / 100; + + var l = g * (1.0 - c) + 0.5 * c; + var s = 0; + + if (l > 0.0 && l < 0.5) { + s = c / (2 * l); + } else + if (l >= 0.5 && l < 1.0) { + s = c / (2 * (1 - l)); + } + + return [hcg[0], s * 100, l * 100]; +}; + +convert.hcg.hwb = function (hcg) { + var c = hcg[1] / 100; + var g = hcg[2] / 100; + var v = c + g * (1.0 - c); + return [hcg[0], (v - c) * 100, (1 - v) * 100]; +}; + +convert.hwb.hcg = function (hwb) { + var w = hwb[1] / 100; + var b = hwb[2] / 100; + var v = 1 - b; + var c = v - w; + var g = 0; + + if (c < 1) { + g = (v - c) / (1 - c); + } + + return [hwb[0], c * 100, g * 100]; +}; + +convert.apple.rgb = function (apple) { + return [(apple[0] / 65535) * 255, (apple[1] / 65535) * 255, (apple[2] / 65535) * 255]; +}; + +convert.rgb.apple = function (rgb) { + return [(rgb[0] / 255) * 65535, (rgb[1] / 255) * 65535, (rgb[2] / 255) * 65535]; +}; + +convert.gray.rgb = function (args) { + return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255]; +}; + +convert.gray.hsl = convert.gray.hsv = function (args) { + return [0, 0, args[0]]; +}; + +convert.gray.hwb = function (gray) { + return [0, 100, gray[0]]; +}; + +convert.gray.cmyk = function (gray) { + return [0, 0, 0, gray[0]]; +}; + +convert.gray.lab = function (gray) { + return [gray[0], 0, 0]; +}; + +convert.gray.hex = function (gray) { + var val = Math.round(gray[0] / 100 * 255) & 0xFF; + var integer = (val << 16) + (val << 8) + val; + + var string = integer.toString(16).toUpperCase(); + return '000000'.substring(string.length) + string; +}; + +convert.rgb.gray = function (rgb) { + var val = (rgb[0] + rgb[1] + rgb[2]) / 3; + return [val / 255 * 100]; +}; + + +/***/ }), +/* 7 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + +var _Colorpicker = __webpack_require__(8); + +var _Colorpicker2 = _interopRequireDefault(_Colorpicker); + +var _jquery = __webpack_require__(0); + +var _jquery2 = _interopRequireDefault(_jquery); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var plugin = 'colorpicker'; + +_jquery2.default[plugin] = _Colorpicker2.default; + +// Colorpicker jQuery Plugin API +_jquery2.default.fn[plugin] = function (option) { + var fnArgs = Array.prototype.slice.call(arguments, 1), + isSingleElement = this.length === 1, + returnValue = null; + + var $elements = this.each(function () { + var $this = (0, _jquery2.default)(this), + inst = $this.data(plugin), + options = (typeof option === 'undefined' ? 'undefined' : _typeof(option)) === 'object' ? option : {}; + + // Create instance if does not exist + if (!inst) { + inst = new _Colorpicker2.default(this, options); + $this.data(plugin, inst); + } + + if (!isSingleElement) { + return; + } + + returnValue = $this; + + if (typeof option === 'string') { + if (option === 'colorpicker') { + // Return colorpicker instance: e.g. .colorpicker('colorpicker') + returnValue = inst; + } else if (_jquery2.default.isFunction(inst[option])) { + // Return method call return value: e.g. .colorpicker('isEnabled') + returnValue = inst[option].apply(inst, fnArgs); + } else { + // Return property value: e.g. .colorpicker('element') + returnValue = inst[option]; + } + } + }); + + return isSingleElement ? returnValue : $elements; +}; + +_jquery2.default.fn[plugin].constructor = _Colorpicker2.default; + +/***/ }), +/* 8 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +var _Extension = __webpack_require__(1); + +var _Extension2 = _interopRequireDefault(_Extension); + +var _options = __webpack_require__(3); + +var _options2 = _interopRequireDefault(_options); + +var _extensions = __webpack_require__(9); + +var _extensions2 = _interopRequireDefault(_extensions); + +var _jquery = __webpack_require__(0); + +var _jquery2 = _interopRequireDefault(_jquery); + +var _SliderHandler = __webpack_require__(13); + +var _SliderHandler2 = _interopRequireDefault(_SliderHandler); + +var _PopupHandler = __webpack_require__(14); + +var _PopupHandler2 = _interopRequireDefault(_PopupHandler); + +var _InputHandler = __webpack_require__(15); + +var _InputHandler2 = _interopRequireDefault(_InputHandler); + +var _ColorHandler = __webpack_require__(22); + +var _ColorHandler2 = _interopRequireDefault(_ColorHandler); + +var _PickerHandler = __webpack_require__(23); + +var _PickerHandler2 = _interopRequireDefault(_PickerHandler); + +var _AddonHandler = __webpack_require__(24); + +var _AddonHandler2 = _interopRequireDefault(_AddonHandler); + +var _ColorItem = __webpack_require__(2); + +var _ColorItem2 = _interopRequireDefault(_ColorItem); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +var colorPickerIdCounter = 0; +var root = typeof self !== 'undefined' ? self : undefined; // window + +/** + * Colorpicker widget class + */ + +var Colorpicker = function () { + _createClass(Colorpicker, [{ + key: 'color', + + + /** + * Internal color object + * + * @type {Color|null} + */ + get: function get() { + return this.colorHandler.color; + } + + /** + * Internal color format + * + * @type {String|null} + */ + + }, { + key: 'format', + get: function get() { + return this.colorHandler.format; + } + + /** + * Getter of the picker element + * + * @returns {jQuery|HTMLElement} + */ + + }, { + key: 'picker', + get: function get() { + return this.pickerHandler.picker; + } + + /** + * @fires Colorpicker#colorpickerCreate + * @param {Object|String} element + * @param {Object} options + * @constructor + */ + + }], [{ + key: 'Color', + + /** + * Color class + * + * @static + * @type {Color} + */ + get: function get() { + return _ColorItem2.default; + } + + /** + * Extension class + * + * @static + * @type {Extension} + */ + + }, { + key: 'Extension', + get: function get() { + return _Extension2.default; + } + }]); + + function Colorpicker(element, options) { + _classCallCheck(this, Colorpicker); + + colorPickerIdCounter += 1; + /** + * The colorpicker instance number + * @type {number} + */ + this.id = colorPickerIdCounter; + + /** + * Latest colorpicker event + * + * @type {{name: String, e: *}} + */ + this.lastEvent = { + alias: null, + e: null + }; + + /** + * The element that the colorpicker is bound to + * + * @type {*|jQuery} + */ + this.element = (0, _jquery2.default)(element).addClass('colorpicker-element').attr('data-colorpicker-id', this.id); + + /** + * @type {defaults} + */ + this.options = _jquery2.default.extend(true, {}, _options2.default, options, this.element.data()); + + /** + * @type {boolean} + * @private + */ + this.disabled = false; + + /** + * Extensions added to this instance + * + * @type {Extension[]} + */ + this.extensions = []; + + /** + * The element where the + * @type {*|jQuery} + */ + this.container = this.options.container === true || this.options.container !== true && this.options.inline === true ? this.element : this.options.container; + + this.container = this.container !== false ? (0, _jquery2.default)(this.container) : false; + + /** + * @type {InputHandler} + */ + this.inputHandler = new _InputHandler2.default(this); + /** + * @type {ColorHandler} + */ + this.colorHandler = new _ColorHandler2.default(this); + /** + * @type {SliderHandler} + */ + this.sliderHandler = new _SliderHandler2.default(this); + /** + * @type {PopupHandler} + */ + this.popupHandler = new _PopupHandler2.default(this, root); + /** + * @type {PickerHandler} + */ + this.pickerHandler = new _PickerHandler2.default(this); + /** + * @type {AddonHandler} + */ + this.addonHandler = new _AddonHandler2.default(this); + + this.init(); + + // Emit a create event + (0, _jquery2.default)(_jquery2.default.proxy(function () { + /** + * (Colorpicker) When the Colorpicker instance has been created and the DOM is ready. + * + * @event Colorpicker#colorpickerCreate + */ + this.trigger('colorpickerCreate'); + }, this)); + } + + /** + * Initializes the plugin + * @private + */ + + + _createClass(Colorpicker, [{ + key: 'init', + value: function init() { + // Init addon + this.addonHandler.bind(); + + // Init input + this.inputHandler.bind(); + + // Init extensions (before initializing the color) + this.initExtensions(); + + // Init color + this.colorHandler.bind(); + + // Init picker + this.pickerHandler.bind(); + + // Init sliders and popup + this.sliderHandler.bind(); + this.popupHandler.bind(); + + // Inject into the DOM (this may make it visible) + this.pickerHandler.attach(); + + // Update all components + this.update(); + + if (this.inputHandler.isDisabled()) { + this.disable(); + } + } + + /** + * Initializes the plugin extensions + * @private + */ + + }, { + key: 'initExtensions', + value: function initExtensions() { + var _this = this; + + if (!Array.isArray(this.options.extensions)) { + this.options.extensions = []; + } + + if (this.options.debug) { + this.options.extensions.push({ name: 'debugger' }); + } + + // Register and instantiate extensions + this.options.extensions.forEach(function (ext) { + _this.registerExtension(Colorpicker.extensions[ext.name.toLowerCase()], ext.options || {}); + }); + } + + /** + * Creates and registers the given extension + * + * @param {Extension} ExtensionClass The extension class to instantiate + * @param {Object} [config] Extension configuration + * @returns {Extension} + */ + + }, { + key: 'registerExtension', + value: function registerExtension(ExtensionClass) { + var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + var ext = new ExtensionClass(this, config); + + this.extensions.push(ext); + return ext; + } + + /** + * Destroys the current instance + * + * @fires Colorpicker#colorpickerDestroy + */ + + }, { + key: 'destroy', + value: function destroy() { + var color = this.color; + + this.sliderHandler.unbind(); + this.inputHandler.unbind(); + this.popupHandler.unbind(); + this.colorHandler.unbind(); + this.addonHandler.unbind(); + this.pickerHandler.unbind(); + + this.element.removeClass('colorpicker-element').removeData('colorpicker', 'color').off('.colorpicker'); + + /** + * (Colorpicker) When the instance is destroyed with all events unbound. + * + * @event Colorpicker#colorpickerDestroy + */ + this.trigger('colorpickerDestroy', color); + } + + /** + * Shows the colorpicker widget if hidden. + * If the colorpicker is disabled this call will be ignored. + * + * @fires Colorpicker#colorpickerShow + * @param {Event} [e] + */ + + }, { + key: 'show', + value: function show(e) { + this.popupHandler.show(e); + } + + /** + * Hides the colorpicker widget. + * + * @fires Colorpicker#colorpickerHide + * @param {Event} [e] + */ + + }, { + key: 'hide', + value: function hide(e) { + this.popupHandler.hide(e); + } + + /** + * Toggles the colorpicker between visible and hidden. + * + * @fires Colorpicker#colorpickerShow + * @fires Colorpicker#colorpickerHide + * @param {Event} [e] + */ + + }, { + key: 'toggle', + value: function toggle(e) { + this.popupHandler.toggle(e); + } + + /** + * Returns the current color value as string + * + * @param {String|*} [defaultValue] + * @returns {String|*} + */ + + }, { + key: 'getValue', + value: function getValue() { + var defaultValue = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; + + var val = this.colorHandler.color; + + val = val instanceof _ColorItem2.default ? val : defaultValue; + + if (val instanceof _ColorItem2.default) { + return val.string(this.format); + } + + return val; + } + + /** + * Sets the color manually + * + * @fires Colorpicker#colorpickerChange + * @param {String|Color} val + */ + + }, { + key: 'setValue', + value: function setValue(val) { + if (this.isDisabled()) { + return; + } + var ch = this.colorHandler; + + if (ch.hasColor() && !!val && ch.color.equals(val) || !ch.hasColor() && !val) { + // same color or still empty + return; + } + + ch.color = val ? ch.createColor(val, this.options.autoInputFallback) : null; + + /** + * (Colorpicker) When the color is set programmatically with setValue(). + * + * @event Colorpicker#colorpickerChange + */ + this.trigger('colorpickerChange', ch.color, val); + + // force update if color has changed to empty + this.update(); + } + + /** + * Updates the UI and the input color according to the internal color. + * + * @fires Colorpicker#colorpickerUpdate + */ + + }, { + key: 'update', + value: function update() { + if (this.colorHandler.hasColor()) { + this.inputHandler.update(); + } else { + this.colorHandler.assureColor(); + } + + this.addonHandler.update(); + this.pickerHandler.update(); + + /** + * (Colorpicker) Fired when the widget is updated. + * + * @event Colorpicker#colorpickerUpdate + */ + this.trigger('colorpickerUpdate'); + } + + /** + * Enables the widget and the input if any + * + * @fires Colorpicker#colorpickerEnable + * @returns {boolean} + */ + + }, { + key: 'enable', + value: function enable() { + this.inputHandler.enable(); + this.disabled = false; + this.picker.removeClass('colorpicker-disabled'); + + /** + * (Colorpicker) When the widget has been enabled. + * + * @event Colorpicker#colorpickerEnable + */ + this.trigger('colorpickerEnable'); + return true; + } + + /** + * Disables the widget and the input if any + * + * @fires Colorpicker#colorpickerDisable + * @returns {boolean} + */ + + }, { + key: 'disable', + value: function disable() { + this.inputHandler.disable(); + this.disabled = true; + this.picker.addClass('colorpicker-disabled'); + + /** + * (Colorpicker) When the widget has been disabled. + * + * @event Colorpicker#colorpickerDisable + */ + this.trigger('colorpickerDisable'); + return true; + } + + /** + * Returns true if this instance is enabled + * @returns {boolean} + */ + + }, { + key: 'isEnabled', + value: function isEnabled() { + return !this.isDisabled(); + } + + /** + * Returns true if this instance is disabled + * @returns {boolean} + */ + + }, { + key: 'isDisabled', + value: function isDisabled() { + return this.disabled === true; + } + + /** + * Triggers a Colorpicker event. + * + * @param eventName + * @param color + * @param value + */ + + }, { + key: 'trigger', + value: function trigger(eventName) { + var color = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; + var value = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null; + + this.element.trigger({ + type: eventName, + colorpicker: this, + color: color ? color : this.color, + value: value ? value : this.getValue() + }); + } + }]); + + return Colorpicker; +}(); + +/** + * Colorpicker extension classes, indexed by extension name + * + * @static + * @type {Object} a map between the extension name and its class + */ + + +Colorpicker.extensions = _extensions2.default; + +exports.default = Colorpicker; + +/***/ }), +/* 9 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.Palette = exports.Swatches = exports.Preview = exports.Debugger = undefined; + +var _Debugger = __webpack_require__(10); + +var _Debugger2 = _interopRequireDefault(_Debugger); + +var _Preview = __webpack_require__(11); + +var _Preview2 = _interopRequireDefault(_Preview); + +var _Swatches = __webpack_require__(12); + +var _Swatches2 = _interopRequireDefault(_Swatches); + +var _Palette = __webpack_require__(4); + +var _Palette2 = _interopRequireDefault(_Palette); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.Debugger = _Debugger2.default; +exports.Preview = _Preview2.default; +exports.Swatches = _Swatches2.default; +exports.Palette = _Palette2.default; +exports.default = { + 'debugger': _Debugger2.default, + 'preview': _Preview2.default, + 'swatches': _Swatches2.default, + 'palette': _Palette2.default +}; + +/***/ }), +/* 10 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } }; + +var _Extension2 = __webpack_require__(1); + +var _Extension3 = _interopRequireDefault(_Extension2); + +var _jquery = __webpack_require__(0); + +var _jquery2 = _interopRequireDefault(_jquery); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +/** + * Debugger extension class + * @alias DebuggerExtension + * @ignore + */ +var Debugger = function (_Extension) { + _inherits(Debugger, _Extension); + + function Debugger(colorpicker) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + _classCallCheck(this, Debugger); + + /** + * @type {number} + */ + var _this = _possibleConstructorReturn(this, (Debugger.__proto__ || Object.getPrototypeOf(Debugger)).call(this, colorpicker, options)); + + _this.eventCounter = 0; + if (_this.colorpicker.inputHandler.hasInput()) { + _this.colorpicker.inputHandler.input.on('change.colorpicker-ext', _jquery2.default.proxy(_this.onChangeInput, _this)); + } + return _this; + } + + /** + * @fires DebuggerExtension#colorpickerDebug + * @param {string} eventName + * @param {*} args + */ + + + _createClass(Debugger, [{ + key: 'log', + value: function log(eventName) { + var _console; + + for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + args[_key - 1] = arguments[_key]; + } + + this.eventCounter += 1; + + var logMessage = '#' + this.eventCounter + ': Colorpicker#' + this.colorpicker.id + ' [' + eventName + ']'; + + (_console = console).debug.apply(_console, [logMessage].concat(args)); + + /** + * Whenever the debugger logs an event, this other event is emitted. + * + * @event DebuggerExtension#colorpickerDebug + * @type {object} The event object + * @property {Colorpicker} colorpicker The Colorpicker instance + * @property {ColorItem} color The color instance + * @property {{debugger: DebuggerExtension, eventName: String, logArgs: Array, logMessage: String}} debug + * The debug info + */ + this.colorpicker.element.trigger({ + type: 'colorpickerDebug', + colorpicker: this.colorpicker, + color: this.color, + value: null, + debug: { + debugger: this, + eventName: eventName, + logArgs: args, + logMessage: logMessage + } + }); + } + }, { + key: 'resolveColor', + value: function resolveColor(color) { + var realColor = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + + this.log('resolveColor()', color, realColor); + return false; + } + }, { + key: 'onCreate', + value: function onCreate(event) { + this.log('colorpickerCreate'); + return _get(Debugger.prototype.__proto__ || Object.getPrototypeOf(Debugger.prototype), 'onCreate', this).call(this, event); + } + }, { + key: 'onDestroy', + value: function onDestroy(event) { + this.log('colorpickerDestroy'); + this.eventCounter = 0; + + if (this.colorpicker.inputHandler.hasInput()) { + this.colorpicker.inputHandler.input.off('.colorpicker-ext'); + } + + return _get(Debugger.prototype.__proto__ || Object.getPrototypeOf(Debugger.prototype), 'onDestroy', this).call(this, event); + } + }, { + key: 'onUpdate', + value: function onUpdate(event) { + this.log('colorpickerUpdate'); + } + + /** + * @listens Colorpicker#change + * @param {Event} event + */ + + }, { + key: 'onChangeInput', + value: function onChangeInput(event) { + this.log('input:change.colorpicker', event.value, event.color); + } + }, { + key: 'onChange', + value: function onChange(event) { + this.log('colorpickerChange', event.value, event.color); + } + }, { + key: 'onInvalid', + value: function onInvalid(event) { + this.log('colorpickerInvalid', event.value, event.color); + } + }, { + key: 'onHide', + value: function onHide(event) { + this.log('colorpickerHide'); + this.eventCounter = 0; + } + }, { + key: 'onShow', + value: function onShow(event) { + this.log('colorpickerShow'); + } + }, { + key: 'onDisable', + value: function onDisable(event) { + this.log('colorpickerDisable'); + } + }, { + key: 'onEnable', + value: function onEnable(event) { + this.log('colorpickerEnable'); + } + }]); + + return Debugger; +}(_Extension3.default); + +exports.default = Debugger; + +/***/ }), +/* 11 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } }; + +var _Extension2 = __webpack_require__(1); + +var _Extension3 = _interopRequireDefault(_Extension2); + +var _jquery = __webpack_require__(0); + +var _jquery2 = _interopRequireDefault(_jquery); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +/** + * Color preview extension + * @ignore + */ +var Preview = function (_Extension) { + _inherits(Preview, _Extension); + + function Preview(colorpicker) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + _classCallCheck(this, Preview); + + var _this = _possibleConstructorReturn(this, (Preview.__proto__ || Object.getPrototypeOf(Preview)).call(this, colorpicker, _jquery2.default.extend(true, {}, { + template: '
', + showText: true, + format: colorpicker.format + }, options))); + + _this.element = (0, _jquery2.default)(_this.options.template); + _this.elementInner = _this.element.find('div'); + return _this; + } + + _createClass(Preview, [{ + key: 'onCreate', + value: function onCreate(event) { + _get(Preview.prototype.__proto__ || Object.getPrototypeOf(Preview.prototype), 'onCreate', this).call(this, event); + this.colorpicker.picker.append(this.element); + } + }, { + key: 'onUpdate', + value: function onUpdate(event) { + _get(Preview.prototype.__proto__ || Object.getPrototypeOf(Preview.prototype), 'onUpdate', this).call(this, event); + + if (!event.color) { + this.elementInner.css('backgroundColor', null).css('color', null).html(''); + return; + } + + this.elementInner.css('backgroundColor', event.color.toRgbString()); + + if (this.options.showText) { + this.elementInner.html(event.color.string(this.options.format || this.colorpicker.format)); + + if (event.color.isDark() && event.color.alpha > 0.5) { + this.elementInner.css('color', 'white'); + } else { + this.elementInner.css('color', 'black'); + } + } + } + }]); + + return Preview; +}(_Extension3.default); + +exports.default = Preview; + +/***/ }), +/* 12 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } }; + +var _Palette2 = __webpack_require__(4); + +var _Palette3 = _interopRequireDefault(_Palette2); + +var _jquery = __webpack_require__(0); + +var _jquery2 = _interopRequireDefault(_jquery); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var defaults = { + barTemplate: '
\n
\n
', + swatchTemplate: '' +}; + +/** + * Color swatches extension + * @ignore + */ + +var Swatches = function (_Palette) { + _inherits(Swatches, _Palette); + + function Swatches(colorpicker) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + _classCallCheck(this, Swatches); + + var _this = _possibleConstructorReturn(this, (Swatches.__proto__ || Object.getPrototypeOf(Swatches)).call(this, colorpicker, _jquery2.default.extend(true, {}, defaults, options))); + + _this.element = null; + return _this; + } + + _createClass(Swatches, [{ + key: 'isEnabled', + value: function isEnabled() { + return this.getLength() > 0; + } + }, { + key: 'onCreate', + value: function onCreate(event) { + _get(Swatches.prototype.__proto__ || Object.getPrototypeOf(Swatches.prototype), 'onCreate', this).call(this, event); + + if (!this.isEnabled()) { + return; + } + + this.element = (0, _jquery2.default)(this.options.barTemplate); + this.load(); + this.colorpicker.picker.append(this.element); + } + }, { + key: 'load', + value: function load() { + var _this2 = this; + + var colorpicker = this.colorpicker, + swatchContainer = this.element.find('.colorpicker-swatches--inner'), + isAliased = this.options.namesAsValues === true && !Array.isArray(this.colors); + + swatchContainer.empty(); + + _jquery2.default.each(this.colors, function (name, value) { + var $swatch = (0, _jquery2.default)(_this2.options.swatchTemplate).attr('data-name', name).attr('data-value', value).attr('title', isAliased ? name + ': ' + value : value).on('mousedown.colorpicker touchstart.colorpicker', function (e) { + var $sw = (0, _jquery2.default)(this); + + // e.preventDefault(); + + colorpicker.setValue(isAliased ? $sw.attr('data-name') : $sw.attr('data-value')); + }); + + $swatch.find('.colorpicker-swatch--inner').css('background-color', value); + + swatchContainer.append($swatch); + }); + + swatchContainer.append((0, _jquery2.default)('')); + } + }]); + + return Swatches; +}(_Palette3.default); + +exports.default = Swatches; + +/***/ }), +/* 13 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +var _jquery = __webpack_require__(0); + +var _jquery2 = _interopRequireDefault(_jquery); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +/** + * Class that handles all configured sliders on mouse or touch events. + * @ignore + */ +var SliderHandler = function () { + /** + * @param {Colorpicker} colorpicker + */ + function SliderHandler(colorpicker) { + _classCallCheck(this, SliderHandler); + + /** + * @type {Colorpicker} + */ + this.colorpicker = colorpicker; + /** + * @type {*|String} + * @private + */ + this.currentSlider = null; + /** + * @type {{left: number, top: number}} + * @private + */ + this.mousePointer = { + left: 0, + top: 0 + }; + + /** + * @type {Function} + */ + this.onMove = _jquery2.default.proxy(this.defaultOnMove, this); + } + + /** + * This function is called every time a slider guide is moved + * The scope of "this" is the SliderHandler object. + * + * @param {int} top + * @param {int} left + */ + + + _createClass(SliderHandler, [{ + key: 'defaultOnMove', + value: function defaultOnMove(top, left) { + if (!this.currentSlider) { + return; + } + + var slider = this.currentSlider, + cp = this.colorpicker, + ch = cp.colorHandler; + + // Create a color object + var color = !ch.hasColor() ? ch.getFallbackColor() : ch.color.getClone(); + + // Adjust the guide position + slider.guideStyle.left = left + 'px'; + slider.guideStyle.top = top + 'px'; + + // Adjust the color + if (slider.callLeft) { + color[slider.callLeft](left / slider.maxLeft); + } + if (slider.callTop) { + color[slider.callTop](top / slider.maxTop); + } + + // Set the new color + cp.setValue(color); + cp.popupHandler.focus(); + } + + /** + * Binds the colorpicker sliders to the mouse/touch events + */ + + }, { + key: 'bind', + value: function bind() { + var sliders = this.colorpicker.options.horizontal ? this.colorpicker.options.slidersHorz : this.colorpicker.options.sliders; + var sliderClasses = []; + + for (var sliderName in sliders) { + if (!sliders.hasOwnProperty(sliderName)) { + continue; + } + + sliderClasses.push(sliders[sliderName].selector); + } + + this.colorpicker.picker.find(sliderClasses.join(', ')).on('mousedown.colorpicker touchstart.colorpicker', _jquery2.default.proxy(this.pressed, this)); + } + + /** + * Unbinds any event bound by this handler + */ + + }, { + key: 'unbind', + value: function unbind() { + (0, _jquery2.default)(this.colorpicker.picker).off({ + 'mousemove.colorpicker': _jquery2.default.proxy(this.moved, this), + 'touchmove.colorpicker': _jquery2.default.proxy(this.moved, this), + 'mouseup.colorpicker': _jquery2.default.proxy(this.released, this), + 'touchend.colorpicker': _jquery2.default.proxy(this.released, this) + }); + } + + /** + * Function triggered when clicking in one of the color adjustment bars + * + * @private + * @fires Colorpicker#mousemove + * @param {Event} e + */ + + }, { + key: 'pressed', + value: function pressed(e) { + if (this.colorpicker.isDisabled()) { + return; + } + this.colorpicker.lastEvent.alias = 'pressed'; + this.colorpicker.lastEvent.e = e; + + if (!e.pageX && !e.pageY && e.originalEvent && e.originalEvent.touches) { + e.pageX = e.originalEvent.touches[0].pageX; + e.pageY = e.originalEvent.touches[0].pageY; + } + // e.stopPropagation(); + // e.preventDefault(); + + var target = (0, _jquery2.default)(e.target); + + // detect the slider and set the limits and callbacks + var zone = target.closest('div'); + var sliders = this.colorpicker.options.horizontal ? this.colorpicker.options.slidersHorz : this.colorpicker.options.sliders; + + if (zone.is('.colorpicker')) { + return; + } + + this.currentSlider = null; + + for (var sliderName in sliders) { + if (!sliders.hasOwnProperty(sliderName)) { + continue; + } + + var slider = sliders[sliderName]; + + if (zone.is(slider.selector)) { + this.currentSlider = _jquery2.default.extend({}, slider, { name: sliderName }); + break; + } else if (slider.childSelector !== undefined && zone.is(slider.childSelector)) { + this.currentSlider = _jquery2.default.extend({}, slider, { name: sliderName }); + zone = zone.parent(); // zone.parents(slider.selector).first() ? + break; + } + } + + var guide = zone.find('.colorpicker-guide').get(0); + + if (this.currentSlider === null || guide === null) { + return; + } + + var offset = zone.offset(); + + // reference to guide's style + this.currentSlider.guideStyle = guide.style; + this.currentSlider.left = e.pageX - offset.left; + this.currentSlider.top = e.pageY - offset.top; + this.mousePointer = { + left: e.pageX, + top: e.pageY + }; + + // TODO: fix moving outside the picker makes the guides to keep moving. The event needs to be bound to the window. + /** + * (window.document) Triggered on mousedown for the document object, + * so the color adjustment guide is moved to the clicked position. + * + * @event Colorpicker#mousemove + */ + (0, _jquery2.default)(this.colorpicker.picker).on({ + 'mousemove.colorpicker': _jquery2.default.proxy(this.moved, this), + 'touchmove.colorpicker': _jquery2.default.proxy(this.moved, this), + 'mouseup.colorpicker': _jquery2.default.proxy(this.released, this), + 'touchend.colorpicker': _jquery2.default.proxy(this.released, this) + }).trigger('mousemove'); + } + + /** + * Function triggered when dragging a guide inside one of the color adjustment bars. + * + * @private + * @param {Event} e + */ + + }, { + key: 'moved', + value: function moved(e) { + this.colorpicker.lastEvent.alias = 'moved'; + this.colorpicker.lastEvent.e = e; + + if (!e.pageX && !e.pageY && e.originalEvent && e.originalEvent.touches) { + e.pageX = e.originalEvent.touches[0].pageX; + e.pageY = e.originalEvent.touches[0].pageY; + } + + // e.stopPropagation(); + e.preventDefault(); // prevents scrolling on mobile + + var left = Math.max(0, Math.min(this.currentSlider.maxLeft, this.currentSlider.left + ((e.pageX || this.mousePointer.left) - this.mousePointer.left))); + + var top = Math.max(0, Math.min(this.currentSlider.maxTop, this.currentSlider.top + ((e.pageY || this.mousePointer.top) - this.mousePointer.top))); + + this.onMove(top, left); + } + + /** + * Function triggered when releasing the click in one of the color adjustment bars. + * + * @private + * @param {Event} e + */ + + }, { + key: 'released', + value: function released(e) { + this.colorpicker.lastEvent.alias = 'released'; + this.colorpicker.lastEvent.e = e; + + // e.stopPropagation(); + // e.preventDefault(); + + (0, _jquery2.default)(this.colorpicker.picker).off({ + 'mousemove.colorpicker': this.moved, + 'touchmove.colorpicker': this.moved, + 'mouseup.colorpicker': this.released, + 'touchend.colorpicker': this.released + }); + } + }]); + + return SliderHandler; +}(); + +exports.default = SliderHandler; + +/***/ }), +/* 14 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +var _jquery = __webpack_require__(0); + +var _jquery2 = _interopRequireDefault(_jquery); + +var _options = __webpack_require__(3); + +var _options2 = _interopRequireDefault(_options); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +/** + * Handles everything related to the UI of the colorpicker popup: show, hide, position,... + * @ignore + */ +var PopupHandler = function () { + /** + * @param {Colorpicker} colorpicker + * @param {Window} root + */ + function PopupHandler(colorpicker, root) { + _classCallCheck(this, PopupHandler); + + /** + * @type {Window} + */ + this.root = root; + /** + * @type {Colorpicker} + */ + this.colorpicker = colorpicker; + /** + * @type {jQuery} + */ + this.popoverTarget = null; + /** + * @type {jQuery} + */ + this.popoverTip = null; + + /** + * If true, the latest click was inside the popover + * @type {boolean} + */ + this.clicking = false; + /** + * @type {boolean} + */ + this.hidding = false; + /** + * @type {boolean} + */ + this.showing = false; + } + + /** + * @private + * @returns {jQuery|false} + */ + + + _createClass(PopupHandler, [{ + key: 'bind', + + + /** + * Binds the different colorpicker elements to the focus/mouse/touch events so it reacts in order to show or + * hide the colorpicker popup accordingly. It also adds the proper classes. + */ + value: function bind() { + var cp = this.colorpicker; + + if (cp.options.inline) { + cp.picker.addClass('colorpicker-inline colorpicker-visible'); + return; // no need to bind show/hide events for inline elements + } + + cp.picker.addClass('colorpicker-popup colorpicker-hidden'); + + // there is no input or addon + if (!this.hasInput && !this.hasAddon) { + return; + } + + // create Bootstrap 4 popover + if (cp.options.popover) { + this.createPopover(); + } + + // bind addon show/hide events + if (this.hasAddon) { + // enable focus on addons + if (!this.addon.attr('tabindex')) { + this.addon.attr('tabindex', 0); + } + + this.addon.on({ + 'mousedown.colorpicker touchstart.colorpicker': _jquery2.default.proxy(this.toggle, this) + }); + + this.addon.on({ + 'focus.colorpicker': _jquery2.default.proxy(this.show, this) + }); + + this.addon.on({ + 'focusout.colorpicker': _jquery2.default.proxy(this.hide, this) + }); + } + + // bind input show/hide events + if (this.hasInput && !this.hasAddon) { + this.input.on({ + 'mousedown.colorpicker touchstart.colorpicker': _jquery2.default.proxy(this.show, this), + 'focus.colorpicker': _jquery2.default.proxy(this.show, this) + }); + + this.input.on({ + 'focusout.colorpicker': _jquery2.default.proxy(this.hide, this) + }); + } + + // reposition popup on window resize + (0, _jquery2.default)(this.root).on('resize.colorpicker', _jquery2.default.proxy(this.reposition, this)); + } + + /** + * Unbinds any event bound by this handler + */ + + }, { + key: 'unbind', + value: function unbind() { + if (this.hasInput) { + this.input.off({ + 'mousedown.colorpicker touchstart.colorpicker': _jquery2.default.proxy(this.show, this), + 'focus.colorpicker': _jquery2.default.proxy(this.show, this) + }); + this.input.off({ + 'focusout.colorpicker': _jquery2.default.proxy(this.hide, this) + }); + } + + if (this.hasAddon) { + this.addon.off({ + 'mousedown.colorpicker touchstart.colorpicker': _jquery2.default.proxy(this.toggle, this) + }); + this.addon.off({ + 'focus.colorpicker': _jquery2.default.proxy(this.show, this) + }); + this.addon.off({ + 'focusout.colorpicker': _jquery2.default.proxy(this.hide, this) + }); + } + + if (this.popoverTarget) { + this.popoverTarget.popover('dispose'); + } + + (0, _jquery2.default)(this.root).off('resize.colorpicker', _jquery2.default.proxy(this.reposition, this)); + (0, _jquery2.default)(this.root.document).off('mousedown.colorpicker touchstart.colorpicker', _jquery2.default.proxy(this.hide, this)); + (0, _jquery2.default)(this.root.document).off('mousedown.colorpicker touchstart.colorpicker', _jquery2.default.proxy(this.onClickingInside, this)); + } + }, { + key: 'isClickingInside', + value: function isClickingInside(e) { + if (!e) { + return false; + } + + return this.isOrIsInside(this.popoverTip, e.currentTarget) || this.isOrIsInside(this.popoverTip, e.target) || this.isOrIsInside(this.colorpicker.picker, e.currentTarget) || this.isOrIsInside(this.colorpicker.picker, e.target); + } + }, { + key: 'isOrIsInside', + value: function isOrIsInside(container, element) { + if (!container || !element) { + return false; + } + + element = (0, _jquery2.default)(element); + + return element.is(container) || container.find(element).length > 0; + } + }, { + key: 'onClickingInside', + value: function onClickingInside(e) { + this.clicking = this.isClickingInside(e); + } + }, { + key: 'createPopover', + value: function createPopover() { + var cp = this.colorpicker; + + this.popoverTarget = this.hasAddon ? this.addon : this.input; + + cp.picker.addClass('colorpicker-bs-popover-content'); + + this.popoverTarget.popover(_jquery2.default.extend(true, {}, _options2.default.popover, cp.options.popover, { trigger: 'manual', content: cp.picker, html: true })); + + this.popoverTip = (0, _jquery2.default)(this.popoverTarget.popover('getTipElement').data('bs.popover').tip); + this.popoverTip.addClass('colorpicker-bs-popover'); + + this.popoverTarget.on('shown.bs.popover', _jquery2.default.proxy(this.fireShow, this)); + this.popoverTarget.on('hidden.bs.popover', _jquery2.default.proxy(this.fireHide, this)); + } + + /** + * If the widget is not inside a container or inline, rearranges its position relative to its element offset. + * + * @param {Event} [e] + * @private + */ + + }, { + key: 'reposition', + value: function reposition(e) { + if (this.popoverTarget && this.isVisible()) { + this.popoverTarget.popover('update'); + } + } + + /** + * Toggles the colorpicker between visible or hidden + * + * @fires Colorpicker#colorpickerShow + * @fires Colorpicker#colorpickerHide + * @param {Event} [e] + */ + + }, { + key: 'toggle', + value: function toggle(e) { + if (this.isVisible()) { + this.hide(e); + } else { + this.show(e); + } + } + + /** + * Shows the colorpicker widget if hidden. + * + * @fires Colorpicker#colorpickerShow + * @param {Event} [e] + */ + + }, { + key: 'show', + value: function show(e) { + if (this.isVisible() || this.showing || this.hidding) { + return; + } + + this.showing = true; + this.hidding = false; + this.clicking = false; + + var cp = this.colorpicker; + + cp.lastEvent.alias = 'show'; + cp.lastEvent.e = e; + + // Prevent showing browser native HTML5 colorpicker + if (e && (!this.hasInput || this.input.attr('type') === 'color') && e && e.preventDefault) { + e.stopPropagation(); + e.preventDefault(); + } + + // If it's a popover, add event to the document to hide the picker when clicking outside of it + if (this.isPopover) { + (0, _jquery2.default)(this.root).on('resize.colorpicker', _jquery2.default.proxy(this.reposition, this)); + } + + // add visible class before popover is shown + cp.picker.addClass('colorpicker-visible').removeClass('colorpicker-hidden'); + + if (this.popoverTarget) { + this.popoverTarget.popover('show'); + } else { + this.fireShow(); + } + } + }, { + key: 'fireShow', + value: function fireShow() { + this.hidding = false; + this.showing = false; + + if (this.isPopover) { + // Add event to hide on outside click + (0, _jquery2.default)(this.root.document).on('mousedown.colorpicker touchstart.colorpicker', _jquery2.default.proxy(this.hide, this)); + (0, _jquery2.default)(this.root.document).on('mousedown.colorpicker touchstart.colorpicker', _jquery2.default.proxy(this.onClickingInside, this)); + } + + /** + * (Colorpicker) When show() is called and the widget can be shown. + * + * @event Colorpicker#colorpickerShow + */ + this.colorpicker.trigger('colorpickerShow'); + } + + /** + * Hides the colorpicker widget. + * Hide is prevented when it is triggered by an event whose target element has been clicked/touched. + * + * @fires Colorpicker#colorpickerHide + * @param {Event} [e] + */ + + }, { + key: 'hide', + value: function hide(e) { + if (this.isHidden() || this.showing || this.hidding) { + return; + } + + var cp = this.colorpicker, + clicking = this.clicking || this.isClickingInside(e); + + this.hidding = true; + this.showing = false; + this.clicking = false; + + cp.lastEvent.alias = 'hide'; + cp.lastEvent.e = e; + + // TODO: fix having to click twice outside when losing focus and last 2 clicks where inside the colorpicker + + // Prevent hide if triggered by an event and an element inside the colorpicker has been clicked/touched + if (clicking) { + this.hidding = false; + return; + } + + if (this.popoverTarget) { + this.popoverTarget.popover('hide'); + } else { + this.fireHide(); + } + } + }, { + key: 'fireHide', + value: function fireHide() { + this.hidding = false; + this.showing = false; + + var cp = this.colorpicker; + + // add hidden class after popover is hidden + cp.picker.addClass('colorpicker-hidden').removeClass('colorpicker-visible'); + + // Unbind window and document events, since there is no need to keep them while the popup is hidden + (0, _jquery2.default)(this.root).off('resize.colorpicker', _jquery2.default.proxy(this.reposition, this)); + (0, _jquery2.default)(this.root.document).off('mousedown.colorpicker touchstart.colorpicker', _jquery2.default.proxy(this.hide, this)); + (0, _jquery2.default)(this.root.document).off('mousedown.colorpicker touchstart.colorpicker', _jquery2.default.proxy(this.onClickingInside, this)); + + /** + * (Colorpicker) When hide() is called and the widget can be hidden. + * + * @event Colorpicker#colorpickerHide + */ + cp.trigger('colorpickerHide'); + } + }, { + key: 'focus', + value: function focus() { + if (this.hasAddon) { + return this.addon.focus(); + } + if (this.hasInput) { + return this.input.focus(); + } + return false; + } + + /** + * Returns true if the colorpicker element has the colorpicker-visible class and not the colorpicker-hidden one. + * False otherwise. + * + * @returns {boolean} + */ + + }, { + key: 'isVisible', + value: function isVisible() { + return this.colorpicker.picker.hasClass('colorpicker-visible') && !this.colorpicker.picker.hasClass('colorpicker-hidden'); + } + + /** + * Returns true if the colorpicker element has the colorpicker-hidden class and not the colorpicker-visible one. + * False otherwise. + * + * @returns {boolean} + */ + + }, { + key: 'isHidden', + value: function isHidden() { + return this.colorpicker.picker.hasClass('colorpicker-hidden') && !this.colorpicker.picker.hasClass('colorpicker-visible'); + } + }, { + key: 'input', + get: function get() { + return this.colorpicker.inputHandler.input; + } + + /** + * @private + * @returns {boolean} + */ + + }, { + key: 'hasInput', + get: function get() { + return this.colorpicker.inputHandler.hasInput(); + } + + /** + * @private + * @returns {jQuery|false} + */ + + }, { + key: 'addon', + get: function get() { + return this.colorpicker.addonHandler.addon; + } + + /** + * @private + * @returns {boolean} + */ + + }, { + key: 'hasAddon', + get: function get() { + return this.colorpicker.addonHandler.hasAddon(); + } + + /** + * @private + * @returns {boolean} + */ + + }, { + key: 'isPopover', + get: function get() { + return !this.colorpicker.options.inline && !!this.popoverTip; + } + }]); + + return PopupHandler; +}(); + +exports.default = PopupHandler; + +/***/ }), +/* 15 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +var _jquery = __webpack_require__(0); + +var _jquery2 = _interopRequireDefault(_jquery); + +var _ColorItem = __webpack_require__(2); + +var _ColorItem2 = _interopRequireDefault(_ColorItem); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +/** + * Handles everything related to the colorpicker input + * @ignore + */ +var InputHandler = function () { + /** + * @param {Colorpicker} colorpicker + */ + function InputHandler(colorpicker) { + _classCallCheck(this, InputHandler); + + /** + * @type {Colorpicker} + */ + this.colorpicker = colorpicker; + /** + * @type {jQuery|false} + */ + this.input = this.colorpicker.element.is('input') ? this.colorpicker.element : this.colorpicker.options.input ? this.colorpicker.element.find(this.colorpicker.options.input) : false; + + if (this.input && this.input.length === 0) { + this.input = false; + } + + this._initValue(); + } + + _createClass(InputHandler, [{ + key: 'bind', + value: function bind() { + if (!this.hasInput()) { + return; + } + this.input.on({ + 'keyup.colorpicker': _jquery2.default.proxy(this.onkeyup, this) + }); + this.input.on({ + 'change.colorpicker': _jquery2.default.proxy(this.onchange, this) + }); + } + }, { + key: 'unbind', + value: function unbind() { + if (!this.hasInput()) { + return; + } + this.input.off('.colorpicker'); + } + }, { + key: '_initValue', + value: function _initValue() { + if (!this.hasInput()) { + return; + } + + var val = ''; + + [ + // candidates: + this.input.val(), this.input.data('color'), this.input.attr('data-color')].map(function (item) { + if (item && val === '') { + val = item; + } + }); + + if (val instanceof _ColorItem2.default) { + val = this.getFormattedColor(val.string(this.colorpicker.format)); + } else if (!(typeof val === 'string' || val instanceof String)) { + val = ''; + } + + this.input.prop('value', val); + } + + /** + * Returns the color string from the input value. + * If there is no input the return value is false. + * + * @returns {String|boolean} + */ + + }, { + key: 'getValue', + value: function getValue() { + if (!this.hasInput()) { + return false; + } + + return this.input.val(); + } + + /** + * If the input element is present, it updates the value with the current color object color string. + * If the value is changed, this method fires a "change" event on the input element. + * + * @param {String} val + * + * @fires Colorpicker#change + */ + + }, { + key: 'setValue', + value: function setValue(val) { + if (!this.hasInput()) { + return; + } + + var inputVal = this.input.prop('value'); + + val = val ? val : ''; + + if (val === (inputVal ? inputVal : '')) { + // No need to set value or trigger any event if nothing changed + return; + } + + this.input.prop('value', val); + + /** + * (Input) Triggered on the input element when a new color is selected. + * + * @event Colorpicker#change + */ + this.input.trigger({ + type: 'change', + colorpicker: this.colorpicker, + color: this.colorpicker.color, + value: val + }); + } + + /** + * Returns the formatted color string, with the formatting options applied + * (e.g. useHashPrefix) + * + * @param {String|null} val + * + * @returns {String} + */ + + }, { + key: 'getFormattedColor', + value: function getFormattedColor() { + var val = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; + + val = val ? val : this.colorpicker.colorHandler.getColorString(); + + if (!val) { + return ''; + } + + val = this.colorpicker.colorHandler.resolveColorDelegate(val, false); + + if (this.colorpicker.options.useHashPrefix === false) { + val = val.replace(/^#/g, ''); + } + + return val; + } + + /** + * Returns true if the widget has an associated input element, false otherwise + * @returns {boolean} + */ + + }, { + key: 'hasInput', + value: function hasInput() { + return this.input !== false; + } + + /** + * Returns true if the input exists and is disabled + * @returns {boolean} + */ + + }, { + key: 'isEnabled', + value: function isEnabled() { + return this.hasInput() && !this.isDisabled(); + } + + /** + * Returns true if the input exists and is disabled + * @returns {boolean} + */ + + }, { + key: 'isDisabled', + value: function isDisabled() { + return this.hasInput() && this.input.prop('disabled') === true; + } + + /** + * Disables the input if any + * + * @fires Colorpicker#colorpickerDisable + * @returns {boolean} + */ + + }, { + key: 'disable', + value: function disable() { + if (this.hasInput()) { + this.input.prop('disabled', true); + } + } + + /** + * Enables the input if any + * + * @fires Colorpicker#colorpickerEnable + * @returns {boolean} + */ + + }, { + key: 'enable', + value: function enable() { + if (this.hasInput()) { + this.input.prop('disabled', false); + } + } + + /** + * Calls setValue with the current internal color value + * + * @fires Colorpicker#change + */ + + }, { + key: 'update', + value: function update() { + if (!this.hasInput()) { + return; + } + + if (this.colorpicker.options.autoInputFallback === false && this.colorpicker.colorHandler.isInvalidColor()) { + // prevent update if color is invalid, autoInputFallback is disabled and the last event is keyup. + return; + } + + this.setValue(this.getFormattedColor()); + } + + /** + * Function triggered when the input has changed, so the colorpicker gets updated. + * + * @private + * @param {Event} e + * @returns {boolean} + */ + + }, { + key: 'onchange', + value: function onchange(e) { + this.colorpicker.lastEvent.alias = 'input.change'; + this.colorpicker.lastEvent.e = e; + + var val = this.getValue(); + + if (val !== e.value) { + this.colorpicker.setValue(val); + } + } + + /** + * Function triggered after a keyboard key has been released. + * + * @private + * @param {Event} e + * @returns {boolean} + */ + + }, { + key: 'onkeyup', + value: function onkeyup(e) { + this.colorpicker.lastEvent.alias = 'input.keyup'; + this.colorpicker.lastEvent.e = e; + + var val = this.getValue(); + + if (val !== e.value) { + this.colorpicker.setValue(val); + } + } + }]); + + return InputHandler; +}(); + +exports.default = InputHandler; + +/***/ }), +/* 16 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var colorString = __webpack_require__(17); +var convert = __webpack_require__(20); + +var _slice = [].slice; + +var skippedModels = [ + // to be honest, I don't really feel like keyword belongs in color convert, but eh. + 'keyword', + + // gray conflicts with some method names, and has its own method defined. + 'gray', + + // shouldn't really be in color-convert either... + 'hex' +]; + +var hashedModelKeys = {}; +Object.keys(convert).forEach(function (model) { + hashedModelKeys[_slice.call(convert[model].labels).sort().join('')] = model; +}); + +var limiters = {}; + +function Color(obj, model) { + if (!(this instanceof Color)) { + return new Color(obj, model); + } + + if (model && model in skippedModels) { + model = null; + } + + if (model && !(model in convert)) { + throw new Error('Unknown model: ' + model); + } + + var i; + var channels; + + if (typeof obj === 'undefined') { + this.model = 'rgb'; + this.color = [0, 0, 0]; + this.valpha = 1; + } else if (obj instanceof Color) { + this.model = obj.model; + this.color = obj.color.slice(); + this.valpha = obj.valpha; + } else if (typeof obj === 'string') { + var result = colorString.get(obj); + if (result === null) { + throw new Error('Unable to parse color from string: ' + obj); + } + + this.model = result.model; + channels = convert[this.model].channels; + this.color = result.value.slice(0, channels); + this.valpha = typeof result.value[channels] === 'number' ? result.value[channels] : 1; + } else if (obj.length) { + this.model = model || 'rgb'; + channels = convert[this.model].channels; + var newArr = _slice.call(obj, 0, channels); + this.color = zeroArray(newArr, channels); + this.valpha = typeof obj[channels] === 'number' ? obj[channels] : 1; + } else if (typeof obj === 'number') { + // this is always RGB - can be converted later on. + obj &= 0xFFFFFF; + this.model = 'rgb'; + this.color = [ + (obj >> 16) & 0xFF, + (obj >> 8) & 0xFF, + obj & 0xFF + ]; + this.valpha = 1; + } else { + this.valpha = 1; + + var keys = Object.keys(obj); + if ('alpha' in obj) { + keys.splice(keys.indexOf('alpha'), 1); + this.valpha = typeof obj.alpha === 'number' ? obj.alpha : 0; + } + + var hashedKeys = keys.sort().join(''); + if (!(hashedKeys in hashedModelKeys)) { + throw new Error('Unable to parse color from object: ' + JSON.stringify(obj)); + } + + this.model = hashedModelKeys[hashedKeys]; + + var labels = convert[this.model].labels; + var color = []; + for (i = 0; i < labels.length; i++) { + color.push(obj[labels[i]]); + } + + this.color = zeroArray(color); + } + + // perform limitations (clamping, etc.) + if (limiters[this.model]) { + channels = convert[this.model].channels; + for (i = 0; i < channels; i++) { + var limit = limiters[this.model][i]; + if (limit) { + this.color[i] = limit(this.color[i]); + } + } + } + + this.valpha = Math.max(0, Math.min(1, this.valpha)); + + if (Object.freeze) { + Object.freeze(this); + } +} + +Color.prototype = { + toString: function () { + return this.string(); + }, + + toJSON: function () { + return this[this.model](); + }, + + string: function (places) { + var self = this.model in colorString.to ? this : this.rgb(); + self = self.round(typeof places === 'number' ? places : 1); + var args = self.valpha === 1 ? self.color : self.color.concat(this.valpha); + return colorString.to[self.model](args); + }, + + percentString: function (places) { + var self = this.rgb().round(typeof places === 'number' ? places : 1); + var args = self.valpha === 1 ? self.color : self.color.concat(this.valpha); + return colorString.to.rgb.percent(args); + }, + + array: function () { + return this.valpha === 1 ? this.color.slice() : this.color.concat(this.valpha); + }, + + object: function () { + var result = {}; + var channels = convert[this.model].channels; + var labels = convert[this.model].labels; + + for (var i = 0; i < channels; i++) { + result[labels[i]] = this.color[i]; + } + + if (this.valpha !== 1) { + result.alpha = this.valpha; + } + + return result; + }, + + unitArray: function () { + var rgb = this.rgb().color; + rgb[0] /= 255; + rgb[1] /= 255; + rgb[2] /= 255; + + if (this.valpha !== 1) { + rgb.push(this.valpha); + } + + return rgb; + }, + + unitObject: function () { + var rgb = this.rgb().object(); + rgb.r /= 255; + rgb.g /= 255; + rgb.b /= 255; + + if (this.valpha !== 1) { + rgb.alpha = this.valpha; + } + + return rgb; + }, + + round: function (places) { + places = Math.max(places || 0, 0); + return new Color(this.color.map(roundToPlace(places)).concat(this.valpha), this.model); + }, + + alpha: function (val) { + if (arguments.length) { + return new Color(this.color.concat(Math.max(0, Math.min(1, val))), this.model); + } + + return this.valpha; + }, + + // rgb + red: getset('rgb', 0, maxfn(255)), + green: getset('rgb', 1, maxfn(255)), + blue: getset('rgb', 2, maxfn(255)), + + hue: getset(['hsl', 'hsv', 'hsl', 'hwb', 'hcg'], 0, function (val) { return ((val % 360) + 360) % 360; }), // eslint-disable-line brace-style + + saturationl: getset('hsl', 1, maxfn(100)), + lightness: getset('hsl', 2, maxfn(100)), + + saturationv: getset('hsv', 1, maxfn(100)), + value: getset('hsv', 2, maxfn(100)), + + chroma: getset('hcg', 1, maxfn(100)), + gray: getset('hcg', 2, maxfn(100)), + + white: getset('hwb', 1, maxfn(100)), + wblack: getset('hwb', 2, maxfn(100)), + + cyan: getset('cmyk', 0, maxfn(100)), + magenta: getset('cmyk', 1, maxfn(100)), + yellow: getset('cmyk', 2, maxfn(100)), + black: getset('cmyk', 3, maxfn(100)), + + x: getset('xyz', 0, maxfn(100)), + y: getset('xyz', 1, maxfn(100)), + z: getset('xyz', 2, maxfn(100)), + + l: getset('lab', 0, maxfn(100)), + a: getset('lab', 1), + b: getset('lab', 2), + + keyword: function (val) { + if (arguments.length) { + return new Color(val); + } + + return convert[this.model].keyword(this.color); + }, + + hex: function (val) { + if (arguments.length) { + return new Color(val); + } + + return colorString.to.hex(this.rgb().round().color); + }, + + rgbNumber: function () { + var rgb = this.rgb().color; + return ((rgb[0] & 0xFF) << 16) | ((rgb[1] & 0xFF) << 8) | (rgb[2] & 0xFF); + }, + + luminosity: function () { + // http://www.w3.org/TR/WCAG20/#relativeluminancedef + var rgb = this.rgb().color; + + var lum = []; + for (var i = 0; i < rgb.length; i++) { + var chan = rgb[i] / 255; + lum[i] = (chan <= 0.03928) ? chan / 12.92 : Math.pow(((chan + 0.055) / 1.055), 2.4); + } + + return 0.2126 * lum[0] + 0.7152 * lum[1] + 0.0722 * lum[2]; + }, + + contrast: function (color2) { + // http://www.w3.org/TR/WCAG20/#contrast-ratiodef + var lum1 = this.luminosity(); + var lum2 = color2.luminosity(); + + if (lum1 > lum2) { + return (lum1 + 0.05) / (lum2 + 0.05); + } + + return (lum2 + 0.05) / (lum1 + 0.05); + }, + + level: function (color2) { + var contrastRatio = this.contrast(color2); + if (contrastRatio >= 7.1) { + return 'AAA'; + } + + return (contrastRatio >= 4.5) ? 'AA' : ''; + }, + + isDark: function () { + // YIQ equation from http://24ways.org/2010/calculating-color-contrast + var rgb = this.rgb().color; + var yiq = (rgb[0] * 299 + rgb[1] * 587 + rgb[2] * 114) / 1000; + return yiq < 128; + }, + + isLight: function () { + return !this.isDark(); + }, + + negate: function () { + var rgb = this.rgb(); + for (var i = 0; i < 3; i++) { + rgb.color[i] = 255 - rgb.color[i]; + } + return rgb; + }, + + lighten: function (ratio) { + var hsl = this.hsl(); + hsl.color[2] += hsl.color[2] * ratio; + return hsl; + }, + + darken: function (ratio) { + var hsl = this.hsl(); + hsl.color[2] -= hsl.color[2] * ratio; + return hsl; + }, + + saturate: function (ratio) { + var hsl = this.hsl(); + hsl.color[1] += hsl.color[1] * ratio; + return hsl; + }, + + desaturate: function (ratio) { + var hsl = this.hsl(); + hsl.color[1] -= hsl.color[1] * ratio; + return hsl; + }, + + whiten: function (ratio) { + var hwb = this.hwb(); + hwb.color[1] += hwb.color[1] * ratio; + return hwb; + }, + + blacken: function (ratio) { + var hwb = this.hwb(); + hwb.color[2] += hwb.color[2] * ratio; + return hwb; + }, + + grayscale: function () { + // http://en.wikipedia.org/wiki/Grayscale#Converting_color_to_grayscale + var rgb = this.rgb().color; + var val = rgb[0] * 0.3 + rgb[1] * 0.59 + rgb[2] * 0.11; + return Color.rgb(val, val, val); + }, + + fade: function (ratio) { + return this.alpha(this.valpha - (this.valpha * ratio)); + }, + + opaquer: function (ratio) { + return this.alpha(this.valpha + (this.valpha * ratio)); + }, + + rotate: function (degrees) { + var hsl = this.hsl(); + var hue = hsl.color[0]; + hue = (hue + degrees) % 360; + hue = hue < 0 ? 360 + hue : hue; + hsl.color[0] = hue; + return hsl; + }, + + mix: function (mixinColor, weight) { + // ported from sass implementation in C + // https://github.com/sass/libsass/blob/0e6b4a2850092356aa3ece07c6b249f0221caced/functions.cpp#L209 + if (!mixinColor || !mixinColor.rgb) { + throw new Error('Argument to "mix" was not a Color instance, but rather an instance of ' + typeof mixinColor); + } + var color1 = mixinColor.rgb(); + var color2 = this.rgb(); + var p = weight === undefined ? 0.5 : weight; + + var w = 2 * p - 1; + var a = color1.alpha() - color2.alpha(); + + var w1 = (((w * a === -1) ? w : (w + a) / (1 + w * a)) + 1) / 2.0; + var w2 = 1 - w1; + + return Color.rgb( + w1 * color1.red() + w2 * color2.red(), + w1 * color1.green() + w2 * color2.green(), + w1 * color1.blue() + w2 * color2.blue(), + color1.alpha() * p + color2.alpha() * (1 - p)); + } +}; + +// model conversion methods and static constructors +Object.keys(convert).forEach(function (model) { + if (skippedModels.indexOf(model) !== -1) { + return; + } + + var channels = convert[model].channels; + + // conversion methods + Color.prototype[model] = function () { + if (this.model === model) { + return new Color(this); + } + + if (arguments.length) { + return new Color(arguments, model); + } + + var newAlpha = typeof arguments[channels] === 'number' ? channels : this.valpha; + return new Color(assertArray(convert[this.model][model].raw(this.color)).concat(newAlpha), model); + }; + + // 'static' construction methods + Color[model] = function (color) { + if (typeof color === 'number') { + color = zeroArray(_slice.call(arguments), channels); + } + return new Color(color, model); + }; +}); + +function roundTo(num, places) { + return Number(num.toFixed(places)); +} + +function roundToPlace(places) { + return function (num) { + return roundTo(num, places); + }; +} + +function getset(model, channel, modifier) { + model = Array.isArray(model) ? model : [model]; + + model.forEach(function (m) { + (limiters[m] || (limiters[m] = []))[channel] = modifier; + }); + + model = model[0]; + + return function (val) { + var result; + + if (arguments.length) { + if (modifier) { + val = modifier(val); + } + + result = this[model](); + result.color[channel] = val; + return result; + } + + result = this[model]().color[channel]; + if (modifier) { + result = modifier(result); + } + + return result; + }; +} + +function maxfn(max) { + return function (v) { + return Math.max(0, Math.min(max, v)); + }; +} + +function assertArray(val) { + return Array.isArray(val) ? val : [val]; +} + +function zeroArray(arr, length) { + for (var i = 0; i < length; i++) { + if (typeof arr[i] !== 'number') { + arr[i] = 0; + } + } + + return arr; +} + +module.exports = Color; + + +/***/ }), +/* 17 */ +/***/ (function(module, exports, __webpack_require__) { + +/* MIT license */ +var colorNames = __webpack_require__(5); +var swizzle = __webpack_require__(18); + +var reverseNames = {}; + +// create a list of reverse color names +for (var name in colorNames) { + if (colorNames.hasOwnProperty(name)) { + reverseNames[colorNames[name]] = name; + } +} + +var cs = module.exports = { + to: {}, + get: {} +}; + +cs.get = function (string) { + var prefix = string.substring(0, 3).toLowerCase(); + var val; + var model; + switch (prefix) { + case 'hsl': + val = cs.get.hsl(string); + model = 'hsl'; + break; + case 'hwb': + val = cs.get.hwb(string); + model = 'hwb'; + break; + default: + val = cs.get.rgb(string); + model = 'rgb'; + break; + } + + if (!val) { + return null; + } + + return {model: model, value: val}; +}; + +cs.get.rgb = function (string) { + if (!string) { + return null; + } + + var abbr = /^#([a-f0-9]{3,4})$/i; + var hex = /^#([a-f0-9]{6})([a-f0-9]{2})?$/i; + var rgba = /^rgba?\(\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/; + var per = /^rgba?\(\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/; + var keyword = /(\D+)/; + + var rgb = [0, 0, 0, 1]; + var match; + var i; + var hexAlpha; + + if (match = string.match(hex)) { + hexAlpha = match[2]; + match = match[1]; + + for (i = 0; i < 3; i++) { + // https://jsperf.com/slice-vs-substr-vs-substring-methods-long-string/19 + var i2 = i * 2; + rgb[i] = parseInt(match.slice(i2, i2 + 2), 16); + } + + if (hexAlpha) { + rgb[3] = Math.round((parseInt(hexAlpha, 16) / 255) * 100) / 100; + } + } else if (match = string.match(abbr)) { + match = match[1]; + hexAlpha = match[3]; + + for (i = 0; i < 3; i++) { + rgb[i] = parseInt(match[i] + match[i], 16); + } + + if (hexAlpha) { + rgb[3] = Math.round((parseInt(hexAlpha + hexAlpha, 16) / 255) * 100) / 100; + } + } else if (match = string.match(rgba)) { + for (i = 0; i < 3; i++) { + rgb[i] = parseInt(match[i + 1], 0); + } + + if (match[4]) { + rgb[3] = parseFloat(match[4]); + } + } else if (match = string.match(per)) { + for (i = 0; i < 3; i++) { + rgb[i] = Math.round(parseFloat(match[i + 1]) * 2.55); + } + + if (match[4]) { + rgb[3] = parseFloat(match[4]); + } + } else if (match = string.match(keyword)) { + if (match[1] === 'transparent') { + return [0, 0, 0, 0]; + } + + rgb = colorNames[match[1]]; + + if (!rgb) { + return null; + } + + rgb[3] = 1; + + return rgb; + } else { + return null; + } + + for (i = 0; i < 3; i++) { + rgb[i] = clamp(rgb[i], 0, 255); + } + rgb[3] = clamp(rgb[3], 0, 1); + + return rgb; +}; + +cs.get.hsl = function (string) { + if (!string) { + return null; + } + + var hsl = /^hsla?\(\s*([+-]?(?:\d*\.)?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/; + var match = string.match(hsl); + + if (match) { + var alpha = parseFloat(match[4]); + var h = (parseFloat(match[1]) + 360) % 360; + var s = clamp(parseFloat(match[2]), 0, 100); + var l = clamp(parseFloat(match[3]), 0, 100); + var a = clamp(isNaN(alpha) ? 1 : alpha, 0, 1); + + return [h, s, l, a]; + } + + return null; +}; + +cs.get.hwb = function (string) { + if (!string) { + return null; + } + + var hwb = /^hwb\(\s*([+-]?\d*[\.]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/; + var match = string.match(hwb); + + if (match) { + var alpha = parseFloat(match[4]); + var h = ((parseFloat(match[1]) % 360) + 360) % 360; + var w = clamp(parseFloat(match[2]), 0, 100); + var b = clamp(parseFloat(match[3]), 0, 100); + var a = clamp(isNaN(alpha) ? 1 : alpha, 0, 1); + return [h, w, b, a]; + } + + return null; +}; + +cs.to.hex = function () { + var rgba = swizzle(arguments); + + return ( + '#' + + hexDouble(rgba[0]) + + hexDouble(rgba[1]) + + hexDouble(rgba[2]) + + (rgba[3] < 1 + ? (hexDouble(Math.round(rgba[3] * 255))) + : '') + ); +}; + +cs.to.rgb = function () { + var rgba = swizzle(arguments); + + return rgba.length < 4 || rgba[3] === 1 + ? 'rgb(' + Math.round(rgba[0]) + ', ' + Math.round(rgba[1]) + ', ' + Math.round(rgba[2]) + ')' + : 'rgba(' + Math.round(rgba[0]) + ', ' + Math.round(rgba[1]) + ', ' + Math.round(rgba[2]) + ', ' + rgba[3] + ')'; +}; + +cs.to.rgb.percent = function () { + var rgba = swizzle(arguments); + + var r = Math.round(rgba[0] / 255 * 100); + var g = Math.round(rgba[1] / 255 * 100); + var b = Math.round(rgba[2] / 255 * 100); + + return rgba.length < 4 || rgba[3] === 1 + ? 'rgb(' + r + '%, ' + g + '%, ' + b + '%)' + : 'rgba(' + r + '%, ' + g + '%, ' + b + '%, ' + rgba[3] + ')'; +}; + +cs.to.hsl = function () { + var hsla = swizzle(arguments); + return hsla.length < 4 || hsla[3] === 1 + ? 'hsl(' + hsla[0] + ', ' + hsla[1] + '%, ' + hsla[2] + '%)' + : 'hsla(' + hsla[0] + ', ' + hsla[1] + '%, ' + hsla[2] + '%, ' + hsla[3] + ')'; +}; + +// hwb is a bit different than rgb(a) & hsl(a) since there is no alpha specific syntax +// (hwb have alpha optional & 1 is default value) +cs.to.hwb = function () { + var hwba = swizzle(arguments); + + var a = ''; + if (hwba.length >= 4 && hwba[3] !== 1) { + a = ', ' + hwba[3]; + } + + return 'hwb(' + hwba[0] + ', ' + hwba[1] + '%, ' + hwba[2] + '%' + a + ')'; +}; + +cs.to.keyword = function (rgb) { + return reverseNames[rgb.slice(0, 3)]; +}; + +// helpers +function clamp(num, min, max) { + return Math.min(Math.max(min, num), max); +} + +function hexDouble(num) { + var str = num.toString(16).toUpperCase(); + return (str.length < 2) ? '0' + str : str; +} + + +/***/ }), +/* 18 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var isArrayish = __webpack_require__(19); + +var concat = Array.prototype.concat; +var slice = Array.prototype.slice; + +var swizzle = module.exports = function swizzle(args) { + var results = []; + + for (var i = 0, len = args.length; i < len; i++) { + var arg = args[i]; + + if (isArrayish(arg)) { + // http://jsperf.com/javascript-array-concat-vs-push/98 + results = concat.call(results, slice.call(arg)); + } else { + results.push(arg); + } + } + + return results; +}; + +swizzle.wrap = function (fn) { + return function () { + return fn(swizzle(arguments)); + }; +}; + + +/***/ }), +/* 19 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +module.exports = function isArrayish(obj) { + if (!obj) { + return false; + } + + return obj instanceof Array || Array.isArray(obj) || + (obj.length >= 0 && obj.splice instanceof Function); +}; + + +/***/ }), +/* 20 */ +/***/ (function(module, exports, __webpack_require__) { + +var conversions = __webpack_require__(6); +var route = __webpack_require__(21); + +var convert = {}; + +var models = Object.keys(conversions); + +function wrapRaw(fn) { + var wrappedFn = function (args) { + if (args === undefined || args === null) { + return args; + } + + if (arguments.length > 1) { + args = Array.prototype.slice.call(arguments); + } + + return fn(args); + }; + + // preserve .conversion property if there is one + if ('conversion' in fn) { + wrappedFn.conversion = fn.conversion; + } + + return wrappedFn; +} + +function wrapRounded(fn) { + var wrappedFn = function (args) { + if (args === undefined || args === null) { + return args; + } + + if (arguments.length > 1) { + args = Array.prototype.slice.call(arguments); + } + + var result = fn(args); + + // we're assuming the result is an array here. + // see notice in conversions.js; don't use box types + // in conversion functions. + if (typeof result === 'object') { + for (var len = result.length, i = 0; i < len; i++) { + result[i] = Math.round(result[i]); + } + } + + return result; + }; + + // preserve .conversion property if there is one + if ('conversion' in fn) { + wrappedFn.conversion = fn.conversion; + } + + return wrappedFn; +} + +models.forEach(function (fromModel) { + convert[fromModel] = {}; + + Object.defineProperty(convert[fromModel], 'channels', {value: conversions[fromModel].channels}); + Object.defineProperty(convert[fromModel], 'labels', {value: conversions[fromModel].labels}); + + var routes = route(fromModel); + var routeModels = Object.keys(routes); + + routeModels.forEach(function (toModel) { + var fn = routes[toModel]; + + convert[fromModel][toModel] = wrapRounded(fn); + convert[fromModel][toModel].raw = wrapRaw(fn); + }); +}); + +module.exports = convert; + + +/***/ }), +/* 21 */ +/***/ (function(module, exports, __webpack_require__) { + +var conversions = __webpack_require__(6); + +/* + this function routes a model to all other models. + + all functions that are routed have a property `.conversion` attached + to the returned synthetic function. This property is an array + of strings, each with the steps in between the 'from' and 'to' + color models (inclusive). + + conversions that are not possible simply are not included. +*/ + +function buildGraph() { + var graph = {}; + // https://jsperf.com/object-keys-vs-for-in-with-closure/3 + var models = Object.keys(conversions); + + for (var len = models.length, i = 0; i < len; i++) { + graph[models[i]] = { + // http://jsperf.com/1-vs-infinity + // micro-opt, but this is simple. + distance: -1, + parent: null + }; + } + + return graph; +} + +// https://en.wikipedia.org/wiki/Breadth-first_search +function deriveBFS(fromModel) { + var graph = buildGraph(); + var queue = [fromModel]; // unshift -> queue -> pop + + graph[fromModel].distance = 0; + + while (queue.length) { + var current = queue.pop(); + var adjacents = Object.keys(conversions[current]); + + for (var len = adjacents.length, i = 0; i < len; i++) { + var adjacent = adjacents[i]; + var node = graph[adjacent]; + + if (node.distance === -1) { + node.distance = graph[current].distance + 1; + node.parent = current; + queue.unshift(adjacent); + } + } + } + + return graph; +} + +function link(from, to) { + return function (args) { + return to(from(args)); + }; +} + +function wrapConversion(toModel, graph) { + var path = [graph[toModel].parent, toModel]; + var fn = conversions[graph[toModel].parent][toModel]; + + var cur = graph[toModel].parent; + while (graph[cur].parent) { + path.unshift(graph[cur].parent); + fn = link(conversions[graph[cur].parent][cur], fn); + cur = graph[cur].parent; + } + + fn.conversion = path; + return fn; +} + +module.exports = function (fromModel) { + var graph = deriveBFS(fromModel); + var conversion = {}; + + var models = Object.keys(graph); + for (var len = models.length, i = 0; i < len; i++) { + var toModel = models[i]; + var node = graph[toModel]; + + if (node.parent === null) { + // no possible conversion, or this node is the source model. + continue; + } + + conversion[toModel] = wrapConversion(toModel, graph); + } + + return conversion; +}; + + + +/***/ }), +/* 22 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +var _jquery = __webpack_require__(0); + +var _jquery2 = _interopRequireDefault(_jquery); + +var _ColorItem = __webpack_require__(2); + +var _ColorItem2 = _interopRequireDefault(_ColorItem); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +/** + * Handles everything related to the colorpicker color + * @ignore + */ +var ColorHandler = function () { + /** + * @param {Colorpicker} colorpicker + */ + function ColorHandler(colorpicker) { + _classCallCheck(this, ColorHandler); + + /** + * @type {Colorpicker} + */ + this.colorpicker = colorpicker; + } + + /** + * @returns {*|String|ColorItem} + */ + + + _createClass(ColorHandler, [{ + key: 'bind', + value: function bind() { + // if the color option is set + if (this.colorpicker.options.color) { + this.color = this.createColor(this.colorpicker.options.color); + return; + } + + // if element[color] is empty and the input has a value + if (!this.color && !!this.colorpicker.inputHandler.getValue()) { + this.color = this.createColor(this.colorpicker.inputHandler.getValue(), this.colorpicker.options.autoInputFallback); + } + } + }, { + key: 'unbind', + value: function unbind() { + this.colorpicker.element.removeData('color'); + } + + /** + * Returns the color string from the input value or the 'data-color' attribute of the input or element. + * If empty, it returns the defaultValue parameter. + * + * @returns {String|*} + */ + + }, { + key: 'getColorString', + value: function getColorString() { + if (!this.hasColor()) { + return ''; + } + + return this.color.string(this.format); + } + + /** + * Sets the color value + * + * @param {String|ColorItem} val + */ + + }, { + key: 'setColorString', + value: function setColorString(val) { + var color = val ? this.createColor(val) : null; + + this.color = color ? color : null; + } + + /** + * Creates a new color using the widget instance options (fallbackColor, format). + * + * @fires Colorpicker#colorpickerInvalid + * @param {*} val + * @param {boolean} fallbackOnInvalid + * @returns {ColorItem} + */ + + }, { + key: 'createColor', + value: function createColor(val) { + var fallbackOnInvalid = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + + var color = new _ColorItem2.default(this.resolveColorDelegate(val), this.format); + + if (!color.isValid()) { + if (fallbackOnInvalid) { + color = this.getFallbackColor(); + } + + /** + * (Colorpicker) Fired when the color is invalid and the fallback color is going to be used. + * + * @event Colorpicker#colorpickerInvalid + */ + this.colorpicker.trigger('colorpickerInvalid', color, val); + } + + if (!this.isAlphaEnabled()) { + // Alpha is disabled + color.alpha = 1; + } + + return color; + } + }, { + key: 'getFallbackColor', + value: function getFallbackColor() { + if (this.fallback && this.fallback === this.color) { + return this.color; + } + + var fallback = this.resolveColorDelegate(this.fallback); + var color = new _ColorItem2.default(fallback, this.format); + + if (!color.isValid()) { + console.warn('The fallback color is invalid. Falling back to the previous color or black if any.'); + return this.color ? this.color : new _ColorItem2.default('#000000', this.format); + } + + return color; + } + + /** + * @returns {ColorItem} + */ + + }, { + key: 'assureColor', + value: function assureColor() { + if (!this.hasColor()) { + this.color = this.getFallbackColor(); + } + + return this.color; + } + + /** + * Delegates the color resolution to the colorpicker extensions. + * + * @param {String|*} color + * @param {boolean} realColor if true, the color should resolve into a real (not named) color code + * @returns {ColorItem|String|*|null} + */ + + }, { + key: 'resolveColorDelegate', + value: function resolveColorDelegate(color) { + var realColor = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + + var extResolvedColor = false; + + _jquery2.default.each(this.colorpicker.extensions, function (name, ext) { + if (extResolvedColor !== false) { + // skip if resolved + return; + } + extResolvedColor = ext.resolveColor(color, realColor); + }); + + return extResolvedColor ? extResolvedColor : color; + } + + /** + * Checks if there is a color object, that it is valid and it is not a fallback + * @returns {boolean} + */ + + }, { + key: 'isInvalidColor', + value: function isInvalidColor() { + return !this.hasColor() || !this.color.isValid(); + } + + /** + * Returns true if the useAlpha option is exactly true, false otherwise + * @returns {boolean} + */ + + }, { + key: 'isAlphaEnabled', + value: function isAlphaEnabled() { + return this.colorpicker.options.useAlpha !== false; + } + + /** + * Returns true if the current color object is an instance of Color, false otherwise. + * @returns {boolean} + */ + + }, { + key: 'hasColor', + value: function hasColor() { + return this.color instanceof _ColorItem2.default; + } + }, { + key: 'fallback', + get: function get() { + return this.colorpicker.options.fallbackColor ? this.colorpicker.options.fallbackColor : this.hasColor() ? this.color : null; + } + + /** + * @returns {String|null} + */ + + }, { + key: 'format', + get: function get() { + if (this.colorpicker.options.format) { + return this.colorpicker.options.format; + } + + if (this.hasColor() && this.color.hasTransparency() && this.color.format.match(/^hex/)) { + return this.isAlphaEnabled() ? 'rgba' : 'hex'; + } + + if (this.hasColor()) { + return this.color.format; + } + + return 'rgb'; + } + + /** + * Internal color getter + * + * @type {ColorItem|null} + */ + + }, { + key: 'color', + get: function get() { + return this.colorpicker.element.data('color'); + } + + /** + * Internal color setter + * + * @ignore + * @param {ColorItem|null} value + */ + , + set: function set(value) { + this.colorpicker.element.data('color', value); + + if (value instanceof _ColorItem2.default && this.colorpicker.options.format === 'auto') { + // If format is 'auto', use the first parsed one from now on + this.colorpicker.options.format = this.color.format; + } + } + }]); + + return ColorHandler; +}(); + +exports.default = ColorHandler; + +/***/ }), +/* 23 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +var _jquery = __webpack_require__(0); + +var _jquery2 = _interopRequireDefault(_jquery); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +/** + * Handles everything related to the colorpicker UI + * @ignore + */ +var PickerHandler = function () { + /** + * @param {Colorpicker} colorpicker + */ + function PickerHandler(colorpicker) { + _classCallCheck(this, PickerHandler); + + /** + * @type {Colorpicker} + */ + this.colorpicker = colorpicker; + /** + * @type {jQuery} + */ + this.picker = null; + } + + _createClass(PickerHandler, [{ + key: 'bind', + value: function bind() { + /** + * @type {jQuery|HTMLElement} + */ + var picker = this.picker = (0, _jquery2.default)(this.options.template); + + if (this.options.customClass) { + picker.addClass(this.options.customClass); + } + + if (this.options.horizontal) { + picker.addClass('colorpicker-horizontal'); + } + + if (this._supportsAlphaBar()) { + this.options.useAlpha = true; + picker.addClass('colorpicker-with-alpha'); + } else { + this.options.useAlpha = false; + } + } + }, { + key: 'attach', + value: function attach() { + // Inject the colorpicker element into the DOM + var pickerParent = this.colorpicker.container ? this.colorpicker.container : null; + + if (pickerParent) { + this.picker.appendTo(pickerParent); + } + } + }, { + key: 'unbind', + value: function unbind() { + this.picker.remove(); + } + }, { + key: '_supportsAlphaBar', + value: function _supportsAlphaBar() { + return (this.options.useAlpha || this.colorpicker.colorHandler.hasColor() && this.color.hasTransparency()) && this.options.useAlpha !== false && (!this.options.format || this.options.format && !this.options.format.match(/^hex([36])?$/i)); + } + + /** + * Changes the color adjustment bars using the current color object information. + */ + + }, { + key: 'update', + value: function update() { + if (!this.colorpicker.colorHandler.hasColor()) { + return; + } + + var vertical = this.options.horizontal !== true, + slider = vertical ? this.options.sliders : this.options.slidersHorz; + + var saturationGuide = this.picker.find('.colorpicker-saturation .colorpicker-guide'), + hueGuide = this.picker.find('.colorpicker-hue .colorpicker-guide'), + alphaGuide = this.picker.find('.colorpicker-alpha .colorpicker-guide'); + + var hsva = this.color.toHsvaRatio(); + + // Set guides position + if (hueGuide.length) { + hueGuide.css(vertical ? 'top' : 'left', (vertical ? slider.hue.maxTop : slider.hue.maxLeft) * (1 - hsva.h)); + } + if (alphaGuide.length) { + alphaGuide.css(vertical ? 'top' : 'left', (vertical ? slider.alpha.maxTop : slider.alpha.maxLeft) * (1 - hsva.a)); + } + if (saturationGuide.length) { + saturationGuide.css({ + 'top': slider.saturation.maxTop - hsva.v * slider.saturation.maxTop, + 'left': hsva.s * slider.saturation.maxLeft + }); + } + + // Set saturation hue background + this.picker.find('.colorpicker-saturation').css('backgroundColor', this.color.getCloneHueOnly().toHexString()); // we only need hue + + // Set alpha color gradient + var hexColor = this.color.toHexString(); + var alphaBg = ''; + + if (this.options.horizontal) { + alphaBg = 'linear-gradient(to right, ' + hexColor + ' 0%, transparent 100%)'; + } else { + alphaBg = 'linear-gradient(to bottom, ' + hexColor + ' 0%, transparent 100%)'; + } + + this.picker.find('.colorpicker-alpha-color').css('background', alphaBg); + } + }, { + key: 'options', + get: function get() { + return this.colorpicker.options; + } + }, { + key: 'color', + get: function get() { + return this.colorpicker.colorHandler.color; + } + }]); + + return PickerHandler; +}(); + +exports.default = PickerHandler; + +/***/ }), +/* 24 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/** + * Handles everything related to the colorpicker addon + * @ignore + */ + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +var AddonHandler = function () { + /** + * @param {Colorpicker} colorpicker + */ + function AddonHandler(colorpicker) { + _classCallCheck(this, AddonHandler); + + /** + * @type {Colorpicker} + */ + this.colorpicker = colorpicker; + /** + * @type {jQuery} + */ + this.addon = null; + } + + _createClass(AddonHandler, [{ + key: 'hasAddon', + value: function hasAddon() { + return !!this.addon; + } + }, { + key: 'bind', + value: function bind() { + /** + * @type {*|jQuery} + */ + this.addon = this.colorpicker.options.addon ? this.colorpicker.element.find(this.colorpicker.options.addon) : null; + + if (this.addon && this.addon.length === 0) { + // not found + this.addon = null; + } + } + }, { + key: 'unbind', + value: function unbind() { + if (this.hasAddon()) { + this.addon.off('.colorpicker'); + } + } + + /** + * If the addon element is present, its background color is updated + */ + + }, { + key: 'update', + value: function update() { + if (!this.colorpicker.colorHandler.hasColor() || !this.hasAddon()) { + return; + } + + var colorStr = this.colorpicker.colorHandler.getColorString(); + var styles = { 'background': colorStr }; + + var icn = this.addon.find('i').eq(0); + + if (icn.length > 0) { + icn.css(styles); + } else { + this.addon.css(styles); + } + } + }]); + + return AddonHandler; +}(); + +exports.default = AddonHandler; + +/***/ }) +/******/ ]); +}); +//# sourceMappingURL=bootstrap-colorpicker.js.map \ No newline at end of file diff --git a/vendor/bootstrap-colorpicker/js/bootstrap-colorpicker.js.map b/vendor/bootstrap-colorpicker/js/bootstrap-colorpicker.js.map new file mode 100644 index 00000000..c96e5f0a --- /dev/null +++ b/vendor/bootstrap-colorpicker/js/bootstrap-colorpicker.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap e5fc9649974c93b0b79b","webpack:///external {\"root\":\"jQuery\",\"commonjs2\":\"jquery\",\"commonjs\":\"jquery\",\"amd\":\"jquery\"}","webpack:///./src/js/Extension.js","webpack:///./src/js/ColorItem.js","webpack:///./src/js/options.js","webpack:///./src/js/extensions/Palette.js","webpack:///./node_modules/color-name/index.js","webpack:///./node_modules/color-convert/conversions.js","webpack:///./src/js/plugin.js","webpack:///./src/js/Colorpicker.js","webpack:///./src/js/extensions/index.js","webpack:///./src/js/extensions/Debugger.js","webpack:///./src/js/extensions/Preview.js","webpack:///./src/js/extensions/Swatches.js","webpack:///./src/js/SliderHandler.js","webpack:///./src/js/PopupHandler.js","webpack:///./src/js/InputHandler.js","webpack:///./node_modules/color/index.js","webpack:///./node_modules/color-string/index.js","webpack:///./node_modules/simple-swizzle/index.js","webpack:///./node_modules/is-arrayish/index.js","webpack:///./node_modules/color-convert/index.js","webpack:///./node_modules/color-convert/route.js","webpack:///./src/js/ColorHandler.js","webpack:///./src/js/PickerHandler.js","webpack:///./src/js/AddonHandler.js"],"names":["Extension","colorpicker","options","element","length","Error","on","$","proxy","onCreate","onDestroy","onUpdate","onChange","onInvalid","onShow","onHide","onEnable","onDisable","color","realColor","event","off","HSVAColor","h","s","v","a","isNaN","ColorItem","fn","args","arguments","_color","result","apply","QixColor","format","_original","replace","sanitizeFormat","valid","parse","_format","isHex","model","hue","saturation","value","alpha","hasAlpha","toObject","string","round","undefined","str","isValid","isDark","isLight","formula","hues","Array","isArray","colorFormulas","hasOwnProperty","colors","mainColor","forEach","levels","saturationv","push","Math","sanitizeString","e","String","match","toLowerCase","complementary","triad","tetrad","splitcomplement","sassVars","sliderSize","bar_size_short","columns","base_margin","customClass","fallbackColor","horizontal","inline","container","popover","animation","placement","fallbackPlacement","debug","input","addon","autoInputFallback","useHashPrefix","useAlpha","template","extensions","name","showText","sliders","selector","maxLeft","maxTop","callLeft","callTop","childSelector","slidersHorz","defaults","namesAsValues","Palette","extend","Object","keys","getLength","indexOf","toUpperCase","getValue","getName","defaultValue","plugin","Colorpicker","option","fnArgs","prototype","slice","call","isSingleElement","returnValue","$elements","each","$this","inst","data","isFunction","constructor","colorPickerIdCounter","root","self","colorHandler","pickerHandler","picker","id","lastEvent","alias","addClass","attr","disabled","inputHandler","InputHandler","ColorHandler","sliderHandler","SliderHandler","popupHandler","PopupHandler","PickerHandler","addonHandler","AddonHandler","init","trigger","bind","initExtensions","attach","update","isDisabled","disable","ext","registerExtension","ExtensionClass","config","unbind","removeClass","removeData","show","hide","toggle","val","ch","hasColor","equals","createColor","assureColor","enable","eventName","type","coreExtensions","Debugger","Preview","Swatches","eventCounter","hasInput","onChangeInput","logMessage","debugger","logArgs","log","elementInner","find","append","css","html","toRgbString","barTemplate","swatchTemplate","isEnabled","load","swatchContainer","isAliased","empty","$swatch","$sw","setValue","currentSlider","mousePointer","left","top","onMove","defaultOnMove","slider","cp","getFallbackColor","getClone","guideStyle","focus","sliderClasses","sliderName","join","pressed","moved","released","pageX","pageY","originalEvent","touches","target","zone","closest","is","parent","guide","get","offset","style","preventDefault","max","min","popoverTarget","popoverTip","clicking","hidding","showing","hasAddon","createPopover","reposition","document","onClickingInside","isOrIsInside","currentTarget","isClickingInside","_defaults","content","tip","fireShow","fireHide","isVisible","stopPropagation","isPopover","isHidden","hasClass","_initValue","onkeyup","onchange","map","item","getFormattedColor","prop","inputVal","getColorString","resolveColorDelegate","isInvalidColor","fallbackOnInvalid","isAlphaEnabled","fallback","console","warn","extResolvedColor","resolveColor","hasTransparency","_supportsAlphaBar","pickerParent","appendTo","remove","vertical","saturationGuide","hueGuide","alphaGuide","hsva","toHsvaRatio","getCloneHueOnly","toHexString","hexColor","alphaBg","colorStr","styles","icn","eq"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;ACVA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE;AACvD,yCAAiC,eAAe;AAChD;AACA;AACA;;AAEA;AACA,8DAAsD,+DAA+D;;AAErH;AACA;;AAEA;AACA;;;;;;;AC7DA,+C;;;;;;;ACAa;;;;;;;;AAEb;;;;;;;;AAEA;;;IAGMA,S;AACJ;;;;AAIA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AAL,CAAa8D,MAAb,CAAoBD,cAApB,CAAmCuC,IAAnC,CAAL,EAA+C;AAC7C;AACD;AACD,YAAI,KAAKpG,OAAL,CAAa8D,MAAb,CAAoBsC,IAApB,EAA0B3B,WAA1B,OAA4C5B,MAAM4B,WAAN,EAAhD,EAAqE;AACnE,iBAAO2B,IAAP;AACD;AACF;AACD,aAAOqB,YAAP;AACD;;AAED;;;;;;;;;;6BAOSrB,I,EAA4B;AAAA,UAAtBqB,YAAsB,uEAAP,KAAO;;AACnC,UAAI,EAAE,OAAOrB,IAAP,KAAgB,QAAlB,KAA+B,CAAC,KAAKpG,OAAL,CAAa8D,MAAjD,EAAyD;AACvD,eAAO2D,YAAP;AACD;AACD,UAAI,KAAKzH,OAAL,CAAa8D,MAAb,CAAoBD,cAApB,CAAmCuC,IAAnC,CAAJ,EAA8C;AAC5C,eAAO,KAAKpG,OAAL,CAAa8D,MAAb,CAAoBsC,IAApB,CAAP;AACD;AACD,aAAOqB,YAAP;AACD;;;;EAvGmB3H,mB;;kBA0GPkH,O;;;;;;;ACrJH;;AAEZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACvJA;AACA,kBAAkB,mBAAO,CAAC,CAAY;;AAEtC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,OAAO,2BAA2B;AAClC,OAAO,2BAA2B;AAClC,OAAO,2BAA2B;AAClC,OAAO,2BAA2B;AAClC,QAAQ,4BAA4B;AACpC,OAAO,2BAA2B;AAClC,OAAO,2BAA2B;AAClC,OAAO,2BAA2B;AAClC,OAAO,6BAA6B;AACpC,WAAW,iCAAiC;AAC5C,UAAU,gCAAgC;AAC1C,WAAW,iCAAiC;AAC5C,OAAO,qCAAqC;AAC5C,SAAS,2CAA2C;AACpD,QAAQ;AACR;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,qDAAqD,gBAAgB;AACrE,mDAAmD,cAAc;AACjE;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,EAAE;AACF;AACA,EAAE;AACF;AACA,EAAE;AACF;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,EAAE;AACF;AACA,EAAE;AACF;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,EAAE;AACF;AACA;;AAEA;;AAEA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,uBAAuB;;AAEvB;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO,QAAQ;AAC/B,gBAAgB,OAAO,QAAQ;AAC/B,iBAAiB,OAAO,OAAO;AAC/B,iBAAiB,OAAO,OAAO;AAC/B,gBAAgB,QAAQ,OAAO;AAC/B,gBAAgB,QAAQ,OAAO;AAC/B;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,sEAAsE;;AAEtE;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,sBAAsB;AACtB;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,+CAA+C,EAAE,UAAU,EAAE;AAC7D;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,EAAE;AACF;AACA;;AAEA;AACA;AACA,EAAE;AACF;AACA;AACA,EAAE;AACF;AACA;AACA,EAAE;AACF;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,EAAE;AACF;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,eAAe,aAAa,aAAa;AACzC;AACA,eAAe,aAAa,aAAa;AACzC;AACA,eAAe,aAAa,aAAa;AACzC;AACA,eAAe,aAAa,aAAa;AACzC;AACA,eAAe,aAAa,aAAa;AACzC;AACA,eAAe,aAAa;AAC5B;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,EAAE;AACF;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;ACn2Ba;;;;AAEb;;;;AACA;;;;;;AAEA,IAAIU,SAAS,aAAb;;AAEArH,iBAAEqH,MAAF,IAAYC,qBAAZ;;AAEA;AACAtH,iBAAEsB,EAAF,CAAK+F,MAAL,IAAe,UAAUE,MAAV,EAAkB;AAC/B,MAAIC,SAASnE,MAAMoE,SAAN,CAAgBC,KAAhB,CAAsBC,IA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AQ5G,EAAEzB,KAAd,EAAqB;AACnB,aAAK9C,WAAL,CAAiBsN,QAAjB,CAA0BnC,GAA1B;AACD;AACF;;;;;;kBAGY3B,Y;;;;;;;AClQF;;AAEb,kBAAkB,mBAAO,CAAC,EAAc;AACxC,cAAc,mBAAO,CAAC,EAAe;;AAErC;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,aAAa,mBAAmB;AAChC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,aAAa,cAAc;AAC3B;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;;AAEA,iBAAiB,cAAc;AAC/B;AACA;;AAEA;AACA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;AACA;;AAEA,qEAAqE,kCAAkC,EAAE;;AAEzG;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;;AAEA;AACA,iBAAiB,gBAAgB;AACjC;AACA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA,EAAE;;AAEF;AACA;AACA,iBAAiB,OAAO;AACxB;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA,EAAE;;AAEF;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,EAAE;;AAEF;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,gBAAgB,YAAY;AAC5B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;ACjeA;AACA,iBAAiB,mBAAO,CAAC,CAAY;AACrC,cAAc,mBAAO,CAAC,EAAgB;;AAEtC;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,SAAS;AACT;;AAEA;AACA;AACA;AACA;;AAEA,yBAAyB,IAAI;AAC7B,wBAAwB,EAAE,WAAW,EAAE;AACvC;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAE;AACF;AACA;;AAEA,aAAa,OAAO;AACpB;AACA;;AAEA;AACA;AACA;AACA,EAAE;AACF,aAAa,OAAO;AACpB;AACA;;AAEA;AACA;AACA;AACA,EAAE;AACF,aAAa,OAAO;AACpB;AACA;;AAEA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,EAAE;AACF;AACA;;AAEA,YAAY,OAAO;AACnB;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;ACzOa;;AAEb,iBAAiB,mBAAO,CAAC,EAAa;;AAEtC;AACA;;AAEA;AACA;;AAEA,mCAAmC,SAAS;AAC5C;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;;;;;;AC5Ba;;AAEb;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;ACTA,kBAAkB,mBAAO,CAAC,CAAe;AACzC,YAAY,mBAAO,CAAC,EAAS;;AAE7B;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,kCAAkC;AAClC;AACA;AACA,uCAAuC,SAAS;AAChD;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,wDAAwD,uCAAuC;AAC/F,sDAAsD,qCAAqC;;AAE3F;AACA;;AAEA;AACA;;AAEA;AACA;AACA,EAAE;AACF,CAAC;;AAED;;;;;;;AC7EA,kBAAkB,mBAAO,CAAC,CAAe;;AAEzC;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,qCAAqC,SAAS;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,yBAAyB;;AAEzB;;AAEA;AACA;AACA;;AAEA,yCAAyC,SAAS;AAClD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AAC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":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"jquery\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"bootstrap-colorpicker\", [\"jquery\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"bootstrap-colorpicker\"] = factory(require(\"jquery\"));\n\telse\n\t\troot[\"bootstrap-colorpicker\"] = factory(root[\"jQuery\"]);\n})(typeof self !== 'undefined' ? self : this, function(__WEBPACK_EXTERNAL_MODULE_0__) {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 7);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap e5fc9649974c93b0b79b","module.exports = __WEBPACK_EXTERNAL_MODULE_0__;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external {\"root\":\"jQuery\",\"commonjs2\":\"jquery\",\"commonjs\":\"jquery\",\"amd\":\"jquery\"}\n// module id = 0\n// module chunks = 0 1","'use strict';\n\nimport $ from 'jquery';\n\n/**\n * Colorpicker extension class.\n */\nclass Extension {\n /**\n * @param {Colorpicker} colorpicker\n * @param {Object} options\n */\n constructor(colorpicker, options = {}) {\n /**\n * The colorpicker instance\n * @type {Colorpicker}\n */\n this.colorpicker = colorpicker;\n /**\n * Extension options\n *\n * @type {Object}\n */\n this.options = options;\n\n if (!(this.colorpicker.element && this.colorpicker.element.length)) {\n throw new Error('Extension: this.colorpicker.element is not valid');\n }\n\n this.colorpicker.element.on('colorpickerCreate.colorpicker-ext', $.proxy(this.onCreate, this));\n this.colorpicker.element.on('colorpickerDestroy.colorpicker-ext', $.proxy(this.onDestroy, this));\n this.colorpicker.element.on('colorpickerUpdate.colorpicker-ext', $.proxy(this.onUpdate, this));\n this.colorpicker.element.on('colorpickerChange.colorpicker-ext', $.proxy(this.onChange, this));\n this.colorpicker.element.on('colorpickerInvalid.colorpicker-ext', $.proxy(this.onInvalid, this));\n this.colorpicker.element.on('colorpickerShow.colorpicker-ext', $.proxy(this.onShow, this));\n this.colorpicker.element.on('colorpickerHide.colorpicker-ext', $.proxy(this.onHide, this));\n this.colorpicker.element.on('colorpickerEnable.colorpicker-ext', $.proxy(this.onEnable, this));\n this.colorpicker.element.on('colorpickerDisable.colorpicker-ext', $.proxy(this.onDisable, this));\n }\n\n /**\n * Function called every time a new color needs to be created.\n * Return false to skip this resolver and continue with other extensions' ones\n * or return anything else to consider the color resolved.\n *\n * @param {ColorItem|String|*} color\n * @param {boolean} realColor if true, the color should resolve into a real (not named) color code\n * @return {ColorItem|String|*}\n */\n resolveColor(color, realColor = true) {\n return false;\n }\n\n /**\n * Method called after the colorpicker is created\n *\n * @listens Colorpicker#colorpickerCreate\n * @param {Event} event\n */\n onCreate(event) {\n // to be extended\n }\n\n /**\n * Method called after the colorpicker is destroyed\n *\n * @listens Colorpicker#colorpickerDestroy\n * @param {Event} event\n */\n onDestroy(event) {\n this.colorpicker.element.off('.colorpicker-ext');\n }\n\n /**\n * Method called after the colorpicker is updated\n *\n * @listens Colorpicker#colorpickerUpdate\n * @param {Event} event\n */\n onUpdate(event) {\n // to be extended\n }\n\n /**\n * Method called after the colorpicker color is changed\n *\n * @listens Colorpicker#colorpickerChange\n * @param {Event} event\n */\n onChange(event) {\n // to be extended\n }\n\n /**\n * Method called when the colorpicker color is invalid\n *\n * @listens Colorpicker#colorpickerInvalid\n * @param {Event} event\n */\n onInvalid(event) {\n // to be extended\n }\n\n /**\n * Method called after the colorpicker is hidden\n *\n * @listens Colorpicker#colorpickerHide\n * @param {Event} event\n */\n onHide(event) {\n // to be extended\n }\n\n /**\n * Method called after the colorpicker is shown\n *\n * @listens Colorpicker#colorpickerShow\n * @param {Event} event\n */\n onShow(event) {\n // to be extended\n }\n\n /**\n * Method called after the colorpicker is disabled\n *\n * @listens Colorpicker#colorpickerDisable\n * @param {Event} event\n */\n onDisable(event) {\n // to be extended\n }\n\n /**\n * Method called after the colorpicker is enabled\n *\n * @listens Colorpicker#colorpickerEnable\n * @param {Event} event\n */\n onEnable(event) {\n // to be extended\n }\n}\n\nexport default Extension;\n\n\n\n// WEBPACK FOOTER //\n// ./src/js/Extension.js","/**\n * Color manipulation class, specific for Bootstrap Colorpicker\n */\nimport QixColor from 'color';\n\n/**\n * HSVA color data class, containing the hue, saturation, value and alpha\n * information.\n */\nclass HSVAColor {\n /**\n * @param {number|int} h\n * @param {number|int} s\n * @param {number|int} v\n * @param {number|int} a\n */\n constructor(h, s, v, a) {\n this.h = isNaN(h) ? 0 : h;\n this.s = isNaN(s) ? 0 : s;\n this.v = isNaN(v) ? 0 : v;\n this.a = isNaN(h) ? 1 : a;\n }\n\n toString() {\n return `${this.h}, ${this.s}%, ${this.v}%, ${this.a}`;\n }\n}\n\n/**\n * HSVA color manipulation\n */\nclass ColorItem {\n\n /**\n * Returns the HSVAColor class\n *\n * @static\n * @example let colorData = new ColorItem.HSVAColor(360, 100, 100, 1);\n * @returns {HSVAColor}\n */\n static get HSVAColor() {\n return HSVAColor;\n }\n\n /**\n * Applies a method of the QixColor API and returns a new Color object or\n * the return value of the method call.\n *\n * If no argument is provided, the internal QixColor object is returned.\n *\n * @param {String} fn QixColor function name\n * @param args QixColor function arguments\n * @example let darkerColor = color.api('darken', 0.25);\n * @example let luminosity = color.api('luminosity');\n * @example color = color.api('negate');\n * @example let qColor = color.api().negate();\n * @returns {ColorItem|QixColor|*}\n */\n api(fn, ...args) {\n if (arguments.length === 0) {\n return this._color;\n }\n\n let result = this._color[fn].apply(this._color, args);\n\n if (!(result instanceof QixColor)) {\n // return result of the method call\n return result;\n }\n\n return new ColorItem(result, this.format);\n }\n\n /**\n * Returns the original ColorItem constructor data,\n * plus a 'valid' flag to know if it's valid or not.\n *\n * @returns {{color: *, format: String, valid: boolean}}\n */\n get original() {\n return this._original;\n }\n\n /**\n * @param {ColorItem|HSVAColor|QixColor|String|*|null} color Color data\n * @param {String|null} format Color model to convert to by default. Supported: 'rgb', 'hsl', 'hex'.\n */\n constructor(color = null, format = null) {\n this.replace(color, format);\n }\n\n /**\n * Replaces the internal QixColor object with a new one.\n * This also replaces the internal original color data.\n *\n * @param {ColorItem|HSVAColor|QixColor|String|*|null} color Color data to be parsed (if needed)\n * @param {String|null} format Color model to convert to by default. Supported: 'rgb', 'hsl', 'hex'.\n * @example color.replace('rgb(255,0,0)', 'hsl');\n * @example color.replace(hsvaColorData);\n */\n replace(color, format = null) {\n format = ColorItem.sanitizeFormat(format);\n\n /**\n * @type {{color: *, format: String}}\n * @private\n */\n this._original = {\n color: color,\n format: format,\n valid: true\n };\n /**\n * @type {QixColor}\n * @private\n */\n this._color = ColorItem.parse(color);\n\n if (this._color === null) {\n this._color = QixColor();\n this._original.valid = false;\n return;\n }\n\n /**\n * @type {*|string}\n * @private\n */\n this._format = format ? format :\n (ColorItem.isHex(color) ? 'hex' : this._color.model);\n }\n\n /**\n * Parses the color returning a Qix Color object or null if cannot be\n * parsed.\n *\n * @param {ColorItem|HSVAColor|QixColor|String|*|null} color Color data\n * @example let qColor = ColorItem.parse('rgb(255,0,0)');\n * @static\n * @returns {QixColor|null}\n */\n static parse(color) {\n if (color instanceof QixColor) {\n return color;\n }\n\n if (color instanceof ColorItem) {\n return color._color;\n }\n\n let format = null;\n\n if (color instanceof HSVAColor) {\n color = [color.h, color.s, color.v, isNaN(color.a) ? 1 : color.a];\n } else {\n color = ColorItem.sanitizeString(color);\n }\n\n if (color === null) {\n return null;\n }\n\n if (Array.isArray(color)) {\n format = 'hsv';\n }\n\n try {\n return QixColor(color, format);\n } catch (e) {\n return null;\n }\n }\n\n /**\n * Sanitizes a color string, adding missing hash to hexadecimal colors\n * and converting 'transparent' to a color code.\n *\n * @param {String|*} str Color string\n * @example let colorStr = ColorItem.sanitizeString('ffaa00');\n * @static\n * @returns {String|*}\n */\n static sanitizeString(str) {\n if (!(typeof str === 'string' || str instanceof String)) {\n return str;\n }\n\n if (str.match(/^[0-9a-f]{2,}$/i)) {\n return `#${str}`;\n }\n\n if (str.toLowerCase() === 'transparent') {\n return '#FFFFFF00';\n }\n\n return str;\n }\n\n /**\n * Detects if a value is a string and a color in hexadecimal format (in any variant).\n *\n * @param {String} str\n * @example ColorItem.isHex('rgba(0,0,0)'); // false\n * @example ColorItem.isHex('ffaa00'); // true\n * @example ColorItem.isHex('#ffaa00'); // true\n * @static\n * @returns {boolean}\n */\n static isHex(str) {\n if (!(typeof str === 'string' || str instanceof String)) {\n return false;\n }\n\n return !!str.match(/^#?[0-9a-f]{2,}$/i);\n }\n\n /**\n * Sanitizes a color format to one supported by web browsers.\n * Returns an empty string of the format can't be recognised.\n *\n * @param {String|*} format\n * @example ColorItem.sanitizeFormat('rgba'); // 'rgb'\n * @example ColorItem.isHex('hex8'); // 'hex'\n * @example ColorItem.isHex('invalid'); // ''\n * @static\n * @returns {String} 'rgb', 'hsl', 'hex' or ''.\n */\n static sanitizeFormat(format) {\n switch (format) {\n case 'hex':\n case 'hex3':\n case 'hex4':\n case 'hex6':\n case 'hex8':\n return 'hex';\n case 'rgb':\n case 'rgba':\n case 'keyword':\n case 'name':\n return 'rgb';\n case 'hsl':\n case 'hsla':\n case 'hsv':\n case 'hsva':\n case 'hwb': // HWB this is supported by Qix Color, but not by browsers\n case 'hwba':\n return 'hsl';\n default :\n return '';\n }\n }\n\n /**\n * Returns true if the color is valid, false if not.\n *\n * @returns {boolean}\n */\n isValid() {\n return this._original.valid === true;\n }\n\n /**\n * Hue value from 0 to 360\n *\n * @returns {int}\n */\n get hue() {\n return this._color.hue();\n }\n\n /**\n * Saturation value from 0 to 100\n *\n * @returns {int}\n */\n get saturation() {\n return this._color.saturationv();\n }\n\n /**\n * Value channel value from 0 to 100\n *\n * @returns {int}\n */\n get value() {\n return this._color.value();\n }\n\n /**\n * Alpha value from 0.0 to 1.0\n *\n * @returns {number}\n */\n get alpha() {\n let a = this._color.alpha();\n\n return isNaN(a) ? 1 : a;\n }\n\n /**\n * Default color format to convert to when calling toString() or string()\n *\n * @returns {String} 'rgb', 'hsl', 'hex' or ''\n */\n get format() {\n return this._format ? this._format : this._color.model;\n }\n\n /**\n * Sets the hue value\n *\n * @param {int} value Integer from 0 to 360\n */\n set hue(value) {\n this._color = this._color.hue(value);\n }\n\n /**\n * Sets the hue ratio, where 1.0 is 0, 0.5 is 180 and 0.0 is 360.\n *\n * @ignore\n * @param {number} h Ratio from 1.0 to 0.0\n */\n setHueRatio(h) {\n this.hue = ((1 - h) * 360);\n }\n\n /**\n * Sets the saturation value\n *\n * @param {int} value Integer from 0 to 100\n */\n set saturation(value) {\n this._color = this._color.saturationv(value);\n }\n\n /**\n * Sets the saturation ratio, where 1.0 is 100 and 0.0 is 0.\n *\n * @ignore\n * @param {number} s Ratio from 0.0 to 1.0\n */\n setSaturationRatio(s) {\n this.saturation = (s * 100);\n }\n\n /**\n * Sets the 'value' channel value\n *\n * @param {int} value Integer from 0 to 100\n */\n set value(value) {\n this._color = this._color.value(value);\n }\n\n /**\n * Sets the value ratio, where 1.0 is 0 and 0.0 is 100.\n *\n * @ignore\n * @param {number} v Ratio from 1.0 to 0.0\n */\n setValueRatio(v) {\n this.value = ((1 - v) * 100);\n }\n\n /**\n * Sets the alpha value. It will be rounded to 2 decimals.\n *\n * @param {int} value Float from 0.0 to 1.0\n */\n set alpha(value) {\n // 2 decimals max\n this._color = this._color.alpha(Math.round(value * 100) / 100);\n }\n\n /**\n * Sets the alpha ratio, where 1.0 is 0.0 and 0.0 is 1.0.\n *\n * @ignore\n * @param {number} a Ratio from 1.0 to 0.0\n */\n setAlphaRatio(a) {\n this.alpha = 1 - a;\n }\n\n /**\n * Sets the default color format\n *\n * @param {String} value Supported: 'rgb', 'hsl', 'hex'\n */\n set format(value) {\n this._format = ColorItem.sanitizeFormat(value);\n }\n\n /**\n * Returns true if the saturation value is zero, false otherwise\n *\n * @returns {boolean}\n */\n isDesaturated() {\n return this.saturation === 0;\n }\n\n /**\n * Returns true if the alpha value is zero, false otherwise\n *\n * @returns {boolean}\n */\n isTransparent() {\n return this.alpha === 0;\n }\n\n /**\n * Returns true if the alpha value is numeric and less than 1, false otherwise\n *\n * @returns {boolean}\n */\n hasTransparency() {\n return this.hasAlpha() && (this.alpha < 1);\n }\n\n /**\n * Returns true if the alpha value is numeric, false otherwise\n *\n * @returns {boolean}\n */\n hasAlpha() {\n return !isNaN(this.alpha);\n }\n\n /**\n * Returns a new HSVAColor object, based on the current color\n *\n * @returns {HSVAColor}\n */\n toObject() {\n return new HSVAColor(this.hue, this.saturation, this.value, this.alpha);\n }\n\n /**\n * Alias of toObject()\n *\n * @returns {HSVAColor}\n */\n toHsva() {\n return this.toObject();\n }\n\n /**\n * Returns a new HSVAColor object with the ratio values (from 0.0 to 1.0),\n * based on the current color.\n *\n * @ignore\n * @returns {HSVAColor}\n */\n toHsvaRatio() {\n return new HSVAColor(\n this.hue / 360,\n this.saturation / 100,\n this.value / 100,\n this.alpha\n );\n }\n\n /**\n * Converts the current color to its string representation,\n * using the internal format of this instance.\n *\n * @returns {String}\n */\n toString() {\n return this.string();\n }\n\n /**\n * Converts the current color to its string representation,\n * using the given format.\n *\n * @param {String|null} format Format to convert to. If empty or null, the internal format will be used.\n * @returns {String}\n */\n string(format = null) {\n format = ColorItem.sanitizeFormat(format ? format : this.format);\n\n if (!format) {\n return this._color.round().string();\n }\n\n if (this._color[format] === undefined) {\n throw new Error(`Unsupported color format: '${format}'`);\n }\n\n let str = this._color[format]();\n\n return str.round ? str.round().string() : str;\n }\n\n /**\n * Returns true if the given color values equals this one, false otherwise.\n * The format is not compared.\n * If any of the colors is invalid, the result will be false.\n *\n * @param {ColorItem|HSVAColor|QixColor|String|*|null} color Color data\n *\n * @returns {boolean}\n */\n equals(color) {\n color = (color instanceof ColorItem) ? color : new ColorItem(color);\n\n if (!color.isValid() || !this.isValid()) {\n return false;\n }\n\n return (\n this.hue === color.hue &&\n this.saturation === color.saturation &&\n this.value === color.value &&\n this.alpha === color.alpha\n );\n }\n\n /**\n * Creates a copy of this instance\n *\n * @returns {ColorItem}\n */\n getClone() {\n return new ColorItem(this._color, this.format);\n }\n\n /**\n * Creates a copy of this instance, only copying the hue value,\n * and setting the others to its max value.\n *\n * @returns {ColorItem}\n */\n getCloneHueOnly() {\n return new ColorItem([this.hue, 100, 100, 1], this.format);\n }\n\n /**\n * Creates a copy of this instance setting the alpha to the max.\n *\n * @returns {ColorItem}\n */\n getCloneOpaque() {\n return new ColorItem(this._color.alpha(1), this.format);\n }\n\n /**\n * Converts the color to a RGB string\n *\n * @returns {String}\n */\n toRgbString() {\n return this.string('rgb');\n }\n\n /**\n * Converts the color to a Hexadecimal string\n *\n * @returns {String}\n */\n toHexString() {\n return this.string('hex');\n }\n\n /**\n * Converts the color to a HSL string\n *\n * @returns {String}\n */\n toHslString() {\n return this.string('hsl');\n }\n\n /**\n * Returns true if the color is dark, false otherwhise.\n * This is useful to decide a text color.\n *\n * @returns {boolean}\n */\n isDark() {\n return this._color.isDark();\n }\n\n /**\n * Returns true if the color is light, false otherwhise.\n * This is useful to decide a text color.\n *\n * @returns {boolean}\n */\n isLight() {\n return this._color.isLight();\n }\n\n /**\n * Generates a list of colors using the given hue-based formula or the given array of hue values.\n * Hue formulas can be extended using ColorItem.colorFormulas static property.\n *\n * @param {String|Number[]} formula Examples: 'complementary', 'triad', 'tetrad', 'splitcomplement', [180, 270]\n * @example let colors = color.generate('triad');\n * @example let colors = color.generate([45, 80, 112, 200]);\n * @returns {ColorItem[]}\n */\n generate(formula) {\n let hues = [];\n\n if (Array.isArray(formula)) {\n hues = formula;\n } else if (!ColorItem.colorFormulas.hasOwnProperty(formula)) {\n throw new Error(`No color formula found with the name '${formula}'.`);\n } else {\n hues = ColorItem.colorFormulas[formula];\n }\n\n let colors = [], mainColor = this._color, format = this.format;\n\n hues.forEach(function (hue) {\n let levels = [\n hue ? ((mainColor.hue() + hue) % 360) : mainColor.hue(),\n mainColor.saturationv(),\n mainColor.value(),\n mainColor.alpha()\n ];\n\n colors.push(new ColorItem(levels, format));\n });\n\n return colors;\n }\n}\n\n/**\n * List of hue-based color formulas used by ColorItem.prototype.generate()\n *\n * @static\n * @type {{complementary: number[], triad: number[], tetrad: number[], splitcomplement: number[]}}\n */\nColorItem.colorFormulas = {\n complementary: [180],\n triad: [0, 120, 240],\n tetrad: [0, 90, 180, 270],\n splitcomplement: [0, 72, 216]\n};\n\nexport default ColorItem;\n\nexport {\n HSVAColor,\n ColorItem\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/js/ColorItem.js","'use strict';\n/**\n * @module\n */\n\n// adjust these values accordingly to the sass vars\nlet sassVars = {\n 'bar_size_short': 16,\n 'base_margin': 6,\n 'columns': 6\n};\n\nlet sliderSize = (sassVars.bar_size_short * sassVars.columns) + (sassVars.base_margin * (sassVars.columns - 1));\n\n/**\n * Colorpicker default options\n */\nexport default {\n /**\n * Custom class to be added to the `.colorpicker-element` element\n *\n * @type {String|null}\n * @default null\n */\n customClass: null,\n /**\n * Sets a initial color, ignoring the one from the element/input value or the data-color attribute.\n *\n * @type {(String|ColorItem|boolean)}\n * @default false\n */\n color: false,\n /**\n * Fallback color to use when the given color is invalid.\n * If false, the latest valid color will be used as a fallback.\n *\n * @type {String|ColorItem|boolean}\n * @default false\n */\n fallbackColor: false,\n /**\n * Forces an specific color format. If 'auto', it will be automatically detected the first time only,\n * but if null it will be always recalculated.\n *\n * Note that the ending 'a' of the format meaning \"alpha\" has currently no effect, meaning that rgb is the same as\n * rgba excepting if the alpha channel is disabled (see useAlpha).\n *\n * @type {('rgb'|'hex'|'hsl'|'auto'|null)}\n * @default 'auto'\n */\n format: 'auto',\n /**\n * Horizontal mode layout.\n *\n * If true, the hue and alpha channel bars will be rendered horizontally, above the saturation selector.\n *\n * @type {boolean}\n * @default false\n */\n horizontal: false,\n /**\n * Forces to show the colorpicker as an inline element.\n *\n * Note that if there is no container specified, the inline element\n * will be added to the body, so you may want to set the container option.\n *\n * @type {boolean}\n * @default false\n */\n inline: false,\n /**\n * Container where the colorpicker is appended to in the DOM.\n *\n * If is a string (CSS selector), the colorpicker will be placed inside this container.\n * If true, the `.colorpicker-element` element itself will be used as the container.\n * If false, the document body is used as the container, unless it is a popover (in this case it is appended to the\n * popover body instead).\n *\n * @type {String|boolean}\n * @default false\n */\n container: false,\n /**\n * Bootstrap Popover options.\n * The trigger, content and html options are always ignored.\n *\n * @type {boolean}\n * @default Object\n */\n popover: {\n animation: true,\n placement: 'bottom',\n fallbackPlacement: 'flip'\n },\n /**\n * If true, loads the 'debugger' extension automatically, which logs the events in the console\n * @type {boolean}\n * @default false\n */\n debug: false,\n /**\n * Child CSS selector for the colorpicker input.\n *\n * @type {String}\n * @default 'input'\n */\n input: 'input',\n /**\n * Child CSS selector for the colorpicker addon.\n * If it exists, the child element background will be changed on color change.\n *\n * @type {String}\n * @default '.colorpicker-trigger, .colorpicker-input-addon'\n */\n addon: '.colorpicker-input-addon',\n /**\n * If true, the input content will be replaced always with a valid color,\n * if false, the invalid color will be left in the input,\n * while the internal color object will still resolve into a valid one.\n *\n * @type {boolean}\n * @default true\n */\n autoInputFallback: true,\n /**\n * If true a hash will be prepended to hexadecimal colors.\n * If false, the hash will be removed.\n * This only affects the input values in hexadecimal format.\n *\n * @type {boolean}\n * @default true\n */\n useHashPrefix: true,\n /**\n * If true, the alpha channel bar will be displayed no matter what.\n *\n * If false, it will be always hidden and alpha channel will be disabled also programmatically, meaning that\n * the selected or typed color will be always opaque.\n *\n * If null, the alpha channel will be automatically disabled/enabled depending if the initial color format supports\n * alpha or not.\n *\n * @type {boolean}\n * @default true\n */\n useAlpha: true,\n /**\n * Colorpicker widget template\n * @type {String}\n * @example\n * \n *
\n *
\n *
\n *
\n *
\n * \n *
\n *
\n */\n template: `
\n
\n
\n
\n
\n \n
\n
`,\n /**\n *\n * Associative object with the extension class name and its config.\n * Colorpicker comes with many bundled extensions: debugger, palette, preview and swatches (a superset of palette).\n *\n * @type {Object[]}\n * @example\n * extensions: [\n * {\n * name: 'swatches'\n * options: {\n * colors: {\n * 'primary': '#337ab7',\n * 'success': '#5cb85c',\n * 'info': '#5bc0de',\n * 'warning': '#f0ad4e',\n * 'danger': '#d9534f'\n * },\n * namesAsValues: true\n * }\n * }\n * ]\n */\n extensions: [\n {\n name: 'preview',\n options: {\n showText: true\n }\n }\n ],\n /**\n * Vertical sliders configuration\n * @type {Object}\n */\n sliders: {\n saturation: {\n selector: '.colorpicker-saturation',\n maxLeft: sliderSize,\n maxTop: sliderSize,\n callLeft: 'setSaturationRatio',\n callTop: 'setValueRatio'\n },\n hue: {\n selector: '.colorpicker-hue',\n maxLeft: 0,\n maxTop: sliderSize,\n callLeft: false,\n callTop: 'setHueRatio'\n },\n alpha: {\n selector: '.colorpicker-alpha',\n childSelector: '.colorpicker-alpha-color',\n maxLeft: 0,\n maxTop: sliderSize,\n callLeft: false,\n callTop: 'setAlphaRatio'\n }\n },\n /**\n * Horizontal sliders configuration\n * @type {Object}\n */\n slidersHorz: {\n saturation: {\n selector: '.colorpicker-saturation',\n maxLeft: sliderSize,\n maxTop: sliderSize,\n callLeft: 'setSaturationRatio',\n callTop: 'setValueRatio'\n },\n hue: {\n selector: '.colorpicker-hue',\n maxLeft: sliderSize,\n maxTop: 0,\n callLeft: 'setHueRatio',\n callTop: false\n },\n alpha: {\n selector: '.colorpicker-alpha',\n childSelector: '.colorpicker-alpha-color',\n maxLeft: sliderSize,\n maxTop: 0,\n callLeft: 'setAlphaRatio',\n callTop: false\n }\n }\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/js/options.js","'use strict';\n\nimport Extension from 'Extension';\nimport $ from 'jquery';\n\nlet defaults = {\n /**\n * Key-value pairs defining a color alias and its CSS color representation.\n *\n * They can also be just an array of values. In that case, no special names are used, only the real colors.\n *\n * @type {Object|Array}\n * @default null\n * @example\n * {\n * 'black': '#000000',\n * 'white': '#ffffff',\n * 'red': '#FF0000',\n * 'default': '#777777',\n * 'primary': '#337ab7',\n * 'success': '#5cb85c',\n * 'info': '#5bc0de',\n * 'warning': '#f0ad4e',\n * 'danger': '#d9534f'\n * }\n *\n * @example ['#f0ad4e', '#337ab7', '#5cb85c']\n */\n colors: null,\n /**\n * If true, when a color swatch is selected the name (alias) will be used as input value,\n * otherwise the swatch real color value will be used.\n *\n * @type {boolean}\n * @default true\n */\n namesAsValues: true\n};\n\n/**\n * Palette extension\n * @ignore\n */\nclass Palette extends Extension {\n\n /**\n * @returns {Object|Array}\n */\n get colors() {\n return this.options.colors;\n }\n\n constructor(colorpicker, options = {}) {\n super(colorpicker, $.extend(true, {}, defaults, options));\n\n if ((!Array.isArray(this.options.colors)) && (typeof this.options.colors !== 'object')) {\n this.options.colors = null;\n }\n }\n\n /**\n * @returns {int}\n */\n getLength() {\n if (!this.options.colors) {\n return 0;\n }\n\n if (Array.isArray(this.options.colors)) {\n return this.options.colors.length;\n }\n\n if (typeof this.options.colors === 'object') {\n return Object.keys(this.options.colors).length;\n }\n\n return 0;\n }\n\n resolveColor(color, realColor = true) {\n if (this.getLength() <= 0) {\n return false;\n }\n\n // Array of colors\n if (Array.isArray(this.options.colors)) {\n if (this.options.colors.indexOf(color) >= 0) {\n return color;\n }\n if (this.options.colors.indexOf(color.toUpperCase()) >= 0) {\n return color.toUpperCase();\n }\n if (this.options.colors.indexOf(color.toLowerCase()) >= 0) {\n return color.toLowerCase();\n }\n return false;\n }\n\n if (typeof this.options.colors !== 'object') {\n return false;\n }\n\n // Map of objects\n if (!this.options.namesAsValues || realColor) {\n return this.getValue(color, false);\n }\n return this.getName(color, this.getName('#' + color));\n }\n\n /**\n * Given a color value, returns the corresponding color name or defaultValue.\n *\n * @param {String} value\n * @param {*} defaultValue\n * @returns {*}\n */\n getName(value, defaultValue = false) {\n if (!(typeof value === 'string') || !this.options.colors) {\n return defaultValue;\n }\n for (let name in this.options.colors) {\n if (!this.options.colors.hasOwnProperty(name)) {\n continue;\n }\n if (this.options.colors[name].toLowerCase() === value.toLowerCase()) {\n return name;\n }\n }\n return defaultValue;\n }\n\n /**\n * Given a color name, returns the corresponding color value or defaultValue.\n *\n * @param {String} name\n * @param {*} defaultValue\n * @returns {*}\n */\n getValue(name, defaultValue = false) {\n if (!(typeof name === 'string') || !this.options.colors) {\n return defaultValue;\n }\n if (this.options.colors.hasOwnProperty(name)) {\n return this.options.colors[name];\n }\n return defaultValue;\n }\n}\n\nexport default Palette;\n\n\n\n// WEBPACK FOOTER //\n// ./src/js/extensions/Palette.js","'use strict'\r\n\r\nmodule.exports = {\r\n\t\"aliceblue\": [240, 248, 255],\r\n\t\"antiquewhite\": [250, 235, 215],\r\n\t\"aqua\": [0, 255, 255],\r\n\t\"aquamarine\": [127, 255, 212],\r\n\t\"azure\": [240, 255, 255],\r\n\t\"beige\": [245, 245, 220],\r\n\t\"bisque\": [255, 228, 196],\r\n\t\"black\": [0, 0, 0],\r\n\t\"blanchedalmond\": [255, 235, 205],\r\n\t\"blue\": [0, 0, 255],\r\n\t\"blueviolet\": [138, 43, 226],\r\n\t\"brown\": [165, 42, 42],\r\n\t\"burlywood\": [222, 184, 135],\r\n\t\"cadetblue\": [95, 158, 160],\r\n\t\"chartreuse\": [127, 255, 0],\r\n\t\"chocolate\": [210, 105, 30],\r\n\t\"coral\": [255, 127, 80],\r\n\t\"cornflowerblue\": [100, 149, 237],\r\n\t\"cornsilk\": [255, 248, 220],\r\n\t\"crimson\": [220, 20, 60],\r\n\t\"cyan\": [0, 255, 255],\r\n\t\"darkblue\": [0, 0, 139],\r\n\t\"darkcyan\": [0, 139, 139],\r\n\t\"darkgoldenrod\": [184, 134, 11],\r\n\t\"darkgray\": [169, 169, 169],\r\n\t\"darkgreen\": [0, 100, 0],\r\n\t\"darkgrey\": [169, 169, 169],\r\n\t\"darkkhaki\": [189, 183, 107],\r\n\t\"darkmagenta\": [139, 0, 139],\r\n\t\"darkolivegreen\": [85, 107, 47],\r\n\t\"darkorange\": [255, 140, 0],\r\n\t\"darkorchid\": [153, 50, 204],\r\n\t\"darkred\": [139, 0, 0],\r\n\t\"darksalmon\": [233, 150, 122],\r\n\t\"darkseagreen\": [143, 188, 143],\r\n\t\"darkslateblue\": [72, 61, 139],\r\n\t\"darkslategray\": [47, 79, 79],\r\n\t\"darkslategrey\": [47, 79, 79],\r\n\t\"darkturquoise\": [0, 206, 209],\r\n\t\"darkviolet\": [148, 0, 211],\r\n\t\"deeppink\": [255, 20, 147],\r\n\t\"deepskyblue\": [0, 191, 255],\r\n\t\"dimgray\": [105, 105, 105],\r\n\t\"dimgrey\": [105, 105, 105],\r\n\t\"dodgerblue\": [30, 144, 255],\r\n\t\"firebrick\": [178, 34, 34],\r\n\t\"floralwhite\": [255, 250, 240],\r\n\t\"forestgreen\": [34, 139, 34],\r\n\t\"fuchsia\": [255, 0, 255],\r\n\t\"gainsboro\": [220, 220, 220],\r\n\t\"ghostwhite\": [248, 248, 255],\r\n\t\"gold\": [255, 215, 0],\r\n\t\"goldenrod\": [218, 165, 32],\r\n\t\"gray\": [128, 128, 128],\r\n\t\"green\": [0, 128, 0],\r\n\t\"greenyellow\": [173, 255, 47],\r\n\t\"grey\": [128, 128, 128],\r\n\t\"honeydew\": [240, 255, 240],\r\n\t\"hotpink\": [255, 105, 180],\r\n\t\"indianred\": [205, 92, 92],\r\n\t\"indigo\": [75, 0, 130],\r\n\t\"ivory\": [255, 255, 240],\r\n\t\"khaki\": [240, 230, 140],\r\n\t\"lavender\": [230, 230, 250],\r\n\t\"lavenderblush\": [255, 240, 245],\r\n\t\"lawngreen\": [124, 252, 0],\r\n\t\"lemonchiffon\": [255, 250, 205],\r\n\t\"lightblue\": [173, 216, 230],\r\n\t\"lightcoral\": [240, 128, 128],\r\n\t\"lightcyan\": [224, 255, 255],\r\n\t\"lightgoldenrodyellow\": [250, 250, 210],\r\n\t\"lightgray\": [211, 211, 211],\r\n\t\"lightgreen\": [144, 238, 144],\r\n\t\"lightgrey\": [211, 211, 211],\r\n\t\"lightpink\": [255, 182, 193],\r\n\t\"lightsalmon\": [255, 160, 122],\r\n\t\"lightseagreen\": [32, 178, 170],\r\n\t\"lightskyblue\": [135, 206, 250],\r\n\t\"lightslategray\": [119, 136, 153],\r\n\t\"lightslategrey\": [119, 136, 153],\r\n\t\"lightsteelblue\": [176, 196, 222],\r\n\t\"lightyellow\": [255, 255, 224],\r\n\t\"lime\": [0, 255, 0],\r\n\t\"limegreen\": [50, 205, 50],\r\n\t\"linen\": [250, 240, 230],\r\n\t\"magenta\": [255, 0, 255],\r\n\t\"maroon\": [128, 0, 0],\r\n\t\"mediumaquamarine\": [102, 205, 170],\r\n\t\"mediumblue\": [0, 0, 205],\r\n\t\"mediumorchid\": [186, 85, 211],\r\n\t\"mediumpurple\": [147, 112, 219],\r\n\t\"mediumseagreen\": [60, 179, 113],\r\n\t\"mediumslateblue\": [123, 104, 238],\r\n\t\"mediumspringgreen\": [0, 250, 154],\r\n\t\"mediumturquoise\": [72, 209, 204],\r\n\t\"mediumvioletred\": [199, 21, 133],\r\n\t\"midnightblue\": [25, 25, 112],\r\n\t\"mintcream\": [245, 255, 250],\r\n\t\"mistyrose\": [255, 228, 225],\r\n\t\"moccasin\": [255, 228, 181],\r\n\t\"navajowhite\": [255, 222, 173],\r\n\t\"navy\": [0, 0, 128],\r\n\t\"oldlace\": [253, 245, 230],\r\n\t\"olive\": [128, 128, 0],\r\n\t\"olivedrab\": [107, 142, 35],\r\n\t\"orange\": [255, 165, 0],\r\n\t\"orangered\": [255, 69, 0],\r\n\t\"orchid\": [218, 112, 214],\r\n\t\"palegoldenrod\": [238, 232, 170],\r\n\t\"palegreen\": [152, 251, 152],\r\n\t\"paleturquoise\": [175, 238, 238],\r\n\t\"palevioletred\": [219, 112, 147],\r\n\t\"papayawhip\": [255, 239, 213],\r\n\t\"peachpuff\": [255, 218, 185],\r\n\t\"peru\": [205, 133, 63],\r\n\t\"pink\": [255, 192, 203],\r\n\t\"plum\": [221, 160, 221],\r\n\t\"powderblue\": [176, 224, 230],\r\n\t\"purple\": [128, 0, 128],\r\n\t\"rebeccapurple\": [102, 51, 153],\r\n\t\"red\": [255, 0, 0],\r\n\t\"rosybrown\": [188, 143, 143],\r\n\t\"royalblue\": [65, 105, 225],\r\n\t\"saddlebrown\": [139, 69, 19],\r\n\t\"salmon\": [250, 128, 114],\r\n\t\"sandybrown\": [244, 164, 96],\r\n\t\"seagreen\": [46, 139, 87],\r\n\t\"seashell\": [255, 245, 238],\r\n\t\"sienna\": [160, 82, 45],\r\n\t\"silver\": [192, 192, 192],\r\n\t\"skyblue\": [135, 206, 235],\r\n\t\"slateblue\": [106, 90, 205],\r\n\t\"slategray\": [112, 128, 144],\r\n\t\"slategrey\": [112, 128, 144],\r\n\t\"snow\": [255, 250, 250],\r\n\t\"springgreen\": [0, 255, 127],\r\n\t\"steelblue\": [70, 130, 180],\r\n\t\"tan\": [210, 180, 140],\r\n\t\"teal\": [0, 128, 128],\r\n\t\"thistle\": [216, 191, 216],\r\n\t\"tomato\": [255, 99, 71],\r\n\t\"turquoise\": [64, 224, 208],\r\n\t\"violet\": [238, 130, 238],\r\n\t\"wheat\": [245, 222, 179],\r\n\t\"white\": [255, 255, 255],\r\n\t\"whitesmoke\": [245, 245, 245],\r\n\t\"yellow\": [255, 255, 0],\r\n\t\"yellowgreen\": [154, 205, 50]\r\n};\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/color-name/index.js\n// module id = 5\n// module chunks = 0 1","/* MIT license */\nvar cssKeywords = require('color-name');\n\n// NOTE: conversions should only return primitive values (i.e. arrays, or\n// values that give correct `typeof` results).\n// do not use box values types (i.e. Number(), String(), etc.)\n\nvar reverseKeywords = {};\nfor (var key in cssKeywords) {\n\tif (cssKeywords.hasOwnProperty(key)) {\n\t\treverseKeywords[cssKeywords[key]] = key;\n\t}\n}\n\nvar convert = module.exports = {\n\trgb: {channels: 3, labels: 'rgb'},\n\thsl: {channels: 3, labels: 'hsl'},\n\thsv: {channels: 3, labels: 'hsv'},\n\thwb: {channels: 3, labels: 'hwb'},\n\tcmyk: {channels: 4, labels: 'cmyk'},\n\txyz: {channels: 3, labels: 'xyz'},\n\tlab: {channels: 3, labels: 'lab'},\n\tlch: {channels: 3, labels: 'lch'},\n\thex: {channels: 1, labels: ['hex']},\n\tkeyword: {channels: 1, labels: ['keyword']},\n\tansi16: {channels: 1, labels: ['ansi16']},\n\tansi256: {channels: 1, labels: ['ansi256']},\n\thcg: {channels: 3, labels: ['h', 'c', 'g']},\n\tapple: {channels: 3, labels: ['r16', 'g16', 'b16']},\n\tgray: {channels: 1, labels: ['gray']}\n};\n\n// hide .channels and .labels properties\nfor (var model in convert) {\n\tif (convert.hasOwnProperty(model)) {\n\t\tif (!('channels' in convert[model])) {\n\t\t\tthrow new Error('missing channels property: ' + model);\n\t\t}\n\n\t\tif (!('labels' in convert[model])) {\n\t\t\tthrow new Error('missing channel labels property: ' + model);\n\t\t}\n\n\t\tif (convert[model].labels.length !== convert[model].channels) {\n\t\t\tthrow new Error('channel and label counts mismatch: ' + model);\n\t\t}\n\n\t\tvar channels = convert[model].channels;\n\t\tvar labels = convert[model].labels;\n\t\tdelete convert[model].channels;\n\t\tdelete convert[model].labels;\n\t\tObject.defineProperty(convert[model], 'channels', {value: channels});\n\t\tObject.defineProperty(convert[model], 'labels', {value: labels});\n\t}\n}\n\nconvert.rgb.hsl = function (rgb) {\n\tvar r = rgb[0] / 255;\n\tvar g = rgb[1] / 255;\n\tvar b = rgb[2] / 255;\n\tvar min = Math.min(r, g, b);\n\tvar max = Math.max(r, g, b);\n\tvar delta = max - min;\n\tvar h;\n\tvar s;\n\tvar l;\n\n\tif (max === min) {\n\t\th = 0;\n\t} else if (r === max) {\n\t\th = (g - b) / delta;\n\t} else if (g === max) {\n\t\th = 2 + (b - r) / delta;\n\t} else if (b === max) {\n\t\th = 4 + (r - g) / delta;\n\t}\n\n\th = Math.min(h * 60, 360);\n\n\tif (h < 0) {\n\t\th += 360;\n\t}\n\n\tl = (min + max) / 2;\n\n\tif (max === min) {\n\t\ts = 0;\n\t} else if (l <= 0.5) {\n\t\ts = delta / (max + min);\n\t} else {\n\t\ts = delta / (2 - max - min);\n\t}\n\n\treturn [h, s * 100, l * 100];\n};\n\nconvert.rgb.hsv = function (rgb) {\n\tvar rdif;\n\tvar gdif;\n\tvar bdif;\n\tvar h;\n\tvar s;\n\n\tvar r = rgb[0] / 255;\n\tvar g = rgb[1] / 255;\n\tvar b = rgb[2] / 255;\n\tvar v = Math.max(r, g, b);\n\tvar diff = v - Math.min(r, g, b);\n\tvar diffc = function (c) {\n\t\treturn (v - c) / 6 / diff + 1 / 2;\n\t};\n\n\tif (diff === 0) {\n\t\th = s = 0;\n\t} else {\n\t\ts = diff / v;\n\t\trdif = diffc(r);\n\t\tgdif = diffc(g);\n\t\tbdif = diffc(b);\n\n\t\tif (r === v) {\n\t\t\th = bdif - gdif;\n\t\t} else if (g === v) {\n\t\t\th = (1 / 3) + rdif - bdif;\n\t\t} else if (b === v) {\n\t\t\th = (2 / 3) + gdif - rdif;\n\t\t}\n\t\tif (h < 0) {\n\t\t\th += 1;\n\t\t} else if (h > 1) {\n\t\t\th -= 1;\n\t\t}\n\t}\n\n\treturn [\n\t\th * 360,\n\t\ts * 100,\n\t\tv * 100\n\t];\n};\n\nconvert.rgb.hwb = function (rgb) {\n\tvar r = rgb[0];\n\tvar g = rgb[1];\n\tvar b = rgb[2];\n\tvar h = convert.rgb.hsl(rgb)[0];\n\tvar w = 1 / 255 * Math.min(r, Math.min(g, b));\n\n\tb = 1 - 1 / 255 * Math.max(r, Math.max(g, b));\n\n\treturn [h, w * 100, b * 100];\n};\n\nconvert.rgb.cmyk = function (rgb) {\n\tvar r = rgb[0] / 255;\n\tvar g = rgb[1] / 255;\n\tvar b = rgb[2] / 255;\n\tvar c;\n\tvar m;\n\tvar y;\n\tvar k;\n\n\tk = Math.min(1 - r, 1 - g, 1 - b);\n\tc = (1 - r - k) / (1 - k) || 0;\n\tm = (1 - g - k) / (1 - k) || 0;\n\ty = (1 - b - k) / (1 - k) || 0;\n\n\treturn [c * 100, m * 100, y * 100, k * 100];\n};\n\n/**\n * See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance\n * */\nfunction comparativeDistance(x, y) {\n\treturn (\n\t\tMath.pow(x[0] - y[0], 2) +\n\t\tMath.pow(x[1] - y[1], 2) +\n\t\tMath.pow(x[2] - y[2], 2)\n\t);\n}\n\nconvert.rgb.keyword = function (rgb) {\n\tvar reversed = reverseKeywords[rgb];\n\tif (reversed) {\n\t\treturn reversed;\n\t}\n\n\tvar currentClosestDistance = Infinity;\n\tvar currentClosestKeyword;\n\n\tfor (var keyword in cssKeywords) {\n\t\tif (cssKeywords.hasOwnProperty(keyword)) {\n\t\t\tvar value = cssKeywords[keyword];\n\n\t\t\t// Compute comparative distance\n\t\t\tvar distance = comparativeDistance(rgb, value);\n\n\t\t\t// Check if its less, if so set as closest\n\t\t\tif (distance < currentClosestDistance) {\n\t\t\t\tcurrentClosestDistance = distance;\n\t\t\t\tcurrentClosestKeyword = keyword;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn currentClosestKeyword;\n};\n\nconvert.keyword.rgb = function (keyword) {\n\treturn cssKeywords[keyword];\n};\n\nconvert.rgb.xyz = function (rgb) {\n\tvar r = rgb[0] / 255;\n\tvar g = rgb[1] / 255;\n\tvar b = rgb[2] / 255;\n\n\t// assume sRGB\n\tr = r > 0.04045 ? Math.pow(((r + 0.055) / 1.055), 2.4) : (r / 12.92);\n\tg = g > 0.04045 ? Math.pow(((g + 0.055) / 1.055), 2.4) : (g / 12.92);\n\tb = b > 0.04045 ? Math.pow(((b + 0.055) / 1.055), 2.4) : (b / 12.92);\n\n\tvar x = (r * 0.4124) + (g * 0.3576) + (b * 0.1805);\n\tvar y = (r * 0.2126) + (g * 0.7152) + (b * 0.0722);\n\tvar z = (r * 0.0193) + (g * 0.1192) + (b * 0.9505);\n\n\treturn [x * 100, y * 100, z * 100];\n};\n\nconvert.rgb.lab = function (rgb) {\n\tvar xyz = convert.rgb.xyz(rgb);\n\tvar x = xyz[0];\n\tvar y = xyz[1];\n\tvar z = xyz[2];\n\tvar l;\n\tvar a;\n\tvar b;\n\n\tx /= 95.047;\n\ty /= 100;\n\tz /= 108.883;\n\n\tx = x > 0.008856 ? Math.pow(x, 1 / 3) : (7.787 * x) + (16 / 116);\n\ty = y > 0.008856 ? Math.pow(y, 1 / 3) : (7.787 * y) + (16 / 116);\n\tz = z > 0.008856 ? Math.pow(z, 1 / 3) : (7.787 * z) + (16 / 116);\n\n\tl = (116 * y) - 16;\n\ta = 500 * (x - y);\n\tb = 200 * (y - z);\n\n\treturn [l, a, b];\n};\n\nconvert.hsl.rgb = function (hsl) {\n\tvar h = hsl[0] / 360;\n\tvar s = hsl[1] / 100;\n\tvar l = hsl[2] / 100;\n\tvar t1;\n\tvar t2;\n\tvar t3;\n\tvar rgb;\n\tvar val;\n\n\tif (s === 0) {\n\t\tval = l * 255;\n\t\treturn [val, val, val];\n\t}\n\n\tif (l < 0.5) {\n\t\tt2 = l * (1 + s);\n\t} else {\n\t\tt2 = l + s - l * s;\n\t}\n\n\tt1 = 2 * l - t2;\n\n\trgb = [0, 0, 0];\n\tfor (var i = 0; i < 3; i++) {\n\t\tt3 = h + 1 / 3 * -(i - 1);\n\t\tif (t3 < 0) {\n\t\t\tt3++;\n\t\t}\n\t\tif (t3 > 1) {\n\t\t\tt3--;\n\t\t}\n\n\t\tif (6 * t3 < 1) {\n\t\t\tval = t1 + (t2 - t1) * 6 * t3;\n\t\t} else if (2 * t3 < 1) {\n\t\t\tval = t2;\n\t\t} else if (3 * t3 < 2) {\n\t\t\tval = t1 + (t2 - t1) * (2 / 3 - t3) * 6;\n\t\t} else {\n\t\t\tval = t1;\n\t\t}\n\n\t\trgb[i] = val * 255;\n\t}\n\n\treturn rgb;\n};\n\nconvert.hsl.hsv = function (hsl) {\n\tvar h = hsl[0];\n\tvar s = hsl[1] / 100;\n\tvar l = hsl[2] / 100;\n\tvar smin = s;\n\tvar lmin = Math.max(l, 0.01);\n\tvar sv;\n\tvar v;\n\n\tl *= 2;\n\ts *= (l <= 1) ? l : 2 - l;\n\tsmin *= lmin <= 1 ? lmin : 2 - lmin;\n\tv = (l + s) / 2;\n\tsv = l === 0 ? (2 * smin) / (lmin + smin) : (2 * s) / (l + s);\n\n\treturn [h, sv * 100, v * 100];\n};\n\nconvert.hsv.rgb = function (hsv) {\n\tvar h = hsv[0] / 60;\n\tvar s = hsv[1] / 100;\n\tvar v = hsv[2] / 100;\n\tvar hi = Math.floor(h) % 6;\n\n\tvar f = h - Math.floor(h);\n\tvar p = 255 * v * (1 - s);\n\tvar q = 255 * v * (1 - (s * f));\n\tvar t = 255 * v * (1 - (s * (1 - f)));\n\tv *= 255;\n\n\tswitch (hi) {\n\t\tcase 0:\n\t\t\treturn [v, t, p];\n\t\tcase 1:\n\t\t\treturn [q, v, p];\n\t\tcase 2:\n\t\t\treturn [p, v, t];\n\t\tcase 3:\n\t\t\treturn [p, q, v];\n\t\tcase 4:\n\t\t\treturn [t, p, v];\n\t\tcase 5:\n\t\t\treturn [v, p, q];\n\t}\n};\n\nconvert.hsv.hsl = function (hsv) {\n\tvar h = hsv[0];\n\tvar s = hsv[1] / 100;\n\tvar v = hsv[2] / 100;\n\tvar vmin = Math.max(v, 0.01);\n\tvar lmin;\n\tvar sl;\n\tvar l;\n\n\tl = (2 - s) * v;\n\tlmin = (2 - s) * vmin;\n\tsl = s * vmin;\n\tsl /= (lmin <= 1) ? lmin : 2 - lmin;\n\tsl = sl || 0;\n\tl /= 2;\n\n\treturn [h, sl * 100, l * 100];\n};\n\n// http://dev.w3.org/csswg/css-color/#hwb-to-rgb\nconvert.hwb.rgb = function (hwb) {\n\tvar h = hwb[0] / 360;\n\tvar wh = hwb[1] / 100;\n\tvar bl = hwb[2] / 100;\n\tvar ratio = wh + bl;\n\tvar i;\n\tvar v;\n\tvar f;\n\tvar n;\n\n\t// wh + bl cant be > 1\n\tif (ratio > 1) {\n\t\twh /= ratio;\n\t\tbl /= ratio;\n\t}\n\n\ti = Math.floor(6 * h);\n\tv = 1 - bl;\n\tf = 6 * h - i;\n\n\tif ((i & 0x01) !== 0) {\n\t\tf = 1 - f;\n\t}\n\n\tn = wh + f * (v - wh); // linear interpolation\n\n\tvar r;\n\tvar g;\n\tvar b;\n\tswitch (i) {\n\t\tdefault:\n\t\tcase 6:\n\t\tcase 0: r = v; g = n; b = wh; break;\n\t\tcase 1: r = n; g = v; b = wh; break;\n\t\tcase 2: r = wh; g = v; b = n; break;\n\t\tcase 3: r = wh; g = n; b = v; break;\n\t\tcase 4: r = n; g = wh; b = v; break;\n\t\tcase 5: r = v; g = wh; b = n; break;\n\t}\n\n\treturn [r * 255, g * 255, b * 255];\n};\n\nconvert.cmyk.rgb = function (cmyk) {\n\tvar c = cmyk[0] / 100;\n\tvar m = cmyk[1] / 100;\n\tvar y = cmyk[2] / 100;\n\tvar k = cmyk[3] / 100;\n\tvar r;\n\tvar g;\n\tvar b;\n\n\tr = 1 - Math.min(1, c * (1 - k) + k);\n\tg = 1 - Math.min(1, m * (1 - k) + k);\n\tb = 1 - Math.min(1, y * (1 - k) + k);\n\n\treturn [r * 255, g * 255, b * 255];\n};\n\nconvert.xyz.rgb = function (xyz) {\n\tvar x = xyz[0] / 100;\n\tvar y = xyz[1] / 100;\n\tvar z = xyz[2] / 100;\n\tvar r;\n\tvar g;\n\tvar b;\n\n\tr = (x * 3.2406) + (y * -1.5372) + (z * -0.4986);\n\tg = (x * -0.9689) + (y * 1.8758) + (z * 0.0415);\n\tb = (x * 0.0557) + (y * -0.2040) + (z * 1.0570);\n\n\t// assume sRGB\n\tr = r > 0.0031308\n\t\t? ((1.055 * Math.pow(r, 1.0 / 2.4)) - 0.055)\n\t\t: r * 12.92;\n\n\tg = g > 0.0031308\n\t\t? ((1.055 * Math.pow(g, 1.0 / 2.4)) - 0.055)\n\t\t: g * 12.92;\n\n\tb = b > 0.0031308\n\t\t? ((1.055 * Math.pow(b, 1.0 / 2.4)) - 0.055)\n\t\t: b * 12.92;\n\n\tr = Math.min(Math.max(0, r), 1);\n\tg = Math.min(Math.max(0, g), 1);\n\tb = Math.min(Math.max(0, b), 1);\n\n\treturn [r * 255, g * 255, b * 255];\n};\n\nconvert.xyz.lab = function (xyz) {\n\tvar x = xyz[0];\n\tvar y = xyz[1];\n\tvar z = xyz[2];\n\tvar l;\n\tvar a;\n\tvar b;\n\n\tx /= 95.047;\n\ty /= 100;\n\tz /= 108.883;\n\n\tx = x > 0.008856 ? Math.pow(x, 1 / 3) : (7.787 * x) + (16 / 116);\n\ty = y > 0.008856 ? Math.pow(y, 1 / 3) : (7.787 * y) + (16 / 116);\n\tz = z > 0.008856 ? Math.pow(z, 1 / 3) : (7.787 * z) + (16 / 116);\n\n\tl = (116 * y) - 16;\n\ta = 500 * (x - y);\n\tb = 200 * (y - z);\n\n\treturn [l, a, b];\n};\n\nconvert.lab.xyz = function (lab) {\n\tvar l = lab[0];\n\tvar a = lab[1];\n\tvar b = lab[2];\n\tvar x;\n\tvar y;\n\tvar z;\n\n\ty = (l + 16) / 116;\n\tx = a / 500 + y;\n\tz = y - b / 200;\n\n\tvar y2 = Math.pow(y, 3);\n\tvar x2 = Math.pow(x, 3);\n\tvar z2 = Math.pow(z, 3);\n\ty = y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787;\n\tx = x2 > 0.008856 ? x2 : (x - 16 / 116) / 7.787;\n\tz = z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787;\n\n\tx *= 95.047;\n\ty *= 100;\n\tz *= 108.883;\n\n\treturn [x, y, z];\n};\n\nconvert.lab.lch = function (lab) {\n\tvar l = lab[0];\n\tvar a = lab[1];\n\tvar b = lab[2];\n\tvar hr;\n\tvar h;\n\tvar c;\n\n\thr = Math.atan2(b, a);\n\th = hr * 360 / 2 / Math.PI;\n\n\tif (h < 0) {\n\t\th += 360;\n\t}\n\n\tc = Math.sqrt(a * a + b * b);\n\n\treturn [l, c, h];\n};\n\nconvert.lch.lab = function (lch) {\n\tvar l = lch[0];\n\tvar c = lch[1];\n\tvar h = lch[2];\n\tvar a;\n\tvar b;\n\tvar hr;\n\n\thr = h / 360 * 2 * Math.PI;\n\ta = c * Math.cos(hr);\n\tb = c * Math.sin(hr);\n\n\treturn [l, a, b];\n};\n\nconvert.rgb.ansi16 = function (args) {\n\tvar r = args[0];\n\tvar g = args[1];\n\tvar b = args[2];\n\tvar value = 1 in arguments ? arguments[1] : convert.rgb.hsv(args)[2]; // hsv -> ansi16 optimization\n\n\tvalue = Math.round(value / 50);\n\n\tif (value === 0) {\n\t\treturn 30;\n\t}\n\n\tvar ansi = 30\n\t\t+ ((Math.round(b / 255) << 2)\n\t\t| (Math.round(g / 255) << 1)\n\t\t| Math.round(r / 255));\n\n\tif (value === 2) {\n\t\tansi += 60;\n\t}\n\n\treturn ansi;\n};\n\nconvert.hsv.ansi16 = function (args) {\n\t// optimization here; we already know the value and don't need to get\n\t// it converted for us.\n\treturn convert.rgb.ansi16(convert.hsv.rgb(args), args[2]);\n};\n\nconvert.rgb.ansi256 = function (args) {\n\tvar r = args[0];\n\tvar g = args[1];\n\tvar b = args[2];\n\n\t// we use the extended greyscale palette here, with the exception of\n\t// black and white. normal palette only has 4 greyscale shades.\n\tif (r === g && g === b) {\n\t\tif (r < 8) {\n\t\t\treturn 16;\n\t\t}\n\n\t\tif (r > 248) {\n\t\t\treturn 231;\n\t\t}\n\n\t\treturn Math.round(((r - 8) / 247) * 24) + 232;\n\t}\n\n\tvar ansi = 16\n\t\t+ (36 * Math.round(r / 255 * 5))\n\t\t+ (6 * Math.round(g / 255 * 5))\n\t\t+ Math.round(b / 255 * 5);\n\n\treturn ansi;\n};\n\nconvert.ansi16.rgb = function (args) {\n\tvar color = args % 10;\n\n\t// handle greyscale\n\tif (color === 0 || color === 7) {\n\t\tif (args > 50) {\n\t\t\tcolor += 3.5;\n\t\t}\n\n\t\tcolor = color / 10.5 * 255;\n\n\t\treturn [color, color, color];\n\t}\n\n\tvar mult = (~~(args > 50) + 1) * 0.5;\n\tvar r = ((color & 1) * mult) * 255;\n\tvar g = (((color >> 1) & 1) * mult) * 255;\n\tvar b = (((color >> 2) & 1) * mult) * 255;\n\n\treturn [r, g, b];\n};\n\nconvert.ansi256.rgb = function (args) {\n\t// handle greyscale\n\tif (args >= 232) {\n\t\tvar c = (args - 232) * 10 + 8;\n\t\treturn [c, c, c];\n\t}\n\n\targs -= 16;\n\n\tvar rem;\n\tvar r = Math.floor(args / 36) / 5 * 255;\n\tvar g = Math.floor((rem = args % 36) / 6) / 5 * 255;\n\tvar b = (rem % 6) / 5 * 255;\n\n\treturn [r, g, b];\n};\n\nconvert.rgb.hex = function (args) {\n\tvar integer = ((Math.round(args[0]) & 0xFF) << 16)\n\t\t+ ((Math.round(args[1]) & 0xFF) << 8)\n\t\t+ (Math.round(args[2]) & 0xFF);\n\n\tvar string = integer.toString(16).toUpperCase();\n\treturn '000000'.substring(string.length) + string;\n};\n\nconvert.hex.rgb = function (args) {\n\tvar match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);\n\tif (!match) {\n\t\treturn [0, 0, 0];\n\t}\n\n\tvar colorString = match[0];\n\n\tif (match[0].length === 3) {\n\t\tcolorString = colorString.split('').map(function (char) {\n\t\t\treturn char + char;\n\t\t}).join('');\n\t}\n\n\tvar integer = parseInt(colorString, 16);\n\tvar r = (integer >> 16) & 0xFF;\n\tvar g = (integer >> 8) & 0xFF;\n\tvar b = integer & 0xFF;\n\n\treturn [r, g, b];\n};\n\nconvert.rgb.hcg = function (rgb) {\n\tvar r = rgb[0] / 255;\n\tvar g = rgb[1] / 255;\n\tvar b = rgb[2] / 255;\n\tvar max = Math.max(Math.max(r, g), b);\n\tvar min = Math.min(Math.min(r, g), b);\n\tvar chroma = (max - min);\n\tvar grayscale;\n\tvar hue;\n\n\tif (chroma < 1) {\n\t\tgrayscale = min / (1 - chroma);\n\t} else {\n\t\tgrayscale = 0;\n\t}\n\n\tif (chroma <= 0) {\n\t\thue = 0;\n\t} else\n\tif (max === r) {\n\t\thue = ((g - b) / chroma) % 6;\n\t} else\n\tif (max === g) {\n\t\thue = 2 + (b - r) / chroma;\n\t} else {\n\t\thue = 4 + (r - g) / chroma + 4;\n\t}\n\n\thue /= 6;\n\thue %= 1;\n\n\treturn [hue * 360, chroma * 100, grayscale * 100];\n};\n\nconvert.hsl.hcg = function (hsl) {\n\tvar s = hsl[1] / 100;\n\tvar l = hsl[2] / 100;\n\tvar c = 1;\n\tvar f = 0;\n\n\tif (l < 0.5) {\n\t\tc = 2.0 * s * l;\n\t} else {\n\t\tc = 2.0 * s * (1.0 - l);\n\t}\n\n\tif (c < 1.0) {\n\t\tf = (l - 0.5 * c) / (1.0 - c);\n\t}\n\n\treturn [hsl[0], c * 100, f * 100];\n};\n\nconvert.hsv.hcg = function (hsv) {\n\tvar s = hsv[1] / 100;\n\tvar v = hsv[2] / 100;\n\n\tvar c = s * v;\n\tvar f = 0;\n\n\tif (c < 1.0) {\n\t\tf = (v - c) / (1 - c);\n\t}\n\n\treturn [hsv[0], c * 100, f * 100];\n};\n\nconvert.hcg.rgb = function (hcg) {\n\tvar h = hcg[0] / 360;\n\tvar c = hcg[1] / 100;\n\tvar g = hcg[2] / 100;\n\n\tif (c === 0.0) {\n\t\treturn [g * 255, g * 255, g * 255];\n\t}\n\n\tvar pure = [0, 0, 0];\n\tvar hi = (h % 1) * 6;\n\tvar v = hi % 1;\n\tvar w = 1 - v;\n\tvar mg = 0;\n\n\tswitch (Math.floor(hi)) {\n\t\tcase 0:\n\t\t\tpure[0] = 1; pure[1] = v; pure[2] = 0; break;\n\t\tcase 1:\n\t\t\tpure[0] = w; pure[1] = 1; pure[2] = 0; break;\n\t\tcase 2:\n\t\t\tpure[0] = 0; pure[1] = 1; pure[2] = v; break;\n\t\tcase 3:\n\t\t\tpure[0] = 0; pure[1] = w; pure[2] = 1; break;\n\t\tcase 4:\n\t\t\tpure[0] = v; pure[1] = 0; pure[2] = 1; break;\n\t\tdefault:\n\t\t\tpure[0] = 1; pure[1] = 0; pure[2] = w;\n\t}\n\n\tmg = (1.0 - c) * g;\n\n\treturn [\n\t\t(c * pure[0] + mg) * 255,\n\t\t(c * pure[1] + mg) * 255,\n\t\t(c * pure[2] + mg) * 255\n\t];\n};\n\nconvert.hcg.hsv = function (hcg) {\n\tvar c = hcg[1] / 100;\n\tvar g = hcg[2] / 100;\n\n\tvar v = c + g * (1.0 - c);\n\tvar f = 0;\n\n\tif (v > 0.0) {\n\t\tf = c / v;\n\t}\n\n\treturn [hcg[0], f * 100, v * 100];\n};\n\nconvert.hcg.hsl = function (hcg) {\n\tvar c = hcg[1] / 100;\n\tvar g = hcg[2] / 100;\n\n\tvar l = g * (1.0 - c) + 0.5 * c;\n\tvar s = 0;\n\n\tif (l > 0.0 && l < 0.5) {\n\t\ts = c / (2 * l);\n\t} else\n\tif (l >= 0.5 && l < 1.0) {\n\t\ts = c / (2 * (1 - l));\n\t}\n\n\treturn [hcg[0], s * 100, l * 100];\n};\n\nconvert.hcg.hwb = function (hcg) {\n\tvar c = hcg[1] / 100;\n\tvar g = hcg[2] / 100;\n\tvar v = c + g * (1.0 - c);\n\treturn [hcg[0], (v - c) * 100, (1 - v) * 100];\n};\n\nconvert.hwb.hcg = function (hwb) {\n\tvar w = hwb[1] / 100;\n\tvar b = hwb[2] / 100;\n\tvar v = 1 - b;\n\tvar c = v - w;\n\tvar g = 0;\n\n\tif (c < 1) {\n\t\tg = (v - c) / (1 - c);\n\t}\n\n\treturn [hwb[0], c * 100, g * 100];\n};\n\nconvert.apple.rgb = function (apple) {\n\treturn [(apple[0] / 65535) * 255, (apple[1] / 65535) * 255, (apple[2] / 65535) * 255];\n};\n\nconvert.rgb.apple = function (rgb) {\n\treturn [(rgb[0] / 255) * 65535, (rgb[1] / 255) * 65535, (rgb[2] / 255) * 65535];\n};\n\nconvert.gray.rgb = function (args) {\n\treturn [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255];\n};\n\nconvert.gray.hsl = convert.gray.hsv = function (args) {\n\treturn [0, 0, args[0]];\n};\n\nconvert.gray.hwb = function (gray) {\n\treturn [0, 100, gray[0]];\n};\n\nconvert.gray.cmyk = function (gray) {\n\treturn [0, 0, 0, gray[0]];\n};\n\nconvert.gray.lab = function (gray) {\n\treturn [gray[0], 0, 0];\n};\n\nconvert.gray.hex = function (gray) {\n\tvar val = Math.round(gray[0] / 100 * 255) & 0xFF;\n\tvar integer = (val << 16) + (val << 8) + val;\n\n\tvar string = integer.toString(16).toUpperCase();\n\treturn '000000'.substring(string.length) + string;\n};\n\nconvert.rgb.gray = function (rgb) {\n\tvar val = (rgb[0] + rgb[1] + rgb[2]) / 3;\n\treturn [val / 255 * 100];\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/color-convert/conversions.js\n// module id = 6\n// module chunks = 0 1","'use strict';\n\nimport Colorpicker from './Colorpicker';\nimport $ from 'jquery';\n\nlet plugin = 'colorpicker';\n\n$[plugin] = Colorpicker;\n\n// Colorpicker jQuery Plugin API\n$.fn[plugin] = function (option) {\n let fnArgs = Array.prototype.slice.call(arguments, 1),\n isSingleElement = (this.length === 1),\n returnValue = null;\n\n let $elements = this.each(function () {\n let $this = $(this),\n inst = $this.data(plugin),\n options = ((typeof option === 'object') ? option : {});\n\n // Create instance if does not exist\n if (!inst) {\n inst = new Colorpicker(this, options);\n $this.data(plugin, inst);\n }\n\n if (!isSingleElement) {\n return;\n }\n\n returnValue = $this;\n\n if (typeof option === 'string') {\n if (option === 'colorpicker') {\n // Return colorpicker instance: e.g. .colorpicker('colorpicker')\n returnValue = inst;\n } else if ($.isFunction(inst[option])) {\n // Return method call return value: e.g. .colorpicker('isEnabled')\n returnValue = inst[option].apply(inst, fnArgs);\n } else {\n // Return property value: e.g. .colorpicker('element')\n returnValue = inst[option];\n }\n }\n });\n\n return isSingleElement ? returnValue : $elements;\n};\n\n$.fn[plugin].constructor = Colorpicker;\n\n\n\n// WEBPACK FOOTER //\n// ./src/js/plugin.js","'use strict';\n\nimport Extension from './Extension';\nimport defaults from './options';\nimport coreExtensions from 'extensions';\nimport $ from 'jquery';\nimport SliderHandler from './SliderHandler';\nimport PopupHandler from './PopupHandler';\nimport InputHandler from './InputHandler';\nimport ColorHandler from './ColorHandler';\nimport PickerHandler from './PickerHandler';\nimport AddonHandler from './AddonHandler';\nimport ColorItem from './ColorItem';\n\nlet colorPickerIdCounter = 0;\nlet root = (typeof self !== 'undefined' ? self : this); // window\n\n/**\n * Colorpicker widget class\n */\nclass Colorpicker {\n /**\n * Color class\n *\n * @static\n * @type {Color}\n */\n static get Color() {\n return ColorItem;\n }\n\n /**\n * Extension class\n *\n * @static\n * @type {Extension}\n */\n static get Extension() {\n return Extension;\n }\n\n /**\n * Internal color object\n *\n * @type {Color|null}\n */\n get color() {\n return this.colorHandler.color;\n }\n\n /**\n * Internal color format\n *\n * @type {String|null}\n */\n get format() {\n return this.colorHandler.format;\n }\n\n /**\n * Getter of the picker element\n *\n * @returns {jQuery|HTMLElement}\n */\n get picker() {\n return this.pickerHandler.picker;\n }\n\n /**\n * @fires Colorpicker#colorpickerCreate\n * @param {Object|String} element\n * @param {Object} options\n * @constructor\n */\n constructor(element, options) {\n colorPickerIdCounter += 1;\n /**\n * The colorpicker instance number\n * @type {number}\n */\n this.id = colorPickerIdCounter;\n\n /**\n * Latest colorpicker event\n *\n * @type {{name: String, e: *}}\n */\n this.lastEvent = {\n alias: null,\n e: null\n };\n\n /**\n * The element that the colorpicker is bound to\n *\n * @type {*|jQuery}\n */\n this.element = $(element)\n .addClass('colorpicker-element')\n .attr('data-colorpicker-id', this.id);\n\n /**\n * @type {defaults}\n */\n this.options = $.extend(true, {}, defaults, options, this.element.data());\n\n /**\n * @type {boolean}\n * @private\n */\n this.disabled = false;\n\n /**\n * Extensions added to this instance\n *\n * @type {Extension[]}\n */\n this.extensions = [];\n\n /**\n * The element where the\n * @type {*|jQuery}\n */\n this.container = (\n this.options.container === true ||\n (this.options.container !== true && this.options.inline === true)\n ) ? this.element : this.options.container;\n\n this.container = (this.container !== false) ? $(this.container) : false;\n\n /**\n * @type {InputHandler}\n */\n this.inputHandler = new InputHandler(this);\n /**\n * @type {ColorHandler}\n */\n this.colorHandler = new ColorHandler(this);\n /**\n * @type {SliderHandler}\n */\n this.sliderHandler = new SliderHandler(this);\n /**\n * @type {PopupHandler}\n */\n this.popupHandler = new PopupHandler(this, root);\n /**\n * @type {PickerHandler}\n */\n this.pickerHandler = new PickerHandler(this);\n /**\n * @type {AddonHandler}\n */\n this.addonHandler = new AddonHandler(this);\n\n this.init();\n\n // Emit a create event\n $($.proxy(function () {\n /**\n * (Colorpicker) When the Colorpicker instance has been created and the DOM is ready.\n *\n * @event Colorpicker#colorpickerCreate\n */\n this.trigger('colorpickerCreate');\n }, this));\n }\n\n /**\n * Initializes the plugin\n * @private\n */\n init() {\n // Init addon\n this.addonHandler.bind();\n\n // Init input\n this.inputHandler.bind();\n\n // Init extensions (before initializing the color)\n this.initExtensions();\n\n // Init color\n this.colorHandler.bind();\n\n // Init picker\n this.pickerHandler.bind();\n\n // Init sliders and popup\n this.sliderHandler.bind();\n this.popupHandler.bind();\n\n // Inject into the DOM (this may make it visible)\n this.pickerHandler.attach();\n\n // Update all components\n this.update();\n\n if (this.inputHandler.isDisabled()) {\n this.disable();\n }\n }\n\n /**\n * Initializes the plugin extensions\n * @private\n */\n initExtensions() {\n if (!Array.isArray(this.options.extensions)) {\n this.options.extensions = [];\n }\n\n if (this.options.debug) {\n this.options.extensions.push({name: 'debugger'});\n }\n\n // Register and instantiate extensions\n this.options.extensions.forEach((ext) => {\n this.registerExtension(Colorpicker.extensions[ext.name.toLowerCase()], ext.options || {});\n });\n }\n\n /**\n * Creates and registers the given extension\n *\n * @param {Extension} ExtensionClass The extension class to instantiate\n * @param {Object} [config] Extension configuration\n * @returns {Extension}\n */\n registerExtension(ExtensionClass, config = {}) {\n let ext = new ExtensionClass(this, config);\n\n this.extensions.push(ext);\n return ext;\n }\n\n /**\n * Destroys the current instance\n *\n * @fires Colorpicker#colorpickerDestroy\n */\n destroy() {\n let color = this.color;\n\n this.sliderHandler.unbind();\n this.inputHandler.unbind();\n this.popupHandler.unbind();\n this.colorHandler.unbind();\n this.addonHandler.unbind();\n this.pickerHandler.unbind();\n\n this.element\n .removeClass('colorpicker-element')\n .removeData('colorpicker', 'color')\n .off('.colorpicker');\n\n /**\n * (Colorpicker) When the instance is destroyed with all events unbound.\n *\n * @event Colorpicker#colorpickerDestroy\n */\n this.trigger('colorpickerDestroy', color);\n }\n\n /**\n * Shows the colorpicker widget if hidden.\n * If the colorpicker is disabled this call will be ignored.\n *\n * @fires Colorpicker#colorpickerShow\n * @param {Event} [e]\n */\n show(e) {\n this.popupHandler.show(e);\n }\n\n /**\n * Hides the colorpicker widget.\n *\n * @fires Colorpicker#colorpickerHide\n * @param {Event} [e]\n */\n hide(e) {\n this.popupHandler.hide(e);\n }\n\n /**\n * Toggles the colorpicker between visible and hidden.\n *\n * @fires Colorpicker#colorpickerShow\n * @fires Colorpicker#colorpickerHide\n * @param {Event} [e]\n */\n toggle(e) {\n this.popupHandler.toggle(e);\n }\n\n /**\n * Returns the current color value as string\n *\n * @param {String|*} [defaultValue]\n * @returns {String|*}\n */\n getValue(defaultValue = null) {\n let val = this.colorHandler.color;\n\n val = (val instanceof ColorItem) ? val : defaultValue;\n\n if (val instanceof ColorItem) {\n return val.string(this.format);\n }\n\n return val;\n }\n\n /**\n * Sets the color manually\n *\n * @fires Colorpicker#colorpickerChange\n * @param {String|Color} val\n */\n setValue(val) {\n if (this.isDisabled()) {\n return;\n }\n let ch = this.colorHandler;\n\n if (\n (ch.hasColor() && !!val && ch.color.equals(val)) ||\n (!ch.hasColor() && !val)\n ) {\n // same color or still empty\n return;\n }\n\n ch.color = val ? ch.createColor(val, this.options.autoInputFallback) : null;\n\n /**\n * (Colorpicker) When the color is set programmatically with setValue().\n *\n * @event Colorpicker#colorpickerChange\n */\n this.trigger('colorpickerChange', ch.color, val);\n\n // force update if color has changed to empty\n this.update();\n }\n\n /**\n * Updates the UI and the input color according to the internal color.\n *\n * @fires Colorpicker#colorpickerUpdate\n */\n update() {\n if (this.colorHandler.hasColor()) {\n this.inputHandler.update();\n } else {\n this.colorHandler.assureColor();\n }\n\n this.addonHandler.update();\n this.pickerHandler.update();\n\n /**\n * (Colorpicker) Fired when the widget is updated.\n *\n * @event Colorpicker#colorpickerUpdate\n */\n this.trigger('colorpickerUpdate');\n }\n\n /**\n * Enables the widget and the input if any\n *\n * @fires Colorpicker#colorpickerEnable\n * @returns {boolean}\n */\n enable() {\n this.inputHandler.enable();\n this.disabled = false;\n this.picker.removeClass('colorpicker-disabled');\n\n /**\n * (Colorpicker) When the widget has been enabled.\n *\n * @event Colorpicker#colorpickerEnable\n */\n this.trigger('colorpickerEnable');\n return true;\n }\n\n /**\n * Disables the widget and the input if any\n *\n * @fires Colorpicker#colorpickerDisable\n * @returns {boolean}\n */\n disable() {\n this.inputHandler.disable();\n this.disabled = true;\n this.picker.addClass('colorpicker-disabled');\n\n /**\n * (Colorpicker) When the widget has been disabled.\n *\n * @event Colorpicker#colorpickerDisable\n */\n this.trigger('colorpickerDisable');\n return true;\n }\n\n /**\n * Returns true if this instance is enabled\n * @returns {boolean}\n */\n isEnabled() {\n return !this.isDisabled();\n }\n\n /**\n * Returns true if this instance is disabled\n * @returns {boolean}\n */\n isDisabled() {\n return this.disabled === true;\n }\n\n /**\n * Triggers a Colorpicker event.\n *\n * @param eventName\n * @param color\n * @param value\n */\n trigger(eventName, color = null, value = null) {\n this.element.trigger({\n type: eventName,\n colorpicker: this,\n color: color ? color : this.color,\n value: value ? value : this.getValue()\n });\n }\n}\n\n/**\n * Colorpicker extension classes, indexed by extension name\n *\n * @static\n * @type {Object} a map between the extension name and its class\n */\nColorpicker.extensions = coreExtensions;\n\nexport default Colorpicker;\n\n\n\n// WEBPACK FOOTER //\n// ./src/js/Colorpicker.js","import Debugger from './Debugger';\nimport Preview from './Preview';\nimport Swatches from './Swatches';\nimport Palette from './Palette';\n\nexport {\n Debugger, Preview, Swatches, Palette\n};\n\nexport default {\n 'debugger': Debugger,\n 'preview': Preview,\n 'swatches': Swatches,\n 'palette': Palette\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/js/extensions/index.js","'use strict';\n\nimport Extension from 'Extension';\nimport $ from 'jquery';\n\n/**\n * Debugger extension class\n * @alias DebuggerExtension\n * @ignore\n */\nclass Debugger extends Extension {\n constructor(colorpicker, options = {}) {\n super(colorpicker, options);\n\n /**\n * @type {number}\n */\n this.eventCounter = 0;\n if (this.colorpicker.inputHandler.hasInput()) {\n this.colorpicker.inputHandler.input.on('change.colorpicker-ext', $.proxy(this.onChangeInput, this));\n }\n }\n\n /**\n * @fires DebuggerExtension#colorpickerDebug\n * @param {string} eventName\n * @param {*} args\n */\n log(eventName, ...args) {\n this.eventCounter += 1;\n\n let logMessage = `#${this.eventCounter}: Colorpicker#${this.colorpicker.id} [${eventName}]`;\n\n console.debug(logMessage, ...args);\n\n /**\n * Whenever the debugger logs an event, this other event is emitted.\n *\n * @event DebuggerExtension#colorpickerDebug\n * @type {object} The event object\n * @property {Colorpicker} colorpicker The Colorpicker instance\n * @property {ColorItem} color The color instance\n * @property {{debugger: DebuggerExtension, eventName: String, logArgs: Array, logMessage: String}} debug\n * The debug info\n */\n this.colorpicker.element.trigger({\n type: 'colorpickerDebug',\n colorpicker: this.colorpicker,\n color: this.color,\n value: null,\n debug: {\n debugger: this,\n eventName: eventName,\n logArgs: args,\n logMessage: logMessage\n }\n });\n }\n\n resolveColor(color, realColor = true) {\n this.log('resolveColor()', color, realColor);\n return false;\n }\n\n onCreate(event) {\n this.log('colorpickerCreate');\n return super.onCreate(event);\n }\n\n onDestroy(event) {\n this.log('colorpickerDestroy');\n this.eventCounter = 0;\n\n if (this.colorpicker.inputHandler.hasInput()) {\n this.colorpicker.inputHandler.input.off('.colorpicker-ext');\n }\n\n return super.onDestroy(event);\n }\n\n onUpdate(event) {\n this.log('colorpickerUpdate');\n }\n\n /**\n * @listens Colorpicker#change\n * @param {Event} event\n */\n onChangeInput(event) {\n this.log('input:change.colorpicker', event.value, event.color);\n }\n\n onChange(event) {\n this.log('colorpickerChange', event.value, event.color);\n }\n\n onInvalid(event) {\n this.log('colorpickerInvalid', event.value, event.color);\n }\n\n onHide(event) {\n this.log('colorpickerHide');\n this.eventCounter = 0;\n }\n\n onShow(event) {\n this.log('colorpickerShow');\n }\n\n onDisable(event) {\n this.log('colorpickerDisable');\n }\n\n onEnable(event) {\n this.log('colorpickerEnable');\n }\n}\n\nexport default Debugger;\n\n\n\n// WEBPACK FOOTER //\n// ./src/js/extensions/Debugger.js","'use strict';\n\nimport Extension from 'Extension';\nimport $ from 'jquery';\n\n/**\n * Color preview extension\n * @ignore\n */\nclass Preview extends Extension {\n constructor(colorpicker, options = {}) {\n super(colorpicker, $.extend(true, {},\n {\n template: '
',\n showText: true,\n format: colorpicker.format\n },\n options\n ));\n\n this.element = $(this.options.template);\n this.elementInner = this.element.find('div');\n }\n\n onCreate(event) {\n super.onCreate(event);\n this.colorpicker.picker.append(this.element);\n }\n\n onUpdate(event) {\n super.onUpdate(event);\n\n if (!event.color) {\n this.elementInner\n .css('backgroundColor', null)\n .css('color', null)\n .html('');\n return;\n }\n\n this.elementInner\n .css('backgroundColor', event.color.toRgbString());\n\n if (this.options.showText) {\n this.elementInner\n .html(event.color.string(this.options.format || this.colorpicker.format));\n\n if (event.color.isDark() && (event.color.alpha > 0.5)) {\n this.elementInner.css('color', 'white');\n } else {\n this.elementInner.css('color', 'black');\n }\n }\n }\n}\n\nexport default Preview;\n\n\n\n// WEBPACK FOOTER //\n// ./src/js/extensions/Preview.js","'use strict';\n\nimport Palette from './Palette';\nimport $ from 'jquery';\n\nlet defaults = {\n barTemplate: `
\n
\n
`,\n swatchTemplate: ''\n};\n\n/**\n * Color swatches extension\n * @ignore\n */\nclass Swatches extends Palette {\n constructor(colorpicker, options = {}) {\n super(colorpicker, $.extend(true, {}, defaults, options));\n this.element = null;\n }\n\n isEnabled() {\n return this.getLength() > 0;\n }\n\n onCreate(event) {\n super.onCreate(event);\n\n if (!this.isEnabled()) {\n return;\n }\n\n this.element = $(this.options.barTemplate);\n this.load();\n this.colorpicker.picker.append(this.element);\n }\n\n load() {\n let colorpicker = this.colorpicker,\n swatchContainer = this.element.find('.colorpicker-swatches--inner'),\n isAliased = (this.options.namesAsValues === true) && !Array.isArray(this.colors);\n\n swatchContainer.empty();\n\n $.each(this.colors, (name, value) => {\n let $swatch = $(this.options.swatchTemplate)\n .attr('data-name', name)\n .attr('data-value', value)\n .attr('title', isAliased ? `${name}: ${value}` : value)\n .on('mousedown.colorpicker touchstart.colorpicker',\n function (e) {\n let $sw = $(this);\n\n // e.preventDefault();\n\n colorpicker.setValue(isAliased ? $sw.attr('data-name') : $sw.attr('data-value'));\n }\n );\n\n $swatch.find('.colorpicker-swatch--inner')\n .css('background-color', value);\n\n swatchContainer.append($swatch);\n });\n\n swatchContainer.append($(''));\n }\n}\n\nexport default Swatches;\n\n\n\n// WEBPACK FOOTER //\n// ./src/js/extensions/Swatches.js","'use strict';\n\nimport $ from 'jquery';\n\n/**\n * Class that handles all configured sliders on mouse or touch events.\n * @ignore\n */\nclass SliderHandler {\n /**\n * @param {Colorpicker} colorpicker\n */\n constructor(colorpicker) {\n /**\n * @type {Colorpicker}\n */\n this.colorpicker = colorpicker;\n /**\n * @type {*|String}\n * @private\n */\n this.currentSlider = null;\n /**\n * @type {{left: number, top: number}}\n * @private\n */\n this.mousePointer = {\n left: 0,\n top: 0\n };\n\n /**\n * @type {Function}\n */\n this.onMove = $.proxy(this.defaultOnMove, this);\n }\n\n /**\n * This function is called every time a slider guide is moved\n * The scope of \"this\" is the SliderHandler object.\n *\n * @param {int} top\n * @param {int} left\n */\n defaultOnMove(top, left) {\n if (!this.currentSlider) {\n return;\n }\n\n let slider = this.currentSlider, cp = this.colorpicker, ch = cp.colorHandler;\n\n // Create a color object\n let color = !ch.hasColor() ? ch.getFallbackColor() : ch.color.getClone();\n\n // Adjust the guide position\n slider.guideStyle.left = left + 'px';\n slider.guideStyle.top = top + 'px';\n\n // Adjust the color\n if (slider.callLeft) {\n color[slider.callLeft](left / slider.maxLeft);\n }\n if (slider.callTop) {\n color[slider.callTop](top / slider.maxTop);\n }\n\n // Set the new color\n cp.setValue(color);\n cp.popupHandler.focus();\n }\n\n /**\n * Binds the colorpicker sliders to the mouse/touch events\n */\n bind() {\n let sliders = this.colorpicker.options.horizontal ? this.colorpicker\n .options.slidersHorz : this.colorpicker.options.sliders;\n let sliderClasses = [];\n\n for (let sliderName in sliders) {\n if (!sliders.hasOwnProperty(sliderName)) {\n continue;\n }\n\n sliderClasses.push(sliders[sliderName].selector);\n }\n\n this.colorpicker.picker.find(sliderClasses.join(', '))\n .on('mousedown.colorpicker touchstart.colorpicker', $.proxy(this.pressed, this));\n }\n\n /**\n * Unbinds any event bound by this handler\n */\n unbind() {\n $(this.colorpicker.picker).off({\n 'mousemove.colorpicker': $.proxy(this.moved, this),\n 'touchmove.colorpicker': $.proxy(this.moved, this),\n 'mouseup.colorpicker': $.proxy(this.released, this),\n 'touchend.colorpicker': $.proxy(this.released, this)\n });\n }\n\n /**\n * Function triggered when clicking in one of the color adjustment bars\n *\n * @private\n * @fires Colorpicker#mousemove\n * @param {Event} e\n */\n pressed(e) {\n if (this.colorpicker.isDisabled()) {\n return;\n }\n this.colorpicker.lastEvent.alias = 'pressed';\n this.colorpicker.lastEvent.e = e;\n\n if (!e.pageX && !e.pageY && e.originalEvent && e.originalEvent.touches) {\n e.pageX = e.originalEvent.touches[0].pageX;\n e.pageY = e.originalEvent.touches[0].pageY;\n }\n // e.stopPropagation();\n // e.preventDefault();\n\n let target = $(e.target);\n\n // detect the slider and set the limits and callbacks\n let zone = target.closest('div');\n let sliders = this.colorpicker.options.horizontal ? this.colorpicker\n .options.slidersHorz : this.colorpicker.options.sliders;\n\n if (zone.is('.colorpicker')) {\n return;\n }\n\n this.currentSlider = null;\n\n for (let sliderName in sliders) {\n if (!sliders.hasOwnProperty(sliderName)) {\n continue;\n }\n\n let slider = sliders[sliderName];\n\n if (zone.is(slider.selector)) {\n this.currentSlider = $.extend({}, slider, {name: sliderName});\n break;\n } else if (slider.childSelector !== undefined && zone.is(slider.childSelector)) {\n this.currentSlider = $.extend({}, slider, {name: sliderName});\n zone = zone.parent(); // zone.parents(slider.selector).first() ?\n break;\n }\n }\n\n let guide = zone.find('.colorpicker-guide').get(0);\n\n if (this.currentSlider === null || guide === null) {\n return;\n }\n\n let offset = zone.offset();\n\n // reference to guide's style\n this.currentSlider.guideStyle = guide.style;\n this.currentSlider.left = e.pageX - offset.left;\n this.currentSlider.top = e.pageY - offset.top;\n this.mousePointer = {\n left: e.pageX,\n top: e.pageY\n };\n\n // TODO: fix moving outside the picker makes the guides to keep moving. The event needs to be bound to the window.\n /**\n * (window.document) Triggered on mousedown for the document object,\n * so the color adjustment guide is moved to the clicked position.\n *\n * @event Colorpicker#mousemove\n */\n $(this.colorpicker.picker).on({\n 'mousemove.colorpicker': $.proxy(this.moved, this),\n 'touchmove.colorpicker': $.proxy(this.moved, this),\n 'mouseup.colorpicker': $.proxy(this.released, this),\n 'touchend.colorpicker': $.proxy(this.released, this)\n }).trigger('mousemove');\n }\n\n /**\n * Function triggered when dragging a guide inside one of the color adjustment bars.\n *\n * @private\n * @param {Event} e\n */\n moved(e) {\n this.colorpicker.lastEvent.alias = 'moved';\n this.colorpicker.lastEvent.e = e;\n\n if (!e.pageX && !e.pageY && e.originalEvent && e.originalEvent.touches) {\n e.pageX = e.originalEvent.touches[0].pageX;\n e.pageY = e.originalEvent.touches[0].pageY;\n }\n\n // e.stopPropagation();\n e.preventDefault(); // prevents scrolling on mobile\n\n let left = Math.max(\n 0,\n Math.min(\n this.currentSlider.maxLeft,\n this.currentSlider.left + ((e.pageX || this.mousePointer.left) - this.mousePointer.left)\n )\n );\n\n let top = Math.max(\n 0,\n Math.min(\n this.currentSlider.maxTop,\n this.currentSlider.top + ((e.pageY || this.mousePointer.top) - this.mousePointer.top)\n )\n );\n\n this.onMove(top, left);\n }\n\n /**\n * Function triggered when releasing the click in one of the color adjustment bars.\n *\n * @private\n * @param {Event} e\n */\n released(e) {\n this.colorpicker.lastEvent.alias = 'released';\n this.colorpicker.lastEvent.e = e;\n\n // e.stopPropagation();\n // e.preventDefault();\n\n $(this.colorpicker.picker).off({\n 'mousemove.colorpicker': this.moved,\n 'touchmove.colorpicker': this.moved,\n 'mouseup.colorpicker': this.released,\n 'touchend.colorpicker': this.released\n });\n }\n}\n\nexport default SliderHandler;\n\n\n\n// WEBPACK FOOTER //\n// ./src/js/SliderHandler.js","'use strict';\n\nimport $ from 'jquery';\nimport _defaults from './options';\n\n/**\n * Handles everything related to the UI of the colorpicker popup: show, hide, position,...\n * @ignore\n */\nclass PopupHandler {\n /**\n * @param {Colorpicker} colorpicker\n * @param {Window} root\n */\n constructor(colorpicker, root) {\n /**\n * @type {Window}\n */\n this.root = root;\n /**\n * @type {Colorpicker}\n */\n this.colorpicker = colorpicker;\n /**\n * @type {jQuery}\n */\n this.popoverTarget = null;\n /**\n * @type {jQuery}\n */\n this.popoverTip = null;\n\n /**\n * If true, the latest click was inside the popover\n * @type {boolean}\n */\n this.clicking = false;\n /**\n * @type {boolean}\n */\n this.hidding = false;\n /**\n * @type {boolean}\n */\n this.showing = false;\n }\n\n /**\n * @private\n * @returns {jQuery|false}\n */\n get input() {\n return this.colorpicker.inputHandler.input;\n }\n\n /**\n * @private\n * @returns {boolean}\n */\n get hasInput() {\n return this.colorpicker.inputHandler.hasInput();\n }\n\n /**\n * @private\n * @returns {jQuery|false}\n */\n get addon() {\n return this.colorpicker.addonHandler.addon;\n }\n\n /**\n * @private\n * @returns {boolean}\n */\n get hasAddon() {\n return this.colorpicker.addonHandler.hasAddon();\n }\n\n /**\n * @private\n * @returns {boolean}\n */\n get isPopover() {\n return !this.colorpicker.options.inline && !!this.popoverTip;\n }\n\n /**\n * Binds the different colorpicker elements to the focus/mouse/touch events so it reacts in order to show or\n * hide the colorpicker popup accordingly. It also adds the proper classes.\n */\n bind() {\n let cp = this.colorpicker;\n\n if (cp.options.inline) {\n cp.picker.addClass('colorpicker-inline colorpicker-visible');\n return; // no need to bind show/hide events for inline elements\n }\n\n cp.picker.addClass('colorpicker-popup colorpicker-hidden');\n\n // there is no input or addon\n if (!this.hasInput && !this.hasAddon) {\n return;\n }\n\n // create Bootstrap 4 popover\n if (cp.options.popover) {\n this.createPopover();\n }\n\n // bind addon show/hide events\n if (this.hasAddon) {\n // enable focus on addons\n if (!this.addon.attr('tabindex')) {\n this.addon.attr('tabindex', 0);\n }\n\n this.addon.on({\n 'mousedown.colorpicker touchstart.colorpicker': $.proxy(this.toggle, this)\n });\n\n this.addon.on({\n 'focus.colorpicker': $.proxy(this.show, this)\n });\n\n this.addon.on({\n 'focusout.colorpicker': $.proxy(this.hide, this)\n });\n }\n\n // bind input show/hide events\n if (this.hasInput && !this.hasAddon) {\n this.input.on({\n 'mousedown.colorpicker touchstart.colorpicker': $.proxy(this.show, this),\n 'focus.colorpicker': $.proxy(this.show, this)\n });\n\n this.input.on({\n 'focusout.colorpicker': $.proxy(this.hide, this)\n });\n }\n\n // reposition popup on window resize\n $(this.root).on('resize.colorpicker', $.proxy(this.reposition, this));\n }\n\n /**\n * Unbinds any event bound by this handler\n */\n unbind() {\n if (this.hasInput) {\n this.input.off({\n 'mousedown.colorpicker touchstart.colorpicker': $.proxy(this.show, this),\n 'focus.colorpicker': $.proxy(this.show, this)\n });\n this.input.off({\n 'focusout.colorpicker': $.proxy(this.hide, this)\n });\n }\n\n if (this.hasAddon) {\n this.addon.off({\n 'mousedown.colorpicker touchstart.colorpicker': $.proxy(this.toggle, this)\n });\n this.addon.off({\n 'focus.colorpicker': $.proxy(this.show, this)\n });\n this.addon.off({\n 'focusout.colorpicker': $.proxy(this.hide, this)\n });\n }\n\n if (this.popoverTarget) {\n this.popoverTarget.popover('dispose');\n }\n\n $(this.root).off('resize.colorpicker', $.proxy(this.reposition, this));\n $(this.root.document).off('mousedown.colorpicker touchstart.colorpicker', $.proxy(this.hide, this));\n $(this.root.document).off('mousedown.colorpicker touchstart.colorpicker', $.proxy(this.onClickingInside, this));\n }\n\n isClickingInside(e) {\n if (!e) {\n return false;\n }\n\n return (\n this.isOrIsInside(this.popoverTip, e.currentTarget) ||\n this.isOrIsInside(this.popoverTip, e.target) ||\n this.isOrIsInside(this.colorpicker.picker, e.currentTarget) ||\n this.isOrIsInside(this.colorpicker.picker, e.target)\n );\n }\n\n isOrIsInside(container, element) {\n if (!container || !element) {\n return false;\n }\n\n element = $(element);\n\n return (\n element.is(container) ||\n container.find(element).length > 0\n );\n }\n\n onClickingInside(e) {\n this.clicking = this.isClickingInside(e);\n }\n\n createPopover() {\n let cp = this.colorpicker;\n\n this.popoverTarget = this.hasAddon ? this.addon : this.input;\n\n cp.picker.addClass('colorpicker-bs-popover-content');\n\n this.popoverTarget.popover(\n $.extend(\n true,\n {},\n _defaults.popover,\n cp.options.popover,\n {trigger: 'manual', content: cp.picker, html: true}\n )\n );\n\n this.popoverTip = $(this.popoverTarget.popover('getTipElement').data('bs.popover').tip);\n this.popoverTip.addClass('colorpicker-bs-popover');\n\n this.popoverTarget.on('shown.bs.popover', $.proxy(this.fireShow, this));\n this.popoverTarget.on('hidden.bs.popover', $.proxy(this.fireHide, this));\n }\n\n /**\n * If the widget is not inside a container or inline, rearranges its position relative to its element offset.\n *\n * @param {Event} [e]\n * @private\n */\n reposition(e) {\n if (this.popoverTarget && this.isVisible()) {\n this.popoverTarget.popover('update');\n }\n }\n\n /**\n * Toggles the colorpicker between visible or hidden\n *\n * @fires Colorpicker#colorpickerShow\n * @fires Colorpicker#colorpickerHide\n * @param {Event} [e]\n */\n toggle(e) {\n if (this.isVisible()) {\n this.hide(e);\n } else {\n this.show(e);\n }\n }\n\n /**\n * Shows the colorpicker widget if hidden.\n *\n * @fires Colorpicker#colorpickerShow\n * @param {Event} [e]\n */\n show(e) {\n if (this.isVisible() || this.showing || this.hidding) {\n return;\n }\n\n this.showing = true;\n this.hidding = false;\n this.clicking = false;\n\n let cp = this.colorpicker;\n\n cp.lastEvent.alias = 'show';\n cp.lastEvent.e = e;\n\n // Prevent showing browser native HTML5 colorpicker\n if (\n (e && (!this.hasInput || this.input.attr('type') === 'color')) &&\n (e && e.preventDefault)\n ) {\n e.stopPropagation();\n e.preventDefault();\n }\n\n // If it's a popover, add event to the document to hide the picker when clicking outside of it\n if (this.isPopover) {\n $(this.root).on('resize.colorpicker', $.proxy(this.reposition, this));\n }\n\n // add visible class before popover is shown\n cp.picker.addClass('colorpicker-visible').removeClass('colorpicker-hidden');\n\n if (this.popoverTarget) {\n this.popoverTarget.popover('show');\n } else {\n this.fireShow();\n }\n }\n\n fireShow() {\n this.hidding = false;\n this.showing = false;\n\n if (this.isPopover) {\n // Add event to hide on outside click\n $(this.root.document).on('mousedown.colorpicker touchstart.colorpicker', $.proxy(this.hide, this));\n $(this.root.document).on('mousedown.colorpicker touchstart.colorpicker', $.proxy(this.onClickingInside, this));\n }\n\n /**\n * (Colorpicker) When show() is called and the widget can be shown.\n *\n * @event Colorpicker#colorpickerShow\n */\n this.colorpicker.trigger('colorpickerShow');\n }\n\n /**\n * Hides the colorpicker widget.\n * Hide is prevented when it is triggered by an event whose target element has been clicked/touched.\n *\n * @fires Colorpicker#colorpickerHide\n * @param {Event} [e]\n */\n hide(e) {\n if (this.isHidden() || this.showing || this.hidding) {\n return;\n }\n\n let cp = this.colorpicker, clicking = (this.clicking || this.isClickingInside(e));\n\n this.hidding = true;\n this.showing = false;\n this.clicking = false;\n\n cp.lastEvent.alias = 'hide';\n cp.lastEvent.e = e;\n\n // TODO: fix having to click twice outside when losing focus and last 2 clicks where inside the colorpicker\n\n // Prevent hide if triggered by an event and an element inside the colorpicker has been clicked/touched\n if (clicking) {\n this.hidding = false;\n return;\n }\n\n if (this.popoverTarget) {\n this.popoverTarget.popover('hide');\n } else {\n this.fireHide();\n }\n }\n\n fireHide() {\n this.hidding = false;\n this.showing = false;\n\n let cp = this.colorpicker;\n\n // add hidden class after popover is hidden\n cp.picker.addClass('colorpicker-hidden').removeClass('colorpicker-visible');\n\n // Unbind window and document events, since there is no need to keep them while the popup is hidden\n $(this.root).off('resize.colorpicker', $.proxy(this.reposition, this));\n $(this.root.document).off('mousedown.colorpicker touchstart.colorpicker', $.proxy(this.hide, this));\n $(this.root.document).off('mousedown.colorpicker touchstart.colorpicker', $.proxy(this.onClickingInside, this));\n\n /**\n * (Colorpicker) When hide() is called and the widget can be hidden.\n *\n * @event Colorpicker#colorpickerHide\n */\n cp.trigger('colorpickerHide');\n }\n\n focus() {\n if (this.hasAddon) {\n return this.addon.focus();\n }\n if (this.hasInput) {\n return this.input.focus();\n }\n return false;\n }\n\n /**\n * Returns true if the colorpicker element has the colorpicker-visible class and not the colorpicker-hidden one.\n * False otherwise.\n *\n * @returns {boolean}\n */\n isVisible() {\n return this.colorpicker.picker.hasClass('colorpicker-visible') &&\n !this.colorpicker.picker.hasClass('colorpicker-hidden');\n }\n\n /**\n * Returns true if the colorpicker element has the colorpicker-hidden class and not the colorpicker-visible one.\n * False otherwise.\n *\n * @returns {boolean}\n */\n isHidden() {\n return this.colorpicker.picker.hasClass('colorpicker-hidden') &&\n !this.colorpicker.picker.hasClass('colorpicker-visible');\n }\n}\n\nexport default PopupHandler;\n\n\n\n// WEBPACK FOOTER //\n// ./src/js/PopupHandler.js","'use strict';\n\nimport $ from 'jquery';\nimport ColorItem from './ColorItem';\n\n/**\n * Handles everything related to the colorpicker input\n * @ignore\n */\nclass InputHandler {\n /**\n * @param {Colorpicker} colorpicker\n */\n constructor(colorpicker) {\n /**\n * @type {Colorpicker}\n */\n this.colorpicker = colorpicker;\n /**\n * @type {jQuery|false}\n */\n this.input = this.colorpicker.element.is('input') ? this.colorpicker.element : (this.colorpicker.options.input ?\n this.colorpicker.element.find(this.colorpicker.options.input) : false);\n\n if (this.input && (this.input.length === 0)) {\n this.input = false;\n }\n\n this._initValue();\n }\n\n bind() {\n if (!this.hasInput()) {\n return;\n }\n this.input.on({\n 'keyup.colorpicker': $.proxy(this.onkeyup, this)\n });\n this.input.on({\n 'change.colorpicker': $.proxy(this.onchange, this)\n });\n }\n\n unbind() {\n if (!this.hasInput()) {\n return;\n }\n this.input.off('.colorpicker');\n }\n\n _initValue() {\n if (!this.hasInput()) {\n return;\n }\n\n let val = '';\n\n [\n // candidates:\n this.input.val(),\n this.input.data('color'),\n this.input.attr('data-color')\n ].map((item) => {\n if (item && (val === '')) {\n val = item;\n }\n });\n\n if (val instanceof ColorItem) {\n val = this.getFormattedColor(val.string(this.colorpicker.format));\n } else if (!(typeof val === 'string' || val instanceof String)) {\n val = '';\n }\n\n this.input.prop('value', val);\n }\n\n /**\n * Returns the color string from the input value.\n * If there is no input the return value is false.\n *\n * @returns {String|boolean}\n */\n getValue() {\n if (!this.hasInput()) {\n return false;\n }\n\n return this.input.val();\n }\n\n /**\n * If the input element is present, it updates the value with the current color object color string.\n * If the value is changed, this method fires a \"change\" event on the input element.\n *\n * @param {String} val\n *\n * @fires Colorpicker#change\n */\n setValue(val) {\n if (!this.hasInput()) {\n return;\n }\n\n let inputVal = this.input.prop('value');\n\n val = val ? val : '';\n\n if (val === (inputVal ? inputVal : '')) {\n // No need to set value or trigger any event if nothing changed\n return;\n }\n\n this.input.prop('value', val);\n\n /**\n * (Input) Triggered on the input element when a new color is selected.\n *\n * @event Colorpicker#change\n */\n this.input.trigger({\n type: 'change',\n colorpicker: this.colorpicker,\n color: this.colorpicker.color,\n value: val\n });\n }\n\n /**\n * Returns the formatted color string, with the formatting options applied\n * (e.g. useHashPrefix)\n *\n * @param {String|null} val\n *\n * @returns {String}\n */\n getFormattedColor(val = null) {\n val = val ? val : this.colorpicker.colorHandler.getColorString();\n\n if (!val) {\n return '';\n }\n\n val = this.colorpicker.colorHandler.resolveColorDelegate(val, false);\n\n if (this.colorpicker.options.useHashPrefix === false) {\n val = val.replace(/^#/g, '');\n }\n\n return val;\n }\n\n /**\n * Returns true if the widget has an associated input element, false otherwise\n * @returns {boolean}\n */\n hasInput() {\n return (this.input !== false);\n }\n\n /**\n * Returns true if the input exists and is disabled\n * @returns {boolean}\n */\n isEnabled() {\n return this.hasInput() && !this.isDisabled();\n }\n\n /**\n * Returns true if the input exists and is disabled\n * @returns {boolean}\n */\n isDisabled() {\n return this.hasInput() && (this.input.prop('disabled') === true);\n }\n\n /**\n * Disables the input if any\n *\n * @fires Colorpicker#colorpickerDisable\n * @returns {boolean}\n */\n disable() {\n if (this.hasInput()) {\n this.input.prop('disabled', true);\n }\n }\n\n /**\n * Enables the input if any\n *\n * @fires Colorpicker#colorpickerEnable\n * @returns {boolean}\n */\n enable() {\n if (this.hasInput()) {\n this.input.prop('disabled', false);\n }\n }\n\n /**\n * Calls setValue with the current internal color value\n *\n * @fires Colorpicker#change\n */\n update() {\n if (!this.hasInput()) {\n return;\n }\n\n if (\n (this.colorpicker.options.autoInputFallback === false) &&\n this.colorpicker.colorHandler.isInvalidColor()\n ) {\n // prevent update if color is invalid, autoInputFallback is disabled and the last event is keyup.\n return;\n }\n\n this.setValue(this.getFormattedColor());\n }\n\n /**\n * Function triggered when the input has changed, so the colorpicker gets updated.\n *\n * @private\n * @param {Event} e\n * @returns {boolean}\n */\n onchange(e) {\n this.colorpicker.lastEvent.alias = 'input.change';\n this.colorpicker.lastEvent.e = e;\n\n let val = this.getValue();\n\n if (val !== e.value) {\n this.colorpicker.setValue(val);\n }\n }\n\n /**\n * Function triggered after a keyboard key has been released.\n *\n * @private\n * @param {Event} e\n * @returns {boolean}\n */\n onkeyup(e) {\n this.colorpicker.lastEvent.alias = 'input.keyup';\n this.colorpicker.lastEvent.e = e;\n\n let val = this.getValue();\n\n if (val !== e.value) {\n this.colorpicker.setValue(val);\n }\n }\n}\n\nexport default InputHandler;\n\n\n\n// WEBPACK FOOTER //\n// ./src/js/InputHandler.js","'use strict';\n\nvar colorString = require('color-string');\nvar convert = require('color-convert');\n\nvar _slice = [].slice;\n\nvar skippedModels = [\n\t// to be honest, I don't really feel like keyword belongs in color convert, but eh.\n\t'keyword',\n\n\t// gray conflicts with some method names, and has its own method defined.\n\t'gray',\n\n\t// shouldn't really be in color-convert either...\n\t'hex'\n];\n\nvar hashedModelKeys = {};\nObject.keys(convert).forEach(function (model) {\n\thashedModelKeys[_slice.call(convert[model].labels).sort().join('')] = model;\n});\n\nvar limiters = {};\n\nfunction Color(obj, model) {\n\tif (!(this instanceof Color)) {\n\t\treturn new Color(obj, model);\n\t}\n\n\tif (model && model in skippedModels) {\n\t\tmodel = null;\n\t}\n\n\tif (model && !(model in convert)) {\n\t\tthrow new Error('Unknown model: ' + model);\n\t}\n\n\tvar i;\n\tvar channels;\n\n\tif (typeof obj === 'undefined') {\n\t\tthis.model = 'rgb';\n\t\tthis.color = [0, 0, 0];\n\t\tthis.valpha = 1;\n\t} else if (obj instanceof Color) {\n\t\tthis.model = obj.model;\n\t\tthis.color = obj.color.slice();\n\t\tthis.valpha = obj.valpha;\n\t} else if (typeof obj === 'string') {\n\t\tvar result = colorString.get(obj);\n\t\tif (result === null) {\n\t\t\tthrow new Error('Unable to parse color from string: ' + obj);\n\t\t}\n\n\t\tthis.model = result.model;\n\t\tchannels = convert[this.model].channels;\n\t\tthis.color = result.value.slice(0, channels);\n\t\tthis.valpha = typeof result.value[channels] === 'number' ? result.value[channels] : 1;\n\t} else if (obj.length) {\n\t\tthis.model = model || 'rgb';\n\t\tchannels = convert[this.model].channels;\n\t\tvar newArr = _slice.call(obj, 0, channels);\n\t\tthis.color = zeroArray(newArr, channels);\n\t\tthis.valpha = typeof obj[channels] === 'number' ? obj[channels] : 1;\n\t} else if (typeof obj === 'number') {\n\t\t// this is always RGB - can be converted later on.\n\t\tobj &= 0xFFFFFF;\n\t\tthis.model = 'rgb';\n\t\tthis.color = [\n\t\t\t(obj >> 16) & 0xFF,\n\t\t\t(obj >> 8) & 0xFF,\n\t\t\tobj & 0xFF\n\t\t];\n\t\tthis.valpha = 1;\n\t} else {\n\t\tthis.valpha = 1;\n\n\t\tvar keys = Object.keys(obj);\n\t\tif ('alpha' in obj) {\n\t\t\tkeys.splice(keys.indexOf('alpha'), 1);\n\t\t\tthis.valpha = typeof obj.alpha === 'number' ? obj.alpha : 0;\n\t\t}\n\n\t\tvar hashedKeys = keys.sort().join('');\n\t\tif (!(hashedKeys in hashedModelKeys)) {\n\t\t\tthrow new Error('Unable to parse color from object: ' + JSON.stringify(obj));\n\t\t}\n\n\t\tthis.model = hashedModelKeys[hashedKeys];\n\n\t\tvar labels = convert[this.model].labels;\n\t\tvar color = [];\n\t\tfor (i = 0; i < labels.length; i++) {\n\t\t\tcolor.push(obj[labels[i]]);\n\t\t}\n\n\t\tthis.color = zeroArray(color);\n\t}\n\n\t// perform limitations (clamping, etc.)\n\tif (limiters[this.model]) {\n\t\tchannels = convert[this.model].channels;\n\t\tfor (i = 0; i < channels; i++) {\n\t\t\tvar limit = limiters[this.model][i];\n\t\t\tif (limit) {\n\t\t\t\tthis.color[i] = limit(this.color[i]);\n\t\t\t}\n\t\t}\n\t}\n\n\tthis.valpha = Math.max(0, Math.min(1, this.valpha));\n\n\tif (Object.freeze) {\n\t\tObject.freeze(this);\n\t}\n}\n\nColor.prototype = {\n\ttoString: function () {\n\t\treturn this.string();\n\t},\n\n\ttoJSON: function () {\n\t\treturn this[this.model]();\n\t},\n\n\tstring: function (places) {\n\t\tvar self = this.model in colorString.to ? this : this.rgb();\n\t\tself = self.round(typeof places === 'number' ? places : 1);\n\t\tvar args = self.valpha === 1 ? self.color : self.color.concat(this.valpha);\n\t\treturn colorString.to[self.model](args);\n\t},\n\n\tpercentString: function (places) {\n\t\tvar self = this.rgb().round(typeof places === 'number' ? places : 1);\n\t\tvar args = self.valpha === 1 ? self.color : self.color.concat(this.valpha);\n\t\treturn colorString.to.rgb.percent(args);\n\t},\n\n\tarray: function () {\n\t\treturn this.valpha === 1 ? this.color.slice() : this.color.concat(this.valpha);\n\t},\n\n\tobject: function () {\n\t\tvar result = {};\n\t\tvar channels = convert[this.model].channels;\n\t\tvar labels = convert[this.model].labels;\n\n\t\tfor (var i = 0; i < channels; i++) {\n\t\t\tresult[labels[i]] = this.color[i];\n\t\t}\n\n\t\tif (this.valpha !== 1) {\n\t\t\tresult.alpha = this.valpha;\n\t\t}\n\n\t\treturn result;\n\t},\n\n\tunitArray: function () {\n\t\tvar rgb = this.rgb().color;\n\t\trgb[0] /= 255;\n\t\trgb[1] /= 255;\n\t\trgb[2] /= 255;\n\n\t\tif (this.valpha !== 1) {\n\t\t\trgb.push(this.valpha);\n\t\t}\n\n\t\treturn rgb;\n\t},\n\n\tunitObject: function () {\n\t\tvar rgb = this.rgb().object();\n\t\trgb.r /= 255;\n\t\trgb.g /= 255;\n\t\trgb.b /= 255;\n\n\t\tif (this.valpha !== 1) {\n\t\t\trgb.alpha = this.valpha;\n\t\t}\n\n\t\treturn rgb;\n\t},\n\n\tround: function (places) {\n\t\tplaces = Math.max(places || 0, 0);\n\t\treturn new Color(this.color.map(roundToPlace(places)).concat(this.valpha), this.model);\n\t},\n\n\talpha: function (val) {\n\t\tif (arguments.length) {\n\t\t\treturn new Color(this.color.concat(Math.max(0, Math.min(1, val))), this.model);\n\t\t}\n\n\t\treturn this.valpha;\n\t},\n\n\t// rgb\n\tred: getset('rgb', 0, maxfn(255)),\n\tgreen: getset('rgb', 1, maxfn(255)),\n\tblue: getset('rgb', 2, maxfn(255)),\n\n\thue: getset(['hsl', 'hsv', 'hsl', 'hwb', 'hcg'], 0, function (val) { return ((val % 360) + 360) % 360; }), // eslint-disable-line brace-style\n\n\tsaturationl: getset('hsl', 1, maxfn(100)),\n\tlightness: getset('hsl', 2, maxfn(100)),\n\n\tsaturationv: getset('hsv', 1, maxfn(100)),\n\tvalue: getset('hsv', 2, maxfn(100)),\n\n\tchroma: getset('hcg', 1, maxfn(100)),\n\tgray: getset('hcg', 2, maxfn(100)),\n\n\twhite: getset('hwb', 1, maxfn(100)),\n\twblack: getset('hwb', 2, maxfn(100)),\n\n\tcyan: getset('cmyk', 0, maxfn(100)),\n\tmagenta: getset('cmyk', 1, maxfn(100)),\n\tyellow: getset('cmyk', 2, maxfn(100)),\n\tblack: getset('cmyk', 3, maxfn(100)),\n\n\tx: getset('xyz', 0, maxfn(100)),\n\ty: getset('xyz', 1, maxfn(100)),\n\tz: getset('xyz', 2, maxfn(100)),\n\n\tl: getset('lab', 0, maxfn(100)),\n\ta: getset('lab', 1),\n\tb: getset('lab', 2),\n\n\tkeyword: function (val) {\n\t\tif (arguments.length) {\n\t\t\treturn new Color(val);\n\t\t}\n\n\t\treturn convert[this.model].keyword(this.color);\n\t},\n\n\thex: function (val) {\n\t\tif (arguments.length) {\n\t\t\treturn new Color(val);\n\t\t}\n\n\t\treturn colorString.to.hex(this.rgb().round().color);\n\t},\n\n\trgbNumber: function () {\n\t\tvar rgb = this.rgb().color;\n\t\treturn ((rgb[0] & 0xFF) << 16) | ((rgb[1] & 0xFF) << 8) | (rgb[2] & 0xFF);\n\t},\n\n\tluminosity: function () {\n\t\t// http://www.w3.org/TR/WCAG20/#relativeluminancedef\n\t\tvar rgb = this.rgb().color;\n\n\t\tvar lum = [];\n\t\tfor (var i = 0; i < rgb.length; i++) {\n\t\t\tvar chan = rgb[i] / 255;\n\t\t\tlum[i] = (chan <= 0.03928) ? chan / 12.92 : Math.pow(((chan + 0.055) / 1.055), 2.4);\n\t\t}\n\n\t\treturn 0.2126 * lum[0] + 0.7152 * lum[1] + 0.0722 * lum[2];\n\t},\n\n\tcontrast: function (color2) {\n\t\t// http://www.w3.org/TR/WCAG20/#contrast-ratiodef\n\t\tvar lum1 = this.luminosity();\n\t\tvar lum2 = color2.luminosity();\n\n\t\tif (lum1 > lum2) {\n\t\t\treturn (lum1 + 0.05) / (lum2 + 0.05);\n\t\t}\n\n\t\treturn (lum2 + 0.05) / (lum1 + 0.05);\n\t},\n\n\tlevel: function (color2) {\n\t\tvar contrastRatio = this.contrast(color2);\n\t\tif (contrastRatio >= 7.1) {\n\t\t\treturn 'AAA';\n\t\t}\n\n\t\treturn (contrastRatio >= 4.5) ? 'AA' : '';\n\t},\n\n\tisDark: function () {\n\t\t// YIQ equation from http://24ways.org/2010/calculating-color-contrast\n\t\tvar rgb = this.rgb().color;\n\t\tvar yiq = (rgb[0] * 299 + rgb[1] * 587 + rgb[2] * 114) / 1000;\n\t\treturn yiq < 128;\n\t},\n\n\tisLight: function () {\n\t\treturn !this.isDark();\n\t},\n\n\tnegate: function () {\n\t\tvar rgb = this.rgb();\n\t\tfor (var i = 0; i < 3; i++) {\n\t\t\trgb.color[i] = 255 - rgb.color[i];\n\t\t}\n\t\treturn rgb;\n\t},\n\n\tlighten: function (ratio) {\n\t\tvar hsl = this.hsl();\n\t\thsl.color[2] += hsl.color[2] * ratio;\n\t\treturn hsl;\n\t},\n\n\tdarken: function (ratio) {\n\t\tvar hsl = this.hsl();\n\t\thsl.color[2] -= hsl.color[2] * ratio;\n\t\treturn hsl;\n\t},\n\n\tsaturate: function (ratio) {\n\t\tvar hsl = this.hsl();\n\t\thsl.color[1] += hsl.color[1] * ratio;\n\t\treturn hsl;\n\t},\n\n\tdesaturate: function (ratio) {\n\t\tvar hsl = this.hsl();\n\t\thsl.color[1] -= hsl.color[1] * ratio;\n\t\treturn hsl;\n\t},\n\n\twhiten: function (ratio) {\n\t\tvar hwb = this.hwb();\n\t\thwb.color[1] += hwb.color[1] * ratio;\n\t\treturn hwb;\n\t},\n\n\tblacken: function (ratio) {\n\t\tvar hwb = this.hwb();\n\t\thwb.color[2] += hwb.color[2] * ratio;\n\t\treturn hwb;\n\t},\n\n\tgrayscale: function () {\n\t\t// http://en.wikipedia.org/wiki/Grayscale#Converting_color_to_grayscale\n\t\tvar rgb = this.rgb().color;\n\t\tvar val = rgb[0] * 0.3 + rgb[1] * 0.59 + rgb[2] * 0.11;\n\t\treturn Color.rgb(val, val, val);\n\t},\n\n\tfade: function (ratio) {\n\t\treturn this.alpha(this.valpha - (this.valpha * ratio));\n\t},\n\n\topaquer: function (ratio) {\n\t\treturn this.alpha(this.valpha + (this.valpha * ratio));\n\t},\n\n\trotate: function (degrees) {\n\t\tvar hsl = this.hsl();\n\t\tvar hue = hsl.color[0];\n\t\thue = (hue + degrees) % 360;\n\t\thue = hue < 0 ? 360 + hue : hue;\n\t\thsl.color[0] = hue;\n\t\treturn hsl;\n\t},\n\n\tmix: function (mixinColor, weight) {\n\t\t// ported from sass implementation in C\n\t\t// https://github.com/sass/libsass/blob/0e6b4a2850092356aa3ece07c6b249f0221caced/functions.cpp#L209\n\t\tif (!mixinColor || !mixinColor.rgb) {\n\t\t\tthrow new Error('Argument to \"mix\" was not a Color instance, but rather an instance of ' + typeof mixinColor);\n\t\t}\n\t\tvar color1 = mixinColor.rgb();\n\t\tvar color2 = this.rgb();\n\t\tvar p = weight === undefined ? 0.5 : weight;\n\n\t\tvar w = 2 * p - 1;\n\t\tvar a = color1.alpha() - color2.alpha();\n\n\t\tvar w1 = (((w * a === -1) ? w : (w + a) / (1 + w * a)) + 1) / 2.0;\n\t\tvar w2 = 1 - w1;\n\n\t\treturn Color.rgb(\n\t\t\t\tw1 * color1.red() + w2 * color2.red(),\n\t\t\t\tw1 * color1.green() + w2 * color2.green(),\n\t\t\t\tw1 * color1.blue() + w2 * color2.blue(),\n\t\t\t\tcolor1.alpha() * p + color2.alpha() * (1 - p));\n\t}\n};\n\n// model conversion methods and static constructors\nObject.keys(convert).forEach(function (model) {\n\tif (skippedModels.indexOf(model) !== -1) {\n\t\treturn;\n\t}\n\n\tvar channels = convert[model].channels;\n\n\t// conversion methods\n\tColor.prototype[model] = function () {\n\t\tif (this.model === model) {\n\t\t\treturn new Color(this);\n\t\t}\n\n\t\tif (arguments.length) {\n\t\t\treturn new Color(arguments, model);\n\t\t}\n\n\t\tvar newAlpha = typeof arguments[channels] === 'number' ? channels : this.valpha;\n\t\treturn new Color(assertArray(convert[this.model][model].raw(this.color)).concat(newAlpha), model);\n\t};\n\n\t// 'static' construction methods\n\tColor[model] = function (color) {\n\t\tif (typeof color === 'number') {\n\t\t\tcolor = zeroArray(_slice.call(arguments), channels);\n\t\t}\n\t\treturn new Color(color, model);\n\t};\n});\n\nfunction roundTo(num, places) {\n\treturn Number(num.toFixed(places));\n}\n\nfunction roundToPlace(places) {\n\treturn function (num) {\n\t\treturn roundTo(num, places);\n\t};\n}\n\nfunction getset(model, channel, modifier) {\n\tmodel = Array.isArray(model) ? model : [model];\n\n\tmodel.forEach(function (m) {\n\t\t(limiters[m] || (limiters[m] = []))[channel] = modifier;\n\t});\n\n\tmodel = model[0];\n\n\treturn function (val) {\n\t\tvar result;\n\n\t\tif (arguments.length) {\n\t\t\tif (modifier) {\n\t\t\t\tval = modifier(val);\n\t\t\t}\n\n\t\t\tresult = this[model]();\n\t\t\tresult.color[channel] = val;\n\t\t\treturn result;\n\t\t}\n\n\t\tresult = this[model]().color[channel];\n\t\tif (modifier) {\n\t\t\tresult = modifier(result);\n\t\t}\n\n\t\treturn result;\n\t};\n}\n\nfunction maxfn(max) {\n\treturn function (v) {\n\t\treturn Math.max(0, Math.min(max, v));\n\t};\n}\n\nfunction assertArray(val) {\n\treturn Array.isArray(val) ? val : [val];\n}\n\nfunction zeroArray(arr, length) {\n\tfor (var i = 0; i < length; i++) {\n\t\tif (typeof arr[i] !== 'number') {\n\t\t\tarr[i] = 0;\n\t\t}\n\t}\n\n\treturn arr;\n}\n\nmodule.exports = Color;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/color/index.js\n// module id = 16\n// module chunks = 0 1","/* MIT license */\nvar colorNames = require('color-name');\nvar swizzle = require('simple-swizzle');\n\nvar reverseNames = {};\n\n// create a list of reverse color names\nfor (var name in colorNames) {\n\tif (colorNames.hasOwnProperty(name)) {\n\t\treverseNames[colorNames[name]] = name;\n\t}\n}\n\nvar cs = module.exports = {\n\tto: {},\n\tget: {}\n};\n\ncs.get = function (string) {\n\tvar prefix = string.substring(0, 3).toLowerCase();\n\tvar val;\n\tvar model;\n\tswitch (prefix) {\n\t\tcase 'hsl':\n\t\t\tval = cs.get.hsl(string);\n\t\t\tmodel = 'hsl';\n\t\t\tbreak;\n\t\tcase 'hwb':\n\t\t\tval = cs.get.hwb(string);\n\t\t\tmodel = 'hwb';\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tval = cs.get.rgb(string);\n\t\t\tmodel = 'rgb';\n\t\t\tbreak;\n\t}\n\n\tif (!val) {\n\t\treturn null;\n\t}\n\n\treturn {model: model, value: val};\n};\n\ncs.get.rgb = function (string) {\n\tif (!string) {\n\t\treturn null;\n\t}\n\n\tvar abbr = /^#([a-f0-9]{3,4})$/i;\n\tvar hex = /^#([a-f0-9]{6})([a-f0-9]{2})?$/i;\n\tvar rgba = /^rgba?\\(\\s*([+-]?\\d+)\\s*,\\s*([+-]?\\d+)\\s*,\\s*([+-]?\\d+)\\s*(?:,\\s*([+-]?[\\d\\.]+)\\s*)?\\)$/;\n\tvar per = /^rgba?\\(\\s*([+-]?[\\d\\.]+)\\%\\s*,\\s*([+-]?[\\d\\.]+)\\%\\s*,\\s*([+-]?[\\d\\.]+)\\%\\s*(?:,\\s*([+-]?[\\d\\.]+)\\s*)?\\)$/;\n\tvar keyword = /(\\D+)/;\n\n\tvar rgb = [0, 0, 0, 1];\n\tvar match;\n\tvar i;\n\tvar hexAlpha;\n\n\tif (match = string.match(hex)) {\n\t\thexAlpha = match[2];\n\t\tmatch = match[1];\n\n\t\tfor (i = 0; i < 3; i++) {\n\t\t\t// https://jsperf.com/slice-vs-substr-vs-substring-methods-long-string/19\n\t\t\tvar i2 = i * 2;\n\t\t\trgb[i] = parseInt(match.slice(i2, i2 + 2), 16);\n\t\t}\n\n\t\tif (hexAlpha) {\n\t\t\trgb[3] = Math.round((parseInt(hexAlpha, 16) / 255) * 100) / 100;\n\t\t}\n\t} else if (match = string.match(abbr)) {\n\t\tmatch = match[1];\n\t\thexAlpha = match[3];\n\n\t\tfor (i = 0; i < 3; i++) {\n\t\t\trgb[i] = parseInt(match[i] + match[i], 16);\n\t\t}\n\n\t\tif (hexAlpha) {\n\t\t\trgb[3] = Math.round((parseInt(hexAlpha + hexAlpha, 16) / 255) * 100) / 100;\n\t\t}\n\t} else if (match = string.match(rgba)) {\n\t\tfor (i = 0; i < 3; i++) {\n\t\t\trgb[i] = parseInt(match[i + 1], 0);\n\t\t}\n\n\t\tif (match[4]) {\n\t\t\trgb[3] = parseFloat(match[4]);\n\t\t}\n\t} else if (match = string.match(per)) {\n\t\tfor (i = 0; i < 3; i++) {\n\t\t\trgb[i] = Math.round(parseFloat(match[i + 1]) * 2.55);\n\t\t}\n\n\t\tif (match[4]) {\n\t\t\trgb[3] = parseFloat(match[4]);\n\t\t}\n\t} else if (match = string.match(keyword)) {\n\t\tif (match[1] === 'transparent') {\n\t\t\treturn [0, 0, 0, 0];\n\t\t}\n\n\t\trgb = colorNames[match[1]];\n\n\t\tif (!rgb) {\n\t\t\treturn null;\n\t\t}\n\n\t\trgb[3] = 1;\n\n\t\treturn rgb;\n\t} else {\n\t\treturn null;\n\t}\n\n\tfor (i = 0; i < 3; i++) {\n\t\trgb[i] = clamp(rgb[i], 0, 255);\n\t}\n\trgb[3] = clamp(rgb[3], 0, 1);\n\n\treturn rgb;\n};\n\ncs.get.hsl = function (string) {\n\tif (!string) {\n\t\treturn null;\n\t}\n\n\tvar hsl = /^hsla?\\(\\s*([+-]?(?:\\d*\\.)?\\d+)(?:deg)?\\s*,\\s*([+-]?[\\d\\.]+)%\\s*,\\s*([+-]?[\\d\\.]+)%\\s*(?:,\\s*([+-]?[\\d\\.]+)\\s*)?\\)$/;\n\tvar match = string.match(hsl);\n\n\tif (match) {\n\t\tvar alpha = parseFloat(match[4]);\n\t\tvar h = (parseFloat(match[1]) + 360) % 360;\n\t\tvar s = clamp(parseFloat(match[2]), 0, 100);\n\t\tvar l = clamp(parseFloat(match[3]), 0, 100);\n\t\tvar a = clamp(isNaN(alpha) ? 1 : alpha, 0, 1);\n\n\t\treturn [h, s, l, a];\n\t}\n\n\treturn null;\n};\n\ncs.get.hwb = function (string) {\n\tif (!string) {\n\t\treturn null;\n\t}\n\n\tvar hwb = /^hwb\\(\\s*([+-]?\\d*[\\.]?\\d+)(?:deg)?\\s*,\\s*([+-]?[\\d\\.]+)%\\s*,\\s*([+-]?[\\d\\.]+)%\\s*(?:,\\s*([+-]?[\\d\\.]+)\\s*)?\\)$/;\n\tvar match = string.match(hwb);\n\n\tif (match) {\n\t\tvar alpha = parseFloat(match[4]);\n\t\tvar h = ((parseFloat(match[1]) % 360) + 360) % 360;\n\t\tvar w = clamp(parseFloat(match[2]), 0, 100);\n\t\tvar b = clamp(parseFloat(match[3]), 0, 100);\n\t\tvar a = clamp(isNaN(alpha) ? 1 : alpha, 0, 1);\n\t\treturn [h, w, b, a];\n\t}\n\n\treturn null;\n};\n\ncs.to.hex = function () {\n\tvar rgba = swizzle(arguments);\n\n\treturn (\n\t\t'#' +\n\t\thexDouble(rgba[0]) +\n\t\thexDouble(rgba[1]) +\n\t\thexDouble(rgba[2]) +\n\t\t(rgba[3] < 1\n\t\t\t? (hexDouble(Math.round(rgba[3] * 255)))\n\t\t\t: '')\n\t);\n};\n\ncs.to.rgb = function () {\n\tvar rgba = swizzle(arguments);\n\n\treturn rgba.length < 4 || rgba[3] === 1\n\t\t? 'rgb(' + Math.round(rgba[0]) + ', ' + Math.round(rgba[1]) + ', ' + Math.round(rgba[2]) + ')'\n\t\t: 'rgba(' + Math.round(rgba[0]) + ', ' + Math.round(rgba[1]) + ', ' + Math.round(rgba[2]) + ', ' + rgba[3] + ')';\n};\n\ncs.to.rgb.percent = function () {\n\tvar rgba = swizzle(arguments);\n\n\tvar r = Math.round(rgba[0] / 255 * 100);\n\tvar g = Math.round(rgba[1] / 255 * 100);\n\tvar b = Math.round(rgba[2] / 255 * 100);\n\n\treturn rgba.length < 4 || rgba[3] === 1\n\t\t? 'rgb(' + r + '%, ' + g + '%, ' + b + '%)'\n\t\t: 'rgba(' + r + '%, ' + g + '%, ' + b + '%, ' + rgba[3] + ')';\n};\n\ncs.to.hsl = function () {\n\tvar hsla = swizzle(arguments);\n\treturn hsla.length < 4 || hsla[3] === 1\n\t\t? 'hsl(' + hsla[0] + ', ' + hsla[1] + '%, ' + hsla[2] + '%)'\n\t\t: 'hsla(' + hsla[0] + ', ' + hsla[1] + '%, ' + hsla[2] + '%, ' + hsla[3] + ')';\n};\n\n// hwb is a bit different than rgb(a) & hsl(a) since there is no alpha specific syntax\n// (hwb have alpha optional & 1 is default value)\ncs.to.hwb = function () {\n\tvar hwba = swizzle(arguments);\n\n\tvar a = '';\n\tif (hwba.length >= 4 && hwba[3] !== 1) {\n\t\ta = ', ' + hwba[3];\n\t}\n\n\treturn 'hwb(' + hwba[0] + ', ' + hwba[1] + '%, ' + hwba[2] + '%' + a + ')';\n};\n\ncs.to.keyword = function (rgb) {\n\treturn reverseNames[rgb.slice(0, 3)];\n};\n\n// helpers\nfunction clamp(num, min, max) {\n\treturn Math.min(Math.max(min, num), max);\n}\n\nfunction hexDouble(num) {\n\tvar str = num.toString(16).toUpperCase();\n\treturn (str.length < 2) ? '0' + str : str;\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/color-string/index.js\n// module id = 17\n// module chunks = 0 1","'use strict';\n\nvar isArrayish = require('is-arrayish');\n\nvar concat = Array.prototype.concat;\nvar slice = Array.prototype.slice;\n\nvar swizzle = module.exports = function swizzle(args) {\n\tvar results = [];\n\n\tfor (var i = 0, len = args.length; i < len; i++) {\n\t\tvar arg = args[i];\n\n\t\tif (isArrayish(arg)) {\n\t\t\t// http://jsperf.com/javascript-array-concat-vs-push/98\n\t\t\tresults = concat.call(results, slice.call(arg));\n\t\t} else {\n\t\t\tresults.push(arg);\n\t\t}\n\t}\n\n\treturn results;\n};\n\nswizzle.wrap = function (fn) {\n\treturn function () {\n\t\treturn fn(swizzle(arguments));\n\t};\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/simple-swizzle/index.js\n// module id = 18\n// module chunks = 0 1","'use strict';\n\nmodule.exports = function isArrayish(obj) {\n\tif (!obj) {\n\t\treturn false;\n\t}\n\n\treturn obj instanceof Array || Array.isArray(obj) ||\n\t\t(obj.length >= 0 && obj.splice instanceof Function);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/is-arrayish/index.js\n// module id = 19\n// module chunks = 0 1","var conversions = require('./conversions');\nvar route = require('./route');\n\nvar convert = {};\n\nvar models = Object.keys(conversions);\n\nfunction wrapRaw(fn) {\n\tvar wrappedFn = function (args) {\n\t\tif (args === undefined || args === null) {\n\t\t\treturn args;\n\t\t}\n\n\t\tif (arguments.length > 1) {\n\t\t\targs = Array.prototype.slice.call(arguments);\n\t\t}\n\n\t\treturn fn(args);\n\t};\n\n\t// preserve .conversion property if there is one\n\tif ('conversion' in fn) {\n\t\twrappedFn.conversion = fn.conversion;\n\t}\n\n\treturn wrappedFn;\n}\n\nfunction wrapRounded(fn) {\n\tvar wrappedFn = function (args) {\n\t\tif (args === undefined || args === null) {\n\t\t\treturn args;\n\t\t}\n\n\t\tif (arguments.length > 1) {\n\t\t\targs = Array.prototype.slice.call(arguments);\n\t\t}\n\n\t\tvar result = fn(args);\n\n\t\t// we're assuming the result is an array here.\n\t\t// see notice in conversions.js; don't use box types\n\t\t// in conversion functions.\n\t\tif (typeof result === 'object') {\n\t\t\tfor (var len = result.length, i = 0; i < len; i++) {\n\t\t\t\tresult[i] = Math.round(result[i]);\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t};\n\n\t// preserve .conversion property if there is one\n\tif ('conversion' in fn) {\n\t\twrappedFn.conversion = fn.conversion;\n\t}\n\n\treturn wrappedFn;\n}\n\nmodels.forEach(function (fromModel) {\n\tconvert[fromModel] = {};\n\n\tObject.defineProperty(convert[fromModel], 'channels', {value: conversions[fromModel].channels});\n\tObject.defineProperty(convert[fromModel], 'labels', {value: conversions[fromModel].labels});\n\n\tvar routes = route(fromModel);\n\tvar routeModels = Object.keys(routes);\n\n\trouteModels.forEach(function (toModel) {\n\t\tvar fn = routes[toModel];\n\n\t\tconvert[fromModel][toModel] = wrapRounded(fn);\n\t\tconvert[fromModel][toModel].raw = wrapRaw(fn);\n\t});\n});\n\nmodule.exports = convert;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/color-convert/index.js\n// module id = 20\n// module chunks = 0 1","var conversions = require('./conversions');\n\n/*\n\tthis function routes a model to all other models.\n\n\tall functions that are routed have a property `.conversion` attached\n\tto the returned synthetic function. This property is an array\n\tof strings, each with the steps in between the 'from' and 'to'\n\tcolor models (inclusive).\n\n\tconversions that are not possible simply are not included.\n*/\n\nfunction buildGraph() {\n\tvar graph = {};\n\t// https://jsperf.com/object-keys-vs-for-in-with-closure/3\n\tvar models = Object.keys(conversions);\n\n\tfor (var len = models.length, i = 0; i < len; i++) {\n\t\tgraph[models[i]] = {\n\t\t\t// http://jsperf.com/1-vs-infinity\n\t\t\t// micro-opt, but this is simple.\n\t\t\tdistance: -1,\n\t\t\tparent: null\n\t\t};\n\t}\n\n\treturn graph;\n}\n\n// https://en.wikipedia.org/wiki/Breadth-first_search\nfunction deriveBFS(fromModel) {\n\tvar graph = buildGraph();\n\tvar queue = [fromModel]; // unshift -> queue -> pop\n\n\tgraph[fromModel].distance = 0;\n\n\twhile (queue.length) {\n\t\tvar current = queue.pop();\n\t\tvar adjacents = Object.keys(conversions[current]);\n\n\t\tfor (var len = adjacents.length, i = 0; i < len; i++) {\n\t\t\tvar adjacent = adjacents[i];\n\t\t\tvar node = graph[adjacent];\n\n\t\t\tif (node.distance === -1) {\n\t\t\t\tnode.distance = graph[current].distance + 1;\n\t\t\t\tnode.parent = current;\n\t\t\t\tqueue.unshift(adjacent);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn graph;\n}\n\nfunction link(from, to) {\n\treturn function (args) {\n\t\treturn to(from(args));\n\t};\n}\n\nfunction wrapConversion(toModel, graph) {\n\tvar path = [graph[toModel].parent, toModel];\n\tvar fn = conversions[graph[toModel].parent][toModel];\n\n\tvar cur = graph[toModel].parent;\n\twhile (graph[cur].parent) {\n\t\tpath.unshift(graph[cur].parent);\n\t\tfn = link(conversions[graph[cur].parent][cur], fn);\n\t\tcur = graph[cur].parent;\n\t}\n\n\tfn.conversion = path;\n\treturn fn;\n}\n\nmodule.exports = function (fromModel) {\n\tvar graph = deriveBFS(fromModel);\n\tvar conversion = {};\n\n\tvar models = Object.keys(graph);\n\tfor (var len = models.length, i = 0; i < len; i++) {\n\t\tvar toModel = models[i];\n\t\tvar node = graph[toModel];\n\n\t\tif (node.parent === null) {\n\t\t\t// no possible conversion, or this node is the source model.\n\t\t\tcontinue;\n\t\t}\n\n\t\tconversion[toModel] = wrapConversion(toModel, graph);\n\t}\n\n\treturn conversion;\n};\n\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/color-convert/route.js\n// module id = 21\n// module chunks = 0 1","'use strict';\n\nimport $ from 'jquery';\nimport ColorItem from './ColorItem';\n\n/**\n * Handles everything related to the colorpicker color\n * @ignore\n */\nclass ColorHandler {\n /**\n * @param {Colorpicker} colorpicker\n */\n constructor(colorpicker) {\n /**\n * @type {Colorpicker}\n */\n this.colorpicker = colorpicker;\n }\n\n /**\n * @returns {*|String|ColorItem}\n */\n get fallback() {\n return this.colorpicker.options.fallbackColor ?\n this.colorpicker.options.fallbackColor : (this.hasColor() ? this.color : null);\n }\n\n /**\n * @returns {String|null}\n */\n get format() {\n if (this.colorpicker.options.format) {\n return this.colorpicker.options.format;\n }\n\n if (this.hasColor() && this.color.hasTransparency() && this.color.format.match(/^hex/)) {\n return this.isAlphaEnabled() ? 'rgba' : 'hex';\n }\n\n if (this.hasColor()) {\n return this.color.format;\n }\n\n return 'rgb';\n }\n\n /**\n * Internal color getter\n *\n * @type {ColorItem|null}\n */\n get color() {\n return this.colorpicker.element.data('color');\n }\n\n /**\n * Internal color setter\n *\n * @ignore\n * @param {ColorItem|null} value\n */\n set color(value) {\n this.colorpicker.element.data('color', value);\n\n if ((value instanceof ColorItem) && (this.colorpicker.options.format === 'auto')) {\n // If format is 'auto', use the first parsed one from now on\n this.colorpicker.options.format = this.color.format;\n }\n }\n\n bind() {\n // if the color option is set\n if (this.colorpicker.options.color) {\n this.color = this.createColor(this.colorpicker.options.color);\n return;\n }\n\n // if element[color] is empty and the input has a value\n if (!this.color && !!this.colorpicker.inputHandler.getValue()) {\n this.color = this.createColor(\n this.colorpicker.inputHandler.getValue(), this.colorpicker.options.autoInputFallback\n );\n }\n }\n\n unbind() {\n this.colorpicker.element.removeData('color');\n }\n\n /**\n * Returns the color string from the input value or the 'data-color' attribute of the input or element.\n * If empty, it returns the defaultValue parameter.\n *\n * @returns {String|*}\n */\n getColorString() {\n if (!this.hasColor()) {\n return '';\n }\n\n return this.color.string(this.format);\n }\n\n /**\n * Sets the color value\n *\n * @param {String|ColorItem} val\n */\n setColorString(val) {\n let color = val ? this.createColor(val) : null;\n\n this.color = color ? color : null;\n }\n\n /**\n * Creates a new color using the widget instance options (fallbackColor, format).\n *\n * @fires Colorpicker#colorpickerInvalid\n * @param {*} val\n * @param {boolean} fallbackOnInvalid\n * @returns {ColorItem}\n */\n createColor(val, fallbackOnInvalid = true) {\n let color = new ColorItem(this.resolveColorDelegate(val), this.format);\n\n if (!color.isValid()) {\n if (fallbackOnInvalid) {\n color = this.getFallbackColor();\n }\n\n /**\n * (Colorpicker) Fired when the color is invalid and the fallback color is going to be used.\n *\n * @event Colorpicker#colorpickerInvalid\n */\n this.colorpicker.trigger('colorpickerInvalid', color, val);\n }\n\n if (!this.isAlphaEnabled()) {\n // Alpha is disabled\n color.alpha = 1;\n }\n\n return color;\n }\n\n getFallbackColor() {\n if (this.fallback && (this.fallback === this.color)) {\n return this.color;\n }\n\n let fallback = this.resolveColorDelegate(this.fallback);\n let color = new ColorItem(fallback, this.format);\n\n if (!color.isValid()) {\n console.warn('The fallback color is invalid. Falling back to the previous color or black if any.');\n return this.color ? this.color : new ColorItem('#000000', this.format);\n }\n\n return color;\n }\n\n /**\n * @returns {ColorItem}\n */\n assureColor() {\n if (!this.hasColor()) {\n this.color = this.getFallbackColor();\n }\n\n return this.color;\n }\n\n /**\n * Delegates the color resolution to the colorpicker extensions.\n *\n * @param {String|*} color\n * @param {boolean} realColor if true, the color should resolve into a real (not named) color code\n * @returns {ColorItem|String|*|null}\n */\n resolveColorDelegate(color, realColor = true) {\n let extResolvedColor = false;\n\n $.each(this.colorpicker.extensions, function (name, ext) {\n if (extResolvedColor !== false) {\n // skip if resolved\n return;\n }\n extResolvedColor = ext.resolveColor(color, realColor);\n });\n\n return extResolvedColor ? extResolvedColor : color;\n }\n\n /**\n * Checks if there is a color object, that it is valid and it is not a fallback\n * @returns {boolean}\n */\n isInvalidColor() {\n return !this.hasColor() || !this.color.isValid();\n }\n\n /**\n * Returns true if the useAlpha option is exactly true, false otherwise\n * @returns {boolean}\n */\n isAlphaEnabled() {\n return (this.colorpicker.options.useAlpha !== false);\n }\n\n /**\n * Returns true if the current color object is an instance of Color, false otherwise.\n * @returns {boolean}\n */\n hasColor() {\n return this.color instanceof ColorItem;\n }\n}\n\nexport default ColorHandler;\n\n\n\n// WEBPACK FOOTER //\n// ./src/js/ColorHandler.js","'use strict';\n\nimport $ from 'jquery';\n\n/**\n * Handles everything related to the colorpicker UI\n * @ignore\n */\nclass PickerHandler {\n /**\n * @param {Colorpicker} colorpicker\n */\n constructor(colorpicker) {\n /**\n * @type {Colorpicker}\n */\n this.colorpicker = colorpicker;\n /**\n * @type {jQuery}\n */\n this.picker = null;\n }\n\n get options() {\n return this.colorpicker.options;\n }\n\n get color() {\n return this.colorpicker.colorHandler.color;\n }\n\n bind() {\n /**\n * @type {jQuery|HTMLElement}\n */\n let picker = this.picker = $(this.options.template);\n\n if (this.options.customClass) {\n picker.addClass(this.options.customClass);\n }\n\n if (this.options.horizontal) {\n picker.addClass('colorpicker-horizontal');\n }\n\n if (this._supportsAlphaBar()) {\n this.options.useAlpha = true;\n picker.addClass('colorpicker-with-alpha');\n } else {\n this.options.useAlpha = false;\n }\n }\n\n attach() {\n // Inject the colorpicker element into the DOM\n let pickerParent = this.colorpicker.container ? this.colorpicker.container : null;\n\n if (pickerParent) {\n this.picker.appendTo(pickerParent);\n }\n }\n\n unbind() {\n this.picker.remove();\n }\n\n _supportsAlphaBar() {\n return (\n (this.options.useAlpha || (this.colorpicker.colorHandler.hasColor() && this.color.hasTransparency())) &&\n (this.options.useAlpha !== false) &&\n (!this.options.format || (this.options.format && !this.options.format.match(/^hex([36])?$/i)))\n );\n }\n\n /**\n * Changes the color adjustment bars using the current color object information.\n */\n update() {\n if (!this.colorpicker.colorHandler.hasColor()) {\n return;\n }\n\n let vertical = (this.options.horizontal !== true),\n slider = vertical ? this.options.sliders : this.options.slidersHorz;\n\n let saturationGuide = this.picker.find('.colorpicker-saturation .colorpicker-guide'),\n hueGuide = this.picker.find('.colorpicker-hue .colorpicker-guide'),\n alphaGuide = this.picker.find('.colorpicker-alpha .colorpicker-guide');\n\n let hsva = this.color.toHsvaRatio();\n\n // Set guides position\n if (hueGuide.length) {\n hueGuide.css(vertical ? 'top' : 'left', (vertical ? slider.hue.maxTop : slider.hue.maxLeft) * (1 - hsva.h));\n }\n if (alphaGuide.length) {\n alphaGuide.css(vertical ? 'top' : 'left', (vertical ? slider.alpha.maxTop : slider.alpha.maxLeft) * (1 - hsva.a));\n }\n if (saturationGuide.length) {\n saturationGuide.css({\n 'top': slider.saturation.maxTop - hsva.v * slider.saturation.maxTop,\n 'left': hsva.s * slider.saturation.maxLeft\n });\n }\n\n // Set saturation hue background\n this.picker.find('.colorpicker-saturation')\n .css('backgroundColor', this.color.getCloneHueOnly().toHexString()); // we only need hue\n\n // Set alpha color gradient\n let hexColor = this.color.toHexString();\n let alphaBg = '';\n\n if (this.options.horizontal) {\n alphaBg = `linear-gradient(to right, ${hexColor} 0%, transparent 100%)`;\n } else {\n alphaBg = `linear-gradient(to bottom, ${hexColor} 0%, transparent 100%)`;\n }\n\n this.picker.find('.colorpicker-alpha-color').css('background', alphaBg);\n }\n}\n\nexport default PickerHandler;\n\n\n\n// WEBPACK FOOTER //\n// ./src/js/PickerHandler.js","'use strict';\n\n/**\n * Handles everything related to the colorpicker addon\n * @ignore\n */\nclass AddonHandler {\n /**\n * @param {Colorpicker} colorpicker\n */\n constructor(colorpicker) {\n /**\n * @type {Colorpicker}\n */\n this.colorpicker = colorpicker;\n /**\n * @type {jQuery}\n */\n this.addon = null;\n }\n\n hasAddon() {\n return !!this.addon;\n }\n\n bind() {\n /**\n * @type {*|jQuery}\n */\n this.addon = this.colorpicker.options.addon ?\n this.colorpicker.element.find(this.colorpicker.options.addon) : null;\n\n if (this.addon && (this.addon.length === 0)) {\n // not found\n this.addon = null;\n }\n }\n\n unbind() {\n if (this.hasAddon()) {\n this.addon.off('.colorpicker');\n }\n }\n\n /**\n * If the addon element is present, its background color is updated\n */\n update() {\n if (!this.colorpicker.colorHandler.hasColor() || !this.hasAddon()) {\n return;\n }\n\n let colorStr = this.colorpicker.colorHandler.getColorString();\n let styles = {'background': colorStr};\n\n let icn = this.addon.find('i').eq(0);\n\n if (icn.length > 0) {\n icn.css(styles);\n } else {\n this.addon.css(styles);\n }\n }\n}\n\nexport default AddonHandler;\n\n\n\n// WEBPACK FOOTER //\n// ./src/js/AddonHandler.js"],"sourceRoot":""} \ No newline at end of file diff --git a/vendor/bootstrap-colorpicker/js/bootstrap-colorpicker.min.js b/vendor/bootstrap-colorpicker/js/bootstrap-colorpicker.min.js new file mode 100644 index 00000000..3243ba80 --- /dev/null +++ b/vendor/bootstrap-colorpicker/js/bootstrap-colorpicker.min.js @@ -0,0 +1,10 @@ +/*! + * Bootstrap Colorpicker - Bootstrap Colorpicker is a modular color picker plugin for Bootstrap 4. + * @package bootstrap-colorpicker + * @version v3.1.2 + * @license MIT + * @link https://farbelous.github.io/bootstrap-colorpicker/ + * @link https://github.com/farbelous/bootstrap-colorpicker.git + */ +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("jquery")):"function"==typeof define&&define.amd?define("bootstrap-colorpicker",["jquery"],t):"object"==typeof exports?exports["bootstrap-colorpicker"]=t(require("jquery")):e["bootstrap-colorpicker"]=t(e.jQuery)}("undefined"!=typeof self?self:this,function(e){return function(e){function t(r){if(o[r])return o[r].exports;var n=o[r]={i:r,l:!1,exports:{}};return e[r].call(n.exports,n,n.exports,t),n.l=!0,n.exports}var o={};return t.m=e,t.c=o,t.d=function(e,o,r){t.o(e,o)||Object.defineProperty(e,o,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var o=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(o,"a",o),o},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=7)}([function(t,o){t.exports=e},function(e,t,o){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var o=0;o1&&void 0!==arguments[1]?arguments[1]:{};if(r(this,e),this.colorpicker=t,this.options=o,!this.colorpicker.element||!this.colorpicker.element.length)throw new Error("Extension: this.colorpicker.element is not valid");this.colorpicker.element.on("colorpickerCreate.colorpicker-ext",a.default.proxy(this.onCreate,this)),this.colorpicker.element.on("colorpickerDestroy.colorpicker-ext",a.default.proxy(this.onDestroy,this)),this.colorpicker.element.on("colorpickerUpdate.colorpicker-ext",a.default.proxy(this.onUpdate,this)),this.colorpicker.element.on("colorpickerChange.colorpicker-ext",a.default.proxy(this.onChange,this)),this.colorpicker.element.on("colorpickerInvalid.colorpicker-ext",a.default.proxy(this.onInvalid,this)),this.colorpicker.element.on("colorpickerShow.colorpicker-ext",a.default.proxy(this.onShow,this)),this.colorpicker.element.on("colorpickerHide.colorpicker-ext",a.default.proxy(this.onHide,this)),this.colorpicker.element.on("colorpickerEnable.colorpicker-ext",a.default.proxy(this.onEnable,this)),this.colorpicker.element.on("colorpickerDisable.colorpicker-ext",a.default.proxy(this.onDisable,this))}return n(e,[{key:"resolveColor",value:function(e){!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return!1}},{key:"onCreate",value:function(e){}},{key:"onDestroy",value:function(e){this.colorpicker.element.off(".colorpicker-ext")}},{key:"onUpdate",value:function(e){}},{key:"onChange",value:function(e){}},{key:"onInvalid",value:function(e){}},{key:"onHide",value:function(e){}},{key:"onShow",value:function(e){}},{key:"onDisable",value:function(e){}},{key:"onEnable",value:function(e){}}]),e}();t.default=l},function(e,t,o){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0}),t.ColorItem=t.HSVAColor=void 0;var n=function(){function e(e,t){for(var o=0;o0&&void 0!==arguments[0]?arguments[0]:null,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;r(this,e),this.replace(t,o)}return n(e,[{key:"api",value:function(t){for(var o=arguments.length,r=Array(o>1?o-1:0),n=1;n1&&void 0!==arguments[1]?arguments[1]:null;if(o=e.sanitizeFormat(o),this._original={color:t,format:o,valid:!0},this._color=e.parse(t),null===this._color)return this._color=(0,a.default)(),void(this._original.valid=!1);this._format=o||(e.isHex(t)?"hex":this._color.model)}},{key:"isValid",value:function(){return!0===this._original.valid}},{key:"setHueRatio",value:function(e){this.hue=360*(1-e)}},{key:"setSaturationRatio",value:function(e){this.saturation=100*e}},{key:"setValueRatio",value:function(e){this.value=100*(1-e)}},{key:"setAlphaRatio",value:function(e){this.alpha=1-e}},{key:"isDesaturated",value:function(){return 0===this.saturation}},{key:"isTransparent",value:function(){return 0===this.alpha}},{key:"hasTransparency",value:function(){return this.hasAlpha()&&this.alpha<1}},{key:"hasAlpha",value:function(){return!isNaN(this.alpha)}},{key:"toObject",value:function(){return new l(this.hue,this.saturation,this.value,this.alpha)}},{key:"toHsva",value:function(){return this.toObject()}},{key:"toHsvaRatio",value:function(){return new l(this.hue/360,this.saturation/100,this.value/100,this.alpha)}},{key:"toString",value:function(){return this.string()}},{key:"string",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(!(t=e.sanitizeFormat(t||this.format)))return this._color.round().string();if(void 0===this._color[t])throw new Error("Unsupported color format: '"+t+"'");var o=this._color[t]();return o.round?o.round().string():o}},{key:"equals",value:function(t){return t=t instanceof e?t:new e(t),!(!t.isValid()||!this.isValid())&&(this.hue===t.hue&&this.saturation===t.saturation&&this.value===t.value&&this.alpha===t.alpha)}},{key:"getClone",value:function(){return new e(this._color,this.format)}},{key:"getCloneHueOnly",value:function(){return new e([this.hue,100,100,1],this.format)}},{key:"getCloneOpaque",value:function(){return new e(this._color.alpha(1),this.format)}},{key:"toRgbString",value:function(){return this.string("rgb")}},{key:"toHexString",value:function(){return this.string("hex")}},{key:"toHslString",value:function(){return this.string("hsl")}},{key:"isDark",value:function(){return this._color.isDark()}},{key:"isLight",value:function(){return this._color.isLight()}},{key:"generate",value:function(t){var o=[];if(Array.isArray(t))o=t;else{if(!e.colorFormulas.hasOwnProperty(t))throw new Error("No color formula found with the name '"+t+"'.");o=e.colorFormulas[t]}var r=[],n=this._color,i=this.format;return o.forEach(function(t){var o=[t?(n.hue()+t)%360:n.hue(),n.saturationv(),n.value(),n.alpha()];r.push(new e(o,i))}),r}},{key:"hue",get:function(){return this._color.hue()},set:function(e){this._color=this._color.hue(e)}},{key:"saturation",get:function(){return this._color.saturationv()},set:function(e){this._color=this._color.saturationv(e)}},{key:"value",get:function(){return this._color.value()},set:function(e){this._color=this._color.value(e)}},{key:"alpha",get:function(){var e=this._color.alpha();return isNaN(e)?1:e},set:function(e){this._color=this._color.alpha(Math.round(100*e)/100)}},{key:"format",get:function(){return this._format?this._format:this._color.model},set:function(t){this._format=e.sanitizeFormat(t)}}],[{key:"parse",value:function(t){if(t instanceof a.default)return t;if(t instanceof e)return t._color;var o=null;if(null===(t=t instanceof l?[t.h,t.s,t.v,isNaN(t.a)?1:t.a]:e.sanitizeString(t)))return null;Array.isArray(t)&&(o="hsv");try{return(0,a.default)(t,o)}catch(e){return null}}},{key:"sanitizeString",value:function(e){return"string"==typeof e||e instanceof String?e.match(/^[0-9a-f]{2,}$/i)?"#"+e:"transparent"===e.toLowerCase()?"#FFFFFF00":e:e}},{key:"isHex",value:function(e){return("string"==typeof e||e instanceof String)&&!!e.match(/^#?[0-9a-f]{2,}$/i)}},{key:"sanitizeFormat",value:function(e){switch(e){case"hex":case"hex3":case"hex4":case"hex6":case"hex8":return"hex";case"rgb":case"rgba":case"keyword":case"name":return"rgb";case"hsl":case"hsla":case"hsv":case"hsva":case"hwb":case"hwba":return"hsl";default:return""}}}]),e}();s.colorFormulas={complementary:[180],triad:[0,120,240],tetrad:[0,90,180,270],splitcomplement:[0,72,216]},t.default=s,t.HSVAColor=l,t.ColorItem=s},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={bar_size_short:16,base_margin:6,columns:6},n=r.bar_size_short*r.columns+r.base_margin*(r.columns-1);t.default={customClass:null,color:!1,fallbackColor:!1,format:"auto",horizontal:!1,inline:!1,container:!1,popover:{animation:!0,placement:"bottom",fallbackPlacement:"flip"},debug:!1,input:"input",addon:".colorpicker-input-addon",autoInputFallback:!0,useHashPrefix:!0,useAlpha:!0,template:'
\n
\n
\n
\n
\n \n
\n
',extensions:[{name:"preview",options:{showText:!0}}],sliders:{saturation:{selector:".colorpicker-saturation",maxLeft:n,maxTop:n,callLeft:"setSaturationRatio",callTop:"setValueRatio"},hue:{selector:".colorpicker-hue",maxLeft:0,maxTop:n,callLeft:!1,callTop:"setHueRatio"},alpha:{selector:".colorpicker-alpha",childSelector:".colorpicker-alpha-color",maxLeft:0,maxTop:n,callLeft:!1,callTop:"setAlphaRatio"}},slidersHorz:{saturation:{selector:".colorpicker-saturation",maxLeft:n,maxTop:n,callLeft:"setSaturationRatio",callTop:"setValueRatio"},hue:{selector:".colorpicker-hue",maxLeft:n,maxTop:0,callLeft:"setHueRatio",callTop:!1},alpha:{selector:".colorpicker-alpha",childSelector:".colorpicker-alpha-color",maxLeft:n,maxTop:0,callLeft:"setAlphaRatio",callTop:!1}}}},function(e,t,o){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s=function(){function e(e,t){for(var o=0;o1&&void 0!==arguments[1]?arguments[1]:{};n(this,t);var r=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,p.default.extend(!0,{},f,o)));return Array.isArray(r.options.colors)||"object"===l(r.options.colors)||(r.options.colors=null),r}return a(t,e),s(t,[{key:"colors",get:function(){return this.options.colors}}]),s(t,[{key:"getLength",value:function(){return this.options.colors?Array.isArray(this.options.colors)?this.options.colors.length:"object"===l(this.options.colors)?Object.keys(this.options.colors).length:0:0}},{key:"resolveColor",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return!(this.getLength()<=0)&&(Array.isArray(this.options.colors)?this.options.colors.indexOf(e)>=0?e:this.options.colors.indexOf(e.toUpperCase())>=0?e.toUpperCase():this.options.colors.indexOf(e.toLowerCase())>=0&&e.toLowerCase():"object"===l(this.options.colors)&&(!this.options.namesAsValues||t?this.getValue(e,!1):this.getName(e,this.getName("#"+e))))}},{key:"getName",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if("string"!=typeof e||!this.options.colors)return t;for(var o in this.options.colors)if(this.options.colors.hasOwnProperty(o)&&this.options.colors[o].toLowerCase()===e.toLowerCase())return o;return t}},{key:"getValue",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return"string"==typeof e&&this.options.colors&&this.options.colors.hasOwnProperty(e)?this.options.colors[e]:t}}]),t}(u.default);t.default=d},function(e,t,o){"use strict";e.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},function(e,t,o){function r(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)+Math.pow(e[2]-t[2],2)}var n=o(5),i={};for(var a in n)n.hasOwnProperty(a)&&(i[n[a]]=a);var l=e.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(var s in l)if(l.hasOwnProperty(s)){if(!("channels"in l[s]))throw new Error("missing channels property: "+s);if(!("labels"in l[s]))throw new Error("missing channel labels property: "+s);if(l[s].labels.length!==l[s].channels)throw new Error("channel and label counts mismatch: "+s);var c=l[s].channels,u=l[s].labels;delete l[s].channels,delete l[s].labels,Object.defineProperty(l[s],"channels",{value:c}),Object.defineProperty(l[s],"labels",{value:u})}l.rgb.hsl=function(e){var t,o,r,n=e[0]/255,i=e[1]/255,a=e[2]/255,l=Math.min(n,i,a),s=Math.max(n,i,a),c=s-l;return s===l?t=0:n===s?t=(i-a)/c:i===s?t=2+(a-n)/c:a===s&&(t=4+(n-i)/c),t=Math.min(60*t,360),t<0&&(t+=360),r=(l+s)/2,o=s===l?0:r<=.5?c/(s+l):c/(2-s-l),[t,100*o,100*r]},l.rgb.hsv=function(e){var t,o,r,n,i,a=e[0]/255,l=e[1]/255,s=e[2]/255,c=Math.max(a,l,s),u=c-Math.min(a,l,s),h=function(e){return(c-e)/6/u+.5};return 0===u?n=i=0:(i=u/c,t=h(a),o=h(l),r=h(s),a===c?n=r-o:l===c?n=1/3+t-r:s===c&&(n=2/3+o-t),n<0?n+=1:n>1&&(n-=1)),[360*n,100*i,100*c]},l.rgb.hwb=function(e){var t=e[0],o=e[1],r=e[2],n=l.rgb.hsl(e)[0],i=1/255*Math.min(t,Math.min(o,r));return r=1-1/255*Math.max(t,Math.max(o,r)),[n,100*i,100*r]},l.rgb.cmyk=function(e){var t,o,r,n,i=e[0]/255,a=e[1]/255,l=e[2]/255;return n=Math.min(1-i,1-a,1-l),t=(1-i-n)/(1-n)||0,o=(1-a-n)/(1-n)||0,r=(1-l-n)/(1-n)||0,[100*t,100*o,100*r,100*n]},l.rgb.keyword=function(e){var t=i[e];if(t)return t;var o,a=1/0;for(var l in n)if(n.hasOwnProperty(l)){var s=n[l],c=r(e,s);c.04045?Math.pow((t+.055)/1.055,2.4):t/12.92,o=o>.04045?Math.pow((o+.055)/1.055,2.4):o/12.92,r=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92,[100*(.4124*t+.3576*o+.1805*r),100*(.2126*t+.7152*o+.0722*r),100*(.0193*t+.1192*o+.9505*r)]},l.rgb.lab=function(e){var t,o,r,n=l.rgb.xyz(e),i=n[0],a=n[1],s=n[2];return i/=95.047,a/=100,s/=108.883,i=i>.008856?Math.pow(i,1/3):7.787*i+16/116,a=a>.008856?Math.pow(a,1/3):7.787*a+16/116,s=s>.008856?Math.pow(s,1/3):7.787*s+16/116,t=116*a-16,o=500*(i-a),r=200*(a-s),[t,o,r]},l.hsl.rgb=function(e){var t,o,r,n,i,a=e[0]/360,l=e[1]/100,s=e[2]/100;if(0===l)return i=255*s,[i,i,i];o=s<.5?s*(1+l):s+l-s*l,t=2*s-o,n=[0,0,0];for(var c=0;c<3;c++)r=a+1/3*-(c-1),r<0&&r++,r>1&&r--,i=6*r<1?t+6*(o-t)*r:2*r<1?o:3*r<2?t+(o-t)*(2/3-r)*6:t,n[c]=255*i;return n},l.hsl.hsv=function(e){var t,o,r=e[0],n=e[1]/100,i=e[2]/100,a=n,l=Math.max(i,.01);return i*=2,n*=i<=1?i:2-i,a*=l<=1?l:2-l,o=(i+n)/2,t=0===i?2*a/(l+a):2*n/(i+n),[r,100*t,100*o]},l.hsv.rgb=function(e){var t=e[0]/60,o=e[1]/100,r=e[2]/100,n=Math.floor(t)%6,i=t-Math.floor(t),a=255*r*(1-o),l=255*r*(1-o*i),s=255*r*(1-o*(1-i));switch(r*=255,n){case 0:return[r,s,a];case 1:return[l,r,a];case 2:return[a,r,s];case 3:return[a,l,r];case 4:return[s,a,r];case 5:return[r,a,l]}},l.hsv.hsl=function(e){var t,o,r,n=e[0],i=e[1]/100,a=e[2]/100,l=Math.max(a,.01);return r=(2-i)*a,t=(2-i)*l,o=i*l,o/=t<=1?t:2-t,o=o||0,r/=2,[n,100*o,100*r]},l.hwb.rgb=function(e){var t,o,r,n,i=e[0]/360,a=e[1]/100,l=e[2]/100,s=a+l;s>1&&(a/=s,l/=s),t=Math.floor(6*i),o=1-l,r=6*i-t,0!=(1&t)&&(r=1-r),n=a+r*(o-a);var c,u,h;switch(t){default:case 6:case 0:c=o,u=n,h=a;break;case 1:c=n,u=o,h=a;break;case 2:c=a,u=o,h=n;break;case 3:c=a,u=n,h=o;break;case 4:c=n,u=a,h=o;break;case 5:c=o,u=a,h=n}return[255*c,255*u,255*h]},l.cmyk.rgb=function(e){var t,o,r,n=e[0]/100,i=e[1]/100,a=e[2]/100,l=e[3]/100;return t=1-Math.min(1,n*(1-l)+l),o=1-Math.min(1,i*(1-l)+l),r=1-Math.min(1,a*(1-l)+l),[255*t,255*o,255*r]},l.xyz.rgb=function(e){var t,o,r,n=e[0]/100,i=e[1]/100,a=e[2]/100;return t=3.2406*n+-1.5372*i+-.4986*a,o=-.9689*n+1.8758*i+.0415*a,r=.0557*n+-.204*i+1.057*a,t=t>.0031308?1.055*Math.pow(t,1/2.4)-.055:12.92*t,o=o>.0031308?1.055*Math.pow(o,1/2.4)-.055:12.92*o,r=r>.0031308?1.055*Math.pow(r,1/2.4)-.055:12.92*r,t=Math.min(Math.max(0,t),1),o=Math.min(Math.max(0,o),1),r=Math.min(Math.max(0,r),1),[255*t,255*o,255*r]},l.xyz.lab=function(e){var t,o,r,n=e[0],i=e[1],a=e[2];return n/=95.047,i/=100,a/=108.883,n=n>.008856?Math.pow(n,1/3):7.787*n+16/116,i=i>.008856?Math.pow(i,1/3):7.787*i+16/116,a=a>.008856?Math.pow(a,1/3):7.787*a+16/116,t=116*i-16,o=500*(n-i),r=200*(i-a),[t,o,r]},l.lab.xyz=function(e){var t,o,r,n=e[0],i=e[1],a=e[2];o=(n+16)/116,t=i/500+o,r=o-a/200;var l=Math.pow(o,3),s=Math.pow(t,3),c=Math.pow(r,3);return o=l>.008856?l:(o-16/116)/7.787,t=s>.008856?s:(t-16/116)/7.787,r=c>.008856?c:(r-16/116)/7.787,t*=95.047,o*=100,r*=108.883,[t,o,r]},l.lab.lch=function(e){var t,o,r,n=e[0],i=e[1],a=e[2];return t=Math.atan2(a,i),o=360*t/2/Math.PI,o<0&&(o+=360),r=Math.sqrt(i*i+a*a),[n,r,o]},l.lch.lab=function(e){var t,o,r,n=e[0],i=e[1],a=e[2];return r=a/360*2*Math.PI,t=i*Math.cos(r),o=i*Math.sin(r),[n,t,o]},l.rgb.ansi16=function(e){var t=e[0],o=e[1],r=e[2],n=1 in arguments?arguments[1]:l.rgb.hsv(e)[2];if(0===(n=Math.round(n/50)))return 30;var i=30+(Math.round(r/255)<<2|Math.round(o/255)<<1|Math.round(t/255));return 2===n&&(i+=60),i},l.hsv.ansi16=function(e){return l.rgb.ansi16(l.hsv.rgb(e),e[2])},l.rgb.ansi256=function(e){var t=e[0],o=e[1],r=e[2];return t===o&&o===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(o/255*5)+Math.round(r/255*5)},l.ansi16.rgb=function(e){var t=e%10;if(0===t||7===t)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];var o=.5*(1+~~(e>50));return[(1&t)*o*255,(t>>1&1)*o*255,(t>>2&1)*o*255]},l.ansi256.rgb=function(e){if(e>=232){var t=10*(e-232)+8;return[t,t,t]}e-=16;var o;return[Math.floor(e/36)/5*255,Math.floor((o=e%36)/6)/5*255,o%6/5*255]},l.rgb.hex=function(e){var t=((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2])),o=t.toString(16).toUpperCase();return"000000".substring(o.length)+o},l.hex.rgb=function(e){var t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];var o=t[0];3===t[0].length&&(o=o.split("").map(function(e){return e+e}).join(""));var r=parseInt(o,16);return[r>>16&255,r>>8&255,255&r]},l.rgb.hcg=function(e){var t,o,r=e[0]/255,n=e[1]/255,i=e[2]/255,a=Math.max(Math.max(r,n),i),l=Math.min(Math.min(r,n),i),s=a-l;return t=s<1?l/(1-s):0,o=s<=0?0:a===r?(n-i)/s%6:a===n?2+(i-r)/s:4+(r-n)/s+4,o/=6,o%=1,[360*o,100*s,100*t]},l.hsl.hcg=function(e){var t=e[1]/100,o=e[2]/100,r=1,n=0;return r=o<.5?2*t*o:2*t*(1-o),r<1&&(n=(o-.5*r)/(1-r)),[e[0],100*r,100*n]},l.hsv.hcg=function(e){var t=e[1]/100,o=e[2]/100,r=t*o,n=0;return r<1&&(n=(o-r)/(1-r)),[e[0],100*r,100*n]},l.hcg.rgb=function(e){var t=e[0]/360,o=e[1]/100,r=e[2]/100;if(0===o)return[255*r,255*r,255*r];var n=[0,0,0],i=t%1*6,a=i%1,l=1-a,s=0;switch(Math.floor(i)){case 0:n[0]=1,n[1]=a,n[2]=0;break;case 1:n[0]=l,n[1]=1,n[2]=0;break;case 2:n[0]=0,n[1]=1,n[2]=a;break;case 3:n[0]=0,n[1]=l,n[2]=1;break;case 4:n[0]=a,n[1]=0,n[2]=1;break;default:n[0]=1,n[1]=0,n[2]=l}return s=(1-o)*r,[255*(o*n[0]+s),255*(o*n[1]+s),255*(o*n[2]+s)]},l.hcg.hsv=function(e){var t=e[1]/100,o=e[2]/100,r=t+o*(1-t),n=0;return r>0&&(n=t/r),[e[0],100*n,100*r]},l.hcg.hsl=function(e){var t=e[1]/100,o=e[2]/100,r=o*(1-t)+.5*t,n=0;return r>0&&r<.5?n=t/(2*r):r>=.5&&r<1&&(n=t/(2*(1-r))),[e[0],100*n,100*r]},l.hcg.hwb=function(e){var t=e[1]/100,o=e[2]/100,r=t+o*(1-t);return[e[0],100*(r-t),100*(1-r)]},l.hwb.hcg=function(e){var t=e[1]/100,o=e[2]/100,r=1-o,n=r-t,i=0;return n<1&&(i=(r-n)/(1-n)),[e[0],100*n,100*i]},l.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},l.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},l.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},l.gray.hsl=l.gray.hsv=function(e){return[0,0,e[0]]},l.gray.hwb=function(e){return[0,100,e[0]]},l.gray.cmyk=function(e){return[0,0,0,e[0]]},l.gray.lab=function(e){return[e[0],0,0]},l.gray.hex=function(e){var t=255&Math.round(e[0]/100*255),o=(t<<16)+(t<<8)+t,r=o.toString(16).toUpperCase();return"000000".substring(r.length)+r},l.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]}},function(e,t,o){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=o(8),a=r(i),l=o(0),s=r(l),c="colorpicker";s.default[c]=a.default,s.default.fn[c]=function(e){var t=Array.prototype.slice.call(arguments,1),o=1===this.length,r=null,i=this.each(function(){var i=(0,s.default)(this),l=i.data(c),u="object"===(void 0===e?"undefined":n(e))?e:{};l||(l=new a.default(this,u),i.data(c,l)),o&&(r=i,"string"==typeof e&&(r="colorpicker"===e?l:s.default.isFunction(l[e])?l[e].apply(l,t):l[e]))});return o?r:i},s.default.fn[c].constructor=a.default},function(e,t,o){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var o=0;o1&&void 0!==arguments[1]?arguments[1]:{},o=new e(this,t);return this.extensions.push(o),o}},{key:"destroy",value:function(){var e=this.color;this.sliderHandler.unbind(),this.inputHandler.unbind(),this.popupHandler.unbind(),this.colorHandler.unbind(),this.addonHandler.unbind(),this.pickerHandler.unbind(),this.element.removeClass("colorpicker-element").removeData("colorpicker","color").off(".colorpicker"),this.trigger("colorpickerDestroy",e)}},{key:"show",value:function(e){this.popupHandler.show(e)}},{key:"hide",value:function(e){this.popupHandler.hide(e)}},{key:"toggle",value:function(e){this.popupHandler.toggle(e)}},{key:"getValue",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=this.colorHandler.color;return t=t instanceof j.default?t:e,t instanceof j.default?t.string(this.format):t}},{key:"setValue",value:function(e){if(!this.isDisabled()){var t=this.colorHandler;t.hasColor()&&e&&t.color.equals(e)||!t.hasColor()&&!e||(t.color=e?t.createColor(e,this.options.autoInputFallback):null,this.trigger("colorpickerChange",t.color,e),this.update())}}},{key:"update",value:function(){this.colorHandler.hasColor()?this.inputHandler.update():this.colorHandler.assureColor(),this.addonHandler.update(),this.pickerHandler.update(),this.trigger("colorpickerUpdate")}},{key:"enable",value:function(){return this.inputHandler.enable(),this.disabled=!1,this.picker.removeClass("colorpicker-disabled"),this.trigger("colorpickerEnable"),!0}},{key:"disable",value:function(){return this.inputHandler.disable(),this.disabled=!0,this.picker.addClass("colorpicker-disabled"),this.trigger("colorpickerDisable"),!0}},{key:"isEnabled",value:function(){return!this.isDisabled()}},{key:"isDisabled",value:function(){return!0===this.disabled}},{key:"trigger",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;this.element.trigger({type:e,colorpicker:this,color:t||this.color,value:o||this.getValue()})}}]),e}();E.extensions=h.default,t.default=E},function(e,t,o){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Palette=t.Swatches=t.Preview=t.Debugger=void 0;var n=o(10),i=r(n),a=o(11),l=r(a),s=o(12),c=r(s),u=o(4),h=r(u);t.Debugger=i.default,t.Preview=l.default,t.Swatches=c.default,t.Palette=h.default,t.default={debugger:i.default,preview:l.default,swatches:c.default,palette:h.default}},function(e,t,o){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var o=0;o1&&void 0!==arguments[1]?arguments[1]:{};n(this,t);var r=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,o));return r.eventCounter=0,r.colorpicker.inputHandler.hasInput()&&r.colorpicker.inputHandler.input.on("change.colorpicker-ext",p.default.proxy(r.onChangeInput,r)),r}return a(t,e),l(t,[{key:"log",value:function(e){for(var t,o=arguments.length,r=Array(o>1?o-1:0),n=1;n1&&void 0!==arguments[1])||arguments[1];return this.log("resolveColor()",e,t),!1}},{key:"onCreate",value:function(e){return this.log("colorpickerCreate"),s(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"onCreate",this).call(this,e)}},{key:"onDestroy",value:function(e){return this.log("colorpickerDestroy"),this.eventCounter=0,this.colorpicker.inputHandler.hasInput()&&this.colorpicker.inputHandler.input.off(".colorpicker-ext"),s(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"onDestroy",this).call(this,e)}},{key:"onUpdate",value:function(e){this.log("colorpickerUpdate")}},{key:"onChangeInput",value:function(e){this.log("input:change.colorpicker",e.value,e.color)}},{key:"onChange",value:function(e){this.log("colorpickerChange",e.value,e.color)}},{key:"onInvalid",value:function(e){this.log("colorpickerInvalid",e.value,e.color)}},{key:"onHide",value:function(e){this.log("colorpickerHide"),this.eventCounter=0}},{key:"onShow",value:function(e){this.log("colorpickerShow")}},{key:"onDisable",value:function(e){this.log("colorpickerDisable")}},{key:"onEnable",value:function(e){this.log("colorpickerEnable")}}]),t}(u.default);t.default=f},function(e,t,o){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var o=0;o1&&void 0!==arguments[1]?arguments[1]:{};n(this,t);var r=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,p.default.extend(!0,{},{template:'
',showText:!0,format:e.format},o)));return r.element=(0,p.default)(r.options.template),r.elementInner=r.element.find("div"),r}return a(t,e),l(t,[{key:"onCreate",value:function(e){s(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"onCreate",this).call(this,e),this.colorpicker.picker.append(this.element)}},{key:"onUpdate",value:function(e){if(s(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"onUpdate",this).call(this,e),!e.color)return void this.elementInner.css("backgroundColor",null).css("color",null).html("");this.elementInner.css("backgroundColor",e.color.toRgbString()),this.options.showText&&(this.elementInner.html(e.color.string(this.options.format||this.colorpicker.format)),e.color.isDark()&&e.color.alpha>.5?this.elementInner.css("color","white"):this.elementInner.css("color","black"))}}]),t}(u.default);t.default=f},function(e,t,o){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var o=0;o\n
\n
',swatchTemplate:''},d=function(e){function t(e){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n(this,t);var r=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,p.default.extend(!0,{},f,o)));return r.element=null,r}return a(t,e),l(t,[{key:"isEnabled",value:function(){return this.getLength()>0}},{key:"onCreate",value:function(e){s(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"onCreate",this).call(this,e),this.isEnabled()&&(this.element=(0,p.default)(this.options.barTemplate),this.load(),this.colorpicker.picker.append(this.element))}},{key:"load",value:function(){var e=this,t=this.colorpicker,o=this.element.find(".colorpicker-swatches--inner"),r=!0===this.options.namesAsValues&&!Array.isArray(this.colors);o.empty(),p.default.each(this.colors,function(n,i){var a=(0,p.default)(e.options.swatchTemplate).attr("data-name",n).attr("data-value",i).attr("title",r?n+": "+i:i).on("mousedown.colorpicker touchstart.colorpicker",function(e){var o=(0,p.default)(this);t.setValue(r?o.attr("data-name"):o.attr("data-value"))});a.find(".colorpicker-swatch--inner").css("background-color",i),o.append(a)}),o.append((0,p.default)(''))}}]),t}(u.default);t.default=d},function(e,t,o){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var o=0;o0)}},{key:"onClickingInside",value:function(e){this.clicking=this.isClickingInside(e)}},{key:"createPopover",value:function(){var e=this.colorpicker;this.popoverTarget=this.hasAddon?this.addon:this.input,e.picker.addClass("colorpicker-bs-popover-content"),this.popoverTarget.popover(l.default.extend(!0,{},c.default.popover,e.options.popover,{trigger:"manual",content:e.picker,html:!0})),this.popoverTip=(0,l.default)(this.popoverTarget.popover("getTipElement").data("bs.popover").tip),this.popoverTip.addClass("colorpicker-bs-popover"),this.popoverTarget.on("shown.bs.popover",l.default.proxy(this.fireShow,this)),this.popoverTarget.on("hidden.bs.popover",l.default.proxy(this.fireHide,this))}},{key:"reposition",value:function(e){this.popoverTarget&&this.isVisible()&&this.popoverTarget.popover("update")}},{key:"toggle",value:function(e){this.isVisible()?this.hide(e):this.show(e)}},{key:"show",value:function(e){if(!(this.isVisible()||this.showing||this.hidding)){this.showing=!0,this.hidding=!1,this.clicking=!1;var t=this.colorpicker;t.lastEvent.alias="show",t.lastEvent.e=e,e&&(!this.hasInput||"color"===this.input.attr("type"))&&e&&e.preventDefault&&(e.stopPropagation(),e.preventDefault()),this.isPopover&&(0,l.default)(this.root).on("resize.colorpicker",l.default.proxy(this.reposition,this)),t.picker.addClass("colorpicker-visible").removeClass("colorpicker-hidden"),this.popoverTarget?this.popoverTarget.popover("show"):this.fireShow()}}},{key:"fireShow",value:function(){this.hidding=!1,this.showing=!1,this.isPopover&&((0,l.default)(this.root.document).on("mousedown.colorpicker touchstart.colorpicker",l.default.proxy(this.hide,this)),(0,l.default)(this.root.document).on("mousedown.colorpicker touchstart.colorpicker",l.default.proxy(this.onClickingInside,this))),this.colorpicker.trigger("colorpickerShow")}},{key:"hide",value:function(e){if(!(this.isHidden()||this.showing||this.hidding)){var t=this.colorpicker,o=this.clicking||this.isClickingInside(e);if(this.hidding=!0,this.showing=!1,this.clicking=!1,t.lastEvent.alias="hide",t.lastEvent.e=e,o)return void(this.hidding=!1);this.popoverTarget?this.popoverTarget.popover("hide"):this.fireHide()}}},{key:"fireHide",value:function(){this.hidding=!1,this.showing=!1;var e=this.colorpicker;e.picker.addClass("colorpicker-hidden").removeClass("colorpicker-visible"),(0,l.default)(this.root).off("resize.colorpicker",l.default.proxy(this.reposition,this)),(0,l.default)(this.root.document).off("mousedown.colorpicker touchstart.colorpicker",l.default.proxy(this.hide,this)),(0,l.default)(this.root.document).off("mousedown.colorpicker touchstart.colorpicker",l.default.proxy(this.onClickingInside,this)),e.trigger("colorpickerHide")}},{key:"focus",value:function(){return this.hasAddon?this.addon.focus():!!this.hasInput&&this.input.focus()}},{key:"isVisible",value:function(){return this.colorpicker.picker.hasClass("colorpicker-visible")&&!this.colorpicker.picker.hasClass("colorpicker-hidden")}},{key:"isHidden",value:function(){return this.colorpicker.picker.hasClass("colorpicker-hidden")&&!this.colorpicker.picker.hasClass("colorpicker-visible")}},{key:"input",get:function(){return this.colorpicker.inputHandler.input}},{key:"hasInput",get:function(){return this.colorpicker.inputHandler.hasInput()}},{key:"addon",get:function(){return this.colorpicker.addonHandler.addon}},{key:"hasAddon",get:function(){return this.colorpicker.addonHandler.hasAddon()}},{key:"isPopover",get:function(){return!this.colorpicker.options.inline&&!!this.popoverTip}}]),e}();t.default=u},function(e,t,o){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var o=0;o0&&void 0!==arguments[0]?arguments[0]:null;return(e=e||this.colorpicker.colorHandler.getColorString())?(e=this.colorpicker.colorHandler.resolveColorDelegate(e,!1),!1===this.colorpicker.options.useHashPrefix&&(e=e.replace(/^#/g,"")),e):""}},{key:"hasInput",value:function(){return!1!==this.input}},{key:"isEnabled",value:function(){return this.hasInput()&&!this.isDisabled()}},{key:"isDisabled",value:function(){return this.hasInput()&&!0===this.input.prop("disabled")}},{key:"disable",value:function(){this.hasInput()&&this.input.prop("disabled",!0)}},{key:"enable",value:function(){this.hasInput()&&this.input.prop("disabled",!1)}},{key:"update",value:function(){this.hasInput()&&(!1===this.colorpicker.options.autoInputFallback&&this.colorpicker.colorHandler.isInvalidColor()||this.setValue(this.getFormattedColor()))}},{key:"onchange",value:function(e){this.colorpicker.lastEvent.alias="input.change",this.colorpicker.lastEvent.e=e;var t=this.getValue();t!==e.value&&this.colorpicker.setValue(t)}},{key:"onkeyup",value:function(e){this.colorpicker.lastEvent.alias="input.keyup",this.colorpicker.lastEvent.e=e;var t=this.getValue();t!==e.value&&this.colorpicker.setValue(t)}}]),e}();t.default=u},function(e,t,o){"use strict";function r(e,t){if(!(this instanceof r))return new r(e,t);if(t&&t in f&&(t=null),t&&!(t in h))throw new Error("Unknown model: "+t);var o,n;if(void 0===e)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(e instanceof r)this.model=e.model,this.color=e.color.slice(),this.valpha=e.valpha;else if("string"==typeof e){var i=u.get(e);if(null===i)throw new Error("Unable to parse color from string: "+e);this.model=i.model,n=h[this.model].channels,this.color=i.value.slice(0,n),this.valpha="number"==typeof i.value[n]?i.value[n]:1}else if(e.length){this.model=t||"rgb",n=h[this.model].channels;var a=p.call(e,0,n);this.color=c(a,n),this.valpha="number"==typeof e[n]?e[n]:1}else if("number"==typeof e)e&=16777215,this.model="rgb",this.color=[e>>16&255,e>>8&255,255&e],this.valpha=1;else{this.valpha=1;var l=Object.keys(e);"alpha"in e&&(l.splice(l.indexOf("alpha"),1),this.valpha="number"==typeof e.alpha?e.alpha:0);var s=l.sort().join("");if(!(s in d))throw new Error("Unable to parse color from object: "+JSON.stringify(e));this.model=d[s];var k=h[this.model].labels,g=[];for(o=0;oo?(t+.05)/(o+.05):(o+.05)/(t+.05)},level:function(e){var t=this.contrast(e);return t>=7.1?"AAA":t>=4.5?"AA":""},isDark:function(){var e=this.rgb().color;return(299*e[0]+587*e[1]+114*e[2])/1e3<128},isLight:function(){return!this.isDark()},negate:function(){for(var e=this.rgb(),t=0;t<3;t++)e.color[t]=255-e.color[t];return e},lighten:function(e){var t=this.hsl();return t.color[2]+=t.color[2]*e,t},darken:function(e){var t=this.hsl();return t.color[2]-=t.color[2]*e,t},saturate:function(e){var t=this.hsl();return t.color[1]+=t.color[1]*e,t},desaturate:function(e){var t=this.hsl();return t.color[1]-=t.color[1]*e,t},whiten:function(e){var t=this.hwb();return t.color[1]+=t.color[1]*e,t},blacken:function(e){var t=this.hwb();return t.color[2]+=t.color[2]*e,t},grayscale:function(){var e=this.rgb().color,t=.3*e[0]+.59*e[1]+.11*e[2];return r.rgb(t,t,t)},fade:function(e){return this.alpha(this.valpha-this.valpha*e)},opaquer:function(e){return this.alpha(this.valpha+this.valpha*e)},rotate:function(e){var t=this.hsl(),o=t.color[0];return o=(o+e)%360,o=o<0?360+o:o,t.color[0]=o,t},mix:function(e,t){if(!e||!e.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof e);var o=e.rgb(),n=this.rgb(),i=void 0===t?.5:t,a=2*i-1,l=o.alpha()-n.alpha(),s=((a*l==-1?a:(a+l)/(1+a*l))+1)/2,c=1-s;return r.rgb(s*o.red()+c*n.red(),s*o.green()+c*n.green(),s*o.blue()+c*n.blue(),o.alpha()*i+n.alpha()*(1-i))}},Object.keys(h).forEach(function(e){if(-1===f.indexOf(e)){var t=h[e].channels;r.prototype[e]=function(){if(this.model===e)return new r(this);if(arguments.length)return new r(arguments,e);var o="number"==typeof arguments[t]?t:this.valpha;return new r(s(h[this.model][e].raw(this.color)).concat(o),e)},r[e]=function(o){return"number"==typeof o&&(o=c(p.call(arguments),t)),new r(o,e)}}}),e.exports=r},function(e,t,o){function r(e,t,o){return Math.min(Math.max(t,e),o)}function n(e){var t=e.toString(16).toUpperCase();return t.length<2?"0"+t:t}var i=o(5),a=o(18),l={};for(var s in i)i.hasOwnProperty(s)&&(l[i[s]]=s);var c=e.exports={to:{},get:{}};c.get=function(e){var t,o,r=e.substring(0,3).toLowerCase();switch(r){case"hsl":t=c.get.hsl(e),o="hsl";break;case"hwb":t=c.get.hwb(e),o="hwb";break;default:t=c.get.rgb(e),o="rgb"}return t?{model:o,value:t}:null},c.get.rgb=function(e){if(!e)return null;var t,o,n,a=/^#([a-f0-9]{3,4})$/i,l=/^#([a-f0-9]{6})([a-f0-9]{2})?$/i,s=/^rgba?\(\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/,c=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/,u=/(\D+)/,h=[0,0,0,1];if(t=e.match(l)){for(n=t[2],t=t[1],o=0;o<3;o++){var p=2*o;h[o]=parseInt(t.slice(p,p+2),16)}n&&(h[3]=Math.round(parseInt(n,16)/255*100)/100)}else if(t=e.match(a)){for(t=t[1],n=t[3],o=0;o<3;o++)h[o]=parseInt(t[o]+t[o],16);n&&(h[3]=Math.round(parseInt(n+n,16)/255*100)/100)}else if(t=e.match(s)){for(o=0;o<3;o++)h[o]=parseInt(t[o+1],0);t[4]&&(h[3]=parseFloat(t[4]))}else{if(!(t=e.match(c)))return(t=e.match(u))?"transparent"===t[1]?[0,0,0,0]:(h=i[t[1]])?(h[3]=1,h):null:null;for(o=0;o<3;o++)h[o]=Math.round(2.55*parseFloat(t[o+1]));t[4]&&(h[3]=parseFloat(t[4]))}for(o=0;o<3;o++)h[o]=r(h[o],0,255);return h[3]=r(h[3],0,1),h},c.get.hsl=function(e){if(!e)return null;var t=/^hsla?\(\s*([+-]?(?:\d*\.)?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/,o=e.match(t);if(o){var n=parseFloat(o[4]);return[(parseFloat(o[1])+360)%360,r(parseFloat(o[2]),0,100),r(parseFloat(o[3]),0,100),r(isNaN(n)?1:n,0,1)]}return null},c.get.hwb=function(e){if(!e)return null;var t=/^hwb\(\s*([+-]?\d*[\.]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/,o=e.match(t);if(o){var n=parseFloat(o[4]);return[(parseFloat(o[1])%360+360)%360,r(parseFloat(o[2]),0,100),r(parseFloat(o[3]),0,100),r(isNaN(n)?1:n,0,1)]}return null},c.to.hex=function(){var e=a(arguments);return"#"+n(e[0])+n(e[1])+n(e[2])+(e[3]<1?n(Math.round(255*e[3])):"")},c.to.rgb=function(){var e=a(arguments);return e.length<4||1===e[3]?"rgb("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+")":"rgba("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+", "+e[3]+")"},c.to.rgb.percent=function(){var e=a(arguments),t=Math.round(e[0]/255*100),o=Math.round(e[1]/255*100),r=Math.round(e[2]/255*100);return e.length<4||1===e[3]?"rgb("+t+"%, "+o+"%, "+r+"%)":"rgba("+t+"%, "+o+"%, "+r+"%, "+e[3]+")"},c.to.hsl=function(){var e=a(arguments);return e.length<4||1===e[3]?"hsl("+e[0]+", "+e[1]+"%, "+e[2]+"%)":"hsla("+e[0]+", "+e[1]+"%, "+e[2]+"%, "+e[3]+")"},c.to.hwb=function(){var e=a(arguments),t="";return e.length>=4&&1!==e[3]&&(t=", "+e[3]),"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+t+")"},c.to.keyword=function(e){return l[e.slice(0,3)]}},function(e,t,o){"use strict";var r=o(19),n=Array.prototype.concat,i=Array.prototype.slice,a=e.exports=function(e){for(var t=[],o=0,a=e.length;o=0&&e.splice instanceof Function)}},function(e,t,o){function r(e){var t=function(t){return void 0===t||null===t?t:(arguments.length>1&&(t=Array.prototype.slice.call(arguments)),e(t))};return"conversion"in e&&(t.conversion=e.conversion),t}function n(e){var t=function(t){if(void 0===t||null===t)return t;arguments.length>1&&(t=Array.prototype.slice.call(arguments));var o=e(t);if("object"==typeof o)for(var r=o.length,n=0;n1&&void 0!==arguments[1])||arguments[1],o=new c.default(this.resolveColorDelegate(e),this.format);return o.isValid()||(t&&(o=this.getFallbackColor()),this.colorpicker.trigger("colorpickerInvalid",o,e)),this.isAlphaEnabled()||(o.alpha=1),o}},{key:"getFallbackColor",value:function(){if(this.fallback&&this.fallback===this.color)return this.color;var e=this.resolveColorDelegate(this.fallback),t=new c.default(e,this.format);return t.isValid()?t:(console.warn("The fallback color is invalid. Falling back to the previous color or black if any."),this.color?this.color:new c.default("#000000",this.format))}},{key:"assureColor",value:function(){return this.hasColor()||(this.color=this.getFallbackColor()),this.color}},{key:"resolveColorDelegate",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=!1;return l.default.each(this.colorpicker.extensions,function(r,n){!1===o&&(o=n.resolveColor(e,t))}),o||e}},{key:"isInvalidColor",value:function(){return!this.hasColor()||!this.color.isValid()}},{key:"isAlphaEnabled",value:function(){return!1!==this.colorpicker.options.useAlpha}},{key:"hasColor",value:function(){return this.color instanceof c.default}},{key:"fallback",get:function(){return this.colorpicker.options.fallbackColor?this.colorpicker.options.fallbackColor:this.hasColor()?this.color:null}},{key:"format",get:function(){return this.colorpicker.options.format?this.colorpicker.options.format:this.hasColor()&&this.color.hasTransparency()&&this.color.format.match(/^hex/)?this.isAlphaEnabled()?"rgba":"hex":this.hasColor()?this.color.format:"rgb"}},{key:"color",get:function(){return this.colorpicker.element.data("color")},set:function(e){this.colorpicker.element.data("color",e),e instanceof c.default&&"auto"===this.colorpicker.options.format&&(this.colorpicker.options.format=this.color.format)}}]),e}();t.default=u},function(e,t,o){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var o=0;o0?o.css(t):this.addon.css(t)}}}]),e}();t.default=i}])}); +//# sourceMappingURL=bootstrap-colorpicker.min.js.map \ No newline at end of file diff --git a/vendor/bootstrap-colorpicker/js/bootstrap-colorpicker.min.js.map b/vendor/bootstrap-colorpicker/js/bootstrap-colorpicker.min.js.map new file mode 100644 index 00000000..f745e1c9 --- /dev/null +++ b/vendor/bootstrap-colorpicker/js/bootstrap-colorpicker.min.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///bootstrap-colorpicker.min.js","webpack:///webpack/bootstrap e5fc9649974c93b0b79b","webpack:///external {\"root\":\"jQuery\",\"commonjs2\":\"jquery\",\"commonjs\":\"jquery\",\"amd\":\"jquery\"}","webpack:///./src/js/Extension.js","webpack:///./src/js/ColorItem.js","webpack:///./src/js/options.js","webpack:///./src/js/extensions/Palette.js","webpack:///./node_modules/color-name/index.js","webpack:///./node_modules/color-convert/conversions.js","webpack:///./src/js/plugin.js","webpack:///./src/js/Colorpicker.js","webpack:///./src/js/extensions/index.js","webpack:///./src/js/extensions/Debugger.js","webpack:///./src/js/extensions/Preview.js","webpack:///./src/js/extensions/Swatches.js","webpack:///./src/js/SliderHandler.js","webpack:///./src/js/PopupHandler.js","webpack:///./src/js/InputHandler.js","webpack:///./node_modules/color/index.js","webpack:///./node_modules/color-string/index.js","webpack:///./node_modules/simple-swizzle/index.js","webpack:///./node_modules/is-arrayish/index.js","webpack:///./node_modules/color-convert/index.js","webpack:///./node_modules/color-convert/route.js","webpack:///./src/js/ColorHandler.js","webpack:///./src/js/PickerHandler.js","webpack:///./src/js/AddonHandler.js"],"names":["root","factory","exports","module","require","define","amd","self","this","__WEBPACK_EXTERNAL_MODULE_0__","modules","__webpack_require__","moduleId","installedModules","i","l","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","_classCallCheck","instance","Constructor","TypeError","value","_createClass","defineProperties","target","props","length","descriptor","writable","key","protoProps","staticProps","_jquery","_jquery2","obj","default","Extension","colorpicker","options","arguments","undefined","element","Error","on","$","proxy","onCreate","onDestroy","onUpdate","onChange","onInvalid","onShow","onHide","onEnable","onDisable","color","event","off","ColorItem","HSVAColor","_color","_color2","h","v","a","isNaN","format","replace","fn","_len","args","Array","_key","result","apply","QixColor","_original","sanitizeFormat","valid","parse","_format","isHex","model","hue","saturation","alpha","hasAlpha","toObject","string","round","str","isValid","isDark","isLight","formula","hues","isArray","colorFormulas","colors","mainColor","forEach","levels","saturationv","push","set","Math","sanitizeString","e","String","match","toLowerCase","complementary","triad","tetrad","splitcomplement","sassVars","bar_size_short","base_margin","columns","sliderSize","customClass","fallbackColor","horizontal","inline","container","popover","animation","placement","fallbackPlacement","debug","input","addon","autoInputFallback","useHashPrefix","useAlpha","template","extensions","showText","sliders","selector","maxLeft","maxTop","callLeft","callTop","childSelector","slidersHorz","_interopRequireDefault","_possibleConstructorReturn","ReferenceError","_inherits","subClass","superClass","create","constructor","setPrototypeOf","__proto__","_typeof","Symbol","iterator","_Extension2","_Extension3","defaults","namesAsValues","Palette","_Extension","_this","getPrototypeOf","extend","keys","realColor","getLength","indexOf","toUpperCase","getValue","getName","defaultValue","aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","green","greenyellow","grey","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen","comparativeDistance","x","y","pow","cssKeywords","reverseKeywords","convert","rgb","channels","labels","hsl","hsv","hwb","cmyk","xyz","lab","lch","hex","keyword","ansi16","ansi256","hcg","apple","r","g","b","min","max","delta","rdif","gdif","bdif","diff","diffc","w","k","reversed","currentClosestKeyword","currentClosestDistance","Infinity","distance","z","t1","t2","t3","val","sv","smin","lmin","hi","floor","f","q","t","sl","vmin","wh","bl","ratio","y2","x2","z2","hr","atan2","PI","sqrt","cos","sin","ansi","mult","rem","integer","toString","substring","colorString","split","map","char","join","parseInt","grayscale","chroma","pure","mg","_Colorpicker","_Colorpicker2","plugin","Colorpicker","option","fnArgs","slice","isSingleElement","returnValue","$elements","each","$this","inst","data","isFunction","_options","_options2","_extensions","_extensions2","_SliderHandler","_SliderHandler2","_PopupHandler","_PopupHandler2","_InputHandler","_InputHandler2","_ColorHandler","_ColorHandler2","_PickerHandler","_PickerHandler2","_AddonHandler","_AddonHandler2","_ColorItem","_ColorItem2","colorPickerIdCounter","id","lastEvent","alias","addClass","attr","disabled","inputHandler","InputHandler","colorHandler","ColorHandler","sliderHandler","SliderHandler","popupHandler","PopupHandler","pickerHandler","PickerHandler","addonHandler","AddonHandler","init","trigger","picker","bind","initExtensions","attach","update","isDisabled","disable","ext","registerExtension","ExtensionClass","config","unbind","removeClass","removeData","show","hide","toggle","ch","hasColor","equals","createColor","assureColor","enable","eventName","type","coreExtensions","Swatches","Preview","Debugger","_Debugger","_Debugger2","_Preview","_Preview2","_Swatches","_Swatches2","_Palette","_Palette2","debugger","preview","swatches","palette","_get","receiver","Function","desc","getOwnPropertyDescriptor","parent","eventCounter","hasInput","onChangeInput","_console","logMessage","console","concat","logArgs","log","elementInner","find","append","css","html","toRgbString","_Palette3","barTemplate","swatchTemplate","isEnabled","load","_this2","swatchContainer","isAliased","empty","$swatch","$sw","setValue","currentSlider","mousePointer","left","top","onMove","defaultOnMove","slider","cp","getClone","getFallbackColor","guideStyle","focus","sliderClasses","sliderName","pressed","mousemove.colorpicker","moved","touchmove.colorpicker","mouseup.colorpicker","released","touchend.colorpicker","pageX","pageY","originalEvent","touches","zone","closest","is","guide","offset","style","preventDefault","popoverTarget","popoverTip","clicking","hidding","showing","hasAddon","createPopover","mousedown.colorpicker touchstart.colorpicker","focus.colorpicker","focusout.colorpicker","reposition","document","onClickingInside","isOrIsInside","currentTarget","isClickingInside","_defaults","content","tip","fireShow","fireHide","isVisible","stopPropagation","isPopover","isHidden","hasClass","_initValue","keyup.colorpicker","onkeyup","change.colorpicker","onchange","item","getFormattedColor","prop","inputVal","getColorString","resolveColorDelegate","isInvalidColor","Color","skippedModels","valpha","newArr","_slice","zeroArray","splice","hashedKeys","sort","hashedModelKeys","JSON","stringify","limiters","limit","freeze","roundTo","num","places","Number","toFixed","roundToPlace","getset","channel","modifier","maxfn","assertArray","arr","toJSON","to","percentString","percent","array","unitArray","unitObject","saturationl","lightness","wblack","rgbNumber","luminosity","lum","chan","contrast","color2","lum1","lum2","level","contrastRatio","negate","lighten","darken","saturate","desaturate","whiten","blacken","fade","opaquer","rotate","degrees","mix","mixinColor","weight","color1","w1","w2","newAlpha","raw","clamp","hexDouble","colorNames","swizzle","reverseNames","cs","prefix","hexAlpha","abbr","rgba","per","i2","parseFloat","hsla","hwba","isArrayish","results","len","arg","wrap","wrapRaw","wrappedFn","conversion","wrapRounded","conversions","route","fromModel","routes","toModel","buildGraph","graph","models","deriveBFS","queue","current","pop","adjacents","adjacent","node","unshift","link","from","wrapConversion","path","cur","fallbackOnInvalid","isAlphaEnabled","fallback","warn","extResolvedColor","resolveColor","hasTransparency","_supportsAlphaBar","pickerParent","appendTo","remove","vertical","saturationGuide","hueGuide","alphaGuide","hsva","toHsvaRatio","getCloneHueOnly","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pB,aAAc,EAAOoB,EAAWrB,cAAe,EAAU,SAAWqB,KAAYA,EAAWC,UAAW,GAAMxB,OAAOC,eAAemB,EAAQG,EAAWE,IAAKF,IAAiB,MAAO,UAAUR,EAAaW,EAAYC,GAAiJ,MAA9HD,IAAYP,EAAiBJ,EAAYN,UAAWiB,GAAiBC,GAAaR,EAAiBJ,EAAaY,GAAqBZ,M0Bt+L1hBwb,E1B0+La,W0Bt+LjB,QAAAA,GAAYta,GAAapB,EAAA5B,KAAAsd,GAIvBtd,KAAKgD,YAAcA,EAInBhD,KAAK8I,MAAQ,K1BiiMf,MAlDA7G,GAAaqb,IACX9a,IAAK,WACLR,MAAO,W0B7+LP,QAAShC,KAAK8I,S1Bi/LdtG,IAAK,OACLR,MAAO,W0B3+LPhC,KAAK8I,MAAQ9I,KAAKgD,YAAYC,QAAQ6F,MACpC9I,KAAKgD,YAAYI,QAAQ8d,KAAKlhB,KAAKgD,YAAYC,QAAQ6F,OAAS,KAE9D9I,KAAK8I,OAAgC,IAAtB9I,KAAK8I,MAAMzG,SAE5BrC,KAAK8I,MAAQ,S1Bk/LftG,IAAK,SACLR,MAAO,W0B9+LHhC,KAAKwkB,YACPxkB,KAAK8I,MAAM1E,IAAI,mB1Bw/LjB5B,IAAK,SACLR,MAAO,W0Bj/LP,GAAKhC,KAAKgD,YAAY6Z,aAAa8B,YAAe3e,KAAKwkB,WAAvD,CAIA,GAAIqK,GAAW7uB,KAAKgD,YAAY6Z,aAAayJ,iBACzCwI,GAAUC,WAAcF,GAExBG,EAAMhvB,KAAK8I,MAAMoY,KAAK,KAAK+N,GAAG,EAE9BD,GAAI3sB,OAAS,EACf2sB,EAAI5N,IAAI0N,GAER9uB,KAAK8I,MAAMsY,IAAI0N,Q1Bu/LZxR,IAGT5d,GAAQoD,Q0Br/LOwa","file":"bootstrap-colorpicker.min.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"jquery\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"bootstrap-colorpicker\", [\"jquery\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"bootstrap-colorpicker\"] = factory(require(\"jquery\"));\n\telse\n\t\troot[\"bootstrap-colorpicker\"] = factory(root[\"jQuery\"]);\n})(typeof self !== 'undefined' ? self : this, function(__WEBPACK_EXTERNAL_MODULE_0__) {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition","(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"jquery\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"bootstrap-colorpicker\", [\"jquery\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"bootstrap-colorpicker\"] = factory(require(\"jquery\"));\n\telse\n\t\troot[\"bootstrap-colorpicker\"] = factory(root[\"jQuery\"]);\n})(typeof self !== 'undefined' ? self : this, function(__WEBPACK_EXTERNAL_MODULE_0__) {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 7);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports) {\n\nmodule.exports = __WEBPACK_EXTERNAL_MODULE_0__;\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _jquery = __webpack_require__(0);\n\nvar _jquery2 = _interopRequireDefault(_jquery);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n/**\n * Colorpicker extension class.\n */\nvar Extension = function () {\n /**\n * @param {Colorpicker} colorpicker\n * @param {Object} options\n */\n function Extension(colorpicker) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n _classCallCheck(this, Extension);\n\n /**\n * The colorpicker instance\n * @type {Colorpicker}\n */\n this.colorpicker = colorpicker;\n /**\n * Extension options\n *\n * @type {Object}\n */\n this.options = options;\n\n if (!(this.colorpicker.element && this.colorpicker.element.length)) {\n throw new Error('Extension: this.colorpicker.element is not valid');\n }\n\n this.colorpicker.element.on('colorpickerCreate.colorpicker-ext', _jquery2.default.proxy(this.onCreate, this));\n this.colorpicker.element.on('colorpickerDestroy.colorpicker-ext', _jquery2.default.proxy(this.onDestroy, this));\n this.colorpicker.element.on('colorpickerUpdate.colorpicker-ext', _jquery2.default.proxy(this.onUpdate, this));\n this.colorpicker.element.on('colorpickerChange.colorpicker-ext', _jquery2.default.proxy(this.onChange, this));\n this.colorpicker.element.on('colorpickerInvalid.colorpicker-ext', _jquery2.default.proxy(this.onInvalid, this));\n this.colorpicker.element.on('colorpickerShow.colorpicker-ext', _jquery2.default.proxy(this.onShow, this));\n this.colorpicker.element.on('colorpickerHide.colorpicker-ext', _jquery2.default.proxy(this.onHide, this));\n this.colorpicker.element.on('colorpickerEnable.colorpicker-ext', _jquery2.default.proxy(this.onEnable, this));\n this.colorpicker.element.on('colorpickerDisable.colorpicker-ext', _jquery2.default.proxy(this.onDisable, this));\n }\n\n /**\n * Function called every time a new color needs to be created.\n * Return false to skip this resolver and continue with other extensions' ones\n * or return anything else to consider the color resolved.\n *\n * @param {ColorItem|String|*} color\n * @param {boolean} realColor if true, the color should resolve into a real (not named) color code\n * @return {ColorItem|String|*}\n */\n\n\n _createClass(Extension, [{\n key: 'resolveColor',\n value: function resolveColor(color) {\n var realColor = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n\n return false;\n }\n\n /**\n * Method called after the colorpicker is created\n *\n * @listens Colorpicker#colorpickerCreate\n * @param {Event} event\n */\n\n }, {\n key: 'onCreate',\n value: function onCreate(event) {}\n // to be extended\n\n\n /**\n * Method called after the colorpicker is destroyed\n *\n * @listens Colorpicker#colorpickerDestroy\n * @param {Event} event\n */\n\n }, {\n key: 'onDestroy',\n value: function onDestroy(event) {\n this.colorpicker.element.off('.colorpicker-ext');\n }\n\n /**\n * Method called after the colorpicker is updated\n *\n * @listens Colorpicker#colorpickerUpdate\n * @param {Event} event\n */\n\n }, {\n key: 'onUpdate',\n value: function onUpdate(event) {}\n // to be extended\n\n\n /**\n * Method called after the colorpicker color is changed\n *\n * @listens Colorpicker#colorpickerChange\n * @param {Event} event\n */\n\n }, {\n key: 'onChange',\n value: function onChange(event) {}\n // to be extended\n\n\n /**\n * Method called when the colorpicker color is invalid\n *\n * @listens Colorpicker#colorpickerInvalid\n * @param {Event} event\n */\n\n }, {\n key: 'onInvalid',\n value: function onInvalid(event) {}\n // to be extended\n\n\n /**\n * Method called after the colorpicker is hidden\n *\n * @listens Colorpicker#colorpickerHide\n * @param {Event} event\n */\n\n }, {\n key: 'onHide',\n value: function onHide(event) {}\n // to be extended\n\n\n /**\n * Method called after the colorpicker is shown\n *\n * @listens Colorpicker#colorpickerShow\n * @param {Event} event\n */\n\n }, {\n key: 'onShow',\n value: function onShow(event) {}\n // to be extended\n\n\n /**\n * Method called after the colorpicker is disabled\n *\n * @listens Colorpicker#colorpickerDisable\n * @param {Event} event\n */\n\n }, {\n key: 'onDisable',\n value: function onDisable(event) {}\n // to be extended\n\n\n /**\n * Method called after the colorpicker is enabled\n *\n * @listens Colorpicker#colorpickerEnable\n * @param {Event} event\n */\n\n }, {\n key: 'onEnable',\n value: function onEnable(event) {\n // to be extended\n }\n }]);\n\n return Extension;\n}();\n\nexports.default = Extension;\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.ColorItem = exports.HSVAColor = undefined;\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); /**\n * Color manipulation class, specific for Bootstrap Colorpicker\n */\n\n\nvar _color = __webpack_require__(16);\n\nvar _color2 = _interopRequireDefault(_color);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n/**\n * HSVA color data class, containing the hue, saturation, value and alpha\n * information.\n */\nvar HSVAColor = function () {\n /**\n * @param {number|int} h\n * @param {number|int} s\n * @param {number|int} v\n * @param {number|int} a\n */\n function HSVAColor(h, s, v, a) {\n _classCallCheck(this, HSVAColor);\n\n this.h = isNaN(h) ? 0 : h;\n this.s = isNaN(s) ? 0 : s;\n this.v = isNaN(v) ? 0 : v;\n this.a = isNaN(h) ? 1 : a;\n }\n\n _createClass(HSVAColor, [{\n key: 'toString',\n value: function toString() {\n return this.h + ', ' + this.s + '%, ' + this.v + '%, ' + this.a;\n }\n }]);\n\n return HSVAColor;\n}();\n\n/**\n * HSVA color manipulation\n */\n\n\nvar ColorItem = function () {\n _createClass(ColorItem, [{\n key: 'api',\n\n\n /**\n * Applies a method of the QixColor API and returns a new Color object or\n * the return value of the method call.\n *\n * If no argument is provided, the internal QixColor object is returned.\n *\n * @param {String} fn QixColor function name\n * @param args QixColor function arguments\n * @example let darkerColor = color.api('darken', 0.25);\n * @example let luminosity = color.api('luminosity');\n * @example color = color.api('negate');\n * @example let qColor = color.api().negate();\n * @returns {ColorItem|QixColor|*}\n */\n value: function api(fn) {\n for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n if (arguments.length === 0) {\n return this._color;\n }\n\n var result = this._color[fn].apply(this._color, args);\n\n if (!(result instanceof _color2.default)) {\n // return result of the method call\n return result;\n }\n\n return new ColorItem(result, this.format);\n }\n\n /**\n * Returns the original ColorItem constructor data,\n * plus a 'valid' flag to know if it's valid or not.\n *\n * @returns {{color: *, format: String, valid: boolean}}\n */\n\n }, {\n key: 'original',\n get: function get() {\n return this._original;\n }\n\n /**\n * @param {ColorItem|HSVAColor|QixColor|String|*|null} color Color data\n * @param {String|null} format Color model to convert to by default. Supported: 'rgb', 'hsl', 'hex'.\n */\n\n }], [{\n key: 'HSVAColor',\n\n\n /**\n * Returns the HSVAColor class\n *\n * @static\n * @example let colorData = new ColorItem.HSVAColor(360, 100, 100, 1);\n * @returns {HSVAColor}\n */\n get: function get() {\n return HSVAColor;\n }\n }]);\n\n function ColorItem() {\n var color = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n var format = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n\n _classCallCheck(this, ColorItem);\n\n this.replace(color, format);\n }\n\n /**\n * Replaces the internal QixColor object with a new one.\n * This also replaces the internal original color data.\n *\n * @param {ColorItem|HSVAColor|QixColor|String|*|null} color Color data to be parsed (if needed)\n * @param {String|null} format Color model to convert to by default. Supported: 'rgb', 'hsl', 'hex'.\n * @example color.replace('rgb(255,0,0)', 'hsl');\n * @example color.replace(hsvaColorData);\n */\n\n\n _createClass(ColorItem, [{\n key: 'replace',\n value: function replace(color) {\n var format = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n\n format = ColorItem.sanitizeFormat(format);\n\n /**\n * @type {{color: *, format: String}}\n * @private\n */\n this._original = {\n color: color,\n format: format,\n valid: true\n };\n /**\n * @type {QixColor}\n * @private\n */\n this._color = ColorItem.parse(color);\n\n if (this._color === null) {\n this._color = (0, _color2.default)();\n this._original.valid = false;\n return;\n }\n\n /**\n * @type {*|string}\n * @private\n */\n this._format = format ? format : ColorItem.isHex(color) ? 'hex' : this._color.model;\n }\n\n /**\n * Parses the color returning a Qix Color object or null if cannot be\n * parsed.\n *\n * @param {ColorItem|HSVAColor|QixColor|String|*|null} color Color data\n * @example let qColor = ColorItem.parse('rgb(255,0,0)');\n * @static\n * @returns {QixColor|null}\n */\n\n }, {\n key: 'isValid',\n\n\n /**\n * Returns true if the color is valid, false if not.\n *\n * @returns {boolean}\n */\n value: function isValid() {\n return this._original.valid === true;\n }\n\n /**\n * Hue value from 0 to 360\n *\n * @returns {int}\n */\n\n }, {\n key: 'setHueRatio',\n\n\n /**\n * Sets the hue ratio, where 1.0 is 0, 0.5 is 180 and 0.0 is 360.\n *\n * @ignore\n * @param {number} h Ratio from 1.0 to 0.0\n */\n value: function setHueRatio(h) {\n this.hue = (1 - h) * 360;\n }\n\n /**\n * Sets the saturation value\n *\n * @param {int} value Integer from 0 to 100\n */\n\n }, {\n key: 'setSaturationRatio',\n\n\n /**\n * Sets the saturation ratio, where 1.0 is 100 and 0.0 is 0.\n *\n * @ignore\n * @param {number} s Ratio from 0.0 to 1.0\n */\n value: function setSaturationRatio(s) {\n this.saturation = s * 100;\n }\n\n /**\n * Sets the 'value' channel value\n *\n * @param {int} value Integer from 0 to 100\n */\n\n }, {\n key: 'setValueRatio',\n\n\n /**\n * Sets the value ratio, where 1.0 is 0 and 0.0 is 100.\n *\n * @ignore\n * @param {number} v Ratio from 1.0 to 0.0\n */\n value: function setValueRatio(v) {\n this.value = (1 - v) * 100;\n }\n\n /**\n * Sets the alpha value. It will be rounded to 2 decimals.\n *\n * @param {int} value Float from 0.0 to 1.0\n */\n\n }, {\n key: 'setAlphaRatio',\n\n\n /**\n * Sets the alpha ratio, where 1.0 is 0.0 and 0.0 is 1.0.\n *\n * @ignore\n * @param {number} a Ratio from 1.0 to 0.0\n */\n value: function setAlphaRatio(a) {\n this.alpha = 1 - a;\n }\n\n /**\n * Sets the default color format\n *\n * @param {String} value Supported: 'rgb', 'hsl', 'hex'\n */\n\n }, {\n key: 'isDesaturated',\n\n\n /**\n * Returns true if the saturation value is zero, false otherwise\n *\n * @returns {boolean}\n */\n value: function isDesaturated() {\n return this.saturation === 0;\n }\n\n /**\n * Returns true if the alpha value is zero, false otherwise\n *\n * @returns {boolean}\n */\n\n }, {\n key: 'isTransparent',\n value: function isTransparent() {\n return this.alpha === 0;\n }\n\n /**\n * Returns true if the alpha value is numeric and less than 1, false otherwise\n *\n * @returns {boolean}\n */\n\n }, {\n key: 'hasTransparency',\n value: function hasTransparency() {\n return this.hasAlpha() && this.alpha < 1;\n }\n\n /**\n * Returns true if the alpha value is numeric, false otherwise\n *\n * @returns {boolean}\n */\n\n }, {\n key: 'hasAlpha',\n value: function hasAlpha() {\n return !isNaN(this.alpha);\n }\n\n /**\n * Returns a new HSVAColor object, based on the current color\n *\n * @returns {HSVAColor}\n */\n\n }, {\n key: 'toObject',\n value: function toObject() {\n return new HSVAColor(this.hue, this.saturation, this.value, this.alpha);\n }\n\n /**\n * Alias of toObject()\n *\n * @returns {HSVAColor}\n */\n\n }, {\n key: 'toHsva',\n value: function toHsva() {\n return this.toObject();\n }\n\n /**\n * Returns a new HSVAColor object with the ratio values (from 0.0 to 1.0),\n * based on the current color.\n *\n * @ignore\n * @returns {HSVAColor}\n */\n\n }, {\n key: 'toHsvaRatio',\n value: function toHsvaRatio() {\n return new HSVAColor(this.hue / 360, this.saturation / 100, this.value / 100, this.alpha);\n }\n\n /**\n * Converts the current color to its string representation,\n * using the internal format of this instance.\n *\n * @returns {String}\n */\n\n }, {\n key: 'toString',\n value: function toString() {\n return this.string();\n }\n\n /**\n * Converts the current color to its string representation,\n * using the given format.\n *\n * @param {String|null} format Format to convert to. If empty or null, the internal format will be used.\n * @returns {String}\n */\n\n }, {\n key: 'string',\n value: function string() {\n var format = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n\n format = ColorItem.sanitizeFormat(format ? format : this.format);\n\n if (!format) {\n return this._color.round().string();\n }\n\n if (this._color[format] === undefined) {\n throw new Error('Unsupported color format: \\'' + format + '\\'');\n }\n\n var str = this._color[format]();\n\n return str.round ? str.round().string() : str;\n }\n\n /**\n * Returns true if the given color values equals this one, false otherwise.\n * The format is not compared.\n * If any of the colors is invalid, the result will be false.\n *\n * @param {ColorItem|HSVAColor|QixColor|String|*|null} color Color data\n *\n * @returns {boolean}\n */\n\n }, {\n key: 'equals',\n value: function equals(color) {\n color = color instanceof ColorItem ? color : new ColorItem(color);\n\n if (!color.isValid() || !this.isValid()) {\n return false;\n }\n\n return this.hue === color.hue && this.saturation === color.saturation && this.value === color.value && this.alpha === color.alpha;\n }\n\n /**\n * Creates a copy of this instance\n *\n * @returns {ColorItem}\n */\n\n }, {\n key: 'getClone',\n value: function getClone() {\n return new ColorItem(this._color, this.format);\n }\n\n /**\n * Creates a copy of this instance, only copying the hue value,\n * and setting the others to its max value.\n *\n * @returns {ColorItem}\n */\n\n }, {\n key: 'getCloneHueOnly',\n value: function getCloneHueOnly() {\n return new ColorItem([this.hue, 100, 100, 1], this.format);\n }\n\n /**\n * Creates a copy of this instance setting the alpha to the max.\n *\n * @returns {ColorItem}\n */\n\n }, {\n key: 'getCloneOpaque',\n value: function getCloneOpaque() {\n return new ColorItem(this._color.alpha(1), this.format);\n }\n\n /**\n * Converts the color to a RGB string\n *\n * @returns {String}\n */\n\n }, {\n key: 'toRgbString',\n value: function toRgbString() {\n return this.string('rgb');\n }\n\n /**\n * Converts the color to a Hexadecimal string\n *\n * @returns {String}\n */\n\n }, {\n key: 'toHexString',\n value: function toHexString() {\n return this.string('hex');\n }\n\n /**\n * Converts the color to a HSL string\n *\n * @returns {String}\n */\n\n }, {\n key: 'toHslString',\n value: function toHslString() {\n return this.string('hsl');\n }\n\n /**\n * Returns true if the color is dark, false otherwhise.\n * This is useful to decide a text color.\n *\n * @returns {boolean}\n */\n\n }, {\n key: 'isDark',\n value: function isDark() {\n return this._color.isDark();\n }\n\n /**\n * Returns true if the color is light, false otherwhise.\n * This is useful to decide a text color.\n *\n * @returns {boolean}\n */\n\n }, {\n key: 'isLight',\n value: function isLight() {\n return this._color.isLight();\n }\n\n /**\n * Generates a list of colors using the given hue-based formula or the given array of hue values.\n * Hue formulas can be extended using ColorItem.colorFormulas static property.\n *\n * @param {String|Number[]} formula Examples: 'complementary', 'triad', 'tetrad', 'splitcomplement', [180, 270]\n * @example let colors = color.generate('triad');\n * @example let colors = color.generate([45, 80, 112, 200]);\n * @returns {ColorItem[]}\n */\n\n }, {\n key: 'generate',\n value: function generate(formula) {\n var hues = [];\n\n if (Array.isArray(formula)) {\n hues = formula;\n } else if (!ColorItem.colorFormulas.hasOwnProperty(formula)) {\n throw new Error('No color formula found with the name \\'' + formula + '\\'.');\n } else {\n hues = ColorItem.colorFormulas[formula];\n }\n\n var colors = [],\n mainColor = this._color,\n format = this.format;\n\n hues.forEach(function (hue) {\n var levels = [hue ? (mainColor.hue() + hue) % 360 : mainColor.hue(), mainColor.saturationv(), mainColor.value(), mainColor.alpha()];\n\n colors.push(new ColorItem(levels, format));\n });\n\n return colors;\n }\n }, {\n key: 'hue',\n get: function get() {\n return this._color.hue();\n }\n\n /**\n * Saturation value from 0 to 100\n *\n * @returns {int}\n */\n ,\n\n\n /**\n * Sets the hue value\n *\n * @param {int} value Integer from 0 to 360\n */\n set: function set(value) {\n this._color = this._color.hue(value);\n }\n }, {\n key: 'saturation',\n get: function get() {\n return this._color.saturationv();\n }\n\n /**\n * Value channel value from 0 to 100\n *\n * @returns {int}\n */\n ,\n set: function set(value) {\n this._color = this._color.saturationv(value);\n }\n }, {\n key: 'value',\n get: function get() {\n return this._color.value();\n }\n\n /**\n * Alpha value from 0.0 to 1.0\n *\n * @returns {number}\n */\n ,\n set: function set(value) {\n this._color = this._color.value(value);\n }\n }, {\n key: 'alpha',\n get: function get() {\n var a = this._color.alpha();\n\n return isNaN(a) ? 1 : a;\n }\n\n /**\n * Default color format to convert to when calling toString() or string()\n *\n * @returns {String} 'rgb', 'hsl', 'hex' or ''\n */\n ,\n set: function set(value) {\n // 2 decimals max\n this._color = this._color.alpha(Math.round(value * 100) / 100);\n }\n }, {\n key: 'format',\n get: function get() {\n return this._format ? this._format : this._color.model;\n },\n set: function set(value) {\n this._format = ColorItem.sanitizeFormat(value);\n }\n }], [{\n key: 'parse',\n value: function parse(color) {\n if (color instanceof _color2.default) {\n return color;\n }\n\n if (color instanceof ColorItem) {\n return color._color;\n }\n\n var format = null;\n\n if (color instanceof HSVAColor) {\n color = [color.h, color.s, color.v, isNaN(color.a) ? 1 : color.a];\n } else {\n color = ColorItem.sanitizeString(color);\n }\n\n if (color === null) {\n return null;\n }\n\n if (Array.isArray(color)) {\n format = 'hsv';\n }\n\n try {\n return (0, _color2.default)(color, format);\n } catch (e) {\n return null;\n }\n }\n\n /**\n * Sanitizes a color string, adding missing hash to hexadecimal colors\n * and converting 'transparent' to a color code.\n *\n * @param {String|*} str Color string\n * @example let colorStr = ColorItem.sanitizeString('ffaa00');\n * @static\n * @returns {String|*}\n */\n\n }, {\n key: 'sanitizeString',\n value: function sanitizeString(str) {\n if (!(typeof str === 'string' || str instanceof String)) {\n return str;\n }\n\n if (str.match(/^[0-9a-f]{2,}$/i)) {\n return '#' + str;\n }\n\n if (str.toLowerCase() === 'transparent') {\n return '#FFFFFF00';\n }\n\n return str;\n }\n\n /**\n * Detects if a value is a string and a color in hexadecimal format (in any variant).\n *\n * @param {String} str\n * @example ColorItem.isHex('rgba(0,0,0)'); // false\n * @example ColorItem.isHex('ffaa00'); // true\n * @example ColorItem.isHex('#ffaa00'); // true\n * @static\n * @returns {boolean}\n */\n\n }, {\n key: 'isHex',\n value: function isHex(str) {\n if (!(typeof str === 'string' || str instanceof String)) {\n return false;\n }\n\n return !!str.match(/^#?[0-9a-f]{2,}$/i);\n }\n\n /**\n * Sanitizes a color format to one supported by web browsers.\n * Returns an empty string of the format can't be recognised.\n *\n * @param {String|*} format\n * @example ColorItem.sanitizeFormat('rgba'); // 'rgb'\n * @example ColorItem.isHex('hex8'); // 'hex'\n * @example ColorItem.isHex('invalid'); // ''\n * @static\n * @returns {String} 'rgb', 'hsl', 'hex' or ''.\n */\n\n }, {\n key: 'sanitizeFormat',\n value: function sanitizeFormat(format) {\n switch (format) {\n case 'hex':\n case 'hex3':\n case 'hex4':\n case 'hex6':\n case 'hex8':\n return 'hex';\n case 'rgb':\n case 'rgba':\n case 'keyword':\n case 'name':\n return 'rgb';\n case 'hsl':\n case 'hsla':\n case 'hsv':\n case 'hsva':\n case 'hwb': // HWB this is supported by Qix Color, but not by browsers\n case 'hwba':\n return 'hsl';\n default:\n return '';\n }\n }\n }]);\n\n return ColorItem;\n}();\n\n/**\n * List of hue-based color formulas used by ColorItem.prototype.generate()\n *\n * @static\n * @type {{complementary: number[], triad: number[], tetrad: number[], splitcomplement: number[]}}\n */\n\n\nColorItem.colorFormulas = {\n complementary: [180],\n triad: [0, 120, 240],\n tetrad: [0, 90, 180, 270],\n splitcomplement: [0, 72, 216]\n};\n\nexports.default = ColorItem;\nexports.HSVAColor = HSVAColor;\nexports.ColorItem = ColorItem;\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * @module\n */\n\n// adjust these values accordingly to the sass vars\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar sassVars = {\n 'bar_size_short': 16,\n 'base_margin': 6,\n 'columns': 6\n};\n\nvar sliderSize = sassVars.bar_size_short * sassVars.columns + sassVars.base_margin * (sassVars.columns - 1);\n\n/**\n * Colorpicker default options\n */\nexports.default = {\n /**\n * Custom class to be added to the `.colorpicker-element` element\n *\n * @type {String|null}\n * @default null\n */\n customClass: null,\n /**\n * Sets a initial color, ignoring the one from the element/input value or the data-color attribute.\n *\n * @type {(String|ColorItem|boolean)}\n * @default false\n */\n color: false,\n /**\n * Fallback color to use when the given color is invalid.\n * If false, the latest valid color will be used as a fallback.\n *\n * @type {String|ColorItem|boolean}\n * @default false\n */\n fallbackColor: false,\n /**\n * Forces an specific color format. If 'auto', it will be automatically detected the first time only,\n * but if null it will be always recalculated.\n *\n * Note that the ending 'a' of the format meaning \"alpha\" has currently no effect, meaning that rgb is the same as\n * rgba excepting if the alpha channel is disabled (see useAlpha).\n *\n * @type {('rgb'|'hex'|'hsl'|'auto'|null)}\n * @default 'auto'\n */\n format: 'auto',\n /**\n * Horizontal mode layout.\n *\n * If true, the hue and alpha channel bars will be rendered horizontally, above the saturation selector.\n *\n * @type {boolean}\n * @default false\n */\n horizontal: false,\n /**\n * Forces to show the colorpicker as an inline element.\n *\n * Note that if there is no container specified, the inline element\n * will be added to the body, so you may want to set the container option.\n *\n * @type {boolean}\n * @default false\n */\n inline: false,\n /**\n * Container where the colorpicker is appended to in the DOM.\n *\n * If is a string (CSS selector), the colorpicker will be placed inside this container.\n * If true, the `.colorpicker-element` element itself will be used as the container.\n * If false, the document body is used as the container, unless it is a popover (in this case it is appended to the\n * popover body instead).\n *\n * @type {String|boolean}\n * @default false\n */\n container: false,\n /**\n * Bootstrap Popover options.\n * The trigger, content and html options are always ignored.\n *\n * @type {boolean}\n * @default Object\n */\n popover: {\n animation: true,\n placement: 'bottom',\n fallbackPlacement: 'flip'\n },\n /**\n * If true, loads the 'debugger' extension automatically, which logs the events in the console\n * @type {boolean}\n * @default false\n */\n debug: false,\n /**\n * Child CSS selector for the colorpicker input.\n *\n * @type {String}\n * @default 'input'\n */\n input: 'input',\n /**\n * Child CSS selector for the colorpicker addon.\n * If it exists, the child element background will be changed on color change.\n *\n * @type {String}\n * @default '.colorpicker-trigger, .colorpicker-input-addon'\n */\n addon: '.colorpicker-input-addon',\n /**\n * If true, the input content will be replaced always with a valid color,\n * if false, the invalid color will be left in the input,\n * while the internal color object will still resolve into a valid one.\n *\n * @type {boolean}\n * @default true\n */\n autoInputFallback: true,\n /**\n * If true a hash will be prepended to hexadecimal colors.\n * If false, the hash will be removed.\n * This only affects the input values in hexadecimal format.\n *\n * @type {boolean}\n * @default true\n */\n useHashPrefix: true,\n /**\n * If true, the alpha channel bar will be displayed no matter what.\n *\n * If false, it will be always hidden and alpha channel will be disabled also programmatically, meaning that\n * the selected or typed color will be always opaque.\n *\n * If null, the alpha channel will be automatically disabled/enabled depending if the initial color format supports\n * alpha or not.\n *\n * @type {boolean}\n * @default true\n */\n useAlpha: true,\n /**\n * Colorpicker widget template\n * @type {String}\n * @example\n * \n *
\n *
\n *
\n *
\n *
\n * \n *
\n *
\n */\n template: '
\\n
\\n
\\n
\\n
\\n \\n
\\n
',\n /**\n *\n * Associative object with the extension class name and its config.\n * Colorpicker comes with many bundled extensions: debugger, palette, preview and swatches (a superset of palette).\n *\n * @type {Object[]}\n * @example\n * extensions: [\n * {\n * name: 'swatches'\n * options: {\n * colors: {\n * 'primary': '#337ab7',\n * 'success': '#5cb85c',\n * 'info': '#5bc0de',\n * 'warning': '#f0ad4e',\n * 'danger': '#d9534f'\n * },\n * namesAsValues: true\n * }\n * }\n * ]\n */\n extensions: [{\n name: 'preview',\n options: {\n showText: true\n }\n }],\n /**\n * Vertical sliders configuration\n * @type {Object}\n */\n sliders: {\n saturation: {\n selector: '.colorpicker-saturation',\n maxLeft: sliderSize,\n maxTop: sliderSize,\n callLeft: 'setSaturationRatio',\n callTop: 'setValueRatio'\n },\n hue: {\n selector: '.colorpicker-hue',\n maxLeft: 0,\n maxTop: sliderSize,\n callLeft: false,\n callTop: 'setHueRatio'\n },\n alpha: {\n selector: '.colorpicker-alpha',\n childSelector: '.colorpicker-alpha-color',\n maxLeft: 0,\n maxTop: sliderSize,\n callLeft: false,\n callTop: 'setAlphaRatio'\n }\n },\n /**\n * Horizontal sliders configuration\n * @type {Object}\n */\n slidersHorz: {\n saturation: {\n selector: '.colorpicker-saturation',\n maxLeft: sliderSize,\n maxTop: sliderSize,\n callLeft: 'setSaturationRatio',\n callTop: 'setValueRatio'\n },\n hue: {\n selector: '.colorpicker-hue',\n maxLeft: sliderSize,\n maxTop: 0,\n callLeft: 'setHueRatio',\n callTop: false\n },\n alpha: {\n selector: '.colorpicker-alpha',\n childSelector: '.colorpicker-alpha-color',\n maxLeft: sliderSize,\n maxTop: 0,\n callLeft: 'setAlphaRatio',\n callTop: false\n }\n }\n};\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _Extension2 = __webpack_require__(1);\n\nvar _Extension3 = _interopRequireDefault(_Extension2);\n\nvar _jquery = __webpack_require__(0);\n\nvar _jquery2 = _interopRequireDefault(_jquery);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar defaults = {\n /**\n * Key-value pairs defining a color alias and its CSS color representation.\n *\n * They can also be just an array of values. In that case, no special names are used, only the real colors.\n *\n * @type {Object|Array}\n * @default null\n * @example\n * {\n * 'black': '#000000',\n * 'white': '#ffffff',\n * 'red': '#FF0000',\n * 'default': '#777777',\n * 'primary': '#337ab7',\n * 'success': '#5cb85c',\n * 'info': '#5bc0de',\n * 'warning': '#f0ad4e',\n * 'danger': '#d9534f'\n * }\n *\n * @example ['#f0ad4e', '#337ab7', '#5cb85c']\n */\n colors: null,\n /**\n * If true, when a color swatch is selected the name (alias) will be used as input value,\n * otherwise the swatch real color value will be used.\n *\n * @type {boolean}\n * @default true\n */\n namesAsValues: true\n};\n\n/**\n * Palette extension\n * @ignore\n */\n\nvar Palette = function (_Extension) {\n _inherits(Palette, _Extension);\n\n _createClass(Palette, [{\n key: 'colors',\n\n\n /**\n * @returns {Object|Array}\n */\n get: function get() {\n return this.options.colors;\n }\n }]);\n\n function Palette(colorpicker) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n _classCallCheck(this, Palette);\n\n var _this = _possibleConstructorReturn(this, (Palette.__proto__ || Object.getPrototypeOf(Palette)).call(this, colorpicker, _jquery2.default.extend(true, {}, defaults, options)));\n\n if (!Array.isArray(_this.options.colors) && _typeof(_this.options.colors) !== 'object') {\n _this.options.colors = null;\n }\n return _this;\n }\n\n /**\n * @returns {int}\n */\n\n\n _createClass(Palette, [{\n key: 'getLength',\n value: function getLength() {\n if (!this.options.colors) {\n return 0;\n }\n\n if (Array.isArray(this.options.colors)) {\n return this.options.colors.length;\n }\n\n if (_typeof(this.options.colors) === 'object') {\n return Object.keys(this.options.colors).length;\n }\n\n return 0;\n }\n }, {\n key: 'resolveColor',\n value: function resolveColor(color) {\n var realColor = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n\n if (this.getLength() <= 0) {\n return false;\n }\n\n // Array of colors\n if (Array.isArray(this.options.colors)) {\n if (this.options.colors.indexOf(color) >= 0) {\n return color;\n }\n if (this.options.colors.indexOf(color.toUpperCase()) >= 0) {\n return color.toUpperCase();\n }\n if (this.options.colors.indexOf(color.toLowerCase()) >= 0) {\n return color.toLowerCase();\n }\n return false;\n }\n\n if (_typeof(this.options.colors) !== 'object') {\n return false;\n }\n\n // Map of objects\n if (!this.options.namesAsValues || realColor) {\n return this.getValue(color, false);\n }\n return this.getName(color, this.getName('#' + color));\n }\n\n /**\n * Given a color value, returns the corresponding color name or defaultValue.\n *\n * @param {String} value\n * @param {*} defaultValue\n * @returns {*}\n */\n\n }, {\n key: 'getName',\n value: function getName(value) {\n var defaultValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n if (!(typeof value === 'string') || !this.options.colors) {\n return defaultValue;\n }\n for (var name in this.options.colors) {\n if (!this.options.colors.hasOwnProperty(name)) {\n continue;\n }\n if (this.options.colors[name].toLowerCase() === value.toLowerCase()) {\n return name;\n }\n }\n return defaultValue;\n }\n\n /**\n * Given a color name, returns the corresponding color value or defaultValue.\n *\n * @param {String} name\n * @param {*} defaultValue\n * @returns {*}\n */\n\n }, {\n key: 'getValue',\n value: function getValue(name) {\n var defaultValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n if (!(typeof name === 'string') || !this.options.colors) {\n return defaultValue;\n }\n if (this.options.colors.hasOwnProperty(name)) {\n return this.options.colors[name];\n }\n return defaultValue;\n }\n }]);\n\n return Palette;\n}(_Extension3.default);\n\nexports.default = Palette;\n\n/***/ }),\n/* 5 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\n\r\nmodule.exports = {\r\n\t\"aliceblue\": [240, 248, 255],\r\n\t\"antiquewhite\": [250, 235, 215],\r\n\t\"aqua\": [0, 255, 255],\r\n\t\"aquamarine\": [127, 255, 212],\r\n\t\"azure\": [240, 255, 255],\r\n\t\"beige\": [245, 245, 220],\r\n\t\"bisque\": [255, 228, 196],\r\n\t\"black\": [0, 0, 0],\r\n\t\"blanchedalmond\": [255, 235, 205],\r\n\t\"blue\": [0, 0, 255],\r\n\t\"blueviolet\": [138, 43, 226],\r\n\t\"brown\": [165, 42, 42],\r\n\t\"burlywood\": [222, 184, 135],\r\n\t\"cadetblue\": [95, 158, 160],\r\n\t\"chartreuse\": [127, 255, 0],\r\n\t\"chocolate\": [210, 105, 30],\r\n\t\"coral\": [255, 127, 80],\r\n\t\"cornflowerblue\": [100, 149, 237],\r\n\t\"cornsilk\": [255, 248, 220],\r\n\t\"crimson\": [220, 20, 60],\r\n\t\"cyan\": [0, 255, 255],\r\n\t\"darkblue\": [0, 0, 139],\r\n\t\"darkcyan\": [0, 139, 139],\r\n\t\"darkgoldenrod\": [184, 134, 11],\r\n\t\"darkgray\": [169, 169, 169],\r\n\t\"darkgreen\": [0, 100, 0],\r\n\t\"darkgrey\": [169, 169, 169],\r\n\t\"darkkhaki\": [189, 183, 107],\r\n\t\"darkmagenta\": [139, 0, 139],\r\n\t\"darkolivegreen\": [85, 107, 47],\r\n\t\"darkorange\": [255, 140, 0],\r\n\t\"darkorchid\": [153, 50, 204],\r\n\t\"darkred\": [139, 0, 0],\r\n\t\"darksalmon\": [233, 150, 122],\r\n\t\"darkseagreen\": [143, 188, 143],\r\n\t\"darkslateblue\": [72, 61, 139],\r\n\t\"darkslategray\": [47, 79, 79],\r\n\t\"darkslategrey\": [47, 79, 79],\r\n\t\"darkturquoise\": [0, 206, 209],\r\n\t\"darkviolet\": [148, 0, 211],\r\n\t\"deeppink\": [255, 20, 147],\r\n\t\"deepskyblue\": [0, 191, 255],\r\n\t\"dimgray\": [105, 105, 105],\r\n\t\"dimgrey\": [105, 105, 105],\r\n\t\"dodgerblue\": [30, 144, 255],\r\n\t\"firebrick\": [178, 34, 34],\r\n\t\"floralwhite\": [255, 250, 240],\r\n\t\"forestgreen\": [34, 139, 34],\r\n\t\"fuchsia\": [255, 0, 255],\r\n\t\"gainsboro\": [220, 220, 220],\r\n\t\"ghostwhite\": [248, 248, 255],\r\n\t\"gold\": [255, 215, 0],\r\n\t\"goldenrod\": [218, 165, 32],\r\n\t\"gray\": [128, 128, 128],\r\n\t\"green\": [0, 128, 0],\r\n\t\"greenyellow\": [173, 255, 47],\r\n\t\"grey\": [128, 128, 128],\r\n\t\"honeydew\": [240, 255, 240],\r\n\t\"hotpink\": [255, 105, 180],\r\n\t\"indianred\": [205, 92, 92],\r\n\t\"indigo\": [75, 0, 130],\r\n\t\"ivory\": [255, 255, 240],\r\n\t\"khaki\": [240, 230, 140],\r\n\t\"lavender\": [230, 230, 250],\r\n\t\"lavenderblush\": [255, 240, 245],\r\n\t\"lawngreen\": [124, 252, 0],\r\n\t\"lemonchiffon\": [255, 250, 205],\r\n\t\"lightblue\": [173, 216, 230],\r\n\t\"lightcoral\": [240, 128, 128],\r\n\t\"lightcyan\": [224, 255, 255],\r\n\t\"lightgoldenrodyellow\": [250, 250, 210],\r\n\t\"lightgray\": [211, 211, 211],\r\n\t\"lightgreen\": [144, 238, 144],\r\n\t\"lightgrey\": [211, 211, 211],\r\n\t\"lightpink\": [255, 182, 193],\r\n\t\"lightsalmon\": [255, 160, 122],\r\n\t\"lightseagreen\": [32, 178, 170],\r\n\t\"lightskyblue\": [135, 206, 250],\r\n\t\"lightslategray\": [119, 136, 153],\r\n\t\"lightslategrey\": [119, 136, 153],\r\n\t\"lightsteelblue\": [176, 196, 222],\r\n\t\"lightyellow\": [255, 255, 224],\r\n\t\"lime\": [0, 255, 0],\r\n\t\"limegreen\": [50, 205, 50],\r\n\t\"linen\": [250, 240, 230],\r\n\t\"magenta\": [255, 0, 255],\r\n\t\"maroon\": [128, 0, 0],\r\n\t\"mediumaquamarine\": [102, 205, 170],\r\n\t\"mediumblue\": [0, 0, 205],\r\n\t\"mediumorchid\": [186, 85, 211],\r\n\t\"mediumpurple\": [147, 112, 219],\r\n\t\"mediumseagreen\": [60, 179, 113],\r\n\t\"mediumslateblue\": [123, 104, 238],\r\n\t\"mediumspringgreen\": [0, 250, 154],\r\n\t\"mediumturquoise\": [72, 209, 204],\r\n\t\"mediumvioletred\": [199, 21, 133],\r\n\t\"midnightblue\": [25, 25, 112],\r\n\t\"mintcream\": [245, 255, 250],\r\n\t\"mistyrose\": [255, 228, 225],\r\n\t\"moccasin\": [255, 228, 181],\r\n\t\"navajowhite\": [255, 222, 173],\r\n\t\"navy\": [0, 0, 128],\r\n\t\"oldlace\": [253, 245, 230],\r\n\t\"olive\": [128, 128, 0],\r\n\t\"olivedrab\": [107, 142, 35],\r\n\t\"orange\": [255, 165, 0],\r\n\t\"orangered\": [255, 69, 0],\r\n\t\"orchid\": [218, 112, 214],\r\n\t\"palegoldenrod\": [238, 232, 170],\r\n\t\"palegreen\": [152, 251, 152],\r\n\t\"paleturquoise\": [175, 238, 238],\r\n\t\"palevioletred\": [219, 112, 147],\r\n\t\"papayawhip\": [255, 239, 213],\r\n\t\"peachpuff\": [255, 218, 185],\r\n\t\"peru\": [205, 133, 63],\r\n\t\"pink\": [255, 192, 203],\r\n\t\"plum\": [221, 160, 221],\r\n\t\"powderblue\": [176, 224, 230],\r\n\t\"purple\": [128, 0, 128],\r\n\t\"rebeccapurple\": [102, 51, 153],\r\n\t\"red\": [255, 0, 0],\r\n\t\"rosybrown\": [188, 143, 143],\r\n\t\"royalblue\": [65, 105, 225],\r\n\t\"saddlebrown\": [139, 69, 19],\r\n\t\"salmon\": [250, 128, 114],\r\n\t\"sandybrown\": [244, 164, 96],\r\n\t\"seagreen\": [46, 139, 87],\r\n\t\"seashell\": [255, 245, 238],\r\n\t\"sienna\": [160, 82, 45],\r\n\t\"silver\": [192, 192, 192],\r\n\t\"skyblue\": [135, 206, 235],\r\n\t\"slateblue\": [106, 90, 205],\r\n\t\"slategray\": [112, 128, 144],\r\n\t\"slategrey\": [112, 128, 144],\r\n\t\"snow\": [255, 250, 250],\r\n\t\"springgreen\": [0, 255, 127],\r\n\t\"steelblue\": [70, 130, 180],\r\n\t\"tan\": [210, 180, 140],\r\n\t\"teal\": [0, 128, 128],\r\n\t\"thistle\": [216, 191, 216],\r\n\t\"tomato\": [255, 99, 71],\r\n\t\"turquoise\": [64, 224, 208],\r\n\t\"violet\": [238, 130, 238],\r\n\t\"wheat\": [245, 222, 179],\r\n\t\"white\": [255, 255, 255],\r\n\t\"whitesmoke\": [245, 245, 245],\r\n\t\"yellow\": [255, 255, 0],\r\n\t\"yellowgreen\": [154, 205, 50]\r\n};\r\n\n\n/***/ }),\n/* 6 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/* MIT license */\nvar cssKeywords = __webpack_require__(5);\n\n// NOTE: conversions should only return primitive values (i.e. arrays, or\n// values that give correct `typeof` results).\n// do not use box values types (i.e. Number(), String(), etc.)\n\nvar reverseKeywords = {};\nfor (var key in cssKeywords) {\n\tif (cssKeywords.hasOwnProperty(key)) {\n\t\treverseKeywords[cssKeywords[key]] = key;\n\t}\n}\n\nvar convert = module.exports = {\n\trgb: {channels: 3, labels: 'rgb'},\n\thsl: {channels: 3, labels: 'hsl'},\n\thsv: {channels: 3, labels: 'hsv'},\n\thwb: {channels: 3, labels: 'hwb'},\n\tcmyk: {channels: 4, labels: 'cmyk'},\n\txyz: {channels: 3, labels: 'xyz'},\n\tlab: {channels: 3, labels: 'lab'},\n\tlch: {channels: 3, labels: 'lch'},\n\thex: {channels: 1, labels: ['hex']},\n\tkeyword: {channels: 1, labels: ['keyword']},\n\tansi16: {channels: 1, labels: ['ansi16']},\n\tansi256: {channels: 1, labels: ['ansi256']},\n\thcg: {channels: 3, labels: ['h', 'c', 'g']},\n\tapple: {channels: 3, labels: ['r16', 'g16', 'b16']},\n\tgray: {channels: 1, labels: ['gray']}\n};\n\n// hide .channels and .labels properties\nfor (var model in convert) {\n\tif (convert.hasOwnProperty(model)) {\n\t\tif (!('channels' in convert[model])) {\n\t\t\tthrow new Error('missing channels property: ' + model);\n\t\t}\n\n\t\tif (!('labels' in convert[model])) {\n\t\t\tthrow new Error('missing channel labels property: ' + model);\n\t\t}\n\n\t\tif (convert[model].labels.length !== convert[model].channels) {\n\t\t\tthrow new Error('channel and label counts mismatch: ' + model);\n\t\t}\n\n\t\tvar channels = convert[model].channels;\n\t\tvar labels = convert[model].labels;\n\t\tdelete convert[model].channels;\n\t\tdelete convert[model].labels;\n\t\tObject.defineProperty(convert[model], 'channels', {value: channels});\n\t\tObject.defineProperty(convert[model], 'labels', {value: labels});\n\t}\n}\n\nconvert.rgb.hsl = function (rgb) {\n\tvar r = rgb[0] / 255;\n\tvar g = rgb[1] / 255;\n\tvar b = rgb[2] / 255;\n\tvar min = Math.min(r, g, b);\n\tvar max = Math.max(r, g, b);\n\tvar delta = max - min;\n\tvar h;\n\tvar s;\n\tvar l;\n\n\tif (max === min) {\n\t\th = 0;\n\t} else if (r === max) {\n\t\th = (g - b) / delta;\n\t} else if (g === max) {\n\t\th = 2 + (b - r) / delta;\n\t} else if (b === max) {\n\t\th = 4 + (r - g) / delta;\n\t}\n\n\th = Math.min(h * 60, 360);\n\n\tif (h < 0) {\n\t\th += 360;\n\t}\n\n\tl = (min + max) / 2;\n\n\tif (max === min) {\n\t\ts = 0;\n\t} else if (l <= 0.5) {\n\t\ts = delta / (max + min);\n\t} else {\n\t\ts = delta / (2 - max - min);\n\t}\n\n\treturn [h, s * 100, l * 100];\n};\n\nconvert.rgb.hsv = function (rgb) {\n\tvar rdif;\n\tvar gdif;\n\tvar bdif;\n\tvar h;\n\tvar s;\n\n\tvar r = rgb[0] / 255;\n\tvar g = rgb[1] / 255;\n\tvar b = rgb[2] / 255;\n\tvar v = Math.max(r, g, b);\n\tvar diff = v - Math.min(r, g, b);\n\tvar diffc = function (c) {\n\t\treturn (v - c) / 6 / diff + 1 / 2;\n\t};\n\n\tif (diff === 0) {\n\t\th = s = 0;\n\t} else {\n\t\ts = diff / v;\n\t\trdif = diffc(r);\n\t\tgdif = diffc(g);\n\t\tbdif = diffc(b);\n\n\t\tif (r === v) {\n\t\t\th = bdif - gdif;\n\t\t} else if (g === v) {\n\t\t\th = (1 / 3) + rdif - bdif;\n\t\t} else if (b === v) {\n\t\t\th = (2 / 3) + gdif - rdif;\n\t\t}\n\t\tif (h < 0) {\n\t\t\th += 1;\n\t\t} else if (h > 1) {\n\t\t\th -= 1;\n\t\t}\n\t}\n\n\treturn [\n\t\th * 360,\n\t\ts * 100,\n\t\tv * 100\n\t];\n};\n\nconvert.rgb.hwb = function (rgb) {\n\tvar r = rgb[0];\n\tvar g = rgb[1];\n\tvar b = rgb[2];\n\tvar h = convert.rgb.hsl(rgb)[0];\n\tvar w = 1 / 255 * Math.min(r, Math.min(g, b));\n\n\tb = 1 - 1 / 255 * Math.max(r, Math.max(g, b));\n\n\treturn [h, w * 100, b * 100];\n};\n\nconvert.rgb.cmyk = function (rgb) {\n\tvar r = rgb[0] / 255;\n\tvar g = rgb[1] / 255;\n\tvar b = rgb[2] / 255;\n\tvar c;\n\tvar m;\n\tvar y;\n\tvar k;\n\n\tk = Math.min(1 - r, 1 - g, 1 - b);\n\tc = (1 - r - k) / (1 - k) || 0;\n\tm = (1 - g - k) / (1 - k) || 0;\n\ty = (1 - b - k) / (1 - k) || 0;\n\n\treturn [c * 100, m * 100, y * 100, k * 100];\n};\n\n/**\n * See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance\n * */\nfunction comparativeDistance(x, y) {\n\treturn (\n\t\tMath.pow(x[0] - y[0], 2) +\n\t\tMath.pow(x[1] - y[1], 2) +\n\t\tMath.pow(x[2] - y[2], 2)\n\t);\n}\n\nconvert.rgb.keyword = function (rgb) {\n\tvar reversed = reverseKeywords[rgb];\n\tif (reversed) {\n\t\treturn reversed;\n\t}\n\n\tvar currentClosestDistance = Infinity;\n\tvar currentClosestKeyword;\n\n\tfor (var keyword in cssKeywords) {\n\t\tif (cssKeywords.hasOwnProperty(keyword)) {\n\t\t\tvar value = cssKeywords[keyword];\n\n\t\t\t// Compute comparative distance\n\t\t\tvar distance = comparativeDistance(rgb, value);\n\n\t\t\t// Check if its less, if so set as closest\n\t\t\tif (distance < currentClosestDistance) {\n\t\t\t\tcurrentClosestDistance = distance;\n\t\t\t\tcurrentClosestKeyword = keyword;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn currentClosestKeyword;\n};\n\nconvert.keyword.rgb = function (keyword) {\n\treturn cssKeywords[keyword];\n};\n\nconvert.rgb.xyz = function (rgb) {\n\tvar r = rgb[0] / 255;\n\tvar g = rgb[1] / 255;\n\tvar b = rgb[2] / 255;\n\n\t// assume sRGB\n\tr = r > 0.04045 ? Math.pow(((r + 0.055) / 1.055), 2.4) : (r / 12.92);\n\tg = g > 0.04045 ? Math.pow(((g + 0.055) / 1.055), 2.4) : (g / 12.92);\n\tb = b > 0.04045 ? Math.pow(((b + 0.055) / 1.055), 2.4) : (b / 12.92);\n\n\tvar x = (r * 0.4124) + (g * 0.3576) + (b * 0.1805);\n\tvar y = (r * 0.2126) + (g * 0.7152) + (b * 0.0722);\n\tvar z = (r * 0.0193) + (g * 0.1192) + (b * 0.9505);\n\n\treturn [x * 100, y * 100, z * 100];\n};\n\nconvert.rgb.lab = function (rgb) {\n\tvar xyz = convert.rgb.xyz(rgb);\n\tvar x = xyz[0];\n\tvar y = xyz[1];\n\tvar z = xyz[2];\n\tvar l;\n\tvar a;\n\tvar b;\n\n\tx /= 95.047;\n\ty /= 100;\n\tz /= 108.883;\n\n\tx = x > 0.008856 ? Math.pow(x, 1 / 3) : (7.787 * x) + (16 / 116);\n\ty = y > 0.008856 ? Math.pow(y, 1 / 3) : (7.787 * y) + (16 / 116);\n\tz = z > 0.008856 ? Math.pow(z, 1 / 3) : (7.787 * z) + (16 / 116);\n\n\tl = (116 * y) - 16;\n\ta = 500 * (x - y);\n\tb = 200 * (y - z);\n\n\treturn [l, a, b];\n};\n\nconvert.hsl.rgb = function (hsl) {\n\tvar h = hsl[0] / 360;\n\tvar s = hsl[1] / 100;\n\tvar l = hsl[2] / 100;\n\tvar t1;\n\tvar t2;\n\tvar t3;\n\tvar rgb;\n\tvar val;\n\n\tif (s === 0) {\n\t\tval = l * 255;\n\t\treturn [val, val, val];\n\t}\n\n\tif (l < 0.5) {\n\t\tt2 = l * (1 + s);\n\t} else {\n\t\tt2 = l + s - l * s;\n\t}\n\n\tt1 = 2 * l - t2;\n\n\trgb = [0, 0, 0];\n\tfor (var i = 0; i < 3; i++) {\n\t\tt3 = h + 1 / 3 * -(i - 1);\n\t\tif (t3 < 0) {\n\t\t\tt3++;\n\t\t}\n\t\tif (t3 > 1) {\n\t\t\tt3--;\n\t\t}\n\n\t\tif (6 * t3 < 1) {\n\t\t\tval = t1 + (t2 - t1) * 6 * t3;\n\t\t} else if (2 * t3 < 1) {\n\t\t\tval = t2;\n\t\t} else if (3 * t3 < 2) {\n\t\t\tval = t1 + (t2 - t1) * (2 / 3 - t3) * 6;\n\t\t} else {\n\t\t\tval = t1;\n\t\t}\n\n\t\trgb[i] = val * 255;\n\t}\n\n\treturn rgb;\n};\n\nconvert.hsl.hsv = function (hsl) {\n\tvar h = hsl[0];\n\tvar s = hsl[1] / 100;\n\tvar l = hsl[2] / 100;\n\tvar smin = s;\n\tvar lmin = Math.max(l, 0.01);\n\tvar sv;\n\tvar v;\n\n\tl *= 2;\n\ts *= (l <= 1) ? l : 2 - l;\n\tsmin *= lmin <= 1 ? lmin : 2 - lmin;\n\tv = (l + s) / 2;\n\tsv = l === 0 ? (2 * smin) / (lmin + smin) : (2 * s) / (l + s);\n\n\treturn [h, sv * 100, v * 100];\n};\n\nconvert.hsv.rgb = function (hsv) {\n\tvar h = hsv[0] / 60;\n\tvar s = hsv[1] / 100;\n\tvar v = hsv[2] / 100;\n\tvar hi = Math.floor(h) % 6;\n\n\tvar f = h - Math.floor(h);\n\tvar p = 255 * v * (1 - s);\n\tvar q = 255 * v * (1 - (s * f));\n\tvar t = 255 * v * (1 - (s * (1 - f)));\n\tv *= 255;\n\n\tswitch (hi) {\n\t\tcase 0:\n\t\t\treturn [v, t, p];\n\t\tcase 1:\n\t\t\treturn [q, v, p];\n\t\tcase 2:\n\t\t\treturn [p, v, t];\n\t\tcase 3:\n\t\t\treturn [p, q, v];\n\t\tcase 4:\n\t\t\treturn [t, p, v];\n\t\tcase 5:\n\t\t\treturn [v, p, q];\n\t}\n};\n\nconvert.hsv.hsl = function (hsv) {\n\tvar h = hsv[0];\n\tvar s = hsv[1] / 100;\n\tvar v = hsv[2] / 100;\n\tvar vmin = Math.max(v, 0.01);\n\tvar lmin;\n\tvar sl;\n\tvar l;\n\n\tl = (2 - s) * v;\n\tlmin = (2 - s) * vmin;\n\tsl = s * vmin;\n\tsl /= (lmin <= 1) ? lmin : 2 - lmin;\n\tsl = sl || 0;\n\tl /= 2;\n\n\treturn [h, sl * 100, l * 100];\n};\n\n// http://dev.w3.org/csswg/css-color/#hwb-to-rgb\nconvert.hwb.rgb = function (hwb) {\n\tvar h = hwb[0] / 360;\n\tvar wh = hwb[1] / 100;\n\tvar bl = hwb[2] / 100;\n\tvar ratio = wh + bl;\n\tvar i;\n\tvar v;\n\tvar f;\n\tvar n;\n\n\t// wh + bl cant be > 1\n\tif (ratio > 1) {\n\t\twh /= ratio;\n\t\tbl /= ratio;\n\t}\n\n\ti = Math.floor(6 * h);\n\tv = 1 - bl;\n\tf = 6 * h - i;\n\n\tif ((i & 0x01) !== 0) {\n\t\tf = 1 - f;\n\t}\n\n\tn = wh + f * (v - wh); // linear interpolation\n\n\tvar r;\n\tvar g;\n\tvar b;\n\tswitch (i) {\n\t\tdefault:\n\t\tcase 6:\n\t\tcase 0: r = v; g = n; b = wh; break;\n\t\tcase 1: r = n; g = v; b = wh; break;\n\t\tcase 2: r = wh; g = v; b = n; break;\n\t\tcase 3: r = wh; g = n; b = v; break;\n\t\tcase 4: r = n; g = wh; b = v; break;\n\t\tcase 5: r = v; g = wh; b = n; break;\n\t}\n\n\treturn [r * 255, g * 255, b * 255];\n};\n\nconvert.cmyk.rgb = function (cmyk) {\n\tvar c = cmyk[0] / 100;\n\tvar m = cmyk[1] / 100;\n\tvar y = cmyk[2] / 100;\n\tvar k = cmyk[3] / 100;\n\tvar r;\n\tvar g;\n\tvar b;\n\n\tr = 1 - Math.min(1, c * (1 - k) + k);\n\tg = 1 - Math.min(1, m * (1 - k) + k);\n\tb = 1 - Math.min(1, y * (1 - k) + k);\n\n\treturn [r * 255, g * 255, b * 255];\n};\n\nconvert.xyz.rgb = function (xyz) {\n\tvar x = xyz[0] / 100;\n\tvar y = xyz[1] / 100;\n\tvar z = xyz[2] / 100;\n\tvar r;\n\tvar g;\n\tvar b;\n\n\tr = (x * 3.2406) + (y * -1.5372) + (z * -0.4986);\n\tg = (x * -0.9689) + (y * 1.8758) + (z * 0.0415);\n\tb = (x * 0.0557) + (y * -0.2040) + (z * 1.0570);\n\n\t// assume sRGB\n\tr = r > 0.0031308\n\t\t? ((1.055 * Math.pow(r, 1.0 / 2.4)) - 0.055)\n\t\t: r * 12.92;\n\n\tg = g > 0.0031308\n\t\t? ((1.055 * Math.pow(g, 1.0 / 2.4)) - 0.055)\n\t\t: g * 12.92;\n\n\tb = b > 0.0031308\n\t\t? ((1.055 * Math.pow(b, 1.0 / 2.4)) - 0.055)\n\t\t: b * 12.92;\n\n\tr = Math.min(Math.max(0, r), 1);\n\tg = Math.min(Math.max(0, g), 1);\n\tb = Math.min(Math.max(0, b), 1);\n\n\treturn [r * 255, g * 255, b * 255];\n};\n\nconvert.xyz.lab = function (xyz) {\n\tvar x = xyz[0];\n\tvar y = xyz[1];\n\tvar z = xyz[2];\n\tvar l;\n\tvar a;\n\tvar b;\n\n\tx /= 95.047;\n\ty /= 100;\n\tz /= 108.883;\n\n\tx = x > 0.008856 ? Math.pow(x, 1 / 3) : (7.787 * x) + (16 / 116);\n\ty = y > 0.008856 ? Math.pow(y, 1 / 3) : (7.787 * y) + (16 / 116);\n\tz = z > 0.008856 ? Math.pow(z, 1 / 3) : (7.787 * z) + (16 / 116);\n\n\tl = (116 * y) - 16;\n\ta = 500 * (x - y);\n\tb = 200 * (y - z);\n\n\treturn [l, a, b];\n};\n\nconvert.lab.xyz = function (lab) {\n\tvar l = lab[0];\n\tvar a = lab[1];\n\tvar b = lab[2];\n\tvar x;\n\tvar y;\n\tvar z;\n\n\ty = (l + 16) / 116;\n\tx = a / 500 + y;\n\tz = y - b / 200;\n\n\tvar y2 = Math.pow(y, 3);\n\tvar x2 = Math.pow(x, 3);\n\tvar z2 = Math.pow(z, 3);\n\ty = y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787;\n\tx = x2 > 0.008856 ? x2 : (x - 16 / 116) / 7.787;\n\tz = z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787;\n\n\tx *= 95.047;\n\ty *= 100;\n\tz *= 108.883;\n\n\treturn [x, y, z];\n};\n\nconvert.lab.lch = function (lab) {\n\tvar l = lab[0];\n\tvar a = lab[1];\n\tvar b = lab[2];\n\tvar hr;\n\tvar h;\n\tvar c;\n\n\thr = Math.atan2(b, a);\n\th = hr * 360 / 2 / Math.PI;\n\n\tif (h < 0) {\n\t\th += 360;\n\t}\n\n\tc = Math.sqrt(a * a + b * b);\n\n\treturn [l, c, h];\n};\n\nconvert.lch.lab = function (lch) {\n\tvar l = lch[0];\n\tvar c = lch[1];\n\tvar h = lch[2];\n\tvar a;\n\tvar b;\n\tvar hr;\n\n\thr = h / 360 * 2 * Math.PI;\n\ta = c * Math.cos(hr);\n\tb = c * Math.sin(hr);\n\n\treturn [l, a, b];\n};\n\nconvert.rgb.ansi16 = function (args) {\n\tvar r = args[0];\n\tvar g = args[1];\n\tvar b = args[2];\n\tvar value = 1 in arguments ? arguments[1] : convert.rgb.hsv(args)[2]; // hsv -> ansi16 optimization\n\n\tvalue = Math.round(value / 50);\n\n\tif (value === 0) {\n\t\treturn 30;\n\t}\n\n\tvar ansi = 30\n\t\t+ ((Math.round(b / 255) << 2)\n\t\t| (Math.round(g / 255) << 1)\n\t\t| Math.round(r / 255));\n\n\tif (value === 2) {\n\t\tansi += 60;\n\t}\n\n\treturn ansi;\n};\n\nconvert.hsv.ansi16 = function (args) {\n\t// optimization here; we already know the value and don't need to get\n\t// it converted for us.\n\treturn convert.rgb.ansi16(convert.hsv.rgb(args), args[2]);\n};\n\nconvert.rgb.ansi256 = function (args) {\n\tvar r = args[0];\n\tvar g = args[1];\n\tvar b = args[2];\n\n\t// we use the extended greyscale palette here, with the exception of\n\t// black and white. normal palette only has 4 greyscale shades.\n\tif (r === g && g === b) {\n\t\tif (r < 8) {\n\t\t\treturn 16;\n\t\t}\n\n\t\tif (r > 248) {\n\t\t\treturn 231;\n\t\t}\n\n\t\treturn Math.round(((r - 8) / 247) * 24) + 232;\n\t}\n\n\tvar ansi = 16\n\t\t+ (36 * Math.round(r / 255 * 5))\n\t\t+ (6 * Math.round(g / 255 * 5))\n\t\t+ Math.round(b / 255 * 5);\n\n\treturn ansi;\n};\n\nconvert.ansi16.rgb = function (args) {\n\tvar color = args % 10;\n\n\t// handle greyscale\n\tif (color === 0 || color === 7) {\n\t\tif (args > 50) {\n\t\t\tcolor += 3.5;\n\t\t}\n\n\t\tcolor = color / 10.5 * 255;\n\n\t\treturn [color, color, color];\n\t}\n\n\tvar mult = (~~(args > 50) + 1) * 0.5;\n\tvar r = ((color & 1) * mult) * 255;\n\tvar g = (((color >> 1) & 1) * mult) * 255;\n\tvar b = (((color >> 2) & 1) * mult) * 255;\n\n\treturn [r, g, b];\n};\n\nconvert.ansi256.rgb = function (args) {\n\t// handle greyscale\n\tif (args >= 232) {\n\t\tvar c = (args - 232) * 10 + 8;\n\t\treturn [c, c, c];\n\t}\n\n\targs -= 16;\n\n\tvar rem;\n\tvar r = Math.floor(args / 36) / 5 * 255;\n\tvar g = Math.floor((rem = args % 36) / 6) / 5 * 255;\n\tvar b = (rem % 6) / 5 * 255;\n\n\treturn [r, g, b];\n};\n\nconvert.rgb.hex = function (args) {\n\tvar integer = ((Math.round(args[0]) & 0xFF) << 16)\n\t\t+ ((Math.round(args[1]) & 0xFF) << 8)\n\t\t+ (Math.round(args[2]) & 0xFF);\n\n\tvar string = integer.toString(16).toUpperCase();\n\treturn '000000'.substring(string.length) + string;\n};\n\nconvert.hex.rgb = function (args) {\n\tvar match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);\n\tif (!match) {\n\t\treturn [0, 0, 0];\n\t}\n\n\tvar colorString = match[0];\n\n\tif (match[0].length === 3) {\n\t\tcolorString = colorString.split('').map(function (char) {\n\t\t\treturn char + char;\n\t\t}).join('');\n\t}\n\n\tvar integer = parseInt(colorString, 16);\n\tvar r = (integer >> 16) & 0xFF;\n\tvar g = (integer >> 8) & 0xFF;\n\tvar b = integer & 0xFF;\n\n\treturn [r, g, b];\n};\n\nconvert.rgb.hcg = function (rgb) {\n\tvar r = rgb[0] / 255;\n\tvar g = rgb[1] / 255;\n\tvar b = rgb[2] / 255;\n\tvar max = Math.max(Math.max(r, g), b);\n\tvar min = Math.min(Math.min(r, g), b);\n\tvar chroma = (max - min);\n\tvar grayscale;\n\tvar hue;\n\n\tif (chroma < 1) {\n\t\tgrayscale = min / (1 - chroma);\n\t} else {\n\t\tgrayscale = 0;\n\t}\n\n\tif (chroma <= 0) {\n\t\thue = 0;\n\t} else\n\tif (max === r) {\n\t\thue = ((g - b) / chroma) % 6;\n\t} else\n\tif (max === g) {\n\t\thue = 2 + (b - r) / chroma;\n\t} else {\n\t\thue = 4 + (r - g) / chroma + 4;\n\t}\n\n\thue /= 6;\n\thue %= 1;\n\n\treturn [hue * 360, chroma * 100, grayscale * 100];\n};\n\nconvert.hsl.hcg = function (hsl) {\n\tvar s = hsl[1] / 100;\n\tvar l = hsl[2] / 100;\n\tvar c = 1;\n\tvar f = 0;\n\n\tif (l < 0.5) {\n\t\tc = 2.0 * s * l;\n\t} else {\n\t\tc = 2.0 * s * (1.0 - l);\n\t}\n\n\tif (c < 1.0) {\n\t\tf = (l - 0.5 * c) / (1.0 - c);\n\t}\n\n\treturn [hsl[0], c * 100, f * 100];\n};\n\nconvert.hsv.hcg = function (hsv) {\n\tvar s = hsv[1] / 100;\n\tvar v = hsv[2] / 100;\n\n\tvar c = s * v;\n\tvar f = 0;\n\n\tif (c < 1.0) {\n\t\tf = (v - c) / (1 - c);\n\t}\n\n\treturn [hsv[0], c * 100, f * 100];\n};\n\nconvert.hcg.rgb = function (hcg) {\n\tvar h = hcg[0] / 360;\n\tvar c = hcg[1] / 100;\n\tvar g = hcg[2] / 100;\n\n\tif (c === 0.0) {\n\t\treturn [g * 255, g * 255, g * 255];\n\t}\n\n\tvar pure = [0, 0, 0];\n\tvar hi = (h % 1) * 6;\n\tvar v = hi % 1;\n\tvar w = 1 - v;\n\tvar mg = 0;\n\n\tswitch (Math.floor(hi)) {\n\t\tcase 0:\n\t\t\tpure[0] = 1; pure[1] = v; pure[2] = 0; break;\n\t\tcase 1:\n\t\t\tpure[0] = w; pure[1] = 1; pure[2] = 0; break;\n\t\tcase 2:\n\t\t\tpure[0] = 0; pure[1] = 1; pure[2] = v; break;\n\t\tcase 3:\n\t\t\tpure[0] = 0; pure[1] = w; pure[2] = 1; break;\n\t\tcase 4:\n\t\t\tpure[0] = v; pure[1] = 0; pure[2] = 1; break;\n\t\tdefault:\n\t\t\tpure[0] = 1; pure[1] = 0; pure[2] = w;\n\t}\n\n\tmg = (1.0 - c) * g;\n\n\treturn [\n\t\t(c * pure[0] + mg) * 255,\n\t\t(c * pure[1] + mg) * 255,\n\t\t(c * pure[2] + mg) * 255\n\t];\n};\n\nconvert.hcg.hsv = function (hcg) {\n\tvar c = hcg[1] / 100;\n\tvar g = hcg[2] / 100;\n\n\tvar v = c + g * (1.0 - c);\n\tvar f = 0;\n\n\tif (v > 0.0) {\n\t\tf = c / v;\n\t}\n\n\treturn [hcg[0], f * 100, v * 100];\n};\n\nconvert.hcg.hsl = function (hcg) {\n\tvar c = hcg[1] / 100;\n\tvar g = hcg[2] / 100;\n\n\tvar l = g * (1.0 - c) + 0.5 * c;\n\tvar s = 0;\n\n\tif (l > 0.0 && l < 0.5) {\n\t\ts = c / (2 * l);\n\t} else\n\tif (l >= 0.5 && l < 1.0) {\n\t\ts = c / (2 * (1 - l));\n\t}\n\n\treturn [hcg[0], s * 100, l * 100];\n};\n\nconvert.hcg.hwb = function (hcg) {\n\tvar c = hcg[1] / 100;\n\tvar g = hcg[2] / 100;\n\tvar v = c + g * (1.0 - c);\n\treturn [hcg[0], (v - c) * 100, (1 - v) * 100];\n};\n\nconvert.hwb.hcg = function (hwb) {\n\tvar w = hwb[1] / 100;\n\tvar b = hwb[2] / 100;\n\tvar v = 1 - b;\n\tvar c = v - w;\n\tvar g = 0;\n\n\tif (c < 1) {\n\t\tg = (v - c) / (1 - c);\n\t}\n\n\treturn [hwb[0], c * 100, g * 100];\n};\n\nconvert.apple.rgb = function (apple) {\n\treturn [(apple[0] / 65535) * 255, (apple[1] / 65535) * 255, (apple[2] / 65535) * 255];\n};\n\nconvert.rgb.apple = function (rgb) {\n\treturn [(rgb[0] / 255) * 65535, (rgb[1] / 255) * 65535, (rgb[2] / 255) * 65535];\n};\n\nconvert.gray.rgb = function (args) {\n\treturn [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255];\n};\n\nconvert.gray.hsl = convert.gray.hsv = function (args) {\n\treturn [0, 0, args[0]];\n};\n\nconvert.gray.hwb = function (gray) {\n\treturn [0, 100, gray[0]];\n};\n\nconvert.gray.cmyk = function (gray) {\n\treturn [0, 0, 0, gray[0]];\n};\n\nconvert.gray.lab = function (gray) {\n\treturn [gray[0], 0, 0];\n};\n\nconvert.gray.hex = function (gray) {\n\tvar val = Math.round(gray[0] / 100 * 255) & 0xFF;\n\tvar integer = (val << 16) + (val << 8) + val;\n\n\tvar string = integer.toString(16).toUpperCase();\n\treturn '000000'.substring(string.length) + string;\n};\n\nconvert.rgb.gray = function (rgb) {\n\tvar val = (rgb[0] + rgb[1] + rgb[2]) / 3;\n\treturn [val / 255 * 100];\n};\n\n\n/***/ }),\n/* 7 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _Colorpicker = __webpack_require__(8);\n\nvar _Colorpicker2 = _interopRequireDefault(_Colorpicker);\n\nvar _jquery = __webpack_require__(0);\n\nvar _jquery2 = _interopRequireDefault(_jquery);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar plugin = 'colorpicker';\n\n_jquery2.default[plugin] = _Colorpicker2.default;\n\n// Colorpicker jQuery Plugin API\n_jquery2.default.fn[plugin] = function (option) {\n var fnArgs = Array.prototype.slice.call(arguments, 1),\n isSingleElement = this.length === 1,\n returnValue = null;\n\n var $elements = this.each(function () {\n var $this = (0, _jquery2.default)(this),\n inst = $this.data(plugin),\n options = (typeof option === 'undefined' ? 'undefined' : _typeof(option)) === 'object' ? option : {};\n\n // Create instance if does not exist\n if (!inst) {\n inst = new _Colorpicker2.default(this, options);\n $this.data(plugin, inst);\n }\n\n if (!isSingleElement) {\n return;\n }\n\n returnValue = $this;\n\n if (typeof option === 'string') {\n if (option === 'colorpicker') {\n // Return colorpicker instance: e.g. .colorpicker('colorpicker')\n returnValue = inst;\n } else if (_jquery2.default.isFunction(inst[option])) {\n // Return method call return value: e.g. .colorpicker('isEnabled')\n returnValue = inst[option].apply(inst, fnArgs);\n } else {\n // Return property value: e.g. .colorpicker('element')\n returnValue = inst[option];\n }\n }\n });\n\n return isSingleElement ? returnValue : $elements;\n};\n\n_jquery2.default.fn[plugin].constructor = _Colorpicker2.default;\n\n/***/ }),\n/* 8 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _Extension = __webpack_require__(1);\n\nvar _Extension2 = _interopRequireDefault(_Extension);\n\nvar _options = __webpack_require__(3);\n\nvar _options2 = _interopRequireDefault(_options);\n\nvar _extensions = __webpack_require__(9);\n\nvar _extensions2 = _interopRequireDefault(_extensions);\n\nvar _jquery = __webpack_require__(0);\n\nvar _jquery2 = _interopRequireDefault(_jquery);\n\nvar _SliderHandler = __webpack_require__(13);\n\nvar _SliderHandler2 = _interopRequireDefault(_SliderHandler);\n\nvar _PopupHandler = __webpack_require__(14);\n\nvar _PopupHandler2 = _interopRequireDefault(_PopupHandler);\n\nvar _InputHandler = __webpack_require__(15);\n\nvar _InputHandler2 = _interopRequireDefault(_InputHandler);\n\nvar _ColorHandler = __webpack_require__(22);\n\nvar _ColorHandler2 = _interopRequireDefault(_ColorHandler);\n\nvar _PickerHandler = __webpack_require__(23);\n\nvar _PickerHandler2 = _interopRequireDefault(_PickerHandler);\n\nvar _AddonHandler = __webpack_require__(24);\n\nvar _AddonHandler2 = _interopRequireDefault(_AddonHandler);\n\nvar _ColorItem = __webpack_require__(2);\n\nvar _ColorItem2 = _interopRequireDefault(_ColorItem);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar colorPickerIdCounter = 0;\nvar root = typeof self !== 'undefined' ? self : undefined; // window\n\n/**\n * Colorpicker widget class\n */\n\nvar Colorpicker = function () {\n _createClass(Colorpicker, [{\n key: 'color',\n\n\n /**\n * Internal color object\n *\n * @type {Color|null}\n */\n get: function get() {\n return this.colorHandler.color;\n }\n\n /**\n * Internal color format\n *\n * @type {String|null}\n */\n\n }, {\n key: 'format',\n get: function get() {\n return this.colorHandler.format;\n }\n\n /**\n * Getter of the picker element\n *\n * @returns {jQuery|HTMLElement}\n */\n\n }, {\n key: 'picker',\n get: function get() {\n return this.pickerHandler.picker;\n }\n\n /**\n * @fires Colorpicker#colorpickerCreate\n * @param {Object|String} element\n * @param {Object} options\n * @constructor\n */\n\n }], [{\n key: 'Color',\n\n /**\n * Color class\n *\n * @static\n * @type {Color}\n */\n get: function get() {\n return _ColorItem2.default;\n }\n\n /**\n * Extension class\n *\n * @static\n * @type {Extension}\n */\n\n }, {\n key: 'Extension',\n get: function get() {\n return _Extension2.default;\n }\n }]);\n\n function Colorpicker(element, options) {\n _classCallCheck(this, Colorpicker);\n\n colorPickerIdCounter += 1;\n /**\n * The colorpicker instance number\n * @type {number}\n */\n this.id = colorPickerIdCounter;\n\n /**\n * Latest colorpicker event\n *\n * @type {{name: String, e: *}}\n */\n this.lastEvent = {\n alias: null,\n e: null\n };\n\n /**\n * The element that the colorpicker is bound to\n *\n * @type {*|jQuery}\n */\n this.element = (0, _jquery2.default)(element).addClass('colorpicker-element').attr('data-colorpicker-id', this.id);\n\n /**\n * @type {defaults}\n */\n this.options = _jquery2.default.extend(true, {}, _options2.default, options, this.element.data());\n\n /**\n * @type {boolean}\n * @private\n */\n this.disabled = false;\n\n /**\n * Extensions added to this instance\n *\n * @type {Extension[]}\n */\n this.extensions = [];\n\n /**\n * The element where the\n * @type {*|jQuery}\n */\n this.container = this.options.container === true || this.options.container !== true && this.options.inline === true ? this.element : this.options.container;\n\n this.container = this.container !== false ? (0, _jquery2.default)(this.container) : false;\n\n /**\n * @type {InputHandler}\n */\n this.inputHandler = new _InputHandler2.default(this);\n /**\n * @type {ColorHandler}\n */\n this.colorHandler = new _ColorHandler2.default(this);\n /**\n * @type {SliderHandler}\n */\n this.sliderHandler = new _SliderHandler2.default(this);\n /**\n * @type {PopupHandler}\n */\n this.popupHandler = new _PopupHandler2.default(this, root);\n /**\n * @type {PickerHandler}\n */\n this.pickerHandler = new _PickerHandler2.default(this);\n /**\n * @type {AddonHandler}\n */\n this.addonHandler = new _AddonHandler2.default(this);\n\n this.init();\n\n // Emit a create event\n (0, _jquery2.default)(_jquery2.default.proxy(function () {\n /**\n * (Colorpicker) When the Colorpicker instance has been created and the DOM is ready.\n *\n * @event Colorpicker#colorpickerCreate\n */\n this.trigger('colorpickerCreate');\n }, this));\n }\n\n /**\n * Initializes the plugin\n * @private\n */\n\n\n _createClass(Colorpicker, [{\n key: 'init',\n value: function init() {\n // Init addon\n this.addonHandler.bind();\n\n // Init input\n this.inputHandler.bind();\n\n // Init extensions (before initializing the color)\n this.initExtensions();\n\n // Init color\n this.colorHandler.bind();\n\n // Init picker\n this.pickerHandler.bind();\n\n // Init sliders and popup\n this.sliderHandler.bind();\n this.popupHandler.bind();\n\n // Inject into the DOM (this may make it visible)\n this.pickerHandler.attach();\n\n // Update all components\n this.update();\n\n if (this.inputHandler.isDisabled()) {\n this.disable();\n }\n }\n\n /**\n * Initializes the plugin extensions\n * @private\n */\n\n }, {\n key: 'initExtensions',\n value: function initExtensions() {\n var _this = this;\n\n if (!Array.isArray(this.options.extensions)) {\n this.options.extensions = [];\n }\n\n if (this.options.debug) {\n this.options.extensions.push({ name: 'debugger' });\n }\n\n // Register and instantiate extensions\n this.options.extensions.forEach(function (ext) {\n _this.registerExtension(Colorpicker.extensions[ext.name.toLowerCase()], ext.options || {});\n });\n }\n\n /**\n * Creates and registers the given extension\n *\n * @param {Extension} ExtensionClass The extension class to instantiate\n * @param {Object} [config] Extension configuration\n * @returns {Extension}\n */\n\n }, {\n key: 'registerExtension',\n value: function registerExtension(ExtensionClass) {\n var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n var ext = new ExtensionClass(this, config);\n\n this.extensions.push(ext);\n return ext;\n }\n\n /**\n * Destroys the current instance\n *\n * @fires Colorpicker#colorpickerDestroy\n */\n\n }, {\n key: 'destroy',\n value: function destroy() {\n var color = this.color;\n\n this.sliderHandler.unbind();\n this.inputHandler.unbind();\n this.popupHandler.unbind();\n this.colorHandler.unbind();\n this.addonHandler.unbind();\n this.pickerHandler.unbind();\n\n this.element.removeClass('colorpicker-element').removeData('colorpicker', 'color').off('.colorpicker');\n\n /**\n * (Colorpicker) When the instance is destroyed with all events unbound.\n *\n * @event Colorpicker#colorpickerDestroy\n */\n this.trigger('colorpickerDestroy', color);\n }\n\n /**\n * Shows the colorpicker widget if hidden.\n * If the colorpicker is disabled this call will be ignored.\n *\n * @fires Colorpicker#colorpickerShow\n * @param {Event} [e]\n */\n\n }, {\n key: 'show',\n value: function show(e) {\n this.popupHandler.show(e);\n }\n\n /**\n * Hides the colorpicker widget.\n *\n * @fires Colorpicker#colorpickerHide\n * @param {Event} [e]\n */\n\n }, {\n key: 'hide',\n value: function hide(e) {\n this.popupHandler.hide(e);\n }\n\n /**\n * Toggles the colorpicker between visible and hidden.\n *\n * @fires Colorpicker#colorpickerShow\n * @fires Colorpicker#colorpickerHide\n * @param {Event} [e]\n */\n\n }, {\n key: 'toggle',\n value: function toggle(e) {\n this.popupHandler.toggle(e);\n }\n\n /**\n * Returns the current color value as string\n *\n * @param {String|*} [defaultValue]\n * @returns {String|*}\n */\n\n }, {\n key: 'getValue',\n value: function getValue() {\n var defaultValue = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n\n var val = this.colorHandler.color;\n\n val = val instanceof _ColorItem2.default ? val : defaultValue;\n\n if (val instanceof _ColorItem2.default) {\n return val.string(this.format);\n }\n\n return val;\n }\n\n /**\n * Sets the color manually\n *\n * @fires Colorpicker#colorpickerChange\n * @param {String|Color} val\n */\n\n }, {\n key: 'setValue',\n value: function setValue(val) {\n if (this.isDisabled()) {\n return;\n }\n var ch = this.colorHandler;\n\n if (ch.hasColor() && !!val && ch.color.equals(val) || !ch.hasColor() && !val) {\n // same color or still empty\n return;\n }\n\n ch.color = val ? ch.createColor(val, this.options.autoInputFallback) : null;\n\n /**\n * (Colorpicker) When the color is set programmatically with setValue().\n *\n * @event Colorpicker#colorpickerChange\n */\n this.trigger('colorpickerChange', ch.color, val);\n\n // force update if color has changed to empty\n this.update();\n }\n\n /**\n * Updates the UI and the input color according to the internal color.\n *\n * @fires Colorpicker#colorpickerUpdate\n */\n\n }, {\n key: 'update',\n value: function update() {\n if (this.colorHandler.hasColor()) {\n this.inputHandler.update();\n } else {\n this.colorHandler.assureColor();\n }\n\n this.addonHandler.update();\n this.pickerHandler.update();\n\n /**\n * (Colorpicker) Fired when the widget is updated.\n *\n * @event Colorpicker#colorpickerUpdate\n */\n this.trigger('colorpickerUpdate');\n }\n\n /**\n * Enables the widget and the input if any\n *\n * @fires Colorpicker#colorpickerEnable\n * @returns {boolean}\n */\n\n }, {\n key: 'enable',\n value: function enable() {\n this.inputHandler.enable();\n this.disabled = false;\n this.picker.removeClass('colorpicker-disabled');\n\n /**\n * (Colorpicker) When the widget has been enabled.\n *\n * @event Colorpicker#colorpickerEnable\n */\n this.trigger('colorpickerEnable');\n return true;\n }\n\n /**\n * Disables the widget and the input if any\n *\n * @fires Colorpicker#colorpickerDisable\n * @returns {boolean}\n */\n\n }, {\n key: 'disable',\n value: function disable() {\n this.inputHandler.disable();\n this.disabled = true;\n this.picker.addClass('colorpicker-disabled');\n\n /**\n * (Colorpicker) When the widget has been disabled.\n *\n * @event Colorpicker#colorpickerDisable\n */\n this.trigger('colorpickerDisable');\n return true;\n }\n\n /**\n * Returns true if this instance is enabled\n * @returns {boolean}\n */\n\n }, {\n key: 'isEnabled',\n value: function isEnabled() {\n return !this.isDisabled();\n }\n\n /**\n * Returns true if this instance is disabled\n * @returns {boolean}\n */\n\n }, {\n key: 'isDisabled',\n value: function isDisabled() {\n return this.disabled === true;\n }\n\n /**\n * Triggers a Colorpicker event.\n *\n * @param eventName\n * @param color\n * @param value\n */\n\n }, {\n key: 'trigger',\n value: function trigger(eventName) {\n var color = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n var value = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;\n\n this.element.trigger({\n type: eventName,\n colorpicker: this,\n color: color ? color : this.color,\n value: value ? value : this.getValue()\n });\n }\n }]);\n\n return Colorpicker;\n}();\n\n/**\n * Colorpicker extension classes, indexed by extension name\n *\n * @static\n * @type {Object} a map between the extension name and its class\n */\n\n\nColorpicker.extensions = _extensions2.default;\n\nexports.default = Colorpicker;\n\n/***/ }),\n/* 9 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Palette = exports.Swatches = exports.Preview = exports.Debugger = undefined;\n\nvar _Debugger = __webpack_require__(10);\n\nvar _Debugger2 = _interopRequireDefault(_Debugger);\n\nvar _Preview = __webpack_require__(11);\n\nvar _Preview2 = _interopRequireDefault(_Preview);\n\nvar _Swatches = __webpack_require__(12);\n\nvar _Swatches2 = _interopRequireDefault(_Swatches);\n\nvar _Palette = __webpack_require__(4);\n\nvar _Palette2 = _interopRequireDefault(_Palette);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.Debugger = _Debugger2.default;\nexports.Preview = _Preview2.default;\nexports.Swatches = _Swatches2.default;\nexports.Palette = _Palette2.default;\nexports.default = {\n 'debugger': _Debugger2.default,\n 'preview': _Preview2.default,\n 'swatches': _Swatches2.default,\n 'palette': _Palette2.default\n};\n\n/***/ }),\n/* 10 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if (\"value\" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };\n\nvar _Extension2 = __webpack_require__(1);\n\nvar _Extension3 = _interopRequireDefault(_Extension2);\n\nvar _jquery = __webpack_require__(0);\n\nvar _jquery2 = _interopRequireDefault(_jquery);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n/**\n * Debugger extension class\n * @alias DebuggerExtension\n * @ignore\n */\nvar Debugger = function (_Extension) {\n _inherits(Debugger, _Extension);\n\n function Debugger(colorpicker) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n _classCallCheck(this, Debugger);\n\n /**\n * @type {number}\n */\n var _this = _possibleConstructorReturn(this, (Debugger.__proto__ || Object.getPrototypeOf(Debugger)).call(this, colorpicker, options));\n\n _this.eventCounter = 0;\n if (_this.colorpicker.inputHandler.hasInput()) {\n _this.colorpicker.inputHandler.input.on('change.colorpicker-ext', _jquery2.default.proxy(_this.onChangeInput, _this));\n }\n return _this;\n }\n\n /**\n * @fires DebuggerExtension#colorpickerDebug\n * @param {string} eventName\n * @param {*} args\n */\n\n\n _createClass(Debugger, [{\n key: 'log',\n value: function log(eventName) {\n var _console;\n\n for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n this.eventCounter += 1;\n\n var logMessage = '#' + this.eventCounter + ': Colorpicker#' + this.colorpicker.id + ' [' + eventName + ']';\n\n (_console = console).debug.apply(_console, [logMessage].concat(args));\n\n /**\n * Whenever the debugger logs an event, this other event is emitted.\n *\n * @event DebuggerExtension#colorpickerDebug\n * @type {object} The event object\n * @property {Colorpicker} colorpicker The Colorpicker instance\n * @property {ColorItem} color The color instance\n * @property {{debugger: DebuggerExtension, eventName: String, logArgs: Array, logMessage: String}} debug\n * The debug info\n */\n this.colorpicker.element.trigger({\n type: 'colorpickerDebug',\n colorpicker: this.colorpicker,\n color: this.color,\n value: null,\n debug: {\n debugger: this,\n eventName: eventName,\n logArgs: args,\n logMessage: logMessage\n }\n });\n }\n }, {\n key: 'resolveColor',\n value: function resolveColor(color) {\n var realColor = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n\n this.log('resolveColor()', color, realColor);\n return false;\n }\n }, {\n key: 'onCreate',\n value: function onCreate(event) {\n this.log('colorpickerCreate');\n return _get(Debugger.prototype.__proto__ || Object.getPrototypeOf(Debugger.prototype), 'onCreate', this).call(this, event);\n }\n }, {\n key: 'onDestroy',\n value: function onDestroy(event) {\n this.log('colorpickerDestroy');\n this.eventCounter = 0;\n\n if (this.colorpicker.inputHandler.hasInput()) {\n this.colorpicker.inputHandler.input.off('.colorpicker-ext');\n }\n\n return _get(Debugger.prototype.__proto__ || Object.getPrototypeOf(Debugger.prototype), 'onDestroy', this).call(this, event);\n }\n }, {\n key: 'onUpdate',\n value: function onUpdate(event) {\n this.log('colorpickerUpdate');\n }\n\n /**\n * @listens Colorpicker#change\n * @param {Event} event\n */\n\n }, {\n key: 'onChangeInput',\n value: function onChangeInput(event) {\n this.log('input:change.colorpicker', event.value, event.color);\n }\n }, {\n key: 'onChange',\n value: function onChange(event) {\n this.log('colorpickerChange', event.value, event.color);\n }\n }, {\n key: 'onInvalid',\n value: function onInvalid(event) {\n this.log('colorpickerInvalid', event.value, event.color);\n }\n }, {\n key: 'onHide',\n value: function onHide(event) {\n this.log('colorpickerHide');\n this.eventCounter = 0;\n }\n }, {\n key: 'onShow',\n value: function onShow(event) {\n this.log('colorpickerShow');\n }\n }, {\n key: 'onDisable',\n value: function onDisable(event) {\n this.log('colorpickerDisable');\n }\n }, {\n key: 'onEnable',\n value: function onEnable(event) {\n this.log('colorpickerEnable');\n }\n }]);\n\n return Debugger;\n}(_Extension3.default);\n\nexports.default = Debugger;\n\n/***/ }),\n/* 11 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if (\"value\" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };\n\nvar _Extension2 = __webpack_require__(1);\n\nvar _Extension3 = _interopRequireDefault(_Extension2);\n\nvar _jquery = __webpack_require__(0);\n\nvar _jquery2 = _interopRequireDefault(_jquery);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n/**\n * Color preview extension\n * @ignore\n */\nvar Preview = function (_Extension) {\n _inherits(Preview, _Extension);\n\n function Preview(colorpicker) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n _classCallCheck(this, Preview);\n\n var _this = _possibleConstructorReturn(this, (Preview.__proto__ || Object.getPrototypeOf(Preview)).call(this, colorpicker, _jquery2.default.extend(true, {}, {\n template: '
',\n showText: true,\n format: colorpicker.format\n }, options)));\n\n _this.element = (0, _jquery2.default)(_this.options.template);\n _this.elementInner = _this.element.find('div');\n return _this;\n }\n\n _createClass(Preview, [{\n key: 'onCreate',\n value: function onCreate(event) {\n _get(Preview.prototype.__proto__ || Object.getPrototypeOf(Preview.prototype), 'onCreate', this).call(this, event);\n this.colorpicker.picker.append(this.element);\n }\n }, {\n key: 'onUpdate',\n value: function onUpdate(event) {\n _get(Preview.prototype.__proto__ || Object.getPrototypeOf(Preview.prototype), 'onUpdate', this).call(this, event);\n\n if (!event.color) {\n this.elementInner.css('backgroundColor', null).css('color', null).html('');\n return;\n }\n\n this.elementInner.css('backgroundColor', event.color.toRgbString());\n\n if (this.options.showText) {\n this.elementInner.html(event.color.string(this.options.format || this.colorpicker.format));\n\n if (event.color.isDark() && event.color.alpha > 0.5) {\n this.elementInner.css('color', 'white');\n } else {\n this.elementInner.css('color', 'black');\n }\n }\n }\n }]);\n\n return Preview;\n}(_Extension3.default);\n\nexports.default = Preview;\n\n/***/ }),\n/* 12 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if (\"value\" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };\n\nvar _Palette2 = __webpack_require__(4);\n\nvar _Palette3 = _interopRequireDefault(_Palette2);\n\nvar _jquery = __webpack_require__(0);\n\nvar _jquery2 = _interopRequireDefault(_jquery);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar defaults = {\n barTemplate: '
\\n
\\n
',\n swatchTemplate: ''\n};\n\n/**\n * Color swatches extension\n * @ignore\n */\n\nvar Swatches = function (_Palette) {\n _inherits(Swatches, _Palette);\n\n function Swatches(colorpicker) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n _classCallCheck(this, Swatches);\n\n var _this = _possibleConstructorReturn(this, (Swatches.__proto__ || Object.getPrototypeOf(Swatches)).call(this, colorpicker, _jquery2.default.extend(true, {}, defaults, options)));\n\n _this.element = null;\n return _this;\n }\n\n _createClass(Swatches, [{\n key: 'isEnabled',\n value: function isEnabled() {\n return this.getLength() > 0;\n }\n }, {\n key: 'onCreate',\n value: function onCreate(event) {\n _get(Swatches.prototype.__proto__ || Object.getPrototypeOf(Swatches.prototype), 'onCreate', this).call(this, event);\n\n if (!this.isEnabled()) {\n return;\n }\n\n this.element = (0, _jquery2.default)(this.options.barTemplate);\n this.load();\n this.colorpicker.picker.append(this.element);\n }\n }, {\n key: 'load',\n value: function load() {\n var _this2 = this;\n\n var colorpicker = this.colorpicker,\n swatchContainer = this.element.find('.colorpicker-swatches--inner'),\n isAliased = this.options.namesAsValues === true && !Array.isArray(this.colors);\n\n swatchContainer.empty();\n\n _jquery2.default.each(this.colors, function (name, value) {\n var $swatch = (0, _jquery2.default)(_this2.options.swatchTemplate).attr('data-name', name).attr('data-value', value).attr('title', isAliased ? name + ': ' + value : value).on('mousedown.colorpicker touchstart.colorpicker', function (e) {\n var $sw = (0, _jquery2.default)(this);\n\n // e.preventDefault();\n\n colorpicker.setValue(isAliased ? $sw.attr('data-name') : $sw.attr('data-value'));\n });\n\n $swatch.find('.colorpicker-swatch--inner').css('background-color', value);\n\n swatchContainer.append($swatch);\n });\n\n swatchContainer.append((0, _jquery2.default)(''));\n }\n }]);\n\n return Swatches;\n}(_Palette3.default);\n\nexports.default = Swatches;\n\n/***/ }),\n/* 13 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _jquery = __webpack_require__(0);\n\nvar _jquery2 = _interopRequireDefault(_jquery);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n/**\n * Class that handles all configured sliders on mouse or touch events.\n * @ignore\n */\nvar SliderHandler = function () {\n /**\n * @param {Colorpicker} colorpicker\n */\n function SliderHandler(colorpicker) {\n _classCallCheck(this, SliderHandler);\n\n /**\n * @type {Colorpicker}\n */\n this.colorpicker = colorpicker;\n /**\n * @type {*|String}\n * @private\n */\n this.currentSlider = null;\n /**\n * @type {{left: number, top: number}}\n * @private\n */\n this.mousePointer = {\n left: 0,\n top: 0\n };\n\n /**\n * @type {Function}\n */\n this.onMove = _jquery2.default.proxy(this.defaultOnMove, this);\n }\n\n /**\n * This function is called every time a slider guide is moved\n * The scope of \"this\" is the SliderHandler object.\n *\n * @param {int} top\n * @param {int} left\n */\n\n\n _createClass(SliderHandler, [{\n key: 'defaultOnMove',\n value: function defaultOnMove(top, left) {\n if (!this.currentSlider) {\n return;\n }\n\n var slider = this.currentSlider,\n cp = this.colorpicker,\n ch = cp.colorHandler;\n\n // Create a color object\n var color = !ch.hasColor() ? ch.getFallbackColor() : ch.color.getClone();\n\n // Adjust the guide position\n slider.guideStyle.left = left + 'px';\n slider.guideStyle.top = top + 'px';\n\n // Adjust the color\n if (slider.callLeft) {\n color[slider.callLeft](left / slider.maxLeft);\n }\n if (slider.callTop) {\n color[slider.callTop](top / slider.maxTop);\n }\n\n // Set the new color\n cp.setValue(color);\n cp.popupHandler.focus();\n }\n\n /**\n * Binds the colorpicker sliders to the mouse/touch events\n */\n\n }, {\n key: 'bind',\n value: function bind() {\n var sliders = this.colorpicker.options.horizontal ? this.colorpicker.options.slidersHorz : this.colorpicker.options.sliders;\n var sliderClasses = [];\n\n for (var sliderName in sliders) {\n if (!sliders.hasOwnProperty(sliderName)) {\n continue;\n }\n\n sliderClasses.push(sliders[sliderName].selector);\n }\n\n this.colorpicker.picker.find(sliderClasses.join(', ')).on('mousedown.colorpicker touchstart.colorpicker', _jquery2.default.proxy(this.pressed, this));\n }\n\n /**\n * Unbinds any event bound by this handler\n */\n\n }, {\n key: 'unbind',\n value: function unbind() {\n (0, _jquery2.default)(this.colorpicker.picker).off({\n 'mousemove.colorpicker': _jquery2.default.proxy(this.moved, this),\n 'touchmove.colorpicker': _jquery2.default.proxy(this.moved, this),\n 'mouseup.colorpicker': _jquery2.default.proxy(this.released, this),\n 'touchend.colorpicker': _jquery2.default.proxy(this.released, this)\n });\n }\n\n /**\n * Function triggered when clicking in one of the color adjustment bars\n *\n * @private\n * @fires Colorpicker#mousemove\n * @param {Event} e\n */\n\n }, {\n key: 'pressed',\n value: function pressed(e) {\n if (this.colorpicker.isDisabled()) {\n return;\n }\n this.colorpicker.lastEvent.alias = 'pressed';\n this.colorpicker.lastEvent.e = e;\n\n if (!e.pageX && !e.pageY && e.originalEvent && e.originalEvent.touches) {\n e.pageX = e.originalEvent.touches[0].pageX;\n e.pageY = e.originalEvent.touches[0].pageY;\n }\n // e.stopPropagation();\n // e.preventDefault();\n\n var target = (0, _jquery2.default)(e.target);\n\n // detect the slider and set the limits and callbacks\n var zone = target.closest('div');\n var sliders = this.colorpicker.options.horizontal ? this.colorpicker.options.slidersHorz : this.colorpicker.options.sliders;\n\n if (zone.is('.colorpicker')) {\n return;\n }\n\n this.currentSlider = null;\n\n for (var sliderName in sliders) {\n if (!sliders.hasOwnProperty(sliderName)) {\n continue;\n }\n\n var slider = sliders[sliderName];\n\n if (zone.is(slider.selector)) {\n this.currentSlider = _jquery2.default.extend({}, slider, { name: sliderName });\n break;\n } else if (slider.childSelector !== undefined && zone.is(slider.childSelector)) {\n this.currentSlider = _jquery2.default.extend({}, slider, { name: sliderName });\n zone = zone.parent(); // zone.parents(slider.selector).first() ?\n break;\n }\n }\n\n var guide = zone.find('.colorpicker-guide').get(0);\n\n if (this.currentSlider === null || guide === null) {\n return;\n }\n\n var offset = zone.offset();\n\n // reference to guide's style\n this.currentSlider.guideStyle = guide.style;\n this.currentSlider.left = e.pageX - offset.left;\n this.currentSlider.top = e.pageY - offset.top;\n this.mousePointer = {\n left: e.pageX,\n top: e.pageY\n };\n\n // TODO: fix moving outside the picker makes the guides to keep moving. The event needs to be bound to the window.\n /**\n * (window.document) Triggered on mousedown for the document object,\n * so the color adjustment guide is moved to the clicked position.\n *\n * @event Colorpicker#mousemove\n */\n (0, _jquery2.default)(this.colorpicker.picker).on({\n 'mousemove.colorpicker': _jquery2.default.proxy(this.moved, this),\n 'touchmove.colorpicker': _jquery2.default.proxy(this.moved, this),\n 'mouseup.colorpicker': _jquery2.default.proxy(this.released, this),\n 'touchend.colorpicker': _jquery2.default.proxy(this.released, this)\n }).trigger('mousemove');\n }\n\n /**\n * Function triggered when dragging a guide inside one of the color adjustment bars.\n *\n * @private\n * @param {Event} e\n */\n\n }, {\n key: 'moved',\n value: function moved(e) {\n this.colorpicker.lastEvent.alias = 'moved';\n this.colorpicker.lastEvent.e = e;\n\n if (!e.pageX && !e.pageY && e.originalEvent && e.originalEvent.touches) {\n e.pageX = e.originalEvent.touches[0].pageX;\n e.pageY = e.originalEvent.touches[0].pageY;\n }\n\n // e.stopPropagation();\n e.preventDefault(); // prevents scrolling on mobile\n\n var left = Math.max(0, Math.min(this.currentSlider.maxLeft, this.currentSlider.left + ((e.pageX || this.mousePointer.left) - this.mousePointer.left)));\n\n var top = Math.max(0, Math.min(this.currentSlider.maxTop, this.currentSlider.top + ((e.pageY || this.mousePointer.top) - this.mousePointer.top)));\n\n this.onMove(top, left);\n }\n\n /**\n * Function triggered when releasing the click in one of the color adjustment bars.\n *\n * @private\n * @param {Event} e\n */\n\n }, {\n key: 'released',\n value: function released(e) {\n this.colorpicker.lastEvent.alias = 'released';\n this.colorpicker.lastEvent.e = e;\n\n // e.stopPropagation();\n // e.preventDefault();\n\n (0, _jquery2.default)(this.colorpicker.picker).off({\n 'mousemove.colorpicker': this.moved,\n 'touchmove.colorpicker': this.moved,\n 'mouseup.colorpicker': this.released,\n 'touchend.colorpicker': this.released\n });\n }\n }]);\n\n return SliderHandler;\n}();\n\nexports.default = SliderHandler;\n\n/***/ }),\n/* 14 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _jquery = __webpack_require__(0);\n\nvar _jquery2 = _interopRequireDefault(_jquery);\n\nvar _options = __webpack_require__(3);\n\nvar _options2 = _interopRequireDefault(_options);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n/**\n * Handles everything related to the UI of the colorpicker popup: show, hide, position,...\n * @ignore\n */\nvar PopupHandler = function () {\n /**\n * @param {Colorpicker} colorpicker\n * @param {Window} root\n */\n function PopupHandler(colorpicker, root) {\n _classCallCheck(this, PopupHandler);\n\n /**\n * @type {Window}\n */\n this.root = root;\n /**\n * @type {Colorpicker}\n */\n this.colorpicker = colorpicker;\n /**\n * @type {jQuery}\n */\n this.popoverTarget = null;\n /**\n * @type {jQuery}\n */\n this.popoverTip = null;\n\n /**\n * If true, the latest click was inside the popover\n * @type {boolean}\n */\n this.clicking = false;\n /**\n * @type {boolean}\n */\n this.hidding = false;\n /**\n * @type {boolean}\n */\n this.showing = false;\n }\n\n /**\n * @private\n * @returns {jQuery|false}\n */\n\n\n _createClass(PopupHandler, [{\n key: 'bind',\n\n\n /**\n * Binds the different colorpicker elements to the focus/mouse/touch events so it reacts in order to show or\n * hide the colorpicker popup accordingly. It also adds the proper classes.\n */\n value: function bind() {\n var cp = this.colorpicker;\n\n if (cp.options.inline) {\n cp.picker.addClass('colorpicker-inline colorpicker-visible');\n return; // no need to bind show/hide events for inline elements\n }\n\n cp.picker.addClass('colorpicker-popup colorpicker-hidden');\n\n // there is no input or addon\n if (!this.hasInput && !this.hasAddon) {\n return;\n }\n\n // create Bootstrap 4 popover\n if (cp.options.popover) {\n this.createPopover();\n }\n\n // bind addon show/hide events\n if (this.hasAddon) {\n // enable focus on addons\n if (!this.addon.attr('tabindex')) {\n this.addon.attr('tabindex', 0);\n }\n\n this.addon.on({\n 'mousedown.colorpicker touchstart.colorpicker': _jquery2.default.proxy(this.toggle, this)\n });\n\n this.addon.on({\n 'focus.colorpicker': _jquery2.default.proxy(this.show, this)\n });\n\n this.addon.on({\n 'focusout.colorpicker': _jquery2.default.proxy(this.hide, this)\n });\n }\n\n // bind input show/hide events\n if (this.hasInput && !this.hasAddon) {\n this.input.on({\n 'mousedown.colorpicker touchstart.colorpicker': _jquery2.default.proxy(this.show, this),\n 'focus.colorpicker': _jquery2.default.proxy(this.show, this)\n });\n\n this.input.on({\n 'focusout.colorpicker': _jquery2.default.proxy(this.hide, this)\n });\n }\n\n // reposition popup on window resize\n (0, _jquery2.default)(this.root).on('resize.colorpicker', _jquery2.default.proxy(this.reposition, this));\n }\n\n /**\n * Unbinds any event bound by this handler\n */\n\n }, {\n key: 'unbind',\n value: function unbind() {\n if (this.hasInput) {\n this.input.off({\n 'mousedown.colorpicker touchstart.colorpicker': _jquery2.default.proxy(this.show, this),\n 'focus.colorpicker': _jquery2.default.proxy(this.show, this)\n });\n this.input.off({\n 'focusout.colorpicker': _jquery2.default.proxy(this.hide, this)\n });\n }\n\n if (this.hasAddon) {\n this.addon.off({\n 'mousedown.colorpicker touchstart.colorpicker': _jquery2.default.proxy(this.toggle, this)\n });\n this.addon.off({\n 'focus.colorpicker': _jquery2.default.proxy(this.show, this)\n });\n this.addon.off({\n 'focusout.colorpicker': _jquery2.default.proxy(this.hide, this)\n });\n }\n\n if (this.popoverTarget) {\n this.popoverTarget.popover('dispose');\n }\n\n (0, _jquery2.default)(this.root).off('resize.colorpicker', _jquery2.default.proxy(this.reposition, this));\n (0, _jquery2.default)(this.root.document).off('mousedown.colorpicker touchstart.colorpicker', _jquery2.default.proxy(this.hide, this));\n (0, _jquery2.default)(this.root.document).off('mousedown.colorpicker touchstart.colorpicker', _jquery2.default.proxy(this.onClickingInside, this));\n }\n }, {\n key: 'isClickingInside',\n value: function isClickingInside(e) {\n if (!e) {\n return false;\n }\n\n return this.isOrIsInside(this.popoverTip, e.currentTarget) || this.isOrIsInside(this.popoverTip, e.target) || this.isOrIsInside(this.colorpicker.picker, e.currentTarget) || this.isOrIsInside(this.colorpicker.picker, e.target);\n }\n }, {\n key: 'isOrIsInside',\n value: function isOrIsInside(container, element) {\n if (!container || !element) {\n return false;\n }\n\n element = (0, _jquery2.default)(element);\n\n return element.is(container) || container.find(element).length > 0;\n }\n }, {\n key: 'onClickingInside',\n value: function onClickingInside(e) {\n this.clicking = this.isClickingInside(e);\n }\n }, {\n key: 'createPopover',\n value: function createPopover() {\n var cp = this.colorpicker;\n\n this.popoverTarget = this.hasAddon ? this.addon : this.input;\n\n cp.picker.addClass('colorpicker-bs-popover-content');\n\n this.popoverTarget.popover(_jquery2.default.extend(true, {}, _options2.default.popover, cp.options.popover, { trigger: 'manual', content: cp.picker, html: true }));\n\n this.popoverTip = (0, _jquery2.default)(this.popoverTarget.popover('getTipElement').data('bs.popover').tip);\n this.popoverTip.addClass('colorpicker-bs-popover');\n\n this.popoverTarget.on('shown.bs.popover', _jquery2.default.proxy(this.fireShow, this));\n this.popoverTarget.on('hidden.bs.popover', _jquery2.default.proxy(this.fireHide, this));\n }\n\n /**\n * If the widget is not inside a container or inline, rearranges its position relative to its element offset.\n *\n * @param {Event} [e]\n * @private\n */\n\n }, {\n key: 'reposition',\n value: function reposition(e) {\n if (this.popoverTarget && this.isVisible()) {\n this.popoverTarget.popover('update');\n }\n }\n\n /**\n * Toggles the colorpicker between visible or hidden\n *\n * @fires Colorpicker#colorpickerShow\n * @fires Colorpicker#colorpickerHide\n * @param {Event} [e]\n */\n\n }, {\n key: 'toggle',\n value: function toggle(e) {\n if (this.isVisible()) {\n this.hide(e);\n } else {\n this.show(e);\n }\n }\n\n /**\n * Shows the colorpicker widget if hidden.\n *\n * @fires Colorpicker#colorpickerShow\n * @param {Event} [e]\n */\n\n }, {\n key: 'show',\n value: function show(e) {\n if (this.isVisible() || this.showing || this.hidding) {\n return;\n }\n\n this.showing = true;\n this.hidding = false;\n this.clicking = false;\n\n var cp = this.colorpicker;\n\n cp.lastEvent.alias = 'show';\n cp.lastEvent.e = e;\n\n // Prevent showing browser native HTML5 colorpicker\n if (e && (!this.hasInput || this.input.attr('type') === 'color') && e && e.preventDefault) {\n e.stopPropagation();\n e.preventDefault();\n }\n\n // If it's a popover, add event to the document to hide the picker when clicking outside of it\n if (this.isPopover) {\n (0, _jquery2.default)(this.root).on('resize.colorpicker', _jquery2.default.proxy(this.reposition, this));\n }\n\n // add visible class before popover is shown\n cp.picker.addClass('colorpicker-visible').removeClass('colorpicker-hidden');\n\n if (this.popoverTarget) {\n this.popoverTarget.popover('show');\n } else {\n this.fireShow();\n }\n }\n }, {\n key: 'fireShow',\n value: function fireShow() {\n this.hidding = false;\n this.showing = false;\n\n if (this.isPopover) {\n // Add event to hide on outside click\n (0, _jquery2.default)(this.root.document).on('mousedown.colorpicker touchstart.colorpicker', _jquery2.default.proxy(this.hide, this));\n (0, _jquery2.default)(this.root.document).on('mousedown.colorpicker touchstart.colorpicker', _jquery2.default.proxy(this.onClickingInside, this));\n }\n\n /**\n * (Colorpicker) When show() is called and the widget can be shown.\n *\n * @event Colorpicker#colorpickerShow\n */\n this.colorpicker.trigger('colorpickerShow');\n }\n\n /**\n * Hides the colorpicker widget.\n * Hide is prevented when it is triggered by an event whose target element has been clicked/touched.\n *\n * @fires Colorpicker#colorpickerHide\n * @param {Event} [e]\n */\n\n }, {\n key: 'hide',\n value: function hide(e) {\n if (this.isHidden() || this.showing || this.hidding) {\n return;\n }\n\n var cp = this.colorpicker,\n clicking = this.clicking || this.isClickingInside(e);\n\n this.hidding = true;\n this.showing = false;\n this.clicking = false;\n\n cp.lastEvent.alias = 'hide';\n cp.lastEvent.e = e;\n\n // TODO: fix having to click twice outside when losing focus and last 2 clicks where inside the colorpicker\n\n // Prevent hide if triggered by an event and an element inside the colorpicker has been clicked/touched\n if (clicking) {\n this.hidding = false;\n return;\n }\n\n if (this.popoverTarget) {\n this.popoverTarget.popover('hide');\n } else {\n this.fireHide();\n }\n }\n }, {\n key: 'fireHide',\n value: function fireHide() {\n this.hidding = false;\n this.showing = false;\n\n var cp = this.colorpicker;\n\n // add hidden class after popover is hidden\n cp.picker.addClass('colorpicker-hidden').removeClass('colorpicker-visible');\n\n // Unbind window and document events, since there is no need to keep them while the popup is hidden\n (0, _jquery2.default)(this.root).off('resize.colorpicker', _jquery2.default.proxy(this.reposition, this));\n (0, _jquery2.default)(this.root.document).off('mousedown.colorpicker touchstart.colorpicker', _jquery2.default.proxy(this.hide, this));\n (0, _jquery2.default)(this.root.document).off('mousedown.colorpicker touchstart.colorpicker', _jquery2.default.proxy(this.onClickingInside, this));\n\n /**\n * (Colorpicker) When hide() is called and the widget can be hidden.\n *\n * @event Colorpicker#colorpickerHide\n */\n cp.trigger('colorpickerHide');\n }\n }, {\n key: 'focus',\n value: function focus() {\n if (this.hasAddon) {\n return this.addon.focus();\n }\n if (this.hasInput) {\n return this.input.focus();\n }\n return false;\n }\n\n /**\n * Returns true if the colorpicker element has the colorpicker-visible class and not the colorpicker-hidden one.\n * False otherwise.\n *\n * @returns {boolean}\n */\n\n }, {\n key: 'isVisible',\n value: function isVisible() {\n return this.colorpicker.picker.hasClass('colorpicker-visible') && !this.colorpicker.picker.hasClass('colorpicker-hidden');\n }\n\n /**\n * Returns true if the colorpicker element has the colorpicker-hidden class and not the colorpicker-visible one.\n * False otherwise.\n *\n * @returns {boolean}\n */\n\n }, {\n key: 'isHidden',\n value: function isHidden() {\n return this.colorpicker.picker.hasClass('colorpicker-hidden') && !this.colorpicker.picker.hasClass('colorpicker-visible');\n }\n }, {\n key: 'input',\n get: function get() {\n return this.colorpicker.inputHandler.input;\n }\n\n /**\n * @private\n * @returns {boolean}\n */\n\n }, {\n key: 'hasInput',\n get: function get() {\n return this.colorpicker.inputHandler.hasInput();\n }\n\n /**\n * @private\n * @returns {jQuery|false}\n */\n\n }, {\n key: 'addon',\n get: function get() {\n return this.colorpicker.addonHandler.addon;\n }\n\n /**\n * @private\n * @returns {boolean}\n */\n\n }, {\n key: 'hasAddon',\n get: function get() {\n return this.colorpicker.addonHandler.hasAddon();\n }\n\n /**\n * @private\n * @returns {boolean}\n */\n\n }, {\n key: 'isPopover',\n get: function get() {\n return !this.colorpicker.options.inline && !!this.popoverTip;\n }\n }]);\n\n return PopupHandler;\n}();\n\nexports.default = PopupHandler;\n\n/***/ }),\n/* 15 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _jquery = __webpack_require__(0);\n\nvar _jquery2 = _interopRequireDefault(_jquery);\n\nvar _ColorItem = __webpack_require__(2);\n\nvar _ColorItem2 = _interopRequireDefault(_ColorItem);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n/**\n * Handles everything related to the colorpicker input\n * @ignore\n */\nvar InputHandler = function () {\n /**\n * @param {Colorpicker} colorpicker\n */\n function InputHandler(colorpicker) {\n _classCallCheck(this, InputHandler);\n\n /**\n * @type {Colorpicker}\n */\n this.colorpicker = colorpicker;\n /**\n * @type {jQuery|false}\n */\n this.input = this.colorpicker.element.is('input') ? this.colorpicker.element : this.colorpicker.options.input ? this.colorpicker.element.find(this.colorpicker.options.input) : false;\n\n if (this.input && this.input.length === 0) {\n this.input = false;\n }\n\n this._initValue();\n }\n\n _createClass(InputHandler, [{\n key: 'bind',\n value: function bind() {\n if (!this.hasInput()) {\n return;\n }\n this.input.on({\n 'keyup.colorpicker': _jquery2.default.proxy(this.onkeyup, this)\n });\n this.input.on({\n 'change.colorpicker': _jquery2.default.proxy(this.onchange, this)\n });\n }\n }, {\n key: 'unbind',\n value: function unbind() {\n if (!this.hasInput()) {\n return;\n }\n this.input.off('.colorpicker');\n }\n }, {\n key: '_initValue',\n value: function _initValue() {\n if (!this.hasInput()) {\n return;\n }\n\n var val = '';\n\n [\n // candidates:\n this.input.val(), this.input.data('color'), this.input.attr('data-color')].map(function (item) {\n if (item && val === '') {\n val = item;\n }\n });\n\n if (val instanceof _ColorItem2.default) {\n val = this.getFormattedColor(val.string(this.colorpicker.format));\n } else if (!(typeof val === 'string' || val instanceof String)) {\n val = '';\n }\n\n this.input.prop('value', val);\n }\n\n /**\n * Returns the color string from the input value.\n * If there is no input the return value is false.\n *\n * @returns {String|boolean}\n */\n\n }, {\n key: 'getValue',\n value: function getValue() {\n if (!this.hasInput()) {\n return false;\n }\n\n return this.input.val();\n }\n\n /**\n * If the input element is present, it updates the value with the current color object color string.\n * If the value is changed, this method fires a \"change\" event on the input element.\n *\n * @param {String} val\n *\n * @fires Colorpicker#change\n */\n\n }, {\n key: 'setValue',\n value: function setValue(val) {\n if (!this.hasInput()) {\n return;\n }\n\n var inputVal = this.input.prop('value');\n\n val = val ? val : '';\n\n if (val === (inputVal ? inputVal : '')) {\n // No need to set value or trigger any event if nothing changed\n return;\n }\n\n this.input.prop('value', val);\n\n /**\n * (Input) Triggered on the input element when a new color is selected.\n *\n * @event Colorpicker#change\n */\n this.input.trigger({\n type: 'change',\n colorpicker: this.colorpicker,\n color: this.colorpicker.color,\n value: val\n });\n }\n\n /**\n * Returns the formatted color string, with the formatting options applied\n * (e.g. useHashPrefix)\n *\n * @param {String|null} val\n *\n * @returns {String}\n */\n\n }, {\n key: 'getFormattedColor',\n value: function getFormattedColor() {\n var val = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n\n val = val ? val : this.colorpicker.colorHandler.getColorString();\n\n if (!val) {\n return '';\n }\n\n val = this.colorpicker.colorHandler.resolveColorDelegate(val, false);\n\n if (this.colorpicker.options.useHashPrefix === false) {\n val = val.replace(/^#/g, '');\n }\n\n return val;\n }\n\n /**\n * Returns true if the widget has an associated input element, false otherwise\n * @returns {boolean}\n */\n\n }, {\n key: 'hasInput',\n value: function hasInput() {\n return this.input !== false;\n }\n\n /**\n * Returns true if the input exists and is disabled\n * @returns {boolean}\n */\n\n }, {\n key: 'isEnabled',\n value: function isEnabled() {\n return this.hasInput() && !this.isDisabled();\n }\n\n /**\n * Returns true if the input exists and is disabled\n * @returns {boolean}\n */\n\n }, {\n key: 'isDisabled',\n value: function isDisabled() {\n return this.hasInput() && this.input.prop('disabled') === true;\n }\n\n /**\n * Disables the input if any\n *\n * @fires Colorpicker#colorpickerDisable\n * @returns {boolean}\n */\n\n }, {\n key: 'disable',\n value: function disable() {\n if (this.hasInput()) {\n this.input.prop('disabled', true);\n }\n }\n\n /**\n * Enables the input if any\n *\n * @fires Colorpicker#colorpickerEnable\n * @returns {boolean}\n */\n\n }, {\n key: 'enable',\n value: function enable() {\n if (this.hasInput()) {\n this.input.prop('disabled', false);\n }\n }\n\n /**\n * Calls setValue with the current internal color value\n *\n * @fires Colorpicker#change\n */\n\n }, {\n key: 'update',\n value: function update() {\n if (!this.hasInput()) {\n return;\n }\n\n if (this.colorpicker.options.autoInputFallback === false && this.colorpicker.colorHandler.isInvalidColor()) {\n // prevent update if color is invalid, autoInputFallback is disabled and the last event is keyup.\n return;\n }\n\n this.setValue(this.getFormattedColor());\n }\n\n /**\n * Function triggered when the input has changed, so the colorpicker gets updated.\n *\n * @private\n * @param {Event} e\n * @returns {boolean}\n */\n\n }, {\n key: 'onchange',\n value: function onchange(e) {\n this.colorpicker.lastEvent.alias = 'input.change';\n this.colorpicker.lastEvent.e = e;\n\n var val = this.getValue();\n\n if (val !== e.value) {\n this.colorpicker.setValue(val);\n }\n }\n\n /**\n * Function triggered after a keyboard key has been released.\n *\n * @private\n * @param {Event} e\n * @returns {boolean}\n */\n\n }, {\n key: 'onkeyup',\n value: function onkeyup(e) {\n this.colorpicker.lastEvent.alias = 'input.keyup';\n this.colorpicker.lastEvent.e = e;\n\n var val = this.getValue();\n\n if (val !== e.value) {\n this.colorpicker.setValue(val);\n }\n }\n }]);\n\n return InputHandler;\n}();\n\nexports.default = InputHandler;\n\n/***/ }),\n/* 16 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar colorString = __webpack_require__(17);\nvar convert = __webpack_require__(20);\n\nvar _slice = [].slice;\n\nvar skippedModels = [\n\t// to be honest, I don't really feel like keyword belongs in color convert, but eh.\n\t'keyword',\n\n\t// gray conflicts with some method names, and has its own method defined.\n\t'gray',\n\n\t// shouldn't really be in color-convert either...\n\t'hex'\n];\n\nvar hashedModelKeys = {};\nObject.keys(convert).forEach(function (model) {\n\thashedModelKeys[_slice.call(convert[model].labels).sort().join('')] = model;\n});\n\nvar limiters = {};\n\nfunction Color(obj, model) {\n\tif (!(this instanceof Color)) {\n\t\treturn new Color(obj, model);\n\t}\n\n\tif (model && model in skippedModels) {\n\t\tmodel = null;\n\t}\n\n\tif (model && !(model in convert)) {\n\t\tthrow new Error('Unknown model: ' + model);\n\t}\n\n\tvar i;\n\tvar channels;\n\n\tif (typeof obj === 'undefined') {\n\t\tthis.model = 'rgb';\n\t\tthis.color = [0, 0, 0];\n\t\tthis.valpha = 1;\n\t} else if (obj instanceof Color) {\n\t\tthis.model = obj.model;\n\t\tthis.color = obj.color.slice();\n\t\tthis.valpha = obj.valpha;\n\t} else if (typeof obj === 'string') {\n\t\tvar result = colorString.get(obj);\n\t\tif (result === null) {\n\t\t\tthrow new Error('Unable to parse color from string: ' + obj);\n\t\t}\n\n\t\tthis.model = result.model;\n\t\tchannels = convert[this.model].channels;\n\t\tthis.color = result.value.slice(0, channels);\n\t\tthis.valpha = typeof result.value[channels] === 'number' ? result.value[channels] : 1;\n\t} else if (obj.length) {\n\t\tthis.model = model || 'rgb';\n\t\tchannels = convert[this.model].channels;\n\t\tvar newArr = _slice.call(obj, 0, channels);\n\t\tthis.color = zeroArray(newArr, channels);\n\t\tthis.valpha = typeof obj[channels] === 'number' ? obj[channels] : 1;\n\t} else if (typeof obj === 'number') {\n\t\t// this is always RGB - can be converted later on.\n\t\tobj &= 0xFFFFFF;\n\t\tthis.model = 'rgb';\n\t\tthis.color = [\n\t\t\t(obj >> 16) & 0xFF,\n\t\t\t(obj >> 8) & 0xFF,\n\t\t\tobj & 0xFF\n\t\t];\n\t\tthis.valpha = 1;\n\t} else {\n\t\tthis.valpha = 1;\n\n\t\tvar keys = Object.keys(obj);\n\t\tif ('alpha' in obj) {\n\t\t\tkeys.splice(keys.indexOf('alpha'), 1);\n\t\t\tthis.valpha = typeof obj.alpha === 'number' ? obj.alpha : 0;\n\t\t}\n\n\t\tvar hashedKeys = keys.sort().join('');\n\t\tif (!(hashedKeys in hashedModelKeys)) {\n\t\t\tthrow new Error('Unable to parse color from object: ' + JSON.stringify(obj));\n\t\t}\n\n\t\tthis.model = hashedModelKeys[hashedKeys];\n\n\t\tvar labels = convert[this.model].labels;\n\t\tvar color = [];\n\t\tfor (i = 0; i < labels.length; i++) {\n\t\t\tcolor.push(obj[labels[i]]);\n\t\t}\n\n\t\tthis.color = zeroArray(color);\n\t}\n\n\t// perform limitations (clamping, etc.)\n\tif (limiters[this.model]) {\n\t\tchannels = convert[this.model].channels;\n\t\tfor (i = 0; i < channels; i++) {\n\t\t\tvar limit = limiters[this.model][i];\n\t\t\tif (limit) {\n\t\t\t\tthis.color[i] = limit(this.color[i]);\n\t\t\t}\n\t\t}\n\t}\n\n\tthis.valpha = Math.max(0, Math.min(1, this.valpha));\n\n\tif (Object.freeze) {\n\t\tObject.freeze(this);\n\t}\n}\n\nColor.prototype = {\n\ttoString: function () {\n\t\treturn this.string();\n\t},\n\n\ttoJSON: function () {\n\t\treturn this[this.model]();\n\t},\n\n\tstring: function (places) {\n\t\tvar self = this.model in colorString.to ? this : this.rgb();\n\t\tself = self.round(typeof places === 'number' ? places : 1);\n\t\tvar args = self.valpha === 1 ? self.color : self.color.concat(this.valpha);\n\t\treturn colorString.to[self.model](args);\n\t},\n\n\tpercentString: function (places) {\n\t\tvar self = this.rgb().round(typeof places === 'number' ? places : 1);\n\t\tvar args = self.valpha === 1 ? self.color : self.color.concat(this.valpha);\n\t\treturn colorString.to.rgb.percent(args);\n\t},\n\n\tarray: function () {\n\t\treturn this.valpha === 1 ? this.color.slice() : this.color.concat(this.valpha);\n\t},\n\n\tobject: function () {\n\t\tvar result = {};\n\t\tvar channels = convert[this.model].channels;\n\t\tvar labels = convert[this.model].labels;\n\n\t\tfor (var i = 0; i < channels; i++) {\n\t\t\tresult[labels[i]] = this.color[i];\n\t\t}\n\n\t\tif (this.valpha !== 1) {\n\t\t\tresult.alpha = this.valpha;\n\t\t}\n\n\t\treturn result;\n\t},\n\n\tunitArray: function () {\n\t\tvar rgb = this.rgb().color;\n\t\trgb[0] /= 255;\n\t\trgb[1] /= 255;\n\t\trgb[2] /= 255;\n\n\t\tif (this.valpha !== 1) {\n\t\t\trgb.push(this.valpha);\n\t\t}\n\n\t\treturn rgb;\n\t},\n\n\tunitObject: function () {\n\t\tvar rgb = this.rgb().object();\n\t\trgb.r /= 255;\n\t\trgb.g /= 255;\n\t\trgb.b /= 255;\n\n\t\tif (this.valpha !== 1) {\n\t\t\trgb.alpha = this.valpha;\n\t\t}\n\n\t\treturn rgb;\n\t},\n\n\tround: function (places) {\n\t\tplaces = Math.max(places || 0, 0);\n\t\treturn new Color(this.color.map(roundToPlace(places)).concat(this.valpha), this.model);\n\t},\n\n\talpha: function (val) {\n\t\tif (arguments.length) {\n\t\t\treturn new Color(this.color.concat(Math.max(0, Math.min(1, val))), this.model);\n\t\t}\n\n\t\treturn this.valpha;\n\t},\n\n\t// rgb\n\tred: getset('rgb', 0, maxfn(255)),\n\tgreen: getset('rgb', 1, maxfn(255)),\n\tblue: getset('rgb', 2, maxfn(255)),\n\n\thue: getset(['hsl', 'hsv', 'hsl', 'hwb', 'hcg'], 0, function (val) { return ((val % 360) + 360) % 360; }), // eslint-disable-line brace-style\n\n\tsaturationl: getset('hsl', 1, maxfn(100)),\n\tlightness: getset('hsl', 2, maxfn(100)),\n\n\tsaturationv: getset('hsv', 1, maxfn(100)),\n\tvalue: getset('hsv', 2, maxfn(100)),\n\n\tchroma: getset('hcg', 1, maxfn(100)),\n\tgray: getset('hcg', 2, maxfn(100)),\n\n\twhite: getset('hwb', 1, maxfn(100)),\n\twblack: getset('hwb', 2, maxfn(100)),\n\n\tcyan: getset('cmyk', 0, maxfn(100)),\n\tmagenta: getset('cmyk', 1, maxfn(100)),\n\tyellow: getset('cmyk', 2, maxfn(100)),\n\tblack: getset('cmyk', 3, maxfn(100)),\n\n\tx: getset('xyz', 0, maxfn(100)),\n\ty: getset('xyz', 1, maxfn(100)),\n\tz: getset('xyz', 2, maxfn(100)),\n\n\tl: getset('lab', 0, maxfn(100)),\n\ta: getset('lab', 1),\n\tb: getset('lab', 2),\n\n\tkeyword: function (val) {\n\t\tif (arguments.length) {\n\t\t\treturn new Color(val);\n\t\t}\n\n\t\treturn convert[this.model].keyword(this.color);\n\t},\n\n\thex: function (val) {\n\t\tif (arguments.length) {\n\t\t\treturn new Color(val);\n\t\t}\n\n\t\treturn colorString.to.hex(this.rgb().round().color);\n\t},\n\n\trgbNumber: function () {\n\t\tvar rgb = this.rgb().color;\n\t\treturn ((rgb[0] & 0xFF) << 16) | ((rgb[1] & 0xFF) << 8) | (rgb[2] & 0xFF);\n\t},\n\n\tluminosity: function () {\n\t\t// http://www.w3.org/TR/WCAG20/#relativeluminancedef\n\t\tvar rgb = this.rgb().color;\n\n\t\tvar lum = [];\n\t\tfor (var i = 0; i < rgb.length; i++) {\n\t\t\tvar chan = rgb[i] / 255;\n\t\t\tlum[i] = (chan <= 0.03928) ? chan / 12.92 : Math.pow(((chan + 0.055) / 1.055), 2.4);\n\t\t}\n\n\t\treturn 0.2126 * lum[0] + 0.7152 * lum[1] + 0.0722 * lum[2];\n\t},\n\n\tcontrast: function (color2) {\n\t\t// http://www.w3.org/TR/WCAG20/#contrast-ratiodef\n\t\tvar lum1 = this.luminosity();\n\t\tvar lum2 = color2.luminosity();\n\n\t\tif (lum1 > lum2) {\n\t\t\treturn (lum1 + 0.05) / (lum2 + 0.05);\n\t\t}\n\n\t\treturn (lum2 + 0.05) / (lum1 + 0.05);\n\t},\n\n\tlevel: function (color2) {\n\t\tvar contrastRatio = this.contrast(color2);\n\t\tif (contrastRatio >= 7.1) {\n\t\t\treturn 'AAA';\n\t\t}\n\n\t\treturn (contrastRatio >= 4.5) ? 'AA' : '';\n\t},\n\n\tisDark: function () {\n\t\t// YIQ equation from http://24ways.org/2010/calculating-color-contrast\n\t\tvar rgb = this.rgb().color;\n\t\tvar yiq = (rgb[0] * 299 + rgb[1] * 587 + rgb[2] * 114) / 1000;\n\t\treturn yiq < 128;\n\t},\n\n\tisLight: function () {\n\t\treturn !this.isDark();\n\t},\n\n\tnegate: function () {\n\t\tvar rgb = this.rgb();\n\t\tfor (var i = 0; i < 3; i++) {\n\t\t\trgb.color[i] = 255 - rgb.color[i];\n\t\t}\n\t\treturn rgb;\n\t},\n\n\tlighten: function (ratio) {\n\t\tvar hsl = this.hsl();\n\t\thsl.color[2] += hsl.color[2] * ratio;\n\t\treturn hsl;\n\t},\n\n\tdarken: function (ratio) {\n\t\tvar hsl = this.hsl();\n\t\thsl.color[2] -= hsl.color[2] * ratio;\n\t\treturn hsl;\n\t},\n\n\tsaturate: function (ratio) {\n\t\tvar hsl = this.hsl();\n\t\thsl.color[1] += hsl.color[1] * ratio;\n\t\treturn hsl;\n\t},\n\n\tdesaturate: function (ratio) {\n\t\tvar hsl = this.hsl();\n\t\thsl.color[1] -= hsl.color[1] * ratio;\n\t\treturn hsl;\n\t},\n\n\twhiten: function (ratio) {\n\t\tvar hwb = this.hwb();\n\t\thwb.color[1] += hwb.color[1] * ratio;\n\t\treturn hwb;\n\t},\n\n\tblacken: function (ratio) {\n\t\tvar hwb = this.hwb();\n\t\thwb.color[2] += hwb.color[2] * ratio;\n\t\treturn hwb;\n\t},\n\n\tgrayscale: function () {\n\t\t// http://en.wikipedia.org/wiki/Grayscale#Converting_color_to_grayscale\n\t\tvar rgb = this.rgb().color;\n\t\tvar val = rgb[0] * 0.3 + rgb[1] * 0.59 + rgb[2] * 0.11;\n\t\treturn Color.rgb(val, val, val);\n\t},\n\n\tfade: function (ratio) {\n\t\treturn this.alpha(this.valpha - (this.valpha * ratio));\n\t},\n\n\topaquer: function (ratio) {\n\t\treturn this.alpha(this.valpha + (this.valpha * ratio));\n\t},\n\n\trotate: function (degrees) {\n\t\tvar hsl = this.hsl();\n\t\tvar hue = hsl.color[0];\n\t\thue = (hue + degrees) % 360;\n\t\thue = hue < 0 ? 360 + hue : hue;\n\t\thsl.color[0] = hue;\n\t\treturn hsl;\n\t},\n\n\tmix: function (mixinColor, weight) {\n\t\t// ported from sass implementation in C\n\t\t// https://github.com/sass/libsass/blob/0e6b4a2850092356aa3ece07c6b249f0221caced/functions.cpp#L209\n\t\tif (!mixinColor || !mixinColor.rgb) {\n\t\t\tthrow new Error('Argument to \"mix\" was not a Color instance, but rather an instance of ' + typeof mixinColor);\n\t\t}\n\t\tvar color1 = mixinColor.rgb();\n\t\tvar color2 = this.rgb();\n\t\tvar p = weight === undefined ? 0.5 : weight;\n\n\t\tvar w = 2 * p - 1;\n\t\tvar a = color1.alpha() - color2.alpha();\n\n\t\tvar w1 = (((w * a === -1) ? w : (w + a) / (1 + w * a)) + 1) / 2.0;\n\t\tvar w2 = 1 - w1;\n\n\t\treturn Color.rgb(\n\t\t\t\tw1 * color1.red() + w2 * color2.red(),\n\t\t\t\tw1 * color1.green() + w2 * color2.green(),\n\t\t\t\tw1 * color1.blue() + w2 * color2.blue(),\n\t\t\t\tcolor1.alpha() * p + color2.alpha() * (1 - p));\n\t}\n};\n\n// model conversion methods and static constructors\nObject.keys(convert).forEach(function (model) {\n\tif (skippedModels.indexOf(model) !== -1) {\n\t\treturn;\n\t}\n\n\tvar channels = convert[model].channels;\n\n\t// conversion methods\n\tColor.prototype[model] = function () {\n\t\tif (this.model === model) {\n\t\t\treturn new Color(this);\n\t\t}\n\n\t\tif (arguments.length) {\n\t\t\treturn new Color(arguments, model);\n\t\t}\n\n\t\tvar newAlpha = typeof arguments[channels] === 'number' ? channels : this.valpha;\n\t\treturn new Color(assertArray(convert[this.model][model].raw(this.color)).concat(newAlpha), model);\n\t};\n\n\t// 'static' construction methods\n\tColor[model] = function (color) {\n\t\tif (typeof color === 'number') {\n\t\t\tcolor = zeroArray(_slice.call(arguments), channels);\n\t\t}\n\t\treturn new Color(color, model);\n\t};\n});\n\nfunction roundTo(num, places) {\n\treturn Number(num.toFixed(places));\n}\n\nfunction roundToPlace(places) {\n\treturn function (num) {\n\t\treturn roundTo(num, places);\n\t};\n}\n\nfunction getset(model, channel, modifier) {\n\tmodel = Array.isArray(model) ? model : [model];\n\n\tmodel.forEach(function (m) {\n\t\t(limiters[m] || (limiters[m] = []))[channel] = modifier;\n\t});\n\n\tmodel = model[0];\n\n\treturn function (val) {\n\t\tvar result;\n\n\t\tif (arguments.length) {\n\t\t\tif (modifier) {\n\t\t\t\tval = modifier(val);\n\t\t\t}\n\n\t\t\tresult = this[model]();\n\t\t\tresult.color[channel] = val;\n\t\t\treturn result;\n\t\t}\n\n\t\tresult = this[model]().color[channel];\n\t\tif (modifier) {\n\t\t\tresult = modifier(result);\n\t\t}\n\n\t\treturn result;\n\t};\n}\n\nfunction maxfn(max) {\n\treturn function (v) {\n\t\treturn Math.max(0, Math.min(max, v));\n\t};\n}\n\nfunction assertArray(val) {\n\treturn Array.isArray(val) ? val : [val];\n}\n\nfunction zeroArray(arr, length) {\n\tfor (var i = 0; i < length; i++) {\n\t\tif (typeof arr[i] !== 'number') {\n\t\t\tarr[i] = 0;\n\t\t}\n\t}\n\n\treturn arr;\n}\n\nmodule.exports = Color;\n\n\n/***/ }),\n/* 17 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/* MIT license */\nvar colorNames = __webpack_require__(5);\nvar swizzle = __webpack_require__(18);\n\nvar reverseNames = {};\n\n// create a list of reverse color names\nfor (var name in colorNames) {\n\tif (colorNames.hasOwnProperty(name)) {\n\t\treverseNames[colorNames[name]] = name;\n\t}\n}\n\nvar cs = module.exports = {\n\tto: {},\n\tget: {}\n};\n\ncs.get = function (string) {\n\tvar prefix = string.substring(0, 3).toLowerCase();\n\tvar val;\n\tvar model;\n\tswitch (prefix) {\n\t\tcase 'hsl':\n\t\t\tval = cs.get.hsl(string);\n\t\t\tmodel = 'hsl';\n\t\t\tbreak;\n\t\tcase 'hwb':\n\t\t\tval = cs.get.hwb(string);\n\t\t\tmodel = 'hwb';\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tval = cs.get.rgb(string);\n\t\t\tmodel = 'rgb';\n\t\t\tbreak;\n\t}\n\n\tif (!val) {\n\t\treturn null;\n\t}\n\n\treturn {model: model, value: val};\n};\n\ncs.get.rgb = function (string) {\n\tif (!string) {\n\t\treturn null;\n\t}\n\n\tvar abbr = /^#([a-f0-9]{3,4})$/i;\n\tvar hex = /^#([a-f0-9]{6})([a-f0-9]{2})?$/i;\n\tvar rgba = /^rgba?\\(\\s*([+-]?\\d+)\\s*,\\s*([+-]?\\d+)\\s*,\\s*([+-]?\\d+)\\s*(?:,\\s*([+-]?[\\d\\.]+)\\s*)?\\)$/;\n\tvar per = /^rgba?\\(\\s*([+-]?[\\d\\.]+)\\%\\s*,\\s*([+-]?[\\d\\.]+)\\%\\s*,\\s*([+-]?[\\d\\.]+)\\%\\s*(?:,\\s*([+-]?[\\d\\.]+)\\s*)?\\)$/;\n\tvar keyword = /(\\D+)/;\n\n\tvar rgb = [0, 0, 0, 1];\n\tvar match;\n\tvar i;\n\tvar hexAlpha;\n\n\tif (match = string.match(hex)) {\n\t\thexAlpha = match[2];\n\t\tmatch = match[1];\n\n\t\tfor (i = 0; i < 3; i++) {\n\t\t\t// https://jsperf.com/slice-vs-substr-vs-substring-methods-long-string/19\n\t\t\tvar i2 = i * 2;\n\t\t\trgb[i] = parseInt(match.slice(i2, i2 + 2), 16);\n\t\t}\n\n\t\tif (hexAlpha) {\n\t\t\trgb[3] = Math.round((parseInt(hexAlpha, 16) / 255) * 100) / 100;\n\t\t}\n\t} else if (match = string.match(abbr)) {\n\t\tmatch = match[1];\n\t\thexAlpha = match[3];\n\n\t\tfor (i = 0; i < 3; i++) {\n\t\t\trgb[i] = parseInt(match[i] + match[i], 16);\n\t\t}\n\n\t\tif (hexAlpha) {\n\t\t\trgb[3] = Math.round((parseInt(hexAlpha + hexAlpha, 16) / 255) * 100) / 100;\n\t\t}\n\t} else if (match = string.match(rgba)) {\n\t\tfor (i = 0; i < 3; i++) {\n\t\t\trgb[i] = parseInt(match[i + 1], 0);\n\t\t}\n\n\t\tif (match[4]) {\n\t\t\trgb[3] = parseFloat(match[4]);\n\t\t}\n\t} else if (match = string.match(per)) {\n\t\tfor (i = 0; i < 3; i++) {\n\t\t\trgb[i] = Math.round(parseFloat(match[i + 1]) * 2.55);\n\t\t}\n\n\t\tif (match[4]) {\n\t\t\trgb[3] = parseFloat(match[4]);\n\t\t}\n\t} else if (match = string.match(keyword)) {\n\t\tif (match[1] === 'transparent') {\n\t\t\treturn [0, 0, 0, 0];\n\t\t}\n\n\t\trgb = colorNames[match[1]];\n\n\t\tif (!rgb) {\n\t\t\treturn null;\n\t\t}\n\n\t\trgb[3] = 1;\n\n\t\treturn rgb;\n\t} else {\n\t\treturn null;\n\t}\n\n\tfor (i = 0; i < 3; i++) {\n\t\trgb[i] = clamp(rgb[i], 0, 255);\n\t}\n\trgb[3] = clamp(rgb[3], 0, 1);\n\n\treturn rgb;\n};\n\ncs.get.hsl = function (string) {\n\tif (!string) {\n\t\treturn null;\n\t}\n\n\tvar hsl = /^hsla?\\(\\s*([+-]?(?:\\d*\\.)?\\d+)(?:deg)?\\s*,\\s*([+-]?[\\d\\.]+)%\\s*,\\s*([+-]?[\\d\\.]+)%\\s*(?:,\\s*([+-]?[\\d\\.]+)\\s*)?\\)$/;\n\tvar match = string.match(hsl);\n\n\tif (match) {\n\t\tvar alpha = parseFloat(match[4]);\n\t\tvar h = (parseFloat(match[1]) + 360) % 360;\n\t\tvar s = clamp(parseFloat(match[2]), 0, 100);\n\t\tvar l = clamp(parseFloat(match[3]), 0, 100);\n\t\tvar a = clamp(isNaN(alpha) ? 1 : alpha, 0, 1);\n\n\t\treturn [h, s, l, a];\n\t}\n\n\treturn null;\n};\n\ncs.get.hwb = function (string) {\n\tif (!string) {\n\t\treturn null;\n\t}\n\n\tvar hwb = /^hwb\\(\\s*([+-]?\\d*[\\.]?\\d+)(?:deg)?\\s*,\\s*([+-]?[\\d\\.]+)%\\s*,\\s*([+-]?[\\d\\.]+)%\\s*(?:,\\s*([+-]?[\\d\\.]+)\\s*)?\\)$/;\n\tvar match = string.match(hwb);\n\n\tif (match) {\n\t\tvar alpha = parseFloat(match[4]);\n\t\tvar h = ((parseFloat(match[1]) % 360) + 360) % 360;\n\t\tvar w = clamp(parseFloat(match[2]), 0, 100);\n\t\tvar b = clamp(parseFloat(match[3]), 0, 100);\n\t\tvar a = clamp(isNaN(alpha) ? 1 : alpha, 0, 1);\n\t\treturn [h, w, b, a];\n\t}\n\n\treturn null;\n};\n\ncs.to.hex = function () {\n\tvar rgba = swizzle(arguments);\n\n\treturn (\n\t\t'#' +\n\t\thexDouble(rgba[0]) +\n\t\thexDouble(rgba[1]) +\n\t\thexDouble(rgba[2]) +\n\t\t(rgba[3] < 1\n\t\t\t? (hexDouble(Math.round(rgba[3] * 255)))\n\t\t\t: '')\n\t);\n};\n\ncs.to.rgb = function () {\n\tvar rgba = swizzle(arguments);\n\n\treturn rgba.length < 4 || rgba[3] === 1\n\t\t? 'rgb(' + Math.round(rgba[0]) + ', ' + Math.round(rgba[1]) + ', ' + Math.round(rgba[2]) + ')'\n\t\t: 'rgba(' + Math.round(rgba[0]) + ', ' + Math.round(rgba[1]) + ', ' + Math.round(rgba[2]) + ', ' + rgba[3] + ')';\n};\n\ncs.to.rgb.percent = function () {\n\tvar rgba = swizzle(arguments);\n\n\tvar r = Math.round(rgba[0] / 255 * 100);\n\tvar g = Math.round(rgba[1] / 255 * 100);\n\tvar b = Math.round(rgba[2] / 255 * 100);\n\n\treturn rgba.length < 4 || rgba[3] === 1\n\t\t? 'rgb(' + r + '%, ' + g + '%, ' + b + '%)'\n\t\t: 'rgba(' + r + '%, ' + g + '%, ' + b + '%, ' + rgba[3] + ')';\n};\n\ncs.to.hsl = function () {\n\tvar hsla = swizzle(arguments);\n\treturn hsla.length < 4 || hsla[3] === 1\n\t\t? 'hsl(' + hsla[0] + ', ' + hsla[1] + '%, ' + hsla[2] + '%)'\n\t\t: 'hsla(' + hsla[0] + ', ' + hsla[1] + '%, ' + hsla[2] + '%, ' + hsla[3] + ')';\n};\n\n// hwb is a bit different than rgb(a) & hsl(a) since there is no alpha specific syntax\n// (hwb have alpha optional & 1 is default value)\ncs.to.hwb = function () {\n\tvar hwba = swizzle(arguments);\n\n\tvar a = '';\n\tif (hwba.length >= 4 && hwba[3] !== 1) {\n\t\ta = ', ' + hwba[3];\n\t}\n\n\treturn 'hwb(' + hwba[0] + ', ' + hwba[1] + '%, ' + hwba[2] + '%' + a + ')';\n};\n\ncs.to.keyword = function (rgb) {\n\treturn reverseNames[rgb.slice(0, 3)];\n};\n\n// helpers\nfunction clamp(num, min, max) {\n\treturn Math.min(Math.max(min, num), max);\n}\n\nfunction hexDouble(num) {\n\tvar str = num.toString(16).toUpperCase();\n\treturn (str.length < 2) ? '0' + str : str;\n}\n\n\n/***/ }),\n/* 18 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar isArrayish = __webpack_require__(19);\n\nvar concat = Array.prototype.concat;\nvar slice = Array.prototype.slice;\n\nvar swizzle = module.exports = function swizzle(args) {\n\tvar results = [];\n\n\tfor (var i = 0, len = args.length; i < len; i++) {\n\t\tvar arg = args[i];\n\n\t\tif (isArrayish(arg)) {\n\t\t\t// http://jsperf.com/javascript-array-concat-vs-push/98\n\t\t\tresults = concat.call(results, slice.call(arg));\n\t\t} else {\n\t\t\tresults.push(arg);\n\t\t}\n\t}\n\n\treturn results;\n};\n\nswizzle.wrap = function (fn) {\n\treturn function () {\n\t\treturn fn(swizzle(arguments));\n\t};\n};\n\n\n/***/ }),\n/* 19 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nmodule.exports = function isArrayish(obj) {\n\tif (!obj) {\n\t\treturn false;\n\t}\n\n\treturn obj instanceof Array || Array.isArray(obj) ||\n\t\t(obj.length >= 0 && obj.splice instanceof Function);\n};\n\n\n/***/ }),\n/* 20 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar conversions = __webpack_require__(6);\nvar route = __webpack_require__(21);\n\nvar convert = {};\n\nvar models = Object.keys(conversions);\n\nfunction wrapRaw(fn) {\n\tvar wrappedFn = function (args) {\n\t\tif (args === undefined || args === null) {\n\t\t\treturn args;\n\t\t}\n\n\t\tif (arguments.length > 1) {\n\t\t\targs = Array.prototype.slice.call(arguments);\n\t\t}\n\n\t\treturn fn(args);\n\t};\n\n\t// preserve .conversion property if there is one\n\tif ('conversion' in fn) {\n\t\twrappedFn.conversion = fn.conversion;\n\t}\n\n\treturn wrappedFn;\n}\n\nfunction wrapRounded(fn) {\n\tvar wrappedFn = function (args) {\n\t\tif (args === undefined || args === null) {\n\t\t\treturn args;\n\t\t}\n\n\t\tif (arguments.length > 1) {\n\t\t\targs = Array.prototype.slice.call(arguments);\n\t\t}\n\n\t\tvar result = fn(args);\n\n\t\t// we're assuming the result is an array here.\n\t\t// see notice in conversions.js; don't use box types\n\t\t// in conversion functions.\n\t\tif (typeof result === 'object') {\n\t\t\tfor (var len = result.length, i = 0; i < len; i++) {\n\t\t\t\tresult[i] = Math.round(result[i]);\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t};\n\n\t// preserve .conversion property if there is one\n\tif ('conversion' in fn) {\n\t\twrappedFn.conversion = fn.conversion;\n\t}\n\n\treturn wrappedFn;\n}\n\nmodels.forEach(function (fromModel) {\n\tconvert[fromModel] = {};\n\n\tObject.defineProperty(convert[fromModel], 'channels', {value: conversions[fromModel].channels});\n\tObject.defineProperty(convert[fromModel], 'labels', {value: conversions[fromModel].labels});\n\n\tvar routes = route(fromModel);\n\tvar routeModels = Object.keys(routes);\n\n\trouteModels.forEach(function (toModel) {\n\t\tvar fn = routes[toModel];\n\n\t\tconvert[fromModel][toModel] = wrapRounded(fn);\n\t\tconvert[fromModel][toModel].raw = wrapRaw(fn);\n\t});\n});\n\nmodule.exports = convert;\n\n\n/***/ }),\n/* 21 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar conversions = __webpack_require__(6);\n\n/*\n\tthis function routes a model to all other models.\n\n\tall functions that are routed have a property `.conversion` attached\n\tto the returned synthetic function. This property is an array\n\tof strings, each with the steps in between the 'from' and 'to'\n\tcolor models (inclusive).\n\n\tconversions that are not possible simply are not included.\n*/\n\nfunction buildGraph() {\n\tvar graph = {};\n\t// https://jsperf.com/object-keys-vs-for-in-with-closure/3\n\tvar models = Object.keys(conversions);\n\n\tfor (var len = models.length, i = 0; i < len; i++) {\n\t\tgraph[models[i]] = {\n\t\t\t// http://jsperf.com/1-vs-infinity\n\t\t\t// micro-opt, but this is simple.\n\t\t\tdistance: -1,\n\t\t\tparent: null\n\t\t};\n\t}\n\n\treturn graph;\n}\n\n// https://en.wikipedia.org/wiki/Breadth-first_search\nfunction deriveBFS(fromModel) {\n\tvar graph = buildGraph();\n\tvar queue = [fromModel]; // unshift -> queue -> pop\n\n\tgraph[fromModel].distance = 0;\n\n\twhile (queue.length) {\n\t\tvar current = queue.pop();\n\t\tvar adjacents = Object.keys(conversions[current]);\n\n\t\tfor (var len = adjacents.length, i = 0; i < len; i++) {\n\t\t\tvar adjacent = adjacents[i];\n\t\t\tvar node = graph[adjacent];\n\n\t\t\tif (node.distance === -1) {\n\t\t\t\tnode.distance = graph[current].distance + 1;\n\t\t\t\tnode.parent = current;\n\t\t\t\tqueue.unshift(adjacent);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn graph;\n}\n\nfunction link(from, to) {\n\treturn function (args) {\n\t\treturn to(from(args));\n\t};\n}\n\nfunction wrapConversion(toModel, graph) {\n\tvar path = [graph[toModel].parent, toModel];\n\tvar fn = conversions[graph[toModel].parent][toModel];\n\n\tvar cur = graph[toModel].parent;\n\twhile (graph[cur].parent) {\n\t\tpath.unshift(graph[cur].parent);\n\t\tfn = link(conversions[graph[cur].parent][cur], fn);\n\t\tcur = graph[cur].parent;\n\t}\n\n\tfn.conversion = path;\n\treturn fn;\n}\n\nmodule.exports = function (fromModel) {\n\tvar graph = deriveBFS(fromModel);\n\tvar conversion = {};\n\n\tvar models = Object.keys(graph);\n\tfor (var len = models.length, i = 0; i < len; i++) {\n\t\tvar toModel = models[i];\n\t\tvar node = graph[toModel];\n\n\t\tif (node.parent === null) {\n\t\t\t// no possible conversion, or this node is the source model.\n\t\t\tcontinue;\n\t\t}\n\n\t\tconversion[toModel] = wrapConversion(toModel, graph);\n\t}\n\n\treturn conversion;\n};\n\n\n\n/***/ }),\n/* 22 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _jquery = __webpack_require__(0);\n\nvar _jquery2 = _interopRequireDefault(_jquery);\n\nvar _ColorItem = __webpack_require__(2);\n\nvar _ColorItem2 = _interopRequireDefault(_ColorItem);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n/**\n * Handles everything related to the colorpicker color\n * @ignore\n */\nvar ColorHandler = function () {\n /**\n * @param {Colorpicker} colorpicker\n */\n function ColorHandler(colorpicker) {\n _classCallCheck(this, ColorHandler);\n\n /**\n * @type {Colorpicker}\n */\n this.colorpicker = colorpicker;\n }\n\n /**\n * @returns {*|String|ColorItem}\n */\n\n\n _createClass(ColorHandler, [{\n key: 'bind',\n value: function bind() {\n // if the color option is set\n if (this.colorpicker.options.color) {\n this.color = this.createColor(this.colorpicker.options.color);\n return;\n }\n\n // if element[color] is empty and the input has a value\n if (!this.color && !!this.colorpicker.inputHandler.getValue()) {\n this.color = this.createColor(this.colorpicker.inputHandler.getValue(), this.colorpicker.options.autoInputFallback);\n }\n }\n }, {\n key: 'unbind',\n value: function unbind() {\n this.colorpicker.element.removeData('color');\n }\n\n /**\n * Returns the color string from the input value or the 'data-color' attribute of the input or element.\n * If empty, it returns the defaultValue parameter.\n *\n * @returns {String|*}\n */\n\n }, {\n key: 'getColorString',\n value: function getColorString() {\n if (!this.hasColor()) {\n return '';\n }\n\n return this.color.string(this.format);\n }\n\n /**\n * Sets the color value\n *\n * @param {String|ColorItem} val\n */\n\n }, {\n key: 'setColorString',\n value: function setColorString(val) {\n var color = val ? this.createColor(val) : null;\n\n this.color = color ? color : null;\n }\n\n /**\n * Creates a new color using the widget instance options (fallbackColor, format).\n *\n * @fires Colorpicker#colorpickerInvalid\n * @param {*} val\n * @param {boolean} fallbackOnInvalid\n * @returns {ColorItem}\n */\n\n }, {\n key: 'createColor',\n value: function createColor(val) {\n var fallbackOnInvalid = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n\n var color = new _ColorItem2.default(this.resolveColorDelegate(val), this.format);\n\n if (!color.isValid()) {\n if (fallbackOnInvalid) {\n color = this.getFallbackColor();\n }\n\n /**\n * (Colorpicker) Fired when the color is invalid and the fallback color is going to be used.\n *\n * @event Colorpicker#colorpickerInvalid\n */\n this.colorpicker.trigger('colorpickerInvalid', color, val);\n }\n\n if (!this.isAlphaEnabled()) {\n // Alpha is disabled\n color.alpha = 1;\n }\n\n return color;\n }\n }, {\n key: 'getFallbackColor',\n value: function getFallbackColor() {\n if (this.fallback && this.fallback === this.color) {\n return this.color;\n }\n\n var fallback = this.resolveColorDelegate(this.fallback);\n var color = new _ColorItem2.default(fallback, this.format);\n\n if (!color.isValid()) {\n console.warn('The fallback color is invalid. Falling back to the previous color or black if any.');\n return this.color ? this.color : new _ColorItem2.default('#000000', this.format);\n }\n\n return color;\n }\n\n /**\n * @returns {ColorItem}\n */\n\n }, {\n key: 'assureColor',\n value: function assureColor() {\n if (!this.hasColor()) {\n this.color = this.getFallbackColor();\n }\n\n return this.color;\n }\n\n /**\n * Delegates the color resolution to the colorpicker extensions.\n *\n * @param {String|*} color\n * @param {boolean} realColor if true, the color should resolve into a real (not named) color code\n * @returns {ColorItem|String|*|null}\n */\n\n }, {\n key: 'resolveColorDelegate',\n value: function resolveColorDelegate(color) {\n var realColor = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n\n var extResolvedColor = false;\n\n _jquery2.default.each(this.colorpicker.extensions, function (name, ext) {\n if (extResolvedColor !== false) {\n // skip if resolved\n return;\n }\n extResolvedColor = ext.resolveColor(color, realColor);\n });\n\n return extResolvedColor ? extResolvedColor : color;\n }\n\n /**\n * Checks if there is a color object, that it is valid and it is not a fallback\n * @returns {boolean}\n */\n\n }, {\n key: 'isInvalidColor',\n value: function isInvalidColor() {\n return !this.hasColor() || !this.color.isValid();\n }\n\n /**\n * Returns true if the useAlpha option is exactly true, false otherwise\n * @returns {boolean}\n */\n\n }, {\n key: 'isAlphaEnabled',\n value: function isAlphaEnabled() {\n return this.colorpicker.options.useAlpha !== false;\n }\n\n /**\n * Returns true if the current color object is an instance of Color, false otherwise.\n * @returns {boolean}\n */\n\n }, {\n key: 'hasColor',\n value: function hasColor() {\n return this.color instanceof _ColorItem2.default;\n }\n }, {\n key: 'fallback',\n get: function get() {\n return this.colorpicker.options.fallbackColor ? this.colorpicker.options.fallbackColor : this.hasColor() ? this.color : null;\n }\n\n /**\n * @returns {String|null}\n */\n\n }, {\n key: 'format',\n get: function get() {\n if (this.colorpicker.options.format) {\n return this.colorpicker.options.format;\n }\n\n if (this.hasColor() && this.color.hasTransparency() && this.color.format.match(/^hex/)) {\n return this.isAlphaEnabled() ? 'rgba' : 'hex';\n }\n\n if (this.hasColor()) {\n return this.color.format;\n }\n\n return 'rgb';\n }\n\n /**\n * Internal color getter\n *\n * @type {ColorItem|null}\n */\n\n }, {\n key: 'color',\n get: function get() {\n return this.colorpicker.element.data('color');\n }\n\n /**\n * Internal color setter\n *\n * @ignore\n * @param {ColorItem|null} value\n */\n ,\n set: function set(value) {\n this.colorpicker.element.data('color', value);\n\n if (value instanceof _ColorItem2.default && this.colorpicker.options.format === 'auto') {\n // If format is 'auto', use the first parsed one from now on\n this.colorpicker.options.format = this.color.format;\n }\n }\n }]);\n\n return ColorHandler;\n}();\n\nexports.default = ColorHandler;\n\n/***/ }),\n/* 23 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _jquery = __webpack_require__(0);\n\nvar _jquery2 = _interopRequireDefault(_jquery);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n/**\n * Handles everything related to the colorpicker UI\n * @ignore\n */\nvar PickerHandler = function () {\n /**\n * @param {Colorpicker} colorpicker\n */\n function PickerHandler(colorpicker) {\n _classCallCheck(this, PickerHandler);\n\n /**\n * @type {Colorpicker}\n */\n this.colorpicker = colorpicker;\n /**\n * @type {jQuery}\n */\n this.picker = null;\n }\n\n _createClass(PickerHandler, [{\n key: 'bind',\n value: function bind() {\n /**\n * @type {jQuery|HTMLElement}\n */\n var picker = this.picker = (0, _jquery2.default)(this.options.template);\n\n if (this.options.customClass) {\n picker.addClass(this.options.customClass);\n }\n\n if (this.options.horizontal) {\n picker.addClass('colorpicker-horizontal');\n }\n\n if (this._supportsAlphaBar()) {\n this.options.useAlpha = true;\n picker.addClass('colorpicker-with-alpha');\n } else {\n this.options.useAlpha = false;\n }\n }\n }, {\n key: 'attach',\n value: function attach() {\n // Inject the colorpicker element into the DOM\n var pickerParent = this.colorpicker.container ? this.colorpicker.container : null;\n\n if (pickerParent) {\n this.picker.appendTo(pickerParent);\n }\n }\n }, {\n key: 'unbind',\n value: function unbind() {\n this.picker.remove();\n }\n }, {\n key: '_supportsAlphaBar',\n value: function _supportsAlphaBar() {\n return (this.options.useAlpha || this.colorpicker.colorHandler.hasColor() && this.color.hasTransparency()) && this.options.useAlpha !== false && (!this.options.format || this.options.format && !this.options.format.match(/^hex([36])?$/i));\n }\n\n /**\n * Changes the color adjustment bars using the current color object information.\n */\n\n }, {\n key: 'update',\n value: function update() {\n if (!this.colorpicker.colorHandler.hasColor()) {\n return;\n }\n\n var vertical = this.options.horizontal !== true,\n slider = vertical ? this.options.sliders : this.options.slidersHorz;\n\n var saturationGuide = this.picker.find('.colorpicker-saturation .colorpicker-guide'),\n hueGuide = this.picker.find('.colorpicker-hue .colorpicker-guide'),\n alphaGuide = this.picker.find('.colorpicker-alpha .colorpicker-guide');\n\n var hsva = this.color.toHsvaRatio();\n\n // Set guides position\n if (hueGuide.length) {\n hueGuide.css(vertical ? 'top' : 'left', (vertical ? slider.hue.maxTop : slider.hue.maxLeft) * (1 - hsva.h));\n }\n if (alphaGuide.length) {\n alphaGuide.css(vertical ? 'top' : 'left', (vertical ? slider.alpha.maxTop : slider.alpha.maxLeft) * (1 - hsva.a));\n }\n if (saturationGuide.length) {\n saturationGuide.css({\n 'top': slider.saturation.maxTop - hsva.v * slider.saturation.maxTop,\n 'left': hsva.s * slider.saturation.maxLeft\n });\n }\n\n // Set saturation hue background\n this.picker.find('.colorpicker-saturation').css('backgroundColor', this.color.getCloneHueOnly().toHexString()); // we only need hue\n\n // Set alpha color gradient\n var hexColor = this.color.toHexString();\n var alphaBg = '';\n\n if (this.options.horizontal) {\n alphaBg = 'linear-gradient(to right, ' + hexColor + ' 0%, transparent 100%)';\n } else {\n alphaBg = 'linear-gradient(to bottom, ' + hexColor + ' 0%, transparent 100%)';\n }\n\n this.picker.find('.colorpicker-alpha-color').css('background', alphaBg);\n }\n }, {\n key: 'options',\n get: function get() {\n return this.colorpicker.options;\n }\n }, {\n key: 'color',\n get: function get() {\n return this.colorpicker.colorHandler.color;\n }\n }]);\n\n return PickerHandler;\n}();\n\nexports.default = PickerHandler;\n\n/***/ }),\n/* 24 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n/**\n * Handles everything related to the colorpicker addon\n * @ignore\n */\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar AddonHandler = function () {\n /**\n * @param {Colorpicker} colorpicker\n */\n function AddonHandler(colorpicker) {\n _classCallCheck(this, AddonHandler);\n\n /**\n * @type {Colorpicker}\n */\n this.colorpicker = colorpicker;\n /**\n * @type {jQuery}\n */\n this.addon = null;\n }\n\n _createClass(AddonHandler, [{\n key: 'hasAddon',\n value: function hasAddon() {\n return !!this.addon;\n }\n }, {\n key: 'bind',\n value: function bind() {\n /**\n * @type {*|jQuery}\n */\n this.addon = this.colorpicker.options.addon ? this.colorpicker.element.find(this.colorpicker.options.addon) : null;\n\n if (this.addon && this.addon.length === 0) {\n // not found\n this.addon = null;\n }\n }\n }, {\n key: 'unbind',\n value: function unbind() {\n if (this.hasAddon()) {\n this.addon.off('.colorpicker');\n }\n }\n\n /**\n * If the addon element is present, its background color is updated\n */\n\n }, {\n key: 'update',\n value: function update() {\n if (!this.colorpicker.colorHandler.hasColor() || !this.hasAddon()) {\n return;\n }\n\n var colorStr = this.colorpicker.colorHandler.getColorString();\n var styles = { 'background': colorStr };\n\n var icn = this.addon.find('i').eq(0);\n\n if (icn.length > 0) {\n icn.css(styles);\n } else {\n this.addon.css(styles);\n }\n }\n }]);\n\n return AddonHandler;\n}();\n\nexports.default = AddonHandler;\n\n/***/ })\n/******/ ]);\n});\n\n\n// WEBPACK FOOTER //\n// bootstrap-colorpicker.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 7);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap e5fc9649974c93b0b79b","module.exports = __WEBPACK_EXTERNAL_MODULE_0__;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external {\"root\":\"jQuery\",\"commonjs2\":\"jquery\",\"commonjs\":\"jquery\",\"amd\":\"jquery\"}\n// module id = 0\n// module chunks = 0 1","'use strict';\n\nimport $ from 'jquery';\n\n/**\n * Colorpicker extension class.\n */\nclass Extension {\n /**\n * @param {Colorpicker} colorpicker\n * @param {Object} options\n */\n constructor(colorpicker, options = {}) {\n /**\n * The colorpicker instance\n * @type {Colorpicker}\n */\n this.colorpicker = colorpicker;\n /**\n * Extension options\n *\n * @type {Object}\n */\n this.options = options;\n\n if (!(this.colorpicker.element && this.colorpicker.element.length)) {\n throw new Error('Extension: this.colorpicker.element is not valid');\n }\n\n this.colorpicker.element.on('colorpickerCreate.colorpicker-ext', $.proxy(this.onCreate, this));\n this.colorpicker.element.on('colorpickerDestroy.colorpicker-ext', $.proxy(this.onDestroy, this));\n this.colorpicker.element.on('colorpickerUpdate.colorpicker-ext', $.proxy(this.onUpdate, this));\n this.colorpicker.element.on('colorpickerChange.colorpicker-ext', $.proxy(this.onChange, this));\n this.colorpicker.element.on('colorpickerInvalid.colorpicker-ext', $.proxy(this.onInvalid, this));\n this.colorpicker.element.on('colorpickerShow.colorpicker-ext', $.proxy(this.onShow, this));\n this.colorpicker.element.on('colorpickerHide.colorpicker-ext', $.proxy(this.onHide, this));\n this.colorpicker.element.on('colorpickerEnable.colorpicker-ext', $.proxy(this.onEnable, this));\n this.colorpicker.element.on('colorpickerDisable.colorpicker-ext', $.proxy(this.onDisable, this));\n }\n\n /**\n * Function called every time a new color needs to be created.\n * Return false to skip this resolver and continue with other extensions' ones\n * or return anything else to consider the color resolved.\n *\n * @param {ColorItem|String|*} color\n * @param {boolean} realColor if true, the color should resolve into a real (not named) color code\n * @return {ColorItem|String|*}\n */\n resolveColor(color, realColor = true) {\n return false;\n }\n\n /**\n * Method called after the colorpicker is created\n *\n * @listens Colorpicker#colorpickerCreate\n * @param {Event} event\n */\n onCreate(event) {\n // to be extended\n }\n\n /**\n * Method called after the colorpicker is destroyed\n *\n * @listens Colorpicker#colorpickerDestroy\n * @param {Event} event\n */\n onDestroy(event) {\n this.colorpicker.element.off('.colorpicker-ext');\n }\n\n /**\n * Method called after the colorpicker is updated\n *\n * @listens Colorpicker#colorpickerUpdate\n * @param {Event} event\n */\n onUpdate(event) {\n // to be extended\n }\n\n /**\n * Method called after the colorpicker color is changed\n *\n * @listens Colorpicker#colorpickerChange\n * @param {Event} event\n */\n onChange(event) {\n // to be extended\n }\n\n /**\n * Method called when the colorpicker color is invalid\n *\n * @listens Colorpicker#colorpickerInvalid\n * @param {Event} event\n */\n onInvalid(event) {\n // to be extended\n }\n\n /**\n * Method called after the colorpicker is hidden\n *\n * @listens Colorpicker#colorpickerHide\n * @param {Event} event\n */\n onHide(event) {\n // to be extended\n }\n\n /**\n * Method called after the colorpicker is shown\n *\n * @listens Colorpicker#colorpickerShow\n * @param {Event} event\n */\n onShow(event) {\n // to be extended\n }\n\n /**\n * Method called after the colorpicker is disabled\n *\n * @listens Colorpicker#colorpickerDisable\n * @param {Event} event\n */\n onDisable(event) {\n // to be extended\n }\n\n /**\n * Method called after the colorpicker is enabled\n *\n * @listens Colorpicker#colorpickerEnable\n * @param {Event} event\n */\n onEnable(event) {\n // to be extended\n }\n}\n\nexport default Extension;\n\n\n\n// WEBPACK FOOTER //\n// ./src/js/Extension.js","/**\n * Color manipulation class, specific for Bootstrap Colorpicker\n */\nimport QixColor from 'color';\n\n/**\n * HSVA color data class, containing the hue, saturation, value and alpha\n * information.\n */\nclass HSVAColor {\n /**\n * @param {number|int} h\n * @param {number|int} s\n * @param {number|int} v\n * @param {number|int} a\n */\n constructor(h, s, v, a) {\n this.h = isNaN(h) ? 0 : h;\n this.s = isNaN(s) ? 0 : s;\n this.v = isNaN(v) ? 0 : v;\n this.a = isNaN(h) ? 1 : a;\n }\n\n toString() {\n return `${this.h}, ${this.s}%, ${this.v}%, ${this.a}`;\n }\n}\n\n/**\n * HSVA color manipulation\n */\nclass ColorItem {\n\n /**\n * Returns the HSVAColor class\n *\n * @static\n * @example let colorData = new ColorItem.HSVAColor(360, 100, 100, 1);\n * @returns {HSVAColor}\n */\n static get HSVAColor() {\n return HSVAColor;\n }\n\n /**\n * Applies a method of the QixColor API and returns a new Color object or\n * the return value of the method call.\n *\n * If no argument is provided, the internal QixColor object is returned.\n *\n * @param {String} fn QixColor function name\n * @param args QixColor function arguments\n * @example let darkerColor = color.api('darken', 0.25);\n * @example let luminosity = color.api('luminosity');\n * @example color = color.api('negate');\n * @example let qColor = color.api().negate();\n * @returns {ColorItem|QixColor|*}\n */\n api(fn, ...args) {\n if (arguments.length === 0) {\n return this._color;\n }\n\n let result = this._color[fn].apply(this._color, args);\n\n if (!(result instanceof QixColor)) {\n // return result of the method call\n return result;\n }\n\n return new ColorItem(result, this.format);\n }\n\n /**\n * Returns the original ColorItem constructor data,\n * plus a 'valid' flag to know if it's valid or not.\n *\n * @returns {{color: *, format: String, valid: boolean}}\n */\n get original() {\n return this._original;\n }\n\n /**\n * @param {ColorItem|HSVAColor|QixColor|String|*|null} color Color data\n * @param {String|null} format Color model to convert to by default. Supported: 'rgb', 'hsl', 'hex'.\n */\n constructor(color = null, format = null) {\n this.replace(color, format);\n }\n\n /**\n * Replaces the internal QixColor object with a new one.\n * This also replaces the internal original color data.\n *\n * @param {ColorItem|HSVAColor|QixColor|String|*|null} color Color data to be parsed (if needed)\n * @param {String|null} format Color model to convert to by default. Supported: 'rgb', 'hsl', 'hex'.\n * @example color.replace('rgb(255,0,0)', 'hsl');\n * @example color.replace(hsvaColorData);\n */\n replace(color, format = null) {\n format = ColorItem.sanitizeFormat(format);\n\n /**\n * @type {{color: *, format: String}}\n * @private\n */\n this._original = {\n color: color,\n format: format,\n valid: true\n };\n /**\n * @type {QixColor}\n * @private\n */\n this._color = ColorItem.parse(color);\n\n if (this._color === null) {\n this._color = QixColor();\n this._original.valid = false;\n return;\n }\n\n /**\n * @type {*|string}\n * @private\n */\n this._format = format ? format :\n (ColorItem.isHex(color) ? 'hex' : this._color.model);\n }\n\n /**\n * Parses the color returning a Qix Color object or null if cannot be\n * parsed.\n *\n * @param {ColorItem|HSVAColor|QixColor|String|*|null} color Color data\n * @example let qColor = ColorItem.parse('rgb(255,0,0)');\n * @static\n * @returns {QixColor|null}\n */\n static parse(color) {\n if (color instanceof QixColor) {\n return color;\n }\n\n if (color instanceof ColorItem) {\n return color._color;\n }\n\n let format = null;\n\n if (color instanceof HSVAColor) {\n color = [color.h, color.s, color.v, isNaN(color.a) ? 1 : color.a];\n } else {\n color = ColorItem.sanitizeString(color);\n }\n\n if (color === null) {\n return null;\n }\n\n if (Array.isArray(color)) {\n format = 'hsv';\n }\n\n try {\n return QixColor(color, format);\n } catch (e) {\n return null;\n }\n }\n\n /**\n * Sanitizes a color string, adding missing hash to hexadecimal colors\n * and converting 'transparent' to a color code.\n *\n * @param {String|*} str Color string\n * @example let colorStr = ColorItem.sanitizeString('ffaa00');\n * @static\n * @returns {String|*}\n */\n static sanitizeString(str) {\n if (!(typeof str === 'string' || str instanceof String)) {\n return str;\n }\n\n if (str.match(/^[0-9a-f]{2,}$/i)) {\n return `#${str}`;\n }\n\n if (str.toLowerCase() === 'transparent') {\n return '#FFFFFF00';\n }\n\n return str;\n }\n\n /**\n * Detects if a value is a string and a color in hexadecimal format (in any variant).\n *\n * @param {String} str\n * @example ColorItem.isHex('rgba(0,0,0)'); // false\n * @example ColorItem.isHex('ffaa00'); // true\n * @example ColorItem.isHex('#ffaa00'); // true\n * @static\n * @returns {boolean}\n */\n static isHex(str) {\n if (!(typeof str === 'string' || str instanceof String)) {\n return false;\n }\n\n return !!str.match(/^#?[0-9a-f]{2,}$/i);\n }\n\n /**\n * Sanitizes a color format to one supported by web browsers.\n * Returns an empty string of the format can't be recognised.\n *\n * @param {String|*} format\n * @example ColorItem.sanitizeFormat('rgba'); // 'rgb'\n * @example ColorItem.isHex('hex8'); // 'hex'\n * @example ColorItem.isHex('invalid'); // ''\n * @static\n * @returns {String} 'rgb', 'hsl', 'hex' or ''.\n */\n static sanitizeFormat(format) {\n switch (format) {\n case 'hex':\n case 'hex3':\n case 'hex4':\n case 'hex6':\n case 'hex8':\n return 'hex';\n case 'rgb':\n case 'rgba':\n case 'keyword':\n case 'name':\n return 'rgb';\n case 'hsl':\n case 'hsla':\n case 'hsv':\n case 'hsva':\n case 'hwb': // HWB this is supported by Qix Color, but not by browsers\n case 'hwba':\n return 'hsl';\n default :\n return '';\n }\n }\n\n /**\n * Returns true if the color is valid, false if not.\n *\n * @returns {boolean}\n */\n isValid() {\n return this._original.valid === true;\n }\n\n /**\n * Hue value from 0 to 360\n *\n * @returns {int}\n */\n get hue() {\n return this._color.hue();\n }\n\n /**\n * Saturation value from 0 to 100\n *\n * @returns {int}\n */\n get saturation() {\n return this._color.saturationv();\n }\n\n /**\n * Value channel value from 0 to 100\n *\n * @returns {int}\n */\n get value() {\n return this._color.value();\n }\n\n /**\n * Alpha value from 0.0 to 1.0\n *\n * @returns {number}\n */\n get alpha() {\n let a = this._color.alpha();\n\n return isNaN(a) ? 1 : a;\n }\n\n /**\n * Default color format to convert to when calling toString() or string()\n *\n * @returns {String} 'rgb', 'hsl', 'hex' or ''\n */\n get format() {\n return this._format ? this._format : this._color.model;\n }\n\n /**\n * Sets the hue value\n *\n * @param {int} value Integer from 0 to 360\n */\n set hue(value) {\n this._color = this._color.hue(value);\n }\n\n /**\n * Sets the hue ratio, where 1.0 is 0, 0.5 is 180 and 0.0 is 360.\n *\n * @ignore\n * @param {number} h Ratio from 1.0 to 0.0\n */\n setHueRatio(h) {\n this.hue = ((1 - h) * 360);\n }\n\n /**\n * Sets the saturation value\n *\n * @param {int} value Integer from 0 to 100\n */\n set saturation(value) {\n this._color = this._color.saturationv(value);\n }\n\n /**\n * Sets the saturation ratio, where 1.0 is 100 and 0.0 is 0.\n *\n * @ignore\n * @param {number} s Ratio from 0.0 to 1.0\n */\n setSaturationRatio(s) {\n this.saturation = (s * 100);\n }\n\n /**\n * Sets the 'value' channel value\n *\n * @param {int} value Integer from 0 to 100\n */\n set value(value) {\n this._color = this._color.value(value);\n }\n\n /**\n * Sets the value ratio, where 1.0 is 0 and 0.0 is 100.\n *\n * @ignore\n * @param {number} v Ratio from 1.0 to 0.0\n */\n setValueRatio(v) {\n this.value = ((1 - v) * 100);\n }\n\n /**\n * Sets the alpha value. It will be rounded to 2 decimals.\n *\n * @param {int} value Float from 0.0 to 1.0\n */\n set alpha(value) {\n // 2 decimals max\n this._color = this._color.alpha(Math.round(value * 100) / 100);\n }\n\n /**\n * Sets the alpha ratio, where 1.0 is 0.0 and 0.0 is 1.0.\n *\n * @ignore\n * @param {number} a Ratio from 1.0 to 0.0\n */\n setAlphaRatio(a) {\n this.alpha = 1 - a;\n }\n\n /**\n * Sets the default color format\n *\n * @param {String} value Supported: 'rgb', 'hsl', 'hex'\n */\n set format(value) {\n this._format = ColorItem.sanitizeFormat(value);\n }\n\n /**\n * Returns true if the saturation value is zero, false otherwise\n *\n * @returns {boolean}\n */\n isDesaturated() {\n return this.saturation === 0;\n }\n\n /**\n * Returns true if the alpha value is zero, false otherwise\n *\n * @returns {boolean}\n */\n isTransparent() {\n return this.alpha === 0;\n }\n\n /**\n * Returns true if the alpha value is numeric and less than 1, false otherwise\n *\n * @returns {boolean}\n */\n hasTransparency() {\n return this.hasAlpha() && (this.alpha < 1);\n }\n\n /**\n * Returns true if the alpha value is numeric, false otherwise\n *\n * @returns {boolean}\n */\n hasAlpha() {\n return !isNaN(this.alpha);\n }\n\n /**\n * Returns a new HSVAColor object, based on the current color\n *\n * @returns {HSVAColor}\n */\n toObject() {\n return new HSVAColor(this.hue, this.saturation, this.value, this.alpha);\n }\n\n /**\n * Alias of toObject()\n *\n * @returns {HSVAColor}\n */\n toHsva() {\n return this.toObject();\n }\n\n /**\n * Returns a new HSVAColor object with the ratio values (from 0.0 to 1.0),\n * based on the current color.\n *\n * @ignore\n * @returns {HSVAColor}\n */\n toHsvaRatio() {\n return new HSVAColor(\n this.hue / 360,\n this.saturation / 100,\n this.value / 100,\n this.alpha\n );\n }\n\n /**\n * Converts the current color to its string representation,\n * using the internal format of this instance.\n *\n * @returns {String}\n */\n toString() {\n return this.string();\n }\n\n /**\n * Converts the current color to its string representation,\n * using the given format.\n *\n * @param {String|null} format Format to convert to. If empty or null, the internal format will be used.\n * @returns {String}\n */\n string(format = null) {\n format = ColorItem.sanitizeFormat(format ? format : this.format);\n\n if (!format) {\n return this._color.round().string();\n }\n\n if (this._color[format] === undefined) {\n throw new Error(`Unsupported color format: '${format}'`);\n }\n\n let str = this._color[format]();\n\n return str.round ? str.round().string() : str;\n }\n\n /**\n * Returns true if the given color values equals this one, false otherwise.\n * The format is not compared.\n * If any of the colors is invalid, the result will be false.\n *\n * @param {ColorItem|HSVAColor|QixColor|String|*|null} color Color data\n *\n * @returns {boolean}\n */\n equals(color) {\n color = (color instanceof ColorItem) ? color : new ColorItem(color);\n\n if (!color.isValid() || !this.isValid()) {\n return false;\n }\n\n return (\n this.hue === color.hue &&\n this.saturation === color.saturation &&\n this.value === color.value &&\n this.alpha === color.alpha\n );\n }\n\n /**\n * Creates a copy of this instance\n *\n * @returns {ColorItem}\n */\n getClone() {\n return new ColorItem(this._color, this.format);\n }\n\n /**\n * Creates a copy of this instance, only copying the hue value,\n * and setting the others to its max value.\n *\n * @returns {ColorItem}\n */\n getCloneHueOnly() {\n return new ColorItem([this.hue, 100, 100, 1], this.format);\n }\n\n /**\n * Creates a copy of this instance setting the alpha to the max.\n *\n * @returns {ColorItem}\n */\n getCloneOpaque() {\n return new ColorItem(this._color.alpha(1), this.format);\n }\n\n /**\n * Converts the color to a RGB string\n *\n * @returns {String}\n */\n toRgbString() {\n return this.string('rgb');\n }\n\n /**\n * Converts the color to a Hexadecimal string\n *\n * @returns {String}\n */\n toHexString() {\n return this.string('hex');\n }\n\n /**\n * Converts the color to a HSL string\n *\n * @returns {String}\n */\n toHslString() {\n return this.string('hsl');\n }\n\n /**\n * Returns true if the color is dark, false otherwhise.\n * This is useful to decide a text color.\n *\n * @returns {boolean}\n */\n isDark() {\n return this._color.isDark();\n }\n\n /**\n * Returns true if the color is light, false otherwhise.\n * This is useful to decide a text color.\n *\n * @returns {boolean}\n */\n isLight() {\n return this._color.isLight();\n }\n\n /**\n * Generates a list of colors using the given hue-based formula or the given array of hue values.\n * Hue formulas can be extended using ColorItem.colorFormulas static property.\n *\n * @param {String|Number[]} formula Examples: 'complementary', 'triad', 'tetrad', 'splitcomplement', [180, 270]\n * @example let colors = color.generate('triad');\n * @example let colors = color.generate([45, 80, 112, 200]);\n * @returns {ColorItem[]}\n */\n generate(formula) {\n let hues = [];\n\n if (Array.isArray(formula)) {\n hues = formula;\n } else if (!ColorItem.colorFormulas.hasOwnProperty(formula)) {\n throw new Error(`No color formula found with the name '${formula}'.`);\n } else {\n hues = ColorItem.colorFormulas[formula];\n }\n\n let colors = [], mainColor = this._color, format = this.format;\n\n hues.forEach(function (hue) {\n let levels = [\n hue ? ((mainColor.hue() + hue) % 360) : mainColor.hue(),\n mainColor.saturationv(),\n mainColor.value(),\n mainColor.alpha()\n ];\n\n colors.push(new ColorItem(levels, format));\n });\n\n return colors;\n }\n}\n\n/**\n * List of hue-based color formulas used by ColorItem.prototype.generate()\n *\n * @static\n * @type {{complementary: number[], triad: number[], tetrad: number[], splitcomplement: number[]}}\n */\nColorItem.colorFormulas = {\n complementary: [180],\n triad: [0, 120, 240],\n tetrad: [0, 90, 180, 270],\n splitcomplement: [0, 72, 216]\n};\n\nexport default ColorItem;\n\nexport {\n HSVAColor,\n ColorItem\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/js/ColorItem.js","'use strict';\n/**\n * @module\n */\n\n// adjust these values accordingly to the sass vars\nlet sassVars = {\n 'bar_size_short': 16,\n 'base_margin': 6,\n 'columns': 6\n};\n\nlet sliderSize = (sassVars.bar_size_short * sassVars.columns) + (sassVars.base_margin * (sassVars.columns - 1));\n\n/**\n * Colorpicker default options\n */\nexport default {\n /**\n * Custom class to be added to the `.colorpicker-element` element\n *\n * @type {String|null}\n * @default null\n */\n customClass: null,\n /**\n * Sets a initial color, ignoring the one from the element/input value or the data-color attribute.\n *\n * @type {(String|ColorItem|boolean)}\n * @default false\n */\n color: false,\n /**\n * Fallback color to use when the given color is invalid.\n * If false, the latest valid color will be used as a fallback.\n *\n * @type {String|ColorItem|boolean}\n * @default false\n */\n fallbackColor: false,\n /**\n * Forces an specific color format. If 'auto', it will be automatically detected the first time only,\n * but if null it will be always recalculated.\n *\n * Note that the ending 'a' of the format meaning \"alpha\" has currently no effect, meaning that rgb is the same as\n * rgba excepting if the alpha channel is disabled (see useAlpha).\n *\n * @type {('rgb'|'hex'|'hsl'|'auto'|null)}\n * @default 'auto'\n */\n format: 'auto',\n /**\n * Horizontal mode layout.\n *\n * If true, the hue and alpha channel bars will be rendered horizontally, above the saturation selector.\n *\n * @type {boolean}\n * @default false\n */\n horizontal: false,\n /**\n * Forces to show the colorpicker as an inline element.\n *\n * Note that if there is no container specified, the inline element\n * will be added to the body, so you may want to set the container option.\n *\n * @type {boolean}\n * @default false\n */\n inline: false,\n /**\n * Container where the colorpicker is appended to in the DOM.\n *\n * If is a string (CSS selector), the colorpicker will be placed inside this container.\n * If true, the `.colorpicker-element` element itself will be used as the container.\n * If false, the document body is used as the container, unless it is a popover (in this case it is appended to the\n * popover body instead).\n *\n * @type {String|boolean}\n * @default false\n */\n container: false,\n /**\n * Bootstrap Popover options.\n * The trigger, content and html options are always ignored.\n *\n * @type {boolean}\n * @default Object\n */\n popover: {\n animation: true,\n placement: 'bottom',\n fallbackPlacement: 'flip'\n },\n /**\n * If true, loads the 'debugger' extension automatically, which logs the events in the console\n * @type {boolean}\n * @default false\n */\n debug: false,\n /**\n * Child CSS selector for the colorpicker input.\n *\n * @type {String}\n * @default 'input'\n */\n input: 'input',\n /**\n * Child CSS selector for the colorpicker addon.\n * If it exists, the child element background will be changed on color change.\n *\n * @type {String}\n * @default '.colorpicker-trigger, .colorpicker-input-addon'\n */\n addon: '.colorpicker-input-addon',\n /**\n * If true, the input content will be replaced always with a valid color,\n * if false, the invalid color will be left in the input,\n * while the internal color object will still resolve into a valid one.\n *\n * @type {boolean}\n * @default true\n */\n autoInputFallback: true,\n /**\n * If true a hash will be prepended to hexadecimal colors.\n * If false, the hash will be removed.\n * This only affects the input values in hexadecimal format.\n *\n * @type {boolean}\n * @default true\n */\n useHashPrefix: true,\n /**\n * If true, the alpha channel bar will be displayed no matter what.\n *\n * If false, it will be always hidden and alpha channel will be disabled also programmatically, meaning that\n * the selected or typed color will be always opaque.\n *\n * If null, the alpha channel will be automatically disabled/enabled depending if the initial color format supports\n * alpha or not.\n *\n * @type {boolean}\n * @default true\n */\n useAlpha: true,\n /**\n * Colorpicker widget template\n * @type {String}\n * @example\n * \n *
\n *
\n *
\n *
\n *
\n * \n *
\n *
\n */\n template: `
\n
\n
\n
\n
\n \n
\n
`,\n /**\n *\n * Associative object with the extension class name and its config.\n * Colorpicker comes with many bundled extensions: debugger, palette, preview and swatches (a superset of palette).\n *\n * @type {Object[]}\n * @example\n * extensions: [\n * {\n * name: 'swatches'\n * options: {\n * colors: {\n * 'primary': '#337ab7',\n * 'success': '#5cb85c',\n * 'info': '#5bc0de',\n * 'warning': '#f0ad4e',\n * 'danger': '#d9534f'\n * },\n * namesAsValues: true\n * }\n * }\n * ]\n */\n extensions: [\n {\n name: 'preview',\n options: {\n showText: true\n }\n }\n ],\n /**\n * Vertical sliders configuration\n * @type {Object}\n */\n sliders: {\n saturation: {\n selector: '.colorpicker-saturation',\n maxLeft: sliderSize,\n maxTop: sliderSize,\n callLeft: 'setSaturationRatio',\n callTop: 'setValueRatio'\n },\n hue: {\n selector: '.colorpicker-hue',\n maxLeft: 0,\n maxTop: sliderSize,\n callLeft: false,\n callTop: 'setHueRatio'\n },\n alpha: {\n selector: '.colorpicker-alpha',\n childSelector: '.colorpicker-alpha-color',\n maxLeft: 0,\n maxTop: sliderSize,\n callLeft: false,\n callTop: 'setAlphaRatio'\n }\n },\n /**\n * Horizontal sliders configuration\n * @type {Object}\n */\n slidersHorz: {\n saturation: {\n selector: '.colorpicker-saturation',\n maxLeft: sliderSize,\n maxTop: sliderSize,\n callLeft: 'setSaturationRatio',\n callTop: 'setValueRatio'\n },\n hue: {\n selector: '.colorpicker-hue',\n maxLeft: sliderSize,\n maxTop: 0,\n callLeft: 'setHueRatio',\n callTop: false\n },\n alpha: {\n selector: '.colorpicker-alpha',\n childSelector: '.colorpicker-alpha-color',\n maxLeft: sliderSize,\n maxTop: 0,\n callLeft: 'setAlphaRatio',\n callTop: false\n }\n }\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/js/options.js","'use strict';\n\nimport Extension from 'Extension';\nimport $ from 'jquery';\n\nlet defaults = {\n /**\n * Key-value pairs defining a color alias and its CSS color representation.\n *\n * They can also be just an array of values. In that case, no special names are used, only the real colors.\n *\n * @type {Object|Array}\n * @default null\n * @example\n * {\n * 'black': '#000000',\n * 'white': '#ffffff',\n * 'red': '#FF0000',\n * 'default': '#777777',\n * 'primary': '#337ab7',\n * 'success': '#5cb85c',\n * 'info': '#5bc0de',\n * 'warning': '#f0ad4e',\n * 'danger': '#d9534f'\n * }\n *\n * @example ['#f0ad4e', '#337ab7', '#5cb85c']\n */\n colors: null,\n /**\n * If true, when a color swatch is selected the name (alias) will be used as input value,\n * otherwise the swatch real color value will be used.\n *\n * @type {boolean}\n * @default true\n */\n namesAsValues: true\n};\n\n/**\n * Palette extension\n * @ignore\n */\nclass Palette extends Extension {\n\n /**\n * @returns {Object|Array}\n */\n get colors() {\n return this.options.colors;\n }\n\n constructor(colorpicker, options = {}) {\n super(colorpicker, $.extend(true, {}, defaults, options));\n\n if ((!Array.isArray(this.options.colors)) && (typeof this.options.colors !== 'object')) {\n this.options.colors = null;\n }\n }\n\n /**\n * @returns {int}\n */\n getLength() {\n if (!this.options.colors) {\n return 0;\n }\n\n if (Array.isArray(this.options.colors)) {\n return this.options.colors.length;\n }\n\n if (typeof this.options.colors === 'object') {\n return Object.keys(this.options.colors).length;\n }\n\n return 0;\n }\n\n resolveColor(color, realColor = true) {\n if (this.getLength() <= 0) {\n return false;\n }\n\n // Array of colors\n if (Array.isArray(this.options.colors)) {\n if (this.options.colors.indexOf(color) >= 0) {\n return color;\n }\n if (this.options.colors.indexOf(color.toUpperCase()) >= 0) {\n return color.toUpperCase();\n }\n if (this.options.colors.indexOf(color.toLowerCase()) >= 0) {\n return color.toLowerCase();\n }\n return false;\n }\n\n if (typeof this.options.colors !== 'object') {\n return false;\n }\n\n // Map of objects\n if (!this.options.namesAsValues || realColor) {\n return this.getValue(color, false);\n }\n return this.getName(color, this.getName('#' + color));\n }\n\n /**\n * Given a color value, returns the corresponding color name or defaultValue.\n *\n * @param {String} value\n * @param {*} defaultValue\n * @returns {*}\n */\n getName(value, defaultValue = false) {\n if (!(typeof value === 'string') || !this.options.colors) {\n return defaultValue;\n }\n for (let name in this.options.colors) {\n if (!this.options.colors.hasOwnProperty(name)) {\n continue;\n }\n if (this.options.colors[name].toLowerCase() === value.toLowerCase()) {\n return name;\n }\n }\n return defaultValue;\n }\n\n /**\n * Given a color name, returns the corresponding color value or defaultValue.\n *\n * @param {String} name\n * @param {*} defaultValue\n * @returns {*}\n */\n getValue(name, defaultValue = false) {\n if (!(typeof name === 'string') || !this.options.colors) {\n return defaultValue;\n }\n if (this.options.colors.hasOwnProperty(name)) {\n return this.options.colors[name];\n }\n return defaultValue;\n }\n}\n\nexport default Palette;\n\n\n\n// WEBPACK FOOTER //\n// ./src/js/extensions/Palette.js","'use strict'\r\n\r\nmodule.exports = {\r\n\t\"aliceblue\": [240, 248, 255],\r\n\t\"antiquewhite\": [250, 235, 215],\r\n\t\"aqua\": [0, 255, 255],\r\n\t\"aquamarine\": [127, 255, 212],\r\n\t\"azure\": [240, 255, 255],\r\n\t\"beige\": [245, 245, 220],\r\n\t\"bisque\": [255, 228, 196],\r\n\t\"black\": [0, 0, 0],\r\n\t\"blanchedalmond\": [255, 235, 205],\r\n\t\"blue\": [0, 0, 255],\r\n\t\"blueviolet\": [138, 43, 226],\r\n\t\"brown\": [165, 42, 42],\r\n\t\"burlywood\": [222, 184, 135],\r\n\t\"cadetblue\": [95, 158, 160],\r\n\t\"chartreuse\": [127, 255, 0],\r\n\t\"chocolate\": [210, 105, 30],\r\n\t\"coral\": [255, 127, 80],\r\n\t\"cornflowerblue\": [100, 149, 237],\r\n\t\"cornsilk\": [255, 248, 220],\r\n\t\"crimson\": [220, 20, 60],\r\n\t\"cyan\": [0, 255, 255],\r\n\t\"darkblue\": [0, 0, 139],\r\n\t\"darkcyan\": [0, 139, 139],\r\n\t\"darkgoldenrod\": [184, 134, 11],\r\n\t\"darkgray\": [169, 169, 169],\r\n\t\"darkgreen\": [0, 100, 0],\r\n\t\"darkgrey\": [169, 169, 169],\r\n\t\"darkkhaki\": [189, 183, 107],\r\n\t\"darkmagenta\": [139, 0, 139],\r\n\t\"darkolivegreen\": [85, 107, 47],\r\n\t\"darkorange\": [255, 140, 0],\r\n\t\"darkorchid\": [153, 50, 204],\r\n\t\"darkred\": [139, 0, 0],\r\n\t\"darksalmon\": [233, 150, 122],\r\n\t\"darkseagreen\": [143, 188, 143],\r\n\t\"darkslateblue\": [72, 61, 139],\r\n\t\"darkslategray\": [47, 79, 79],\r\n\t\"darkslategrey\": [47, 79, 79],\r\n\t\"darkturquoise\": [0, 206, 209],\r\n\t\"darkviolet\": [148, 0, 211],\r\n\t\"deeppink\": [255, 20, 147],\r\n\t\"deepskyblue\": [0, 191, 255],\r\n\t\"dimgray\": [105, 105, 105],\r\n\t\"dimgrey\": [105, 105, 105],\r\n\t\"dodgerblue\": [30, 144, 255],\r\n\t\"firebrick\": [178, 34, 34],\r\n\t\"floralwhite\": [255, 250, 240],\r\n\t\"forestgreen\": [34, 139, 34],\r\n\t\"fuchsia\": [255, 0, 255],\r\n\t\"gainsboro\": [220, 220, 220],\r\n\t\"ghostwhite\": [248, 248, 255],\r\n\t\"gold\": [255, 215, 0],\r\n\t\"goldenrod\": [218, 165, 32],\r\n\t\"gray\": [128, 128, 128],\r\n\t\"green\": [0, 128, 0],\r\n\t\"greenyellow\": [173, 255, 47],\r\n\t\"grey\": [128, 128, 128],\r\n\t\"honeydew\": [240, 255, 240],\r\n\t\"hotpink\": [255, 105, 180],\r\n\t\"indianred\": [205, 92, 92],\r\n\t\"indigo\": [75, 0, 130],\r\n\t\"ivory\": [255, 255, 240],\r\n\t\"khaki\": [240, 230, 140],\r\n\t\"lavender\": [230, 230, 250],\r\n\t\"lavenderblush\": [255, 240, 245],\r\n\t\"lawngreen\": [124, 252, 0],\r\n\t\"lemonchiffon\": [255, 250, 205],\r\n\t\"lightblue\": [173, 216, 230],\r\n\t\"lightcoral\": [240, 128, 128],\r\n\t\"lightcyan\": [224, 255, 255],\r\n\t\"lightgoldenrodyellow\": [250, 250, 210],\r\n\t\"lightgray\": [211, 211, 211],\r\n\t\"lightgreen\": [144, 238, 144],\r\n\t\"lightgrey\": [211, 211, 211],\r\n\t\"lightpink\": [255, 182, 193],\r\n\t\"lightsalmon\": [255, 160, 122],\r\n\t\"lightseagreen\": [32, 178, 170],\r\n\t\"lightskyblue\": [135, 206, 250],\r\n\t\"lightslategray\": [119, 136, 153],\r\n\t\"lightslategrey\": [119, 136, 153],\r\n\t\"lightsteelblue\": [176, 196, 222],\r\n\t\"lightyellow\": [255, 255, 224],\r\n\t\"lime\": [0, 255, 0],\r\n\t\"limegreen\": [50, 205, 50],\r\n\t\"linen\": [250, 240, 230],\r\n\t\"magenta\": [255, 0, 255],\r\n\t\"maroon\": [128, 0, 0],\r\n\t\"mediumaquamarine\": [102, 205, 170],\r\n\t\"mediumblue\": [0, 0, 205],\r\n\t\"mediumorchid\": [186, 85, 211],\r\n\t\"mediumpurple\": [147, 112, 219],\r\n\t\"mediumseagreen\": [60, 179, 113],\r\n\t\"mediumslateblue\": [123, 104, 238],\r\n\t\"mediumspringgreen\": [0, 250, 154],\r\n\t\"mediumturquoise\": [72, 209, 204],\r\n\t\"mediumvioletred\": [199, 21, 133],\r\n\t\"midnightblue\": [25, 25, 112],\r\n\t\"mintcream\": [245, 255, 250],\r\n\t\"mistyrose\": [255, 228, 225],\r\n\t\"moccasin\": [255, 228, 181],\r\n\t\"navajowhite\": [255, 222, 173],\r\n\t\"navy\": [0, 0, 128],\r\n\t\"oldlace\": [253, 245, 230],\r\n\t\"olive\": [128, 128, 0],\r\n\t\"olivedrab\": [107, 142, 35],\r\n\t\"orange\": [255, 165, 0],\r\n\t\"orangered\": [255, 69, 0],\r\n\t\"orchid\": [218, 112, 214],\r\n\t\"palegoldenrod\": [238, 232, 170],\r\n\t\"palegreen\": [152, 251, 152],\r\n\t\"paleturquoise\": [175, 238, 238],\r\n\t\"palevioletred\": [219, 112, 147],\r\n\t\"papayawhip\": [255, 239, 213],\r\n\t\"peachpuff\": [255, 218, 185],\r\n\t\"peru\": [205, 133, 63],\r\n\t\"pink\": [255, 192, 203],\r\n\t\"plum\": [221, 160, 221],\r\n\t\"powderblue\": [176, 224, 230],\r\n\t\"purple\": [128, 0, 128],\r\n\t\"rebeccapurple\": [102, 51, 153],\r\n\t\"red\": [255, 0, 0],\r\n\t\"rosybrown\": [188, 143, 143],\r\n\t\"royalblue\": [65, 105, 225],\r\n\t\"saddlebrown\": [139, 69, 19],\r\n\t\"salmon\": [250, 128, 114],\r\n\t\"sandybrown\": [244, 164, 96],\r\n\t\"seagreen\": [46, 139, 87],\r\n\t\"seashell\": [255, 245, 238],\r\n\t\"sienna\": [160, 82, 45],\r\n\t\"silver\": [192, 192, 192],\r\n\t\"skyblue\": [135, 206, 235],\r\n\t\"slateblue\": [106, 90, 205],\r\n\t\"slategray\": [112, 128, 144],\r\n\t\"slategrey\": [112, 128, 144],\r\n\t\"snow\": [255, 250, 250],\r\n\t\"springgreen\": [0, 255, 127],\r\n\t\"steelblue\": [70, 130, 180],\r\n\t\"tan\": [210, 180, 140],\r\n\t\"teal\": [0, 128, 128],\r\n\t\"thistle\": [216, 191, 216],\r\n\t\"tomato\": [255, 99, 71],\r\n\t\"turquoise\": [64, 224, 208],\r\n\t\"violet\": [238, 130, 238],\r\n\t\"wheat\": [245, 222, 179],\r\n\t\"white\": [255, 255, 255],\r\n\t\"whitesmoke\": [245, 245, 245],\r\n\t\"yellow\": [255, 255, 0],\r\n\t\"yellowgreen\": [154, 205, 50]\r\n};\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/color-name/index.js\n// module id = 5\n// module chunks = 0 1","/* MIT license */\nvar cssKeywords = require('color-name');\n\n// NOTE: conversions should only return primitive values (i.e. arrays, or\n// values that give correct `typeof` results).\n// do not use box values types (i.e. Number(), String(), etc.)\n\nvar reverseKeywords = {};\nfor (var key in cssKeywords) {\n\tif (cssKeywords.hasOwnProperty(key)) {\n\t\treverseKeywords[cssKeywords[key]] = key;\n\t}\n}\n\nvar convert = module.exports = {\n\trgb: {channels: 3, labels: 'rgb'},\n\thsl: {channels: 3, labels: 'hsl'},\n\thsv: {channels: 3, labels: 'hsv'},\n\thwb: {channels: 3, labels: 'hwb'},\n\tcmyk: {channels: 4, labels: 'cmyk'},\n\txyz: {channels: 3, labels: 'xyz'},\n\tlab: {channels: 3, labels: 'lab'},\n\tlch: {channels: 3, labels: 'lch'},\n\thex: {channels: 1, labels: ['hex']},\n\tkeyword: {channels: 1, labels: ['keyword']},\n\tansi16: {channels: 1, labels: ['ansi16']},\n\tansi256: {channels: 1, labels: ['ansi256']},\n\thcg: {channels: 3, labels: ['h', 'c', 'g']},\n\tapple: {channels: 3, labels: ['r16', 'g16', 'b16']},\n\tgray: {channels: 1, labels: ['gray']}\n};\n\n// hide .channels and .labels properties\nfor (var model in convert) {\n\tif (convert.hasOwnProperty(model)) {\n\t\tif (!('channels' in convert[model])) {\n\t\t\tthrow new Error('missing channels property: ' + model);\n\t\t}\n\n\t\tif (!('labels' in convert[model])) {\n\t\t\tthrow new Error('missing channel labels property: ' + model);\n\t\t}\n\n\t\tif (convert[model].labels.length !== convert[model].channels) {\n\t\t\tthrow new Error('channel and label counts mismatch: ' + model);\n\t\t}\n\n\t\tvar channels = convert[model].channels;\n\t\tvar labels = convert[model].labels;\n\t\tdelete convert[model].channels;\n\t\tdelete convert[model].labels;\n\t\tObject.defineProperty(convert[model], 'channels', {value: channels});\n\t\tObject.defineProperty(convert[model], 'labels', {value: labels});\n\t}\n}\n\nconvert.rgb.hsl = function (rgb) {\n\tvar r = rgb[0] / 255;\n\tvar g = rgb[1] / 255;\n\tvar b = rgb[2] / 255;\n\tvar min = Math.min(r, g, b);\n\tvar max = Math.max(r, g, b);\n\tvar delta = max - min;\n\tvar h;\n\tvar s;\n\tvar l;\n\n\tif (max === min) {\n\t\th = 0;\n\t} else if (r === max) {\n\t\th = (g - b) / delta;\n\t} else if (g === max) {\n\t\th = 2 + (b - r) / delta;\n\t} else if (b === max) {\n\t\th = 4 + (r - g) / delta;\n\t}\n\n\th = Math.min(h * 60, 360);\n\n\tif (h < 0) {\n\t\th += 360;\n\t}\n\n\tl = (min + max) / 2;\n\n\tif (max === min) {\n\t\ts = 0;\n\t} else if (l <= 0.5) {\n\t\ts = delta / (max + min);\n\t} else {\n\t\ts = delta / (2 - max - min);\n\t}\n\n\treturn [h, s * 100, l * 100];\n};\n\nconvert.rgb.hsv = function (rgb) {\n\tvar rdif;\n\tvar gdif;\n\tvar bdif;\n\tvar h;\n\tvar s;\n\n\tvar r = rgb[0] / 255;\n\tvar g = rgb[1] / 255;\n\tvar b = rgb[2] / 255;\n\tvar v = Math.max(r, g, b);\n\tvar diff = v - Math.min(r, g, b);\n\tvar diffc = function (c) {\n\t\treturn (v - c) / 6 / diff + 1 / 2;\n\t};\n\n\tif (diff === 0) {\n\t\th = s = 0;\n\t} else {\n\t\ts = diff / v;\n\t\trdif = diffc(r);\n\t\tgdif = diffc(g);\n\t\tbdif = diffc(b);\n\n\t\tif (r === v) {\n\t\t\th = bdif - gdif;\n\t\t} else if (g === v) {\n\t\t\th = (1 / 3) + rdif - bdif;\n\t\t} else if (b === v) {\n\t\t\th = (2 / 3) + gdif - rdif;\n\t\t}\n\t\tif (h < 0) {\n\t\t\th += 1;\n\t\t} else if (h > 1) {\n\t\t\th -= 1;\n\t\t}\n\t}\n\n\treturn [\n\t\th * 360,\n\t\ts * 100,\n\t\tv * 100\n\t];\n};\n\nconvert.rgb.hwb = function (rgb) {\n\tvar r = rgb[0];\n\tvar g = rgb[1];\n\tvar b = rgb[2];\n\tvar h = convert.rgb.hsl(rgb)[0];\n\tvar w = 1 / 255 * Math.min(r, Math.min(g, b));\n\n\tb = 1 - 1 / 255 * Math.max(r, Math.max(g, b));\n\n\treturn [h, w * 100, b * 100];\n};\n\nconvert.rgb.cmyk = function (rgb) {\n\tvar r = rgb[0] / 255;\n\tvar g = rgb[1] / 255;\n\tvar b = rgb[2] / 255;\n\tvar c;\n\tvar m;\n\tvar y;\n\tvar k;\n\n\tk = Math.min(1 - r, 1 - g, 1 - b);\n\tc = (1 - r - k) / (1 - k) || 0;\n\tm = (1 - g - k) / (1 - k) || 0;\n\ty = (1 - b - k) / (1 - k) || 0;\n\n\treturn [c * 100, m * 100, y * 100, k * 100];\n};\n\n/**\n * See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance\n * */\nfunction comparativeDistance(x, y) {\n\treturn (\n\t\tMath.pow(x[0] - y[0], 2) +\n\t\tMath.pow(x[1] - y[1], 2) +\n\t\tMath.pow(x[2] - y[2], 2)\n\t);\n}\n\nconvert.rgb.keyword = function (rgb) {\n\tvar reversed = reverseKeywords[rgb];\n\tif (reversed) {\n\t\treturn reversed;\n\t}\n\n\tvar currentClosestDistance = Infinity;\n\tvar currentClosestKeyword;\n\n\tfor (var keyword in cssKeywords) {\n\t\tif (cssKeywords.hasOwnProperty(keyword)) {\n\t\t\tvar value = cssKeywords[keyword];\n\n\t\t\t// Compute comparative distance\n\t\t\tvar distance = comparativeDistance(rgb, value);\n\n\t\t\t// Check if its less, if so set as closest\n\t\t\tif (distance < currentClosestDistance) {\n\t\t\t\tcurrentClosestDistance = distance;\n\t\t\t\tcurrentClosestKeyword = keyword;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn currentClosestKeyword;\n};\n\nconvert.keyword.rgb = function (keyword) {\n\treturn cssKeywords[keyword];\n};\n\nconvert.rgb.xyz = function (rgb) {\n\tvar r = rgb[0] / 255;\n\tvar g = rgb[1] / 255;\n\tvar b = rgb[2] / 255;\n\n\t// assume sRGB\n\tr = r > 0.04045 ? Math.pow(((r + 0.055) / 1.055), 2.4) : (r / 12.92);\n\tg = g > 0.04045 ? Math.pow(((g + 0.055) / 1.055), 2.4) : (g / 12.92);\n\tb = b > 0.04045 ? Math.pow(((b + 0.055) / 1.055), 2.4) : (b / 12.92);\n\n\tvar x = (r * 0.4124) + (g * 0.3576) + (b * 0.1805);\n\tvar y = (r * 0.2126) + (g * 0.7152) + (b * 0.0722);\n\tvar z = (r * 0.0193) + (g * 0.1192) + (b * 0.9505);\n\n\treturn [x * 100, y * 100, z * 100];\n};\n\nconvert.rgb.lab = function (rgb) {\n\tvar xyz = convert.rgb.xyz(rgb);\n\tvar x = xyz[0];\n\tvar y = xyz[1];\n\tvar z = xyz[2];\n\tvar l;\n\tvar a;\n\tvar b;\n\n\tx /= 95.047;\n\ty /= 100;\n\tz /= 108.883;\n\n\tx = x > 0.008856 ? Math.pow(x, 1 / 3) : (7.787 * x) + (16 / 116);\n\ty = y > 0.008856 ? Math.pow(y, 1 / 3) : (7.787 * y) + (16 / 116);\n\tz = z > 0.008856 ? Math.pow(z, 1 / 3) : (7.787 * z) + (16 / 116);\n\n\tl = (116 * y) - 16;\n\ta = 500 * (x - y);\n\tb = 200 * (y - z);\n\n\treturn [l, a, b];\n};\n\nconvert.hsl.rgb = function (hsl) {\n\tvar h = hsl[0] / 360;\n\tvar s = hsl[1] / 100;\n\tvar l = hsl[2] / 100;\n\tvar t1;\n\tvar t2;\n\tvar t3;\n\tvar rgb;\n\tvar val;\n\n\tif (s === 0) {\n\t\tval = l * 255;\n\t\treturn [val, val, val];\n\t}\n\n\tif (l < 0.5) {\n\t\tt2 = l * (1 + s);\n\t} else {\n\t\tt2 = l + s - l * s;\n\t}\n\n\tt1 = 2 * l - t2;\n\n\trgb = [0, 0, 0];\n\tfor (var i = 0; i < 3; i++) {\n\t\tt3 = h + 1 / 3 * -(i - 1);\n\t\tif (t3 < 0) {\n\t\t\tt3++;\n\t\t}\n\t\tif (t3 > 1) {\n\t\t\tt3--;\n\t\t}\n\n\t\tif (6 * t3 < 1) {\n\t\t\tval = t1 + (t2 - t1) * 6 * t3;\n\t\t} else if (2 * t3 < 1) {\n\t\t\tval = t2;\n\t\t} else if (3 * t3 < 2) {\n\t\t\tval = t1 + (t2 - t1) * (2 / 3 - t3) * 6;\n\t\t} else {\n\t\t\tval = t1;\n\t\t}\n\n\t\trgb[i] = val * 255;\n\t}\n\n\treturn rgb;\n};\n\nconvert.hsl.hsv = function (hsl) {\n\tvar h = hsl[0];\n\tvar s = hsl[1] / 100;\n\tvar l = hsl[2] / 100;\n\tvar smin = s;\n\tvar lmin = Math.max(l, 0.01);\n\tvar sv;\n\tvar v;\n\n\tl *= 2;\n\ts *= (l <= 1) ? l : 2 - l;\n\tsmin *= lmin <= 1 ? lmin : 2 - lmin;\n\tv = (l + s) / 2;\n\tsv = l === 0 ? (2 * smin) / (lmin + smin) : (2 * s) / (l + s);\n\n\treturn [h, sv * 100, v * 100];\n};\n\nconvert.hsv.rgb = function (hsv) {\n\tvar h = hsv[0] / 60;\n\tvar s = hsv[1] / 100;\n\tvar v = hsv[2] / 100;\n\tvar hi = Math.floor(h) % 6;\n\n\tvar f = h - Math.floor(h);\n\tvar p = 255 * v * (1 - s);\n\tvar q = 255 * v * (1 - (s * f));\n\tvar t = 255 * v * (1 - (s * (1 - f)));\n\tv *= 255;\n\n\tswitch (hi) {\n\t\tcase 0:\n\t\t\treturn [v, t, p];\n\t\tcase 1:\n\t\t\treturn [q, v, p];\n\t\tcase 2:\n\t\t\treturn [p, v, t];\n\t\tcase 3:\n\t\t\treturn [p, q, v];\n\t\tcase 4:\n\t\t\treturn [t, p, v];\n\t\tcase 5:\n\t\t\treturn [v, p, q];\n\t}\n};\n\nconvert.hsv.hsl = function (hsv) {\n\tvar h = hsv[0];\n\tvar s = hsv[1] / 100;\n\tvar v = hsv[2] / 100;\n\tvar vmin = Math.max(v, 0.01);\n\tvar lmin;\n\tvar sl;\n\tvar l;\n\n\tl = (2 - s) * v;\n\tlmin = (2 - s) * vmin;\n\tsl = s * vmin;\n\tsl /= (lmin <= 1) ? lmin : 2 - lmin;\n\tsl = sl || 0;\n\tl /= 2;\n\n\treturn [h, sl * 100, l * 100];\n};\n\n// http://dev.w3.org/csswg/css-color/#hwb-to-rgb\nconvert.hwb.rgb = function (hwb) {\n\tvar h = hwb[0] / 360;\n\tvar wh = hwb[1] / 100;\n\tvar bl = hwb[2] / 100;\n\tvar ratio = wh + bl;\n\tvar i;\n\tvar v;\n\tvar f;\n\tvar n;\n\n\t// wh + bl cant be > 1\n\tif (ratio > 1) {\n\t\twh /= ratio;\n\t\tbl /= ratio;\n\t}\n\n\ti = Math.floor(6 * h);\n\tv = 1 - bl;\n\tf = 6 * h - i;\n\n\tif ((i & 0x01) !== 0) {\n\t\tf = 1 - f;\n\t}\n\n\tn = wh + f * (v - wh); // linear interpolation\n\n\tvar r;\n\tvar g;\n\tvar b;\n\tswitch (i) {\n\t\tdefault:\n\t\tcase 6:\n\t\tcase 0: r = v; g = n; b = wh; break;\n\t\tcase 1: r = n; g = v; b = wh; break;\n\t\tcase 2: r = wh; g = v; b = n; break;\n\t\tcase 3: r = wh; g = n; b = v; break;\n\t\tcase 4: r = n; g = wh; b = v; break;\n\t\tcase 5: r = v; g = wh; b = n; break;\n\t}\n\n\treturn [r * 255, g * 255, b * 255];\n};\n\nconvert.cmyk.rgb = function (cmyk) {\n\tvar c = cmyk[0] / 100;\n\tvar m = cmyk[1] / 100;\n\tvar y = cmyk[2] / 100;\n\tvar k = cmyk[3] / 100;\n\tvar r;\n\tvar g;\n\tvar b;\n\n\tr = 1 - Math.min(1, c * (1 - k) + k);\n\tg = 1 - Math.min(1, m * (1 - k) + k);\n\tb = 1 - Math.min(1, y * (1 - k) + k);\n\n\treturn [r * 255, g * 255, b * 255];\n};\n\nconvert.xyz.rgb = function (xyz) {\n\tvar x = xyz[0] / 100;\n\tvar y = xyz[1] / 100;\n\tvar z = xyz[2] / 100;\n\tvar r;\n\tvar g;\n\tvar b;\n\n\tr = (x * 3.2406) + (y * -1.5372) + (z * -0.4986);\n\tg = (x * -0.9689) + (y * 1.8758) + (z * 0.0415);\n\tb = (x * 0.0557) + (y * -0.2040) + (z * 1.0570);\n\n\t// assume sRGB\n\tr = r > 0.0031308\n\t\t? ((1.055 * Math.pow(r, 1.0 / 2.4)) - 0.055)\n\t\t: r * 12.92;\n\n\tg = g > 0.0031308\n\t\t? ((1.055 * Math.pow(g, 1.0 / 2.4)) - 0.055)\n\t\t: g * 12.92;\n\n\tb = b > 0.0031308\n\t\t? ((1.055 * Math.pow(b, 1.0 / 2.4)) - 0.055)\n\t\t: b * 12.92;\n\n\tr = Math.min(Math.max(0, r), 1);\n\tg = Math.min(Math.max(0, g), 1);\n\tb = Math.min(Math.max(0, b), 1);\n\n\treturn [r * 255, g * 255, b * 255];\n};\n\nconvert.xyz.lab = function (xyz) {\n\tvar x = xyz[0];\n\tvar y = xyz[1];\n\tvar z = xyz[2];\n\tvar l;\n\tvar a;\n\tvar b;\n\n\tx /= 95.047;\n\ty /= 100;\n\tz /= 108.883;\n\n\tx = x > 0.008856 ? Math.pow(x, 1 / 3) : (7.787 * x) + (16 / 116);\n\ty = y > 0.008856 ? Math.pow(y, 1 / 3) : (7.787 * y) + (16 / 116);\n\tz = z > 0.008856 ? Math.pow(z, 1 / 3) : (7.787 * z) + (16 / 116);\n\n\tl = (116 * y) - 16;\n\ta = 500 * (x - y);\n\tb = 200 * (y - z);\n\n\treturn [l, a, b];\n};\n\nconvert.lab.xyz = function (lab) {\n\tvar l = lab[0];\n\tvar a = lab[1];\n\tvar b = lab[2];\n\tvar x;\n\tvar y;\n\tvar z;\n\n\ty = (l + 16) / 116;\n\tx = a / 500 + y;\n\tz = y - b / 200;\n\n\tvar y2 = Math.pow(y, 3);\n\tvar x2 = Math.pow(x, 3);\n\tvar z2 = Math.pow(z, 3);\n\ty = y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787;\n\tx = x2 > 0.008856 ? x2 : (x - 16 / 116) / 7.787;\n\tz = z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787;\n\n\tx *= 95.047;\n\ty *= 100;\n\tz *= 108.883;\n\n\treturn [x, y, z];\n};\n\nconvert.lab.lch = function (lab) {\n\tvar l = lab[0];\n\tvar a = lab[1];\n\tvar b = lab[2];\n\tvar hr;\n\tvar h;\n\tvar c;\n\n\thr = Math.atan2(b, a);\n\th = hr * 360 / 2 / Math.PI;\n\n\tif (h < 0) {\n\t\th += 360;\n\t}\n\n\tc = Math.sqrt(a * a + b * b);\n\n\treturn [l, c, h];\n};\n\nconvert.lch.lab = function (lch) {\n\tvar l = lch[0];\n\tvar c = lch[1];\n\tvar h = lch[2];\n\tvar a;\n\tvar b;\n\tvar hr;\n\n\thr = h / 360 * 2 * Math.PI;\n\ta = c * Math.cos(hr);\n\tb = c * Math.sin(hr);\n\n\treturn [l, a, b];\n};\n\nconvert.rgb.ansi16 = function (args) {\n\tvar r = args[0];\n\tvar g = args[1];\n\tvar b = args[2];\n\tvar value = 1 in arguments ? arguments[1] : convert.rgb.hsv(args)[2]; // hsv -> ansi16 optimization\n\n\tvalue = Math.round(value / 50);\n\n\tif (value === 0) {\n\t\treturn 30;\n\t}\n\n\tvar ansi = 30\n\t\t+ ((Math.round(b / 255) << 2)\n\t\t| (Math.round(g / 255) << 1)\n\t\t| Math.round(r / 255));\n\n\tif (value === 2) {\n\t\tansi += 60;\n\t}\n\n\treturn ansi;\n};\n\nconvert.hsv.ansi16 = function (args) {\n\t// optimization here; we already know the value and don't need to get\n\t// it converted for us.\n\treturn convert.rgb.ansi16(convert.hsv.rgb(args), args[2]);\n};\n\nconvert.rgb.ansi256 = function (args) {\n\tvar r = args[0];\n\tvar g = args[1];\n\tvar b = args[2];\n\n\t// we use the extended greyscale palette here, with the exception of\n\t// black and white. normal palette only has 4 greyscale shades.\n\tif (r === g && g === b) {\n\t\tif (r < 8) {\n\t\t\treturn 16;\n\t\t}\n\n\t\tif (r > 248) {\n\t\t\treturn 231;\n\t\t}\n\n\t\treturn Math.round(((r - 8) / 247) * 24) + 232;\n\t}\n\n\tvar ansi = 16\n\t\t+ (36 * Math.round(r / 255 * 5))\n\t\t+ (6 * Math.round(g / 255 * 5))\n\t\t+ Math.round(b / 255 * 5);\n\n\treturn ansi;\n};\n\nconvert.ansi16.rgb = function (args) {\n\tvar color = args % 10;\n\n\t// handle greyscale\n\tif (color === 0 || color === 7) {\n\t\tif (args > 50) {\n\t\t\tcolor += 3.5;\n\t\t}\n\n\t\tcolor = color / 10.5 * 255;\n\n\t\treturn [color, color, color];\n\t}\n\n\tvar mult = (~~(args > 50) + 1) * 0.5;\n\tvar r = ((color & 1) * mult) * 255;\n\tvar g = (((color >> 1) & 1) * mult) * 255;\n\tvar b = (((color >> 2) & 1) * mult) * 255;\n\n\treturn [r, g, b];\n};\n\nconvert.ansi256.rgb = function (args) {\n\t// handle greyscale\n\tif (args >= 232) {\n\t\tvar c = (args - 232) * 10 + 8;\n\t\treturn [c, c, c];\n\t}\n\n\targs -= 16;\n\n\tvar rem;\n\tvar r = Math.floor(args / 36) / 5 * 255;\n\tvar g = Math.floor((rem = args % 36) / 6) / 5 * 255;\n\tvar b = (rem % 6) / 5 * 255;\n\n\treturn [r, g, b];\n};\n\nconvert.rgb.hex = function (args) {\n\tvar integer = ((Math.round(args[0]) & 0xFF) << 16)\n\t\t+ ((Math.round(args[1]) & 0xFF) << 8)\n\t\t+ (Math.round(args[2]) & 0xFF);\n\n\tvar string = integer.toString(16).toUpperCase();\n\treturn '000000'.substring(string.length) + string;\n};\n\nconvert.hex.rgb = function (args) {\n\tvar match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);\n\tif (!match) {\n\t\treturn [0, 0, 0];\n\t}\n\n\tvar colorString = match[0];\n\n\tif (match[0].length === 3) {\n\t\tcolorString = colorString.split('').map(function (char) {\n\t\t\treturn char + char;\n\t\t}).join('');\n\t}\n\n\tvar integer = parseInt(colorString, 16);\n\tvar r = (integer >> 16) & 0xFF;\n\tvar g = (integer >> 8) & 0xFF;\n\tvar b = integer & 0xFF;\n\n\treturn [r, g, b];\n};\n\nconvert.rgb.hcg = function (rgb) {\n\tvar r = rgb[0] / 255;\n\tvar g = rgb[1] / 255;\n\tvar b = rgb[2] / 255;\n\tvar max = Math.max(Math.max(r, g), b);\n\tvar min = Math.min(Math.min(r, g), b);\n\tvar chroma = (max - min);\n\tvar grayscale;\n\tvar hue;\n\n\tif (chroma < 1) {\n\t\tgrayscale = min / (1 - chroma);\n\t} else {\n\t\tgrayscale = 0;\n\t}\n\n\tif (chroma <= 0) {\n\t\thue = 0;\n\t} else\n\tif (max === r) {\n\t\thue = ((g - b) / chroma) % 6;\n\t} else\n\tif (max === g) {\n\t\thue = 2 + (b - r) / chroma;\n\t} else {\n\t\thue = 4 + (r - g) / chroma + 4;\n\t}\n\n\thue /= 6;\n\thue %= 1;\n\n\treturn [hue * 360, chroma * 100, grayscale * 100];\n};\n\nconvert.hsl.hcg = function (hsl) {\n\tvar s = hsl[1] / 100;\n\tvar l = hsl[2] / 100;\n\tvar c = 1;\n\tvar f = 0;\n\n\tif (l < 0.5) {\n\t\tc = 2.0 * s * l;\n\t} else {\n\t\tc = 2.0 * s * (1.0 - l);\n\t}\n\n\tif (c < 1.0) {\n\t\tf = (l - 0.5 * c) / (1.0 - c);\n\t}\n\n\treturn [hsl[0], c * 100, f * 100];\n};\n\nconvert.hsv.hcg = function (hsv) {\n\tvar s = hsv[1] / 100;\n\tvar v = hsv[2] / 100;\n\n\tvar c = s * v;\n\tvar f = 0;\n\n\tif (c < 1.0) {\n\t\tf = (v - c) / (1 - c);\n\t}\n\n\treturn [hsv[0], c * 100, f * 100];\n};\n\nconvert.hcg.rgb = function (hcg) {\n\tvar h = hcg[0] / 360;\n\tvar c = hcg[1] / 100;\n\tvar g = hcg[2] / 100;\n\n\tif (c === 0.0) {\n\t\treturn [g * 255, g * 255, g * 255];\n\t}\n\n\tvar pure = [0, 0, 0];\n\tvar hi = (h % 1) * 6;\n\tvar v = hi % 1;\n\tvar w = 1 - v;\n\tvar mg = 0;\n\n\tswitch (Math.floor(hi)) {\n\t\tcase 0:\n\t\t\tpure[0] = 1; pure[1] = v; pure[2] = 0; break;\n\t\tcase 1:\n\t\t\tpure[0] = w; pure[1] = 1; pure[2] = 0; break;\n\t\tcase 2:\n\t\t\tpure[0] = 0; pure[1] = 1; pure[2] = v; break;\n\t\tcase 3:\n\t\t\tpure[0] = 0; pure[1] = w; pure[2] = 1; break;\n\t\tcase 4:\n\t\t\tpure[0] = v; pure[1] = 0; pure[2] = 1; break;\n\t\tdefault:\n\t\t\tpure[0] = 1; pure[1] = 0; pure[2] = w;\n\t}\n\n\tmg = (1.0 - c) * g;\n\n\treturn [\n\t\t(c * pure[0] + mg) * 255,\n\t\t(c * pure[1] + mg) * 255,\n\t\t(c * pure[2] + mg) * 255\n\t];\n};\n\nconvert.hcg.hsv = function (hcg) {\n\tvar c = hcg[1] / 100;\n\tvar g = hcg[2] / 100;\n\n\tvar v = c + g * (1.0 - c);\n\tvar f = 0;\n\n\tif (v > 0.0) {\n\t\tf = c / v;\n\t}\n\n\treturn [hcg[0], f * 100, v * 100];\n};\n\nconvert.hcg.hsl = function (hcg) {\n\tvar c = hcg[1] / 100;\n\tvar g = hcg[2] / 100;\n\n\tvar l = g * (1.0 - c) + 0.5 * c;\n\tvar s = 0;\n\n\tif (l > 0.0 && l < 0.5) {\n\t\ts = c / (2 * l);\n\t} else\n\tif (l >= 0.5 && l < 1.0) {\n\t\ts = c / (2 * (1 - l));\n\t}\n\n\treturn [hcg[0], s * 100, l * 100];\n};\n\nconvert.hcg.hwb = function (hcg) {\n\tvar c = hcg[1] / 100;\n\tvar g = hcg[2] / 100;\n\tvar v = c + g * (1.0 - c);\n\treturn [hcg[0], (v - c) * 100, (1 - v) * 100];\n};\n\nconvert.hwb.hcg = function (hwb) {\n\tvar w = hwb[1] / 100;\n\tvar b = hwb[2] / 100;\n\tvar v = 1 - b;\n\tvar c = v - w;\n\tvar g = 0;\n\n\tif (c < 1) {\n\t\tg = (v - c) / (1 - c);\n\t}\n\n\treturn [hwb[0], c * 100, g * 100];\n};\n\nconvert.apple.rgb = function (apple) {\n\treturn [(apple[0] / 65535) * 255, (apple[1] / 65535) * 255, (apple[2] / 65535) * 255];\n};\n\nconvert.rgb.apple = function (rgb) {\n\treturn [(rgb[0] / 255) * 65535, (rgb[1] / 255) * 65535, (rgb[2] / 255) * 65535];\n};\n\nconvert.gray.rgb = function (args) {\n\treturn [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255];\n};\n\nconvert.gray.hsl = convert.gray.hsv = function (args) {\n\treturn [0, 0, args[0]];\n};\n\nconvert.gray.hwb = function (gray) {\n\treturn [0, 100, gray[0]];\n};\n\nconvert.gray.cmyk = function (gray) {\n\treturn [0, 0, 0, gray[0]];\n};\n\nconvert.gray.lab = function (gray) {\n\treturn [gray[0], 0, 0];\n};\n\nconvert.gray.hex = function (gray) {\n\tvar val = Math.round(gray[0] / 100 * 255) & 0xFF;\n\tvar integer = (val << 16) + (val << 8) + val;\n\n\tvar string = integer.toString(16).toUpperCase();\n\treturn '000000'.substring(string.length) + string;\n};\n\nconvert.rgb.gray = function (rgb) {\n\tvar val = (rgb[0] + rgb[1] + rgb[2]) / 3;\n\treturn [val / 255 * 100];\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/color-convert/conversions.js\n// module id = 6\n// module chunks = 0 1","'use strict';\n\nimport Colorpicker from './Colorpicker';\nimport $ from 'jquery';\n\nlet plugin = 'colorpicker';\n\n$[plugin] = Colorpicker;\n\n// Colorpicker jQuery Plugin API\n$.fn[plugin] = function (option) {\n let fnArgs = Array.prototype.slice.call(arguments, 1),\n isSingleElement = (this.length === 1),\n returnValue = null;\n\n let $elements = this.each(function () {\n let $this = $(this),\n inst = $this.data(plugin),\n options = ((typeof option === 'object') ? option : {});\n\n // Create instance if does not exist\n if (!inst) {\n inst = new Colorpicker(this, options);\n $this.data(plugin, inst);\n }\n\n if (!isSingleElement) {\n return;\n }\n\n returnValue = $this;\n\n if (typeof option === 'string') {\n if (option === 'colorpicker') {\n // Return colorpicker instance: e.g. .colorpicker('colorpicker')\n returnValue = inst;\n } else if ($.isFunction(inst[option])) {\n // Return method call return value: e.g. .colorpicker('isEnabled')\n returnValue = inst[option].apply(inst, fnArgs);\n } else {\n // Return property value: e.g. .colorpicker('element')\n returnValue = inst[option];\n }\n }\n });\n\n return isSingleElement ? returnValue : $elements;\n};\n\n$.fn[plugin].constructor = Colorpicker;\n\n\n\n// WEBPACK FOOTER //\n// ./src/js/plugin.js","'use strict';\n\nimport Extension from './Extension';\nimport defaults from './options';\nimport coreExtensions from 'extensions';\nimport $ from 'jquery';\nimport SliderHandler from './SliderHandler';\nimport PopupHandler from './PopupHandler';\nimport InputHandler from './InputHandler';\nimport ColorHandler from './ColorHandler';\nimport PickerHandler from './PickerHandler';\nimport AddonHandler from './AddonHandler';\nimport ColorItem from './ColorItem';\n\nlet colorPickerIdCounter = 0;\nlet root = (typeof self !== 'undefined' ? self : this); // window\n\n/**\n * Colorpicker widget class\n */\nclass Colorpicker {\n /**\n * Color class\n *\n * @static\n * @type {Color}\n */\n static get Color() {\n return ColorItem;\n }\n\n /**\n * Extension class\n *\n * @static\n * @type {Extension}\n */\n static get Extension() {\n return Extension;\n }\n\n /**\n * Internal color object\n *\n * @type {Color|null}\n */\n get color() {\n return this.colorHandler.color;\n }\n\n /**\n * Internal color format\n *\n * @type {String|null}\n */\n get format() {\n return this.colorHandler.format;\n }\n\n /**\n * Getter of the picker element\n *\n * @returns {jQuery|HTMLElement}\n */\n get picker() {\n return this.pickerHandler.picker;\n }\n\n /**\n * @fires Colorpicker#colorpickerCreate\n * @param {Object|String} element\n * @param {Object} options\n * @constructor\n */\n constructor(element, options) {\n colorPickerIdCounter += 1;\n /**\n * The colorpicker instance number\n * @type {number}\n */\n this.id = colorPickerIdCounter;\n\n /**\n * Latest colorpicker event\n *\n * @type {{name: String, e: *}}\n */\n this.lastEvent = {\n alias: null,\n e: null\n };\n\n /**\n * The element that the colorpicker is bound to\n *\n * @type {*|jQuery}\n */\n this.element = $(element)\n .addClass('colorpicker-element')\n .attr('data-colorpicker-id', this.id);\n\n /**\n * @type {defaults}\n */\n this.options = $.extend(true, {}, defaults, options, this.element.data());\n\n /**\n * @type {boolean}\n * @private\n */\n this.disabled = false;\n\n /**\n * Extensions added to this instance\n *\n * @type {Extension[]}\n */\n this.extensions = [];\n\n /**\n * The element where the\n * @type {*|jQuery}\n */\n this.container = (\n this.options.container === true ||\n (this.options.container !== true && this.options.inline === true)\n ) ? this.element : this.options.container;\n\n this.container = (this.container !== false) ? $(this.container) : false;\n\n /**\n * @type {InputHandler}\n */\n this.inputHandler = new InputHandler(this);\n /**\n * @type {ColorHandler}\n */\n this.colorHandler = new ColorHandler(this);\n /**\n * @type {SliderHandler}\n */\n this.sliderHandler = new SliderHandler(this);\n /**\n * @type {PopupHandler}\n */\n this.popupHandler = new PopupHandler(this, root);\n /**\n * @type {PickerHandler}\n */\n this.pickerHandler = new PickerHandler(this);\n /**\n * @type {AddonHandler}\n */\n this.addonHandler = new AddonHandler(this);\n\n this.init();\n\n // Emit a create event\n $($.proxy(function () {\n /**\n * (Colorpicker) When the Colorpicker instance has been created and the DOM is ready.\n *\n * @event Colorpicker#colorpickerCreate\n */\n this.trigger('colorpickerCreate');\n }, this));\n }\n\n /**\n * Initializes the plugin\n * @private\n */\n init() {\n // Init addon\n this.addonHandler.bind();\n\n // Init input\n this.inputHandler.bind();\n\n // Init extensions (before initializing the color)\n this.initExtensions();\n\n // Init color\n this.colorHandler.bind();\n\n // Init picker\n this.pickerHandler.bind();\n\n // Init sliders and popup\n this.sliderHandler.bind();\n this.popupHandler.bind();\n\n // Inject into the DOM (this may make it visible)\n this.pickerHandler.attach();\n\n // Update all components\n this.update();\n\n if (this.inputHandler.isDisabled()) {\n this.disable();\n }\n }\n\n /**\n * Initializes the plugin extensions\n * @private\n */\n initExtensions() {\n if (!Array.isArray(this.options.extensions)) {\n this.options.extensions = [];\n }\n\n if (this.options.debug) {\n this.options.extensions.push({name: 'debugger'});\n }\n\n // Register and instantiate extensions\n this.options.extensions.forEach((ext) => {\n this.registerExtension(Colorpicker.extensions[ext.name.toLowerCase()], ext.options || {});\n });\n }\n\n /**\n * Creates and registers the given extension\n *\n * @param {Extension} ExtensionClass The extension class to instantiate\n * @param {Object} [config] Extension configuration\n * @returns {Extension}\n */\n registerExtension(ExtensionClass, config = {}) {\n let ext = new ExtensionClass(this, config);\n\n this.extensions.push(ext);\n return ext;\n }\n\n /**\n * Destroys the current instance\n *\n * @fires Colorpicker#colorpickerDestroy\n */\n destroy() {\n let color = this.color;\n\n this.sliderHandler.unbind();\n this.inputHandler.unbind();\n this.popupHandler.unbind();\n this.colorHandler.unbind();\n this.addonHandler.unbind();\n this.pickerHandler.unbind();\n\n this.element\n .removeClass('colorpicker-element')\n .removeData('colorpicker', 'color')\n .off('.colorpicker');\n\n /**\n * (Colorpicker) When the instance is destroyed with all events unbound.\n *\n * @event Colorpicker#colorpickerDestroy\n */\n this.trigger('colorpickerDestroy', color);\n }\n\n /**\n * Shows the colorpicker widget if hidden.\n * If the colorpicker is disabled this call will be ignored.\n *\n * @fires Colorpicker#colorpickerShow\n * @param {Event} [e]\n */\n show(e) {\n this.popupHandler.show(e);\n }\n\n /**\n * Hides the colorpicker widget.\n *\n * @fires Colorpicker#colorpickerHide\n * @param {Event} [e]\n */\n hide(e) {\n this.popupHandler.hide(e);\n }\n\n /**\n * Toggles the colorpicker between visible and hidden.\n *\n * @fires Colorpicker#colorpickerShow\n * @fires Colorpicker#colorpickerHide\n * @param {Event} [e]\n */\n toggle(e) {\n this.popupHandler.toggle(e);\n }\n\n /**\n * Returns the current color value as string\n *\n * @param {String|*} [defaultValue]\n * @returns {String|*}\n */\n getValue(defaultValue = null) {\n let val = this.colorHandler.color;\n\n val = (val instanceof ColorItem) ? val : defaultValue;\n\n if (val instanceof ColorItem) {\n return val.string(this.format);\n }\n\n return val;\n }\n\n /**\n * Sets the color manually\n *\n * @fires Colorpicker#colorpickerChange\n * @param {String|Color} val\n */\n setValue(val) {\n if (this.isDisabled()) {\n return;\n }\n let ch = this.colorHandler;\n\n if (\n (ch.hasColor() && !!val && ch.color.equals(val)) ||\n (!ch.hasColor() && !val)\n ) {\n // same color or still empty\n return;\n }\n\n ch.color = val ? ch.createColor(val, this.options.autoInputFallback) : null;\n\n /**\n * (Colorpicker) When the color is set programmatically with setValue().\n *\n * @event Colorpicker#colorpickerChange\n */\n this.trigger('colorpickerChange', ch.color, val);\n\n // force update if color has changed to empty\n this.update();\n }\n\n /**\n * Updates the UI and the input color according to the internal color.\n *\n * @fires Colorpicker#colorpickerUpdate\n */\n update() {\n if (this.colorHandler.hasColor()) {\n this.inputHandler.update();\n } else {\n this.colorHandler.assureColor();\n }\n\n this.addonHandler.update();\n this.pickerHandler.update();\n\n /**\n * (Colorpicker) Fired when the widget is updated.\n *\n * @event Colorpicker#colorpickerUpdate\n */\n this.trigger('colorpickerUpdate');\n }\n\n /**\n * Enables the widget and the input if any\n *\n * @fires Colorpicker#colorpickerEnable\n * @returns {boolean}\n */\n enable() {\n this.inputHandler.enable();\n this.disabled = false;\n this.picker.removeClass('colorpicker-disabled');\n\n /**\n * (Colorpicker) When the widget has been enabled.\n *\n * @event Colorpicker#colorpickerEnable\n */\n this.trigger('colorpickerEnable');\n return true;\n }\n\n /**\n * Disables the widget and the input if any\n *\n * @fires Colorpicker#colorpickerDisable\n * @returns {boolean}\n */\n disable() {\n this.inputHandler.disable();\n this.disabled = true;\n this.picker.addClass('colorpicker-disabled');\n\n /**\n * (Colorpicker) When the widget has been disabled.\n *\n * @event Colorpicker#colorpickerDisable\n */\n this.trigger('colorpickerDisable');\n return true;\n }\n\n /**\n * Returns true if this instance is enabled\n * @returns {boolean}\n */\n isEnabled() {\n return !this.isDisabled();\n }\n\n /**\n * Returns true if this instance is disabled\n * @returns {boolean}\n */\n isDisabled() {\n return this.disabled === true;\n }\n\n /**\n * Triggers a Colorpicker event.\n *\n * @param eventName\n * @param color\n * @param value\n */\n trigger(eventName, color = null, value = null) {\n this.element.trigger({\n type: eventName,\n colorpicker: this,\n color: color ? color : this.color,\n value: value ? value : this.getValue()\n });\n }\n}\n\n/**\n * Colorpicker extension classes, indexed by extension name\n *\n * @static\n * @type {Object} a map between the extension name and its class\n */\nColorpicker.extensions = coreExtensions;\n\nexport default Colorpicker;\n\n\n\n// WEBPACK FOOTER //\n// ./src/js/Colorpicker.js","import Debugger from './Debugger';\nimport Preview from './Preview';\nimport Swatches from './Swatches';\nimport Palette from './Palette';\n\nexport {\n Debugger, Preview, Swatches, Palette\n};\n\nexport default {\n 'debugger': Debugger,\n 'preview': Preview,\n 'swatches': Swatches,\n 'palette': Palette\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/js/extensions/index.js","'use strict';\n\nimport Extension from 'Extension';\nimport $ from 'jquery';\n\n/**\n * Debugger extension class\n * @alias DebuggerExtension\n * @ignore\n */\nclass Debugger extends Extension {\n constructor(colorpicker, options = {}) {\n super(colorpicker, options);\n\n /**\n * @type {number}\n */\n this.eventCounter = 0;\n if (this.colorpicker.inputHandler.hasInput()) {\n this.colorpicker.inputHandler.input.on('change.colorpicker-ext', $.proxy(this.onChangeInput, this));\n }\n }\n\n /**\n * @fires DebuggerExtension#colorpickerDebug\n * @param {string} eventName\n * @param {*} args\n */\n log(eventName, ...args) {\n this.eventCounter += 1;\n\n let logMessage = `#${this.eventCounter}: Colorpicker#${this.colorpicker.id} [${eventName}]`;\n\n console.debug(logMessage, ...args);\n\n /**\n * Whenever the debugger logs an event, this other event is emitted.\n *\n * @event DebuggerExtension#colorpickerDebug\n * @type {object} The event object\n * @property {Colorpicker} colorpicker The Colorpicker instance\n * @property {ColorItem} color The color instance\n * @property {{debugger: DebuggerExtension, eventName: String, logArgs: Array, logMessage: String}} debug\n * The debug info\n */\n this.colorpicker.element.trigger({\n type: 'colorpickerDebug',\n colorpicker: this.colorpicker,\n color: this.color,\n value: null,\n debug: {\n debugger: this,\n eventName: eventName,\n logArgs: args,\n logMessage: logMessage\n }\n });\n }\n\n resolveColor(color, realColor = true) {\n this.log('resolveColor()', color, realColor);\n return false;\n }\n\n onCreate(event) {\n this.log('colorpickerCreate');\n return super.onCreate(event);\n }\n\n onDestroy(event) {\n this.log('colorpickerDestroy');\n this.eventCounter = 0;\n\n if (this.colorpicker.inputHandler.hasInput()) {\n this.colorpicker.inputHandler.input.off('.colorpicker-ext');\n }\n\n return super.onDestroy(event);\n }\n\n onUpdate(event) {\n this.log('colorpickerUpdate');\n }\n\n /**\n * @listens Colorpicker#change\n * @param {Event} event\n */\n onChangeInput(event) {\n this.log('input:change.colorpicker', event.value, event.color);\n }\n\n onChange(event) {\n this.log('colorpickerChange', event.value, event.color);\n }\n\n onInvalid(event) {\n this.log('colorpickerInvalid', event.value, event.color);\n }\n\n onHide(event) {\n this.log('colorpickerHide');\n this.eventCounter = 0;\n }\n\n onShow(event) {\n this.log('colorpickerShow');\n }\n\n onDisable(event) {\n this.log('colorpickerDisable');\n }\n\n onEnable(event) {\n this.log('colorpickerEnable');\n }\n}\n\nexport default Debugger;\n\n\n\n// WEBPACK FOOTER //\n// ./src/js/extensions/Debugger.js","'use strict';\n\nimport Extension from 'Extension';\nimport $ from 'jquery';\n\n/**\n * Color preview extension\n * @ignore\n */\nclass Preview extends Extension {\n constructor(colorpicker, options = {}) {\n super(colorpicker, $.extend(true, {},\n {\n template: '
',\n showText: true,\n format: colorpicker.format\n },\n options\n ));\n\n this.element = $(this.options.template);\n this.elementInner = this.element.find('div');\n }\n\n onCreate(event) {\n super.onCreate(event);\n this.colorpicker.picker.append(this.element);\n }\n\n onUpdate(event) {\n super.onUpdate(event);\n\n if (!event.color) {\n this.elementInner\n .css('backgroundColor', null)\n .css('color', null)\n .html('');\n return;\n }\n\n this.elementInner\n .css('backgroundColor', event.color.toRgbString());\n\n if (this.options.showText) {\n this.elementInner\n .html(event.color.string(this.options.format || this.colorpicker.format));\n\n if (event.color.isDark() && (event.color.alpha > 0.5)) {\n this.elementInner.css('color', 'white');\n } else {\n this.elementInner.css('color', 'black');\n }\n }\n }\n}\n\nexport default Preview;\n\n\n\n// WEBPACK FOOTER //\n// ./src/js/extensions/Preview.js","'use strict';\n\nimport Palette from './Palette';\nimport $ from 'jquery';\n\nlet defaults = {\n barTemplate: `
\n
\n
`,\n swatchTemplate: ''\n};\n\n/**\n * Color swatches extension\n * @ignore\n */\nclass Swatches extends Palette {\n constructor(colorpicker, options = {}) {\n super(colorpicker, $.extend(true, {}, defaults, options));\n this.element = null;\n }\n\n isEnabled() {\n return this.getLength() > 0;\n }\n\n onCreate(event) {\n super.onCreate(event);\n\n if (!this.isEnabled()) {\n return;\n }\n\n this.element = $(this.options.barTemplate);\n this.load();\n this.colorpicker.picker.append(this.element);\n }\n\n load() {\n let colorpicker = this.colorpicker,\n swatchContainer = this.element.find('.colorpicker-swatches--inner'),\n isAliased = (this.options.namesAsValues === true) && !Array.isArray(this.colors);\n\n swatchContainer.empty();\n\n $.each(this.colors, (name, value) => {\n let $swatch = $(this.options.swatchTemplate)\n .attr('data-name', name)\n .attr('data-value', value)\n .attr('title', isAliased ? `${name}: ${value}` : value)\n .on('mousedown.colorpicker touchstart.colorpicker',\n function (e) {\n let $sw = $(this);\n\n // e.preventDefault();\n\n colorpicker.setValue(isAliased ? $sw.attr('data-name') : $sw.attr('data-value'));\n }\n );\n\n $swatch.find('.colorpicker-swatch--inner')\n .css('background-color', value);\n\n swatchContainer.append($swatch);\n });\n\n swatchContainer.append($(''));\n }\n}\n\nexport default Swatches;\n\n\n\n// WEBPACK FOOTER //\n// ./src/js/extensions/Swatches.js","'use strict';\n\nimport $ from 'jquery';\n\n/**\n * Class that handles all configured sliders on mouse or touch events.\n * @ignore\n */\nclass SliderHandler {\n /**\n * @param {Colorpicker} colorpicker\n */\n constructor(colorpicker) {\n /**\n * @type {Colorpicker}\n */\n this.colorpicker = colorpicker;\n /**\n * @type {*|String}\n * @private\n */\n this.currentSlider = null;\n /**\n * @type {{left: number, top: number}}\n * @private\n */\n this.mousePointer = {\n left: 0,\n top: 0\n };\n\n /**\n * @type {Function}\n */\n this.onMove = $.proxy(this.defaultOnMove, this);\n }\n\n /**\n * This function is called every time a slider guide is moved\n * The scope of \"this\" is the SliderHandler object.\n *\n * @param {int} top\n * @param {int} left\n */\n defaultOnMove(top, left) {\n if (!this.currentSlider) {\n return;\n }\n\n let slider = this.currentSlider, cp = this.colorpicker, ch = cp.colorHandler;\n\n // Create a color object\n let color = !ch.hasColor() ? ch.getFallbackColor() : ch.color.getClone();\n\n // Adjust the guide position\n slider.guideStyle.left = left + 'px';\n slider.guideStyle.top = top + 'px';\n\n // Adjust the color\n if (slider.callLeft) {\n color[slider.callLeft](left / slider.maxLeft);\n }\n if (slider.callTop) {\n color[slider.callTop](top / slider.maxTop);\n }\n\n // Set the new color\n cp.setValue(color);\n cp.popupHandler.focus();\n }\n\n /**\n * Binds the colorpicker sliders to the mouse/touch events\n */\n bind() {\n let sliders = this.colorpicker.options.horizontal ? this.colorpicker\n .options.slidersHorz : this.colorpicker.options.sliders;\n let sliderClasses = [];\n\n for (let sliderName in sliders) {\n if (!sliders.hasOwnProperty(sliderName)) {\n continue;\n }\n\n sliderClasses.push(sliders[sliderName].selector);\n }\n\n this.colorpicker.picker.find(sliderClasses.join(', '))\n .on('mousedown.colorpicker touchstart.colorpicker', $.proxy(this.pressed, this));\n }\n\n /**\n * Unbinds any event bound by this handler\n */\n unbind() {\n $(this.colorpicker.picker).off({\n 'mousemove.colorpicker': $.proxy(this.moved, this),\n 'touchmove.colorpicker': $.proxy(this.moved, this),\n 'mouseup.colorpicker': $.proxy(this.released, this),\n 'touchend.colorpicker': $.proxy(this.released, this)\n });\n }\n\n /**\n * Function triggered when clicking in one of the color adjustment bars\n *\n * @private\n * @fires Colorpicker#mousemove\n * @param {Event} e\n */\n pressed(e) {\n if (this.colorpicker.isDisabled()) {\n return;\n }\n this.colorpicker.lastEvent.alias = 'pressed';\n this.colorpicker.lastEvent.e = e;\n\n if (!e.pageX && !e.pageY && e.originalEvent && e.originalEvent.touches) {\n e.pageX = e.originalEvent.touches[0].pageX;\n e.pageY = e.originalEvent.touches[0].pageY;\n }\n // e.stopPropagation();\n // e.preventDefault();\n\n let target = $(e.target);\n\n // detect the slider and set the limits and callbacks\n let zone = target.closest('div');\n let sliders = this.colorpicker.options.horizontal ? this.colorpicker\n .options.slidersHorz : this.colorpicker.options.sliders;\n\n if (zone.is('.colorpicker')) {\n return;\n }\n\n this.currentSlider = null;\n\n for (let sliderName in sliders) {\n if (!sliders.hasOwnProperty(sliderName)) {\n continue;\n }\n\n let slider = sliders[sliderName];\n\n if (zone.is(slider.selector)) {\n this.currentSlider = $.extend({}, slider, {name: sliderName});\n break;\n } else if (slider.childSelector !== undefined && zone.is(slider.childSelector)) {\n this.currentSlider = $.extend({}, slider, {name: sliderName});\n zone = zone.parent(); // zone.parents(slider.selector).first() ?\n break;\n }\n }\n\n let guide = zone.find('.colorpicker-guide').get(0);\n\n if (this.currentSlider === null || guide === null) {\n return;\n }\n\n let offset = zone.offset();\n\n // reference to guide's style\n this.currentSlider.guideStyle = guide.style;\n this.currentSlider.left = e.pageX - offset.left;\n this.currentSlider.top = e.pageY - offset.top;\n this.mousePointer = {\n left: e.pageX,\n top: e.pageY\n };\n\n // TODO: fix moving outside the picker makes the guides to keep moving. The event needs to be bound to the window.\n /**\n * (window.document) Triggered on mousedown for the document object,\n * so the color adjustment guide is moved to the clicked position.\n *\n * @event Colorpicker#mousemove\n */\n $(this.colorpicker.picker).on({\n 'mousemove.colorpicker': $.proxy(this.moved, this),\n 'touchmove.colorpicker': $.proxy(this.moved, this),\n 'mouseup.colorpicker': $.proxy(this.released, this),\n 'touchend.colorpicker': $.proxy(this.released, this)\n }).trigger('mousemove');\n }\n\n /**\n * Function triggered when dragging a guide inside one of the color adjustment bars.\n *\n * @private\n * @param {Event} e\n */\n moved(e) {\n this.colorpicker.lastEvent.alias = 'moved';\n this.colorpicker.lastEvent.e = e;\n\n if (!e.pageX && !e.pageY && e.originalEvent && e.originalEvent.touches) {\n e.pageX = e.originalEvent.touches[0].pageX;\n e.pageY = e.originalEvent.touches[0].pageY;\n }\n\n // e.stopPropagation();\n e.preventDefault(); // prevents scrolling on mobile\n\n let left = Math.max(\n 0,\n Math.min(\n this.currentSlider.maxLeft,\n this.currentSlider.left + ((e.pageX || this.mousePointer.left) - this.mousePointer.left)\n )\n );\n\n let top = Math.max(\n 0,\n Math.min(\n this.currentSlider.maxTop,\n this.currentSlider.top + ((e.pageY || this.mousePointer.top) - this.mousePointer.top)\n )\n );\n\n this.onMove(top, left);\n }\n\n /**\n * Function triggered when releasing the click in one of the color adjustment bars.\n *\n * @private\n * @param {Event} e\n */\n released(e) {\n this.colorpicker.lastEvent.alias = 'released';\n this.colorpicker.lastEvent.e = e;\n\n // e.stopPropagation();\n // e.preventDefault();\n\n $(this.colorpicker.picker).off({\n 'mousemove.colorpicker': this.moved,\n 'touchmove.colorpicker': this.moved,\n 'mouseup.colorpicker': this.released,\n 'touchend.colorpicker': this.released\n });\n }\n}\n\nexport default SliderHandler;\n\n\n\n// WEBPACK FOOTER //\n// ./src/js/SliderHandler.js","'use strict';\n\nimport $ from 'jquery';\nimport _defaults from './options';\n\n/**\n * Handles everything related to the UI of the colorpicker popup: show, hide, position,...\n * @ignore\n */\nclass PopupHandler {\n /**\n * @param {Colorpicker} colorpicker\n * @param {Window} root\n */\n constructor(colorpicker, root) {\n /**\n * @type {Window}\n */\n this.root = root;\n /**\n * @type {Colorpicker}\n */\n this.colorpicker = colorpicker;\n /**\n * @type {jQuery}\n */\n this.popoverTarget = null;\n /**\n * @type {jQuery}\n */\n this.popoverTip = null;\n\n /**\n * If true, the latest click was inside the popover\n * @type {boolean}\n */\n this.clicking = false;\n /**\n * @type {boolean}\n */\n this.hidding = false;\n /**\n * @type {boolean}\n */\n this.showing = false;\n }\n\n /**\n * @private\n * @returns {jQuery|false}\n */\n get input() {\n return this.colorpicker.inputHandler.input;\n }\n\n /**\n * @private\n * @returns {boolean}\n */\n get hasInput() {\n return this.colorpicker.inputHandler.hasInput();\n }\n\n /**\n * @private\n * @returns {jQuery|false}\n */\n get addon() {\n return this.colorpicker.addonHandler.addon;\n }\n\n /**\n * @private\n * @returns {boolean}\n */\n get hasAddon() {\n return this.colorpicker.addonHandler.hasAddon();\n }\n\n /**\n * @private\n * @returns {boolean}\n */\n get isPopover() {\n return !this.colorpicker.options.inline && !!this.popoverTip;\n }\n\n /**\n * Binds the different colorpicker elements to the focus/mouse/touch events so it reacts in order to show or\n * hide the colorpicker popup accordingly. It also adds the proper classes.\n */\n bind() {\n let cp = this.colorpicker;\n\n if (cp.options.inline) {\n cp.picker.addClass('colorpicker-inline colorpicker-visible');\n return; // no need to bind show/hide events for inline elements\n }\n\n cp.picker.addClass('colorpicker-popup colorpicker-hidden');\n\n // there is no input or addon\n if (!this.hasInput && !this.hasAddon) {\n return;\n }\n\n // create Bootstrap 4 popover\n if (cp.options.popover) {\n this.createPopover();\n }\n\n // bind addon show/hide events\n if (this.hasAddon) {\n // enable focus on addons\n if (!this.addon.attr('tabindex')) {\n this.addon.attr('tabindex', 0);\n }\n\n this.addon.on({\n 'mousedown.colorpicker touchstart.colorpicker': $.proxy(this.toggle, this)\n });\n\n this.addon.on({\n 'focus.colorpicker': $.proxy(this.show, this)\n });\n\n this.addon.on({\n 'focusout.colorpicker': $.proxy(this.hide, this)\n });\n }\n\n // bind input show/hide events\n if (this.hasInput && !this.hasAddon) {\n this.input.on({\n 'mousedown.colorpicker touchstart.colorpicker': $.proxy(this.show, this),\n 'focus.colorpicker': $.proxy(this.show, this)\n });\n\n this.input.on({\n 'focusout.colorpicker': $.proxy(this.hide, this)\n });\n }\n\n // reposition popup on window resize\n $(this.root).on('resize.colorpicker', $.proxy(this.reposition, this));\n }\n\n /**\n * Unbinds any event bound by this handler\n */\n unbind() {\n if (this.hasInput) {\n this.input.off({\n 'mousedown.colorpicker touchstart.colorpicker': $.proxy(this.show, this),\n 'focus.colorpicker': $.proxy(this.show, this)\n });\n this.input.off({\n 'focusout.colorpicker': $.proxy(this.hide, this)\n });\n }\n\n if (this.hasAddon) {\n this.addon.off({\n 'mousedown.colorpicker touchstart.colorpicker': $.proxy(this.toggle, this)\n });\n this.addon.off({\n 'focus.colorpicker': $.proxy(this.show, this)\n });\n this.addon.off({\n 'focusout.colorpicker': $.proxy(this.hide, this)\n });\n }\n\n if (this.popoverTarget) {\n this.popoverTarget.popover('dispose');\n }\n\n $(this.root).off('resize.colorpicker', $.proxy(this.reposition, this));\n $(this.root.document).off('mousedown.colorpicker touchstart.colorpicker', $.proxy(this.hide, this));\n $(this.root.document).off('mousedown.colorpicker touchstart.colorpicker', $.proxy(this.onClickingInside, this));\n }\n\n isClickingInside(e) {\n if (!e) {\n return false;\n }\n\n return (\n this.isOrIsInside(this.popoverTip, e.currentTarget) ||\n this.isOrIsInside(this.popoverTip, e.target) ||\n this.isOrIsInside(this.colorpicker.picker, e.currentTarget) ||\n this.isOrIsInside(this.colorpicker.picker, e.target)\n );\n }\n\n isOrIsInside(container, element) {\n if (!container || !element) {\n return false;\n }\n\n element = $(element);\n\n return (\n element.is(container) ||\n container.find(element).length > 0\n );\n }\n\n onClickingInside(e) {\n this.clicking = this.isClickingInside(e);\n }\n\n createPopover() {\n let cp = this.colorpicker;\n\n this.popoverTarget = this.hasAddon ? this.addon : this.input;\n\n cp.picker.addClass('colorpicker-bs-popover-content');\n\n this.popoverTarget.popover(\n $.extend(\n true,\n {},\n _defaults.popover,\n cp.options.popover,\n {trigger: 'manual', content: cp.picker, html: true}\n )\n );\n\n this.popoverTip = $(this.popoverTarget.popover('getTipElement').data('bs.popover').tip);\n this.popoverTip.addClass('colorpicker-bs-popover');\n\n this.popoverTarget.on('shown.bs.popover', $.proxy(this.fireShow, this));\n this.popoverTarget.on('hidden.bs.popover', $.proxy(this.fireHide, this));\n }\n\n /**\n * If the widget is not inside a container or inline, rearranges its position relative to its element offset.\n *\n * @param {Event} [e]\n * @private\n */\n reposition(e) {\n if (this.popoverTarget && this.isVisible()) {\n this.popoverTarget.popover('update');\n }\n }\n\n /**\n * Toggles the colorpicker between visible or hidden\n *\n * @fires Colorpicker#colorpickerShow\n * @fires Colorpicker#colorpickerHide\n * @param {Event} [e]\n */\n toggle(e) {\n if (this.isVisible()) {\n this.hide(e);\n } else {\n this.show(e);\n }\n }\n\n /**\n * Shows the colorpicker widget if hidden.\n *\n * @fires Colorpicker#colorpickerShow\n * @param {Event} [e]\n */\n show(e) {\n if (this.isVisible() || this.showing || this.hidding) {\n return;\n }\n\n this.showing = true;\n this.hidding = false;\n this.clicking = false;\n\n let cp = this.colorpicker;\n\n cp.lastEvent.alias = 'show';\n cp.lastEvent.e = e;\n\n // Prevent showing browser native HTML5 colorpicker\n if (\n (e && (!this.hasInput || this.input.attr('type') === 'color')) &&\n (e && e.preventDefault)\n ) {\n e.stopPropagation();\n e.preventDefault();\n }\n\n // If it's a popover, add event to the document to hide the picker when clicking outside of it\n if (this.isPopover) {\n $(this.root).on('resize.colorpicker', $.proxy(this.reposition, this));\n }\n\n // add visible class before popover is shown\n cp.picker.addClass('colorpicker-visible').removeClass('colorpicker-hidden');\n\n if (this.popoverTarget) {\n this.popoverTarget.popover('show');\n } else {\n this.fireShow();\n }\n }\n\n fireShow() {\n this.hidding = false;\n this.showing = false;\n\n if (this.isPopover) {\n // Add event to hide on outside click\n $(this.root.document).on('mousedown.colorpicker touchstart.colorpicker', $.proxy(this.hide, this));\n $(this.root.document).on('mousedown.colorpicker touchstart.colorpicker', $.proxy(this.onClickingInside, this));\n }\n\n /**\n * (Colorpicker) When show() is called and the widget can be shown.\n *\n * @event Colorpicker#colorpickerShow\n */\n this.colorpicker.trigger('colorpickerShow');\n }\n\n /**\n * Hides the colorpicker widget.\n * Hide is prevented when it is triggered by an event whose target element has been clicked/touched.\n *\n * @fires Colorpicker#colorpickerHide\n * @param {Event} [e]\n */\n hide(e) {\n if (this.isHidden() || this.showing || this.hidding) {\n return;\n }\n\n let cp = this.colorpicker, clicking = (this.clicking || this.isClickingInside(e));\n\n this.hidding = true;\n this.showing = false;\n this.clicking = false;\n\n cp.lastEvent.alias = 'hide';\n cp.lastEvent.e = e;\n\n // TODO: fix having to click twice outside when losing focus and last 2 clicks where inside the colorpicker\n\n // Prevent hide if triggered by an event and an element inside the colorpicker has been clicked/touched\n if (clicking) {\n this.hidding = false;\n return;\n }\n\n if (this.popoverTarget) {\n this.popoverTarget.popover('hide');\n } else {\n this.fireHide();\n }\n }\n\n fireHide() {\n this.hidding = false;\n this.showing = false;\n\n let cp = this.colorpicker;\n\n // add hidden class after popover is hidden\n cp.picker.addClass('colorpicker-hidden').removeClass('colorpicker-visible');\n\n // Unbind window and document events, since there is no need to keep them while the popup is hidden\n $(this.root).off('resize.colorpicker', $.proxy(this.reposition, this));\n $(this.root.document).off('mousedown.colorpicker touchstart.colorpicker', $.proxy(this.hide, this));\n $(this.root.document).off('mousedown.colorpicker touchstart.colorpicker', $.proxy(this.onClickingInside, this));\n\n /**\n * (Colorpicker) When hide() is called and the widget can be hidden.\n *\n * @event Colorpicker#colorpickerHide\n */\n cp.trigger('colorpickerHide');\n }\n\n focus() {\n if (this.hasAddon) {\n return this.addon.focus();\n }\n if (this.hasInput) {\n return this.input.focus();\n }\n return false;\n }\n\n /**\n * Returns true if the colorpicker element has the colorpicker-visible class and not the colorpicker-hidden one.\n * False otherwise.\n *\n * @returns {boolean}\n */\n isVisible() {\n return this.colorpicker.picker.hasClass('colorpicker-visible') &&\n !this.colorpicker.picker.hasClass('colorpicker-hidden');\n }\n\n /**\n * Returns true if the colorpicker element has the colorpicker-hidden class and not the colorpicker-visible one.\n * False otherwise.\n *\n * @returns {boolean}\n */\n isHidden() {\n return this.colorpicker.picker.hasClass('colorpicker-hidden') &&\n !this.colorpicker.picker.hasClass('colorpicker-visible');\n }\n}\n\nexport default PopupHandler;\n\n\n\n// WEBPACK FOOTER //\n// ./src/js/PopupHandler.js","'use strict';\n\nimport $ from 'jquery';\nimport ColorItem from './ColorItem';\n\n/**\n * Handles everything related to the colorpicker input\n * @ignore\n */\nclass InputHandler {\n /**\n * @param {Colorpicker} colorpicker\n */\n constructor(colorpicker) {\n /**\n * @type {Colorpicker}\n */\n this.colorpicker = colorpicker;\n /**\n * @type {jQuery|false}\n */\n this.input = this.colorpicker.element.is('input') ? this.colorpicker.element : (this.colorpicker.options.input ?\n this.colorpicker.element.find(this.colorpicker.options.input) : false);\n\n if (this.input && (this.input.length === 0)) {\n this.input = false;\n }\n\n this._initValue();\n }\n\n bind() {\n if (!this.hasInput()) {\n return;\n }\n this.input.on({\n 'keyup.colorpicker': $.proxy(this.onkeyup, this)\n });\n this.input.on({\n 'change.colorpicker': $.proxy(this.onchange, this)\n });\n }\n\n unbind() {\n if (!this.hasInput()) {\n return;\n }\n this.input.off('.colorpicker');\n }\n\n _initValue() {\n if (!this.hasInput()) {\n return;\n }\n\n let val = '';\n\n [\n // candidates:\n this.input.val(),\n this.input.data('color'),\n this.input.attr('data-color')\n ].map((item) => {\n if (item && (val === '')) {\n val = item;\n }\n });\n\n if (val instanceof ColorItem) {\n val = this.getFormattedColor(val.string(this.colorpicker.format));\n } else if (!(typeof val === 'string' || val instanceof String)) {\n val = '';\n }\n\n this.input.prop('value', val);\n }\n\n /**\n * Returns the color string from the input value.\n * If there is no input the return value is false.\n *\n * @returns {String|boolean}\n */\n getValue() {\n if (!this.hasInput()) {\n return false;\n }\n\n return this.input.val();\n }\n\n /**\n * If the input element is present, it updates the value with the current color object color string.\n * If the value is changed, this method fires a \"change\" event on the input element.\n *\n * @param {String} val\n *\n * @fires Colorpicker#change\n */\n setValue(val) {\n if (!this.hasInput()) {\n return;\n }\n\n let inputVal = this.input.prop('value');\n\n val = val ? val : '';\n\n if (val === (inputVal ? inputVal : '')) {\n // No need to set value or trigger any event if nothing changed\n return;\n }\n\n this.input.prop('value', val);\n\n /**\n * (Input) Triggered on the input element when a new color is selected.\n *\n * @event Colorpicker#change\n */\n this.input.trigger({\n type: 'change',\n colorpicker: this.colorpicker,\n color: this.colorpicker.color,\n value: val\n });\n }\n\n /**\n * Returns the formatted color string, with the formatting options applied\n * (e.g. useHashPrefix)\n *\n * @param {String|null} val\n *\n * @returns {String}\n */\n getFormattedColor(val = null) {\n val = val ? val : this.colorpicker.colorHandler.getColorString();\n\n if (!val) {\n return '';\n }\n\n val = this.colorpicker.colorHandler.resolveColorDelegate(val, false);\n\n if (this.colorpicker.options.useHashPrefix === false) {\n val = val.replace(/^#/g, '');\n }\n\n return val;\n }\n\n /**\n * Returns true if the widget has an associated input element, false otherwise\n * @returns {boolean}\n */\n hasInput() {\n return (this.input !== false);\n }\n\n /**\n * Returns true if the input exists and is disabled\n * @returns {boolean}\n */\n isEnabled() {\n return this.hasInput() && !this.isDisabled();\n }\n\n /**\n * Returns true if the input exists and is disabled\n * @returns {boolean}\n */\n isDisabled() {\n return this.hasInput() && (this.input.prop('disabled') === true);\n }\n\n /**\n * Disables the input if any\n *\n * @fires Colorpicker#colorpickerDisable\n * @returns {boolean}\n */\n disable() {\n if (this.hasInput()) {\n this.input.prop('disabled', true);\n }\n }\n\n /**\n * Enables the input if any\n *\n * @fires Colorpicker#colorpickerEnable\n * @returns {boolean}\n */\n enable() {\n if (this.hasInput()) {\n this.input.prop('disabled', false);\n }\n }\n\n /**\n * Calls setValue with the current internal color value\n *\n * @fires Colorpicker#change\n */\n update() {\n if (!this.hasInput()) {\n return;\n }\n\n if (\n (this.colorpicker.options.autoInputFallback === false) &&\n this.colorpicker.colorHandler.isInvalidColor()\n ) {\n // prevent update if color is invalid, autoInputFallback is disabled and the last event is keyup.\n return;\n }\n\n this.setValue(this.getFormattedColor());\n }\n\n /**\n * Function triggered when the input has changed, so the colorpicker gets updated.\n *\n * @private\n * @param {Event} e\n * @returns {boolean}\n */\n onchange(e) {\n this.colorpicker.lastEvent.alias = 'input.change';\n this.colorpicker.lastEvent.e = e;\n\n let val = this.getValue();\n\n if (val !== e.value) {\n this.colorpicker.setValue(val);\n }\n }\n\n /**\n * Function triggered after a keyboard key has been released.\n *\n * @private\n * @param {Event} e\n * @returns {boolean}\n */\n onkeyup(e) {\n this.colorpicker.lastEvent.alias = 'input.keyup';\n this.colorpicker.lastEvent.e = e;\n\n let val = this.getValue();\n\n if (val !== e.value) {\n this.colorpicker.setValue(val);\n }\n }\n}\n\nexport default InputHandler;\n\n\n\n// WEBPACK FOOTER //\n// ./src/js/InputHandler.js","'use strict';\n\nvar colorString = require('color-string');\nvar convert = require('color-convert');\n\nvar _slice = [].slice;\n\nvar skippedModels = [\n\t// to be honest, I don't really feel like keyword belongs in color convert, but eh.\n\t'keyword',\n\n\t// gray conflicts with some method names, and has its own method defined.\n\t'gray',\n\n\t// shouldn't really be in color-convert either...\n\t'hex'\n];\n\nvar hashedModelKeys = {};\nObject.keys(convert).forEach(function (model) {\n\thashedModelKeys[_slice.call(convert[model].labels).sort().join('')] = model;\n});\n\nvar limiters = {};\n\nfunction Color(obj, model) {\n\tif (!(this instanceof Color)) {\n\t\treturn new Color(obj, model);\n\t}\n\n\tif (model && model in skippedModels) {\n\t\tmodel = null;\n\t}\n\n\tif (model && !(model in convert)) {\n\t\tthrow new Error('Unknown model: ' + model);\n\t}\n\n\tvar i;\n\tvar channels;\n\n\tif (typeof obj === 'undefined') {\n\t\tthis.model = 'rgb';\n\t\tthis.color = [0, 0, 0];\n\t\tthis.valpha = 1;\n\t} else if (obj instanceof Color) {\n\t\tthis.model = obj.model;\n\t\tthis.color = obj.color.slice();\n\t\tthis.valpha = obj.valpha;\n\t} else if (typeof obj === 'string') {\n\t\tvar result = colorString.get(obj);\n\t\tif (result === null) {\n\t\t\tthrow new Error('Unable to parse color from string: ' + obj);\n\t\t}\n\n\t\tthis.model = result.model;\n\t\tchannels = convert[this.model].channels;\n\t\tthis.color = result.value.slice(0, channels);\n\t\tthis.valpha = typeof result.value[channels] === 'number' ? result.value[channels] : 1;\n\t} else if (obj.length) {\n\t\tthis.model = model || 'rgb';\n\t\tchannels = convert[this.model].channels;\n\t\tvar newArr = _slice.call(obj, 0, channels);\n\t\tthis.color = zeroArray(newArr, channels);\n\t\tthis.valpha = typeof obj[channels] === 'number' ? obj[channels] : 1;\n\t} else if (typeof obj === 'number') {\n\t\t// this is always RGB - can be converted later on.\n\t\tobj &= 0xFFFFFF;\n\t\tthis.model = 'rgb';\n\t\tthis.color = [\n\t\t\t(obj >> 16) & 0xFF,\n\t\t\t(obj >> 8) & 0xFF,\n\t\t\tobj & 0xFF\n\t\t];\n\t\tthis.valpha = 1;\n\t} else {\n\t\tthis.valpha = 1;\n\n\t\tvar keys = Object.keys(obj);\n\t\tif ('alpha' in obj) {\n\t\t\tkeys.splice(keys.indexOf('alpha'), 1);\n\t\t\tthis.valpha = typeof obj.alpha === 'number' ? obj.alpha : 0;\n\t\t}\n\n\t\tvar hashedKeys = keys.sort().join('');\n\t\tif (!(hashedKeys in hashedModelKeys)) {\n\t\t\tthrow new Error('Unable to parse color from object: ' + JSON.stringify(obj));\n\t\t}\n\n\t\tthis.model = hashedModelKeys[hashedKeys];\n\n\t\tvar labels = convert[this.model].labels;\n\t\tvar color = [];\n\t\tfor (i = 0; i < labels.length; i++) {\n\t\t\tcolor.push(obj[labels[i]]);\n\t\t}\n\n\t\tthis.color = zeroArray(color);\n\t}\n\n\t// perform limitations (clamping, etc.)\n\tif (limiters[this.model]) {\n\t\tchannels = convert[this.model].channels;\n\t\tfor (i = 0; i < channels; i++) {\n\t\t\tvar limit = limiters[this.model][i];\n\t\t\tif (limit) {\n\t\t\t\tthis.color[i] = limit(this.color[i]);\n\t\t\t}\n\t\t}\n\t}\n\n\tthis.valpha = Math.max(0, Math.min(1, this.valpha));\n\n\tif (Object.freeze) {\n\t\tObject.freeze(this);\n\t}\n}\n\nColor.prototype = {\n\ttoString: function () {\n\t\treturn this.string();\n\t},\n\n\ttoJSON: function () {\n\t\treturn this[this.model]();\n\t},\n\n\tstring: function (places) {\n\t\tvar self = this.model in colorString.to ? this : this.rgb();\n\t\tself = self.round(typeof places === 'number' ? places : 1);\n\t\tvar args = self.valpha === 1 ? self.color : self.color.concat(this.valpha);\n\t\treturn colorString.to[self.model](args);\n\t},\n\n\tpercentString: function (places) {\n\t\tvar self = this.rgb().round(typeof places === 'number' ? places : 1);\n\t\tvar args = self.valpha === 1 ? self.color : self.color.concat(this.valpha);\n\t\treturn colorString.to.rgb.percent(args);\n\t},\n\n\tarray: function () {\n\t\treturn this.valpha === 1 ? this.color.slice() : this.color.concat(this.valpha);\n\t},\n\n\tobject: function () {\n\t\tvar result = {};\n\t\tvar channels = convert[this.model].channels;\n\t\tvar labels = convert[this.model].labels;\n\n\t\tfor (var i = 0; i < channels; i++) {\n\t\t\tresult[labels[i]] = this.color[i];\n\t\t}\n\n\t\tif (this.valpha !== 1) {\n\t\t\tresult.alpha = this.valpha;\n\t\t}\n\n\t\treturn result;\n\t},\n\n\tunitArray: function () {\n\t\tvar rgb = this.rgb().color;\n\t\trgb[0] /= 255;\n\t\trgb[1] /= 255;\n\t\trgb[2] /= 255;\n\n\t\tif (this.valpha !== 1) {\n\t\t\trgb.push(this.valpha);\n\t\t}\n\n\t\treturn rgb;\n\t},\n\n\tunitObject: function () {\n\t\tvar rgb = this.rgb().object();\n\t\trgb.r /= 255;\n\t\trgb.g /= 255;\n\t\trgb.b /= 255;\n\n\t\tif (this.valpha !== 1) {\n\t\t\trgb.alpha = this.valpha;\n\t\t}\n\n\t\treturn rgb;\n\t},\n\n\tround: function (places) {\n\t\tplaces = Math.max(places || 0, 0);\n\t\treturn new Color(this.color.map(roundToPlace(places)).concat(this.valpha), this.model);\n\t},\n\n\talpha: function (val) {\n\t\tif (arguments.length) {\n\t\t\treturn new Color(this.color.concat(Math.max(0, Math.min(1, val))), this.model);\n\t\t}\n\n\t\treturn this.valpha;\n\t},\n\n\t// rgb\n\tred: getset('rgb', 0, maxfn(255)),\n\tgreen: getset('rgb', 1, maxfn(255)),\n\tblue: getset('rgb', 2, maxfn(255)),\n\n\thue: getset(['hsl', 'hsv', 'hsl', 'hwb', 'hcg'], 0, function (val) { return ((val % 360) + 360) % 360; }), // eslint-disable-line brace-style\n\n\tsaturationl: getset('hsl', 1, maxfn(100)),\n\tlightness: getset('hsl', 2, maxfn(100)),\n\n\tsaturationv: getset('hsv', 1, maxfn(100)),\n\tvalue: getset('hsv', 2, maxfn(100)),\n\n\tchroma: getset('hcg', 1, maxfn(100)),\n\tgray: getset('hcg', 2, maxfn(100)),\n\n\twhite: getset('hwb', 1, maxfn(100)),\n\twblack: getset('hwb', 2, maxfn(100)),\n\n\tcyan: getset('cmyk', 0, maxfn(100)),\n\tmagenta: getset('cmyk', 1, maxfn(100)),\n\tyellow: getset('cmyk', 2, maxfn(100)),\n\tblack: getset('cmyk', 3, maxfn(100)),\n\n\tx: getset('xyz', 0, maxfn(100)),\n\ty: getset('xyz', 1, maxfn(100)),\n\tz: getset('xyz', 2, maxfn(100)),\n\n\tl: getset('lab', 0, maxfn(100)),\n\ta: getset('lab', 1),\n\tb: getset('lab', 2),\n\n\tkeyword: function (val) {\n\t\tif (arguments.length) {\n\t\t\treturn new Color(val);\n\t\t}\n\n\t\treturn convert[this.model].keyword(this.color);\n\t},\n\n\thex: function (val) {\n\t\tif (arguments.length) {\n\t\t\treturn new Color(val);\n\t\t}\n\n\t\treturn colorString.to.hex(this.rgb().round().color);\n\t},\n\n\trgbNumber: function () {\n\t\tvar rgb = this.rgb().color;\n\t\treturn ((rgb[0] & 0xFF) << 16) | ((rgb[1] & 0xFF) << 8) | (rgb[2] & 0xFF);\n\t},\n\n\tluminosity: function () {\n\t\t// http://www.w3.org/TR/WCAG20/#relativeluminancedef\n\t\tvar rgb = this.rgb().color;\n\n\t\tvar lum = [];\n\t\tfor (var i = 0; i < rgb.length; i++) {\n\t\t\tvar chan = rgb[i] / 255;\n\t\t\tlum[i] = (chan <= 0.03928) ? chan / 12.92 : Math.pow(((chan + 0.055) / 1.055), 2.4);\n\t\t}\n\n\t\treturn 0.2126 * lum[0] + 0.7152 * lum[1] + 0.0722 * lum[2];\n\t},\n\n\tcontrast: function (color2) {\n\t\t// http://www.w3.org/TR/WCAG20/#contrast-ratiodef\n\t\tvar lum1 = this.luminosity();\n\t\tvar lum2 = color2.luminosity();\n\n\t\tif (lum1 > lum2) {\n\t\t\treturn (lum1 + 0.05) / (lum2 + 0.05);\n\t\t}\n\n\t\treturn (lum2 + 0.05) / (lum1 + 0.05);\n\t},\n\n\tlevel: function (color2) {\n\t\tvar contrastRatio = this.contrast(color2);\n\t\tif (contrastRatio >= 7.1) {\n\t\t\treturn 'AAA';\n\t\t}\n\n\t\treturn (contrastRatio >= 4.5) ? 'AA' : '';\n\t},\n\n\tisDark: function () {\n\t\t// YIQ equation from http://24ways.org/2010/calculating-color-contrast\n\t\tvar rgb = this.rgb().color;\n\t\tvar yiq = (rgb[0] * 299 + rgb[1] * 587 + rgb[2] * 114) / 1000;\n\t\treturn yiq < 128;\n\t},\n\n\tisLight: function () {\n\t\treturn !this.isDark();\n\t},\n\n\tnegate: function () {\n\t\tvar rgb = this.rgb();\n\t\tfor (var i = 0; i < 3; i++) {\n\t\t\trgb.color[i] = 255 - rgb.color[i];\n\t\t}\n\t\treturn rgb;\n\t},\n\n\tlighten: function (ratio) {\n\t\tvar hsl = this.hsl();\n\t\thsl.color[2] += hsl.color[2] * ratio;\n\t\treturn hsl;\n\t},\n\n\tdarken: function (ratio) {\n\t\tvar hsl = this.hsl();\n\t\thsl.color[2] -= hsl.color[2] * ratio;\n\t\treturn hsl;\n\t},\n\n\tsaturate: function (ratio) {\n\t\tvar hsl = this.hsl();\n\t\thsl.color[1] += hsl.color[1] * ratio;\n\t\treturn hsl;\n\t},\n\n\tdesaturate: function (ratio) {\n\t\tvar hsl = this.hsl();\n\t\thsl.color[1] -= hsl.color[1] * ratio;\n\t\treturn hsl;\n\t},\n\n\twhiten: function (ratio) {\n\t\tvar hwb = this.hwb();\n\t\thwb.color[1] += hwb.color[1] * ratio;\n\t\treturn hwb;\n\t},\n\n\tblacken: function (ratio) {\n\t\tvar hwb = this.hwb();\n\t\thwb.color[2] += hwb.color[2] * ratio;\n\t\treturn hwb;\n\t},\n\n\tgrayscale: function () {\n\t\t// http://en.wikipedia.org/wiki/Grayscale#Converting_color_to_grayscale\n\t\tvar rgb = this.rgb().color;\n\t\tvar val = rgb[0] * 0.3 + rgb[1] * 0.59 + rgb[2] * 0.11;\n\t\treturn Color.rgb(val, val, val);\n\t},\n\n\tfade: function (ratio) {\n\t\treturn this.alpha(this.valpha - (this.valpha * ratio));\n\t},\n\n\topaquer: function (ratio) {\n\t\treturn this.alpha(this.valpha + (this.valpha * ratio));\n\t},\n\n\trotate: function (degrees) {\n\t\tvar hsl = this.hsl();\n\t\tvar hue = hsl.color[0];\n\t\thue = (hue + degrees) % 360;\n\t\thue = hue < 0 ? 360 + hue : hue;\n\t\thsl.color[0] = hue;\n\t\treturn hsl;\n\t},\n\n\tmix: function (mixinColor, weight) {\n\t\t// ported from sass implementation in C\n\t\t// https://github.com/sass/libsass/blob/0e6b4a2850092356aa3ece07c6b249f0221caced/functions.cpp#L209\n\t\tif (!mixinColor || !mixinColor.rgb) {\n\t\t\tthrow new Error('Argument to \"mix\" was not a Color instance, but rather an instance of ' + typeof mixinColor);\n\t\t}\n\t\tvar color1 = mixinColor.rgb();\n\t\tvar color2 = this.rgb();\n\t\tvar p = weight === undefined ? 0.5 : weight;\n\n\t\tvar w = 2 * p - 1;\n\t\tvar a = color1.alpha() - color2.alpha();\n\n\t\tvar w1 = (((w * a === -1) ? w : (w + a) / (1 + w * a)) + 1) / 2.0;\n\t\tvar w2 = 1 - w1;\n\n\t\treturn Color.rgb(\n\t\t\t\tw1 * color1.red() + w2 * color2.red(),\n\t\t\t\tw1 * color1.green() + w2 * color2.green(),\n\t\t\t\tw1 * color1.blue() + w2 * color2.blue(),\n\t\t\t\tcolor1.alpha() * p + color2.alpha() * (1 - p));\n\t}\n};\n\n// model conversion methods and static constructors\nObject.keys(convert).forEach(function (model) {\n\tif (skippedModels.indexOf(model) !== -1) {\n\t\treturn;\n\t}\n\n\tvar channels = convert[model].channels;\n\n\t// conversion methods\n\tColor.prototype[model] = function () {\n\t\tif (this.model === model) {\n\t\t\treturn new Color(this);\n\t\t}\n\n\t\tif (arguments.length) {\n\t\t\treturn new Color(arguments, model);\n\t\t}\n\n\t\tvar newAlpha = typeof arguments[channels] === 'number' ? channels : this.valpha;\n\t\treturn new Color(assertArray(convert[this.model][model].raw(this.color)).concat(newAlpha), model);\n\t};\n\n\t// 'static' construction methods\n\tColor[model] = function (color) {\n\t\tif (typeof color === 'number') {\n\t\t\tcolor = zeroArray(_slice.call(arguments), channels);\n\t\t}\n\t\treturn new Color(color, model);\n\t};\n});\n\nfunction roundTo(num, places) {\n\treturn Number(num.toFixed(places));\n}\n\nfunction roundToPlace(places) {\n\treturn function (num) {\n\t\treturn roundTo(num, places);\n\t};\n}\n\nfunction getset(model, channel, modifier) {\n\tmodel = Array.isArray(model) ? model : [model];\n\n\tmodel.forEach(function (m) {\n\t\t(limiters[m] || (limiters[m] = []))[channel] = modifier;\n\t});\n\n\tmodel = model[0];\n\n\treturn function (val) {\n\t\tvar result;\n\n\t\tif (arguments.length) {\n\t\t\tif (modifier) {\n\t\t\t\tval = modifier(val);\n\t\t\t}\n\n\t\t\tresult = this[model]();\n\t\t\tresult.color[channel] = val;\n\t\t\treturn result;\n\t\t}\n\n\t\tresult = this[model]().color[channel];\n\t\tif (modifier) {\n\t\t\tresult = modifier(result);\n\t\t}\n\n\t\treturn result;\n\t};\n}\n\nfunction maxfn(max) {\n\treturn function (v) {\n\t\treturn Math.max(0, Math.min(max, v));\n\t};\n}\n\nfunction assertArray(val) {\n\treturn Array.isArray(val) ? val : [val];\n}\n\nfunction zeroArray(arr, length) {\n\tfor (var i = 0; i < length; i++) {\n\t\tif (typeof arr[i] !== 'number') {\n\t\t\tarr[i] = 0;\n\t\t}\n\t}\n\n\treturn arr;\n}\n\nmodule.exports = Color;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/color/index.js\n// module id = 16\n// module chunks = 0 1","/* MIT license */\nvar colorNames = require('color-name');\nvar swizzle = require('simple-swizzle');\n\nvar reverseNames = {};\n\n// create a list of reverse color names\nfor (var name in colorNames) {\n\tif (colorNames.hasOwnProperty(name)) {\n\t\treverseNames[colorNames[name]] = name;\n\t}\n}\n\nvar cs = module.exports = {\n\tto: {},\n\tget: {}\n};\n\ncs.get = function (string) {\n\tvar prefix = string.substring(0, 3).toLowerCase();\n\tvar val;\n\tvar model;\n\tswitch (prefix) {\n\t\tcase 'hsl':\n\t\t\tval = cs.get.hsl(string);\n\t\t\tmodel = 'hsl';\n\t\t\tbreak;\n\t\tcase 'hwb':\n\t\t\tval = cs.get.hwb(string);\n\t\t\tmodel = 'hwb';\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tval = cs.get.rgb(string);\n\t\t\tmodel = 'rgb';\n\t\t\tbreak;\n\t}\n\n\tif (!val) {\n\t\treturn null;\n\t}\n\n\treturn {model: model, value: val};\n};\n\ncs.get.rgb = function (string) {\n\tif (!string) {\n\t\treturn null;\n\t}\n\n\tvar abbr = /^#([a-f0-9]{3,4})$/i;\n\tvar hex = /^#([a-f0-9]{6})([a-f0-9]{2})?$/i;\n\tvar rgba = /^rgba?\\(\\s*([+-]?\\d+)\\s*,\\s*([+-]?\\d+)\\s*,\\s*([+-]?\\d+)\\s*(?:,\\s*([+-]?[\\d\\.]+)\\s*)?\\)$/;\n\tvar per = /^rgba?\\(\\s*([+-]?[\\d\\.]+)\\%\\s*,\\s*([+-]?[\\d\\.]+)\\%\\s*,\\s*([+-]?[\\d\\.]+)\\%\\s*(?:,\\s*([+-]?[\\d\\.]+)\\s*)?\\)$/;\n\tvar keyword = /(\\D+)/;\n\n\tvar rgb = [0, 0, 0, 1];\n\tvar match;\n\tvar i;\n\tvar hexAlpha;\n\n\tif (match = string.match(hex)) {\n\t\thexAlpha = match[2];\n\t\tmatch = match[1];\n\n\t\tfor (i = 0; i < 3; i++) {\n\t\t\t// https://jsperf.com/slice-vs-substr-vs-substring-methods-long-string/19\n\t\t\tvar i2 = i * 2;\n\t\t\trgb[i] = parseInt(match.slice(i2, i2 + 2), 16);\n\t\t}\n\n\t\tif (hexAlpha) {\n\t\t\trgb[3] = Math.round((parseInt(hexAlpha, 16) / 255) * 100) / 100;\n\t\t}\n\t} else if (match = string.match(abbr)) {\n\t\tmatch = match[1];\n\t\thexAlpha = match[3];\n\n\t\tfor (i = 0; i < 3; i++) {\n\t\t\trgb[i] = parseInt(match[i] + match[i], 16);\n\t\t}\n\n\t\tif (hexAlpha) {\n\t\t\trgb[3] = Math.round((parseInt(hexAlpha + hexAlpha, 16) / 255) * 100) / 100;\n\t\t}\n\t} else if (match = string.match(rgba)) {\n\t\tfor (i = 0; i < 3; i++) {\n\t\t\trgb[i] = parseInt(match[i + 1], 0);\n\t\t}\n\n\t\tif (match[4]) {\n\t\t\trgb[3] = parseFloat(match[4]);\n\t\t}\n\t} else if (match = string.match(per)) {\n\t\tfor (i = 0; i < 3; i++) {\n\t\t\trgb[i] = Math.round(parseFloat(match[i + 1]) * 2.55);\n\t\t}\n\n\t\tif (match[4]) {\n\t\t\trgb[3] = parseFloat(match[4]);\n\t\t}\n\t} else if (match = string.match(keyword)) {\n\t\tif (match[1] === 'transparent') {\n\t\t\treturn [0, 0, 0, 0];\n\t\t}\n\n\t\trgb = colorNames[match[1]];\n\n\t\tif (!rgb) {\n\t\t\treturn null;\n\t\t}\n\n\t\trgb[3] = 1;\n\n\t\treturn rgb;\n\t} else {\n\t\treturn null;\n\t}\n\n\tfor (i = 0; i < 3; i++) {\n\t\trgb[i] = clamp(rgb[i], 0, 255);\n\t}\n\trgb[3] = clamp(rgb[3], 0, 1);\n\n\treturn rgb;\n};\n\ncs.get.hsl = function (string) {\n\tif (!string) {\n\t\treturn null;\n\t}\n\n\tvar hsl = /^hsla?\\(\\s*([+-]?(?:\\d*\\.)?\\d+)(?:deg)?\\s*,\\s*([+-]?[\\d\\.]+)%\\s*,\\s*([+-]?[\\d\\.]+)%\\s*(?:,\\s*([+-]?[\\d\\.]+)\\s*)?\\)$/;\n\tvar match = string.match(hsl);\n\n\tif (match) {\n\t\tvar alpha = parseFloat(match[4]);\n\t\tvar h = (parseFloat(match[1]) + 360) % 360;\n\t\tvar s = clamp(parseFloat(match[2]), 0, 100);\n\t\tvar l = clamp(parseFloat(match[3]), 0, 100);\n\t\tvar a = clamp(isNaN(alpha) ? 1 : alpha, 0, 1);\n\n\t\treturn [h, s, l, a];\n\t}\n\n\treturn null;\n};\n\ncs.get.hwb = function (string) {\n\tif (!string) {\n\t\treturn null;\n\t}\n\n\tvar hwb = /^hwb\\(\\s*([+-]?\\d*[\\.]?\\d+)(?:deg)?\\s*,\\s*([+-]?[\\d\\.]+)%\\s*,\\s*([+-]?[\\d\\.]+)%\\s*(?:,\\s*([+-]?[\\d\\.]+)\\s*)?\\)$/;\n\tvar match = string.match(hwb);\n\n\tif (match) {\n\t\tvar alpha = parseFloat(match[4]);\n\t\tvar h = ((parseFloat(match[1]) % 360) + 360) % 360;\n\t\tvar w = clamp(parseFloat(match[2]), 0, 100);\n\t\tvar b = clamp(parseFloat(match[3]), 0, 100);\n\t\tvar a = clamp(isNaN(alpha) ? 1 : alpha, 0, 1);\n\t\treturn [h, w, b, a];\n\t}\n\n\treturn null;\n};\n\ncs.to.hex = function () {\n\tvar rgba = swizzle(arguments);\n\n\treturn (\n\t\t'#' +\n\t\thexDouble(rgba[0]) +\n\t\thexDouble(rgba[1]) +\n\t\thexDouble(rgba[2]) +\n\t\t(rgba[3] < 1\n\t\t\t? (hexDouble(Math.round(rgba[3] * 255)))\n\t\t\t: '')\n\t);\n};\n\ncs.to.rgb = function () {\n\tvar rgba = swizzle(arguments);\n\n\treturn rgba.length < 4 || rgba[3] === 1\n\t\t? 'rgb(' + Math.round(rgba[0]) + ', ' + Math.round(rgba[1]) + ', ' + Math.round(rgba[2]) + ')'\n\t\t: 'rgba(' + Math.round(rgba[0]) + ', ' + Math.round(rgba[1]) + ', ' + Math.round(rgba[2]) + ', ' + rgba[3] + ')';\n};\n\ncs.to.rgb.percent = function () {\n\tvar rgba = swizzle(arguments);\n\n\tvar r = Math.round(rgba[0] / 255 * 100);\n\tvar g = Math.round(rgba[1] / 255 * 100);\n\tvar b = Math.round(rgba[2] / 255 * 100);\n\n\treturn rgba.length < 4 || rgba[3] === 1\n\t\t? 'rgb(' + r + '%, ' + g + '%, ' + b + '%)'\n\t\t: 'rgba(' + r + '%, ' + g + '%, ' + b + '%, ' + rgba[3] + ')';\n};\n\ncs.to.hsl = function () {\n\tvar hsla = swizzle(arguments);\n\treturn hsla.length < 4 || hsla[3] === 1\n\t\t? 'hsl(' + hsla[0] + ', ' + hsla[1] + '%, ' + hsla[2] + '%)'\n\t\t: 'hsla(' + hsla[0] + ', ' + hsla[1] + '%, ' + hsla[2] + '%, ' + hsla[3] + ')';\n};\n\n// hwb is a bit different than rgb(a) & hsl(a) since there is no alpha specific syntax\n// (hwb have alpha optional & 1 is default value)\ncs.to.hwb = function () {\n\tvar hwba = swizzle(arguments);\n\n\tvar a = '';\n\tif (hwba.length >= 4 && hwba[3] !== 1) {\n\t\ta = ', ' + hwba[3];\n\t}\n\n\treturn 'hwb(' + hwba[0] + ', ' + hwba[1] + '%, ' + hwba[2] + '%' + a + ')';\n};\n\ncs.to.keyword = function (rgb) {\n\treturn reverseNames[rgb.slice(0, 3)];\n};\n\n// helpers\nfunction clamp(num, min, max) {\n\treturn Math.min(Math.max(min, num), max);\n}\n\nfunction hexDouble(num) {\n\tvar str = num.toString(16).toUpperCase();\n\treturn (str.length < 2) ? '0' + str : str;\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/color-string/index.js\n// module id = 17\n// module chunks = 0 1","'use strict';\n\nvar isArrayish = require('is-arrayish');\n\nvar concat = Array.prototype.concat;\nvar slice = Array.prototype.slice;\n\nvar swizzle = module.exports = function swizzle(args) {\n\tvar results = [];\n\n\tfor (var i = 0, len = args.length; i < len; i++) {\n\t\tvar arg = args[i];\n\n\t\tif (isArrayish(arg)) {\n\t\t\t// http://jsperf.com/javascript-array-concat-vs-push/98\n\t\t\tresults = concat.call(results, slice.call(arg));\n\t\t} else {\n\t\t\tresults.push(arg);\n\t\t}\n\t}\n\n\treturn results;\n};\n\nswizzle.wrap = function (fn) {\n\treturn function () {\n\t\treturn fn(swizzle(arguments));\n\t};\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/simple-swizzle/index.js\n// module id = 18\n// module chunks = 0 1","'use strict';\n\nmodule.exports = function isArrayish(obj) {\n\tif (!obj) {\n\t\treturn false;\n\t}\n\n\treturn obj instanceof Array || Array.isArray(obj) ||\n\t\t(obj.length >= 0 && obj.splice instanceof Function);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/is-arrayish/index.js\n// module id = 19\n// module chunks = 0 1","var conversions = require('./conversions');\nvar route = require('./route');\n\nvar convert = {};\n\nvar models = Object.keys(conversions);\n\nfunction wrapRaw(fn) {\n\tvar wrappedFn = function (args) {\n\t\tif (args === undefined || args === null) {\n\t\t\treturn args;\n\t\t}\n\n\t\tif (arguments.length > 1) {\n\t\t\targs = Array.prototype.slice.call(arguments);\n\t\t}\n\n\t\treturn fn(args);\n\t};\n\n\t// preserve .conversion property if there is one\n\tif ('conversion' in fn) {\n\t\twrappedFn.conversion = fn.conversion;\n\t}\n\n\treturn wrappedFn;\n}\n\nfunction wrapRounded(fn) {\n\tvar wrappedFn = function (args) {\n\t\tif (args === undefined || args === null) {\n\t\t\treturn args;\n\t\t}\n\n\t\tif (arguments.length > 1) {\n\t\t\targs = Array.prototype.slice.call(arguments);\n\t\t}\n\n\t\tvar result = fn(args);\n\n\t\t// we're assuming the result is an array here.\n\t\t// see notice in conversions.js; don't use box types\n\t\t// in conversion functions.\n\t\tif (typeof result === 'object') {\n\t\t\tfor (var len = result.length, i = 0; i < len; i++) {\n\t\t\t\tresult[i] = Math.round(result[i]);\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t};\n\n\t// preserve .conversion property if there is one\n\tif ('conversion' in fn) {\n\t\twrappedFn.conversion = fn.conversion;\n\t}\n\n\treturn wrappedFn;\n}\n\nmodels.forEach(function (fromModel) {\n\tconvert[fromModel] = {};\n\n\tObject.defineProperty(convert[fromModel], 'channels', {value: conversions[fromModel].channels});\n\tObject.defineProperty(convert[fromModel], 'labels', {value: conversions[fromModel].labels});\n\n\tvar routes = route(fromModel);\n\tvar routeModels = Object.keys(routes);\n\n\trouteModels.forEach(function (toModel) {\n\t\tvar fn = routes[toModel];\n\n\t\tconvert[fromModel][toModel] = wrapRounded(fn);\n\t\tconvert[fromModel][toModel].raw = wrapRaw(fn);\n\t});\n});\n\nmodule.exports = convert;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/color-convert/index.js\n// module id = 20\n// module chunks = 0 1","var conversions = require('./conversions');\n\n/*\n\tthis function routes a model to all other models.\n\n\tall functions that are routed have a property `.conversion` attached\n\tto the returned synthetic function. This property is an array\n\tof strings, each with the steps in between the 'from' and 'to'\n\tcolor models (inclusive).\n\n\tconversions that are not possible simply are not included.\n*/\n\nfunction buildGraph() {\n\tvar graph = {};\n\t// https://jsperf.com/object-keys-vs-for-in-with-closure/3\n\tvar models = Object.keys(conversions);\n\n\tfor (var len = models.length, i = 0; i < len; i++) {\n\t\tgraph[models[i]] = {\n\t\t\t// http://jsperf.com/1-vs-infinity\n\t\t\t// micro-opt, but this is simple.\n\t\t\tdistance: -1,\n\t\t\tparent: null\n\t\t};\n\t}\n\n\treturn graph;\n}\n\n// https://en.wikipedia.org/wiki/Breadth-first_search\nfunction deriveBFS(fromModel) {\n\tvar graph = buildGraph();\n\tvar queue = [fromModel]; // unshift -> queue -> pop\n\n\tgraph[fromModel].distance = 0;\n\n\twhile (queue.length) {\n\t\tvar current = queue.pop();\n\t\tvar adjacents = Object.keys(conversions[current]);\n\n\t\tfor (var len = adjacents.length, i = 0; i < len; i++) {\n\t\t\tvar adjacent = adjacents[i];\n\t\t\tvar node = graph[adjacent];\n\n\t\t\tif (node.distance === -1) {\n\t\t\t\tnode.distance = graph[current].distance + 1;\n\t\t\t\tnode.parent = current;\n\t\t\t\tqueue.unshift(adjacent);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn graph;\n}\n\nfunction link(from, to) {\n\treturn function (args) {\n\t\treturn to(from(args));\n\t};\n}\n\nfunction wrapConversion(toModel, graph) {\n\tvar path = [graph[toModel].parent, toModel];\n\tvar fn = conversions[graph[toModel].parent][toModel];\n\n\tvar cur = graph[toModel].parent;\n\twhile (graph[cur].parent) {\n\t\tpath.unshift(graph[cur].parent);\n\t\tfn = link(conversions[graph[cur].parent][cur], fn);\n\t\tcur = graph[cur].parent;\n\t}\n\n\tfn.conversion = path;\n\treturn fn;\n}\n\nmodule.exports = function (fromModel) {\n\tvar graph = deriveBFS(fromModel);\n\tvar conversion = {};\n\n\tvar models = Object.keys(graph);\n\tfor (var len = models.length, i = 0; i < len; i++) {\n\t\tvar toModel = models[i];\n\t\tvar node = graph[toModel];\n\n\t\tif (node.parent === null) {\n\t\t\t// no possible conversion, or this node is the source model.\n\t\t\tcontinue;\n\t\t}\n\n\t\tconversion[toModel] = wrapConversion(toModel, graph);\n\t}\n\n\treturn conversion;\n};\n\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/color-convert/route.js\n// module id = 21\n// module chunks = 0 1","'use strict';\n\nimport $ from 'jquery';\nimport ColorItem from './ColorItem';\n\n/**\n * Handles everything related to the colorpicker color\n * @ignore\n */\nclass ColorHandler {\n /**\n * @param {Colorpicker} colorpicker\n */\n constructor(colorpicker) {\n /**\n * @type {Colorpicker}\n */\n this.colorpicker = colorpicker;\n }\n\n /**\n * @returns {*|String|ColorItem}\n */\n get fallback() {\n return this.colorpicker.options.fallbackColor ?\n this.colorpicker.options.fallbackColor : (this.hasColor() ? this.color : null);\n }\n\n /**\n * @returns {String|null}\n */\n get format() {\n if (this.colorpicker.options.format) {\n return this.colorpicker.options.format;\n }\n\n if (this.hasColor() && this.color.hasTransparency() && this.color.format.match(/^hex/)) {\n return this.isAlphaEnabled() ? 'rgba' : 'hex';\n }\n\n if (this.hasColor()) {\n return this.color.format;\n }\n\n return 'rgb';\n }\n\n /**\n * Internal color getter\n *\n * @type {ColorItem|null}\n */\n get color() {\n return this.colorpicker.element.data('color');\n }\n\n /**\n * Internal color setter\n *\n * @ignore\n * @param {ColorItem|null} value\n */\n set color(value) {\n this.colorpicker.element.data('color', value);\n\n if ((value instanceof ColorItem) && (this.colorpicker.options.format === 'auto')) {\n // If format is 'auto', use the first parsed one from now on\n this.colorpicker.options.format = this.color.format;\n }\n }\n\n bind() {\n // if the color option is set\n if (this.colorpicker.options.color) {\n this.color = this.createColor(this.colorpicker.options.color);\n return;\n }\n\n // if element[color] is empty and the input has a value\n if (!this.color && !!this.colorpicker.inputHandler.getValue()) {\n this.color = this.createColor(\n this.colorpicker.inputHandler.getValue(), this.colorpicker.options.autoInputFallback\n );\n }\n }\n\n unbind() {\n this.colorpicker.element.removeData('color');\n }\n\n /**\n * Returns the color string from the input value or the 'data-color' attribute of the input or element.\n * If empty, it returns the defaultValue parameter.\n *\n * @returns {String|*}\n */\n getColorString() {\n if (!this.hasColor()) {\n return '';\n }\n\n return this.color.string(this.format);\n }\n\n /**\n * Sets the color value\n *\n * @param {String|ColorItem} val\n */\n setColorString(val) {\n let color = val ? this.createColor(val) : null;\n\n this.color = color ? color : null;\n }\n\n /**\n * Creates a new color using the widget instance options (fallbackColor, format).\n *\n * @fires Colorpicker#colorpickerInvalid\n * @param {*} val\n * @param {boolean} fallbackOnInvalid\n * @returns {ColorItem}\n */\n createColor(val, fallbackOnInvalid = true) {\n let color = new ColorItem(this.resolveColorDelegate(val), this.format);\n\n if (!color.isValid()) {\n if (fallbackOnInvalid) {\n color = this.getFallbackColor();\n }\n\n /**\n * (Colorpicker) Fired when the color is invalid and the fallback color is going to be used.\n *\n * @event Colorpicker#colorpickerInvalid\n */\n this.colorpicker.trigger('colorpickerInvalid', color, val);\n }\n\n if (!this.isAlphaEnabled()) {\n // Alpha is disabled\n color.alpha = 1;\n }\n\n return color;\n }\n\n getFallbackColor() {\n if (this.fallback && (this.fallback === this.color)) {\n return this.color;\n }\n\n let fallback = this.resolveColorDelegate(this.fallback);\n let color = new ColorItem(fallback, this.format);\n\n if (!color.isValid()) {\n console.warn('The fallback color is invalid. Falling back to the previous color or black if any.');\n return this.color ? this.color : new ColorItem('#000000', this.format);\n }\n\n return color;\n }\n\n /**\n * @returns {ColorItem}\n */\n assureColor() {\n if (!this.hasColor()) {\n this.color = this.getFallbackColor();\n }\n\n return this.color;\n }\n\n /**\n * Delegates the color resolution to the colorpicker extensions.\n *\n * @param {String|*} color\n * @param {boolean} realColor if true, the color should resolve into a real (not named) color code\n * @returns {ColorItem|String|*|null}\n */\n resolveColorDelegate(color, realColor = true) {\n let extResolvedColor = false;\n\n $.each(this.colorpicker.extensions, function (name, ext) {\n if (extResolvedColor !== false) {\n // skip if resolved\n return;\n }\n extResolvedColor = ext.resolveColor(color, realColor);\n });\n\n return extResolvedColor ? extResolvedColor : color;\n }\n\n /**\n * Checks if there is a color object, that it is valid and it is not a fallback\n * @returns {boolean}\n */\n isInvalidColor() {\n return !this.hasColor() || !this.color.isValid();\n }\n\n /**\n * Returns true if the useAlpha option is exactly true, false otherwise\n * @returns {boolean}\n */\n isAlphaEnabled() {\n return (this.colorpicker.options.useAlpha !== false);\n }\n\n /**\n * Returns true if the current color object is an instance of Color, false otherwise.\n * @returns {boolean}\n */\n hasColor() {\n return this.color instanceof ColorItem;\n }\n}\n\nexport default ColorHandler;\n\n\n\n// WEBPACK FOOTER //\n// ./src/js/ColorHandler.js","'use strict';\n\nimport $ from 'jquery';\n\n/**\n * Handles everything related to the colorpicker UI\n * @ignore\n */\nclass PickerHandler {\n /**\n * @param {Colorpicker} colorpicker\n */\n constructor(colorpicker) {\n /**\n * @type {Colorpicker}\n */\n this.colorpicker = colorpicker;\n /**\n * @type {jQuery}\n */\n this.picker = null;\n }\n\n get options() {\n return this.colorpicker.options;\n }\n\n get color() {\n return this.colorpicker.colorHandler.color;\n }\n\n bind() {\n /**\n * @type {jQuery|HTMLElement}\n */\n let picker = this.picker = $(this.options.template);\n\n if (this.options.customClass) {\n picker.addClass(this.options.customClass);\n }\n\n if (this.options.horizontal) {\n picker.addClass('colorpicker-horizontal');\n }\n\n if (this._supportsAlphaBar()) {\n this.options.useAlpha = true;\n picker.addClass('colorpicker-with-alpha');\n } else {\n this.options.useAlpha = false;\n }\n }\n\n attach() {\n // Inject the colorpicker element into the DOM\n let pickerParent = this.colorpicker.container ? this.colorpicker.container : null;\n\n if (pickerParent) {\n this.picker.appendTo(pickerParent);\n }\n }\n\n unbind() {\n this.picker.remove();\n }\n\n _supportsAlphaBar() {\n return (\n (this.options.useAlpha || (this.colorpicker.colorHandler.hasColor() && this.color.hasTransparency())) &&\n (this.options.useAlpha !== false) &&\n (!this.options.format || (this.options.format && !this.options.format.match(/^hex([36])?$/i)))\n );\n }\n\n /**\n * Changes the color adjustment bars using the current color object information.\n */\n update() {\n if (!this.colorpicker.colorHandler.hasColor()) {\n return;\n }\n\n let vertical = (this.options.horizontal !== true),\n slider = vertical ? this.options.sliders : this.options.slidersHorz;\n\n let saturationGuide = this.picker.find('.colorpicker-saturation .colorpicker-guide'),\n hueGuide = this.picker.find('.colorpicker-hue .colorpicker-guide'),\n alphaGuide = this.picker.find('.colorpicker-alpha .colorpicker-guide');\n\n let hsva = this.color.toHsvaRatio();\n\n // Set guides position\n if (hueGuide.length) {\n hueGuide.css(vertical ? 'top' : 'left', (vertical ? slider.hue.maxTop : slider.hue.maxLeft) * (1 - hsva.h));\n }\n if (alphaGuide.length) {\n alphaGuide.css(vertical ? 'top' : 'left', (vertical ? slider.alpha.maxTop : slider.alpha.maxLeft) * (1 - hsva.a));\n }\n if (saturationGuide.length) {\n saturationGuide.css({\n 'top': slider.saturation.maxTop - hsva.v * slider.saturation.maxTop,\n 'left': hsva.s * slider.saturation.maxLeft\n });\n }\n\n // Set saturation hue background\n this.picker.find('.colorpicker-saturation')\n .css('backgroundColor', this.color.getCloneHueOnly().toHexString()); // we only need hue\n\n // Set alpha color gradient\n let hexColor = this.color.toHexString();\n let alphaBg = '';\n\n if (this.options.horizontal) {\n alphaBg = `linear-gradient(to right, ${hexColor} 0%, transparent 100%)`;\n } else {\n alphaBg = `linear-gradient(to bottom, ${hexColor} 0%, transparent 100%)`;\n }\n\n this.picker.find('.colorpicker-alpha-color').css('background', alphaBg);\n }\n}\n\nexport default PickerHandler;\n\n\n\n// WEBPACK FOOTER //\n// ./src/js/PickerHandler.js","'use strict';\n\n/**\n * Handles everything related to the colorpicker addon\n * @ignore\n */\nclass AddonHandler {\n /**\n * @param {Colorpicker} colorpicker\n */\n constructor(colorpicker) {\n /**\n * @type {Colorpicker}\n */\n this.colorpicker = colorpicker;\n /**\n * @type {jQuery}\n */\n this.addon = null;\n }\n\n hasAddon() {\n return !!this.addon;\n }\n\n bind() {\n /**\n * @type {*|jQuery}\n */\n this.addon = this.colorpicker.options.addon ?\n this.colorpicker.element.find(this.colorpicker.options.addon) : null;\n\n if (this.addon && (this.addon.length === 0)) {\n // not found\n this.addon = null;\n }\n }\n\n unbind() {\n if (this.hasAddon()) {\n this.addon.off('.colorpicker');\n }\n }\n\n /**\n * If the addon element is present, its background color is updated\n */\n update() {\n if (!this.colorpicker.colorHandler.hasColor() || !this.hasAddon()) {\n return;\n }\n\n let colorStr = this.colorpicker.colorHandler.getColorString();\n let styles = {'background': colorStr};\n\n let icn = this.addon.find('i').eq(0);\n\n if (icn.length > 0) {\n icn.css(styles);\n } else {\n this.addon.css(styles);\n }\n }\n}\n\nexport default AddonHandler;\n\n\n\n// WEBPACK FOOTER //\n// ./src/js/AddonHandler.js"],"sourceRoot":""} \ No newline at end of file diff --git a/vendor/bootstrap-showpassword/bootstrap-show-password.esm.js b/vendor/bootstrap-showpassword/bootstrap-show-password.esm.js new file mode 100644 index 00000000..bfab10f9 --- /dev/null +++ b/vendor/bootstrap-showpassword/bootstrap-show-password.esm.js @@ -0,0 +1,1399 @@ +var toString = {}.toString; + +var classofRaw = function (it) { + return toString.call(it).slice(8, -1); +}; + +// `IsArray` abstract operation +// https://tc39.github.io/ecma262/#sec-isarray +var isArray = Array.isArray || function isArray(arg) { + return classofRaw(arg) == 'Array'; +}; + +var isObject = function (it) { + return typeof it === 'object' ? it !== null : typeof it === 'function'; +}; + +// `RequireObjectCoercible` abstract operation +// https://tc39.github.io/ecma262/#sec-requireobjectcoercible +var requireObjectCoercible = function (it) { + if (it == undefined) throw TypeError("Can't call method on " + it); + return it; +}; + +// `ToObject` abstract operation +// https://tc39.github.io/ecma262/#sec-toobject +var toObject = function (argument) { + return Object(requireObjectCoercible(argument)); +}; + +var ceil = Math.ceil; +var floor = Math.floor; + +// `ToInteger` abstract operation +// https://tc39.github.io/ecma262/#sec-tointeger +var toInteger = function (argument) { + return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument); +}; + +var min = Math.min; + +// `ToLength` abstract operation +// https://tc39.github.io/ecma262/#sec-tolength +var toLength = function (argument) { + return argument > 0 ? min(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991 +}; + +// 7.1.1 ToPrimitive(input [, PreferredType]) + +// instead of the ES6 spec version, we didn't implement @@toPrimitive case +// and the second argument - flag - preferred type is a string +var toPrimitive = function (it, S) { + if (!isObject(it)) return it; + var fn, val; + if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; + if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val; + if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; + throw TypeError("Can't convert object to primitive value"); +}; + +var fails = function (exec) { + try { + return !!exec(); + } catch (error) { + return true; + } +}; + +// Thank's IE8 for his funny defineProperty +var descriptors = !fails(function () { + return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7; +}); + +// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 +var global = typeof window == 'object' && window && window.Math == Math ? window + : typeof self == 'object' && self && self.Math == Math ? self + // eslint-disable-next-line no-new-func + : Function('return this')(); + +var document = global.document; +// typeof document.createElement is 'object' in old IE +var exist = isObject(document) && isObject(document.createElement); + +var documentCreateElement = function (it) { + return exist ? document.createElement(it) : {}; +}; + +// Thank's IE8 for his funny defineProperty +var ie8DomDefine = !descriptors && !fails(function () { + return Object.defineProperty(documentCreateElement('div'), 'a', { + get: function () { return 7; } + }).a != 7; +}); + +var anObject = function (it) { + if (!isObject(it)) { + throw TypeError(String(it) + ' is not an object'); + } return it; +}; + +var nativeDefineProperty = Object.defineProperty; + +var f = descriptors ? nativeDefineProperty : function defineProperty(O, P, Attributes) { + anObject(O); + P = toPrimitive(P, true); + anObject(Attributes); + if (ie8DomDefine) try { + return nativeDefineProperty(O, P, Attributes); + } catch (error) { /* empty */ } + if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported'); + if ('value' in Attributes) O[P] = Attributes.value; + return O; +}; + +var objectDefineProperty = { + f: f +}; + +var createPropertyDescriptor = function (bitmap, value) { + return { + enumerable: !(bitmap & 1), + configurable: !(bitmap & 2), + writable: !(bitmap & 4), + value: value + }; +}; + +var createProperty = function (object, key, value) { + var propertyKey = toPrimitive(key); + if (propertyKey in object) objectDefineProperty.f(object, propertyKey, createPropertyDescriptor(0, value)); + else object[propertyKey] = value; +}; + +function createCommonjsModule(fn, module) { + return module = { exports: {} }, fn(module, module.exports), module.exports; +} + +var hide = descriptors ? function (object, key, value) { + return objectDefineProperty.f(object, key, createPropertyDescriptor(1, value)); +} : function (object, key, value) { + object[key] = value; + return object; +}; + +var setGlobal = function (key, value) { + try { + hide(global, key, value); + } catch (error) { + global[key] = value; + } return value; +}; + +var shared = createCommonjsModule(function (module) { +var SHARED = '__core-js_shared__'; +var store = global[SHARED] || setGlobal(SHARED, {}); + +(module.exports = function (key, value) { + return store[key] || (store[key] = value !== undefined ? value : {}); +})('versions', []).push({ + version: '3.0.1', + mode: 'global', + copyright: '© 2019 Denis Pushkarev (zloirock.ru)' +}); +}); + +var id = 0; +var postfix = Math.random(); + +var uid = function (key) { + return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + postfix).toString(36)); +}; + +// Chrome 38 Symbol has incorrect toString conversion +var nativeSymbol = !fails(function () { + // eslint-disable-next-line no-undef + return !String(Symbol()); +}); + +var store = shared('wks'); + +var Symbol$1 = global.Symbol; + + +var wellKnownSymbol = function (name) { + return store[name] || (store[name] = nativeSymbol && Symbol$1[name] + || (nativeSymbol ? Symbol$1 : uid)('Symbol.' + name)); +}; + +var SPECIES = wellKnownSymbol('species'); + +// `ArraySpeciesCreate` abstract operation +// https://tc39.github.io/ecma262/#sec-arrayspeciescreate +var arraySpeciesCreate = function (originalArray, length) { + var C; + if (isArray(originalArray)) { + C = originalArray.constructor; + // cross-realm fallback + if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined; + else if (isObject(C)) { + C = C[SPECIES]; + if (C === null) C = undefined; + } + } return new (C === undefined ? Array : C)(length === 0 ? 0 : length); +}; + +var SPECIES$1 = wellKnownSymbol('species'); + +var arrayMethodHasSpeciesSupport = function (METHOD_NAME) { + return !fails(function () { + var array = []; + var constructor = array.constructor = {}; + constructor[SPECIES$1] = function () { + return { foo: 1 }; + }; + return array[METHOD_NAME](Boolean).foo !== 1; + }); +}; + +var nativePropertyIsEnumerable = {}.propertyIsEnumerable; +var nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; + +// Nashorn ~ JDK8 bug +var NASHORN_BUG = nativeGetOwnPropertyDescriptor && !nativePropertyIsEnumerable.call({ 1: 2 }, 1); + +var f$1 = NASHORN_BUG ? function propertyIsEnumerable(V) { + var descriptor = nativeGetOwnPropertyDescriptor(this, V); + return !!descriptor && descriptor.enumerable; +} : nativePropertyIsEnumerable; + +var objectPropertyIsEnumerable = { + f: f$1 +}; + +// fallback for non-array-like ES3 and non-enumerable old V8 strings + + +var split = ''.split; + +var indexedObject = fails(function () { + // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346 + // eslint-disable-next-line no-prototype-builtins + return !Object('z').propertyIsEnumerable(0); +}) ? function (it) { + return classofRaw(it) == 'String' ? split.call(it, '') : Object(it); +} : Object; + +// toObject with fallback for non-array-like ES3 strings + + + +var toIndexedObject = function (it) { + return indexedObject(requireObjectCoercible(it)); +}; + +var hasOwnProperty = {}.hasOwnProperty; + +var has = function (it, key) { + return hasOwnProperty.call(it, key); +}; + +var nativeGetOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor; + +var f$2 = descriptors ? nativeGetOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) { + O = toIndexedObject(O); + P = toPrimitive(P, true); + if (ie8DomDefine) try { + return nativeGetOwnPropertyDescriptor$1(O, P); + } catch (error) { /* empty */ } + if (has(O, P)) return createPropertyDescriptor(!objectPropertyIsEnumerable.f.call(O, P), O[P]); +}; + +var objectGetOwnPropertyDescriptor = { + f: f$2 +}; + +var functionToString = shared('native-function-to-string', Function.toString); + +var WeakMap = global.WeakMap; + +var nativeWeakMap = typeof WeakMap === 'function' && /native code/.test(functionToString.call(WeakMap)); + +var shared$1 = shared('keys'); + + +var sharedKey = function (key) { + return shared$1[key] || (shared$1[key] = uid(key)); +}; + +var hiddenKeys = {}; + +var WeakMap$1 = global.WeakMap; +var set, get, has$1; + +var enforce = function (it) { + return has$1(it) ? get(it) : set(it, {}); +}; + +var getterFor = function (TYPE) { + return function (it) { + var state; + if (!isObject(it) || (state = get(it)).type !== TYPE) { + throw TypeError('Incompatible receiver, ' + TYPE + ' required'); + } return state; + }; +}; + +if (nativeWeakMap) { + var store$1 = new WeakMap$1(); + var wmget = store$1.get; + var wmhas = store$1.has; + var wmset = store$1.set; + set = function (it, metadata) { + wmset.call(store$1, it, metadata); + return metadata; + }; + get = function (it) { + return wmget.call(store$1, it) || {}; + }; + has$1 = function (it) { + return wmhas.call(store$1, it); + }; +} else { + var STATE = sharedKey('state'); + hiddenKeys[STATE] = true; + set = function (it, metadata) { + hide(it, STATE, metadata); + return metadata; + }; + get = function (it) { + return has(it, STATE) ? it[STATE] : {}; + }; + has$1 = function (it) { + return has(it, STATE); + }; +} + +var internalState = { + set: set, + get: get, + has: has$1, + enforce: enforce, + getterFor: getterFor +}; + +var redefine = createCommonjsModule(function (module) { +var getInternalState = internalState.get; +var enforceInternalState = internalState.enforce; +var TEMPLATE = String(functionToString).split('toString'); + +shared('inspectSource', function (it) { + return functionToString.call(it); +}); + +(module.exports = function (O, key, value, options) { + var unsafe = options ? !!options.unsafe : false; + var simple = options ? !!options.enumerable : false; + var noTargetGet = options ? !!options.noTargetGet : false; + if (typeof value == 'function') { + if (typeof key == 'string' && !has(value, 'name')) hide(value, 'name', key); + enforceInternalState(value).source = TEMPLATE.join(typeof key == 'string' ? key : ''); + } + if (O === global) { + if (simple) O[key] = value; + else setGlobal(key, value); + return; + } else if (!unsafe) { + delete O[key]; + } else if (!noTargetGet && O[key]) { + simple = true; + } + if (simple) O[key] = value; + else hide(O, key, value); +// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative +})(Function.prototype, 'toString', function toString() { + return typeof this == 'function' && getInternalState(this).source || functionToString.call(this); +}); +}); + +var max = Math.max; +var min$1 = Math.min; + +// Helper for a popular repeating case of the spec: +// Let integer be ? ToInteger(index). +// If integer < 0, let result be max((length + integer), 0); else let result be min(length, length). +var toAbsoluteIndex = function (index, length) { + var integer = toInteger(index); + return integer < 0 ? max(integer + length, 0) : min$1(integer, length); +}; + +// `Array.prototype.{ indexOf, includes }` methods implementation +// false -> Array#indexOf +// https://tc39.github.io/ecma262/#sec-array.prototype.indexof +// true -> Array#includes +// https://tc39.github.io/ecma262/#sec-array.prototype.includes +var arrayIncludes = function (IS_INCLUDES) { + return function ($this, el, fromIndex) { + var O = toIndexedObject($this); + var length = toLength(O.length); + var index = toAbsoluteIndex(fromIndex, length); + var value; + // Array#includes uses SameValueZero equality algorithm + // eslint-disable-next-line no-self-compare + if (IS_INCLUDES && el != el) while (length > index) { + value = O[index++]; + // eslint-disable-next-line no-self-compare + if (value != value) return true; + // Array#indexOf ignores holes, Array#includes - not + } else for (;length > index; index++) if (IS_INCLUDES || index in O) { + if (O[index] === el) return IS_INCLUDES || index || 0; + } return !IS_INCLUDES && -1; + }; +}; + +var arrayIndexOf = arrayIncludes(false); + + +var objectKeysInternal = function (object, names) { + var O = toIndexedObject(object); + var i = 0; + var result = []; + var key; + for (key in O) !has(hiddenKeys, key) && has(O, key) && result.push(key); + // Don't enum bug & hidden keys + while (names.length > i) if (has(O, key = names[i++])) { + ~arrayIndexOf(result, key) || result.push(key); + } + return result; +}; + +// IE8- don't enum bug keys +var enumBugKeys = [ + 'constructor', + 'hasOwnProperty', + 'isPrototypeOf', + 'propertyIsEnumerable', + 'toLocaleString', + 'toString', + 'valueOf' +]; + +// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O) + +var hiddenKeys$1 = enumBugKeys.concat('length', 'prototype'); + +var f$3 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { + return objectKeysInternal(O, hiddenKeys$1); +}; + +var objectGetOwnPropertyNames = { + f: f$3 +}; + +var f$4 = Object.getOwnPropertySymbols; + +var objectGetOwnPropertySymbols = { + f: f$4 +}; + +var Reflect = global.Reflect; + +// all object keys, includes non-enumerable and symbols +var ownKeys = Reflect && Reflect.ownKeys || function ownKeys(it) { + var keys = objectGetOwnPropertyNames.f(anObject(it)); + var getOwnPropertySymbols = objectGetOwnPropertySymbols.f; + return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys; +}; + +var copyConstructorProperties = function (target, source) { + var keys = ownKeys(source); + var defineProperty = objectDefineProperty.f; + var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f; + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + if (!has(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key)); + } +}; + +var replacement = /#|\.prototype\./; + +var isForced = function (feature, detection) { + var value = data[normalize(feature)]; + return value == POLYFILL ? true + : value == NATIVE ? false + : typeof detection == 'function' ? fails(detection) + : !!detection; +}; + +var normalize = isForced.normalize = function (string) { + return String(string).replace(replacement, '.').toLowerCase(); +}; + +var data = isForced.data = {}; +var NATIVE = isForced.NATIVE = 'N'; +var POLYFILL = isForced.POLYFILL = 'P'; + +var isForced_1 = isForced; + +var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f; + + + + + + +/* + options.target - name of the target object + options.global - target is the global object + options.stat - export as static methods of target + options.proto - export as prototype methods of target + options.real - real prototype method for the `pure` version + options.forced - export even if the native feature is available + options.bind - bind methods to the target, required for the `pure` version + options.wrap - wrap constructors to preventing global pollution, required for the `pure` version + options.unsafe - use the simple assignment of property instead of delete + defineProperty + options.sham - add a flag to not completely full polyfills + options.enumerable - export as enumerable property + options.noTargetGet - prevent calling a getter on target +*/ +var _export = function (options, source) { + var TARGET = options.target; + var GLOBAL = options.global; + var STATIC = options.stat; + var FORCED, target, key, targetProperty, sourceProperty, descriptor; + if (GLOBAL) { + target = global; + } else if (STATIC) { + target = global[TARGET] || setGlobal(TARGET, {}); + } else { + target = (global[TARGET] || {}).prototype; + } + if (target) for (key in source) { + sourceProperty = source[key]; + if (options.noTargetGet) { + descriptor = getOwnPropertyDescriptor(target, key); + targetProperty = descriptor && descriptor.value; + } else targetProperty = target[key]; + FORCED = isForced_1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced); + // contained in target + if (!FORCED && targetProperty !== undefined) { + if (typeof sourceProperty === typeof targetProperty) continue; + copyConstructorProperties(sourceProperty, targetProperty); + } + // add a flag to not completely full polyfills + if (options.sham || (targetProperty && targetProperty.sham)) { + hide(sourceProperty, 'sham', true); + } + // extend global + redefine(target, key, sourceProperty, options); + } +}; + +var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable'); +var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; +var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded'; + +var IS_CONCAT_SPREADABLE_SUPPORT = !fails(function () { + var array = []; + array[IS_CONCAT_SPREADABLE] = false; + return array.concat()[0] !== array; +}); + +var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat'); + +var isConcatSpreadable = function (O) { + if (!isObject(O)) return false; + var spreadable = O[IS_CONCAT_SPREADABLE]; + return spreadable !== undefined ? !!spreadable : isArray(O); +}; + +var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT; + +// `Array.prototype.concat` method +// https://tc39.github.io/ecma262/#sec-array.prototype.concat +// with adding support of @@isConcatSpreadable and @@species +_export({ target: 'Array', proto: true, forced: FORCED }, { + concat: function concat(arg) { // eslint-disable-line no-unused-vars + var O = toObject(this); + var A = arraySpeciesCreate(O, 0); + var n = 0; + var i, k, length, len, E; + for (i = -1, length = arguments.length; i < length; i++) { + E = i === -1 ? O : arguments[i]; + if (isConcatSpreadable(E)) { + len = toLength(E.length); + if (n + len > MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED); + for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]); + } else { + if (n >= MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED); + createProperty(A, n++, E); + } + } + A.length = n; + return A; + } +}); + +var aFunction = function (it) { + if (typeof it != 'function') { + throw TypeError(String(it) + ' is not a function'); + } return it; +}; + +// optional / simple context binding +var bindContext = function (fn, that, length) { + aFunction(fn); + if (that === undefined) return fn; + switch (length) { + case 0: return function () { + return fn.call(that); + }; + case 1: return function (a) { + return fn.call(that, a); + }; + case 2: return function (a, b) { + return fn.call(that, a, b); + }; + case 3: return function (a, b, c) { + return fn.call(that, a, b, c); + }; + } + return function (/* ...args */) { + return fn.apply(that, arguments); + }; +}; + +// `Array.prototype.{ forEach, map, filter, some, every, find, findIndex }` methods implementation +// 0 -> Array#forEach +// https://tc39.github.io/ecma262/#sec-array.prototype.foreach +// 1 -> Array#map +// https://tc39.github.io/ecma262/#sec-array.prototype.map +// 2 -> Array#filter +// https://tc39.github.io/ecma262/#sec-array.prototype.filter +// 3 -> Array#some +// https://tc39.github.io/ecma262/#sec-array.prototype.some +// 4 -> Array#every +// https://tc39.github.io/ecma262/#sec-array.prototype.every +// 5 -> Array#find +// https://tc39.github.io/ecma262/#sec-array.prototype.find +// 6 -> Array#findIndex +// https://tc39.github.io/ecma262/#sec-array.prototype.findIndex +var arrayMethods = function (TYPE, specificCreate) { + var IS_MAP = TYPE == 1; + var IS_FILTER = TYPE == 2; + var IS_SOME = TYPE == 3; + var IS_EVERY = TYPE == 4; + var IS_FIND_INDEX = TYPE == 6; + var NO_HOLES = TYPE == 5 || IS_FIND_INDEX; + var create = specificCreate || arraySpeciesCreate; + return function ($this, callbackfn, that) { + var O = toObject($this); + var self = indexedObject(O); + var boundFunction = bindContext(callbackfn, that, 3); + var length = toLength(self.length); + var index = 0; + var target = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined; + var value, result; + for (;length > index; index++) if (NO_HOLES || index in self) { + value = self[index]; + result = boundFunction(value, index, O); + if (TYPE) { + if (IS_MAP) target[index] = result; // map + else if (result) switch (TYPE) { + case 3: return true; // some + case 5: return value; // find + case 6: return index; // findIndex + case 2: target.push(value); // filter + } else if (IS_EVERY) return false; // every + } + } + return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target; + }; +}; + +// 19.1.2.14 / 15.2.3.14 Object.keys(O) + + + +var objectKeys = Object.keys || function keys(O) { + return objectKeysInternal(O, enumBugKeys); +}; + +var objectDefineProperties = descriptors ? Object.defineProperties : function defineProperties(O, Properties) { + anObject(O); + var keys = objectKeys(Properties); + var length = keys.length; + var i = 0; + var key; + while (length > i) objectDefineProperty.f(O, key = keys[i++], Properties[key]); + return O; +}; + +var document$1 = global.document; + +var html = document$1 && document$1.documentElement; + +// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) + + + + + +var IE_PROTO = sharedKey('IE_PROTO'); +var PROTOTYPE = 'prototype'; +var Empty = function () { /* empty */ }; + +// Create object with fake `null` prototype: use iframe Object with cleared prototype +var createDict = function () { + // Thrash, waste and sodomy: IE GC bug + var iframe = documentCreateElement('iframe'); + var length = enumBugKeys.length; + var lt = '<'; + var script = 'script'; + var gt = '>'; + var js = 'java' + script + ':'; + var iframeDocument; + iframe.style.display = 'none'; + html.appendChild(iframe); + iframe.src = String(js); + iframeDocument = iframe.contentWindow.document; + iframeDocument.open(); + iframeDocument.write(lt + script + gt + 'document.F=Object' + lt + '/' + script + gt); + iframeDocument.close(); + createDict = iframeDocument.F; + while (length--) delete createDict[PROTOTYPE][enumBugKeys[length]]; + return createDict(); +}; + +var objectCreate = Object.create || function create(O, Properties) { + var result; + if (O !== null) { + Empty[PROTOTYPE] = anObject(O); + result = new Empty(); + Empty[PROTOTYPE] = null; + // add "__proto__" for Object.getPrototypeOf polyfill + result[IE_PROTO] = O; + } else result = createDict(); + return Properties === undefined ? result : objectDefineProperties(result, Properties); +}; + +hiddenKeys[IE_PROTO] = true; + +var UNSCOPABLES = wellKnownSymbol('unscopables'); + + +var ArrayPrototype = Array.prototype; + +// Array.prototype[@@unscopables] +// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables +if (ArrayPrototype[UNSCOPABLES] == undefined) { + hide(ArrayPrototype, UNSCOPABLES, objectCreate(null)); +} + +// add a key to Array.prototype[@@unscopables] +var addToUnscopables = function (key) { + ArrayPrototype[UNSCOPABLES][key] = true; +}; + +var internalFind = arrayMethods(5); +var FIND = 'find'; +var SKIPS_HOLES = true; + +// Shouldn't skip holes +if (FIND in []) Array(1)[FIND](function () { SKIPS_HOLES = false; }); + +// `Array.prototype.find` method +// https://tc39.github.io/ecma262/#sec-array.prototype.find +_export({ target: 'Array', proto: true, forced: SKIPS_HOLES }, { + find: function find(callbackfn /* , that = undefined */) { + return internalFind(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); + } +}); + +// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables +addToUnscopables(FIND); + +var sloppyArrayMethod = function (METHOD_NAME, argument) { + var method = [][METHOD_NAME]; + return !method || !fails(function () { + // eslint-disable-next-line no-useless-call,no-throw-literal + method.call(null, argument || function () { throw 1; }, 1); + }); +}; + +var nativeJoin = [].join; + +var ES3_STRINGS = indexedObject != Object; +var SLOPPY_METHOD = sloppyArrayMethod('join', ','); + +// `Array.prototype.join` method +// https://tc39.github.io/ecma262/#sec-array.prototype.join +_export({ target: 'Array', proto: true, forced: ES3_STRINGS || SLOPPY_METHOD }, { + join: function join(separator) { + return nativeJoin.call(toIndexedObject(this), separator === undefined ? ',' : separator); + } +}); + +// a string of all valid unicode whitespaces +// eslint-disable-next-line max-len +var whitespaces = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'; + +var whitespace = '[' + whitespaces + ']'; +var ltrim = RegExp('^' + whitespace + whitespace + '*'); +var rtrim = RegExp(whitespace + whitespace + '*$'); + +// 1 -> String#trimStart +// 2 -> String#trimEnd +// 3 -> String#trim +var stringTrim = function (string, TYPE) { + string = String(requireObjectCoercible(string)); + if (TYPE & 1) string = string.replace(ltrim, ''); + if (TYPE & 2) string = string.replace(rtrim, ''); + return string; +}; + +var nativeParseInt = global.parseInt; + + +var hex = /^[-+]?0[xX]/; +var FORCED$1 = nativeParseInt(whitespaces + '08') !== 8 || nativeParseInt(whitespaces + '0x16') !== 22; + +var _parseInt = FORCED$1 ? function parseInt(str, radix) { + var string = stringTrim(String(str), 3); + return nativeParseInt(string, (radix >>> 0) || (hex.test(string) ? 16 : 10)); +} : nativeParseInt; + +// `parseInt` method +// https://tc39.github.io/ecma262/#sec-parseint-string-radix +_export({ global: true, forced: parseInt != _parseInt }, { + parseInt: _parseInt +}); + +// `RegExp.prototype.flags` getter implementation +// https://tc39.github.io/ecma262/#sec-get-regexp.prototype.flags +var regexpFlags = function () { + var that = anObject(this); + var result = ''; + if (that.global) result += 'g'; + if (that.ignoreCase) result += 'i'; + if (that.multiline) result += 'm'; + if (that.unicode) result += 'u'; + if (that.sticky) result += 'y'; + return result; +}; + +var nativeExec = RegExp.prototype.exec; +// This always refers to the native implementation, because the +// String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js, +// which loads this file before patching the method. +var nativeReplace = String.prototype.replace; + +var patchedExec = nativeExec; + +var UPDATES_LAST_INDEX_WRONG = (function () { + var re1 = /a/; + var re2 = /b*/g; + nativeExec.call(re1, 'a'); + nativeExec.call(re2, 'a'); + return re1.lastIndex !== 0 || re2.lastIndex !== 0; +})(); + +// nonparticipating capturing group, copied from es5-shim's String#split patch. +var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined; + +var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED; + +if (PATCH) { + patchedExec = function exec(str) { + var re = this; + var lastIndex, reCopy, match, i; + + if (NPCG_INCLUDED) { + reCopy = new RegExp('^' + re.source + '$(?!\\s)', regexpFlags.call(re)); + } + if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex; + + match = nativeExec.call(re, str); + + if (UPDATES_LAST_INDEX_WRONG && match) { + re.lastIndex = re.global ? match.index + match[0].length : lastIndex; + } + if (NPCG_INCLUDED && match && match.length > 1) { + // Fix browsers whose `exec` methods don't consistently return `undefined` + // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/ + nativeReplace.call(match[0], reCopy, function () { + for (i = 1; i < arguments.length - 2; i++) { + if (arguments[i] === undefined) match[i] = undefined; + } + }); + } + + return match; + }; +} + +var regexpExec = patchedExec; + +_export({ target: 'RegExp', proto: true, forced: /./.exec !== regexpExec }, { + exec: regexpExec +}); + +// CONVERT_TO_STRING: true -> String#at +// CONVERT_TO_STRING: false -> String#codePointAt +var stringAt = function (that, pos, CONVERT_TO_STRING) { + var S = String(requireObjectCoercible(that)); + var position = toInteger(pos); + var size = S.length; + var first, second; + if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined; + first = S.charCodeAt(position); + return first < 0xD800 || first > 0xDBFF || position + 1 === size + || (second = S.charCodeAt(position + 1)) < 0xDC00 || second > 0xDFFF + ? CONVERT_TO_STRING ? S.charAt(position) : first + : CONVERT_TO_STRING ? S.slice(position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000; +}; + +// `AdvanceStringIndex` abstract operation +// https://tc39.github.io/ecma262/#sec-advancestringindex +var advanceStringIndex = function (S, index, unicode) { + return index + (unicode ? stringAt(S, index, true).length : 1); +}; + +// `RegExpExec` abstract operation +// https://tc39.github.io/ecma262/#sec-regexpexec +var regexpExecAbstract = function (R, S) { + var exec = R.exec; + if (typeof exec === 'function') { + var result = exec.call(R, S); + if (typeof result !== 'object') { + throw TypeError('RegExp exec method returned something other than an Object or null'); + } + return result; + } + + if (classofRaw(R) !== 'RegExp') { + throw TypeError('RegExp#exec called on incompatible receiver'); + } + + return regexpExec.call(R, S); +}; + +var SPECIES$2 = wellKnownSymbol('species'); + +var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () { + // #replace needs built-in support for named groups. + // #match works fine because it just return the exec results, even if it has + // a "grops" property. + var re = /./; + re.exec = function () { + var result = []; + result.groups = { a: '7' }; + return result; + }; + return ''.replace(re, '$') !== '7'; +}); + +// Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec +// Weex JS has frozen built-in prototypes, so use try / catch wrapper +var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () { + var re = /(?:)/; + var originalExec = re.exec; + re.exec = function () { return originalExec.apply(this, arguments); }; + var result = 'ab'.split(re); + return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b'; +}); + +var fixRegexpWellKnownSymbolLogic = function (KEY, length, exec, sham) { + var SYMBOL = wellKnownSymbol(KEY); + + var DELEGATES_TO_SYMBOL = !fails(function () { + // String methods call symbol-named RegEp methods + var O = {}; + O[SYMBOL] = function () { return 7; }; + return ''[KEY](O) != 7; + }); + + var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails(function () { + // Symbol-named RegExp methods call .exec + var execCalled = false; + var re = /a/; + re.exec = function () { execCalled = true; return null; }; + + if (KEY === 'split') { + // RegExp[@@split] doesn't call the regex's exec method, but first creates + // a new one. We need to return the patched regex when creating the new one. + re.constructor = {}; + re.constructor[SPECIES$2] = function () { return re; }; + } + + re[SYMBOL](''); + return !execCalled; + }); + + if ( + !DELEGATES_TO_SYMBOL || + !DELEGATES_TO_EXEC || + (KEY === 'replace' && !REPLACE_SUPPORTS_NAMED_GROUPS) || + (KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC) + ) { + var nativeRegExpMethod = /./[SYMBOL]; + var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) { + if (regexp.exec === regexpExec) { + if (DELEGATES_TO_SYMBOL && !forceStringMethod) { + // The native String method already delegates to @@method (this + // polyfilled function), leasing to infinite recursion. + // We avoid it by directly calling the native @@method method. + return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) }; + } + return { done: true, value: nativeMethod.call(str, regexp, arg2) }; + } + return { done: false }; + }); + var stringMethod = methods[0]; + var regexMethod = methods[1]; + + redefine(String.prototype, KEY, stringMethod); + redefine(RegExp.prototype, SYMBOL, length == 2 + // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue) + // 21.2.5.11 RegExp.prototype[@@split](string, limit) + ? function (string, arg) { return regexMethod.call(string, this, arg); } + // 21.2.5.6 RegExp.prototype[@@match](string) + // 21.2.5.9 RegExp.prototype[@@search](string) + : function (string) { return regexMethod.call(string, this); } + ); + if (sham) hide(RegExp.prototype[SYMBOL], 'sham', true); + } +}; + +var max$1 = Math.max; +var min$2 = Math.min; +var floor$1 = Math.floor; +var SUBSTITUTION_SYMBOLS = /\$([$&`']|\d\d?|<[^>]*>)/g; +var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&`']|\d\d?)/g; + +var maybeToString = function (it) { + return it === undefined ? it : String(it); +}; + +// @@replace logic +fixRegexpWellKnownSymbolLogic( + 'replace', + 2, + function (REPLACE, nativeReplace, maybeCallNative) { + return [ + // `String.prototype.replace` method + // https://tc39.github.io/ecma262/#sec-string.prototype.replace + function replace(searchValue, replaceValue) { + var O = requireObjectCoercible(this); + var replacer = searchValue == undefined ? undefined : searchValue[REPLACE]; + return replacer !== undefined + ? replacer.call(searchValue, O, replaceValue) + : nativeReplace.call(String(O), searchValue, replaceValue); + }, + // `RegExp.prototype[@@replace]` method + // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@replace + function (regexp, replaceValue) { + var res = maybeCallNative(nativeReplace, regexp, this, replaceValue); + if (res.done) return res.value; + + var rx = anObject(regexp); + var S = String(this); + + var functionalReplace = typeof replaceValue === 'function'; + if (!functionalReplace) replaceValue = String(replaceValue); + + var global = rx.global; + if (global) { + var fullUnicode = rx.unicode; + rx.lastIndex = 0; + } + var results = []; + while (true) { + var result = regexpExecAbstract(rx, S); + if (result === null) break; + + results.push(result); + if (!global) break; + + var matchStr = String(result[0]); + if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode); + } + + var accumulatedResult = ''; + var nextSourcePosition = 0; + for (var i = 0; i < results.length; i++) { + result = results[i]; + + var matched = String(result[0]); + var position = max$1(min$2(toInteger(result.index), S.length), 0); + var captures = []; + // NOTE: This is equivalent to + // captures = result.slice(1).map(maybeToString) + // but for some reason `nativeSlice.call(result, 1, result.length)` (called in + // the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and + // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it. + for (var j = 1; j < result.length; j++) captures.push(maybeToString(result[j])); + var namedCaptures = result.groups; + if (functionalReplace) { + var replacerArgs = [matched].concat(captures, position, S); + if (namedCaptures !== undefined) replacerArgs.push(namedCaptures); + var replacement = String(replaceValue.apply(undefined, replacerArgs)); + } else { + replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue); + } + if (position >= nextSourcePosition) { + accumulatedResult += S.slice(nextSourcePosition, position) + replacement; + nextSourcePosition = position + matched.length; + } + } + return accumulatedResult + S.slice(nextSourcePosition); + } + ]; + + // https://tc39.github.io/ecma262/#sec-getsubstitution + function getSubstitution(matched, str, position, captures, namedCaptures, replacement) { + var tailPos = position + matched.length; + var m = captures.length; + var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED; + if (namedCaptures !== undefined) { + namedCaptures = toObject(namedCaptures); + symbols = SUBSTITUTION_SYMBOLS; + } + return nativeReplace.call(replacement, symbols, function (match, ch) { + var capture; + switch (ch.charAt(0)) { + case '$': return '$'; + case '&': return matched; + case '`': return str.slice(0, position); + case "'": return str.slice(tailPos); + case '<': + capture = namedCaptures[ch.slice(1, -1)]; + break; + default: // \d\d? + var n = +ch; + if (n === 0) return match; + if (n > m) { + var f = floor$1(n / 10); + if (f === 0) return match; + if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1); + return match; + } + capture = captures[n - 1]; + } + return capture === undefined ? '' : capture; + }); + } + } +); + +function _typeof(obj) { + if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { + _typeof = function (obj) { + return typeof obj; + }; + } else { + _typeof = function (obj) { + return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; + }; + } + + return _typeof(obj); +} + +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} + +function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } +} + +function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; +} + +/** + * @author zhixin wen + * https://github.com/wenzhixin/bootstrap-show-password + * version: 1.2.1 + */ +var bootstrapVersion = 4; + +try { + var rawVersion = $.fn.dropdown.Constructor.VERSION; // Only try to parse VERSION if is is defined. + // It is undefined in older versions of Bootstrap (tested with 3.1.1). + + if (rawVersion !== undefined) { + bootstrapVersion = parseInt(rawVersion, 10); + } +} catch (e) {// ignore +} + +var Constants = { + html: { + inputGroups: { + 3: ['', ''], + 4: ['
'] + }[bootstrapVersion] + } // TOOLS DEFINITION + // ====================== + // it only does '%s', and return '' when arguments are undefined + +}; + +var sprintf = function sprintf(str) { + var args = arguments; + var flag = true; + var i = 1; + str = str.replace(/%s/g, function () { + var arg = args[i++]; + + if (typeof arg === 'undefined') { + flag = false; + return ''; + } + + return arg; + }); + + if (flag) { + return str; + } + + return ''; +}; + +var Password = +/*#__PURE__*/ +function () { + function Password(element, options) { + _classCallCheck(this, Password); + + this.options = options; + this.$element = $(element); + this.isShown = false; + this.init(); + } + + _createClass(Password, [{ + key: "init", + value: function init() { + var placementFuc; + var inputClass; + + if (this.options.placement === 'before') { + placementFuc = 'insertBefore'; + inputClass = 'input-group-prepend'; + } else { + this.options.placement = 'after'; // default to after + + placementFuc = 'insertAfter'; + inputClass = 'input-group-append'; + } // Create the text, icon and assign + + + this.$element.wrap("
")); + this.$text = $('')[placementFuc](this.$element).attr('class', this.$element.attr('class')).attr('style', this.$element.attr('style')).attr('placeholder', this.$element.attr('placeholder')).attr('maxlength', this.$element.attr('maxlength')).attr('disabled', this.$element.attr('disabled')).css('display', this.$element.css('display')).val(this.$element.val()).hide(); // Copy readonly attribute if it's set + + if (this.$element.prop('readonly')) this.$text.prop('readonly', true); + this.$icon = $(["".concat(sprintf(Constants.html.inputGroups[0], inputClass, this.options.message), "\n \n ").concat(this.options.eyeClassPositionInside ? this.options.eyeOpenClass : '', "\n "), Constants.html.inputGroups[1]].join(''))[placementFuc](this.$text).css('cursor', 'pointer'); // events + + this.$text.off('keyup').on('keyup', $.proxy(function () { + if (!this.isShown) return; + this.$element.val(this.$text.val()).trigger('change'); + }, this)); + this.$icon.off('click').on('click', $.proxy(function () { + this.$text.val(this.$element.val()).trigger('change'); + this.toggle(); + }, this)); + } + }, { + key: "toggle", + value: function toggle(_relatedTarget) { + this[!this.isShown ? 'show' : 'hide'](_relatedTarget); + } + }, { + key: "show", + value: function show(_relatedTarget) { + var e = $.Event('show.bs.password', { + relatedTarget: _relatedTarget + }); + this.$element.trigger(e); + this.isShown = true; + this.$element.hide(); + this.$text.show(); + + if (this.options.eyeClassPositionInside) { + this.$icon.find('i,svg').removeClass('icon-eye-open').addClass('icon-eye-close').html(this.options.eyeCloseClass); + } else { + this.$icon.find('i,svg').removeClass("icon-eye-open ".concat(this.options.eyeOpenClass)).addClass("icon-eye-close ".concat(this.options.eyeCloseClass)); + } + + this.$text[this.options.placement](this.$element); + } + }, { + key: "hide", + value: function hide(_relatedTarget) { + var e = $.Event('hide.bs.password', { + relatedTarget: _relatedTarget + }); + this.$element.trigger(e); + this.isShown = false; + this.$element.show(); + this.$text.hide(); + + if (this.options.eyeClassPositionInside) { + this.$icon.find('i,svg').removeClass('icon-eye-close').addClass('icon-eye-open').html(this.options.eyeOpenClass); + } else { + this.$icon.find('i,svg').removeClass("icon-eye-close ".concat(this.options.eyeCloseClass)).addClass("icon-eye-open ".concat(this.options.eyeOpenClass)); + } + + this.$element[this.options.placement](this.$text); + } + }, { + key: "val", + value: function val(value) { + if (typeof value === 'undefined') { + return this.$element.val(); + } + + this.$element.val(value).trigger('change'); + this.$text.val(value); + } + }, { + key: "focus", + value: function focus() { + this.$element.focus(); + } + }]); + + return Password; +}(); + +Password.DEFAULTS = { + placement: 'after', + // 'before' or 'after' + message: 'Click here to show/hide password', + size: undefined, + // '', 'sm', 'large' + eyeClass: 'fa', + // 'glyphicon', + eyeOpenClass: 'fa-eye', + // 'glyphicon-eye-open', + eyeCloseClass: 'fa-eye-slash', + // 'glyphicon-eye-close', + eyeClassPositionInside: false // PASSWORD PLUGIN DEFINITION + // ======================= + +}; +var old = $.fn.password; + +$.fn.password = function () { + var option = arguments[0]; // public function + + var args = arguments; + var value; + var allowedMethods = ['show', 'hide', 'toggle', 'val', 'focus']; + this.each(function () { + var $this = $(this); + var data = $this.data('bs.password'); + var options = $.extend({}, Password.DEFAULTS, $this.data(), _typeof(option) === 'object' && option); + + if (typeof option === 'string') { + if ($.inArray(option, allowedMethods) < 0) { + throw new Error("Unknown method: ".concat(option)); + } + + value = data[option](args[1]); + } else { + if (!data) { + data = new Password($this, options); + $this.data('bs.password', data); + } else { + data.init(options); + } + } + }); + return value ? value : this; +}; + +$.fn.password.Constructor = Password; // PASSWORD NO CONFLICT +// ================= + +$.fn.password.noConflict = function () { + $.fn.password = old; + return this; +}; + +$(function () { + $('[data-toggle="password"]').password(); +}); diff --git a/vendor/bootstrap-showpassword/bootstrap-show-password.esm.min.js b/vendor/bootstrap-showpassword/bootstrap-show-password.esm.min.js new file mode 100644 index 00000000..654395f9 --- /dev/null +++ b/vendor/bootstrap-showpassword/bootstrap-show-password.esm.min.js @@ -0,0 +1,10 @@ +/** + * bootstrap-show-password - Show/hide password plugin for twitter bootstrap. + * + * @version v1.2.1 + * @homepage https://github.com/wenzhixin/bootstrap-show-password + * @author zhixin wen + * @license MIT + */ + +var toString={}.toString,classofRaw=function(a){return toString.call(a).slice(8,-1)},isArray=Array.isArray||function(a){return"Array"==classofRaw(a)},isObject=function(a){return"object"==typeof a?null!==a:"function"==typeof a},requireObjectCoercible=function(a){if(a==null)throw TypeError("Can't call method on "+a);return a},toObject=function(a){return Object(requireObjectCoercible(a))},ceil=Math.ceil,floor=Math.floor,toInteger=function(a){return isNaN(a=+a)?0:(0c?max(c+b,0):min$1(c,b)},arrayIncludes=function(a){return function(b,c,d){var e,f=toIndexedObject(b),g=toLength(f.length),h=toAbsoluteIndex(d,g);if(a&&c!=c){for(;g>h;)if(e=f[h++],e!=e)return!0;}else for(;g>h;h++)if((a||h in f)&&f[h]===c)return a||h||0;return!a&&-1}},arrayIndexOf=arrayIncludes(!1),objectKeysInternal=function(a,b){var c,d=toIndexedObject(a),e=0,f=[];for(c in d)!has(hiddenKeys,c)&&has(d,c)&&f.push(c);for(;b.length>e;)has(d,c=b[e++])&&(~arrayIndexOf(f,c)||f.push(c));return f},enumBugKeys=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],hiddenKeys$1=enumBugKeys.concat("length","prototype"),f$3=Object.getOwnPropertyNames||function(a){return objectKeysInternal(a,hiddenKeys$1)},objectGetOwnPropertyNames={f:f$3},f$4=Object.getOwnPropertySymbols,objectGetOwnPropertySymbols={f:f$4},Reflect=global.Reflect,ownKeys=Reflect&&Reflect.ownKeys||function(a){var b=objectGetOwnPropertyNames.f(anObject(a)),c=objectGetOwnPropertySymbols.f;return c?b.concat(c(a)):b},copyConstructorProperties=function(a,b){for(var c,d=ownKeys(b),e=objectDefineProperty.f,f=objectGetOwnPropertyDescriptor.f,g=0;gMAX_SAFE_INTEGER)throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);for(b=0;b=MAX_SAFE_INTEGER)throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);createProperty(g,h++,e)}return g.length=h,g}});var aFunction=function(a){if("function"!=typeof a)throw TypeError(a+" is not a function");return a},bindContext=function(d,e,f){return(aFunction(d),void 0===e)?d:0===f?function(){return d.call(e)}:1===f?function(b){return d.call(e,b)}:2===f?function(c,a){return d.call(e,c,a)}:3===f?function(f,a,b){return d.call(e,f,a,b)}:function(){return d.apply(e,arguments)}},arrayMethods=function(a,b){var c=1==a,d=4==a,e=6==a,f=b||arraySpeciesCreate;return function(b,g,h){for(var i,j,k=toObject(b),l=indexedObject(k),m=bindContext(g,h,3),n=toLength(l.length),o=0,p=c?f(b,n):2==a?f(b,0):void 0;n>o;o++)if((5==a||e||o in l)&&(i=l[o],j=m(i,o,k),a))if(c)p[o]=j;else if(j)switch(a){case 3:return!0;case 5:return i;case 6:return o;case 2:p.push(i);}else if(d)return!1;return e?-1:3==a||d?d:p}},objectKeys=Object.keys||function(a){return objectKeysInternal(a,enumBugKeys)},objectDefineProperties=descriptors?Object.defineProperties:function(a,b){anObject(a);for(var c,d=objectKeys(b),e=d.length,f=0;e>f;)objectDefineProperty.f(a,c=d[f++],b[c]);return a},document$1=global.document,html=document$1&&document$1.documentElement,IE_PROTO=sharedKey("IE_PROTO"),PROTOTYPE="prototype",Empty=function(){},createDict=function(){var a,b=documentCreateElement("iframe"),c=enumBugKeys.length,d="<",e="script",f=">";for(b.style.display="none",html.appendChild(b),b.src="java"+e+":"+"",a=b.contentWindow.document,a.open(),a.write(d+e+f+"document.F=Object"+d+"/"+e+f),a.close(),createDict=a.F;c--;)delete createDict[PROTOTYPE][enumBugKeys[c]];return createDict()},objectCreate=Object.create||function(a,b){var c;return null===a?c=createDict():(Empty[PROTOTYPE]=anObject(a),c=new Empty,Empty[PROTOTYPE]=null,c[IE_PROTO]=a),void 0===b?c:objectDefineProperties(c,b)};hiddenKeys[IE_PROTO]=!0;var UNSCOPABLES=wellKnownSymbol("unscopables"),ArrayPrototype=Array.prototype;ArrayPrototype[UNSCOPABLES]==null&&hide(ArrayPrototype,UNSCOPABLES,objectCreate(null));var addToUnscopables=function(a){ArrayPrototype[UNSCOPABLES][a]=!0},internalFind=arrayMethods(5),FIND="find",SKIPS_HOLES=!0;FIND in[]&&[,][FIND](function(){SKIPS_HOLES=!1}),_export({target:"Array",proto:!0,forced:SKIPS_HOLES},{find:function(a){return internalFind(this,a,1>>0||(hex.test(c)?16:10))}:nativeParseInt;_export({global:!0,forced:parseInt!=_parseInt},{parseInt:_parseInt});var regexpFlags=function(){var a=anObject(this),b="";return a.global&&(b+="g"),a.ignoreCase&&(b+="i"),a.multiline&&(b+="m"),a.unicode&&(b+="u"),a.sticky&&(b+="y"),b},nativeExec=RegExp.prototype.exec,nativeReplace=String.prototype.replace,patchedExec=nativeExec,UPDATES_LAST_INDEX_WRONG=function(){var a=/a/,b=/b*/g;return nativeExec.call(a,"a"),nativeExec.call(b,"a"),0!==a.lastIndex||0!==b.lastIndex}(),NPCG_INCLUDED=/()??/.exec("")[1]!==void 0,PATCH=UPDATES_LAST_INDEX_WRONG||NPCG_INCLUDED;PATCH&&(patchedExec=function(a){var b,c,d,e,f=this;return NPCG_INCLUDED&&(c=new RegExp("^"+f.source+"$(?!\\s)",regexpFlags.call(f))),UPDATES_LAST_INDEX_WRONG&&(b=f.lastIndex),d=nativeExec.call(f,a),UPDATES_LAST_INDEX_WRONG&&d&&(f.lastIndex=f.global?d.index+d[0].length:b),NPCG_INCLUDED&&d&&1g||g>=h?c?"":void 0:(d=f.charCodeAt(g),55296>d||56319(e=f.charCodeAt(g+1))||57343")}),SPLIT_WORKS_WITH_OVERWRITTEN_EXEC=!fails(function(){var a=/(?:)/,b=a.exec;a.exec=function(){return b.apply(this,arguments)};var c="ab".split(a);return 2!==c.length||"a"!==c[0]||"b"!==c[1]}),fixRegexpWellKnownSymbolLogic=function(a,b,c,d){var e=wellKnownSymbol(a),f=!fails(function(){var b={};return b[e]=function(){return 7},7!=""[a](b)}),g=f&&!fails(function(){var b=!1,c=/a/;return c.exec=function(){return b=!0,null},"split"===a&&(c.constructor={},c.constructor[SPECIES$2]=function(){return c}),c[e](""),!b});if(!f||!g||"replace"===a&&!REPLACE_SUPPORTS_NAMED_GROUPS||"split"===a&&!SPLIT_WORKS_WITH_OVERWRITTEN_EXEC){var h=/./[e],i=c(e,""[a],function(a,b,c,d,e){return b.exec===regexpExec?f&&!e?{done:!0,value:h.call(b,c,d)}:{done:!0,value:a.call(c,b,d)}:{done:!1}}),j=i[0],k=i[1];redefine(String.prototype,a,j),redefine(RegExp.prototype,e,2==b?function(a,b){return k.call(a,this,b)}:function(a){return k.call(a,this)}),d&&hide(RegExp.prototype[e],"sham",!0)}},max$1=Math.max,min$2=Math.min,floor$1=Math.floor,SUBSTITUTION_SYMBOLS=/\$([$&`']|\d\d?|<[^>]*>)/g,SUBSTITUTION_SYMBOLS_NO_NAMED=/\$([$&`']|\d\d?)/g,maybeToString=function(a){return a===void 0?a:a+""};fixRegexpWellKnownSymbolLogic("replace",2,function(a,b,c){function d(a,c,d,e,g,h){var i=d+a.length,j=e.length,f=SUBSTITUTION_SYMBOLS_NO_NAMED;return void 0!==g&&(g=toObject(g),f=SUBSTITUTION_SYMBOLS),b.call(h,f,function(b,h){var k;switch(h.charAt(0)){case"$":return"$";case"&":return a;case"`":return c.slice(0,d);case"'":return c.slice(i);case"<":k=g[h.slice(1,-1)];break;default:var l=+h;if(0==l)return b;if(l>j){var m=floor$1(l/10);return 0===m?b:m<=j?void 0===e[m-1]?h.charAt(1):e[m-1]+h.charAt(1):b}k=e[l-1];}return void 0===k?"":k})}return[function(c,d){var e=requireObjectCoercible(this),f=c==null?void 0:c[a];return f===void 0?b.call(e+"",c,d):f.call(c,e,d)},function(a,e){var f=c(b,a,this,e);if(f.done)return f.value;var g=anObject(a),h=this+"",k="function"==typeof e;k||(e=e+"");var l=g.global;if(l){var m=g.unicode;g.lastIndex=0}for(var n,o=[];(n=regexpExecAbstract(g,h),null!==n)&&!(o.push(n),!l);){var p=n[0]+"";""==p&&(g.lastIndex=advanceStringIndex(h,toLength(g.lastIndex),m))}for(var q="",r=0,s=0;s=r&&(q+=h.slice(r,u)+z,r=u+t.length)}return q+h.slice(r)}]});function _typeof(a){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},_typeof(a)}function _classCallCheck(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function _defineProperties(a,b){for(var c,d=0;d",""],4:["
"]}[bootstrapVersion]}},sprintf=function(a){var b=arguments,c=!0,d=1;return a=a.replace(/%s/g,function(){var a=b[d++];return"undefined"==typeof a?(c=!1,""):a}),c?a:""},Password=function(){function a(b,c){_classCallCheck(this,a),this.options=c,this.$element=$(b),this.isShown=!1,this.init()}return _createClass(a,[{key:"init",value:function(){var a,b;"before"===this.options.placement?(a="insertBefore",b="input-group-prepend"):(this.options.placement="after",a="insertAfter",b="input-group-append"),this.$element.wrap("
")),this.$text=$("")[a](this.$element).attr("class",this.$element.attr("class")).attr("style",this.$element.attr("style")).attr("placeholder",this.$element.attr("placeholder")).attr("maxlength",this.$element.attr("maxlength")).attr("disabled",this.$element.attr("disabled")).css("display",this.$element.css("display")).val(this.$element.val()).hide(),this.$element.prop("readonly")&&this.$text.prop("readonly",!0),this.$icon=$(["".concat(sprintf(Constants.html.inputGroups[0],b,this.options.message),"\n \n ").concat(this.options.eyeClassPositionInside?this.options.eyeOpenClass:"","\n "),Constants.html.inputGroups[1]].join(""))[a](this.$text).css("cursor","pointer"),this.$text.off("keyup").on("keyup",$.proxy(function(){this.isShown&&this.$element.val(this.$text.val()).trigger("change")},this)),this.$icon.off("click").on("click",$.proxy(function(){this.$text.val(this.$element.val()).trigger("change"),this.toggle()},this))}},{key:"toggle",value:function(a){this[this.isShown?"hide":"show"](a)}},{key:"show",value:function(a){var b=$.Event("show.bs.password",{relatedTarget:a});this.$element.trigger(b),this.isShown=!0,this.$element.hide(),this.$text.show(),this.options.eyeClassPositionInside?this.$icon.find("i,svg").removeClass("icon-eye-open").addClass("icon-eye-close").html(this.options.eyeCloseClass):this.$icon.find("i,svg").removeClass("icon-eye-open ".concat(this.options.eyeOpenClass)).addClass("icon-eye-close ".concat(this.options.eyeCloseClass)),this.$text[this.options.placement](this.$element)}},{key:"hide",value:function(a){var b=$.Event("hide.bs.password",{relatedTarget:a});this.$element.trigger(b),this.isShown=!1,this.$element.show(),this.$text.hide(),this.options.eyeClassPositionInside?this.$icon.find("i,svg").removeClass("icon-eye-close").addClass("icon-eye-open").html(this.options.eyeOpenClass):this.$icon.find("i,svg").removeClass("icon-eye-close ".concat(this.options.eyeCloseClass)).addClass("icon-eye-open ".concat(this.options.eyeOpenClass)),this.$element[this.options.placement](this.$text)}},{key:"val",value:function(a){return"undefined"==typeof a?this.$element.val():void(this.$element.val(a).trigger("change"),this.$text.val(a))}},{key:"focus",value:function(){this.$element.focus()}}]),a}();Password.DEFAULTS={placement:"after",message:"Click here to show/hide password",size:void 0,eyeClass:"fa",eyeOpenClass:"fa-eye",eyeCloseClass:"fa-eye-slash",eyeClassPositionInside:!1};var old=$.fn.password;$.fn.password=function(){var a,b=arguments[0],c=arguments,d=["show","hide","toggle","val","focus"];return this.each(function(){var e=$(this),f=e.data("bs.password"),g=$.extend({},Password.DEFAULTS,e.data(),"object"===_typeof(b)&&b);if("string"==typeof b){if(0>$.inArray(b,d))throw new Error("Unknown method: ".concat(b));a=f[b](c[1])}else f?f.init(g):(f=new Password(e,g),e.data("bs.password",f))}),a?a:this},$.fn.password.Constructor=Password,$.fn.password.noConflict=function(){return $.fn.password=old,this},$(function(){$("[data-toggle=\"password\"]").password()}); diff --git a/vendor/bootstrap-showpassword/bootstrap-show-password.js b/vendor/bootstrap-showpassword/bootstrap-show-password.js new file mode 100644 index 00000000..07a9764e --- /dev/null +++ b/vendor/bootstrap-showpassword/bootstrap-show-password.js @@ -0,0 +1,1410 @@ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('jquery')) : + typeof define === 'function' && define.amd ? define(['jquery'], factory) : + (global = global || self, factory(global.jQuery)); +}(this, function ($) { 'use strict'; + + $ = $ && $.hasOwnProperty('default') ? $['default'] : $; + + var toString = {}.toString; + + var classofRaw = function (it) { + return toString.call(it).slice(8, -1); + }; + + // `IsArray` abstract operation + // https://tc39.github.io/ecma262/#sec-isarray + var isArray = Array.isArray || function isArray(arg) { + return classofRaw(arg) == 'Array'; + }; + + var isObject = function (it) { + return typeof it === 'object' ? it !== null : typeof it === 'function'; + }; + + // `RequireObjectCoercible` abstract operation + // https://tc39.github.io/ecma262/#sec-requireobjectcoercible + var requireObjectCoercible = function (it) { + if (it == undefined) throw TypeError("Can't call method on " + it); + return it; + }; + + // `ToObject` abstract operation + // https://tc39.github.io/ecma262/#sec-toobject + var toObject = function (argument) { + return Object(requireObjectCoercible(argument)); + }; + + var ceil = Math.ceil; + var floor = Math.floor; + + // `ToInteger` abstract operation + // https://tc39.github.io/ecma262/#sec-tointeger + var toInteger = function (argument) { + return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument); + }; + + var min = Math.min; + + // `ToLength` abstract operation + // https://tc39.github.io/ecma262/#sec-tolength + var toLength = function (argument) { + return argument > 0 ? min(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991 + }; + + // 7.1.1 ToPrimitive(input [, PreferredType]) + + // instead of the ES6 spec version, we didn't implement @@toPrimitive case + // and the second argument - flag - preferred type is a string + var toPrimitive = function (it, S) { + if (!isObject(it)) return it; + var fn, val; + if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; + if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val; + if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; + throw TypeError("Can't convert object to primitive value"); + }; + + var fails = function (exec) { + try { + return !!exec(); + } catch (error) { + return true; + } + }; + + // Thank's IE8 for his funny defineProperty + var descriptors = !fails(function () { + return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7; + }); + + // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 + var global = typeof window == 'object' && window && window.Math == Math ? window + : typeof self == 'object' && self && self.Math == Math ? self + // eslint-disable-next-line no-new-func + : Function('return this')(); + + var document = global.document; + // typeof document.createElement is 'object' in old IE + var exist = isObject(document) && isObject(document.createElement); + + var documentCreateElement = function (it) { + return exist ? document.createElement(it) : {}; + }; + + // Thank's IE8 for his funny defineProperty + var ie8DomDefine = !descriptors && !fails(function () { + return Object.defineProperty(documentCreateElement('div'), 'a', { + get: function () { return 7; } + }).a != 7; + }); + + var anObject = function (it) { + if (!isObject(it)) { + throw TypeError(String(it) + ' is not an object'); + } return it; + }; + + var nativeDefineProperty = Object.defineProperty; + + var f = descriptors ? nativeDefineProperty : function defineProperty(O, P, Attributes) { + anObject(O); + P = toPrimitive(P, true); + anObject(Attributes); + if (ie8DomDefine) try { + return nativeDefineProperty(O, P, Attributes); + } catch (error) { /* empty */ } + if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported'); + if ('value' in Attributes) O[P] = Attributes.value; + return O; + }; + + var objectDefineProperty = { + f: f + }; + + var createPropertyDescriptor = function (bitmap, value) { + return { + enumerable: !(bitmap & 1), + configurable: !(bitmap & 2), + writable: !(bitmap & 4), + value: value + }; + }; + + var createProperty = function (object, key, value) { + var propertyKey = toPrimitive(key); + if (propertyKey in object) objectDefineProperty.f(object, propertyKey, createPropertyDescriptor(0, value)); + else object[propertyKey] = value; + }; + + function createCommonjsModule(fn, module) { + return module = { exports: {} }, fn(module, module.exports), module.exports; + } + + var hide = descriptors ? function (object, key, value) { + return objectDefineProperty.f(object, key, createPropertyDescriptor(1, value)); + } : function (object, key, value) { + object[key] = value; + return object; + }; + + var setGlobal = function (key, value) { + try { + hide(global, key, value); + } catch (error) { + global[key] = value; + } return value; + }; + + var shared = createCommonjsModule(function (module) { + var SHARED = '__core-js_shared__'; + var store = global[SHARED] || setGlobal(SHARED, {}); + + (module.exports = function (key, value) { + return store[key] || (store[key] = value !== undefined ? value : {}); + })('versions', []).push({ + version: '3.0.1', + mode: 'global', + copyright: '© 2019 Denis Pushkarev (zloirock.ru)' + }); + }); + + var id = 0; + var postfix = Math.random(); + + var uid = function (key) { + return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + postfix).toString(36)); + }; + + // Chrome 38 Symbol has incorrect toString conversion + var nativeSymbol = !fails(function () { + // eslint-disable-next-line no-undef + return !String(Symbol()); + }); + + var store = shared('wks'); + + var Symbol$1 = global.Symbol; + + + var wellKnownSymbol = function (name) { + return store[name] || (store[name] = nativeSymbol && Symbol$1[name] + || (nativeSymbol ? Symbol$1 : uid)('Symbol.' + name)); + }; + + var SPECIES = wellKnownSymbol('species'); + + // `ArraySpeciesCreate` abstract operation + // https://tc39.github.io/ecma262/#sec-arrayspeciescreate + var arraySpeciesCreate = function (originalArray, length) { + var C; + if (isArray(originalArray)) { + C = originalArray.constructor; + // cross-realm fallback + if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined; + else if (isObject(C)) { + C = C[SPECIES]; + if (C === null) C = undefined; + } + } return new (C === undefined ? Array : C)(length === 0 ? 0 : length); + }; + + var SPECIES$1 = wellKnownSymbol('species'); + + var arrayMethodHasSpeciesSupport = function (METHOD_NAME) { + return !fails(function () { + var array = []; + var constructor = array.constructor = {}; + constructor[SPECIES$1] = function () { + return { foo: 1 }; + }; + return array[METHOD_NAME](Boolean).foo !== 1; + }); + }; + + var nativePropertyIsEnumerable = {}.propertyIsEnumerable; + var nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; + + // Nashorn ~ JDK8 bug + var NASHORN_BUG = nativeGetOwnPropertyDescriptor && !nativePropertyIsEnumerable.call({ 1: 2 }, 1); + + var f$1 = NASHORN_BUG ? function propertyIsEnumerable(V) { + var descriptor = nativeGetOwnPropertyDescriptor(this, V); + return !!descriptor && descriptor.enumerable; + } : nativePropertyIsEnumerable; + + var objectPropertyIsEnumerable = { + f: f$1 + }; + + // fallback for non-array-like ES3 and non-enumerable old V8 strings + + + var split = ''.split; + + var indexedObject = fails(function () { + // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346 + // eslint-disable-next-line no-prototype-builtins + return !Object('z').propertyIsEnumerable(0); + }) ? function (it) { + return classofRaw(it) == 'String' ? split.call(it, '') : Object(it); + } : Object; + + // toObject with fallback for non-array-like ES3 strings + + + + var toIndexedObject = function (it) { + return indexedObject(requireObjectCoercible(it)); + }; + + var hasOwnProperty = {}.hasOwnProperty; + + var has = function (it, key) { + return hasOwnProperty.call(it, key); + }; + + var nativeGetOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor; + + var f$2 = descriptors ? nativeGetOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) { + O = toIndexedObject(O); + P = toPrimitive(P, true); + if (ie8DomDefine) try { + return nativeGetOwnPropertyDescriptor$1(O, P); + } catch (error) { /* empty */ } + if (has(O, P)) return createPropertyDescriptor(!objectPropertyIsEnumerable.f.call(O, P), O[P]); + }; + + var objectGetOwnPropertyDescriptor = { + f: f$2 + }; + + var functionToString = shared('native-function-to-string', Function.toString); + + var WeakMap = global.WeakMap; + + var nativeWeakMap = typeof WeakMap === 'function' && /native code/.test(functionToString.call(WeakMap)); + + var shared$1 = shared('keys'); + + + var sharedKey = function (key) { + return shared$1[key] || (shared$1[key] = uid(key)); + }; + + var hiddenKeys = {}; + + var WeakMap$1 = global.WeakMap; + var set, get, has$1; + + var enforce = function (it) { + return has$1(it) ? get(it) : set(it, {}); + }; + + var getterFor = function (TYPE) { + return function (it) { + var state; + if (!isObject(it) || (state = get(it)).type !== TYPE) { + throw TypeError('Incompatible receiver, ' + TYPE + ' required'); + } return state; + }; + }; + + if (nativeWeakMap) { + var store$1 = new WeakMap$1(); + var wmget = store$1.get; + var wmhas = store$1.has; + var wmset = store$1.set; + set = function (it, metadata) { + wmset.call(store$1, it, metadata); + return metadata; + }; + get = function (it) { + return wmget.call(store$1, it) || {}; + }; + has$1 = function (it) { + return wmhas.call(store$1, it); + }; + } else { + var STATE = sharedKey('state'); + hiddenKeys[STATE] = true; + set = function (it, metadata) { + hide(it, STATE, metadata); + return metadata; + }; + get = function (it) { + return has(it, STATE) ? it[STATE] : {}; + }; + has$1 = function (it) { + return has(it, STATE); + }; + } + + var internalState = { + set: set, + get: get, + has: has$1, + enforce: enforce, + getterFor: getterFor + }; + + var redefine = createCommonjsModule(function (module) { + var getInternalState = internalState.get; + var enforceInternalState = internalState.enforce; + var TEMPLATE = String(functionToString).split('toString'); + + shared('inspectSource', function (it) { + return functionToString.call(it); + }); + + (module.exports = function (O, key, value, options) { + var unsafe = options ? !!options.unsafe : false; + var simple = options ? !!options.enumerable : false; + var noTargetGet = options ? !!options.noTargetGet : false; + if (typeof value == 'function') { + if (typeof key == 'string' && !has(value, 'name')) hide(value, 'name', key); + enforceInternalState(value).source = TEMPLATE.join(typeof key == 'string' ? key : ''); + } + if (O === global) { + if (simple) O[key] = value; + else setGlobal(key, value); + return; + } else if (!unsafe) { + delete O[key]; + } else if (!noTargetGet && O[key]) { + simple = true; + } + if (simple) O[key] = value; + else hide(O, key, value); + // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative + })(Function.prototype, 'toString', function toString() { + return typeof this == 'function' && getInternalState(this).source || functionToString.call(this); + }); + }); + + var max = Math.max; + var min$1 = Math.min; + + // Helper for a popular repeating case of the spec: + // Let integer be ? ToInteger(index). + // If integer < 0, let result be max((length + integer), 0); else let result be min(length, length). + var toAbsoluteIndex = function (index, length) { + var integer = toInteger(index); + return integer < 0 ? max(integer + length, 0) : min$1(integer, length); + }; + + // `Array.prototype.{ indexOf, includes }` methods implementation + // false -> Array#indexOf + // https://tc39.github.io/ecma262/#sec-array.prototype.indexof + // true -> Array#includes + // https://tc39.github.io/ecma262/#sec-array.prototype.includes + var arrayIncludes = function (IS_INCLUDES) { + return function ($this, el, fromIndex) { + var O = toIndexedObject($this); + var length = toLength(O.length); + var index = toAbsoluteIndex(fromIndex, length); + var value; + // Array#includes uses SameValueZero equality algorithm + // eslint-disable-next-line no-self-compare + if (IS_INCLUDES && el != el) while (length > index) { + value = O[index++]; + // eslint-disable-next-line no-self-compare + if (value != value) return true; + // Array#indexOf ignores holes, Array#includes - not + } else for (;length > index; index++) if (IS_INCLUDES || index in O) { + if (O[index] === el) return IS_INCLUDES || index || 0; + } return !IS_INCLUDES && -1; + }; + }; + + var arrayIndexOf = arrayIncludes(false); + + + var objectKeysInternal = function (object, names) { + var O = toIndexedObject(object); + var i = 0; + var result = []; + var key; + for (key in O) !has(hiddenKeys, key) && has(O, key) && result.push(key); + // Don't enum bug & hidden keys + while (names.length > i) if (has(O, key = names[i++])) { + ~arrayIndexOf(result, key) || result.push(key); + } + return result; + }; + + // IE8- don't enum bug keys + var enumBugKeys = [ + 'constructor', + 'hasOwnProperty', + 'isPrototypeOf', + 'propertyIsEnumerable', + 'toLocaleString', + 'toString', + 'valueOf' + ]; + + // 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O) + + var hiddenKeys$1 = enumBugKeys.concat('length', 'prototype'); + + var f$3 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { + return objectKeysInternal(O, hiddenKeys$1); + }; + + var objectGetOwnPropertyNames = { + f: f$3 + }; + + var f$4 = Object.getOwnPropertySymbols; + + var objectGetOwnPropertySymbols = { + f: f$4 + }; + + var Reflect = global.Reflect; + + // all object keys, includes non-enumerable and symbols + var ownKeys = Reflect && Reflect.ownKeys || function ownKeys(it) { + var keys = objectGetOwnPropertyNames.f(anObject(it)); + var getOwnPropertySymbols = objectGetOwnPropertySymbols.f; + return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys; + }; + + var copyConstructorProperties = function (target, source) { + var keys = ownKeys(source); + var defineProperty = objectDefineProperty.f; + var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f; + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + if (!has(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key)); + } + }; + + var replacement = /#|\.prototype\./; + + var isForced = function (feature, detection) { + var value = data[normalize(feature)]; + return value == POLYFILL ? true + : value == NATIVE ? false + : typeof detection == 'function' ? fails(detection) + : !!detection; + }; + + var normalize = isForced.normalize = function (string) { + return String(string).replace(replacement, '.').toLowerCase(); + }; + + var data = isForced.data = {}; + var NATIVE = isForced.NATIVE = 'N'; + var POLYFILL = isForced.POLYFILL = 'P'; + + var isForced_1 = isForced; + + var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f; + + + + + + + /* + options.target - name of the target object + options.global - target is the global object + options.stat - export as static methods of target + options.proto - export as prototype methods of target + options.real - real prototype method for the `pure` version + options.forced - export even if the native feature is available + options.bind - bind methods to the target, required for the `pure` version + options.wrap - wrap constructors to preventing global pollution, required for the `pure` version + options.unsafe - use the simple assignment of property instead of delete + defineProperty + options.sham - add a flag to not completely full polyfills + options.enumerable - export as enumerable property + options.noTargetGet - prevent calling a getter on target + */ + var _export = function (options, source) { + var TARGET = options.target; + var GLOBAL = options.global; + var STATIC = options.stat; + var FORCED, target, key, targetProperty, sourceProperty, descriptor; + if (GLOBAL) { + target = global; + } else if (STATIC) { + target = global[TARGET] || setGlobal(TARGET, {}); + } else { + target = (global[TARGET] || {}).prototype; + } + if (target) for (key in source) { + sourceProperty = source[key]; + if (options.noTargetGet) { + descriptor = getOwnPropertyDescriptor(target, key); + targetProperty = descriptor && descriptor.value; + } else targetProperty = target[key]; + FORCED = isForced_1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced); + // contained in target + if (!FORCED && targetProperty !== undefined) { + if (typeof sourceProperty === typeof targetProperty) continue; + copyConstructorProperties(sourceProperty, targetProperty); + } + // add a flag to not completely full polyfills + if (options.sham || (targetProperty && targetProperty.sham)) { + hide(sourceProperty, 'sham', true); + } + // extend global + redefine(target, key, sourceProperty, options); + } + }; + + var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable'); + var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; + var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded'; + + var IS_CONCAT_SPREADABLE_SUPPORT = !fails(function () { + var array = []; + array[IS_CONCAT_SPREADABLE] = false; + return array.concat()[0] !== array; + }); + + var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat'); + + var isConcatSpreadable = function (O) { + if (!isObject(O)) return false; + var spreadable = O[IS_CONCAT_SPREADABLE]; + return spreadable !== undefined ? !!spreadable : isArray(O); + }; + + var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT; + + // `Array.prototype.concat` method + // https://tc39.github.io/ecma262/#sec-array.prototype.concat + // with adding support of @@isConcatSpreadable and @@species + _export({ target: 'Array', proto: true, forced: FORCED }, { + concat: function concat(arg) { // eslint-disable-line no-unused-vars + var O = toObject(this); + var A = arraySpeciesCreate(O, 0); + var n = 0; + var i, k, length, len, E; + for (i = -1, length = arguments.length; i < length; i++) { + E = i === -1 ? O : arguments[i]; + if (isConcatSpreadable(E)) { + len = toLength(E.length); + if (n + len > MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED); + for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]); + } else { + if (n >= MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED); + createProperty(A, n++, E); + } + } + A.length = n; + return A; + } + }); + + var aFunction = function (it) { + if (typeof it != 'function') { + throw TypeError(String(it) + ' is not a function'); + } return it; + }; + + // optional / simple context binding + var bindContext = function (fn, that, length) { + aFunction(fn); + if (that === undefined) return fn; + switch (length) { + case 0: return function () { + return fn.call(that); + }; + case 1: return function (a) { + return fn.call(that, a); + }; + case 2: return function (a, b) { + return fn.call(that, a, b); + }; + case 3: return function (a, b, c) { + return fn.call(that, a, b, c); + }; + } + return function (/* ...args */) { + return fn.apply(that, arguments); + }; + }; + + // `Array.prototype.{ forEach, map, filter, some, every, find, findIndex }` methods implementation + // 0 -> Array#forEach + // https://tc39.github.io/ecma262/#sec-array.prototype.foreach + // 1 -> Array#map + // https://tc39.github.io/ecma262/#sec-array.prototype.map + // 2 -> Array#filter + // https://tc39.github.io/ecma262/#sec-array.prototype.filter + // 3 -> Array#some + // https://tc39.github.io/ecma262/#sec-array.prototype.some + // 4 -> Array#every + // https://tc39.github.io/ecma262/#sec-array.prototype.every + // 5 -> Array#find + // https://tc39.github.io/ecma262/#sec-array.prototype.find + // 6 -> Array#findIndex + // https://tc39.github.io/ecma262/#sec-array.prototype.findIndex + var arrayMethods = function (TYPE, specificCreate) { + var IS_MAP = TYPE == 1; + var IS_FILTER = TYPE == 2; + var IS_SOME = TYPE == 3; + var IS_EVERY = TYPE == 4; + var IS_FIND_INDEX = TYPE == 6; + var NO_HOLES = TYPE == 5 || IS_FIND_INDEX; + var create = specificCreate || arraySpeciesCreate; + return function ($this, callbackfn, that) { + var O = toObject($this); + var self = indexedObject(O); + var boundFunction = bindContext(callbackfn, that, 3); + var length = toLength(self.length); + var index = 0; + var target = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined; + var value, result; + for (;length > index; index++) if (NO_HOLES || index in self) { + value = self[index]; + result = boundFunction(value, index, O); + if (TYPE) { + if (IS_MAP) target[index] = result; // map + else if (result) switch (TYPE) { + case 3: return true; // some + case 5: return value; // find + case 6: return index; // findIndex + case 2: target.push(value); // filter + } else if (IS_EVERY) return false; // every + } + } + return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target; + }; + }; + + // 19.1.2.14 / 15.2.3.14 Object.keys(O) + + + + var objectKeys = Object.keys || function keys(O) { + return objectKeysInternal(O, enumBugKeys); + }; + + var objectDefineProperties = descriptors ? Object.defineProperties : function defineProperties(O, Properties) { + anObject(O); + var keys = objectKeys(Properties); + var length = keys.length; + var i = 0; + var key; + while (length > i) objectDefineProperty.f(O, key = keys[i++], Properties[key]); + return O; + }; + + var document$1 = global.document; + + var html = document$1 && document$1.documentElement; + + // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) + + + + + + var IE_PROTO = sharedKey('IE_PROTO'); + var PROTOTYPE = 'prototype'; + var Empty = function () { /* empty */ }; + + // Create object with fake `null` prototype: use iframe Object with cleared prototype + var createDict = function () { + // Thrash, waste and sodomy: IE GC bug + var iframe = documentCreateElement('iframe'); + var length = enumBugKeys.length; + var lt = '<'; + var script = 'script'; + var gt = '>'; + var js = 'java' + script + ':'; + var iframeDocument; + iframe.style.display = 'none'; + html.appendChild(iframe); + iframe.src = String(js); + iframeDocument = iframe.contentWindow.document; + iframeDocument.open(); + iframeDocument.write(lt + script + gt + 'document.F=Object' + lt + '/' + script + gt); + iframeDocument.close(); + createDict = iframeDocument.F; + while (length--) delete createDict[PROTOTYPE][enumBugKeys[length]]; + return createDict(); + }; + + var objectCreate = Object.create || function create(O, Properties) { + var result; + if (O !== null) { + Empty[PROTOTYPE] = anObject(O); + result = new Empty(); + Empty[PROTOTYPE] = null; + // add "__proto__" for Object.getPrototypeOf polyfill + result[IE_PROTO] = O; + } else result = createDict(); + return Properties === undefined ? result : objectDefineProperties(result, Properties); + }; + + hiddenKeys[IE_PROTO] = true; + + var UNSCOPABLES = wellKnownSymbol('unscopables'); + + + var ArrayPrototype = Array.prototype; + + // Array.prototype[@@unscopables] + // https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables + if (ArrayPrototype[UNSCOPABLES] == undefined) { + hide(ArrayPrototype, UNSCOPABLES, objectCreate(null)); + } + + // add a key to Array.prototype[@@unscopables] + var addToUnscopables = function (key) { + ArrayPrototype[UNSCOPABLES][key] = true; + }; + + var internalFind = arrayMethods(5); + var FIND = 'find'; + var SKIPS_HOLES = true; + + // Shouldn't skip holes + if (FIND in []) Array(1)[FIND](function () { SKIPS_HOLES = false; }); + + // `Array.prototype.find` method + // https://tc39.github.io/ecma262/#sec-array.prototype.find + _export({ target: 'Array', proto: true, forced: SKIPS_HOLES }, { + find: function find(callbackfn /* , that = undefined */) { + return internalFind(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); + } + }); + + // https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables + addToUnscopables(FIND); + + var sloppyArrayMethod = function (METHOD_NAME, argument) { + var method = [][METHOD_NAME]; + return !method || !fails(function () { + // eslint-disable-next-line no-useless-call,no-throw-literal + method.call(null, argument || function () { throw 1; }, 1); + }); + }; + + var nativeJoin = [].join; + + var ES3_STRINGS = indexedObject != Object; + var SLOPPY_METHOD = sloppyArrayMethod('join', ','); + + // `Array.prototype.join` method + // https://tc39.github.io/ecma262/#sec-array.prototype.join + _export({ target: 'Array', proto: true, forced: ES3_STRINGS || SLOPPY_METHOD }, { + join: function join(separator) { + return nativeJoin.call(toIndexedObject(this), separator === undefined ? ',' : separator); + } + }); + + // a string of all valid unicode whitespaces + // eslint-disable-next-line max-len + var whitespaces = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'; + + var whitespace = '[' + whitespaces + ']'; + var ltrim = RegExp('^' + whitespace + whitespace + '*'); + var rtrim = RegExp(whitespace + whitespace + '*$'); + + // 1 -> String#trimStart + // 2 -> String#trimEnd + // 3 -> String#trim + var stringTrim = function (string, TYPE) { + string = String(requireObjectCoercible(string)); + if (TYPE & 1) string = string.replace(ltrim, ''); + if (TYPE & 2) string = string.replace(rtrim, ''); + return string; + }; + + var nativeParseInt = global.parseInt; + + + var hex = /^[-+]?0[xX]/; + var FORCED$1 = nativeParseInt(whitespaces + '08') !== 8 || nativeParseInt(whitespaces + '0x16') !== 22; + + var _parseInt = FORCED$1 ? function parseInt(str, radix) { + var string = stringTrim(String(str), 3); + return nativeParseInt(string, (radix >>> 0) || (hex.test(string) ? 16 : 10)); + } : nativeParseInt; + + // `parseInt` method + // https://tc39.github.io/ecma262/#sec-parseint-string-radix + _export({ global: true, forced: parseInt != _parseInt }, { + parseInt: _parseInt + }); + + // `RegExp.prototype.flags` getter implementation + // https://tc39.github.io/ecma262/#sec-get-regexp.prototype.flags + var regexpFlags = function () { + var that = anObject(this); + var result = ''; + if (that.global) result += 'g'; + if (that.ignoreCase) result += 'i'; + if (that.multiline) result += 'm'; + if (that.unicode) result += 'u'; + if (that.sticky) result += 'y'; + return result; + }; + + var nativeExec = RegExp.prototype.exec; + // This always refers to the native implementation, because the + // String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js, + // which loads this file before patching the method. + var nativeReplace = String.prototype.replace; + + var patchedExec = nativeExec; + + var UPDATES_LAST_INDEX_WRONG = (function () { + var re1 = /a/; + var re2 = /b*/g; + nativeExec.call(re1, 'a'); + nativeExec.call(re2, 'a'); + return re1.lastIndex !== 0 || re2.lastIndex !== 0; + })(); + + // nonparticipating capturing group, copied from es5-shim's String#split patch. + var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined; + + var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED; + + if (PATCH) { + patchedExec = function exec(str) { + var re = this; + var lastIndex, reCopy, match, i; + + if (NPCG_INCLUDED) { + reCopy = new RegExp('^' + re.source + '$(?!\\s)', regexpFlags.call(re)); + } + if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex; + + match = nativeExec.call(re, str); + + if (UPDATES_LAST_INDEX_WRONG && match) { + re.lastIndex = re.global ? match.index + match[0].length : lastIndex; + } + if (NPCG_INCLUDED && match && match.length > 1) { + // Fix browsers whose `exec` methods don't consistently return `undefined` + // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/ + nativeReplace.call(match[0], reCopy, function () { + for (i = 1; i < arguments.length - 2; i++) { + if (arguments[i] === undefined) match[i] = undefined; + } + }); + } + + return match; + }; + } + + var regexpExec = patchedExec; + + _export({ target: 'RegExp', proto: true, forced: /./.exec !== regexpExec }, { + exec: regexpExec + }); + + // CONVERT_TO_STRING: true -> String#at + // CONVERT_TO_STRING: false -> String#codePointAt + var stringAt = function (that, pos, CONVERT_TO_STRING) { + var S = String(requireObjectCoercible(that)); + var position = toInteger(pos); + var size = S.length; + var first, second; + if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined; + first = S.charCodeAt(position); + return first < 0xD800 || first > 0xDBFF || position + 1 === size + || (second = S.charCodeAt(position + 1)) < 0xDC00 || second > 0xDFFF + ? CONVERT_TO_STRING ? S.charAt(position) : first + : CONVERT_TO_STRING ? S.slice(position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000; + }; + + // `AdvanceStringIndex` abstract operation + // https://tc39.github.io/ecma262/#sec-advancestringindex + var advanceStringIndex = function (S, index, unicode) { + return index + (unicode ? stringAt(S, index, true).length : 1); + }; + + // `RegExpExec` abstract operation + // https://tc39.github.io/ecma262/#sec-regexpexec + var regexpExecAbstract = function (R, S) { + var exec = R.exec; + if (typeof exec === 'function') { + var result = exec.call(R, S); + if (typeof result !== 'object') { + throw TypeError('RegExp exec method returned something other than an Object or null'); + } + return result; + } + + if (classofRaw(R) !== 'RegExp') { + throw TypeError('RegExp#exec called on incompatible receiver'); + } + + return regexpExec.call(R, S); + }; + + var SPECIES$2 = wellKnownSymbol('species'); + + var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () { + // #replace needs built-in support for named groups. + // #match works fine because it just return the exec results, even if it has + // a "grops" property. + var re = /./; + re.exec = function () { + var result = []; + result.groups = { a: '7' }; + return result; + }; + return ''.replace(re, '$') !== '7'; + }); + + // Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec + // Weex JS has frozen built-in prototypes, so use try / catch wrapper + var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () { + var re = /(?:)/; + var originalExec = re.exec; + re.exec = function () { return originalExec.apply(this, arguments); }; + var result = 'ab'.split(re); + return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b'; + }); + + var fixRegexpWellKnownSymbolLogic = function (KEY, length, exec, sham) { + var SYMBOL = wellKnownSymbol(KEY); + + var DELEGATES_TO_SYMBOL = !fails(function () { + // String methods call symbol-named RegEp methods + var O = {}; + O[SYMBOL] = function () { return 7; }; + return ''[KEY](O) != 7; + }); + + var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails(function () { + // Symbol-named RegExp methods call .exec + var execCalled = false; + var re = /a/; + re.exec = function () { execCalled = true; return null; }; + + if (KEY === 'split') { + // RegExp[@@split] doesn't call the regex's exec method, but first creates + // a new one. We need to return the patched regex when creating the new one. + re.constructor = {}; + re.constructor[SPECIES$2] = function () { return re; }; + } + + re[SYMBOL](''); + return !execCalled; + }); + + if ( + !DELEGATES_TO_SYMBOL || + !DELEGATES_TO_EXEC || + (KEY === 'replace' && !REPLACE_SUPPORTS_NAMED_GROUPS) || + (KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC) + ) { + var nativeRegExpMethod = /./[SYMBOL]; + var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) { + if (regexp.exec === regexpExec) { + if (DELEGATES_TO_SYMBOL && !forceStringMethod) { + // The native String method already delegates to @@method (this + // polyfilled function), leasing to infinite recursion. + // We avoid it by directly calling the native @@method method. + return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) }; + } + return { done: true, value: nativeMethod.call(str, regexp, arg2) }; + } + return { done: false }; + }); + var stringMethod = methods[0]; + var regexMethod = methods[1]; + + redefine(String.prototype, KEY, stringMethod); + redefine(RegExp.prototype, SYMBOL, length == 2 + // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue) + // 21.2.5.11 RegExp.prototype[@@split](string, limit) + ? function (string, arg) { return regexMethod.call(string, this, arg); } + // 21.2.5.6 RegExp.prototype[@@match](string) + // 21.2.5.9 RegExp.prototype[@@search](string) + : function (string) { return regexMethod.call(string, this); } + ); + if (sham) hide(RegExp.prototype[SYMBOL], 'sham', true); + } + }; + + var max$1 = Math.max; + var min$2 = Math.min; + var floor$1 = Math.floor; + var SUBSTITUTION_SYMBOLS = /\$([$&`']|\d\d?|<[^>]*>)/g; + var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&`']|\d\d?)/g; + + var maybeToString = function (it) { + return it === undefined ? it : String(it); + }; + + // @@replace logic + fixRegexpWellKnownSymbolLogic( + 'replace', + 2, + function (REPLACE, nativeReplace, maybeCallNative) { + return [ + // `String.prototype.replace` method + // https://tc39.github.io/ecma262/#sec-string.prototype.replace + function replace(searchValue, replaceValue) { + var O = requireObjectCoercible(this); + var replacer = searchValue == undefined ? undefined : searchValue[REPLACE]; + return replacer !== undefined + ? replacer.call(searchValue, O, replaceValue) + : nativeReplace.call(String(O), searchValue, replaceValue); + }, + // `RegExp.prototype[@@replace]` method + // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@replace + function (regexp, replaceValue) { + var res = maybeCallNative(nativeReplace, regexp, this, replaceValue); + if (res.done) return res.value; + + var rx = anObject(regexp); + var S = String(this); + + var functionalReplace = typeof replaceValue === 'function'; + if (!functionalReplace) replaceValue = String(replaceValue); + + var global = rx.global; + if (global) { + var fullUnicode = rx.unicode; + rx.lastIndex = 0; + } + var results = []; + while (true) { + var result = regexpExecAbstract(rx, S); + if (result === null) break; + + results.push(result); + if (!global) break; + + var matchStr = String(result[0]); + if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode); + } + + var accumulatedResult = ''; + var nextSourcePosition = 0; + for (var i = 0; i < results.length; i++) { + result = results[i]; + + var matched = String(result[0]); + var position = max$1(min$2(toInteger(result.index), S.length), 0); + var captures = []; + // NOTE: This is equivalent to + // captures = result.slice(1).map(maybeToString) + // but for some reason `nativeSlice.call(result, 1, result.length)` (called in + // the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and + // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it. + for (var j = 1; j < result.length; j++) captures.push(maybeToString(result[j])); + var namedCaptures = result.groups; + if (functionalReplace) { + var replacerArgs = [matched].concat(captures, position, S); + if (namedCaptures !== undefined) replacerArgs.push(namedCaptures); + var replacement = String(replaceValue.apply(undefined, replacerArgs)); + } else { + replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue); + } + if (position >= nextSourcePosition) { + accumulatedResult += S.slice(nextSourcePosition, position) + replacement; + nextSourcePosition = position + matched.length; + } + } + return accumulatedResult + S.slice(nextSourcePosition); + } + ]; + + // https://tc39.github.io/ecma262/#sec-getsubstitution + function getSubstitution(matched, str, position, captures, namedCaptures, replacement) { + var tailPos = position + matched.length; + var m = captures.length; + var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED; + if (namedCaptures !== undefined) { + namedCaptures = toObject(namedCaptures); + symbols = SUBSTITUTION_SYMBOLS; + } + return nativeReplace.call(replacement, symbols, function (match, ch) { + var capture; + switch (ch.charAt(0)) { + case '$': return '$'; + case '&': return matched; + case '`': return str.slice(0, position); + case "'": return str.slice(tailPos); + case '<': + capture = namedCaptures[ch.slice(1, -1)]; + break; + default: // \d\d? + var n = +ch; + if (n === 0) return match; + if (n > m) { + var f = floor$1(n / 10); + if (f === 0) return match; + if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1); + return match; + } + capture = captures[n - 1]; + } + return capture === undefined ? '' : capture; + }); + } + } + ); + + function _typeof(obj) { + if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { + _typeof = function (obj) { + return typeof obj; + }; + } else { + _typeof = function (obj) { + return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; + }; + } + + return _typeof(obj); + } + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } + } + + function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + + function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; + } + + /** + * @author zhixin wen + * https://github.com/wenzhixin/bootstrap-show-password + * version: 1.2.1 + */ + + var bootstrapVersion = 4; + + try { + var rawVersion = $.fn.dropdown.Constructor.VERSION; // Only try to parse VERSION if is is defined. + // It is undefined in older versions of Bootstrap (tested with 3.1.1). + + if (rawVersion !== undefined) { + bootstrapVersion = parseInt(rawVersion, 10); + } + } catch (e) {// ignore + } + + var Constants = { + html: { + inputGroups: { + 3: ['', ''], + 4: ['
'] + }[bootstrapVersion] + } // TOOLS DEFINITION + // ====================== + // it only does '%s', and return '' when arguments are undefined + + }; + + var sprintf = function sprintf(str) { + var args = arguments; + var flag = true; + var i = 1; + str = str.replace(/%s/g, function () { + var arg = args[i++]; + + if (typeof arg === 'undefined') { + flag = false; + return ''; + } + + return arg; + }); + + if (flag) { + return str; + } + + return ''; + }; + + var Password = + /*#__PURE__*/ + function () { + function Password(element, options) { + _classCallCheck(this, Password); + + this.options = options; + this.$element = $(element); + this.isShown = false; + this.init(); + } + + _createClass(Password, [{ + key: "init", + value: function init() { + var placementFuc; + var inputClass; + + if (this.options.placement === 'before') { + placementFuc = 'insertBefore'; + inputClass = 'input-group-prepend'; + } else { + this.options.placement = 'after'; // default to after + + placementFuc = 'insertAfter'; + inputClass = 'input-group-append'; + } // Create the text, icon and assign + + + this.$element.wrap("
")); + this.$text = $('')[placementFuc](this.$element).attr('class', this.$element.attr('class')).attr('style', this.$element.attr('style')).attr('placeholder', this.$element.attr('placeholder')).attr('maxlength', this.$element.attr('maxlength')).attr('disabled', this.$element.attr('disabled')).css('display', this.$element.css('display')).val(this.$element.val()).hide(); // Copy readonly attribute if it's set + + if (this.$element.prop('readonly')) this.$text.prop('readonly', true); + this.$icon = $(["".concat(sprintf(Constants.html.inputGroups[0], inputClass, this.options.message), "\n \n ").concat(this.options.eyeClassPositionInside ? this.options.eyeOpenClass : '', "\n "), Constants.html.inputGroups[1]].join(''))[placementFuc](this.$text).css('cursor', 'pointer'); // events + + this.$text.off('keyup').on('keyup', $.proxy(function () { + if (!this.isShown) return; + this.$element.val(this.$text.val()).trigger('change'); + }, this)); + this.$icon.off('click').on('click', $.proxy(function () { + this.$text.val(this.$element.val()).trigger('change'); + this.toggle(); + }, this)); + } + }, { + key: "toggle", + value: function toggle(_relatedTarget) { + this[!this.isShown ? 'show' : 'hide'](_relatedTarget); + } + }, { + key: "show", + value: function show(_relatedTarget) { + var e = $.Event('show.bs.password', { + relatedTarget: _relatedTarget + }); + this.$element.trigger(e); + this.isShown = true; + this.$element.hide(); + this.$text.show(); + + if (this.options.eyeClassPositionInside) { + this.$icon.find('i,svg').removeClass('icon-eye-open').addClass('icon-eye-close').html(this.options.eyeCloseClass); + } else { + this.$icon.find('i,svg').removeClass("icon-eye-open ".concat(this.options.eyeOpenClass)).addClass("icon-eye-close ".concat(this.options.eyeCloseClass)); + } + + this.$text[this.options.placement](this.$element); + } + }, { + key: "hide", + value: function hide(_relatedTarget) { + var e = $.Event('hide.bs.password', { + relatedTarget: _relatedTarget + }); + this.$element.trigger(e); + this.isShown = false; + this.$element.show(); + this.$text.hide(); + + if (this.options.eyeClassPositionInside) { + this.$icon.find('i,svg').removeClass('icon-eye-close').addClass('icon-eye-open').html(this.options.eyeOpenClass); + } else { + this.$icon.find('i,svg').removeClass("icon-eye-close ".concat(this.options.eyeCloseClass)).addClass("icon-eye-open ".concat(this.options.eyeOpenClass)); + } + + this.$element[this.options.placement](this.$text); + } + }, { + key: "val", + value: function val(value) { + if (typeof value === 'undefined') { + return this.$element.val(); + } + + this.$element.val(value).trigger('change'); + this.$text.val(value); + } + }, { + key: "focus", + value: function focus() { + this.$element.focus(); + } + }]); + + return Password; + }(); + + Password.DEFAULTS = { + placement: 'after', + // 'before' or 'after' + message: 'Click here to show/hide password', + size: undefined, + // '', 'sm', 'large' + eyeClass: 'fa', + // 'glyphicon', + eyeOpenClass: 'fa-eye', + // 'glyphicon-eye-open', + eyeCloseClass: 'fa-eye-slash', + // 'glyphicon-eye-close', + eyeClassPositionInside: false // PASSWORD PLUGIN DEFINITION + // ======================= + + }; + var old = $.fn.password; + + $.fn.password = function () { + var option = arguments[0]; // public function + + var args = arguments; + var value; + var allowedMethods = ['show', 'hide', 'toggle', 'val', 'focus']; + this.each(function () { + var $this = $(this); + var data = $this.data('bs.password'); + var options = $.extend({}, Password.DEFAULTS, $this.data(), _typeof(option) === 'object' && option); + + if (typeof option === 'string') { + if ($.inArray(option, allowedMethods) < 0) { + throw new Error("Unknown method: ".concat(option)); + } + + value = data[option](args[1]); + } else { + if (!data) { + data = new Password($this, options); + $this.data('bs.password', data); + } else { + data.init(options); + } + } + }); + return value ? value : this; + }; + + $.fn.password.Constructor = Password; // PASSWORD NO CONFLICT + // ================= + + $.fn.password.noConflict = function () { + $.fn.password = old; + return this; + }; + + $(function () { + $('[data-toggle="password"]').password(); + }); + +})); diff --git a/vendor/bootstrap-showpassword/bootstrap-show-password.min.js b/vendor/bootstrap-showpassword/bootstrap-show-password.min.js new file mode 100644 index 00000000..254281d4 --- /dev/null +++ b/vendor/bootstrap-showpassword/bootstrap-show-password.min.js @@ -0,0 +1,10 @@ +/** + * bootstrap-show-password - Show/hide password plugin for twitter bootstrap. + * + * @version v1.2.1 + * @homepage https://github.com/wenzhixin/bootstrap-show-password + * @author zhixin wen + * @license MIT + */ + +(function(a,b){"object"==typeof exports&&"undefined"!=typeof module?b(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],b):(a=a||self,b(a.jQuery))})(this,function(a){'use strict';var h=Math.max,i=Math.min,j=Math.floor;function b(a,b){return b={exports:{}},a(b,b.exports),b.exports}function c(a){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},c(a)}function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function e(a,b){for(var c,d=0;dc?h(c+b,0):i(c,b)},ya=function(a){return function(b,c,d){var e,f=ca(b),g=v(f.length),h=xa(d,g);if(a&&c!=c){for(;g>h;)if(e=f[h++],e!=e)return!0;}else for(;g>h;h++)if((a||h in f)&&f[h]===c)return a||h||0;return!a&&-1}}(!1),za=function(a,b){var c,d=ca(a),e=0,f=[];for(c in d)!ea(na,c)&&ea(d,c)&&f.push(c);for(;b.length>e;)ea(d,c=b[e++])&&(~ya(f,c)||f.push(c));return f},Aa=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Ba=Aa.concat("length","prototype"),Ca=Object.getOwnPropertyNames||function(a){return za(a,Ba)},Da={f:Ca},Ea=Object.getOwnPropertySymbols,Fa={f:Ea},Ga=z.Reflect,Ha=Ga&&Ga.ownKeys||function(a){var b=Da.f(E(a)),c=Fa.f;return c?b.concat(c(a)):b},Ia=function(a,b){for(var c,d=Ha(b),e=f.f,g=ha.f,h=0;hSa)throw TypeError(Ta);for(b=0;b=Sa)throw TypeError(Ta);I(g,h++,e)}return g.length=h,g}});var Xa=function(a){if("function"!=typeof a)throw TypeError(a+" is not a function");return a},Ya=function(d,e,f){return(Xa(d),void 0===e)?d:0===f?function(){return d.call(e)}:1===f?function(b){return d.call(e,b)}:2===f?function(c,a){return d.call(e,c,a)}:3===f?function(f,a,b){return d.call(e,f,a,b)}:function(){return d.apply(e,arguments)}},Za=Object.keys||function(a){return za(a,Aa)},$a=y?Object.defineProperties:function(a,b){E(a);for(var c,d=Za(b),e=d.length,g=0;e>g;)f.f(a,c=d[g++],b[c]);return a},_a=z.document,ab=_a&&_a.documentElement,bb=ma("IE_PROTO"),cb="prototype",db=function(){},eb=function(){var a,b=C("iframe"),c=Aa.length,d="<",e="script",f=">";for(b.style.display="none",ab.appendChild(b),b.src="java"+e+":"+"",a=b.contentWindow.document,a.open(),a.write(d+e+f+"document.F=Object"+d+"/"+e+f),a.close(),eb=a.F;c--;)delete eb[cb][Aa[c]];return eb()},fb=Object.create||function(a,b){var c;return null===a?c=eb():(db[cb]=E(a),c=new db,db[cb]=null,c[bb]=a),void 0===b?c:$a(c,b)};na[bb]=!0;var gb=S("unscopables"),hb=Array.prototype;hb[gb]==null&&J(hb,gb,fb(null));var ib=function(a,b){var c=1==a,d=4==a,e=6==a,f=b||U;return function(b,g,h){for(var i,j,k=s(b),l=ba(k),m=Ya(g,h,3),n=v(l.length),o=0,p=c?f(b,n):2==a?f(b,0):void 0;n>o;o++)if((5==a||e||o in l)&&(i=l[o],j=m(i,o,k),a))if(c)p[o]=j;else if(j)switch(a){case 3:return!0;case 5:return i;case 6:return o;case 2:p.push(i);}else if(d)return!1;return e?-1:3==a||d?d:p}}(5),jb="find",kb=!0;jb in[]&&[,][jb](function(){kb=!1}),Qa({target:"Array",proto:!0,forced:kb},{find:function(a){return ib(this,a,1>>0||(tb.test(c)?16:10))}:sb;Qa({global:!0,forced:parseInt!=vb},{parseInt:vb});var wb=function(){var a=E(this),b="";return a.global&&(b+="g"),a.ignoreCase&&(b+="i"),a.multiline&&(b+="m"),a.unicode&&(b+="u"),a.sticky&&(b+="y"),b},xb=RegExp.prototype.exec,yb=String.prototype.replace,zb=xb,Ab=function(){var a=/a/,b=/b*/g;return xb.call(a,"a"),xb.call(b,"a"),0!==a.lastIndex||0!==b.lastIndex}(),Bb=/()??/.exec("")[1]!==void 0;(Ab||Bb)&&(zb=function(a){var b,c,d,e,f=this;return Bb&&(c=new RegExp("^"+f.source+"$(?!\\s)",wb.call(f))),Ab&&(b=f.lastIndex),d=xb.call(f,a),Ab&&d&&(f.lastIndex=f.global?d.index+d[0].length:b),Bb&&d&&1g||g>=h?c?"":void 0:(d=f.charCodeAt(g),55296>d||56319(e=f.charCodeAt(g+1))||57343")}),Ib=!x(function(){var a=/(?:)/,b=a.exec;a.exec=function(){return b.apply(this,arguments)};var c="ab".split(a);return 2!==c.length||"a"!==c[0]||"b"!==c[1]}),Jb=/\$([$&`']|\d\d?|<[^>]*>)/g,Kb=/\$([$&`']|\d\d?)/g,Lb=function(a){return a===void 0?a:a+""};(function(a,b,c,d){var e=S(a),f=!x(function(){var b={};return b[e]=function(){return 7},7!=""[a](b)}),g=f&&!x(function(){var b=!1,c=/a/;return c.exec=function(){return b=!0,null},"split"===a&&(c.constructor={},c.constructor[Gb]=function(){return c}),c[e](""),!b});if(!f||!g||"replace"===a&&!Hb||"split"===a&&!Ib){var h=/./[e],i=c(e,""[a],function(a,b,c,d,e){return b.exec===Cb?f&&!e?{done:!0,value:h.call(b,c,d)}:{done:!0,value:a.call(c,b,d)}:{done:!1}}),j=i[0],k=i[1];wa(String.prototype,a,j),wa(RegExp.prototype,e,2==b?function(a,b){return k.call(a,this,b)}:function(a){return k.call(a,this)}),d&&J(RegExp.prototype[e],"sham",!0)}})("replace",2,function(a,b,c){function d(a,c,d,e,g,h){var i=d+a.length,k=e.length,f=Kb;return void 0!==g&&(g=s(g),f=Jb),b.call(h,f,function(b,h){var l;switch(h.charAt(0)){case"$":return"$";case"&":return a;case"`":return c.slice(0,d);case"'":return c.slice(i);case"<":l=g[h.slice(1,-1)];break;default:var m=+h;if(0==m)return b;if(m>k){var n=j(m/10);return 0===n?b:n<=k?void 0===e[n-1]?h.charAt(1):e[n-1]+h.charAt(1):b}l=e[m-1];}return void 0===l?"":l})}return[function(c,d){var e=r(this),f=c==null?void 0:c[a];return f===void 0?b.call(e+"",c,d):f.call(c,e,d)},function(a,e){var f=c(b,a,this,e);if(f.done)return f.value;var g=E(a),k=this+"",l="function"==typeof e;l||(e=e+"");var m=g.global;if(m){var n=g.unicode;g.lastIndex=0}for(var o,p=[];(o=Fb(g,k),null!==o)&&!(p.push(o),!m);){var q=o[0]+"";""==q&&(g.lastIndex=Eb(k,v(g.lastIndex),n))}for(var r="",s=0,t=0;t=s&&(r+=k.slice(s,x)+C,s=x+w.length)}return r+k.slice(s)}]});var Mb=4;try{var Nb=a.fn.dropdown.Constructor.VERSION;Nb!==void 0&&(Mb=parseInt(Nb,10))}catch(a){}var Ob={html:{inputGroups:{3:["",""],4:["
"]}[Mb]}},Pb=function(a){var b=arguments,c=!0,d=1;return a=a.replace(/%s/g,function(){var a=b[d++];return"undefined"==typeof a?(c=!1,""):a}),c?a:""},Qb=function(){function b(c,e){d(this,b),this.options=e,this.$element=a(c),this.isShown=!1,this.init()}return g(b,[{key:"init",value:function(){var b,c;"before"===this.options.placement?(b="insertBefore",c="input-group-prepend"):(this.options.placement="after",b="insertAfter",c="input-group-append"),this.$element.wrap("
")),this.$text=a("")[b](this.$element).attr("class",this.$element.attr("class")).attr("style",this.$element.attr("style")).attr("placeholder",this.$element.attr("placeholder")).attr("maxlength",this.$element.attr("maxlength")).attr("disabled",this.$element.attr("disabled")).css("display",this.$element.css("display")).val(this.$element.val()).hide(),this.$element.prop("readonly")&&this.$text.prop("readonly",!0),this.$icon=a(["".concat(Pb(Ob.html.inputGroups[0],c,this.options.message),"\n \n ").concat(this.options.eyeClassPositionInside?this.options.eyeOpenClass:"","\n "),Ob.html.inputGroups[1]].join(""))[b](this.$text).css("cursor","pointer"),this.$text.off("keyup").on("keyup",a.proxy(function(){this.isShown&&this.$element.val(this.$text.val()).trigger("change")},this)),this.$icon.off("click").on("click",a.proxy(function(){this.$text.val(this.$element.val()).trigger("change"),this.toggle()},this))}},{key:"toggle",value:function(a){this[this.isShown?"hide":"show"](a)}},{key:"show",value:function(b){var c=a.Event("show.bs.password",{relatedTarget:b});this.$element.trigger(c),this.isShown=!0,this.$element.hide(),this.$text.show(),this.options.eyeClassPositionInside?this.$icon.find("i,svg").removeClass("icon-eye-open").addClass("icon-eye-close").html(this.options.eyeCloseClass):this.$icon.find("i,svg").removeClass("icon-eye-open ".concat(this.options.eyeOpenClass)).addClass("icon-eye-close ".concat(this.options.eyeCloseClass)),this.$text[this.options.placement](this.$element)}},{key:"hide",value:function(b){var c=a.Event("hide.bs.password",{relatedTarget:b});this.$element.trigger(c),this.isShown=!1,this.$element.show(),this.$text.hide(),this.options.eyeClassPositionInside?this.$icon.find("i,svg").removeClass("icon-eye-close").addClass("icon-eye-open").html(this.options.eyeOpenClass):this.$icon.find("i,svg").removeClass("icon-eye-close ".concat(this.options.eyeCloseClass)).addClass("icon-eye-open ".concat(this.options.eyeOpenClass)),this.$element[this.options.placement](this.$text)}},{key:"val",value:function(a){return"undefined"==typeof a?this.$element.val():void(this.$element.val(a).trigger("change"),this.$text.val(a))}},{key:"focus",value:function(){this.$element.focus()}}]),b}();Qb.DEFAULTS={placement:"after",message:"Click here to show/hide password",size:void 0,eyeClass:"fa",eyeOpenClass:"fa-eye",eyeCloseClass:"fa-eye-slash",eyeClassPositionInside:!1};var Rb=a.fn.password;a.fn.password=function(){var b,d=arguments[0],e=arguments,f=["show","hide","toggle","val","focus"];return this.each(function(){var g=a(this),h=g.data("bs.password"),i=a.extend({},Qb.DEFAULTS,g.data(),"object"===c(d)&&d);if("string"==typeof d){if(0>a.inArray(d,f))throw new Error("Unknown method: ".concat(d));b=h[d](e[1])}else h?h.init(i):(h=new Qb(g,i),g.data("bs.password",h))}),b?b:this},a.fn.password.Constructor=Qb,a.fn.password.noConflict=function(){return a.fn.password=Rb,this},a(function(){a("[data-toggle=\"password\"]").password()})}); diff --git a/vendor/daterangepicker/.gitignore b/vendor/daterangepicker/.gitignore new file mode 100644 index 00000000..e312bef5 --- /dev/null +++ b/vendor/daterangepicker/.gitignore @@ -0,0 +1,6 @@ +bower_components +node_modules +npm-debug.log +*.sublime-workspace +*.sublime-project +*.sw[onp] diff --git a/vendor/daterangepicker/README.md b/vendor/daterangepicker/README.md new file mode 100644 index 00000000..04145827 --- /dev/null +++ b/vendor/daterangepicker/README.md @@ -0,0 +1,38 @@ +# Date Range Picker + +![Improvely.com](https://i.imgur.com/UTRlaar.png) + +This date range picker component creates a dropdown menu from which a user can +select a range of dates. I created it while building the UI for [Improvely](http://www.improvely.com), +which needed a way to select date ranges for reports. + +Features include limiting the selectable date range, localizable strings and date formats, +a single date picker mode, a time picker, and predefined date ranges. + +## [Documentation and Live Usage Examples](http://www.daterangepicker.com) + +## [See It In a Live Application](https://awio.iljmp.com/5/drpdemogh) + +## License + +The MIT License (MIT) + +Copyright (c) 2012-2019 Dan Grossman + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/vendor/daterangepicker/bower.json b/vendor/daterangepicker/bower.json new file mode 100644 index 00000000..f3b7ba65 --- /dev/null +++ b/vendor/daterangepicker/bower.json @@ -0,0 +1,20 @@ +{ + "name": "daterangepicker", + "main": [ + "daterangepicker.js", + "daterangepicker.css" + ], + "ignore": [ + "**/.*", + "node_modules", + "bower_components", + "test", + "tests", + "moment.js", + "moment.min.js" + ], + "dependencies": { + "jquery": "1.9.1 - 3", + "moment": ">=2.9.0" + } +} diff --git a/vendor/daterangepicker/daterangepicker.css b/vendor/daterangepicker/daterangepicker.css new file mode 100644 index 00000000..a9638049 --- /dev/null +++ b/vendor/daterangepicker/daterangepicker.css @@ -0,0 +1,410 @@ +.daterangepicker { + position: absolute; + color: inherit; + background-color: #fff; + border-radius: 4px; + border: 1px solid #ddd; + width: 278px; + max-width: none; + padding: 0; + margin-top: 7px; + top: 100px; + left: 20px; + z-index: 3001; + display: none; + font-family: arial; + font-size: 15px; + line-height: 1em; +} + +.daterangepicker:before, .daterangepicker:after { + position: absolute; + display: inline-block; + border-bottom-color: rgba(0, 0, 0, 0.2); + content: ''; +} + +.daterangepicker:before { + top: -7px; + border-right: 7px solid transparent; + border-left: 7px solid transparent; + border-bottom: 7px solid #ccc; +} + +.daterangepicker:after { + top: -6px; + border-right: 6px solid transparent; + border-bottom: 6px solid #fff; + border-left: 6px solid transparent; +} + +.daterangepicker.opensleft:before { + right: 9px; +} + +.daterangepicker.opensleft:after { + right: 10px; +} + +.daterangepicker.openscenter:before { + left: 0; + right: 0; + width: 0; + margin-left: auto; + margin-right: auto; +} + +.daterangepicker.openscenter:after { + left: 0; + right: 0; + width: 0; + margin-left: auto; + margin-right: auto; +} + +.daterangepicker.opensright:before { + left: 9px; +} + +.daterangepicker.opensright:after { + left: 10px; +} + +.daterangepicker.drop-up { + margin-top: -7px; +} + +.daterangepicker.drop-up:before { + top: initial; + bottom: -7px; + border-bottom: initial; + border-top: 7px solid #ccc; +} + +.daterangepicker.drop-up:after { + top: initial; + bottom: -6px; + border-bottom: initial; + border-top: 6px solid #fff; +} + +.daterangepicker.single .daterangepicker .ranges, .daterangepicker.single .drp-calendar { + float: none; +} + +.daterangepicker.single .drp-selected { + display: none; +} + +.daterangepicker.show-calendar .drp-calendar { + display: block; +} + +.daterangepicker.show-calendar .drp-buttons { + display: block; +} + +.daterangepicker.auto-apply .drp-buttons { + display: none; +} + +.daterangepicker .drp-calendar { + display: none; + max-width: 270px; +} + +.daterangepicker .drp-calendar.left { + padding: 8px 0 8px 8px; +} + +.daterangepicker .drp-calendar.right { + padding: 8px; +} + +.daterangepicker .drp-calendar.single .calendar-table { + border: none; +} + +.daterangepicker .calendar-table .next span, .daterangepicker .calendar-table .prev span { + color: #fff; + border: solid black; + border-width: 0 2px 2px 0; + border-radius: 0; + display: inline-block; + padding: 3px; +} + +.daterangepicker .calendar-table .next span { + transform: rotate(-45deg); + -webkit-transform: rotate(-45deg); +} + +.daterangepicker .calendar-table .prev span { + transform: rotate(135deg); + -webkit-transform: rotate(135deg); +} + +.daterangepicker .calendar-table th, .daterangepicker .calendar-table td { + white-space: nowrap; + text-align: center; + vertical-align: middle; + min-width: 32px; + width: 32px; + height: 24px; + line-height: 24px; + font-size: 12px; + border-radius: 4px; + border: 1px solid transparent; + white-space: nowrap; + cursor: pointer; +} + +.daterangepicker .calendar-table { + border: 1px solid #fff; + border-radius: 4px; + background-color: #fff; +} + +.daterangepicker .calendar-table table { + width: 100%; + margin: 0; + border-spacing: 0; + border-collapse: collapse; +} + +.daterangepicker td.available:hover, .daterangepicker th.available:hover { + background-color: #eee; + border-color: transparent; + color: inherit; +} + +.daterangepicker td.week, .daterangepicker th.week { + font-size: 80%; + color: #ccc; +} + +.daterangepicker td.off, .daterangepicker td.off.in-range, .daterangepicker td.off.start-date, .daterangepicker td.off.end-date { + background-color: #fff; + border-color: transparent; + color: #999; +} + +.daterangepicker td.in-range { + background-color: #ebf4f8; + border-color: transparent; + color: #000; + border-radius: 0; +} + +.daterangepicker td.start-date { + border-radius: 4px 0 0 4px; +} + +.daterangepicker td.end-date { + border-radius: 0 4px 4px 0; +} + +.daterangepicker td.start-date.end-date { + border-radius: 4px; +} + +.daterangepicker td.active, .daterangepicker td.active:hover { + background-color: #357ebd; + border-color: transparent; + color: #fff; +} + +.daterangepicker th.month { + width: auto; +} + +.daterangepicker td.disabled, .daterangepicker option.disabled { + color: #999; + cursor: not-allowed; + text-decoration: line-through; +} + +.daterangepicker select.monthselect, .daterangepicker select.yearselect { + font-size: 12px; + padding: 1px; + height: auto; + margin: 0; + cursor: default; +} + +.daterangepicker select.monthselect { + margin-right: 2%; + width: 56%; +} + +.daterangepicker select.yearselect { + width: 40%; +} + +.daterangepicker select.hourselect, .daterangepicker select.minuteselect, .daterangepicker select.secondselect, .daterangepicker select.ampmselect { + width: 50px; + margin: 0 auto; + background: #eee; + border: 1px solid #eee; + padding: 2px; + outline: 0; + font-size: 12px; +} + +.daterangepicker .calendar-time { + text-align: center; + margin: 4px auto 0 auto; + line-height: 30px; + position: relative; +} + +.daterangepicker .calendar-time select.disabled { + color: #ccc; + cursor: not-allowed; +} + +.daterangepicker .drp-buttons { + clear: both; + text-align: right; + padding: 8px; + border-top: 1px solid #ddd; + display: none; + line-height: 12px; + vertical-align: middle; +} + +.daterangepicker .drp-selected { + display: inline-block; + font-size: 12px; + padding-right: 8px; +} + +.daterangepicker .drp-buttons .btn { + margin-left: 8px; + font-size: 12px; + font-weight: bold; + padding: 4px 8px; +} + +.daterangepicker.show-ranges.single.rtl .drp-calendar.left { + border-right: 1px solid #ddd; +} + +.daterangepicker.show-ranges.single.ltr .drp-calendar.left { + border-left: 1px solid #ddd; +} + +.daterangepicker.show-ranges.rtl .drp-calendar.right { + border-right: 1px solid #ddd; +} + +.daterangepicker.show-ranges.ltr .drp-calendar.left { + border-left: 1px solid #ddd; +} + +.daterangepicker .ranges { + float: none; + text-align: left; + margin: 0; +} + +.daterangepicker.show-calendar .ranges { + margin-top: 8px; +} + +.daterangepicker .ranges ul { + list-style: none; + margin: 0 auto; + padding: 0; + width: 100%; +} + +.daterangepicker .ranges li { + font-size: 12px; + padding: 8px 12px; + cursor: pointer; +} + +.daterangepicker .ranges li:hover { + background-color: #eee; +} + +.daterangepicker .ranges li.active { + background-color: #08c; + color: #fff; +} + +/* Larger Screen Styling */ +@media (min-width: 564px) { + .daterangepicker { + width: auto; + } + + .daterangepicker .ranges ul { + width: 140px; + } + + .daterangepicker.single .ranges ul { + width: 100%; + } + + .daterangepicker.single .drp-calendar.left { + clear: none; + } + + .daterangepicker.single .ranges, .daterangepicker.single .drp-calendar { + float: left; + } + + .daterangepicker { + direction: ltr; + text-align: left; + } + + .daterangepicker .drp-calendar.left { + clear: left; + margin-right: 0; + } + + .daterangepicker .drp-calendar.left .calendar-table { + border-right: none; + border-top-right-radius: 0; + border-bottom-right-radius: 0; + } + + .daterangepicker .drp-calendar.right { + margin-left: 0; + } + + .daterangepicker .drp-calendar.right .calendar-table { + border-left: none; + border-top-left-radius: 0; + border-bottom-left-radius: 0; + } + + .daterangepicker .drp-calendar.left .calendar-table { + padding-right: 8px; + } + + .daterangepicker .ranges, .daterangepicker .drp-calendar { + float: left; + } +} + +@media (min-width: 730px) { + .daterangepicker .ranges { + width: auto; + } + + .daterangepicker .ranges { + float: left; + } + + .daterangepicker.rtl .ranges { + float: right; + } + + .daterangepicker .drp-calendar.left { + clear: none !important; + } +} diff --git a/vendor/daterangepicker/daterangepicker.js b/vendor/daterangepicker/daterangepicker.js new file mode 100644 index 00000000..6aac9665 --- /dev/null +++ b/vendor/daterangepicker/daterangepicker.js @@ -0,0 +1,1565 @@ +/** +* @version: 3.0.5 +* @author: Dan Grossman http://www.dangrossman.info/ +* @copyright: Copyright (c) 2012-2019 Dan Grossman. All rights reserved. +* @license: Licensed under the MIT license. See http://www.opensource.org/licenses/mit-license.php +* @website: http://www.daterangepicker.com/ +*/ +// Following the UMD template https://github.com/umdjs/umd/blob/master/templates/returnExportsGlobal.js +(function (root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Make globaly available as well + define(['moment', 'jquery'], function (moment, jquery) { + if (!jquery.fn) jquery.fn = {}; // webpack server rendering + if (typeof moment !== 'function' && moment.default) moment = moment.default + return factory(moment, jquery); + }); + } else if (typeof module === 'object' && module.exports) { + // Node / Browserify + //isomorphic issue + var jQuery = (typeof window != 'undefined') ? window.jQuery : undefined; + if (!jQuery) { + jQuery = require('jquery'); + if (!jQuery.fn) jQuery.fn = {}; + } + var moment = (typeof window != 'undefined' && typeof window.moment != 'undefined') ? window.moment : require('moment'); + module.exports = factory(moment, jQuery); + } else { + // Browser globals + root.daterangepicker = factory(root.moment, root.jQuery); + } +}(this, function(moment, $) { + var DateRangePicker = function(element, options, cb) { + + //default settings for options + this.parentEl = 'body'; + this.element = $(element); + this.startDate = moment().startOf('day'); + this.endDate = moment().endOf('day'); + this.minDate = false; + this.maxDate = false; + this.maxSpan = false; + this.autoApply = false; + this.singleDatePicker = false; + this.showDropdowns = false; + this.minYear = moment().subtract(100, 'year').format('YYYY'); + this.maxYear = moment().add(100, 'year').format('YYYY'); + this.showWeekNumbers = false; + this.showISOWeekNumbers = false; + this.showCustomRangeLabel = true; + this.timePicker = false; + this.timePicker24Hour = false; + this.timePickerIncrement = 1; + this.timePickerSeconds = false; + this.linkedCalendars = true; + this.autoUpdateInput = true; + this.alwaysShowCalendars = false; + this.ranges = {}; + + this.opens = 'right'; + if (this.element.hasClass('pull-right')) + this.opens = 'left'; + + this.drops = 'down'; + if (this.element.hasClass('dropup')) + this.drops = 'up'; + + this.buttonClasses = 'btn btn-sm'; + this.applyButtonClasses = 'btn-primary'; + this.cancelButtonClasses = 'btn-default'; + + this.locale = { + direction: 'ltr', + format: moment.localeData().longDateFormat('L'), + separator: ' - ', + applyLabel: 'Apply', + cancelLabel: 'Cancel', + weekLabel: 'W', + customRangeLabel: 'Custom Range', + daysOfWeek: moment.weekdaysMin(), + monthNames: moment.monthsShort(), + firstDay: moment.localeData().firstDayOfWeek() + }; + + this.callback = function() { }; + + //some state information + this.isShowing = false; + this.leftCalendar = {}; + this.rightCalendar = {}; + + //custom options from user + if (typeof options !== 'object' || options === null) + options = {}; + + //allow setting options with data attributes + //data-api options will be overwritten with custom javascript options + options = $.extend(this.element.data(), options); + + //html template for the picker UI + if (typeof options.template !== 'string' && !(options.template instanceof $)) + options.template = + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '' + + '' + + ' ' + + '
' + + '
'; + + this.parentEl = (options.parentEl && $(options.parentEl).length) ? $(options.parentEl) : $(this.parentEl); + this.container = $(options.template).appendTo(this.parentEl); + + // + // handle all the possible options overriding defaults + // + + if (typeof options.locale === 'object') { + + if (typeof options.locale.direction === 'string') + this.locale.direction = options.locale.direction; + + if (typeof options.locale.format === 'string') + this.locale.format = options.locale.format; + + if (typeof options.locale.separator === 'string') + this.locale.separator = options.locale.separator; + + if (typeof options.locale.daysOfWeek === 'object') + this.locale.daysOfWeek = options.locale.daysOfWeek.slice(); + + if (typeof options.locale.monthNames === 'object') + this.locale.monthNames = options.locale.monthNames.slice(); + + if (typeof options.locale.firstDay === 'number') + this.locale.firstDay = options.locale.firstDay; + + if (typeof options.locale.applyLabel === 'string') + this.locale.applyLabel = options.locale.applyLabel; + + if (typeof options.locale.cancelLabel === 'string') + this.locale.cancelLabel = options.locale.cancelLabel; + + if (typeof options.locale.weekLabel === 'string') + this.locale.weekLabel = options.locale.weekLabel; + + if (typeof options.locale.customRangeLabel === 'string'){ + //Support unicode chars in the custom range name. + var elem = document.createElement('textarea'); + elem.innerHTML = options.locale.customRangeLabel; + var rangeHtml = elem.value; + this.locale.customRangeLabel = rangeHtml; + } + } + this.container.addClass(this.locale.direction); + + if (typeof options.startDate === 'string') + this.startDate = moment(options.startDate, this.locale.format); + + if (typeof options.endDate === 'string') + this.endDate = moment(options.endDate, this.locale.format); + + if (typeof options.minDate === 'string') + this.minDate = moment(options.minDate, this.locale.format); + + if (typeof options.maxDate === 'string') + this.maxDate = moment(options.maxDate, this.locale.format); + + if (typeof options.startDate === 'object') + this.startDate = moment(options.startDate); + + if (typeof options.endDate === 'object') + this.endDate = moment(options.endDate); + + if (typeof options.minDate === 'object') + this.minDate = moment(options.minDate); + + if (typeof options.maxDate === 'object') + this.maxDate = moment(options.maxDate); + + // sanity check for bad options + if (this.minDate && this.startDate.isBefore(this.minDate)) + this.startDate = this.minDate.clone(); + + // sanity check for bad options + if (this.maxDate && this.endDate.isAfter(this.maxDate)) + this.endDate = this.maxDate.clone(); + + if (typeof options.applyButtonClasses === 'string') + this.applyButtonClasses = options.applyButtonClasses; + + if (typeof options.applyClass === 'string') //backwards compat + this.applyButtonClasses = options.applyClass; + + if (typeof options.cancelButtonClasses === 'string') + this.cancelButtonClasses = options.cancelButtonClasses; + + if (typeof options.cancelClass === 'string') //backwards compat + this.cancelButtonClasses = options.cancelClass; + + if (typeof options.maxSpan === 'object') + this.maxSpan = options.maxSpan; + + if (typeof options.dateLimit === 'object') //backwards compat + this.maxSpan = options.dateLimit; + + if (typeof options.opens === 'string') + this.opens = options.opens; + + if (typeof options.drops === 'string') + this.drops = options.drops; + + if (typeof options.showWeekNumbers === 'boolean') + this.showWeekNumbers = options.showWeekNumbers; + + if (typeof options.showISOWeekNumbers === 'boolean') + this.showISOWeekNumbers = options.showISOWeekNumbers; + + if (typeof options.buttonClasses === 'string') + this.buttonClasses = options.buttonClasses; + + if (typeof options.buttonClasses === 'object') + this.buttonClasses = options.buttonClasses.join(' '); + + if (typeof options.showDropdowns === 'boolean') + this.showDropdowns = options.showDropdowns; + + if (typeof options.minYear === 'number') + this.minYear = options.minYear; + + if (typeof options.maxYear === 'number') + this.maxYear = options.maxYear; + + if (typeof options.showCustomRangeLabel === 'boolean') + this.showCustomRangeLabel = options.showCustomRangeLabel; + + if (typeof options.singleDatePicker === 'boolean') { + this.singleDatePicker = options.singleDatePicker; + if (this.singleDatePicker) + this.endDate = this.startDate.clone(); + } + + if (typeof options.timePicker === 'boolean') + this.timePicker = options.timePicker; + + if (typeof options.timePickerSeconds === 'boolean') + this.timePickerSeconds = options.timePickerSeconds; + + if (typeof options.timePickerIncrement === 'number') + this.timePickerIncrement = options.timePickerIncrement; + + if (typeof options.timePicker24Hour === 'boolean') + this.timePicker24Hour = options.timePicker24Hour; + + if (typeof options.autoApply === 'boolean') + this.autoApply = options.autoApply; + + if (typeof options.autoUpdateInput === 'boolean') + this.autoUpdateInput = options.autoUpdateInput; + + if (typeof options.linkedCalendars === 'boolean') + this.linkedCalendars = options.linkedCalendars; + + if (typeof options.isInvalidDate === 'function') + this.isInvalidDate = options.isInvalidDate; + + if (typeof options.isCustomDate === 'function') + this.isCustomDate = options.isCustomDate; + + if (typeof options.alwaysShowCalendars === 'boolean') + this.alwaysShowCalendars = options.alwaysShowCalendars; + + // update day names order to firstDay + if (this.locale.firstDay != 0) { + var iterator = this.locale.firstDay; + while (iterator > 0) { + this.locale.daysOfWeek.push(this.locale.daysOfWeek.shift()); + iterator--; + } + } + + var start, end, range; + + //if no start/end dates set, check if an input element contains initial values + if (typeof options.startDate === 'undefined' && typeof options.endDate === 'undefined') { + if ($(this.element).is(':text')) { + var val = $(this.element).val(), + split = val.split(this.locale.separator); + + start = end = null; + + if (split.length == 2) { + start = moment(split[0], this.locale.format); + end = moment(split[1], this.locale.format); + } else if (this.singleDatePicker && val !== "") { + start = moment(val, this.locale.format); + end = moment(val, this.locale.format); + } + if (start !== null && end !== null) { + this.setStartDate(start); + this.setEndDate(end); + } + } + } + + if (typeof options.ranges === 'object') { + for (range in options.ranges) { + + if (typeof options.ranges[range][0] === 'string') + start = moment(options.ranges[range][0], this.locale.format); + else + start = moment(options.ranges[range][0]); + + if (typeof options.ranges[range][1] === 'string') + end = moment(options.ranges[range][1], this.locale.format); + else + end = moment(options.ranges[range][1]); + + // If the start or end date exceed those allowed by the minDate or maxSpan + // options, shorten the range to the allowable period. + if (this.minDate && start.isBefore(this.minDate)) + start = this.minDate.clone(); + + var maxDate = this.maxDate; + if (this.maxSpan && maxDate && start.clone().add(this.maxSpan).isAfter(maxDate)) + maxDate = start.clone().add(this.maxSpan); + if (maxDate && end.isAfter(maxDate)) + end = maxDate.clone(); + + // If the end of the range is before the minimum or the start of the range is + // after the maximum, don't display this range option at all. + if ((this.minDate && end.isBefore(this.minDate, this.timepicker ? 'minute' : 'day')) + || (maxDate && start.isAfter(maxDate, this.timepicker ? 'minute' : 'day'))) + continue; + + //Support unicode chars in the range names. + var elem = document.createElement('textarea'); + elem.innerHTML = range; + var rangeHtml = elem.value; + + this.ranges[rangeHtml] = [start, end]; + } + + var list = '
    '; + for (range in this.ranges) { + list += '
  • ' + range + '
  • '; + } + if (this.showCustomRangeLabel) { + list += '
  • ' + this.locale.customRangeLabel + '
  • '; + } + list += '
'; + this.container.find('.ranges').prepend(list); + } + + if (typeof cb === 'function') { + this.callback = cb; + } + + if (!this.timePicker) { + this.startDate = this.startDate.startOf('day'); + this.endDate = this.endDate.endOf('day'); + this.container.find('.calendar-time').hide(); + } + + //can't be used together for now + if (this.timePicker && this.autoApply) + this.autoApply = false; + + if (this.autoApply) { + this.container.addClass('auto-apply'); + } + + if (typeof options.ranges === 'object') + this.container.addClass('show-ranges'); + + if (this.singleDatePicker) { + this.container.addClass('single'); + this.container.find('.drp-calendar.left').addClass('single'); + this.container.find('.drp-calendar.left').show(); + this.container.find('.drp-calendar.right').hide(); + if (!this.timePicker) { + this.container.addClass('auto-apply'); + } + } + + if ((typeof options.ranges === 'undefined' && !this.singleDatePicker) || this.alwaysShowCalendars) { + this.container.addClass('show-calendar'); + } + + this.container.addClass('opens' + this.opens); + + //apply CSS classes and labels to buttons + this.container.find('.applyBtn, .cancelBtn').addClass(this.buttonClasses); + if (this.applyButtonClasses.length) + this.container.find('.applyBtn').addClass(this.applyButtonClasses); + if (this.cancelButtonClasses.length) + this.container.find('.cancelBtn').addClass(this.cancelButtonClasses); + this.container.find('.applyBtn').html(this.locale.applyLabel); + this.container.find('.cancelBtn').html(this.locale.cancelLabel); + + // + // event listeners + // + + this.container.find('.drp-calendar') + .on('click.daterangepicker', '.prev', $.proxy(this.clickPrev, this)) + .on('click.daterangepicker', '.next', $.proxy(this.clickNext, this)) + .on('mousedown.daterangepicker', 'td.available', $.proxy(this.clickDate, this)) + .on('mouseenter.daterangepicker', 'td.available', $.proxy(this.hoverDate, this)) + .on('change.daterangepicker', 'select.yearselect', $.proxy(this.monthOrYearChanged, this)) + .on('change.daterangepicker', 'select.monthselect', $.proxy(this.monthOrYearChanged, this)) + .on('change.daterangepicker', 'select.hourselect,select.minuteselect,select.secondselect,select.ampmselect', $.proxy(this.timeChanged, this)) + + this.container.find('.ranges') + .on('click.daterangepicker', 'li', $.proxy(this.clickRange, this)) + + this.container.find('.drp-buttons') + .on('click.daterangepicker', 'button.applyBtn', $.proxy(this.clickApply, this)) + .on('click.daterangepicker', 'button.cancelBtn', $.proxy(this.clickCancel, this)) + + if (this.element.is('input') || this.element.is('button')) { + this.element.on({ + 'click.daterangepicker': $.proxy(this.show, this), + 'focus.daterangepicker': $.proxy(this.show, this), + 'keyup.daterangepicker': $.proxy(this.elementChanged, this), + 'keydown.daterangepicker': $.proxy(this.keydown, this) //IE 11 compatibility + }); + } else { + this.element.on('click.daterangepicker', $.proxy(this.toggle, this)); + this.element.on('keydown.daterangepicker', $.proxy(this.toggle, this)); + } + + // + // if attached to a text input, set the initial value + // + + this.updateElement(); + + }; + + DateRangePicker.prototype = { + + constructor: DateRangePicker, + + setStartDate: function(startDate) { + if (typeof startDate === 'string') + this.startDate = moment(startDate, this.locale.format); + + if (typeof startDate === 'object') + this.startDate = moment(startDate); + + if (!this.timePicker) + this.startDate = this.startDate.startOf('day'); + + if (this.timePicker && this.timePickerIncrement) + this.startDate.minute(Math.round(this.startDate.minute() / this.timePickerIncrement) * this.timePickerIncrement); + + if (this.minDate && this.startDate.isBefore(this.minDate)) { + this.startDate = this.minDate.clone(); + if (this.timePicker && this.timePickerIncrement) + this.startDate.minute(Math.round(this.startDate.minute() / this.timePickerIncrement) * this.timePickerIncrement); + } + + if (this.maxDate && this.startDate.isAfter(this.maxDate)) { + this.startDate = this.maxDate.clone(); + if (this.timePicker && this.timePickerIncrement) + this.startDate.minute(Math.floor(this.startDate.minute() / this.timePickerIncrement) * this.timePickerIncrement); + } + + if (!this.isShowing) + this.updateElement(); + + this.updateMonthsInView(); + }, + + setEndDate: function(endDate) { + if (typeof endDate === 'string') + this.endDate = moment(endDate, this.locale.format); + + if (typeof endDate === 'object') + this.endDate = moment(endDate); + + if (!this.timePicker) + this.endDate = this.endDate.endOf('day'); + + if (this.timePicker && this.timePickerIncrement) + this.endDate.minute(Math.round(this.endDate.minute() / this.timePickerIncrement) * this.timePickerIncrement); + + if (this.endDate.isBefore(this.startDate)) + this.endDate = this.startDate.clone(); + + if (this.maxDate && this.endDate.isAfter(this.maxDate)) + this.endDate = this.maxDate.clone(); + + if (this.maxSpan && this.startDate.clone().add(this.maxSpan).isBefore(this.endDate)) + this.endDate = this.startDate.clone().add(this.maxSpan); + + this.previousRightTime = this.endDate.clone(); + + this.container.find('.drp-selected').html(this.startDate.format(this.locale.format) + this.locale.separator + this.endDate.format(this.locale.format)); + + if (!this.isShowing) + this.updateElement(); + + this.updateMonthsInView(); + }, + + isInvalidDate: function() { + return false; + }, + + isCustomDate: function() { + return false; + }, + + updateView: function() { + if (this.timePicker) { + this.renderTimePicker('left'); + this.renderTimePicker('right'); + if (!this.endDate) { + this.container.find('.right .calendar-time select').attr('disabled', 'disabled').addClass('disabled'); + } else { + this.container.find('.right .calendar-time select').removeAttr('disabled').removeClass('disabled'); + } + } + if (this.endDate) + this.container.find('.drp-selected').html(this.startDate.format(this.locale.format) + this.locale.separator + this.endDate.format(this.locale.format)); + this.updateMonthsInView(); + this.updateCalendars(); + this.updateFormInputs(); + }, + + updateMonthsInView: function() { + if (this.endDate) { + + //if both dates are visible already, do nothing + if (!this.singleDatePicker && this.leftCalendar.month && this.rightCalendar.month && + (this.startDate.format('YYYY-MM') == this.leftCalendar.month.format('YYYY-MM') || this.startDate.format('YYYY-MM') == this.rightCalendar.month.format('YYYY-MM')) + && + (this.endDate.format('YYYY-MM') == this.leftCalendar.month.format('YYYY-MM') || this.endDate.format('YYYY-MM') == this.rightCalendar.month.format('YYYY-MM')) + ) { + return; + } + + this.leftCalendar.month = this.startDate.clone().date(2); + if (!this.linkedCalendars && (this.endDate.month() != this.startDate.month() || this.endDate.year() != this.startDate.year())) { + this.rightCalendar.month = this.endDate.clone().date(2); + } else { + this.rightCalendar.month = this.startDate.clone().date(2).add(1, 'month'); + } + + } else { + if (this.leftCalendar.month.format('YYYY-MM') != this.startDate.format('YYYY-MM') && this.rightCalendar.month.format('YYYY-MM') != this.startDate.format('YYYY-MM')) { + this.leftCalendar.month = this.startDate.clone().date(2); + this.rightCalendar.month = this.startDate.clone().date(2).add(1, 'month'); + } + } + if (this.maxDate && this.linkedCalendars && !this.singleDatePicker && this.rightCalendar.month > this.maxDate) { + this.rightCalendar.month = this.maxDate.clone().date(2); + this.leftCalendar.month = this.maxDate.clone().date(2).subtract(1, 'month'); + } + }, + + updateCalendars: function() { + + if (this.timePicker) { + var hour, minute, second; + if (this.endDate) { + hour = parseInt(this.container.find('.left .hourselect').val(), 10); + minute = parseInt(this.container.find('.left .minuteselect').val(), 10); + if (isNaN(minute)) { + minute = parseInt(this.container.find('.left .minuteselect option:last').val(), 10); + } + second = this.timePickerSeconds ? parseInt(this.container.find('.left .secondselect').val(), 10) : 0; + if (!this.timePicker24Hour) { + var ampm = this.container.find('.left .ampmselect').val(); + if (ampm === 'PM' && hour < 12) + hour += 12; + if (ampm === 'AM' && hour === 12) + hour = 0; + } + } else { + hour = parseInt(this.container.find('.right .hourselect').val(), 10); + minute = parseInt(this.container.find('.right .minuteselect').val(), 10); + if (isNaN(minute)) { + minute = parseInt(this.container.find('.right .minuteselect option:last').val(), 10); + } + second = this.timePickerSeconds ? parseInt(this.container.find('.right .secondselect').val(), 10) : 0; + if (!this.timePicker24Hour) { + var ampm = this.container.find('.right .ampmselect').val(); + if (ampm === 'PM' && hour < 12) + hour += 12; + if (ampm === 'AM' && hour === 12) + hour = 0; + } + } + this.leftCalendar.month.hour(hour).minute(minute).second(second); + this.rightCalendar.month.hour(hour).minute(minute).second(second); + } + + this.renderCalendar('left'); + this.renderCalendar('right'); + + //highlight any predefined range matching the current start and end dates + this.container.find('.ranges li').removeClass('active'); + if (this.endDate == null) return; + + this.calculateChosenLabel(); + }, + + renderCalendar: function(side) { + + // + // Build the matrix of dates that will populate the calendar + // + + var calendar = side == 'left' ? this.leftCalendar : this.rightCalendar; + var month = calendar.month.month(); + var year = calendar.month.year(); + var hour = calendar.month.hour(); + var minute = calendar.month.minute(); + var second = calendar.month.second(); + var daysInMonth = moment([year, month]).daysInMonth(); + var firstDay = moment([year, month, 1]); + var lastDay = moment([year, month, daysInMonth]); + var lastMonth = moment(firstDay).subtract(1, 'month').month(); + var lastYear = moment(firstDay).subtract(1, 'month').year(); + var daysInLastMonth = moment([lastYear, lastMonth]).daysInMonth(); + var dayOfWeek = firstDay.day(); + + //initialize a 6 rows x 7 columns array for the calendar + var calendar = []; + calendar.firstDay = firstDay; + calendar.lastDay = lastDay; + + for (var i = 0; i < 6; i++) { + calendar[i] = []; + } + + //populate the calendar with date objects + var startDay = daysInLastMonth - dayOfWeek + this.locale.firstDay + 1; + if (startDay > daysInLastMonth) + startDay -= 7; + + if (dayOfWeek == this.locale.firstDay) + startDay = daysInLastMonth - 6; + + var curDate = moment([lastYear, lastMonth, startDay, 12, minute, second]); + + var col, row; + for (var i = 0, col = 0, row = 0; i < 42; i++, col++, curDate = moment(curDate).add(24, 'hour')) { + if (i > 0 && col % 7 === 0) { + col = 0; + row++; + } + calendar[row][col] = curDate.clone().hour(hour).minute(minute).second(second); + curDate.hour(12); + + if (this.minDate && calendar[row][col].format('YYYY-MM-DD') == this.minDate.format('YYYY-MM-DD') && calendar[row][col].isBefore(this.minDate) && side == 'left') { + calendar[row][col] = this.minDate.clone(); + } + + if (this.maxDate && calendar[row][col].format('YYYY-MM-DD') == this.maxDate.format('YYYY-MM-DD') && calendar[row][col].isAfter(this.maxDate) && side == 'right') { + calendar[row][col] = this.maxDate.clone(); + } + + } + + //make the calendar object available to hoverDate/clickDate + if (side == 'left') { + this.leftCalendar.calendar = calendar; + } else { + this.rightCalendar.calendar = calendar; + } + + // + // Display the calendar + // + + var minDate = side == 'left' ? this.minDate : this.startDate; + var maxDate = this.maxDate; + var selected = side == 'left' ? this.startDate : this.endDate; + var arrow = this.locale.direction == 'ltr' ? {left: 'chevron-left', right: 'chevron-right'} : {left: 'chevron-right', right: 'chevron-left'}; + + var html = ''; + html += ''; + html += ''; + + // add empty cell for week number + if (this.showWeekNumbers || this.showISOWeekNumbers) + html += ''; + + if ((!minDate || minDate.isBefore(calendar.firstDay)) && (!this.linkedCalendars || side == 'left')) { + html += ''; + } else { + html += ''; + } + + var dateHtml = this.locale.monthNames[calendar[1][1].month()] + calendar[1][1].format(" YYYY"); + + if (this.showDropdowns) { + var currentMonth = calendar[1][1].month(); + var currentYear = calendar[1][1].year(); + var maxYear = (maxDate && maxDate.year()) || (this.maxYear); + var minYear = (minDate && minDate.year()) || (this.minYear); + var inMinYear = currentYear == minYear; + var inMaxYear = currentYear == maxYear; + + var monthHtml = '"; + + var yearHtml = ''; + + dateHtml = monthHtml + yearHtml; + } + + html += ''; + if ((!maxDate || maxDate.isAfter(calendar.lastDay)) && (!this.linkedCalendars || side == 'right' || this.singleDatePicker)) { + html += ''; + } else { + html += ''; + } + + html += ''; + html += ''; + + // add week number label + if (this.showWeekNumbers || this.showISOWeekNumbers) + html += ''; + + $.each(this.locale.daysOfWeek, function(index, dayOfWeek) { + html += ''; + }); + + html += ''; + html += ''; + html += ''; + + //adjust maxDate to reflect the maxSpan setting in order to + //grey out end dates beyond the maxSpan + if (this.endDate == null && this.maxSpan) { + var maxLimit = this.startDate.clone().add(this.maxSpan).endOf('day'); + if (!maxDate || maxLimit.isBefore(maxDate)) { + maxDate = maxLimit; + } + } + + for (var row = 0; row < 6; row++) { + html += ''; + + // add week number + if (this.showWeekNumbers) + html += ''; + else if (this.showISOWeekNumbers) + html += ''; + + for (var col = 0; col < 7; col++) { + + var classes = []; + + //highlight today's date + if (calendar[row][col].isSame(new Date(), "day")) + classes.push('today'); + + //highlight weekends + if (calendar[row][col].isoWeekday() > 5) + classes.push('weekend'); + + //grey out the dates in other months displayed at beginning and end of this calendar + if (calendar[row][col].month() != calendar[1][1].month()) + classes.push('off', 'ends'); + + //don't allow selection of dates before the minimum date + if (this.minDate && calendar[row][col].isBefore(this.minDate, 'day')) + classes.push('off', 'disabled'); + + //don't allow selection of dates after the maximum date + if (maxDate && calendar[row][col].isAfter(maxDate, 'day')) + classes.push('off', 'disabled'); + + //don't allow selection of date if a custom function decides it's invalid + if (this.isInvalidDate(calendar[row][col])) + classes.push('off', 'disabled'); + + //highlight the currently selected start date + if (calendar[row][col].format('YYYY-MM-DD') == this.startDate.format('YYYY-MM-DD')) + classes.push('active', 'start-date'); + + //highlight the currently selected end date + if (this.endDate != null && calendar[row][col].format('YYYY-MM-DD') == this.endDate.format('YYYY-MM-DD')) + classes.push('active', 'end-date'); + + //highlight dates in-between the selected dates + if (this.endDate != null && calendar[row][col] > this.startDate && calendar[row][col] < this.endDate) + classes.push('in-range'); + + //apply custom classes for this date + var isCustom = this.isCustomDate(calendar[row][col]); + if (isCustom !== false) { + if (typeof isCustom === 'string') + classes.push(isCustom); + else + Array.prototype.push.apply(classes, isCustom); + } + + var cname = '', disabled = false; + for (var i = 0; i < classes.length; i++) { + cname += classes[i] + ' '; + if (classes[i] == 'disabled') + disabled = true; + } + if (!disabled) + cname += 'available'; + + html += ''; + + } + html += ''; + } + + html += ''; + html += '
' + dateHtml + '
' + this.locale.weekLabel + '' + dayOfWeek + '
' + calendar[row][0].week() + '' + calendar[row][0].isoWeek() + '' + calendar[row][col].date() + '
'; + + this.container.find('.drp-calendar.' + side + ' .calendar-table').html(html); + + }, + + renderTimePicker: function(side) { + + // Don't bother updating the time picker if it's currently disabled + // because an end date hasn't been clicked yet + if (side == 'right' && !this.endDate) return; + + var html, selected, minDate, maxDate = this.maxDate; + + if (this.maxSpan && (!this.maxDate || this.startDate.clone().add(this.maxSpan).isBefore(this.maxDate))) + maxDate = this.startDate.clone().add(this.maxSpan); + + if (side == 'left') { + selected = this.startDate.clone(); + minDate = this.minDate; + } else if (side == 'right') { + selected = this.endDate.clone(); + minDate = this.startDate; + + //Preserve the time already selected + var timeSelector = this.container.find('.drp-calendar.right .calendar-time'); + if (timeSelector.html() != '') { + + selected.hour(!isNaN(selected.hour()) ? selected.hour() : timeSelector.find('.hourselect option:selected').val()); + selected.minute(!isNaN(selected.minute()) ? selected.minute() : timeSelector.find('.minuteselect option:selected').val()); + selected.second(!isNaN(selected.second()) ? selected.second() : timeSelector.find('.secondselect option:selected').val()); + + if (!this.timePicker24Hour) { + var ampm = timeSelector.find('.ampmselect option:selected').val(); + if (ampm === 'PM' && selected.hour() < 12) + selected.hour(selected.hour() + 12); + if (ampm === 'AM' && selected.hour() === 12) + selected.hour(0); + } + + } + + if (selected.isBefore(this.startDate)) + selected = this.startDate.clone(); + + if (maxDate && selected.isAfter(maxDate)) + selected = maxDate.clone(); + + } + + // + // hours + // + + html = ' '; + + // + // minutes + // + + html += ': '; + + // + // seconds + // + + if (this.timePickerSeconds) { + html += ': '; + } + + // + // AM/PM + // + + if (!this.timePicker24Hour) { + html += ''; + } + + this.container.find('.drp-calendar.' + side + ' .calendar-time').html(html); + + }, + + updateFormInputs: function() { + + if (this.singleDatePicker || (this.endDate && (this.startDate.isBefore(this.endDate) || this.startDate.isSame(this.endDate)))) { + this.container.find('button.applyBtn').removeAttr('disabled'); + } else { + this.container.find('button.applyBtn').attr('disabled', 'disabled'); + } + + }, + + move: function() { + var parentOffset = { top: 0, left: 0 }, + containerTop; + var parentRightEdge = $(window).width(); + if (!this.parentEl.is('body')) { + parentOffset = { + top: this.parentEl.offset().top - this.parentEl.scrollTop(), + left: this.parentEl.offset().left - this.parentEl.scrollLeft() + }; + parentRightEdge = this.parentEl[0].clientWidth + this.parentEl.offset().left; + } + + if (this.drops == 'up') + containerTop = this.element.offset().top - this.container.outerHeight() - parentOffset.top; + else + containerTop = this.element.offset().top + this.element.outerHeight() - parentOffset.top; + + // Force the container to it's actual width + this.container.css({ + top: 0, + left: 0, + right: 'auto' + }); + var containerWidth = this.container.outerWidth(); + + this.container[this.drops == 'up' ? 'addClass' : 'removeClass']('drop-up'); + + if (this.opens == 'left') { + var containerRight = parentRightEdge - this.element.offset().left - this.element.outerWidth(); + if (containerWidth + containerRight > $(window).width()) { + this.container.css({ + top: containerTop, + right: 'auto', + left: 9 + }); + } else { + this.container.css({ + top: containerTop, + right: containerRight, + left: 'auto' + }); + } + } else if (this.opens == 'center') { + var containerLeft = this.element.offset().left - parentOffset.left + this.element.outerWidth() / 2 + - containerWidth / 2; + if (containerLeft < 0) { + this.container.css({ + top: containerTop, + right: 'auto', + left: 9 + }); + } else if (containerLeft + containerWidth > $(window).width()) { + this.container.css({ + top: containerTop, + left: 'auto', + right: 0 + }); + } else { + this.container.css({ + top: containerTop, + left: containerLeft, + right: 'auto' + }); + } + } else { + var containerLeft = this.element.offset().left - parentOffset.left; + if (containerLeft + containerWidth > $(window).width()) { + this.container.css({ + top: containerTop, + left: 'auto', + right: 0 + }); + } else { + this.container.css({ + top: containerTop, + left: containerLeft, + right: 'auto' + }); + } + } + }, + + show: function(e) { + if (this.isShowing) return; + + // Create a click proxy that is private to this instance of datepicker, for unbinding + this._outsideClickProxy = $.proxy(function(e) { this.outsideClick(e); }, this); + + // Bind global datepicker mousedown for hiding and + $(document) + .on('mousedown.daterangepicker', this._outsideClickProxy) + // also support mobile devices + .on('touchend.daterangepicker', this._outsideClickProxy) + // also explicitly play nice with Bootstrap dropdowns, which stopPropagation when clicking them + .on('click.daterangepicker', '[data-toggle=dropdown]', this._outsideClickProxy) + // and also close when focus changes to outside the picker (eg. tabbing between controls) + .on('focusin.daterangepicker', this._outsideClickProxy); + + // Reposition the picker if the window is resized while it's open + $(window).on('resize.daterangepicker', $.proxy(function(e) { this.move(e); }, this)); + + this.oldStartDate = this.startDate.clone(); + this.oldEndDate = this.endDate.clone(); + this.previousRightTime = this.endDate.clone(); + + this.updateView(); + this.container.show(); + this.move(); + this.element.trigger('show.daterangepicker', this); + this.isShowing = true; + }, + + hide: function(e) { + if (!this.isShowing) return; + + //incomplete date selection, revert to last values + if (!this.endDate) { + this.startDate = this.oldStartDate.clone(); + this.endDate = this.oldEndDate.clone(); + } + + //if a new date range was selected, invoke the user callback function + if (!this.startDate.isSame(this.oldStartDate) || !this.endDate.isSame(this.oldEndDate)) + this.callback(this.startDate.clone(), this.endDate.clone(), this.chosenLabel); + + //if picker is attached to a text input, update it + this.updateElement(); + + $(document).off('.daterangepicker'); + $(window).off('.daterangepicker'); + this.container.hide(); + this.element.trigger('hide.daterangepicker', this); + this.isShowing = false; + }, + + toggle: function(e) { + if (this.isShowing) { + this.hide(); + } else { + this.show(); + } + }, + + outsideClick: function(e) { + var target = $(e.target); + // if the page is clicked anywhere except within the daterangerpicker/button + // itself then call this.hide() + if ( + // ie modal dialog fix + e.type == "focusin" || + target.closest(this.element).length || + target.closest(this.container).length || + target.closest('.calendar-table').length + ) return; + this.hide(); + this.element.trigger('outsideClick.daterangepicker', this); + }, + + showCalendars: function() { + this.container.addClass('show-calendar'); + this.move(); + this.element.trigger('showCalendar.daterangepicker', this); + }, + + hideCalendars: function() { + this.container.removeClass('show-calendar'); + this.element.trigger('hideCalendar.daterangepicker', this); + }, + + clickRange: function(e) { + var label = e.target.getAttribute('data-range-key'); + this.chosenLabel = label; + if (label == this.locale.customRangeLabel) { + this.showCalendars(); + } else { + var dates = this.ranges[label]; + this.startDate = dates[0]; + this.endDate = dates[1]; + + if (!this.timePicker) { + this.startDate.startOf('day'); + this.endDate.endOf('day'); + } + + if (!this.alwaysShowCalendars) + this.hideCalendars(); + this.clickApply(); + } + }, + + clickPrev: function(e) { + var cal = $(e.target).parents('.drp-calendar'); + if (cal.hasClass('left')) { + this.leftCalendar.month.subtract(1, 'month'); + if (this.linkedCalendars) + this.rightCalendar.month.subtract(1, 'month'); + } else { + this.rightCalendar.month.subtract(1, 'month'); + } + this.updateCalendars(); + }, + + clickNext: function(e) { + var cal = $(e.target).parents('.drp-calendar'); + if (cal.hasClass('left')) { + this.leftCalendar.month.add(1, 'month'); + } else { + this.rightCalendar.month.add(1, 'month'); + if (this.linkedCalendars) + this.leftCalendar.month.add(1, 'month'); + } + this.updateCalendars(); + }, + + hoverDate: function(e) { + + //ignore dates that can't be selected + if (!$(e.target).hasClass('available')) return; + + var title = $(e.target).attr('data-title'); + var row = title.substr(1, 1); + var col = title.substr(3, 1); + var cal = $(e.target).parents('.drp-calendar'); + var date = cal.hasClass('left') ? this.leftCalendar.calendar[row][col] : this.rightCalendar.calendar[row][col]; + + //highlight the dates between the start date and the date being hovered as a potential end date + var leftCalendar = this.leftCalendar; + var rightCalendar = this.rightCalendar; + var startDate = this.startDate; + if (!this.endDate) { + this.container.find('.drp-calendar tbody td').each(function(index, el) { + + //skip week numbers, only look at dates + if ($(el).hasClass('week')) return; + + var title = $(el).attr('data-title'); + var row = title.substr(1, 1); + var col = title.substr(3, 1); + var cal = $(el).parents('.drp-calendar'); + var dt = cal.hasClass('left') ? leftCalendar.calendar[row][col] : rightCalendar.calendar[row][col]; + + if ((dt.isAfter(startDate) && dt.isBefore(date)) || dt.isSame(date, 'day')) { + $(el).addClass('in-range'); + } else { + $(el).removeClass('in-range'); + } + + }); + } + + }, + + clickDate: function(e) { + + if (!$(e.target).hasClass('available')) return; + + var title = $(e.target).attr('data-title'); + var row = title.substr(1, 1); + var col = title.substr(3, 1); + var cal = $(e.target).parents('.drp-calendar'); + var date = cal.hasClass('left') ? this.leftCalendar.calendar[row][col] : this.rightCalendar.calendar[row][col]; + + // + // this function needs to do a few things: + // * alternate between selecting a start and end date for the range, + // * if the time picker is enabled, apply the hour/minute/second from the select boxes to the clicked date + // * if autoapply is enabled, and an end date was chosen, apply the selection + // * if single date picker mode, and time picker isn't enabled, apply the selection immediately + // * if one of the inputs above the calendars was focused, cancel that manual input + // + + if (this.endDate || date.isBefore(this.startDate, 'day')) { //picking start + if (this.timePicker) { + var hour = parseInt(this.container.find('.left .hourselect').val(), 10); + if (!this.timePicker24Hour) { + var ampm = this.container.find('.left .ampmselect').val(); + if (ampm === 'PM' && hour < 12) + hour += 12; + if (ampm === 'AM' && hour === 12) + hour = 0; + } + var minute = parseInt(this.container.find('.left .minuteselect').val(), 10); + if (isNaN(minute)) { + minute = parseInt(this.container.find('.left .minuteselect option:last').val(), 10); + } + var second = this.timePickerSeconds ? parseInt(this.container.find('.left .secondselect').val(), 10) : 0; + date = date.clone().hour(hour).minute(minute).second(second); + } + this.endDate = null; + this.setStartDate(date.clone()); + } else if (!this.endDate && date.isBefore(this.startDate)) { + //special case: clicking the same date for start/end, + //but the time of the end date is before the start date + this.setEndDate(this.startDate.clone()); + } else { // picking end + if (this.timePicker) { + var hour = parseInt(this.container.find('.right .hourselect').val(), 10); + if (!this.timePicker24Hour) { + var ampm = this.container.find('.right .ampmselect').val(); + if (ampm === 'PM' && hour < 12) + hour += 12; + if (ampm === 'AM' && hour === 12) + hour = 0; + } + var minute = parseInt(this.container.find('.right .minuteselect').val(), 10); + if (isNaN(minute)) { + minute = parseInt(this.container.find('.right .minuteselect option:last').val(), 10); + } + var second = this.timePickerSeconds ? parseInt(this.container.find('.right .secondselect').val(), 10) : 0; + date = date.clone().hour(hour).minute(minute).second(second); + } + this.setEndDate(date.clone()); + if (this.autoApply) { + this.calculateChosenLabel(); + this.clickApply(); + } + } + + if (this.singleDatePicker) { + this.setEndDate(this.startDate); + if (!this.timePicker) + this.clickApply(); + } + + this.updateView(); + + //This is to cancel the blur event handler if the mouse was in one of the inputs + e.stopPropagation(); + + }, + + calculateChosenLabel: function () { + var customRange = true; + var i = 0; + for (var range in this.ranges) { + if (this.timePicker) { + var format = this.timePickerSeconds ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD HH:mm"; + //ignore times when comparing dates if time picker seconds is not enabled + if (this.startDate.format(format) == this.ranges[range][0].format(format) && this.endDate.format(format) == this.ranges[range][1].format(format)) { + customRange = false; + this.chosenLabel = this.container.find('.ranges li:eq(' + i + ')').addClass('active').attr('data-range-key'); + break; + } + } else { + //ignore times when comparing dates if time picker is not enabled + if (this.startDate.format('YYYY-MM-DD') == this.ranges[range][0].format('YYYY-MM-DD') && this.endDate.format('YYYY-MM-DD') == this.ranges[range][1].format('YYYY-MM-DD')) { + customRange = false; + this.chosenLabel = this.container.find('.ranges li:eq(' + i + ')').addClass('active').attr('data-range-key'); + break; + } + } + i++; + } + if (customRange) { + if (this.showCustomRangeLabel) { + this.chosenLabel = this.container.find('.ranges li:last').addClass('active').attr('data-range-key'); + } else { + this.chosenLabel = null; + } + this.showCalendars(); + } + }, + + clickApply: function(e) { + this.hide(); + this.element.trigger('apply.daterangepicker', this); + }, + + clickCancel: function(e) { + this.startDate = this.oldStartDate; + this.endDate = this.oldEndDate; + this.hide(); + this.element.trigger('cancel.daterangepicker', this); + }, + + monthOrYearChanged: function(e) { + var isLeft = $(e.target).closest('.drp-calendar').hasClass('left'), + leftOrRight = isLeft ? 'left' : 'right', + cal = this.container.find('.drp-calendar.'+leftOrRight); + + // Month must be Number for new moment versions + var month = parseInt(cal.find('.monthselect').val(), 10); + var year = cal.find('.yearselect').val(); + + if (!isLeft) { + if (year < this.startDate.year() || (year == this.startDate.year() && month < this.startDate.month())) { + month = this.startDate.month(); + year = this.startDate.year(); + } + } + + if (this.minDate) { + if (year < this.minDate.year() || (year == this.minDate.year() && month < this.minDate.month())) { + month = this.minDate.month(); + year = this.minDate.year(); + } + } + + if (this.maxDate) { + if (year > this.maxDate.year() || (year == this.maxDate.year() && month > this.maxDate.month())) { + month = this.maxDate.month(); + year = this.maxDate.year(); + } + } + + if (isLeft) { + this.leftCalendar.month.month(month).year(year); + if (this.linkedCalendars) + this.rightCalendar.month = this.leftCalendar.month.clone().add(1, 'month'); + } else { + this.rightCalendar.month.month(month).year(year); + if (this.linkedCalendars) + this.leftCalendar.month = this.rightCalendar.month.clone().subtract(1, 'month'); + } + this.updateCalendars(); + }, + + timeChanged: function(e) { + + var cal = $(e.target).closest('.drp-calendar'), + isLeft = cal.hasClass('left'); + + var hour = parseInt(cal.find('.hourselect').val(), 10); + var minute = parseInt(cal.find('.minuteselect').val(), 10); + if (isNaN(minute)) { + minute = parseInt(cal.find('.minuteselect option:last').val(), 10); + } + var second = this.timePickerSeconds ? parseInt(cal.find('.secondselect').val(), 10) : 0; + + if (!this.timePicker24Hour) { + var ampm = cal.find('.ampmselect').val(); + if (ampm === 'PM' && hour < 12) + hour += 12; + if (ampm === 'AM' && hour === 12) + hour = 0; + } + + if (isLeft) { + var start = this.startDate.clone(); + start.hour(hour); + start.minute(minute); + start.second(second); + this.setStartDate(start); + if (this.singleDatePicker) { + this.endDate = this.startDate.clone(); + } else if (this.endDate && this.endDate.format('YYYY-MM-DD') == start.format('YYYY-MM-DD') && this.endDate.isBefore(start)) { + this.setEndDate(start.clone()); + } + } else if (this.endDate) { + var end = this.endDate.clone(); + end.hour(hour); + end.minute(minute); + end.second(second); + this.setEndDate(end); + } + + //update the calendars so all clickable dates reflect the new time component + this.updateCalendars(); + + //update the form inputs above the calendars with the new time + this.updateFormInputs(); + + //re-render the time pickers because changing one selection can affect what's enabled in another + this.renderTimePicker('left'); + this.renderTimePicker('right'); + + }, + + elementChanged: function() { + if (!this.element.is('input')) return; + if (!this.element.val().length) return; + + var dateString = this.element.val().split(this.locale.separator), + start = null, + end = null; + + if (dateString.length === 2) { + start = moment(dateString[0], this.locale.format); + end = moment(dateString[1], this.locale.format); + } + + if (this.singleDatePicker || start === null || end === null) { + start = moment(this.element.val(), this.locale.format); + end = start; + } + + if (!start.isValid() || !end.isValid()) return; + + this.setStartDate(start); + this.setEndDate(end); + this.updateView(); + }, + + keydown: function(e) { + //hide on tab or enter + if ((e.keyCode === 9) || (e.keyCode === 13)) { + this.hide(); + } + + //hide on esc and prevent propagation + if (e.keyCode === 27) { + e.preventDefault(); + e.stopPropagation(); + + this.hide(); + } + }, + + updateElement: function() { + if (this.element.is('input') && this.autoUpdateInput) { + var newValue = this.startDate.format(this.locale.format); + if (!this.singleDatePicker) { + newValue += this.locale.separator + this.endDate.format(this.locale.format); + } + if (newValue !== this.element.val()) { + this.element.val(newValue).trigger('change'); + } + } + }, + + remove: function() { + this.container.remove(); + this.element.off('.daterangepicker'); + this.element.removeData(); + } + + }; + + $.fn.daterangepicker = function(options, callback) { + var implementOptions = $.extend(true, {}, $.fn.daterangepicker.defaultOptions, options); + this.each(function() { + var el = $(this); + if (el.data('daterangepicker')) + el.data('daterangepicker').remove(); + el.data('daterangepicker', new DateRangePicker(el, implementOptions, callback)); + }); + return this; + }; + + return DateRangePicker; + +})); diff --git a/vendor/daterangepicker/demo.html b/vendor/daterangepicker/demo.html new file mode 100644 index 00000000..3157e8a1 --- /dev/null +++ b/vendor/daterangepicker/demo.html @@ -0,0 +1,374 @@ + + + + + A date range picker for Bootstrap + + + + + + + + + + + + + + + + +
+ +

Configuration Builder

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

Your Date Range Picker

+
+ +
+
+ +
+

Configuration

+ +
+ +
+
+ +
+ +
+ + + + + + + diff --git a/vendor/daterangepicker/drp.png b/vendor/daterangepicker/drp.png new file mode 100644 index 00000000..a76bdf35 Binary files /dev/null and b/vendor/daterangepicker/drp.png differ diff --git a/vendor/daterangepicker/example/amd/index.html b/vendor/daterangepicker/example/amd/index.html new file mode 100644 index 00000000..533c94ed --- /dev/null +++ b/vendor/daterangepicker/example/amd/index.html @@ -0,0 +1,210 @@ + + + + + A date range picker for Bootstrap + + + + + + +
+ +

Configuration Builder

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

Your Date Range Picker

+ + +
+ +
+

Configuration

+ +
+ +
+
+ +
+ +
+ + + + + diff --git a/vendor/daterangepicker/example/amd/main.js b/vendor/daterangepicker/example/amd/main.js new file mode 100644 index 00000000..5c0f99a2 --- /dev/null +++ b/vendor/daterangepicker/example/amd/main.js @@ -0,0 +1,141 @@ +requirejs.config({ + "paths": { + "jquery": "https://code.jquery.com/jquery-1.11.3.min", + "moment": "../../moment", + "daterangepicker": "../../daterangepicker" + } +}); + +requirejs(['jquery', 'moment', 'daterangepicker'] , function ($, moment) { +$(document).ready(function() { + + $('#config-text').keyup(function() { + eval($(this).val()); + }); + + $('.configurator input, .configurator select').change(function() { + updateConfig(); + }); + + $('.demo i').click(function() { + $(this).parent().find('input').click(); + }); + + $('#startDate').daterangepicker({ + singleDatePicker: true, + startDate: moment().subtract(6, 'days') + }); + + $('#endDate').daterangepicker({ + singleDatePicker: true, + startDate: moment() + }); + + updateConfig(); + + function updateConfig() { + var options = {}; + + if ($('#singleDatePicker').is(':checked')) + options.singleDatePicker = true; + + if ($('#showDropdowns').is(':checked')) + options.showDropdowns = true; + + if ($('#showWeekNumbers').is(':checked')) + options.showWeekNumbers = true; + + if ($('#showISOWeekNumbers').is(':checked')) + options.showISOWeekNumbers = true; + + if ($('#timePicker').is(':checked')) + options.timePicker = true; + + if ($('#timePicker24Hour').is(':checked')) + options.timePicker24Hour = true; + + if ($('#timePickerIncrement').val().length && $('#timePickerIncrement').val() != 1) + options.timePickerIncrement = parseInt($('#timePickerIncrement').val(), 10); + + if ($('#timePickerSeconds').is(':checked')) + options.timePickerSeconds = true; + + if ($('#autoApply').is(':checked')) + options.autoApply = true; + + if ($('#dateLimit').is(':checked')) + options.dateLimit = { days: 7 }; + + if ($('#ranges').is(':checked')) { + options.ranges = { + 'Today': [moment(), moment()], + 'Yesterday': [moment().subtract(1, 'days'), moment().subtract(1, 'days')], + 'Last 7 Days': [moment().subtract(6, 'days'), moment()], + 'Last 30 Days': [moment().subtract(29, 'days'), moment()], + 'This Month': [moment().startOf('month'), moment().endOf('month')], + 'Last Month': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')] + }; + } + + if ($('#locale').is(':checked')) { + options.locale = { + format: 'MM/DD/YYYY HH:mm', + separator: ' - ', + applyLabel: 'Apply', + cancelLabel: 'Cancel', + fromLabel: 'From', + toLabel: 'To', + customRangeLabel: 'Custom', + daysOfWeek: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr','Sa'], + monthNames: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'], + firstDay: 1 + }; + } + + if (!$('#linkedCalendars').is(':checked')) + options.linkedCalendars = false; + + if (!$('#autoUpdateInput').is(':checked')) + options.autoUpdateInput = false; + + if ($('#alwaysShowCalendars').is(':checked')) + options.alwaysShowCalendars = true; + + if ($('#parentEl').val().length) + options.parentEl = $('#parentEl').val(); + + if ($('#startDate').val().length) + options.startDate = $('#startDate').val(); + + if ($('#endDate').val().length) + options.endDate = $('#endDate').val(); + + if ($('#minDate').val().length) + options.minDate = $('#minDate').val(); + + if ($('#maxDate').val().length) + options.maxDate = $('#maxDate').val(); + + if ($('#opens').val().length && $('#opens').val() != 'right') + options.opens = $('#opens').val(); + + if ($('#drops').val().length && $('#drops').val() != 'down') + options.drops = $('#drops').val(); + + if ($('#buttonClasses').val().length && $('#buttonClasses').val() != 'btn btn-sm') + options.buttonClasses = $('#buttonClasses').val(); + + if ($('#applyClass').val().length && $('#applyClass').val() != 'btn-success') + options.applyClass = $('#applyClass').val(); + + if ($('#cancelClass').val().length && $('#cancelClass').val() != 'btn-default') + options.cancelClass = $('#cancelClass').val(); + + $('#config-text').val("$('#demo').daterangepicker(" + JSON.stringify(options, null, ' ') + ", function(start, end, label) {\n console.log(\"New date range selected: ' + start.format('YYYY-MM-DD') + ' to ' + end.format('YYYY-MM-DD') + ' (predefined range: ' + label + ')\");\n});"); + + $('#config-demo').daterangepicker(options, function(start, end, label) { console.log('New date range selected: ' + start.format('YYYY-MM-DD') + ' to ' + end.format('YYYY-MM-DD') + ' (predefined range: ' + label + ')'); }); + + } + +}); +}); diff --git a/vendor/daterangepicker/example/amd/require.js b/vendor/daterangepicker/example/amd/require.js new file mode 100644 index 00000000..857eb5b7 --- /dev/null +++ b/vendor/daterangepicker/example/amd/require.js @@ -0,0 +1,36 @@ +/* + RequireJS 2.2.0 Copyright jQuery Foundation and other contributors. + Released under MIT license, http://github.com/requirejs/requirejs/LICENSE +*/ +var requirejs,require,define; +(function(ga){function ka(b,c,d,g){return g||""}function K(b){return"[object Function]"===Q.call(b)}function L(b){return"[object Array]"===Q.call(b)}function y(b,c){if(b){var d;for(d=0;dthis.depCount&&!this.defined){if(K(k)){if(this.events.error&&this.map.isDefine||g.onError!== +ha)try{h=l.execCb(c,k,b,h)}catch(d){a=d}else h=l.execCb(c,k,b,h);this.map.isDefine&&void 0===h&&((b=this.module)?h=b.exports:this.usingExports&&(h=this.exports));if(a)return a.requireMap=this.map,a.requireModules=this.map.isDefine?[this.map.id]:null,a.requireType=this.map.isDefine?"define":"require",A(this.error=a)}else h=k;this.exports=h;if(this.map.isDefine&&!this.ignore&&(v[c]=h,g.onResourceLoad)){var f=[];y(this.depMaps,function(a){f.push(a.normalizedMap||a)});g.onResourceLoad(l,this.map,f)}C(c); +this.defined=!0}this.defining=!1;this.defined&&!this.defineEmitted&&(this.defineEmitted=!0,this.emit("defined",this.exports),this.defineEmitComplete=!0)}}},callPlugin:function(){var a=this.map,b=a.id,d=q(a.prefix);this.depMaps.push(d);w(d,"defined",z(this,function(h){var k,f,d=e(fa,this.map.id),M=this.map.name,r=this.map.parentMap?this.map.parentMap.name:null,m=l.makeRequire(a.parentMap,{enableBuildCallback:!0});if(this.map.unnormalized){if(h.normalize&&(M=h.normalize(M,function(a){return c(a,r,!0)})|| +""),f=q(a.prefix+"!"+M,this.map.parentMap),w(f,"defined",z(this,function(a){this.map.normalizedMap=f;this.init([],function(){return a},null,{enabled:!0,ignore:!0})})),h=e(t,f.id)){this.depMaps.push(f);if(this.events.error)h.on("error",z(this,function(a){this.emit("error",a)}));h.enable()}}else d?(this.map.url=l.nameToUrl(d),this.load()):(k=z(this,function(a){this.init([],function(){return a},null,{enabled:!0})}),k.error=z(this,function(a){this.inited=!0;this.error=a;a.requireModules=[b];D(t,function(a){0=== +a.map.id.indexOf(b+"_unnormalized")&&C(a.map.id)});A(a)}),k.fromText=z(this,function(h,c){var d=a.name,f=q(d),M=S;c&&(h=c);M&&(S=!1);u(f);x(p.config,b)&&(p.config[d]=p.config[b]);try{g.exec(h)}catch(e){return A(F("fromtexteval","fromText eval for "+b+" failed: "+e,e,[b]))}M&&(S=!0);this.depMaps.push(f);l.completeLoad(d);m([d],k)}),h.load(a.name,m,k,p))}));l.enable(d,this);this.pluginMaps[d.id]=d},enable:function(){Z[this.map.id]=this;this.enabling=this.enabled=!0;y(this.depMaps,z(this,function(a, +b){var c,h;if("string"===typeof a){a=q(a,this.map.isDefine?this.map:this.map.parentMap,!1,!this.skipMap);this.depMaps[b]=a;if(c=e(R,a.id)){this.depExports[b]=c(this);return}this.depCount+=1;w(a,"defined",z(this,function(a){this.undefed||(this.defineDep(b,a),this.check())}));this.errback?w(a,"error",z(this,this.errback)):this.events.error&&w(a,"error",z(this,function(a){this.emit("error",a)}))}c=a.id;h=t[c];x(R,c)||!h||h.enabled||l.enable(a,this)}));D(this.pluginMaps,z(this,function(a){var b=e(t,a.id); +b&&!b.enabled&&l.enable(a,this)}));this.enabling=!1;this.check()},on:function(a,b){var c=this.events[a];c||(c=this.events[a]=[]);c.push(b)},emit:function(a,b){y(this.events[a],function(a){a(b)});"error"===a&&delete this.events[a]}};l={config:p,contextName:b,registry:t,defined:v,urlFetched:W,defQueue:G,defQueueMap:{},Module:da,makeModuleMap:q,nextTick:g.nextTick,onError:A,configure:function(a){a.baseUrl&&"/"!==a.baseUrl.charAt(a.baseUrl.length-1)&&(a.baseUrl+="/");if("string"===typeof a.urlArgs){var b= +a.urlArgs;a.urlArgs=function(a,c){return(-1===c.indexOf("?")?"?":"&")+b}}var c=p.shim,h={paths:!0,bundles:!0,config:!0,map:!0};D(a,function(a,b){h[b]?(p[b]||(p[b]={}),Y(p[b],a,!0,!0)):p[b]=a});a.bundles&&D(a.bundles,function(a,b){y(a,function(a){a!==b&&(fa[a]=b)})});a.shim&&(D(a.shim,function(a,b){L(a)&&(a={deps:a});!a.exports&&!a.init||a.exportsFn||(a.exportsFn=l.makeShimExports(a));c[b]=a}),p.shim=c);a.packages&&y(a.packages,function(a){var b;a="string"===typeof a?{name:a}:a;b=a.name;a.location&& +(p.paths[b]=a.location);p.pkgs[b]=a.name+"/"+(a.main||"main").replace(na,"").replace(U,"")});D(t,function(a,b){a.inited||a.map.unnormalized||(a.map=q(b,null,!0))});(a.deps||a.callback)&&l.require(a.deps||[],a.callback)},makeShimExports:function(a){return function(){var b;a.init&&(b=a.init.apply(ga,arguments));return b||a.exports&&ia(a.exports)}},makeRequire:function(a,n){function m(c,d,f){var e,r;n.enableBuildCallback&&d&&K(d)&&(d.__requireJsBuild=!0);if("string"===typeof c){if(K(d))return A(F("requireargs", +"Invalid require call"),f);if(a&&x(R,c))return R[c](t[a.id]);if(g.get)return g.get(l,c,a,m);e=q(c,a,!1,!0);e=e.id;return x(v,e)?v[e]:A(F("notloaded",'Module name "'+e+'" has not been loaded yet for context: '+b+(a?"":". Use require([])")))}P();l.nextTick(function(){P();r=u(q(null,a));r.skipMap=n.skipMap;r.init(c,d,f,{enabled:!0});H()});return m}n=n||{};Y(m,{isBrowser:E,toUrl:function(b){var d,f=b.lastIndexOf("."),g=b.split("/")[0];-1!==f&&("."!==g&&".."!==g||1e.attachEvent.toString().indexOf("[native code")||ca?(e.addEventListener("load",b.onScriptLoad,!1),e.addEventListener("error",b.onScriptError,!1)):(S=!0,e.attachEvent("onreadystatechange",b.onScriptLoad));e.src=d;if(m.onNodeCreated)m.onNodeCreated(e,m,c,d);P=e;H?C.insertBefore(e,H):C.appendChild(e);P=null;return e}if(ja)try{setTimeout(function(){}, +0),importScripts(d),b.completeLoad(c)}catch(q){b.onError(F("importscripts","importScripts failed for "+c+" at "+d,q,[c]))}};E&&!w.skipDataMain&&X(document.getElementsByTagName("script"),function(b){C||(C=b.parentNode);if(O=b.getAttribute("data-main"))return u=O,w.baseUrl||-1!==u.indexOf("!")||(I=u.split("/"),u=I.pop(),T=I.length?I.join("/")+"/":"./",w.baseUrl=T),u=u.replace(U,""),g.jsExtRegExp.test(u)&&(u=O),w.deps=w.deps?w.deps.concat(u):[u],!0});define=function(b,c,d){var e,g;"string"!==typeof b&& +(d=c,c=b,b=null);L(c)||(d=c,c=null);!c&&K(d)&&(c=[],d.length&&(d.toString().replace(qa,ka).replace(ra,function(b,d){c.push(d)}),c=(1===d.length?["require"]:["require","exports","module"]).concat(c)));S&&(e=P||pa())&&(b||(b=e.getAttribute("data-requiremodule")),g=J[e.getAttribute("data-requirecontext")]);g?(g.defQueue.push([b,c,d]),g.defQueueMap[b]=!0):V.push([b,c,d])};define.amd={jQuery:!0};g.exec=function(b){return eval(b)};g(w)}})(this); diff --git a/vendor/daterangepicker/example/browserify/README.md b/vendor/daterangepicker/example/browserify/README.md new file mode 100644 index 00000000..123b093c --- /dev/null +++ b/vendor/daterangepicker/example/browserify/README.md @@ -0,0 +1,11 @@ +# Browserify example + +Two steps need to be done for this to work + +In the project root + + npm install + +In this folder + + ../../node_modules/.bin/browserify main.js -o bundle.js diff --git a/vendor/daterangepicker/example/browserify/bundle.js b/vendor/daterangepicker/example/browserify/bundle.js new file mode 100644 index 00000000..e69de29b diff --git a/vendor/daterangepicker/example/browserify/index.html b/vendor/daterangepicker/example/browserify/index.html new file mode 100644 index 00000000..bdce82e8 --- /dev/null +++ b/vendor/daterangepicker/example/browserify/index.html @@ -0,0 +1,209 @@ + + + + + A date range picker for Bootstrap + + + + + + +
+ +

Configuration Builder

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

Your Date Range Picker

+ + +
+ +
+

Configuration

+ +
+ +
+
+ +
+ +
+ + + + diff --git a/vendor/daterangepicker/example/browserify/main.js b/vendor/daterangepicker/example/browserify/main.js new file mode 100644 index 00000000..30e92d49 --- /dev/null +++ b/vendor/daterangepicker/example/browserify/main.js @@ -0,0 +1,135 @@ +require('../../daterangepicker.js'); +var $ = require('jquery'), + moment = require('moment'); + +$(document).ready(function() { + + $('#config-text').keyup(function() { + eval($(this).val()); + }); + + $('.configurator input, .configurator select').change(function() { + updateConfig(); + }); + + $('.demo i').click(function() { + $(this).parent().find('input').click(); + }); + + $('#startDate').daterangepicker({ + singleDatePicker: true, + startDate: moment().subtract(6, 'days') + }); + + $('#endDate').daterangepicker({ + singleDatePicker: true, + startDate: moment() + }); + + updateConfig(); + + function updateConfig() { + var options = {}; + + if ($('#singleDatePicker').is(':checked')) + options.singleDatePicker = true; + + if ($('#showDropdowns').is(':checked')) + options.showDropdowns = true; + + if ($('#showWeekNumbers').is(':checked')) + options.showWeekNumbers = true; + + if ($('#showISOWeekNumbers').is(':checked')) + options.showISOWeekNumbers = true; + + if ($('#timePicker').is(':checked')) + options.timePicker = true; + + if ($('#timePicker24Hour').is(':checked')) + options.timePicker24Hour = true; + + if ($('#timePickerIncrement').val().length && $('#timePickerIncrement').val() != 1) + options.timePickerIncrement = parseInt($('#timePickerIncrement').val(), 10); + + if ($('#timePickerSeconds').is(':checked')) + options.timePickerSeconds = true; + + if ($('#autoApply').is(':checked')) + options.autoApply = true; + + if ($('#dateLimit').is(':checked')) + options.dateLimit = { days: 7 }; + + if ($('#ranges').is(':checked')) { + options.ranges = { + 'Today': [moment(), moment()], + 'Yesterday': [moment().subtract(1, 'days'), moment().subtract(1, 'days')], + 'Last 7 Days': [moment().subtract(6, 'days'), moment()], + 'Last 30 Days': [moment().subtract(29, 'days'), moment()], + 'This Month': [moment().startOf('month'), moment().endOf('month')], + 'Last Month': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')] + }; + } + + if ($('#locale').is(':checked')) { + options.locale = { + format: 'MM/DD/YYYY HH:mm', + separator: ' - ', + applyLabel: 'Apply', + cancelLabel: 'Cancel', + fromLabel: 'From', + toLabel: 'To', + customRangeLabel: 'Custom', + daysOfWeek: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr','Sa'], + monthNames: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'], + firstDay: 1 + }; + } + + if (!$('#linkedCalendars').is(':checked')) + options.linkedCalendars = false; + + if (!$('#autoUpdateInput').is(':checked')) + options.autoUpdateInput = false; + + if ($('#alwaysShowCalendars').is(':checked')) + options.alwaysShowCalendars = true; + + if ($('#parentEl').val().length) + options.parentEl = $('#parentEl').val(); + + if ($('#startDate').val().length) + options.startDate = $('#startDate').val(); + + if ($('#endDate').val().length) + options.endDate = $('#endDate').val(); + + if ($('#minDate').val().length) + options.minDate = $('#minDate').val(); + + if ($('#maxDate').val().length) + options.maxDate = $('#maxDate').val(); + + if ($('#opens').val().length && $('#opens').val() != 'right') + options.opens = $('#opens').val(); + + if ($('#drops').val().length && $('#drops').val() != 'down') + options.drops = $('#drops').val(); + + if ($('#buttonClasses').val().length && $('#buttonClasses').val() != 'btn btn-sm') + options.buttonClasses = $('#buttonClasses').val(); + + if ($('#applyClass').val().length && $('#applyClass').val() != 'btn-success') + options.applyClass = $('#applyClass').val(); + + if ($('#cancelClass').val().length && $('#cancelClass').val() != 'btn-default') + options.cancelClass = $('#cancelClass').val(); + + $('#config-text').val("$('#demo').daterangepicker(" + JSON.stringify(options, null, ' ') + ", function(start, end, label) {\n console.log(\"New date range selected: ' + start.format('YYYY-MM-DD') + ' to ' + end.format('YYYY-MM-DD') + ' (predefined range: ' + label + ')\");\n});"); + + $('#config-demo').daterangepicker(options, function(start, end, label) { console.log('New date range selected: ' + start.format('YYYY-MM-DD') + ' to ' + end.format('YYYY-MM-DD') + ' (predefined range: ' + label + ')'); }); + + } + +}); diff --git a/vendor/daterangepicker/moment.min.js b/vendor/daterangepicker/moment.min.js new file mode 100644 index 00000000..5787a408 --- /dev/null +++ b/vendor/daterangepicker/moment.min.js @@ -0,0 +1 @@ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.moment=t()}(this,function(){"use strict";var e,i;function c(){return e.apply(null,arguments)}function o(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function u(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function l(e){return void 0===e}function h(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function d(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function f(e,t){var n,s=[];for(n=0;n>>0,s=0;sSe(e)?(r=e+1,o-Se(e)):(r=e,o),{year:r,dayOfYear:a}}function Ie(e,t,n){var s,i,r=Ve(e.year(),t,n),a=Math.floor((e.dayOfYear()-r-1)/7)+1;return a<1?s=a+Ae(i=e.year()-1,t,n):a>Ae(e.year(),t,n)?(s=a-Ae(e.year(),t,n),i=e.year()+1):(i=e.year(),s=a),{week:s,year:i}}function Ae(e,t,n){var s=Ve(e,t,n),i=Ve(e+1,t,n);return(Se(e)-s+i)/7}I("w",["ww",2],"wo","week"),I("W",["WW",2],"Wo","isoWeek"),C("week","w"),C("isoWeek","W"),F("week",5),F("isoWeek",5),ue("w",B),ue("ww",B,z),ue("W",B),ue("WW",B,z),fe(["w","ww","W","WW"],function(e,t,n,s){t[s.substr(0,1)]=D(e)});function je(e,t){return e.slice(t,7).concat(e.slice(0,t))}I("d",0,"do","day"),I("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),I("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),I("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),I("e",0,0,"weekday"),I("E",0,0,"isoWeekday"),C("day","d"),C("weekday","e"),C("isoWeekday","E"),F("day",11),F("weekday",11),F("isoWeekday",11),ue("d",B),ue("e",B),ue("E",B),ue("dd",function(e,t){return t.weekdaysMinRegex(e)}),ue("ddd",function(e,t){return t.weekdaysShortRegex(e)}),ue("dddd",function(e,t){return t.weekdaysRegex(e)}),fe(["dd","ddd","dddd"],function(e,t,n,s){var i=n._locale.weekdaysParse(e,s,n._strict);null!=i?t.d=i:g(n).invalidWeekday=e}),fe(["d","e","E"],function(e,t,n,s){t[s]=D(e)});var Ze="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_");var ze="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_");var $e="Su_Mo_Tu_We_Th_Fr_Sa".split("_");var qe=ae;var Je=ae;var Be=ae;function Qe(){function e(e,t){return t.length-e.length}var t,n,s,i,r,a=[],o=[],u=[],l=[];for(t=0;t<7;t++)n=y([2e3,1]).day(t),s=this.weekdaysMin(n,""),i=this.weekdaysShort(n,""),r=this.weekdays(n,""),a.push(s),o.push(i),u.push(r),l.push(s),l.push(i),l.push(r);for(a.sort(e),o.sort(e),u.sort(e),l.sort(e),t=0;t<7;t++)o[t]=he(o[t]),u[t]=he(u[t]),l[t]=he(l[t]);this._weekdaysRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function Xe(){return this.hours()%12||12}function Ke(e,t){I(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function et(e,t){return t._meridiemParse}I("H",["HH",2],0,"hour"),I("h",["hh",2],0,Xe),I("k",["kk",2],0,function(){return this.hours()||24}),I("hmm",0,0,function(){return""+Xe.apply(this)+L(this.minutes(),2)}),I("hmmss",0,0,function(){return""+Xe.apply(this)+L(this.minutes(),2)+L(this.seconds(),2)}),I("Hmm",0,0,function(){return""+this.hours()+L(this.minutes(),2)}),I("Hmmss",0,0,function(){return""+this.hours()+L(this.minutes(),2)+L(this.seconds(),2)}),Ke("a",!0),Ke("A",!1),C("hour","h"),F("hour",13),ue("a",et),ue("A",et),ue("H",B),ue("h",B),ue("k",B),ue("HH",B,z),ue("hh",B,z),ue("kk",B,z),ue("hmm",Q),ue("hmmss",X),ue("Hmm",Q),ue("Hmmss",X),ce(["H","HH"],ge),ce(["k","kk"],function(e,t,n){var s=D(e);t[ge]=24===s?0:s}),ce(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),ce(["h","hh"],function(e,t,n){t[ge]=D(e),g(n).bigHour=!0}),ce("hmm",function(e,t,n){var s=e.length-2;t[ge]=D(e.substr(0,s)),t[ve]=D(e.substr(s)),g(n).bigHour=!0}),ce("hmmss",function(e,t,n){var s=e.length-4,i=e.length-2;t[ge]=D(e.substr(0,s)),t[ve]=D(e.substr(s,2)),t[pe]=D(e.substr(i)),g(n).bigHour=!0}),ce("Hmm",function(e,t,n){var s=e.length-2;t[ge]=D(e.substr(0,s)),t[ve]=D(e.substr(s))}),ce("Hmmss",function(e,t,n){var s=e.length-4,i=e.length-2;t[ge]=D(e.substr(0,s)),t[ve]=D(e.substr(s,2)),t[pe]=D(e.substr(i))});var tt,nt=Te("Hours",!0),st={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Ce,monthsShort:He,week:{dow:0,doy:6},weekdays:Ze,weekdaysMin:$e,weekdaysShort:ze,meridiemParse:/[ap]\.?m?\.?/i},it={},rt={};function at(e){return e?e.toLowerCase().replace("_","-"):e}function ot(e){var t=null;if(!it[e]&&"undefined"!=typeof module&&module&&module.exports)try{t=tt._abbr,require("./locale/"+e),ut(t)}catch(e){}return it[e]}function ut(e,t){var n;return e&&((n=l(t)?ht(e):lt(e,t))?tt=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),tt._abbr}function lt(e,t){if(null===t)return delete it[e],null;var n,s=st;if(t.abbr=e,null!=it[e])T("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),s=it[e]._config;else if(null!=t.parentLocale)if(null!=it[t.parentLocale])s=it[t.parentLocale]._config;else{if(null==(n=ot(t.parentLocale)))return rt[t.parentLocale]||(rt[t.parentLocale]=[]),rt[t.parentLocale].push({name:e,config:t}),null;s=n._config}return it[e]=new P(x(s,t)),rt[e]&&rt[e].forEach(function(e){lt(e.name,e.config)}),ut(e),it[e]}function ht(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return tt;if(!o(e)){if(t=ot(e))return t;e=[e]}return function(e){for(var t,n,s,i,r=0;r=t&&a(i,n,!0)>=t-1)break;t--}r++}return tt}(e)}function dt(e){var t,n=e._a;return n&&-2===g(e).overflow&&(t=n[_e]<0||11Pe(n[me],n[_e])?ye:n[ge]<0||24Ae(n,r,a)?g(e)._overflowWeeks=!0:null!=u?g(e)._overflowWeekday=!0:(o=Ee(n,s,i,r,a),e._a[me]=o.year,e._dayOfYear=o.dayOfYear)}(e),null!=e._dayOfYear&&(r=ct(e._a[me],s[me]),(e._dayOfYear>Se(r)||0===e._dayOfYear)&&(g(e)._overflowDayOfYear=!0),n=Ge(r,0,e._dayOfYear),e._a[_e]=n.getUTCMonth(),e._a[ye]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=a[t]=s[t];for(;t<7;t++)e._a[t]=a[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[ge]&&0===e._a[ve]&&0===e._a[pe]&&0===e._a[we]&&(e._nextDay=!0,e._a[ge]=0),e._d=(e._useUTC?Ge:function(e,t,n,s,i,r,a){var o;return e<100&&0<=e?(o=new Date(e+400,t,n,s,i,r,a),isFinite(o.getFullYear())&&o.setFullYear(e)):o=new Date(e,t,n,s,i,r,a),o}).apply(null,a),i=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[ge]=24),e._w&&void 0!==e._w.d&&e._w.d!==i&&(g(e).weekdayMismatch=!0)}}var mt=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,_t=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,yt=/Z|[+-]\d\d(?::?\d\d)?/,gt=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],vt=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],pt=/^\/?Date\((\-?\d+)/i;function wt(e){var t,n,s,i,r,a,o=e._i,u=mt.exec(o)||_t.exec(o);if(u){for(g(e).iso=!0,t=0,n=gt.length;tn.valueOf():n.valueOf()this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},mn.isLocal=function(){return!!this.isValid()&&!this._isUTC},mn.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},mn.isUtc=Et,mn.isUTC=Et,mn.zoneAbbr=function(){return this._isUTC?"UTC":""},mn.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},mn.dates=n("dates accessor is deprecated. Use date instead.",un),mn.months=n("months accessor is deprecated. Use month instead",Ue),mn.years=n("years accessor is deprecated. Use year instead",Oe),mn.zone=n("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}),mn.isDSTShifted=n("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!l(this._isDSTShifted))return this._isDSTShifted;var e={};if(w(e,this),(e=Ot(e))._a){var t=e._isUTC?y(e._a):bt(e._a);this._isDSTShifted=this.isValid()&&0=1.10", + "moment": "^2.9.0" + } +} diff --git a/vendor/daterangepicker/website/index.html b/vendor/daterangepicker/website/index.html new file mode 100644 index 00000000..a1002644 --- /dev/null +++ b/vendor/daterangepicker/website/index.html @@ -0,0 +1,744 @@ + + + + + + + + Date Range Picker — JavaScript Date & Time Picker Library + + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+
+
+ +

Date Range Picker

+

+ A JavaScript component for choosing date ranges, + dates and times. +

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

Originally created for reports at Improvely, the Date Range Picker can be attached to any webpage element to pop up two calendars for selecting dates, times, or predefined ranges like "Last 30 Days".

+ + + +

Getting Started

+ +

+ To get started, include jQuery, Moment.js and Date Range Picker's files in your webpage: +

+ + + +

+ Then attach a date range picker to whatever you want to trigger it: +

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

+ You can customize Date Range Picker with options, and get notified when the user chooses new dates by providing a callback function. +

+ +

Examples

+ + +

Simple Date Range Picker With a Callback

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

Date Range Picker With Times

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

Single Date Picker

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

Predefined Date Ranges

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

Input Initially Empty

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

Options

+ +
    +
  • + startDate (Date or string) The beginning date of the initially selected date range. If you provide a string, it must match the date format string set in your locale setting. +
  • +
  • + endDate: (Date or string) The end date of the initially selected date range. +
  • +
  • + minDate: (Date or string) The earliest date a user may select. +
  • +
  • + maxDate: (Date or string) The latest date a user may select. +
  • +
  • + maxSpan: (object) The maximum span between the selected start and end dates. Check off maxSpan in the configuration generator for an example of how to use this. You can provide any object the moment library would let you add to a date. +
  • +
  • + showDropdowns: (true/false) Show year and month select boxes above calendars to jump to a specific month and year. +
  • +
  • + minYear: (number) The minimum year shown in the dropdowns when showDropdowns is set to true. +
  • +
  • + maxYear: (number) The maximum year shown in the dropdowns when showDropdowns is set to true. +
  • +
  • + showWeekNumbers: (true/false) Show localized week numbers at the start of each week on the calendars. +
  • +
  • + showISOWeekNumbers: (true/false) Show ISO week numbers at the start of each week on the calendars. +
  • +
  • + timePicker: (true/false) Adds select boxes to choose times in addition to dates. +
  • +
  • + timePickerIncrement: (number) Increment of the minutes selection list for times (i.e. 30 to allow only selection of times ending in 0 or 30). +
  • +
  • + timePicker24Hour: (true/false) Use 24-hour instead of 12-hour times, removing the AM/PM selection. +
  • +
  • + timePickerSeconds: (true/false) Show seconds in the timePicker. +
  • +
  • + ranges: (object) Set predefined date ranges the user can select from. Each key is the label for the range, and its value an array with two dates representing the bounds of the range. Click ranges in the configuration generator for examples. +
  • +
  • + showCustomRangeLabel: (true/false) Displays "Custom Range" at + the end of the list of predefined ranges, when the ranges option is used. + This option will be highlighted whenever the current date range selection does not match one of the predefined ranges. Clicking it will display the calendars to select a new range. +
  • +
  • + alwaysShowCalendars: (true/false) Normally, if you use the ranges option to specify pre-defined date ranges, calendars for choosing a custom date range are not shown until the user clicks "Custom Range". When this option is set to true, the calendars for choosing a custom date range are always shown instead. +
  • +
  • + opens: ('left'/'right'/'center') Whether the picker appears aligned to the left, to the right, or centered under the HTML element it's attached to. +
  • +
  • + drops: ('down'/'up') Whether the picker appears below (default) or above the HTML element it's attached to. +
  • +
  • + buttonClasses: (string) CSS class names that will be added to both the apply and cancel buttons. +
  • +
  • + applyButtonClasses: (string) CSS class names that will be added only to the apply button. +
  • +
  • + cancelButtonClasses: (string) CSS class names that will be added only to the cancel button. +
  • +
  • + locale: (object) Allows you to provide localized strings for buttons and labels, customize the date format, and change the first day of week for the calendars. + Check off locale in the configuration generator to see how + to customize these options. +
  • +
  • + singleDatePicker: (true/false) Show only a single calendar to choose one date, instead of a range picker with two calendars. The start and end dates provided to your callback will be the same single date chosen. +
  • +
  • + autoApply: (true/false) Hide the apply and cancel buttons, and automatically apply a new date range as soon as two dates are clicked. +
  • +
  • + linkedCalendars: (true/false) When enabled, the two calendars displayed will always be for two sequential months (i.e. January and February), and both will be advanced when clicking the left or right arrows above the calendars. When disabled, the two calendars can be individually advanced and display any month/year. +
  • +
  • + isInvalidDate: (function) A function that is passed each date in the two + calendars before they are displayed, and may return true or false to indicate whether + that date should be available for selection or not. +
  • +
  • + isCustomDate: (function) A function that is passed each date in the two + calendars before they are displayed, and may return a string or array of CSS class names + to apply to that date's calendar cell. +
  • +
  • + autoUpdateInput: (true/false) Indicates whether the date range picker should + automatically update the value of the <input> element it's attached to at initialization and when the selected dates change. +
  • +
  • + parentEl: (string) jQuery selector of the parent element that the date range picker will be added to, if not provided this will be 'body' +
  • +
+ +

Methods

+ +

+ You can programmatically update the startDate and endDate + in the picker using the setStartDate and setEndDate methods. + You can access the Date Range Picker object and its functions and properties through + data properties of the element you attached it to. +

+ + + +
+ +
    +
  • + setStartDate(Date or string): Sets the date range picker's currently selected start date to the provided date +
  • +
  • + setEndDate(Date or string): Sets the date range picker's currently selected end date to the provided date +
  • +
+ +

Example usage:

+ + + +

Events

+ +

+ Several events are triggered on the element you attach the picker to, which you can listen for. +

+ +
    +
  • + show.daterangepicker: Triggered when the picker is shown +
  • +
  • + hide.daterangepicker: Triggered when the picker is hidden +
  • +
  • + showCalendar.daterangepicker: Triggered when the calendar(s) are shown +
  • +
  • + hideCalendar.daterangepicker: Triggered when the calendar(s) are hidden +
  • +
  • + apply.daterangepicker: Triggered when the apply button is clicked, + or when a predefined range is clicked +
  • +
  • + cancel.daterangepicker: Triggered when the cancel button is clicked +
  • +
+ +

+ Some applications need a "clear" instead of a "cancel" functionality, which can be achieved by changing the button label and watching for the cancel event: +

+ + + +
+ +

+ While passing in a callback to the constructor is the easiest way to listen for changes in the selected date range, you can also do something every time the apply button is clicked even if the selection hasn't changed: +

+ + + +

Configuration Generator

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

Your Date Range Picker

+ +
+
+ +
+

Your Configuration to Copy

+ +
+ +
+
+ +
+ + + +

License

+ +

The MIT License (MIT)

+ +

Copyright (c) 2012-2019 Dan Grossman

+ +

+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +

+ +

+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +

+ +

+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +

+ +

Comments

+ +
+ + + +
+
+
+ + + + + + + + + + + diff --git a/vendor/daterangepicker/website/website.css b/vendor/daterangepicker/website/website.css new file mode 100644 index 00000000..d325155a --- /dev/null +++ b/vendor/daterangepicker/website/website.css @@ -0,0 +1,152 @@ +body { + font-size: 15px; + line-height: 1.6em; + position: relative; + margin: 0; +} + +.navbar .nav-item { + padding: 8px 0 8px 20px; +} + +.navbar .nav-link { + font-weight: bold; + font-size: 14px; + padding: 0; +} + +.navbar-expand-sm .navbar-nav .nav-link { + padding: 0; +} + +.well { + background: #f5f5f5; + border-radius: 4px; + padding: 20px; +} + +h1 { + font-size: 20px; + margin-bottom: 1em; + padding-bottom: 5px; + border-bottom: 1px dotted #08c; +} + +h1:before { + content: '#'; + color: #666; + position: relative; + padding-right: 5px; +} + +h2 { + padding: 0; + margin: 20px 0 0 0; + font-size: 18px; +} + +h2 a { + color: #444; + display: block; + background: #eee; + padding: 8px 12px; + margin-bottom: 0; + cursor: default; + text-decoration: none; +} + +input.form-control { + font-size: 14px; +} + +.collapsable { + border: 1px solid #eee; + padding: 12px; + display: block; +} + +label { + font-size: 13px; + font-weight: bold; +} + +.gist { + overflow: auto; +} + +.gist .blob-wrapper.data { + max-height: 350px; + overflow: auto; +} + +.list-group-item { + padding: 4px 0; + border: 0; + font-size: 16px; +} + +.leftcol { + position: absolute; + top: 180px; +} + +.rightcol { + max-width: 950px; +} + +.container { + max-width: 1300px; +} + +@media (min-width: 980px) { + .rightcol { + margin-left: 320px; + } +} + +p, pre { + margin-bottom: 2em; +} + +ul.nobullets { + margin: 0; + padding: 0; + list-style: none; +} +ul.nobullets li { + padding-bottom: 1em; + margin-bottom: 1em; + border-bottom: 1px dotted #ddd; +} + +input[type="text"] { + padding: 6px; + width: 100%; + border-radius: 4px; +} + +#footer { + background: #222; + margin-top: 80px; + padding: 10px; + color: #fff; + text-align: center; +} +#footer a:link, #footer a:visited { + color: #fff; + border-bottom: 1px dotted #fff; +} +#jumbo { + background: #c1deef; + color: #000; + padding: 20px 0; + margin-bottom: 20px; +} + +#jumbo h1 { + font-size: 28px; +} +#jumbo .btn { + border-radius: 0; + font-size: 16px; +} \ No newline at end of file diff --git a/vendor/daterangepicker/website/website.js b/vendor/daterangepicker/website/website.js new file mode 100644 index 00000000..e2179941 --- /dev/null +++ b/vendor/daterangepicker/website/website.js @@ -0,0 +1,179 @@ +$(document).ready(function() { + + $('#config-text').keyup(function() { + eval($(this).val()); + }); + + $('.configurator input, .configurator select').change(function() { + updateConfig(); + }); + + $('.demo i').click(function() { + $(this).parent().find('input').click(); + }); + + $('#startDate').daterangepicker({ + singleDatePicker: true, + startDate: moment().subtract(6, 'days') + }); + + $('#endDate').daterangepicker({ + singleDatePicker: true, + startDate: moment() + }); + + //updateConfig(); + + function updateConfig() { + var options = {}; + + if ($('#singleDatePicker').is(':checked')) + options.singleDatePicker = true; + + if ($('#showDropdowns').is(':checked')) + options.showDropdowns = true; + + if ($('#minYear').val().length && $('#minYear').val() != 1) + options.minYear = parseInt($('#minYear').val(), 10); + + if ($('#maxYear').val().length && $('#maxYear').val() != 1) + options.maxYear = parseInt($('#maxYear').val(), 10); + + if ($('#showWeekNumbers').is(':checked')) + options.showWeekNumbers = true; + + if ($('#showISOWeekNumbers').is(':checked')) + options.showISOWeekNumbers = true; + + if ($('#timePicker').is(':checked')) + options.timePicker = true; + + if ($('#timePicker24Hour').is(':checked')) + options.timePicker24Hour = true; + + if ($('#timePickerIncrement').val().length && $('#timePickerIncrement').val() != 1) + options.timePickerIncrement = parseInt($('#timePickerIncrement').val(), 10); + + if ($('#timePickerSeconds').is(':checked')) + options.timePickerSeconds = true; + + if ($('#autoApply').is(':checked')) + options.autoApply = true; + + if ($('#maxSpan').is(':checked')) + options.maxSpan = { days: 7 }; + + if ($('#ranges').is(':checked')) { + options.ranges = { + 'Today': [moment(), moment()], + 'Yesterday': [moment().subtract(1, 'days'), moment().subtract(1, 'days')], + 'Last 7 Days': [moment().subtract(6, 'days'), moment()], + 'Last 30 Days': [moment().subtract(29, 'days'), moment()], + 'This Month': [moment().startOf('month'), moment().endOf('month')], + 'Last Month': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')] + }; + } + + if ($('#locale').is(':checked')) { + options.locale = { + format: 'MM/DD/YYYY', + separator: ' - ', + applyLabel: 'Apply', + cancelLabel: 'Cancel', + fromLabel: 'From', + toLabel: 'To', + customRangeLabel: 'Custom', + weekLabel: 'W', + daysOfWeek: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr','Sa'], + monthNames: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'], + firstDay: 1 + }; + } + + if (!$('#linkedCalendars').is(':checked')) + options.linkedCalendars = false; + + if (!$('#autoUpdateInput').is(':checked')) + options.autoUpdateInput = false; + + if (!$('#showCustomRangeLabel').is(':checked')) + options.showCustomRangeLabel = false; + + if ($('#alwaysShowCalendars').is(':checked')) + options.alwaysShowCalendars = true; + + if ($('#parentEl').val().length) + options.parentEl = $('#parentEl').val(); + + if ($('#startDate').val().length) + options.startDate = $('#startDate').val(); + + if ($('#endDate').val().length) + options.endDate = $('#endDate').val(); + + if ($('#minDate').val().length) + options.minDate = $('#minDate').val(); + + if ($('#maxDate').val().length) + options.maxDate = $('#maxDate').val(); + + if ($('#opens').val().length && $('#opens').val() != 'right') + options.opens = $('#opens').val(); + + if ($('#drops').val().length && $('#drops').val() != 'down') + options.drops = $('#drops').val(); + + if ($('#buttonClasses').val().length && $('#buttonClasses').val() != 'btn btn-sm') + options.buttonClasses = $('#buttonClasses').val(); + + if ($('#applyButtonClasses').val().length && $('#applyButtonClasses').val() != 'btn-primary') + options.applyButtonClasses = $('#applyButtonClasses').val(); + + if ($('#cancelButtonClasses').val().length && $('#cancelButtonClasses').val() != 'btn-default') + options.cancelClass = $('#cancelButtonClasses').val(); + + $('#config-demo').daterangepicker(options, function(start, end, label) { console.log('New date range selected: ' + start.format('YYYY-MM-DD') + ' to ' + end.format('YYYY-MM-DD') + ' (predefined range: ' + label + ')'); }); + + if (typeof options.ranges !== 'undefined') { + options.ranges = {}; + } + + var option_text = JSON.stringify(options, null, ' '); + + var replacement = "ranges: {\n" + + " 'Today': [moment(), moment()],\n" + + " 'Yesterday': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],\n" + + " 'Last 7 Days': [moment().subtract(6, 'days'), moment()],\n" + + " 'Last 30 Days': [moment().subtract(29, 'days'), moment()],\n" + + " 'This Month': [moment().startOf('month'), moment().endOf('month')],\n" + + " 'Last Month': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')]\n" + + " }"; + option_text = option_text.replace(new RegExp('"ranges"\: \{\}', 'g'), replacement); + + $('#config-text').val("$('#demo').daterangepicker(" + option_text + ", function(start, end, label) {\n console.log('New date range selected: ' + start.format('YYYY-MM-DD') + ' to ' + end.format('YYYY-MM-DD') + ' (predefined range: ' + label + ')');\n});"); + + } + + $(window).scroll(function (event) { + var scroll = $(window).scrollTop(); + if (scroll > 180) { + $('.leftcol').css('position', 'fixed'); + $('.leftcol').css('top', '10px'); + } else { + $('.leftcol').css('position', 'absolute'); + $('.leftcol').css('top', '180px'); + } + }); + + var bg = new Trianglify({ + x_colors: ["#e1f3fd", "#eeeeee", "#407dbf"], + y_colors: 'match_x', + width: document.body.clientWidth, + height: 150, + stroke_width: 0, + cell_size: 20 + }); + + $('#jumbo').css('background-image', 'url(' + bg.png() + ')'); + +}); diff --git a/vendors.php b/vendors.php index fd46ab6e..b72eba62 100644 --- a/vendors.php +++ b/vendors.php @@ -53,13 +53,15 @@ Edit Delete
-
+
+