Repository: blynkkk/blynkkk.github.io Branch: master Commit: f914dc98a161 Files: 497 Total size: 2.4 MB Directory structure: gitextract_308jsc33/ ├── Amendments.md ├── AppExport.md ├── BlynkFirmware.md ├── BlynkMainOperations.md ├── BlynkProtocol.md ├── BlynkServer.md ├── CNAME ├── FAQ.md ├── GettingStarted.md ├── HardwareSetUps.md ├── Implementing.md ├── IntroAndDownloads.md ├── License.md ├── Links.md ├── OTA.md ├── README.md ├── Roadmap.md ├── SUMMARY.md ├── Security.md ├── Sharing.md ├── SupportedHardware.md ├── Troubleshooting.md ├── Widgets-RU.md ├── Widgets.md ├── amendments.md ├── api/ │ ├── README.md │ ├── api_getlastweekdata.md │ ├── events-api.md │ └── external_api.md ├── appexport.md ├── blynkfirmware.md ├── blynkmainoperations.md ├── blynkprotocol.md ├── blynkserver.md ├── css/ │ └── style.css ├── en/ │ ├── README.md │ ├── api/ │ │ └── README.md │ ├── infra/ │ │ └── backup_policy_FAQ.md │ └── product/ │ ├── README.md │ └── product-template-settings/ │ ├── README.md │ ├── dashboard.md │ ├── datastreams/ │ │ ├── README.md │ │ ├── datastream_alias.md │ │ ├── datastream_automation.md │ │ ├── datastream_datatype.md │ │ ├── datastream_default_value.md │ │ ├── datastream_deicmals.md │ │ ├── datastream_feedback.md │ │ ├── datastream_invalidate.md │ │ ├── datastream_min_max.md │ │ ├── datastream_name.md │ │ ├── datastream_save_raw.md │ │ ├── datastream_sync.md │ │ └── datastream_virtual_pin.md │ ├── events/ │ │ ├── README.md │ │ ├── event_code.md │ │ ├── event_name.md │ │ ├── event_notification.md │ │ ├── event_notification_period.md │ │ └── event_online_offline.md │ ├── general-settings/ │ │ ├── README.md │ │ ├── product_manufacturer.md │ │ └── product_offline_ignore_period.md │ └── metadata.md ├── en-product/ │ ├── create-new-product.md │ ├── dashboard/ │ │ └── chart.md │ ├── datastreams/ │ │ ├── README.md │ │ ├── datastream-alias.md │ │ ├── datastream-data-type.md │ │ ├── datastream-invalidate-value.md │ │ ├── datastream-min-max-values.md │ │ ├── datastream-name.md │ │ ├── datastream-save-raw-data.md │ │ ├── datastream-virtual-pin.md │ │ ├── decimals-formatting.md │ │ ├── default-value.md │ │ ├── expose-to-automation.md │ │ ├── sync-with-the-latest-server-value.md │ │ └── wait-for-confirmation-from-the-device.md │ ├── events/ │ │ ├── README.md │ │ ├── events-code.md │ │ ├── events-name.md │ │ ├── events-notification-period.md │ │ ├── events-notification.md │ │ └── events-online-offline.md │ ├── general-settings/ │ │ ├── README.md │ │ ├── manufacturer.md │ │ └── offline-ignore-period.md │ ├── metadata.md │ ├── mobile-app-ui.md │ └── web-dashboard.md ├── faq.md ├── firmware-api/ │ ├── README.md │ └── disable-widgets-in-the-app.md ├── firmware-api-1/ │ └── disable-widgets-in-the-app.md ├── gettingstarted.md ├── google-code-prettify/ │ ├── CHANGES.html │ ├── COPYING │ ├── Makefile │ ├── README.html │ ├── examples/ │ │ └── quine.html │ ├── js-modules/ │ │ ├── combinePrefixPatterns.js │ │ ├── externs.js │ │ ├── extractSourceSpans.js │ │ ├── extractSourceSpans_test.html │ │ ├── js_include.pl │ │ ├── numberLines.js │ │ ├── numberLines_test.html │ │ ├── prettify.js │ │ ├── recombineTagsAndDecorations.js │ │ ├── recombineTagsAndDecorations_test.html │ │ ├── regexpPrecederPatterns.pl │ │ └── run_prettify.js │ ├── src/ │ │ ├── lang-apollo.js │ │ ├── lang-basic.js │ │ ├── lang-clj.js │ │ ├── lang-css.js │ │ ├── lang-dart.js │ │ ├── lang-erlang.js │ │ ├── lang-go.js │ │ ├── lang-hs.js │ │ ├── lang-lisp.js │ │ ├── lang-llvm.js │ │ ├── lang-lua.js │ │ ├── lang-matlab.js │ │ ├── lang-ml.js │ │ ├── lang-mumps.js │ │ ├── lang-n.js │ │ ├── lang-pascal.js │ │ ├── lang-proto.js │ │ ├── lang-r.js │ │ ├── lang-rd.js │ │ ├── lang-scala.js │ │ ├── lang-sql.js │ │ ├── lang-tcl.js │ │ ├── lang-tex.js │ │ ├── lang-vb.js │ │ ├── lang-vhdl.js │ │ ├── lang-wiki.js │ │ ├── lang-xq.js │ │ ├── lang-yaml.js │ │ ├── prettify.css │ │ ├── prettify.js │ │ └── run_prettify.js │ ├── styles/ │ │ ├── demo.html │ │ ├── desert.css │ │ ├── doxy.css │ │ ├── index.html │ │ ├── sons-of-obsidian.css │ │ └── sunburst.css │ ├── tests/ │ │ ├── debug-ie-compat-matrix.html │ │ ├── ie-newline-copy-paste.html │ │ ├── large_input_test.html │ │ ├── prettify_test.html │ │ ├── prettify_test_2.html │ │ ├── run_prettify_test.html │ │ ├── test_base.js │ │ └── test_styles.css │ └── tools/ │ ├── closure-compiler/ │ │ ├── COPYING │ │ ├── README │ │ ├── amd-externs.js │ │ ├── compiler.jar │ │ └── console-externs.js │ ├── cut-release.sh │ ├── googlecode_upload.py │ ├── lang-handler-aliases.sh │ └── yui-compressor/ │ ├── LICENSE.TXT │ ├── README │ └── yuicompressor-2.4.4.jar ├── hardwaresetups.md ├── http.md ├── https-api/ │ ├── api_getlastweekdata.md │ ├── events-api.md │ └── external_api.md ├── implementing.md ├── index.html ├── introanddownloads.md ├── license.md ├── links.md ├── mobile/ │ ├── README.md │ ├── accelerometer.md │ ├── barometer.md │ ├── ble.md │ ├── bluetooth.md │ ├── bridge.md │ ├── button.md │ ├── datastreams.md │ ├── device_selector.md │ ├── device_tiles.md │ ├── email.md │ ├── eventor.md │ ├── gauge.md │ ├── gps_streaming.md │ ├── gps_trigger.md │ ├── graph.md │ ├── gravity.md │ ├── humidity.md │ ├── image.md │ ├── joystick.md │ ├── labeled_value.md │ ├── labeled_value_display.md │ ├── lcd.md │ ├── led.md │ ├── level_display.md │ ├── light.md │ ├── map.md │ ├── menu.md │ ├── music_player.md │ ├── notification.md │ ├── numberInput.md │ ├── number_input.md │ ├── proximity.md │ ├── report.md │ ├── rgb.md │ ├── rtc.md │ ├── ru/ │ │ ├── accelerometer.md │ │ ├── barometer.md │ │ ├── ble.md │ │ ├── bluetooth.md │ │ ├── bridge.md │ │ ├── button.md │ │ ├── device_selector.md │ │ ├── device_tiles.md │ │ ├── email.md │ │ ├── eventor.md │ │ ├── gauge.md │ │ ├── gps_streaming.md │ │ ├── gps_trigger.md │ │ ├── graph.md │ │ ├── gravity.md │ │ ├── humidity.md │ │ ├── image.md │ │ ├── joystick.md │ │ ├── labeled_value.md │ │ ├── labeled_value_display.md │ │ ├── lcd.md │ │ ├── led.md │ │ ├── level_display.md │ │ ├── light.md │ │ ├── map.md │ │ ├── menu.md │ │ ├── music_player.md │ │ ├── notification.md │ │ ├── numberInput.md │ │ ├── number_input.md │ │ ├── proximity.md │ │ ├── report.md │ │ ├── rgb.md │ │ ├── rtc.md │ │ ├── segmentedSwitch.md │ │ ├── segmented_control.md │ │ ├── slider.md │ │ ├── step.md │ │ ├── styled_button.md │ │ ├── super_chart.md │ │ ├── table.md │ │ ├── tabs.md │ │ ├── temperature.md │ │ ├── terminal.md │ │ ├── textInput.md │ │ ├── text_input.md │ │ ├── time_input.md │ │ ├── timeinput.md │ │ ├── timer.md │ │ ├── twitter.md │ │ ├── value_display.md │ │ ├── video.md │ │ └── webhook.md │ ├── segmentedSwitch.md │ ├── segmented_control.md │ ├── slider.md │ ├── step.md │ ├── styled_button.md │ ├── super_chart.md │ ├── table.md │ ├── tabs.md │ ├── temperature.md │ ├── terminal.md │ ├── textInput.md │ ├── text_input.md │ ├── time_input/ │ │ ├── README.md │ │ └── untitled-1.md │ ├── time_input.md │ ├── timeinput.md │ ├── timer.md │ ├── twitter.md │ ├── value_display.md │ ├── video.md │ └── webhook.md ├── mobile-app/ │ └── untitled.md ├── new/ │ └── en/ │ ├── product_categories.md │ ├── product_hotspot_prefix.md │ └── product_template_ids.md ├── ota.md ├── roadmap.md ├── ru/ │ ├── Amendments.md │ ├── AppExport.md │ ├── BlynkFirmware.md │ ├── BlynkMainOperations.md │ ├── BlynkProtocol.md │ ├── BlynkServer.md │ ├── FAQ.md │ ├── GettingStarted.md │ ├── HardwareSetUps.md │ ├── Implementing.md │ ├── IntroAndDownloads.md │ ├── License.md │ ├── Links.md │ ├── OTA.md │ ├── README.md │ ├── Roadmap.md │ ├── Security.md │ ├── Sharing.md │ ├── SupportedHardware.md │ ├── Troubleshooting.md │ ├── Widgets.md │ ├── amendments.md │ ├── appexport.md │ ├── blynkfirmware.md │ ├── blynkmainoperations.md │ ├── blynkprotocol.md │ ├── blynkserver.md │ ├── faq.md │ ├── gettingstarted.md │ ├── hardwaresetups.md │ ├── http.md │ ├── implementing.md │ ├── introanddownloads.md │ ├── license.md │ ├── links.md │ ├── ota.md │ ├── readme.md │ ├── roadmap.md │ ├── ru.md │ ├── security.md │ ├── sharing.md │ ├── supportedhardware.md │ ├── troubleshooting.md │ └── widgets.md ├── scripts/ │ ├── flatdoc.js │ ├── legacy.js │ └── script.js ├── security.md ├── sharing.md ├── supportedhardware.md ├── table.css ├── themes/ │ ├── blynk.css │ └── prism.css ├── troubleshooting.md ├── untitled/ │ ├── README.md │ ├── accelerometer.md │ ├── archive/ │ │ ├── README.md │ │ ├── bad-request-github.md │ │ ├── joystick.md │ │ └── super_chart.md │ ├── barometer.md │ ├── ble.md │ ├── blob/ │ │ ├── README.md │ │ ├── master.md │ │ ├── menu/ │ │ │ ├── README.md │ │ │ └── blynkkk-blynkkk.github.io-1.md │ │ ├── proximity.md │ │ ├── styled_button/ │ │ │ ├── README.md │ │ │ └── blynkkk-blynkkk.github.io.md │ │ ├── textinput.md │ │ └── timeinput/ │ │ ├── README.md │ │ └── blynkkk-blynkkk.github.io-2.md │ ├── bluetooth.md │ ├── blynkkk-blynkkk.github.io/ │ │ ├── README.md │ │ └── gps_trigger.md │ ├── blynkkk-blynkkk.github.io-1/ │ │ ├── README.md │ │ └── rtc.md │ ├── blynkkk-blynkkk.github.io-2/ │ │ ├── README.md │ │ └── eventor.md │ ├── blynkkk-blynkkk.github.io-3/ │ │ ├── README.md │ │ └── email.md │ ├── blynkkk-blynkkk.github.io-4/ │ │ ├── README.md │ │ └── tabs.md │ ├── blynkkk-blynkkk.github.io-5/ │ │ ├── README.md │ │ └── map.md │ ├── blynkkk-blynkkk.github.io-6/ │ │ ├── README.md │ │ └── ble.md │ ├── blynkkk-blynkkk.github.io-7/ │ │ ├── README.md │ │ └── device_tiles.md │ ├── blynkkk-blynkkk.github.io-8/ │ │ ├── README.md │ │ └── temperature.md │ ├── blynkkk-blynkkk.github.io-9/ │ │ ├── README.md │ │ └── value_display.md │ ├── bridge.md │ ├── build-software-better-together/ │ │ ├── README.md │ │ └── video.md │ ├── button.md │ ├── commit/ │ │ ├── README.md │ │ ├── change-float-to-double-41-b1f1a43.md │ │ ├── gauge.md │ │ └── music_player.md │ ├── commits/ │ │ ├── README.md │ │ ├── blynkkk-blynkkk.github.io.md │ │ ├── light.md │ │ └── time_input.md │ ├── device_selector.md │ ├── device_tiles.md │ ├── email.md │ ├── eventor.md │ ├── find/ │ │ ├── README.md │ │ ├── blynkkk-blynkkk.github.io.md │ │ ├── image.md │ │ └── terminal.md │ ├── gauge.md │ ├── gps_streaming.md │ ├── gps_trigger.md │ ├── graph.md │ ├── gravity.md │ ├── humidity.md │ ├── image.md │ ├── joystick.md │ ├── labeled_value.md │ ├── labeled_value_display.md │ ├── lcd.md │ ├── led.md │ ├── level_display.md │ ├── light.md │ ├── map.md │ ├── menu.md │ ├── music_player.md │ ├── network/ │ │ ├── README.md │ │ ├── blynkkk-blynkkk.github.io.md │ │ ├── numberinput.md │ │ └── slider.md │ ├── notification.md │ ├── number_input.md │ ├── numberinput.md │ ├── proximity.md │ ├── pull/ │ │ ├── README.md │ │ ├── change-float-to-double-by-earlold-pull-request-41.md │ │ ├── text_input.md │ │ └── webhook.md │ ├── report.md │ ├── rgb.md │ ├── rtc.md │ ├── ru.md │ ├── segmented_control.md │ ├── segmentedswitch.md │ ├── slider.md │ ├── step.md │ ├── styled_button.md │ ├── super_chart.md │ ├── table.md │ ├── tabs.md │ ├── temperature.md │ ├── terminal.md │ ├── textinput.md │ ├── timeinput.md │ ├── timer.md │ ├── tree/ │ │ ├── README.md │ │ ├── accelerometer/ │ │ │ ├── README.md │ │ │ └── new.md │ │ ├── barometer.md │ │ ├── bluetooth/ │ │ │ ├── README.md │ │ │ └── blynkkk-blynkkk.github.io-4.md │ │ ├── blynkkk-blynkkk.github.io.md │ │ ├── bridge.md │ │ ├── button/ │ │ │ ├── README.md │ │ │ └── blynkkk-blynkkk.github.io-3.md │ │ ├── device_selector.md │ │ ├── gps_streaming.md │ │ ├── graph/ │ │ │ ├── README.md │ │ │ └── blynkkk-blynkkk.github.io-6.md │ │ ├── gravity/ │ │ │ ├── README.md │ │ │ └── blynkkk-blynkkk.github.io-5.md │ │ ├── humidity/ │ │ │ ├── README.md │ │ │ └── blynkkk-blynkkk.github.io-1.md │ │ ├── labeled_value.md │ │ ├── labeled_value_display.md │ │ ├── lcd.md │ │ ├── led.md │ │ ├── level_display.md │ │ ├── master.md │ │ ├── notification.md │ │ ├── number_input/ │ │ │ ├── README.md │ │ │ └── blynkkk-blynkkk.github.io.md │ │ ├── report.md │ │ ├── rgb.md │ │ ├── segmented_control/ │ │ │ ├── README.md │ │ │ └── blynkkk-blynkkk.github.io-2.md │ │ ├── segmentedswitch.md │ │ ├── step.md │ │ ├── table/ │ │ │ ├── README.md │ │ │ └── blynkkk-blynkkk.github.io.md │ │ ├── timer.md │ │ └── twitter.md │ ├── twitter.md │ ├── value_display.md │ ├── video.md │ └── webhook.md ├── widgets-ru.md └── widgets.md ================================================ FILE CONTENTS ================================================ ================================================ FILE: Amendments.md ================================================ #Blynk Amendments ###Tell every maker about Blynk No pressure. Just do it. Now. ###Make your idea work without Blynk Blynk can be easily integrated in almost any project. But before that - make it work **without** it. After you are sure that you can get all the sensor data or can control things from the code – integrate Blynk and make it even more awesome. ###Use search We are always happy to chat and help, but remember - every time you ask the question that was answered many many times before that, Blynk Team is not building a new widget or new cool feature. So: - google before asking - use search on our forum, it works really well - check Instructables ###Always wrap your code Though shalt not post code without ```wrapping it``` ================================================ FILE: AppExport.md ================================================ # App Export ## Firmware for ESP8266, NodeMCU, BlynkBoard, etc. #### Prepare development environment 1. Install [Arduino IDE](https://www.arduino.cc/en/Main/Software) 2. Install [Blynk Library](https://github.com/blynkkk/blynk-library/releases/latest) and restart Arduino IDE 3. Install [ESP8266 core for Arduino](https://github.com/esp8266/Arduino#installing-with-boards-manager) 4. For Windows / OS X, you may need to install USB-Serial drivers according to your converter: - СP2102: https://www.silabs.com/products/mcu/Pages/USBtoUARTBridgeVCPDrivers.aspx - FTDI (FT232, etc): http://www.ftdichip.com/Drivers/VCP.htm - *TODO: Link to drivers for CH340 and PL2303.* 5. If your board has a NeoPixel RGB LED, install [Adafruit NeoPixel](https://github.com/adafruit/Adafruit_NeoPixel) library from Library Manager #### Build your Firmware 1. Open our example in Arduino IDE: ```File -> Examples -> Blynk -> Provisioning -> Blynk_ESP8266``` 2. Open ```Settings.h``` tab. 3. Configure your firmware: * ```BOARD_NAME``` - ... * ```BOARD_VENDOR``` - ... * ```PRODUCT_WIFI_SSID``` - ... #### Upload firmare 1. Select your board type: ```Tools -> Board -> [Your Board]``` 2. Select your port: ```Tools -> Port -> [...]``` 3. Verify and Upload! Note that for Blynk Board, you can select board type ```NodeMCU 1.0```. ================================================ FILE: BlynkFirmware.md ================================================ #Blynk Firmware ## Configuration ### Blynk.begin() The easiest way to configure Blynk is to use ```Blynk.begin()```: ```cpp Blynk.begin(auth, ...); ``` It has multiple parameters for different hardware models and it also depends on the type of connection. Follow the example sketches for your specific hardware model. What happens inside of ```Blynk.begin()``` function: 1. Connection to the network (WiFi, Ethernet, ...) 2. Call of ```Blynk.config(...)``` to set Auth Token, Server Address, etc. 3. Attempts to connect to the server once (can block for more than 30s) If your shield/connection type is not supported yet - you can implement it by yourself. [Here are some examples](https://github.com/blynkkk/blynk-library/tree/master/examples/More/ArduinoClient). ### Blynk.config() ```config()``` allows you to manage network connection. You can set up your connection type (WiFi, Ethernet, ...) by yourself, and then call: ```cpp Blynk.config(auth, server, port); ``` or just ```cpp Blynk.config(auth); ``` **NOTE: After ``` Blynk.config(...) ``` is called, your hardware is not yet connected to the server.** It will try to connect while until it hits first instance of ``` Blynk.run() ``` or ``` Blynk.connect() ```routine. To skip connecting to the server or to disconnect manually, call ``` Blynk.disconnect() ``` after configuration. Use ```connectWiFi``` to conveniently set up WiFi connection: ```cpp Blynk.connectWiFi(ssid, pass); ``` To connect to open WiFi networks, set pass to an empty string (```""```). ## Connection management There are several functions to help with connection management: ### Blynk.connect() This functions will continue trying to connect to Blynk server. Returns `true` when connected, `false` if timeout have been reached. Default timeout is 30 seconds. ```cpp bool result = Blynk.connect(); bool result = Blynk.connect(timeout); ``` ### Blynk.disconnect() Disconnects hardware from Blynk server: ```cpp Blynk.disconnect(); ``` ### Blynk.connected() Returns `true` when hardware is connected to Blynk Server, `false` if there is no active connection to Blynk server. ```cpp bool result = Blynk.connected(); ``` ### Blynk.run() This function should be called frequently to process incoming commands and perform housekeeping of Blynk connection. It is usually called in ``` void loop() {} ```. This command can be initiated it in other places of your code unless you run out of heap memory (in the cascaded functions with local memory). For example, it is not recommended to call ``` Blynk.run() ``` inside of the ```BLYNK_READ ``` and ``` BLYNK_WRITE ``` functions on low-RAM devices. ## Digital & Analog pins control Blynk library can perform basic pin IO (input-output) operations out-of-the-box: digitalRead digitalWrite analogRead analogWrite (PWM or Analog signal depending on the platform) No need to write code for simple things like LED, Relay control and analog sensors. Just choose a corresponding Pin in Blynk app and control it directly with no additional code ## Virtual pins control Virtual Pins is a way to exchange any data between your hardware and Blynk app. Think about Virtual Pins as channels for sending any data. Make sure you differentiate Virtual Pins from physical GPIO pins on your hardware. Virtual Pins have no physical representation. Virtual Pins are commonly used to interface with other libraries (Servo, LCD and others) and implement custom logic. The device can send data to the App using ```Blynk.virtualWrite(pin, value)``` and receive data from the App using ```BLYNK_WRITE(vPIN)```. Read below #### Virtual Pin data types All Virtual Pin values are always sent as Strings and there are no practical limits on the data that can be sent. However, there are certian limitations on the hardware side when dealing with numbers. For example, the integer on Arduino is 16-bit, allowing range -32768 to 32767. To interpret incoming data as Integers, Floats, Doubles and Strings use: ```cpp param.asInt(); param.asFloat(); param.asDouble(); param.asStr(); ``` You can also get the RAW data from the param buffer: ```cpp param.getBuffer() param.getLength() ``` ### Blynk.virtualWrite(vPin, value) **NOTE: Use BlynkTimer when you use this command to send data. Otherwise your hardware will be disconnected from the server** Send data in various formats to Virtual Pins. ```cpp // Send string Blynk.virtualWrite(pin, "abc"); // Send integer Blynk.virtualWrite(pin, 123); // Send float Blynk.virtualWrite(pin, 12.34); // Send multiple values as an array Blynk.virtualWrite(pin, "hello", 123, 12.34); // Send RAW data Blynk.virtualWriteBinary(pin, buffer, length); ``` Calling ```virtualWrite``` attempts to send the value to the network immediately. **Note:** For virtual pins with numbers > 127, the `V128` syntax is not available. Please use plain virtual pin number, for example: ```cpp Blynk.virtualWrite(128, "abc"); ``` ## BlynkTimer It's important to send data in intervals and keep the void loop() as clean as possible. `BlynkTimer` allows you to send data periodically with given intervals not interfering with Blynk library routines `Blynk Timer` inherits [SimpleTimer Library](http://playground.arduino.cc/Code/SimpleTimer), a well known and widely used library to time multiple events on hardware. `BlynkTimer` is included in Blynk library by default and there is no need to install SimpleTimer separately or include `SimpleTimer.h` - A single `BlynkTimer` object allows to schedule up to 16 timers - Improved compatibility with boards like `Arduino 101`, `Intel Galileo`, etc. - When a timer struggles to run multiple times (due to a blocked `loop`), it just skips all the missed intervals, and calls your function only once. This differs from `SimpleTimer`, which could call your function multiple times in this scenario. For more information on timer usage, please see: http://playground.arduino.cc/Code/SimpleTimer And here is a BlynkTimer [example sketch](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/PushData/PushData.ino#L30). Please also remember that a single ```BlynkTimer``` can schedule many timers, so most probably you need only one instance of BlynkTimer in your sketch. ### BLYNK_WRITE(vPIN) ```BLYNK_WRITE``` is a function called every time device gets an update of Virtual Pin value from the server (or app): To read the received data use: ```cpp BLYNK_WRITE(V0) { int value = param.asInt(); // Get value as integer // The param can contain multiple values, in such case: int x = param[0].asInt(); int y = param[1].asInt(); } ``` **`BLYNK_WRITE` can't be used inside of any loop or function. It's a standalone function.** **Note:** For virtual pins with numbers > 127, please use `BLYNK_WRITE_DEFAULT()` API ### BLYNK_READ(vPIN) ```BLYNK_READ``` is function called when device is requested to send it's current value of Virtual Pin to the server. Normally, this function should contain ```Blynk.virtualWrite``` call(s). ```cpp BLYNK_READ(V0) { Blynk.virtualWrite(V0, newValue); } ``` **Note:** For virtual pins with numbers > 127, please use `BLYNK_READ_DEFAULT()` API ### BLYNK_WRITE_DEFAULT() Redefines the handler for all pins that are not covered by custom ```BLYNK_WRITE``` functions. ```cpp BLYNK_WRITE_DEFAULT() { int pin = request.pin; // Which exactly pin is handled? int value = param.asInt(); // Use param as usual. } ``` ### BLYNK_READ_DEFAULT() Redefines the handler for all pins that are not covered by custom ```BLYNK_READ``` functions. ```cpp BLYNK_READ_DEFAULT() { int pin = request.pin; // Which exactly pin is handled? Blynk.virtualWrite(pin, newValue); } ``` ### BLYNK_CONNECTED() Use this function when you need to run certain routine when hardware connects to Blynk Cloud or private server. It's common to call sync functions inside of this function. ```cpp BLYNK_CONNECTED() { // Your code here } ``` ### BLYNK_APP_CONNECTED() This function is called every time Blynk app client connects to Blynk server. ```cpp BLYNK_APP_CONNECTED() { // Your code goes here } ``` **Note: Ennable this feature in Project Settings first:** [Example](https://github.com/blynkkk/blynk-library/blob/master/examples/More/AppConnectedEvents/AppConnectedEvents.ino) ### BLYNK_APP_DISCONNECTED() This function is called every time the Blynk app disconnects from Blynk Cloud or private server. ```cpp BLYNK_APP_DISCONNECTED() { // Your code here } ``` **Note: Enable this feature in Project Settings first:** [Example](https://github.com/blynkkk/blynk-library/blob/master/examples/More/AppConnectedEvents/AppConnectedEvents.ino) ### Blynk.syncAll() Requests all stored on the server latest values for all widgets. All analog/digital/virtual pin values and states will be set to the latest stored value. Every virtual pin will generate BLYNK_WRITE() event. ```cpp BLYNK_CONNECTED() { Blynk.syncAll(); } ``` ### Blynk.syncVirtual(vPin) This command updates individual Virtual Pin to the latest stored value on the server. When it's used, a corresponding ```BLYNK_WRITE``` handler is called. ```cpp Blynk.syncVirtual(V0); ``` To update multiple pins, use: ``` Blynk.syncVirtual(V0, V1, V6, V9, V16); ``` ### Blynk.setProperty(vPin, "property", value) This command allows [changing widget properties](#blynk-main-operations-change-widget-properties) ## Debugging ### #define BLYNK_PRINT ### #define BLYNK_DEBUG To enable debug prints on the default Serial port add on the top of your sketch **IMPORTANT: This should be the first line in your code**: ```cpp #define BLYNK_PRINT Serial // Defines the object that is used for printing #define BLYNK_DEBUG // Optional, this enables more detailed prints ``` Then enable Serial Output in setup(): ```cpp Serial.begin(9600); ``` Open Serial Monitor and you'll see the debug prints. You can also use spare Hardware serial ports or SoftwareSerial for debug output (you will need an adapter to connect to it with your PC). **WARNING:** Enabling ```BLYNK_DEBUG``` will slowdown your hardware processing speed up to 10 times! ### BLYNK_LOG() When ```BLYNK_PRINT``` is defined, you can use ```BLYNK_LOG``` to print your logs. The usage is similar to ```printf```: ```cpp BLYNK_LOG("This is my value: %d", 10); ``` On some platforms (like Arduino 101) the ```BLYNK_LOG``` may be unavailable, or may just use too much resources. In this case you can use a set of simpler log functions: ```cpp BLYNK_LOG1("Hello World"); // Print a string BLYNK_LOG1(10); // Print a number BLYNK_LOG2("This is my value: ", 10); // Print 2 values BLYNK_LOG4("Temperature: ", 24, " Humidity: ", 55); // Print 4 values ... ``` ## Minimizing footprint To minimize the program Flash/RAM, you can disable some of the built-in functionality: 1. Comment-out ```#define BLYNK_PRINT``` to remove prints 2. Put on the top of your sketch: ``` #define BLYNK_NO_BUILTIN // Disable built-in analog & digital pin operations #define BLYNK_NO_FLOAT // Disable float operations ``` ## Porting, hacking If you want to dive into crafting/hacking/porting Blynk library implementation, please also check [this documentation](https://github.com/blynkkk/blynk-library/tree/master/extras/docs). ================================================ FILE: BlynkMainOperations.md ================================================ # Blynk main operations ## Virtual Pins Blynk can control Digital and Analog I/O Pins on you hardware directly. You don't even need to write code for it. It's great for blinking LEDs, but often it's just not enough... We designed Virtual Pins to send **any** data from your microcontroller to the Blynk App and back. Anything you connect to your hardware will be able to talk to Blynk. With Virtual Pins you can send something from the App, process it on microcontroller and then send it back to the smartphone. You can trigger functions, read I2C devices, convert values, control servo and DC motors etc. Virtual Pins can be used to interface with external libraries (Servo, LCD and others) and implement custom functionality. Hardware may send data to the Widgets over the Virtual Pin like this: ```cpp Blynk.virtualWrite(pin, "abc"); Blynk.virtualWrite(pin, 123); Blynk.virtualWrite(pin, 12.34); Blynk.virtualWrite(pin, "hello", 123, 12.34); ``` For more information about virtual pins, [read this](/#blynk-firmware-virtual-pins-control) ## Send data from app to hardware You can send any data from Widgets in the app to your hardware. All [Controller Widgets](/#widgets-controllers) can send data to Virtual Pins on your hardware. For example, code below shows how to get values from the Button Widget in the App ```cpp BLYNK_WRITE(V1) //Button Widget is writing to pin V1 { int pinData = param.asInt(); } ``` When you press a Button, Blynk App sends ```1``` On the second click - it sends ```0``` This is how Button Widget is set up: Full example sketch: [Get Data](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/GetData/GetData.ino#L24) ### Sending array from Widget Some Widgets (e.g Joystick, zeRGBa) have more than one output. This output can be written to Virtual Pin as an array of values. On the hardware side - you can get any element of the array [0,1,2...] by using: ```cpp BLYNK_WRITE(V1) // Widget WRITEs to Virtual Pin V1 { int x = param[0].asInt(); // getting first value int y = param[1].asInt(); // getting second value int z = param[N].asInt(); // getting N value } ``` **Sketch:** [JoystickTwoAxis](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/JoystickTwoAxis/JoystickTwoAxis.ino#L24) ## Get data from hardware There are two ways of pushing data from your hardware to the Widgets in the app over Virtual Pins. ### Perform requests by Widget - Using Blynk built-in reading frequency while App is active by setting 'Reading Frequency' parameter to some interval: ```cpp BLYNK_READ(V5) // Widget in the app READs Virtal Pin V5 with the certain frequency { // This command writes Arduino's uptime in seconds to Virtual Pin V5 Blynk.virtualWrite(5, millis() / 1000); } ``` **Sketch:** [PushDataOnRequest](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/PushDataOnRequest/PushDataOnRequest.ino#L26) ### Pushing data from hardware If you need to PUSH sensor or other data from your hardware to Widget, you can write any logic you want. Just set the frequency to PUSH mode. Any command that hardware sends to Blynk Cloud is automatically stored on server and you get this info either with [History Graph](/#widgets-displays-superchart) widget or with [HTTP API](http://docs.blynkapi.apiary.io/#reference/0/pin-history-data/get-all-history-data-for-specific-pin). We recommend sending data in intervals and avoiding [Flood Error](https://docs.blynk.cc/#troubleshooting-flood-error). You can use timers like [BlynkTimer](/#blynk-firmware-blynktimer). Please read instructions inside this [example sketch](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/PushData/PushData.ino) for more details. Here is how it can work: ```cpp #include #include #include char auth[] = "YourAuthToken"; // Put your token here BlynkTimer timer; // Create a Timer object called "timer"! void setup() { Serial.begin(9600); Blynk.begin(auth); timer.setInterval(1000L, sendUptime); // Here you set interval (1sec) and which function to call } void sendUptime() { // This function sends Arduino up time every 1 second to Virtual Pin (V5) // In the app, Widget's reading frequency should be set to PUSH // You can send anything with any interval using this construction // Don't send more that 10 values per second Blynk.virtualWrite(V5, millis() / 1000); } void loop() { Blynk.run(); // all the Blynk magic happens here timer.run(); // BlynkTimer is working... } ``` **Sketch:** [PushData](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/PushData/PushData.ino#L30) ## State syncing ### For hardware If your hardware looses Internet connection or resets, you can restore all the values from Widgets in the Blynk app. ```cpp BLYNK_CONNECTED() { Blynk.syncAll(); } //here handlers for sync command BLYNK_WRITE(V0) { .... } ``` The ```Blynk.syncAll()``` command restores all the Widget's values based on the last saved values on the server. All analog and digital pin states will be restored. Every Virtual Pin will perform ```BLYNK_WRITE``` event. **WARNING**: if pin is empty and wasn't initialized - hardware will not get any response for those pin during sync. [Sync Hardware with App state](https://github.com/blynkkk/blynk-library/blob/master/examples/More/Sync/HardwareSyncStateFromApp/HardwareSyncStateFromApp.ino) You can also update a single Virtual Pin value by calling ```Blynk.syncVirtual(V0)``` or you can update several pins with ```Blynk.syncVirtual(V0, V1, V2, ...)```. You can also use server to store any value without widget. Just call ```Blynk.virtualWrite(V0, value)```. [Storing single value on server](https://github.com/blynkkk/blynk-library/blob/master/examples/More/ServerAsDataStorage/ServerAsDataStorage_SingleValue/ServerAsDataStorage_SingleValue.ino) [Storing multiple values on server](https://github.com/blynkkk/blynk-library/blob/master/examples/More/ServerAsDataStorage/ServerAsDataStorage_MultiValue/ServerAsDataStorage_MultiValue.ino) ### For app If you need to keep your hardware in sync with Widgets' state even if app is offline use ```Blynk.virtualWrite```. Imagine you have a LED Widget connected to the Virtual Pin V1 in the app, and a physical button attached to your hardware. When you press a physical button, you would expect to see updated state of the LED Widget in the app. To achieve that you need to send ```Blynk.virtualWrite(V1, 255)``` when a physical button gets pressed. [Represent physical button state via LED widget with interrupts](https://github.com/blynkkk/blynk-library/blob/master/examples/More/Sync/ButtonInterrupt/ButtonInterrupt.ino) [Represent physical button state via LED widget with polling](https://github.com/blynkkk/blynk-library/blob/master/examples/More/Sync/ButtonPoll/ButtonPoll.ino) [Represent physical button state via Button widget with polling](https://github.com/blynkkk/blynk-library/blob/master/examples/More/Sync/SyncPhysicalButton/SyncPhysicalButton.ino) ## Control of multiple devices Blynk app has support of multiple devices. That means you can assign any widget to specific device with own auth token. For example - you may have button on V1 that controls wi-fi bulb A and another button on V1 that controls wi-fi bulb B. In order to do this you need more than 1 device within your project. To achieve this please go to project settings and click on "Devices" section : You'll see list of devices : So you can add new device : After above steps, every widget will have one more field "Target" : Now you need to assign widget to device and after that widget will control only this specific device. That's it! Now you need to upload sketches with correct Auth Tokens to your hardware. ### Tags Tags feature allows you to group multiple devices. Tags are very useful in case you want to control few devices with 1 widget. For example, imagine a case when you have 3 smart bulbs and you want to turn on all those bulbs with one single click. You need to assign 3 devices to 1 tag and assign tag to button. That's it. Tag widgets also support state syncing. So you can get state of widget from your hardware. However you can't update state of such widgets from hardware. ## Devices online status Blynk app has support for online statuses for multiple devices. In ideal world when device closes tcp connection with some ```connection.close()``` - connected server will get notification regarding closed connection. So you can get instant status update on UI. However in real world this mostly exceptional situation. In majority of cases there is no easy and instant way to find out that connection is not active anymore. That's why Blynk uses ```HEARTBEAT``` mechanism. With this approach hardware periodically sends ```ping``` command with predefined interval (10 seconds by default, ```BLYNK_HEARTBEAT``` [property](https://github.com/blynkkk/blynk-library/blob/master/src/Blynk/BlynkConfig.h)). In case hardware don't send anything within 10 seconds server waits additional 5 seconds and after that connection assumed to be broken and closed by server. So on UI you'll see connection status update only after 15 seconds when it is actually happened. You can also change ```HEARTBEAT``` interval from hardware side via ```Blynk.config```. In that case ```newHeartbeatInterval * 2.3``` formula will be applied. So in case you you decided to set ```HEARTBEAT``` interval to 5 seconds. You'll get notification regarding connection with 11 sec delay in worst case. ## Project Settings Every project has it's own settings: - **Theme** - switch between the Light and Black Blynk Theme (Business accounts have wider choice); - **Keep screen always on** - allows you to use the Blynk app without going to the sleep mode (usually all mobile devices do that); - **Send app connected command** - with this option enabled the server will send "App Connected" and "App Disconnected" commands to your hardware when your Blynk app goes online/offline. [Usage example](https://github.com/blynkkk/blynk-library/blob/master/examples/More/AppConnectedEvents/AppConnectedEvents.ino); - **Do not show offline notifications** - right now, for debugging purposes, every time your hardware goes offline - the Blynk Server will notify you with popup in the app about that. However, when debugging is not needed or the Blynk app is used only via HTTP/S this notifications are meaningless. So this switch allows you to turn off this popups. Also this switch turns off the Push notification "Notify when offline" option. ## Change Widget properties Changing some of the widget properties from hardware side is also supported. For example, you can change the color of LED widget based on a condition: ``` //change LED color Blynk.setProperty(V0, "color", "#D3435C"); //change LED label Blynk.setProperty(V0, "label", "My New Widget Label"); //change MENU labels Blynk.setProperty(V0, "labels", "Menu Item 1", "Menu Item 2", "Menu Item 3"); ``` [Set Property for single value field](https://github.com/blynkkk/blynk-library/blob/master/examples/More/SetProperty/SetProperty_SingleValue/SetProperty_SingleValue.ino) [Set Property for multi value field](https://github.com/blynkkk/blynk-library/blob/master/examples/More/SetProperty/SetProperty_MultiValue/SetProperty_MultiValue.ino) **NOTE : ** Changing these parameters work **only** for widgets attached to Virtual pins (analog/digital pins won't work). Four widget properties are supported - ```color```, ```label```, ```min```, ```max``` for all widgets : ```label``` is string for label of all widgets. ```color``` is string in [HEX](http://www.w3schools.com/html/html_colors.asp) format (in the form: #RRGGBB, where RR (red), GG (green) and BB (blue) are hexadecimal values between 00 and FF). For example : ``` #define BLYNK_GREEN "#23C48E" #define BLYNK_BLUE "#04C0F8" #define BLYNK_YELLOW "#ED9D00" #define BLYNK_RED "#D3435C" #define BLYNK_DARK_BLUE "#5F7CD8" ``` ```min```, ```max``` - minimum and maximum values for the widget (for example range for the Slider). This numbers may be float. On firmware side, widget objects also support ```setLabel()``` and ```setColor()``` functions. Widget specific properties: **Button** ```onLabel``` / ```offLabel``` is string for ON/OFF label of button; **Styled Button** ```onLabel``` / ```offLabel``` is string for ON/OFF label of button; ```onColor``` / ```offColor``` is string in HEX format for ON/OFF colors of the button; ```onBackColor``` / ```offBackColor``` is string in HEX format for ON/OFF colors of the button background. **Music Player** ```isOnPlay``` is boolean accepts true/false. ``` Blynk.setProperty(V0, "isOnPlay", "true"); ``` **Menu** ```labels``` is list of strings for Menu widget selections; ``` Blynk.setProperty(V0, "labels", "label 1", "label 2", "label 3"); ``` **Video Streaming** ```cpp Blynk.setProperty(V1, "url", "http://my_new_video_url"); ``` **Step** ```cpp Blynk.setProperty(V1, "step", 10); ``` **Image** ```cpp Blynk.setProperty(V1, "opacity", 50); // 0-100% ``` ```cpp Blynk.setProperty(V1, "scale", 30); // 0-100% ``` ```cpp Blynk.setProperty(V1, "rotation", 10); //0-360 degrees ``` also, you can fully replace the list of images from the hardware: ```cpp Blynk.setProperty(V1, "urls", "https://image1.jpg", "https://image2.jpg"); ``` or you can change individual image by it index: ```cpp Blynk.setProperty(V1, "url", 1, "https://image1.jpg"); ``` You can also change widget properties via [HTTP API](http://docs.blynkapi.apiary.io/#). ## Limitations and Recommendations - Don't put ```Blynk.virtualWrite``` and any other ```Blynk.*``` command inside ```void loop()```- it will cause lot's of outgoing messages to our server and your connection will be terminated; - We recommend calling functions with intervals. For example, use [BlynkTimer](/#blynk-firmware-blynktimer) - Avoid using long delays with ```delay()``` – it may cause connection breaks; - If you send more than 100 values per second - you may cause [Flood Error](/#troubleshooting-flood-error) and your hardware will be automatically disconnected from the server; - Be careful sending a lot of ```Blynk.virtualWrite``` commands as most hardware is not very powerful (like ESP8266) so it may not handle many requests. ================================================ FILE: BlynkProtocol.md ================================================ # Blynk protocol Blynk transfers binary messages with the following structure: | Command | Message Id | Length/Status | Body | |:-------------:|:-------------:|:---------------:|:--------:| | 1 byte | 2 bytes | 2 bytes | Variable | Message Id and Length are [big endian](http://en.wikipedia.org/wiki/Endianness#Big-endian). Body has a command-specific format. Command and Status definitions: [BlynkProtocolDefs.h](https://github.com/blynkkk/blynk-library/blob/master/Blynk/BlynkProtocolDefs.h) Another protocol description can be found [here](https://github.com/blynkkk/blynk-server/blob/master/README_FOR_APP_DEVS.md#protocol-messages). Typical Blynk library knows how to send(S)/process(P): S BLYNK_CMD_LOGIN + auth token SP BLYNK_CMD_PING SP BLYNK_CMD_RESPONSE SP BLYNK_CMD_BRIDGE SP BLYNK_CMD_HARDWARE S BLYNK_CMD_TWEET S BLYNK_CMD_EMAIL S BLYNK_CMD_PUSH_NOTIFICATION ## HARDWARE/BRIDGE command body The body of these commands are encoded as a sequence of strings, separated by ```'\0'``` ([Null character](http://en.wikipedia.org/wiki/Null_character)). Please note that the last value may be not Null-terminated. In the following command examples ```\0``` chars are replaced with spaces. ### Pin mode PinMode command is received by library after connection, or when a mobile application starts. pm pm ... Mode: * in - INPUT * out - OUTPUT * pu - INPUT_PULLUP * pd - INPUT_PULLDOWN ### Digital pin operations Digital write: dw Digital read: dr ### Analog pin operations aw ar ### Virtual pin operations vw ... vr ### Other operations info TODO ## Developer notes * Values in HW commands are plain text. * In response to ```dr/ar``` command, library should send ```dw/aw``` command on the same pin and with the same message id. * These situations should cause a connection drop, or reconnection attempt: * Message with ```ID=0``` is received * Message with unknown type is received ## Adding network interface 4 entities should be created to add a new network interface to Blynk: 1. Select connection interface that will be used for Blynk operation. This should be something like http://www.arduino.cc/en/Tutorial/WebClient Based on the API of the connection, create the **Transport**. Some examples may be found in the Adapters folder: * BlynkTransportSerial * BlynkTransportCC3000 * BlynkArduinoClient - *can be reused, if possible* 2. Create **Blynk representative class**, which contains connection-specific helper functions (like begin). Examples: * BlynkEthernet * BlynkSerial * BlynkCC3000 * BlynkWildFire * BlynkYun 3. Create **BlynkSimple*** header for your connection. This constructs main **Blynk instance**, so the user (mostly) doesn't need to get into such details. Examples: * BlynkSimpleEthernet.h * BlynkSimpleCC3000.h * BlynkSimpleWifi.h * BlynkSimpleUIPEthernet.h 4. Create a **simple example** for your platform ;) ### Example implementations Use these to play with the protocol and understand the basics: * [Pseudo-library in Python](https://github.com/blynkkk/blynk-library/blob/master/tests/pseudo-library.py) * [Node.js + Espruino](https://github.com/vshymanskyy/blynk-library-js) * [Arduino](https://github.com/blynkkk/blynk-library) * [Particle Core](https://github.com/vshymanskyy/blynk-library-spark) ================================================ FILE: BlynkServer.md ================================================ # Blynk server No longer supported ================================================ FILE: CNAME ================================================ docs.blynk.cc ================================================ FILE: FAQ.md ================================================ #FAQ - I backed Blynk on Kickstarter. Where are my widgets and why the app is free? > App is free because otherwise you would have to pay to download it. This is how AppStore and Google Play works. > Current Blynk release has a limited amount of widgets. We decided to make them free for everyone until we implement store. After that, every widget will be paid. However every backer will get them for free (according to their pledge). - What is Blynk Cloud? > Blynk Cloud is a open-source software written on Java using plain TCP/IP and secured TCP/IP (for hardware that supports it) sockets and running on our server. Blynk iOS and Android apps connect to Blynk Cloud by default. Access is free for every Blynk user. We also provide a Private Server distribution for those who want to [install it locally](/#blynk-server). - How much access to Cloud Blynk Server cost? > It is free for every Blynk user. - Can I run Blynk server locally? > Yes. Those of you, who want extra security or don’t have internet connection, can install Local Blynk Server and run it in your own local network. Blynk Server is Open-Source and it takes less than few seconds to deploy. All the instructions and files are [here](/#blynk-server). - What are the requirements to run Private Blynk Server? > To run Private Blynk Server, all you need is Java Runtime Environment. - Can I run Blynk server on Raspberry Pi? > Yes, surely! [Here is instruction](/#blynk-server-how-to-run-local-blynk-server-launch-blynk-server-on-raspberry-pi). - Does Blynk app work over Bluetooth? > Yes. It is in beta right now. - Does Blynk support Ethernet / Wi-FI / UART? > Yes, all of them. See full list of [supported hardware](/#supported-hardware) and shields. - I don't have any shield. Can I use Blynk with my computer? > Yes, you can use Blynk just with a USB cable. There is a step-by-step [instruction](/#other-hardware-connect-over-usb) on how to do it. - Can Blynk handle multiple Arduinos? > Yes. There 3 ways right now : > - add multiple devices to your project. > - you may use same [Auth Token](/#getting-started-getting-started-with-application-auth-token) for different hardware. In that case you can control few hardwares from 1 dashboard. > - you can do it using [Bridge functionality](/#widgets-other-bridge) which allows you to send messages from one hardware to another. - Does Blynk server store sensor data when app goes offline? > Yes, every command that hardware sends to server is stored. You could use [History Graph](/#widgets-displays-superchart) widget in order to view it. - How many Virtual Pins I can use? > It depends mostly on your hardware. Low-end hardware may use up to 32 Virtual Pins. More powerful (like ESP8266) can > use up to 128 but it requires also BLYNK_USE_128_VPINS property in your sketch. [Example](https://github.com/blynkkk/blynk-library/blob/master/src/Blynk/BlynkConfig.h#L64). - Why app requires all this permissions? > http://help.blynk.cc/faq/blynk-android-permissions-explained ================================================ FILE: GettingStarted.md ================================================ #Getting Started Let's get you started in 5 minutes (reading doesn't count!). We will switch on an LED connected to your Arduino using the Blynk App on your smartphone. Connect an LED as shown here: ##Getting Started With The Blynk App ###1. Create a Blynk Account After you download the Blynk App, you'll need to create a New Blynk account. This account is separate from the accounts used for the Blynk Forums, in case you already have one. We recommend using a **real** email address because it will simplify things later. ####Why do I need to create an account? An account is needed to save your projects and have access to them from multiple devices from anywhere. It's also a security measure. You can always set up your own [Private Blynk Server](/#blynk-server) and have full control. ###2. Create a New Project After you've successfully logged into your account, start by creating a new project. ###3. Choose Your Hardware Select the hardware model you will use. Check out the [list of supported hardware](/#supported-hardware)! ###4. Auth Token **Auth Token** is a unique identifier which is needed to connect your hardware to your smartphone. Every new project you create will have its own Auth Token. You'll get Auth Token automatically on your email after project creation. You can also copy it manually. Click on devices section and selected required device : And you'll see token : **NOTE:** Don't share your Auth Token with anyone, unless you want someone to have access to your hardware. It's very convenient to send it over e-mail. Press the e-mail button and the token will be sent to the e-mail address you used for registration. You can also tap on the Token line and it will be copied to the clipboard. Now press the **"Create"** button. ###5. Add a Widget Your project canvas is empty, let's add a button to control our LED. Tap anywhere on the canvas to open the widget box. All the available widgets are located here. Now pick a button. **Widget Box** **Drag-n-Drop** - Tap and hold the Widget to drag it to the new position. **Widget Settings** - Each Widget has it's own settings. Tap on the widget to get to them. The most important parameter to set is **PIN** . The list of pins reflects physical pins defined by your hardware. If your LED is connected to Digital Pin 8 - then select **D8** (**D** - stands for **D**igital). ###6. Run The Project When you are done with the Settings - press the **PLAY** button. This will switch you from EDIT mode to PLAY mode where you can interact with the hardware. While in PLAY mode, you won't be able to drag or set up new widgets, press **STOP** and get back to EDIT mode. You will get a message saying "Arduino UNO is offline". We'll deal with that in the next section. ##Getting Started With Hardware ###How To Use an Example Sketch You should by now have the Blynk Library installed on your computer. If not - [click here](/#downloads-blynk-library). Example sketches will help you get your hardware online quickly and major Blynk features. Open the example sketch according to the hardware model or shield you are using. Let's take a look at the example sketch for an [Arduino UNO + Ethernet shield](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/BlynkBlink/BlynkBlink.ino) ```cpp #define BLYNK_PRINT Serial #include #include #include char auth[] = "YourAuthToken"; void setup() { Serial.begin(9600); // See the connection status in Serial Monitor Blynk.begin(auth); // Here your Arduino connects to the Blynk Cloud. } void loop() { Blynk.run(); // All the Blynk Magic happens here... } ``` ###Auth Token In this example sketch, find this line: ```cpp char auth[] = "YourAuthToken"; ``` This is the [Auth Token](/#getting-started-getting-started-with-application-4-auth-token) that you emailed yourself. Please check your email and copy it, then paste it inside the quotation marks. It should look similar to this: ``` char auth[] = "f45626c103a94983b469637978b0c78a"; ``` Upload the sketch to the board and open Serial Terminal. Wait until you see something like this: ``` Blynk v.X.X.X Your IP is 192.168.0.11 Connecting... Blynk connected! ``` **Congrats! You are all set! Now your hardware is connected to the Blynk Cloud!** ##Blynking Go back to the Blynk App, push the button and turn the LED on and off! It should be Blynking. Check out [other example sketches](https://github.com/blynkkk/blynk-library/tree/master/examples). Feel free to experiment and combine different examples together to create your own amazing projects. For example, to attach an LED to a [PWM](http://www.arduino.cc/en/Tutorial/Fading)-enabled Pin on your Arduino, set the slider widget to control the brightness of an LED. Just use the same steps described above. ================================================ FILE: HardwareSetUps.md ================================================ # Hardware set-ups ## Arduino over USB (no shield) If you don't have any shield and your hardware doesn't have any connectivity, you can still use Blynk – directly over USB : 1. Open [Arduino Serial USB example](https://github.com/blynkkk/blynk-library/blob/master/examples/Boards_USB_Serial/Arduino_Serial_USB/Arduino_Serial_USB.ino) and change [Auth Token](/#getting-started-getting-started-with-application-4-auth-token) ```cpp // You could use a spare Hardware Serial on boards that have it (like Mega) #include SoftwareSerial DebugSerial(2, 3); // RX, TX #define BLYNK_PRINT DebugSerial #include // You should get Auth Token in the Blynk App. // Go to the Project Settings (nut icon). char auth[] = "YourAuthToken"; void setup() { // Debug console DebugSerial.begin(9600); // Blynk will work through Serial Serial.begin(9600); Blynk.begin(auth, Serial); } void loop() { Blynk.run(); } ``` 2. Run the script which is usually located in ```/scripts``` folder: - Windows:```My Documents\Arduino\libraries\Blynk\scripts``` - Mac ```User$/Documents/Arduino/libraries/Blynk/scripts``` **On Windows:** Open cmd.exe Write your path to blynk-ser.bat folder. For example: ``` cd C:\blynk-library-0.3.1\blynk-library-0.3.1\scripts ``` Run ```blynk-ser.bat``` file. For example : ```blynk-ser.bat -c COM4``` (where COM4 is port with your Arduino) And press "Enter", press "Enter" and press "Enter" **On Linux and Mac**: Navigate to /scripts folder. For example: ``` cd User$/Documents/Arduino/libraries/Blynk/scripts ``` When inside this folder, run: ``` user:scripts User$ ./blynk-ser.sh ``` **Warning:** Do no close terminal window with running script. In some cases you may also need to perform : ``` user:scripts User$ chmod +x blynk-ser.sh ``` You may need also to run it with ```sudo``` ``` user:scripts User$ sudo ./blynk-ser.sh ``` This is what you'll see in Terminal app on Mac (usbmodem address can be different): ``` [ Press Ctrl+C to exit ] /dev/tty.usbmodem not found. Select serial port [ /dev/tty.usbmodem1451 ]: ``` Copy the serial port address: ```/dev/tty.usbmodem1451``` and paste it back: ``` Select serial port [ /dev/tty.usbmodem1451 ]: /dev/tty.usbmodem1451 ``` After you press Enter, you should see an output similar to this: ``` Resetting device /dev/tty.usbmodem1451... Connecting: GOPEN:/dev/tty.usbmodem1451,raw,echo=0,clocal=1,cs8,nonblock=1,ixoff=0,ixon=0,ispeed=9600,ospeed=9600,crtscts=0 <-> openssl-connect:blynk-cloud.com:9443,cafile=/Users/.../server.crt,nodelay 2015/10/03 00:29:45 socat[30438.2046857984] N opening character device "/dev/tty.usbmodem1451" for reading and writing 2015/10/03 00:29:45 socat[30438.2046857984] N opening connection to LEN=16 AF=2 45.55.195.102:9443 2015/10/03 00:29:45 socat[30438.2046857984] N successfully connected from local address LEN=16 AF=2 192.168.0.2:56821 2015/10/03 00:29:45 socat[30438.2046857984] N SSL connection using AES128-SHA 2015/10/03 00:29:45 socat[30438.2046857984] N starting data transfer loop with FDs [3,3] and [4,4] ``` **NOTE:** Arduino IDE may complain with "programmer is not responding". You need to terminate script before uploading new sketch. Additional materials: - [Tutorial: Control Arduino over USB with Blynk app. No shield required. Mac OS)](https://www.youtube.com/watch?v=fgzvoan_3_w) - [How to control arduino (Wirelessly) with blynk via USB. Windows](https://www.youtube.com/watch?v=I_hgIj2FdPI) - [Instructables: Control Arduino with Blynk over USB](http://www.instructables.com/id/Control-arduino-using-Blynk-over-usb/) ## Raspberry Pi 1. Connect your Raspberry Pi to the Internet and open it's console. 2. Run this command (it updates your OS package repository to include the required packages): ``` curl -sL "https://deb.nodesource.com/setup_6.x" | sudo -E bash - ``` 3. Download and build Blynk JS library using npm: ``` sudo apt-get update && sudo apt-get upgrade sudo apt-get install build-essential sudo apt-get install -g npm sudo npm install -g onoff sudo npm install -g blynk-library ``` 4. Run Blynk test script (put your auth token): ``` blynk-client 715f8cafe95f4a91bae319d0376caa8c ``` 5. You can write our own script based on [examples](https://github.com/vshymanskyy/blynk-library-js/tree/master/examples) 6. To enable Blynk auto restart for Pi, find ```/etc/rc.local``` file and add there: ``` node full_path_to_your_script.js ``` Additional materials: - [Instructables: Blynk on Javascript for Raspberry Pi, Intel Edison and others](http://www.instructables.com/id/Blynk-JavaScript-in-20-minutes-Raspberry-Pi-Edison) - [Instructables: Use DHT11/DHT12 sensors with Raspberry Pi and Blynk](http://www.instructables.com/id/Raspberry-Pi-Nodejs-Blynk-App-DHT11DHT22AM2302/?ALLSTEPS) **Note:** Instead of using Node.js, you can also build a C++ libarry version (same as Arduino, WiringPi-based) installation: - [Library README for Linux](https://github.com/blynkkk/blynk-library/blob/master/linux/README.md) - [Blynk Community Topic: How-To Raspberry Pi](https://community.blynk.cc/t/howto-for-raspberry-pi/332) - [Video tutorial - Setting up Blynk and Raspberry Pi:](https://www.youtube.com/watch?v=iSG_8g6KyGE) ## ESP8266 Standalone You can run Blynk directly on the ESP8266! Install the latest ESP8266 library for Arduino using [this guide](https://github.com/esp8266/Arduino#installing-with-boards-manager). **Example Sketch:** [ESP8266_Standalone](https://github.com/blynkkk/blynk-library/blob/master/examples/Boards_WiFi/ESP8266_Standalone/ESP8266_Standalone.ino) Additional materials: - [Instructables: ESP8266 ESP-12(Standalone)+ Blynk](http://www.instructables.com/id/ESP8266-ESP-12Standalone-Blynk-101) - [Instructables: ESP8266-12 standalone Blynk lm35 temperature sensor](http://www.instructables.com/id/ESP8266-12-blynk-wireless-temperature-LM35-sensor/?ALLSTEPS) [Step-by-Step Tutorial in Russian language](http://esp8266.ru/esp8266-blynk) ## NodeMCU Please follow [this detailed instruction](https://github.com/blynkkk/blynk-library/tree/master/examples/Boards_WiFi/NodeMCU#instruction-for-nodemcu-setup). Or watch [this Video tutorial](https://www.youtube.com/watch?v=FhS44hGk1Lc). ## Arduino + ESP8266 WiFi with AT commands This connection type is not recommended for beginners. If you would like to try it, please carefully read [this help topic](http://help.blynk.cc/hardware-and-libraries/arduino/esp8266-with-at-firmware) **Note:** Some boards like Arduino UNO WiFi from Arduino.org, do not use AT commands (and do not provide relevant libraries), so this renders them unusable with Blynk. ## Particle Blynk works with the whole family of Particle products: Core, Photon and Electron 1. Open [Particle Web IDE](https://build.particle.io/build). 2. Go to the libraries. 3. Search for **Blynk** in the Community Libraries and click on it 4. Open ```01_PARTICLE.INO``` example 5. Click "use this example" 6. Put your Auth Token here: ``` char auth[] = "YourAuthToken";``` and flash the Particle! You can scan this QR code from the Blynk App and you'll get a ready-to-test project for **Particle Photon**. Just put your Auth Token into the ```01_PARTICLE.INO``` example. Additional materials: - [Particle core + DHT22](https://www.hackster.io/gusgonnet/temperature-humidity-monitor-with-blynk-7faa51) ================================================ FILE: Implementing.md ================================================ # Implementing a Blynk HW client (library) Currently we provide Arduino/C++ implementation of the library. It is very extensible and modular, look at [the list of supported hardware](/#supported-hardware). Adding new connection types and Arduino-compatible boards is easy. TODO: Porting guide. But some devices are programmed in other languages, like: * Espruino, JavaScript, Node.JS * MicroPython, Python * NodeMCU, eLua This document hints how to write a custom library. ## Blynk library main functions * Provide easy-to use API * Virtual pin handlers registration * Provide comfortable wrappers for some widgets * Manage connection * Should support different connection type/hardware, if applicable * Serialize/deserialize Blynk protocol * Handle direct pin operations * Should be portable across similar devices (or same technology/programming language), if possible * Should detect and notify the user about [troubles](/#troubleshooting) where possible (especially Flood) ### Adding new HW board Different boards can be added by creating JSON board description file. ```json { "name": "Arduino UNO", "map": { "digital": { "pins": { "D0": 0, "D1": 1, "D2": 2, "D3": 3, "D4": 4, "D5": 5, "D6": 6, "D7": 7, "D8": 8, "D9": 9, "D10": 10, "D11": 11, "D12": 12, "D13": 13 }, "ops": [ "dr", "dw" ] }, "analog": { "pins": { "A0": 14, "A1": 15, "A2": 16, "A3": 17, "A4": 18, "A5": 19 }, "ops": [ "dr", "dw", "ar" ], "arRange":[0, 1023] }, "pwm": { "pins": [ "D3", "D5", "D6", "D9", "D10", "D11" ], "ops": [ "aw" ], "awRange":[0, 255] }, "virtual": { "pinsRange": [ 0, 31 ], "ops": [ "vr", "vw" ] } } } ``` Look at the [full boards list](https://github.com/blynkkk/blynk-library/tree/master/boards_json). You can send us your own board description file for review and App integration. There may be a problem that you want to start testing your implementation, but your board is not listed int the Blynk App. On Android, we now have a "Generic Board" specially for such purposes. Unfortunately iOS does not have it yet. Basically you can select UNO board and check how it works using just virtual pins. Most digital pins will also work. Analog IO/PWM will not work in general, until we add your board to the App. ================================================ FILE: IntroAndDownloads.md ================================================ # Intro If you want to continue with using unsupported verion of Blynk, check out Getting Started.
[Getting Started >](/#getting-started) ##How Blynk Works Blynk was designed for the Internet of Things. It can control hardware remotely, it can display sensor data, it can store data, vizualize it and do many other cool things. There are three major components in the platform: - **Blynk App** - allows to you create amazing interfaces for your projects using various widgets we provide. - **Blynk Server** - responsible for all the communications between the smartphone and hardware. You can use our Blynk Cloud or run your [private Blynk server](/#blynk-server) locally. It's open-source, could easily handle thousands of devices and can even be launched on a Raspberry Pi. - **Blynk Libraries** - for all the popular hardware platforms - enable communication with the server and process all the incoming and outcoming commands. Now imagine: every time you press a Button in the Blynk app, the message travels to ~~space~~ the Blynk Cloud, where it magically finds its way to your hardware. It works the same in the opposite direction and everything happens in a blynk of an eye. ##Features * Similar API & UI for all supported hardware & devices * Connection to the cloud using: * WiFi * Bluetooth and BLE * Ethernet * USB (Serial) * GSM * ... * Set of easy-to-use Widgets * Direct pin manipulation with no code writing * Easy to integrate and add new functionality using virtual pins * History data monitoring via SuperChart widget * Device-to-Device communication using Bridge Widget * Sending emails, tweets, push notifications, etc. * ... new features are constantly added! You can find [example sketches](https://github.com/blynkkk/blynk-library/tree/master/examples) covering basic Blynk Features. They are included in the library. All the sketches are designed to be easily combined with each other. ##What do I need to Blynk? At this point you might be thinking: **"Ok, I want it. What do I need to get started?"** – Just a couple of things, really: ####**1. Hardware**. An Arduino, Raspberry Pi, or a similar development kit. **Blynk works over the Internet.** This means that the hardware you choose should be able to connect to the internet. Some of the boards, like Arduino Uno will need an Ethernet or Wi-Fi Shield to communicate, others are already Internet-enabled: like the ESP8266, Raspberri Pi with WiFi dongle, Particle Photon or SparkFun Blynk Board. But even if you don't have a shield, you can connect it over USB to your laptop or desktop (it's a bit more complicated for newbies, but we got you covered). What's cool, is that the [list of hardware](/#supported-hardware) that works with Blynk is huge and will keep on growing. ####**2. A Smartphone**. The Blynk App is a well designed interface builder. It works on both iOS and Android, so no holywars here, ok? #Downloads ##**Blynk Apps for iOS or Android**
[Drawing](https://itunes.apple.com/us/app/blynk-control-arduino-raspberry/id808760481?ls=1&mt=8)        [Drawing](https://play.google.com/store/apps/details?id=cc.blynk) ##**Blynk Library**
[Download The Blynk Library >](https://github.com/blynkkk/blynk-library/releases/latest) In case you forgot, or don't know how to install Arduino libraries [click here](http://www.arduino.cc/en/guide/libraries). ================================================ FILE: License.md ================================================ # License This project is released under The MIT License (MIT) ================================================ FILE: Links.md ================================================ #Links * [Blynk site](https://www.blynk.cc) * [Blynk community](https://community.blynk.cc) * [Facebook](https://www.fb.com/blynkapp) * [Twitter](https://twitter.com/blynk_app) * [Blynk Library](https://github.com/blynkkk/blynk-library) * [Blynk Examples](https://github.com/blynkkk/blynk-library/tree/master/examples) * [Blynk Server](https://github.com/blynkkk/blynk-server) * [Kickstarter campaign](https://www.kickstarter.com/projects/167134865/blynk-build-an-app-for-your-arduino-project-in-5-m/description) ================================================ FILE: OTA.md ================================================ #OTA Blynk also supports over the air updates for - ESP8266, NodeMCU and SparkFun Blynk boards. OTA supported only for the private servers and for the paid customers for now. ## How does it work? - You need to use [regular sketch for exported apps](https://github.com/blynkkk/blynk-library/tree/master/examples/Blynk.Inject/Template_ESP8266); - After you launched your hardware you are ready for OTA; - You can trigger the firmware update for the specific hardware via it's token or for all hardware. ### Flow 1. User triggers OTA with one of below HTTPS request; 2. User provides within HTTPS request admin credentials and firmware binary file to update hardware with; 3. When hardware connects to server - server checks it firmware. In case, hardware firmware build date differs from uploaded firmware, than server sends special command to hardware with url for the new firmware; 4. Hardware processes url with below [handler](https://github.com/blynkkk/blynk-library/blob/master/examples/Blynk.Inject/Template_ESP8266/OTA.h#L31): ``` BLYNK_WRITE(InternalPinOTA) { //url to get firmware from. This is HTTP url //http://localhost:8080/static/ota/FUp_2441873656843727242_upload.bin overTheAirURL = param.asString(); ... } ``` 5. Hardware downloads new firmware and starts flashing firmware; ## Trigger update for the specific hardware ``` curl -v -F file=@Template_ESP8266.ino.nodemcu.bin --insecure -u admin@blynk.cc:admin https://localhost:9443/admin/ota/start?token=123 ``` - ```Template_ESP8266.ino.nodemcu.bin``` - is relative (or full) path to your firmware; - ```--insecure``` flag for servers with self-generated certificates. You don't need this flag if you used Let's Encrypt or other trusted certificates; - ```admin@blynk.cc:admin``` admin credentials to your server. This is default ones. Format is ```username:password```. You can change it in ```server.properties``` file; - ```token``` is token of your hardware you want apply the firmware update to. The firmware update will be initiated only in case device is online; ## Trigger OTA for all devices Update for all devices will be triggered only when they are connected to the cloud. You need to remove the token part for that. ``` curl -v -F file=@Template_ESP8266.ino.nodemcu.bin --insecure -u admin@blynk.cc:admin https://localhost:9443/admin/ota/start ``` In that case, OTA will be triggered right after device connected to the server. In case device is online firmware update will be initiated only when device will be connected again. ## Trigger OTA for the specific user In that case firmware update will be triggered for all devices of specified user. ``` curl -v -F file=@Template_ESP8266.ino.nodemcu.bin --insecure -u admin@blynk.cc:admin https://localhost:9443/admin/ota/start?user=pupkin@gmail.com ``` ## Trigger OTA for specific user and project In that case firmware update will be triggered for all devices of specified user within specified project. ``` curl -v -F file=@Template_ESP8266.ino.nodemcu.bin --insecure -u admin@blynk.cc:admin https://localhost:9443/admin/ota/start?user=pupkin@gmail.com&project=123 ``` ## Stop OTA ``` curl -v --insecure -u admin@blynk.cc:admin https://localhost:9443/admin/ota/stop ``` ## How to make firmware In order to make firmware in Arduino IDE - go to menu: Sketch -> Export compiled Binary. *NOTE:* ESP8266 right now takes firmware only via HTTP. And not HTTPS. ================================================ FILE: README.md ================================================ # This documentation is no longer maintained and supported. Latest documentation is available here: https://docs.blynk.io Blynk IoT Platform is a white-label, multi-tenant software solution that allows you to build personal and commercial IoT projects connected products. With Blynk you can start with building a prototype or personal project and then scale it up to millions of commercial connected devices. Blynk platform allows you to connect almost any electronics hardware to the Internet, start collectind data from devices, monitor and control them remotely from anywhere in the world Data from devices can be stored, aggregated, and visualized in easy-to-build mobile and web applications. Blynk is a real-time system where you can create outstanding experience for your end-customers and perform complex analytics The four major components of the Blynk IoT Platform are: * **Blynk.Cloud** * **Blynk.Edgent** * **Blynk.app** * **Blynk.Console** ================================================ FILE: Roadmap.md ================================================ #Roadmap We build Blynk based on Blynkers feedback but with limited resources we have to prioritize our features. At the moment list look like that: - App Sharing (project sharing when other people can control your hardware, but can't modify your project); Free Beta - App Sharing (project sharing when other people can control your hardware, but can't modify your project); Subscription based - Bluetooth Low Energy support; - Hardware state handling (changing physical button state changes Blynk application state); - Hardware online/offlane state improvements (better indication for "is hardware online?", "is hardware offline?"); - Project space increase - Direct Connect support (for WiFi); - RTC widget; - Design options for widgets (size, button with icons, etc); - Phone sensors widgets (GPS, accelerometer); - IP camera support; - Customizable look and feel of the project Under consideration: - Home screen widget (to avoid opening App when you need only 1 button click); - Haptic feedback (vibration) when touching widgets ================================================ FILE: SUMMARY.md ================================================ # Table of contents * [What is Blynk](README.md) ## overview * [Blynk Components](overview/blynk-components.md) ## Product * [What is a Product](en-product/create-new-product.md) * [General Settings](en-product/general-settings/README.md) * [Manufacturer](en-product/general-settings/manufacturer.md) * [Offline Ignore Period](en-product/general-settings/offline-ignore-period.md) * [Metadata](en-product/metadata.md) * [Datastreams](en-product/datastreams/README.md) * [Datastream Name](en-product/datastreams/datastream-name.md) * [Decimals Formatting](en-product/datastreams/decimals-formatting.md) * [Wait for confirmation from the device](en-product/datastreams/wait-for-confirmation-from-the-device.md) * [Default Value](en-product/datastreams/default-value.md) * [Expose to Automation](en-product/datastreams/expose-to-automation.md) * [Sync with the latest server value](en-product/datastreams/sync-with-the-latest-server-value.md) * [Datastream: Alias](en-product/datastreams/datastream-alias.md) * [Datastream: Invalidate Value](en-product/datastreams/datastream-invalidate-value.md) * [Datastream: Min/Max values](en-product/datastreams/datastream-min-max-values.md) * [Datastream: Data Type](en-product/datastreams/datastream-data-type.md) * [Datastream: Virtual Pin](en-product/datastreams/datastream-virtual-pin.md) * [Datastream: Save Raw Data](en-product/datastreams/datastream-save-raw-data.md) * [Events](en-product/events/README.md) * [Events: Notification](en-product/events/events-notification.md) * [Events: Code](en-product/events/events-code.md) * [Events: Name](en-product/events/events-name.md) * [System Events](en-product/events/events-online-offline.md) * [Events: Notifications Limit](en-product/events/events-notification-period.md) * [Web Dashboard](en-product/web-dashboard.md) * [Mobile app UI](en-product/mobile-app-ui.md) ## Firmware API * [Disable Widgets in the App](firmware-api-1/disable-widgets-in-the-app.md) ## REST API * [Devices](https-api/external_api.md) * [Events](https-api/events-api.md) ## Mobile App * [Untitled](mobile-app/untitled.md) ================================================ FILE: Security.md ================================================ #Security Blynk server has 5 ports open for different security levels. * **80** - plain TCP connection for the hardware (no security) * **8080** - plain TCP connection for hardware (no security) * **443** - SSL/TLS connection for the Mobile Apps and hardware with SSL * **9443** - SSL/TLS connection for the Mobile Apps and hardware with SSL Hardware may select to connect to 443 (9443) or 80 (8080), depending on it's capabilities. Connection between the app and the server is always is done through SSL/TLS, so it is always secured. Connection between the hardware and server depends on your hardware capabilities. ## Use Local Blynk Server Local Blynk Server is no longer supported. ## Use SSL gateway Most platforms are not capable to handle SSL, so they connect to 80. However, our [gateway script](https://github.com/blynkkk/blynk-library/blob/master/scripts/blynk-ser.sh) can be used to add SSL security layer to communication. ```bash ./blynk-ser.sh -f SSL ``` This will forward all hardware connections from 9443 port to the server via SSL gateway. You can run this script on your Raspberry Pi, desktop computer, or even directly on your router! **Note:** when using your own server, you should overwrite the bundled server.crt certificate, or specify it to the script using ```--cert``` switch: ```bash ./blynk-ser.sh -f SSL -s -p 9443 --cert=.crt ``` Flag ```-f SSL``` is enabled by default for USB communication so you don't have to explicit declare it. **Note:** SSL is supported by the gateway only on Linux/OSX for now If you want to skip SSL, and connect to TCP, you can also do that: ```bash ./blynk-ser.sh -t TCP ``` ================================================ FILE: Sharing.md ================================================ #Sharing Blynk offers two types of sharing your projects with other people: - **Share access to your hardware.** Think about giving someone an App for your Project. They can't modify, but can control and see what's there. - **Share your Project configuration.** Others will get a clone of your project by scanning a given QR link, but they won't be able to control your hardware. It's great for tutorials, instructables, etc. ## Shared access to your hardware Imagine giving someone an App to control your Project. - people you’ve shared your project with can’t modify anything. They can only use it - you can update your app, change the layout, add widgets and it’s immediately synced to everyone - you can revoke access at any moment How it works: - you send the QR code to your users (you can email, print, post to social media, do whatever you want) - others download Blynk app, scan the QR code and your app opens for them ready to use. They don’t even need to login or create an account. Go to your Project's Settings: Click on "Generate Link" button : It will generate QR code you can share with others: That's it! Now **Exit the settings and press PLAY button.** Another person would need to install Blynk app and scan QR code from the login screen (scanning from existing profile is not yet supported) ; **NOTE:** Your Project should be active, don't forget to press Play button. **WARNING:** Sharing costs 1000 energy and this energy is not recoverable even you didn't use sharing at all. ## Share your Project configuration In case you want to share your Project's set up without giving access to your hardware (for example to make a tutorial or instructable)- follow the steps: In Project's Settings go to **Clone** button. It will generate QR code you can share with anyone. Another person **should Log In to Blynk app** and press QR button in Projects gallery After the scan, a new Project will be created, all the widgets, settings, layout will be cloned. Another person would need enough Energy Balance to clone your Project. **Auth Token will be different!**. Nobody will get access to your hardware. They just get a copy of the layout and settings. ================================================ FILE: SupportedHardware.md ================================================ # Supported Hardware **Attention!** This documentation is for the LEGACY version of Blynk platform which is no longer supported. Please check out the [**new documentation**](https://docs.blynk.io) Blynk supports more than 400 boards already, including support for Arduino, Particle, ARM mbed, TI Energia, MicroPython, Node.js, OpenWRT and many Single Board Computers. You can add your own connection types easily (see [these](https://github.com/blynkkk/blynk-library/tree/master/examples/More/ArduinoClient) examples for Arduino)! ## Platforms - **Arduino** (https://github.com/blynkkk/blynk-library) - Arduino MKR WiFi 1010 - Arduino MKR GSM 1400 - Arduino MKR NB 1500 - Arduino Uno, Duemilanove - Arduino Nano, Mini, Pro Mini, Pro Micro, Due, Mega - Arduino 101 (Intel Curie, with BLE) - Arduino MKR1000 - Arduino Zero - Arduino Yún (onboard WiFi and Ethernet, via Bridge) - Arduino.org UNO WiFi - Arduino MKR VIDOR 4000 (use the example for MKR WiFi 1010) - Arduino UNO WiFi Rev.2 (use the example for MKR WiFi 1010) - **Arduino-like** - Blynk Board - ESP8266 (Generic, NodeMCU, Witty Cloud, Huzzah, WeMos D1, Seeed Wio Link, etc.) - ESP32 (WiFi, BLE) - Nordic nRF51/nRF52 - based boards - Teensy 3.2/3.1 - Blue Pill (STM32F103C) - Realtek RTL8710 / Ameba via [RTLduino](https://github.com/pvvx/RtlDuino) - BBC micro:bit - LightBlue Bean *, soon* - DFRobot Bluno - RedBear Duo (WiFi, BLE) - RedBearLab Blend Micro - RedBearLab BLE Nano (v1 and v2) - Seeed Tiny BLE - Simblee BLE - RFduino BLE - The AirBoard (BLE-Link, RN-XV) - Feather M0 WiFi - Feather 32u4 BLE - Intel Edison - Intel Galileo - Fishino Guppy, Uno, Mega - TinyCircuits TinyDuino (CC3000) - Microduino/mCookie Core, Core+, CoreUSB - Wicked WildFire V2, V3, V4 - Digistump Oak - chipKIT Uno32 - Alorium XLR8 (FPGA) - LinkIt ONE (WiFi only) - **Energia** - Texas Instruments - CC3220SF-LaunchXL - CC3200-LaunchXL - Tiva C Connected LaunchPad - Stellaris LM4F120 LaunchPad - MSP430F5529 + CC3100 - LaunchPad MSP432 - RedBearLab (CC3200, WiFi Mini) - **Particle** https://github.com/vshymanskyy/blynk-library-spark) - Core - Photon - Electron - RPi - SparkFun RedBoard - RedBear Duo (WiFi & BLE) - **ARM mbed** (https://developer.mbed.org/users/vshymanskyy/code/Blynk/) - Seeed Tiny BLE - RedBearLab BLE Nano - BBC micro:bit - STM32 Nucleo + Wiznet 5100 *, soon* - **JavaScript** (Node.js, Espruino, Browsers) (https://www.npmjs.com/package/blynk-library) - Regular PC with Linux / Windows / OS X - Raspberry Pi (Banana Pi, Orange Pi, ...) - BeagleBone Black - Onion Omega - Onion Omega 2 - Intel Galileo - Intel Edison - Intel Joule - LeMaker Guitar - LeMaker Banana Pro - Samsung ARTIK 5 - PandaBoard, CubieBoard, pcDuino, Tessel 2 - VoCore, VoCore2 (OpenWRT + [Espruino package](https://github.com/vshymanskyy/OpenWRT-Espruino-packages)) - Espruino Pico - ... - **Python** (https://github.com/vshymanskyy/blynk-library-python) - MicroPython - Python 2 - Python 3 - **Lua** (https://github.com/blezek/blynk-esp) - NodeMCU ## Arduino connection types - USB (Serial), connected to your laptop or desktop - **Ethernet** - Arduino MKR ETH - Arduino Ethernet Shield (W5100) - Arduino Ethernet Shield 2 (W5500) - SeeedStudio Ethernet Shield V2.0 (W5200) - ENC28J60-based modules - **WiFi** - ESP8266 as WiFi modem (running original firmware) - Arduino WiFi 101 Shield - Arduino WiFi Shield - WIZnet WizFi310 - Adafruit CC3000 WiFi Breakout / Shield - RN-XV WiFly - **Bluetooth Smart (BLE 4.0)** - HM-10, HC-08 - DFRobot BLE-Link module - Microduino/mCookie BLE - RedBearLab BLE Mini - nRF8001-based boards (Adafruit Bluefruit LE, etc.) - **Bluetooth 2.0 Serial Port Profile (SPP)** - HC-05, HC-06, ... - **Cellular (GSM/3G/LTE)** - SIMCom SIM800 series (SIM800A, SIM800C, SIM800L, SIM800H, SIM808, SIM868) - SIMCom SIM900 series (SIM900A, SIM900D, SIM908, SIM968) - A6/A7 - M590 - BG96 - GPRSbee - Microduino GSM - Adafruit FONA (Mini Cellular GSM Breakout) - Adafruit FONA 800/808 Shield ## Made by Community - [Marvell® EZ-Connect™ MW300/MW302](https://github.com/vshymanskyy/blynk-library-ez-connect) - [WIZnet-W5500-EVB](http://instructables.com/id/WIZnet-W5500-EVB-and-Blynk-App-communication) - [LabVIEW](https://github.com/juncaofish/NI-LabVIEWInterfaceforBlynk) - [Node-RED](https://github.com/gablau/node-red-contrib-blynk-ws) (can be used as bridge to HTTP, TCP, UDP, MQTT, XMPP, IRC, OSC...) ## Problematic Boards These boards are not supported and do not work out of the box: - [Arduino Tian](http://www.arduino.org/products/boards/arduino-tian) Here is a list of [**known library issues**](https://github.com/blynkkk/blynk-library/issues?q=is%3Aissue+label%3A"for+reference"+) ================================================ FILE: Troubleshooting.md ================================================ # Troubleshooting ## Connection If you experience connection problems, follow these steps: 1. Check that your hardware, wires, cables and power supply are good quality, not harmed or damaged, etc. Use high power USB cables and USB ports. 2. Check your wiring using the examples (TCP/HTTP Client or similar) **provided with your shield and hardware**. * Once you understand how to manage connection, it's much easier to use Blynk. 3. Try running command ```telnet blynk-cloud.com 80``` from your PC, connected to the same network as your hardware. You should see something like: ```Connected to blynk-cloud.com.```. 4. Try running Blynk default examples for your platform **without modifications** to see if it is working. * Double-check that you have selected **the right example** for your connection type and hardware model. * Our examples come with **comments and explanations**. **Read them carefully.** * Check that your Auth Token is valid (copied from the App and **doesn't contain spaces, etc.**) * If it doesn't work, try looking into [serial debug prints](/#enable-debug). 5. Done! Add your modifications and functionality. Enjoy Blynk! ***Note:*** when you have multiple devices connected to your network, they should all have different MAC and IP addresses. For example, when using 2 Arduino UNO with Ethernet shields, flashing default example to both of them will cause connection problems. You should use [manual ethernet configuration](https://github.com/blynkkk/blynk-library/blob/master/examples/Boards_Ethernet/Arduino_Ethernet_Manual/Arduino_Ethernet_Manual.ino) example. ## WiFi network connection If you encounter WiFi connection problems, please check these pitfalls: * You're trying to connect to "WPA & WPA2 Enterprise" network (often used in offices), and your shield does not support this security method * Your WiFi network has a login page that requests entering an access token (often used in restaurants) * Your WiFi network security disallows connecting alien devices completely (MAC filtering, etc) * There is a firewall running. Default port for hardware connections is 80 (8080 on the Local Server). Make sure it's open. ## Delay If you use long ```delay()``` or send your hardware to sleep inside of the ```loop()``` expect connection drops and downgraded performance. ***DON'T DO THAT:*** ```cpp void loop() { ... delay(1000); // this is long delay, that should be avoided other_long_operation(); ... Blynk.run(); } ``` ***Note:*** This also applies to the BLYNK_READ & BLYNK_WRITE handlers! ***SOLUTION:*** If you need to perform actions in time intervals - use timers, for example [BlynkTimer](/#blynk-firmware-blynktimer). ## Flood Error If your code frequently sends a lot of requests to our server, your hardware will be disconnected. Blynk App may show "Your hardware is offline" When ```Blynk.virtualWrite``` is in the ```void loop```, it generates hundreds of "writes" per second Here is an example of what may cause flood. ***DON'T DO THAT:*** ```cpp void loop() { Blynk.virtualWrite(1, value); // This line sends hundreds of messages to Blynk server Blynk.run(); } ``` ***SOLUTION:*** If you need to perform actions in time intervals - use timers, for example [BlynkTimer](/#blynk-firmware-blynktimer). Using ```delay()``` will not solve the problem either. It may cause [another issue](/#delay). Use timers! If sending hundreds of requests is what you need for your product you may increase flood limit on local server and within Blynk library. For local server you need to change ```user.message.quota.limit``` property within ```server.properties``` file : #100 Req/sec rate limit per user. user.message.quota.limit=100 For library you need to change ```BLYNK_MSG_LIMIT``` property within ```BlynkConfig.h``` file : //Limit the amount of outgoing commands. #define BLYNK_MSG_LIMIT 20 ## Enable debug To enable debug prints on the default Serial, add this on the top of your sketch **(it should be the first line in your sketch)**: ```cpp #define BLYNK_DEBUG // Optional, this enables lots of prints #define BLYNK_PRINT Serial ``` And enable serial in ```void setup()```: ```cpp Serial.begin(9600); ``` You can also use spare Hardware serial ports or SoftwareSerial for debug output (you will need an adapter to connect to it with your PC). ***Note:*** enabling debug mode will slow down your hardware processing speed up to 10 times. ## Geo DNS problem Geo DNS issue is no longer a problem. It was solved in 2017. ## Reset password On login screen click on "Forgot password?" label and than type your email and ```Send``` button. You'll get instruction on your email. ### Android reset password flow 1. Open instruction email **from your smartphone or tablet**; 2. Click on "Reset now" button in your email; 3. Click on Blynk icon in below popup and reset the pass: ================================================ FILE: Widgets-RU.md ================================================ #Widgets Widgets are interface modules. Each of them performs a specific input/ output function when communicating with the hardware. There are 4 types of Widgets: - **Controllers** - used to send commands that control your hardware - **Displays** - used for data visualization from sensors and other sources; - **Notifications** - send messages and notifications; - **Interface** - widgets to perform certain GUI functions; - **Other** - widgets that don't belong to any category; Each Widget has it's own settings. Some of the Widgets (e.g. Bridge) just enable functionality and they don't have any settings. ## Common Widget Settings ### Pin Selector This is one of the main parameters you need to set. It defines which pin to control or to read from. **Digital Pins** - represent physical Digital IO pins on your hardware. PWM-enabled pins are marked with the ```~``` symbol **Analog Pins** - represent physical Analog IO pins on your hardware **Virtual Pins** - have no physical representation. They are used to transfer any data between Blynk App and your hardware. Read more about Virtual Pins [here](/#blynk-main-operations-virtual-pins). ### Data Mapping In case you want to map incoming values to specific range you may use mapping button: Let's say your sensor sends values from 0 to 1023. But you want to display values in a range 0 to 100 in the app. When Data Mapping enabled, incoming value 1023 will be mapped to 100. ### SPLIT/MERGE Some of the Widgets can send more than one value. And with this switch you can control how to send them. - **SPLIT**: Each of the parameters is sent directly to the Pin on your hardware (e.g D7). You don't need to write any code. **NOTE:** In this mode you send multiple commands from one widget, which can reduce performance of your hardware. Example: If you have a Joystick Widget and it's set to D3 and D4, it will send 2 commands over the Internet: ```cpp digitalWrite(3, value); digitalWrite(4, value); ``` - **MERGE:** When MERGE mode is selected, you are sending just 1 message, consisting of array of values. But you'll need to parse it on the hardware. This mode can be used with Virtual Pins only. Example: Add a zeRGBa Widget and set it to MERGE mode. Choose Virtual Pin V1 ```cpp BLYNK_WRITE(V1) // There is a Widget that WRITEs data to V1 { int r = param[0].asInt(); // get a RED channel value int g = param[1].asInt(); // get a GREEN channel value int b = param[2].asInt(); // get a BLUE channel value } ``` ### Decimals Defines how many decimals you would like to see when moving a Slider. When "No Fraction" is chosen, slider will only send integer values with no decimals. "1 digit" means that values will look like 1.1, 1.2, ..., 2.0, etc. ### Send On Release This option allows you to optimize data traffic on your hardware. For example, when you move joystick widget, commands are streamed to the hardware, during a single joystick move you can send dozens of commands. There are use-cases where it's needed, however creating such a load may lead to hardware overload and reset. **Send On Release** is a recommended setting for majority of applications. This is also a default setting. ### Write interval Similar to "Send on Release" option. However, it allows you to stream values to your hardware within certain interval. For example, setting **write interval** to 100 ms means that while you move the slider, only 1 value will be sent to hardware within 100 ms period. This option is also used to optimize data traffic flow to your hardware. ### Color gradient When you choose gradient, it affects the color of widget elements based on invoming values. For example: You set Gauge Widget with Min and Max parameters of 0-100, and choose green-yellow-red gradient. When hardware sends: - `10`, Gauge will change it's color to green color - `50` will change Gauge to yellow color - `80` will change Gauge to red color There are 2 types of gradients you can choose from: - Warm: Green - Orange - Red; - Cold: Green - Blue - Violet; ##Controllers ### Кнопка (Button) Кнопка может работать в двух режимах - в режиме переключателя (нажатие и отжатие посылает 1 сообщение) и в пуш режиме (нажатие посылает команду и отжатие посылает команду). Кнопка позволяет послать любое число. По умолчанию кнопка шлет 0/1 (LOW/HIGH). В пуш режиме кнопка шлет 1 (HIGH) на нажатие и 0 (LOW) при отжатии. Вы так же можете менять состояние кнопки с микроконтроллера. Например, включить кнопку на пине V1 можно так : ```cpp Blynk.virtualWrite(V1, HIGH); ``` Так же можно поменять тексты в кнопке : ```cpp Blynk.setProperty(V1, "onLabel", "Вкл"); ``` ```cpp Blynk.setProperty(V1, "offLabel", "Выкл"); ``` Название самой кнопки : ```cpp Blynk.setProperty(V1, "label", "Моя кнопочка"); ``` Или изменить ее цвет : ```cpp //#D3435C - Blynk RED Blynk.setProperty(V1, "color", "#D3435C"); ``` В случае если микроконтроллер был перегружен, Вы всегда можете получить последнее состояние кнопки с сервера с помощью фичи синхронизации состояния: ```cpp //как только подключились BLYNK_CONNECTED() { //запросить информацию у сервера о состоянии пина V1 Blynk.syncVirtual(V1); } //этот метод будет вызыван после ответа сервера BLYNK_WRITE(V1) { int buttonState = param.asInt(); } ``` #### Кнопка на рабочем столе Если Вы используете Android, то Вы можете добавить Blynk кнопку на рабочий стол. В этом случае кнопка будет работать по протоколу HTTPS. Такого рода кнопки имеют определенные ограничения по функционалу в связи с ограничениями платформы Android. Например, Вы не можете получить мгновенную синхронизацию состояния кнопки на рабочем столе с состоянием на микроконтроллере. Так как состояние кнопки на рабочем столе обновляется раз в 15 мин. **Замечание:** Добавление виджета кнопки на рабочий стол стоит 100 энергии. Эта энергия не возвращается после удаления виджета. Также такая кнопка будет работать на локальном сервере только если открыть порт 8080. **Пример кода:** [Базовый пример](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/BlynkBlink/BlynkBlink.ino) **Пример кода:** [Синхронизация состояния с физической кнопкой через прерывания](https://github.com/blynkkk/blynk-library/blob/master/examples/More/Sync/ButtonInterrupt/ButtonInterrupt.ino) **Пример кода:** [Синхронизация состояния с физической кнопкой через поллинг](https://github.com/blynkkk/blynk-library/blob/master/examples/More/Sync/ButtonPoll/ButtonPoll.ino) **Пример кода:** [Синхронизация состояния с физической кнопкой](https://github.com/blynkkk/blynk-library/blob/master/examples/More/Sync/SyncPhysicalButton/SyncPhysicalButton.ino) ### Слайдер (Slider) Слайдер очень похож на потенциометр. Он позволяет посылать значения в диапазоне от минимального значения к максимальному. Диапазон допустимых максимального и минимального значений определяется в приложении. Вы так же можете менять состояние слайдера с микроконтроллера. Например, Вы можете изменить положение ползунка в слайдере : ```cpp Blynk.virtualWrite(V1, 55); ``` Так же можно поменять текст в слайдере : ```cpp Blynk.setProperty(V1, "label", "Мой слайдерок"); ``` или изменить цвет : ```cpp //#D3435C - Карсный цвет в кодирвке RGB Blynk.setProperty(V1, "color", "#D3435C"); ``` ### Таймер (Timer) Таймер запускает действия в определенное время. Даже если смартфон не в сети. По умолчанию время начала отправляет 1 (HIGH), время остановки отправляет 0 (LOW). Вы можете изменить это поведение на любые другие значения. Вы можете изменить настройки Таймера в режиме «Запуска». В последней версии Android также есть улучшенный таймер в виджете [Обработчик событий](https://github.com/blynkkk/blynkkk.github.io/blob/master/mobile/ru/eventor.md). C [Обработчиком](https://github.com/blynkkk/blynkkk.github.io/blob/master/mobile/ru/eventor.md) событий вы можете назначить несколько таймеров на один и тот же пин, отправить любую строку/число, выбирать дни и часовой пояс. Рекомендуется использовать виджет [Обработчик событий](https://github.com/blynkkk/blynkkk.github.io/blob/master/mobile/ru/eventor.md) поверх виджета Таймер. Однако виджет Таймер по-прежнему подходит и для простых событий таймера. **ПРИМЕЧАНИЕ:** Виджет таймера зависит от времени сервера, а не вашего телефона. Иногда время телефона может не соответствовать времени сервера. **Пример кода:** [Таймер](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Timer/Timer.ino) ### Джойстик (Joystick) Управление сервоприводом в 4 направлениях. #### Параметры: - **Раздельный** (SPLIT): Каждый из параметров отправляется непосредственно на пин вашего оборудования (например, D7 и D8). Вам не нужно писать код. **ПРИМЕЧАНИЕ:** В этом режиме вы отправляете несколько команд из одного виджета, что может снизить производительность вашего оборудования. **Пример:** Если у вас есть виджет Джойстика и он настроен на D3 и D4, он отправит две команды через Интернет: ```cpp digitalWrite(3, x); digitalWrite(4, y); ``` - **Совмещенный** (MERGE): Когда выбран режим MERGE, вы отправляете только 1 сообщение, состоящее из массива значений. Но вам нужно разобрать его на оборудовании устройства. Этот режим можно использовать только с виртуальными пин-ами. **Пример:** добавьте виджет Джойстика и установите его в режим "MERGE". Выберите виртуальный пин V1 ```cpp BLYNK_WRITE(V1) // Joystick assigned to V1 { // получить x int x = param[0].asInt(); // получить y int y = param[1].asInt(); } ``` - **Поворт/Наклон** (Rotate on Tilt) Когда это параметр включен, Джойстик будет автоматически вращаться, если вы будете использовать смартфон в горизонтальной положении. - **Автовозврат** (Auto-Return) Когда это парамтер выключен, ручка джойстика не вернется в центральное положение. Она останется там, где вы ее оставили. ### Отправка при Отжатии (Send On Release) **Send On Release** доступно для большинства виджетов контроллеров и позволяет уменьшить трафик данных на ваше оборудование. Например, когда вы перемещаете виджет джойстика, команды непрерывно передаются на аппаратное устройство, во время одного движения джойстика вы можете отправлять десятки команд. Есть случаи, когда это необходимо, однако создание такой нагрузки может привести к зависанию или сбросу оборудования. Мы рекомендуем включить функцию **Send On Release** для большинства случаев, если вам не требуется мгновенная обратная связь. Эта опция включена по умолчанию. ### Интервал записи (Write interval) Похоже на вышеуказанный вариант. Однако, позволяет вам передавать значения на ваше оборудование в через определенные интервалы времени. Например, установка интервала записи на 100 мс означает, что при перемещении ползунка на аппаратное обеспечение будет отправлено только 1 значение в течение 100 мс. Эта опция также используется для уменьшения трафика данных на ваше оборудовании. **Пример кода:** [Джойстик две оси](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/JoystickTwoAxis/JoystickTwoAxis.ino) ### Шаговое управление (Step Control) Шаговое управление похоже на две кнопки, назначенные одному пин-у. Одна кнопка увеличивает ваше значение на установленный шаг, а другая уменьшает его. Это очень полезно для случаев использования, когда вам нужно точно изменять ваши значения, но вы не можете достичь такой точности с помощью виджета [Cлайдера](https://github.com/blynkkk/blynkkk.github.io/tree/master/mobile/ru/slider.md). **Отправить шаг (Send Step)** опция позволяет вам отправлять на оборудование каждый шаг нвместо фактического значения виджета. **Зациклить значения (Loop value)** опция позволяет сбросить Шаговый виджет на начальное значение при достижении максимального. Вы можете изменить значение Шагового виджета со стороны оборудования. Например: ```cpp Blynk.virtualWrite(V1, val); ``` Вы можете изменить описание виджета со стороны оборудования с помощью кода: ```cpp Blynk.setProperty(V1, "label", "Мой счетчик."); ``` Вы можете изменить шаг виджета со стороны оборудования: ```cpp Blynk.setProperty(V1, "step", 10); ``` или изменить цвет: ```cpp //#D3435C - Красный цвет в RGB кодировке Blynk.setProperty(V1, "color", "#D3435C"); ``` Вы также можете получить состояние виджета Шагового управления с сервера в случае, если ваше оборудование отключилось, с помощью функции Blynk.Sync: ```cpp BLYNK_CONNECTED() { Blynk.syncVirtual(V1); } BLYNK_WRITE(V1) { int stepperValue = param.asInt(); } ``` ##Displays ### Отображение значений (Value Display) Отображает входящие данные с ваших датчиков или виртуальных пин-ов. Может работать в двух режимах: - режим PUSH (выберается в списке выбора частоты считывания); - режим частоты считываний; В режиме PUSH вы обновляете значения виджета со стороны оборудования с помощью кода: ```cpp Blynk.virtualWrite(V1, val); ``` В этом режиме каждое сообщение, которое отправляет аппаратное устройство автоматически сохраняется на сервере. Режим PUSH не требует, чтобы приложение было онлайн или открыто. В режиме частоты считывния вам необходимо выбрать интервал обновления данных, и приложение будет запускать события считывния с требуемой периодичностью. Ваше приложение должно быть открыто и запущено для отправки запросов на оборудование. Вам не нужен код для аналоговых и цифровых выводов в даном случае. Однако для виртуальных выводов вам необходимо использовать следующий код: ```cpp //вызывать из приложения BLYNK_READ(V1) { //отправить в приложение Blynk.virtualWrite(V1, val); } ``` #### Отображение значений на рабочем столе Вы также можете добавить виджет отображение значения на рабочий стол Android. В этом случае отображение значений работает по протоколу HTTPS. Имейте в виду, что в режиме «Рабочий стол» отображение значений имеет несколько ограничений. Виджет будет обновлять свое состояние только один раз в 15 минут. Вы можете изменить это органичение через настройки виджета. Однако интервал обновления менее 15 минут не гарантируется. Вы также можете изменить размер отображаемого значения на рабочем столе - просто сделайте длинный тап на виджете и измените его размер на необходимый. **Примечание:** Добавление виджета на главный экран стоит 100 энергии. Эта энергия не возвращяется при удалении виджета. **Примечание:** Виджеты рабочего стола для локальных серверов Blynk требуют открытия порта 8080. **Пример кода:** [Базовый пример](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/BlynkBlink/BlynkBlink.ino) ### Интервал записи (Write interval) Опция позволяет вам передавать значения на ваше оборудование в через определенные интервалы времени. Например, установка интервала записи на 100 мс означает, что при перемещении ползунка на аппаратное обеспечение будет отправлено только 1 значение в течение 100 мс. Эта опция также используется для уменьшения трафика данных на ваше оборудовании. **Пример кода:** [Базовый пример](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/BlynkBlink/BlynkBlink.ino) ### Светодиод (LED) Простой светодиод для индикации. Вам нужно отправить 0, чтобы выключить светодиод. И 255 для того, чтобы включить светодиод. Или просто используйте Blynk API, как описано ниже: ```cpp //регистрируемся на виртуальном пине 1 WidgetLED led1(V1); led1.off(); led1.on(); ``` Все значения от 0 до 255 изменяют яркость светодиода: ```cpp WidgetLED led2(V2); //установить яркость светодиода на 50%. led2.setValue(127); ``` Вы также можете изменить цвет светодиода с помощью кода: ```cpp //#D3435C - Красный в RGB формате Blynk.setProperty(V1, "color", "#D3435C"); ``` #### Светодиод на рабочем столе Вы можете добавить виджет светодиод на рабочий стол Android. В этом случае светодиод работает через протокол HTTPS. Имейте в виду, что в режиме «Рабочий стол» виджет светодиода имеет некоторые ограничения. Светодиод будет обновлять свое состояние только один раз в 15 минут. Вы можете изменить этот интервал через настройки виджета. Однако интервал обновления менее 15 минут не гарантируется. **Примечание:** Добавление виджета на рабочий стол стоит 100 энергии. Эта энергия не возвращается при удалении виджета. **Примечание:** Виджеты рабочего стола для локальных серверов Blynk требуют открыть порт 8080. **Пример кода:** [Базовый пример](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/LED/LED_Blink/LED_Blink.ino) ### Указатель (Gauge) Отличный визуальный способ отображения входящих числовых значений. Может работать в 2 режимах: - режим PUSH (выберается в списке выбора частоты считывания); - режим частоты считываний; В режиме PUSH вы обновляете значения указателя со стороны оборудования с помощью кода: ```cpp Blynk.virtualWrite(V1, val); ``` В этом режиме каждое сообщение, которое отправляет аппаратное устройство автоматически сохраняется на сервере. Режим PUSH не требует, чтобы приложение было онлайн или открыто. В режиме частоты считывния вам необходимо выбрать интервал обновления данных, и приложение будет запускать события считывния с требуемым периодичностью. Ваше приложение должно быть открыто и запущено для отправки запросов на оборудование. Вам не нужен код для аналоговых и цифровых выводов в даном случае. Однако для виртуальных выводов вам необходимо использовать следующий код: ```cpp //вызывать из приложения BLYNK_READ(V1) { //отправить в приложение Blynk.virtualWrite(V1, val); } ``` #### Параметры форматирования Указатель также имеет поле «Label» (Метка), которое позволяет использовать форматирование. Предположим, ваш датчик отправляет число 12.6789 в приложение Blynk. Поддерживаются следующие параметры форматирования: ```/pin/``` - отображает значение без форматирования (12.6789) ```/pin./``` - отображает значение без десятичной части (13) ```/pin.#/``` - отображает значение с одним десятичным знаком (12.7) ```/pin.##/``` - отображает значение с двумя десятичными знаками (12.68) #### Другие опции Вы также можете изменить метку прибора с помощью: ```cpp Blynk.setProperty(V1, "label", "Мое значение метки"); ``` или изменить цвет (кодировка RGB): ```cpp //#D3435C - Красный цвет Blynk.setProperty(V1, "color", "#D3435C"); ``` **Пример кода:** [Светодиод](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/BlynkBlink/BlynkBlink.ino) ### ЖК дисплей (LCD) Это обычный ЖК-дисплей 16x2, "сделанный" на нашем секретном предприятии в Китае. Виджет может работать в двух режимах: - Простой (Simple) - Расширенный (Advanced) #### Простой режим (Simple) В простом режиме ваш ЖК-виджет работает как обычный виджет с частотой чтения. В режиме частоты считывания вам нужно выбрать интервал обновления данных, и приложение будет запускать события с требуемым интервалом. Ваше приложение должно быть открыто и запущено для отправки запросов на оборудование. В данном случае вам не нужен код для аналоговых и цифровых пин-ов. Однако для виртуальных пин-ов вам необходимо использовать следующий код: ```cpp //вызываем из приложения BLYNK_READ(V1) { //отправляем в приложение Blynk.virtualWrite(V1, val); } ``` В простом режиме ЖК-дисплей также поддерживает параметры форматирования. #### Параметры форматирования Предположим, ваш датчик отправляет число 12.6789 в приложение Blynk. Поддерживаются следующие параметры форматирования: ```/pin/``` - отображает значение без форматирования (12.6789) ```/pin./``` - отображает значение без десятичной части (13) ```/pin.#/``` - отображает значение с одним десятичным знаком (12.7) ```/pin.##/``` - отображает значение с двумя десятичными знаками (12.68) **Пример кода:** [ЖК дисплей простой режим - PUSH](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/LCD/LCD_SimpleModePushing/LCD_SimpleModePushing.ino) **Пример кода:** [ЖК дисплей простой режим - 1 сек](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/LCD/LCD_SimpleModeReading/LCD_SimpleModeReading.ino) #### Расширенный режим (Advanced) Расширенный режим предназначен для опытных пользователей. Позволяет использовать специальные команды для управления ЖК-дисплеем. #### Команды Инициируем переменную ЖК-дисплея: ```cpp WidgetLCD lcd(V1); ``` Отправим сообщение: ```cpp lcd.print(x, y, "Ваше сообщение"); ``` Где ```x``` - позиция символа (0-15), ``` y``` - номер строки (0 или 1), Очистка ЖК-дисплея: ```cpp lcd.clear(); ``` **Пример кода:** [ЖК-дисплей расширенный режим](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/LCD/LCD_AdvancedMode/LCD_AdvancedMode.ino) ### Диаграмма (SuperChart) Диаграмма используется для живой визуализации и хранения данных. Вы можете использовать виджет для логирования данных датчиков, бинарных событий и многого другого. Чтобы использовать виджет Диаграмма, вам нужно будет передать данные с оборудования с желаемым интервалом, используя таймеры. [Здесь приведен](https://examples.blynk.cc/?board=ESP8266&shield=ESP8266%20WiFi&example=GettingStarted%2FPushData) базовый пример передачи данных. #### Взаимодействие: - **Переключение между режимами текущий и временной** Нажмите диапазоны времени в нижней части виджета, чтобы изменить масштаб Диаграммы по времени. - **Тап по легенде графиков** показать или скрыть поток данных. - **Долги тап на графике** покажет метку времени и соответствующие значения. - **Быстро проведите пальцем влево или вправо, чтобы увидеть предыдущие данные** впоследствии вы можете прокручивать данные назад и вперед в пределах заданного временного диапазона. - **Полноэкранный режим** нажмите эту кнопку, чтобы открыть полноэкранный режим в альбомной ориентации. Чтобы выйти из режима полного экрана, просто поверните телефон обратно в портретный режим. График должен вращаться автоматически. В полноэкранном режиме вы увидите X (время) и несколько шкал Y. Полноэкранный режим можно отключить в настройках виджета. - **Кнопка меню** Кнопка меню откроет дополнительные функции: - Экспорт в CSV - Стереть данные на сервере #### Настройки диаграммы: - **Заголовок диаграммы (Chart Title)** общее наименование диаграммы. - **Размер шрифта заголовка (Title Font Size)** выберите из 3 размеров шрифта. - **Выравнивание заголовка (Title Alignment)** выберите выравнивание заголовка диаграммы. Этот параметр влияет на положение заголовка и легенды в виджете. - **Показать ось X (время) (Show x-axis (time))** выберите настройку, если хотите показать шкалу времени внизу графика. - **Автоматическое масштабирование для всех потоков данных (Override Auto Scaling for All Datastreams)** отключение этой опции позволит выполнить ручную настройку для оси Y (см. ниже). - **Выбор масштаба времени (Time ranges picker)** Позволяет выбрать необходимые периоды (`15m`,` 30m`, `1h`,` 3h`, ...) и разрешение для вашего графика. Разрешение определяет, насколько подробные ваши данные. Прямо сейчас график поддерживает два типа разрешения: `standard` и `high`. Разрешение также зависит от выбранного периода. Например, `standard` разрешение для `1d` означает, что вы будете получать 24 значения в день (одно в час), а при `high` разрешении вы будете получать за` 1d` 1440 значений в день (одно в минуту). - **Потоки данных (Datastreams)** добавить потоки данных (см. ниже, как настроить потоки данных). #### Настройки потоков данных Виджет поддерживает до 4 потоков данных. Нажмите значок настроек потоков данных, чтобы открыть настройки. **Дизайн (Design)** выберите доступные типы диаграмм: - Линейная (Line) - С областями (Area) - Гистограмма (Bar) - Бинарная (Binary) (приведение данных к двоичному виду) **Цвет (Color)** выберите сплошные цвета или градиенты. **Источник и ввод (Source and input)** - Вы можете использовать три типа источника данных: **1. Виртуальный пин (Virtual Pin)** - выберите желаемое устройство и виртуальный пин для получения данных. **2. Теги (Tags)** - диаграмма может агрегировать данные с нескольких устройств, используя встроенные функции агрегирования. Например, если у вас есть 10 датчиков температуры, посылающих температуру с заданным интервалом, Вы можете отобразить среднее значение от 10 датчиков в виджете. Использование тегов: - **[Добавить Тэг](http://docs.blynk.cc/#blynk-main-operations-control-of-multiple-devices-tags)** на каждое устройство, с которого вы хотите агрегировать данные. Это можно сделать в настройках проекта Blynk. - **Отправить данные в виртуальный пин (Push data to the same Virtual Pin)** на каждое устройство. (т.е. ```Blynk.virtualWrite (V0, temperature);```) - **Выберите тег в качестве источника (Choose Tag as a source)** в виджете Диаграмма и используйте пин, куда поступают данные (т.е. V0) **Добступные функции:** - `SUM` будет суммировать все входящие значения в указанный виртуальный пин со всех устройств, помеченные выбранным тегом - `AVG` будет вычислять среднее значение - `MED` найдет среднее значение - `MIN` будет вычислять минимальное значение - `MAX` будет вычислять максимальное значение **ВАЖНО: Теги не работают в режиме реального времени.** **3. [Выбор устройства (Device Selector)](https://github.com/blynkkk/blynkkk.github.io/tree/master/mobile/ru/ device_selector.md)** Если вы добавите виджет Выбор устройства в свой проект, вы можете использовать его в качестве источника данных для Диаграммы. В том случае, когда вы меняете устройство, диаграмма будет автоматически обновляться. #### Настройки оси Y (Y-Axis Settings) Cуществует 4 режима масштабирования данных вдоль оси Y, активируется после отключения общей настройки виджета "Автоматическое масштабирование для всех потоков данных (Override Auto Scaling for All Datastreams)". **1. Авто (Auto)** Данные будут автоматически масштабироваться на основе минимальных и максимальных значений заданного периода времени. Это лучший вариант для начинающих. **2. Минимальный/Максимальный (Min/Max)** Когда выбран этот режим, шкала Y будет установлена на выбранные вами границы значений. Например, если ваше оборудование отправляет данные со значениями от -100 до 100, вы можете установить эти границы и данные графика будут отображены полностью. Вы также можете визуализировать данные в другом диапазоне. Допустим, входящие данные имеют значения в диапазоне 0-55, но вы хотели бы видеть только значения в диапазоне 30-50. Вы можете настроить диапазон, но если значения не соответствуют заданному масштабу оси Y, диаграмма будет обрезана. **3. Процент от высоты (% of Height)** Эта опция позволяет автоматически масштабировать входящие данные на виджете и размещать их так, как вы хотите. В этом режиме вы устанавливаете процент высоты виджета на экране от 0% до 100%. Если вы установите диапазон 0-100%, это будет полная автоматическая шкала. Независимо от того, в каком диапазоне поступают данные, он всегда будет масштабирован по всей высоте виджета. Если вы установите его на 0-25%, то график будет отображаться только на 1/4 высоты виджета. Этот параметр очень полезен для **Бинарной диаграммы** или для визуализации нескольких потоков данных на одной и той же диаграмме разными способами. **4. Дельта (Delta)** Пока данные остаются в пределах заданного значения дельты, график будет автоматически масштабироваться в этом диапазоне. Если дельта превышает диапазон, график автоматически масштабируется до минимальных/максимальных значений указанного периода. **Суффикс (Suffix)** Здесь вы можете указать суффикс, который будет отображаться со значениями во время длительного тап на графике. **Разрядность (Decimals)** Определяет формат числовых значений, когда вы нажимаете и удерживаете палец на графике. Возможные варианты: #, #.#, #.##, и т.д. **Соединиить отсуствующие точки графика (Connect Missing Data Points)** Если этот переключатель включен, то Диаграмма соединит все точки, даже если данные частично отсуствуют. Если для него установлено значение «ВЫКЛ», то вы увидите пропуски в случае отсутствия данных. **Настройки Бинарной диаграммы (Binary Chart Settings)** Этот тип диаграммы полезен для построения двоичных данных, например, когда устройство было включено или выключено, или когда было обнаружено движение или когда был достигнут определенный порог значений. Вам необходимо указать точку **Перехода (FLIP)**, которая будет точкой, в которой входящие данные будут принимать состояние `ИСТИНА (TRUE)` или `ЛОЖЬ (FALSE)`. Например, вы отправляете данные в диапазоне от 0 до 1023. Если вы установите `512` в качестве точки **Перехода (FLIP)**, то все, что выше `512` (исключая 512), будет записано как `ИСТИНА (TRUE)`, любое значение ниже `512` (включая 512) будет `ЛОЖЬ (FALSE)`. Другой пример: если вы отправляете `0 и 1` и устанавливаете `0` в качестве точки **Перехода FLIP**, то `1` будет `ИСТИНА`, а `0` будет `ЛОЖЬ`. **Маркеры состояния (State Labels):** Здесь вы можете указать, как `ИСТИНА/ЛОЖЬ` должны отображаться на графике когда вы нажимаете и удерживаете палец. Например, вы можете установить значение `ИСТИНА` как `Оборудование ВКЛ`, `ЛОЖЬ` как `Оборудование ВЫКЛ`. ### Видео трансляция (Video Streaming) Простой виджет, который позволяет отображать прямой эфир и потокове видео. Виджет поддерживает протоколы RTSP (RP, SDP), HTTP/S прогрессивной потоковой передачи, HTTP/S прямого эфира. Для получения дополнительной информации, пожалуйста ознакомтесь с [официальной документацией Android](https://developer.android.com/guide/appendix/media-formats.html). На данный момент команда Blynk не предоставляет потоковые серверы. Таким образом, вы можете осуществлять потоковую передачу непосредственно с ваше камеры или использовать сторонние сервисы, а также запустить собственны потоковый сервер (например, на оборудовании Raspberry). Вы можете остановить/запустить видео поток, нажав на сам виджет. Вы можете изменить URL-адрес видео потока с аппаратного устройства при помощи кода: ```cpp Blynk.setProperty(V1, "url", "http://my_new_video_url"); ``` ### Индикатор уровня (Level Display) Отображает входящие данные с ваших датчиков или виртуальных пин-ов. Отображение уровня очень похоже на индикатор выполнения процесса, это очень красивый и причудливый вид для индикации «выполненных» событий, например «уровня заряда батареи». Вы можете обновить отображение значения с аппаратной стороны с помощью кода: ```cpp Blynk.virtualWrite(V1, val); ``` Каждое сообщение, которое аппаратное устройство отправляет на сервер, автоматически сохраняется на сервере. Режим PUSH не требует, чтобы приложение было онлайн или запущено. **Пример кода:** [Пример PUSH](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/PushData/PushData.ino) ## Interface ### Вкладки (Tabs) Единственная цель виджета Вкладки - расширить пространство вашего проекта. Чтобы редактировать виджет Вкладок - просто нажмите на выбранную вкладку. Вы можете перетаскивать виджеты между вкладками. Из списка можно удалить только последнюю вкладку: чтобы удалить ее, проведите пальцем влево по ее названию в экране настроек виджета. Максимальное количество вкладок на iOS составляет 4. Максимальное количество вкладок на Android - 10. Оставайтесь с нами для предстоящего редизайна виджета вкладок! ### Меню (Menu) Виджет Меню позволяет отправлять команды на ваше оборудование на основе выборного списка, сделанного вами в пользовательском интерфейсе. Меню отправляет индекс выбранного элемента спика, а не саму строку. Отправляемый индекс начинается с 1. Он работает так же, как типовой элемент "Комбинированный список" ([ComboBox](https://ru.wikipedia.org/wiki/%D0%9A%D0%BE%D0%BC%D0%B1%D0%B8%D0%BD%D0%B8%D1%80%D0%BE%D0%B2%D0%B0%D0%BD%D0%BD%D1%8B%D0%B9_%D1%81%D0%BF%D0%B8%D1%81%D0%BE%D0%BA)). Пример кода: ```cpp BLYNK_WRITE { switch (param.asInt()) { case 1: { // Пункт 1 Serial.println("Выбран Пункт 1"); break; } case 2: { // Пункт 2 Serial.println("Выбран Пункт 2"); break; } } } ``` Вы также можете назначить пункты меню со стороны оборудования с помощью кода: ```cpp Blynk.setProperty(V1, "labels", "label 1", "label 2", "label 3"); ``` **Пример кода:** [Меню](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Menu/Menu.ino) ### Ввод времени (Time Input) Виджет Ввода времени позволяет вам выбрать время начала/окончания, день недели, часовой пояс, значения в формате до полудня/после полудня и отправить их на ваше оборудование. В настоящее время поддерживаются следующие форматы: ```ЧЧ:ММ``` и ```ЧЧ:ММ AM/PM```. Аппаратное устройстов будет отсчитывать время пользовательского интерфейса в виде секунд дня (```3600 * часов + 60 * минут```) для запуска/остановки времения. Время, которое виджет отправляет оборудованию, является локальным временем пользователя. Индексы по выбранных дней: ``` Понедельник - 1 Вторник - 2 ... Суббота - 6 Воскресенье - 7 ``` Вы также можете изменить состояние виджета в интерфейсе пользователя. Смотрите ниже примеры кода. **Пример кода:** [Простой Ввод времени для времени начала](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/TimeInput/SimpleTimeInput/SimpleTimeInput.ino) **Пример кода:** [Расширенный Ввод времени](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/TimeInput/AdvancedTimeInput/AdvancedTimeInput.ino) **Пример кода:** [Обновление Ввода времени в пользовательском интерфейсе](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/TimeInput/UpdateTimeInputState/UpdateTimeInputState.ino) ### Карта (Map) Виджет Карты позволяет устанавливать точки/флажки на карте со стороны оборудования. Это очень полезный виджет, если у вас есть несколько устройств, и вы хотите отслеживать их позиции на карте. Вы можете отправить точку на карту с помощью обычной команды виртуальной записи: ```cpp Blynk.virtualWrite(V1, pointIndex, lat, lon, "Название"); ``` Мы также создали оболочку, чтобы вы могли упростить использование виджета Карты. Вы можете изменить метки флажков на оборудовании с помощью кода: ```cpp WidgetMap myMap(V1); ... int index = 1; float lat = 51.5074; float lon = 0.1278; myMap.location(index, lat, lon, "Название"); ``` Использование уникальных ```index``` позволяет вам переопределить существующее значение точки. **Пример кода:** [Базовый пример Карты](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Map/Map.ino) ### Таблица (Table) Табличный виджет удобен, когда вам нужно структурировать аналогичные данные в пределах одного графического элемента. Работает как обычная таблица. Вы можете добавить строку в таблицу с помощью кода: ``` Blynk.virtualWrite(V1, "add", id, "Имя", "Значение"); ``` Вы можете обновить строку в таблице с помощью кода: ``` Blynk.virtualWrite(V1, "update", id, "Новое имя", "Новое значение"); ``` Чтобы выделить любой элемент в таблице, используйте его идентификатор: ``` Blynk.virtualWrite(V1, "pick", 0); ``` Чтобы выбрать/отменить выбор (сделать значок зеленым/серым) элемент в таблице, используйте его идентификатор: ``` Blynk.virtualWrite(V1, "select", 0); Blynk.virtualWrite(V1, "deselect", 0); ``` Чтобы очистить таблицу используйте код: ``` Blynk.virtualWrite(V1, "clr"); ``` Вы также можете обрабатывать другие действия из таблицы. Например, использовать строку таблицы в качестве кнопки переключения. ``` BLYNK_WRITE(V1) { String cmd = param[0].asStr(); if (cmd == "select") { // строка в таблице была выбрана. int rowId = param[1].asInt(); } if (cmd == "deselect") { // строка в таблице была отменена. int rowId = param[1].asInt(); } if (cmd == "order") { // когда строки в таблице переупорядочиваются int oldRowIndex = param[1].asInt(); int newRowIndex = param[2].asInt(); } } ``` **Примечание:** Максимальное количество строк в таблице равно 100. Когда вы достигнете предела, таблица будет работать как список FIFO (Первый пришел - первый ушел). Это ограничение можно изменить, настроив свойство ```table.rows.pool.size``` в параметрах локального сервера. **Пример кода:** [Простое использование таблицы](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Table/Table_Simple/Table_Simple.ino) **Пример кода:** [Расширенное использование таблицы](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Table/Table_Advanced/Table_Advanced.ino) ### Селектор устройств (Device Selector) Селектор устройств - это мощный виджет, который позволяет обновлять виджеты на основе одного активного устройства. Этот виджет особенно полезен, когда у вас есть несколько устройств с аналогичной функциональностью. Представьте, что у вас есть 4 устройства, и к каждому устройству подключен датчик температуры и влажности. Для отображения данных по всем 4 устройствам вам необходимо добавить 8 виджетов. С помощью Селектора устройств вы можете использовать только 2 виджета, которые будут отображать температуру и влажность в зависимости от активного устройства, выбранного в Селекторе. Все, что вам нужно сделать, это: 1. Добавить виджет Селектора устройств в проект 2. Добавить 2 виджета (например виджет отображения значений (Value Display Widget)), чтобы отобразить температуру и влажность 3. В настройках виджетов вы сможете назначить их на Селектор устройств (в разделе источника или цели) 4. Выйти из настроек, запустить проект Теперь вы можете изменить активное устройство в Селекторе устройств и увидите, что значения температуры и влажности отражают обновленные данные для только что выбранного вами устройства. **ПРИМЕЧАНИЕ:** Виджет вебхук ([Webhook](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/WebHook/WebHook_GET/WebHook_GET.ino)) пока не работает с Селектором устройств. ### Плитка устройств (Device Tiles) Плитка устройств - это мощный виджет, очень похожий на виджет Селектора устройств (Device Selector), но с пользовательским интерфейсом. Позволяет отображать один пин с устройства на одну плитку. Этот виджет особенно полезен, когда у вас есть несколько устройств с аналогичной функциональностью. Теперь вы можете группировать похожие устройства на одном макете (шаблоне). ## Sensors ### Акселерометр (Accelerometer) Акселерометр один из [сенсоров движения](https://developer.android.com/guide/topics/sensors/sensors_motion.html), который позволяет определить движение Вашего телефона в пространстве. Он может пригодится для отслеживания таких событий как тряска, удар, поворот или наклон телефона. Концептуально, акселерометр определяет силу ускорения приложенную к вашему телефону. Единица измерения - м/c^2 приложенная к каждой из осей ```x```, ```y```, ```z```. Чтобы получить данные с сенсора нужно использовать следующий код : ```cpp BLYNK_WRITE(V1) { //сила ускорения, приложенная к оси x int x = param[0].asFloat(); //сила ускорения, приложенная к оси y int y = param[1].asFloat(); //сила ускорения, приложенная к оси z int z = param[2].asFloat(); } ``` Акселерометр не работает при свернутом приложении. ### Барометр/Давление (Barometer/pressure) Барометр один из сенсоров [окружающей среды](https://developer.android.com/guide/topics/sensors/sensors_environment.html) и позволяет измерять атмосферное давление. Измеряется в ```hPa``` (гПа) или ```mbar``` (мБар). Чтобы получить данные с сенсора нужно использовать следующий код : ```cpp BLYNK_WRITE(V1) { //Давление в мБар int pressure = param[0].asInt(); } ``` Барометр не работает при свернутом приложении. ### Гравитация (Gravity) Гравитация - это своего рода [датчики движения](https://developer.android.com/guide/topics/sensors/sensors_motion.html), который позволяет обнаруживать движение вашего смартфона. Полезно для мониторинга движения устройства, таких как наклон, встряхивание, вращение или качание. Датчик силы притяжения выдает трехмерный вектор, указывающий направление и величину силы притяжения. Измеряется в ```m/s^2``` силы притяжения, приложенной к оси ```x```, ```y```, ```z```. Для того, чтобы принять данные от него, вам необходимо: ```cpp BLYNK_WRITE(V1) { //сила притяжения, приложенная к оси x int x = param[0].asFloat(); //сила притяжения, приложенная к оси y int y = param[1].asFloat(); //сила притяжения, приложенная к оси y int z = param[2].asFloat(); } ``` **ВНИМАНИЕ:** Виджет гравитации не работает в фоновом режиме. ### Влажность (Humidity) Влажность является своего рода [датчиком среды](https://developer.android.com/guide/topics/sensors/sensors_environment.html), который позволяет измерять относительную влажность окружающей среды. Измеряется в ```%``` - фактически это относительная влажность в процентах. Для того, чтобы принять данные от датчика, вам необходимо: ```cpp BLYNK_WRITE(V1) { //Влажность в % int humidity = param.asInt(); } ``` **ВНИМАНИЕ:** Влажность не работает в фоновом режиме. ### Свет (Light) Свет - это своего рода [датчики окружающей среды](https://developer.android.com/guide/topics/sensors/sensors_environment.html), который позволяет измерять уровень освещенности (уровень внешней освещенности измеряется в люксах). В телефонах чаще всего используется для управления яркостью экрана. Для того, чтобы принять данные этого виджета, вам необходимо: ```cpp BLYNK_WRITE(V1) { //уровень освещенности int lx = param.asInt(); } ``` Виджет Свет не работает в фоновом режиме. ### Близость (Proximity) Близость - это своего рода [датчики положения](https://developer.android.com/guide/topics/sensors/sensors_position.html) это позволяет определить, насколько близко смартфон к лицу. Измеряется в ```cm``` (см) - расстояние от телефона до лица. Однако большинство этих датчиков возвращает только информацию FAR / NEAR. Поэтому, возвращаемое значение будет ```0 / 1```. Где 0 / LOW = ```FAR``` (далеко), а 1 / HIGH = ``` NEAR``` (рядом). Для того, чтобы принять данные из виджета, вам необходимо: ```cpp BLYNK_WRITE(V1) { // расстояние до объекта int proximity = param.asInt(); if (proximity) { // РЯДОМ } else { // ДАЛЕКО } } ``` Виджет близость не работает в фоновом режиме. ### Температура (Temperature) Температура является своего рода [датчиком окружающей среды](https://developer.android.com/guide/topics/sensors/sensors_environment.html) который позволяет измерять температуру окружающего воздуха. Измеряется в ```°C``` - градусах Цельсия. Для приема данных из виджета, необходимо использовать код: ```cpp BLYNK_WRITE(V1) { // температура в градусах цельсия int celcius = param.asInt(); } ``` Виджет Температуры не работает в фоновом режиме. ### Триггер GPS (GPS Trigger) Виджет Триггер GPS позволяет легко инициировать события, когда вы входите или выходите из географической зоны. Этот виджет будет работать в фоновом режиме и периодически будет проверять ваши координаты. Если ваше местоположение находится в пределах или вне указанной зоны (географическая зона выбирается на карте виджета), виджет отправит команду ```HIGH```/``` LOW``` на аппаратное устройство. Например, Триггер GPS назначен для пина ```V1```, и включена опция ```Trigger When Enter```. В этом случае, когда вы окажитесь в указанной географической зоне виджет вызовет событие ```HIGH```. ```cpp BLYNK_WRITE(V1) { int state = param.asInt(); if (state) { //Вы вошли в зону } else { //Вы вышли из зоны } } ``` Подробнее о том, как работает GPS-виджет, вы можете прочитать [здесь](https://developer.android.com/guide/topics/location/strategies.html). **ВНИМАНИЕ:** Виджет Триггер GPS работает в фоновом режиме. ### Поток GPS (GPS Streaming) Полезно для мониторинга местонахождения смартфона получать данные о широте, долготе, высоте и скорости (скорость часто может быть 0, если смартфон не поддерживает ее измерение). Чтобы принимать данные из этого виджета, вам необходимо: ```cpp BLYNK_WRITE(V1) { float latitude = param[0].asFloat(); float longitude = param[1].asFloat(); float altitude = param[2].asFloat(); float speed = param[3].asFloat(); } ``` или вы можете использовать подготовленную оболочку ```GpsParam``` : ```cpp BLYNK_WRITE(V1) { GpsParam gps(param); //Печать лат/лон с 6 десятичными знаками Serial.println(gps.getLat(), 7); Serial.println(gps.getLon(), 7); Serial.println(gps.getAltitude(), 2); Serial.println(gps.getSpeed(), 2); } ``` Поток GPS работает в фоновом режиме. **Пример кода:** [Поток GPS](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/GPS_Stream/GPS_Stream.ino) ## Other ### Мост (Bridge) Мост может быть использован для связи между устройствами (без участия приложения). Вы можете отправлять цифровые / аналоговые / виртуальные команды записи с одного устройства на другое, зная только токен авторизации. На данный момент виджет Мост не обязательно использовать в приложении (здесь он используется для указания того, что у нас есть такая функция). **Вы можете использовать несколько мостов для управления несколькими устройствами.** Виджет Мост использует виртуальный пин и превращает его в канал для управления другим устройством. Это означает, что вы можете контролировать любые виртуальные, цифровые или аналоговые пины целевого устройства. Будьте осторожны, не используйте пины типа ```A0, A1, A2 ...``` при обмене данными между различными типами устройств, так как в таких случаях Arduino Core может ссылаться на неверные пины. Пример кода для устройства A, которое будет отправлять значения на устройство B: ```cpp //Инициирует виджет Моста на V1 устройства A WidgetBridge bridge1(V1); ... void setup() { Blynk.begin(...); while (Blynk.connect() == false) { // Ждем пока Blynk подключится } bridge1.digitalWrite(9, HIGH); // выставим триггер HIGH на D9 устройства B. Код на устройстве B не требуется bridge1.analogWrite(10, 123); bridge1.virtualWrite(V1, "hello"); // вам нужно написать код на устройстве B, чтобы получить это значение. См. ниже bridge1.virtualWrite(V2, "value1", "value2", "value3"); } BLYNK_CONNECTED() { bridge1.setAuthToken("OtherAuthToken"); // токен с устройства B } ``` **ВАЖНО:** при выполнении ```virtualWrite()``` с виджета Мост, устройство B должно обрабатывать входящие данные с устройства A. Например, если вы отправляете значение с устройства A на устройство B, используя ```bridge.virtualWrite (V5)```, вам необходимо использовать свой обработчик на устройстве B: ```cpp BLYNK_WRITE(V5){ int pinData = param.asInt(); //pinData variable will store value that came via Bridge } ``` Имейте в виду, что ```bridge.virtualWrite``` не отправляет никаких значений в мобильное приложение. Для этого вам нужно вызвать ```Blynk.virtualWrite```. **Пример кода:** [Мост](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Bridge/Bridge.ino) ### Обработчик событий (Eventor) Виджет Обработчик событий позволяет создавать простые правила поведения или **события**. Давайте рассмотрим типичный вариант использования: считывание температуры с датчика DHT и отправка push-уведомления, когда температура превышает определенный предел: ```cpp float t = dht.readTemperature(); if (isnan(t)) { return; } if (t > 40) { Blynk.notify(String("Температура слишком высокая: ") + t); } ``` С Обработчиком событий вам не нужно писать этот код. Все, что вам нужно, это отправить значение с датчика на сервер Blynk: ```cpp float t = dht.readTemperature(); Blynk.virtualWrite(V0, t); ``` Не забывайте, что команды ```virtualWrite``` должны быть заключены в таймер и не должны использоваться в основном цикле ```loop```. **ПРИМЕЧАНИЕ:** Не забудьте добавить виджет уведомлений в приложении. Обработчик событий пригодится вам, когда нужно изменить условия на лету без повторной загрузки нового скетча на аппаратное обеспечение. Вы можете создать столько **событий**, сколько вам нужно. Обработчик событий также может быть запущен со стороны приложения. Вам просто нужно назначить виджет на тот же контакт, что и ваше событие в Обработчике событий. Обработчик событий не постоянно отправляет события. Давайте рассмотрим простой пример, как показано выше ```if (temperature > 40) send notification```. Когда температура превышает 40 пороговых значений - отправляется уведомление. Если температура продолжает оставаться выше 40 никакие повторные действия не будут инициированы. Но если ```temperature``` опускается ниже порогового значения, а затем проходит его снова уведомление будет отправлено повторно (для уведомлений Обработчика событий нет ограничения отправки в течение 5 секунд). Обработчик событий также поддерживает события таймера (Timer). Например, вы можете установить пин ```V1``` ON/HIGH в 21:00:00 каждую пятницу. В Обработчике событий вы можете назначить несколько таймеров на один и тот же пин, отправить любую строку/число, выбрать день и часовой пояс. Чтобы удалить созданное **событие**, пожалуйста, используйте сдвиг пальцем по экрану. Вы также можете перенести последний элемент самого события. **Пример кода:** [Обработчик событий](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Eventor/Eventor.ino) **ПРИМЕЧАНИЕ:** Виджет таймера зависит от времени сервера, а не вашего телефона. Иногда время телефона может не соответствовать времени сервера. **ПРИМЕЧАНИЕ:** события запускаются только один раз при выполнении условия. Это означитает что [цепочка событий] (https://community.blynk.cc/t/eventor-behavior-bug-feature/20962) невозможна (однако она может быть включена в коммерческой версии). ### Часы реального времени (RTC) Часы реального времени позволяют получать время с сервера. Вы можете предварительно выбрать любой часовой пояс в пользовательском интерфейсе, чтобы получить время на оборудование из нужной локали. **Пример кода:** [Часы реального времени](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/RTC/RTC.ino) ### Bluetooth с низким энергопотреблением Этот виджет позволяет включить блутзуз с низким энергопотреблением на вашем телефоне. На текущий момент виджет также требует наличия интернет соединения (постараемся пофиксить в ближайшем будущем). Некоторые типы виджетов нельзя использовать вместе с блутузом, например исторический граф, так как он требует чтобы данные отправлялись на сервер, чего блутуз виджет не делает. **Список поддерживаемых чипов и контроллеров:** [BLE](https://github.com/blynkkk/blynk-library/tree/master/examples/Boards_Bluetooth) ### Блютуз (Bluetooth) Этот виджет позволяет включить блютуз на вашем телефоне. На текущий момент виджет также требует наличия интернет соединения (постараемся пофиксить в ближайшем будущем) и поддерживается только на Android. Некоторые типы виджетов нельзя использовать вместе с блютузом, например исторический граф, так как он требует чтобы данные отправлялись на сервер, чего блютуз виджет не делает. **Список поддерживаемых чипов и контроллеров:** [BLE](https://github.com/blynkkk/blynk-library/tree/master/examples/Boards_Bluetooth) ### Музыкальный проигрыватель (Music Player) Простой элемент интерфейса с 3 кнопками - имитирует интерфейс музыкального проигрывателя. Каждая кнопка отправляет свою команду на аппаратное устройство: ```play``` (воспроизвести), ```stop``` (стоп), ```prev``` (предыдущий), ```next``` (следующий). Вы можете изменить состояние виджета в приложении с аппаратной стороны с помощью следующих команд: ``` Blynk.virtualWrite(Vx, "play"); Blynk.virtualWrite(Vx, "stop"); ``` Вы также можете изменить состояние воспроизведение/остановка виджета с помощью следующего кода (эквивалент вышеупомянутых команд): ```Blynk.setProperty(V1, "isOnPlay", "false");``` **Пример кода:** [Музыкальный проигрыватель](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Player/Player.ino) ### Вебхук (Webhook) Вебхук очень мощный виджет, который позволяет Вам легко интегрироватся с любыми сторонними сервисами. С его помощью Вы можете слать любые HTTP/S запросы на любой сервер или устройство, которое имеет HTTP/S API (например, лампы Philips Hue). Вебхук вешается на вирутальный пин и любая команда, которая приходит на этот пин будет вызывать срабатывание HTTP/S запроса. Команды на такой виртуальный пин могут приходить как со стороны железа, так и со стороны приложения. То есть, Вы можете слать любой HTTP запрос при нажатии кнопки в приложении, если эта кнопка на том же пине что и вебхук. Вот простой пример, представьте, что Вы хотите слать данные с микроконтроллера не только в Blynk, но и в какой-то другой сервис, например - Google Docs или в thingspeak.com. Раньше Вам для этого пришлось бы писать что-то вроде : ```cpp WiFiClient client; if (client.connect("api.thingspeak.com", 80)) { client.print("POST /update HTTP/1.1\n"); client.print("Host: api.thingspeak.com\n"); client.print("Connection: close\n"); client.print("X-THINGSPEAKAPIKEY: " + apiKeyThingspeak1 + "\n"); client.print("Content-Type: application/x-www-form-urlencoded\n"); client.print("Content-Length: "); client.print(postStr.length()); client.print("\n\n"); client.print(postStr); } ``` С вебхуком этого больше делать не нужно. Достаточно лишь заполнить поля виджета в приложении и выполнить привычное: ```cpp Blynk.virtualWrite(V0, value); ``` Где V0 - пин вебхук виджета. В дополнение, Вы можете подставлять значение пина в URL: ```cpp https://api.thingspeak.com/update?api_key=xxxxxx&field1=/pin/ ``` или тело запроса : ```cpp ["/pin/"] ``` Так же можно отправлять несколько значений внутри одного пина (до 5) : ```/pin[0]/```,```/pin[1]/```, ```/pin[2]/``` Еще одна крутая штука - это возможность делать HTTP GET запросы на сервере и слать их результат на микроконтроллер. Прелесть тут в том, что Вам не нужно для этого писать сложный код на микроконтроллере. Представьте, что Вам нужно получить информацию о погоде от какого-то метио сервиса. Например, по такому запросу : ```http://api.sunrise-sunset.org/json?lat=33.3823&lng=35.1856&date=2016-10-01``` Вы можете вставить этот запрос в вебхук виджет, выбрать пин ```V0``` и написать : ```cpp BLYNK_WRITE(V0){ String webhookdata = param.asStr(); Serial.println(webhookdata); } ``` Теперь, каждый раз когда вы дергаете ```V0``` с помощью ```Blynk.virtualWrite(V0, 1)``` будет вызвана функция ```BLYNK_WRITE(V0)```. **Замечание:** обычно HTTP запросы довольно большие, поэтому Вам, вероятно, нужно будет увеличить лимит на максимальную длину сообщения на микроконтроллере ```#define BLYNK_MAX_READBYTES 1024```. **Замечание:** наше облако так же имеет определенные лимиты для вебхука. Мы разрешаем слать только 1 запрос в секунду. Это поведение можно изменить на локальном сервер через свойство ```webhooks.frequency.user.quota.limit```. Пожалуйста, используйте вебхуки с умом. Многие веб ресурсы не способны обрабатывать даже 1 запрос в секунду. **Замечание :** в случае если Ваш вебхук не выполнился 10 раз подряд - вебхук виджет будет остановлен. Чтобы восстановить его работу - нужно открыть и закрыть виджет в режиме редактирования. Не выполненными считаются запросы у которых код ответа не равен 200 или 302. ### Отчеты (Reports) Функция виджета Отчеты заключается в настройке и разметке отчетов данных в формате CSV. Вы можете выбрать разовые или переодически запланированные отчеты. Кроме того, в отчетах вы можете очистить все пользовательсике данные, собранные с ваших устройств. Вам необходимо настроить начальные параметры в режиме редактирования, а затем уже в режиме воспроизведения вы сможете настроить сами отчеты. #### Режим редактирования. Конфигурация ввода данных В режиме редактирования (когда ваш проект остановлен) вы определяете потоки данных, которые вы хотели бы позже включить в отчет. Виджет Отчеты предназначен для работы с виджетом [Плитка устройств (Device Tiles)](https://github.com/blynkkk/blynkkk.github.io/blob/master/mobile/ru/device_tiles.md). Если вы не используете плитки устройств, вы все равно можете выбрать одно устройство или группу устройств в качестве источника данных для отчетов. Вы должны выбрать либо [Плитку устройств](https://github.com/blynkkk/blynkkk.github.io/blob/master/mobile/ru/device_tiles.md), либо одино устройство, либо группу устройств для отчета. Вы не можете объединить эти оба варианта. #### Режим воспроизведения После добавления исходных устройств и их потоков данных нажмите кнопку «Воспроизвести» и нажмите кнопку «Отчеты». ### Настройка отчетов Каждый параметр отчета предполагает свои собственные настройки: ```Report name``` (Имя отчета) - дайте вашему отчету осмысленное имя. ```Data source``` (Источники данных) - выберите потоки данных, которые вы хотели бы включить в отчеты. ```Report Frequency``` (периодичность отчетов) - Определяет, как часто будут отправляться отчеты. Они могут быть разовыми и запланированными. ```one-time``` (Сейчас) - мгновенно сформирует отчет и отправит его на указанные адреса электронной почты. Нажмите на значок справа, чтобы отправить отчет. Запланированные отчеты могут быть отправлены ```daily```/```weekly```/```monthly``` (ежедневно/еженедельно/ежемесячно). ```At Time``` (Время) установите время дня, когда отчет будет отправлен. ```Start```/```End``` (Качало/Конец) указывает дату начала и окончания оправки отчетов. Для еженедельного отчета вы можете выбрать день недели, когда отчет должен быть отправлен. Для ежемесячного отчета вы можете выбрать, отправку отчета в первый или последний день месяца. ```Recipients``` (Получатели) - укажите до 5 адресов электронной почты.. ```Data resolution``` (Разрешение данных) определяет детализацию ваших отчетов. Поддерживаемые детализации: ```minute``` (ежеминутно), ```hourly``` (ежечасно) и ```daily``` (ежедневно). Например, когда вы генерируете ежедневный отчет с детализацией в 1 минуту, вы получаете ```24 * 60 * 60``` единиц данных в вашем ежедневном отчете за каждый выбранный поток. ```Group data in reports by``` (Группировка данных в отчетах) - укажите выходной формат файла-(ов) CSV: ```Datastream``` (Поток) - вы получите один CSV файл для каждого потока данных. ```Device``` (Устройство) - вы получите один CSV-файл на каждое устройство. Каждый файл будет содержать все включенные потоки данных. ```Report``` (Отчет) - вы получите один CSV-файл для всех ваших устройств и всех ваших потоков данных. ```Timezone correction``` (Времненная зона) - укажите корректировку часового пояса, если вам нужно настроить дату и время отчета на определенный часовой пояс. ```Date and time format``` (Формат даты и времени) - определяет формат поля временной метки ваших данных. Вы можете выбрать ```2018-06-21 20:16:48```, ```2018-06-21T20:16:48+03:00``` или другой поддерживаемый формат. Существует особый формат ```Timestamp``` (Временная метка), которая отражает разницу между текущим временем и полуночью 1 января 1970 года UTC, измеряемую в миллисекундах. После настройки отчета нажмите кнопку «ОК» в правом верхнем углу. Ваш отчет готов. После настройки отчета вы увидите, когда запланирован следущий отчет ```Next```, а также увидите расписание для этого отчета. После отправки отчета хотя бы один раз, вы можете увидеть дату его последней отправки ```Last```. ```Last``` (Последний) метка также содержит статус отправки отчета: - ```OK``` (Успешно): отчет был сгенерирован и успешно отправлен Получателям; - ```No Data``` (Нет данных): отчет не содержит данных за указанный период; - ```Error``` (Ошибка): что-то пошло не так. Пожалуйста, свяжитесь со службой поддержки Blynk. Отчеты будут генерироваться, даже если ваш проект не находится в активном (Play) режиме. Однако помните, неактивные проекты небудут генерировать данные. **ПРИМЕЧАНИЕ:** все отчеты формируются в кодировке UTF-16. Пожалуйста, убедитесь, что при открытии файла отчета вы выбрали кодировку UTF-16 в вашем CSV-редакторе. ### Отчеты (Reports) Функция виджета Отчеты заключается в настройке и разметке отчетов данных в формате CSV. Вы можете выбрать разовые или переодически запланированные отчеты. Кроме того, в отчетах вы можете очистить все пользовательсике данные, собранные с ваших устройств. Вам необходимо настроить начальные параметры в режиме редактирования, а затем уже в режиме воспроизведения вы сможете настроить сами отчеты. #### Режим редактирования. Конфигурация ввода данных В режиме редактирования (когда ваш проект остановлен) вы определяете потоки данных, которые вы хотели бы позже включить в отчет. Виджет Отчеты предназначен для работы с виджетом [Плитка устройств (Device Tiles)](https://github.com/blynkkk/blynkkk.github.io/blob/master/mobile/ru/device_tiles.md). Если вы не используете плитки устройств, вы все равно можете выбрать одно устройство или группу устройств в качестве источника данных для отчетов. Вы должны выбрать либо [Плитку устройств](https://github.com/blynkkk/blynkkk.github.io/blob/master/mobile/ru/device_tiles.md), либо одино устройство, либо группу устройств для отчета. Вы не можете объединить эти оба варианта. #### Режим воспроизведения После добавления исходных устройств и их потоков данных нажмите кнопку «Воспроизвести» и нажмите кнопку «Отчеты». ### Настройка отчетов Каждый параметр отчета предполагает свои собственные настройки: ```Report name``` (Имя отчета) - дайте вашему отчету осмысленное имя. ```Data source``` (Источники данных) - выберите потоки данных, которые вы хотели бы включить в отчеты. ```Report Frequency``` (периодичность отчетов) - Определяет, как часто будут отправляться отчеты. Они могут быть разовыми и запланированными. ```one-time``` (Сейчас) - мгновенно сформирует отчет и отправит его на указанные адреса электронной почты. Нажмите на значок справа, чтобы отправить отчет. Запланированные отчеты могут быть отправлены ```daily```/```weekly```/```monthly``` (ежедневно/еженедельно/ежемесячно). ```At Time``` (Время) установите время дня, когда отчет будет отправлен. ```Start```/```End``` (Качало/Конец) указывает дату начала и окончания оправки отчетов. Для еженедельного отчета вы можете выбрать день недели, когда отчет должен быть отправлен. Для ежемесячного отчета вы можете выбрать, отправку отчета в первый или последний день месяца. ```Recipients``` (Получатели) - укажите до 5 адресов электронной почты.. ```Data resolution``` (Разрешение данных) определяет детализацию ваших отчетов. Поддерживаемые детализации: ```minute``` (ежеминутно), ```hourly``` (ежечасно) и ```daily``` (ежедневно). Например, когда вы генерируете ежедневный отчет с детализацией в 1 минуту, вы получаете ```24 * 60 * 60``` единиц данных в вашем ежедневном отчете за каждый выбранный поток. ```Group data in reports by``` (Группировка данных в отчетах) - укажите выходной формат файла-(ов) CSV: ```Datastream``` (Поток) - вы получите один CSV файл для каждого потока данных. ```Device``` (Устройство) - вы получите один CSV-файл на каждое устройство. Каждый файл будет содержать все включенные потоки данных. ```Report``` (Отчет) - вы получите один CSV-файл для всех ваших устройств и всех ваших потоков данных. ```Timezone correction``` (Времненная зона) - укажите корректировку часового пояса, если вам нужно настроить дату и время отчета на определенный часовой пояс. ```Date and time format``` (Формат даты и времени) - определяет формат поля временной метки ваших данных. Вы можете выбрать ```2018-06-21 20:16:48```, ```2018-06-21T20:16:48+03:00``` или другой поддерживаемый формат. Существует особый формат ```Timestamp``` (Временная метка), которая отражает разницу между текущим временем и полуночью 1 января 1970 года UTC, измеряемую в миллисекундах. После настройки отчета нажмите кнопку «ОК» в правом верхнем углу. Ваш отчет готов. После настройки отчета вы увидите, когда запланирован следущий отчет ```Next```, а также увидите расписание для этого отчета. После отправки отчета хотя бы один раз, вы можете увидеть дату его последней отправки ```Last```. ```Last``` (Последний) метка также содержит статус отправки отчета: - ```OK``` (Успешно): отчет был сгенерирован и успешно отправлен Получателям; - ```No Data``` (Нет данных): отчет не содержит данных за указанный период; - ```Error``` (Ошибка): что-то пошло не так. Пожалуйста, свяжитесь со службой поддержки Blynk. Отчеты будут генерироваться, даже если ваш проект не находится в активном (Play) режиме. Однако помните, неактивные проекты небудут генерировать данные. **ПРИМЕЧАНИЕ:** все отчеты формируются в кодировке UTF-16. Пожалуйста, убедитесь, что при открытии файла отчета вы выбрали кодировку UTF-16 в вашем CSV-редакторе. ================================================ FILE: Widgets.md ================================================ #Widgets Widgets are interface modules. Each of them performs a specific input/ output function when communicating with the hardware. There are 4 types of Widgets: - **Controllers** - used to send commands that control your hardware - **Displays** - used for data visualization from sensors and other sources; - **Notifications** - send messages and notifications; - **Interface** - widgets to perform certain GUI functions; - **Other** - widgets that don't belong to any category; Each Widget has it's own settings. Some of the Widgets (e.g. Bridge) just enable functionality and they don't have any settings. ## Common Widget Settings ### Pin Selector This is one of the main parameters you need to set. It defines which pin to control or to read from. **Digital Pins** - represent physical Digital IO pins on your hardware. PWM-enabled pins are marked with the ```~``` symbol **Analog Pins** - represent physical Analog IO pins on your hardware **Virtual Pins** - have no physical representation. They are used to transfer any data between Blynk App and your hardware. Read more about Virtual Pins [here](/#blynk-main-operations-virtual-pins). ### Data Mapping In case you want to map incoming values to specific range you may use mapping button: Let's say your sensor sends values from 0 to 1023. But you want to display values in a range 0 to 100 in the app. When Data Mapping enabled, incoming value 1023 will be mapped to 100. ### SPLIT/MERGE Some of the Widgets can send more than one value. And with this switch you can control how to send them. - **SPLIT**: Each of the parameters is sent directly to the Pin on your hardware (e.g D7). You don't need to write any code. **NOTE:** In this mode you send multiple commands from one widget, which can reduce performance of your hardware. Example: If you have a Joystick Widget and it's set to D3 and D4, it will send 2 commands over the Internet: ```cpp digitalWrite(3, value); digitalWrite(4, value); ``` - **MERGE:** When MERGE mode is selected, you are sending just 1 message, consisting of array of values. But you'll need to parse it on the hardware. This mode can be used with Virtual Pins only. Example: Add a zeRGBa Widget and set it to MERGE mode. Choose Virtual Pin V1 ```cpp BLYNK_WRITE(V1) // There is a Widget that WRITEs data to V1 { int r = param[0].asInt(); // get a RED channel value int g = param[1].asInt(); // get a GREEN channel value int b = param[2].asInt(); // get a BLUE channel value } ``` ### Decimals Defines how many decimals you would like to see when moving a Slider. When "No Fraction" is chosen, slider will only send integer values with no decimals. "1 digit" means that values will look like 1.1, 1.2, ..., 2.0, etc. ### Send On Release This option allows you to optimize data traffic on your hardware. For example, when you move joystick widget, commands are streamed to the hardware, during a single joystick move you can send dozens of commands. There are use-cases where it's needed, however creating such a load may lead to hardware overload and reset. **Send On Release** is a recommended setting for majority of applications. This is also a default setting. ### Write interval Similar to "Send on Release" option. However, it allows you to stream values to your hardware within certain interval. For example, setting **write interval** to 100 ms means that while you move the slider, only 1 value will be sent to hardware within 100 ms period. This option is also used to optimize data traffic flow to your hardware. ### Color gradient When you choose gradient, it affects the color of widget elements based on invoming values. For example: You set Gauge Widget with Min and Max parameters of 0-100, and choose green-yellow-red gradient. When hardware sends: - `10`, Gauge will change it's color to green color - `50` will change Gauge to yellow color - `80` will change Gauge to red color There are 2 types of gradients you can choose from: - Warm: Green - Orange - Red; - Cold: Green - Blue - Violet; ##Controllers ### Button Works in push or switch modes. Allows to send ON and OFF (LOW/HIGH) values. Button sends 1 (HIGH) on press and sends 0 (LOW) on release. **Sketch:** [BlynkBlink](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/BlynkBlink/BlynkBlink.ino) ### Slider Similar to potentiometer. Allows to send values between in a given MIN/MAX range. **Sketch:** [BlynkBlink](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/BlynkBlink/BlynkBlink.ino) ### Timer Timer triggers actions at a specified time. Even if smartphone and app is offline. Start time sends 1 (HIGH). Stop time sends 0 (LOW). Recent Android version also has improved Timer within Eventor widget. With Eventor Time Event you can assign multiple timers on same pin, send any string/value, select days and timezone. It is recommended to use Eventor over Timer widget. However Timer widget is still suitable for simple timer events. **NOTE:** The timer widget rely on the server time and not your phone time. Sometimes the phone time may not match the server time. **Sketch:** [Timer](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Timer/Timer.ino) ### Joystick Control servo movements in 4 directions ####Settings: - SPLIT/MERGE modes - read [here](/#widgets-common-widget-settings-splitmerge) - **Rotate on Tilt** When it's ON, Joystck will automatically rotate if you use your smartphone in landscape orientation - **Auto-Return** - When it's OFF, Joystick handle will not return back to center position. It will stay where you left it. **Sketch:** [JoystickTwoAxis](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/JoystickTwoAxis/JoystickTwoAxis.ino) ### zeRGBa zeRGBa is a usual RGB color picker + brightness picker #### Settings: - **SPLIT**: Each of the parameters is sent directly to the Pin on your hardware (e.g D7). You don't need to write any code. **NOTE:** In this mode you send multiple commands from one widget, which can reduce performance of your hardware. Example: If you have a zeRGBa Widget and it's set to D1, D2, D3 it will send 3 commands over the Internet: ```cpp digitalWrite(1, r); digitalWrite(2, g); digitalWrite(3, b); ``` - **MERGE**: When MERGE mode is selected, you send 1 message with an array of values inside. You would need to parse the message on the hardware. This mode can be used with Virtual Pins only. Example: Add a zeRGBa Widget and set it to MERGE mode. Choose Virtual Pin V1. ```cpp BLYNK_WRITE(V1) // zeRGBa assigned to V1 { // get a RED channel value int r = param[0].asInt(); // get a GREEN channel value int g = param[1].asInt(); // get a BLUE channel value int b = param[2].asInt(); } ``` ### Step Control Step Control is used to set granular values with a given step 2 buttons are assigned to 1 pin. One button increments the value, another one decrements it. **Send Step** option allows you to send step value to hardware instead of actual value of step widget. **Loop value** option allows you to reset step widget to start value when maximum value is reached. **Sketch:** [Basic Sketch](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/BlynkBlink/BlynkBlink.ino) ##Displays ### Value Display Displays incoming data. **Sketch:** [BlynkBlink](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/BlynkBlink/BlynkBlink.ino) ### Labeled Value Displays incoming data in a formatted wayt. It is a better version of 'Value Display' where you can add suffixes and prefixes on the app side, with no coding on the hardware. **Sketch:** [BlynkBlink](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/BlynkBlink/BlynkBlink.ino) #### Formatting options For example: your sensor sends vaule of 12.6789 to Blynk application. Next formatting options are supported: ```/pin/``` - displays the value without formatting (12.6789) ```/pin./``` - displays the rounded value without decimal part (13) ```/pin.#/``` - displays the value with 1 decimal digit (12.7) ```/pin.##/``` - displays the value with two decimal places (12.68) ### LED A simple LED for indication. You need to send 0 in order to turn LED off. And 255 in order to turn LED on. Or just use Blynk API as described below: ```cpp WidgetLED led1(V1); //register to virtual pin 1 led1.off(); led1.on(); ``` All values between 0 and 255 will change LED brightness: ```cpp WidgetLED led2(V2); led2.setValue(127); //set brightness of LED to 50%. ``` **Sketch:** [LED](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/LED/LED_Blink/LED_Blink.ino) ### Gauge Visual display of numeric values. **Sketch:** [BlynkBlink](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/BlynkBlink/BlynkBlink.ino) #### Formatting options For example: your sensor sends vaule of 12.6789 to Blynk application. Next formatting options are supported: ```/pin/``` - displays the value without formatting (12.6789) ```/pin./``` - displays the rounded value without decimal part (13) ```/pin.#/``` - displays the value with 1 decimal digit (12.7) ```/pin.##/``` - displays the value with two decimal places (12.68) ### LCD This is a regular 16x2 LCD display made in our secret facility in China. #### SIMPLE / ADVANCED MODE #### Commands You need to use special commands with this widget: ``` lcd.print(x, y, "Your Message"); ``` Where x is a symbol position (0-15), y is a line id (0 or 1), ``` lcd.clear(); ``` **Sketch:** [LCD Advanced Mode](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/LCD/LCD_AdvancedMode/LCD_AdvancedMode.ino) **Sketch:** [LCD Simple Mode Pushing](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/LCD/LCD_SimpleModePushing/LCD_SimpleModePushing.ino) **Sketch:** [LCD Simple Mode Reading](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/LCD/LCD_SimpleModeReading/LCD_SimpleModeReading.ino) #### Formatting options For example: your sensor sends vaule of 12.6789 to Blynk application. Next formatting options are supported: ```/pin/``` - displays the value without formatting (12.6789) ```/pin./``` - displays the rounded value without decimal part (13) ```/pin.#/``` - displays the value with 1 decimal digit (12.7) ```/pin.##/``` - displays the value with two decimal places (12.68) ### SuperChart SuperChart is used to visualise live and historical data. You can use it for sensor data, for binary event logging and more. To use SuperChart widget you would need to push the data from the hardware with the desired interval by using timers. [Here is](https://examples.blynk.cc/?board=ESP8266&shield=ESP8266%20WiFi&example=GettingStarted%2FPushData) a basic example for data pushing. #### Interactions: - **Switch between time ranges and Live mode**
Tap time ranges at the bottom of the widget to change time ranges - **Tap Legend Elements** to show or hide datastreams
- **Tap'n'hold to view timestamp and corresponding values** - **Quick swipe from left to right to reveal previous data** Then you can then scroll data back and forward within the given time range. - **Full Screen Mode**
Press this button to open Full Screen view in landscape orientation: Simply rotate the phone back to portrait mode. Chart should rotate automagically. In full screen view you will see X (time) and multiple Y scales. Full Screen Mode can be disabled from widget Settings. - **Menu Button**
Menu button will open additional functions: - Export to CSV - Erase Data on the server #### SuperChart Settings: - Chart Title - Title Font Size You have a choice of 3 font sizes - Title Alignment Choose chart title alignment. This setting also affects Title and Legend position on the Widget. - Show x-axis (time) Select it if you want to show the time label at the bottom of your chart. - Time ranges picker Allows you to select required periods (`15m`, `30m`, `1h`, `3h`, ...) and resolution for your chart. Resolution defines how precise your data is. Right now chart supports 2 types of resolution `standard` and `high`. Resolution also depends on the selected period. For example, `standard` resolution for `1d` means you'll get 24 points per day (1 per hour), with `high` resolution you'll get for `1d` 1440 points per day (1 per minute). - Datastreams - add datastreams (read below how to configure datastreams) #### Datastream Settings Widget supports up to 4 Datastreams. Press Datastream Settings Icon to open Datastream Settings. **Design:** Choose available types of Chart: - Line - Area - Bar - Binary (anchor LINK to binary) **Color:** Choose solid colors or gradients **Source and input:** You can use 3 types of Data source: **1. Virtual Pin** Choose the desired Device and Virtual Pin to read the data from. **2. Tags** SuperChart can aggregate data from multiple devices using built-in aggregation functions. For example, if you have 10 Temperature sensors sending temperature with the given period, you can plot average value from 10 sensors on the widget. To use Tags: - **[Add Tag](/#blynk-main-operations-control-of-multiple-devices-tags)** to every device you want to aggregate data from. - **Push data to the same Virtual Pin** on every device. (e.g. ```Blynk.virtualWrite (V0, temperature);```) - **Choose Tag as a source** in SuperChart Widget and use the pin where the data is coming to (e.g V0)
**Functions available:** - **SUM**, will summarize all incoming values to the specified Virtual Pin across all devices tagged with the chosen tag - **AVG**, will plot average value - **MED**, will find a median value - **MIN**, will plot minimum value - **MAX** will plot maximum value **☝️ IMPORTANT: Tags are not working in Live Mode.** 3. **[Device Selector](/#widgets-time-input-device-selector)** If you add Device Selector Widget to your project, you can use it as a source for SuperChart. In this case, when you change the device in Device Selector, chart will be updated accordingly **Y-Axis Settings**
There are 4 modes of how to scale data along the Y axis 1. *Auto*
Data will be auto-scaled based on min and max values of the given time period. This is nice option to start with. 2. **Values**
When this mode is selected, Y scale will be set to the values you choose. For example, if your hardware sends data with values varying from -100 to 100, you can set the chart to this values and data will be rendered correctly. You may also want to visualize the data within some specific range. Let's say incoming data has values in the range of 0-55, but you would like to see only values in the range 30-50. You can set it up and if values are out of Y scale you configured, chart will be cropped 3. **% of Height**
This option allows you to auto-scale incoming data on the widget and position it the way you want. In this mode, you set up the percentage of widget height on the screen, from 0% to 100%. If you set 0-100%, in fact it's a full auto-scale. No matter in which range the data is coming, it will be always scaled to the whole height of the widget. If you set it to 0-25%, then this chart will only be rendered on 1/4 of the widget height: This setting is very valuable for **Binary Chart** or for visualizing a few datastreams on the same chart in a different way. 4. *Delta*
While data stays within the given Delta value, chart will be auto-scaled within this range. If delta exceeds the range, chart will be auto-scaled to min/max values of the given period. **Suffix:**
Here you can specify a suffix that will be shown during the Tap'n'hold **Decimals**
Defines the formatting of the graph value when you Tap'n'hold the graph. Possible options are: #, #.#, #.##, etc. **Connect Missing Data Points**
If this switch is ON, then SuperChart will connect all the dots even if there was no data If it's set to OFF, then you will see gaps in case there was no data. **Binary Chart Settings**
This type of chart is useful to plot binary data, for example when unit was ON or OFF, or when motion was detected or when certain threshold was reached. You need to specify a **FLIP** point, which is the point where incoming data will be turned into TRUE or FALSE state. For example, you send the data in the range of `0 to 1023`. If you set `512` as a **FLIP** point, then everything above `512` (excluding 512) will be recorded as `TRUE`, any value below `512` (including 512) will be `FALSE`. Another example, if you send `0 and 1` and set `0` as a **FLIP** point, then `1` will be `TRUE`, `0` will be `FALSE` **State Labels:**
Here you can specify how `TRUE/FALSE` should be shown in Tap'n'Hold mode. For example, you can set to `TRUE` to "Equipment ON" label, `FALSE` to "Equipment OFF". Superchart supports currently 2 types of granularity: - Minute granularity - ```1h```, ```6h```, ```1d```; - Hour granularity - ```1w```, ```1m```, ```3m```; This means that minimum chart update interval is 1 minute for ```1h```, ```6h```, ```1d``` periods. 1 hour for ```1w```, ```1m``` and ```3m``` periods. As Blynk Cloud is free to use we have a limit on how many data you can store. At the moment Blynk Cloud accepts 1 message per minute per pin. In case you send your data more frequently your values will be averaged. For example, in case you send value ```10``` at 12:12:05 and than again ```12``` at 12:12:45 as result in chart you'll see value ```11``` for 12:12. In order to see data in chart you need to use either widgets with "Frequency reading" interval (in that case your app should be open and running) or you can use ```Blynk.virtualWrite``` on hardware side. Every ```Blynk.virtualWrite``` command is stored on server automatically. In that case you don't need application to be up and running. ### Terminal Displays data from your hardware. Allows to send any string to your hardware. Terminal always stores last 25 messages your hardware had send to Blynk Cloud. This limit may be increased on Local Server with ```terminal.strings.pool.size``` property. You need to use special commands with this widget: ```cpp terminal.print(); // Print values, like Serial.print terminal.println(); // Print values, like Serial.println() terminal.write(); // Write a raw data buffer terminal.flush(); // Ensure that data was sent out of device terminal.clear(); // Erase all values in the terminal ``` **Sketch:** [Terminal](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Terminal/Terminal.ino) ### Video Streaming Simple widget that allows you to display any live stream. Widget supports RTSP (RP, SDP), HTTP/S progressive streaming, HTTP/S live streaming. For more info please follow [official Android documentation](https://developer.android.com/guide/appendix/media-formats.html). At the moment Blynk doesn't provide streaming servers. So you can either stream directly from camera, use 3-d party services or host streaming server on own server (on raspberry for example). You can also change video url from hardware with: ```cpp Blynk.setProperty(V1, "url", "http://my_new_video_url"); ``` ### Level Display Level Display is very similar to progress bar, when you need to visualize a level betwen min/max value To update Level Display from hardware side with code: ```cpp Blynk.virtualWrite(V1, val); ``` Every message that hardware sends to server is stored automatically on server. PUSH mode doesn't require application to be online or opened. **Sketch:** [Push Example](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/PushData/PushData.ino) ##Notifications ###Twitter Twitter widget connects your Twitter account to Blynk and allows you to send Tweets from your hardware. Example code: ```cpp Blynk.tweet("Hey, Blynkers! My Arduino can tweet now!"); ``` Limitations: - you cant' send 2 tweets with same message (it's Twitter policy) - only 1 tweet per 5 seconds is allowed **Sketch:** [Twitter](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Twitter/Twitter.ino) ###Email Email widget allows you to send email from your hardware to any address. Example code: ```cpp Blynk.email("my_email@example.com", "Subject", "Your message goes here"); ``` It also contains ```to``` field. With this field you may define receiver of email in the app. You may skip ```to``` field when you want to send email to your Blynk app login email: ```cpp Blynk.email("Subject", "Your message goes here"); ``` You can send either ```text/html``` or ```text/plain``` (some clients don't support ```text/html```) email. You can change this content type of email in the Mail widget settings. Additionally you may use ```{DEVICE_NAME}```, ```{DEVICE_OWNER_EMAIL}``` and ```{VENDOR_EMAIL}``` (for the local server) placeholders in the mail for the ```to```, ```subject``` and ```body``` fields: ```cpp Blynk.email("{DEVICE_OWNER_EMAIL}", "{DEVICE_NAME} : Alarm", "Your {DEVICE_NAME} has critical error!"); ``` Limitations: - Maximum allowed email + subject + message length is 120 symbols. However you can increase this limit if necessary by adding ```#define BLYNK_MAX_SENDBYTES XXX``` to you sketch. Where ```XXX``` is desired max length of your email. For example for ESP you can set this to 1200 max length ```#define BLYNK_MAX_SENDBYTES 1200```. The ```#define BLYNK_MAX_SENDBYTES 1200``` must be included before any of the Blynk includes. - Only 1 email per 5 seconds is allowed - In case you are using gmail on the Local Server you are limited with 500 mails per day (by google). Other providers may have similar limitations, so please be careful. - User is limited with 100 messages per day in the Blynk Cloud; **Sketch:** [Email](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Email/Email.ino) ###Push Notifications Push Notification widget allows you to send push notification from your hardware to your device. Currently it also contains 2 additional options: - **Notify when hardware offline** - you will get push notification in case your hardware went offline. - **Offline Ignore Period** - defines how long hardware could be offline (after it went offline) before sending notification. In case period is exceeded - "hardware offline" notification will be send. You will get no notification in case hardware was reconnected within specified period. - **Priority** high priority gives more chances that your message will be delivered without any delays. See detailed explanation [here](https://developers.google.com/cloud-messaging/concept-options#setting-the-priority-of-a-message). **WARNING**: high priority contributes more to battery drain compared to normal priority messages. Example code: ```cpp Blynk.notify("Hey, Blynkers! My hardware can push now!"); ``` You can also use placeholder for device name, that will be replaced on the server with your device name: ```cpp Blynk.notify("Hey, Blynkers! My {DEVICE_NAME} can push now!"); ``` Limitations: - Maximum allowed body length is 120 symbols; - Every device can send only 1 notification every 5 seconds; **Sketch:** [PushNotification](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/PushNotification/PushNotification_Button/PushNotification_Button.ino) ###Unicode in notify, email, push, ... The library handles all strings as UTF8 Unicode. If you're facing problems, try to print your message to the Serial and see if it works (the terminal should be set to UTF-8 encoding). If it doesn't work, probably you should read about unicode support of your compiler. If it works, but your message is truncated - you need to increase message length limit (all Unicode symbols consume at least twice the size of Latin symbols). ###Increasing message length limit You can increase maximum message length by putting on the top of your sketch (before Blynk includes): ```cpp #define BLYNK_MAX_SENDBYTES 256 // Default is 128 ``` ## Interface ### Tabs The only purpose of Tabs widget is to extend your project space. You can have up to 4 tabs. Also you can drag widgets between tabs. Just drag widget on the label of required tab of tabs widget. ### Menu Menu widget allows you to send command to your hardware based on selection you made on UI. Menu sends index of element you selected and not label string. Sending index is starts from 1. It works same way as usual ComboBox element. You can also set Menu items [from hardware side](/#blynk-main-operations-change-widget-properties). Example code: ``` switch (param.asInt()) { case 1: { // Item 1 Serial.println("Item 1 selected"); break; } case 2: { // Item 2 Serial.println("Item 2 selected"); break; } } ``` **Sketch:** [Menu](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Menu/Menu.ino) ### Time Input Time input widget allows you to select start/stop time, day of week, timezone, sunrise/sunset formatted values and send them to your hardware. Supported formats for time now are ```HH:MM``` and ```HH:MM AM/PM```. Hardware will get selected on UI time as seconds of day (```3600 * hours + 60 * minutes```) for start/stop time. Time that widget sends to hardware is user local time. Selected days indexes: ``` Monday - 1 Tuesday - 2 ... Saturday - 6 Sundays - 7 ``` You can also change state of widget on UI. See below sketches. **Sketch:** [Simple Time Input for start time](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/TimeInput/SimpleTimeInput/SimpleTimeInput.ino) **Sketch:** [Advanced Time Input](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/TimeInput/AdvancedTimeInput/AdvancedTimeInput.ino) **Sketch:** [Update Time Input State on UI](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/TimeInput/UpdateTimeInputState/UpdateTimeInputState.ino) ### Map Map widget allows you set points/pins on map from hardware side. This is very useful widget in case you have multiple devices and you want track their values on map. You can send a point to map with regular virtual wrtei command: ```cpp Blynk.virtualWrite(V1, pointIndex, lat, lon, "value"); ``` We also created wrapper for you to make suage of map simpler: You can change button labels from hardware with: ```cpp WidgetMap myMap(V1); ... int index = 1; float lat = 51.5074; float lon = 0.1278; myMap.location(index, lat, lon, "value"); ``` Using save ```index``` allows you to override existing point value. **Sketch:** [Basic Sketch](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Map/Map.ino) ### Table Table widget comes handy when you need to structure similar data within 1 graphical element. It works as a usual table. You can add a row to the table with: ``` Blynk.virtualWrite(V1, "add", id, "Name", "Value"); ``` You can update a row in the table with: ``` Blynk.virtualWrite(V1, "update", id, "UpdatedName", "UpdatedValue"); ``` To highlight any item in a table by using it's id in a table: ``` Blynk.virtualWrite(V1, "pick", 0); ``` To select/deselect (make icon green/grey) item in a table by using it's row id in a table: ``` Blynk.virtualWrite(V1, "select", 0); Blynk.virtualWrite(V1, "deselect", 0); ``` To clear the table at any time with: ``` Blynk.virtualWrite(V1, "clr"); ``` You can also handle other actions coming from table. For example, use row as a switch button. ``` BLYNK_WRITE(V1) { String cmd = param[0].asStr(); if (cmd == "select") { //row in table was selected. int rowId = param[1].asInt(); } if (cmd == "deselect") { //row in table was deselected. int rowId = param[1].asInt(); } if (cmd == "order") { //rows in table where reodered int oldRowIndex = param[1].asInt(); int newRowIndex = param[2].asInt(); } } ``` **Note:** Max number of rows in the table is 100. When you reach the limit, table will work as FIFO (First In First Out) list. This limit can be changed by configuring ```table.rows.pool.size``` property for Local Server. **Sketch:** [Simple Table usage](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Table/Table_Simple/Table_Simple.ino) **Sketch:** [Advanced Table usage](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Table/Table_Advanced/Table_Advanced.ino) ### Device Selector Device selector is a powerful widget which allows you to update widgets based on one active device. This widget is particlularly helpful when you have a fleet of devices with similar functionality. Imagine you have 4 devices and every device has a Temperature & Humidity sensor connected to it. To display the data for all 4 devices you would need to add 8 widgets. With Device Selector, you can use only 2 Widgets which will display Temperature and Humidity based on the active device chosen in Device Selector. All you have to do is: 1. Add Device Selector Widget to the project 2. Add 2 widgets (for example Value Display Widget) to show Temperature and Humidity 3. In Widgets Settings you will be able assign them to Device Selector (Source or Target section) 4. Exit settings, Run the project. Now you can change the active device in Device Selector and you will see that Temperature and Humidity values are reflecting the data updates for the device you just picked. **NOTE:** Webhook Widget will not work with Device Selector (yet). ### Device Tiles Device tiles is a powerful widget and very similar to the device selector widget, but with UI. It allows you to display 1 pin per device per tile. This widget is particularly helpful when you have a fleet of devices with similar functionality. So you can group similar devices within one layout (template). ## Sensors ### Accelerometer Accelerometer is kind of [motion sensors](https://developer.android.com/guide/topics/sensors/sensors_motion.html) that allows you to detect motion of your smartphone. Useful for monitoring device movement, such as tilt, shake, rotation, or swing. Conceptually, an acceleration sensor determines the acceleration that is applied to a device by measuring the forces that are applied to the sensor. Measured in ```m/s^2``` applied to ```x```, ```y```, ```z``` axis. In order to accept data from it you need to: ```cpp BLYNK_WRITE(V1) { //acceleration force applied to axis x int x = param[0].asFloat(); //acceleration force applied to axis y int y = param[1].asFloat(); //acceleration force applied to axis y int z = param[2].asFloat(); } ``` Accelerometer doesn't work in background. ### Barometer/pressure Barometer/pressure is kind of [environment sensors](https://developer.android.com/guide/topics/sensors/sensors_environment.html) that allows you to measure the ambient air pressure. Measured in in ```hPa``` or ```mbar```. In oder to accept data from it you need to: ```cpp BLYNK_WRITE(V1) { //pressure in mbar int pressure = param[0].asInt(); } ``` Barometer doesn't work in background. ### Gravity Gravity is kind of [motion sensors](https://developer.android.com/guide/topics/sensors/sensors_motion.html) that allows you to detect motion of your smartphone. Useful for monitoring device movement, such as tilt, shake, rotation, or swing. The gravity sensor provides a three dimensional vector indicating the direction and magnitude of gravity. Measured in ```m/s^2``` of gravity force applied to ```x```, ```y```, ```z``` axis. In oder to accept data from it you need to: ```cpp BLYNK_WRITE(V1) { //force of gravity applied to axis x int x = param[0].asFloat(); //force of gravity applied to axis y int y = param[1].asFloat(); //force of gravity applied to axis y int z = param[2].asFloat(); } ``` Gravity doesn't work in background. ### Humidity Humidity is kind of [environment sensors](https://developer.android.com/guide/topics/sensors/sensors_environment.html) that allows you to measure ambient relative humidity. Measured in ```%``` - actual relative humidity in percent. In oder to accept data from it you need to: ```cpp BLYNK_WRITE(V1) { // humidity in % int humidity = param.asInt(); } ``` Humidity doesn't work in background. ### Light Light is kind of [environment sensors](https://developer.android.com/guide/topics/sensors/sensors_environment.html) that allows you to measure level of light (measures the ambient light level (illumination) in lx). In phones it is used to control screen brightness. In order to accept data from it you need to: ```cpp BLYNK_WRITE(V1) { //light value int lx = param.asInt(); } ``` Light doesn't work in background. ### Proximity Proximity is kind of [position sensors](https://developer.android.com/guide/topics/sensors/sensors_position.html) that allows you to determine how close the face of a smartphone is to an object. Measured in ```cm``` - distance from phone face to object. However most of this sensors returns only FAR / NEAR information. So return value will be ```0/1```. Where 0/LOW is ```FAR``` and 1/HIGH is ```NEAR```. In order to accept data from it you need to: ```cpp BLYNK_WRITE(V1) { // distance to object int proximity = param.asInt(); if (proximity) { //NEAR } else { //FAR } } ``` Proximity doesn't work in background. ### Temperature Temperature is kind of [environment sensors](https://developer.android.com/guide/topics/sensors/sensors_environment.html) that allows you to measure ambient air temperature. Measured in ```°C``` - celcius. In order to accept data from it you need to: ```cpp BLYNK_WRITE(V1) { // temperature in celcius int celcius = param.asInt(); } ``` Temperature doesn't work in background. ### GPS Trigger GPS trigger widget allows easily trigger events when you arrive to or leave from some destination. This widget will work in background and periodically will check your coordinates. In case your location is within/out required radius (selected on widget map) widget will send ```HIGH```/```LOW``` command to hardware. For example, let's assume you have GPS Trigger widget assigned to pin ```V1``` and option ```Trigger When Enter```. In that case when you'll arrive to destination point widget will trigger ```HIGH``` event. ```cpp BLYNK_WRITE(V1) { int state = param.asInt(); if (state) { //You enter destination } else { //You leave destination } } ``` More details on how GPS widget works you can read [here](https://developer.android.com/guide/topics/location/strategies.html). GPS trigger widget works in background. ### GPS Streaming Useful for monitoring smartphone location data such as latitude, longitude, altitude and speed (speed could be often 0 in case smartphone doesn't support it). In order to accept data from this widget you need to: ```cpp BLYNK_WRITE(V1) { float latitude = param[0].asFloat(); float longitude = param[1].asFloat(); float altitude = param[2].asFloat(); float speed = param[3].asFloat(); } ``` or you can use prepared wrapper ```GpsParam```: ```cpp BLYNK_WRITE(V1) { GpsParam gps(param); // Print 6 decimal places for Lat Serial.println(gps.getLat(), 7); Serial.println(gps.getLon(), 7); Serial.println(gps.getAltitude(), 2); Serial.println(gps.getSpeed(), 2); } ``` GPS Streaming works in background. **Sketch:** [GPS Stream](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/GPS_Stream/GPS_Stream.ino) ## Other ### Bridge Bridge can be used for Device-to-Device communication (no app. involved). You can send digital/analog/virtual write commands from one device to another, knowing it's auth token. At the moment Bridge widget is not required on application side (it is mostly used for indication that we have such feature). **You can use multiple bridges to control multiple devices.** Bridge widget takes a virtual pin, and turns it into a channel to control another device. It means you can control any virtual, digital or analog pins of the target device. Be careful not to use pins like ```A0, A1, A2 ...``` when communicating between different device types, as Arduino Core may refer to wrong pins in such cases. Example code for device A which will send values to device B: ```cpp WidgetBridge bridge1(V1); //Initiating Bridge Widget on V1 of Device A ... void setup() { Blynk.begin(...); while (Blynk.connect() == false) { // Wait until Blynk is connected } bridge1.digitalWrite(9, HIGH); // will trigger D9 HIGH on Device B. No code on Device B required bridge1.analogWrite(10, 123); bridge1.virtualWrite(V1, "hello"); // you need to write code on Device B in order to receive this value. See below bridge1.virtualWrite(V2, "value1", "value2", "value3"); } BLYNK_CONNECTED() { bridge1.setAuthToken("OtherAuthToken"); // Token of the hardware B } ``` **IMPORTANT:** when performing ```virtualWrite()``` with Bridge Widget, Device B would need to process the incoming data from Device A. For example, if you are sending value from Device A to Device B using ```bridge.virtualWrite(V5)``` you would need to use this handler on Device B: ```cpp BLYNK_WRITE(V5){ int pinData = param.asInt(); //pinData variable will store value that came via Bridge } ``` Keep in mind that ```bridge.virtualWrite``` doesn't send any value to mobile app. You need to call ```Blynk.virtualWrite``` for that. **Sketch:** [Bridge](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Bridge/Bridge.ino) ### Eventor Eventor widget allows you to create simple behaviour rules or **events**. Let's look at a typical use case: read temperature from DHT sensor and send push notification when the temperature is over a certain limit: ```cpp float t = dht.readTemperature(); if (isnan(t)) { return; } if (t > 40) { Blynk.notify(String("Temperature is too high: ") + t); } ``` With Eventor you don't need to write this code. All you need is to send the value from the sensor to the server: ```cpp float t = dht.readTemperature(); Blynk.virtualWrite(V0, t); ``` Don't forget that ```virtualWrite``` commands should be wrapped in the timer and can't be used in the main loop. Now configure new **Event** in Eventor widget: **NOTE** Don't forget to add notification widget. Eventor comes handy when you need to change conditions on the fly without re-uploading new sketch on the hardware. You can create as many **events** as you need. Eventor also could be triggered from the application side. You just need to assign the widget to the same pin as your Event within Eventor. Eventor doesn't constantly sends events. Let's consider simple event as above ```if (temperature > 40) send notification ```. When temperature goes beyond 40 threshold - notification action is triggered. If temperature continues to stay above the 40 threshold no actions will be triggered. But if ```temperature``` goes below threshold and then passes it again - notification will be sent again (there is no 5 sec limit on Eventor notifications). Eventor also supports Timer events. For example, you can set a pin ```V1``` ON/HIGH at 21:00:00 every Friday. With Eventor Time Event you can assign multiple timers on same pin, send any string/number, select days and timezone. In order to remove created **event** please use swipe. You can also swipe out last element in the Event itself. **NOTE:** The timer widget rely on the server time and not your phone time. Sometimes the phone time may not match the server time. **NOTE:** Events are triggered only once when the condition is met. That's mean [chaining of events](https://community.blynk.cc/t/eventor-behavior-bug-feature/20962) is not possible (however, could be enabled for commercials). **Sketch:** [Eventor](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Eventor/Eventor.ino) **NOTE:**: Events are triggered only once when the condition is met. Exception: Let's consider simple event as above ```if (temperature > 40) send notification ```. When temperature goes beyond 40 threshold - notification action is triggered. If temperature continues to stay above the 40 threshold no actions will be triggered. But if ```temperature``` goes below threshold and then passes it again - notification will be sent again (there is no 5 sec limit on Eventor notifications). ### RTC Real-time clock allows you to get time from server. You can preselect any timezone on UI to get time on hardware in required locale. No pin required for RTC widget. **Sketch:** [RTC](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/RTC/RTC.ino) ### BLE Widget to enable Bluetooth Low Energy support. At the moment BLE widget requires internet connection in order to login and load your profile. However this will be fixed soon. Also some Blynk widgets are not supported within the BLE connection. Blynk currently supports a handful of different BLE modules. Please check sketches below. **Sketches:** [BLE](https://github.com/blynkkk/blynk-library/tree/master/examples/Boards_Bluetooth) ### Bluetooth Widget to enable Bluetooth support. At the moment Bluetooth widget is supported only on Android and requires internet connection to login and to load your profile. This will be fixed soon. Alsom some Blynk widgets do not work within the Bluetooth connection. Blynk currently supports bunch of different modules. Please check sketches below. **Sketches:** [Bluetooth](https://github.com/blynkkk/blynk-library/tree/master/examples/Boards_Bluetooth) ### Music Player Simple UI element with 3 buttons with common music player controls. Every button sends it's own command to hardware: ```play```, ```stop```, ```prev```, ```next```. You can change widget state within the app from hardware side with next commands: ``` Blynk.virtualWrite(Vx, “play”); Blynk.virtualWrite(Vx, “stop”); ``` You can also change widget play/stop state with next code (equivalent to above commands): ```Blynk.setProperty(V1, "isOnPlay", "false");``` **Sketch:** [Music Player](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Player/Player.ino) ### Webhook Webhook is a widget designed to communicate with 3rd party services. With Webhook widget you can send HTTP(S) requests to any 3rd party service or device that has HTTP(S) API (e.g. Philips Hue bulb). You can trigger 3-d party service with a single click of a button. Any `write` operation from hardware side will trigger Webhook Widget. You can also trigger webhook from Blynk app when a app widget is assigned to the same pin as Webhook. For example, when you need to send data from your hardware not only to Blynk, but also to Thingspeak, you would need to write a long http request code like this (this is just an example, not a full sketch): ``` WiFiClient client; if (client.connect("api.thingspeak.com", 80)) { client.print("POST /update HTTP/1.1\n"); client.print("Host: api.thingspeak.com\n"); client.print("Connection: close\n"); client.print("X-THINGSPEAKAPIKEY: " + apiKeyThingspeak1 + "\n"); client.print("Content-Type: application/x-www-form-urlencoded\n"); client.print("Content-Length: "); client.print(postStr.length()); client.print("\n\n"); client.print(postStr); } ``` Instead, with Webhook widget you would only need to fill in these fields: And add this code on hardware side: ``` Blynk.virtualWrite(V0, value); ``` where `V0` is pin assigned to the Webhook widget. Use standard Blynk placeholders for Pin Value in the body or URL, for example: ``` https://api.thingspeak.com/update?api_key=xxxxxx&field1=/pin/ ``` or for the body ``` ["/pin/"] ``` When you need to send an array of values, you can refer to a specific index of the array value. Blynk Pin can hold an array of max 10 values: ```/pin[0]/```,```/pin[1]/```, ```/pin[2]/``` You can also make GET requests from Blynk Server and get responses directly to your hardware. For example, to get current weather from a 3rd party Weather service that uses an URL similar to this: ```http://api.sunrise-sunset.org/json?lat=33.3823&lng=35.1856&date=2016-10-01```, you would need to put this URL in Webhook widget and assign it to ```V0``` pin. To parse the response on the hardware side: ``` BLYNK_WRITE(V0){ String webhookdata = param.asStr(); Serial.println(webhookdata); } ``` Now, every time there is a "write" command to ```V0``` pin (e.g. with ```Blynk.virtualWrite(V0, 1)``` from hardware or from app widget assigned to ```V0```), ```BLYNK_WRITE(V0)``` construction will be triggered and processed. **NOTE:** Usually, 3rd party servers return long responses. You have to increase the maximum allowed message size your hardware can process. Modify this line in your firmware code: ```#define BLYNK_MAX_READBYTES 1024```. Where ```1024``` - is maximum allowed message size. **NOTE:** Blynk Cloud has limitation for Webhook Widget - you can only send 1 request per second. This can be changed on a Local Server by changing ```webhooks.frequency.user.quota.limit```. Be careful with Webhooks, as many 3rd party services can't handle 1 req/sec, and you can be banned on some of them. For example, Thingspeak allows only 1 request per 15 seconds. **NOTE:** To avoid spamming, Blynk Webhook feature has another limitation - if your Webhook requests fail 10 times in a row, Webhook Widget will be stopped. To resume it, you would need to open Widget Settings and re-save it. Failed request is a request that doesn't return `200` or `302`. **NOTE:** Webhook widget may affect ```Blynk.syncAll()``` function when a returned response is large. ### Reports Widget Function of Reports is to configure and customize data reports in CSV format. You can choose between one-time or continuous scheduled reports. Also, within the Reports you can clear all the data collected by your devices. You need to configure initial inputs in Edit mode, and then, in Play mode you will be able to customize reports. #### Edit mode. Data inputs configuration In edit mode (when your project is stopped) you define the Datastreams you would like to later be included in reports. Reports widget is designed to work with the Device Tiles widget. If you don't use Device Tiles you can still select a single device or a group of devices as a source of data for reports. You have to choose either Device Tiles or single / group of the devices for the report. You can't combine these 2 options. #### Play mode. After you added source devices and their Datastreams click Play button and click on the Reports button. ### Customizing Reports. Every Report option supposes it's own settings: ```Report name``` - give your report a meaningful name. ```Data source``` - select the Datastreams you would like to be included in reports. ```Report Frequency``` - Defines how often reports will be sent. They can be one-time and scheduled. ```one-time``` - will instantly generate report and send it to the email addresses specified. Click on the right icon to send it. Scheduled reports can be sent ```daily```/```weekly```/```monthly```. ```At Time``` will set up a time of the day the report will be sent. ```Start```/```End``` specifies start and end date the reports will continue to be sent. For Weekly Report you can select a day of the week when report should be sent. For Monthly report you can choose whether to send report on the first or last day of the month. ```Recipients``` - specify up to 5 email addresses. ```Data resolution``` defines granularity of your reports. Supported granularities are: ```minute```, ```hourly``` and ```daily```. For example, when you generate daily report with 1 minute granularity you'll get ```24 * 60 * 60``` points in your daily report for every selected Datastream. ```Group data in reports by``` - specify the output format of the CSV file(s). ```Datastream``` you will get 1 CSV file for each Datastream. ```Device``` you will get 1 CSV file per each device. Each file will contain all of the included Datastreams. ```Report``` you will get 1 CSV file for all your devices and all your Datastreams. ```Timezone correction``` - specify the time zone adjustment if you need to get report date and time adjusted to a specific time zone ```Date and time format``` - defines the format of the timestamp field of your data. You can select ```2018-06-21 20:16:48```, ```2018-06-21T20:16:48+03:00``` or other supported formats. There is one specific ```Timestamp``` format - which reflects the difference between the current time and midnight, January 1, 1970 UTC measured in milliseconds. After the report is set up - click on "OK" button at the right upper corner. Your report is ready. Once you configured the report you will see when is the ```Next``` report scheduled and also a schedule for this report. After the report was sent at least once, you can see when the ```Last``` report was sent. ```Last``` label also contains the status regarding the report: - ```OK```: the report was generated and sent to the Recipients successfully; - ```No Data```: the report doesn't contain any data for the configured period; - ```Error```: something went wrong. Please contact the Blynk Team support; Reports will be generated even if your project is not in active (Play) mode. However, inactive projects don't generate any data. **NOTE:** all reports are encoded in UTF-16. Please, make sure you selected UTF-16 as required "Character set" for your csv reader. ================================================ FILE: amendments.md ================================================ # Blynk Amendments ## Tell every maker about Blynk No pressure. Just do it. Now. ## Make your idea work without Blynk Blynk can be easily integrated in almost any project. But before that - make it work **without** it. After you are sure that you can get all the sensor data or can control things from the code – integrate Blynk and make it even more awesome. ## Use search We are always happy to chat and help, but remember - every time you ask the question that was answered many many times before that, Blynk Team is not building a new widget or new cool feature. So: * google before asking * use search on our forum, it works really well * check Instructables **Always wrap your code** Though shalt not post code without `wrapping it` ================================================ FILE: api/README.md ================================================ # HTTPs API ================================================ FILE: api/api_getlastweekdata.md ================================================ # Download Datastream Data To get the device data for last week, use this API call: **API call:** ```text api/external/getRawData?token=123&days=7, (from: now - 7 days, to: now) ``` **Response example:** ```text response example ``` ================================================ FILE: api/events-api.md ================================================ # Events API To trigger [Events](../product/events/) creation from hardware \(or other sources\) and render them on Timeline in Device profile pages on the web and in the mobile apps, use this API call: ```text /external/api/logEvent?token={token}&code={event_name} ``` `event_name` should be taken from [Product Template Settings](../product/product-template-settings.md) > [Events](../product/events/) \*\*\*\* **Options:** To render custom description of the event on the Timeline, use `event_description` parameter `/external/api/logEvent?token={token}&code={event_name}&description={event_desciption}` >>IMAGE OF TIMELINE WITH EVENT DESCRIPTION \(MOBILE AND WEB\) ================================================ FILE: api/external_api.md ================================================ # Datastreams API ## Hardware Get datastream value \(via HTTP GET\): * `/external/api/get?token={token}&pin={pin}` * `/external/api/get?token={token}&dataStreamId={id}` Update datastream value \(via HTTP GET\): * `/external/api/update?token={token}&pin={pin}&value={value}` * `/external/api/update?token={token}&dataStreamId={id}&value={value}` * `/external/api/update/property?token={token}&pin={pin}&{property}={value}` ## Log event * `/external/api/logEvent?token={token}&code={event_name}` * `/external/api/logEvent?token={token}&code={event_name}&description={event_desciption}` ================================================ FILE: appexport.md ================================================ # App Export ## Firmware for ESP8266, NodeMCU, BlynkBoard, etc. ### Prepare development environment 1. Install [Arduino IDE](https://www.arduino.cc/en/Main/Software) 2. Install [Blynk Library](https://github.com/blynkkk/blynk-library/releases/latest) and restart Arduino IDE 3. Install [ESP8266 core for Arduino](https://github.com/esp8266/Arduino#installing-with-boards-manager) 4. For Windows / OS X, you may need to install USB-Serial drivers according to your converter: * СP2102: [https://www.silabs.com/products/mcu/Pages/USBtoUARTBridgeVCPDrivers.aspx](https://www.silabs.com/products/mcu/Pages/USBtoUARTBridgeVCPDrivers.aspx) * FTDI \(FT232, etc\): [http://www.ftdichip.com/Drivers/VCP.htm](http://www.ftdichip.com/Drivers/VCP.htm) * _TODO: Link to drivers for CH340 and PL2303._ 5. If your board has a NeoPixel RGB LED, install [Adafruit NeoPixel](https://github.com/adafruit/Adafruit_NeoPixel) library from Library Manager ### Build your Firmware 1. Open our example in Arduino IDE: `File -> Examples -> Blynk -> Provisioning -> Blynk_ESP8266` 2. Open `Settings.h` tab. 3. Configure your firmware: * `BOARD_NAME` - ... * `BOARD_VENDOR` - ... * `PRODUCT_WIFI_SSID` - ... ### Upload firmare 1. Select your board type: `Tools -> Board -> [Your Board]` 2. Select your port: `Tools -> Port -> [...]` 3. Verify and Upload! Note that for Blynk Board, you can select board type `NodeMCU 1.0`. ================================================ FILE: blynkfirmware.md ================================================ # Blynk Firmware ## Configuration ### Blynk.begin\(\) The easiest way to configure Blynk is to use `Blynk.begin()`: ```cpp Blynk.begin(auth, ...); ``` It has multiple parameters for different hardware models and it also depends on the type of connection. Follow the example sketches for your specific hardware model. What happens inside of `Blynk.begin()` function: 1. Connection to the network \(WiFi, Ethernet, ...\) 2. Call of `Blynk.config(...)` to set Auth Token, Server Address, etc. 3. Attempts to connect to the server once \(can block for more than 30s\) If your shield/connection type is not supported yet - you can implement it by yourself. [Here are some examples](https://github.com/blynkkk/blynk-library/tree/master/examples/More/ArduinoClient). ### Blynk.config\(\) `config()` allows you to manage network connection. You can set up your connection type \(WiFi, Ethernet, ...\) by yourself, and then call: ```cpp Blynk.config(auth, server, port); ``` or just ```cpp Blynk.config(auth); ``` **NOTE: After `Blynk.config(...)` is called, your hardware is not yet connected to the server.** It will try to connect while until it hits first instance of `Blynk.run()` or `Blynk.connect()`routine. To skip connecting to the server or to disconnect manually, call `Blynk.disconnect()` after configuration. Use `connectWiFi` to conveniently set up WiFi connection: ```cpp Blynk.connectWiFi(ssid, pass); ``` To connect to open WiFi networks, set pass to an empty string \(`""`\). ## Connection management There are several functions to help with connection management: ### Blynk.connect\(\) This functions will continue trying to connect to Blynk server. Returns `true` when connected, `false` if timeout have been reached. Default timeout is 30 seconds. ```cpp bool result = Blynk.connect(); bool result = Blynk.connect(timeout); ``` ### Blynk.disconnect\(\) Disconnects hardware from Blynk server: ```cpp Blynk.disconnect(); ``` ### Blynk.connected\(\) Returns `true` when hardware is connected to Blynk Server, `false` if there is no active connection to Blynk server. ```cpp bool result = Blynk.connected(); ``` ### Blynk.run\(\) This function should be called frequently to process incoming commands and perform housekeeping of Blynk connection. It is usually called in `void loop() {}`. This command can be initiated it in other places of your code unless you run out of heap memory \(in the cascaded functions with local memory\). For example, it is not recommended to call `Blynk.run()` inside of the `BLYNK_READ` and `BLYNK_WRITE` functions on low-RAM devices. ## Digital & Analog pins control Blynk library can perform basic pin IO \(input-output\) operations out-of-the-box: ```text digitalRead digitalWrite analogRead analogWrite (PWM or Analog signal depending on the platform) ``` No need to write code for simple things like LED, Relay control and analog sensors. Just choose a corresponding Pin in Blynk app and control it directly with no additional code ## Virtual pins control Virtual Pins is a way to exchange any data between your hardware and Blynk app. Think about Virtual Pins as channels for sending any data. Make sure you differentiate Virtual Pins from physical GPIO pins on your hardware. Virtual Pins have no physical representation. Virtual Pins are commonly used to interface with other libraries \(Servo, LCD and others\) and implement custom logic. The device can send data to the App using `Blynk.virtualWrite(pin, value)` and receive data from the App using `BLYNK_WRITE(vPIN)`. Read below #### Virtual Pin data types All Virtual Pin values are always sent as Strings and there are no practical limits on the data that can be sent. However, there are certian limitations on the hardware side when dealing with numbers. For example, the integer on Arduino is 16-bit, allowing range -32768 to 32767. To interpret incoming data as Integers, Floats, Doubles and Strings use: ```cpp param.asInt(); param.asFloat(); param.asDouble(); param.asStr(); ``` You can also get the RAW data from the param buffer: ```cpp param.getBuffer() param.getLength() ``` ### Blynk.virtualWrite\(vPin, value\) **NOTE: Use BlynkTimer when you use this command to send data. Otherwise your hardware will be disconnected from the server** Send data in various formats to Virtual Pins. ```cpp // Send string Blynk.virtualWrite(pin, "abc"); // Send integer Blynk.virtualWrite(pin, 123); // Send float Blynk.virtualWrite(pin, 12.34); // Send multiple values as an array Blynk.virtualWrite(pin, "hello", 123, 12.34); // Send RAW data Blynk.virtualWriteBinary(pin, buffer, length); ``` Calling `virtualWrite` attempts to send the value to the network immediately. **Note:** For virtual pins with numbers > 127, the `V128` syntax is not available. Please use plain virtual pin number, for example: ```cpp Blynk.virtualWrite(128, "abc"); ``` ## BlynkTimer It's important to send data in intervals and keep the void loop\(\) as clean as possible. `BlynkTimer` allows you to send data periodically with given intervals not interfering with Blynk library routines `Blynk Timer` inherits [SimpleTimer Library](http://playground.arduino.cc/Code/SimpleTimer), a well known and widely used library to time multiple events on hardware. `BlynkTimer` is included in Blynk library by default and there is no need to install SimpleTimer separately or include `SimpleTimer.h` * A single `BlynkTimer` object allows to schedule up to 16 timers * Improved compatibility with boards like `Arduino 101`, `Intel Galileo`, etc. * When a timer struggles to run multiple times \(due to a blocked `loop`\), it just skips all the missed intervals, and calls your function only once. This differs from `SimpleTimer`, which could call your function multiple times in this scenario. For more information on timer usage, please see: [http://playground.arduino.cc/Code/SimpleTimer](http://playground.arduino.cc/Code/SimpleTimer) And here is a BlynkTimer [example sketch](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/PushData/PushData.ino#L30). Please also remember that a single `BlynkTimer` can schedule many timers, so most probably you need only one instance of BlynkTimer in your sketch. ### BLYNK\_WRITE\(vPIN\) `BLYNK_WRITE` is a function called every time device gets an update of Virtual Pin value from the server \(or app\): To read the received data use: ```cpp BLYNK_WRITE(V0) { int value = param.asInt(); // Get value as integer // The param can contain multiple values, in such case: int x = param[0].asInt(); int y = param[1].asInt(); } ``` **`BLYNK_WRITE` can't be used inside of any loop or function. It's a standalone function.** **Note:** For virtual pins with numbers > 127, please use `BLYNK_WRITE_DEFAULT()` API ### BLYNK\_READ\(vPIN\) `BLYNK_READ` is function called when device is requested to send it's current value of Virtual Pin to the server. Normally, this function should contain `Blynk.virtualWrite` call\(s\). ```cpp BLYNK_READ(V0) { Blynk.virtualWrite(V0, newValue); } ``` **Note:** For virtual pins with numbers > 127, please use `BLYNK_READ_DEFAULT()` API ### BLYNK\_WRITE\_DEFAULT\(\) Redefines the handler for all pins that are not covered by custom `BLYNK_WRITE` functions. ```cpp BLYNK_WRITE_DEFAULT() { int pin = request.pin; // Which exactly pin is handled? int value = param.asInt(); // Use param as usual. } ``` ### BLYNK\_READ\_DEFAULT\(\) Redefines the handler for all pins that are not covered by custom `BLYNK_READ` functions. ```cpp BLYNK_READ_DEFAULT() { int pin = request.pin; // Which exactly pin is handled? Blynk.virtualWrite(pin, newValue); } ``` ### BLYNK\_CONNECTED\(\) Use this function when you need to run certain routine when hardware connects to Blynk Cloud or private server. It's common to call sync functions inside of this function. ```cpp BLYNK_CONNECTED() { // Your code here } ``` ### BLYNK\_APP\_CONNECTED\(\) This function is called every time Blynk app client connects to Blynk server. ```cpp BLYNK_APP_CONNECTED() { // Your code goes here } ``` **Note: Ennable this feature in Project Settings first:** ![](.gitbook/assets/app_connected_setting.png) [Example](https://github.com/blynkkk/blynk-library/blob/master/examples/More/AppConnectedEvents/AppConnectedEvents.ino) ### BLYNK\_APP\_DISCONNECTED\(\) This function is called every time the Blynk app disconnects from Blynk Cloud or private server. ```cpp BLYNK_APP_DISCONNECTED() { // Your code here } ``` **Note: Enable this feature in Project Settings first:** ![](.gitbook/assets/app_connected_setting.png) [Example](https://github.com/blynkkk/blynk-library/blob/master/examples/More/AppConnectedEvents/AppConnectedEvents.ino) ### Blynk.syncAll\(\) Requests all stored on the server latest values for all widgets. All analog/digital/virtual pin values and states will be set to the latest stored value. Every virtual pin will generate BLYNK\_WRITE\(\) event. ```cpp BLYNK_CONNECTED() { Blynk.syncAll(); } ``` ### Blynk.syncVirtual\(vPin\) This command updates individual Virtual Pin to the latest stored value on the server. When it's used, a corresponding `BLYNK_WRITE` handler is called. ```cpp Blynk.syncVirtual(V0); ``` To update multiple pins, use: ```text Blynk.syncVirtual(V0, V1, V6, V9, V16); ``` ### Blynk.setProperty\(vPin, "property", value\) This command allows [changing widget properties](blynkfirmware.md#blynk-main-operations-change-widget-properties) ## Debugging ### \#define BLYNK\_PRINT ### \#define BLYNK\_DEBUG To enable debug prints on the default Serial port add on the top of your sketch **IMPORTANT: This should be the first line in your code**: ```cpp #define BLYNK_PRINT Serial // Defines the object that is used for printing #define BLYNK_DEBUG // Optional, this enables more detailed prints ``` Then enable Serial Output in setup\(\): ```cpp Serial.begin(9600); ``` Open Serial Monitor and you'll see the debug prints. You can also use spare Hardware serial ports or SoftwareSerial for debug output \(you will need an adapter to connect to it with your PC\). **WARNING:** Enabling `BLYNK_DEBUG` will slowdown your hardware processing speed up to 10 times! ### BLYNK\_LOG\(\) When `BLYNK_PRINT` is defined, you can use `BLYNK_LOG` to print your logs. The usage is similar to `printf`: ```cpp BLYNK_LOG("This is my value: %d", 10); ``` On some platforms \(like Arduino 101\) the `BLYNK_LOG` may be unavailable, or may just use too much resources. In this case you can use a set of simpler log functions: ```cpp BLYNK_LOG1("Hello World"); // Print a string BLYNK_LOG1(10); // Print a number BLYNK_LOG2("This is my value: ", 10); // Print 2 values BLYNK_LOG4("Temperature: ", 24, " Humidity: ", 55); // Print 4 values ... ``` ## Minimizing footprint To minimize the program Flash/RAM, you can disable some of the built-in functionality: 1. Comment-out `#define BLYNK_PRINT` to remove prints 2. Put on the top of your sketch: ```text #define BLYNK_NO_BUILTIN // Disable built-in analog & digital pin operations #define BLYNK_NO_FLOAT // Disable float operations ``` ## Porting, hacking If you want to dive into crafting/hacking/porting Blynk library implementation, please also check [this documentation](https://github.com/blynkkk/blynk-library/tree/master/extras/docs). ================================================ FILE: blynkmainoperations.md ================================================ # Blynk main operations ## Virtual Pins Blynk can control Digital and Analog I/O Pins on you hardware directly. You don't even need to write code for it. It's great for blinking LEDs, but often it's just not enough... We designed Virtual Pins to send **any** data from your microcontroller to the Blynk App and back. Anything you connect to your hardware will be able to talk to Blynk. With Virtual Pins you can send something from the App, process it on microcontroller and then send it back to the smartphone. You can trigger functions, read I2C devices, convert values, control servo and DC motors etc. Virtual Pins can be used to interface with external libraries \(Servo, LCD and others\) and implement custom functionality. Hardware may send data to the Widgets over the Virtual Pin like this: ```cpp Blynk.virtualWrite(pin, "abc"); Blynk.virtualWrite(pin, 123); Blynk.virtualWrite(pin, 12.34); Blynk.virtualWrite(pin, "hello", 123, 12.34); ``` For more information about virtual pins, [read this](./#blynk-firmware-virtual-pins-control) ## Send data from app to hardware You can send any data from Widgets in the app to your hardware. All [Controller Widgets](./#widgets-controllers) can send data to Virtual Pins on your hardware. For example, code below shows how to get values from the Button Widget in the App ```cpp BLYNK_WRITE(V1) //Button Widget is writing to pin V1 { int pinData = param.asInt(); } ``` When you press a Button, Blynk App sends `1` On the second click - it sends `0` This is how Button Widget is set up: ![](.gitbook/assets/button_virtual_1.png) Full example sketch: [Get Data](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/GetData/GetData.ino#L24) ### Sending array from Widget Some Widgets \(e.g Joystick, zeRGBa\) have more than one output. ![](.gitbook/assets/joystick_merge_mode.png) This output can be written to Virtual Pin as an array of values. On the hardware side - you can get any element of the array \[0,1,2...\] by using: ```cpp BLYNK_WRITE(V1) // Widget WRITEs to Virtual Pin V1 { int x = param[0].asInt(); // getting first value int y = param[1].asInt(); // getting second value int z = param[N].asInt(); // getting N value } ``` **Sketch:** [JoystickTwoAxis](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/JoystickTwoAxis/JoystickTwoAxis.ino#L24) ## Get data from hardware There are two ways of pushing data from your hardware to the Widgets in the app over Virtual Pins. ### Perform requests by Widget * Using Blynk built-in reading frequency while App is active by setting 'Reading Frequency' parameter to some interval: ![](.gitbook/assets/frequency_reading_pull.png) ```cpp BLYNK_READ(V5) // Widget in the app READs Virtal Pin V5 with the certain frequency { // This command writes Arduino's uptime in seconds to Virtual Pin V5 Blynk.virtualWrite(5, millis() / 1000); } ``` **Sketch:** [PushDataOnRequest](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/PushDataOnRequest/PushDataOnRequest.ino#L26) ### Pushing data from hardware If you need to PUSH sensor or other data from your hardware to Widget, you can write any logic you want. Just set the frequency to PUSH mode. Any command that hardware sends to Blynk Cloud is automatically stored on server and you get this info either with [History Graph](./#widgets-displays-superchart) widget or with [HTTP API](http://docs.blynkapi.apiary.io/#reference/0/pin-history-data/get-all-history-data-for-specific-pin). ![](.gitbook/assets/frequency_reading_push.png) We recommend sending data in intervals and avoiding [Flood Error](https://docs.blynk.cc/#troubleshooting-flood-error). You can use timers like [BlynkTimer](./#blynk-firmware-blynktimer). Please read instructions inside this [example sketch](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/PushData/PushData.ino) for more details. Here is how it can work: ```cpp #include #include #include char auth[] = "YourAuthToken"; // Put your token here BlynkTimer timer; // Create a Timer object called "timer"! void setup() { Serial.begin(9600); Blynk.begin(auth); timer.setInterval(1000L, sendUptime); // Here you set interval (1sec) and which function to call } void sendUptime() { // This function sends Arduino up time every 1 second to Virtual Pin (V5) // In the app, Widget's reading frequency should be set to PUSH // You can send anything with any interval using this construction // Don't send more that 10 values per second Blynk.virtualWrite(V5, millis() / 1000); } void loop() { Blynk.run(); // all the Blynk magic happens here timer.run(); // BlynkTimer is working... } ``` **Sketch:** [PushData](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/PushData/PushData.ino#L30) ## State syncing ### For hardware If your hardware looses Internet connection or resets, you can restore all the values from Widgets in the Blynk app. ```cpp BLYNK_CONNECTED() { Blynk.syncAll(); } //here handlers for sync command BLYNK_WRITE(V0) { .... } ``` The `Blynk.syncAll()` command restores all the Widget's values based on the last saved values on the server. All analog and digital pin states will be restored. Every Virtual Pin will perform `BLYNK_WRITE` event. **WARNING**: if pin is empty and wasn't initialized - hardware will not get any response for those pin during sync. [Sync Hardware with App state](https://github.com/blynkkk/blynk-library/blob/master/examples/More/Sync/HardwareSyncStateFromApp/HardwareSyncStateFromApp.ino) You can also update a single Virtual Pin value by calling `Blynk.syncVirtual(V0)` or you can update several pins with `Blynk.syncVirtual(V0, V1, V2, ...)`. You can also use server to store any value without widget. Just call `Blynk.virtualWrite(V0, value)`. [Storing single value on server](https://github.com/blynkkk/blynk-library/blob/master/examples/More/ServerAsDataStorage/ServerAsDataStorage_SingleValue/ServerAsDataStorage_SingleValue.ino) [Storing multiple values on server](https://github.com/blynkkk/blynk-library/blob/master/examples/More/ServerAsDataStorage/ServerAsDataStorage_MultiValue/ServerAsDataStorage_MultiValue.ino) ### For app If you need to keep your hardware in sync with Widgets' state even if app is offline use `Blynk.virtualWrite`. Imagine you have a LED Widget connected to the Virtual Pin V1 in the app, and a physical button attached to your hardware. When you press a physical button, you would expect to see updated state of the LED Widget in the app. To achieve that you need to send `Blynk.virtualWrite(V1, 255)` when a physical button gets pressed. [Represent physical button state via LED widget with interrupts](https://github.com/blynkkk/blynk-library/blob/master/examples/More/Sync/ButtonInterrupt/ButtonInterrupt.ino) [Represent physical button state via LED widget with polling](https://github.com/blynkkk/blynk-library/blob/master/examples/More/Sync/ButtonPoll/ButtonPoll.ino) [Represent physical button state via Button widget with polling](https://github.com/blynkkk/blynk-library/blob/master/examples/More/Sync/SyncPhysicalButton/SyncPhysicalButton.ino) ## Control of multiple devices Blynk app has support of multiple devices. That means you can assign any widget to specific device with own auth token. For example - you may have button on V1 that controls wi-fi bulb A and another button on V1 that controls wi-fi bulb B. In order to do this you need more than 1 device within your project. To achieve this please go to project settings and click on "Devices" section : ![](.gitbook/assets/new_project_settings.png) You'll see list of devices : ![](.gitbook/assets/list_of_devices.png) So you can add new device : ![](.gitbook/assets/new_device%20%281%29.png) After above steps, every widget will have one more field "Target" : ![](.gitbook/assets/widget_settings_devices.png) Now you need to assign widget to device and after that widget will control only this specific device. That's it! Now you need to upload sketches with correct Auth Tokens to your hardware. ### Tags Tags feature allows you to group multiple devices. Tags are very useful in case you want to control few devices with 1 widget. For example, imagine a case when you have 3 smart bulbs and you want to turn on all those bulbs with one single click. You need to assign 3 devices to 1 tag and assign tag to button. That's it. Tag widgets also support state syncing. So you can get state of widget from your hardware. However you can't update state of such widgets from hardware. ## Devices online status Blynk app has support for online statuses for multiple devices. ![](.gitbook/assets/online_status.png) In ideal world when device closes tcp connection with some `connection.close()` - connected server will get notification regarding closed connection. So you can get instant status update on UI. However in real world this mostly exceptional situation. In majority of cases there is no easy and instant way to find out that connection is not active anymore. That's why Blynk uses `HEARTBEAT` mechanism. With this approach hardware periodically sends `ping` command with predefined interval \(10 seconds by default, `BLYNK_HEARTBEAT` [property](https://github.com/blynkkk/blynk-library/blob/master/src/Blynk/BlynkConfig.h)\). In case hardware don't send anything within 10 seconds server waits additional 5 seconds and after that connection assumed to be broken and closed by server. So on UI you'll see connection status update only after 15 seconds when it is actually happened. You can also change `HEARTBEAT` interval from hardware side via `Blynk.config`. In that case `newHeartbeatInterval * 2.3` formula will be applied. So in case you you decided to set `HEARTBEAT` interval to 5 seconds. You'll get notification regarding connection with 11 sec delay in worst case. ## Project Settings Every project has it's own settings: * **Theme** - switch between the Light and Black Blynk Theme \(Business accounts have wider choice\); * **Keep screen always on** - allows you to use the Blynk app without going to the sleep mode \(usually all mobile devices do that\); * **Send app connected command** - with this option enabled the server will send "App Connected" and "App Disconnected" commands to your hardware when your Blynk app goes online/offline. [Usage example](https://github.com/blynkkk/blynk-library/blob/master/examples/More/AppConnectedEvents/AppConnectedEvents.ino); * **Do not show offline notifications** - right now, for debugging purposes, every time your hardware goes offline - the Blynk Server will notify you with popup in the app about that. However, when debugging is not needed or the Blynk app is used only via HTTP/S this notifications are meaningless. So this switch allows you to turn off this popups. Also this switch turns off the Push notification "Notify when offline" option. ## Change Widget properties Changing some of the widget properties from hardware side is also supported. For example, you can change the color of LED widget based on a condition: ```text //change LED color Blynk.setProperty(V0, "color", "#D3435C"); //change LED label Blynk.setProperty(V0, "label", "My New Widget Label"); //change MENU labels Blynk.setProperty(V0, "labels", "Menu Item 1", "Menu Item 2", "Menu Item 3"); ``` [Set Property for single value field](https://github.com/blynkkk/blynk-library/blob/master/examples/More/SetProperty/SetProperty_SingleValue/SetProperty_SingleValue.ino) [Set Property for multi value field](https://github.com/blynkkk/blynk-library/blob/master/examples/More/SetProperty/SetProperty_MultiValue/SetProperty_MultiValue.ino) **NOTE :** Changing these parameters work **only** for widgets attached to Virtual pins \(analog/digital pins won't work\). Four widget properties are supported - `color`, `label`, `min`, `max` for all widgets : `label` is string for label of all widgets. `color` is string in [HEX](http://www.w3schools.com/html/html_colors.asp) format \(in the form: \#RRGGBB, where RR \(red\), GG \(green\) and BB \(blue\) are hexadecimal values between 00 and FF\). For example : ```text #define BLYNK_GREEN "#23C48E" #define BLYNK_BLUE "#04C0F8" #define BLYNK_YELLOW "#ED9D00" #define BLYNK_RED "#D3435C" #define BLYNK_DARK_BLUE "#5F7CD8" ``` `min`, `max` - minimum and maximum values for the widget \(for example range for the Slider\). This numbers may be float. On firmware side, widget objects also support `setLabel()` and `setColor()` functions. Widget specific properties: **Button** `onLabel` / `offLabel` is string for ON/OFF label of button; **Styled Button** `onLabel` / `offLabel` is string for ON/OFF label of button; `onColor` / `offColor` is string in HEX format for ON/OFF colors of the button; `onBackColor` / `offBackColor` is string in HEX format for ON/OFF colors of the button background. **Music Player** `isOnPlay` is boolean accepts true/false. ```text Blynk.setProperty(V0, "isOnPlay", "true"); ``` **Menu** `labels` is list of strings for Menu widget selections; ```text Blynk.setProperty(V0, "labels", "label 1", "label 2", "label 3"); ``` **Video Streaming** ```cpp Blynk.setProperty(V1, "url", "http://my_new_video_url"); ``` **Step** ```cpp Blynk.setProperty(V1, "step", 10); ``` **Image** ```cpp Blynk.setProperty(V1, "opacity", 50); // 0-100% ``` ```cpp Blynk.setProperty(V1, "scale", 30); // 0-100% ``` ```cpp Blynk.setProperty(V1, "rotation", 10); //0-360 degrees ``` also, you can fully replace the list of images from the hardware: ```cpp Blynk.setProperty(V1, "urls", "https://image1.jpg", "https://image2.jpg"); ``` or you can change individual image by it index: ```cpp Blynk.setProperty(V1, "url", 1, "https://image1.jpg"); ``` You can also change widget properties via [HTTP API](http://docs.blynkapi.apiary.io/#). ## Limitations and Recommendations * Don't put `Blynk.virtualWrite` and any other `Blynk.*` command inside `void loop()`- it will cause lot's of outgoing messages to our server and your connection will be terminated; * We recommend calling functions with intervals. For example, use [BlynkTimer](./#blynk-firmware-blynktimer) * Avoid using long delays with `delay()` – it may cause connection breaks; * If you send more than 100 values per second - you may cause [Flood Error](./#troubleshooting-flood-error) and your hardware will be automatically disconnected from the server; * Be careful sending a lot of `Blynk.virtualWrite` commands as most hardware is not very powerful \(like ESP8266\) so it may not handle many requests. ================================================ FILE: blynkprotocol.md ================================================ # Blynk protocol Blynk transfers binary messages with the following structure: | Command | Message Id | Length/Status | Body | | :---: | :---: | :---: | :---: | | 1 byte | 2 bytes | 2 bytes | Variable | Message Id and Length are [big endian](http://en.wikipedia.org/wiki/Endianness#Big-endian). Body has a command-specific format. Command and Status definitions: [BlynkProtocolDefs.h](https://github.com/blynkkk/blynk-library/blob/master/Blynk/BlynkProtocolDefs.h) Another protocol description can be found [here](https://github.com/blynkkk/blynk-server/blob/master/README_FOR_APP_DEVS.md#protocol-messages). Typical Blynk library knows how to send\(S\)/process\(P\): ```text S BLYNK_CMD_LOGIN + auth token SP BLYNK_CMD_PING SP BLYNK_CMD_RESPONSE SP BLYNK_CMD_BRIDGE SP BLYNK_CMD_HARDWARE S BLYNK_CMD_TWEET S BLYNK_CMD_EMAIL S BLYNK_CMD_PUSH_NOTIFICATION ``` ## HARDWARE/BRIDGE command body The body of these commands are encoded as a sequence of strings, separated by `'\0'` \([Null character](http://en.wikipedia.org/wiki/Null_character)\). Please note that the last value may be not Null-terminated. In the following command examples `\0` chars are replaced with spaces. ### Pin mode PinMode command is received by library after connection, or when a mobile application starts. ```text pm pm ... ``` Mode: * in - INPUT * out - OUTPUT * pu - INPUT\_PULLUP * pd - INPUT\_PULLDOWN ### Digital pin operations Digital write: ```text dw ``` Digital read: ```text dr ``` ### Analog pin operations ```text aw ar ``` ### Virtual pin operations ```text vw ... vr ``` ### Other operations ```text info ``` TODO ## Developer notes * Values in HW commands are plain text. * In response to `dr/ar` command, library should send `dw/aw` command on the same pin and with the same message id. * These situations should cause a connection drop, or reconnection attempt: * Message with `ID=0` is received * Message with unknown type is received ## Adding network interface 4 entities should be created to add a new network interface to Blynk: 1. Select connection interface that will be used for Blynk operation. This should be something like [http://www.arduino.cc/en/Tutorial/WebClient](http://www.arduino.cc/en/Tutorial/WebClient) Based on the API of the connection, create the **Transport**. Some examples may be found in the Adapters folder: * BlynkTransportSerial * BlynkTransportCC3000 * BlynkArduinoClient - _can be reused, if possible_ 2. Create **Blynk representative class**, which contains connection-specific helper functions \(like begin\). Examples: * BlynkEthernet * BlynkSerial * BlynkCC3000 * BlynkWildFire * BlynkYun 3. Create **BlynkSimple\*** header for your connection. This constructs main **Blynk instance**, so the user \(mostly\) doesn't need to get into such details. Examples: * BlynkSimpleEthernet.h * BlynkSimpleCC3000.h * BlynkSimpleWifi.h * BlynkSimpleUIPEthernet.h 4. Create a **simple example** for your platform ;\) ### Example implementations Use these to play with the protocol and understand the basics: * [Pseudo-library in Python](https://github.com/blynkkk/blynk-library/blob/master/tests/pseudo-library.py) * [Node.js + Espruino](https://github.com/vshymanskyy/blynk-library-js) * [Arduino](https://github.com/blynkkk/blynk-library) * [Particle Core](https://github.com/vshymanskyy/blynk-library-spark) ================================================ FILE: blynkserver.md ================================================ # Blynk server No longer supported. ================================================ FILE: css/style.css ================================================ /* Please don't edit this file directly. Instead, edit the stylus (.styl) files and compile it to CSS on your machine. */ /* ---------------------------------------------------------------------------- * Fonts */ @import url("//fonts.googleapis.com/css?family=Montserrat:700|Open+Sans:400"); @import url(https://fonts.googleapis.com/css?family=Oxygen); /*@import url(https://fonts.googleapis.com/css?family=Montserrat:400,700); */ /* ---------------------------------------------------------------------------- * Base */ html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td { margin: 0; padding: 0; border: 0; outline: 0; font-weight: inherit; font-style: inherit; font-family: inherit; font-size: 100%; vertical-align: baseline; } body { line-height: 1; color: #000; background: #fff; } ol, ul { list-style: none; } table { border-collapse: separate; border-spacing: 0; vertical-align: middle; } caption, th, td { text-align: left; font-weight: normal; vertical-align: middle; } a img { border: none; } html, body { height: 100%; } html { overflow-x: hidden; } body, td, textarea, input { font-family: Helvetica Neue, Open Sans, sans-serif; line-height: 1.6; font-size: 13px; color: #505050; } @media (max-width: 480px) { body, td, textarea, input { font-size: 12px; } } a { color: #24C48E; text-decoration: underline; } a:hover { color: #228a8a; } /* ---------------------------------------------------------------------------- * Content styling */ .content p, .content ul, .content ol, .content h1, .content h2, .content h3, .content h4, .content h5, .content h6, .content pre, .content blockquote { padding: 10px 0; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } .content h1, .content h2, .content h3, .content h4, .content h5, .content h6 { font-weight: bold; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; } .content p { font-family: oxygen; } .content pre { font-family: Menlo, monospace; } .content ul > li { list-style-type: disc; } .content ol > li { list-style-type: decimal; } .content ul, .content ol { margin-left: 20px; } .content ul > li { list-style-type: none; position: relative; } .content ul > li:before { content: ''; display: block; position: absolute; left: -10px; top: 7px; width: 5px; height: 5px; -webkit-border-radius: 4px; border-radius: 4px; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; background: #fff; border: solid 1px #9090aa; } .content li > :first-child { padding-top: 0; font-family: oxygen; } .content strong, .content b { font-weight: bold; } .content i, .content em { font-style: italic; color: #9090aa; } .content code { font-family: Menlo, monospace; color: #1D1E22; word-wrap: break-word; border-radius: 2px; background: #D8D8D8; padding: 3px 10px; color: #1D1E22; font-size: 0.9em; } .content pre > code { display: block; width: 500; padding: 20px 20px; background: #1D1E22; color: #B2B2B2; border-radius: 4px; font-size: 0.85em; letter-spacing: 0px; } .content blockquote :first-child { padding-top: 0; } .content blockquote :last-child { padding-bottom: 0; color: 535353; } .content table { margin-top: 10px; font-family: oxygen; margin-bottom: 10px; padding: 0; border-collapse: collapse; clear: both; } .content table tr { border-top: 1px solid #ccc; background-color: #fff; margin: 0; padding: 0; } .content table tr :nth-child(2n) { background-color: #f8f8f8; } .content table tr th { text-align: auto; font-weight: bold; border: 1px solid #ccc; margin: 0; padding: 6px 13px; } .content table tr td { text-align: auto; border: 1px solid #ccc; margin: 0; padding: 6px 13px; } .content table tr th :first-child, .content table tr td :first-child { margin-top: 0; } .content table tr th :last-child, .content table tr td :last-child { margin-bottom: 0; } /* ---------------------------------------------------------------------------- * Content */ .content-root { min-height: 90%; position: relative; } .content { padding-top: 0px; padding-bottom: 40px; padding-left: 150px; padding-right: 40px; zoom: 1; max-width: 640px; } .content:before, .content:after { content: ""; display: table; } .content:after { clear: both; } .content blockquote { color: #9090aa; text-shadow: 0 1px 0 rgba(255,255,255,0.5); } .content h1{ font-family: oxygen; font-size: 1.9em; letter-spacing: 1px; } .content h2 { padding-top: 40px; font-family: oxygen; font-size: 1.4em; letter-spacing: 1px; } .content h3 { font-family: oxygen; font-size: 1.3em; letter-spacing: 1px; } /*-webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; font-family: montserrat; color: #505050; padding-bottom: 0; */ } .content h1 + p, .content h2 + p, .content h3 + p, .content h1 ul, .content h2 ul, .content h3 ul, .content h1 ol, .content h2 ol, .content h3 ol { padding-top: 10px; } .content h1, .content h2, .content h3, /*.content .big-heading,*/ body.big-h3 .content h3 { padding-top: 80px; } .content h4{ font-family: oxygen; font-size: 1.2em; } .content h1:before, .content h2:before, .content .big-heading:before, body.big-h3 .content h3:before { /* display: block; content: ''; background: -webkit-gradient(linear, left top, right top, color-stop(0.8, #dfe2e7), color-stop(1, rgba(223,226,231,0))); background: -webkit-linear-gradient(left, #dfe2e7 80%, rgba(223,226,231,0) 100%); background: -moz-linear-gradient(left, #dfe2e7 80%, rgba(223,226,231,0) 100%); background: -o-linear-gradient(left, #dfe2e7 80%, rgba(223,226,231,0) 100%); background: -ms-linear-gradient(left, #dfe2e7 80%, rgba(223,226,231,0) 100%); background: linear-gradient(left, #dfe2e7 80%, rgba(223,226,231,0) 100%); -webkit-box-shadow: 0 1px 0 rgba(255,255,255,0.4); box-shadow: 0 1px 0 rgba(255,255,255,0.4); height: 1px; position: relative; top: -40px; left: -40px; width: 100%; */ } @media (max-width: 768px) { .content h1, .content h2, .content .big-heading, body.big-h3 .content h3 { padding-top: 40px; } .content h1:before, .content h2:before, .content .big-heading:before, body.big-h3 .content h3:before { background: #dfe2e7; left: -40px; top: -20px; width: 120%; } } .content h1, .content .small-heading, body:not(.big-h3) .content h3 { border-bottom: solid 5px rgba(0,0,0,0.07); color: #1E1F23; padding-top: 80px; padding-bottom: 0px; } .content h2, .content .small-heading, body:not(.big-h3) .content h3 { border-bottom: solid 1px rgba(0,0,0,0.07); color: #1E1F23; padding-top: 80px; margin-top: -40px; } .content h1:first-child { padding-top: 80; } .content h1:first-child, .content h1:first-child a, .content h1:first-child a:visited { color: #505050; } .content h1:first-child:before { display: none; } @media (max-width: 768px) { .content h4, .content h5, .content .small-heading, body:not(.big-h3) .content h3 { padding-top: 20px; } } @media (max-width: 480px) { .content { padding: 20px; padding-top: 40px; } .content h4, .content h5, .content .small-heading, body:not(.big-h3) .content h3 { padding-top: 10px; } } body.no-literate .content pre > code { background: #f3f6fb; border: solid 1px #e7eaee; border-top: solid 1px #dbdde2; border-left: solid 1px #e2e5e9; display: block; padding: 10px; -webkit-border-radius: 2px; border-radius: 2px; overflow: auto; } body.no-literate .content pre > code { -webkit-overflow-scrolling: touch; } body.no-literate .content pre > code::-webkit-scrollbar { width: 15px; height: 15px; } body.no-literate .content pre > code::-webkit-scrollbar-thumb { background: #ddd; -webkit-border-radius: 8px; border-radius: 8px; border: solid 4px #f3f6fb; } body.no-literate .content pre > code:hover::-webkit-scrollbar-thumb { background: #999; -webkit-box-shadow: inset 2px 2px 3px rgba(0,0,0,0.2); box-shadow: inset 2px 2px 3px rgba(0,0,0,0.2); } @media (max-width: 1180px) { .content pre > code { background: #f3f6fb; border: solid 1px #e7eaee; border-top: solid 1px #dbdde2; border-left: solid 1px #e2e5e9; display: block; padding: 10px; -webkit-border-radius: 2px; border-radius: 2px; overflow: auto; } .content pre > code { -webkit-overflow-scrolling: touch; } .content pre > code::-webkit-scrollbar { width: 15px; height: 15px; } .content pre > code::-webkit-scrollbar-thumb { background: #ddd; -webkit-border-radius: 8px; border-radius: 8px; border: solid 4px #f3f6fb; } .content pre > code:hover::-webkit-scrollbar-thumb { background: #999; -webkit-box-shadow: inset 2px 2px 3px rgba(0,0,0,0.2); box-shadow: inset 2px 2px 3px rgba(0,0,0,0.2); } } .button { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; font-family: montserrat, sans-serif; letter-spacing: 0px; font-weight: bold; text-transform: uppercase; display: inline-block; padding: 15px 30px; margin-top: 20px; border-radius: 4px; margin-right: 15px; letter-spacing: 1px; text-decoration: none; } .button, .button:visited { background: #24C48E; color: #fff; text-shadow: none; } .button:hover { background: #07D698; color: #fff; } .button.light, .button.light:visited { background: transparent; color: #9090aa; border-color: #9090aa; text-shadow: none; } .button.light:hover { border-color: #9090aa; background: #9090aa; color: #fff; } .content .button + em { color: #9090aa; } /*@media (min-width: 1180px) { body:not(.no-literate) .content-root { background-color: #f3f6fb; -webkit-box-shadow: inset 780px 0 #fff, inset 781px 0 #dfe2e7, inset 790px 0 5px -10px rgba(0,0,0,0.1); box-shadow: inset 780px 0 #fff, inset 781px 0 #dfe2e7, inset 790px 0 5px -10px rgba(0,0,0,0.1); } } @media (min-width: 1180px) { body:not(.no-literate) .content { padding-left: 0; padding-right: 0; width: 930px; max-width: none; } body:not(.no-literate) .content > p, body:not(.no-literate) .content > ul, body:not(.no-literate) .content > ol, body:not(.no-literate) .content > h1, body:not(.no-literate) .content > h2, body:not(.no-literate) .content > h3, body:not(.no-literate) .content > h4, body:not(.no-literate) .content > h5, body:not(.no-literate) .content > h6, body:not(.no-literate) .content > pre, body:not(.no-literate) .content > blockquote { width: 550px; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; padding-right: 40px; padding-left: 40px; } body:not(.no-literate) .content > h1, body:not(.no-literate) .content > h2, body:not(.no-literate) .content > h3 { clear: both; width: 100%; } body:not(.no-literate) .content > pre, body:not(.no-literate) .content > blockquote { width: 380px; padding-left: 20px; padding-right: 20px; float: right; clear: right; } body:not(.no-literate) .content > pre + p, body:not(.no-literate) .content > blockquote + p, body:not(.no-literate) .content > pre + ul, body:not(.no-literate) .content > blockquote + ul, body:not(.no-literate) .content > pre + ol, body:not(.no-literate) .content > blockquote + ol, body:not(.no-literate) .content > pre + h4, body:not(.no-literate) .content > blockquote + h4, body:not(.no-literate) .content > pre + h5, body:not(.no-literate) .content > blockquote + h5, body:not(.no-literate) .content > pre + h6, body:not(.no-literate) .content > blockquote + h6 { clear: both; } body:not(.no-literate) .content > p, body:not(.no-literate) .content > ul, body:not(.no-literate) .content > ol, body:not(.no-literate) .content > h4, body:not(.no-literate) .content > h5, body:not(.no-literate) .content > h6 { float: left; clear: left; } body:not(.no-literate) .content > h4, body:not(.no-literate) .content > h5, body:not(.no-literate) .content > .small-heading, body:not(.big-h3) body:not(.no-literate) .content > h3 { margin-left: 40px; width: 470px; margin-bottom: 3px; padding-left: 0; padding-right: 0; } body:not(.no-literate) .content > table { margin-left: 40px; margin-right: 40px; max-width: 470px; } body:not(.no-literate):not(.big-h3) .content > h3 { margin-left: 40px; width: 470px; margin-bottom: 3px; padding-left: 0; padding-right: 0; } } */ .header { background-color: rgba(41,41,45,.9); /*border-bottom: solid 1px #dfe2e7;*/ position: fixed; padding: 17px 20px 15px 20px; zoom: 1; width: 99%; z-index: 3; /*line-height: 20px;*/ } .header:before, .header:after { content: ""; display: table; } .header:after { clear: both; } .header .left { float: left; } .header .right { text-align: right; position: absolute; right: 15px; top: 26px; } .header .right iframe { display: inline-block; vertical-align: middle; } .header h1 { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; font-style: normal; font-weight: 100; font-family: montserrat, sans-serif; font-size: 13px; } .header h1 a{ text-decoration: none; } .header h1, .header h1 a:visited { color: #9090aa; font-family: "Montserrat"; font-size: 27px; text-transform: none; letter-spacing: 0px; font-weight: 300; font-style: normal; color: #1fd699; } .header h1 a:hover { color: #fff; } .header li a { font-family: "Montserrat"; letter-spacing: 2px; font-weight: 300; padding-left: 14px; padding-right: 14px; font-size: 13px; text-transform: uppercase; margin-right: 14px; margin-left: -14px; color: #fff; display: block; text-decoration: none; } .header li a:hover { color: #1fd699; } @media (min-width: 480px) { .header h1 { float: left; } .header ul, .header li { display: block; float: left; } .header ul { margin-left: -15px; } .header h1 + ul { /*border-left: solid 1px #dfe2e7;*/ margin-left: 25px; padding-top: 10px; } .header li { /*border-left: solid 1px rgba(255,255,255,0.5);*/ /*border-right: solid 1px #dfe2e7;*/ } .header li:last-child { border-right: 0; } .header li a { padding: 0 15px; } } @media (max-width: 480px) { .right { display: none; } } .menubar { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; } .menubar .section { padding: 100px 20px 80px; background: #1D1E22; -webkit-box-sizing: content-box; -moz-box-sizing: border-box; box-sizing: border-box; } .menubar .section + .section { border-top: solid 1px #dfe2e7; } .menubar .section.no-line { border-top: 100; padding-top: 0; } a.big.button { display: block; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; width: 100%; padding: 10px 20px; text-align: center; font-weight: bold; font-size: 1.1em; background: transparent; border: solid 3px #2badad; -webkit-border-radius: 30px; border-radius: 30px; font-family: montserrat, sans-serif; } a.big.button, a.big.button:visited { color: #2badad; text-decoration: none; } a.big.button:hover { background: #2badad; } a.big.button:hover, a.big.button:hover:visited { color: #fff; } @media (max-width: 480px) { .menubar { padding: 20px; border-bottom: solid 1px #dfe2e7; } } @media (max-width: 768px) { .menubar { display: none; } } @media (min-width: 768px) { .content-root { padding-left: 230px; padding-top: 100px; } .menubar { position: absolute; /*margin-top: 100px;*/ left: 0; top: 0; bottom: 0; width: 280px; /* Menu bar width*/ border-right: solid 1px #dfe2e7; } .menubar.fixed { position: fixed; overflow-y: auto; } .menubar.fixed { color: #FF9999; -webkit-overflow-scrolling: touch; } .menubar.fixed::-webkit-scrollbar { width: 5px; height: 5px; background: #1D1E22; } .menubar.fixed::-webkit-scrollbar-thumb { background: #ddd; -webkit-border-radius: 8px; border-radius: 8px #1D1E22; border: solid 0px #1D1E22; } .menubar.fixed:hover::-webkit-scrollbar-thumb { background: #999; -webkit-box-shadow: inset 2px 2px 3px rgba(0,0,0,0.2); box-shadow: inset 2px 2px 3px rgba(0,0,0,0.2); } } .menubar { font-size: 1em; background-color: #1D1E22; } .menu ul.level-1 > li + li { margin-top: 20px; /*color: #D3435C; */ } .menu a { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; position: relative; display: block; padding-top: 1px; padding-bottom: 1px; margin-right: -30px; } .menu a, .menu a:visited { color: #fff; text-decoration: none; } .menu a:hover { color: #23C890; } .menu a.level-1 { font-family: oxygen, sans-serif; text-transform: uppercase; font-weight: bold; font-size: 0.95em; color: #B2B2B2; } .menu a.level-1:visited { color: #B2B2B2; } .menu a.level-1:hover { color: #23C890; } .menu a.level-2 { font-weight: normal; font-family: oxygen; color: #7F7F7F; } .menu a.level-2:hover { color: #23C890; } .menu a.level-3 { font-weight: normal; font-family: oxygen; font-size: 0.9em; color: #7F7F7F; padding-left: 15px; } .menu a.level-3:hover { color: #23C890; } .menu a.active { font-weight: bold !important; color: #23C890; } .menu a.active, .menu a.active:visited, .menu a.active:hover { color: #23C890 !important; } .menu a.active:after { content: ''; display: block; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; position: absolute; top: 10px; right: 30px; width: 3px; height: 3px; -webkit-border-radius: 2px; border-radius: 2px; background: #24C48C; } code .string, code .number { color: #24C48C; } code .init { color: #383; } code .keyword { font-weight: bold; } code .comment { color: #686666; } .large-brief .content > h1:first-child + p, .content > p.brief { font-size: 1.3em; font-family: Open Sans, sans-serif; font-weight: 300; } .title-area { min-height: 100px; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; text-align: center; border-bottom: solid 1px #dfe2e7; overflow: hidden; } .title-area > img.bg { z-index: 0; position: absolute; left: -9999px; } .title-area > div { position: relative; z-index: 1; } .lang{ color: white; margin: 0 5px; cursor: pointer; } .content h2.banner-header, .content p.banner { position: sticky; background-color: white; border-left: 1px solid #ED9D00; border-right: 1px solid #ED9D00; padding: 10px; } .content h2.banner-header { top: 80px; z-index: 2; margin-top: 20px; border-top: 1px solid #ED9D00; border-top-left-radius: 8px; border-top-right-radius: 8px; padding: 10px; } .content p.banner { top: 130px; z-index: 1; margin-top: 0; font-weight: bold; border-bottom: 1px solid #ED9D00; border-bottom-right-radius: 8px; border-bottom-left-radius: 8px; } ================================================ FILE: en/README.md ================================================ # EN ================================================ FILE: en/api/README.md ================================================ # API ================================================ FILE: en/infra/backup_policy_FAQ.md ================================================ **- What is backed up?** Everything. Users, devices, their data, etc. **- Where are backups stored?** They are stored on the separate servers within our cloud provider data center. **- Frequency of backups?** Full backup is done once a week. All non reporting data (users, devices, widgets setup, last values) also is backup in real-time with separate mechanism. **- Backup software in use** We use a snapshot-based backup system that creates a point-in-time image based on the current state of the server. **- Monitoring: How backups are monitored?** This is the automated feature delivered by the provider. So we don't perform any monitoring here. **- Data retention policies** Snapshots are stored for the 1 month. So at the every point of the time there are 4 snapshots (1 snapshot per week). **- Is it practically possible to restore data and use restored data?** Sure. In fact, we restoring the backups once in few months for the random client. Also, partial restore is possible - restore of the user profiles, devices without reporting data for graphs. **- Is there something that is not backed up?** No. All data is backuped. **- Do I have to pay for the backup?** No, this price is included to your subscription plan. ================================================ FILE: en/product/README.md ================================================ --- description: How Product templates work on Blynk IoT platform --- # Product ================================================ FILE: en/product/product-template-settings/README.md ================================================ # Product Template Settings ================================================ FILE: en/product/product-template-settings/dashboard.md ================================================ # Dashboard ================================================ FILE: en/product/product-template-settings/datastreams/README.md ================================================ # Datastreams ================================================ FILE: en/product/product-template-settings/datastreams/datastream_alias.md ================================================ # Datastream: Alias Alias is an alternative Datastream name which can be changed by the end-user. For example, it can be used by voice assistants like Amazon Echo \(Alexa\) and Google Home Assistant . You can only use letters, digits and spaces. No other characters are allowed **IMPORTANT:** Duplicate aliases are not allowed. ================================================ FILE: en/product/product-template-settings/datastreams/datastream_automation.md ================================================ # datastream\_automation ## Datastream: Expose to Automation This setting makes current Datastream available for Automation. Once enabled, end-users will be able to choose this Datastream when creating Automation scenarios. ## 1. Turn on the switch to expose this Datastream for Automation ## 2. Choose the Type of Automation The type defines what kind of Action or Trigger is it and how it will be presented for the user when using Automation | Type | Description | GUI | Condition | Action | Settings | | :--- | :--- | :---: | :---: | :---: | :---: | | **Main Power Switch** | Control that turn device ON/OFF. You can have **only one** Main Power Switch per Product | Switch | • | • | – | | **Switch** | Controls property that has on/off state. **Don't use this property for Main Power Switch** | Switch | • | • | – | | **Range Control** | Controls a property within a set range. Min/Max values are taken from Datastream settings. This parameter also requires a `step` value. Step defines increments between min and max value of the datastream | Slider | • | • | Step | | **Color** | Controls properties where color can be set. Include Brightness if needed. | Color picker | • | • | – | | **Sensor** | Read-only property to use sensor data as a Condition | Value | • | | – | ## 3. Configure if this Datastream is as a trigger, an action, or both. **Condition:** makes this Datastream available as a Condition. **Action:** makes this Datastream available as an Action. Some of the Automation Types can be only a condition. ================================================ FILE: en/product/product-template-settings/datastreams/datastream_datatype.md ================================================ # Datastream: Data Type Every Datastream has a Data Type setting. Data Type is used to specify the type and format of the data and optimize data storage and further calculations. Make sure you choose a correct Data Type for your data. Currently, these Data Types are supported: | Type | Min | Max | | :---: | :---: | :---: | | `Integer` | -2,147,483,648 | 2,147,483,647 | | `Double` | -1.8 x 10^300 | 4.9 x 10^-324 | | `String` | any value is accepted | | **IMPORTANT:** Blynk server will ignore values that don't match the Data Type Example: if Datastream has Data Type set to `Integer`, but Hardware sends `123.45`, this value will be skipped because it is `Double`, not `Integer`. If the incoming value goes out of range of Min or Max setting, this value will be "cropped" to match this setting. ================================================ FILE: en/product/product-template-settings/datastreams/datastream_default_value.md ================================================ # Datastream: Default Value Default Value is a setting that allows you to set the initial value for the Datastream. This value later can be used in hardware API, HTTPS API, or within Rule Engine. Usually, this setting is used to set the initial value when hardware boots up for the first time. Example: You are working on a smart light bulb and would like to turn it on when it first connects to the server after provisioning. Set the default value for the Datastream `V1` to `1`. Then use this code on the hardware: ```cpp BLYNK_CONNECTED() { // request the V1 value on connect // for initial connect it will be default value 1 Blynk.sync(V1); } BLYNK_WRITE(V1) { // here you get default value 1 int bulbValue = param.asInt(); handle(bulbValue); } ``` You can change the default value of the product at any time. There is no need to update firmware over-the-air even when the product was already shipped to your clients. ================================================ FILE: en/product/product-template-settings/datastreams/datastream_deicmals.md ================================================ # Datastream: Decimals This setting defines the formatting of the incoming value. Decimals formatting is available for `float` Data Type only. Supported formatting: | Format | Example Value | Value after formatting | | :--- | :--- | :--- | | \# | 3.14159265359 | 3 | | \#.\# | 3.14159265359 | 3.1 | | \#.\#\# | 3.14159265359 | 3.14 | | \#.\#\#\# | 3.14159265359 | 3.141 | | \#.\#\#\#\# | 3.14159265359 | 3.1415 | | \#.\#\#\#\#\# | 3.14159265359 | 3.14159 | | \#.0 | 3 | 3.0 | | \#.00 | 3.1 | 3.10 | | \#.000 | 3.1 | 3.100 | | \#.0000 | 3.1 | 3.1000 | | \#.00000 | 3.1 | 3.10000 | ================================================ FILE: en/product/product-template-settings/datastreams/datastream_feedback.md ================================================ # Datastream: Wait for confirmation from the device In some cases, it's crucial to get a confirmation that hardware has received the command or value. **Wait for confirmation from device** property allows you to set the interval for how long the mobile or web app will wait for the confirmation from the hardware. Example: 1. You set Datastream for garage door status to wait for confirmation for 5 sec. 2. The user pressed the switch in the mobile app that should close the garage door. 3. If hardware confirms that command was processed and applied - the switch in the app will remain in ON state. 4. If there is no confirmation from the device that the door was closed within 5 seconds, the switch will go back to the initial OFF state. Here is a code example that shows how you can make it work: ```cpp BLYNK_WRITE(V1) { int value = param.asInt(); if (value == 1) { if (openDoor()) { // confirm the value, UI will enable the button Blynk.virtualWrite(V1, "1"); } else { // you can send back any other value, // saying that change was unsuccessful // UI will enable the button Blynk.virtualWrite(V1, "0"); } } } ``` ================================================ FILE: en/product/product-template-settings/datastreams/datastream_invalidate.md ================================================ # Datastream: Invalidate Value Use this setting to manage the _freshness_ of the data. When enabled, the server will automatically check the timestamp of the latest value and act accordingly to settings. **Invalidate in:** Specifies the period in seconds, minutes, or hours when data is considered fresh. **then set:** Specifies what to do when data is no longer fresh. You have such options: | Option | How it works | | :--- | :--- | | Nothing | Erases the previous value and shows nothing | | Default | Will show `Default` datastream value is exists | | No Data | Will show "No Data" placeholder | | Empty | Will show "Empty" placeholder | | -- | Will show dashes "--" placeholder | Example: 1. A temperature Datastream is set to `Invalidate in 1 hour, then set to "--"` 2. It's 4:00 PM now, and the latest value of `3.14ºC` was received at 3:30 PM. Data is considered to be fresh, and any widget will display it. 3. It's 5:00 PM, and there was no new data since 3:30 PM \(maybe the device is no longer working\). A temperature widget in the app will show `--` because data is no longer fresh. ================================================ FILE: en/product/product-template-settings/datastreams/datastream_min_max.md ================================================ # Datastream: Min/Max values **Min / Max** fields are used to specify the range of incoming values. This setting is applied everywhere, where this Datastream is used. For example, if you use a Chart widget, it will use min/max values by default. Some visualization widgets allow overriding min/max values. **IMPORTANT:** If the incoming value falls out of the specified min/max range, the value will be _cropped_. Example: Datastream `Min-Max` fields are set to `0-100` | Datastream | Min | Max | | :--- | :--- | :--- | | Humidity | `0` | `100` | Here is how incoming values will be processed: | Incoming value | Result | | :--- | :--- | | `50` | `50` | | `314` | `100` | | `-2` | `0` | Min /Max setting is applied if the value matches the Data Type. Otherwise, the value will be ignored. Check Data Type Settings reference. ================================================ FILE: en/product/product-template-settings/datastreams/datastream_name.md ================================================ # Datastream: Name Always try to give a meaningful name to the Datastream as it's extensively used across the platform. **IMPORTANT:** Duplicate names are not allowed. ================================================ FILE: en/product/product-template-settings/datastreams/datastream_save_raw.md ================================================ # Datastream: Save Raw Data This setting allows storing raw data \(uncompressed, non-aggregated\). By default, data on the platform is averaged to 1 value per minute. It means that if hardware sent 60 values for 1 minute, only one average of these 60 values would be stored in the database. ================================================ FILE: en/product/product-template-settings/datastreams/datastream_sync.md ================================================ # Datastream: Sync with the latest server value This setting enables the device to sync with the latest known value on the server. For example, a user owns a wi-fi connected dimmer light 1. The device goes offline 2. User sets the brightness of the light to 100% in the mobile app or on the web 3. When the device comes back online, it can request the latest value from the server and set brightness to 100 To sync the device to the latest state, use the firmware API commands: `Blynk.sync()` or `Blynk.syncAll()`. ```cpp BLYNK_CONNECTED() { // when device is conneceted to Blynk Cloud... Blynk.syncAll(); // request the values for all datastreams that has "sync" setting enabled } ``` `Blynk.syncAll()` will do syncs only for DataStreams that are enabled for syncing. `Blynk.sync()` will do sync for any requested DataStream, even if syncing not enabled for that DataStream. ================================================ FILE: en/product/product-template-settings/datastreams/datastream_virtual_pin.md ================================================ # Datastream: Virtual Pin Virtual Pin is a way to exchange data between hardware, web, and mobile apps. Think about Virtual Pins as a variable where you can store and retrieve data from sensors, actuators, etc. For example, you can read a value in Celsius from a temperature sensor like DHT11 \(using a physical pin on your hardware\), then convert this temperature to Fahrenheit and save the processed value to a Virtual Pin 01. ```cpp void temperatureSend() // a function that is called by some timer { temperatureCelsius = analogRead(A0); // Reading sensor data in Celsius toFarenheit = temperatureCelsius*1.8 + 32; // Converting Celsius to Farenheit Blynk.virtualWrite(V0, toFarenheit); // Writing temperature in Farenheit to Virtual Pin V0 // Now it can be used by widgets in the apps } ``` Or you can send a command from the app to a Virtual Pin, and run a function inside a Virtual Pin handler. ```cpp BLYNK_WRITE(V1) // Device is waiting for incoming value on Virtual Pin V1. { pinValue = param.asInt(); // creating a variable that will store incoming value if (pinValue == 1) // checking if incoming value is 1 { doThis(); // trigger some function in your code doThat(); // trigger another function in your code } } ``` Check examples in different languages on how to read and write data to Virtual Pins. ================================================ FILE: en/product/product-template-settings/events/README.md ================================================ # Events ================================================ FILE: en/product/product-template-settings/events/event_code.md ================================================ # Events: Code Event code is used in firmware API to trigger and render events from the device. **IMPORTANT:** Event code should be unique within the product. ## How to trigger events: If you need to create a warning when the sensor detects temperature over a certain threshold. 1. Create a new Warning event named `High temperature` with code `high_temp` 2. Use the `Blynk.logEvent(event_code)` to trigger new event occurrence 3. When the device triggers the event, it will be rendered on the Timeline A simple example could look like: ```cpp if (temperatureSensor > 35) { Blynk.logEvent("high_temp"); } ``` You can also use HTTPS API in order to trigger the device event: ```text /external/api/logEvent?token={device_token}&code={event_code}&description={event_desciption} ``` `description` is an optional parameter where you can attach additional information to be rendered on the Timeline along with the event. For example: ```text https://my.server.com/external/api/logEvent?token=Q9qdlGahPuFuCfncrT35QutT7s3HjYFy&code=high_temp ``` ================================================ FILE: en/product/product-template-settings/events/event_name.md ================================================ # Events: Name Give your event a meaningful name because it will be shown to end-users. **IMPORTANT:** Event name should be unique within the product. ================================================ FILE: en/product/product-template-settings/events/event_notification.md ================================================ # Events: Notification Every event can additionally trigger notifications. You can: * Send Emails * Send Push Notification on a smartphone/tablet * Send SMS \(additional charges apply\) ## Recipients You can assign different recipients to each event. For example, some notifications should be sent to the end-customers, while others should be sent to the technical support team \(for internal review only\). You need to define the recipient of notifications in Product Metadata before they become available as a selection. When you add any of the following Metadata fields, they will be available as a recipient in notifications: * `Device owner` is available as a recipient by default \(no need to add such field\) * Contact metadata * Email metadata Example: You would like your technical support team to be notified every time the vibration sensor is over the defined threshold. 1. In Products -> Your Product -> Metadata: Create a new Metadata field of type `Email` or `Contact`. Name it "Technical Support" and specify a default value \(for example `support@yourcompany.com`\) 2. In Products -> Your Product -> Events: Create a new Event and set a recipient of email notification as `Technical Support` ================================================ FILE: en/product/product-template-settings/events/event_notification_period.md ================================================ # Events: Notification Period Notification Period defines how often notifications are sent for this particular event. For example, a 1 minute period means end-users won't get more than one notification per 1 minute, even if hardware or API sends more. After 1 minute since the last posted notification expires, new notifications will get in. Notification Period is applied per event per device. If you have two events with different notification periods set up within the same device, they will be processed independently and end-users will get both notifications with different periods. ================================================ FILE: en/product/product-template-settings/events/event_online_offline.md ================================================ # Events: Online, Offline Online and Offline events are system events handled by the server. These events tell the current status of the device on the list of devices, device page itself, and also shows the history of states change in the timeline section. You can set up your devices to ignore offline state period in `Product` -> `General` - > `Offline Ignore Period`. User should be logged in to account to get these notifications. ================================================ FILE: en/product/product-template-settings/general-settings/README.md ================================================ # General Settings ================================================ FILE: en/product/product-template-settings/general-settings/product_manufacturer.md ================================================ # Manufacturer Is the name of a Manufacturer that makes your product. This field used in multiple places on the UI and is required to work with Voice Assistance \(Alexa, Google Home\). This field is mandatory. Max length - 128 characters. Only letters, digits and space are allowed. ================================================ FILE: en/product/product-template-settings/general-settings/product_offline_ignore_period.md ================================================ # Offline Ignore Period Offline ignore period is an option that allows you to hide "offline" event on the device timeline. For example, let's say you set the offline ignore period to 1 minute and we have the next device log: 17:44:33 - device connects 17:44:40 - device disconnects 17:44:50 - device connects again With offline ignore period set to 1 minute your device timeline will show only 1 event: 17:44:33 device connects This is because device reconnected within the 1 minute interval. Without offline ignore period set your timeline will show all the above events. ================================================ FILE: en/product/product-template-settings/metadata.md ================================================ # Metadata ================================================ FILE: en-product/create-new-product.md ================================================ --- description: How to create new Product on Blynk IoT platform --- # What is a Product ================================================ FILE: en-product/dashboard/chart.md ================================================ Chart is used to visualise live and historical data. You can use it for sensor data, for binary event logging and more. SETUP: - **Add source** – it's possible to set several Datastream **Sources** under one Chart. Click and set up as much as you need. - **Chart Title** – name a chart so you or your client understand what it's about - **Source Label** – The easiest way to name it/them is giving used Datastreams names. - **Source** – there are two fields: - the right one contains ***Datastreams used in the Product***. Select one; - the left is ***Source aggregation type menu*** it's used to select an option to be used in chart data plotting: **AVG of** will plot average value per minute; **Raw of** data will plot using all the data available; **SUM of** will summarize all incoming values to the specified Virtual Pin; **MIN of** will plot minimum value per minute; **MAX of** will plot maximum value per minute; **COUNT of** will plot the number of times data was sent by device per minute; - **Chart type** - 4 types are available: Line, Area, Column, Stepline. Pick a color to make it different from other sources may use under this chart. - **Show Y-axis** – enable if it's needed to view Datastream values on the axis (X-axis displays the time); - **Autoscale** – enable if there's no specific limitations of the data values needed to be viewed. Otherwise specify them by setting the values in **MIN** and **MAX** fields. - **Enable zoom** – enable if chart zoom may be useful. Otherwise leave it disabled. ================================================ FILE: en-product/datastreams/README.md ================================================ # Datastreams ================================================ FILE: en-product/datastreams/datastream-alias.md ================================================ # Datastream: Alias ================================================ FILE: en-product/datastreams/datastream-data-type.md ================================================ # Datastream: Data Type ================================================ FILE: en-product/datastreams/datastream-invalidate-value.md ================================================ # Datastream: Invalidate Value ================================================ FILE: en-product/datastreams/datastream-min-max-values.md ================================================ # Datastream: Min/Max values ================================================ FILE: en-product/datastreams/datastream-name.md ================================================ # Datastream Name ================================================ FILE: en-product/datastreams/datastream-save-raw-data.md ================================================ # Datastream: Save Raw Data ================================================ FILE: en-product/datastreams/datastream-virtual-pin.md ================================================ # Datastream: Virtual Pin ================================================ FILE: en-product/datastreams/decimals-formatting.md ================================================ # Decimals Formatting ================================================ FILE: en-product/datastreams/default-value.md ================================================ # Default Value ================================================ FILE: en-product/datastreams/expose-to-automation.md ================================================ # Expose to Automation ================================================ FILE: en-product/datastreams/sync-with-the-latest-server-value.md ================================================ # Sync with the latest server value ================================================ FILE: en-product/datastreams/wait-for-confirmation-from-the-device.md ================================================ # Wait for confirmation from the device ================================================ FILE: en-product/events/README.md ================================================ # Events ================================================ FILE: en-product/events/events-code.md ================================================ # Events: Code ================================================ FILE: en-product/events/events-name.md ================================================ # Events: Name ================================================ FILE: en-product/events/events-notification-period.md ================================================ # Events: Notifications Limit This setting limits the number of notifications for a specified time period. Example: 1 minute period means end-users will only get one notification per 1 minute, even if hardware or API sends more. Notifications Limit can be defined per each Event individually. Example: If you set two Events to different Notification Limits, they will be processed independently, and end-users will get both notifications accordingly to the specified limits. ================================================ FILE: en-product/events/events-notification.md ================================================ # Events: Notification ================================================ FILE: en-product/events/events-online-offline.md ================================================ # System Events ================================================ FILE: en-product/general-settings/README.md ================================================ # General Settings ================================================ FILE: en-product/general-settings/manufacturer.md ================================================ # Manufacturer ================================================ FILE: en-product/general-settings/offline-ignore-period.md ================================================ # Offline Ignore Period ================================================ FILE: en-product/metadata.md ================================================ # Metadata ================================================ FILE: en-product/mobile-app-ui.md ================================================ # Mobile app UI ================================================ FILE: en-product/web-dashboard.md ================================================ # Web Dashboard ================================================ FILE: faq.md ================================================ # FAQ * I backed Blynk on Kickstarter. Where are my widgets and why the app is free? > App is free because otherwise you would have to pay to download it. This is how AppStore and Google Play works. Current Blynk release has a limited amount of widgets. We decided to make them free for everyone until we implement store. After that, every widget will be paid. However every backer will get them for free \(according to their pledge\). * What is Blynk Cloud? > Blynk Cloud is a open-source software written on Java using plain TCP/IP and secured TCP/IP \(for hardware that supports it\) sockets and running on our server. Blynk iOS and Android apps connect to Blynk Cloud by default. Access is free for every Blynk user. We also provide a Private Server distribution for those who want to [install it locally](./#blynk-server). * How much access to Cloud Blynk Server cost? > It is free for every Blynk user. * Can I run Blynk server locally? > Yes. Those of you, who want extra security or don’t have internet connection, can install Local Blynk Server and run it in your own local network. Blynk Server is Open-Source and it takes less than few seconds to deploy. All the instructions and files are [here](./#blynk-server). * What are the requirements to run Private Blynk Server? > To run Private Blynk Server, all you need is Java Runtime Environment. * Can I run Blynk server on Raspberry Pi? > Yes, surely! [Here are the instructions](./#blynk-server-how-to-run-local-blynk-server-launch-blynk-server-on-raspberry-pi). * Does Blynk app work over Bluetooth? > Yes. It is in beta right now. * Does Blynk support Ethernet / Wi-FI / UART? > Yes, all of them. See full list of [supported hardware](./#supported-hardware) and shields. * I don't have any shield. Can I use Blynk with my computer? > Yes, you can use Blynk just with a USB cable. There is a step-by-step [instruction](./#other-hardware-connect-over-usb) on how to do it. * Can Blynk handle multiple Arduinos? > Yes. There are 3 ways right now: > > * add multiple devices to your project. > * you may use same [Auth Token](./#getting-started-getting-started-with-application-auth-token) for different hardware. In that case you can control few hardwares from 1 dashboard. > * you can do it using [Bridge functionality](./#widgets-other-bridge) which allows you to send messages from one hardware to another. * Does Blynk server store sensor data when app goes offline? > Yes, every command that hardware sends to server is stored. You could use [History Graph](./#widgets-displays-superchart) widget in order to view it. * How many Virtual Pins I can use? > It depends mostly on your hardware. Low-end hardware may use up to 32 Virtual Pins. More powerful \(like ESP8266\) can use up to 128 but it requires also BLYNK\_USE\_128\_VPINS property in your sketch. [Example](https://github.com/blynkkk/blynk-library/blob/master/src/Blynk/BlynkConfig.h#L64). * Why does the app require all these permissions? > [http://help.blynk.cc/faq/blynk-android-permissions-explained](http://help.blynk.cc/faq/blynk-android-permissions-explained) ================================================ FILE: firmware-api/README.md ================================================ # Firmware API \(C++\) ================================================ FILE: firmware-api/disable-widgets-in-the-app.md ================================================ # Disable Widgets in the App This command disables and enables widget in the app ```cpp Blynk.setProperty(V0,"isDisabled", true); ``` ================================================ FILE: firmware-api-1/disable-widgets-in-the-app.md ================================================ # Disable Widgets in the App This command disables and enables widget in the app ```cpp Blynk.setProperty(V0,"isDisabled", true); ``` ================================================ FILE: gettingstarted.md ================================================ # Getting Started Let's get you started in 5 minutes \(reading doesn't count!\). We will switch on an LED connected to your Arduino using the Blynk App on your smartphone. Connect an LED as shown here: ![](.gitbook/assets/Arduino_LED.jpg) ## Getting Started With The Blynk App ### 1. Create a Blynk Account After you download the Blynk App, you'll need to create a New Blynk account. This account is separate from the accounts used for the Blynk Forums, in case you already have one. We recommend using a **real** email address because it will simplify things later. ![](.gitbook/assets/register_account.png) #### Why do I need to create an account? An account is needed to save your projects and have access to them from multiple devices from anywhere. It's also a security measure. You can always set up your own [Private Blynk Server](./#blynk-server) and have full control. ### 2. Create a New Project After you've successfully logged into your account, start by creating a new project. ![](.gitbook/assets/create_project_button.png) ### 3. Choose Your Hardware Select the hardware model you will use. Check out the [list of supported hardware](./#supported-hardware)! ![](.gitbook/assets/select_hardware.png) ### 4. Auth Token **Auth Token** is a unique identifier which is needed to connect your hardware to your smartphone. Every new project you create will have its own Auth Token. You'll get Auth Token automatically on your email after project creation. You can also copy it manually. Click on devices section and selected required device : ![](.gitbook/assets/token_1.png) And you'll see token : ![](.gitbook/assets/new_device.png) **NOTE:** Don't share your Auth Token with anyone, unless you want someone to have access to your hardware. It's very convenient to send it over e-mail. Press the e-mail button and the token will be sent to the e-mail address you used for registration. You can also tap on the Token line and it will be copied to the clipboard. Now press the **"Create"** button. ![](.gitbook/assets/new_project.png) ### 5. Add a Widget Your project canvas is empty, let's add a button to control our LED. Tap anywhere on the canvas to open the widget box. All the available widgets are located here. Now pick a button. **Widget Box** ![](.gitbook/assets/widgets_box.png) **Drag-n-Drop** - Tap and hold the Widget to drag it to the new position. **Widget Settings** - Each Widget has it's own settings. Tap on the widget to get to them. ![](.gitbook/assets/button_settings.png) The most important parameter to set is **PIN** . The list of pins reflects physical pins defined by your hardware. If your LED is connected to Digital Pin 8 - then select **D8** \(**D** - stands for **D**igital\). ![](.gitbook/assets/pin_selection.png) ### 6. Run The Project When you are done with the Settings - press the **PLAY** button. This will switch you from EDIT mode to PLAY mode where you can interact with the hardware. While in PLAY mode, you won't be able to drag or set up new widgets, press **STOP** and get back to EDIT mode. You will get a message saying "Arduino UNO is offline". We'll deal with that in the next section. ![](.gitbook/assets/play_button.png) ## Getting Started With Hardware ### How To Use an Example Sketch You should by now have the Blynk Library installed on your computer. If not - [click here](./#downloads-blynk-library). Example sketches will help you get your hardware online quickly and major Blynk features. Open the example sketch according to the hardware model or shield you are using. ![](.gitbook/assets/connection_type_sketch.png) Let's take a look at the example sketch for an [Arduino UNO + Ethernet shield](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/BlynkBlink/BlynkBlink.ino) ```cpp #define BLYNK_PRINT Serial #include #include #include char auth[] = "YourAuthToken"; void setup() { Serial.begin(9600); // See the connection status in Serial Monitor Blynk.begin(auth); // Here your Arduino connects to the Blynk Cloud. } void loop() { Blynk.run(); // All the Blynk Magic happens here... } ``` ### Auth Token In this example sketch, find this line: ```cpp char auth[] = "YourAuthToken"; ``` This is the [Auth Token](./#getting-started-getting-started-with-application-4-auth-token) that you emailed yourself. Please check your email and copy it, then paste it inside the quotation marks. It should look similar to this: ```text char auth[] = "f45626c103a94983b469637978b0c78a"; ``` Upload the sketch to the board and open Serial Terminal. Wait until you see something like this: ```text Blynk v.X.X.X Your IP is 192.168.0.11 Connecting... Blynk connected! ``` **Congrats! You are all set! Now your hardware is connected to the Blynk Cloud!** ## Blynking Go back to the Blynk App, push the button and turn the LED on and off! It should be Blynking. ![](.gitbook/assets/button_pressed.png) Check out [other example sketches](https://github.com/blynkkk/blynk-library/tree/master/examples). Feel free to experiment and combine different examples together to create your own amazing projects. For example, to attach an LED to a [PWM](http://www.arduino.cc/en/Tutorial/Fading)-enabled Pin on your Arduino, set the slider widget to control the brightness of an LED. Just use the same steps described above. ================================================ FILE: google-code-prettify/CHANGES.html ================================================ Change Log README

Known Issues

  • Perl formatting is really crappy. Partly because the author is lazy and partly because Perl is hard to parse.
  • On some browsers, <code> elements with newlines in the text which use CSS to specify white-space:pre will have the newlines improperly stripped if the element is not attached to the document at the time the stripping is done. Also, on IE 6, all newlines will be stripped from <code> elements because of the way IE6 produces innerHTML. Workaround: use <pre> for code with newlines.

Change Log

29 March 2007

  • Added tests for PHP support to address issue 3.
  • Fixed bug: prettyPrintOne was not halting. This was not reachable through the normal entry point.
  • Fixed bug: recursing into a script block or PHP tag that was not properly closed would not silently drop the content. (test)
  • Fixed bug: was eating tabs (test)
  • Fixed entity handling so that the caveat

    Caveats: please properly escape less-thans. x&lt;y instead of x<y, and use " instead of &quot; for string delimiters.

    is no longer applicable.
  • Added noisefree's C# patch
  • Added a distribution that has comments and whitespace removed to reduce download size from 45.5kB to 12.8kB.

4 Jul 2008

  • Added language specific formatters that are triggered by the presence of a lang-<language-file-extension>
  • Fixed bug: python handling of '''string'''
  • Fixed bug: / in regex [charsets] should not end regex

5 Jul 2008

  • Defined language extensions for Lisp and Lua

14 Jul 2008

  • Language handlers for F#, OCAML, SQL
  • Support for nocode spans to allow embedding of line numbers and code annotations which should not be styled or otherwise affect the tokenization of prettified code. See the issue 22 testcase.

6 Jan 2009

  • Language handlers for Visual Basic, Haskell, CSS, and WikiText
  • Added .mxml extension to the markup style handler for Flex MXML files. See issue 37.
  • Added .m extension to the C style handler so that Objective C source files properly highlight. See issue 58.
  • Changed HTML lexer to use the same embedded source mechanism as the wiki language handler, and changed to use the registered CSS handler for STYLE element content.

21 May 2009

  • Rewrote to improve performance on large files. See benchmarks.
  • Fixed bugs with highlighting of Haskell line comments, Lisp number literals, Lua strings, C preprocessor directives, newlines in Wiki code on Windows, and newlines in IE6.

14 August 2009

  • Fixed prettifying of <code> blocks with embedded newlines.

3 October 2009

  • Fixed prettifying of XML/HTML tags that contain uppercase letters.

19 July 2010

  • Added support for line numbers. Bug 22
  • Added YAML support. Bug 123
  • Added VHDL support courtesy Le Poussin.
  • IE performance improvements. Bug 102 courtesy jacobly.
  • A variety of markup formatting fixes courtesy smain and thezbyg.
  • Fixed copy and paste in IE[678].
  • Changed output to use &#160; instead of &nbsp; so that the output works when embedded in XML. Bug 108.

7 September 2010

  • Added support for coffeescript courtesy Cezary Bartoszuk.

4 March 2011

  • Added a themes gallery to showcase contributed styles.
  • Added support for XQuery courtesy Patrick Wied, Nemerle courtesy Zimin A.V., and Latex support courtesy Martin S.

29 March 2011

  • Fixed IE newline issues, and copying/pasting of prettified source code from IE. This required significant internal changes but involves no API changes. Caveat: prettyPrintOne injects the HTML passed to it into a <pre> element. If the HTML comes from a trusted source, this may allow XSS. Do not do this. This should not be a problem for existing apps since the standard usage is to rewrite the HTML and then inject it, so anyone doing that with untrusted HTML already has an XSS vulnerability. If you sanitize and prettify HTML from an untrusted source, sanitize first.

4 February 2013

  • Language handlers for Dart, Erlang, Mumps, TCL, R, S., and others
  • Bug fix: VB REM style comments.
  • Bug fix: CSS color literals / ID selector confusion.
  • Bug fix: IE8 line breaks.

24 February 2013

  • Added a one script autoload&run mechanism and a way to embed hints in processing instructions/comments. See example.

4 March 2013

  • Matlab language handler courtesy Amro³
================================================ FILE: google-code-prettify/COPYING ================================================ Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS Copyright 2011 Mike Samuel et al Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ================================================ FILE: google-code-prettify/Makefile ================================================ SHELL := /bin/bash CLOSURE_COMPILER=java -jar tools/closure-compiler/compiler.jar \ --warning_level VERBOSE \ --language_in ECMASCRIPT5 \ --compilation_level ADVANCED_OPTIMIZATIONS \ --charset US-ASCII # Don't specify --charset=UTF-8. If we do, then non-ascii codepoints # that do not correspond to line terminators are converted # to UTF-8 sequences instead of being emitted as ASCII. # This makes the resulting JavaScript less portable. YUI_COMPRESSOR=java -jar tools/yui-compressor/yuicompressor-2.4.4.jar \ --charset UTF-8 TAR_ROOT=distrib/google-code-prettify all: distrib clean: rm -rf distrib.tstamp distrib src/prettify.js src/run_prettify.js src/prettify.js: js-modules/*.js js-modules/*.pl @if [ -e "$@" ]; then chmod +w "$@"; fi @perl js-modules/js_include.pl "$$(basename $@)" > "$@" @if [ -e "$@" ]; then chmod -w "$@"; fi src/run_prettify.js: js-modules/*.js js-modules/*.pl @if [ -e "$@" ]; then chmod +w "$@"; fi @perl js-modules/js_include.pl "$$(basename $@)" > "$@" @if [ -e "$@" ]; then chmod -w "$@"; fi distrib: distrib.tstamp distrib/prettify-small.tgz distrib/prettify-small.zip distrib/prettify-small.tar.bz2 @wc -c distrib/prettify-small.{tar.bz2,tgz,zip} \ | grep -v total distrib.tstamp: src/prettify.js src/run_prettify.js src/*.js src/*.css @echo Compiling @mkdir -p $(TAR_ROOT) @for f in src/*.css; do \ $(YUI_COMPRESSOR) --type css $$f \ > $(TAR_ROOT)/$$(basename $$f); \ wc -c $$f $(TAR_ROOT)/$$(basename $$f) \ | grep -v total; \ done @$(CLOSURE_COMPILER) --js src/prettify.js \ --externs tools/closure-compiler/console-externs.js \ --externs tools/closure-compiler/amd-externs.js \ --define IN_GLOBAL_SCOPE=true \ --output_wrapper='!function(){%output%}()' \ > $(TAR_ROOT)/prettify.js @wc -c src/prettify.js $(TAR_ROOT)/prettify.js \ | grep -v total @$(CLOSURE_COMPILER) --js src/run_prettify.js \ --externs tools/closure-compiler/console-externs.js \ --externs tools/closure-compiler/amd-externs.js \ --define IN_GLOBAL_SCOPE=false \ --output_wrapper='!function(){%output%}()' \ > $(TAR_ROOT)/run_prettify.js @wc -c src/run_prettify.js $(TAR_ROOT)/run_prettify.js \ | grep -v total @for f in src/lang*.js; do \ if [ $$f -nt $(TAR_ROOT)/$$(basename $$f) ]; then \ $(CLOSURE_COMPILER) --js $$f --externs js-modules/externs.js \ | perl -pe 's/\bPR\.PR_ATTRIB_NAME\b/"atn"/g; \ s/\bPR\.PR_ATTRIB_VALUE\b/"atv"/g; \ s/\bPR\.PR_COMMENT\b/"com"/g; \ s/\bPR\.PR_DECLARATION\b/"dec"/g; \ s/\bPR\.PR_KEYWORD\b/"kwd"/g; \ s/\bPR\.PR_LITERAL\b/"lit"/g; \ s/\bPR\.PR_PLAIN\b/"pln"/g; \ s/\bPR\.PR_PUNCTUATION\b/"pun"/g; \ s/\bPR\.PR_STRING\b/"str"/g; \ s/\bPR\.PR_TAG\b/"tag"/g; \ s/\bPR\.PR_TYPE\b/"typ"/g;' \ > $(TAR_ROOT)/$$(basename $$f); \ wc -c $$f $(TAR_ROOT)/$$(basename $$f) \ | grep -v total; \ fi \ done @touch distrib.tstamp lang-aliases : lang-aliases.tstamp lang-aliases.tstamp : distrib.tstamp @tools/lang-handler-aliases.sh \ distrib/sources/google-code-prettify/src \ | perl -ne 'system("cp $$1 $$2") if m/^(\S+) (\S+)$$/ && ! -e $$2' \ && touch lang-aliases.tstamp %.tgz: %.tar @gzip -c -9 $^ > $@ %.tar.bz2: %.tar @bzip2 -k -9f $^ distrib/prettify-small.tar: distrib.tstamp tar cf $@ -C distrib google-code-prettify distrib/prettify-small.zip: distrib.tstamp @pushd distrib >& /dev/null; \ rm -f ../$@; \ zip -q -9 -r ../$@ google-code-prettify; \ popd >& /dev/null distrib/prettify.tar: distrib.tstamp mkdir -p distrib/sources/google-code-prettify cp -fr CHANGES.html COPYING README.html Makefile \ examples js-modules src styles tests tools \ distrib/sources/google-code-prettify tar cf distrib/prettify.tar -C distrib/sources google-code-prettify ================================================ FILE: google-code-prettify/README.html ================================================ Javascript code prettifier Languages : CH

Javascript code prettifier

Setup

  1. Download a distribution
  2. Include the script tag below in your document
    >script src="https://google-code-prettify.googlecode.com/svn/loader/run_prettify.js></script>
  3. See Getting Started to configure that URL with options you need.
  4. Look at the skin gallery and pick styles that suit you.

Usage

Put code snippets in <pre class="prettyprint">...</pre> or <code class="prettyprint">...</code> and it will automatically be pretty printed.
The original Prettier
class Voila {
public:
  // Voila
  static const string VOILA = "Voila";

  // will not interfere with embedded tags.
}
class Voila {
public:
  // Voila
  static const string VOILA = "Voila";

  // will not interfere with embedded tags.
}

FAQ

For which languages does it work?

The comments in prettify.js are authoritative but the lexer should work on a number of languages including C and friends, Java, Python, Bash, SQL, HTML, XML, CSS, Javascript, Makefiles, and Rust. It works passably on Ruby, PHP, VB, and Awk and a decent subset of Perl and Ruby, but, because of commenting conventions, but doesn't work on Smalltalk.

Other languages are supported via extensions:

If you'd like to add an extension for your favorite language, please look at src/lang-lisp.js and file an issue including your language extension, and a testcase.

How do I specify the language of my code?

You don't need to specify the language since prettyprint() will guess. You can specify a language by specifying the language extension along with the prettyprint class like so:

<pre class="prettyprint lang-html">
  The lang-* class specifies the language file extensions.
  File extensions supported by default include
    "bsh", "c", "cc", "cpp", "cs", "csh", "cyc", "cv", "htm", "html",
    "java", "js", "m", "mxml", "perl", "pl", "pm", "py", "rb", "sh",
    "xhtml", "xml", "xsl".
</pre>

You may also use the HTML 5 convention of embedding a code element inside the PRE and using language-java style classes. E.g.

<pre class="prettyprint"><code class="language-java">...</code></pre>

It doesn't work on <obfuscated code sample>?

Yes. Prettifying obfuscated code is like putting lipstick on a pig — i.e. outside the scope of this tool.

Which browsers does it work with?

It's been tested with IE 6, Firefox 1.5 & 2, and Safari 2.0.4. Look at the test page to see if it works in your browser.

What's changed?

See the change log

Why doesn't Prettyprinting of strings work on WordPress?

Apparently wordpress does "smart quoting" which changes close quotes. This causes end quotes to not match up with open quotes.

This breaks prettifying as well as copying and pasting of code samples. See WordPress's help center for info on how to stop smart quoting of code snippets.

How do I put line numbers in my code?

You can use the linenums class to turn on line numbering. If your code doesn't start at line number 1, you can add a colon and a line number to the end of that class as in linenums:52.

For example

<pre class="prettyprint linenums:4"
>// This is line 4.
foo();
bar();
baz();
boo();
far();
faz();
<pre>
produces
// This is line 4.
foo();
bar();
baz();
boo();
far();
faz();

How do I prevent a portion of markup from being marked as code?

You can use the nocode class to identify a span of markup that is not code.

<pre class=prettyprint>
int x = foo();  /* This is a comment  <span class="nocode">This is not code</span>
  Continuation of comment */
int y = bar();
</pre>
produces
int x = foo();  /* This is a comment  This is not code
  Continuation of comment */
int y = bar();

For a more complete example see the issue22 testcase.

I get an error message "a is not a function" or "opt_whenDone is not a function"

If you are calling prettyPrint via an event handler, wrap it in a function. Instead of doing

addEventListener('load', prettyPrint, false);
wrap it in a closure like
addEventListener('load', function (event) { prettyPrint() }, false);
so that the browser does not pass an event object to prettyPrint which will confuse it.

How can I customize the colors and styles of my code?

Prettify adds <span> with classes describing the kind of code. You can create CSS styles to matches these classes. See the theme gallery for examples.

I can't add classes to my code (because it comes from Markdown, etc.)

Instead of <pre class="prettyprint ..."> you can use a comment or processing instructions that survives processing instructions : <?prettify ...?> works as explained in Getting Started




================================================ FILE: google-code-prettify/examples/quine.html ================================================ Making Quines Prettier

Making Quines Prettier

Below is the content of this page prettified. The <pre> element is prettified because it has class="prettyprint" and because the sourced script loads a JavaScript library that styles source code.

The line numbers to the left appear because the preceding comment <?prettify lang=html linenums=true?> turns on line-numbering and the stylesheet (see skin=sunburst in the <script src>) specifies that every fifth line should be numbered.







================================================
FILE: google-code-prettify/js-modules/combinePrefixPatterns.js
================================================
/**
 * Given a group of {@link RegExp}s, returns a {@code RegExp} that globally
 * matches the union of the sets of strings matched by the input RegExp.
 * Since it matches globally, if the input strings have a start-of-input
 * anchor (/^.../), it is ignored for the purposes of unioning.
 * @param {Array.} regexs non multiline, non-global regexs.
 * @return {RegExp} a global regex.
 */
function combinePrefixPatterns(regexs) {
  var capturedGroupIndex = 0;

  var needToFoldCase = false;
  var ignoreCase = false;
  for (var i = 0, n = regexs.length; i < n; ++i) {
    var regex = regexs[i];
    if (regex.ignoreCase) {
      ignoreCase = true;
    } else if (/[a-z]/i.test(regex.source.replace(
                   /\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi, ''))) {
      needToFoldCase = true;
      ignoreCase = false;
      break;
    }
  }

  var escapeCharToCodeUnit = {
    'b': 8,
    't': 9,
    'n': 0xa,
    'v': 0xb,
    'f': 0xc,
    'r': 0xd
  };

  function decodeEscape(charsetPart) {
    var cc0 = charsetPart.charCodeAt(0);
    if (cc0 !== 92 /* \\ */) {
      return cc0;
    }
    var c1 = charsetPart.charAt(1);
    cc0 = escapeCharToCodeUnit[c1];
    if (cc0) {
      return cc0;
    } else if ('0' <= c1 && c1 <= '7') {
      return parseInt(charsetPart.substring(1), 8);
    } else if (c1 === 'u' || c1 === 'x') {
      return parseInt(charsetPart.substring(2), 16);
    } else {
      return charsetPart.charCodeAt(1);
    }
  }

  function encodeEscape(charCode) {
    if (charCode < 0x20) {
      return (charCode < 0x10 ? '\\x0' : '\\x') + charCode.toString(16);
    }
    var ch = String.fromCharCode(charCode);
    return (ch === '\\' || ch === '-' || ch === ']' || ch === '^')
        ? "\\" + ch : ch;
  }

  function caseFoldCharset(charSet) {
    var charsetParts = charSet.substring(1, charSet.length - 1).match(
        new RegExp(
            '\\\\u[0-9A-Fa-f]{4}'
            + '|\\\\x[0-9A-Fa-f]{2}'
            + '|\\\\[0-3][0-7]{0,2}'
            + '|\\\\[0-7]{1,2}'
            + '|\\\\[\\s\\S]'
            + '|-'
            + '|[^-\\\\]',
            'g'));
    var ranges = [];
    var inverse = charsetParts[0] === '^';

    var out = ['['];
    if (inverse) { out.push('^'); }

    for (var i = inverse ? 1 : 0, n = charsetParts.length; i < n; ++i) {
      var p = charsetParts[i];
      if (/\\[bdsw]/i.test(p)) {  // Don't muck with named groups.
        out.push(p);
      } else {
        var start = decodeEscape(p);
        var end;
        if (i + 2 < n && '-' === charsetParts[i + 1]) {
          end = decodeEscape(charsetParts[i + 2]);
          i += 2;
        } else {
          end = start;
        }
        ranges.push([start, end]);
        // If the range might intersect letters, then expand it.
        // This case handling is too simplistic.
        // It does not deal with non-latin case folding.
        // It works for latin source code identifiers though.
        if (!(end < 65 || start > 122)) {
          if (!(end < 65 || start > 90)) {
            ranges.push([Math.max(65, start) | 32, Math.min(end, 90) | 32]);
          }
          if (!(end < 97 || start > 122)) {
            ranges.push([Math.max(97, start) & ~32, Math.min(end, 122) & ~32]);
          }
        }
      }
    }

    // [[1, 10], [3, 4], [8, 12], [14, 14], [16, 16], [17, 17]]
    // -> [[1, 12], [14, 14], [16, 17]]
    ranges.sort(function (a, b) { return (a[0] - b[0]) || (b[1]  - a[1]); });
    var consolidatedRanges = [];
    var lastRange = [];
    for (var i = 0; i < ranges.length; ++i) {
      var range = ranges[i];
      if (range[0] <= lastRange[1] + 1) {
        lastRange[1] = Math.max(lastRange[1], range[1]);
      } else {
        consolidatedRanges.push(lastRange = range);
      }
    }

    for (var i = 0; i < consolidatedRanges.length; ++i) {
      var range = consolidatedRanges[i];
      out.push(encodeEscape(range[0]));
      if (range[1] > range[0]) {
        if (range[1] + 1 > range[0]) { out.push('-'); }
        out.push(encodeEscape(range[1]));
      }
    }
    out.push(']');
    return out.join('');
  }

  function allowAnywhereFoldCaseAndRenumberGroups(regex) {
    // Split into character sets, escape sequences, punctuation strings
    // like ('(', '(?:', ')', '^'), and runs of characters that do not
    // include any of the above.
    var parts = regex.source.match(
        new RegExp(
            '(?:'
            + '\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]'  // a character set
            + '|\\\\u[A-Fa-f0-9]{4}'  // a unicode escape
            + '|\\\\x[A-Fa-f0-9]{2}'  // a hex escape
            + '|\\\\[0-9]+'  // a back-reference or octal escape
            + '|\\\\[^ux0-9]'  // other escape sequence
            + '|\\(\\?[:!=]'  // start of a non-capturing group
            + '|[\\(\\)\\^]'  // start/end of a group, or line start
            + '|[^\\x5B\\x5C\\(\\)\\^]+'  // run of other characters
            + ')',
            'g'));
    var n = parts.length;

    // Maps captured group numbers to the number they will occupy in
    // the output or to -1 if that has not been determined, or to
    // undefined if they need not be capturing in the output.
    var capturedGroups = [];

    // Walk over and identify back references to build the capturedGroups
    // mapping.
    for (var i = 0, groupIndex = 0; i < n; ++i) {
      var p = parts[i];
      if (p === '(') {
        // groups are 1-indexed, so max group index is count of '('
        ++groupIndex;
      } else if ('\\' === p.charAt(0)) {
        var decimalValue = +p.substring(1);
        if (decimalValue) {
          if (decimalValue <= groupIndex) {
            capturedGroups[decimalValue] = -1;
          } else {
            // Replace with an unambiguous escape sequence so that
            // an octal escape sequence does not turn into a backreference
            // to a capturing group from an earlier regex.
            parts[i] = encodeEscape(decimalValue);
          }
        }
      }
    }

    // Renumber groups and reduce capturing groups to non-capturing groups
    // where possible.
    for (var i = 1; i < capturedGroups.length; ++i) {
      if (-1 === capturedGroups[i]) {
        capturedGroups[i] = ++capturedGroupIndex;
      }
    }
    for (var i = 0, groupIndex = 0; i < n; ++i) {
      var p = parts[i];
      if (p === '(') {
        ++groupIndex;
        if (!capturedGroups[groupIndex]) {
          parts[i] = '(?:';
        }
      } else if ('\\' === p.charAt(0)) {
        var decimalValue = +p.substring(1);
        if (decimalValue && decimalValue <= groupIndex) {
          parts[i] = '\\' + capturedGroups[decimalValue];
        }
      }
    }

    // Remove any prefix anchors so that the output will match anywhere.
    // ^^ really does mean an anchored match though.
    for (var i = 0; i < n; ++i) {
      if ('^' === parts[i] && '^' !== parts[i + 1]) { parts[i] = ''; }
    }

    // Expand letters to groups to handle mixing of case-sensitive and
    // case-insensitive patterns if necessary.
    if (regex.ignoreCase && needToFoldCase) {
      for (var i = 0; i < n; ++i) {
        var p = parts[i];
        var ch0 = p.charAt(0);
        if (p.length >= 2 && ch0 === '[') {
          parts[i] = caseFoldCharset(p);
        } else if (ch0 !== '\\') {
          // TODO: handle letters in numeric escapes.
          parts[i] = p.replace(
              /[a-zA-Z]/g,
              function (ch) {
                var cc = ch.charCodeAt(0);
                return '[' + String.fromCharCode(cc & ~32, cc | 32) + ']';
              });
        }
      }
    }

    return parts.join('');
  }

  var rewritten = [];
  for (var i = 0, n = regexs.length; i < n; ++i) {
    var regex = regexs[i];
    if (regex.global || regex.multiline) { throw new Error('' + regex); }
    rewritten.push(
        '(?:' + allowAnywhereFoldCaseAndRenumberGroups(regex) + ')');
  }

  return new RegExp(rewritten.join('|'), ignoreCase ? 'gi' : 'g');
}


================================================
FILE: google-code-prettify/js-modules/externs.js
================================================
var PR = {};

/**
 * @param {function (Object)} handler
 * @param {Array.} fileExtensions
 */
PR.registerLangHandler = function registerLangHandler(handler, fileExtensions) {};

/**
 * @param {Array} shortcutStylePatterns
 * @param {Array} fallthroughStylePatterns
 * @return {function (Object)}
 */
PR.createSimpleLexer = function createSimpleLexer(
  shortcutStylePatterns, fallthroughStylePatterns) {};

/**
 * @param {Object} options a set of optional parameters.
 * @return {function (Object)} a function that examines the source code
 *     in the input job and builds the decoration list.
 */
PR.sourceDecorator = function sourceDecorator(options) {};


PR.PR_ATTRIB_NAME = 'atn';
PR.PR_ATTRIB_VALUE = 'atv';
PR.PR_COMMENT = 'com';
PR.PR_DECLARATION = 'dec';
PR.PR_KEYWORD = 'kwd';
PR.PR_LITERAL = 'lit';
PR.PR_NOCODE = 'nocode';
PR.PR_PLAIN = 'pln';
PR.PR_PUNCTUATION = 'pun';
PR.PR_SOURCE = 'src';
PR.PR_STRING = 'str';
PR.PR_TAG = 'tag';
PR.PR_TYPE = 'typ';


================================================
FILE: google-code-prettify/js-modules/extractSourceSpans.js
================================================
/**
 * Split markup into a string of source code and an array mapping ranges in
 * that string to the text nodes in which they appear.
 *
 * 

* The HTML DOM structure:

*
 * (Element   "p"
 *   (Element "b"
 *     (Text  "print "))       ; #1
 *   (Text    "'Hello '")      ; #2
 *   (Element "br")            ; #3
 *   (Text    "  + 'World';")) ; #4
 * 
*

* corresponds to the HTML * {@code

print 'Hello '
+ 'World';

}.

* *

* It will produce the output:

*
 * {
 *   sourceCode: "print 'Hello '\n  + 'World';",
 *   //                     1          2
 *   //           012345678901234 5678901234567
 *   spans: [0, #1, 6, #2, 14, #3, 15, #4]
 * }
 * 
*

* where #1 is a reference to the {@code "print "} text node above, and so * on for the other text nodes. *

* *

* The {@code} spans array is an array of pairs. Even elements are the start * indices of substrings, and odd elements are the text nodes (or BR elements) * that contain the text for those substrings. * Substrings continue until the next index or the end of the source. *

* * @param {Node} node an HTML DOM subtree containing source-code. * @param {boolean} isPreformatted true if white-space in text nodes should * be considered significant. * @return {Object} source code and the text nodes in which they occur. */ function extractSourceSpans(node, isPreformatted) { var nocode = /(?:^|\s)nocode(?:\s|$)/; var chunks = []; var length = 0; var spans = []; var k = 0; function walk(node) { var type = node.nodeType; if (type == 1) { // Element if (nocode.test(node.className)) { return; } for (var child = node.firstChild; child; child = child.nextSibling) { walk(child); } var nodeName = node.nodeName.toLowerCase(); if ('br' === nodeName || 'li' === nodeName) { chunks[k] = '\n'; spans[k << 1] = length++; spans[(k++ << 1) | 1] = node; } } else if (type == 3 || type == 4) { // Text var text = node.nodeValue; if (text.length) { if (!isPreformatted) { text = text.replace(/[ \t\r\n]+/g, ' '); } else { text = text.replace(/\r\n?/g, '\n'); // Normalize newlines. } // TODO: handle tabs here? chunks[k] = text; spans[k << 1] = length; length += text.length; spans[(k++ << 1) | 1] = node; } } } walk(node); return { sourceCode: chunks.join('').replace(/\n$/, ''), spans: spans }; } ================================================ FILE: google-code-prettify/js-modules/extractSourceSpans_test.html ================================================ Extract Source Spans Test

Extract Source Spans Test

Test space preserved in PRE
print 'Hello '
+ '<World>';
^print ^'Hello '^\n^  + '<World>';^
Test class="nocode"
1. print 'Hello '
2. + '<World>';
^print ^'Hello '^\n^  + '<World>';^
Test whitespace normalized in code
print 'Hello ' + '<World>';
^print ^'Hello ' + '<World>';^
Test XMP
print 'Hello ' + '<World>';
^print 'Hello '\n  + '<World>';^
Test tabs
print 'Hello '
	+ '<World>';
^print 'Hello '\n\t+ '<World>';^
Test number lines output
  • print 'Hello '
  • + '<World>';
^print ^'Hello '^\n^  + '<World>';^^

Last modified: Tue Mar 29 16:38:23 PDT 2011 ================================================ FILE: google-code-prettify/js-modules/js_include.pl ================================================ #!/usr/bin/perl # Given a JS file looks for lines like # include("path/to/file/to/include"); # and replaces them with the quoted file relative to the js-modules directory. # If the included file ends with ".pl" then it is treated as a perl file to # execute and the stdout is used as the JS to include. use strict; # Closure Compiler @define annotations that need to be pulled out of included # files because @defines need to be top-level vars. my $global_defs = ""; # Find @defines at the top of a JS file by pulling off comments and looking for # comments containing @define followed by a var declaration. sub extractGlobalDefs($) { my @headerComments; my $s = shift; while ($s) { last unless $s =~ m#^\s*(?://[^\r\n]*|/\*.*?\*/[ \t]*)[\r\n]*#s; my $comment = $&; $s = $'; if ($comment =~ /[\@]define/ && $s =~ /^\s*var\s+[^;]+;[ \t]*[\r\n]*/) { my $global = $&; $s = $'; $global =~ s/(var\s*IN_GLOBAL_SCOPE\s*=\s*)true\b/$1false/; $global_defs .= "$comment$global"; } else { push(@headerComments, $comment); } } return (join "", @headerComments) . $s; } # readInclude(whiteSpacePrefix, path) returns the JS content at path # (with the ".pl" adjustment above) and prepends each line with the # whitespace in whiteSpacePrefix to produce a chunk of JS that matches the # indentation of the including file. # @defines are extracted so that they can all appear globally at the top of # the file. sub readInclude($$) { my $prefix = shift; my $name = "js-modules/" . (shift); my $in; if ($name =~ /\.pl$/) { open($in, "perl $name|") or die "$name: $!"; } else { open($in, "<$name") or die "$name: $!"; } my $buf = ""; while (<$in>) { if (m/(\s*)include\("([^"]+)"\);\s*$/) { my $inc = extractGlobalDefs(readInclude("$prefix$1", $2)); $buf .= $inc; } else { $buf .= "$prefix$_"; } } close($in); return $buf; } my $target = shift; my $inc = readInclude("", $target); my $header = ""; # Put descriptive top level comments above the grouped @defines. if ($inc =~ s#^(?://[^\r\n]*|/\*.*?\*/|\s)+##s) { $header = $&; } my $globals = $global_defs; # Un-indent @defines. $globals =~ s#^[ \t]*##gm; $globals .= "\n" unless $globals eq ""; print "$header$globals$inc"; ================================================ FILE: google-code-prettify/js-modules/numberLines.js ================================================ /** * Given a DOM subtree, wraps it in a list, and puts each line into its own * list item. * * @param {Node} node modified in place. Its content is pulled into an * HTMLOListElement, and each line is moved into a separate list item. * This requires cloning elements, so the input might not have unique * IDs after numbering. * @param {boolean} isPreformatted true iff white-space in text nodes should * be treated as significant. */ function numberLines(node, opt_startLineNum, isPreformatted) { var nocode = /(?:^|\s)nocode(?:\s|$)/; var lineBreak = /\r\n?|\n/; var document = node.ownerDocument; var li = document.createElement('li'); while (node.firstChild) { li.appendChild(node.firstChild); } // An array of lines. We split below, so this is initialized to one // un-split line. var listItems = [li]; function walk(node) { var type = node.nodeType; if (type == 1 && !nocode.test(node.className)) { // Element if ('br' === node.nodeName) { breakAfter(node); // Discard the
since it is now flush against a . if (node.parentNode) { node.parentNode.removeChild(node); } } else { for (var child = node.firstChild; child; child = child.nextSibling) { walk(child); } } } else if ((type == 3 || type == 4) && isPreformatted) { // Text var text = node.nodeValue; var match = text.match(lineBreak); if (match) { var firstLine = text.substring(0, match.index); node.nodeValue = firstLine; var tail = text.substring(match.index + match[0].length); if (tail) { var parent = node.parentNode; parent.insertBefore( document.createTextNode(tail), node.nextSibling); } breakAfter(node); if (!firstLine) { // Don't leave blank text nodes in the DOM. node.parentNode.removeChild(node); } } } } // Split a line after the given node. function breakAfter(lineEndNode) { // If there's nothing to the right, then we can skip ending the line // here, and move root-wards since splitting just before an end-tag // would require us to create a bunch of empty copies. while (!lineEndNode.nextSibling) { lineEndNode = lineEndNode.parentNode; if (!lineEndNode) { return; } } function breakLeftOf(limit, copy) { // Clone shallowly if this node needs to be on both sides of the break. var rightSide = copy ? limit.cloneNode(false) : limit; var parent = limit.parentNode; if (parent) { // We clone the parent chain. // This helps us resurrect important styling elements that cross lines. // E.g. in Foo
Bar
// should be rewritten to
  • Foo
  • Bar
  • . var parentClone = breakLeftOf(parent, 1); // Move the clone and everything to the right of the original // onto the cloned parent. var next = limit.nextSibling; parentClone.appendChild(rightSide); for (var sibling = next; sibling; sibling = next) { next = sibling.nextSibling; parentClone.appendChild(sibling); } } return rightSide; } var copiedListItem = breakLeftOf(lineEndNode.nextSibling, 0); // Walk the parent chain until we reach an unattached LI. for (var parent; // Check nodeType since IE invents document fragments. (parent = copiedListItem.parentNode) && parent.nodeType === 1;) { copiedListItem = parent; } // Put it on the list of lines for later processing. listItems.push(copiedListItem); } // Split lines while there are lines left to split. for (var i = 0; // Number of lines that have been split so far. i < listItems.length; // length updated by breakAfter calls. ++i) { walk(listItems[i]); } // Make sure numeric indices show correctly. if (opt_startLineNum === (opt_startLineNum|0)) { listItems[0].setAttribute('value', opt_startLineNum); } var ol = document.createElement('ol'); ol.className = 'linenums'; var offset = Math.max(0, ((opt_startLineNum - 1 /* zero index */)) | 0) || 0; for (var i = 0, n = listItems.length; i < n; ++i) { li = listItems[i]; // Stick a class on the LIs so that stylesheets can // color odd/even rows, or any other row pattern that // is co-prime with 10. li.className = 'L' + ((i + offset) % 10); if (!li.firstChild) { li.appendChild(document.createTextNode('\xA0')); } ol.appendChild(li); } node.appendChild(ol); } ================================================ FILE: google-code-prettify/js-modules/numberLines_test.html ================================================ Number Lines Test

    Number Lines Test

    Test Nothing to Split
    Hello, World!
    1. Hello, World!
    Test Normalized Spaces
    Hello, World!
    1. Hello, World!
    Test BR
    Hello,
    World!
    1. Hello,
    2. World!
    Test line breaks
    Hello,
    there
    World!
    1. Hello,
    2. there
    3. World!
    Test line breaks with followers
    Hello,
    there
    World!
    
    1. Hello,
    2. there
    3. World!
    Test nocode
    Hello,
    there
    World!
    1. Hello,
    2. there World!
    Test link
    Hello,
    there
    World!
    1. Hello,
    2. there
    3. World!
    Test blank lines
    One
    
    Three
    1. One
    2.  
    3. Three

    Last modified: Tue Mar 29 16:44:05 PDT 2011 ================================================ FILE: google-code-prettify/js-modules/prettify.js ================================================ // Copyright (C) 2006 Google Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. /** * @fileoverview * some functions for browser-side pretty printing of code contained in html. * *

    * For a fairly comprehensive set of languages see the * README * file that came with this source. At a minimum, the lexer should work on a * number of languages including C and friends, Java, Python, Bash, SQL, HTML, * XML, CSS, Javascript, and Makefiles. It works passably on Ruby, PHP and Awk * and a subset of Perl, but, because of commenting conventions, doesn't work on * Smalltalk, Lisp-like, or CAML-like languages without an explicit lang class. *

    * Usage:

      *
    1. include this source file in an html page via * {@code } *
    2. define style rules. See the example page for examples. *
    3. mark the {@code
      } and {@code } tags in your source with
       *    {@code class=prettyprint.}
       *    You can also use the (html deprecated) {@code } tag, but the pretty
       *    printer needs to do more substantial DOM manipulations to support that, so
       *    some css styles may not be preserved.
       * </ol>
       * That's it.  I wanted to keep the API as simple as possible, so there's no
       * need to specify which language the code is in, but if you wish, you can add
       * another class to the {@code <pre>} or {@code <code>} element to specify the
       * language, as in {@code <pre class="prettyprint lang-java">}.  Any class that
       * starts with "lang-" followed by a file extension, specifies the file type.
       * See the "lang-*.js" files in this directory for code that implements
       * per-language file handlers.
       * <p>
       * Change log:<br>
       * cbeust, 2006/08/22
       * <blockquote>
       *   Java annotations (start with "@") are now captured as literals ("lit")
       * </blockquote>
       * @requires console
       */
      
      // JSLint declarations
      /*global console, document, navigator, setTimeout, window, define */
      
      /** @define {boolean} */
      var IN_GLOBAL_SCOPE = true;
      
      /**
       * Split {@code prettyPrint} into multiple timeouts so as not to interfere with
       * UI events.
       * If set to {@code false}, {@code prettyPrint()} is synchronous.
       */
      window['PR_SHOULD_USE_CONTINUATION'] = true;
      
      /**
       * Pretty print a chunk of code.
       * @param {string} sourceCodeHtml The HTML to pretty print.
       * @param {string} opt_langExtension The language name to use.
       *     Typically, a filename extension like 'cpp' or 'java'.
       * @param {number|boolean} opt_numberLines True to number lines,
       *     or the 1-indexed number of the first line in sourceCodeHtml.
       * @return {string} code as html, but prettier
       */
      var prettyPrintOne;
      /**
       * Find all the {@code <pre>} and {@code <code>} tags in the DOM with
       * {@code class=prettyprint} and prettify them.
       *
       * @param {Function} opt_whenDone called when prettifying is done.
       * @param {HTMLElement|HTMLDocument} opt_root an element or document
       *   containing all the elements to pretty print.
       *   Defaults to {@code document.body}.
       */
      var prettyPrint;
      
      
      (function () {
        var win = window;
        // Keyword lists for various languages.
        // We use things that coerce to strings to make them compact when minified
        // and to defeat aggressive optimizers that fold large string constants.
        var FLOW_CONTROL_KEYWORDS = ["break,continue,do,else,for,if,return,while"];
        var C_KEYWORDS = [FLOW_CONTROL_KEYWORDS,"auto,case,char,const,default," + 
            "double,enum,extern,float,goto,inline,int,long,register,short,signed," +
            "sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"];
        var COMMON_KEYWORDS = [C_KEYWORDS,"catch,class,delete,false,import," +
            "new,operator,private,protected,public,this,throw,true,try,typeof"];
        var CPP_KEYWORDS = [COMMON_KEYWORDS,"alignof,align_union,asm,axiom,bool," +
            "concept,concept_map,const_cast,constexpr,decltype,delegate," +
            "dynamic_cast,explicit,export,friend,generic,late_check," +
            "mutable,namespace,nullptr,property,reinterpret_cast,static_assert," +
            "static_cast,template,typeid,typename,using,virtual,where"];
        var JAVA_KEYWORDS = [COMMON_KEYWORDS,
            "abstract,assert,boolean,byte,extends,final,finally,implements,import," +
            "instanceof,interface,null,native,package,strictfp,super,synchronized," +
            "throws,transient"];
        var CSHARP_KEYWORDS = [JAVA_KEYWORDS,
            "as,base,by,checked,decimal,delegate,descending,dynamic,event," +
            "fixed,foreach,from,group,implicit,in,internal,into,is,let," +
            "lock,object,out,override,orderby,params,partial,readonly,ref,sbyte," +
            "sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort," +
            "var,virtual,where"];
        var COFFEE_KEYWORDS = "all,and,by,catch,class,else,extends,false,finally," +
            "for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then," +
            "throw,true,try,unless,until,when,while,yes";
        var JSCRIPT_KEYWORDS = [COMMON_KEYWORDS,
            "debugger,eval,export,function,get,null,set,undefined,var,with," +
            "Infinity,NaN"];
        var PERL_KEYWORDS = "caller,delete,die,do,dump,elsif,eval,exit,foreach,for," +
            "goto,if,import,last,local,my,next,no,our,print,package,redo,require," +
            "sub,undef,unless,until,use,wantarray,while,BEGIN,END";
        var PYTHON_KEYWORDS = [FLOW_CONTROL_KEYWORDS, "and,as,assert,class,def,del," +
            "elif,except,exec,finally,from,global,import,in,is,lambda," +
            "nonlocal,not,or,pass,print,raise,try,with,yield," +
            "False,True,None"];
        var RUBY_KEYWORDS = [FLOW_CONTROL_KEYWORDS, "alias,and,begin,case,class," +
            "def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo," +
            "rescue,retry,self,super,then,true,undef,unless,until,when,yield," +
            "BEGIN,END"];
         var RUST_KEYWORDS = [FLOW_CONTROL_KEYWORDS, "as,assert,const,copy,drop," +
            "enum,extern,fail,false,fn,impl,let,log,loop,match,mod,move,mut,priv," +
            "pub,pure,ref,self,static,struct,true,trait,type,unsafe,use"];
        var SH_KEYWORDS = [FLOW_CONTROL_KEYWORDS, "case,done,elif,esac,eval,fi," +
            "function,in,local,set,then,until"];
        var ALL_KEYWORDS = [
            CPP_KEYWORDS, CSHARP_KEYWORDS, JSCRIPT_KEYWORDS, PERL_KEYWORDS,
            PYTHON_KEYWORDS, RUBY_KEYWORDS, SH_KEYWORDS];
        var C_TYPES = /^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)\b/;
      
        // token style names.  correspond to css classes
        /**
         * token style for a string literal
         * @const
         */
        var PR_STRING = 'str';
        /**
         * token style for a keyword
         * @const
         */
        var PR_KEYWORD = 'kwd';
        /**
         * token style for a comment
         * @const
         */
        var PR_COMMENT = 'com';
        /**
         * token style for a type
         * @const
         */
        var PR_TYPE = 'typ';
        /**
         * token style for a literal value.  e.g. 1, null, true.
         * @const
         */
        var PR_LITERAL = 'lit';
        /**
         * token style for a punctuation string.
         * @const
         */
        var PR_PUNCTUATION = 'pun';
        /**
         * token style for plain text.
         * @const
         */
        var PR_PLAIN = 'pln';
      
        /**
         * token style for an sgml tag.
         * @const
         */
        var PR_TAG = 'tag';
        /**
         * token style for a markup declaration such as a DOCTYPE.
         * @const
         */
        var PR_DECLARATION = 'dec';
        /**
         * token style for embedded source.
         * @const
         */
        var PR_SOURCE = 'src';
        /**
         * token style for an sgml attribute name.
         * @const
         */
        var PR_ATTRIB_NAME = 'atn';
        /**
         * token style for an sgml attribute value.
         * @const
         */
        var PR_ATTRIB_VALUE = 'atv';
      
        /**
         * A class that indicates a section of markup that is not code, e.g. to allow
         * embedding of line numbers within code listings.
         * @const
         */
        var PR_NOCODE = 'nocode';
      
        include("regexpPrecederPatterns.pl");
      
        include("combinePrefixPatterns.js");
      
        include("extractSourceSpans.js");
      
        /**
         * Apply the given language handler to sourceCode and add the resulting
         * decorations to out.
         * @param {number} basePos the index of sourceCode within the chunk of source
         *    whose decorations are already present on out.
         */
        function appendDecorations(basePos, sourceCode, langHandler, out) {
          if (!sourceCode) { return; }
          var job = {
            sourceCode: sourceCode,
            basePos: basePos
          };
          langHandler(job);
          out.push.apply(out, job.decorations);
        }
      
        var notWs = /\S/;
      
        /**
         * Given an element, if it contains only one child element and any text nodes
         * it contains contain only space characters, return the sole child element.
         * Otherwise returns undefined.
         * <p>
         * This is meant to return the CODE element in {@code <pre><code ...>} when
         * there is a single child element that contains all the non-space textual
         * content, but not to return anything where there are multiple child elements
         * as in {@code <pre><code>...</code><code>...</code></pre>} or when there
         * is textual content.
         */
        function childContentWrapper(element) {
          var wrapper = undefined;
          for (var c = element.firstChild; c; c = c.nextSibling) {
            var type = c.nodeType;
            wrapper = (type === 1)  // Element Node
                ? (wrapper ? element : c)
                : (type === 3)  // Text Node
                ? (notWs.test(c.nodeValue) ? element : wrapper)
                : wrapper;
          }
          return wrapper === element ? undefined : wrapper;
        }
      
        /** Given triples of [style, pattern, context] returns a lexing function,
          * The lexing function interprets the patterns to find token boundaries and
          * returns a decoration list of the form
          * [index_0, style_0, index_1, style_1, ..., index_n, style_n]
          * where index_n is an index into the sourceCode, and style_n is a style
          * constant like PR_PLAIN.  index_n-1 <= index_n, and style_n-1 applies to
          * all characters in sourceCode[index_n-1:index_n].
          *
          * The stylePatterns is a list whose elements have the form
          * [style : string, pattern : RegExp, DEPRECATED, shortcut : string].
          *
          * Style is a style constant like PR_PLAIN, or can be a string of the
          * form 'lang-FOO', where FOO is a language extension describing the
          * language of the portion of the token in $1 after pattern executes.
          * E.g., if style is 'lang-lisp', and group 1 contains the text
          * '(hello (world))', then that portion of the token will be passed to the
          * registered lisp handler for formatting.
          * The text before and after group 1 will be restyled using this decorator
          * so decorators should take care that this doesn't result in infinite
          * recursion.  For example, the HTML lexer rule for SCRIPT elements looks
          * something like ['lang-js', /<[s]cript>(.+?)<\/script>/].  This may match
          * '<script>foo()<\/script>', which would cause the current decorator to
          * be called with '<script>' which would not match the same rule since
          * group 1 must not be empty, so it would be instead styled as PR_TAG by
          * the generic tag rule.  The handler registered for the 'js' extension would
          * then be called with 'foo()', and finally, the current decorator would
          * be called with '<\/script>' which would not match the original rule and
          * so the generic tag rule would identify it as a tag.
          *
          * Pattern must only match prefixes, and if it matches a prefix, then that
          * match is considered a token with the same style.
          *
          * Context is applied to the last non-whitespace, non-comment token
          * recognized.
          *
          * Shortcut is an optional string of characters, any of which, if the first
          * character, gurantee that this pattern and only this pattern matches.
          *
          * @param {Array} shortcutStylePatterns patterns that always start with
          *   a known character.  Must have a shortcut string.
          * @param {Array} fallthroughStylePatterns patterns that will be tried in
          *   order if the shortcut ones fail.  May have shortcuts.
          *
          * @return {function (Object)} a
          *   function that takes source code and returns a list of decorations.
          */
        function createSimpleLexer(shortcutStylePatterns, fallthroughStylePatterns) {
          var shortcuts = {};
          var tokenizer;
          (function () {
            var allPatterns = shortcutStylePatterns.concat(fallthroughStylePatterns);
            var allRegexs = [];
            var regexKeys = {};
            for (var i = 0, n = allPatterns.length; i < n; ++i) {
              var patternParts = allPatterns[i];
              var shortcutChars = patternParts[3];
              if (shortcutChars) {
                for (var c = shortcutChars.length; --c >= 0;) {
                  shortcuts[shortcutChars.charAt(c)] = patternParts;
                }
              }
              var regex = patternParts[1];
              var k = '' + regex;
              if (!regexKeys.hasOwnProperty(k)) {
                allRegexs.push(regex);
                regexKeys[k] = null;
              }
            }
            allRegexs.push(/[\0-\uffff]/);
            tokenizer = combinePrefixPatterns(allRegexs);
          })();
      
          var nPatterns = fallthroughStylePatterns.length;
      
          /**
           * Lexes job.sourceCode and produces an output array job.decorations of
           * style classes preceded by the position at which they start in
           * job.sourceCode in order.
           *
           * @param {Object} job an object like <pre>{
           *    sourceCode: {string} sourceText plain text,
           *    basePos: {int} position of job.sourceCode in the larger chunk of
           *        sourceCode.
           * }</pre>
           */
          var decorate = function (job) {
            var sourceCode = job.sourceCode, basePos = job.basePos;
            /** Even entries are positions in source in ascending order.  Odd enties
              * are style markers (e.g., PR_COMMENT) that run from that position until
              * the end.
              * @type {Array.<number|string>}
              */
            var decorations = [basePos, PR_PLAIN];
            var pos = 0;  // index into sourceCode
            var tokens = sourceCode.match(tokenizer) || [];
            var styleCache = {};
      
            for (var ti = 0, nTokens = tokens.length; ti < nTokens; ++ti) {
              var token = tokens[ti];
              var style = styleCache[token];
              var match = void 0;
      
              var isEmbedded;
              if (typeof style === 'string') {
                isEmbedded = false;
              } else {
                var patternParts = shortcuts[token.charAt(0)];
                if (patternParts) {
                  match = token.match(patternParts[1]);
                  style = patternParts[0];
                } else {
                  for (var i = 0; i < nPatterns; ++i) {
                    patternParts = fallthroughStylePatterns[i];
                    match = token.match(patternParts[1]);
                    if (match) {
                      style = patternParts[0];
                      break;
                    }
                  }
      
                  if (!match) {  // make sure that we make progress
                    style = PR_PLAIN;
                  }
                }
      
                isEmbedded = style.length >= 5 && 'lang-' === style.substring(0, 5);
                if (isEmbedded && !(match && typeof match[1] === 'string')) {
                  isEmbedded = false;
                  style = PR_SOURCE;
                }
      
                if (!isEmbedded) { styleCache[token] = style; }
              }
      
              var tokenStart = pos;
              pos += token.length;
      
              if (!isEmbedded) {
                decorations.push(basePos + tokenStart, style);
              } else {  // Treat group 1 as an embedded block of source code.
                var embeddedSource = match[1];
                var embeddedSourceStart = token.indexOf(embeddedSource);
                var embeddedSourceEnd = embeddedSourceStart + embeddedSource.length;
                if (match[2]) {
                  // If embeddedSource can be blank, then it would match at the
                  // beginning which would cause us to infinitely recurse on the
                  // entire token, so we catch the right context in match[2].
                  embeddedSourceEnd = token.length - match[2].length;
                  embeddedSourceStart = embeddedSourceEnd - embeddedSource.length;
                }
                var lang = style.substring(5);
                // Decorate the left of the embedded source
                appendDecorations(
                    basePos + tokenStart,
                    token.substring(0, embeddedSourceStart),
                    decorate, decorations);
                // Decorate the embedded source
                appendDecorations(
                    basePos + tokenStart + embeddedSourceStart,
                    embeddedSource,
                    langHandlerForExtension(lang, embeddedSource),
                    decorations);
                // Decorate the right of the embedded section
                appendDecorations(
                    basePos + tokenStart + embeddedSourceEnd,
                    token.substring(embeddedSourceEnd),
                    decorate, decorations);
              }
            }
            job.decorations = decorations;
          };
          return decorate;
        }
      
        /** returns a function that produces a list of decorations from source text.
          *
          * This code treats ", ', and ` as string delimiters, and \ as a string
          * escape.  It does not recognize perl's qq() style strings.
          * It has no special handling for double delimiter escapes as in basic, or
          * the tripled delimiters used in python, but should work on those regardless
          * although in those cases a single string literal may be broken up into
          * multiple adjacent string literals.
          *
          * It recognizes C, C++, and shell style comments.
          *
          * @param {Object} options a set of optional parameters.
          * @return {function (Object)} a function that examines the source code
          *     in the input job and builds the decoration list.
          */
        function sourceDecorator(options) {
          var shortcutStylePatterns = [], fallthroughStylePatterns = [];
          if (options['tripleQuotedStrings']) {
            // '''multi-line-string''', 'single-line-string', and double-quoted
            shortcutStylePatterns.push(
                [PR_STRING,  /^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,
                 null, '\'"']);
          } else if (options['multiLineStrings']) {
            // 'multi-line-string', "multi-line-string"
            shortcutStylePatterns.push(
                [PR_STRING,  /^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,
                 null, '\'"`']);
          } else {
            // 'single-line-string', "single-line-string"
            shortcutStylePatterns.push(
                [PR_STRING,
                 /^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,
                 null, '"\'']);
          }
          if (options['verbatimStrings']) {
            // verbatim-string-literal production from the C# grammar.  See issue 93.
            fallthroughStylePatterns.push(
                [PR_STRING, /^@\"(?:[^\"]|\"\")*(?:\"|$)/, null]);
          }
          var hc = options['hashComments'];
          if (hc) {
            if (options['cStyleComments']) {
              if (hc > 1) {  // multiline hash comments
                shortcutStylePatterns.push(
                    [PR_COMMENT, /^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/, null, '#']);
              } else {
                // Stop C preprocessor declarations at an unclosed open comment
                shortcutStylePatterns.push(
                    [PR_COMMENT, /^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,
                     null, '#']);
              }
              // #include <stdio.h>
              fallthroughStylePatterns.push(
                  [PR_STRING,
                   /^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,
                   null]);
            } else {
              shortcutStylePatterns.push([PR_COMMENT, /^#[^\r\n]*/, null, '#']);
            }
          }
          if (options['cStyleComments']) {
            fallthroughStylePatterns.push([PR_COMMENT, /^\/\/[^\r\n]*/, null]);
            fallthroughStylePatterns.push(
                [PR_COMMENT, /^\/\*[\s\S]*?(?:\*\/|$)/, null]);
          }
          var regexLiterals = options['regexLiterals'];
          if (regexLiterals) {
            /**
             * @const
             */
            var regexExcls = regexLiterals > 1
              ? ''  // Multiline regex literals
              : '\n\r';
            /**
             * @const
             */
            var regexAny = regexExcls ? '.' : '[\\S\\s]';
            /**
             * @const
             */
            var REGEX_LITERAL = (
                // A regular expression literal starts with a slash that is
                // not followed by * or / so that it is not confused with
                // comments.
                '/(?=[^/*' + regexExcls + '])'
                // and then contains any number of raw characters,
                + '(?:[^/\\x5B\\x5C' + regexExcls + ']'
                // escape sequences (\x5C),
                +    '|\\x5C' + regexAny
                // or non-nesting character sets (\x5B\x5D);
                +    '|\\x5B(?:[^\\x5C\\x5D' + regexExcls + ']'
                +             '|\\x5C' + regexAny + ')*(?:\\x5D|$))+'
                // finally closed by a /.
                + '/');
            fallthroughStylePatterns.push(
                ['lang-regex',
                 RegExp('^' + REGEXP_PRECEDER_PATTERN + '(' + REGEX_LITERAL + ')')
                 ]);
          }
      
          var types = options['types'];
          if (types) {
            fallthroughStylePatterns.push([PR_TYPE, types]);
          }
      
          var keywords = ("" + options['keywords']).replace(/^ | $/g, '');
          if (keywords.length) {
            fallthroughStylePatterns.push(
                [PR_KEYWORD,
                 new RegExp('^(?:' + keywords.replace(/[\s,]+/g, '|') + ')\\b'),
                 null]);
          }
      
          shortcutStylePatterns.push([PR_PLAIN,       /^\s+/, null, ' \r\n\t\xA0']);
      
          var punctuation =
            // The Bash man page says
      
            // A word is a sequence of characters considered as a single
            // unit by GRUB. Words are separated by metacharacters,
            // which are the following plus space, tab, and newline: { }
            // | & $ ; < >
            // ...
            
            // A word beginning with # causes that word and all remaining
            // characters on that line to be ignored.
      
            // which means that only a '#' after /(?:^|[{}|&$;<>\s])/ starts a
            // comment but empirically
            // $ echo {#}
            // {#}
            // $ echo \$#
            // $#
            // $ echo }#
            // }#
      
            // so /(?:^|[|&;<>\s])/ is more appropriate.
      
            // http://gcc.gnu.org/onlinedocs/gcc-2.95.3/cpp_1.html#SEC3
            // suggests that this definition is compatible with a
            // default mode that tries to use a single token definition
            // to recognize both bash/python style comments and C
            // preprocessor directives.
      
            // This definition of punctuation does not include # in the list of
            // follow-on exclusions, so # will not be broken before if preceeded
            // by a punctuation character.  We could try to exclude # after
            // [|&;<>] but that doesn't seem to cause many major problems.
            // If that does turn out to be a problem, we should change the below
            // when hc is truthy to include # in the run of punctuation characters
            // only when not followint [|&;<>].
            '^.[^\\s\\w.$@\'"`/\\\\]*';
          if (options['regexLiterals']) {
            punctuation += '(?!\s*\/)';
          }
      
          fallthroughStylePatterns.push(
              // TODO(mikesamuel): recognize non-latin letters and numerals in idents
              [PR_LITERAL,     /^@[a-z_$][a-z_$@0-9]*/i, null],
              [PR_TYPE,        /^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/, null],
              [PR_PLAIN,       /^[a-z_$][a-z_$@0-9]*/i, null],
              [PR_LITERAL,
               new RegExp(
                   '^(?:'
                   // A hex number
                   + '0x[a-f0-9]+'
                   // or an octal or decimal number,
                   + '|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)'
                   // possibly in scientific notation
                   + '(?:e[+\\-]?\\d+)?'
                   + ')'
                   // with an optional modifier like UL for unsigned long
                   + '[a-z]*', 'i'),
               null, '0123456789'],
              // Don't treat escaped quotes in bash as starting strings.
              // See issue 144.
              [PR_PLAIN,       /^\\[\s\S]?/, null],
              [PR_PUNCTUATION, new RegExp(punctuation), null]);
      
          return createSimpleLexer(shortcutStylePatterns, fallthroughStylePatterns);
        }
      
        var decorateSource = sourceDecorator({
              'keywords': ALL_KEYWORDS,
              'hashComments': true,
              'cStyleComments': true,
              'multiLineStrings': true,
              'regexLiterals': true
            });
      
        include("numberLines.js");
      
        include("recombineTagsAndDecorations.js");
      
        /** Maps language-specific file extensions to handlers. */
        var langHandlerRegistry = {};
        /** Register a language handler for the given file extensions.
          * @param {function (Object)} handler a function from source code to a list
          *      of decorations.  Takes a single argument job which describes the
          *      state of the computation.   The single parameter has the form
          *      {@code {
          *        sourceCode: {string} as plain text.
          *        decorations: {Array.<number|string>} an array of style classes
          *                     preceded by the position at which they start in
          *                     job.sourceCode in order.
          *                     The language handler should assigned this field.
          *        basePos: {int} the position of source in the larger source chunk.
          *                 All positions in the output decorations array are relative
          *                 to the larger source chunk.
          *      } }
          * @param {Array.<string>} fileExtensions
          */
        function registerLangHandler(handler, fileExtensions) {
          for (var i = fileExtensions.length; --i >= 0;) {
            var ext = fileExtensions[i];
            if (!langHandlerRegistry.hasOwnProperty(ext)) {
              langHandlerRegistry[ext] = handler;
            } else if (win['console']) {
              console['warn']('cannot override language handler %s', ext);
            }
          }
        }
        function langHandlerForExtension(extension, source) {
          if (!(extension && langHandlerRegistry.hasOwnProperty(extension))) {
            // Treat it as markup if the first non whitespace character is a < and
            // the last non-whitespace character is a >.
            extension = /^\s*</.test(source)
                ? 'default-markup'
                : 'default-code';
          }
          return langHandlerRegistry[extension];
        }
        registerLangHandler(decorateSource, ['default-code']);
        registerLangHandler(
            createSimpleLexer(
                [],
                [
                 [PR_PLAIN,       /^[^<?]+/],
                 [PR_DECLARATION, /^<!\w[^>]*(?:>|$)/],
                 [PR_COMMENT,     /^<\!--[\s\S]*?(?:-\->|$)/],
                 // Unescaped content in an unknown language
                 ['lang-',        /^<\?([\s\S]+?)(?:\?>|$)/],
                 ['lang-',        /^<%([\s\S]+?)(?:%>|$)/],
                 [PR_PUNCTUATION, /^(?:<[%?]|[%?]>)/],
                 ['lang-',        /^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i],
                 // Unescaped content in javascript.  (Or possibly vbscript).
                 ['lang-js',      /^<script\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],
                 // Contains unescaped stylesheet content
                 ['lang-css',     /^<style\b[^>]*>([\s\S]*?)(<\/style\b[^>]*>)/i],
                 ['lang-in.tag',  /^(<\/?[a-z][^<>]*>)/i]
                ]),
            ['default-markup', 'htm', 'html', 'mxml', 'xhtml', 'xml', 'xsl']);
        registerLangHandler(
            createSimpleLexer(
                [
                 [PR_PLAIN,        /^[\s]+/, null, ' \t\r\n'],
                 [PR_ATTRIB_VALUE, /^(?:\"[^\"]*\"?|\'[^\']*\'?)/, null, '\"\'']
                 ],
                [
                 [PR_TAG,          /^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],
                 [PR_ATTRIB_NAME,  /^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],
                 ['lang-uq.val',   /^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],
                 [PR_PUNCTUATION,  /^[=<>\/]+/],
                 ['lang-js',       /^on\w+\s*=\s*\"([^\"]+)\"/i],
                 ['lang-js',       /^on\w+\s*=\s*\'([^\']+)\'/i],
                 ['lang-js',       /^on\w+\s*=\s*([^\"\'>\s]+)/i],
                 ['lang-css',      /^style\s*=\s*\"([^\"]+)\"/i],
                 ['lang-css',      /^style\s*=\s*\'([^\']+)\'/i],
                 ['lang-css',      /^style\s*=\s*([^\"\'>\s]+)/i]
                 ]),
            ['in.tag']);
        registerLangHandler(
            createSimpleLexer([], [[PR_ATTRIB_VALUE, /^[\s\S]+/]]), ['uq.val']);
        registerLangHandler(sourceDecorator({
                'keywords': CPP_KEYWORDS,
                'hashComments': true,
                'cStyleComments': true,
                'types': C_TYPES
              }), ['c', 'cc', 'cpp', 'cxx', 'cyc', 'm']);
        registerLangHandler(sourceDecorator({
                'keywords': 'null,true,false'
              }), ['json']);
        registerLangHandler(sourceDecorator({
                'keywords': CSHARP_KEYWORDS,
                'hashComments': true,
                'cStyleComments': true,
                'verbatimStrings': true,
                'types': C_TYPES
              }), ['cs']);
        registerLangHandler(sourceDecorator({
                'keywords': JAVA_KEYWORDS,
                'cStyleComments': true
              }), ['java']);
        registerLangHandler(sourceDecorator({
                'keywords': SH_KEYWORDS,
                'hashComments': true,
                'multiLineStrings': true
              }), ['bash', 'bsh', 'csh', 'sh']);
        registerLangHandler(sourceDecorator({
                'keywords': PYTHON_KEYWORDS,
                'hashComments': true,
                'multiLineStrings': true,
                'tripleQuotedStrings': true
              }), ['cv', 'py', 'python']);
        registerLangHandler(sourceDecorator({
                'keywords': PERL_KEYWORDS,
                'hashComments': true,
                'multiLineStrings': true,
                'regexLiterals': 2  // multiline regex literals
              }), ['perl', 'pl', 'pm']);
        registerLangHandler(sourceDecorator({
                'keywords': RUBY_KEYWORDS,
                'hashComments': true,
                'multiLineStrings': true,
                'regexLiterals': true
              }), ['rb', 'ruby']);
        registerLangHandler(sourceDecorator({
                'keywords': JSCRIPT_KEYWORDS,
                'cStyleComments': true,
                'regexLiterals': true
              }), ['javascript', 'js']);
        registerLangHandler(sourceDecorator({
                'keywords': COFFEE_KEYWORDS,
                'hashComments': 3,  // ### style block comments
                'cStyleComments': true,
                'multilineStrings': true,
                'tripleQuotedStrings': true,
                'regexLiterals': true
              }), ['coffee']);
        registerLangHandler(sourceDecorator({
                'keywords': RUST_KEYWORDS,
                'cStyleComments': true,
                'multilineStrings': true
              }), ['rc', 'rs', 'rust']);
        registerLangHandler(
            createSimpleLexer([], [[PR_STRING, /^[\s\S]+/]]), ['regex']);
      
        function applyDecorator(job) {
          var opt_langExtension = job.langExtension;
      
          try {
            // Extract tags, and convert the source code to plain text.
            var sourceAndSpans = extractSourceSpans(job.sourceNode, job.pre);
            /** Plain text. @type {string} */
            var source = sourceAndSpans.sourceCode;
            job.sourceCode = source;
            job.spans = sourceAndSpans.spans;
            job.basePos = 0;
      
            // Apply the appropriate language handler
            langHandlerForExtension(opt_langExtension, source)(job);
      
            // Integrate the decorations and tags back into the source code,
            // modifying the sourceNode in place.
            recombineTagsAndDecorations(job);
          } catch (e) {
            if (win['console']) {
              console['log'](e && e['stack'] || e);
            }
          }
        }
      
        /**
         * Pretty print a chunk of code.
         * @param sourceCodeHtml {string} The HTML to pretty print.
         * @param opt_langExtension {string} The language name to use.
         *     Typically, a filename extension like 'cpp' or 'java'.
         * @param opt_numberLines {number|boolean} True to number lines,
         *     or the 1-indexed number of the first line in sourceCodeHtml.
         */
        function $prettyPrintOne(sourceCodeHtml, opt_langExtension, opt_numberLines) {
          var container = document.createElement('div');
          // This could cause images to load and onload listeners to fire.
          // E.g. <img onerror="alert(1337)" src="nosuchimage.png">.
          // We assume that the inner HTML is from a trusted source.
          // The pre-tag is required for IE8 which strips newlines from innerHTML
          // when it is injected into a <pre> tag.
          // http://stackoverflow.com/questions/451486/pre-tag-loses-line-breaks-when-setting-innerhtml-in-ie
          // http://stackoverflow.com/questions/195363/inserting-a-newline-into-a-pre-tag-ie-javascript
          container.innerHTML = '<pre>' + sourceCodeHtml + '</pre>';
          container = container.firstChild;
          if (opt_numberLines) {
            numberLines(container, opt_numberLines, true);
          }
      
          var job = {
            langExtension: opt_langExtension,
            numberLines: opt_numberLines,
            sourceNode: container,
            pre: 1
          };
          applyDecorator(job);
          return container.innerHTML;
        }
      
         /**
          * Find all the {@code <pre>} and {@code <code>} tags in the DOM with
          * {@code class=prettyprint} and prettify them.
          *
          * @param {Function} opt_whenDone called when prettifying is done.
          * @param {HTMLElement|HTMLDocument} opt_root an element or document
          *   containing all the elements to pretty print.
          *   Defaults to {@code document.body}.
          */
        function $prettyPrint(opt_whenDone, opt_root) {
          var root = opt_root || document.body;
          var doc = root.ownerDocument || document;
          function byTagName(tn) { return root.getElementsByTagName(tn); }
          // fetch a list of nodes to rewrite
          var codeSegments = [byTagName('pre'), byTagName('code'), byTagName('xmp')];
          var elements = [];
          for (var i = 0; i < codeSegments.length; ++i) {
            for (var j = 0, n = codeSegments[i].length; j < n; ++j) {
              elements.push(codeSegments[i][j]);
            }
          }
          codeSegments = null;
      
          var clock = Date;
          if (!clock['now']) {
            clock = { 'now': function () { return +(new Date); } };
          }
      
          // The loop is broken into a series of continuations to make sure that we
          // don't make the browser unresponsive when rewriting a large page.
          var k = 0;
          var prettyPrintingJob;
      
          var langExtensionRe = /\blang(?:uage)?-([\w.]+)(?!\S)/;
          var prettyPrintRe = /\bprettyprint\b/;
          var prettyPrintedRe = /\bprettyprinted\b/;
          var preformattedTagNameRe = /pre|xmp/i;
          var codeRe = /^code$/i;
          var preCodeXmpRe = /^(?:pre|code|xmp)$/i;
          var EMPTY = {};
      
          function doWork() {
            var endTime = (win['PR_SHOULD_USE_CONTINUATION'] ?
                           clock['now']() + 250 /* ms */ :
                           Infinity);
            for (; k < elements.length && clock['now']() < endTime; k++) {
              var cs = elements[k];
      
              // Look for a preceding comment like
              // <?prettify lang="..." linenums="..."?>
              var attrs = EMPTY;
              {
                for (var preceder = cs; (preceder = preceder.previousSibling);) {
                  var nt = preceder.nodeType;
                  // <?foo?> is parsed by HTML 5 to a comment node (8)
                  // like <!--?foo?-->, but in XML is a processing instruction
                  var value = (nt === 7 || nt === 8) && preceder.nodeValue;
                  if (value
                      ? !/^\??prettify\b/.test(value)
                      : (nt !== 3 || /\S/.test(preceder.nodeValue))) {
                    // Skip over white-space text nodes but not others.
                    break;
                  }
                  if (value) {
                    attrs = {};
                    value.replace(
                        /\b(\w+)=([\w:.%+-]+)/g,
                      function (_, name, value) { attrs[name] = value; });
                    break;
                  }
                }
              }
      
              var className = cs.className;
              if ((attrs !== EMPTY || prettyPrintRe.test(className))
                  // Don't redo this if we've already done it.
                  // This allows recalling pretty print to just prettyprint elements
                  // that have been added to the page since last call.
                  && !prettyPrintedRe.test(className)) {
      
                // make sure this is not nested in an already prettified element
                var nested = false;
                for (var p = cs.parentNode; p; p = p.parentNode) {
                  var tn = p.tagName;
                  if (preCodeXmpRe.test(tn)
                      && p.className && prettyPrintRe.test(p.className)) {
                    nested = true;
                    break;
                  }
                }
                if (!nested) {
                  // Mark done.  If we fail to prettyprint for whatever reason,
                  // we shouldn't try again.
                  cs.className += ' prettyprinted';
      
                  // If the classes includes a language extensions, use it.
                  // Language extensions can be specified like
                  //     <pre class="prettyprint lang-cpp">
                  // the language extension "cpp" is used to find a language handler
                  // as passed to PR.registerLangHandler.
                  // HTML5 recommends that a language be specified using "language-"
                  // as the prefix instead.  Google Code Prettify supports both.
                  // http://dev.w3.org/html5/spec-author-view/the-code-element.html
                  var langExtension = attrs['lang'];
                  if (!langExtension) {
                    langExtension = className.match(langExtensionRe);
                    // Support <pre class="prettyprint"><code class="language-c">
                    var wrapper;
                    if (!langExtension && (wrapper = childContentWrapper(cs))
                        && codeRe.test(wrapper.tagName)) {
                      langExtension = wrapper.className.match(langExtensionRe);
                    }
      
                    if (langExtension) { langExtension = langExtension[1]; }
                  }
      
                  var preformatted;
                  if (preformattedTagNameRe.test(cs.tagName)) {
                    preformatted = 1;
                  } else {
                    var currentStyle = cs['currentStyle'];
                    var defaultView = doc.defaultView;
                    var whitespace = (
                        currentStyle
                        ? currentStyle['whiteSpace']
                        : (defaultView
                           && defaultView.getComputedStyle)
                        ? defaultView.getComputedStyle(cs, null)
                        .getPropertyValue('white-space')
                        : 0);
                    preformatted = whitespace
                        && 'pre' === whitespace.substring(0, 3);
                  }
      
                  // Look for a class like linenums or linenums:<n> where <n> is the
                  // 1-indexed number of the first line.
                  var lineNums = attrs['linenums'];
                  if (!(lineNums = lineNums === 'true' || +lineNums)) {
                    lineNums = className.match(/\blinenums\b(?::(\d+))?/);
                    lineNums =
                      lineNums
                      ? lineNums[1] && lineNums[1].length
                        ? +lineNums[1] : true
                      : false;
                  }
                  if (lineNums) { numberLines(cs, lineNums, preformatted); }
      
                  // do the pretty printing
                  prettyPrintingJob = {
                    langExtension: langExtension,
                    sourceNode: cs,
                    numberLines: lineNums,
                    pre: preformatted
                  };
                  applyDecorator(prettyPrintingJob);
                }
              }
            }
            if (k < elements.length) {
              // finish up in a continuation
              setTimeout(doWork, 250);
            } else if ('function' === typeof opt_whenDone) {
              opt_whenDone();
            }
          }
      
          doWork();
        }
      
        /**
         * Contains functions for creating and registering new language handlers.
         * @type {Object}
         */
        var PR = win['PR'] = {
              'createSimpleLexer': createSimpleLexer,
              'registerLangHandler': registerLangHandler,
              'sourceDecorator': sourceDecorator,
              'PR_ATTRIB_NAME': PR_ATTRIB_NAME,
              'PR_ATTRIB_VALUE': PR_ATTRIB_VALUE,
              'PR_COMMENT': PR_COMMENT,
              'PR_DECLARATION': PR_DECLARATION,
              'PR_KEYWORD': PR_KEYWORD,
              'PR_LITERAL': PR_LITERAL,
              'PR_NOCODE': PR_NOCODE,
              'PR_PLAIN': PR_PLAIN,
              'PR_PUNCTUATION': PR_PUNCTUATION,
              'PR_SOURCE': PR_SOURCE,
              'PR_STRING': PR_STRING,
              'PR_TAG': PR_TAG,
              'PR_TYPE': PR_TYPE,
              'prettyPrintOne':
                 IN_GLOBAL_SCOPE
                   ? (win['prettyPrintOne'] = $prettyPrintOne)
                   : (prettyPrintOne = $prettyPrintOne),
              'prettyPrint': prettyPrint =
                 IN_GLOBAL_SCOPE
                   ? (win['prettyPrint'] = $prettyPrint)
                   : (prettyPrint = $prettyPrint)
            };
      
        // Make PR available via the Asynchronous Module Definition (AMD) API.
        // Per https://github.com/amdjs/amdjs-api/wiki/AMD:
        // The Asynchronous Module Definition (AMD) API specifies a
        // mechanism for defining modules such that the module and its
        // dependencies can be asynchronously loaded.
        // ...
        // To allow a clear indicator that a global define function (as
        // needed for script src browser loading) conforms to the AMD API,
        // any global define function SHOULD have a property called "amd"
        // whose value is an object. This helps avoid conflict with any
        // other existing JavaScript code that could have defined a define()
        // function that does not conform to the AMD API.
        if (typeof define === "function" && define['amd']) {
          define("google-code-prettify", [], function () {
            return PR; 
          });
        }
      })();
      
      
      ================================================
      FILE: google-code-prettify/js-modules/recombineTagsAndDecorations.js
      ================================================
      /**
       * Breaks {@code job.sourceCode} around style boundaries in
       * {@code job.decorations} and modifies {@code job.sourceNode} in place.
       * @param {Object} job like <pre>{
       *    sourceCode: {string} source as plain text,
       *    sourceNode: {HTMLElement} the element containing the source,
       *    spans: {Array.<number|Node>} alternating span start indices into source
       *       and the text node or element (e.g. {@code <BR>}) corresponding to that
       *       span.
       *    decorations: {Array.<number|string} an array of style classes preceded
       *       by the position at which they start in job.sourceCode in order
       * }</pre>
       * @private
       */
      function recombineTagsAndDecorations(job) {
        var isIE8OrEarlier = /\bMSIE\s(\d+)/.exec(navigator.userAgent);
        isIE8OrEarlier = isIE8OrEarlier && +isIE8OrEarlier[1] <= 8;
        var newlineRe = /\n/g;
      
        var source = job.sourceCode;
        var sourceLength = source.length;
        // Index into source after the last code-unit recombined.
        var sourceIndex = 0;
      
        var spans = job.spans;
        var nSpans = spans.length;
        // Index into spans after the last span which ends at or before sourceIndex.
        var spanIndex = 0;
      
        var decorations = job.decorations;
        var nDecorations = decorations.length;
        // Index into decorations after the last decoration which ends at or before
        // sourceIndex.
        var decorationIndex = 0;
      
        // Remove all zero-length decorations.
        decorations[nDecorations] = sourceLength;
        var decPos, i;
        for (i = decPos = 0; i < nDecorations;) {
          if (decorations[i] !== decorations[i + 2]) {
            decorations[decPos++] = decorations[i++];
            decorations[decPos++] = decorations[i++];
          } else {
            i += 2;
          }
        }
        nDecorations = decPos;
      
        // Simplify decorations.
        for (i = decPos = 0; i < nDecorations;) {
          var startPos = decorations[i];
          // Conflate all adjacent decorations that use the same style.
          var startDec = decorations[i + 1];
          var end = i + 2;
          while (end + 2 <= nDecorations && decorations[end + 1] === startDec) {
            end += 2;
          }
          decorations[decPos++] = startPos;
          decorations[decPos++] = startDec;
          i = end;
        }
      
        nDecorations = decorations.length = decPos;
      
        var sourceNode = job.sourceNode;
        var oldDisplay;
        if (sourceNode) {
          oldDisplay = sourceNode.style.display;
          sourceNode.style.display = 'none';
        }
        try {
          var decoration = null;
          while (spanIndex < nSpans) {
            var spanStart = spans[spanIndex];
            var spanEnd = spans[spanIndex + 2] || sourceLength;
      
            var decEnd = decorations[decorationIndex + 2] || sourceLength;
      
            var end = Math.min(spanEnd, decEnd);
      
            var textNode = spans[spanIndex + 1];
            var styledText;
            if (textNode.nodeType !== 1  // Don't muck with <BR>s or <LI>s
                // Don't introduce spans around empty text nodes.
                && (styledText = source.substring(sourceIndex, end))) {
              // This may seem bizarre, and it is.  Emitting LF on IE causes the
              // code to display with spaces instead of line breaks.
              // Emitting Windows standard issue linebreaks (CRLF) causes a blank
              // space to appear at the beginning of every line but the first.
              // Emitting an old Mac OS 9 line separator makes everything spiffy.
              if (isIE8OrEarlier) {
                styledText = styledText.replace(newlineRe, '\r');
              }
              textNode.nodeValue = styledText;
              var document = textNode.ownerDocument;
              var span = document.createElement('span');
              span.className = decorations[decorationIndex + 1];
              var parentNode = textNode.parentNode;
              parentNode.replaceChild(span, textNode);
              span.appendChild(textNode);
              if (sourceIndex < spanEnd) {  // Split off a text node.
                spans[spanIndex + 1] = textNode
                    // TODO: Possibly optimize by using '' if there's no flicker.
                    = document.createTextNode(source.substring(end, spanEnd));
                parentNode.insertBefore(textNode, span.nextSibling);
              }
            }
      
            sourceIndex = end;
      
            if (sourceIndex >= spanEnd) {
              spanIndex += 2;
            }
            if (sourceIndex >= decEnd) {
              decorationIndex += 2;
            }
          }
        } finally {
          if (sourceNode) {
            sourceNode.style.display = oldDisplay;
          }
        }
      }
      
      
      ================================================
      FILE: google-code-prettify/js-modules/recombineTagsAndDecorations_test.html
      ================================================
      <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
      <html> <head>
      <title>Recombine Tags And Decorations</title>
      <script src="extractSourceSpans.js"></script>
      <script src="numberLines.js"></script>
      <script src="recombineTagsAndDecorations.js"></script>
      <script src="http://github.com/douglascrockford/JSON-js/raw/master/json2.js"></script>
      <link rel="stylesheet" href="../src/prettify.css" type="text/css" />
      <style>
      .ok { background: #dfd }
      .error, .failure { background: #fdd }
      .error { white-space: pre }
      td { font-family: monospace }
      tr { vertical-align: top }
      </style>
      </head>
      
      <body>
      <h1>Recombine Tags And Decorations</h1>
      
      <table border="1" cellpadding="2" cellspacing="0">
        <tr><th colspan="4">Test Single Decoration</th></tr>
        <tr>
          <td><code class="testinput">"Hello, World!"</code></td>
          <td class="decorations">[0, 'str']</td>
          <td><code><span class="str">"Hello, World!"</span></code></td>
        </tr>
        <tr><th colspan="4">Test Single Span</th></tr>
        <tr>
          <td><code class="testinput">print "Hello, &lt;World&gt;!";</code></td>
          <td class="decorations">[0, 'kwd', 5, 'pln', 6, 'str', 14, 'tag', 21, 'str', 23, 'pun']</td>
          <td><code><span class="kwd">print</span><span class="pln"> </span><span class="str">"Hello, </span><span class="tag">&lt;World&gt;</span><span class="str">!"</span><span class="pun">;</span></code></td>
        </tr>
        <tr><th colspan="4">Test Interleaved</th></tr>
        <tr>
          <td><code class="testinput">print "Hello, &lt;<b>World</b>&gt;!";</code></td>
          <td class="decorations">[0, 'kwd', 5, 'pln', 6, 'str', 14, 'tag', 21, 'str', 23, 'pun']</td>
          <td><code><span class="kwd">print</span><span class="pln"> </span><span class="str">"Hello, </span><span class="tag">&lt;</span><b><span class="tag">World</span></b><span class="tag">&gt;</span><span class="str">!"</span><span class="pun">;</span></code></td>
        </tr>
      </table>
      
      <script>
      if (!document.body.getElementsByClassName) {
        document.body.getElementsByClassName = function (className) {
          className = className.replace(/\s+/g, ' ').replace(/^\s*|\s*$/g, ' ');
          var results = [];
          function walk(node) {
            if (node.nodeType !== 1) { return; }
            // This test should be order-insensitive.
            if ((' ' + node.className + ' ').indexOf(className) >= 0) {
              results[results.length] = node;
            }
            for (var child = node.firstChild; child; child = child.nextSibling) {
              walk(child);
            }
          }
          walk(document.body);
          return results;
        };
      }
      
      setTimeout(function () {
        var testInputs = Array.prototype.slice.call(
           document.body.getElementsByClassName('testinput'), 0);
        for (var i = 0, n = testInputs.length; i < n; ++i) {
          var testInput = testInputs[i];
          var decorationsNode = testInput.parentNode.nextSibling;
          while (decorationsNode.nodeType !== 1) { decorationsNode = decorationsNode.nextSibling; }
          var testResult = decorationsNode.nextSibling;
          while (testResult.nodeType !== 1) { testResult = testResult.nextSibling; }
          var actual = document.createElement('TD');
          testResult.parentNode.appendChild(actual);
          var clone = testInput.cloneNode(true);
          clone.className = '';  // IE
          clone.removeAttribute('class');  // Not IE.
          actual.appendChild(clone);
          var job = extractSourceSpans(clone);
          job.decorations = eval(decorationsNode.innerText || decorationsNode.textContent);
          try {
            recombineTagsAndDecorations(job);
            var passed = testResult.innerHTML === actual.innerHTML;
            if (!passed) {
              console.log(JSON.stringify(testResult.innerHTML) + ' !==\n' + JSON.stringify(actual.innerHTML));
            }
            actual.className = passed ? 'ok' : 'failure';
          } catch (ex) {
            actual.className = 'error';
            actual.appendChild(document.createTextNode(
                'Error: ' + (ex.message || ex)  + '\n' + ex.stack));
          }
          actual.className += ' actual';
        }
      }, 0)</script>
      
      <hr>
      <address></address>
      <!-- hhmts start --> Last modified: Tue Mar 29 10:41:34 PDT 2011 <!-- hhmts end -->
      </body> </html>
      
      
      ================================================
      FILE: google-code-prettify/js-modules/regexpPrecederPatterns.pl
      ================================================
      use strict;
      
      print "
      
      /**
       * A set of tokens that can precede a regular expression literal in
       * javascript
       * http://web.archive.org/web/20070717142515/http://www.mozilla.org/js/language/js20/rationale/syntax.html
       * has the full list, but I've removed ones that might be problematic when
       * seen in languages that don't support regular expression literals.
       *
       * <p>Specifically, I've removed any keywords that can't precede a regexp
       * literal in a syntactically legal javascript program, and I've removed the
       * \"in\" keyword since it's not a keyword in many languages, and might be used
       * as a count of inches.
       *
       * <p>The link above does not accurately describe EcmaScript rules since
       * it fails to distinguish between (a=++/b/i) and (a++/b/i) but it works
       * very well in practice.
       *
       * \@private
       * \@const
       */
      var REGEXP_PRECEDER_PATTERN = ";
      
      my @preceders = (
                       "[!=]=?=?",   # "!", "!=", "!==", "=", "==", "===",
                       "\\#",
                       "%=?",        # "%", "%=",
                       "&&?=?",      # "&", "&&", "&&=", "&=",
                       "\\(",
                       "\\*=?",      # "*", "*=",
                       "[+\\-]=",    # +=, -=.  + and - handled below.
                       "->",
                       "\\/=?",      # "/", "/=",
                       "::?",        # ":", "::",
                       "<<?=?",      # "<", "<<", "<<=", "<=", 
                       ">>?>?=?",    # ">", ">=", ">>", ">>=", ">>>", ">>>=",
                       ",",
                       ";",          # ";"
                       "\\?",
                       "@",
                       "\\[",
                       "~",          # handles =~ and !~
                       "{",
                       "\\^\\^?=?",  # "^", "^=", "^^", "^^=",
                       "\\|\\|?=?",  # "|", "|=", "||", "||=",
                       "break", "case", "continue", "delete",
                       "do", "else", "finally", "instanceof",
                       "return", "throw", "try", "typeof"
                      );
      # match at beginning, a dot that is not part of a number, or sign.
      my $pattern = "'(?:^^\\\\.?|[+-]";
      foreach my $preceder (@preceders) {
        $preceder =~ s/\\/\\\\/g;
        $pattern .= "|$preceder";
      }
      $pattern .= ")\\\\s*'";  # matches at end, and matches empty string
      
      print "$pattern;\n";
      
      print "
      // CAVEAT: this does not properly handle the case where a regular
      // expression immediately follows another since a regular expression may
      // have flags for case-sensitivity and the like.  Having regexp tokens
      // adjacent is not valid in any language I'm aware of, so I'm punting.
      // TODO: maybe style special characters inside a regexp as punctuation.
      ";
      
      
      ================================================
      FILE: google-code-prettify/js-modules/run_prettify.js
      ================================================
      // Copyright (C) 2013 Google Inc.
      //
      // Licensed under the Apache License, Version 2.0 (the "License");
      // you may not use this file except in compliance with the License.
      // You may obtain a copy of the License at
      //
      //      http://www.apache.org/licenses/LICENSE-2.0
      //
      // Unless required by applicable law or agreed to in writing, software
      // distributed under the License is distributed on an "AS IS" BASIS,
      // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      // See the License for the specific language governing permissions and
      // limitations under the License.
      
      
      // Looks at query parameters to decide which language handlers and style-sheets
      // to load.
      
      // Query Parameter     Format           Effect                        Default
      // +------------------+---------------+------------------------------+--------+
      // | autorun=         | true | false  | If true then prettyPrint()   | "true" |
      // |                  |               | is called on page load.      |        |
      // +------------------+---------------+------------------------------+--------+
      // | lang=            | language name | Loads the language handler   | Can    |
      // |                  |               | named "lang-<NAME>.js".      | appear |
      // |                  |               | See available handlers at    | many   |
      // |                  |               | http://code.google.com/p/    | times. |
      // |                  |               | google-code-prettify/source/ |        |
      // |                  |               | browse/trunk/src             |        |
      // +------------------+---------------+------------------------------+--------+
      // | skin=            | skin name     | Loads the skin stylesheet    | none.  |
      // |                  |               | named "<NAME>.css".          |        |
      // |                  |               | http://code.google.com/p/    |        |
      // |                  |               | google-code-prettify/source/ |        |
      // |                  |               | browse/trunk/styles          |        |
      // +------------------+---------------+------------------------------+--------+
      // | callback=        | JS identifier | When "prettyPrint" finishes  | none   |
      // |                  |               | window.exports[js_ident] is  |        |
      // |                  |               | called.                      |        |
      // |                  |               | The callback must be under   |        |
      // |                  |               | exports to reduce the risk   |        |
      // |                  |               | of XSS via query parameter   |        |
      // |                  |               | injection.                   |        |
      // +------------------+---------------+------------------------------+--------+
      
      // Exmaples
      // .../prettify.js?lang=css&skin=sunburst
      //   1. Loads the CSS language handler which can be used to prettify CSS
      //      stylesheets, HTML <style> element bodies and style="..." attributes
      //      values.
      //   2. Loads the sunburst.css stylesheet instead of the default prettify.css
      //      stylesheet.
      //      A gallery of stylesheets is available at
      //      https://google-code-prettify.googlecode.com/svn/trunk/styles/index.html
      //   3. Since autorun=false is not specified, calls prettyPrint() on page load.
      
      (function () {
        "use strict";
      
        var win = window;
        var setTimeout = win.setTimeout;
        var doc = document;
        var root = doc.documentElement;
        var head = doc['head'] || doc.getElementsByTagName("head")[0] || root;
      
        // From http://javascript.nwbox.com/ContentLoaded/contentloaded.js
        // Author: Diego Perini (diego.perini at gmail.com)
        // Summary: cross-browser wrapper for DOMContentLoaded
        // Updated: 20101020
        // License: MIT
        // Version: 1.2
        function contentLoaded(callback) {
          var addEventListener = doc['addEventListener'];
          var done = false, top = true,
              add = addEventListener ? 'addEventListener' : 'attachEvent',
              rem = addEventListener ? 'removeEventListener' : 'detachEvent',
              pre = addEventListener ? '' : 'on',
      
              init = function(e) {
                if (e.type == 'readystatechange' && doc.readyState != 'complete') {
                  return;
                }
                (e.type == 'load' ? win : doc)[rem](pre + e.type, init, false);
                if (!done && (done = true)) { callback.call(win, e.type || e); }
              },
      
              poll = function() {
                try {
                  root.doScroll('left');
                } catch(e) {
                  setTimeout(poll, 50);
                  return;
                }
                init('poll');
              };
      
          if (doc.readyState == 'complete') {
            callback.call(win, 'lazy');
          } else {
            if (doc.createEventObject && root.doScroll) {
              try { top = !win.frameElement; } catch(e) { }
              if (top) { poll(); }
            }
            doc[add](pre + 'DOMContentLoaded', init, false);
            doc[add](pre + 'readystatechange', init, false);
            win[add](pre + 'load', init, false);
          }
        }
      
        // Given a list of URLs to stylesheets, loads the first that loads without
        // triggering an error event.
        function loadStylesheetsFallingBack(stylesheets) {
          var n = stylesheets.length;
          function load(i) {
            if (i === n) { return; }
            var link = doc.createElement('link');
            link.rel = 'stylesheet';
            link.type = 'text/css';
            if (i + 1 < n) {
              // http://pieisgood.org/test/script-link-events/ indicates that many
              // versions of IE do not support onerror on <link>s, though
              // http://msdn.microsoft.com/en-us/library/ie/ms535848(v=vs.85).aspx
              // indicates that recent IEs do support error.
              link.error = link.onerror = function () { load(i + 1); };
            }
            link.href = stylesheets[i];
            head.appendChild(link);
          }
          load(0);
        }
      
        var scriptQuery = '';
        // Look for the <script> node that loads this script to get its parameters.
        // This starts looking at the end instead of just considering the last
        // because deferred and async scripts run out of order.
        // If the script is loaded twice, then this will run in reverse order.
        for (var scripts = doc.scripts, i = scripts.length; --i >= 0;) {
          var script = scripts[i];
          var match = script.src.match(
              /^[^?#]*\/run_prettify\.js(\?[^#]*)?(?:#.*)?$/);
          if (match) {
            scriptQuery = match[1] || '';
            // Remove the script from the DOM so that multiple runs at least run
            // multiple times even if parameter sets are interpreted in reverse
            // order.
            script.parentNode.removeChild(script);
            break;
          }
        }
      
        // Pull parameters into local variables.
        var autorun = true;
        var langs = [];
        var skins = [];
        var callbacks = [];
        scriptQuery.replace(
            /[?&]([^&=]+)=([^&]+)/g,
            function (_, name, value) {
              value = decodeURIComponent(value);
              name = decodeURIComponent(name);
              if (name == 'autorun')   { autorun = !/^[0fn]/i.test(value); } else
              if (name == 'lang')      { langs.push(value);                } else
              if (name == 'skin')      { skins.push(value);                } else
              if (name == 'callback')  { callbacks.push(value);            }
            });
      
        // Use https to avoid mixed content warnings in client pages and to
        // prevent a MITM from rewrite prettify mid-flight.
        // This only works if this script is loaded via https : something
        // over which we exercise no control.
        var LOADER_BASE_URL =
           'https://google-code-prettify.googlecode.com/svn/loader';
      
        for (var i = 0, n = langs.length; i < n; ++i) (function (lang) {
          var script = doc.createElement("script");
      
          // Excerpted from jQuery.ajaxTransport("script") to fire events when
          // a script is finished loading.
          // Attach handlers for each script
          script.onload = script.onerror = script.onreadystatechange = function () {
            if (script && (
                  !script.readyState || /loaded|complete/.test(script.readyState))) {
              // Handle memory leak in IE
              script.onerror = script.onload = script.onreadystatechange = null;
      
              --pendingLanguages;
              checkPendingLanguages();
      
              // Remove the script
              if (script.parentNode) {
                script.parentNode.removeChild(script);
              }
      
              script = null;
            }
          };
      
          script.type = 'text/javascript';
          script.src = LOADER_BASE_URL
            + '/lang-' + encodeURIComponent(langs[i]) + '.js';
      
          // Circumvent IE6 bugs with base elements (#2709 and #4378) by prepending
          head.insertBefore(script, head.firstChild);
        })(langs[i]);
      
        var pendingLanguages = langs.length;
        function checkPendingLanguages() {
          if (!pendingLanguages) {
            setTimeout(onLangsLoaded, 0);
          }
        }
      
        var skinUrls = [];
        for (var i = 0, n = skins.length; i < n; ++i) {
          skinUrls.push(LOADER_BASE_URL
              + '/skins/' + encodeURIComponent(skins[i]) + '.css');
        }
        skinUrls.push(LOADER_BASE_URL + '/prettify.css');
        loadStylesheetsFallingBack(skinUrls);
      
        var prettyPrint = (function () {
          include("prettify.js");
          return prettyPrint;
        })();
      
        // If this script is deferred or async and the document is already
        // loaded we need to wait for language handlers to load before performing
        // any autorun.
        function onLangsLoaded() {
          if (autorun) {
            contentLoaded(
              function () {
                var n = callbacks.length;
                var callback = n ? function () {
                  for (var i = 0; i < n; ++i) {
                    (function (i) {
                       setTimeout(
                         function () {
                           win['exports'][callbacks[i]].apply(win, arguments);
                         }, 0);
                     })(i);
                  }
                } : void 0;
                prettyPrint(callback);
              });
          }
        }
        checkPendingLanguages();
      
      }());
      
      
      ================================================
      FILE: google-code-prettify/src/lang-apollo.js
      ================================================
      // Copyright (C) 2009 Onno Hommes.
      //
      // Licensed under the Apache License, Version 2.0 (the "License");
      // you may not use this file except in compliance with the License.
      // You may obtain a copy of the License at
      //
      //      http://www.apache.org/licenses/LICENSE-2.0
      //
      // Unless required by applicable law or agreed to in writing, software
      // distributed under the License is distributed on an "AS IS" BASIS,
      // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      // See the License for the specific language governing permissions and
      // limitations under the License.
      
      
      /**
       * @fileoverview
       * Registers a language handler for the AGC/AEA Assembly Language as described
       * at http://virtualagc.googlecode.com
       * <p>
       * This file could be used by goodle code to allow syntax highlight for
       * Virtual AGC SVN repository or if you don't want to commonize
       * the header for the agc/aea html assembly listing.
       *
       * @author ohommes@alumni.cmu.edu
       */
      
      PR['registerLangHandler'](
          PR['createSimpleLexer'](
              [
               // A line comment that starts with ;
               [PR['PR_COMMENT'],     /^#[^\r\n]*/, null, '#'],
               // Whitespace
               [PR['PR_PLAIN'],       /^[\t\n\r \xA0]+/, null, '\t\n\r \xA0'],
               // A double quoted, possibly multi-line, string.
               [PR['PR_STRING'],      /^\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)/, null, '"']
              ],
              [
               [PR['PR_KEYWORD'], /^(?:ADS|AD|AUG|BZF|BZMF|CAE|CAF|CA|CCS|COM|CS|DAS|DCA|DCOM|DCS|DDOUBL|DIM|DOUBLE|DTCB|DTCF|DV|DXCH|EDRUPT|EXTEND|INCR|INDEX|NDX|INHINT|LXCH|MASK|MSK|MP|MSU|NOOP|OVSK|QXCH|RAND|READ|RELINT|RESUME|RETURN|ROR|RXOR|SQUARE|SU|TCR|TCAA|OVSK|TCF|TC|TS|WAND|WOR|WRITE|XCH|XLQ|XXALQ|ZL|ZQ|ADD|ADZ|SUB|SUZ|MPY|MPR|MPZ|DVP|COM|ABS|CLA|CLZ|LDQ|STO|STQ|ALS|LLS|LRS|TRA|TSQ|TMI|TOV|AXT|TIX|DLY|INP|OUT)\s/,null],
               [PR['PR_TYPE'], /^(?:-?GENADR|=MINUS|2BCADR|VN|BOF|MM|-?2CADR|-?[1-6]DNADR|ADRES|BBCON|[SE]?BANK\=?|BLOCK|BNKSUM|E?CADR|COUNT\*?|2?DEC\*?|-?DNCHAN|-?DNPTR|EQUALS|ERASE|MEMORY|2?OCT|REMADR|SETLOC|SUBRO|ORG|BSS|BES|SYN|EQU|DEFINE|END)\s/,null],
               // A single quote possibly followed by a word that optionally ends with
               // = ! or ?.
               [PR['PR_LITERAL'],
                /^\'(?:-*(?:\w|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?)?/],
               // Any word including labels that optionally ends with = ! or ?.
               [PR['PR_PLAIN'],
                /^-*(?:[!-z_]|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?/i],
               // A printable non-space non-special character
               [PR['PR_PUNCTUATION'], /^[^\w\t\n\r \xA0()\"\\\';]+/]
              ]),
          ['apollo', 'agc', 'aea']);
      
      
      ================================================
      FILE: google-code-prettify/src/lang-basic.js
      ================================================
      // Contributed by peter dot kofler at code minus cop dot org
      
      /**
       * @fileoverview
       * Registers a language handler for Basic.
       *
       * To use, include prettify.js and this file in your HTML page.
       * Then put your code in an HTML tag like
       *      <pre class="prettyprint lang-basic">(my BASIC code)</pre>
       *
       * @author peter dot kofler at code minus cop dot org
       */
      
      PR.registerLangHandler(
          PR.createSimpleLexer(
              [ // shortcutStylePatterns
                // "single-line-string"
                [PR.PR_STRING,        /^(?:"(?:[^\\"\r\n]|\\.)*(?:"|$))/, null, '"'],
                // Whitespace
                [PR.PR_PLAIN,         /^\s+/, null, ' \r\n\t\xA0']
              ],
              [ // fallthroughStylePatterns
                // A line comment that starts with REM
                [PR.PR_COMMENT,       /^REM[^\r\n]*/, null],
                [PR.PR_KEYWORD,       /^\b(?:AND|CLOSE|CLR|CMD|CONT|DATA|DEF ?FN|DIM|END|FOR|GET|GOSUB|GOTO|IF|INPUT|LET|LIST|LOAD|NEW|NEXT|NOT|ON|OPEN|OR|POKE|PRINT|READ|RESTORE|RETURN|RUN|SAVE|STEP|STOP|SYS|THEN|TO|VERIFY|WAIT)\b/, null],
                [PR.PR_PLAIN,         /^[A-Z][A-Z0-9]?(?:\$|%)?/i, null],
                // Literals .0, 0, 0.0 0E13
                [PR.PR_LITERAL,       /^(?:\d+(?:\.\d*)?|\.\d+)(?:e[+\-]?\d+)?/i,  null, '0123456789'],
                [PR.PR_PUNCTUATION,   /^.[^\s\w\.$%"]*/, null]
                // [PR.PR_PUNCTUATION,   /^[-,:;!<>=\+^\/\*]+/]
              ]),
          ['basic','cbm']);
      
      
      ================================================
      FILE: google-code-prettify/src/lang-clj.js
      ================================================
      /**
       * @license Copyright (C) 2011 Google Inc.
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *      http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */
      
      /**
       * @fileoverview
       * Registers a language handler for Clojure.
       *
       *
       * To use, include prettify.js and this file in your HTML page.
       * Then put your code in an HTML tag like
       *      <pre class="prettyprint lang-lisp">(my lisp code)</pre>
       * The lang-cl class identifies the language as common lisp.
       * This file supports the following language extensions:
       *     lang-clj - Clojure
       *
       *
       * I used lang-lisp.js as the basis for this adding the clojure specific
       * keywords and syntax.
       *
       * "Name"    = 'Clojure'
       * "Author"  = 'Rich Hickey'
       * "Version" = '1.2'
       * "About"   = 'Clojure is a lisp for the jvm with concurrency primitives and a richer set of types.'
       *
       *
       * I used <a href="http://clojure.org/Reference">Clojure.org Reference</a> as
       * the basis for the reserved word list.
       *
       *
       * @author jwall@google.com
       */
      
      PR['registerLangHandler'](
          PR['createSimpleLexer'](
              [
               // clojure has more paren types than minimal lisp.
               ['opn',             /^[\(\{\[]+/, null, '([{'],
               ['clo',             /^[\)\}\]]+/, null, ')]}'],
               // A line comment that starts with ;
               [PR['PR_COMMENT'],     /^;[^\r\n]*/, null, ';'],
               // Whitespace
               [PR['PR_PLAIN'],       /^[\t\n\r \xA0]+/, null, '\t\n\r \xA0'],
               // A double quoted, possibly multi-line, string.
               [PR['PR_STRING'],      /^\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)/, null, '"']
              ],
              [
               // clojure has a much larger set of keywords
               [PR['PR_KEYWORD'],     /^(?:def|if|do|let|quote|var|fn|loop|recur|throw|try|monitor-enter|monitor-exit|defmacro|defn|defn-|macroexpand|macroexpand-1|for|doseq|dosync|dotimes|and|or|when|not|assert|doto|proxy|defstruct|first|rest|cons|defprotocol|deftype|defrecord|reify|defmulti|defmethod|meta|with-meta|ns|in-ns|create-ns|import|intern|refer|alias|namespace|resolve|ref|deref|refset|new|set!|memfn|to-array|into-array|aset|gen-class|reduce|map|filter|find|nil?|empty?|hash-map|hash-set|vec|vector|seq|flatten|reverse|assoc|dissoc|list|list?|disj|get|union|difference|intersection|extend|extend-type|extend-protocol|prn)\b/, null],
               [PR['PR_TYPE'], /^:[0-9a-zA-Z\-]+/]
              ]),
          ['clj']);
      
      
      ================================================
      FILE: google-code-prettify/src/lang-css.js
      ================================================
      // Copyright (C) 2009 Google Inc.
      //
      // Licensed under the Apache License, Version 2.0 (the "License");
      // you may not use this file except in compliance with the License.
      // You may obtain a copy of the License at
      //
      //      http://www.apache.org/licenses/LICENSE-2.0
      //
      // Unless required by applicable law or agreed to in writing, software
      // distributed under the License is distributed on an "AS IS" BASIS,
      // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      // See the License for the specific language governing permissions and
      // limitations under the License.
      
      
      
      /**
       * @fileoverview
       * Registers a language handler for CSS.
       *
       *
       * To use, include prettify.js and this file in your HTML page.
       * Then put your code in an HTML tag like
       *      <pre class="prettyprint lang-css"></pre>
       *
       *
       * http://www.w3.org/TR/CSS21/grammar.html Section G2 defines the lexical
       * grammar.  This scheme does not recognize keywords containing escapes.
       *
       * @author mikesamuel@gmail.com
       */
      
      // This file is a call to a function defined in prettify.js which defines a
      // lexical scanner for CSS and maps tokens to styles.
      
      // The call to PR['registerLangHandler'] is quoted so that Closure Compiler
      // will not rename the call so that this language extensions can be
      // compiled/minified separately from one another.  Other symbols defined in
      // prettify.js are similarly quoted.
      
      // The call is structured thus:
      // PR['registerLangHandler'](
      //    PR['createSimpleLexer'](
      //        shortcutPatterns,
      //        fallThroughPatterns),
      //    [languageId0, ..., languageIdN])
      
      // Langugage IDs
      // =============
      // The language IDs are typically the file extensions of source files for
      // that language so that users can syntax highlight arbitrary files based
      // on just the extension.  This is heuristic, but works pretty well in
      // practice.
      
      // Patterns
      // ========
      // Lexers are typically implemented as a set of regular expressions.
      // The SimpleLexer function takes regular expressions, styles, and some
      // pragma-info and produces a lexer.  A token description looks like
      //   [STYLE_NAME, /regular-expression/, pragmas]
      
      // Initially, simple lexer's inner loop looked like:
      
      //    while sourceCode is not empty:
      //      try each regular expression in order until one matches
      //      remove the matched portion from sourceCode
      
      // This was really slow for large files because some JS interpreters
      // do a buffer copy on the matched portion which is O(n*n)
      
      // The current loop now looks like
      
      //    1. use js-modules/combinePrefixPatterns.js to 
      //       combine all regular expressions into one 
      //    2. use a single global regular expresion match to extract all tokens
      //    3. for each token try regular expressions in order until one matches it
      //       and classify it using the associated style
      
      // This is a lot more efficient but it does mean that lookahead and lookbehind
      // can't be used across boundaries to classify tokens.
      
      // Sometimes we need lookahead and lookbehind and sometimes we want to handle
      // embedded language -- JavaScript or CSS embedded in HTML, or inline assembly
      // in C.
      
      // If a particular pattern has a numbered group, and its style pattern starts
      // with "lang-" as in
      //    ['lang-js', /<script>(.*?)<\/script>/]
      // then the token classification step breaks the token into pieces.
      // Group 1 is re-parsed using the language handler for "lang-js", and the
      // surrounding portions are reclassified using the current language handler.
      // This mechanism gives us both lookahead, lookbehind, and language embedding.
      
      // Shortcut Patterns
      // =================
      // A shortcut pattern is one that is tried before other patterns if the first
      // character in the token is in the string of characters.
      // This very effectively lets us make quick correct decisions for common token
      // types.
      
      // All other patterns are fall-through patterns.
      
      
      
      // The comments inline below refer to productions in the CSS specification's
      // lexical grammar.  See link above.
      PR['registerLangHandler'](
          PR['createSimpleLexer'](
              // Shortcut patterns.
              [
               // The space production <s>
               [PR['PR_PLAIN'],       /^[ \t\r\n\f]+/, null, ' \t\r\n\f']
              ],
              // Fall-through patterns.
              [
               // Quoted strings.  <string1> and <string2>
               [PR['PR_STRING'],
                /^\"(?:[^\n\r\f\\\"]|\\(?:\r\n?|\n|\f)|\\[\s\S])*\"/, null],
               [PR['PR_STRING'],
                /^\'(?:[^\n\r\f\\\']|\\(?:\r\n?|\n|\f)|\\[\s\S])*\'/, null],
               ['lang-css-str', /^url\(([^\)\"\']+)\)/i],
               [PR['PR_KEYWORD'],
                /^(?:url|rgb|\!important|@import|@page|@media|@charset|inherit)(?=[^\-\w]|$)/i,
                null],
               // A property name -- an identifier followed by a colon.
               ['lang-css-kw', /^(-?(?:[_a-z]|(?:\\[0-9a-f]+ ?))(?:[_a-z0-9\-]|\\(?:\\[0-9a-f]+ ?))*)\s*:/i],
               // A C style block comment.  The <comment> production.
               [PR['PR_COMMENT'], /^\/\*[^*]*\*+(?:[^\/*][^*]*\*+)*\//],
               // Escaping text spans
               [PR['PR_COMMENT'], /^(?:<!--|-->)/],
               // A number possibly containing a suffix.
               [PR['PR_LITERAL'], /^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],
               // A hex color
               [PR['PR_LITERAL'], /^#(?:[0-9a-f]{3}){1,2}\b/i],
               // An identifier
               [PR['PR_PLAIN'],
                /^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i],
               // A run of punctuation
               [PR['PR_PUNCTUATION'], /^[^\s\w\'\"]+/]
              ]),
          ['css']);
      // Above we use embedded languages to highlight property names (identifiers
      // followed by a colon) differently from identifiers in values.
      PR['registerLangHandler'](
          PR['createSimpleLexer']([],
              [
               [PR['PR_KEYWORD'],
                /^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i]
              ]),
          ['css-kw']);
      // The content of an unquoted URL literal like url(http://foo/img.png) should
      // be colored as string content.  This language handler is used above in the
      // URL production to do so.
      PR['registerLangHandler'](
          PR['createSimpleLexer']([],
              [
               [PR['PR_STRING'], /^[^\)\"\']+/]
              ]),
          ['css-str']);
      
      
      ================================================
      FILE: google-code-prettify/src/lang-dart.js
      ================================================
      // Copyright (C) 2013 Google Inc.
      //
      // Licensed under the Apache License, Version 2.0 (the "License");
      // you may not use this file except in compliance with the License.
      // You may obtain a copy of the License at
      //
      //      http://www.apache.org/licenses/LICENSE-2.0
      //
      // Unless required by applicable law or agreed to in writing, software
      // distributed under the License is distributed on an "AS IS" BASIS,
      // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      // See the License for the specific language governing permissions and
      // limitations under the License.
      
      
      
      /**
       * @fileoverview
       * Registers a language handler Dart.
       * Loosely structured based on the DartLexer in Pygments: http://pygments.org/.
       *
       * To use, include prettify.js and this file in your HTML page.
       * Then put your code in an HTML tag like
       *      <pre class="prettyprint lang-dart">(Dart code)</pre>
       *
       * @author armstrong.timothy@gmail.com
       */
      
      PR['registerLangHandler'](
        PR['createSimpleLexer'](
          [
            // Whitespace.
            [PR['PR_PLAIN'], /^[\t\n\r \xA0]+/, null, '\t\n\r \xA0']
          ],
          [
            // Script tag.
            [PR['PR_COMMENT'], /^#!(?:.*)/],
      
            // `import`, `library`, `part of`, `part`, `as`, `show`, and `hide`
            // keywords.
            [PR['PR_KEYWORD'], /^\b(?:import|library|part of|part|as|show|hide)\b/i],
      
            // Single-line comments.
            [PR['PR_COMMENT'], /^\/\/(?:.*)/],
      
            // Multiline comments.
            [PR['PR_COMMENT'], /^\/\*[^*]*\*+(?:[^\/*][^*]*\*+)*\//], // */
      
            // `class` and `interface` keywords.
            [PR['PR_KEYWORD'], /^\b(?:class|interface)\b/i],
      
            // General keywords.
            [PR['PR_KEYWORD'], /^\b(?:assert|break|case|catch|continue|default|do|else|finally|for|if|in|is|new|return|super|switch|this|throw|try|while)\b/i],
      
            // Declaration keywords.
            [PR['PR_KEYWORD'], /^\b(?:abstract|const|extends|factory|final|get|implements|native|operator|set|static|typedef|var)\b/i],
      
            // Keywords for types.
            [PR['PR_TYPE'], /^\b(?:bool|double|Dynamic|int|num|Object|String|void)\b/i],
      
            // Keywords for constants.
            [PR['PR_KEYWORD'], /^\b(?:false|null|true)\b/i],
      
            // Multiline strings, single- and double-quoted.
            [PR['PR_STRING'], /^r?[\']{3}[\s|\S]*?[^\\][\']{3}/],
            [PR['PR_STRING'], /^r?[\"]{3}[\s|\S]*?[^\\][\"]{3}/],
      
            // Normal and raw strings, single- and double-quoted.
            [PR['PR_STRING'], /^r?\'(\'|(?:[^\n\r\f])*?[^\\]\')/],
            [PR['PR_STRING'], /^r?\"(\"|(?:[^\n\r\f])*?[^\\]\")/],
      
            // Identifiers.
            [PR['PR_PLAIN'], /^[a-z_$][a-z0-9_]*/i],
            
            // Operators.
            [PR['PR_PUNCTUATION'], /^[~!%^&*+=|?:<>/-]/],
      
            // Hex numbers.
            [PR['PR_LITERAL'], /^\b0x[0-9a-f]+/i],
      
            // Decimal numbers.
            [PR['PR_LITERAL'], /^\b\d+(?:\.\d*)?(?:e[+-]?\d+)?/i],
            [PR['PR_LITERAL'], /^\b\.\d+(?:e[+-]?\d+)?/i],
      
            // Punctuation.
            [PR['PR_PUNCTUATION'], /^[(){}\[\],.;]/]
          ]),
        ['dart']);
      
      
      ================================================
      FILE: google-code-prettify/src/lang-erlang.js
      ================================================
      // Copyright (C) 2013 Andrew Allen
      //
      // Licensed under the Apache License, Version 2.0 (the "License");
      // you may not use this file except in compliance with the License.
      // You may obtain a copy of the License at
      //
      //      http://www.apache.org/licenses/LICENSE-2.0
      //
      // Unless required by applicable law or agreed to in writing, software
      // distributed under the License is distributed on an "AS IS" BASIS,
      // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      // See the License for the specific language governing permissions and
      // limitations under the License.
      
      
      /**
       * @fileoverview
       * Registers a language handler for Erlang.
       *
       * Derived from https://raw.github.com/erlang/otp/dev/lib/compiler/src/core_parse.yrl
       * Modified from Mike Samuel's Haskell plugin for google-code-prettify
       *
       * @author achew22@gmail.com
       */
      
      PR['registerLangHandler'](
          PR['createSimpleLexer'](
              [
               // Whitespace
               // whitechar    ->    newline | vertab | space | tab | uniWhite
               // newline      ->    return linefeed | return | linefeed | formfeed
               [PR['PR_PLAIN'],       /^[\t\n\x0B\x0C\r ]+/, null, '\t\n\x0B\x0C\r '],
               // Single line double-quoted strings.
               [PR['PR_STRING'],      /^\"(?:[^\"\\\n\x0C\r]|\\[\s\S])*(?:\"|$)/,
                null, '"'],
               
               // Handle atoms
               [PR['PR_LITERAL'],      /^[a-z][a-zA-Z0-9_]*/],
               // Handle single quoted atoms
               [PR['PR_LITERAL'],      /^\'(?:[^\'\\\n\x0C\r]|\\[^&])+\'?/,
                null, "'"],
               
               // Handle macros. Just to be extra clear on this one, it detects the ?
               // then uses the regexp to end it so be very careful about matching
               // all the terminal elements
               [PR['PR_LITERAL'],      /^\?[^ \t\n({]+/, null, "?"],
      
                
               
               // decimal      ->    digit{digit}
               // octal        ->    octit{octit}
               // hexadecimal  ->    hexit{hexit}
               // integer      ->    decimal
               //               |    0o octal | 0O octal
               //               |    0x hexadecimal | 0X hexadecimal
               // float        ->    decimal . decimal [exponent]
               //               |    decimal exponent
               // exponent     ->    (e | E) [+ | -] decimal
               [PR['PR_LITERAL'],
                /^(?:0o[0-7]+|0x[\da-f]+|\d+(?:\.\d+)?(?:e[+\-]?\d+)?)/i,
                null, '0123456789']
              ],
              [
               // TODO: catch @declarations inside comments
      
               // Comments in erlang are started with % and go till a newline
               [PR['PR_COMMENT'], /^%[^\n]*/],
      
               // Catch macros
               //[PR['PR_TAG'], /?[^( \n)]+/],
      
               /**
                * %% Keywords (atoms are assumed to always be single-quoted).
                * 'module' 'attributes' 'do' 'let' 'in' 'letrec'
                * 'apply' 'call' 'primop'
                * 'case' 'of' 'end' 'when' 'fun' 'try' 'catch' 'receive' 'after'
                */
               [PR['PR_KEYWORD'], /^(?:module|attributes|do|let|in|letrec|apply|call|primop|case|of|end|when|fun|try|catch|receive|after|char|integer|float,atom,string,var)\b/],
               
               /**
                * Catch definitions (usually defined at the top of the file)
                * Anything that starts -something
                */
               [PR['PR_KEYWORD'], /^-[a-z_]+/],
      
               // Catch variables
               [PR['PR_TYPE'], /^[A-Z_][a-zA-Z0-9_]*/],
      
               // matches the symbol production
               [PR['PR_PUNCTUATION'], /^[.,;]/]
              ]),
          ['erlang', 'erl']);
      
      
      ================================================
      FILE: google-code-prettify/src/lang-go.js
      ================================================
      // Copyright (C) 2010 Google Inc.
      //
      // Licensed under the Apache License, Version 2.0 (the "License");
      // you may not use this file except in compliance with the License.
      // You may obtain a copy of the License at
      //
      //      http://www.apache.org/licenses/LICENSE-2.0
      //
      // Unless required by applicable law or agreed to in writing, software
      // distributed under the License is distributed on an "AS IS" BASIS,
      // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      // See the License for the specific language governing permissions and
      // limitations under the License.
      
      
      
      /**
       * @fileoverview
       * Registers a language handler for the Go language..
       * <p>
       * Based on the lexical grammar at 
       * http://golang.org/doc/go_spec.html#Lexical_elements
       * <p>
       * Go uses a minimal style for highlighting so the below does not distinguish
       * strings, keywords, literals, etc. by design.
       * From a discussion with the Go designers:
       * <pre>
       * On Thursday, July 22, 2010, Mike Samuel <...> wrote:
       * > On Thu, Jul 22, 2010, Rob 'Commander' Pike <...> wrote:
       * >> Personally, I would vote for the subdued style godoc presents at http://golang.org
       * >>
       * >> Not as fancy as some like, but a case can be made it's the official style.
       * >> If people want more colors, I wouldn't fight too hard, in the interest of
       * >> encouragement through familiarity, but even then I would ask to shy away
       * >> from technicolor starbursts.
       * >
       * > Like http://golang.org/pkg/go/scanner/ where comments are blue and all
       * > other content is black?  I can do that.
       * </pre>
       *
       * @author mikesamuel@gmail.com
       */
      
      PR['registerLangHandler'](
          PR['createSimpleLexer'](
              [
               // Whitespace is made up of spaces, tabs and newline characters.
               [PR['PR_PLAIN'],       /^[\t\n\r \xA0]+/, null, '\t\n\r \xA0'],
               // Not escaped as a string.  See note on minimalism above.
               [PR['PR_PLAIN'],       /^(?:\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)|\'(?:[^\'\\]|\\[\s\S])+(?:\'|$)|`[^`]*(?:`|$))/, null, '"\'']
              ],
              [
               // Block comments are delimited by /* and */.
               // Single-line comments begin with // and extend to the end of a line.
               [PR['PR_COMMENT'],     /^(?:\/\/[^\r\n]*|\/\*[\s\S]*?\*\/)/],
               [PR['PR_PLAIN'],       /^(?:[^\/\"\'`]|\/(?![\/\*]))+/i]
              ]),
          ['go']);
      
      
      ================================================
      FILE: google-code-prettify/src/lang-hs.js
      ================================================
      // Copyright (C) 2009 Google Inc.
      //
      // Licensed under the Apache License, Version 2.0 (the "License");
      // you may not use this file except in compliance with the License.
      // You may obtain a copy of the License at
      //
      //      http://www.apache.org/licenses/LICENSE-2.0
      //
      // Unless required by applicable law or agreed to in writing, software
      // distributed under the License is distributed on an "AS IS" BASIS,
      // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      // See the License for the specific language governing permissions and
      // limitations under the License.
      
      
      
      /**
       * @fileoverview
       * Registers a language handler for Haskell.
       *
       *
       * To use, include prettify.js and this file in your HTML page.
       * Then put your code in an HTML tag like
       *      <pre class="prettyprint lang-hs">(my lisp code)</pre>
       * The lang-cl class identifies the language as common lisp.
       * This file supports the following language extensions:
       *     lang-cl - Common Lisp
       *     lang-el - Emacs Lisp
       *     lang-lisp - Lisp
       *     lang-scm - Scheme
       *
       *
       * I used http://www.informatik.uni-freiburg.de/~thiemann/haskell/haskell98-report-html/syntax-iso.html
       * as the basis, but ignore the way the ncomment production nests since this
       * makes the lexical grammar irregular.  It might be possible to support
       * ncomments using the lookbehind filter.
       *
       *
       * @author mikesamuel@gmail.com
       */
      
      PR['registerLangHandler'](
          PR['createSimpleLexer'](
              [
               // Whitespace
               // whitechar    ->    newline | vertab | space | tab | uniWhite
               // newline      ->    return linefeed | return | linefeed | formfeed
               [PR['PR_PLAIN'],       /^[\t\n\x0B\x0C\r ]+/, null, '\t\n\x0B\x0C\r '],
               // Single line double and single-quoted strings.
               // char         ->    ' (graphic<' | \> | space | escape<\&>) '
               // string       ->    " {graphic<" | \> | space | escape | gap}"
               // escape       ->    \ ( charesc | ascii | decimal | o octal
               //                        | x hexadecimal )
               // charesc      ->    a | b | f | n | r | t | v | \ | " | ' | &
               [PR['PR_STRING'],      /^\"(?:[^\"\\\n\x0C\r]|\\[\s\S])*(?:\"|$)/,
                null, '"'],
               [PR['PR_STRING'],      /^\'(?:[^\'\\\n\x0C\r]|\\[^&])\'?/,
                null, "'"],
               // decimal      ->    digit{digit}
               // octal        ->    octit{octit}
               // hexadecimal  ->    hexit{hexit}
               // integer      ->    decimal
               //               |    0o octal | 0O octal
               //               |    0x hexadecimal | 0X hexadecimal
               // float        ->    decimal . decimal [exponent]
               //               |    decimal exponent
               // exponent     ->    (e | E) [+ | -] decimal
               [PR['PR_LITERAL'],
                /^(?:0o[0-7]+|0x[\da-f]+|\d+(?:\.\d+)?(?:e[+\-]?\d+)?)/i,
                null, '0123456789']
              ],
              [
               // Haskell does not have a regular lexical grammar due to the nested
               // ncomment.
               // comment      ->    dashes [ any<symbol> {any}] newline
               // ncomment     ->    opencom ANYseq {ncomment ANYseq}closecom
               // dashes       ->    '--' {'-'}
               // opencom      ->    '{-'
               // closecom     ->    '-}'
               [PR['PR_COMMENT'],     /^(?:(?:--+(?:[^\r\n\x0C]*)?)|(?:\{-(?:[^-]|-+[^-\}])*-\}))/],
               // reservedid   ->    case | class | data | default | deriving | do
               //               |    else | if | import | in | infix | infixl | infixr
               //               |    instance | let | module | newtype | of | then
               //               |    type | where | _
               [PR['PR_KEYWORD'],     /^(?:case|class|data|default|deriving|do|else|if|import|in|infix|infixl|infixr|instance|let|module|newtype|of|then|type|where|_)(?=[^a-zA-Z0-9\']|$)/, null],
               // qvarid       ->    [ modid . ] varid
               // qconid       ->    [ modid . ] conid
               // varid        ->    (small {small | large | digit | ' })<reservedid>
               // conid        ->    large {small | large | digit | ' }
               // modid        ->    conid
               // small        ->    ascSmall | uniSmall | _
               // ascSmall     ->    a | b | ... | z
               // uniSmall     ->    any Unicode lowercase letter
               // large        ->    ascLarge | uniLarge
               // ascLarge     ->    A | B | ... | Z
               // uniLarge     ->    any uppercase or titlecase Unicode letter
               [PR['PR_PLAIN'],  /^(?:[A-Z][\w\']*\.)*[a-zA-Z][\w\']*/],
               // matches the symbol production
               [PR['PR_PUNCTUATION'], /^[^\t\n\x0B\x0C\r a-zA-Z0-9\'\"]+/]
              ]),
          ['hs']);
      
      
      ================================================
      FILE: google-code-prettify/src/lang-lisp.js
      ================================================
      // Copyright (C) 2008 Google Inc.
      //
      // Licensed under the Apache License, Version 2.0 (the "License");
      // you may not use this file except in compliance with the License.
      // You may obtain a copy of the License at
      //
      //      http://www.apache.org/licenses/LICENSE-2.0
      //
      // Unless required by applicable law or agreed to in writing, software
      // distributed under the License is distributed on an "AS IS" BASIS,
      // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      // See the License for the specific language governing permissions and
      // limitations under the License.
      
      
      
      /**
       * @fileoverview
       * Registers a language handler for Common Lisp and related languages.
       *
       *
       * To use, include prettify.js and this file in your HTML page.
       * Then put your code in an HTML tag like
       *      <pre class="prettyprint lang-lisp">(my lisp code)</pre>
       * The lang-cl class identifies the language as common lisp.
       * This file supports the following language extensions:
       *     lang-cl - Common Lisp
       *     lang-el - Emacs Lisp
       *     lang-lisp - Lisp
       *     lang-scm - Scheme
       *     lang-lsp - FAT 8.3 filename version of lang-lisp.
       *
       *
       * I used http://www.devincook.com/goldparser/doc/meta-language/grammar-LISP.htm
       * as the basis, but added line comments that start with ; and changed the atom
       * production to disallow unquoted semicolons.
       *
       * "Name"    = 'LISP'
       * "Author"  = 'John McCarthy'
       * "Version" = 'Minimal'
       * "About"   = 'LISP is an abstract language that organizes ALL'
       *           | 'data around "lists".'
       *
       * "Start Symbol" = [s-Expression]
       *
       * {Atom Char}   = {Printable} - {Whitespace} - [()"\'']
       *
       * Atom = ( {Atom Char} | '\'{Printable} )+
       *
       * [s-Expression] ::= [Quote] Atom
       *                  | [Quote] '(' [Series] ')'
       *                  | [Quote] '(' [s-Expression] '.' [s-Expression] ')'
       *
       * [Series] ::= [s-Expression] [Series]
       *            |
       *
       * [Quote]  ::= ''      !Quote = do not evaluate
       *            |
       *
       *
       * I used <a href="http://gigamonkeys.com/book/">Practical Common Lisp</a> as
       * the basis for the reserved word list.
       *
       *
       * @author mikesamuel@gmail.com
       */
      
      PR['registerLangHandler'](
          PR['createSimpleLexer'](
              [
               ['opn',             /^\(+/, null, '('],
               ['clo',             /^\)+/, null, ')'],
               // A line comment that starts with ;
               [PR['PR_COMMENT'],     /^;[^\r\n]*/, null, ';'],
               // Whitespace
               [PR['PR_PLAIN'],       /^[\t\n\r \xA0]+/, null, '\t\n\r \xA0'],
               // A double quoted, possibly multi-line, string.
               [PR['PR_STRING'],      /^\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)/, null, '"']
              ],
              [
               [PR['PR_KEYWORD'],     /^(?:block|c[ad]+r|catch|con[ds]|def(?:ine|un)|do|eq|eql|equal|equalp|eval-when|flet|format|go|if|labels|lambda|let|load-time-value|locally|macrolet|multiple-value-call|nil|progn|progv|quote|require|return-from|setq|symbol-macrolet|t|tagbody|the|throw|unwind)\b/, null],
               [PR['PR_LITERAL'],
                /^[+\-]?(?:[0#]x[0-9a-f]+|\d+\/\d+|(?:\.\d+|\d+(?:\.\d*)?)(?:[ed][+\-]?\d+)?)/i],
               // A single quote possibly followed by a word that optionally ends with
               // = ! or ?.
               [PR['PR_LITERAL'],
                /^\'(?:-*(?:\w|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?)?/],
               // A word that optionally ends with = ! or ?.
               [PR['PR_PLAIN'],
                /^-*(?:[a-z_]|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?/i],
               // A printable non-space non-special character
               [PR['PR_PUNCTUATION'], /^[^\w\t\n\r \xA0()\"\\\';]+/]
              ]),
          ['cl', 'el', 'lisp', 'lsp', 'scm', 'ss', 'rkt']);
      
      
      ================================================
      FILE: google-code-prettify/src/lang-llvm.js
      ================================================
      // Copyright (C) 2013 Nikhil Dabas
      //
      // Licensed under the Apache License, Version 2.0 (the "License");
      // you may not use this file except in compliance with the License.
      // You may obtain a copy of the License at
      //
      //      http://www.apache.org/licenses/LICENSE-2.0
      //
      // Unless required by applicable law or agreed to in writing, software
      // distributed under the License is distributed on an "AS IS" BASIS,
      // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      // See the License for the specific language governing permissions and
      // limitations under the License.
      
      
      /**
       * @fileoverview
       * Registers a language handler for LLVM.
       * From https://gist.github.com/ndabas/2850418
       *
       *
       * To use, include prettify.js and this file in your HTML page.
       * Then put your code in an HTML tag like
       *      <pre class="prettyprint lang-llvm">(my LLVM code)</pre>
       *
       *
       * The regular expressions were adapted from:
       * https://github.com/hansstimer/llvm.tmbundle/blob/76fedd8f50fd6108b1780c51d79fbe3223de5f34/Syntaxes/LLVM.tmLanguage
       * 
       * http://llvm.org/docs/LangRef.html#constants describes the language grammar.
       * 
       * @author Nikhil Dabas
       */
      PR['registerLangHandler'](
          PR['createSimpleLexer'](
              [
               // Whitespace
               [PR['PR_PLAIN'],       /^[\t\n\r \xA0]+/, null, '\t\n\r \xA0'],
               // A double quoted, possibly multi-line, string.
               [PR['PR_STRING'],      /^!?\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)/, null, '"'],
               // comment.llvm
               [PR['PR_COMMENT'],     /^;[^\r\n]*/, null, ';']
              ],
              [
               // variable.llvm
               [PR['PR_PLAIN'],       /^[%@!](?:[-a-zA-Z$._][-a-zA-Z$._0-9]*|\d+)/],
      
               // According to http://llvm.org/docs/LangRef.html#well-formedness
               // These reserved words cannot conflict with variable names, because none of them start with a prefix character ('%' or '@').
               [PR['PR_KEYWORD'],     /^[A-Za-z_][0-9A-Za-z_]*/, null],
      
               // constant.numeric.float.llvm
               [PR['PR_LITERAL'],     /^\d+\.\d+/],
               
               // constant.numeric.integer.llvm
               [PR['PR_LITERAL'],     /^(?:\d+|0[xX][a-fA-F0-9]+)/],
      
               // punctuation
               [PR['PR_PUNCTUATION'], /^[()\[\]{},=*<>:]|\.\.\.$/]
              ]),
          ['llvm', 'll']);
      
      
      ================================================
      FILE: google-code-prettify/src/lang-lua.js
      ================================================
      // Copyright (C) 2008 Google Inc.
      //
      // Licensed under the Apache License, Version 2.0 (the "License");
      // you may not use this file except in compliance with the License.
      // You may obtain a copy of the License at
      //
      //      http://www.apache.org/licenses/LICENSE-2.0
      //
      // Unless required by applicable law or agreed to in writing, software
      // distributed under the License is distributed on an "AS IS" BASIS,
      // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      // See the License for the specific language governing permissions and
      // limitations under the License.
      
      
      
      /**
       * @fileoverview
       * Registers a language handler for Lua.
       *
       *
       * To use, include prettify.js and this file in your HTML page.
       * Then put your code in an HTML tag like
       *      <pre class="prettyprint lang-lua">(my Lua code)</pre>
       *
       *
       * I used http://www.lua.org/manual/5.1/manual.html#2.1
       * Because of the long-bracket concept used in strings and comments, Lua does
       * not have a regular lexical grammar, but luckily it fits within the space
       * of irregular grammars supported by javascript regular expressions.
       *
       * @author mikesamuel@gmail.com
       */
      
      PR['registerLangHandler'](
          PR['createSimpleLexer'](
              [
               // Whitespace
               [PR['PR_PLAIN'],       /^[\t\n\r \xA0]+/, null, '\t\n\r \xA0'],
               // A double or single quoted, possibly multi-line, string.
               [PR['PR_STRING'],      /^(?:\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)|\'(?:[^\'\\]|\\[\s\S])*(?:\'|$))/, null, '"\'']
              ],
              [
               // A comment is either a line comment that starts with two dashes, or
               // two dashes preceding a long bracketed block.
               [PR['PR_COMMENT'], /^--(?:\[(=*)\[[\s\S]*?(?:\]\1\]|$)|[^\r\n]*)/],
               // A long bracketed block not preceded by -- is a string.
               [PR['PR_STRING'],  /^\[(=*)\[[\s\S]*?(?:\]\1\]|$)/],
               [PR['PR_KEYWORD'], /^(?:and|break|do|else|elseif|end|false|for|function|if|in|local|nil|not|or|repeat|return|then|true|until|while)\b/, null],
               // A number is a hex integer literal, a decimal real literal, or in
               // scientific notation.
               [PR['PR_LITERAL'],
                /^[+-]?(?:0x[\da-f]+|(?:(?:\.\d+|\d+(?:\.\d*)?)(?:e[+\-]?\d+)?))/i],
               // An identifier
               [PR['PR_PLAIN'], /^[a-z_]\w*/i],
               // A run of punctuation
               [PR['PR_PUNCTUATION'], /^[^\w\t\n\r \xA0][^\w\t\n\r \xA0\"\'\-\+=]*/]
              ]),
          ['lua']);
      
      
      ================================================
      FILE: google-code-prettify/src/lang-matlab.js
      ================================================
      // Copyright (c) 2013 by Amro <amroamroamro@gmail.com>
      //
      // 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.
      
      /**
       * @fileoverview
       * Registers a language handler for MATLAB.
       *
       * To use, include prettify.js and this file in your HTML page.
       * Then put your code inside an HTML tag like
       *     <pre class="prettyprint lang-matlab">
       *     </pre>
       *
       * @see https://github.com/amroamroamro/prettify-matlab
       */
      (function (PR) {
        /*
          PR_PLAIN: plain text
          PR_STRING: string literals
          PR_KEYWORD: keywords
          PR_COMMENT: comments
          PR_TYPE: types
          PR_LITERAL: literal values (1, null, true, ..)
          PR_PUNCTUATION: punctuation string
          PR_SOURCE: embedded source
          PR_DECLARATION: markup declaration such as a DOCTYPE
          PR_TAG: sgml tag
          PR_ATTRIB_NAME: sgml attribute name
          PR_ATTRIB_VALUE: sgml attribute value
        */
        var PR_IDENTIFIER = "ident",
          PR_CONSTANT = "const",
          PR_FUNCTION = "fun",
          PR_FUNCTION_TOOLBOX = "fun_tbx",
          PR_SYSCMD = "syscmd",
          PR_CODE_OUTPUT = "codeoutput",
          PR_ERROR = "err",
          PR_WARNING = "wrn",
          PR_TRANSPOSE = "transpose",
          PR_LINE_CONTINUATION = "linecont";
      
        // Refer to: http://www.mathworks.com/help/matlab/functionlist-alpha.html
        var coreFunctions = [
          'abs|accumarray|acos(?:d|h)?|acot(?:d|h)?|acsc(?:d|h)?|actxcontrol(?:list|select)?|actxGetRunningServer|actxserver|addlistener|addpath|addpref|addtodate|airy|align|alim|all|allchild|alpha|alphamap|amd|ancestor|and|angle|annotation|any|area|arrayfun|asec(?:d|h)?|asin(?:d|h)?|assert|assignin|atan(?:2|d|h)?|audiodevinfo|audioplayer|audiorecorder|aufinfo|auread|autumn|auwrite|avifile|aviinfo|aviread|axes|axis|balance|bar(?:3|3h|h)?|base2dec|beep|BeginInvoke|bench|bessel(?:h|i|j|k|y)|beta|betainc|betaincinv|betaln|bicg|bicgstab|bicgstabl|bin2dec|bitand|bitcmp|bitget|bitmax|bitnot|bitor|bitset|bitshift|bitxor|blanks|blkdiag|bone|box|brighten|brush|bsxfun|builddocsearchdb|builtin|bvp4c|bvp5c|bvpget|bvpinit|bvpset|bvpxtend|calendar|calllib|callSoapService|camdolly|cameratoolbar|camlight|camlookat|camorbit|campan|campos|camproj|camroll|camtarget|camup|camva|camzoom|cart2pol|cart2sph|cast|cat|caxis|cd|cdf2rdf|cdfepoch|cdfinfo|cdflib(?:\.(?:close|closeVar|computeEpoch|computeEpoch16|create|createAttr|createVar|delete|deleteAttr|deleteAttrEntry|deleteAttrgEntry|deleteVar|deleteVarRecords|epoch16Breakdown|epochBreakdown|getAttrEntry|getAttrgEntry|getAttrMaxEntry|getAttrMaxgEntry|getAttrName|getAttrNum|getAttrScope|getCacheSize|getChecksum|getCompression|getCompressionCacheSize|getConstantNames|getConstantValue|getCopyright|getFileBackward|getFormat|getLibraryCopyright|getLibraryVersion|getMajority|getName|getNumAttrEntries|getNumAttrgEntries|getNumAttributes|getNumgAttributes|getReadOnlyMode|getStageCacheSize|getValidate|getVarAllocRecords|getVarBlockingFactor|getVarCacheSize|getVarCompression|getVarData|getVarMaxAllocRecNum|getVarMaxWrittenRecNum|getVarName|getVarNum|getVarNumRecsWritten|getVarPadValue|getVarRecordData|getVarReservePercent|getVarsMaxWrittenRecNum|getVarSparseRecords|getVersion|hyperGetVarData|hyperPutVarData|inquire|inquireAttr|inquireAttrEntry|inquireAttrgEntry|inquireVar|open|putAttrEntry|putAttrgEntry|putVarData|putVarRecordData|renameAttr|renameVar|setCacheSize|setChecksum|setCompression|setCompressionCacheSize|setFileBackward|setFormat|setMajority|setReadOnlyMode|setStageCacheSize|setValidate|setVarAllocBlockRecords|setVarBlockingFactor|setVarCacheSize|setVarCompression|setVarInitialRecs|setVarPadValue|SetVarReservePercent|setVarsCacheSize|setVarSparseRecords))?|cdfread|cdfwrite|ceil|cell2mat|cell2struct|celldisp|cellfun|cellplot|cellstr|cgs|checkcode|checkin|checkout|chol|cholinc|cholupdate|circshift|cla|clabel|class|clc|clear|clearvars|clf|clipboard|clock|close|closereq|cmopts|cmpermute|cmunique|colamd|colon|colorbar|colordef|colormap|colormapeditor|colperm|Combine|comet|comet3|commandhistory|commandwindow|compan|compass|complex|computer|cond|condeig|condest|coneplot|conj|containers\.Map|contour(?:3|c|f|slice)?|contrast|conv|conv2|convhull|convhulln|convn|cool|copper|copyfile|copyobj|corrcoef|cos(?:d|h)?|cot(?:d|h)?|cov|cplxpair|cputime|createClassFromWsdl|createSoapMessage|cross|csc(?:d|h)?|csvread|csvwrite|ctranspose|cumprod|cumsum|cumtrapz|curl|customverctrl|cylinder|daqread|daspect|datacursormode|datatipinfo|date|datenum|datestr|datetick|datevec|dbclear|dbcont|dbdown|dblquad|dbmex|dbquit|dbstack|dbstatus|dbstep|dbstop|dbtype|dbup|dde23|ddeget|ddesd|ddeset|deal|deblank|dec2base|dec2bin|dec2hex|decic|deconv|del2|delaunay|delaunay3|delaunayn|DelaunayTri|delete|demo|depdir|depfun|det|detrend|deval|diag|dialog|diary|diff|diffuse|dir|disp|display|dither|divergence|dlmread|dlmwrite|dmperm|doc|docsearch|dos|dot|dragrect|drawnow|dsearch|dsearchn|dynamicprops|echo|echodemo|edit|eig|eigs|ellipj|ellipke|ellipsoid|empty|enableNETfromNetworkDrive|enableservice|EndInvoke|enumeration|eomday|eq|erf|erfc|erfcinv|erfcx|erfinv|error|errorbar|errordlg|etime|etree|etreeplot|eval|evalc|evalin|event\.(?:EventData|listener|PropertyEvent|proplistener)|exifread|exist|exit|exp|expint|expm|expm1|export2wsdlg|eye|ezcontour|ezcontourf|ezmesh|ezmeshc|ezplot|ezplot3|ezpolar|ezsurf|ezsurfc|factor|factorial|fclose|feather|feature|feof|ferror|feval|fft|fft2|fftn|fftshift|fftw|fgetl|fgets|fieldnames|figure|figurepalette|fileattrib|filebrowser|filemarker|fileparts|fileread|filesep|fill|fill3|filter|filter2|find|findall|findfigs|findobj|findstr|finish|fitsdisp|fitsinfo|fitsread|fitswrite|fix|flag|flipdim|fliplr|flipud|floor|flow|fminbnd|fminsearch|fopen|format|fplot|fprintf|frame2im|fread|freqspace|frewind|fscanf|fseek|ftell|FTP|full|fullfile|func2str|functions|funm|fwrite|fzero|gallery|gamma|gammainc|gammaincinv|gammaln|gca|gcbf|gcbo|gcd|gcf|gco|ge|genpath|genvarname|get|getappdata|getenv|getfield|getframe|getpixelposition|getpref|ginput|gmres|gplot|grabcode|gradient|gray|graymon|grid|griddata(?:3|n)?|griddedInterpolant|gsvd|gt|gtext|guidata|guide|guihandles|gunzip|gzip|h5create|h5disp|h5info|h5read|h5readatt|h5write|h5writeatt|hadamard|handle|hankel|hdf|hdf5|hdf5info|hdf5read|hdf5write|hdfinfo|hdfread|hdftool|help|helpbrowser|helpdesk|helpdlg|helpwin|hess|hex2dec|hex2num|hgexport|hggroup|hgload|hgsave|hgsetget|hgtransform|hidden|hilb|hist|histc|hold|home|horzcat|hostid|hot|hsv|hsv2rgb|hypot|ichol|idivide|ifft|ifft2|ifftn|ifftshift|ilu|im2frame|im2java|imag|image|imagesc|imapprox|imfinfo|imformats|import|importdata|imread|imwrite|ind2rgb|ind2sub|inferiorto|info|inline|inmem|inpolygon|input|inputdlg|inputname|inputParser|inspect|instrcallback|instrfind|instrfindall|int2str|integral(?:2|3)?|interp(?:1|1q|2|3|ft|n)|interpstreamspeed|intersect|intmax|intmin|inv|invhilb|ipermute|isa|isappdata|iscell|iscellstr|ischar|iscolumn|isdir|isempty|isequal|isequaln|isequalwithequalnans|isfield|isfinite|isfloat|isglobal|ishandle|ishghandle|ishold|isinf|isinteger|isjava|iskeyword|isletter|islogical|ismac|ismatrix|ismember|ismethod|isnan|isnumeric|isobject|isocaps|isocolors|isonormals|isosurface|ispc|ispref|isprime|isprop|isreal|isrow|isscalar|issorted|isspace|issparse|isstr|isstrprop|isstruct|isstudent|isunix|isvarname|isvector|javaaddpath|javaArray|javachk|javaclasspath|javacomponent|javaMethod|javaMethodEDT|javaObject|javaObjectEDT|javarmpath|jet|keyboard|kron|lasterr|lasterror|lastwarn|lcm|ldivide|ldl|le|legend|legendre|length|libfunctions|libfunctionsview|libisloaded|libpointer|libstruct|license|light|lightangle|lighting|lin2mu|line|lines|linkaxes|linkdata|linkprop|linsolve|linspace|listdlg|listfonts|load|loadlibrary|loadobj|log|log10|log1p|log2|loglog|logm|logspace|lookfor|lower|ls|lscov|lsqnonneg|lsqr|lt|lu|luinc|magic|makehgtform|mat2cell|mat2str|material|matfile|matlab\.io\.MatFile|matlab\.mixin\.(?:Copyable|Heterogeneous(?:\.getDefaultScalarElement)?)|matlabrc|matlabroot|max|maxNumCompThreads|mean|median|membrane|memmapfile|memory|menu|mesh|meshc|meshgrid|meshz|meta\.(?:class(?:\.fromName)?|DynamicProperty|EnumeratedValue|event|MetaData|method|package(?:\.(?:fromName|getAllPackages))?|property)|metaclass|methods|methodsview|mex(?:\.getCompilerConfigurations)?|MException|mexext|mfilename|min|minres|minus|mislocked|mkdir|mkpp|mldivide|mlint|mlintrpt|mlock|mmfileinfo|mmreader|mod|mode|more|move|movefile|movegui|movie|movie2avi|mpower|mrdivide|msgbox|mtimes|mu2lin|multibandread|multibandwrite|munlock|namelengthmax|nargchk|narginchk|nargoutchk|native2unicode|nccreate|ncdisp|nchoosek|ncinfo|ncread|ncreadatt|ncwrite|ncwriteatt|ncwriteschema|ndgrid|ndims|ne|NET(?:\.(?:addAssembly|Assembly|convertArray|createArray|createGeneric|disableAutoRelease|enableAutoRelease|GenericClass|invokeGenericMethod|NetException|setStaticProperty))?|netcdf\.(?:abort|close|copyAtt|create|defDim|defGrp|defVar|defVarChunking|defVarDeflate|defVarFill|defVarFletcher32|delAtt|endDef|getAtt|getChunkCache|getConstant|getConstantNames|getVar|inq|inqAtt|inqAttID|inqAttName|inqDim|inqDimID|inqDimIDs|inqFormat|inqGrpName|inqGrpNameFull|inqGrpParent|inqGrps|inqLibVers|inqNcid|inqUnlimDims|inqVar|inqVarChunking|inqVarDeflate|inqVarFill|inqVarFletcher32|inqVarID|inqVarIDs|open|putAtt|putVar|reDef|renameAtt|renameDim|renameVar|setChunkCache|setDefaultFormat|setFill|sync)|newplot|nextpow2|nnz|noanimate|nonzeros|norm|normest|not|notebook|now|nthroot|null|num2cell|num2hex|num2str|numel|nzmax|ode(?:113|15i|15s|23|23s|23t|23tb|45)|odeget|odeset|odextend|onCleanup|ones|open|openfig|opengl|openvar|optimget|optimset|or|ordeig|orderfields|ordqz|ordschur|orient|orth|pack|padecoef|pagesetupdlg|pan|pareto|parseSoapResponse|pascal|patch|path|path2rc|pathsep|pathtool|pause|pbaspect|pcg|pchip|pcode|pcolor|pdepe|pdeval|peaks|perl|perms|permute|pie|pink|pinv|planerot|playshow|plot|plot3|plotbrowser|plotedit|plotmatrix|plottools|plotyy|plus|pol2cart|polar|poly|polyarea|polyder|polyeig|polyfit|polyint|polyval|polyvalm|pow2|power|ppval|prefdir|preferences|primes|print|printdlg|printopt|printpreview|prod|profile|profsave|propedit|propertyeditor|psi|publish|PutCharArray|PutFullMatrix|PutWorkspaceData|pwd|qhull|qmr|qr|qrdelete|qrinsert|qrupdate|quad|quad2d|quadgk|quadl|quadv|questdlg|quit|quiver|quiver3|qz|rand|randi|randn|randperm|RandStream(?:\.(?:create|getDefaultStream|getGlobalStream|list|setDefaultStream|setGlobalStream))?|rank|rat|rats|rbbox|rcond|rdivide|readasync|real|reallog|realmax|realmin|realpow|realsqrt|record|rectangle|rectint|recycle|reducepatch|reducevolume|refresh|refreshdata|regexp|regexpi|regexprep|regexptranslate|rehash|rem|Remove|RemoveAll|repmat|reset|reshape|residue|restoredefaultpath|rethrow|rgb2hsv|rgb2ind|rgbplot|ribbon|rmappdata|rmdir|rmfield|rmpath|rmpref|rng|roots|rose|rosser|rot90|rotate|rotate3d|round|rref|rsf2csf|run|save|saveas|saveobj|savepath|scatter|scatter3|schur|sec|secd|sech|selectmoveresize|semilogx|semilogy|sendmail|serial|set|setappdata|setdiff|setenv|setfield|setpixelposition|setpref|setstr|setxor|shading|shg|shiftdim|showplottool|shrinkfaces|sign|sin(?:d|h)?|size|slice|smooth3|snapnow|sort|sortrows|sound|soundsc|spalloc|spaugment|spconvert|spdiags|specular|speye|spfun|sph2cart|sphere|spinmap|spline|spones|spparms|sprand|sprandn|sprandsym|sprank|spring|sprintf|spy|sqrt|sqrtm|squeeze|ss2tf|sscanf|stairs|startup|std|stem|stem3|stopasync|str2double|str2func|str2mat|str2num|strcat|strcmp|strcmpi|stream2|stream3|streamline|streamparticles|streamribbon|streamslice|streamtube|strfind|strjust|strmatch|strncmp|strncmpi|strread|strrep|strtok|strtrim|struct2cell|structfun|strvcat|sub2ind|subplot|subsasgn|subsindex|subspace|subsref|substruct|subvolume|sum|summer|superclasses|superiorto|support|surf|surf2patch|surface|surfc|surfl|surfnorm|svd|svds|swapbytes|symamd|symbfact|symmlq|symrcm|symvar|system|tan(?:d|h)?|tar|tempdir|tempname|tetramesh|texlabel|text|textread|textscan|textwrap|tfqmr|throw|tic|Tiff(?:\.(?:getTagNames|getVersion))?|timer|timerfind|timerfindall|times|timeseries|title|toc|todatenum|toeplitz|toolboxdir|trace|transpose|trapz|treelayout|treeplot|tril|trimesh|triplequad|triplot|TriRep|TriScatteredInterp|trisurf|triu|tscollection|tsearch|tsearchn|tstool|type|typecast|uibuttongroup|uicontextmenu|uicontrol|uigetdir|uigetfile|uigetpref|uiimport|uimenu|uiopen|uipanel|uipushtool|uiputfile|uiresume|uisave|uisetcolor|uisetfont|uisetpref|uistack|uitable|uitoggletool|uitoolbar|uiwait|uminus|undocheckout|unicode2native|union|unique|unix|unloadlibrary|unmesh|unmkpp|untar|unwrap|unzip|uplus|upper|urlread|urlwrite|usejava|userpath|validateattributes|validatestring|vander|var|vectorize|ver|verctrl|verLessThan|version|vertcat|VideoReader(?:\.isPlatformSupported)?|VideoWriter(?:\.getProfiles)?|view|viewmtx|visdiff|volumebounds|voronoi|voronoin|wait|waitbar|waitfor|waitforbuttonpress|warndlg|warning|waterfall|wavfinfo|wavplay|wavread|wavrecord|wavwrite|web|weekday|what|whatsnew|which|whitebg|who|whos|wilkinson|winopen|winqueryreg|winter|wk1finfo|wk1read|wk1write|workspace|xlabel|xlim|xlsfinfo|xlsread|xlswrite|xmlread|xmlwrite|xor|xslt|ylabel|ylim|zeros|zip|zlabel|zlim|zoom'
        ].join("|");
        var statsFunctions = [
          'addedvarplot|andrewsplot|anova(?:1|2|n)|ansaribradley|aoctool|barttest|bbdesign|beta(?:cdf|fit|inv|like|pdf|rnd|stat)|bino(?:cdf|fit|inv|pdf|rnd|stat)|biplot|bootci|bootstrp|boxplot|candexch|candgen|canoncorr|capability|capaplot|caseread|casewrite|categorical|ccdesign|cdfplot|chi2(?:cdf|gof|inv|pdf|rnd|stat)|cholcov|Classification(?:BaggedEnsemble|Discriminant(?:\.(?:fit|make|template))?|Ensemble|KNN(?:\.(?:fit|template))?|PartitionedEnsemble|PartitionedModel|Tree(?:\.(?:fit|template))?)|classify|classregtree|cluster|clusterdata|cmdscale|combnk|Compact(?:Classification(?:Discriminant|Ensemble|Tree)|Regression(?:Ensemble|Tree)|TreeBagger)|confusionmat|controlchart|controlrules|cophenet|copula(?:cdf|fit|param|pdf|rnd|stat)|cordexch|corr|corrcov|coxphfit|createns|crosstab|crossval|cvpartition|datasample|dataset|daugment|dcovary|dendrogram|dfittool|disttool|dummyvar|dwtest|ecdf|ecdfhist|ev(?:cdf|fit|inv|like|pdf|rnd|stat)|ExhaustiveSearcher|exp(?:cdf|fit|inv|like|pdf|rnd|stat)|factoran|fcdf|ff2n|finv|fitdist|fitensemble|fpdf|fracfact|fracfactgen|friedman|frnd|fstat|fsurfht|fullfact|gagerr|gam(?:cdf|fit|inv|like|pdf|rnd|stat)|GeneralizedLinearModel(?:\.fit)?|geo(?:cdf|inv|mean|pdf|rnd|stat)|gev(?:cdf|fit|inv|like|pdf|rnd|stat)|gline|glmfit|glmval|glyphplot|gmdistribution(?:\.fit)?|gname|gp(?:cdf|fit|inv|like|pdf|rnd|stat)|gplotmatrix|grp2idx|grpstats|gscatter|haltonset|harmmean|hist3|histfit|hmm(?:decode|estimate|generate|train|viterbi)|hougen|hyge(?:cdf|inv|pdf|rnd|stat)|icdf|inconsistent|interactionplot|invpred|iqr|iwishrnd|jackknife|jbtest|johnsrnd|KDTreeSearcher|kmeans|knnsearch|kruskalwallis|ksdensity|kstest|kstest2|kurtosis|lasso|lassoglm|lassoPlot|leverage|lhsdesign|lhsnorm|lillietest|LinearModel(?:\.fit)?|linhyptest|linkage|logn(?:cdf|fit|inv|like|pdf|rnd|stat)|lsline|mad|mahal|maineffectsplot|manova1|manovacluster|mdscale|mhsample|mle|mlecov|mnpdf|mnrfit|mnrnd|mnrval|moment|multcompare|multivarichart|mvn(?:cdf|pdf|rnd)|mvregress|mvregresslike|mvt(?:cdf|pdf|rnd)|NaiveBayes(?:\.fit)?|nan(?:cov|max|mean|median|min|std|sum|var)|nbin(?:cdf|fit|inv|pdf|rnd|stat)|ncf(?:cdf|inv|pdf|rnd|stat)|nct(?:cdf|inv|pdf|rnd|stat)|ncx2(?:cdf|inv|pdf|rnd|stat)|NeighborSearcher|nlinfit|nlintool|nlmefit|nlmefitsa|nlparci|nlpredci|nnmf|nominal|NonLinearModel(?:\.fit)?|norm(?:cdf|fit|inv|like|pdf|rnd|stat)|normplot|normspec|ordinal|outlierMeasure|parallelcoords|paretotails|partialcorr|pcacov|pcares|pdf|pdist|pdist2|pearsrnd|perfcurve|perms|piecewisedistribution|plsregress|poiss(?:cdf|fit|inv|pdf|rnd|tat)|polyconf|polytool|prctile|princomp|ProbDist(?:Kernel|Parametric|UnivKernel|UnivParam)?|probplot|procrustes|qqplot|qrandset|qrandstream|quantile|randg|random|randsample|randtool|range|rangesearch|ranksum|rayl(?:cdf|fit|inv|pdf|rnd|stat)|rcoplot|refcurve|refline|regress|Regression(?:BaggedEnsemble|Ensemble|PartitionedEnsemble|PartitionedModel|Tree(?:\.(?:fit|template))?)|regstats|relieff|ridge|robustdemo|robustfit|rotatefactors|rowexch|rsmdemo|rstool|runstest|sampsizepwr|scatterhist|sequentialfs|signrank|signtest|silhouette|skewness|slicesample|sobolset|squareform|statget|statset|stepwise|stepwisefit|surfht|tabulate|tblread|tblwrite|tcdf|tdfread|tiedrank|tinv|tpdf|TreeBagger|treedisp|treefit|treeprune|treetest|treeval|trimmean|trnd|tstat|ttest|ttest2|unid(?:cdf|inv|pdf|rnd|stat)|unif(?:cdf|inv|it|pdf|rnd|stat)|vartest(?:2|n)?|wbl(?:cdf|fit|inv|like|pdf|rnd|stat)|wblplot|wishrnd|x2fx|xptread|zscore|ztest'
        ].join("|");
        var imageFunctions = [
          'adapthisteq|analyze75info|analyze75read|applycform|applylut|axes2pix|bestblk|blockproc|bwarea|bwareaopen|bwboundaries|bwconncomp|bwconvhull|bwdist|bwdistgeodesic|bweuler|bwhitmiss|bwlabel|bwlabeln|bwmorph|bwpack|bwperim|bwselect|bwtraceboundary|bwulterode|bwunpack|checkerboard|col2im|colfilt|conndef|convmtx2|corner|cornermetric|corr2|cp2tform|cpcorr|cpselect|cpstruct2pairs|dct2|dctmtx|deconvblind|deconvlucy|deconvreg|deconvwnr|decorrstretch|demosaic|dicom(?:anon|dict|info|lookup|read|uid|write)|edge|edgetaper|entropy|entropyfilt|fan2para|fanbeam|findbounds|fliptform|freqz2|fsamp2|fspecial|ftrans2|fwind1|fwind2|getheight|getimage|getimagemodel|getline|getneighbors|getnhood|getpts|getrangefromclass|getrect|getsequence|gray2ind|graycomatrix|graycoprops|graydist|grayslice|graythresh|hdrread|hdrwrite|histeq|hough|houghlines|houghpeaks|iccfind|iccread|iccroot|iccwrite|idct2|ifanbeam|im2bw|im2col|im2double|im2int16|im2java2d|im2single|im2uint16|im2uint8|imabsdiff|imadd|imadjust|ImageAdapter|imageinfo|imagemodel|imapplymatrix|imattributes|imbothat|imclearborder|imclose|imcolormaptool|imcomplement|imcontour|imcontrast|imcrop|imdilate|imdisplayrange|imdistline|imdivide|imellipse|imerode|imextendedmax|imextendedmin|imfill|imfilter|imfindcircles|imfreehand|imfuse|imgca|imgcf|imgetfile|imhandles|imhist|imhmax|imhmin|imimposemin|imlincomb|imline|immagbox|immovie|immultiply|imnoise|imopen|imoverview|imoverviewpanel|impixel|impixelinfo|impixelinfoval|impixelregion|impixelregionpanel|implay|impoint|impoly|impositionrect|improfile|imputfile|impyramid|imreconstruct|imrect|imregconfig|imregionalmax|imregionalmin|imregister|imresize|imroi|imrotate|imsave|imscrollpanel|imshow|imshowpair|imsubtract|imtool|imtophat|imtransform|imview|ind2gray|ind2rgb|interfileinfo|interfileread|intlut|ippl|iptaddcallback|iptcheckconn|iptcheckhandle|iptcheckinput|iptcheckmap|iptchecknargin|iptcheckstrs|iptdemos|iptgetapi|iptGetPointerBehavior|iptgetpref|ipticondir|iptnum2ordinal|iptPointerManager|iptprefs|iptremovecallback|iptSetPointerBehavior|iptsetpref|iptwindowalign|iradon|isbw|isflat|isgray|isicc|isind|isnitf|isrgb|isrset|lab2double|lab2uint16|lab2uint8|label2rgb|labelmatrix|makecform|makeConstrainToRectFcn|makehdr|makelut|makeresampler|maketform|mat2gray|mean2|medfilt2|montage|nitfinfo|nitfread|nlfilter|normxcorr2|ntsc2rgb|openrset|ordfilt2|otf2psf|padarray|para2fan|phantom|poly2mask|psf2otf|qtdecomp|qtgetblk|qtsetblk|radon|rangefilt|reflect|regionprops|registration\.metric\.(?:MattesMutualInformation|MeanSquares)|registration\.optimizer\.(?:OnePlusOneEvolutionary|RegularStepGradientDescent)|rgb2gray|rgb2ntsc|rgb2ycbcr|roicolor|roifill|roifilt2|roipoly|rsetwrite|std2|stdfilt|strel|stretchlim|subimage|tformarray|tformfwd|tforminv|tonemap|translate|truesize|uintlut|viscircles|warp|watershed|whitepoint|wiener2|xyz2double|xyz2uint16|ycbcr2rgb'
        ].join("|");
        var optimFunctions = [
          'bintprog|color|fgoalattain|fminbnd|fmincon|fminimax|fminsearch|fminunc|fseminf|fsolve|fzero|fzmult|gangstr|ktrlink|linprog|lsqcurvefit|lsqlin|lsqnonlin|lsqnonneg|optimget|optimset|optimtool|quadprog'
        ].join("|");
      
        // identifiers: variable/function name, or a chain of variable names joined by dots (obj.method, struct.field1.field2, etc..)
        // valid variable names (start with letter, and contains letters, digits, and underscores).
        // we match "xx.yy" as a whole so that if "xx" is plain and "yy" is not, we dont get a false positive for "yy"
        //var reIdent = '(?:[a-zA-Z][a-zA-Z0-9_]*)';
        //var reIdentChain = '(?:' + reIdent + '(?:\.' + reIdent + ')*' + ')';
      
        // patterns that always start with a known character. Must have a shortcut string.
        var shortcutStylePatterns = [
          // whitespaces: space, tab, carriage return, line feed, line tab, form-feed, non-break space
          [PR.PR_PLAIN, /^[ \t\r\n\v\f\xA0]+/, null, " \t\r\n\u000b\u000c\u00a0"],
      
          // block comments
          //TODO: chokes on nested block comments
          //TODO: false positives when the lines with %{ and %} contain non-spaces
          //[PR.PR_COMMENT, /^%(?:[^\{].*|\{(?:%|%*[^\}%])*(?:\}+%?)?)/, null],
          [PR.PR_COMMENT, /^%\{[^%]*%+(?:[^\}%][^%]*%+)*\}/, null],
      
          // single-line comments
          [PR.PR_COMMENT, /^%[^\r\n]*/, null, "%"],
      
          // system commands
          [PR_SYSCMD, /^![^\r\n]*/, null, "!"]
        ];
      
        // patterns that will be tried in order if the shortcut ones fail. May have shortcuts.
        var fallthroughStylePatterns = [
          // line continuation
          [PR_LINE_CONTINUATION, /^\.\.\.\s*[\r\n]/, null],
      
          // error message
          [PR_ERROR, /^\?\?\? [^\r\n]*/, null],
      
          // warning message
          [PR_WARNING, /^Warning: [^\r\n]*/, null],
      
          // command prompt/output
          //[PR_CODE_OUTPUT, /^>>\s+[^\r\n]*[\r\n]{1,2}[^=]*=[^\r\n]*[\r\n]{1,2}[^\r\n]*/, null],    // full command output (both loose/compact format): `>> EXP\nVAR =\n VAL`
          [PR_CODE_OUTPUT, /^>>\s+/, null],      // only the command prompt `>> `
          [PR_CODE_OUTPUT, /^octave:\d+>\s+/, null],  // Octave command prompt `octave:1> `
      
          // identifier (chain) or closing-parenthesis/brace/bracket, and IS followed by transpose operator
          // this way we dont misdetect the transpose operator ' as the start of a string
          ["lang-matlab-operators", /^((?:[a-zA-Z][a-zA-Z0-9_]*(?:\.[a-zA-Z][a-zA-Z0-9_]*)*|\)|\]|\}|\.)')/, null],
      
          // identifier (chain), and NOT followed by transpose operator
          // this must come AFTER the "is followed by transpose" step (otherwise it chops the last char of identifier)
          ["lang-matlab-identifiers", /^([a-zA-Z][a-zA-Z0-9_]*(?:\.[a-zA-Z][a-zA-Z0-9_]*)*)(?!')/, null],
      
          // single-quoted strings: allow for escaping with '', no multilines
          //[PR.PR_STRING, /(?:(?<=(?:\(|\[|\{|\s|=|;|,|:))|^)'(?:[^']|'')*'(?=(?:\)|\]|\}|\s|=|;|,|:|~|<|>|&|-|\+|\*|\.|\^|\|))/, null],  // string vs. transpose (check before/after context using negative/positive lookbehind/lookahead)
          [PR.PR_STRING, /^'(?:[^']|'')*'/, null],  // "'"
      
          // floating point numbers: 1, 1.0, 1i, -1.1E-1
          [PR.PR_LITERAL, /^[+\-]?\.?\d+(?:\.\d*)?(?:[Ee][+\-]?\d+)?[ij]?/, null],
      
          // parentheses, braces, brackets
          [PR.PR_TAG, /^(?:\{|\}|\(|\)|\[|\])/, null],  // "{}()[]"
      
          // other operators
          [PR.PR_PUNCTUATION, /^(?:<|>|=|~|@|&|;|,|:|!|\-|\+|\*|\^|\.|\||\\|\/)/, null]
        ];
      
        var identifiersPatterns = [
          // list of keywords (`iskeyword`)
          [PR.PR_KEYWORD, /^\b(?:break|case|catch|classdef|continue|else|elseif|end|for|function|global|if|otherwise|parfor|persistent|return|spmd|switch|try|while)\b/, null],
      
          // some specials variables/constants
          [PR_CONSTANT, /^\b(?:true|false|inf|Inf|nan|NaN|eps|pi|ans|nargin|nargout|varargin|varargout)\b/, null],
      
          // some data types
          [PR.PR_TYPE, /^\b(?:cell|struct|char|double|single|logical|u?int(?:8|16|32|64)|sparse)\b/, null],
      
          // commonly used builtin functions from core MATLAB and a few popular toolboxes
          [PR_FUNCTION, new RegExp('^\\b(?:' + coreFunctions + ')\\b'), null],
          [PR_FUNCTION_TOOLBOX, new RegExp('^\\b(?:' + statsFunctions + ')\\b'), null],
          [PR_FUNCTION_TOOLBOX, new RegExp('^\\b(?:' + imageFunctions + ')\\b'), null],
          [PR_FUNCTION_TOOLBOX, new RegExp('^\\b(?:' + optimFunctions + ')\\b'), null],
      
          // plain identifier (user-defined variable/function name)
          [PR_IDENTIFIER, /^[a-zA-Z][a-zA-Z0-9_]*(?:\.[a-zA-Z][a-zA-Z0-9_]*)*/, null]
        ];
      
        var operatorsPatterns = [
          // forward to identifiers to match
          ["lang-matlab-identifiers", /^([a-zA-Z][a-zA-Z0-9_]*(?:\.[a-zA-Z][a-zA-Z0-9_]*)*)/, null],
      
          // parentheses, braces, brackets
          [PR.PR_TAG, /^(?:\{|\}|\(|\)|\[|\])/, null],  // "{}()[]"
      
          // other operators
          [PR.PR_PUNCTUATION, /^(?:<|>|=|~|@|&|;|,|:|!|\-|\+|\*|\^|\.|\||\\|\/)/, null],
      
          // transpose operators
          [PR_TRANSPOSE, /^'/, null]
        ];
      
        PR.registerLangHandler(
          PR.createSimpleLexer([], identifiersPatterns),
          ["matlab-identifiers"]
        );
        PR.registerLangHandler(
          PR.createSimpleLexer([], operatorsPatterns),
          ["matlab-operators"]
        );
        PR.registerLangHandler(
          PR.createSimpleLexer(shortcutStylePatterns, fallthroughStylePatterns),
          ["matlab"]
        );
      })(window['PR']);
      
      
      ================================================
      FILE: google-code-prettify/src/lang-ml.js
      ================================================
      // Copyright (C) 2008 Google Inc.
      //
      // Licensed under the Apache License, Version 2.0 (the "License");
      // you may not use this file except in compliance with the License.
      // You may obtain a copy of the License at
      //
      //      http://www.apache.org/licenses/LICENSE-2.0
      //
      // Unless required by applicable law or agreed to in writing, software
      // distributed under the License is distributed on an "AS IS" BASIS,
      // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      // See the License for the specific language governing permissions and
      // limitations under the License.
      
      
      
      /**
       * @fileoverview
       * Registers a language handler for OCaml, SML, F# and similar languages.
       *
       * Based on the lexical grammar at
       * http://research.microsoft.com/en-us/um/cambridge/projects/fsharp/manual/spec.html#_Toc270597388
       *
       * @author mikesamuel@gmail.com
       */
      
      PR['registerLangHandler'](
          PR['createSimpleLexer'](
              [
               // Whitespace is made up of spaces, tabs and newline characters.
               [PR['PR_PLAIN'],       /^[\t\n\r \xA0]+/, null, '\t\n\r \xA0'],
               // #if ident/#else/#endif directives delimit conditional compilation
               // sections
               [PR['PR_COMMENT'],
                /^#(?:if[\t\n\r \xA0]+(?:[a-z_$][\w\']*|``[^\r\n\t`]*(?:``|$))|else|endif|light)/i,
                null, '#'],
               // A double or single quoted, possibly multi-line, string.
               // F# allows escaped newlines in strings.
               [PR['PR_STRING'],      /^(?:\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)|\'(?:[^\'\\]|\\[\s\S])(?:\'|$))/, null, '"\'']
              ],
              [
               // Block comments are delimited by (* and *) and may be
               // nested. Single-line comments begin with // and extend to
               // the end of a line.
               // TODO: (*...*) comments can be nested.  This does not handle that.
               [PR['PR_COMMENT'],     /^(?:\/\/[^\r\n]*|\(\*[\s\S]*?\*\))/],
               [PR['PR_KEYWORD'],     /^(?:abstract|and|as|assert|begin|class|default|delegate|do|done|downcast|downto|elif|else|end|exception|extern|false|finally|for|fun|function|if|in|inherit|inline|interface|internal|lazy|let|match|member|module|mutable|namespace|new|null|of|open|or|override|private|public|rec|return|static|struct|then|to|true|try|type|upcast|use|val|void|when|while|with|yield|asr|land|lor|lsl|lsr|lxor|mod|sig|atomic|break|checked|component|const|constraint|constructor|continue|eager|event|external|fixed|functor|global|include|method|mixin|object|parallel|process|protected|pure|sealed|trait|virtual|volatile)\b/],
               // A number is a hex integer literal, a decimal real literal, or in
               // scientific notation.
               [PR['PR_LITERAL'],
                /^[+\-]?(?:0x[\da-f]+|(?:(?:\.\d+|\d+(?:\.\d*)?)(?:e[+\-]?\d+)?))/i],
               [PR['PR_PLAIN'],       /^(?:[a-z_][\w']*[!?#]?|``[^\r\n\t`]*(?:``|$))/i],
               // A printable non-space non-special character
               [PR['PR_PUNCTUATION'], /^[^\t\n\r \xA0\"\'\w]+/]
              ]),
          ['fs', 'ml']);
      
      
      ================================================
      FILE: google-code-prettify/src/lang-mumps.js
      ================================================
      // Copyright (C) 2011 Kitware Inc.
      //
      // Licensed under the Apache License, Version 2.0 (the "License");
      // you may not use this file except in compliance with the License.
      // You may obtain a copy of the License at
      //
      //      http://www.apache.org/licenses/LICENSE-2.0
      //
      // Unless required by applicable law or agreed to in writing, software
      // distributed under the License is distributed on an "AS IS" BASIS,
      // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      // See the License for the specific language governing permissions and
      // limitations under the License.
      
      
      
      /**
       * @fileoverview
       * Registers a language handler for MUMPS.
       *
       *
       * To use, include prettify.js and this file in your HTML page.
       * Then put your code in an HTML tag like
       *      <pre class="prettyprint lang-mumps">(my SQL code)</pre>
       * 
       * Commands, intrinsic functions and variables taken from ISO/IEC 11756:1999(E)
       *
       * @author chris.harris@kitware.com
       *
       * Known issues:
       * 
       * - Currently can't distinguish between keywords and local or global variables having the same name
       *   for exampe SET IF="IF?"
       * - m file are already used for MatLab hence using mumps.
       */
      
      (function () {
      
      
      var commands = 'B|BREAK|'       + 
                     'C|CLOSE|'       +
                     'D|DO|'          +
                     'E|ELSE|'        +
                     'F|FOR|'         +
                     'G|GOTO|'        +
                     'H|HALT|'        +
                     'H|HANG|'        +
                     'I|IF|'          +
                     'J|JOB|'         +
                     'K|KILL|'        +
                     'L|LOCK|'        +
                     'M|MERGE|'       +
                     'N|NEW|'         +
                     'O|OPEN|'        +     
                     'Q|QUIT|'        +
                     'R|READ|'        +
                     'S|SET|'         +
                     'TC|TCOMMIT|'    +
                     'TRE|TRESTART|'  +
                     'TRO|TROLLBACK|' +
                     'TS|TSTART|'     +
                     'U|USE|'         +
                     'V|VIEW|'        +  
                     'W|WRITE|'       +
                     'X|XECUTE';
      
      var intrinsicVariables = 'D|DEVICE|'       +
                               'EC|ECODE|'       +  
                               'ES|ESTACK|'      +
                               'ET|ETRAP|'       +
                               'H|HOROLOG|'      +
                               'I|IO|'           +
                               'J|JOB|'          +
                               'K|KEY|'          +
                               'P|PRINCIPAL|'    +
                               'Q|QUIT|'         +
                               'ST|STACK|'       +
                               'S|STORAGE|'      +
                               'SY|SYSTEM|'      +
                               'T|TEST|'         +
                               'TL|TLEVEL|'      +
                               'TR|TRESTART|'    +
                               'X|'              +
                               'Y|'              +
                               'Z[A-Z]*|';    
      
      var intrinsicFunctions = 'A|ASCII|'        +
                               'C|CHAR|'         +
                               'D|DATA|'         +
                               'E|EXTRACT|'      +
                               'F|FIND|'         +
                               'FN|FNUMBER|'     +
                               'G|GET|'          +
                               'J|JUSTIFY|'      +
                               'L|LENGTH|'       +
                               'NA|NAME|'        +
                               'O|ORDER|'        +
                               'P|PIECE|'        +
                               'QL|QLENGTH|'     +
                               'QS|QSUBSCRIPT|'  +
                               'Q|QUERY|'        +
                               'R|RANDOM|'       +
                               'RE|REVERSE|'     +
                               'S|SELECT|'       +
                               'ST|STACK|'       +
                               'T|TEXT|'         +
                               'TR|TRANSLATE|'   +
                               'V|VIEW|'         * 
                               'Z[A-Z]*|';   
      
      var intrinsic = intrinsicVariables + intrinsicFunctions;                  
      
      
      var shortcutStylePatterns = [
               // Whitespace
               [PR['PR_PLAIN'],       /^[\t\n\r \xA0]+/, null, '\t\n\r \xA0'],
               // A double or single quoted, possibly multi-line, string.
               [PR['PR_STRING'],      /^(?:"(?:[^"]|\\.)*")/, null, '"']
        ];
      
      var fallthroughStylePatterns = [
               // A line comment that starts with ;
               [PR['PR_COMMENT'],     /^;[^\r\n]*/, null, ';'],
               // Add intrinsic variables and functions as declarations, there not really but it mean
               // they will hilighted differently from commands.
               [PR['PR_DECLARATION'], new RegExp('^(?:\\$(?:' + intrinsic + '))\\b', 'i'), null],
               // Add commands as keywords
               [PR['PR_KEYWORD'], new RegExp('^(?:[^\\$]' + commands + ')\\b', 'i'), null],
               // A number is a decimal real literal or in scientific notation. 
               [PR['PR_LITERAL'],
                /^[+-]?(?:(?:\.\d+|\d+(?:\.\d*)?)(?:E[+\-]?\d+)?)/i], 
               // An identifier
               [PR['PR_PLAIN'], /^[a-z][a-zA-Z0-9]*/i],
               // Exclude $ % and ^
               [PR['PR_PUNCTUATION'], /^[^\w\t\n\r\xA0\"\$;%\^]|_/]
        ];
      // Can't use m as its already used for MatLab
      PR.registerLangHandler(PR.createSimpleLexer(shortcutStylePatterns, fallthroughStylePatterns), ['mumps']);
      })();
      
      
      ================================================
      FILE: google-code-prettify/src/lang-n.js
      ================================================
      // Copyright (C) 2011 Zimin A.V.
      //
      // Licensed under the Apache License, Version 2.0 (the "License");
      // you may not use this file except in compliance with the License.
      // You may obtain a copy of the License at
      //
      //      http://www.apache.org/licenses/LICENSE-2.0
      //
      // Unless required by applicable law or agreed to in writing, software
      // distributed under the License is distributed on an "AS IS" BASIS,
      // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      // See the License for the specific language governing permissions and
      // limitations under the License.
      
      
      /**
       * @fileoverview
       * Registers a language handler for the Nemerle language.
       * http://nemerle.org
       * @author Zimin A.V.
       */
      (function () {
        // http://nemerle.org/wiki/index.php?title=Base_keywords
        var keywords = 'abstract|and|as|base|catch|class|def|delegate|enum|event|extern|false|finally|'
               + 'fun|implements|interface|internal|is|macro|match|matches|module|mutable|namespace|new|'
               + 'null|out|override|params|partial|private|protected|public|ref|sealed|static|struct|'
               + 'syntax|this|throw|true|try|type|typeof|using|variant|virtual|volatile|when|where|with|'
               + 'assert|assert2|async|break|checked|continue|do|else|ensures|for|foreach|if|late|lock|new|nolate|'
               + 'otherwise|regexp|repeat|requires|return|surroundwith|unchecked|unless|using|while|yield';
      
        PR['registerLangHandler'](PR['createSimpleLexer'](
            // shortcutStylePatterns
            [
              [PR['PR_STRING'], /^(?:\'(?:[^\\\'\r\n]|\\.)*\'|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/, null, '"'],
              [PR['PR_COMMENT'], /^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\r\n]*)/, null, '#'],
              [PR['PR_PLAIN'], /^\s+/, null, ' \r\n\t\xA0']
            ],
            // fallthroughStylePatterns
            [
              [PR['PR_STRING'], /^@\"(?:[^\"]|\"\")*(?:\"|$)/, null],
              [PR['PR_STRING'], /^<#(?:[^#>])*(?:#>|$)/, null],
              [PR['PR_STRING'], /^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/, null],
              [PR['PR_COMMENT'], /^\/\/[^\r\n]*/, null],
              [PR['PR_COMMENT'], /^\/\*[\s\S]*?(?:\*\/|$)/, null],
              [PR['PR_KEYWORD'], new RegExp('^(?:' + keywords + ')\\b'), null],
              [PR['PR_TYPE'], /^(?:array|bool|byte|char|decimal|double|float|int|list|long|object|sbyte|short|string|ulong|uint|ufloat|ulong|ushort|void)\b/, null],
              [PR['PR_LITERAL'], /^@[a-z_$][a-z_$@0-9]*/i, null],
              [PR['PR_TYPE'], /^@[A-Z]+[a-z][A-Za-z_$@0-9]*/, null],
              [PR['PR_PLAIN'], /^'?[A-Za-z_$][a-z_$@0-9]*/i, null],
              [PR['PR_LITERAL'], new RegExp(
                   '^(?:'
        // A hex number
                   + '0x[a-f0-9]+'
        // or an octal or decimal number,
                   + '|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)'
        // possibly in scientific notation
                   + '(?:e[+\\-]?\\d+)?'
                   + ')'
        // with an optional modifier like UL for unsigned long
                   + '[a-z]*', 'i'), null, '0123456789'],
      
              [PR['PR_PUNCTUATION'], /^.[^\s\w\.$@\'\"\`\/\#]*/, null]
            ]),
            ['n', 'nemerle']);
      })();
      
      
      ================================================
      FILE: google-code-prettify/src/lang-pascal.js
      ================================================
      // Contributed by peter dot kofler at code minus cop dot org
      
      /**
       * @fileoverview
       * Registers a language handler for (Turbo) Pascal.
       *
       * To use, include prettify.js and this file in your HTML page.
       * Then put your code in an HTML tag like
       *      <pre class="prettyprint lang-pascal">(my Pascal code)</pre>
       *
       * @author peter dot kofler at code minus cop dot org
       */
      
      PR.registerLangHandler(
          PR.createSimpleLexer(
              [ // shortcutStylePatterns
                // 'single-line-string'
                [PR.PR_STRING,        /^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$))/, null, '\''],
                // Whitespace
                [PR.PR_PLAIN,         /^\s+/, null, ' \r\n\t\xA0']
              ],
              [ // fallthroughStylePatterns
                // A cStyleComments comment (* *) or {}
                [PR.PR_COMMENT,       /^\(\*[\s\S]*?(?:\*\)|$)|^\{[\s\S]*?(?:\}|$)/, null],
                [PR.PR_KEYWORD,       /^(?:ABSOLUTE|AND|ARRAY|ASM|ASSEMBLER|BEGIN|CASE|CONST|CONSTRUCTOR|DESTRUCTOR|DIV|DO|DOWNTO|ELSE|END|EXTERNAL|FOR|FORWARD|FUNCTION|GOTO|IF|IMPLEMENTATION|IN|INLINE|INTERFACE|INTERRUPT|LABEL|MOD|NOT|OBJECT|OF|OR|PACKED|PROCEDURE|PROGRAM|RECORD|REPEAT|SET|SHL|SHR|THEN|TO|TYPE|UNIT|UNTIL|USES|VAR|VIRTUAL|WHILE|WITH|XOR)\b/i, null],
                [PR.PR_LITERAL,       /^(?:true|false|self|nil)/i, null],
                [PR.PR_PLAIN,         /^[a-z][a-z0-9]*/i, null],
                // Literals .0, 0, 0.0 0E13
                [PR.PR_LITERAL,       /^(?:\$[a-f0-9]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+\-]?\d+)?)/i,  null, '0123456789'],
                [PR.PR_PUNCTUATION,   /^.[^\s\w\.$@\'\/]*/, null]
              ]),
          ['pascal']);
      
      
      ================================================
      FILE: google-code-prettify/src/lang-proto.js
      ================================================
      // Copyright (C) 2006 Google Inc.
      //
      // Licensed under the Apache License, Version 2.0 (the "License");
      // you may not use this file except in compliance with the License.
      // You may obtain a copy of the License at
      //
      //      http://www.apache.org/licenses/LICENSE-2.0
      //
      // Unless required by applicable law or agreed to in writing, software
      // distributed under the License is distributed on an "AS IS" BASIS,
      // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      // See the License for the specific language governing permissions and
      // limitations under the License.
      
      
      /**
       * @fileoverview
       * Registers a language handler for Protocol Buffers as described at
       * http://code.google.com/p/protobuf/.
       *
       * Based on the lexical grammar at
       * http://research.microsoft.com/fsharp/manual/spec2.aspx#_Toc202383715
       *
       * @author mikesamuel@gmail.com
       */
      
      PR['registerLangHandler'](PR['sourceDecorator']({
              'keywords': (
                  'bytes,default,double,enum,extend,extensions,false,'
                  + 'group,import,max,message,option,'
                  + 'optional,package,repeated,required,returns,rpc,service,'
                  + 'syntax,to,true'),
              'types': /^(bool|(double|s?fixed|[su]?int)(32|64)|float|string)\b/,
              'cStyleComments': true
            }), ['proto']);
      
      
      ================================================
      FILE: google-code-prettify/src/lang-r.js
      ================================================
      // Copyright (C) 2012 Jeffrey B. Arnold
      //
      // Licensed under the Apache License, Version 2.0 (the "License");
      // you may not use this file except in compliance with the License.
      // You may obtain a copy of the License at
      //
      //      http://www.apache.org/licenses/LICENSE-2.0
      //
      // Unless required by applicable law or agreed to in writing, software
      // distributed under the License is distributed on an "AS IS" BASIS,
      // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      // See the License for the specific language governing permissions and
      // limitations under the License.
      
      
      /**
       * @fileoverview
       * Registers a language handler for S, S-plus, and R source code.
       *
       *
       * To use, include prettify.js and this file in your HTML page.
       * Then put your code in an HTML tag like
       *      <pre class="prettyprint lang-r"> code </pre>
       *
       * Language definition from
       * http://cran.r-project.org/doc/manuals/R-lang.html.
       * Many of the regexes are shared  with the pygments SLexer,
       * http://pygments.org/.
       *
       * Original: https://raw.github.com/jrnold/prettify-lang-r-bugs/master/lang-r.js
       *
       * @author jeffrey.arnold@gmail.com
       */
      PR['registerLangHandler'](
          PR['createSimpleLexer'](
              [
                  [PR['PR_PLAIN'],       /^[\t\n\r \xA0]+/, null, '\t\n\r \xA0'],
      	    [PR['PR_STRING'],      /^\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)/, null, '"'],
      	    [PR['PR_STRING'],      /^\'(?:[^\'\\]|\\[\s\S])*(?:\'|$)/, null, "'"]
              ],
              [
                  [PR['PR_COMMENT'],     /^#.*/],
      	    [PR['PR_KEYWORD'],     /^(?:if|else|for|while|repeat|in|next|break|return|switch|function)(?![A-Za-z0-9_.])/],
      	    // hex numbes
      	    [PR['PR_LITERAL'], /^0[xX][a-fA-F0-9]+([pP][0-9]+)?[Li]?/],
      	    // Decimal numbers
                  [PR['PR_LITERAL'], /^[+-]?([0-9]+(\.[0-9]+)?|\.[0-9]+)([eE][+-]?[0-9]+)?[Li]?/],
      	    // builtin symbols
      	    [PR['PR_LITERAL'], /^(?:NULL|NA(?:_(?:integer|real|complex|character)_)?|Inf|TRUE|FALSE|NaN|\.\.(?:\.|[0-9]+))(?![A-Za-z0-9_.])/],
      	    // assignment, operators, and parens, etc.
      	    [PR['PR_PUNCTUATION'], /^(?:<<?-|->>?|-|==|<=|>=|<|>|&&?|!=|\|\|?|\*|\+|\^|\/|!|%.*?%|=|~|\$|@|:{1,3}|[\[\](){};,?])/],
      	    // valid variable names
      	    [PR['PR_PLAIN'], /^(?:[A-Za-z]+[A-Za-z0-9_.]*|\.[a-zA-Z_][0-9a-zA-Z\._]*)(?![A-Za-z0-9_.])/],
      	    // string backtick
      	    [PR['PR_STRING'], /^`.+`/]
              ]),
          ['r', 's', 'R', 'S', 'Splus']);
      
      
      ================================================
      FILE: google-code-prettify/src/lang-rd.js
      ================================================
      // Copyright (C) 2012 Jeffrey Arnold
      //
      // Licensed under the Apache License, Version 2.0 (the "License");
      // you may not use this file except in compliance with the License.
      // You may obtain a copy of the License at
      //
      //      http://www.apache.org/licenses/LICENSE-2.0
      //
      // Unless required by applicable law or agreed to in writing, software
      // distributed under the License is distributed on an "AS IS" BASIS,
      // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      // See the License for the specific language governing permissions and
      // limitations under the License.
      
      /**
       * @fileoverview
       * Support for R documentation (Rd) files
       *
       * Minimal highlighting or Rd files, basically just highlighting
       * macros. It does not try to identify verbatim or R-like regions of
       * macros as that is too complicated for a lexer.  Descriptions of the
       * Rd format can be found
       * http://cran.r-project.org/doc/manuals/R-exts.html and
       * http://developer.r-project.org/parseRd.pdf.
       *
       * @author Jeffrey Arnold
       */
      PR['registerLangHandler'](
          PR['createSimpleLexer'](
              [
                  // whitespace
                  [PR['PR_PLAIN'],   /^[\t\n\r \xA0]+/, null, '\t\n\r \xA0'],
                  // all comments begin with '%'
                  [PR['PR_COMMENT'], /^%[^\r\n]*/, null, '%']
              ],
              [// special macros with no args
                  [PR['PR_LITERAL'], /^\\(?:cr|l?dots|R|tab)\b/],
      	    // macros
                  [PR['PR_KEYWORD'], /^\\[a-zA-Z@]+/],
      	    // highlighted as macros, since technically they are
                  [PR['PR_KEYWORD'],  /^#(?:ifn?def|endif)/ ],
      	    // catch escaped brackets
      	    [PR['PR_PLAIN'], /^\\[{}]/],
                  // punctuation
                  [PR['PR_PUNCTUATION'], /^[{}()\[\]]+/]
              ]),
          ['Rd', 'rd']);
      
      
      ================================================
      FILE: google-code-prettify/src/lang-scala.js
      ================================================
      // Copyright (C) 2010 Google Inc.
      //
      // Licensed under the Apache License, Version 2.0 (the "License");
      // you may not use this file except in compliance with the License.
      // You may obtain a copy of the License at
      //
      //      http://www.apache.org/licenses/LICENSE-2.0
      //
      // Unless required by applicable law or agreed to in writing, software
      // distributed under the License is distributed on an "AS IS" BASIS,
      // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      // See the License for the specific language governing permissions and
      // limitations under the License.
      
      
      /**
       * @fileoverview
       * Registers a language handler for Scala.
       *
       * Derived from http://lampsvn.epfl.ch/svn-repos/scala/scala-documentation/trunk/src/reference/SyntaxSummary.tex
       *
       * @author mikesamuel@gmail.com
       */
      
      PR['registerLangHandler'](
          PR['createSimpleLexer'](
              [
               // Whitespace
               [PR['PR_PLAIN'],       /^[\t\n\r \xA0]+/, null, '\t\n\r \xA0'],
               // A double or single quoted string 
                // or a triple double-quoted multi-line string.
               [PR['PR_STRING'],
                /^(?:"(?:(?:""(?:""?(?!")|[^\\"]|\\.)*"{0,3})|(?:[^"\r\n\\]|\\.)*"?))/,
                null, '"'],
               [PR['PR_LITERAL'],     /^`(?:[^\r\n\\`]|\\.)*`?/, null, '`'],
               [PR['PR_PUNCTUATION'], /^[!#%&()*+,\-:;<=>?@\[\\\]^{|}~]+/, null,
                '!#%&()*+,-:;<=>?@[\\]^{|}~']
              ],
              [
               // A symbol literal is a single quote followed by an identifier with no
               // single quote following
               // A character literal has single quotes on either side
               [PR['PR_STRING'],      /^'(?:[^\r\n\\']|\\(?:'|[^\r\n']+))'/],
               [PR['PR_LITERAL'],     /^'[a-zA-Z_$][\w$]*(?!['$\w])/],
               [PR['PR_KEYWORD'],     /^(?:abstract|case|catch|class|def|do|else|extends|final|finally|for|forSome|if|implicit|import|lazy|match|new|object|override|package|private|protected|requires|return|sealed|super|throw|trait|try|type|val|var|while|with|yield)\b/],
               [PR['PR_LITERAL'],     /^(?:true|false|null|this)\b/],
               [PR['PR_LITERAL'],     /^(?:(?:0(?:[0-7]+|X[0-9A-F]+))L?|(?:(?:0|[1-9][0-9]*)(?:(?:\.[0-9]+)?(?:E[+\-]?[0-9]+)?F?|L?))|\\.[0-9]+(?:E[+\-]?[0-9]+)?F?)/i],
               // Treat upper camel case identifiers as types.
               [PR['PR_TYPE'],        /^[$_]*[A-Z][_$A-Z0-9]*[a-z][\w$]*/],
               [PR['PR_PLAIN'],       /^[$a-zA-Z_][\w$]*/],
               [PR['PR_COMMENT'],     /^\/(?:\/.*|\*(?:\/|\**[^*/])*(?:\*+\/?)?)/],
               [PR['PR_PUNCTUATION'], /^(?:\.+|\/)/]
              ]),
          ['scala']);
      
      
      ================================================
      FILE: google-code-prettify/src/lang-sql.js
      ================================================
      // Copyright (C) 2008 Google Inc.
      //
      // Licensed under the Apache License, Version 2.0 (the "License");
      // you may not use this file except in compliance with the License.
      // You may obtain a copy of the License at
      //
      //      http://www.apache.org/licenses/LICENSE-2.0
      //
      // Unless required by applicable law or agreed to in writing, software
      // distributed under the License is distributed on an "AS IS" BASIS,
      // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      // See the License for the specific language governing permissions and
      // limitations under the License.
      
      
      
      /**
       * @fileoverview
       * Registers a language handler for SQL.
       *
       *
       * To use, include prettify.js and this file in your HTML page.
       * Then put your code in an HTML tag like
       *      <pre class="prettyprint lang-sql">(my SQL code)</pre>
       *
       *
       * http://savage.net.au/SQL/sql-99.bnf.html is the basis for the grammar, and
       * http://msdn.microsoft.com/en-us/library/aa238507(SQL.80).aspx and
       * http://meta.stackoverflow.com/q/92352/137403 as the bases for the keyword
       * list.
       *
       * @author mikesamuel@gmail.com
       */
      
      PR['registerLangHandler'](
          PR['createSimpleLexer'](
              [
               // Whitespace
               [PR['PR_PLAIN'],       /^[\t\n\r \xA0]+/, null, '\t\n\r \xA0'],
               // A double or single quoted, possibly multi-line, string.
               [PR['PR_STRING'],      /^(?:"(?:[^\"\\]|\\.)*"|'(?:[^\'\\]|\\.)*')/, null,
                '"\'']
              ],
              [
               // A comment is either a line comment that starts with two dashes, or
               // two dashes preceding a long bracketed block.
               [PR['PR_COMMENT'], /^(?:--[^\r\n]*|\/\*[\s\S]*?(?:\*\/|$))/],
               [PR['PR_KEYWORD'], /^(?:ADD|ALL|ALTER|AND|ANY|APPLY|AS|ASC|AUTHORIZATION|BACKUP|BEGIN|BETWEEN|BREAK|BROWSE|BULK|BY|CASCADE|CASE|CHECK|CHECKPOINT|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMN|COMMIT|COMPUTE|CONNECT|CONSTRAINT|CONTAINS|CONTAINSTABLE|CONTINUE|CONVERT|CREATE|CROSS|CURRENT|CURRENT_DATE|CURRENT_TIME|CURRENT_TIMESTAMP|CURRENT_USER|CURSOR|DATABASE|DBCC|DEALLOCATE|DECLARE|DEFAULT|DELETE|DENY|DESC|DISK|DISTINCT|DISTRIBUTED|DOUBLE|DROP|DUMMY|DUMP|ELSE|END|ERRLVL|ESCAPE|EXCEPT|EXEC|EXECUTE|EXISTS|EXIT|FETCH|FILE|FILLFACTOR|FOLLOWING|FOR|FOREIGN|FREETEXT|FREETEXTTABLE|FROM|FULL|FUNCTION|GOTO|GRANT|GROUP|HAVING|HOLDLOCK|IDENTITY|IDENTITYCOL|IDENTITY_INSERT|IF|IN|INDEX|INNER|INSERT|INTERSECT|INTO|IS|JOIN|KEY|KILL|LEFT|LIKE|LINENO|LOAD|MATCH|MATCHED|MERGE|NATURAL|NATIONAL|NOCHECK|NONCLUSTERED|NOCYCLE|NOT|NULL|NULLIF|OF|OFF|OFFSETS|ON|OPEN|OPENDATASOURCE|OPENQUERY|OPENROWSET|OPENXML|OPTION|OR|ORDER|OUTER|OVER|PARTITION|PERCENT|PIVOT|PLAN|PRECEDING|PRECISION|PRIMARY|PRINT|PROC|PROCEDURE|PUBLIC|RAISERROR|READ|READTEXT|RECONFIGURE|REFERENCES|REPLICATION|RESTORE|RESTRICT|RETURN|REVOKE|RIGHT|ROLLBACK|ROWCOUNT|ROWGUIDCOL|ROWS?|RULE|SAVE|SCHEMA|SELECT|SESSION_USER|SET|SETUSER|SHUTDOWN|SOME|START|STATISTICS|SYSTEM_USER|TABLE|TEXTSIZE|THEN|TO|TOP|TRAN|TRANSACTION|TRIGGER|TRUNCATE|TSEQUAL|UNBOUNDED|UNION|UNIQUE|UNPIVOT|UPDATE|UPDATETEXT|USE|USER|USING|VALUES|VARYING|VIEW|WAITFOR|WHEN|WHERE|WHILE|WITH|WITHIN|WRITETEXT|XML)(?=[^\w-]|$)/i, null],
               // A number is a hex integer literal, a decimal real literal, or in
               // scientific notation.
               [PR['PR_LITERAL'],
                /^[+-]?(?:0x[\da-f]+|(?:(?:\.\d+|\d+(?:\.\d*)?)(?:e[+\-]?\d+)?))/i],
               // An identifier
               [PR['PR_PLAIN'], /^[a-z_][\w-]*/i],
               // A run of punctuation
               [PR['PR_PUNCTUATION'], /^[^\w\t\n\r \xA0\"\'][^\w\t\n\r \xA0+\-\"\']*/]
              ]),
          ['sql']);
      
      
      ================================================
      FILE: google-code-prettify/src/lang-tcl.js
      ================================================
      // Copyright (C) 2012 Pyrios.
      //
      // Licensed under the Apache License, Version 2.0 (the "License");
      // you may not use this file except in compliance with the License.
      // You may obtain a copy of the License at
      //
      //      http://www.apache.org/licenses/LICENSE-2.0
      //
      // Unless required by applicable law or agreed to in writing, software
      // distributed under the License is distributed on an "AS IS" BASIS,
      // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      // See the License for the specific language governing permissions and
      // limitations under the License.
      
      
      
      /**
       * @fileoverview
       * Registers a language handler for TCL
       *
       *
       * To use, include prettify.js and this file in your HTML page.
       * Then put your code in an HTML tag like
       *      <pre class="prettyprint lang-tcl">proc foo {} {puts bar}</pre>
       *
       * I copy-pasted lang-lisp.js, so this is probably not 100% accurate.
       * I used http://wiki.tcl.tk/1019 for the keywords, but tried to only
       * include as keywords that had more impact on the program flow
       * rather than providing convenience. For example, I included 'if'
       * since that provides branching, but left off 'open' since that is more
       * like a proc. Add more if it makes sense.
       *
       * @author pyrios@gmail.com
       */
      
      PR['registerLangHandler'](
          PR['createSimpleLexer'](
              [
               ['opn',             /^\{+/, null, '{'],
               ['clo',             /^\}+/, null, '}'],
               // A line comment that starts with ;
               [PR['PR_COMMENT'],     /^#[^\r\n]*/, null, '#'],
               // Whitespace
               [PR['PR_PLAIN'],       /^[\t\n\r \xA0]+/, null, '\t\n\r \xA0'],
               // A double quoted, possibly multi-line, string.
               [PR['PR_STRING'],      /^\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)/, null, '"']
              ],
              [
               [PR['PR_KEYWORD'],     /^(?:after|append|apply|array|break|case|catch|continue|error|eval|exec|exit|expr|for|foreach|if|incr|info|proc|return|set|switch|trace|uplevel|upvar|while)\b/, null],
               [PR['PR_LITERAL'],
                /^[+\-]?(?:[0#]x[0-9a-f]+|\d+\/\d+|(?:\.\d+|\d+(?:\.\d*)?)(?:[ed][+\-]?\d+)?)/i],
               // A single quote possibly followed by a word that optionally ends with
               // = ! or ?.
               [PR['PR_LITERAL'],
                /^\'(?:-*(?:\w|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?)?/],
               // A word that optionally ends with = ! or ?.
               [PR['PR_PLAIN'],
                /^-*(?:[a-z_]|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?/i],
               // A printable non-space non-special character
               [PR['PR_PUNCTUATION'], /^[^\w\t\n\r \xA0()\"\\\';]+/]
              ]),
          ['tcl']);
      
      
      ================================================
      FILE: google-code-prettify/src/lang-tex.js
      ================================================
      // Copyright (C) 2011 Martin S.
      //
      // Licensed under the Apache License, Version 2.0 (the "License");
      // you may not use this file except in compliance with the License.
      // You may obtain a copy of the License at
      //
      //      http://www.apache.org/licenses/LICENSE-2.0
      //
      // Unless required by applicable law or agreed to in writing, software
      // distributed under the License is distributed on an "AS IS" BASIS,
      // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      // See the License for the specific language governing permissions and
      // limitations under the License.
      
      /**
       * @fileoverview
       * Support for tex highlighting as discussed on
       * <a href="http://meta.tex.stackexchange.com/questions/872/text-immediate-following-double-backslashes-is-highlighted-as-macro-inside-a-code/876#876">meta.tex.stackexchange.com</a>.
       *
       * @author Martin S.
       */
      
      PR['registerLangHandler'](
          PR['createSimpleLexer'](
              [
               // whitespace
               [PR['PR_PLAIN'],   /^[\t\n\r \xA0]+/, null, '\t\n\r \xA0'],
               // all comments begin with '%'
               [PR['PR_COMMENT'], /^%[^\r\n]*/, null, '%']
              ],
              [
               //[PR['PR_DECLARATION'], /^\\([egx]?def|(new|renew|provide)(command|environment))\b/],
               // any command starting with a \ and contains
               // either only letters (a-z,A-Z), '@' (internal macros)
               [PR['PR_KEYWORD'], /^\\[a-zA-Z@]+/],
               // or contains only one character
               [PR['PR_KEYWORD'], /^\\./],
               // Highlight dollar for math mode and ampersam for tabular
               [PR['PR_TYPE'],    /^[$&]/],
               // numeric measurement values with attached units
               [PR['PR_LITERAL'],
                /[+-]?(?:\.\d+|\d+(?:\.\d*)?)(cm|em|ex|in|pc|pt|bp|mm)/i],
               // punctuation usually occurring within commands
               [PR['PR_PUNCTUATION'], /^[{}()\[\]=]+/]
              ]),
          ['latex', 'tex']);
      
      
      ================================================
      FILE: google-code-prettify/src/lang-vb.js
      ================================================
      // Copyright (C) 2009 Google Inc.
      //
      // Licensed under the Apache License, Version 2.0 (the "License");
      // you may not use this file except in compliance with the License.
      // You may obtain a copy of the License at
      //
      //      http://www.apache.org/licenses/LICENSE-2.0
      //
      // Unless required by applicable law or agreed to in writing, software
      // distributed under the License is distributed on an "AS IS" BASIS,
      // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      // See the License for the specific language governing permissions and
      // limitations under the License.
      
      
      
      /**
       * @fileoverview
       * Registers a language handler for various flavors of basic.
       *
       *
       * To use, include prettify.js and this file in your HTML page.
       * Then put your code in an HTML tag like
       *      <pre class="prettyprint lang-vb"></pre>
       *
       *
       * http://msdn.microsoft.com/en-us/library/aa711638(VS.71).aspx defines the
       * visual basic grammar lexical grammar.
       *
       * @author mikesamuel@gmail.com
       */
      
      PR['registerLangHandler'](
          PR['createSimpleLexer'](
              [
               // Whitespace
               [PR['PR_PLAIN'],       /^[\t\n\r \xA0\u2028\u2029]+/, null, '\t\n\r \xA0\u2028\u2029'],
               // A double quoted string with quotes escaped by doubling them.
               // A single character can be suffixed with C.
               [PR['PR_STRING'],      /^(?:[\"\u201C\u201D](?:[^\"\u201C\u201D]|[\"\u201C\u201D]{2})(?:[\"\u201C\u201D]c|$)|[\"\u201C\u201D](?:[^\"\u201C\u201D]|[\"\u201C\u201D]{2})*(?:[\"\u201C\u201D]|$))/i, null,
                '"\u201C\u201D'],
               // A comment starts with a single quote and runs until the end of the
               // line.
               // VB6 apparently allows _ as an escape sequence for newlines though
               // this is not a documented feature of VB.net.
               // http://meta.stackoverflow.com/q/121497/137403
               [PR['PR_COMMENT'],     /^[\'\u2018\u2019](?:_(?:\r\n?|[^\r]?)|[^\r\n_\u2028\u2029])*/, null, '\'\u2018\u2019']
              ],
              [
               [PR['PR_KEYWORD'], /^(?:AddHandler|AddressOf|Alias|And|AndAlso|Ansi|As|Assembly|Auto|Boolean|ByRef|Byte|ByVal|Call|Case|Catch|CBool|CByte|CChar|CDate|CDbl|CDec|Char|CInt|Class|CLng|CObj|Const|CShort|CSng|CStr|CType|Date|Decimal|Declare|Default|Delegate|Dim|DirectCast|Do|Double|Each|Else|ElseIf|End|EndIf|Enum|Erase|Error|Event|Exit|Finally|For|Friend|Function|Get|GetType|GoSub|GoTo|Handles|If|Implements|Imports|In|Inherits|Integer|Interface|Is|Let|Lib|Like|Long|Loop|Me|Mod|Module|MustInherit|MustOverride|MyBase|MyClass|Namespace|New|Next|Not|NotInheritable|NotOverridable|Object|On|Option|Optional|Or|OrElse|Overloads|Overridable|Overrides|ParamArray|Preserve|Private|Property|Protected|Public|RaiseEvent|ReadOnly|ReDim|RemoveHandler|Resume|Return|Select|Set|Shadows|Shared|Short|Single|Static|Step|Stop|String|Structure|Sub|SyncLock|Then|Throw|To|Try|TypeOf|Unicode|Until|Variant|Wend|When|While|With|WithEvents|WriteOnly|Xor|EndIf|GoSub|Let|Variant|Wend)\b/i, null],
               // A second comment form
               [PR['PR_COMMENT'], /^REM\b[^\r\n\u2028\u2029]*/i],
               // A boolean, numeric, or date literal.
               [PR['PR_LITERAL'],
                /^(?:True\b|False\b|Nothing\b|\d+(?:E[+\-]?\d+[FRD]?|[FRDSIL])?|(?:&H[0-9A-F]+|&O[0-7]+)[SIL]?|\d*\.\d+(?:E[+\-]?\d+)?[FRD]?|#\s+(?:\d+[\-\/]\d+[\-\/]\d+(?:\s+\d+:\d+(?::\d+)?(\s*(?:AM|PM))?)?|\d+:\d+(?::\d+)?(\s*(?:AM|PM))?)\s+#)/i],
               // An identifier.  Keywords can be turned into identifers
               // with square brackets, and there may be optional type
               // characters after a normal identifier in square brackets.
               [PR['PR_PLAIN'], /^(?:(?:[a-z]|_\w)\w*(?:\[[%&@!#]+\])?|\[(?:[a-z]|_\w)\w*\])/i],
               // A run of punctuation
               [PR['PR_PUNCTUATION'],
                /^[^\w\t\n\r \"\'\[\]\xA0\u2018\u2019\u201C\u201D\u2028\u2029]+/],
               // Square brackets
               [PR['PR_PUNCTUATION'], /^(?:\[|\])/]
              ]),
          ['vb', 'vbs']);
      
      
      ================================================
      FILE: google-code-prettify/src/lang-vhdl.js
      ================================================
      /**
       * @fileoverview
       * Registers a language handler for VHDL '93.
       *
       * Based on the lexical grammar and keywords at
       * http://www.iis.ee.ethz.ch/~zimmi/download/vhdl93_syntax.html
       *
       * @author benoit@ryder.fr
       */
      
      PR['registerLangHandler'](
          PR['createSimpleLexer'](
              [
               // Whitespace
               [PR['PR_PLAIN'], /^[\t\n\r \xA0]+/, null, '\t\n\r \xA0']
              ],
              [
               // String, character or bit string
               [PR['PR_STRING'], /^(?:[BOX]?"(?:[^\"]|"")*"|'.')/i],
               // Comment, from two dashes until end of line.
               [PR['PR_COMMENT'], /^--[^\r\n]*/],
               [PR['PR_KEYWORD'], /^(?:abs|access|after|alias|all|and|architecture|array|assert|attribute|begin|block|body|buffer|bus|case|component|configuration|constant|disconnect|downto|else|elsif|end|entity|exit|file|for|function|generate|generic|group|guarded|if|impure|in|inertial|inout|is|label|library|linkage|literal|loop|map|mod|nand|new|next|nor|not|null|of|on|open|or|others|out|package|port|postponed|procedure|process|pure|range|record|register|reject|rem|report|return|rol|ror|select|severity|shared|signal|sla|sll|sra|srl|subtype|then|to|transport|type|unaffected|units|until|use|variable|wait|when|while|with|xnor|xor)(?=[^\w-]|$)/i, null],
               // Type, predefined or standard
               [PR['PR_TYPE'], /^(?:bit|bit_vector|character|boolean|integer|real|time|string|severity_level|positive|natural|signed|unsigned|line|text|std_u?logic(?:_vector)?)(?=[^\w-]|$)/i, null],
               // Predefined attributes
               [PR['PR_TYPE'], /^\'(?:ACTIVE|ASCENDING|BASE|DELAYED|DRIVING|DRIVING_VALUE|EVENT|HIGH|IMAGE|INSTANCE_NAME|LAST_ACTIVE|LAST_EVENT|LAST_VALUE|LEFT|LEFTOF|LENGTH|LOW|PATH_NAME|POS|PRED|QUIET|RANGE|REVERSE_RANGE|RIGHT|RIGHTOF|SIMPLE_NAME|STABLE|SUCC|TRANSACTION|VAL|VALUE)(?=[^\w-]|$)/i, null],
               // Number, decimal or based literal
               [PR['PR_LITERAL'], /^\d+(?:_\d+)*(?:#[\w\\.]+#(?:[+\-]?\d+(?:_\d+)*)?|(?:\.\d+(?:_\d+)*)?(?:E[+\-]?\d+(?:_\d+)*)?)/i],
               // Identifier, basic or extended
               [PR['PR_PLAIN'], /^(?:[a-z]\w*|\\[^\\]*\\)/i],
               // Punctuation
               [PR['PR_PUNCTUATION'], /^[^\w\t\n\r \xA0\"\'][^\w\t\n\r \xA0\-\"\']*/]
              ]),
          ['vhdl', 'vhd']);
      
      
      ================================================
      FILE: google-code-prettify/src/lang-wiki.js
      ================================================
      // Copyright (C) 2009 Google Inc.
      //
      // Licensed under the Apache License, Version 2.0 (the "License");
      // you may not use this file except in compliance with the License.
      // You may obtain a copy of the License at
      //
      //      http://www.apache.org/licenses/LICENSE-2.0
      //
      // Unless required by applicable law or agreed to in writing, software
      // distributed under the License is distributed on an "AS IS" BASIS,
      // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      // See the License for the specific language governing permissions and
      // limitations under the License.
      
      
      /**
       * @fileoverview
       * Registers a language handler for Wiki pages.
       *
       * Based on WikiSyntax at http://code.google.com/p/support/wiki/WikiSyntax
       *
       * @author mikesamuel@gmail.com
       */
      
      PR['registerLangHandler'](
          PR['createSimpleLexer'](
              [
               // Whitespace
               [PR['PR_PLAIN'],       /^[\t \xA0a-gi-z0-9]+/, null,
                '\t \xA0abcdefgijklmnopqrstuvwxyz0123456789'],
               // Wiki formatting
               [PR['PR_PUNCTUATION'], /^[=*~\^\[\]]+/, null, '=*~^[]']
              ],
              [
               // Meta-info like #summary, #labels, etc.
               ['lang-wiki.meta',  /(?:^^|\r\n?|\n)(#[a-z]+)\b/],
               // A WikiWord
               [PR['PR_LITERAL'],     /^(?:[A-Z][a-z][a-z0-9]+[A-Z][a-z][a-zA-Z0-9]+)\b/
                ],
               // A preformatted block in an unknown language
               ['lang-',           /^\{\{\{([\s\S]+?)\}\}\}/],
               // A block of source code in an unknown language
               ['lang-',           /^`([^\r\n`]+)`/],
               // An inline URL.
               [PR['PR_STRING'],
                /^https?:\/\/[^\/?#\s]*(?:\/[^?#\s]*)?(?:\?[^#\s]*)?(?:#\S*)?/i],
               [PR['PR_PLAIN'],       /^(?:\r\n|[\s\S])[^#=*~^A-Zh\{`\[\r\n]*/]
              ]),
          ['wiki']);
      
      PR['registerLangHandler'](
          PR['createSimpleLexer']([[PR['PR_KEYWORD'], /^#[a-z]+/i, null, '#']], []),
          ['wiki.meta']);
      
      
      ================================================
      FILE: google-code-prettify/src/lang-xq.js
      ================================================
      // Copyright (C) 2011 Patrick Wied
      //
      // Licensed under the Apache License, Version 2.0 (the "License");
      // you may not use this file except in compliance with the License.
      // You may obtain a copy of the License at
      //
      //      http://www.apache.org/licenses/LICENSE-2.0
      //
      // Unless required by applicable law or agreed to in writing, software
      // distributed under the License is distributed on an "AS IS" BASIS,
      // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      // See the License for the specific language governing permissions and
      // limitations under the License.
      
      
      
      /**
       * @fileoverview
       * Registers a language handler for XQuery.
       *
       * To use, include prettify.js and this file in your HTML page.
       * Then put your code in an HTML tag like
       *      <pre class="prettyprint lang-xq"></pre>
       *
       *
       * @author Patrick Wied ( patpa7p@live.de )
       * @version 2010-09-28
       */
      
      // Falls back to plain for stylesheets that don't style fun.
      var PR_FUNCTION = 'fun pln';
      // Falls back to plaiin for stylesheets that don't style var.
      var PR_VARIABLE = 'var pln';
      
      PR['registerLangHandler'](
          PR['createSimpleLexer'](
              [
               // Matching $var-ia_bles
               [PR_VARIABLE, /^\$[A-Za-z0-9_\-]+/, null, "$"]
              ],
              [
               // Matching lt and gt operators
               // Not the best matching solution but you have to differentiate between the gt operator and the tag closing char
               [PR['PR_PLAIN'], /^[\s=][<>][\s=]/],
               // Matching @Attributes
               [PR['PR_LITERAL'], /^\@[\w-]+/],
               // Matching xml tags
               [PR['PR_TAG'], /^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],
               // Matching single or multiline xquery comments -> (: <text> :)
               [PR['PR_COMMENT'], /^\(:[\s\S]*?:\)/],
               // Tokenizing /{}:=;*,[]() as plain
               [PR['PR_PLAIN'], /^[\/\{\};,\[\]\(\)]$/],
               // Matching a double or single quoted, possibly multi-line, string.
               // with the special condition that a { in a string changes to xquery context 
               [PR['PR_STRING'], /^(?:\"(?:[^\"\\\{]|\\[\s\S])*(?:\"|$)|\'(?:[^\'\\\{]|\\[\s\S])*(?:\'|$))/, null, '"\''],
               // Matching standard xquery keywords
               [PR['PR_KEYWORD'], /^(?:xquery|where|version|variable|union|typeswitch|treat|to|then|text|stable|sortby|some|self|schema|satisfies|returns|return|ref|processing-instruction|preceding-sibling|preceding|precedes|parent|only|of|node|namespace|module|let|item|intersect|instance|in|import|if|function|for|follows|following-sibling|following|external|except|every|else|element|descending|descendant-or-self|descendant|define|default|declare|comment|child|cast|case|before|attribute|assert|ascending|as|ancestor-or-self|ancestor|after|eq|order|by|or|and|schema-element|document-node|node|at)\b/],
               // Matching standard xquery types
               [PR['PR_TYPE'], /^(?:xs:yearMonthDuration|xs:unsignedLong|xs:time|xs:string|xs:short|xs:QName|xs:Name|xs:long|xs:integer|xs:int|xs:gYearMonth|xs:gYear|xs:gMonthDay|xs:gDay|xs:float|xs:duration|xs:double|xs:decimal|xs:dayTimeDuration|xs:dateTime|xs:date|xs:byte|xs:boolean|xs:anyURI|xf:yearMonthDuration)\b/, null],
               // Matching standard xquery functions
               [PR_FUNCTION, /^(?:xp:dereference|xinc:node-expand|xinc:link-references|xinc:link-expand|xhtml:restructure|xhtml:clean|xhtml:add-lists|xdmp:zip-manifest|xdmp:zip-get|xdmp:zip-create|xdmp:xquery-version|xdmp:word-convert|xdmp:with-namespaces|xdmp:version|xdmp:value|xdmp:user-roles|xdmp:user-last-login|xdmp:user|xdmp:url-encode|xdmp:url-decode|xdmp:uri-is-file|xdmp:uri-format|xdmp:uri-content-type|xdmp:unquote|xdmp:unpath|xdmp:triggers-database|xdmp:trace|xdmp:to-json|xdmp:tidy|xdmp:subbinary|xdmp:strftime|xdmp:spawn-in|xdmp:spawn|xdmp:sleep|xdmp:shutdown|xdmp:set-session-field|xdmp:set-response-encoding|xdmp:set-response-content-type|xdmp:set-response-code|xdmp:set-request-time-limit|xdmp:set|xdmp:servers|xdmp:server-status|xdmp:server-name|xdmp:server|xdmp:security-database|xdmp:security-assert|xdmp:schema-database|xdmp:save|xdmp:role-roles|xdmp:role|xdmp:rethrow|xdmp:restart|xdmp:request-timestamp|xdmp:request-status|xdmp:request-cancel|xdmp:request|xdmp:redirect-response|xdmp:random|xdmp:quote|xdmp:query-trace|xdmp:query-meters|xdmp:product-edition|xdmp:privilege-roles|xdmp:privilege|xdmp:pretty-print|xdmp:powerpoint-convert|xdmp:platform|xdmp:permission|xdmp:pdf-convert|xdmp:path|xdmp:octal-to-integer|xdmp:node-uri|xdmp:node-replace|xdmp:node-kind|xdmp:node-insert-child|xdmp:node-insert-before|xdmp:node-insert-after|xdmp:node-delete|xdmp:node-database|xdmp:mul64|xdmp:modules-root|xdmp:modules-database|xdmp:merging|xdmp:merge-cancel|xdmp:merge|xdmp:md5|xdmp:logout|xdmp:login|xdmp:log-level|xdmp:log|xdmp:lock-release|xdmp:lock-acquire|xdmp:load|xdmp:invoke-in|xdmp:invoke|xdmp:integer-to-octal|xdmp:integer-to-hex|xdmp:http-put|xdmp:http-post|xdmp:http-options|xdmp:http-head|xdmp:http-get|xdmp:http-delete|xdmp:hosts|xdmp:host-status|xdmp:host-name|xdmp:host|xdmp:hex-to-integer|xdmp:hash64|xdmp:hash32|xdmp:has-privilege|xdmp:groups|xdmp:group-serves|xdmp:group-servers|xdmp:group-name|xdmp:group-hosts|xdmp:group|xdmp:get-session-field-names|xdmp:get-session-field|xdmp:get-response-encoding|xdmp:get-response-code|xdmp:get-request-username|xdmp:get-request-user|xdmp:get-request-url|xdmp:get-request-protocol|xdmp:get-request-path|xdmp:get-request-method|xdmp:get-request-header-names|xdmp:get-request-header|xdmp:get-request-field-names|xdmp:get-request-field-filename|xdmp:get-request-field-content-type|xdmp:get-request-field|xdmp:get-request-client-certificate|xdmp:get-request-client-address|xdmp:get-request-body|xdmp:get-current-user|xdmp:get-current-roles|xdmp:get|xdmp:function-name|xdmp:function-module|xdmp:function|xdmp:from-json|xdmp:forests|xdmp:forest-status|xdmp:forest-restore|xdmp:forest-restart|xdmp:forest-name|xdmp:forest-delete|xdmp:forest-databases|xdmp:forest-counts|xdmp:forest-clear|xdmp:forest-backup|xdmp:forest|xdmp:filesystem-file|xdmp:filesystem-directory|xdmp:exists|xdmp:excel-convert|xdmp:eval-in|xdmp:eval|xdmp:estimate|xdmp:email|xdmp:element-content-type|xdmp:elapsed-time|xdmp:document-set-quality|xdmp:document-set-property|xdmp:document-set-properties|xdmp:document-set-permissions|xdmp:document-set-collections|xdmp:document-remove-properties|xdmp:document-remove-permissions|xdmp:document-remove-collections|xdmp:document-properties|xdmp:document-locks|xdmp:document-load|xdmp:document-insert|xdmp:document-get-quality|xdmp:document-get-properties|xdmp:document-get-permissions|xdmp:document-get-collections|xdmp:document-get|xdmp:document-forest|xdmp:document-delete|xdmp:document-add-properties|xdmp:document-add-permissions|xdmp:document-add-collections|xdmp:directory-properties|xdmp:directory-locks|xdmp:directory-delete|xdmp:directory-create|xdmp:directory|xdmp:diacritic-less|xdmp:describe|xdmp:default-permissions|xdmp:default-collections|xdmp:databases|xdmp:database-restore-validate|xdmp:database-restore-status|xdmp:database-restore-cancel|xdmp:database-restore|xdmp:database-name|xdmp:database-forests|xdmp:database-backup-validate|xdmp:database-backup-status|xdmp:database-backup-purge|xdmp:database-backup-cancel|xdmp:database-backup|xdmp:database|xdmp:collection-properties|xdmp:collection-locks|xdmp:collection-delete|xdmp:collation-canonical-uri|xdmp:castable-as|xdmp:can-grant-roles|xdmp:base64-encode|xdmp:base64-decode|xdmp:architecture|xdmp:apply|xdmp:amp-roles|xdmp:amp|xdmp:add64|xdmp:add-response-header|xdmp:access|trgr:trigger-set-recursive|trgr:trigger-set-permissions|trgr:trigger-set-name|trgr:trigger-set-module|trgr:trigger-set-event|trgr:trigger-set-description|trgr:trigger-remove-permissions|trgr:trigger-module|trgr:trigger-get-permissions|trgr:trigger-enable|trgr:trigger-disable|trgr:trigger-database-online-event|trgr:trigger-data-event|trgr:trigger-add-permissions|trgr:remove-trigger|trgr:property-content|trgr:pre-commit|trgr:post-commit|trgr:get-trigger-by-id|trgr:get-trigger|trgr:document-scope|trgr:document-content|trgr:directory-scope|trgr:create-trigger|trgr:collection-scope|trgr:any-property-content|thsr:set-entry|thsr:remove-term|thsr:remove-synonym|thsr:remove-entry|thsr:query-lookup|thsr:lookup|thsr:load|thsr:insert|thsr:expand|thsr:add-synonym|spell:suggest-detailed|spell:suggest|spell:remove-word|spell:make-dictionary|spell:load|spell:levenshtein-distance|spell:is-correct|spell:insert|spell:double-metaphone|spell:add-word|sec:users-collection|sec:user-set-roles|sec:user-set-password|sec:user-set-name|sec:user-set-description|sec:user-set-default-permissions|sec:user-set-default-collections|sec:user-remove-roles|sec:user-privileges|sec:user-get-roles|sec:user-get-description|sec:user-get-default-permissions|sec:user-get-default-collections|sec:user-doc-permissions|sec:user-doc-collections|sec:user-add-roles|sec:unprotect-collection|sec:uid-for-name|sec:set-realm|sec:security-version|sec:security-namespace|sec:security-installed|sec:security-collection|sec:roles-collection|sec:role-set-roles|sec:role-set-name|sec:role-set-description|sec:role-set-default-permissions|sec:role-set-default-collections|sec:role-remove-roles|sec:role-privileges|sec:role-get-roles|sec:role-get-description|sec:role-get-default-permissions|sec:role-get-default-collections|sec:role-doc-permissions|sec:role-doc-collections|sec:role-add-roles|sec:remove-user|sec:remove-role-from-users|sec:remove-role-from-role|sec:remove-role-from-privileges|sec:remove-role-from-amps|sec:remove-role|sec:remove-privilege|sec:remove-amp|sec:protect-collection|sec:privileges-collection|sec:privilege-set-roles|sec:privilege-set-name|sec:privilege-remove-roles|sec:privilege-get-roles|sec:privilege-add-roles|sec:priv-doc-permissions|sec:priv-doc-collections|sec:get-user-names|sec:get-unique-elem-id|sec:get-role-names|sec:get-role-ids|sec:get-privilege|sec:get-distinct-permissions|sec:get-collection|sec:get-amp|sec:create-user-with-role|sec:create-user|sec:create-role|sec:create-privilege|sec:create-amp|sec:collections-collection|sec:collection-set-permissions|sec:collection-remove-permissions|sec:collection-get-permissions|sec:collection-add-permissions|sec:check-admin|sec:amps-collection|sec:amp-set-roles|sec:amp-remove-roles|sec:amp-get-roles|sec:amp-doc-permissions|sec:amp-doc-collections|sec:amp-add-roles|search:unparse|search:suggest|search:snippet|search:search|search:resolve-nodes|search:resolve|search:remove-constraint|search:parse|search:get-default-options|search:estimate|search:check-options|prof:value|prof:reset|prof:report|prof:invoke|prof:eval|prof:enable|prof:disable|prof:allowed|ppt:clean|pki:template-set-request|pki:template-set-name|pki:template-set-key-type|pki:template-set-key-options|pki:template-set-description|pki:template-in-use|pki:template-get-version|pki:template-get-request|pki:template-get-name|pki:template-get-key-type|pki:template-get-key-options|pki:template-get-id|pki:template-get-description|pki:need-certificate|pki:is-temporary|pki:insert-trusted-certificates|pki:insert-template|pki:insert-signed-certificates|pki:insert-certificate-revocation-list|pki:get-trusted-certificate-ids|pki:get-template-ids|pki:get-template-certificate-authority|pki:get-template-by-name|pki:get-template|pki:get-pending-certificate-requests-xml|pki:get-pending-certificate-requests-pem|pki:get-pending-certificate-request|pki:get-certificates-for-template-xml|pki:get-certificates-for-template|pki:get-certificates|pki:get-certificate-xml|pki:get-certificate-pem|pki:get-certificate|pki:generate-temporary-certificate-if-necessary|pki:generate-temporary-certificate|pki:generate-template-certificate-authority|pki:generate-certificate-request|pki:delete-template|pki:delete-certificate|pki:create-template|pdf:make-toc|pdf:insert-toc-headers|pdf:get-toc|pdf:clean|p:status-transition|p:state-transition|p:remove|p:pipelines|p:insert|p:get-by-id|p:get|p:execute|p:create|p:condition|p:collection|p:action|ooxml:runs-merge|ooxml:package-uris|ooxml:package-parts-insert|ooxml:package-parts|msword:clean|mcgm:polygon|mcgm:point|mcgm:geospatial-query-from-elements|mcgm:geospatial-query|mcgm:circle|math:tanh|math:tan|math:sqrt|math:sinh|math:sin|math:pow|math:modf|math:log10|math:log|math:ldexp|math:frexp|math:fmod|math:floor|math:fabs|math:exp|math:cosh|math:cos|math:ceil|math:atan2|math:atan|math:asin|math:acos|map:put|map:map|map:keys|map:get|map:delete|map:count|map:clear|lnk:to|lnk:remove|lnk:insert|lnk:get|lnk:from|lnk:create|kml:polygon|kml:point|kml:interior-polygon|kml:geospatial-query-from-elements|kml:geospatial-query|kml:circle|kml:box|gml:polygon|gml:point|gml:interior-polygon|gml:geospatial-query-from-elements|gml:geospatial-query|gml:circle|gml:box|georss:point|georss:geospatial-query|georss:circle|geo:polygon|geo:point|geo:interior-polygon|geo:geospatial-query-from-elements|geo:geospatial-query|geo:circle|geo:box|fn:zero-or-one|fn:years-from-duration|fn:year-from-dateTime|fn:year-from-date|fn:upper-case|fn:unordered|fn:true|fn:translate|fn:trace|fn:tokenize|fn:timezone-from-time|fn:timezone-from-dateTime|fn:timezone-from-date|fn:sum|fn:subtract-dateTimes-yielding-yearMonthDuration|fn:subtract-dateTimes-yielding-dayTimeDuration|fn:substring-before|fn:substring-after|fn:substring|fn:subsequence|fn:string-to-codepoints|fn:string-pad|fn:string-length|fn:string-join|fn:string|fn:static-base-uri|fn:starts-with|fn:seconds-from-time|fn:seconds-from-duration|fn:seconds-from-dateTime|fn:round-half-to-even|fn:round|fn:root|fn:reverse|fn:resolve-uri|fn:resolve-QName|fn:replace|fn:remove|fn:QName|fn:prefix-from-QName|fn:position|fn:one-or-more|fn:number|fn:not|fn:normalize-unicode|fn:normalize-space|fn:node-name|fn:node-kind|fn:nilled|fn:namespace-uri-from-QName|fn:namespace-uri-for-prefix|fn:namespace-uri|fn:name|fn:months-from-duration|fn:month-from-dateTime|fn:month-from-date|fn:minutes-from-time|fn:minutes-from-duration|fn:minutes-from-dateTime|fn:min|fn:max|fn:matches|fn:lower-case|fn:local-name-from-QName|fn:local-name|fn:last|fn:lang|fn:iri-to-uri|fn:insert-before|fn:index-of|fn:in-scope-prefixes|fn:implicit-timezone|fn:idref|fn:id|fn:hours-from-time|fn:hours-from-duration|fn:hours-from-dateTime|fn:floor|fn:false|fn:expanded-QName|fn:exists|fn:exactly-one|fn:escape-uri|fn:escape-html-uri|fn:error|fn:ends-with|fn:encode-for-uri|fn:empty|fn:document-uri|fn:doc-available|fn:doc|fn:distinct-values|fn:distinct-nodes|fn:default-collation|fn:deep-equal|fn:days-from-duration|fn:day-from-dateTime|fn:day-from-date|fn:data|fn:current-time|fn:current-dateTime|fn:current-date|fn:count|fn:contains|fn:concat|fn:compare|fn:collection|fn:codepoints-to-string|fn:codepoint-equal|fn:ceiling|fn:boolean|fn:base-uri|fn:avg|fn:adjust-time-to-timezone|fn:adjust-dateTime-to-timezone|fn:adjust-date-to-timezone|fn:abs|feed:unsubscribe|feed:subscription|feed:subscribe|feed:request|feed:item|feed:description|excel:clean|entity:enrich|dom:set-pipelines|dom:set-permissions|dom:set-name|dom:set-evaluation-context|dom:set-domain-scope|dom:set-description|dom:remove-pipeline|dom:remove-permissions|dom:remove|dom:get|dom:evaluation-context|dom:domains|dom:domain-scope|dom:create|dom:configuration-set-restart-user|dom:configuration-set-permissions|dom:configuration-set-evaluation-context|dom:configuration-set-default-domain|dom:configuration-get|dom:configuration-create|dom:collection|dom:add-pipeline|dom:add-permissions|dls:retention-rules|dls:retention-rule-remove|dls:retention-rule-insert|dls:retention-rule|dls:purge|dls:node-expand|dls:link-references|dls:link-expand|dls:documents-query|dls:document-versions-query|dls:document-version-uri|dls:document-version-query|dls:document-version-delete|dls:document-version-as-of|dls:document-version|dls:document-update|dls:document-unmanage|dls:document-set-quality|dls:document-set-property|dls:document-set-properties|dls:document-set-permissions|dls:document-set-collections|dls:document-retention-rules|dls:document-remove-properties|dls:document-remove-permissions|dls:document-remove-collections|dls:document-purge|dls:document-manage|dls:document-is-managed|dls:document-insert-and-manage|dls:document-include-query|dls:document-history|dls:document-get-permissions|dls:document-extract-part|dls:document-delete|dls:document-checkout-status|dls:document-checkout|dls:document-checkin|dls:document-add-properties|dls:document-add-permissions|dls:document-add-collections|dls:break-checkout|dls:author-query|dls:as-of-query|dbk:convert|dbg:wait|dbg:value|dbg:stopped|dbg:stop|dbg:step|dbg:status|dbg:stack|dbg:out|dbg:next|dbg:line|dbg:invoke|dbg:function|dbg:finish|dbg:expr|dbg:eval|dbg:disconnect|dbg:detach|dbg:continue|dbg:connect|dbg:clear|dbg:breakpoints|dbg:break|dbg:attached|dbg:attach|cvt:save-converted-documents|cvt:part-uri|cvt:destination-uri|cvt:basepath|cvt:basename|cts:words|cts:word-query-weight|cts:word-query-text|cts:word-query-options|cts:word-query|cts:word-match|cts:walk|cts:uris|cts:uri-match|cts:train|cts:tokenize|cts:thresholds|cts:stem|cts:similar-query-weight|cts:similar-query-nodes|cts:similar-query|cts:shortest-distance|cts:search|cts:score|cts:reverse-query-weight|cts:reverse-query-nodes|cts:reverse-query|cts:remainder|cts:registered-query-weight|cts:registered-query-options|cts:registered-query-ids|cts:registered-query|cts:register|cts:query|cts:quality|cts:properties-query-query|cts:properties-query|cts:polygon-vertices|cts:polygon|cts:point-longitude|cts:point-latitude|cts:point|cts:or-query-queries|cts:or-query|cts:not-query-weight|cts:not-query-query|cts:not-query|cts:near-query-weight|cts:near-query-queries|cts:near-query-options|cts:near-query-distance|cts:near-query|cts:highlight|cts:geospatial-co-occurrences|cts:frequency|cts:fitness|cts:field-words|cts:field-word-query-weight|cts:field-word-query-text|cts:field-word-query-options|cts:field-word-query-field-name|cts:field-word-query|cts:field-word-match|cts:entity-highlight|cts:element-words|cts:element-word-query-weight|cts:element-word-query-text|cts:element-word-query-options|cts:element-word-query-element-name|cts:element-word-query|cts:element-word-match|cts:element-values|cts:element-value-ranges|cts:element-value-query-weight|cts:element-value-query-text|cts:element-value-query-options|cts:element-value-query-element-name|cts:element-value-query|cts:element-value-match|cts:element-value-geospatial-co-occurrences|cts:element-value-co-occurrences|cts:element-range-query-weight|cts:element-range-query-value|cts:element-range-query-options|cts:element-range-query-operator|cts:element-range-query-element-name|cts:element-range-query|cts:element-query-query|cts:element-query-element-name|cts:element-query|cts:element-pair-geospatial-values|cts:element-pair-geospatial-value-match|cts:element-pair-geospatial-query-weight|cts:element-pair-geospatial-query-region|cts:element-pair-geospatial-query-options|cts:element-pair-geospatial-query-longitude-name|cts:element-pair-geospatial-query-latitude-name|cts:element-pair-geospatial-query-element-name|cts:element-pair-geospatial-query|cts:element-pair-geospatial-boxes|cts:element-geospatial-values|cts:element-geospatial-value-match|cts:element-geospatial-query-weight|cts:element-geospatial-query-region|cts:element-geospatial-query-options|cts:element-geospatial-query-element-name|cts:element-geospatial-query|cts:element-geospatial-boxes|cts:element-child-geospatial-values|cts:element-child-geospatial-value-match|cts:element-child-geospatial-query-weight|cts:element-child-geospatial-query-region|cts:element-child-geospatial-query-options|cts:element-child-geospatial-query-element-name|cts:element-child-geospatial-query-child-name|cts:element-child-geospatial-query|cts:element-child-geospatial-boxes|cts:element-attribute-words|cts:element-attribute-word-query-weight|cts:element-attribute-word-query-text|cts:element-attribute-word-query-options|cts:element-attribute-word-query-element-name|cts:element-attribute-word-query-attribute-name|cts:element-attribute-word-query|cts:element-attribute-word-match|cts:element-attribute-values|cts:element-attribute-value-ranges|cts:element-attribute-value-query-weight|cts:element-attribute-value-query-text|cts:element-attribute-value-query-options|cts:element-attribute-value-query-element-name|cts:element-attribute-value-query-attribute-name|cts:element-attribute-value-query|cts:element-attribute-value-match|cts:element-attribute-value-geospatial-co-occurrences|cts:element-attribute-value-co-occurrences|cts:element-attribute-range-query-weight|cts:element-attribute-range-query-value|cts:element-attribute-range-query-options|cts:element-attribute-range-query-operator|cts:element-attribute-range-query-element-name|cts:element-attribute-range-query-attribute-name|cts:element-attribute-range-query|cts:element-attribute-pair-geospatial-values|cts:element-attribute-pair-geospatial-value-match|cts:element-attribute-pair-geospatial-query-weight|cts:element-attribute-pair-geospatial-query-region|cts:element-attribute-pair-geospatial-query-options|cts:element-attribute-pair-geospatial-query-longitude-name|cts:element-attribute-pair-geospatial-query-latitude-name|cts:element-attribute-pair-geospatial-query-element-name|cts:element-attribute-pair-geospatial-query|cts:element-attribute-pair-geospatial-boxes|cts:document-query-uris|cts:document-query|cts:distance|cts:directory-query-uris|cts:directory-query-depth|cts:directory-query|cts:destination|cts:deregister|cts:contains|cts:confidence|cts:collections|cts:collection-query-uris|cts:collection-query|cts:collection-match|cts:classify|cts:circle-radius|cts:circle-center|cts:circle|cts:box-west|cts:box-south|cts:box-north|cts:box-east|cts:box|cts:bearing|cts:arc-intersection|cts:and-query-queries|cts:and-query-options|cts:and-query|cts:and-not-query-positive-query|cts:and-not-query-negative-query|cts:and-not-query|css:get|css:convert|cpf:success|cpf:failure|cpf:document-set-state|cpf:document-set-processing-status|cpf:document-set-last-updated|cpf:document-set-error|cpf:document-get-state|cpf:document-get-processing-status|cpf:document-get-last-updated|cpf:document-get-error|cpf:check-transition|alert:spawn-matching-actions|alert:rule-user-id-query|alert:rule-set-user-id|alert:rule-set-query|alert:rule-set-options|alert:rule-set-name|alert:rule-set-description|alert:rule-set-action|alert:rule-remove|alert:rule-name-query|alert:rule-insert|alert:rule-id-query|alert:rule-get-user-id|alert:rule-get-query|alert:rule-get-options|alert:rule-get-name|alert:rule-get-id|alert:rule-get-description|alert:rule-get-action|alert:rule-action-query|alert:remove-triggers|alert:make-rule|alert:make-log-action|alert:make-config|alert:make-action|alert:invoke-matching-actions|alert:get-my-rules|alert:get-all-rules|alert:get-actions|alert:find-matching-rules|alert:create-triggers|alert:config-set-uri|alert:config-set-trigger-ids|alert:config-set-options|alert:config-set-name|alert:config-set-description|alert:config-set-cpf-domain-names|alert:config-set-cpf-domain-ids|alert:config-insert|alert:config-get-uri|alert:config-get-trigger-ids|alert:config-get-options|alert:config-get-name|alert:config-get-id|alert:config-get-description|alert:config-get-cpf-domain-names|alert:config-get-cpf-domain-ids|alert:config-get|alert:config-delete|alert:action-set-options|alert:action-set-name|alert:action-set-module-root|alert:action-set-module-db|alert:action-set-module|alert:action-set-description|alert:action-remove|alert:action-insert|alert:action-get-options|alert:action-get-name|alert:action-get-module-root|alert:action-get-module-db|alert:action-get-module|alert:action-get-description|zero-or-one|years-from-duration|year-from-dateTime|year-from-date|upper-case|unordered|true|translate|trace|tokenize|timezone-from-time|timezone-from-dateTime|timezone-from-date|sum|subtract-dateTimes-yielding-yearMonthDuration|subtract-dateTimes-yielding-dayTimeDuration|substring-before|substring-after|substring|subsequence|string-to-codepoints|string-pad|string-length|string-join|string|static-base-uri|starts-with|seconds-from-time|seconds-from-duration|seconds-from-dateTime|round-half-to-even|round|root|reverse|resolve-uri|resolve-QName|replace|remove|QName|prefix-from-QName|position|one-or-more|number|not|normalize-unicode|normalize-space|node-name|node-kind|nilled|namespace-uri-from-QName|namespace-uri-for-prefix|namespace-uri|name|months-from-duration|month-from-dateTime|month-from-date|minutes-from-time|minutes-from-duration|minutes-from-dateTime|min|max|matches|lower-case|local-name-from-QName|local-name|last|lang|iri-to-uri|insert-before|index-of|in-scope-prefixes|implicit-timezone|idref|id|hours-from-time|hours-from-duration|hours-from-dateTime|floor|false|expanded-QName|exists|exactly-one|escape-uri|escape-html-uri|error|ends-with|encode-for-uri|empty|document-uri|doc-available|doc|distinct-values|distinct-nodes|default-collation|deep-equal|days-from-duration|day-from-dateTime|day-from-date|data|current-time|current-dateTime|current-date|count|contains|concat|compare|collection|codepoints-to-string|codepoint-equal|ceiling|boolean|base-uri|avg|adjust-time-to-timezone|adjust-dateTime-to-timezone|adjust-date-to-timezone|abs)\b/],
               // Matching normal words if none of the previous regular expressions matched
               [PR['PR_PLAIN'], /^[A-Za-z0-9_\-\:]+/],
               // Matching whitespaces
               [PR['PR_PLAIN'], /^[\t\n\r \xA0]+/]
               ]),
          ['xq', 'xquery']);
      
      
      ================================================
      FILE: google-code-prettify/src/lang-yaml.js
      ================================================
      // Contributed by ribrdb @ code.google.com
      
      /**
       * @fileoverview
       * Registers a language handler for YAML.
       *
       * @author ribrdb
       */
      
      PR['registerLangHandler'](
        PR['createSimpleLexer'](
          [
            [PR['PR_PUNCTUATION'], /^[:|>?]+/, null, ':|>?'],
            [PR['PR_DECLARATION'],  /^%(?:YAML|TAG)[^#\r\n]+/, null, '%'],
            [PR['PR_TYPE'], /^[&]\S+/, null, '&'],
            [PR['PR_TYPE'], /^!\S*/, null, '!'],
            [PR['PR_STRING'], /^"(?:[^\\"]|\\.)*(?:"|$)/, null, '"'],
            [PR['PR_STRING'], /^'(?:[^']|'')*(?:'|$)/, null, "'"],
            [PR['PR_COMMENT'], /^#[^\r\n]*/, null, '#'],
            [PR['PR_PLAIN'], /^\s+/, null, ' \t\r\n']
          ],
          [
            [PR['PR_DECLARATION'], /^(?:---|\.\.\.)(?:[\r\n]|$)/],
            [PR['PR_PUNCTUATION'], /^-/],
            [PR['PR_KEYWORD'], /^\w+:[ \r\n]/],
            [PR['PR_PLAIN'], /^\w+/]
          ]), ['yaml', 'yml']);
      
      
      ================================================
      FILE: google-code-prettify/src/prettify.css
      ================================================
      /* Pretty printing styles. Used with prettify.js. */
      
      /* SPAN elements with the classes below are added by prettyprint. */
      .pln { color: #000 }  /* plain text */
      
      @media screen {
        .str { color: #080 }  /* string content */
        .kwd { color: #008 }  /* a keyword */
        .com { color: #800 }  /* a comment */
        .typ { color: #606 }  /* a type name */
        .lit { color: #066 }  /* a literal value */
        /* punctuation, lisp open bracket, lisp close bracket */
        .pun, .opn, .clo { color: #660 }
        .tag { color: #008 }  /* a markup tag name */
        .atn { color: #606 }  /* a markup attribute name */
        .atv { color: #080 }  /* a markup attribute value */
        .dec, .var { color: #606 }  /* a declaration; a variable name */
        .fun { color: red }  /* a function name */
      }
      
      /* Use higher contrast and text-weight for printable form. */
      @media print, projection {
        .str { color: #060 }
        .kwd { color: #006; font-weight: bold }
        .com { color: #600; font-style: italic }
        .typ { color: #404; font-weight: bold }
        .lit { color: #044 }
        .pun, .opn, .clo { color: #440 }
        .tag { color: #006; font-weight: bold }
        .atn { color: #404 }
        .atv { color: #060 }
      }
      
      /* Put a border around prettyprinted code snippets. */
      pre.prettyprint { padding: 2px; border: 1px solid #888 }
      
      /* Specify class=linenums on a pre to get line numbering */
      ol.linenums { margin-top: 0; margin-bottom: 0 } /* IE indents via margin-left */
      li.L0,
      li.L1,
      li.L2,
      li.L3,
      li.L5,
      li.L6,
      li.L7,
      li.L8 { list-style-type: none }
      /* Alternate shading for lines */
      li.L1,
      li.L3,
      li.L5,
      li.L7,
      li.L9 { background: #eee }
      
      
      ================================================
      FILE: google-code-prettify/src/prettify.js
      ================================================
      // Copyright (C) 2006 Google Inc.
      //
      // Licensed under the Apache License, Version 2.0 (the "License");
      // you may not use this file except in compliance with the License.
      // You may obtain a copy of the License at
      //
      //      http://www.apache.org/licenses/LICENSE-2.0
      //
      // Unless required by applicable law or agreed to in writing, software
      // distributed under the License is distributed on an "AS IS" BASIS,
      // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      // See the License for the specific language governing permissions and
      // limitations under the License.
      
      
      /**
       * @fileoverview
       * some functions for browser-side pretty printing of code contained in html.
       *
       * <p>
       * For a fairly comprehensive set of languages see the
       * <a href="http://google-code-prettify.googlecode.com/svn/trunk/README.html#langs">README</a>
       * file that came with this source.  At a minimum, the lexer should work on a
       * number of languages including C and friends, Java, Python, Bash, SQL, HTML,
       * XML, CSS, Javascript, and Makefiles.  It works passably on Ruby, PHP and Awk
       * and a subset of Perl, but, because of commenting conventions, doesn't work on
       * Smalltalk, Lisp-like, or CAML-like languages without an explicit lang class.
       * <p>
       * Usage: <ol>
       * <li> include this source file in an html page via
       *   {@code <script type="text/javascript" src="/path/to/prettify.js"></script>}
       * <li> define style rules.  See the example page for examples.
       * <li> mark the {@code <pre>} and {@code <code>} tags in your source with
       *    {@code class=prettyprint.}
       *    You can also use the (html deprecated) {@code <xmp>} tag, but the pretty
       *    printer needs to do more substantial DOM manipulations to support that, so
       *    some css styles may not be preserved.
       * </ol>
       * That's it.  I wanted to keep the API as simple as possible, so there's no
       * need to specify which language the code is in, but if you wish, you can add
       * another class to the {@code <pre>} or {@code <code>} element to specify the
       * language, as in {@code <pre class="prettyprint lang-java">}.  Any class that
       * starts with "lang-" followed by a file extension, specifies the file type.
       * See the "lang-*.js" files in this directory for code that implements
       * per-language file handlers.
       * <p>
       * Change log:<br>
       * cbeust, 2006/08/22
       * <blockquote>
       *   Java annotations (start with "@") are now captured as literals ("lit")
       * </blockquote>
       * @requires console
       */
      
      // JSLint declarations
      /*global console, document, navigator, setTimeout, window, define */
      
      /** @define {boolean} */
      var IN_GLOBAL_SCOPE = true;
      
      /**
       * Split {@code prettyPrint} into multiple timeouts so as not to interfere with
       * UI events.
       * If set to {@code false}, {@code prettyPrint()} is synchronous.
       */
      window['PR_SHOULD_USE_CONTINUATION'] = true;
      
      /**
       * Pretty print a chunk of code.
       * @param {string} sourceCodeHtml The HTML to pretty print.
       * @param {string} opt_langExtension The language name to use.
       *     Typically, a filename extension like 'cpp' or 'java'.
       * @param {number|boolean} opt_numberLines True to number lines,
       *     or the 1-indexed number of the first line in sourceCodeHtml.
       * @return {string} code as html, but prettier
       */
      var prettyPrintOne;
      /**
       * Find all the {@code <pre>} and {@code <code>} tags in the DOM with
       * {@code class=prettyprint} and prettify them.
       *
       * @param {Function} opt_whenDone called when prettifying is done.
       * @param {HTMLElement|HTMLDocument} opt_root an element or document
       *   containing all the elements to pretty print.
       *   Defaults to {@code document.body}.
       */
      var prettyPrint;
      
      
      (function () {
        var win = window;
        // Keyword lists for various languages.
        // We use things that coerce to strings to make them compact when minified
        // and to defeat aggressive optimizers that fold large string constants.
        var FLOW_CONTROL_KEYWORDS = ["break,continue,do,else,for,if,return,while"];
        var C_KEYWORDS = [FLOW_CONTROL_KEYWORDS,"auto,case,char,const,default," + 
            "double,enum,extern,float,goto,inline,int,long,register,short,signed," +
            "sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"];
        var COMMON_KEYWORDS = [C_KEYWORDS,"catch,class,delete,false,import," +
            "new,operator,private,protected,public,this,throw,true,try,typeof"];
        var CPP_KEYWORDS = [COMMON_KEYWORDS,"alignof,align_union,asm,axiom,bool," +
            "concept,concept_map,const_cast,constexpr,decltype,delegate," +
            "dynamic_cast,explicit,export,friend,generic,late_check," +
            "mutable,namespace,nullptr,property,reinterpret_cast,static_assert," +
            "static_cast,template,typeid,typename,using,virtual,where"];
        var JAVA_KEYWORDS = [COMMON_KEYWORDS,
            "abstract,assert,boolean,byte,extends,final,finally,implements,import," +
            "instanceof,interface,null,native,package,strictfp,super,synchronized," +
            "throws,transient"];
        var CSHARP_KEYWORDS = [JAVA_KEYWORDS,
            "as,base,by,checked,decimal,delegate,descending,dynamic,event," +
            "fixed,foreach,from,group,implicit,in,internal,into,is,let," +
            "lock,object,out,override,orderby,params,partial,readonly,ref,sbyte," +
            "sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort," +
            "var,virtual,where"];
        var COFFEE_KEYWORDS = "all,and,by,catch,class,else,extends,false,finally," +
            "for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then," +
            "throw,true,try,unless,until,when,while,yes";
        var JSCRIPT_KEYWORDS = [COMMON_KEYWORDS,
            "debugger,eval,export,function,get,null,set,undefined,var,with," +
            "Infinity,NaN"];
        var PERL_KEYWORDS = "caller,delete,die,do,dump,elsif,eval,exit,foreach,for," +
            "goto,if,import,last,local,my,next,no,our,print,package,redo,require," +
            "sub,undef,unless,until,use,wantarray,while,BEGIN,END";
        var PYTHON_KEYWORDS = [FLOW_CONTROL_KEYWORDS, "and,as,assert,class,def,del," +
            "elif,except,exec,finally,from,global,import,in,is,lambda," +
            "nonlocal,not,or,pass,print,raise,try,with,yield," +
            "False,True,None"];
        var RUBY_KEYWORDS = [FLOW_CONTROL_KEYWORDS, "alias,and,begin,case,class," +
            "def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo," +
            "rescue,retry,self,super,then,true,undef,unless,until,when,yield," +
            "BEGIN,END"];
         var RUST_KEYWORDS = [FLOW_CONTROL_KEYWORDS, "as,assert,const,copy,drop," +
            "enum,extern,fail,false,fn,impl,let,log,loop,match,mod,move,mut,priv," +
            "pub,pure,ref,self,static,struct,true,trait,type,unsafe,use"];
        var SH_KEYWORDS = [FLOW_CONTROL_KEYWORDS, "case,done,elif,esac,eval,fi," +
            "function,in,local,set,then,until"];
        var ALL_KEYWORDS = [
            CPP_KEYWORDS, CSHARP_KEYWORDS, JSCRIPT_KEYWORDS, PERL_KEYWORDS,
            PYTHON_KEYWORDS, RUBY_KEYWORDS, SH_KEYWORDS];
        var C_TYPES = /^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)\b/;
      
        // token style names.  correspond to css classes
        /**
         * token style for a string literal
         * @const
         */
        var PR_STRING = 'str';
        /**
         * token style for a keyword
         * @const
         */
        var PR_KEYWORD = 'kwd';
        /**
         * token style for a comment
         * @const
         */
        var PR_COMMENT = 'com';
        /**
         * token style for a type
         * @const
         */
        var PR_TYPE = 'typ';
        /**
         * token style for a literal value.  e.g. 1, null, true.
         * @const
         */
        var PR_LITERAL = 'lit';
        /**
         * token style for a punctuation string.
         * @const
         */
        var PR_PUNCTUATION = 'pun';
        /**
         * token style for plain text.
         * @const
         */
        var PR_PLAIN = 'pln';
      
        /**
         * token style for an sgml tag.
         * @const
         */
        var PR_TAG = 'tag';
        /**
         * token style for a markup declaration such as a DOCTYPE.
         * @const
         */
        var PR_DECLARATION = 'dec';
        /**
         * token style for embedded source.
         * @const
         */
        var PR_SOURCE = 'src';
        /**
         * token style for an sgml attribute name.
         * @const
         */
        var PR_ATTRIB_NAME = 'atn';
        /**
         * token style for an sgml attribute value.
         * @const
         */
        var PR_ATTRIB_VALUE = 'atv';
      
        /**
         * A class that indicates a section of markup that is not code, e.g. to allow
         * embedding of line numbers within code listings.
         * @const
         */
        var PR_NOCODE = 'nocode';
      
        
        
        /**
         * A set of tokens that can precede a regular expression literal in
         * javascript
         * http://web.archive.org/web/20070717142515/http://www.mozilla.org/js/language/js20/rationale/syntax.html
         * has the full list, but I've removed ones that might be problematic when
         * seen in languages that don't support regular expression literals.
         *
         * <p>Specifically, I've removed any keywords that can't precede a regexp
         * literal in a syntactically legal javascript program, and I've removed the
         * "in" keyword since it's not a keyword in many languages, and might be used
         * as a count of inches.
         *
         * <p>The link above does not accurately describe EcmaScript rules since
         * it fails to distinguish between (a=++/b/i) and (a++/b/i) but it works
         * very well in practice.
         *
         * @private
         * @const
         */
        var REGEXP_PRECEDER_PATTERN = '(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*';
        
        // CAVEAT: this does not properly handle the case where a regular
        // expression immediately follows another since a regular expression may
        // have flags for case-sensitivity and the like.  Having regexp tokens
        // adjacent is not valid in any language I'm aware of, so I'm punting.
        // TODO: maybe style special characters inside a regexp as punctuation.
      
        /**
         * Given a group of {@link RegExp}s, returns a {@code RegExp} that globally
         * matches the union of the sets of strings matched by the input RegExp.
         * Since it matches globally, if the input strings have a start-of-input
         * anchor (/^.../), it is ignored for the purposes of unioning.
         * @param {Array.<RegExp>} regexs non multiline, non-global regexs.
         * @return {RegExp} a global regex.
         */
        function combinePrefixPatterns(regexs) {
          var capturedGroupIndex = 0;
        
          var needToFoldCase = false;
          var ignoreCase = false;
          for (var i = 0, n = regexs.length; i < n; ++i) {
            var regex = regexs[i];
            if (regex.ignoreCase) {
              ignoreCase = true;
            } else if (/[a-z]/i.test(regex.source.replace(
                           /\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi, ''))) {
              needToFoldCase = true;
              ignoreCase = false;
              break;
            }
          }
        
          var escapeCharToCodeUnit = {
            'b': 8,
            't': 9,
            'n': 0xa,
            'v': 0xb,
            'f': 0xc,
            'r': 0xd
          };
        
          function decodeEscape(charsetPart) {
            var cc0 = charsetPart.charCodeAt(0);
            if (cc0 !== 92 /* \\ */) {
              return cc0;
            }
            var c1 = charsetPart.charAt(1);
            cc0 = escapeCharToCodeUnit[c1];
            if (cc0) {
              return cc0;
            } else if ('0' <= c1 && c1 <= '7') {
              return parseInt(charsetPart.substring(1), 8);
            } else if (c1 === 'u' || c1 === 'x') {
              return parseInt(charsetPart.substring(2), 16);
            } else {
              return charsetPart.charCodeAt(1);
            }
          }
        
          function encodeEscape(charCode) {
            if (charCode < 0x20) {
              return (charCode < 0x10 ? '\\x0' : '\\x') + charCode.toString(16);
            }
            var ch = String.fromCharCode(charCode);
            return (ch === '\\' || ch === '-' || ch === ']' || ch === '^')
                ? "\\" + ch : ch;
          }
        
          function caseFoldCharset(charSet) {
            var charsetParts = charSet.substring(1, charSet.length - 1).match(
                new RegExp(
                    '\\\\u[0-9A-Fa-f]{4}'
                    + '|\\\\x[0-9A-Fa-f]{2}'
                    + '|\\\\[0-3][0-7]{0,2}'
                    + '|\\\\[0-7]{1,2}'
                    + '|\\\\[\\s\\S]'
                    + '|-'
                    + '|[^-\\\\]',
                    'g'));
            var ranges = [];
            var inverse = charsetParts[0] === '^';
        
            var out = ['['];
            if (inverse) { out.push('^'); }
        
            for (var i = inverse ? 1 : 0, n = charsetParts.length; i < n; ++i) {
              var p = charsetParts[i];
              if (/\\[bdsw]/i.test(p)) {  // Don't muck with named groups.
                out.push(p);
              } else {
                var start = decodeEscape(p);
                var end;
                if (i + 2 < n && '-' === charsetParts[i + 1]) {
                  end = decodeEscape(charsetParts[i + 2]);
                  i += 2;
                } else {
                  end = start;
                }
                ranges.push([start, end]);
                // If the range might intersect letters, then expand it.
                // This case handling is too simplistic.
                // It does not deal with non-latin case folding.
                // It works for latin source code identifiers though.
                if (!(end < 65 || start > 122)) {
                  if (!(end < 65 || start > 90)) {
                    ranges.push([Math.max(65, start) | 32, Math.min(end, 90) | 32]);
                  }
                  if (!(end < 97 || start > 122)) {
                    ranges.push([Math.max(97, start) & ~32, Math.min(end, 122) & ~32]);
                  }
                }
              }
            }
        
            // [[1, 10], [3, 4], [8, 12], [14, 14], [16, 16], [17, 17]]
            // -> [[1, 12], [14, 14], [16, 17]]
            ranges.sort(function (a, b) { return (a[0] - b[0]) || (b[1]  - a[1]); });
            var consolidatedRanges = [];
            var lastRange = [];
            for (var i = 0; i < ranges.length; ++i) {
              var range = ranges[i];
              if (range[0] <= lastRange[1] + 1) {
                lastRange[1] = Math.max(lastRange[1], range[1]);
              } else {
                consolidatedRanges.push(lastRange = range);
              }
            }
        
            for (var i = 0; i < consolidatedRanges.length; ++i) {
              var range = consolidatedRanges[i];
              out.push(encodeEscape(range[0]));
              if (range[1] > range[0]) {
                if (range[1] + 1 > range[0]) { out.push('-'); }
                out.push(encodeEscape(range[1]));
              }
            }
            out.push(']');
            return out.join('');
          }
        
          function allowAnywhereFoldCaseAndRenumberGroups(regex) {
            // Split into character sets, escape sequences, punctuation strings
            // like ('(', '(?:', ')', '^'), and runs of characters that do not
            // include any of the above.
            var parts = regex.source.match(
                new RegExp(
                    '(?:'
                    + '\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]'  // a character set
                    + '|\\\\u[A-Fa-f0-9]{4}'  // a unicode escape
                    + '|\\\\x[A-Fa-f0-9]{2}'  // a hex escape
                    + '|\\\\[0-9]+'  // a back-reference or octal escape
                    + '|\\\\[^ux0-9]'  // other escape sequence
                    + '|\\(\\?[:!=]'  // start of a non-capturing group
                    + '|[\\(\\)\\^]'  // start/end of a group, or line start
                    + '|[^\\x5B\\x5C\\(\\)\\^]+'  // run of other characters
                    + ')',
                    'g'));
            var n = parts.length;
        
            // Maps captured group numbers to the number they will occupy in
            // the output or to -1 if that has not been determined, or to
            // undefined if they need not be capturing in the output.
            var capturedGroups = [];
        
            // Walk over and identify back references to build the capturedGroups
            // mapping.
            for (var i = 0, groupIndex = 0; i < n; ++i) {
              var p = parts[i];
              if (p === '(') {
                // groups are 1-indexed, so max group index is count of '('
                ++groupIndex;
              } else if ('\\' === p.charAt(0)) {
                var decimalValue = +p.substring(1);
                if (decimalValue) {
                  if (decimalValue <= groupIndex) {
                    capturedGroups[decimalValue] = -1;
                  } else {
                    // Replace with an unambiguous escape sequence so that
                    // an octal escape sequence does not turn into a backreference
                    // to a capturing group from an earlier regex.
                    parts[i] = encodeEscape(decimalValue);
                  }
                }
              }
            }
        
            // Renumber groups and reduce capturing groups to non-capturing groups
            // where possible.
            for (var i = 1; i < capturedGroups.length; ++i) {
              if (-1 === capturedGroups[i]) {
                capturedGroups[i] = ++capturedGroupIndex;
              }
            }
            for (var i = 0, groupIndex = 0; i < n; ++i) {
              var p = parts[i];
              if (p === '(') {
                ++groupIndex;
                if (!capturedGroups[groupIndex]) {
                  parts[i] = '(?:';
                }
              } else if ('\\' === p.charAt(0)) {
                var decimalValue = +p.substring(1);
                if (decimalValue && decimalValue <= groupIndex) {
                  parts[i] = '\\' + capturedGroups[decimalValue];
                }
              }
            }
        
            // Remove any prefix anchors so that the output will match anywhere.
            // ^^ really does mean an anchored match though.
            for (var i = 0; i < n; ++i) {
              if ('^' === parts[i] && '^' !== parts[i + 1]) { parts[i] = ''; }
            }
        
            // Expand letters to groups to handle mixing of case-sensitive and
            // case-insensitive patterns if necessary.
            if (regex.ignoreCase && needToFoldCase) {
              for (var i = 0; i < n; ++i) {
                var p = parts[i];
                var ch0 = p.charAt(0);
                if (p.length >= 2 && ch0 === '[') {
                  parts[i] = caseFoldCharset(p);
                } else if (ch0 !== '\\') {
                  // TODO: handle letters in numeric escapes.
                  parts[i] = p.replace(
                      /[a-zA-Z]/g,
                      function (ch) {
                        var cc = ch.charCodeAt(0);
                        return '[' + String.fromCharCode(cc & ~32, cc | 32) + ']';
                      });
                }
              }
            }
        
            return parts.join('');
          }
        
          var rewritten = [];
          for (var i = 0, n = regexs.length; i < n; ++i) {
            var regex = regexs[i];
            if (regex.global || regex.multiline) { throw new Error('' + regex); }
            rewritten.push(
                '(?:' + allowAnywhereFoldCaseAndRenumberGroups(regex) + ')');
          }
        
          return new RegExp(rewritten.join('|'), ignoreCase ? 'gi' : 'g');
        }
      
        /**
         * Split markup into a string of source code and an array mapping ranges in
         * that string to the text nodes in which they appear.
         *
         * <p>
         * The HTML DOM structure:</p>
         * <pre>
         * (Element   "p"
         *   (Element "b"
         *     (Text  "print "))       ; #1
         *   (Text    "'Hello '")      ; #2
         *   (Element "br")            ; #3
         *   (Text    "  + 'World';")) ; #4
         * </pre>
         * <p>
         * corresponds to the HTML
         * {@code <p><b>print </b>'Hello '<br>  + 'World';</p>}.</p>
         *
         * <p>
         * It will produce the output:</p>
         * <pre>
         * {
         *   sourceCode: "print 'Hello '\n  + 'World';",
         *   //                     1          2
         *   //           012345678901234 5678901234567
         *   spans: [0, #1, 6, #2, 14, #3, 15, #4]
         * }
         * </pre>
         * <p>
         * where #1 is a reference to the {@code "print "} text node above, and so
         * on for the other text nodes.
         * </p>
         *
         * <p>
         * The {@code} spans array is an array of pairs.  Even elements are the start
         * indices of substrings, and odd elements are the text nodes (or BR elements)
         * that contain the text for those substrings.
         * Substrings continue until the next index or the end of the source.
         * </p>
         *
         * @param {Node} node an HTML DOM subtree containing source-code.
         * @param {boolean} isPreformatted true if white-space in text nodes should
         *    be considered significant.
         * @return {Object} source code and the text nodes in which they occur.
         */
        function extractSourceSpans(node, isPreformatted) {
          var nocode = /(?:^|\s)nocode(?:\s|$)/;
        
          var chunks = [];
          var length = 0;
          var spans = [];
          var k = 0;
        
          function walk(node) {
            var type = node.nodeType;
            if (type == 1) {  // Element
              if (nocode.test(node.className)) { return; }
              for (var child = node.firstChild; child; child = child.nextSibling) {
                walk(child);
              }
              var nodeName = node.nodeName.toLowerCase();
              if ('br' === nodeName || 'li' === nodeName) {
                chunks[k] = '\n';
                spans[k << 1] = length++;
                spans[(k++ << 1) | 1] = node;
              }
            } else if (type == 3 || type == 4) {  // Text
              var text = node.nodeValue;
              if (text.length) {
                if (!isPreformatted) {
                  text = text.replace(/[ \t\r\n]+/g, ' ');
                } else {
                  text = text.replace(/\r\n?/g, '\n');  // Normalize newlines.
                }
                // TODO: handle tabs here?
                chunks[k] = text;
                spans[k << 1] = length;
                length += text.length;
                spans[(k++ << 1) | 1] = node;
              }
            }
          }
        
          walk(node);
        
          return {
            sourceCode: chunks.join('').replace(/\n$/, ''),
            spans: spans
          };
        }
      
        /**
         * Apply the given language handler to sourceCode and add the resulting
         * decorations to out.
         * @param {number} basePos the index of sourceCode within the chunk of source
         *    whose decorations are already present on out.
         */
        function appendDecorations(basePos, sourceCode, langHandler, out) {
          if (!sourceCode) { return; }
          var job = {
            sourceCode: sourceCode,
            basePos: basePos
          };
          langHandler(job);
          out.push.apply(out, job.decorations);
        }
      
        var notWs = /\S/;
      
        /**
         * Given an element, if it contains only one child element and any text nodes
         * it contains contain only space characters, return the sole child element.
         * Otherwise returns undefined.
         * <p>
         * This is meant to return the CODE element in {@code <pre><code ...>} when
         * there is a single child element that contains all the non-space textual
         * content, but not to return anything where there are multiple child elements
         * as in {@code <pre><code>...</code><code>...</code></pre>} or when there
         * is textual content.
         */
        function childContentWrapper(element) {
          var wrapper = undefined;
          for (var c = element.firstChild; c; c = c.nextSibling) {
            var type = c.nodeType;
            wrapper = (type === 1)  // Element Node
                ? (wrapper ? element : c)
                : (type === 3)  // Text Node
                ? (notWs.test(c.nodeValue) ? element : wrapper)
                : wrapper;
          }
          return wrapper === element ? undefined : wrapper;
        }
      
        /** Given triples of [style, pattern, context] returns a lexing function,
          * The lexing function interprets the patterns to find token boundaries and
          * returns a decoration list of the form
          * [index_0, style_0, index_1, style_1, ..., index_n, style_n]
          * where index_n is an index into the sourceCode, and style_n is a style
          * constant like PR_PLAIN.  index_n-1 <= index_n, and style_n-1 applies to
          * all characters in sourceCode[index_n-1:index_n].
          *
          * The stylePatterns is a list whose elements have the form
          * [style : string, pattern : RegExp, DEPRECATED, shortcut : string].
          *
          * Style is a style constant like PR_PLAIN, or can be a string of the
          * form 'lang-FOO', where FOO is a language extension describing the
          * language of the portion of the token in $1 after pattern executes.
          * E.g., if style is 'lang-lisp', and group 1 contains the text
          * '(hello (world))', then that portion of the token will be passed to the
          * registered lisp handler for formatting.
          * The text before and after group 1 will be restyled using this decorator
          * so decorators should take care that this doesn't result in infinite
          * recursion.  For example, the HTML lexer rule for SCRIPT elements looks
          * something like ['lang-js', /<[s]cript>(.+?)<\/script>/].  This may match
          * '<script>foo()<\/script>', which would cause the current decorator to
          * be called with '<script>' which would not match the same rule since
          * group 1 must not be empty, so it would be instead styled as PR_TAG by
          * the generic tag rule.  The handler registered for the 'js' extension would
          * then be called with 'foo()', and finally, the current decorator would
          * be called with '<\/script>' which would not match the original rule and
          * so the generic tag rule would identify it as a tag.
          *
          * Pattern must only match prefixes, and if it matches a prefix, then that
          * match is considered a token with the same style.
          *
          * Context is applied to the last non-whitespace, non-comment token
          * recognized.
          *
          * Shortcut is an optional string of characters, any of which, if the first
          * character, gurantee that this pattern and only this pattern matches.
          *
          * @param {Array} shortcutStylePatterns patterns that always start with
          *   a known character.  Must have a shortcut string.
          * @param {Array} fallthroughStylePatterns patterns that will be tried in
          *   order if the shortcut ones fail.  May have shortcuts.
          *
          * @return {function (Object)} a
          *   function that takes source code and returns a list of decorations.
          */
        function createSimpleLexer(shortcutStylePatterns, fallthroughStylePatterns) {
          var shortcuts = {};
          var tokenizer;
          (function () {
            var allPatterns = shortcutStylePatterns.concat(fallthroughStylePatterns);
            var allRegexs = [];
            var regexKeys = {};
            for (var i = 0, n = allPatterns.length; i < n; ++i) {
              var patternParts = allPatterns[i];
              var shortcutChars = patternParts[3];
              if (shortcutChars) {
                for (var c = shortcutChars.length; --c >= 0;) {
                  shortcuts[shortcutChars.charAt(c)] = patternParts;
                }
              }
              var regex = patternParts[1];
              var k = '' + regex;
              if (!regexKeys.hasOwnProperty(k)) {
                allRegexs.push(regex);
                regexKeys[k] = null;
              }
            }
            allRegexs.push(/[\0-\uffff]/);
            tokenizer = combinePrefixPatterns(allRegexs);
          })();
      
          var nPatterns = fallthroughStylePatterns.length;
      
          /**
           * Lexes job.sourceCode and produces an output array job.decorations of
           * style classes preceded by the position at which they start in
           * job.sourceCode in order.
           *
           * @param {Object} job an object like <pre>{
           *    sourceCode: {string} sourceText plain text,
           *    basePos: {int} position of job.sourceCode in the larger chunk of
           *        sourceCode.
           * }</pre>
           */
          var decorate = function (job) {
            var sourceCode = job.sourceCode, basePos = job.basePos;
            /** Even entries are positions in source in ascending order.  Odd enties
              * are style markers (e.g., PR_COMMENT) that run from that position until
              * the end.
              * @type {Array.<number|string>}
              */
            var decorations = [basePos, PR_PLAIN];
            var pos = 0;  // index into sourceCode
            var tokens = sourceCode.match(tokenizer) || [];
            var styleCache = {};
      
            for (var ti = 0, nTokens = tokens.length; ti < nTokens; ++ti) {
              var token = tokens[ti];
              var style = styleCache[token];
              var match = void 0;
      
              var isEmbedded;
              if (typeof style === 'string') {
                isEmbedded = false;
              } else {
                var patternParts = shortcuts[token.charAt(0)];
                if (patternParts) {
                  match = token.match(patternParts[1]);
                  style = patternParts[0];
                } else {
                  for (var i = 0; i < nPatterns; ++i) {
                    patternParts = fallthroughStylePatterns[i];
                    match = token.match(patternParts[1]);
                    if (match) {
                      style = patternParts[0];
                      break;
                    }
                  }
      
                  if (!match) {  // make sure that we make progress
                    style = PR_PLAIN;
                  }
                }
      
                isEmbedded = style.length >= 5 && 'lang-' === style.substring(0, 5);
                if (isEmbedded && !(match && typeof match[1] === 'string')) {
                  isEmbedded = false;
                  style = PR_SOURCE;
                }
      
                if (!isEmbedded) { styleCache[token] = style; }
              }
      
              var tokenStart = pos;
              pos += token.length;
      
              if (!isEmbedded) {
                decorations.push(basePos + tokenStart, style);
              } else {  // Treat group 1 as an embedded block of source code.
                var embeddedSource = match[1];
                var embeddedSourceStart = token.indexOf(embeddedSource);
                var embeddedSourceEnd = embeddedSourceStart + embeddedSource.length;
                if (match[2]) {
                  // If embeddedSource can be blank, then it would match at the
                  // beginning which would cause us to infinitely recurse on the
                  // entire token, so we catch the right context in match[2].
                  embeddedSourceEnd = token.length - match[2].length;
                  embeddedSourceStart = embeddedSourceEnd - embeddedSource.length;
                }
                var lang = style.substring(5);
                // Decorate the left of the embedded source
                appendDecorations(
                    basePos + tokenStart,
                    token.substring(0, embeddedSourceStart),
                    decorate, decorations);
                // Decorate the embedded source
                appendDecorations(
                    basePos + tokenStart + embeddedSourceStart,
                    embeddedSource,
                    langHandlerForExtension(lang, embeddedSource),
                    decorations);
                // Decorate the right of the embedded section
                appendDecorations(
                    basePos + tokenStart + embeddedSourceEnd,
                    token.substring(embeddedSourceEnd),
                    decorate, decorations);
              }
            }
            job.decorations = decorations;
          };
          return decorate;
        }
      
        /** returns a function that produces a list of decorations from source text.
          *
          * This code treats ", ', and ` as string delimiters, and \ as a string
          * escape.  It does not recognize perl's qq() style strings.
          * It has no special handling for double delimiter escapes as in basic, or
          * the tripled delimiters used in python, but should work on those regardless
          * although in those cases a single string literal may be broken up into
          * multiple adjacent string literals.
          *
          * It recognizes C, C++, and shell style comments.
          *
          * @param {Object} options a set of optional parameters.
          * @return {function (Object)} a function that examines the source code
          *     in the input job and builds the decoration list.
          */
        function sourceDecorator(options) {
          var shortcutStylePatterns = [], fallthroughStylePatterns = [];
          if (options['tripleQuotedStrings']) {
            // '''multi-line-string''', 'single-line-string', and double-quoted
            shortcutStylePatterns.push(
                [PR_STRING,  /^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,
                 null, '\'"']);
          } else if (options['multiLineStrings']) {
            // 'multi-line-string', "multi-line-string"
            shortcutStylePatterns.push(
                [PR_STRING,  /^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,
                 null, '\'"`']);
          } else {
            // 'single-line-string', "single-line-string"
            shortcutStylePatterns.push(
                [PR_STRING,
                 /^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,
                 null, '"\'']);
          }
          if (options['verbatimStrings']) {
            // verbatim-string-literal production from the C# grammar.  See issue 93.
            fallthroughStylePatterns.push(
                [PR_STRING, /^@\"(?:[^\"]|\"\")*(?:\"|$)/, null]);
          }
          var hc = options['hashComments'];
          if (hc) {
            if (options['cStyleComments']) {
              if (hc > 1) {  // multiline hash comments
                shortcutStylePatterns.push(
                    [PR_COMMENT, /^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/, null, '#']);
              } else {
                // Stop C preprocessor declarations at an unclosed open comment
                shortcutStylePatterns.push(
                    [PR_COMMENT, /^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,
                     null, '#']);
              }
              // #include <stdio.h>
              fallthroughStylePatterns.push(
                  [PR_STRING,
                   /^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,
                   null]);
            } else {
              shortcutStylePatterns.push([PR_COMMENT, /^#[^\r\n]*/, null, '#']);
            }
          }
          if (options['cStyleComments']) {
            fallthroughStylePatterns.push([PR_COMMENT, /^\/\/[^\r\n]*/, null]);
            fallthroughStylePatterns.push(
                [PR_COMMENT, /^\/\*[\s\S]*?(?:\*\/|$)/, null]);
          }
          var regexLiterals = options['regexLiterals'];
          if (regexLiterals) {
            /**
             * @const
             */
            var regexExcls = regexLiterals > 1
              ? ''  // Multiline regex literals
              : '\n\r';
            /**
             * @const
             */
            var regexAny = regexExcls ? '.' : '[\\S\\s]';
            /**
             * @const
             */
            var REGEX_LITERAL = (
                // A regular expression literal starts with a slash that is
                // not followed by * or / so that it is not confused with
                // comments.
                '/(?=[^/*' + regexExcls + '])'
                // and then contains any number of raw characters,
                + '(?:[^/\\x5B\\x5C' + regexExcls + ']'
                // escape sequences (\x5C),
                +    '|\\x5C' + regexAny
                // or non-nesting character sets (\x5B\x5D);
                +    '|\\x5B(?:[^\\x5C\\x5D' + regexExcls + ']'
                +             '|\\x5C' + regexAny + ')*(?:\\x5D|$))+'
                // finally closed by a /.
                + '/');
            fallthroughStylePatterns.push(
                ['lang-regex',
                 RegExp('^' + REGEXP_PRECEDER_PATTERN + '(' + REGEX_LITERAL + ')')
                 ]);
          }
      
          var types = options['types'];
          if (types) {
            fallthroughStylePatterns.push([PR_TYPE, types]);
          }
      
          var keywords = ("" + options['keywords']).replace(/^ | $/g, '');
          if (keywords.length) {
            fallthroughStylePatterns.push(
                [PR_KEYWORD,
                 new RegExp('^(?:' + keywords.replace(/[\s,]+/g, '|') + ')\\b'),
                 null]);
          }
      
          shortcutStylePatterns.push([PR_PLAIN,       /^\s+/, null, ' \r\n\t\xA0']);
      
          var punctuation =
            // The Bash man page says
      
            // A word is a sequence of characters considered as a single
            // unit by GRUB. Words are separated by metacharacters,
            // which are the following plus space, tab, and newline: { }
            // | & $ ; < >
            // ...
            
            // A word beginning with # causes that word and all remaining
            // characters on that line to be ignored.
      
            // which means that only a '#' after /(?:^|[{}|&$;<>\s])/ starts a
            // comment but empirically
            // $ echo {#}
            // {#}
            // $ echo \$#
            // $#
            // $ echo }#
            // }#
      
            // so /(?:^|[|&;<>\s])/ is more appropriate.
      
            // http://gcc.gnu.org/onlinedocs/gcc-2.95.3/cpp_1.html#SEC3
            // suggests that this definition is compatible with a
            // default mode that tries to use a single token definition
            // to recognize both bash/python style comments and C
            // preprocessor directives.
      
            // This definition of punctuation does not include # in the list of
            // follow-on exclusions, so # will not be broken before if preceeded
            // by a punctuation character.  We could try to exclude # after
            // [|&;<>] but that doesn't seem to cause many major problems.
            // If that does turn out to be a problem, we should change the below
            // when hc is truthy to include # in the run of punctuation characters
            // only when not followint [|&;<>].
            '^.[^\\s\\w.$@\'"`/\\\\]*';
          if (options['regexLiterals']) {
            punctuation += '(?!\s*\/)';
          }
      
          fallthroughStylePatterns.push(
              // TODO(mikesamuel): recognize non-latin letters and numerals in idents
              [PR_LITERAL,     /^@[a-z_$][a-z_$@0-9]*/i, null],
              [PR_TYPE,        /^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/, null],
              [PR_PLAIN,       /^[a-z_$][a-z_$@0-9]*/i, null],
              [PR_LITERAL,
               new RegExp(
                   '^(?:'
                   // A hex number
                   + '0x[a-f0-9]+'
                   // or an octal or decimal number,
                   + '|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)'
                   // possibly in scientific notation
                   + '(?:e[+\\-]?\\d+)?'
                   + ')'
                   // with an optional modifier like UL for unsigned long
                   + '[a-z]*', 'i'),
               null, '0123456789'],
              // Don't treat escaped quotes in bash as starting strings.
              // See issue 144.
              [PR_PLAIN,       /^\\[\s\S]?/, null],
              [PR_PUNCTUATION, new RegExp(punctuation), null]);
      
          return createSimpleLexer(shortcutStylePatterns, fallthroughStylePatterns);
        }
      
        var decorateSource = sourceDecorator({
              'keywords': ALL_KEYWORDS,
              'hashComments': true,
              'cStyleComments': true,
              'multiLineStrings': true,
              'regexLiterals': true
            });
      
        /**
         * Given a DOM subtree, wraps it in a list, and puts each line into its own
         * list item.
         *
         * @param {Node} node modified in place.  Its content is pulled into an
         *     HTMLOListElement, and each line is moved into a separate list item.
         *     This requires cloning elements, so the input might not have unique
         *     IDs after numbering.
         * @param {boolean} isPreformatted true iff white-space in text nodes should
         *     be treated as significant.
         */
        function numberLines(node, opt_startLineNum, isPreformatted) {
          var nocode = /(?:^|\s)nocode(?:\s|$)/;
          var lineBreak = /\r\n?|\n/;
        
          var document = node.ownerDocument;
        
          var li = document.createElement('li');
          while (node.firstChild) {
            li.appendChild(node.firstChild);
          }
          // An array of lines.  We split below, so this is initialized to one
          // un-split line.
          var listItems = [li];
        
          function walk(node) {
            var type = node.nodeType;
            if (type == 1 && !nocode.test(node.className)) {  // Element
              if ('br' === node.nodeName) {
                breakAfter(node);
                // Discard the <BR> since it is now flush against a </LI>.
                if (node.parentNode) {
                  node.parentNode.removeChild(node);
                }
              } else {
                for (var child = node.firstChild; child; child = child.nextSibling) {
                  walk(child);
                }
              }
            } else if ((type == 3 || type == 4) && isPreformatted) {  // Text
              var text = node.nodeValue;
              var match = text.match(lineBreak);
              if (match) {
                var firstLine = text.substring(0, match.index);
                node.nodeValue = firstLine;
                var tail = text.substring(match.index + match[0].length);
                if (tail) {
                  var parent = node.parentNode;
                  parent.insertBefore(
                    document.createTextNode(tail), node.nextSibling);
                }
                breakAfter(node);
                if (!firstLine) {
                  // Don't leave blank text nodes in the DOM.
                  node.parentNode.removeChild(node);
                }
              }
            }
          }
        
          // Split a line after the given node.
          function breakAfter(lineEndNode) {
            // If there's nothing to the right, then we can skip ending the line
            // here, and move root-wards since splitting just before an end-tag
            // would require us to create a bunch of empty copies.
            while (!lineEndNode.nextSibling) {
              lineEndNode = lineEndNode.parentNode;
              if (!lineEndNode) { return; }
            }
        
            function breakLeftOf(limit, copy) {
              // Clone shallowly if this node needs to be on both sides of the break.
              var rightSide = copy ? limit.cloneNode(false) : limit;
              var parent = limit.parentNode;
              if (parent) {
                // We clone the parent chain.
                // This helps us resurrect important styling elements that cross lines.
                // E.g. in <i>Foo<br>Bar</i>
                // should be rewritten to <li><i>Foo</i></li><li><i>Bar</i></li>.
                var parentClone = breakLeftOf(parent, 1);
                // Move the clone and everything to the right of the original
                // onto the cloned parent.
                var next = limit.nextSibling;
                parentClone.appendChild(rightSide);
                for (var sibling = next; sibling; sibling = next) {
                  next = sibling.nextSibling;
                  parentClone.appendChild(sibling);
                }
              }
              return rightSide;
            }
        
            var copiedListItem = breakLeftOf(lineEndNode.nextSibling, 0);
        
            // Walk the parent chain until we reach an unattached LI.
            for (var parent;
                 // Check nodeType since IE invents document fragments.
                 (parent = copiedListItem.parentNode) && parent.nodeType === 1;) {
              copiedListItem = parent;
            }
            // Put it on the list of lines for later processing.
            listItems.push(copiedListItem);
          }
        
          // Split lines while there are lines left to split.
          for (var i = 0;  // Number of lines that have been split so far.
               i < listItems.length;  // length updated by breakAfter calls.
               ++i) {
            walk(listItems[i]);
          }
        
          // Make sure numeric indices show correctly.
          if (opt_startLineNum === (opt_startLineNum|0)) {
            listItems[0].setAttribute('value', opt_startLineNum);
          }
        
          var ol = document.createElement('ol');
          ol.className = 'linenums';
          var offset = Math.max(0, ((opt_startLineNum - 1 /* zero index */)) | 0) || 0;
          for (var i = 0, n = listItems.length; i < n; ++i) {
            li = listItems[i];
            // Stick a class on the LIs so that stylesheets can
            // color odd/even rows, or any other row pattern that
            // is co-prime with 10.
            li.className = 'L' + ((i + offset) % 10);
            if (!li.firstChild) {
              li.appendChild(document.createTextNode('\xA0'));
            }
            ol.appendChild(li);
          }
        
          node.appendChild(ol);
        }
        /**
         * Breaks {@code job.sourceCode} around style boundaries in
         * {@code job.decorations} and modifies {@code job.sourceNode} in place.
         * @param {Object} job like <pre>{
         *    sourceCode: {string} source as plain text,
         *    sourceNode: {HTMLElement} the element containing the source,
         *    spans: {Array.<number|Node>} alternating span start indices into source
         *       and the text node or element (e.g. {@code <BR>}) corresponding to that
         *       span.
         *    decorations: {Array.<number|string} an array of style classes preceded
         *       by the position at which they start in job.sourceCode in order
         * }</pre>
         * @private
         */
        function recombineTagsAndDecorations(job) {
          var isIE8OrEarlier = /\bMSIE\s(\d+)/.exec(navigator.userAgent);
          isIE8OrEarlier = isIE8OrEarlier && +isIE8OrEarlier[1] <= 8;
          var newlineRe = /\n/g;
        
          var source = job.sourceCode;
          var sourceLength = source.length;
          // Index into source after the last code-unit recombined.
          var sourceIndex = 0;
        
          var spans = job.spans;
          var nSpans = spans.length;
          // Index into spans after the last span which ends at or before sourceIndex.
          var spanIndex = 0;
        
          var decorations = job.decorations;
          var nDecorations = decorations.length;
          // Index into decorations after the last decoration which ends at or before
          // sourceIndex.
          var decorationIndex = 0;
        
          // Remove all zero-length decorations.
          decorations[nDecorations] = sourceLength;
          var decPos, i;
          for (i = decPos = 0; i < nDecorations;) {
            if (decorations[i] !== decorations[i + 2]) {
              decorations[decPos++] = decorations[i++];
              decorations[decPos++] = decorations[i++];
            } else {
              i += 2;
            }
          }
          nDecorations = decPos;
        
          // Simplify decorations.
          for (i = decPos = 0; i < nDecorations;) {
            var startPos = decorations[i];
            // Conflate all adjacent decorations that use the same style.
            var startDec = decorations[i + 1];
            var end = i + 2;
            while (end + 2 <= nDecorations && decorations[end + 1] === startDec) {
              end += 2;
            }
            decorations[decPos++] = startPos;
            decorations[decPos++] = startDec;
            i = end;
          }
        
          nDecorations = decorations.length = decPos;
        
          var sourceNode = job.sourceNode;
          var oldDisplay;
          if (sourceNode) {
            oldDisplay = sourceNode.style.display;
            sourceNode.style.display = 'none';
          }
          try {
            var decoration = null;
            while (spanIndex < nSpans) {
              var spanStart = spans[spanIndex];
              var spanEnd = spans[spanIndex + 2] || sourceLength;
        
              var decEnd = decorations[decorationIndex + 2] || sourceLength;
        
              var end = Math.min(spanEnd, decEnd);
        
              var textNode = spans[spanIndex + 1];
              var styledText;
              if (textNode.nodeType !== 1  // Don't muck with <BR>s or <LI>s
                  // Don't introduce spans around empty text nodes.
                  && (styledText = source.substring(sourceIndex, end))) {
                // This may seem bizarre, and it is.  Emitting LF on IE causes the
                // code to display with spaces instead of line breaks.
                // Emitting Windows standard issue linebreaks (CRLF) causes a blank
                // space to appear at the beginning of every line but the first.
                // Emitting an old Mac OS 9 line separator makes everything spiffy.
                if (isIE8OrEarlier) {
                  styledText = styledText.replace(newlineRe, '\r');
                }
                textNode.nodeValue = styledText;
                var document = textNode.ownerDocument;
                var span = document.createElement('span');
                span.className = decorations[decorationIndex + 1];
                var parentNode = textNode.parentNode;
                parentNode.replaceChild(span, textNode);
                span.appendChild(textNode);
                if (sourceIndex < spanEnd) {  // Split off a text node.
                  spans[spanIndex + 1] = textNode
                      // TODO: Possibly optimize by using '' if there's no flicker.
                      = document.createTextNode(source.substring(end, spanEnd));
                  parentNode.insertBefore(textNode, span.nextSibling);
                }
              }
        
              sourceIndex = end;
        
              if (sourceIndex >= spanEnd) {
                spanIndex += 2;
              }
              if (sourceIndex >= decEnd) {
                decorationIndex += 2;
              }
            }
          } finally {
            if (sourceNode) {
              sourceNode.style.display = oldDisplay;
            }
          }
        }
      
        /** Maps language-specific file extensions to handlers. */
        var langHandlerRegistry = {};
        /** Register a language handler for the given file extensions.
          * @param {function (Object)} handler a function from source code to a list
          *      of decorations.  Takes a single argument job which describes the
          *      state of the computation.   The single parameter has the form
          *      {@code {
          *        sourceCode: {string} as plain text.
          *        decorations: {Array.<number|string>} an array of style classes
          *                     preceded by the position at which they start in
          *                     job.sourceCode in order.
          *                     The language handler should assigned this field.
          *        basePos: {int} the position of source in the larger source chunk.
          *                 All positions in the output decorations array are relative
          *                 to the larger source chunk.
          *      } }
          * @param {Array.<string>} fileExtensions
          */
        function registerLangHandler(handler, fileExtensions) {
          for (var i = fileExtensions.length; --i >= 0;) {
            var ext = fileExtensions[i];
            if (!langHandlerRegistry.hasOwnProperty(ext)) {
              langHandlerRegistry[ext] = handler;
            } else if (win['console']) {
              console['warn']('cannot override language handler %s', ext);
            }
          }
        }
        function langHandlerForExtension(extension, source) {
          if (!(extension && langHandlerRegistry.hasOwnProperty(extension))) {
            // Treat it as markup if the first non whitespace character is a < and
            // the last non-whitespace character is a >.
            extension = /^\s*</.test(source)
                ? 'default-markup'
                : 'default-code';
          }
          return langHandlerRegistry[extension];
        }
        registerLangHandler(decorateSource, ['default-code']);
        registerLangHandler(
            createSimpleLexer(
                [],
                [
                 [PR_PLAIN,       /^[^<?]+/],
                 [PR_DECLARATION, /^<!\w[^>]*(?:>|$)/],
                 [PR_COMMENT,     /^<\!--[\s\S]*?(?:-\->|$)/],
                 // Unescaped content in an unknown language
                 ['lang-',        /^<\?([\s\S]+?)(?:\?>|$)/],
                 ['lang-',        /^<%([\s\S]+?)(?:%>|$)/],
                 [PR_PUNCTUATION, /^(?:<[%?]|[%?]>)/],
                 ['lang-',        /^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i],
                 // Unescaped content in javascript.  (Or possibly vbscript).
                 ['lang-js',      /^<script\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],
                 // Contains unescaped stylesheet content
                 ['lang-css',     /^<style\b[^>]*>([\s\S]*?)(<\/style\b[^>]*>)/i],
                 ['lang-in.tag',  /^(<\/?[a-z][^<>]*>)/i]
                ]),
            ['default-markup', 'htm', 'html', 'mxml', 'xhtml', 'xml', 'xsl']);
        registerLangHandler(
            createSimpleLexer(
                [
                 [PR_PLAIN,        /^[\s]+/, null, ' \t\r\n'],
                 [PR_ATTRIB_VALUE, /^(?:\"[^\"]*\"?|\'[^\']*\'?)/, null, '\"\'']
                 ],
                [
                 [PR_TAG,          /^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],
                 [PR_ATTRIB_NAME,  /^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],
                 ['lang-uq.val',   /^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],
                 [PR_PUNCTUATION,  /^[=<>\/]+/],
                 ['lang-js',       /^on\w+\s*=\s*\"([^\"]+)\"/i],
                 ['lang-js',       /^on\w+\s*=\s*\'([^\']+)\'/i],
                 ['lang-js',       /^on\w+\s*=\s*([^\"\'>\s]+)/i],
                 ['lang-css',      /^style\s*=\s*\"([^\"]+)\"/i],
                 ['lang-css',      /^style\s*=\s*\'([^\']+)\'/i],
                 ['lang-css',      /^style\s*=\s*([^\"\'>\s]+)/i]
                 ]),
            ['in.tag']);
        registerLangHandler(
            createSimpleLexer([], [[PR_ATTRIB_VALUE, /^[\s\S]+/]]), ['uq.val']);
        registerLangHandler(sourceDecorator({
                'keywords': CPP_KEYWORDS,
                'hashComments': true,
                'cStyleComments': true,
                'types': C_TYPES
              }), ['c', 'cc', 'cpp', 'cxx', 'cyc', 'm']);
        registerLangHandler(sourceDecorator({
                'keywords': 'null,true,false'
              }), ['json']);
        registerLangHandler(sourceDecorator({
                'keywords': CSHARP_KEYWORDS,
                'hashComments': true,
                'cStyleComments': true,
                'verbatimStrings': true,
                'types': C_TYPES
              }), ['cs']);
        registerLangHandler(sourceDecorator({
                'keywords': JAVA_KEYWORDS,
                'cStyleComments': true
              }), ['java']);
        registerLangHandler(sourceDecorator({
                'keywords': SH_KEYWORDS,
                'hashComments': true,
                'multiLineStrings': true
              }), ['bash', 'bsh', 'csh', 'sh']);
        registerLangHandler(sourceDecorator({
                'keywords': PYTHON_KEYWORDS,
                'hashComments': true,
                'multiLineStrings': true,
                'tripleQuotedStrings': true
              }), ['cv', 'py', 'python']);
        registerLangHandler(sourceDecorator({
                'keywords': PERL_KEYWORDS,
                'hashComments': true,
                'multiLineStrings': true,
                'regexLiterals': 2  // multiline regex literals
              }), ['perl', 'pl', 'pm']);
        registerLangHandler(sourceDecorator({
                'keywords': RUBY_KEYWORDS,
                'hashComments': true,
                'multiLineStrings': true,
                'regexLiterals': true
              }), ['rb', 'ruby']);
        registerLangHandler(sourceDecorator({
                'keywords': JSCRIPT_KEYWORDS,
                'cStyleComments': true,
                'regexLiterals': true
              }), ['javascript', 'js']);
        registerLangHandler(sourceDecorator({
                'keywords': COFFEE_KEYWORDS,
                'hashComments': 3,  // ### style block comments
                'cStyleComments': true,
                'multilineStrings': true,
                'tripleQuotedStrings': true,
                'regexLiterals': true
              }), ['coffee']);
        registerLangHandler(sourceDecorator({
                'keywords': RUST_KEYWORDS,
                'cStyleComments': true,
                'multilineStrings': true
              }), ['rc', 'rs', 'rust']);
        registerLangHandler(
            createSimpleLexer([], [[PR_STRING, /^[\s\S]+/]]), ['regex']);
      
        function applyDecorator(job) {
          var opt_langExtension = job.langExtension;
      
          try {
            // Extract tags, and convert the source code to plain text.
            var sourceAndSpans = extractSourceSpans(job.sourceNode, job.pre);
            /** Plain text. @type {string} */
            var source = sourceAndSpans.sourceCode;
            job.sourceCode = source;
            job.spans = sourceAndSpans.spans;
            job.basePos = 0;
      
            // Apply the appropriate language handler
            langHandlerForExtension(opt_langExtension, source)(job);
      
            // Integrate the decorations and tags back into the source code,
            // modifying the sourceNode in place.
            recombineTagsAndDecorations(job);
          } catch (e) {
            if (win['console']) {
              console['log'](e && e['stack'] || e);
            }
          }
        }
      
        /**
         * Pretty print a chunk of code.
         * @param sourceCodeHtml {string} The HTML to pretty print.
         * @param opt_langExtension {string} The language name to use.
         *     Typically, a filename extension like 'cpp' or 'java'.
         * @param opt_numberLines {number|boolean} True to number lines,
         *     or the 1-indexed number of the first line in sourceCodeHtml.
         */
        function $prettyPrintOne(sourceCodeHtml, opt_langExtension, opt_numberLines) {
          var container = document.createElement('div');
          // This could cause images to load and onload listeners to fire.
          // E.g. <img onerror="alert(1337)" src="nosuchimage.png">.
          // We assume that the inner HTML is from a trusted source.
          // The pre-tag is required for IE8 which strips newlines from innerHTML
          // when it is injected into a <pre> tag.
          // http://stackoverflow.com/questions/451486/pre-tag-loses-line-breaks-when-setting-innerhtml-in-ie
          // http://stackoverflow.com/questions/195363/inserting-a-newline-into-a-pre-tag-ie-javascript
          container.innerHTML = '<pre>' + sourceCodeHtml + '</pre>';
          container = container.firstChild;
          if (opt_numberLines) {
            numberLines(container, opt_numberLines, true);
          }
      
          var job = {
            langExtension: opt_langExtension,
            numberLines: opt_numberLines,
            sourceNode: container,
            pre: 1
          };
          applyDecorator(job);
          return container.innerHTML;
        }
      
         /**
          * Find all the {@code <pre>} and {@code <code>} tags in the DOM with
          * {@code class=prettyprint} and prettify them.
          *
          * @param {Function} opt_whenDone called when prettifying is done.
          * @param {HTMLElement|HTMLDocument} opt_root an element or document
          *   containing all the elements to pretty print.
          *   Defaults to {@code document.body}.
          */
        function $prettyPrint(opt_whenDone, opt_root) {
          var root = opt_root || document.body;
          var doc = root.ownerDocument || document;
          function byTagName(tn) { return root.getElementsByTagName(tn); }
          // fetch a list of nodes to rewrite
          var codeSegments = [byTagName('pre'), byTagName('code'), byTagName('xmp')];
          var elements = [];
          for (var i = 0; i < codeSegments.length; ++i) {
            for (var j = 0, n = codeSegments[i].length; j < n; ++j) {
              elements.push(codeSegments[i][j]);
            }
          }
          codeSegments = null;
      
          var clock = Date;
          if (!clock['now']) {
            clock = { 'now': function () { return +(new Date); } };
          }
      
          // The loop is broken into a series of continuations to make sure that we
          // don't make the browser unresponsive when rewriting a large page.
          var k = 0;
          var prettyPrintingJob;
      
          var langExtensionRe = /\blang(?:uage)?-([\w.]+)(?!\S)/;
          var prettyPrintRe = /\bprettyprint\b/;
          var prettyPrintedRe = /\bprettyprinted\b/;
          var preformattedTagNameRe = /pre|xmp/i;
          var codeRe = /^code$/i;
          var preCodeXmpRe = /^(?:pre|code|xmp)$/i;
          var EMPTY = {};
      
          function doWork() {
            var endTime = (win['PR_SHOULD_USE_CONTINUATION'] ?
                           clock['now']() + 250 /* ms */ :
                           Infinity);
            for (; k < elements.length && clock['now']() < endTime; k++) {
              var cs = elements[k];
      
              // Look for a preceding comment like
              // <?prettify lang="..." linenums="..."?>
              var attrs = EMPTY;
              {
                for (var preceder = cs; (preceder = preceder.previousSibling);) {
                  var nt = preceder.nodeType;
                  // <?foo?> is parsed by HTML 5 to a comment node (8)
                  // like <!--?foo?-->, but in XML is a processing instruction
                  var value = (nt === 7 || nt === 8) && preceder.nodeValue;
                  if (value
                      ? !/^\??prettify\b/.test(value)
                      : (nt !== 3 || /\S/.test(preceder.nodeValue))) {
                    // Skip over white-space text nodes but not others.
                    break;
                  }
                  if (value) {
                    attrs = {};
                    value.replace(
                        /\b(\w+)=([\w:.%+-]+)/g,
                      function (_, name, value) { attrs[name] = value; });
                    break;
                  }
                }
              }
      
              var className = cs.className;
              if ((attrs !== EMPTY || prettyPrintRe.test(className))
                  // Don't redo this if we've already done it.
                  // This allows recalling pretty print to just prettyprint elements
                  // that have been added to the page since last call.
                  && !prettyPrintedRe.test(className)) {
      
                // make sure this is not nested in an already prettified element
                var nested = false;
                for (var p = cs.parentNode; p; p = p.parentNode) {
                  var tn = p.tagName;
                  if (preCodeXmpRe.test(tn)
                      && p.className && prettyPrintRe.test(p.className)) {
                    nested = true;
                    break;
                  }
                }
                if (!nested) {
                  // Mark done.  If we fail to prettyprint for whatever reason,
                  // we shouldn't try again.
                  cs.className += ' prettyprinted';
      
                  // If the classes includes a language extensions, use it.
                  // Language extensions can be specified like
                  //     <pre class="prettyprint lang-cpp">
                  // the language extension "cpp" is used to find a language handler
                  // as passed to PR.registerLangHandler.
                  // HTML5 recommends that a language be specified using "language-"
                  // as the prefix instead.  Google Code Prettify supports both.
                  // http://dev.w3.org/html5/spec-author-view/the-code-element.html
                  var langExtension = attrs['lang'];
                  if (!langExtension) {
                    langExtension = className.match(langExtensionRe);
                    // Support <pre class="prettyprint"><code class="language-c">
                    var wrapper;
                    if (!langExtension && (wrapper = childContentWrapper(cs))
                        && codeRe.test(wrapper.tagName)) {
                      langExtension = wrapper.className.match(langExtensionRe);
                    }
      
                    if (langExtension) { langExtension = langExtension[1]; }
                  }
      
                  var preformatted;
                  if (preformattedTagNameRe.test(cs.tagName)) {
                    preformatted = 1;
                  } else {
                    var currentStyle = cs['currentStyle'];
                    var defaultView = doc.defaultView;
                    var whitespace = (
                        currentStyle
                        ? currentStyle['whiteSpace']
                        : (defaultView
                           && defaultView.getComputedStyle)
                        ? defaultView.getComputedStyle(cs, null)
                        .getPropertyValue('white-space')
                        : 0);
                    preformatted = whitespace
                        && 'pre' === whitespace.substring(0, 3);
                  }
      
                  // Look for a class like linenums or linenums:<n> where <n> is the
                  // 1-indexed number of the first line.
                  var lineNums = attrs['linenums'];
                  if (!(lineNums = lineNums === 'true' || +lineNums)) {
                    lineNums = className.match(/\blinenums\b(?::(\d+))?/);
                    lineNums =
                      lineNums
                      ? lineNums[1] && lineNums[1].length
                        ? +lineNums[1] : true
                      : false;
                  }
                  if (lineNums) { numberLines(cs, lineNums, preformatted); }
      
                  // do the pretty printing
                  prettyPrintingJob = {
                    langExtension: langExtension,
                    sourceNode: cs,
                    numberLines: lineNums,
                    pre: preformatted
                  };
                  applyDecorator(prettyPrintingJob);
                }
              }
            }
            if (k < elements.length) {
              // finish up in a continuation
              setTimeout(doWork, 250);
            } else if ('function' === typeof opt_whenDone) {
              opt_whenDone();
            }
          }
      
          doWork();
        }
      
        /**
         * Contains functions for creating and registering new language handlers.
         * @type {Object}
         */
        var PR = win['PR'] = {
              'createSimpleLexer': createSimpleLexer,
              'registerLangHandler': registerLangHandler,
              'sourceDecorator': sourceDecorator,
              'PR_ATTRIB_NAME': PR_ATTRIB_NAME,
              'PR_ATTRIB_VALUE': PR_ATTRIB_VALUE,
              'PR_COMMENT': PR_COMMENT,
              'PR_DECLARATION': PR_DECLARATION,
              'PR_KEYWORD': PR_KEYWORD,
              'PR_LITERAL': PR_LITERAL,
              'PR_NOCODE': PR_NOCODE,
              'PR_PLAIN': PR_PLAIN,
              'PR_PUNCTUATION': PR_PUNCTUATION,
              'PR_SOURCE': PR_SOURCE,
              'PR_STRING': PR_STRING,
              'PR_TAG': PR_TAG,
              'PR_TYPE': PR_TYPE,
              'prettyPrintOne':
                 IN_GLOBAL_SCOPE
                   ? (win['prettyPrintOne'] = $prettyPrintOne)
                   : (prettyPrintOne = $prettyPrintOne),
              'prettyPrint': prettyPrint =
                 IN_GLOBAL_SCOPE
                   ? (win['prettyPrint'] = $prettyPrint)
                   : (prettyPrint = $prettyPrint)
            };
      
        // Make PR available via the Asynchronous Module Definition (AMD) API.
        // Per https://github.com/amdjs/amdjs-api/wiki/AMD:
        // The Asynchronous Module Definition (AMD) API specifies a
        // mechanism for defining modules such that the module and its
        // dependencies can be asynchronously loaded.
        // ...
        // To allow a clear indicator that a global define function (as
        // needed for script src browser loading) conforms to the AMD API,
        // any global define function SHOULD have a property called "amd"
        // whose value is an object. This helps avoid conflict with any
        // other existing JavaScript code that could have defined a define()
        // function that does not conform to the AMD API.
        if (typeof define === "function" && define['amd']) {
          define("google-code-prettify", [], function () {
            return PR; 
          });
        }
      })();
      
      
      ================================================
      FILE: google-code-prettify/src/run_prettify.js
      ================================================
      // Copyright (C) 2013 Google Inc.
      //
      // Licensed under the Apache License, Version 2.0 (the "License");
      // you may not use this file except in compliance with the License.
      // You may obtain a copy of the License at
      //
      //      http://www.apache.org/licenses/LICENSE-2.0
      //
      // Unless required by applicable law or agreed to in writing, software
      // distributed under the License is distributed on an "AS IS" BASIS,
      // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      // See the License for the specific language governing permissions and
      // limitations under the License.
      
      
      // Looks at query parameters to decide which language handlers and style-sheets
      // to load.
      
      // Query Parameter     Format           Effect                        Default
      // +------------------+---------------+------------------------------+--------+
      // | autorun=         | true | false  | If true then prettyPrint()   | "true" |
      // |                  |               | is called on page load.      |        |
      // +------------------+---------------+------------------------------+--------+
      // | lang=            | language name | Loads the language handler   | Can    |
      // |                  |               | named "lang-<NAME>.js".      | appear |
      // |                  |               | See available handlers at    | many   |
      // |                  |               | http://code.google.com/p/    | times. |
      // |                  |               | google-code-prettify/source/ |        |
      // |                  |               | browse/trunk/src             |        |
      // +------------------+---------------+------------------------------+--------+
      // | skin=            | skin name     | Loads the skin stylesheet    | none.  |
      // |                  |               | named "<NAME>.css".          |        |
      // |                  |               | http://code.google.com/p/    |        |
      // |                  |               | google-code-prettify/source/ |        |
      // |                  |               | browse/trunk/styles          |        |
      // +------------------+---------------+------------------------------+--------+
      // | callback=        | JS identifier | When "prettyPrint" finishes  | none   |
      // |                  |               | window.exports[js_ident] is  |        |
      // |                  |               | called.                      |        |
      // |                  |               | The callback must be under   |        |
      // |                  |               | exports to reduce the risk   |        |
      // |                  |               | of XSS via query parameter   |        |
      // |                  |               | injection.                   |        |
      // +------------------+---------------+------------------------------+--------+
      
      // Exmaples
      // .../prettify.js?lang=css&skin=sunburst
      //   1. Loads the CSS language handler which can be used to prettify CSS
      //      stylesheets, HTML <style> element bodies and style="..." attributes
      //      values.
      //   2. Loads the sunburst.css stylesheet instead of the default prettify.css
      //      stylesheet.
      //      A gallery of stylesheets is available at
      //      https://google-code-prettify.googlecode.com/svn/trunk/styles/index.html
      //   3. Since autorun=false is not specified, calls prettyPrint() on page load.
      
      
      /** @define {boolean} */
      var IN_GLOBAL_SCOPE = false;
      
      (function () {
        "use strict";
      
        var win = window;
        var setTimeout = win.setTimeout;
        var doc = document;
        var root = doc.documentElement;
        var head = doc['head'] || doc.getElementsByTagName("head")[0] || root;
      
        // From http://javascript.nwbox.com/ContentLoaded/contentloaded.js
        // Author: Diego Perini (diego.perini at gmail.com)
        // Summary: cross-browser wrapper for DOMContentLoaded
        // Updated: 20101020
        // License: MIT
        // Version: 1.2
        function contentLoaded(callback) {
          var addEventListener = doc['addEventListener'];
          var done = false, top = true,
              add = addEventListener ? 'addEventListener' : 'attachEvent',
              rem = addEventListener ? 'removeEventListener' : 'detachEvent',
              pre = addEventListener ? '' : 'on',
      
              init = function(e) {
                if (e.type == 'readystatechange' && doc.readyState != 'complete') {
                  return;
                }
                (e.type == 'load' ? win : doc)[rem](pre + e.type, init, false);
                if (!done && (done = true)) { callback.call(win, e.type || e); }
              },
      
              poll = function() {
                try {
                  root.doScroll('left');
                } catch(e) {
                  setTimeout(poll, 50);
                  return;
                }
                init('poll');
              };
      
          if (doc.readyState == 'complete') {
            callback.call(win, 'lazy');
          } else {
            if (doc.createEventObject && root.doScroll) {
              try { top = !win.frameElement; } catch(e) { }
              if (top) { poll(); }
            }
            doc[add](pre + 'DOMContentLoaded', init, false);
            doc[add](pre + 'readystatechange', init, false);
            win[add](pre + 'load', init, false);
          }
        }
      
        // Given a list of URLs to stylesheets, loads the first that loads without
        // triggering an error event.
        function loadStylesheetsFallingBack(stylesheets) {
          var n = stylesheets.length;
          function load(i) {
            if (i === n) { return; }
            var link = doc.createElement('link');
            link.rel = 'stylesheet';
            link.type = 'text/css';
            if (i + 1 < n) {
              // http://pieisgood.org/test/script-link-events/ indicates that many
              // versions of IE do not support onerror on <link>s, though
              // http://msdn.microsoft.com/en-us/library/ie/ms535848(v=vs.85).aspx
              // indicates that recent IEs do support error.
              link.error = link.onerror = function () { load(i + 1); };
            }
            link.href = stylesheets[i];
            head.appendChild(link);
          }
          load(0);
        }
      
        var scriptQuery = '';
        // Look for the <script> node that loads this script to get its parameters.
        // This starts looking at the end instead of just considering the last
        // because deferred and async scripts run out of order.
        // If the script is loaded twice, then this will run in reverse order.
        for (var scripts = doc.scripts, i = scripts.length; --i >= 0;) {
          var script = scripts[i];
          var match = script.src.match(
              /^[^?#]*\/run_prettify\.js(\?[^#]*)?(?:#.*)?$/);
          if (match) {
            scriptQuery = match[1] || '';
            // Remove the script from the DOM so that multiple runs at least run
            // multiple times even if parameter sets are interpreted in reverse
            // order.
            script.parentNode.removeChild(script);
            break;
          }
        }
      
        // Pull parameters into local variables.
        var autorun = true;
        var langs = [];
        var skins = [];
        var callbacks = [];
        scriptQuery.replace(
            /[?&]([^&=]+)=([^&]+)/g,
            function (_, name, value) {
              value = decodeURIComponent(value);
              name = decodeURIComponent(name);
              if (name == 'autorun')   { autorun = !/^[0fn]/i.test(value); } else
              if (name == 'lang')      { langs.push(value);                } else
              if (name == 'skin')      { skins.push(value);                } else
              if (name == 'callback')  { callbacks.push(value);            }
            });
      
        // Use https to avoid mixed content warnings in client pages and to
        // prevent a MITM from rewrite prettify mid-flight.
        // This only works if this script is loaded via https : something
        // over which we exercise no control.
        var LOADER_BASE_URL =
           'https://google-code-prettify.googlecode.com/svn/loader';
      
        for (var i = 0, n = langs.length; i < n; ++i) (function (lang) {
          var script = doc.createElement("script");
      
          // Excerpted from jQuery.ajaxTransport("script") to fire events when
          // a script is finished loading.
          // Attach handlers for each script
          script.onload = script.onerror = script.onreadystatechange = function () {
            if (script && (
                  !script.readyState || /loaded|complete/.test(script.readyState))) {
              // Handle memory leak in IE
              script.onerror = script.onload = script.onreadystatechange = null;
      
              --pendingLanguages;
              checkPendingLanguages();
      
              // Remove the script
              if (script.parentNode) {
                script.parentNode.removeChild(script);
              }
      
              script = null;
            }
          };
      
          script.type = 'text/javascript';
          script.src = LOADER_BASE_URL
            + '/lang-' + encodeURIComponent(langs[i]) + '.js';
      
          // Circumvent IE6 bugs with base elements (#2709 and #4378) by prepending
          head.insertBefore(script, head.firstChild);
        })(langs[i]);
      
        var pendingLanguages = langs.length;
        function checkPendingLanguages() {
          if (!pendingLanguages) {
            setTimeout(onLangsLoaded, 0);
          }
        }
      
        var skinUrls = [];
        for (var i = 0, n = skins.length; i < n; ++i) {
          skinUrls.push(LOADER_BASE_URL
              + '/skins/' + encodeURIComponent(skins[i]) + '.css');
        }
        skinUrls.push(LOADER_BASE_URL + '/prettify.css');
        loadStylesheetsFallingBack(skinUrls);
      
        var prettyPrint = (function () {
          // Copyright (C) 2006 Google Inc.
          //
          // Licensed under the Apache License, Version 2.0 (the "License");
          // you may not use this file except in compliance with the License.
          // You may obtain a copy of the License at
          //
          //      http://www.apache.org/licenses/LICENSE-2.0
          //
          // Unless required by applicable law or agreed to in writing, software
          // distributed under the License is distributed on an "AS IS" BASIS,
          // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
          // See the License for the specific language governing permissions and
          // limitations under the License.
          
          
          /**
           * @fileoverview
           * some functions for browser-side pretty printing of code contained in html.
           *
           * <p>
           * For a fairly comprehensive set of languages see the
           * <a href="http://google-code-prettify.googlecode.com/svn/trunk/README.html#langs">README</a>
           * file that came with this source.  At a minimum, the lexer should work on a
           * number of languages including C and friends, Java, Python, Bash, SQL, HTML,
           * XML, CSS, Javascript, and Makefiles.  It works passably on Ruby, PHP and Awk
           * and a subset of Perl, but, because of commenting conventions, doesn't work on
           * Smalltalk, Lisp-like, or CAML-like languages without an explicit lang class.
           * <p>
           * Usage: <ol>
           * <li> include this source file in an html page via
           *   {@code <script type="text/javascript" src="/path/to/prettify.js"></script>}
           * <li> define style rules.  See the example page for examples.
           * <li> mark the {@code <pre>} and {@code <code>} tags in your source with
           *    {@code class=prettyprint.}
           *    You can also use the (html deprecated) {@code <xmp>} tag, but the pretty
           *    printer needs to do more substantial DOM manipulations to support that, so
           *    some css styles may not be preserved.
           * </ol>
           * That's it.  I wanted to keep the API as simple as possible, so there's no
           * need to specify which language the code is in, but if you wish, you can add
           * another class to the {@code <pre>} or {@code <code>} element to specify the
           * language, as in {@code <pre class="prettyprint lang-java">}.  Any class that
           * starts with "lang-" followed by a file extension, specifies the file type.
           * See the "lang-*.js" files in this directory for code that implements
           * per-language file handlers.
           * <p>
           * Change log:<br>
           * cbeust, 2006/08/22
           * <blockquote>
           *   Java annotations (start with "@") are now captured as literals ("lit")
           * </blockquote>
           * @requires console
           */
          
          // JSLint declarations
          /*global console, document, navigator, setTimeout, window, define */
          
          /**
           * Split {@code prettyPrint} into multiple timeouts so as not to interfere with
           * UI events.
           * If set to {@code false}, {@code prettyPrint()} is synchronous.
           */
          window['PR_SHOULD_USE_CONTINUATION'] = true;
          
          /**
           * Pretty print a chunk of code.
           * @param {string} sourceCodeHtml The HTML to pretty print.
           * @param {string} opt_langExtension The language name to use.
           *     Typically, a filename extension like 'cpp' or 'java'.
           * @param {number|boolean} opt_numberLines True to number lines,
           *     or the 1-indexed number of the first line in sourceCodeHtml.
           * @return {string} code as html, but prettier
           */
          var prettyPrintOne;
          /**
           * Find all the {@code <pre>} and {@code <code>} tags in the DOM with
           * {@code class=prettyprint} and prettify them.
           *
           * @param {Function} opt_whenDone called when prettifying is done.
           * @param {HTMLElement|HTMLDocument} opt_root an element or document
           *   containing all the elements to pretty print.
           *   Defaults to {@code document.body}.
           */
          var prettyPrint;
          
          
          (function () {
            var win = window;
            // Keyword lists for various languages.
            // We use things that coerce to strings to make them compact when minified
            // and to defeat aggressive optimizers that fold large string constants.
            var FLOW_CONTROL_KEYWORDS = ["break,continue,do,else,for,if,return,while"];
            var C_KEYWORDS = [FLOW_CONTROL_KEYWORDS,"auto,case,char,const,default," + 
                "double,enum,extern,float,goto,inline,int,long,register,short,signed," +
                "sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"];
            var COMMON_KEYWORDS = [C_KEYWORDS,"catch,class,delete,false,import," +
                "new,operator,private,protected,public,this,throw,true,try,typeof"];
            var CPP_KEYWORDS = [COMMON_KEYWORDS,"alignof,align_union,asm,axiom,bool," +
                "concept,concept_map,const_cast,constexpr,decltype,delegate," +
                "dynamic_cast,explicit,export,friend,generic,late_check," +
                "mutable,namespace,nullptr,property,reinterpret_cast,static_assert," +
                "static_cast,template,typeid,typename,using,virtual,where"];
            var JAVA_KEYWORDS = [COMMON_KEYWORDS,
                "abstract,assert,boolean,byte,extends,final,finally,implements,import," +
                "instanceof,interface,null,native,package,strictfp,super,synchronized," +
                "throws,transient"];
            var CSHARP_KEYWORDS = [JAVA_KEYWORDS,
                "as,base,by,checked,decimal,delegate,descending,dynamic,event," +
                "fixed,foreach,from,group,implicit,in,internal,into,is,let," +
                "lock,object,out,override,orderby,params,partial,readonly,ref,sbyte," +
                "sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort," +
                "var,virtual,where"];
            var COFFEE_KEYWORDS = "all,and,by,catch,class,else,extends,false,finally," +
                "for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then," +
                "throw,true,try,unless,until,when,while,yes";
            var JSCRIPT_KEYWORDS = [COMMON_KEYWORDS,
                "debugger,eval,export,function,get,null,set,undefined,var,with," +
                "Infinity,NaN"];
            var PERL_KEYWORDS = "caller,delete,die,do,dump,elsif,eval,exit,foreach,for," +
                "goto,if,import,last,local,my,next,no,our,print,package,redo,require," +
                "sub,undef,unless,until,use,wantarray,while,BEGIN,END";
            var PYTHON_KEYWORDS = [FLOW_CONTROL_KEYWORDS, "and,as,assert,class,def,del," +
                "elif,except,exec,finally,from,global,import,in,is,lambda," +
                "nonlocal,not,or,pass,print,raise,try,with,yield," +
                "False,True,None"];
            var RUBY_KEYWORDS = [FLOW_CONTROL_KEYWORDS, "alias,and,begin,case,class," +
                "def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo," +
                "rescue,retry,self,super,then,true,undef,unless,until,when,yield," +
                "BEGIN,END"];
             var RUST_KEYWORDS = [FLOW_CONTROL_KEYWORDS, "as,assert,const,copy,drop," +
                "enum,extern,fail,false,fn,impl,let,log,loop,match,mod,move,mut,priv," +
                "pub,pure,ref,self,static,struct,true,trait,type,unsafe,use"];
            var SH_KEYWORDS = [FLOW_CONTROL_KEYWORDS, "case,done,elif,esac,eval,fi," +
                "function,in,local,set,then,until"];
            var ALL_KEYWORDS = [
                CPP_KEYWORDS, CSHARP_KEYWORDS, JSCRIPT_KEYWORDS, PERL_KEYWORDS,
                PYTHON_KEYWORDS, RUBY_KEYWORDS, SH_KEYWORDS];
            var C_TYPES = /^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)\b/;
          
            // token style names.  correspond to css classes
            /**
             * token style for a string literal
             * @const
             */
            var PR_STRING = 'str';
            /**
             * token style for a keyword
             * @const
             */
            var PR_KEYWORD = 'kwd';
            /**
             * token style for a comment
             * @const
             */
            var PR_COMMENT = 'com';
            /**
             * token style for a type
             * @const
             */
            var PR_TYPE = 'typ';
            /**
             * token style for a literal value.  e.g. 1, null, true.
             * @const
             */
            var PR_LITERAL = 'lit';
            /**
             * token style for a punctuation string.
             * @const
             */
            var PR_PUNCTUATION = 'pun';
            /**
             * token style for plain text.
             * @const
             */
            var PR_PLAIN = 'pln';
          
            /**
             * token style for an sgml tag.
             * @const
             */
            var PR_TAG = 'tag';
            /**
             * token style for a markup declaration such as a DOCTYPE.
             * @const
             */
            var PR_DECLARATION = 'dec';
            /**
             * token style for embedded source.
             * @const
             */
            var PR_SOURCE = 'src';
            /**
             * token style for an sgml attribute name.
             * @const
             */
            var PR_ATTRIB_NAME = 'atn';
            /**
             * token style for an sgml attribute value.
             * @const
             */
            var PR_ATTRIB_VALUE = 'atv';
          
            /**
             * A class that indicates a section of markup that is not code, e.g. to allow
             * embedding of line numbers within code listings.
             * @const
             */
            var PR_NOCODE = 'nocode';
          
            
            
            /**
             * A set of tokens that can precede a regular expression literal in
             * javascript
             * http://web.archive.org/web/20070717142515/http://www.mozilla.org/js/language/js20/rationale/syntax.html
             * has the full list, but I've removed ones that might be problematic when
             * seen in languages that don't support regular expression literals.
             *
             * <p>Specifically, I've removed any keywords that can't precede a regexp
             * literal in a syntactically legal javascript program, and I've removed the
             * "in" keyword since it's not a keyword in many languages, and might be used
             * as a count of inches.
             *
             * <p>The link above does not accurately describe EcmaScript rules since
             * it fails to distinguish between (a=++/b/i) and (a++/b/i) but it works
             * very well in practice.
             *
             * @private
             * @const
             */
            var REGEXP_PRECEDER_PATTERN = '(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*';
            
            // CAVEAT: this does not properly handle the case where a regular
            // expression immediately follows another since a regular expression may
            // have flags for case-sensitivity and the like.  Having regexp tokens
            // adjacent is not valid in any language I'm aware of, so I'm punting.
            // TODO: maybe style special characters inside a regexp as punctuation.
          
            /**
             * Given a group of {@link RegExp}s, returns a {@code RegExp} that globally
             * matches the union of the sets of strings matched by the input RegExp.
             * Since it matches globally, if the input strings have a start-of-input
             * anchor (/^.../), it is ignored for the purposes of unioning.
             * @param {Array.<RegExp>} regexs non multiline, non-global regexs.
             * @return {RegExp} a global regex.
             */
            function combinePrefixPatterns(regexs) {
              var capturedGroupIndex = 0;
            
              var needToFoldCase = false;
              var ignoreCase = false;
              for (var i = 0, n = regexs.length; i < n; ++i) {
                var regex = regexs[i];
                if (regex.ignoreCase) {
                  ignoreCase = true;
                } else if (/[a-z]/i.test(regex.source.replace(
                               /\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi, ''))) {
                  needToFoldCase = true;
                  ignoreCase = false;
                  break;
                }
              }
            
              var escapeCharToCodeUnit = {
                'b': 8,
                't': 9,
                'n': 0xa,
                'v': 0xb,
                'f': 0xc,
                'r': 0xd
              };
            
              function decodeEscape(charsetPart) {
                var cc0 = charsetPart.charCodeAt(0);
                if (cc0 !== 92 /* \\ */) {
                  return cc0;
                }
                var c1 = charsetPart.charAt(1);
                cc0 = escapeCharToCodeUnit[c1];
                if (cc0) {
                  return cc0;
                } else if ('0' <= c1 && c1 <= '7') {
                  return parseInt(charsetPart.substring(1), 8);
                } else if (c1 === 'u' || c1 === 'x') {
                  return parseInt(charsetPart.substring(2), 16);
                } else {
                  return charsetPart.charCodeAt(1);
                }
              }
            
              function encodeEscape(charCode) {
                if (charCode < 0x20) {
                  return (charCode < 0x10 ? '\\x0' : '\\x') + charCode.toString(16);
                }
                var ch = String.fromCharCode(charCode);
                return (ch === '\\' || ch === '-' || ch === ']' || ch === '^')
                    ? "\\" + ch : ch;
              }
            
              function caseFoldCharset(charSet) {
                var charsetParts = charSet.substring(1, charSet.length - 1).match(
                    new RegExp(
                        '\\\\u[0-9A-Fa-f]{4}'
                        + '|\\\\x[0-9A-Fa-f]{2}'
                        + '|\\\\[0-3][0-7]{0,2}'
                        + '|\\\\[0-7]{1,2}'
                        + '|\\\\[\\s\\S]'
                        + '|-'
                        + '|[^-\\\\]',
                        'g'));
                var ranges = [];
                var inverse = charsetParts[0] === '^';
            
                var out = ['['];
                if (inverse) { out.push('^'); }
            
                for (var i = inverse ? 1 : 0, n = charsetParts.length; i < n; ++i) {
                  var p = charsetParts[i];
                  if (/\\[bdsw]/i.test(p)) {  // Don't muck with named groups.
                    out.push(p);
                  } else {
                    var start = decodeEscape(p);
                    var end;
                    if (i + 2 < n && '-' === charsetParts[i + 1]) {
                      end = decodeEscape(charsetParts[i + 2]);
                      i += 2;
                    } else {
                      end = start;
                    }
                    ranges.push([start, end]);
                    // If the range might intersect letters, then expand it.
                    // This case handling is too simplistic.
                    // It does not deal with non-latin case folding.
                    // It works for latin source code identifiers though.
                    if (!(end < 65 || start > 122)) {
                      if (!(end < 65 || start > 90)) {
                        ranges.push([Math.max(65, start) | 32, Math.min(end, 90) | 32]);
                      }
                      if (!(end < 97 || start > 122)) {
                        ranges.push([Math.max(97, start) & ~32, Math.min(end, 122) & ~32]);
                      }
                    }
                  }
                }
            
                // [[1, 10], [3, 4], [8, 12], [14, 14], [16, 16], [17, 17]]
                // -> [[1, 12], [14, 14], [16, 17]]
                ranges.sort(function (a, b) { return (a[0] - b[0]) || (b[1]  - a[1]); });
                var consolidatedRanges = [];
                var lastRange = [];
                for (var i = 0; i < ranges.length; ++i) {
                  var range = ranges[i];
                  if (range[0] <= lastRange[1] + 1) {
                    lastRange[1] = Math.max(lastRange[1], range[1]);
                  } else {
                    consolidatedRanges.push(lastRange = range);
                  }
                }
            
                for (var i = 0; i < consolidatedRanges.length; ++i) {
                  var range = consolidatedRanges[i];
                  out.push(encodeEscape(range[0]));
                  if (range[1] > range[0]) {
                    if (range[1] + 1 > range[0]) { out.push('-'); }
                    out.push(encodeEscape(range[1]));
                  }
                }
                out.push(']');
                return out.join('');
              }
            
              function allowAnywhereFoldCaseAndRenumberGroups(regex) {
                // Split into character sets, escape sequences, punctuation strings
                // like ('(', '(?:', ')', '^'), and runs of characters that do not
                // include any of the above.
                var parts = regex.source.match(
                    new RegExp(
                        '(?:'
                        + '\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]'  // a character set
                        + '|\\\\u[A-Fa-f0-9]{4}'  // a unicode escape
                        + '|\\\\x[A-Fa-f0-9]{2}'  // a hex escape
                        + '|\\\\[0-9]+'  // a back-reference or octal escape
                        + '|\\\\[^ux0-9]'  // other escape sequence
                        + '|\\(\\?[:!=]'  // start of a non-capturing group
                        + '|[\\(\\)\\^]'  // start/end of a group, or line start
                        + '|[^\\x5B\\x5C\\(\\)\\^]+'  // run of other characters
                        + ')',
                        'g'));
                var n = parts.length;
            
                // Maps captured group numbers to the number they will occupy in
                // the output or to -1 if that has not been determined, or to
                // undefined if they need not be capturing in the output.
                var capturedGroups = [];
            
                // Walk over and identify back references to build the capturedGroups
                // mapping.
                for (var i = 0, groupIndex = 0; i < n; ++i) {
                  var p = parts[i];
                  if (p === '(') {
                    // groups are 1-indexed, so max group index is count of '('
                    ++groupIndex;
                  } else if ('\\' === p.charAt(0)) {
                    var decimalValue = +p.substring(1);
                    if (decimalValue) {
                      if (decimalValue <= groupIndex) {
                        capturedGroups[decimalValue] = -1;
                      } else {
                        // Replace with an unambiguous escape sequence so that
                        // an octal escape sequence does not turn into a backreference
                        // to a capturing group from an earlier regex.
                        parts[i] = encodeEscape(decimalValue);
                      }
                    }
                  }
                }
            
                // Renumber groups and reduce capturing groups to non-capturing groups
                // where possible.
                for (var i = 1; i < capturedGroups.length; ++i) {
                  if (-1 === capturedGroups[i]) {
                    capturedGroups[i] = ++capturedGroupIndex;
                  }
                }
                for (var i = 0, groupIndex = 0; i < n; ++i) {
                  var p = parts[i];
                  if (p === '(') {
                    ++groupIndex;
                    if (!capturedGroups[groupIndex]) {
                      parts[i] = '(?:';
                    }
                  } else if ('\\' === p.charAt(0)) {
                    var decimalValue = +p.substring(1);
                    if (decimalValue && decimalValue <= groupIndex) {
                      parts[i] = '\\' + capturedGroups[decimalValue];
                    }
                  }
                }
            
                // Remove any prefix anchors so that the output will match anywhere.
                // ^^ really does mean an anchored match though.
                for (var i = 0; i < n; ++i) {
                  if ('^' === parts[i] && '^' !== parts[i + 1]) { parts[i] = ''; }
                }
            
                // Expand letters to groups to handle mixing of case-sensitive and
                // case-insensitive patterns if necessary.
                if (regex.ignoreCase && needToFoldCase) {
                  for (var i = 0; i < n; ++i) {
                    var p = parts[i];
                    var ch0 = p.charAt(0);
                    if (p.length >= 2 && ch0 === '[') {
                      parts[i] = caseFoldCharset(p);
                    } else if (ch0 !== '\\') {
                      // TODO: handle letters in numeric escapes.
                      parts[i] = p.replace(
                          /[a-zA-Z]/g,
                          function (ch) {
                            var cc = ch.charCodeAt(0);
                            return '[' + String.fromCharCode(cc & ~32, cc | 32) + ']';
                          });
                    }
                  }
                }
            
                return parts.join('');
              }
            
              var rewritten = [];
              for (var i = 0, n = regexs.length; i < n; ++i) {
                var regex = regexs[i];
                if (regex.global || regex.multiline) { throw new Error('' + regex); }
                rewritten.push(
                    '(?:' + allowAnywhereFoldCaseAndRenumberGroups(regex) + ')');
              }
            
              return new RegExp(rewritten.join('|'), ignoreCase ? 'gi' : 'g');
            }
          
            /**
             * Split markup into a string of source code and an array mapping ranges in
             * that string to the text nodes in which they appear.
             *
             * <p>
             * The HTML DOM structure:</p>
             * <pre>
             * (Element   "p"
             *   (Element "b"
             *     (Text  "print "))       ; #1
             *   (Text    "'Hello '")      ; #2
             *   (Element "br")            ; #3
             *   (Text    "  + 'World';")) ; #4
             * </pre>
             * <p>
             * corresponds to the HTML
             * {@code <p><b>print </b>'Hello '<br>  + 'World';</p>}.</p>
             *
             * <p>
             * It will produce the output:</p>
             * <pre>
             * {
             *   sourceCode: "print 'Hello '\n  + 'World';",
             *   //                     1          2
             *   //           012345678901234 5678901234567
             *   spans: [0, #1, 6, #2, 14, #3, 15, #4]
             * }
             * </pre>
             * <p>
             * where #1 is a reference to the {@code "print "} text node above, and so
             * on for the other text nodes.
             * </p>
             *
             * <p>
             * The {@code} spans array is an array of pairs.  Even elements are the start
             * indices of substrings, and odd elements are the text nodes (or BR elements)
             * that contain the text for those substrings.
             * Substrings continue until the next index or the end of the source.
             * </p>
             *
             * @param {Node} node an HTML DOM subtree containing source-code.
             * @param {boolean} isPreformatted true if white-space in text nodes should
             *    be considered significant.
             * @return {Object} source code and the text nodes in which they occur.
             */
            function extractSourceSpans(node, isPreformatted) {
              var nocode = /(?:^|\s)nocode(?:\s|$)/;
            
              var chunks = [];
              var length = 0;
              var spans = [];
              var k = 0;
            
              function walk(node) {
                var type = node.nodeType;
                if (type == 1) {  // Element
                  if (nocode.test(node.className)) { return; }
                  for (var child = node.firstChild; child; child = child.nextSibling) {
                    walk(child);
                  }
                  var nodeName = node.nodeName.toLowerCase();
                  if ('br' === nodeName || 'li' === nodeName) {
                    chunks[k] = '\n';
                    spans[k << 1] = length++;
                    spans[(k++ << 1) | 1] = node;
                  }
                } else if (type == 3 || type == 4) {  // Text
                  var text = node.nodeValue;
                  if (text.length) {
                    if (!isPreformatted) {
                      text = text.replace(/[ \t\r\n]+/g, ' ');
                    } else {
                      text = text.replace(/\r\n?/g, '\n');  // Normalize newlines.
                    }
                    // TODO: handle tabs here?
                    chunks[k] = text;
                    spans[k << 1] = length;
                    length += text.length;
                    spans[(k++ << 1) | 1] = node;
                  }
                }
              }
            
              walk(node);
            
              return {
                sourceCode: chunks.join('').replace(/\n$/, ''),
                spans: spans
              };
            }
          
            /**
             * Apply the given language handler to sourceCode and add the resulting
             * decorations to out.
             * @param {number} basePos the index of sourceCode within the chunk of source
             *    whose decorations are already present on out.
             */
            function appendDecorations(basePos, sourceCode, langHandler, out) {
              if (!sourceCode) { return; }
              var job = {
                sourceCode: sourceCode,
                basePos: basePos
              };
              langHandler(job);
              out.push.apply(out, job.decorations);
            }
          
            var notWs = /\S/;
          
            /**
             * Given an element, if it contains only one child element and any text nodes
             * it contains contain only space characters, return the sole child element.
             * Otherwise returns undefined.
             * <p>
             * This is meant to return the CODE element in {@code <pre><code ...>} when
             * there is a single child element that contains all the non-space textual
             * content, but not to return anything where there are multiple child elements
             * as in {@code <pre><code>...</code><code>...</code></pre>} or when there
             * is textual content.
             */
            function childContentWrapper(element) {
              var wrapper = undefined;
              for (var c = element.firstChild; c; c = c.nextSibling) {
                var type = c.nodeType;
                wrapper = (type === 1)  // Element Node
                    ? (wrapper ? element : c)
                    : (type === 3)  // Text Node
                    ? (notWs.test(c.nodeValue) ? element : wrapper)
                    : wrapper;
              }
              return wrapper === element ? undefined : wrapper;
            }
          
            /** Given triples of [style, pattern, context] returns a lexing function,
              * The lexing function interprets the patterns to find token boundaries and
              * returns a decoration list of the form
              * [index_0, style_0, index_1, style_1, ..., index_n, style_n]
              * where index_n is an index into the sourceCode, and style_n is a style
              * constant like PR_PLAIN.  index_n-1 <= index_n, and style_n-1 applies to
              * all characters in sourceCode[index_n-1:index_n].
              *
              * The stylePatterns is a list whose elements have the form
              * [style : string, pattern : RegExp, DEPRECATED, shortcut : string].
              *
              * Style is a style constant like PR_PLAIN, or can be a string of the
              * form 'lang-FOO', where FOO is a language extension describing the
              * language of the portion of the token in $1 after pattern executes.
              * E.g., if style is 'lang-lisp', and group 1 contains the text
              * '(hello (world))', then that portion of the token will be passed to the
              * registered lisp handler for formatting.
              * The text before and after group 1 will be restyled using this decorator
              * so decorators should take care that this doesn't result in infinite
              * recursion.  For example, the HTML lexer rule for SCRIPT elements looks
              * something like ['lang-js', /<[s]cript>(.+?)<\/script>/].  This may match
              * '<script>foo()<\/script>', which would cause the current decorator to
              * be called with '<script>' which would not match the same rule since
              * group 1 must not be empty, so it would be instead styled as PR_TAG by
              * the generic tag rule.  The handler registered for the 'js' extension would
              * then be called with 'foo()', and finally, the current decorator would
              * be called with '<\/script>' which would not match the original rule and
              * so the generic tag rule would identify it as a tag.
              *
              * Pattern must only match prefixes, and if it matches a prefix, then that
              * match is considered a token with the same style.
              *
              * Context is applied to the last non-whitespace, non-comment token
              * recognized.
              *
              * Shortcut is an optional string of characters, any of which, if the first
              * character, gurantee that this pattern and only this pattern matches.
              *
              * @param {Array} shortcutStylePatterns patterns that always start with
              *   a known character.  Must have a shortcut string.
              * @param {Array} fallthroughStylePatterns patterns that will be tried in
              *   order if the shortcut ones fail.  May have shortcuts.
              *
              * @return {function (Object)} a
              *   function that takes source code and returns a list of decorations.
              */
            function createSimpleLexer(shortcutStylePatterns, fallthroughStylePatterns) {
              var shortcuts = {};
              var tokenizer;
              (function () {
                var allPatterns = shortcutStylePatterns.concat(fallthroughStylePatterns);
                var allRegexs = [];
                var regexKeys = {};
                for (var i = 0, n = allPatterns.length; i < n; ++i) {
                  var patternParts = allPatterns[i];
                  var shortcutChars = patternParts[3];
                  if (shortcutChars) {
                    for (var c = shortcutChars.length; --c >= 0;) {
                      shortcuts[shortcutChars.charAt(c)] = patternParts;
                    }
                  }
                  var regex = patternParts[1];
                  var k = '' + regex;
                  if (!regexKeys.hasOwnProperty(k)) {
                    allRegexs.push(regex);
                    regexKeys[k] = null;
                  }
                }
                allRegexs.push(/[\0-\uffff]/);
                tokenizer = combinePrefixPatterns(allRegexs);
              })();
          
              var nPatterns = fallthroughStylePatterns.length;
          
              /**
               * Lexes job.sourceCode and produces an output array job.decorations of
               * style classes preceded by the position at which they start in
               * job.sourceCode in order.
               *
               * @param {Object} job an object like <pre>{
               *    sourceCode: {string} sourceText plain text,
               *    basePos: {int} position of job.sourceCode in the larger chunk of
               *        sourceCode.
               * }</pre>
               */
              var decorate = function (job) {
                var sourceCode = job.sourceCode, basePos = job.basePos;
                /** Even entries are positions in source in ascending order.  Odd enties
                  * are style markers (e.g., PR_COMMENT) that run from that position until
                  * the end.
                  * @type {Array.<number|string>}
                  */
                var decorations = [basePos, PR_PLAIN];
                var pos = 0;  // index into sourceCode
                var tokens = sourceCode.match(tokenizer) || [];
                var styleCache = {};
          
                for (var ti = 0, nTokens = tokens.length; ti < nTokens; ++ti) {
                  var token = tokens[ti];
                  var style = styleCache[token];
                  var match = void 0;
          
                  var isEmbedded;
                  if (typeof style === 'string') {
                    isEmbedded = false;
                  } else {
                    var patternParts = shortcuts[token.charAt(0)];
                    if (patternParts) {
                      match = token.match(patternParts[1]);
                      style = patternParts[0];
                    } else {
                      for (var i = 0; i < nPatterns; ++i) {
                        patternParts = fallthroughStylePatterns[i];
                        match = token.match(patternParts[1]);
                        if (match) {
                          style = patternParts[0];
                          break;
                        }
                      }
          
                      if (!match) {  // make sure that we make progress
                        style = PR_PLAIN;
                      }
                    }
          
                    isEmbedded = style.length >= 5 && 'lang-' === style.substring(0, 5);
                    if (isEmbedded && !(match && typeof match[1] === 'string')) {
                      isEmbedded = false;
                      style = PR_SOURCE;
                    }
          
                    if (!isEmbedded) { styleCache[token] = style; }
                  }
          
                  var tokenStart = pos;
                  pos += token.length;
          
                  if (!isEmbedded) {
                    decorations.push(basePos + tokenStart, style);
                  } else {  // Treat group 1 as an embedded block of source code.
                    var embeddedSource = match[1];
                    var embeddedSourceStart = token.indexOf(embeddedSource);
                    var embeddedSourceEnd = embeddedSourceStart + embeddedSource.length;
                    if (match[2]) {
                      // If embeddedSource can be blank, then it would match at the
                      // beginning which would cause us to infinitely recurse on the
                      // entire token, so we catch the right context in match[2].
                      embeddedSourceEnd = token.length - match[2].length;
                      embeddedSourceStart = embeddedSourceEnd - embeddedSource.length;
                    }
                    var lang = style.substring(5);
                    // Decorate the left of the embedded source
                    appendDecorations(
                        basePos + tokenStart,
                        token.substring(0, embeddedSourceStart),
                        decorate, decorations);
                    // Decorate the embedded source
                    appendDecorations(
                        basePos + tokenStart + embeddedSourceStart,
                        embeddedSource,
                        langHandlerForExtension(lang, embeddedSource),
                        decorations);
                    // Decorate the right of the embedded section
                    appendDecorations(
                        basePos + tokenStart + embeddedSourceEnd,
                        token.substring(embeddedSourceEnd),
                        decorate, decorations);
                  }
                }
                job.decorations = decorations;
              };
              return decorate;
            }
          
            /** returns a function that produces a list of decorations from source text.
              *
              * This code treats ", ', and ` as string delimiters, and \ as a string
              * escape.  It does not recognize perl's qq() style strings.
              * It has no special handling for double delimiter escapes as in basic, or
              * the tripled delimiters used in python, but should work on those regardless
              * although in those cases a single string literal may be broken up into
              * multiple adjacent string literals.
              *
              * It recognizes C, C++, and shell style comments.
              *
              * @param {Object} options a set of optional parameters.
              * @return {function (Object)} a function that examines the source code
              *     in the input job and builds the decoration list.
              */
            function sourceDecorator(options) {
              var shortcutStylePatterns = [], fallthroughStylePatterns = [];
              if (options['tripleQuotedStrings']) {
                // '''multi-line-string''', 'single-line-string', and double-quoted
                shortcutStylePatterns.push(
                    [PR_STRING,  /^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,
                     null, '\'"']);
              } else if (options['multiLineStrings']) {
                // 'multi-line-string', "multi-line-string"
                shortcutStylePatterns.push(
                    [PR_STRING,  /^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,
                     null, '\'"`']);
              } else {
                // 'single-line-string', "single-line-string"
                shortcutStylePatterns.push(
                    [PR_STRING,
                     /^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,
                     null, '"\'']);
              }
              if (options['verbatimStrings']) {
                // verbatim-string-literal production from the C# grammar.  See issue 93.
                fallthroughStylePatterns.push(
                    [PR_STRING, /^@\"(?:[^\"]|\"\")*(?:\"|$)/, null]);
              }
              var hc = options['hashComments'];
              if (hc) {
                if (options['cStyleComments']) {
                  if (hc > 1) {  // multiline hash comments
                    shortcutStylePatterns.push(
                        [PR_COMMENT, /^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/, null, '#']);
                  } else {
                    // Stop C preprocessor declarations at an unclosed open comment
                    shortcutStylePatterns.push(
                        [PR_COMMENT, /^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,
                         null, '#']);
                  }
                  // #include <stdio.h>
                  fallthroughStylePatterns.push(
                      [PR_STRING,
                       /^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,
                       null]);
                } else {
                  shortcutStylePatterns.push([PR_COMMENT, /^#[^\r\n]*/, null, '#']);
                }
              }
              if (options['cStyleComments']) {
                fallthroughStylePatterns.push([PR_COMMENT, /^\/\/[^\r\n]*/, null]);
                fallthroughStylePatterns.push(
                    [PR_COMMENT, /^\/\*[\s\S]*?(?:\*\/|$)/, null]);
              }
              var regexLiterals = options['regexLiterals'];
              if (regexLiterals) {
                /**
                 * @const
                 */
                var regexExcls = regexLiterals > 1
                  ? ''  // Multiline regex literals
                  : '\n\r';
                /**
                 * @const
                 */
                var regexAny = regexExcls ? '.' : '[\\S\\s]';
                /**
                 * @const
                 */
                var REGEX_LITERAL = (
                    // A regular expression literal starts with a slash that is
                    // not followed by * or / so that it is not confused with
                    // comments.
                    '/(?=[^/*' + regexExcls + '])'
                    // and then contains any number of raw characters,
                    + '(?:[^/\\x5B\\x5C' + regexExcls + ']'
                    // escape sequences (\x5C),
                    +    '|\\x5C' + regexAny
                    // or non-nesting character sets (\x5B\x5D);
                    +    '|\\x5B(?:[^\\x5C\\x5D' + regexExcls + ']'
                    +             '|\\x5C' + regexAny + ')*(?:\\x5D|$))+'
                    // finally closed by a /.
                    + '/');
                fallthroughStylePatterns.push(
                    ['lang-regex',
                     RegExp('^' + REGEXP_PRECEDER_PATTERN + '(' + REGEX_LITERAL + ')')
                     ]);
              }
          
              var types = options['types'];
              if (types) {
                fallthroughStylePatterns.push([PR_TYPE, types]);
              }
          
              var keywords = ("" + options['keywords']).replace(/^ | $/g, '');
              if (keywords.length) {
                fallthroughStylePatterns.push(
                    [PR_KEYWORD,
                     new RegExp('^(?:' + keywords.replace(/[\s,]+/g, '|') + ')\\b'),
                     null]);
              }
          
              shortcutStylePatterns.push([PR_PLAIN,       /^\s+/, null, ' \r\n\t\xA0']);
          
              var punctuation =
                // The Bash man page says
          
                // A word is a sequence of characters considered as a single
                // unit by GRUB. Words are separated by metacharacters,
                // which are the following plus space, tab, and newline: { }
                // | & $ ; < >
                // ...
                
                // A word beginning with # causes that word and all remaining
                // characters on that line to be ignored.
          
                // which means that only a '#' after /(?:^|[{}|&$;<>\s])/ starts a
                // comment but empirically
                // $ echo {#}
                // {#}
                // $ echo \$#
                // $#
                // $ echo }#
                // }#
          
                // so /(?:^|[|&;<>\s])/ is more appropriate.
          
                // http://gcc.gnu.org/onlinedocs/gcc-2.95.3/cpp_1.html#SEC3
                // suggests that this definition is compatible with a
                // default mode that tries to use a single token definition
                // to recognize both bash/python style comments and C
                // preprocessor directives.
          
                // This definition of punctuation does not include # in the list of
                // follow-on exclusions, so # will not be broken before if preceeded
                // by a punctuation character.  We could try to exclude # after
                // [|&;<>] but that doesn't seem to cause many major problems.
                // If that does turn out to be a problem, we should change the below
                // when hc is truthy to include # in the run of punctuation characters
                // only when not followint [|&;<>].
                '^.[^\\s\\w.$@\'"`/\\\\]*';
              if (options['regexLiterals']) {
                punctuation += '(?!\s*\/)';
              }
          
              fallthroughStylePatterns.push(
                  // TODO(mikesamuel): recognize non-latin letters and numerals in idents
                  [PR_LITERAL,     /^@[a-z_$][a-z_$@0-9]*/i, null],
                  [PR_TYPE,        /^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/, null],
                  [PR_PLAIN,       /^[a-z_$][a-z_$@0-9]*/i, null],
                  [PR_LITERAL,
                   new RegExp(
                       '^(?:'
                       // A hex number
                       + '0x[a-f0-9]+'
                       // or an octal or decimal number,
                       + '|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)'
                       // possibly in scientific notation
                       + '(?:e[+\\-]?\\d+)?'
                       + ')'
                       // with an optional modifier like UL for unsigned long
                       + '[a-z]*', 'i'),
                   null, '0123456789'],
                  // Don't treat escaped quotes in bash as starting strings.
                  // See issue 144.
                  [PR_PLAIN,       /^\\[\s\S]?/, null],
                  [PR_PUNCTUATION, new RegExp(punctuation), null]);
          
              return createSimpleLexer(shortcutStylePatterns, fallthroughStylePatterns);
            }
          
            var decorateSource = sourceDecorator({
                  'keywords': ALL_KEYWORDS,
                  'hashComments': true,
                  'cStyleComments': true,
                  'multiLineStrings': true,
                  'regexLiterals': true
                });
          
            /**
             * Given a DOM subtree, wraps it in a list, and puts each line into its own
             * list item.
             *
             * @param {Node} node modified in place.  Its content is pulled into an
             *     HTMLOListElement, and each line is moved into a separate list item.
             *     This requires cloning elements, so the input might not have unique
             *     IDs after numbering.
             * @param {boolean} isPreformatted true iff white-space in text nodes should
             *     be treated as significant.
             */
            function numberLines(node, opt_startLineNum, isPreformatted) {
              var nocode = /(?:^|\s)nocode(?:\s|$)/;
              var lineBreak = /\r\n?|\n/;
            
              var document = node.ownerDocument;
            
              var li = document.createElement('li');
              while (node.firstChild) {
                li.appendChild(node.firstChild);
              }
              // An array of lines.  We split below, so this is initialized to one
              // un-split line.
              var listItems = [li];
            
              function walk(node) {
                var type = node.nodeType;
                if (type == 1 && !nocode.test(node.className)) {  // Element
                  if ('br' === node.nodeName) {
                    breakAfter(node);
                    // Discard the <BR> since it is now flush against a </LI>.
                    if (node.parentNode) {
                      node.parentNode.removeChild(node);
                    }
                  } else {
                    for (var child = node.firstChild; child; child = child.nextSibling) {
                      walk(child);
                    }
                  }
                } else if ((type == 3 || type == 4) && isPreformatted) {  // Text
                  var text = node.nodeValue;
                  var match = text.match(lineBreak);
                  if (match) {
                    var firstLine = text.substring(0, match.index);
                    node.nodeValue = firstLine;
                    var tail = text.substring(match.index + match[0].length);
                    if (tail) {
                      var parent = node.parentNode;
                      parent.insertBefore(
                        document.createTextNode(tail), node.nextSibling);
                    }
                    breakAfter(node);
                    if (!firstLine) {
                      // Don't leave blank text nodes in the DOM.
                      node.parentNode.removeChild(node);
                    }
                  }
                }
              }
            
              // Split a line after the given node.
              function breakAfter(lineEndNode) {
                // If there's nothing to the right, then we can skip ending the line
                // here, and move root-wards since splitting just before an end-tag
                // would require us to create a bunch of empty copies.
                while (!lineEndNode.nextSibling) {
                  lineEndNode = lineEndNode.parentNode;
                  if (!lineEndNode) { return; }
                }
            
                function breakLeftOf(limit, copy) {
                  // Clone shallowly if this node needs to be on both sides of the break.
                  var rightSide = copy ? limit.cloneNode(false) : limit;
                  var parent = limit.parentNode;
                  if (parent) {
                    // We clone the parent chain.
                    // This helps us resurrect important styling elements that cross lines.
                    // E.g. in <i>Foo<br>Bar</i>
                    // should be rewritten to <li><i>Foo</i></li><li><i>Bar</i></li>.
                    var parentClone = breakLeftOf(parent, 1);
                    // Move the clone and everything to the right of the original
                    // onto the cloned parent.
                    var next = limit.nextSibling;
                    parentClone.appendChild(rightSide);
                    for (var sibling = next; sibling; sibling = next) {
                      next = sibling.nextSibling;
                      parentClone.appendChild(sibling);
                    }
                  }
                  return rightSide;
                }
            
                var copiedListItem = breakLeftOf(lineEndNode.nextSibling, 0);
            
                // Walk the parent chain until we reach an unattached LI.
                for (var parent;
                     // Check nodeType since IE invents document fragments.
                     (parent = copiedListItem.parentNode) && parent.nodeType === 1;) {
                  copiedListItem = parent;
                }
                // Put it on the list of lines for later processing.
                listItems.push(copiedListItem);
              }
            
              // Split lines while there are lines left to split.
              for (var i = 0;  // Number of lines that have been split so far.
                   i < listItems.length;  // length updated by breakAfter calls.
                   ++i) {
                walk(listItems[i]);
              }
            
              // Make sure numeric indices show correctly.
              if (opt_startLineNum === (opt_startLineNum|0)) {
                listItems[0].setAttribute('value', opt_startLineNum);
              }
            
              var ol = document.createElement('ol');
              ol.className = 'linenums';
              var offset = Math.max(0, ((opt_startLineNum - 1 /* zero index */)) | 0) || 0;
              for (var i = 0, n = listItems.length; i < n; ++i) {
                li = listItems[i];
                // Stick a class on the LIs so that stylesheets can
                // color odd/even rows, or any other row pattern that
                // is co-prime with 10.
                li.className = 'L' + ((i + offset) % 10);
                if (!li.firstChild) {
                  li.appendChild(document.createTextNode('\xA0'));
                }
                ol.appendChild(li);
              }
            
              node.appendChild(ol);
            }    
            /**
             * Breaks {@code job.sourceCode} around style boundaries in
             * {@code job.decorations} and modifies {@code job.sourceNode} in place.
             * @param {Object} job like <pre>{
             *    sourceCode: {string} source as plain text,
             *    sourceNode: {HTMLElement} the element containing the source,
             *    spans: {Array.<number|Node>} alternating span start indices into source
             *       and the text node or element (e.g. {@code <BR>}) corresponding to that
             *       span.
             *    decorations: {Array.<number|string} an array of style classes preceded
             *       by the position at which they start in job.sourceCode in order
             * }</pre>
             * @private
             */
            function recombineTagsAndDecorations(job) {
              var isIE8OrEarlier = /\bMSIE\s(\d+)/.exec(navigator.userAgent);
              isIE8OrEarlier = isIE8OrEarlier && +isIE8OrEarlier[1] <= 8;
              var newlineRe = /\n/g;
            
              var source = job.sourceCode;
              var sourceLength = source.length;
              // Index into source after the last code-unit recombined.
              var sourceIndex = 0;
            
              var spans = job.spans;
              var nSpans = spans.length;
              // Index into spans after the last span which ends at or before sourceIndex.
              var spanIndex = 0;
            
              var decorations = job.decorations;
              var nDecorations = decorations.length;
              // Index into decorations after the last decoration which ends at or before
              // sourceIndex.
              var decorationIndex = 0;
            
              // Remove all zero-length decorations.
              decorations[nDecorations] = sourceLength;
              var decPos, i;
              for (i = decPos = 0; i < nDecorations;) {
                if (decorations[i] !== decorations[i + 2]) {
                  decorations[decPos++] = decorations[i++];
                  decorations[decPos++] = decorations[i++];
                } else {
                  i += 2;
                }
              }
              nDecorations = decPos;
            
              // Simplify decorations.
              for (i = decPos = 0; i < nDecorations;) {
                var startPos = decorations[i];
                // Conflate all adjacent decorations that use the same style.
                var startDec = decorations[i + 1];
                var end = i + 2;
                while (end + 2 <= nDecorations && decorations[end + 1] === startDec) {
                  end += 2;
                }
                decorations[decPos++] = startPos;
                decorations[decPos++] = startDec;
                i = end;
              }
            
              nDecorations = decorations.length = decPos;
            
              var sourceNode = job.sourceNode;
              var oldDisplay;
              if (sourceNode) {
                oldDisplay = sourceNode.style.display;
                sourceNode.style.display = 'none';
              }
              try {
                var decoration = null;
                while (spanIndex < nSpans) {
                  var spanStart = spans[spanIndex];
                  var spanEnd = spans[spanIndex + 2] || sourceLength;
            
                  var decEnd = decorations[decorationIndex + 2] || sourceLength;
            
                  var end = Math.min(spanEnd, decEnd);
            
                  var textNode = spans[spanIndex + 1];
                  var styledText;
                  if (textNode.nodeType !== 1  // Don't muck with <BR>s or <LI>s
                      // Don't introduce spans around empty text nodes.
                      && (styledText = source.substring(sourceIndex, end))) {
                    // This may seem bizarre, and it is.  Emitting LF on IE causes the
                    // code to display with spaces instead of line breaks.
                    // Emitting Windows standard issue linebreaks (CRLF) causes a blank
                    // space to appear at the beginning of every line but the first.
                    // Emitting an old Mac OS 9 line separator makes everything spiffy.
                    if (isIE8OrEarlier) {
                      styledText = styledText.replace(newlineRe, '\r');
                    }
                    textNode.nodeValue = styledText;
                    var document = textNode.ownerDocument;
                    var span = document.createElement('span');
                    span.className = decorations[decorationIndex + 1];
                    var parentNode = textNode.parentNode;
                    parentNode.replaceChild(span, textNode);
                    span.appendChild(textNode);
                    if (sourceIndex < spanEnd) {  // Split off a text node.
                      spans[spanIndex + 1] = textNode
                          // TODO: Possibly optimize by using '' if there's no flicker.
                          = document.createTextNode(source.substring(end, spanEnd));
                      parentNode.insertBefore(textNode, span.nextSibling);
                    }
                  }
            
                  sourceIndex = end;
            
                  if (sourceIndex >= spanEnd) {
                    spanIndex += 2;
                  }
                  if (sourceIndex >= decEnd) {
                    decorationIndex += 2;
                  }
                }
              } finally {
                if (sourceNode) {
                  sourceNode.style.display = oldDisplay;
                }
              }
            }
          
            /** Maps language-specific file extensions to handlers. */
            var langHandlerRegistry = {};
            /** Register a language handler for the given file extensions.
              * @param {function (Object)} handler a function from source code to a list
              *      of decorations.  Takes a single argument job which describes the
              *      state of the computation.   The single parameter has the form
              *      {@code {
              *        sourceCode: {string} as plain text.
              *        decorations: {Array.<number|string>} an array of style classes
              *                     preceded by the position at which they start in
              *                     job.sourceCode in order.
              *                     The language handler should assigned this field.
              *        basePos: {int} the position of source in the larger source chunk.
              *                 All positions in the output decorations array are relative
              *                 to the larger source chunk.
              *      } }
              * @param {Array.<string>} fileExtensions
              */
            function registerLangHandler(handler, fileExtensions) {
              for (var i = fileExtensions.length; --i >= 0;) {
                var ext = fileExtensions[i];
                if (!langHandlerRegistry.hasOwnProperty(ext)) {
                  langHandlerRegistry[ext] = handler;
                } else if (win['console']) {
                  console['warn']('cannot override language handler %s', ext);
                }
              }
            }
            function langHandlerForExtension(extension, source) {
              if (!(extension && langHandlerRegistry.hasOwnProperty(extension))) {
                // Treat it as markup if the first non whitespace character is a < and
                // the last non-whitespace character is a >.
                extension = /^\s*</.test(source)
                    ? 'default-markup'
                    : 'default-code';
              }
              return langHandlerRegistry[extension];
            }
            registerLangHandler(decorateSource, ['default-code']);
            registerLangHandler(
                createSimpleLexer(
                    [],
                    [
                     [PR_PLAIN,       /^[^<?]+/],
                     [PR_DECLARATION, /^<!\w[^>]*(?:>|$)/],
                     [PR_COMMENT,     /^<\!--[\s\S]*?(?:-\->|$)/],
                     // Unescaped content in an unknown language
                     ['lang-',        /^<\?([\s\S]+?)(?:\?>|$)/],
                     ['lang-',        /^<%([\s\S]+?)(?:%>|$)/],
                     [PR_PUNCTUATION, /^(?:<[%?]|[%?]>)/],
                     ['lang-',        /^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i],
                     // Unescaped content in javascript.  (Or possibly vbscript).
                     ['lang-js',      /^<script\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],
                     // Contains unescaped stylesheet content
                     ['lang-css',     /^<style\b[^>]*>([\s\S]*?)(<\/style\b[^>]*>)/i],
                     ['lang-in.tag',  /^(<\/?[a-z][^<>]*>)/i]
                    ]),
                ['default-markup', 'htm', 'html', 'mxml', 'xhtml', 'xml', 'xsl']);
            registerLangHandler(
                createSimpleLexer(
                    [
                     [PR_PLAIN,        /^[\s]+/, null, ' \t\r\n'],
                     [PR_ATTRIB_VALUE, /^(?:\"[^\"]*\"?|\'[^\']*\'?)/, null, '\"\'']
                     ],
                    [
                     [PR_TAG,          /^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],
                     [PR_ATTRIB_NAME,  /^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],
                     ['lang-uq.val',   /^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],
                     [PR_PUNCTUATION,  /^[=<>\/]+/],
                     ['lang-js',       /^on\w+\s*=\s*\"([^\"]+)\"/i],
                     ['lang-js',       /^on\w+\s*=\s*\'([^\']+)\'/i],
                     ['lang-js',       /^on\w+\s*=\s*([^\"\'>\s]+)/i],
                     ['lang-css',      /^style\s*=\s*\"([^\"]+)\"/i],
                     ['lang-css',      /^style\s*=\s*\'([^\']+)\'/i],
                     ['lang-css',      /^style\s*=\s*([^\"\'>\s]+)/i]
                     ]),
                ['in.tag']);
            registerLangHandler(
                createSimpleLexer([], [[PR_ATTRIB_VALUE, /^[\s\S]+/]]), ['uq.val']);
            registerLangHandler(sourceDecorator({
                    'keywords': CPP_KEYWORDS,
                    'hashComments': true,
                    'cStyleComments': true,
                    'types': C_TYPES
                  }), ['c', 'cc', 'cpp', 'cxx', 'cyc', 'm']);
            registerLangHandler(sourceDecorator({
                    'keywords': 'null,true,false'
                  }), ['json']);
            registerLangHandler(sourceDecorator({
                    'keywords': CSHARP_KEYWORDS,
                    'hashComments': true,
                    'cStyleComments': true,
                    'verbatimStrings': true,
                    'types': C_TYPES
                  }), ['cs']);
            registerLangHandler(sourceDecorator({
                    'keywords': JAVA_KEYWORDS,
                    'cStyleComments': true
                  }), ['java']);
            registerLangHandler(sourceDecorator({
                    'keywords': SH_KEYWORDS,
                    'hashComments': true,
                    'multiLineStrings': true
                  }), ['bash', 'bsh', 'csh', 'sh']);
            registerLangHandler(sourceDecorator({
                    'keywords': PYTHON_KEYWORDS,
                    'hashComments': true,
                    'multiLineStrings': true,
                    'tripleQuotedStrings': true
                  }), ['cv', 'py', 'python']);
            registerLangHandler(sourceDecorator({
                    'keywords': PERL_KEYWORDS,
                    'hashComments': true,
                    'multiLineStrings': true,
                    'regexLiterals': 2  // multiline regex literals
                  }), ['perl', 'pl', 'pm']);
            registerLangHandler(sourceDecorator({
                    'keywords': RUBY_KEYWORDS,
                    'hashComments': true,
                    'multiLineStrings': true,
                    'regexLiterals': true
                  }), ['rb', 'ruby']);
            registerLangHandler(sourceDecorator({
                    'keywords': JSCRIPT_KEYWORDS,
                    'cStyleComments': true,
                    'regexLiterals': true
                  }), ['javascript', 'js']);
            registerLangHandler(sourceDecorator({
                    'keywords': COFFEE_KEYWORDS,
                    'hashComments': 3,  // ### style block comments
                    'cStyleComments': true,
                    'multilineStrings': true,
                    'tripleQuotedStrings': true,
                    'regexLiterals': true
                  }), ['coffee']);
            registerLangHandler(sourceDecorator({
                    'keywords': RUST_KEYWORDS,
                    'cStyleComments': true,
                    'multilineStrings': true
                  }), ['rc', 'rs', 'rust']);
            registerLangHandler(
                createSimpleLexer([], [[PR_STRING, /^[\s\S]+/]]), ['regex']);
          
            function applyDecorator(job) {
              var opt_langExtension = job.langExtension;
          
              try {
                // Extract tags, and convert the source code to plain text.
                var sourceAndSpans = extractSourceSpans(job.sourceNode, job.pre);
                /** Plain text. @type {string} */
                var source = sourceAndSpans.sourceCode;
                job.sourceCode = source;
                job.spans = sourceAndSpans.spans;
                job.basePos = 0;
          
                // Apply the appropriate language handler
                langHandlerForExtension(opt_langExtension, source)(job);
          
                // Integrate the decorations and tags back into the source code,
                // modifying the sourceNode in place.
                recombineTagsAndDecorations(job);
              } catch (e) {
                if (win['console']) {
                  console['log'](e && e['stack'] || e);
                }
              }
            }
          
            /**
             * Pretty print a chunk of code.
             * @param sourceCodeHtml {string} The HTML to pretty print.
             * @param opt_langExtension {string} The language name to use.
             *     Typically, a filename extension like 'cpp' or 'java'.
             * @param opt_numberLines {number|boolean} True to number lines,
             *     or the 1-indexed number of the first line in sourceCodeHtml.
             */
            function $prettyPrintOne(sourceCodeHtml, opt_langExtension, opt_numberLines) {
              var container = document.createElement('div');
              // This could cause images to load and onload listeners to fire.
              // E.g. <img onerror="alert(1337)" src="nosuchimage.png">.
              // We assume that the inner HTML is from a trusted source.
              // The pre-tag is required for IE8 which strips newlines from innerHTML
              // when it is injected into a <pre> tag.
              // http://stackoverflow.com/questions/451486/pre-tag-loses-line-breaks-when-setting-innerhtml-in-ie
              // http://stackoverflow.com/questions/195363/inserting-a-newline-into-a-pre-tag-ie-javascript
              container.innerHTML = '<pre>' + sourceCodeHtml + '</pre>';
              container = container.firstChild;
              if (opt_numberLines) {
                numberLines(container, opt_numberLines, true);
              }
          
              var job = {
                langExtension: opt_langExtension,
                numberLines: opt_numberLines,
                sourceNode: container,
                pre: 1
              };
              applyDecorator(job);
              return container.innerHTML;
            }
          
             /**
              * Find all the {@code <pre>} and {@code <code>} tags in the DOM with
              * {@code class=prettyprint} and prettify them.
              *
              * @param {Function} opt_whenDone called when prettifying is done.
              * @param {HTMLElement|HTMLDocument} opt_root an element or document
              *   containing all the elements to pretty print.
              *   Defaults to {@code document.body}.
              */
            function $prettyPrint(opt_whenDone, opt_root) {
              var root = opt_root || document.body;
              var doc = root.ownerDocument || document;
              function byTagName(tn) { return root.getElementsByTagName(tn); }
              // fetch a list of nodes to rewrite
              var codeSegments = [byTagName('pre'), byTagName('code'), byTagName('xmp')];
              var elements = [];
              for (var i = 0; i < codeSegments.length; ++i) {
                for (var j = 0, n = codeSegments[i].length; j < n; ++j) {
                  elements.push(codeSegments[i][j]);
                }
              }
              codeSegments = null;
          
              var clock = Date;
              if (!clock['now']) {
                clock = { 'now': function () { return +(new Date); } };
              }
          
              // The loop is broken into a series of continuations to make sure that we
              // don't make the browser unresponsive when rewriting a large page.
              var k = 0;
              var prettyPrintingJob;
          
              var langExtensionRe = /\blang(?:uage)?-([\w.]+)(?!\S)/;
              var prettyPrintRe = /\bprettyprint\b/;
              var prettyPrintedRe = /\bprettyprinted\b/;
              var preformattedTagNameRe = /pre|xmp/i;
              var codeRe = /^code$/i;
              var preCodeXmpRe = /^(?:pre|code|xmp)$/i;
              var EMPTY = {};
          
              function doWork() {
                var endTime = (win['PR_SHOULD_USE_CONTINUATION'] ?
                               clock['now']() + 250 /* ms */ :
                               Infinity);
                for (; k < elements.length && clock['now']() < endTime; k++) {
                  var cs = elements[k];
          
                  // Look for a preceding comment like
                  // <?prettify lang="..." linenums="..."?>
                  var attrs = EMPTY;
                  {
                    for (var preceder = cs; (preceder = preceder.previousSibling);) {
                      var nt = preceder.nodeType;
                      // <?foo?> is parsed by HTML 5 to a comment node (8)
                      // like <!--?foo?-->, but in XML is a processing instruction
                      var value = (nt === 7 || nt === 8) && preceder.nodeValue;
                      if (value
                          ? !/^\??prettify\b/.test(value)
                          : (nt !== 3 || /\S/.test(preceder.nodeValue))) {
                        // Skip over white-space text nodes but not others.
                        break;
                      }
                      if (value) {
                        attrs = {};
                        value.replace(
                            /\b(\w+)=([\w:.%+-]+)/g,
                          function (_, name, value) { attrs[name] = value; });
                        break;
                      }
                    }
                  }
          
                  var className = cs.className;
                  if ((attrs !== EMPTY || prettyPrintRe.test(className))
                      // Don't redo this if we've already done it.
                      // This allows recalling pretty print to just prettyprint elements
                      // that have been added to the page since last call.
                      && !prettyPrintedRe.test(className)) {
          
                    // make sure this is not nested in an already prettified element
                    var nested = false;
                    for (var p = cs.parentNode; p; p = p.parentNode) {
                      var tn = p.tagName;
                      if (preCodeXmpRe.test(tn)
                          && p.className && prettyPrintRe.test(p.className)) {
                        nested = true;
                        break;
                      }
                    }
                    if (!nested) {
                      // Mark done.  If we fail to prettyprint for whatever reason,
                      // we shouldn't try again.
                      cs.className += ' prettyprinted';
          
                      // If the classes includes a language extensions, use it.
                      // Language extensions can be specified like
                      //     <pre class="prettyprint lang-cpp">
                      // the language extension "cpp" is used to find a language handler
                      // as passed to PR.registerLangHandler.
                      // HTML5 recommends that a language be specified using "language-"
                      // as the prefix instead.  Google Code Prettify supports both.
                      // http://dev.w3.org/html5/spec-author-view/the-code-element.html
                      var langExtension = attrs['lang'];
                      if (!langExtension) {
                        langExtension = className.match(langExtensionRe);
                        // Support <pre class="prettyprint"><code class="language-c">
                        var wrapper;
                        if (!langExtension && (wrapper = childContentWrapper(cs))
                            && codeRe.test(wrapper.tagName)) {
                          langExtension = wrapper.className.match(langExtensionRe);
                        }
          
                        if (langExtension) { langExtension = langExtension[1]; }
                      }
          
                      var preformatted;
                      if (preformattedTagNameRe.test(cs.tagName)) {
                        preformatted = 1;
                      } else {
                        var currentStyle = cs['currentStyle'];
                        var defaultView = doc.defaultView;
                        var whitespace = (
                            currentStyle
                            ? currentStyle['whiteSpace']
                            : (defaultView
                               && defaultView.getComputedStyle)
                            ? defaultView.getComputedStyle(cs, null)
                            .getPropertyValue('white-space')
                            : 0);
                        preformatted = whitespace
                            && 'pre' === whitespace.substring(0, 3);
                      }
          
                      // Look for a class like linenums or linenums:<n> where <n> is the
                      // 1-indexed number of the first line.
                      var lineNums = attrs['linenums'];
                      if (!(lineNums = lineNums === 'true' || +lineNums)) {
                        lineNums = className.match(/\blinenums\b(?::(\d+))?/);
                        lineNums =
                          lineNums
                          ? lineNums[1] && lineNums[1].length
                            ? +lineNums[1] : true
                          : false;
                      }
                      if (lineNums) { numberLines(cs, lineNums, preformatted); }
          
                      // do the pretty printing
                      prettyPrintingJob = {
                        langExtension: langExtension,
                        sourceNode: cs,
                        numberLines: lineNums,
                        pre: preformatted
                      };
                      applyDecorator(prettyPrintingJob);
                    }
                  }
                }
                if (k < elements.length) {
                  // finish up in a continuation
                  setTimeout(doWork, 250);
                } else if ('function' === typeof opt_whenDone) {
                  opt_whenDone();
                }
              }
          
              doWork();
            }
          
            /**
             * Contains functions for creating and registering new language handlers.
             * @type {Object}
             */
            var PR = win['PR'] = {
                  'createSimpleLexer': createSimpleLexer,
                  'registerLangHandler': registerLangHandler,
                  'sourceDecorator': sourceDecorator,
                  'PR_ATTRIB_NAME': PR_ATTRIB_NAME,
                  'PR_ATTRIB_VALUE': PR_ATTRIB_VALUE,
                  'PR_COMMENT': PR_COMMENT,
                  'PR_DECLARATION': PR_DECLARATION,
                  'PR_KEYWORD': PR_KEYWORD,
                  'PR_LITERAL': PR_LITERAL,
                  'PR_NOCODE': PR_NOCODE,
                  'PR_PLAIN': PR_PLAIN,
                  'PR_PUNCTUATION': PR_PUNCTUATION,
                  'PR_SOURCE': PR_SOURCE,
                  'PR_STRING': PR_STRING,
                  'PR_TAG': PR_TAG,
                  'PR_TYPE': PR_TYPE,
                  'prettyPrintOne':
                     IN_GLOBAL_SCOPE
                       ? (win['prettyPrintOne'] = $prettyPrintOne)
                       : (prettyPrintOne = $prettyPrintOne),
                  'prettyPrint': prettyPrint =
                     IN_GLOBAL_SCOPE
                       ? (win['prettyPrint'] = $prettyPrint)
                       : (prettyPrint = $prettyPrint)
                };
          
            // Make PR available via the Asynchronous Module Definition (AMD) API.
            // Per https://github.com/amdjs/amdjs-api/wiki/AMD:
            // The Asynchronous Module Definition (AMD) API specifies a
            // mechanism for defining modules such that the module and its
            // dependencies can be asynchronously loaded.
            // ...
            // To allow a clear indicator that a global define function (as
            // needed for script src browser loading) conforms to the AMD API,
            // any global define function SHOULD have a property called "amd"
            // whose value is an object. This helps avoid conflict with any
            // other existing JavaScript code that could have defined a define()
            // function that does not conform to the AMD API.
            if (typeof define === "function" && define['amd']) {
              define("google-code-prettify", [], function () {
                return PR; 
              });
            }
          })();
          return prettyPrint;
        })();
      
        // If this script is deferred or async and the document is already
        // loaded we need to wait for language handlers to load before performing
        // any autorun.
        function onLangsLoaded() {
          if (autorun) {
            contentLoaded(
              function () {
                var n = callbacks.length;
                var callback = n ? function () {
                  for (var i = 0; i < n; ++i) {
                    (function (i) {
                       setTimeout(
                         function () {
                           win['exports'][callbacks[i]].apply(win, arguments);
                         }, 0);
                     })(i);
                  }
                } : void 0;
                prettyPrint(callback);
              });
          }
        }
        checkPendingLanguages();
      
      }());
      
      
      ================================================
      FILE: google-code-prettify/styles/demo.html
      ================================================
      <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
      <html><head>
      <script src="../src/prettify.js"></script>
      <script src="../src/lang-css.js"></script>
      <style>
      body { margin: 0; padding: 0 }
      pre { margin: 0 }
      </style>
      </head>
      <script>
      // This page displays some code styled using a theme named in the
      // query part of the URL.
      var themeName = decodeURIComponent(document.location.search.replace(/^\?/, ''));
      
      // Call out to the parent so that it can resize the iframe once this
      // document's body is loaded.
      function adjustHeightInParent() {
        if (parent !== window) {
          try {
            var div = document.body.getElementsByTagName('div')[0];
            parent.adjustChildIframeSize(
                themeName, div.offsetWidth, div.offsetHeight);
          } catch (ex) {
            // Can happen when this page is opened in its own tab.
          }
        }
      }
      
      // Load the necessary CSS
      (function () {
        document.title = 'Theme ' + themeName;
        // Load the stylesheet that we're demoing.
        var link = document.createElement('link');
        link.rel = 'stylesheet';
        link.type = 'text/css';
        link.href = themeName === 'default'
            ? '../src/prettify.css' : themeName + '.css';
        document.getElementsByTagName('head')[0].appendChild(link);
      })();
      </script>
      
      <body onload="prettyPrint(); adjustHeightInParent()">
      <div style="width: 40em; display: inline-block">
      <pre class="prettyprint lang-html linenums">
      &lt;script type="text/javascript"&gt;
      // Say hello world until the user starts questioning
      // the meaningfulness of their existence.
      function helloWorld(world) {
        for (var i = 42; --i &gt;= 0;) {
          alert('Hello ' + String(world));
        }
      }
      &lt;/script&gt;
      &lt;style&gt;
      p { color: pink }
      b { color: blue }
      u { color: "umber" }
      &lt;/style&gt;
      </pre>
      </div>
      </body></html>
      
      
      ================================================
      FILE: google-code-prettify/styles/desert.css
      ================================================
      /* desert scheme ported from vim to google prettify */
      pre.prettyprint { display: block; background-color: #333 }
      pre .nocode { background-color: none; color: #000 }
      pre .str { color: #ffa0a0 } /* string  - pink */
      pre .kwd { color: #f0e68c; font-weight: bold }
      pre .com { color: #87ceeb } /* comment - skyblue */
      pre .typ { color: #98fb98 } /* type    - lightgreen */
      pre .lit { color: #cd5c5c } /* literal - darkred */
      pre .pun { color: #fff }    /* punctuation */
      pre .pln { color: #fff }    /* plaintext */
      pre .tag { color: #f0e68c; font-weight: bold } /* html/xml tag    - lightyellow */
      pre .atn { color: #bdb76b; font-weight: bold } /* attribute name  - khaki */
      pre .atv { color: #ffa0a0 } /* attribute value - pink */
      pre .dec { color: #98fb98 } /* decimal         - lightgreen */
      
      /* Specify class=linenums on a pre to get line numbering */
      ol.linenums { margin-top: 0; margin-bottom: 0; color: #AEAEAE } /* IE indents via margin-left */
      li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8 { list-style-type: none }
      /* Alternate shading for lines */
      li.L1,li.L3,li.L5,li.L7,li.L9 { }
      
      @media print {
        pre.prettyprint { background-color: none }
        pre .str, code .str { color: #060 }
        pre .kwd, code .kwd { color: #006; font-weight: bold }
        pre .com, code .com { color: #600; font-style: italic }
        pre .typ, code .typ { color: #404; font-weight: bold }
        pre .lit, code .lit { color: #044 }
        pre .pun, code .pun { color: #440 }
        pre .pln, code .pln { color: #000 }
        pre .tag, code .tag { color: #006; font-weight: bold }
        pre .atn, code .atn { color: #404 }
        pre .atv, code .atv { color: #060 }
      }
      
      
      ================================================
      FILE: google-code-prettify/styles/doxy.css
      ================================================
      /* Doxy pretty-printing styles. Used with prettify.js.  */
      
      pre .str, code .str { color: #fec243; } /* string  - eggyolk gold */
      pre .kwd, code .kwd { color: #8470FF; } /* keyword - light slate blue */
      pre .com, code .com { color: #32cd32; font-style: italic; } /* comment - green */
      pre .typ, code .typ { color: #6ecbcc; } /* type - turq green */
      pre .lit, code .lit { color: #d06; } /* literal - cherry red */
      pre .pun, code .pun { color: #8B8970;  } /* punctuation - lemon chiffon4  */
      pre .pln, code .pln { color: #f0f0f0; } /* plaintext - white */
      pre .tag, code .tag { color: #9c9cff; } /* html/xml tag  (bluey)  */
      pre .htm, code .htm { color: #dda0dd; } /* html tag  light purply*/
      pre .xsl, code .xsl { color: #d0a0d0; } /* xslt tag  light purply*/
      pre .atn, code .atn { color: #46eeee; font-weight: normal;} /* html/xml attribute name  - lt turquoise */
      pre .atv, code .atv { color: #EEB4B4; } /* html/xml attribute value - rosy brown2 */
      pre .dec, code .dec { color: #3387CC; } /* decimal - blue */
      
      a {
        text-decoration: none;
      }
      pre.prettyprint, code.prettyprint {
        font-family:'Droid Sans Mono','CPMono_v07 Bold','Droid Sans';
        font-weight: bold;
        font-size: 9pt;
        background-color: #0f0f0f;
        -moz-border-radius: 8px;
        -webkit-border-radius: 8px;
        -o-border-radius: 8px;
        -ms-border-radius: 8px;
        -khtml-border-radius: 8px;
        border-radius: 8px;
      }  /*  background is black (well, just a tad less dark )  */
      
      pre.prettyprint {
        width: 95%;
        margin: 1em auto;
        padding: 1em;
        white-space: pre-wrap;
      }
      
      pre.prettyprint a, code.prettyprint a {
         text-decoration:none;
      }
      /* Specify class=linenums on a pre to get line numbering; line numbers themselves are the same color as punctuation */
      ol.linenums { margin-top: 0; margin-bottom: 0; color: #8B8970; } /* IE indents via margin-left */
      li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8 { list-style-type: none }
      /* Alternate shading for lines */
      li.L1,li.L3,li.L5,li.L7,li.L9 { }
      
      /* print is mostly unchanged from default at present  */
      @media print {
        pre.prettyprint, code.prettyprint { background-color: #fff;  }
        pre .str, code .str { color: #088; }
        pre .kwd, code .kwd { color: #006; font-weight: bold; }
        pre .com, code .com { color: #oc3; font-style: italic; }
        pre .typ, code .typ { color: #404; font-weight: bold; }
        pre .lit, code .lit { color: #044; }
        pre .pun, code .pun { color: #440; }
        pre .pln, code .pln { color: #000; }
        pre .tag, code .tag { color: #b66ff7; font-weight: bold; }
        pre .htm, code .htm { color: #606; font-weight: bold; }
        pre .xsl, code .xsl { color: #606; font-weight: bold; }
        pre .atn, code .atn { color: #c71585;  font-weight: normal; }
        pre .atv, code .atv { color: #088;  font-weight: normal; }
      }
      
      
      ================================================
      FILE: google-code-prettify/styles/index.html
      ================================================
      <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
      <html><head>
      <title>Prettify Themes Gallery</title>
      <style type="text/css">
      iframe { width: 100%; border-style: none; margin: 0; padding: 0 }
      </style>
      <script>
      var allThemes = [
        { name: 'default' },
        { name: 'desert',
          authorHtml: '<a href="http://code.google.com/u/@VhJeSlJYBhVMWgF7/">'
              + 'techto&hellip;@<\/a>' },
        { name: 'sunburst', authorHtml: 'David Leibovic' },
        { name: 'sons-of-obsidian',
          authorHtml: '<a href="http://CodeTunnel.com/blog/post/71'
              + '/google-code-prettify-obsidian-theme">Alex Ford<\/a>' },
        { name: 'doxy', authorHtml: 'Robert Sperberg' },
      ];
      
      // Called by the demo.html frames loaded per theme to
      // size the iframes properly and to allow them to tile
      // the page nicely.
      function adjustChildIframeSize(themeName, width, height) {
        if (typeof console != 'undefined') {
          try {
            console.log('adjusting ' + themeName + ' to ' + width + 'x' + height);
          } catch (ex) {
            // Don't bother logging log failure.
          }
        }
      
        var container = document.getElementById(themeName).parentNode;
        container.style.width = (+width + 16) + 'px';
        container.style.display = 'inline-block';
        var iframe = container.getElementsByTagName('iframe')[0];
        iframe.style.height = (+height + 16) + 'px';
      }
      </script>
      </head>
      
      <body>
      <noscript>This page requires JavaScript</noscript>
      
      <h1>Gallery of themes for
      <a href="http://code.google.com/p/google-code-prettify/">code prettify</a></h1>
      <p>
      Click on a theme name for a link to the file in revision control.
      Print preview this page to see how the themes work on the printed page.
      </p>
      <script>(function () {
        // Produce an iframe per theme.
        // We pass the threme name to the iframe via its URI query, and
        // it loads prettify and the theme CSS, and calls back to this page
        // to resize the iframe.
        for (var i = 0, n = allThemes.length; i < n; ++i) {
          var theme = allThemes[i];
          if (!theme) { continue; }
          var iframe = document.createElement('iframe');
          iframe.name = theme.name;
          iframe.src = 'demo.html?' + encodeURIComponent(theme.name);
          var header = document.createElement('h2');
          header.id = theme.name;
          var linkToThemeSrc = document.createElement('a');
          linkToThemeSrc.href = (
              'http://code.google.com/p/google-code-prettify/source/browse/trunk/' +
              (theme.name === 'default'
               ? 'src/prettify.css'
               : 'styles/' + encodeURIComponent(theme.name) + '.css'));
          linkToThemeSrc.appendChild(document.createTextNode(
             theme.name.replace(/\b[a-z]/g,  // Capitalize first letter of each word
             function (letter) { return letter.toUpperCase(); })));
          header.appendChild(linkToThemeSrc);
      
          var attribution;
          if (theme.authorHtml) {
            attribution = document.createElement('span');
            attribution.className = 'attribution';
            attribution.innerHTML = 'by ' + theme.authorHtml;
          }
      
          var div = document.createElement('div');
          div.appendChild(header);
          if (attribution) { div.appendChild(attribution); }
          div.appendChild(iframe);
          document.body.appendChild(div);
        }
      })()</script>
      
      </body></html>
      
      
      ================================================
      FILE: google-code-prettify/styles/sons-of-obsidian.css
      ================================================
      /*
       * Derived from einaros's Sons of Obsidian theme at
       * http://studiostyl.es/schemes/son-of-obsidian by
       * Alex Ford of CodeTunnel:
       * http://CodeTunnel.com/blog/post/71/google-code-prettify-obsidian-theme
       */
      
      .str
      {
          color: #EC7600;
      }
      .kwd
      {
          color: #93C763;
      }
      .com
      {
          color: #66747B;
      }
      .typ
      {
          color: #678CB1;
      }
      .lit
      {
          color: #FACD22;
      }
      .pun
      {
          color: #F1F2F3;
      }
      .pln
      {
          color: #F1F2F3;
      }
      .tag
      {
          color: #8AC763;
      }
      .atn
      {
          color: #E0E2E4;
      }
      .atv
      {
          color: #EC7600;
      }
      .dec
      {
          color: purple;
      }
      pre.prettyprint
      {
          border: 0px solid #888;
      }
      ol.linenums
      {
          margin-top: 0;
          margin-bottom: 0;
      }
      .prettyprint {
          background: #000;
      }
      li.L0, li.L1, li.L2, li.L3, li.L4, li.L5, li.L6, li.L7, li.L8, li.L9
      {
          color: #555;
          list-style-type: decimal;
      }
      li.L1, li.L3, li.L5, li.L7, li.L9 {
          background: #111;
      }
      @media print
      {
          .str
          {
              color: #060;
          }
          .kwd
          {
              color: #006;
              font-weight: bold;
          }
          .com
          {
              color: #600;
              font-style: italic;
          }
          .typ
          {
              color: #404;
              font-weight: bold;
          }
          .lit
          {
              color: #044;
          }
          .pun
          {
              color: #440;
          }
          .pln
          {
              color: #000;
          }
          .tag
          {
              color: #006;
              font-weight: bold;
          }
          .atn
          {
              color: #404;
          }
          .atv
          {
              color: #060;
          }
      }
      
      
      ================================================
      FILE: google-code-prettify/styles/sunburst.css
      ================================================
      /* Pretty printing styles. Used with prettify.js. */
      /* Vim sunburst theme by David Leibovic */
      
      pre .str, code .str { color: #65B042; } /* string  - green */
      pre .kwd, code .kwd { color: #E28964; } /* keyword - dark pink */
      pre .com, code .com { color: #AEAEAE; font-style: italic; } /* comment - gray */
      pre .typ, code .typ { color: #89bdff; } /* type - light blue */
      pre .lit, code .lit { color: #3387CC; } /* literal - blue */
      pre .pun, code .pun { color: #fff; } /* punctuation - white */
      pre .pln, code .pln { color: #fff; } /* plaintext - white */
      pre .tag, code .tag { color: #89bdff; } /* html/xml tag    - light blue */
      pre .atn, code .atn { color: #bdb76b; } /* html/xml attribute name  - khaki */
      pre .atv, code .atv { color: #65B042; } /* html/xml attribute value - green */
      pre .dec, code .dec { color: #3387CC; } /* decimal - blue */
      
      pre.prettyprint, code.prettyprint {
      	background-color: #000;
      	-moz-border-radius: 8px;
      	-webkit-border-radius: 8px;
      	-o-border-radius: 8px;
      	-ms-border-radius: 8px;
      	-khtml-border-radius: 8px;
      	border-radius: 8px;
      }
      
      pre.prettyprint {
      	width: 95%;
      	margin: 1em auto;
      	padding: 1em;
      	white-space: pre-wrap;
      }
      
      
      /* Specify class=linenums on a pre to get line numbering */
      ol.linenums { margin-top: 0; margin-bottom: 0; color: #AEAEAE; } /* IE indents via margin-left */
      li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8 { list-style-type: none }
      /* Alternate shading for lines */
      li.L1,li.L3,li.L5,li.L7,li.L9 { }
      
      @media print {
        pre .str, code .str { color: #060; }
        pre .kwd, code .kwd { color: #006; font-weight: bold; }
        pre .com, code .com { color: #600; font-style: italic; }
        pre .typ, code .typ { color: #404; font-weight: bold; }
        pre .lit, code .lit { color: #044; }
        pre .pun, code .pun { color: #440; }
        pre .pln, code .pln { color: #000; }
        pre .tag, code .tag { color: #006; font-weight: bold; }
        pre .atn, code .atn { color: #404; }
        pre .atv, code .atv { color: #060; }
      }
      
      
      ================================================
      FILE: google-code-prettify/tests/debug-ie-compat-matrix.html
      ================================================
      <style>
      code {
        white-space: pre; padding: 0; margin: 0; display: block
      }
      </style>
      
      <code id="one-line"
      >one short line,</code>
      
      <hr>
      
      <code id="two-lines"
      >one giant leap for
      cross-browser compatibility</code>
      
      <hr>
      
      <code id="two-lines-mutated"
      >two turtledoves
      a partridge in a pear tree
      zero fencepost errors</code>
      
      <hr>
      
      <p id="error" style="white-space: pre"></p>
      
      <script>
      // Function under test
      var matrix;
      
      (function () {
        var table = {
          quirks: { "6": "\r", "7": "\r", "8": "\r", "9": "\r", "10": "\n" },
          standards: { "6": "\r", "7": "\r", "8": "\r", "9": "\n", "10": "\n" }
        };
      
        matrix = function (quirksMode, ieMajorVersionNumber) {
          if ("boolean" !== typeof quirksMode) {
            throw new Error(quirksMode);
          } else if ("number" !== typeof ieMajorVersionNumber
              || !table.quirks.hasOwnProperty(+ieMajorVersionNumber)) {
            throw new Error(ieMajorVersionNumber);
          }
          return table[quirksMode ? "quirks" : "standards"][ieMajorVersionNumber];
        };
      })();
      </script>
      
      <script>
      // Configuration we're testing.
      var quirksMode;
      var ieMajorVersionNumber;
      
      quirksMode = document.compatMode == "BackCompat";
      ieMajorVersionNumber = navigator.userAgent.match(/MSIE\s(\d+)/) || NaN;
      if (ieMajorVersionNumber) {
        ieMajorVersionNumber = +ieMajorVersionNumber[1];
      }
      </script>
      
      <script>
      (function () {
        // DOM elements.
        var oneLine = document.getElementById("one-line");
        var twoLines = document.getElementById("two-lines");
        var twoLinesMutated = document.getElementById("two-lines-mutated");
      
        var originalHeight = twoLinesMutated.offsetHeight;
      
        // If the matrix cell being tested is correct, the following should
        // end up true.
        var pass = false;
        var reason = "unknown";
      
        // The DOM subtree to modify.
        var textNode = twoLinesMutated.firstChild;
      
        if (textNode.nodeType !== 3 /* TEXT */ || textNode.nextSibling) {
          reason = "unexpected DOM structure";  // Maybe not normalized.
        } else {
          // Perform the action we are testing.
          try {
            textNode.nodeValue = twoLines.firstChild.nodeValue.replace
                /\r\n?|\n/g, matrix(quirksMode, ieMajorVersionNumber);
          } catch (ex) {
            reason = String(ex);
          }
      
          // Check it against known good DOM subtrees.
          if (Math.abs(twoLinesMutated.offsetHeight - twoLines.offsetHeight) <= 1) {
            pass = true;
          } else if (Math.abs(twoLinesMutated.offsetHeight - oneLine.offsetHeight) <= 1) {
            reason = "newlines not preserved";
          } else {
            // offsetHeight should trigger layout, but might not have???
          }
        }
      
        document.title += " : " + pass ? "PASS" : "FAIL";
        if (!pass) {
          document.getElementById("error").appendChild(document.createTextNode(
             "quirksMode is " + quirksMode +
             "\nieMajorVersionNumber is " + ieMajorVersionNumber +
             "\nheight was " + originalHeight +
             "\nheight is " + twoLinesMutated.offsetHeight +
             "\nexpected " + twoLines.offsetHeight +
             "\nreason=" + reason));
        }
      })();
      </script>
      
      
      ================================================
      FILE: google-code-prettify/tests/ie-newline-copy-paste.html
      ================================================
      <title>IE Newline Copy/Paste Info Gathering</title>
      
      <body>
      <p>
      I'm trying to squash, <a href="http://code.google.com/p/google-code-prettify/issues/detail?id=20">once</a> and <a href="http://code.google.com/p/google-code-prettify/issues/detail?id=104">for</a> <a href="http://code.google.com/p/google-code-prettify/issues/detail?id=128">all</a>, the problems with newlines in
      <tt>&lt;PRE&gt;</tt>s in IE.  I can't run 3 versions of IE, so I'd
      really appreciate any help from people who have IE open and running.
      </p>
      
      <p>
      Please copy from START through END below and paste it into the
      textarea below.
      Then hit Ctrl-A, Ctrl-C to copy the textarea contents, and paste that
      into an email.
      Please also copy and paste the RESULTS section below and include it in
      the email response as well and send it
      to <a href="mailto:mikesamuel@gmail.com">me</a> or respond to the
      discussion list.
      </p>
      
      <p>
      In case you're interested, there are two problems: choosing a way to
      split lines that doesn't introduce too few or extra newlines, and a
      way to make sure that the resulting code can be copy-pasted into a
      plain text editors such as the textarea below.  This is my attempt to
      gather information on both issues by IE version.
      </p>
      
      cheers.
      </body>
      
      <script>
      function makeCodeJoiningOn(text, htmlNewline, start, end) {
        start = start || '';
        end = end || '';
        var code = document.createElement('PRE');
        code.innerHTML = start + ['before', '[' + text + ']', 'after'].join(htmlNewline) + end;
        code.id = text.replace('+', 'plus').replace(/[^\w\-_]/g, '_');
        document.body.appendChild(code);
      }
      </script>
      
      <h2>START</h2>
      
      <script>makeCodeJoiningOn('CR', '&#160;\r');</script>
      
      <script>makeCodeJoiningOn('CRLF', '&#160;\r\n');</script>
      
      <script>makeCodeJoiningOn('LFCR', '&#160;\n \r');</script>
      
      <script>makeCodeJoiningOn('LF', '&#160;\n');</script>
      
      <script>makeCodeJoiningOn('VTAB', '&#160;\u000b');</script>
      
      <script>makeCodeJoiningOn('x2028', '&#160;\u2028');</script>
      
      <script>makeCodeJoiningOn('x2029', '&#160;\u2029');</script>
      
      <script>makeCodeJoiningOn('BR', '&#160;<br>');</script>
      
      <script>makeCodeJoiningOn('CR+BR', '&#160;\r<br>');</script>
      
      <script>makeCodeJoiningOn('CRLF+BR', '&#160;\r\n<br>');</script>
      
      <script>makeCodeJoiningOn('LFCR+BR', '&#160;\n\r<br>');</script>
      
      <script>makeCodeJoiningOn('LF+BR', '&#160;\n<br>');</script>
      
      <script>makeCodeJoiningOn('VTAB+BR', '&#160;\u000b<br>');</script>
      
      <script>makeCodeJoiningOn('x2028+BR', '&#160;\u2028<br>');</script>
      
      <script>makeCodeJoiningOn('x2029+BR', '&#160;\u2029<br>');</script>
      
      <script>makeCodeJoiningOn('BR+CR', '&#160;<br>\r');</script>
      
      <script>makeCodeJoiningOn('BR+CRLF', '&#160;<br>\r\n');</script>
      
      <script>makeCodeJoiningOn('BR+LFCR', '&#160;<br>\n\r');</script>
      
      <script>makeCodeJoiningOn('BR+LF', '&#160;<br>\n');</script>
      
      <script>makeCodeJoiningOn('BR+LF', '&#160;<br>\n');</script>
      
      <script>makeCodeJoiningOn('BR+VTAB', '&#160;<br>\u000b');</script>
      
      <script>makeCodeJoiningOn('BR+x2028', '&#160;<br>\u2028');</script>
      
      <script>makeCodeJoiningOn('BR+x2029', '&#160;<br>\u2029');</script>
      
      <script>makeCodeJoiningOn('divs', '</div><div>', '<div>', '<\/div>');</script>
      
      <script>makeCodeJoiningOn('ul', '<li>', '<ul style=list-style:none;padding:0;margin:0><li>', '<\/ul>');</script>
      
      <pre id=notgen-cr>before
      [Not generated via innerHTML CR]
      after</pre>
      
      <pre id=notgen-br>before<br>[Not generated via innerHTML BR]<br>after</pre>
      
      <pre id=notgen-brcr>before<br>
      [Not generated via innerHTML CR + BR]<br>
      after</pre>
      
      <pre id=notgen-crbr>before
      <br>[Not generated via innerHTML BR + CR]
      <br>after</pre>
      
      <h2>END</h2>
      
      <pre id=threelines>one
      two
      three</pre>
      
      <h2>RESULTS</h2>
      <script>(function () {
        var threelines = document.getElementById('threelines');
        var codeElements = document.getElementsByTagName('PRE');
        var threelinesHeight = threelines.offsetHeight;
      
        var ok = [];
        var bad = [];
        for (var i = 0, n = codeElements.length; i < n; ++i) {
          var codeElement = codeElements[i];
          if (codeElement !== threelines) {
            var codeElementHeight = codeElement.offsetHeight;
            (Math.abs(threelinesHeight - codeElementHeight) < 3
             ? ok : bad).push(codeElement.id + ':' + codeElementHeight);
          }
        }
      
        function emit(text) {
          var p = document.createElement('P');
          p.appendChild(document.createTextNode(text));
          document.body.appendChild(p);
        }
      
        emit(navigator.userAgent);
        emit('Ok: ' + ok);
        emit('Bad: ' + bad);
      })();</script>
      
      <h2>TEXTAREA</h2>
      <textarea style="font-size: 50%" cols=40 rows=50></textarea>
      
      
      ================================================
      FILE: google-code-prettify/tests/large_input_test.html
      ================================================
      <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
      <html>
      <head>
      <title>Tests of Prettifier w/ large data files</title>
      <script src="../src/prettify.js" type="text/javascript"
       onerror="alert('Error: failed to load ' + this.src)"></script>
      <link rel="stylesheet" type="text/css" href="../src/prettify.css" />
      <link rel="stylesheet" type="text/css" href="test_styles.css" />
      </head>
      
      <body bgcolor="white">
      <div id="timing"></div>
      <div id="errorReport" style="white-space: pre"></div>
      
      <!--
        - Generate inputs of various sizes so that we can try fitting a
        - curve to the run times.
       -->
      <script type="text/javascript">
      if (!Date.now) {
        Date.now = function () { return (new Date).getTime(); };
      }
      
      if (typeof console === 'undefined') {
        console = {
          log: (function () {
            var messages = [];
            var pending = false;
            function showMessages() {
              pending = false;
              if (messages.length) {
               var text = messages.join('\n');
                var pre = document.createElement('PRE');
                pre.appendChild(document.createTextNode(text));
                document.body.appendChild(pre);
                messages = [];
              }
            }
      
            return function (msg) {
              if (!pending) {
                setTimeout(showMessages, 0);
                pending = true;
              }
              messages.push(msg);
            };
          })()
        };
      }
      
      (function () {
        var tasks = [];
        var jsonTimes = [];
        var xmlTimes = [];
      
        var listItem = (
            '&lt;li class="friendly" style="blink: like-its-going-out-of-style"&gt;'
            + '&lt;b&gt;Howdy&lt;/b&gt; Neighbor&lt;/li&gt;');
        var jsonItem = (
            '{ "friendly": true, "blinking": "hell-yes", "greeting": "Howdy!" }');
        function makeTargets(lang, item, sep, preText, postText, timesList) {
         var buffer = [];
          for (var i = 512; --i >= 0;) { buffer.push(item); }
          var count = 512;
          for (var i = 6; --i >= 0;) {
           var src = buffer.join(sep);
      
            tasks.push((function (n, toPrettify) {
              return function () {
                console.log('starting ' + lang + ' ' + n);
                var t0 = Date.now();
                var result = prettyPrintOne(toPrettify, lang);
                var t1 = Date.now();
                console.log('finishing ' + lang + ' ' + n);
                if (result === toPrettify) {
                  console.error('Failed to prettify ' + lang + ' ' + n);
                } else {
                  timesList.push([n, t1 - t0, toPrettify.length]);
                }
              };
            })(count, preText + src + postText));
      
            buffer = [src, src];
            count *= 2;
          }
        }
      
        makeTargets('xml', listItem, '\n', '<ul>', '<\/ul>', xmlTimes);
        makeTargets('json', jsonItem, ', ', '[', ']', jsonTimes);
      
        function emitBenchmarkTable(title, times) {
          var html = [
              '<h2>', title, '<h2>',
              '<table class=="benchmark"><tr><th>Count<th>Length<th>Time<th>Items Per Second'];
          for (var i = 0; i < times.length; ++i) {
            var time = times[i];
            var count = time[0], deltaMs = time[1], length = time[2];
            html.push('<tr><td>', count, '<td>', length, '<td>', deltaMs,
                      '<td>', (count * 1000 / deltaMs).toFixed(1));
          }
          html.push('</table>');
      
          var div = document.createElement('DIV');
          div.innerHTML = html.join('');
          document.body.appendChild(div);
        }
      
        tasks.push(
            function () { emitBenchmarkTable('XML', xmlTimes); },
            function () { emitBenchmarkTable('JSON', jsonTimes); });
      
        function doOne() {
          var task = tasks.shift();
          task();
          if (tasks.length) { setTimeout(doOne, 250); }
        }
        setTimeout(doOne, 250);
      })();
      </script>
      
      </body>
      </html>
      
      
      ================================================
      FILE: google-code-prettify/tests/prettify_test.html
      ================================================
      <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
      <html>
      <head>
      <title>Code Prettifier</title>
      <script>(function () {
        var sourceBaseUrl = /[&?]distrib/.test(location.search)
            ? "../distrib/google-code-prettify/" : "../src/";
        var sources = [
            "prettify.js",
            "lang-css.js",
            "lang-erlang.js",
            "lang-go.js",
            "lang-hs.js",
            "lang-lisp.js",
            "lang-lua.js",
            "lang-ml.js",
            "lang-proto.js",
            "lang-scala.js",
            "lang-sql.js",
            "lang-wiki.js",
            "lang-vhdl.js",
            "lang-vb.js",
            "lang-yaml.js",
        ];
        var styles = [
            "prettify.css"
        ];
        if (window.console) {
          console.log("sourceBaseUrl=" + sourceBaseUrl);
        }
        for (var i = 0; i < sources.length; ++i) {
          document.write(
              "<script src=\"" + sourceBaseUrl + sources[i] + "\"><\/script>");
        }
        for (var i = 0; i < styles.length; ++i) {
          document.write(
              "<link rel=\"stylesheet\" href=\"" + sourceBaseUrl + styles[i] + "\">");
        }
      })();
      </script>
      
      <script src="test_base.js" type="text/javascript"
       onerror="alert('Error: failed to load ' + this.src)"></script>
      <link rel="stylesheet" type="text/css" href="test_styles.css" />
      </head>
      
      <body onload="go(goldens)" bgcolor="white">
      <div id="timing"></div>
      <div id="errorReport" style="white-space: pre"></div>
      
      <h1>Bash</h1>
      <pre class="prettyprint" id="bash">#!/bin/bash
      
      # Fibonacci numbers
      # Writes an infinite series to stdout, one entry per line
      function fib() {
        local a=1
        local b=1
        while true ; do
          echo $a
          local tmp=$a
          a=$(( $a + $b ))
          b=$tmp
        done
      }
      
      # output the 10th element of the series and halt
      fib | head -10 | tail -1
      </pre>
      
      <h1>Bash w/ language specified</h1>
      <pre class="prettyprint lang-sh linenums" id="bash_lang">#!/bin/bash
      
      # Fibonacci numbers
      # Writes an infinite series to stdout, one entry per line
      function fib() {
        local a=1
        local b=1
        while true ; do
          echo $a
          local tmp=$a
          a=$(( $a + $b ))
          b=$tmp
        done
      }
      
      # output the 10th element of the series and halt
      fib | /usr/bin/*head -10 | tail -1
      </pre>
      
      <h1>Issue 165</h1>
      <pre class="prettyprint lang-sh" id="issue_165"># Comment
      local $x = ${#x[@]}  # Previous is not a comment
      # A comment</pre>
      
      <h1>C</h1>
      
      <pre class="prettyprint" id="C">
      #include &lt;stdio.h&gt;
      
      /* the n-th fibonacci number.
       */
      unsigned int fib(unsigned int n) {
        unsigned int a = 1, b = 1;
        unsigned int tmp;
        while (--n >= 0) {
          tmp = a;
          a += b;
          b = tmp;
        }
        return a;
      }
      
      main() {
        printf("%u", fib(10));
      }
      </pre>
      
      <h1>C w/ language specified</h1>
      
      <pre class="prettyprint lang-c" id="C_lang">
      #include &lt;stdio.h&gt;
      
      /* the n<sup>th</sup> fibonacci number. */
      uint32 fib(unsigned int n) {
        uint32 a = 1, b = 1;
        uint32 tmp;
        while (--n >= 0) {
          tmp = a;
          a += b;
          b = tmp;
        }
        return a;
      }
      
      void main() {
        size_t size = sizeof(wchar_t);
        ASSERT_EQ(size, 1);
        printf("%u", fib(10));
      }
      
      #define ZERO 0 /* a
        multiline comment */
      </pre>
      <h1>C++</h1>
      <pre class="prettyprint" id="Cpp">
      #include &lt;iostream&gt;
      
      using namespace std;
      
      //! fibonacci numbers with gratuitous use of templates.
      //! \param n an index into the fibonacci series
      //! \param fib0 element 0 of the series
      //! \return the nth element of the fibonacci series
      template &lt;class T>
      T fib(unsigned int n, const T&amp; fib0) {
        T a(fib0), b(fib0);
        for (; n; --n) {
          T tmp(a);
          a += b;
          b = tmp;
        }
        return a;
      }
      
      int main(int argc, char **argv) {
        cout &lt;&lt; fib(10, 1U);
      }
      </pre>
      
      <h1>C++ w/ language specified</h1>
      <pre class="prettyprint lang-cc" id="Cpp_lang">
      #include &lt;iostream&gt;
      
      using namespace std;
      
      //! fibonacci numbers with gratuitous use of templates.
      //! \param n an index into the fibonacci series
      //! \param fib0 element 0 of the series
      //! \return the nth element of the fibonacci series
      template &lt;class T>
      T fib(int n, const T&amp; fib0) {
        T a(fib0), b(fib0);
        while (--n >= 0) {
          T tmp(a);
          a += b;
          b = tmp;
        }
        return a;
      }
      
      int main(int argc, char **argv) {
        cout &lt;&lt; fib(10, 1U);
      }
      </pre>
      
      <h1>Java</h1>
      <pre class="prettyprint" id="java">
      package foo;
      
      import java.util.Iterator;
      
      /**
       * the fibonacci series implemented as an Iterable.
       */
      public final class Fibonacci implements Iterable&lt;Integer> {
        /** the next and previous members of the series. */
        private int a = 1, b = 1;
      
        @Override
        public Iterator&lt;Integer> iterator() {
          return new Iterator&lt;Integer>() {
            /** the series is infinite. */
            public boolean hasNext() { return true; }
            public Integer next() {
              int tmp = a;
              a += b;
              b = tmp;
              return a;
            }
            public void remove() { throw new UnsupportedOperationException(); }
          };
        }
      
        /**
         * the n&lt;sup>th&lt;/sup> element of the given series.
         * @throws NoSuchElementException if there are less than n elements in the
         *   given Iterable's {@link Iterable#iterator iterator}.
         */
        public static &lt;T>
        T nth(int n, Iterable&lt;T> iterable) {
          Iterator&lt;? extends T> it = iterable.iterator();
          while (--n > 0) {
            it.next();
          }
          return it.next();
        }
      
        public static void main(String[] args) {
          System.out.print(nth(10, new Fibonacci()));
        }
      }
      </pre>
      
      <h1>Java w/ language specified<small>(first line shown is line 12)</small></h1>
      <pre class="prettyprint lang-java linenums:12" id="java_lang">
      package foo;
      
      import java.util.Iterator;
      
      /**
       * the fibonacci series implemented as an Iterable.
       */
      public final class Fibonacci implements Iterable&lt;Integer> {
        /** the next and previous members of the series. */
        private int a = 1, b = 1;
      
        @Override
        public Iterator&lt;Integer> iterator() {
          return new Iterator&lt;Integer>() {
            /** the series is infinite. */
            public boolean hasNext() { return true; }
            public Integer next() {
              int tmp = a;
              a += b;
              b = tmp;
              return a;
            }
            public void remove() { throw new UnsupportedOperationException(); }
          };
        }
      
        /**
         * the n&lt;sup>th&lt;/sup> element of the given series.
         * @throws NoSuchElementException if there are less than n elements in the
         *   given Iterable's {@link Iterable#iterator iterator}.
         */
        public static &lt;T>
        T nth(int n, Iterable&lt;T> iterable) {
          Iterator&lt;? extends T> in = iterable.iterator();
          while (--n > 0) {
            in.next();
          }
          return in.next();
        }
      
        public static void main(String[] args) {
          System.out.print(nth(10, new Fibonacci()));
        }
      }
      
      # not a java comment
      # not keywords: static_cast and namespace
      </pre>
      
      <h1>Javascript</h1>
      <pre class="prettyprint" id="javascript">
      /**
       * nth element in the fibonacci series.
       * @param n >= 0
       * @return the nth element, >= 0.
       */
      function fib(n) {
        var a = 1, b = 1;
        var tmp;
        while (--n >= 0) {
          tmp = a;
          a += b;
          b = tmp;
        }
        return a;
      }
      
      document.write(fib(10));
      </pre>
      
      <h1>Issue 12 - Javascript Regular Expressions</h1>
      <pre class="prettyprint" id="issue12">
      /foo/;  // a slash starting a line treated as a regexp beginning
      "foo".match(/fo+$/);
      // this line comment not treated as a regular expressions
      "foo /bar/".test(/"baz"/);  // test string and regexp boundaries
      var division = /\b\d+\/\d+/g;  // test char sets and escaping of specials
      var allSpecials = /([^\(\)\[\]\{\}\-\?\+\*\.\^\$\/]+)\\/;
      var slashInCharset = /[^/]/g, notCloseSq = /[^\]]/;
      
      // test that slash used in numeric context treated as an operator
      1 / 2;
      1. / x;
      x / y;
      (x) / y;
      1 /* foo */ / 2;
      1 /* foo *// 2;
      1/2;
      1./x;
      x/y;
      (x)/y;
      
      // test split over two lines.  line comment should not fool it
      1//
      /2;
      
      x++/y;
      x--/y;
      x[y] / z;
      f() / n;
      
      // test that slash after non postfix operator is start of regexp
      log('matches = ' + /foo/.test(foo));
      
      // test keyword preceders
      return /a regexp/;
      division = notreturn / not_a_regexp / 2;  // keyword suffix does not match
      
      // & not used as prefix operator in javascript but this should still work
      &/foo/;
      
      extends = /extends/;
      </pre>
      
      <h1>Issue 12 - Javascript Regular Expressions w/ language specified</h1>
      <pre class="prettyprint lang-js" id="issue12_lang">
      /foo/;  // a slash starting a line treated as a regexp beginning
      "foo".match(/fo+$/);
      // this line comment not treated as a regular expressions
      "foo /bar/".test(/"baz"/);  // test string and regexp boundaries
      var division = /\b\d+\/\d+/g;  // test char sets and escaping of specials
      var allSpecials = /([^\(\)\[\]\{\}\-\?\+\*\.\^\$\/]+)\\/;
      var slashInCharset = /[^/]/g, notCloseSq = /[^\]]/;
      
      // test that slash used in numeric context treated as an operator
      1 / 2;
      1. / x;
      x / y;
      (x) / y;
      1 /* foo */ / 2;
      1 /* foo *// 2;
      1/2;
      1./x;
      x/y;
      (x)/y;
      
      // test split over two lines.  line comment should not fool it
      1//
      /2;
      
      x++/y;
      x--/y;
      x[y] / z;
      f() / n;
      
      // test that slash after non postfix operator is start of regexp
      log('matches = ' + /foo/.test(foo));
      
      // test keyword preceders
      return /a regexp/;
      division = notreturn / not_a_regexp / 2;  // keyword suffix does not match
      
      // & not used as prefix operator in javascript but this should still work
      &/foo/;
      
      extends = /extends/;
      </pre>
      
      <h1>Coffee</h1>
      <pre class="prettyprint lang-coffee" id="coffee">
      class Animal
        constructor: (@name) ->
        move: (meters, loc) ->
          alert @name + " moved " + meters + "m."
        travel: (path...) ->
          for place in path
            @move place.distance, place.location
      
      class Horse extends Animal
        ###
        @param name Horse name
        @param jumper Jumping ability
        ###
        constructor: (name, jumper) ->
          super name
          @capable = jumper
        step: ->
          alert '''
                Step,
                step...
                '''
        jump: ->
          @capable
        move: (meters, where) ->
          switch where
            when "ground"
              @step()
              super meters
            when "hurdle"
              super meters if @jump()
      
      # Create horse
      tom = new Horse "Tommy", yes
      
      street =
        location: "ground"
        distance: 12
      car =
        location: "hurdle"
        distance: 2
      
      ###
      Tell him to travel:
      1. through the street
      2. over the car
      ###
      tom.travel street, car
      </pre>
      
      <h1>Perl</h1>
      <pre class="prettyprint" id="perl">
      #!/usr/bin/perl
      
      use strict;
      use integer;
      
      # the nth element of the fibonacci series
      # param n - an int >= 0
      # return an int >= 0
      sub fib($) {
        my $n = shift, $a = 1, $b = 1;
        ($a, $b) = ($a + $b, $a) until (--$n < 0);
        return $a;
      }
      
      print fib(10);
      </pre>
      
      <h1>Python</h1>
      <pre class="prettyprint" id="python">
      #!/usr/bin/python2.4
      
      def fib():
        '''
        a generator that produces the elements of the fibonacci series
        '''
      
        a = 1
        b = 1
        while True:
          a, b = a + b, a
          yield a
      
      def nth(series, n):
        '''
        returns the nth element of a series,
        consuming the earlier elements of the series
        '''
      
        for x in series:
          n = n - 1
          if n <= 0: return x
      
      print nth(fib(), 10)
      </pre>
      
      <h1>Python w/ language specified</h1>
      <pre class="prettyprint lang-py" id="python_lang">
      #!/usr/bin/python2.4
      
      def fib():
        '''
        a generator that produces the fibonacci series's elements
        '''
      
        a = 1
        b = 1
        while True:
          a, b = a + b, a
          yield a
      
      def nth(series, n):
        '''
        returns the nth element of a series,
        consuming the series' earlier elements.
        '''
      
        for x in series:
          n -= 1
          if n <= 0: return x
      
      print nth(fib(), 10)
      
      /* not a comment and not keywords: null char true */
      </pre>
      
      <h1>SQL w/ language specified</h1>
      <pre class="prettyprint lang-sql" id="sql_lang">
      /* A multi-line
       * comment */
      'Another string /* Isn\'t a comment',
      "A string */"
      -- A line comment
      SELECT * FROM users WHERE id IN (1, 2.0, +30e-1);
      -- keywords are case-insensitive.
      -- Note: user-table is a single identifier, not a pair of keywords
      select * from user-table where id in (x, y, z);
      </pre>
      
      <h1>XML</h1>
      <pre class="prettyprint" id="xml">
      &lt;!DOCTYPE series PUBLIC "fibonacci numbers"&gt;
      
      &lt;series.root base="1" step="s(n-2) + s(n-1)">
        &lt;element i="0"&gt;1&lt;/element&gt;
        &lt;element i="1"&gt;1&lt;/element&gt;
        &lt;element i="2"&gt;2&lt;/element&gt;
        &lt;element i="3"&gt;3&lt;/element&gt;
        &lt;element i="4"&gt;5&lt;/element&gt;
        &lt;element i="5"&gt;8&lt;/element&gt;
        ...
      &lt;/series.root&gt;
      </pre>
      
      <h1>HTML</h1>
      <pre class="prettyprint" id="html">
      &lt;html&gt;
        &lt;head>
          &lt;title&gt;Fibonacci number&lt;/title&gt;
          &lt;style&gt;&lt;!-- BODY { text-decoration: blink } --&gt;&lt;/style&gt;
          &lt;script src="foo.js"&gt;&lt;/script&gt;
          &lt;script src="bar.js"&gt;&lt;/script&gt;
        &lt;/head&gt;
        &lt;body>
          &lt;noscript&gt;
            &lt;dl&gt;
              &lt;dt&gt;Fibonacci numbers&lt;/dt&gt;
              &lt;dd&gt;1&lt;/dd&gt;
              &lt;dd&gt;1&lt;/dd&gt;
              &lt;dd&gt;2&lt;/dd&gt;
              &lt;dd&gt;3&lt;/dd&gt;
              &lt;dd&gt;5&lt;/dd&gt;
              &lt;dd&gt;8&lt;/dd&gt;
              &amp;hellip;
            &lt;/dl&gt;
          &lt;/noscript&gt;
      
          &lt;script type="text/javascript">&lt;!--
      function fib(n) {
        var a = 1, b = 1;
        var tmp;
        while (--n >= 0) {
          tmp = a;
          a += b;
          b = tmp;
        }
        return a;
      }
      
      document.writeln(fib(10));
      // --&gt;
          &lt;/script>
        &lt;/body&gt;
      &lt;/html&gt;
      </pre>
      
      <h1>HTML w/ language specified</h1>
      <pre class="prettyprint lang-html" id="html_lang">
      Fibonacci Numbers
      
      &lt;noscript&gt;
        &lt;dl style="list-style: disc"&gt;
          &lt;dt&gt;Fibonacci numbers&lt;/dt&gt;
          &lt;dd&gt;1&lt;/dd&gt;
          &lt;dd&gt;1&lt;/dd&gt;
          &lt;dd&gt;2&lt;/dd&gt;
          &lt;dd&gt;3&lt;/dd&gt;
          &lt;dd&gt;5&lt;/dd&gt;
          &lt;dd&gt;8&lt;/dd&gt;
          &amp;hellip;
        &lt;/dl&gt;
      &lt;/noscript&gt;
      
      &lt;script type="text/javascript">&lt;!--
      function fib(n) {
        var a = 1, b = 1;
        var tmp;
        while (--n >= 0) {
          tmp = a;
          a += b;
          b = tmp;
        }
        return a;
      }
      
      document.writeln(fib(10));
      // --&gt;
      &lt;/script>
      </pre>
      
      
      <h1>HTML using XMP</h1>
      <xmp class="prettyprint" id="htmlXmp"
      ><html>
        <head>
          <title>Fibonacci number</title>
        </head>
        <body>
          <noscript>
            <dl>
              <dt>Fibonacci numbers</dt>
              <dd>1</dd>
              <dd>1</dd>
              <dd>2</dd>
              <dd>3</dd>
              <dd>5</dd>
              <dd>8</dd>
              &hellip;
            </dl>
          </noscript>
      
          <script type="text/javascript"><!--
      function fib(n) {
        var a = 1, b = 1;
        var tmp;
        while (--n >= 0) {
          tmp = a;
          a += b;
          b = tmp;
        }
        return a;
      }
      
      document.writeln(fib(10));
      // -->
          </script>
        </body>
      </html>
      
      
      

      XHTML

      <xhtml>
        <head>
          <title>Fibonacci number</title>
        </head>
        <body onload="alert(fib(10))">
          <script type="text/javascript"><![CDATA[
      function fib(n) {
        var a = 1, b = 1;
        var tmp;
        while (--n >= 0) {
          tmp = a;
          a += b;
          b = tmp;
        }
        return a;
      }
      ]]>
          </script>
        </body>
      </xhtml>
      

      PHP

      <html>
        <head>
          <title><?= 'Fibonacci numbers' ?></title>
      
          <?php
            // PHP has a plethora of comment types
            /* What is a
               "plethora"? */
            function fib($n) {
              # I don't know.
              $a = 1;
              $b = 1;
              while (--$n >= 0) {
                echo "$a\n";
                $tmp = $a;
                $a += $b;
                $b = $tmp;
              }
            }
          ?>
        </head>
        <body>
          <?= fib(10) ?>
        </body>
      </html>
      

      XSL (Issue 19)

      <!-- Test elements and attributes with namespaces -->
      
      <xsl:stylesheet xml:lang="en">
        <xsl:template match=".">
          <xsl:text>Hello World</xsl:text>
        </xsl:template>
      </xsl:stylesheet>
      

      Whitespace

      
      
      

      Misc

      // ends with line comment token
      //

      User submitted testcase for Bug 4

      Javascript Snippets wrapped in HTML SCRIPT tags hides/destroys inner content

      <script type="text/javascript">
         var savedTarget=null;                           // The target layer (effectively vidPane)
         var orgCursor=null;                             // The original mouse style so we can restore it
         var dragOK=false;                               // True if we're allowed to move the element under mouse
         var dragXoffset=0;                              // How much we've moved the element on the horozontal
         var dragYoffset=0;                              // How much we've moved the element on the verticle
         vidPaneID = document.getElementById('vidPane'); // Our movable layer
         vidPaneID.style.top='75px';                     // Starting location horozontal
         vidPaneID.style.left='75px';                    // Starting location verticle
      <script>
      

      The fact that the script tag was not closed properly was causing PR_splitSourceNodes to end without emitting the script contents.

      Bug 8 - tabs mangled

      If tabs are used to indent code inside <pre> IE6 and 7 won't honor them after the script runs. Code indented with tabs will be shown aligned to the left margin instead of the proper indenting shown in Firefox. I'm using Revision 20 of prettify.js, IE 6.0.29.00 in English and IE 7.0.5730.11 in Spanish.

      one	Two	three	Four	five	|
      Six	seven	Eight	nine	Ten	|
      eleven	Twelve	thirteen	Fourteen	fifteen	|
      

      Bug 14a - does not recognize <br> as newline

      //comment
      int main(int argc, char **argv) {}

      Bug 14b - comments not ignored

      <!-- There's an HTML comment in my comment -->
      <p>And another one inside the end tag</p>
      

      Bug 20 - missing blank lines

      <html>
      
      <head>

      Bug 21 - code doesn't copy and paste well in IE

      <html>
        <head>
          <title>Test</title>
        </head>
      </html>

      To test this bug, disable overriding of _pr_isIE6 in test_base.js by putting #testcopypaste on the end of the URL and reloading the page, then copy and paste the above into Notepad.

      Bug 22 - Line numbers and other non-code spans in code

      01: // This is a line of code
      02: /* Multiline comments can
      03:  * span over and around
      04:  * line markers
      And can even be interrupted
      by inline code annotations
      05:  */
      06: class MyClass extends Foo {
      07:   public static void main(String... argv) {
      08:     System.out.print("Hello World");
      09:   }
      10: }

      Bug 24 - Lua Syntax Highlighting

      os=require("os")
      math=require("math")
      
      -- Examples from the language reference
           a = 'alo\n123"'
           a = "alo\n123\""
           a = '\97lo\10\04923"'
           a = [[alo
           123"]]
           a = [==[
           alo
           123"]==]
      
      3   3.0   3.1416   314.16e-2   0.31416E1   0xff   0x56
      
      -- Some comments that demonstrate long brackets
      double_quoted = "Not a long bracket [=["
      --[=[ quoting out
       [[ foo ]]
       [==[does not end comment either]==]
      ]=]
      past_end_of_comment
      --]=]
      
      -- Example code courtesy Joseph Harmbruster
      #
      do
        local function ssgeneral(t, n, before)
          for _, h in ipairs(incs) do
            for i = h + 1, n do
              local v = t[i]
              for j = i - h, 1, -h do
                local testval = t[j]
                if not before(v, testval) then break end
                t[i] = testval; i = j
              end
              t[i] = v
            end 
          end
          return t
        end
      
        function shellsort(t, before, n)
          n = n or #t
          if not before or before == "<" then return ssup(t, n)
          elseif before == ">" then return ssdown(t, n)
          else return ssgeneral(t, n, before)
          end
        end
        return shellsort
      end

      Bug 27 - VBScript w/ language specified

      Imports System
      
      Class [class]
          Shared Sub [shared](ByVal [boolean] As Boolean)
              If [boolean] Then
                  Console.WriteLine("true")
              Else
                  Console.WriteLine("false")
              End If
          End Sub
      End Class
      
      ' Comment
      ‘ Second Line comment with a smart quote _
        continued line using VB6 syntax.
      Module [module]
          Sub Main()
              [class].[shared](True)
      
              ' This prints out: ".
              Console.WriteLine("""")
      
              ' This prints out: a"b.
              Console.WriteLine("a""b")
      
              ' This prints out: a.
              Console.WriteLine("a"c)
      
              ' This prints out: ".
              Console.WriteLine(""""c)
      
              REM an old-style comment
              REMOVE(not_a_comment)
          End Sub
      End Module
      
      Dim d As Date
      d = # 8/23/1970 3:45:39AM #
      d = # 8/23/1970 #
      d = # 3:45:39AM #
      d = # 3:45:39 #
      d = # 13:45:39 #
      d = # 13:45:39PM #
      
      Dim n As Float
      n = (0.0, .99F, 1.0E-2D, 1.0E+3D, .5E4, 1E3R, 4D)
      
      Dim i As Integer
      i = (0, 123, 45L, &HA0I, &O177S)
      

      Bug 30 - Haskell w/ language specified

      -- A comment
      Not(--"a comment")
      Also.not(--(A.comment))
      
      module Foo(bar) where
      import Blah
      import BlahBlah(blah)
      import Monads(Exception(..), FIO(..),unFIO,handle,runFIO,fixFIO,fio,
                    write,writeln,HasNext(..),HasOutput(..))
      
      {- nested comments
       - don't work {-yet-} -}
      instance Thingy Foo where
        a = b
      
      data Foo :: (* -> * -> *) -> * > * -> * where
        Nil :: Foo a b c
        Cons :: a b c -> Foo abc -> Foo a b c
      
      str = "Foo\\Bar"
      char = 'x'
      Not.A.Char = 'too long'  -- Don't barf.  Show that 't is a lexical error.
      
      (ident, ident', Fo''o.b'ar)
      
      (0, 12, 0x45, 0xA7, 0o177, 0O377, 0.1, 1.0, 1e3, 0.5E-3, 1.0E+45)
      

      Bug 33 - OCaml and F#

      (*
       * Print the 10th fibonacci number
       *)
      
      //// A line comment
      "A string";;
      (0, 125, 0xa0, -1.0, 1e6, 1.2e-3);;  // number literals
      
      #if fibby
        let
          rec fib = function (0, a, _) -> a
                           | (n, a, b) -> fib(n - 1, a + b, a)
        in
          print_int(fib(10, 1, 1));;
      #endif
      
      let zed = 'z'
      
      let f' x' = x' + 1
      

      Still TODO: handle nested (* (* comments *) *) properly.

      Bug 42 - Lisp Syntax Highlighting

      ; -*- mode: lisp -*-
      
      (defun back-six-lines () (interactive) (forward-line -6))
      (defun forward-six-lines () (interactive) (forward-line 6))
      
      (global-set-key "\M-l" 'goto-line)
      (global-set-key "\C-z" 'advertised-undo)
      (global-set-key [C-insert] 'clipboard-kill-ring-save)
      (global-set-key [S-insert] 'clipboard-yank)
      (global-set-key [C-up] 'back-six-lines)
      (global-set-key [C-down] 'forward-six-lines)
      
      (setq visible-bell t)
      (setq user-mail-address "foo@bar.com")
      (setq default-major-mode 'text-mode)
      
      (setenv "TERM" "emacs")
      (c-set-offset 'case-label 2)
      (setq c-basic-offset 2)
      (setq perl-indent-level 0x2)
      (setq delete-key-deletes-forward t)
      (setq indent-tabs-mode nil)
      
      ;; Text mode
      (add-hook 'text-mode-hook 
        '(lambda ()
           (turn-on-auto-fill)
         )
      )
      
      ;; Fundamental mode
      (add-hook 'fundamental-mode-hook 
        '(lambda ()
           (turn-on-auto-fill)
         )
      )
      
      ;; Define and cond are keywords in scheme
      (define (sqt x) (sqrt-iter 1.0 2.0 x))
      

      Bug 45 - Square brackets in strings

      throw new RuntimeException("Element [" + element.getName() + 
        "] missing attribute.");
      variable++;
      

      Protocol Buffers

      message SearchRequest {
        required string query = 1;
        optional int32 page_number = 2;
        optional int32 result_per_page = 3 [default = 10];
        enum Corpus {
          UNIVERSAL = 0;
          WEB = 1;
          IMAGES = 2;
          LOCAL = 3;
          NEWS = 4;
          PRODUCTS = 5;
          VIDEO = 6;
        }
        optional Corpus corpus = 4 [default = UNIVERSAL];
      }

      Wiki syntax w/ language specified

      #summary hello world
      #labels HelloWorld WikiWord Hiya
      
      [http://www.google.com/?q=WikiSyntax+site:code.google.com WikiSyntax]
      
      Lorem Ipsum `while (1) print("blah blah");`
      
         * Bullet
         * Points
            * NestedBullet
      
      ==DroningOnAndOn==
      {{{
        // Some EmbeddedSourceCode
        void main() {
          Print('hello world');
        }
      }}}
      
      {{{
        <!-- Embedded XML -->
        <foo bar="baz"><boo /><foo>
      }}}
      

      CSS w/ language specified

      <!--
      @charset('UTF-8');
      
      /** A url that is not quoted. */
      @import(url(/more-styles.css));
      
      HTML { content-before: 'hello\20'; content-after: 'w\6f rld';
             -moz-spiff: inherit !important }
      
      /* Test units on numbers. */
      BODY { margin-bottom: 4px; margin-left: 3in; margin-bottom: 0; margin-top: 5% }
      
      /** Test number literals and quoted values. */
      TABLE.foo TR.bar A#visited { color: #001123; font-family: "monospace" }
      /** bolder is not a name, so should be plain.  !IMPORTANT is a keyword
        * regardless of case.
        */
      blink { text-decoration: BLINK !IMPORTANT; font-weight: bolder }
      /* Empty url() was causing infinite recursion */
      a { background-image: url(); }
      p#featured{background:#fea}
      -->
      

      Issue 79 CSS highlighting

      <style type='text/css'>
      /* desert scheme ported from vim to google prettify */
      code.prettyprint { display: block; padding: 2px; border: 1px solid #888;
      background-color: #333; }
      .str { color: #ffa0a0; } /* string  - pink */
      .kwd { color: #f0e68c; font-weight: bold; }
      .com { color: #87ceeb; } /* comment - skyblue */
      .typ { color: #98fb98; } /* type    - lightgreen */
      .lit { color: #cd5c5c; } /* literal - darkred */
      .pun { color: #fff; }    /* punctuation */
      .pln { color: #fff; }    /* plaintext */
      .tag { color: #f0e68c; font-weight: bold; } /* html/xml tag    - lightyellow*/
      .atn { color: #bdb76b; font-weight: bold; } /* attribute name  - khaki*/
      .atv { color: #ffa0a0; } /* attribute value - pink */
      .dec { color: #98fb98; } /* decimal         - lightgreen */
      </style>
      

      Issue 84 NBSPs

      super("&nbsp;");

      Issue 86

      #One Two words

      #One Two lines

      #One
      Two lines
      #One
      Two lines
      #One Two lines

      #One
      Two lines

      Issue 92 -- capital letters in tag names

      <?xml version="1.0" encoding="UTF-8"?>
      <kml xmlns="http://www.opengis.net/kml/2.2">
        <Placemark>
          <name>Simple placemark</name>
          <description Lang="en">Attached to the ground. Intelligently places itself 
             at the height of the underlying terrain.</description>
          <Point>
            <coordinates>-122.0822035425683,37.42228990140251,0</coordinates>
          </Point>
        </Placemark>
      </kml>
      

      Issue 93 -- C# verbatim strings

      // The normal string syntax
      string a = "C:\\";
      // is equivalent to a verbatim string
      string b = @"C:\";
      

      VHDL mode

      library ieee;
      use ieee.std_logic_1164.all;
      use ieee.numeric_std.all;
      
      -- A line comment
      entity foo_entity is
      
        generic (-- comment after punc
          a : natural := 42;
          x : real := 16#ab.cd#-3
        );
        port (
          clk_i : in  std_logic;
          b_i   : in  natural range 0 to 100;
          c_o   : out std_logic_vector(5 downto 0);
          \a "name"\ : out integer  -- extended identifier
        );
      
      end entity foo_entity;
      
      architecture foo_architecture of foo_entity is
        signal bar_s : std_logic_vector(2 downto 0);
      begin
        
        bar_s <= b"101";
      
        dummy_p : process (clk_i)
        begin
          if b_i = 1 then
            c_o <= (others => '0');
          elsif rising_edge(clk_i) then
            c_o <= "1011" & bar_s(1 downto 0);
          end if;
        end process dummy_p;
      
      end architecture foo_architecture;
      

      YAML mode

      application: mirah-lang
      version: 1
      
      # Here's a comment
      handlers:
        - url: /red/*
           servlet: mysite.server.TeamServlet
           init_params:
             teamColor: red
             bgColor: "#CC0000"
           name: redteam
        - url: /blue/*
           servlet: mysite.server.TeamServlet
           init_params:
             teamColor: blue
             bgColor: "#0000CC"
           name: blueteam
        - url: /register/*
           jsp: /register/start.jsp
        - url: *.special
           filter: mysite.server.LogFilterImpl
           init_params:
             logType: special
        
      %YAML 1.1
      ---
      !!map {
        ? !!str ""
        : !!str "value",
        ? !!str "explicit key"
        : !!str "value",
        ? !!str "simple key"
        : !!str "value",
        ? !!seq [
          !!str "collection",
          !!str "simple",
          !!str "key"
        ]
        : !!str "value"
      }

      Scala mode

      /* comment 1 */
      /*
      comment 2
      */
      /* comment / * comment 3 **/
      // strings
      "Hello, World!", "\n",
      `an-identifier`, `\n`,
      'A', '\n',
      'aSymbol,
      """Hello,
      World""", """Hello,\nWorld""",
      """Hello, "World"!""",
      """Hello, \"World\""""
      
      // Numbers
      0
      0123
      0xa0
      0XA0L
      123
      123.45
      1.50F
      0.50
      .50
      123e-1
      123.45e+1
      1.50e2
      0.50e-6
      .50e+42f
      
      // Values
      false, true, null, this;
      
      // Keywords
      class MyClass;
      import foo.bar;
      package baz;
      
      // From scala-lang.org/node/242
      def act() {
        var pongCount = 0
        loop {
          react {
            case Ping =>
              if (pongCount % 1000 == 0)
                Console.println("Pong: ping "+pongCount)
              sender ! Pong
              pongCount = pongCount + 1
            case Stop =>
              Console.println("Pong: stop")
              exit()
          }
        }
      }
      

      Go mode

      package main  /* Package of which this program is part. */
      
      import fmt "fmt"  // Package implementing formatted I/O.
      
      
      func main() {
          fmt.Printf("Hello, world; or Καλημέρα κόσμε; or こんにちは 世界\n")  // Semicolon inserted here
      }
      
      /* " */  "foo /* "  /*/  */
      /* ` */  `foo /* `  /*/  */
      

      Erlang mode

      % Sample comment
      
      -module(my_test).
      -include_lib("my_sample_lib.hrl").
      -export([
          test/2
      ]).
      
      %% @doc Define a macro
      -define(my_macro, Variable).
      
      %% @doc My function
      test(Variables, MoreVariables) ->
          % Inline comment
          {ok,Scanned,_} = my_lib:do_stuff(),
      
          Variable = fun(V) -> {ok, V} end,
      
          try ?my_macro({value, test}) of
              {value, Result, _} ->
                  {ok, Result}
          catch
              Type:Error ->
                  {'error', Type, Error}
          end.
      
      Test IE by copy/pasting content here. ================================================ FILE: google-code-prettify/tests/prettify_test_2.html ================================================ Code Prettifier

      XQuery mode

      From http://www.patrick-wied.at/static/xquery/prettify/
      (: 
      	Took some of Mike Brevoort's xquery code samples because they are nice and show common xquery syntax 
      :)
       
        (:~
         : Given a sequence of version URIs, publish all of these versions of each document
         : If there is a version of the same document already published, unpublish it 1st
         :
         : When "publish" is referred to, we mean that it is put into the PUBLISHED collection
         : unpublish removes content from this collection
         : @param $version_uris - sequence of uris of versions of managed documents to publish
         :)
        declare function comoms-dls:publish($version_uris as item()*) {
            for $uri in $version_uris
            let $doc := fn:doc($uri)
            let $managed_base_uri := $doc/node()/property::dls:version/dls:document-uri/text()
            let $existing :=  comoms-dls:publishedDoc($managed_base_uri)
            let $unpublishExisting := if($existing) then comoms-dls:unpublishVersion((xdmp:node-uri($existing)))  else ()
            let $addPermissions := dls:document-add-permissions($uri, (xdmp:permission('mkp-anon', 'read')))
            return
                dls:document-add-collections($uri, ("PUBLISHED"))    
        };
       
        declare function comoms-dls:publishLatest($uri) {
            (: TODO check if it's in the draft collection probably :)
       
            let $latest_version_uri := comoms-dls:latestVersionUri($uri)
            let $log:= xdmp:log(fn:concat("latest: ", $latest_version_uri))    
            let $log:= xdmp:log(fn:concat("uri: ", $uri))            
            return comoms-dls:publish($latest_version_uri)    
       
        };
       
        declare function comoms-dls:latestVersionUri($uri) {
            let $latest_version_num :=
                (
                for $version in dls:document-history($uri)/dls:version
                order by fn:number($version//dls:version-id/text()) descending
                return $version//dls:version-id/text()
                )[1]
       
       
            return dls:document-version-uri($uri, $latest_version_num)
        };
       
        declare function comoms-dls:unpublish($uris as item()*) {
            for $uri in $uris
            return
                let $published_doc := comoms-dls:publishedDoc($uri)
                return
                    if($published_doc) then
                        let $published_version_uri := xdmp:node-uri($published_doc)
                        return comoms-dls:unpublishVersion($published_version_uri)        
                    else
                        ()
        };
       
        declare function comoms-dls:latestPublishedDocAuthor($uri) {
            let $author_id := doc($uri)/property::dls:version/dls:author/text()
            return
                if($author_id) then
                    comoms-user:getUsername($author_id)
                else
                    ()
       
        };
       
        (:~
         : Given a sequence of version URIs, unpublish all of these versions of each document
         :)
        declare function comoms-dls:unpublishVersion($version_uris as item()*) {
            for $uri in $version_uris
            return
                let $removePermissions := dls:document-remove-permissions($uri, (xdmp:permission('mkp-anon', 'read')))
                return dls:document-remove-collections($uri, ("PUBLISHED"))        
        };
       
        (:~
         : Given the base URI of a managed piece of content, return the document of the node
         : of the version that is published
         :)
        declare function comoms-dls:publishedDoc($uri) {
            fn:collection("PUBLISHED")[property::dls:version/dls:document-uri = $uri]
        };
       
       
        (:~
         : Test if any version of the managed document is published
         :)
        declare function comoms-dls:isPublished($uri) {
            if( comoms-dls:publishedDoc($uri)) then
                fn:true()
            else
                fn:false()
        };
       
       
        declare function comoms-dls:publishedState($uri) {
            let $doc := comoms-dls:publishedDoc($uri)
            let $published_uri := if($doc) then xdmp:node-uri($doc) else ()
            let $latest := comoms-dls:latestVersionUri($uri)
            return
                if($doc) then
                    if($latest ne $published_uri) then
                        "stale"
                    else
                        "published"
                else
                    "unpublished"
        };
       
       
        declare function comoms-dls:getManagedDocUri($uri) {
            let $doc := fn:doc($uri)
            let $managed_uri := $doc/property::dls:version/dls:document-uri/text()
            let $managed_uri := if($managed_uri) then $managed_uri else $uri
            return $managed_uri
        };
       
        (:~
         : Given a manage content url (e.g. /content/123456.xml) return the appropriate
         : version of the document based on what stage collection is being viewed and
         : what's published
         :
         : @param $uri a manage content url (e.g. /content/123456.xml) - NOT A VERSIONED URI
         :)
        declare function comoms-dls:doc($uri) {
            let $doc := fn:root(comoms-dls:collection()[property::dls:version/dls:document-uri = $uri][1])
            return
                if($doc) then
                    $doc
                else
                    let $managedDocInCollection := comoms-dls:collection-name() = xdmp:document-get-collections($uri)
                    return
                        if($managedDocInCollection) then
                            fn:doc($uri)
                        else
                            ()
        };
       
        (:~
         : Get the collection to be used when querying for content
         : THIS or comoms-dls:collection-name() SHOULD BE USED WHEN BUILDING ANY QUERY FOR MANAGED CONTENT
         :)
        declare function comoms-dls:collection()  {
            fn:collection( comoms-dls:collection-name() )
        };
       
        (:~
         : Get the collection nameto be used when querying for content
         : THIS or comoms-dls:collection() SHOULD BE USED WHEN BUILDING ANY QUERY FOR MANAGED CONTENT
         :)
        declare function comoms-dls:collection-name() as xs:string {
            let $default_collection := "PUBLISHED"
            return
                if(comoms-user:isAdmin()) then
                    let $pub_stage_collection_cookie := comoms-util:getCookie("COMOMS_COLLECTION")
                    return
                        if($pub_stage_collection_cookie) then
                            $pub_stage_collection_cookie
                        else
                            $default_collection
                else
                    $default_collection
        };
       
        (:~
         : Check if the published collection is being viewed
         :)
        declare function comoms-dls:isViewingPublished() {
            if(comoms-dls:collection-name() = "PUBLISHED") then
                fn:true()
            else
                fn:false()
        };
       
        (:~
         : Get the best URL for the content URI.
         : This is either the default URI based on detail type or should also take
         : into account friendly urls and navigation structures to figure out the
         : best choice
         :)
        declare function comoms-dls:contentUrl($uri) {
       
            (: TODO: add friendly URL and nav structure logic 1st :)
       
            let $doc := fn:doc($uri)
            let $managedDocUri := $doc/property::dls:version/dls:document-uri
            let $uri := if($managedDocUri) then $managedDocUri else $uri
            let $type := $doc/node()/fn:name()
            let $content_id := fn:tokenize( fn:tokenize($uri, "/")[3], "\.")[1]
            return
                fn:concat("/", $type, "/", $content_id)
        };
       
        (:
         :
         :  gets list of doc versions and uri.
         :
         :)
        declare function comoms-dls:versionHistory($uri) {
            let $published_doc := comoms-dls:publishedDoc($uri)
            let $published_uri := if($published_doc) then xdmp:node-uri($published_doc) else ()
            return
            <versions>
                {
                for $version in dls:document-history($uri)/dls:version
                  let $version_num := $version/dls:version-id/text()
                  let $created := $version/dls:created/text()
                  let $author_id := $version/dls:author/text()
                  let $author := comoms-user:getUsername($author_id)
       
       
                  let $note := $version/dls:annotation/text()
                  let $version_uri := xdmp:node-uri(dls:document-version($uri, $version_num))
                  let $published := $published_uri eq $version_uri
                  return
                    <version>
                        <version-number>{$version_num}</version-number>
                        <created>{$created}</created>                
                        <author>{$author}</author>
                        <published>{$published}</published>
                        <version-uri>{$version_uri}</version-uri>
                    </version>  
                }        
            </versions>
        };
       
       
       
       
       
       
        (: ########################################################################### :)
        (: PRIVATE FUNCTIONS :)
        (: ########################################################################### :)
       
        declare function comoms-dls:_import() {
            "xquery version '1.0-ml';
             import module namespace dls = 'http://marklogic.com/xdmp/dls' at '/MarkLogic/dls.xqy'; "
        };  
       
      (: ----
      ---- :)
      xquery version '1.0-ml';
      declare variable $URI as xs:string external;
       
      declare function local:document-move-forest($uri as xs:string, $forest-ids as xs:unsignedLong*)
      {
        xdmp:document-insert(
          $uri,
          fn:doc($uri),
          xdmp:document-get-permissions($uri),
          xdmp:document-get-collections($uri),
          xdmp:document-get-quality($uri),
          $forest-ids
        )
      };
       
      let $xml :=
        <xml att="blah" att2="blah">
          sdasd<b>asdasd</b>
        </xml>
      (: -------- :)
      for $d in fn:doc("depts.xml")/depts/deptno
      let $e := fn:doc("emps.xml")/emps/emp[deptno = $d]
      where fn:count($e) >= 10
      order by fn:avg($e/salary) descending
      return
         <big-dept>
            {
            $d,
            <headcount>{fn:count($e)}</headcount>,
            <avgsal>{fn:avg($e/salary)}</avgsal>
            }
         </big-dept>
      (: -------- :)
      declare function local:depth($e as node()) as xs:integer
      {
         (: A node with no children has depth 1 :)
         (: Otherwise, add 1 to max depth of children :)
         if (fn:empty($e/*)) then 1
         else fn:max(for $c in $e/* return local:depth($c)) + 1
      };
       
      local:depth(fn:doc("partlist.xml"))
       
      (: -------- :)
      <html><head/><body>
      {
        for $act in doc("hamlet.xml")//ACT
        let $speakers := distinct-values($act//SPEAKER)
        return
          <div>{ string($act/TITLE) }</h1>
            <ul>
            {
              for $speaker in $speakers
              return <li>{ $speaker }</li>
            }
            </ul>
          </div>
      }
      </body></html>
      (: -------- :)
      {
      	for $book in doc("books.xml")//book
              return
      	if (contains($book/author/text(),"Herbert") or contains($book/author/text(),"Asimov"))
      		then $book
      	else $book/text()
      	
      	let $let := <x>"test"</x>
      	return element element {
      	attribute attribute { 1 },
      	element test { 'a' },
      	attribute foo { "bar" },
      	fn:doc()[ foo/@bar eq $let ],
      	//x }
      }
      (: -------- :)
      <bib>
       {
        for $b in doc("http://bstore1.example.com/bib.xml")/bib/book
        where $b/publisher = "Addison-Wesley" and $b/@year > 1991
        return
          <book year="{ $b/@year }">
           { $b/title }
          </book>
       }
      </bib>
      (: -------- :)
      

      Nemerle code

      class Set ['a]
      {
        mutable storage : list ['a] = [];
        public Add (e : 'a) : void
        {
          when (! Contains (e))
            storage ::= e;
        }
        public Contains (e : 'a) : bool
        {
          storage.Contains (e)
        }
      }
       
      def s1 = Set ();
      s1.Add (3);
      s1.Add (42);
      assert (s1.Contains (3));
      // s1.Add ("foo"); // error here!
      def s2 = Set ();
      s2.Add ("foo");
      assert (s2.Contains ("foo"));
      

      Tex support

      % resume.tex
      % vim:set ft=tex spell:
      \documentclass[10pt,letterpaper]{article}
      \usepackage[letterpaper,margin=0.8in]{geometry}
      \usepackage{mdwlist}
      \usepackage[T1]{fontenc}
      \usepackage{textcomp}
      \pagestyle{empty}
      \setlength{\tabcolsep}{0em}
      

      Issue 144

      Escaped quotes in bash.
      #! /bin/bash
      # toascii.sh
      for i in $(echo $* | fold -w 1);do
        printf "%x " \'$i;
      done;
      echo
      

      Issue 145

      <script type="text/javascript">
      <!--
              var target = $$.css('backgroundImage').replace(/^url[\(\)'"]/g, '');
      
              // nice long chain: wrap img element in span
              $$.wrap('<span style="position: relative;"></span>')
      -->
      </script>
      

      Clojure Syntax Highlighting

      ; Clojure test comment
      (ns test
       (:gen-class))
      
      (def foo "bar")
      (defn bar [arg1 arg2 & args]
        "sample function"
        (for [arg args]
          (prn arg)))
      
      (bar "foo" "bar" "blah" :baz)
      

      HTML 5 language on code

      The text is specified to be lisp by the class attribute. Semicolon is normally a valid punctuation character but in lisp it is a comment so should be colored as a comment if the className is being properly parsed.

      ; foo

      HTML 5 language on nested code element

      The language is attached to a CODE element inside a PRE.

      ; foo

      HTML 5 language on nested code element not foiled by space

      The language is attached to a CODE element inside a PRE and there is space between the PRE element's tags and CODE element's tags.

      
      ; foo
      
      

      HTML 5 nested code element language ignored if not only content

      The below is not treated as lisp despite there being a lisp language specifier on the contained CODE element, the CODE element does not wrap all non-space content.

      before CODE
      ; foo
      

      The language is attached to an HTML5 comment that looks like an XML processing instruction.

      ; foo

      The language is attached to a regular HTML5 comment that looks like an XML processing instruction.

      ; foo

      The language is attached to a regular HTML5 comment that looks like an XML processing instruction.

      ; foo

      The language is attached to a regular HTML5 comment that looks like an XML processing instruction.

      ; foo

      Issues 185 and 261: Don't reprettify prettified content

      "No tag backs."
      1. "No tag backs."

      Issue 201: C type not full word

      static Persistent<String> listeners_symbol;

      Pascal w/ language specified

      (* some comment here *)
      PROCEDURE TestCase.AssertEquals(msg:String; expect, act:Longint);
      VAR ex, ac:String;
      BEGIN
        IF expect <> act THEN
        BEGIN
          Str(expect, ex);
          Fail(Concat(msg,' expected ',ex,' but was ',ac));
        END;
      
        factors := new(ArrayListPtr, Init);
      
        FOR candidate := 2 TO i DO
        BEGIN
          WHILE i MOD candidate = 0 DO
          BEGIN
            factors^.Add(candidate);
            i := i DIV candidate;
          END;
        END;
      END;
      

      BASIC w/ language specified

      200 REM ----- method teardown
      210 PRINT "green"
      220 RETURN
      470 IF af=0 THEN GOTO 520
      480 FOR j=1 TO af
      500 ac=pf(j) : me$=STR$(j)+". factor" : GOSUB 100
      510 NEXT
      530 RETURN
      1000 DATA "one", 1, 0
      

      Dart language handler

      part of myLib;
      
      part 'something.dart';
      
      import 'dart:math' as test show foo, bar;
      
      class Point {
        final num x, y;
      
        Point(this.x, this.y);
        Point.zero() : x = 0, y = 0;  // Named constructor
                                      // with an initializer list.
      
        num distanceTo(Point other) {
          var dx = x - other.x;
          var dy = y - other.y;
          return sqrt(dx * dx + dy * dy);
        }
      }
      
      // This is a single-line comment.
      
      /*
      This is a
      multiline comment.
      */
      
      main() {
        Point p = new Point(7, 12);
        String thing = 'It\'s awesome!';
        String thing2 = '''
      This is a test! \'''
      This is the end of the test''';
        String thing3 = r"""
      This is a raw
      multiline string!""";
        num x = 0x123ABC;
        num y = 1.8e-12;
        bool flag = false;
        String raw = r"This is a raw string, where \n doesn't matter";
      }
      

      TCL_lang

      #!/bin/tclsh
      proc fib {n} {
          set a 0
          set b 1
          while {$n > 0} {
              set tmp $a
              set a [expr $a + $b]
              set b $tmp
              incr n -1
          }
          return $a
      }
      

      R, S language support

      ### Example R script for syntax highlighting
      
      # This is a comment
      
      ## Valid names
      abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUV0123456789._a <- NULL
      .foo_ <- NULL
      ._foo <- NULL
      
      ## Invalid names
      0abc <- NULL
      .0abc <- NULL
      abc+cde <- NULL
      
      ## Reserved Words
      NA
      NA_integer_
      NA_real_
      NA_character_
      NA_complex_
      NULL
      NaN
      Inf
      ## Not reserved
      NULLa <- NULL
      NULL1 <- NULL
      NULL. <- NULL
      NA_foo_ <- NULL
      
      ## Numbers
      12345678901
      123456.78901
      123e3
      123E3
      1.23e-3
      1.23e3
      1.23e-3
      ## integer constants
      123L
      1.23L
      ## imaginary numbers
      123i
      -123i
      123e4i
      123e-4i
      ## Hex numbers
      0xabcdefABCDEF01234
      0xabcp123
      0xabcP123
      ## Not hex
      0xg
      
      ## Special operators %xyz%
      ## %xyz%
      1 %% 2
      diag(2) %*% diag(2)
      1 %/% 2
      1 %in% 1:10
      diag(2) %o% diag(2)
      diag(2) %x% diag(2)
      `%foo bar%` <- function(x, y) x + y
      1 %foo bar% 2
      
      ## Control Structures (3.2) and Function
      ## if, else
      if (TRUE) print("foo") else print("bar")
      ## For, in
      for(i in 1:5) {
          print(i)
      }
      ## While, break
      i <- 1
      while (TRUE) {
          i <- i + 1
          if (i > 3) break
      }
      ## Repeat
      repeat {1+1}
      ## Switch
      x <- 3
      switch(x, 2+2, mean(1:10), rnorm(5))
      ## Function, dot-dot-dot, return
      foo <- function(...) {
          return(sum(...))
      }
      # Not keywords
      functiona <- 2 + 2
      function. <- 2 + 2
      function1 <- 2 + 2
      
      
      ## Grouping Tokens 10.3.7
      ## Parentheses
      1 + (2 + 3)
      ## brackets
      foo <- function(a) {
          a + 1
      }
      
      ## Indexing 10.3.8
      ## []
      bar <- 1:10
      bar[3]
      ## [[]]
      foo <- list(a=1, b=2, c=3)
      foo[["a"]]
      ## $
      foo$a
      foo$"a"
      
      ## Operators
      2 - 2
      2 + 2
      2 ~ 2
      ! TRUE
      ?"help"
      1:2
      2 * 2
      2 / 2
      2^2
      2 < 2
      2 > 2
      2 == 2
      2 >= 2
      2 <= 2
      2 != 2
      TRUE & FALSE
      TRUE && FALSE
      TRUE | FALSE
      TRUE || FALSE
      foo <- 2 + 2
      foo = 2 + 2
      2 + 2 -> foo
      foo <<- 2 + 2
      2 + 2 ->> foo
      base:::sum
      base::sum
      
      ## Strings
      foo <- "hello, world!"
      foo <- 'hello, world!'
      foo <- "Hello, 'world!"
      foo <- 'Hello, "world!'
      foo <- 'Hello, \'world!\''
      foo <- "Hello, \"world!\""
      foo <- "Hello,
      world!"
      foo <- 'Hello,
      world!'
      
      ## Backtick strings
      `foo123 +!"bar'baz` <- 2 + 2
      

      MUMPS

      HDR ; -- prt/display header
       N X,I
       I '$D(VALMHDR) X:$G(VALM("HDR"))]"" VALM("HDR")
       ; -- prt hdr line
       W:'$D(VALMPG1) @IOF K VALMPG1
       W:VALMCC $C(13)_IOUON_$C(13)_IOINHI_$C(13)       ; -- turn on undln/hi
       I $E(IOST,1,2)="C-" D IOXY^VALM4(0,0)            ; -- position cursor
       W $E(VALM("TITLE"),1,30)                         ; -- prt title
       W:VALMCC IOINORM,IOUON                           ; -- turn off hi
       W $J("",30-$L(VALM("TITLE")))                    ; -- fill in w/blanks
       I $E(IOST,1,2)="C-" W $C(13) D IOXY^VALM4(30,0)  ; -- position cursor
       W $J("",((VALMWD-80)/2)),$$HTE^XLFDT($H,1),$J("",10+((VALMWD-80)/2)),"Page: ",$J(VALMPGE,4)," of ",$J($$PAGE^VALM4(VALMCNT,VALM("LINES")),4)_$S($D(VALMORE):"+",1:" ") ; -- prt rest of hdr
       W:VALMCC IOUOFF I $E(IOST,1,2)="C-" D IOXY^VALM4(0,0) ; -- turn off undln
       F I=1:1:VALM("TM")-3 W !,$S('$D(VALMHDR(I)):"",$L(VALMHDR(I))>(VALMWD-1):$$EXTRACT^VALM4($G(VALMHDR(I))),1:VALMHDR(I)) ; -- prt hdr
       Q
      

      LLVM

      Hello world module
      ; Declare the string constant as a global constant.
      @.str = private unnamed_addr constant [13 x i8] c"hello world\0A\00"
      
      ; External declaration of the puts function
      declare i32 @puts(i8* nocapture) nounwind
      
      ; Definition of main function
      define i32 @main() {   ; i32()*
        ; Convert [13 x i8]* to i8  *...
        %cast210 = getelementptr [13 x i8]* @.str, i64 0, i64 0
      
        ; Call puts function to write out the string to stdout.
        call i32 @puts(i8* %cast210)
        ret i32 0
      }
      
      ; Named metadata
      !1 = metadata !{i32 42}
      !foo = !{!1, null}
      

      Issue 217 : Regex following '!'

      if(!/^https?:\/\//i.test(val) && foo == 'bar') {
          val = 'http://' + val;
      }
      

      Issue 32 : Matlab

      %%%%%%%%%%%%%%%%%% DATA TYPES %%%%%%%%%%%%%%%%%%
      
      v = [1,2,3;4,5,6];
      v(v>4) = 0;
      
      s = struct('key',1, 'key2','string');
      s.key = 2;
      
      C = cell(1,2);
      C{1,1} = 0:9;
      
      double(1)
      single(1)
      uint8(1)
      int8(1)
      
      %%%%%%%%%%%%%%%%%% STRINGS & TRANSPOSE %%%%%%%%%%%%%%%%%%
      
      plot(data');
      legend(labels)
      
      str = 'asdasd';     % this is a string
      str = 'asdas';
      str = 'sdasd''sdasd';
      
      str = ['one' 'two' 'three'];
      str = strcat('one', 'two', 'three');
      
      % matrix transpose
      M = rand(3,3)';
      x = M.';
      x = [10 20; 30, 40]';
      disp(x')
      fprintf('%d\n', x(:)')      % with comment
      {1,2}'                      % another comment
      
      %%%%%%%%%%%%%%%%%% LINE CONTINUATION %%%%%%%%%%%%%%%%%%
      
      [1 20; ...
      30 4]
      
      ['gdgsd'...
      'sdfs']
      
      {...
      'sdasd' ;
      'asdsad'}
      
      %%%%%%%%%%%%%%%%%% SYSTEM COMMANDS %%%%%%%%%%%%%%%%%%
      
      !touch file.txt
      
      %%%%%%%%%%%%%%%%%% COMMAND OUTPUT %%%%%%%%%%%%%%%%%%
      
      >> 1+1
      ans =
           2
      
      >> 1+1
      
      ans =
      
           2
      
      %%%%%%%%%%%%%%%%%% KEYWORDS %%%%%%%%%%%%%%%%%%
      
      function ret = fcn(in)
      	ret = sum(in.^2);
      end
      
      classdef CC < handle
      	properties (SetAccess = public)
      		x = 0;
      	end
      	methods
      		function this = CC(varargin)
      			this.x = 9;
      		end
      	end
      end
      
      x = [];
      parfor i=1:10
      	x[i] = i;
      end
      
      true ~= false
      
      if x==1
      	true
      elseif
      	false
      else
      	return
      end
      
      while true
      	continue
      	break
      end
      
      try
      	error('aa:aa', 'asdasd')
      catch ME
      	warning(ME)
      end
      
      switch x
      	case 1
      		disp(1)
      	otherwise
      		0
      end
      
      %%%%%%%%%%%%%%%%%% NUM LITERALS %%%%%%%%%%%%%%%%%%
      
      1
      1.
      .1
      1.0
      -1
      -1.
      -.1
      -1.0
      +10
      +01.
      +.1
      +1.0
      1e1
      1e-1
      1.e1
      1.e-1
      1.0e1
      1.0e-1
      .1e1
      .1e-1
      -.1e+1
      +1.e-1
      
      1i
      .10j
      -1.001i
      +1e-100j
      -.10e-01i
      
      % unary vs binary operators
      1+1
      1+ 1
      1 +1
      1 + 1
      +1+1
      +1+ 1
      +1 +1
      +1 + 1
      
      %%%%%%%%%%%%%%%%%% COMMENTS %%%%%%%%%%%%%%%%%%
      
      % % comment % %
         % comment
      % comment
      %# comment
      %% comment
      %#x = sum(x);
      
      %{
      block comment
      %}
      
      %{
      %}
      
      %{
      
      %}
      
      %{
      1
      2
      %}
      
      %{
      % sdf {}
      sdf
      %asda{}
      sfds
      %}
      
          %{
      dsf
              %}
      
      %{%}
      
      %{ zzz=10; %}
      
      %{%x=10;%}
      
      %{  x
      a=10;
      %}
      
      %{
      %a=10;
      %}   x
      
      % nested block comments fail
      %{
      dfsdf
      %{
      xxx
      %}
      dfsdf
      %}
      
      % fails here!
      %{
      x=10;
      %%{
      %%}
      y=20;
      %}
      
      ================================================ FILE: google-code-prettify/tests/run_prettify_test.html ================================================ Run_Prettify Test
      <div style="color: #f00">
        Hello, World!
      </div>
      
      ================================================ FILE: google-code-prettify/tests/test_base.js ================================================ // get accurate timing. // This file must be loaded after prettify.js for this to work. PR_SHOULD_USE_CONTINUATION = false; var attribToHtml, textToHtml; var getInnerHtml; (function () { /** is the given node's innerHTML normally unescaped? */ function isRawContent(node) { return 'XMP' === node.tagName; } var newlineRe = /[\r\n]/g; /** * Are newlines and adjacent spaces significant in the given node's innerHTML? */ function isPreformatted(node, content) { // PRE means preformatted, and is a very common case, so don't create // unnecessary computed style objects. if ('PRE' === node.tagName) { return true; } if (!newlineRe.test(content)) { return true; } // Don't care var whitespace = ''; // For disconnected nodes, IE has no currentStyle. if (node.currentStyle) { whitespace = node.currentStyle.whiteSpace; } else if (window.getComputedStyle) { // Firefox makes a best guess if node is disconnected whereas Safari // returns the empty string. whitespace = window.getComputedStyle(node, null).whiteSpace; } return !whitespace || whitespace === 'pre'; } // Define regexps here so that the interpreter doesn't have to create an // object each time the function containing them is called. // The language spec requires a new object created even if you don't access // the $1 members. var pr_amp = /&/g; var pr_lt = //g; var pr_quot = /\"/g; /** escapest html special characters to html. */ textToHtml = function (str) { return str.replace(pr_amp, '&') .replace(pr_lt, '<') .replace(pr_gt, '>'); }; /** like textToHtml but escapes double quotes to be attribute safe. */ attribToHtml = function (str) { return str.replace(pr_amp, '&') .replace(pr_lt, '<') .replace(pr_gt, '>') .replace(pr_quot, '"'); }; var PR_innerHtmlWorks = null; getInnerHtml = function (node) { // inner html is hopelessly broken in Safari 2.0.4 when the content is // an html description of well formed XML and the containing tag is a PRE // tag, so we detect that case and emulate innerHTML. if (null === PR_innerHtmlWorks) { var testNode = document.createElement('PRE'); testNode.appendChild( document.createTextNode('\n')); PR_innerHtmlWorks = !/)[\r\n]+/g, '$1') .replace(/(?:[\r\n]+[ \t]*)+/g, ' '); } return content; } var out = []; for (var child = node.firstChild; child; child = child.nextSibling) { normalizedHtml(child, out); } return out.join(''); }; })(); function normalizedHtml(node, out, opt_sortAttrs) { switch (node.nodeType) { case 1: // an element var name = node.tagName.toLowerCase(); out.push('<', name); var attrs = node.attributes; var n = attrs.length; if (n) { if (opt_sortAttrs) { var sortedAttrs = []; for (var i = n; --i >= 0;) { sortedAttrs[i] = attrs[i]; } sortedAttrs.sort(function (a, b) { return (a.name < b.name) ? -1 : a.name === b.name ? 0 : 1; }); attrs = sortedAttrs; } for (var i = 0; i < n; ++i) { var attr = attrs[i]; if (!attr.specified) { continue; } out.push(' ', attr.name.toLowerCase(), '="', attribToHtml(attr.value), '"'); } } out.push('>'); for (var child = node.firstChild; child; child = child.nextSibling) { normalizedHtml(child, out, opt_sortAttrs); } if (node.firstChild || !/^(?:br|link|img)$/.test(name)) { out.push('<\/', name, '>'); } break; case 3: case 4: // text out.push(textToHtml(node.nodeValue)); break; } } /** * @param golden a mapping from IDs of prettyprinted chunks to an abbreviated * form of the expected output. See "var goldens" in prettify_test.html * for an example. */ function go(goldens) { startClock(); prettyPrint(function () { stopClock(); runTests(goldens); }); } function runTests(goldens) { /** number of characters in common at the end up to max. */ function commonPrefix(a, b) { var n = Math.min(a.length, b.length); var i; for (i = 0; i < n; ++i) { if (a.charAt(i) !== b.charAt(i)) { break; } } return i; } /** number of characters in common at the end up to max. */ function commonSuffix(a, b, max) { var n = Math.min(a.length - max, b.length - max); var i; for (i = 0; i < n; ++i) { if (a.charAt(a.length - i - 1) !== b.charAt(b.length - i - 1)) { break; } } return i; } /** convert a plain text string to html by escaping html special chars. */ function html(plainText) { return attribToHtml(plainText).replace(/\xa0/g, ' '); } /** * get normalized markup. innerHTML varies enough across browsers that we * can't use it. */ function normalizedInnerHtml(node) { var out = []; for (var child = node.firstChild; child; child = child.nextSibling) { normalizedHtml(child, out, true); } out = out.join(''); // more normalization to work around problems with non-ascii chars in // regexps in Safari for (var i = 0; (i = out.indexOf('\xa0')) >= 0;) { out = out.substring(0, i) + ' ' + out.substring(i + 1); } return out.replace(/\r\n?/g, '\n'); } var htmlOut = []; var failures = 0; document.getElementById('errorReport').innerHTML = '

      Running tests…<\/h1>'; htmlOut.push('

      Test results<\/h1>'); for (var lang in goldens) { var container = document.getElementById(lang); // Convert abbreviations that start with `. var golden = goldens[lang].replace(/`([A-Z]{3})/g, function (_, lbl) { return (lbl == 'END' ? '<\/span>' : ''); }) // Line numbers .replace(/`#(?![0-9])/, '
    4. ') .replace(/`#([0-9])/g, '
    5. '); var actual = normalizedInnerHtml(container); if (golden !== actual) { // test failed // write out var pre = commonPrefix(golden, actual); var post = commonSuffix(golden, actual, pre); ++failures; htmlOut.push( '

      ' + html(lang) + '<\/a> Failed<\/h2>'); htmlOut.push( '' + html(golden.substring(0, pre)) + '»' + html(golden.substring(pre, golden.length - post)) + '<\/span>«' + html(golden.substring(golden.length - post)) + '
      !==
      ' + html(actual.substring(0, pre)) + '»' + html(actual.substring(pre, actual.length - post)) + '<\/span>«' + html(actual.substring(actual.length - post)) + '<\/tt>'); } else { htmlOut.push( '

      ' + html(lang) + '<\/a> OK<\/h2>'); } } var summary = ( failures ? (failures + ' test' + (failures === 1 ? '' : 's') + ' failed') : 'Tests Passed'); var summaryStr = '

      ' + summary + '<\/h2>'; htmlOut.push(summaryStr); htmlOut.splice(0, 0, summaryStr); document.title += ' \u2014 ' + summary; document.getElementById('errorReport').innerHTML = htmlOut.join('').replace(/<br>/g, '<br>\n'); } var startTime = null; function startClock() { startTime = (new Date).getTime(); } function stopClock() { var delta = (new Date).getTime() - startTime; startTime = null; document.getElementById('timing').innerHTML = 'Took ' + delta + ' ms'; } ================================================ FILE: google-code-prettify/tests/test_styles.css ================================================ /* Used by error reporting code in test_base.js */ .mismatch { background: #fee; font-weight: bold } span.annot { margin:2px 2px 2px 3em; border:1px dotted #88f; background:#eef; padding: 0 2px 0 2px } .nocode { background: #f8f8f8 } ================================================ FILE: google-code-prettify/tools/closure-compiler/COPYING ================================================ Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ================================================ FILE: google-code-prettify/tools/closure-compiler/README ================================================ /* * Copyright 2009 The Closure Compiler Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ // // Contents // The Closure Compiler performs checking, instrumentation, and optimizations on JavaScript code. The purpose of this README is to explain how to build and run the Closure Compiler. The Closure Compiler requires Java 6 or higher. http://www.java.com/ // // Building The Closure Compiler // There are three ways to get a Closure Compiler executable. 1) Use one we built for you. Pre-built Closure binaries can be found at http://code.google.com/p/closure-compiler/downloads/list 2) Check out the source and build it with Apache Ant. First, check out the full source tree of the Closure Compiler. There are instructions on how to do this at the project site. http://code.google.com/p/closure-compiler/source/checkout Apache Ant is a cross-platform build tool. http://ant.apache.org/ At the root of the source tree, there is an Ant file named build.xml. To use it, navigate to the same directory and type the command ant jar This will produce a jar file called "build/compiler.jar". 3) Check out the source and build it with Eclipse. Eclipse is a cross-platform IDE. http://www.eclipse.org/ Under Eclipse's File menu, click "New > Project ..." and create a "Java Project." You will see an options screen. Give the project a name, select "Create project from existing source," and choose the root of the checked-out source tree as the existing directory. Verify that you are using JRE version 6 or higher. Eclipse can use the build.xml file to discover rules. When you navigate to the build.xml file, you will see all the build rules in the "Outline" pane. Run the "jar" rule to build the compiler in build/compiler.jar. // // Running The Closure Compiler // Once you have the jar binary, running the Closure Compiler is straightforward. On the command line, type java -jar compiler.jar This starts the compiler in interactive mode. Type var x = 17 + 25; then hit "Enter", then hit "Ctrl-Z" (on Windows) or "Ctrl-D" (on Mac or Linux) and "Enter" again. The Compiler will respond: var x=42; The Closure Compiler has many options for reading input from a file, writing output to a file, checking your code, and running optimizations. To learn more, type java -jar compiler.jar --help You can read more detailed documentation about the many flags at http://code.google.com/closure/compiler/docs/gettingstarted_app.html // // Compiling Multiple Scripts // If you have multiple scripts, you should compile them all together with one compile command. java -jar compiler.jar --js=in1.js --js=in2.js ... --js_output_file=out.js The Closure Compiler will concatenate the files in the order they're passed at the command line. If you need to compile many, many scripts together, you may start to run into problems with managing dependencies between scripts. You should check out the Closure Library. It contains functions for enforcing dependencies between scripts, and a tool called calcdeps.py that knows how to give scripts to the Closure Compiler in the right order. http://code.google.com/p/closure-library/ // // Licensing // Unless otherwise stated, all source files are licensed under the Apache License, Version 2.0. ----- Code under: src/com/google/javascript/rhino test/com/google/javascript/rhino URL: http://www.mozilla.org/rhino Version: 1.5R3, with heavy modifications License: Netscape Public License and MPL / GPL dual license Description: A partial copy of Mozilla Rhino. Mozilla Rhino is an implementation of JavaScript for the JVM. The JavaScript parser and the parse tree data structures were extracted and modified significantly for use by Google's JavaScript compiler. Local Modifications: The packages have been renamespaced. All code not relavant to parsing has been removed. A JSDoc parser and static typing system have been added. ----- Code in: lib/libtrunk_rhino_parser_jarjared.jar Rhino URL: http://www.mozilla.org/rhino Version: Trunk License: Netscape Public License and MPL / GPL dual license Description: Mozilla Rhino is an implementation of JavaScript for the JVM. Local Modifications: None. We've used JarJar to renamespace the code post-compilation. See: http://code.google.com/p/jarjar/ ----- Code in: lib/args4j.jar Args4j URL: https://args4j.dev.java.net/ Version: 2.0.12 License: MIT Description: args4j is a small Java class library that makes it easy to parse command line options/arguments in your CUI application. Local Modifications: None. ----- Code in: lib/guava.jar Guava Libraries URL: http://code.google.com/p/guava-libraries/ Version: R7 License: Apache License 2.0 Description: Google's core Java libraries. Local Modifications: None. ----- Code in: lib/jsr305.jar Annotations for software defect detection URL: http://code.google.com/p/jsr-305/ Version: svn revision 47 License: BSD License Description: Annotations for software defect detection. Local Modifications: None. ---- Code in: lib/junit.jar JUnit URL: http://sourceforge.net/projects/junit/ Version: 4.8.2 License: Common Public License 1.0 Description: A framework for writing and running automated tests in Java. Local Modifications: None. --- Code in: lib/protobuf-java.jar Protocol Buffers URL: http://code.google.com/p/protobuf/ Version: 2.3.0 License: New BSD License Description: Supporting libraries for protocol buffers, an encoding of structured data. Local Modifications: None --- Code in: lib/ant.jar lib/ant-launcher.jar URL: http://ant.apache.org/bindownload.cgi Version: 1.8.1 License: Apache License 2.0 Description: Ant is a Java based build tool. In theory it is kind of like "make" without make's wrinkles and with the full portability of pure java code. Local Modifications: None --- Code in: lib/json.jar URL: http://json.org/java/index.html Version: JSON version 20090211 License: MIT license Description: JSON is a set of java files for use in transmitting data in JSON format. Local Modifications: None --- Code in: tools/maven-ant-tasks-2.1.1.jar URL: http://maven.apache.org Version 2.1.1 License: Apache License 2.0 Description: Maven Ant tasks are used to manage dependencies and to install/deploy to maven repositories. Local Modifications: None ================================================ FILE: google-code-prettify/tools/closure-compiler/amd-externs.js ================================================ /** * @param {string} id * @param {Array.} dependencies * @param {Function} factory */ function define(id, dependencies, factory) {} /** @type {*} */ define.amd; ================================================ FILE: google-code-prettify/tools/closure-compiler/console-externs.js ================================================ var console = {}; /** * @param {string} message */ console.warn = function (message, var_args) {}; ================================================ FILE: google-code-prettify/tools/cut-release.sh ================================================ #!/bin/bash function help_and_exit() { echo "Usage: $0 [-go] [-verbose] [-force]" echo echo "Moves minified CSS and JS to distribution directories and" echo "creates a branch in SVN." echo echo " -go: Run commands instead of just echoing them." echo " -verbose: More verbose logging." echo " -force: Ignore sanity checks for testing." echo " Incompatible with -go." echo " -nobranch: Don't create a new release branch." exit "$1" } # 1 for verbose logging export VERBOSE="0" # 1 if commands that have side-effects should actually be run instead of logged export EFFECT="0" # 1 to not exit on panic. export NO_PANIC="0" # 1 to create a new branch under branches/ export BRANCH="1" function panic() { echo "PANIC: $*" if ! (( $NO_PANIC )); then exit -1 fi } function command() { if (( $VERBOSE )) || ! (( $EFFECT )); then echo '$' "$*" fi if (( $EFFECT )); then "$@" || panic "command failed: $@" fi } function cp_if_different() { if ! [ -e "$2" ] || diffq "$1" "$2"; then command cp "$1" "$2" fi } function mime_for_file() { local path="$1" case "${path##*.}" in js) echo -n "text/javascript;charset=UTF-8";; css) echo -n "text/css;charset=UTF-8";; html) echo -n "text/html;charset=UTF-8";; *) panic "unrecognized extension for $path";; esac } for var in "$@"; do case "$var" in -verbose) VERBOSE="1" ;; -go) EFFECT="1" ;; -force) NO_PANIC="1" ;; -nobranch) BRANCH="0" ;; -h) help_and_exit 0 ;; *) echo "Unrecognized argument $var" help_and_exit -1 ;; esac done if (( $NO_PANIC )) && (( $EFFECT )); then NO_PANIC="0" panic "-force is incompatible with -go" fi # Find svn root export VERSION_BASE="$( pushd "$(dirname "$0")/../.." > /dev/null; pwd; popd > /dev/null)" if [ -z "$VERSION_BASE" ] || ! [ -d "$VERSION_BASE" ]; then panic "unknown VERSION_BASE" fi if ! [ -d "$VERSION_BASE/trunk" ]; then panic "missing trunk in $VERSION_BASE" fi if ! [ -d "$VERSION_BASE/loader" ]; then panic "missing loader in $VERSION_BASE" fi if (( $BRANCH )) && ! [ -d "$VERSION_BASE/branches" ]; then panic "missing branches in $VERSION_BASE" fi if (( $VERBOSE )); then echo "VERSION_BASE=$VERSION_BASE" fi # Choose a release label # %e has a leading 0. get rid of that. export TODAY="$(date -u +%e-%b-%Y | perl -pe 's/\s+//g')" export RELEASE_LABEL="release-$TODAY" if (( $VERBOSE )); then echo "RELEASE_LABEL=$RELEASE_LABEL" fi if (( $BRANCH )) && [ -e "$VERSION_BASE/branches/$RELEASE_LABEL" ]; then panic "duplicate release $VERSION_BASE/branches/$RELEASE_LABEL" fi # Make the distribution function build() { pushd "$VERSION_BASE/trunk" > /dev/null make clean \ && make distrib distrib/prettify.tar.bz2 distrib/prettify-small.tar.bz2 \ && make lang-aliases local status=$? popd > /dev/null (($status)) } if build; then panic "Make failed" fi if [ -n "$(svn stat "$VERSION_BASE/trunk")" ]; then svn stat "$VERSION_BASE/trunk" panic "Uncommitted changes" fi function diffq() { ! diff -q "$@" > /dev/null } function sync() { local action="$1" local src_dir="$2" local dest_dir="$3" shift 3 local exts=$@ local ext local src_file local dest_file ( shopt -s nullglob for ext in $exts; do for src_file in "$src_dir"/*."$ext"; do dest_file="$dest_dir"/"$(basename "$src_file")" if ! [ -e "$dest_file" ] || \ diffq "$src_file" "$dest_file"; then "$action" "$src_file" "$dest_file" fi done for dest_file in "$dest_dir"/*."$ext"; do src_file="$src_dir"/"$(basename "$dest_file")" if ! [ -e "$src_file" ]; then "$action" "$src_file" "$dest_file" fi done done ) } function svn_sync() { local src_file="$1" local dest_file="$2" if ! [ -e "$src_file" ]; then command svn delete "$dest_file" else # Require lower-7 octets only so that it can be served even without # the UTF-8 charset header. if ! perl -ne 'exit -1 if m/[^\x00-\x7f]/' "$src_file"; then panic "Non-ascii export $src_file" fi if [ -e "$dest_file" ]; then cp_if_different "$src_file" "$dest_file" else command cp "$src_file" "$dest_file" command svn add "$dest_file" command svn propset svn:mime-type "$(mime_for_file "$src_file")" \ "$dest_file" fi fi } # Deploy the current compiled source to /loader sync svn_sync "$VERSION_BASE/trunk/distrib/google-code-prettify" \ "$VERSION_BASE/loader" js css sync svn_sync "$VERSION_BASE/trunk/styles" \ "$VERSION_BASE/loader/skins" css # Cut branch if (( $BRANCH )); then command svn copy "$VERSION_BASE/trunk" "$VERSION_BASE/branches/$RELEASE_LABEL" fi cp_if_different "$VERSION_BASE/trunk/distrib/prettify.tar.bz2" \ "$VERSION_BASE/trunk/distrib/prettify-$TODAY.tar.bz2" cp_if_different "$VERSION_BASE/trunk/distrib/prettify-small.tar.bz2" \ "$VERSION_BASE/trunk/distrib/prettify-small-$TODAY.tar.bz2" # Dump final instructions for caller. echo if (( $EFFECT )); then echo "Finally run" echo " $ svn commit -m 'Release $RELEASE_LABEL'" echo "to commit the new release then run" echo "$ $VERSION_BASE/trunk/tools/googlecode_upload.py \\" echo " --summary='Bundle of source files, tests, and documentation' \\" echo " -p google-code-prettify -u mikesamuel \\" echo " --labels='Type-Archive,OpSys-All,Featured' \\" echo " $VERSION_BASE/trunk/distrib/prettify-$TODAY.tar.bz2" echo "$ $VERSION_BASE/trunk/tools/googlecode_upload.py \\" echo " --summary='Minimized JS and CSS sources' \\" echo " -p google-code-prettify -u mikesamuel \\" echo " --labels='Type-Archive,OpSys-All,Featured' \\" echo " $VERSION_BASE/trunk/distrib/prettify-small-$TODAY.tar.bz2" echo "and finally check" echo " http://code.google.com/p/google-code-prettify/downloads/list" else echo "Rerun with -go flag to actually execute these commands." fi exit 0 ================================================ FILE: google-code-prettify/tools/googlecode_upload.py ================================================ #!/usr/bin/env python # # Copyright 2006, 2007 Google Inc. All Rights Reserved. # Author: danderson@google.com (David Anderson) # # Script for uploading files to a Google Code project. # # This is intended to be both a useful script for people who want to # streamline project uploads and a reference implementation for # uploading files to Google Code projects. # # To upload a file to Google Code, you need to provide a path to the # file on your local machine, a small summary of what the file is, a # project name, and a valid account that is a member or owner of that # project. You can optionally provide a list of labels that apply to # the file. The file will be uploaded under the same name that it has # in your local filesystem (that is, the "basename" or last path # component). Run the script with '--help' to get the exact syntax # and available options. # # Note that the upload script requests that you enter your # googlecode.com password. This is NOT your Gmail account password! # This is the password you use on googlecode.com for committing to # Subversion and uploading files. You can find your password by going # to http://code.google.com/hosting/settings when logged in with your # Gmail account. If you have already committed to your project's # Subversion repository, the script will automatically retrieve your # credentials from there (unless disabled, see the output of '--help' # for details). # # If you are looking at this script as a reference for implementing # your own Google Code file uploader, then you should take a look at # the upload() function, which is the meat of the uploader. You # basically need to build a multipart/form-data POST request with the # right fields and send it to https://PROJECT.googlecode.com/files . # Authenticate the request using HTTP Basic authentication, as is # shown below. # # Licensed under the terms of the Apache Software License 2.0: # http://www.apache.org/licenses/LICENSE-2.0 # # Questions, comments, feature requests and patches are most welcome. # Please direct all of these to the Google Code users group: # http://groups.google.com/group/google-code-hosting """Google Code file uploader script. """ __author__ = 'danderson@google.com (David Anderson)' import httplib import os.path import optparse import getpass import base64 import sys def upload(file, project_name, user_name, password, summary, labels=None): """Upload a file to a Google Code project's file server. Args: file: The local path to the file. project_name: The name of your project on Google Code. user_name: Your Google account name. password: The googlecode.com password for your account. Note that this is NOT your global Google Account password! summary: A small description for the file. labels: an optional list of label strings with which to tag the file. Returns: a tuple: http_status: 201 if the upload succeeded, something else if an error occured. http_reason: The human-readable string associated with http_status file_url: If the upload succeeded, the URL of the file on Google Code, None otherwise. """ # The login is the user part of user@gmail.com. If the login provided # is in the full user@domain form, strip it down. if user_name.endswith('@gmail.com'): user_name = user_name[:user_name.index('@gmail.com')] form_fields = [('summary', summary)] if labels is not None: form_fields.extend([('label', l.strip()) for l in labels]) content_type, body = encode_upload_request(form_fields, file) upload_host = '%s.googlecode.com' % project_name upload_uri = '/files' auth_token = base64.b64encode('%s:%s'% (user_name, password)) headers = { 'Authorization': 'Basic %s' % auth_token, 'User-Agent': 'Googlecode.com uploader v0.9.4', 'Content-Type': content_type, } server = httplib.HTTPSConnection(upload_host) server.request('POST', upload_uri, body, headers) resp = server.getresponse() server.close() if resp.status == 201: location = resp.getheader('Location', None) else: location = None return resp.status, resp.reason, location def encode_upload_request(fields, file_path): """Encode the given fields and file into a multipart form body. fields is a sequence of (name, value) pairs. file is the path of the file to upload. The file will be uploaded to Google Code with the same file name. Returns: (content_type, body) ready for httplib.HTTP instance """ BOUNDARY = '----------Googlecode_boundary_reindeer_flotilla' CRLF = '\r\n' body = [] # Add the metadata about the upload first for key, value in fields: body.extend( ['--' + BOUNDARY, 'Content-Disposition: form-data; name="%s"' % key, '', value, ]) # Now add the file itself file_name = os.path.basename(file_path) f = open(file_path, 'rb') file_content = f.read() f.close() body.extend( ['--' + BOUNDARY, 'Content-Disposition: form-data; name="filename"; filename="%s"' % file_name, # The upload server determines the mime-type, no need to set it. 'Content-Type: application/octet-stream', '', file_content, ]) # Finalize the form body body.extend(['--' + BOUNDARY + '--', '']) return 'multipart/form-data; boundary=%s' % BOUNDARY, CRLF.join(body) def upload_find_auth(file_path, project_name, summary, labels=None, user_name=None, password=None, tries=3): """Find credentials and upload a file to a Google Code project's file server. file_path, project_name, summary, and labels are passed as-is to upload. Args: file_path: The local path to the file. project_name: The name of your project on Google Code. summary: A small description for the file. labels: an optional list of label strings with which to tag the file. config_dir: Path to Subversion configuration directory, 'none', or None. user_name: Your Google account name. tries: How many attempts to make. """ if user_name is None or password is None: from netrc import netrc authenticators = netrc().authenticators("code.google.com") if authenticators: if user_name is None: user_name = authenticators[0] if password is None: password = authenticators[2] while tries > 0: if user_name is None: # Read username if not specified or loaded from svn config, or on # subsequent tries. sys.stdout.write('Please enter your googlecode.com username: ') sys.stdout.flush() user_name = sys.stdin.readline().rstrip() if password is None: # Read password if not loaded from svn config, or on subsequent tries. print 'Please enter your googlecode.com password.' print '** Note that this is NOT your Gmail account password! **' print 'It is the password you use to access Subversion repositories,' print 'and can be found here: http://code.google.com/hosting/settings' password = getpass.getpass() status, reason, url = upload(file_path, project_name, user_name, password, summary, labels) # Returns 403 Forbidden instead of 401 Unauthorized for bad # credentials as of 2007-07-17. if status in [httplib.FORBIDDEN, httplib.UNAUTHORIZED]: # Rest for another try. user_name = password = None tries = tries - 1 else: # We're done. break return status, reason, url def main(): parser = optparse.OptionParser(usage='googlecode-upload.py -s SUMMARY ' '-p PROJECT [options] FILE') parser.add_option('-s', '--summary', dest='summary', help='Short description of the file') parser.add_option('-p', '--project', dest='project', help='Google Code project name') parser.add_option('-u', '--user', dest='user', help='Your Google Code username') parser.add_option('-w', '--password', dest='password', help='Your Google Code password') parser.add_option('-l', '--labels', dest='labels', help='An optional list of comma-separated labels to attach ' 'to the file') options, args = parser.parse_args() if not options.summary: parser.error('File summary is missing.') elif not options.project: parser.error('Project name is missing.') elif len(args) < 1: parser.error('File to upload not provided.') elif len(args) > 1: parser.error('Only one file may be specified.') file_path = args[0] if options.labels: labels = options.labels.split(',') else: labels = None status, reason, url = upload_find_auth(file_path, options.project, options.summary, labels, options.user, options.password) if url: print 'The file was uploaded successfully.' print 'URL: %s' % url return 0 else: print 'An error occurred. Your file was not uploaded.' print 'Google Code upload server said: %s (%s)' % (reason, status) return 1 if __name__ == '__main__': sys.exit(main()) ================================================ FILE: google-code-prettify/tools/lang-handler-aliases.sh ================================================ #!/bin/bash LANG_DIR="$1" shift HAS_LANG_FILES=1 if echo "$LANG_DIR"/lang-*.js | egrep -q "[*]" >& /dev/null; then HAS_LANG_FILES=0 fi if [ -n "$*" ] || [ -z "$LANG_DIR" ] || ! (( $HAS_LANG_FILES )); then echo "Usage: $0 " echo echo "Dumps lines of the form" echo " $LANG_DIR/lang-foo.js $LANG_DIR/lang-.js" echo "where the first element is a path name under LANG_DIR" echo "and the second is the name of a language extension for which" echo "it registers an extension." exit -1 fi if [ -z "$JS_INTERPRETER" ]; then JS_INTERPRETER="jsc-1" fi if ! which "$JS_INTERPRETER" >& /dev/null; then echo "\$JS_INTERPRETER ( '$JS_INTERPRETER' ) is not on the \$PATH." echo "It should be an executable that loads each argument as a JS file" echo "and runs them in a context where the print function dumps a string" echo "to stdout." exit -1 fi for JS in "$LANG_DIR"/lang-*.js; do # Run the language handler in a context where PR.registerLangHandler # dumps out the handler names without doing anything else, and # then use a perl script that prepends each handler with the basename # of the JS file. # The JS interpreter is run with STDIN of /dev/null so that it does not # hand waiting for REPL input. ("$JS_INTERPRETER" \ <(echo ' var window = this; var PR = { registerLangHandler: function (_, exts) { for (var i = 0, n = exts.length; i < n; ++i) { var handler = String(exts[i]); if (/^\w+$/.test(handler)) { print(handler); } } }, createSimpleLexer: function () {}, sourceDecorator: function () {} }; ') \ \ "$JS" \ < /dev/null \ || echo "Failed to execute $JS" 1>&2 ) \ | perl -e '$JS=shift;' \ -e 'use File::Basename; $DIR=dirname($JS);' \ -e 'while () { s/^\w+$/$JS $DIR\/lang-$&.js/; print; }' \ "$JS" done ================================================ FILE: google-code-prettify/tools/yui-compressor/LICENSE.TXT ================================================ YUI Compressor Copyright License Agreement (BSD License) Copyright (c) 2009, Yahoo! Inc. All rights reserved. Redistribution and use of this software in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Yahoo! Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission of Yahoo! Inc. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. This software also requires access to software from the following sources: The Jarg Library v 1.0 ( http://jargs.sourceforge.net/ ) is available under a BSD License Copyright (c) 2001-2003 Steve Purcell, Copyright (c) 2002 Vidar Holen, Copyright (c) 2002 Michal Ceresna and Copyright (c) 2005 Ewan Mellor. The Rhino Library ( http://www.mozilla.org/rhino/ ) is dually available under an MPL 1.1/GPL 2.0 license, with portions subject to a BSD license. Additionally, this software contains modified versions of the following component files from the Rhino Library: [org/mozilla/javascript/Decompiler.java] [org/mozilla/javascript/Parser.java] [org/mozilla/javascript/Token.java] [org/mozilla/javascript/TokenStream.java] The modified versions of these files are distributed under the MPL v 1.1 ( http://www.mozilla.org/MPL/MPL-1.1.html ) ================================================ FILE: google-code-prettify/tools/yui-compressor/README ================================================ ============================================================================== YUI Compressor ============================================================================== NAME YUI Compressor - The Yahoo! JavaScript and CSS Compressor SYNOPSIS Usage: java -jar yuicompressor-x.y.z.jar [options] [input file] Global Options -h, --help Displays this information --type Specifies the type of the input file --charset Read the input file using --line-break Insert a line break after the specified column number -v, --verbose Display informational messages and warnings -o Place the output into or a file pattern. Defaults to stdout. JavaScript Options --nomunge Minify only, do not obfuscate --preserve-semi Preserve all semicolons --disable-optimizations Disable all micro optimizations DESCRIPTION The YUI Compressor is a JavaScript compressor which, in addition to removing comments and white-spaces, obfuscates local variables using the smallest possible variable name. This obfuscation is safe, even when using constructs such as 'eval' or 'with' (although the compression is not optimal is those cases) Compared to jsmin, the average savings is around 20%. The YUI Compressor is also able to safely compress CSS files. The decision on which compressor is being used is made on the file extension (js or css) GLOBAL OPTIONS -h, --help Prints help on how to use the YUI Compressor --line-break Some source control tools don't like files containing lines longer than, say 8000 characters. The linebreak option is used in that case to split long lines after a specific column. It can also be used to make the code more readable, easier to debug (especially with the MS Script Debugger) Specify 0 to get a line break after each semi-colon in JavaScript, and after each rule in CSS. --type js|css The type of compressor (JavaScript or CSS) is chosen based on the extension of the input file name (.js or .css) This option is required if no input file has been specified. Otherwise, this option is only required if the input file extension is neither 'js' nor 'css'. --charset character-set If a supported character set is specified, the YUI Compressor will use it to read the input file. Otherwise, it will assume that the platform's default character set is being used. The output file is encoded using the same character set. -o outfile Place output in file outfile. If not specified, the YUI Compressor will default to the standard output, which you can redirect to a file. Supports a filter syntax for expressing the output pattern when there are multiple input files. ex: java -jar yuicompressor.jar -o '.css$:-min.css' *.css ... will minify all .css files and save them as -min.css -v, --verbose Display informational messages and warnings. JAVASCRIPT ONLY OPTIONS --nomunge Minify only. Do not obfuscate local symbols. --preserve-semi Preserve unnecessary semicolons (such as right before a '}') This option is useful when compressed code has to be run through JSLint (which is the case of YUI for example) --disable-optimizations Disable all the built-in micro optimizations. NOTES + If no input file is specified, it defaults to stdin. + Supports wildcards for specifying multiple input files. + The YUI Compressor requires Java version >= 1.4. + It is possible to prevent a local variable, nested function or function argument from being obfuscated by using "hints". A hint is a string that is located at the very beginning of a function body like so: function fn (arg1, arg2, arg3) { "arg2:nomunge, localVar:nomunge, nestedFn:nomunge"; ... var localVar; ... function nestedFn () { .... } ... } The hint itself disappears from the compressed file. + C-style comments starting with /*! are preserved. This is useful with comments containing copyright/license information. For example: /*! * TERMS OF USE - EASING EQUATIONS * Open source under the BSD License. * Copyright 2001 Robert Penner All rights reserved. */ becomes: /* * TERMS OF USE - EASING EQUATIONS * Open source under the BSD License. * Copyright 2001 Robert Penner All rights reserved. */ MODIFIED RHINO FILES YUI Compressor uses a modified version of the Rhino library (http://www.mozilla.org/rhino/) The changes were made to support JScript conditional comments, preserved comments, unescaped slash characters in regular expressions, and to allow for the optimization of escaped quotes in string literals. COPYRIGHT AND LICENSE Copyright (c) 2010 Yahoo! Inc. All rights reserved. The copyrights embodied in the content of this file are licensed by Yahoo! Inc. under the BSD (revised) open source license. ================================================ FILE: hardwaresetups.md ================================================ # Hardware set-ups ## Arduino over USB \(no shield\) If you don't have any shield and your hardware doesn't have any connectivity, you can still use Blynk – directly over USB : 1. Open [Arduino Serial USB example](https://github.com/blynkkk/blynk-library/blob/master/examples/Boards_USB_Serial/Arduino_Serial_USB/Arduino_Serial_USB.ino) and change [Auth Token](./#getting-started-getting-started-with-application-4-auth-token) ```cpp // You could use a spare Hardware Serial on boards that have it (like Mega) #include SoftwareSerial DebugSerial(2, 3); // RX, TX #define BLYNK_PRINT DebugSerial #include // You should get Auth Token in the Blynk App. // Go to the Project Settings (nut icon). char auth[] = "YourAuthToken"; void setup() { // Debug console DebugSerial.begin(9600); // Blynk will work through Serial Serial.begin(9600); Blynk.begin(auth, Serial); } void loop() { Blynk.run(); } ``` 2. Run the script which is usually located in `/scripts` folder: * Windows:`My Documents\Arduino\libraries\Blynk\scripts` * Mac `User$/Documents/Arduino/libraries/Blynk/scripts` **On Windows:** Open cmd.exe Write your path to blynk-ser.bat folder. For example: ```text cd C:\blynk-library-0.3.1\blynk-library-0.3.1\scripts ``` Run `blynk-ser.bat` file. For example : `blynk-ser.bat -c COM4` \(where COM4 is port with your Arduino\) And press "Enter", press "Enter" and press "Enter" **On Linux and Mac**: Navigate to /scripts folder. For example: ```text cd User$/Documents/Arduino/libraries/Blynk/scripts ``` When inside this folder, run: ```text user:scripts User$ ./blynk-ser.sh ``` **Warning:** Do no close terminal window with running script. In some cases you may also need to perform : ```text user:scripts User$ chmod +x blynk-ser.sh ``` You may need also to run it with `sudo` ```text user:scripts User$ sudo ./blynk-ser.sh ``` This is what you'll see in Terminal app on Mac \(usbmodem address can be different\): ```text [ Press Ctrl+C to exit ] /dev/tty.usbmodem not found. Select serial port [ /dev/tty.usbmodem1451 ]: ``` Copy the serial port address: `/dev/tty.usbmodem1451` and paste it back: ```text Select serial port [ /dev/tty.usbmodem1451 ]: /dev/tty.usbmodem1451 ``` After you press Enter, you should see an output similar to this: ```text Resetting device /dev/tty.usbmodem1451... Connecting: GOPEN:/dev/tty.usbmodem1451,raw,echo=0,clocal=1,cs8,nonblock=1,ixoff=0,ixon=0,ispeed=9600,ospeed=9600,crtscts=0 <-> openssl-connect:blynk-cloud.com:9443,cafile=/Users/.../server.crt,nodelay 2015/10/03 00:29:45 socat[30438.2046857984] N opening character device "/dev/tty.usbmodem1451" for reading and writing 2015/10/03 00:29:45 socat[30438.2046857984] N opening connection to LEN=16 AF=2 45.55.195.102:9443 2015/10/03 00:29:45 socat[30438.2046857984] N successfully connected from local address LEN=16 AF=2 192.168.0.2:56821 2015/10/03 00:29:45 socat[30438.2046857984] N SSL connection using AES128-SHA 2015/10/03 00:29:45 socat[30438.2046857984] N starting data transfer loop with FDs [3,3] and [4,4] ``` **NOTE:** Arduino IDE may complain with "programmer is not responding". You need to terminate script before uploading new sketch. Additional materials: * [Tutorial: Control Arduino over USB with Blynk app. No shield required. Mac OS\)](https://www.youtube.com/watch?v=fgzvoan_3_w) * [How to control arduino \(Wirelessly\) with blynk via USB. Windows](https://www.youtube.com/watch?v=I_hgIj2FdPI) * [Instructables: Control Arduino with Blynk over USB](http://www.instructables.com/id/Control-arduino-using-Blynk-over-usb/) ## Raspberry Pi 1. Connect your Raspberry Pi to the Internet and open it's console. 2. Run this command \(it updates your OS package repository to include the required packages\): ```text curl -sL "https://deb.nodesource.com/setup_6.x" | sudo -E bash - ``` 3. Download and build Blynk JS library using npm: ```text sudo apt-get update && sudo apt-get upgrade sudo apt-get install build-essential sudo apt-get install -g npm sudo npm install -g onoff sudo npm install -g blynk-library ``` 4. Run Blynk test script \(put your auth token\): ```text blynk-client 715f8cafe95f4a91bae319d0376caa8c ``` 5. You can write our own script based on [examples](https://github.com/vshymanskyy/blynk-library-js/tree/master/examples) 6. To enable Blynk auto restart for Pi, find `/etc/rc.local` file and add there: ```text node full_path_to_your_script.js ``` Additional materials: * [Instructables: Blynk on Javascript for Raspberry Pi, Intel Edison and others](http://www.instructables.com/id/Blynk-JavaScript-in-20-minutes-Raspberry-Pi-Edison) * [Instructables: Use DHT11/DHT12 sensors with Raspberry Pi and Blynk](http://www.instructables.com/id/Raspberry-Pi-Nodejs-Blynk-App-DHT11DHT22AM2302/?ALLSTEPS) **Note:** Instead of using Node.js, you can also build a C++ libarry version \(same as Arduino, WiringPi-based\) installation: * [Library README for Linux](https://github.com/blynkkk/blynk-library/blob/master/linux/README.md) * [Blynk Community Topic: How-To Raspberry Pi](https://community.blynk.cc/t/howto-for-raspberry-pi/332) * [Video tutorial - Setting up Blynk and Raspberry Pi:](https://www.youtube.com/watch?v=iSG_8g6KyGE) ## ESP8266 Standalone You can run Blynk directly on the ESP8266! Install the latest ESP8266 library for Arduino using [this guide](https://github.com/esp8266/Arduino#installing-with-boards-manager). **Example Sketch:** [ESP8266\_Standalone](https://github.com/blynkkk/blynk-library/blob/master/examples/Boards_WiFi/ESP8266_Standalone/ESP8266_Standalone.ino) Additional materials: * [Instructables: ESP8266 ESP-12\(Standalone\)+ Blynk](http://www.instructables.com/id/ESP8266-ESP-12Standalone-Blynk-101) * [Instructables: ESP8266-12 standalone Blynk lm35 temperature sensor](http://www.instructables.com/id/ESP8266-12-blynk-wireless-temperature-LM35-sensor/?ALLSTEPS) [Step-by-Step Tutorial in Russian language](http://esp8266.ru/esp8266-blynk) ## NodeMCU Please follow [this detailed instruction](https://github.com/blynkkk/blynk-library/tree/master/examples/Boards_WiFi/NodeMCU#instruction-for-nodemcu-setup). Or watch [this Video tutorial](https://www.youtube.com/watch?v=FhS44hGk1Lc). ## Arduino + ESP8266 WiFi with AT commands This connection type is not recommended for beginners. If you would like to try it, please carefully read [this help topic](http://help.blynk.cc/hardware-and-libraries/arduino/esp8266-with-at-firmware) **Note:** Some boards like Arduino UNO WiFi from Arduino.org, do not use AT commands \(and do not provide relevant libraries\), so this renders them unusable with Blynk. ## Particle Blynk works with the whole family of Particle products: Core, Photon and Electron 1. Open [Particle Web IDE](https://build.particle.io/build). 2. Go to the libraries. 3. Search for **Blynk** in the Community Libraries and click on it 4. Open `01_PARTICLE.INO` example 5. Click "use this example" 6. Put your Auth Token here: `char auth[] = "YourAuthToken";` and flash the Particle! You can scan this QR code from the Blynk App and you'll get a ready-to-test project for **Particle Photon**. Just put your Auth Token into the `01_PARTICLE.INO` example. ![](.gitbook/assets/Particle%20Demo1530733075.png) Additional materials: * [Particle core + DHT22](https://www.hackster.io/gusgonnet/temperature-humidity-monitor-with-blynk-7faa51) ================================================ FILE: http.md ================================================ # HTTP RESTful API Blynk HTTP RESTful API allows to easily read and write values of Pins in Blynk apps and Hardware. API description can be found [here](http://docs.blynkapi.apiary.io). **Warning**: Blynk HTTP API still has GEO DNS issue. This means, for now you need to use direct server IP instead of hostname in order to make it work with 3-d party services like IFTTT. ================================================ FILE: https-api/api_getlastweekdata.md ================================================ # Download Datastream Data To get the device data for last week, use this API call: **API call:** ```text api/external/getRawData?token=123&days=7, (from: now - 7 days, to: now) ``` **Response example:** ```text response example ``` ================================================ FILE: https-api/events-api.md ================================================ # Events To trigger [Events](https://github.com/blynkkk/blynkkk.github.io/tree/1b828d2e6ad5add190596bc1bfad64e2d6aa0832/en/product/product-template-settings/events/README.md) creation from hardware \(or other sources\) and render them on Timeline in Device profile pages on the web and in the mobile apps, use this API call: ```text /external/api/logEvent?token={token}&code={event_name} ``` `event_name` should be taken from [Product Template Settings](https://github.com/blynkkk/blynkkk.github.io/tree/1b828d2e6ad5add190596bc1bfad64e2d6aa0832/en/product/product-template-settings/README.md) > [Events](https://github.com/blynkkk/blynkkk.github.io/tree/1b828d2e6ad5add190596bc1bfad64e2d6aa0832/en/product/product-template-settings/events/README.md) \*\*\*\* **Options:** To render custom description of the event on the Timeline, use `event_description` parameter `/external/api/logEvent?token={token}&code={event_name}&description={event_desciption}` >>IMAGE OF TIMELINE WITH EVENT DESCRIPTION \(MOBILE AND WEB\) ================================================ FILE: https-api/external_api.md ================================================ # Devices ## Datastreams API ### Hardware Get datastream value \(via HTTP GET\): * `/external/api/get?token={token}&pin={pin}` * `/external/api/get?token={token}&dataStreamId={id}` Update datastream value \(via HTTP GET\): * `/external/api/update?token={token}&pin={pin}&value={value}` * `/external/api/update?token={token}&dataStreamId={id}&value={value}` * `/external/api/update/property?token={token}&pin={pin}&{property}={value}` Get device json \(via HTTP GET\): * `/external/api/device?token={token}` ### Log event * `/external/api/logEvent?token={token}&code={event_name}` * `/external/api/logEvent?token={token}&code={event_name}&description={event_desciption}` ## Devices ### Devices #### Get datastream value Use HTTP **GET** method to get value of a Datastream or Virtual Pin Using Datastream ID: ```text /external/api/get?token={token}&dataStreamId={id} ``` Using Virtual Pin: ```text /external/api/get?token={token}&pin={pin} ``` **Parameters:** * `token`: AuthToken of the device * `pin`: Virtual Pin number. e.g. V0 * `dataStreamId`: can be found in Product Settings > Datastreams Example: ```text curl --get 'https://blynk.io/external/api/get?token=123&pin=V0' ``` #### Update Datastream value \(using GET\): You can use HTTP **GET** method to update value of a Datastream or Virtual Pin Using Datastream ID: ```text /external/api/update?token={token}&dataStreamId={id}&value={value} ``` Using Virtual Pin number: ```text /external/api/update?token={token}&pin={pin}&value={value} ``` **Path parameters:** * `token`: AuthToken of the device * `dataStreamId`: can be found in Product Settings > Datastreams * `pin`: Virtual Pin number. e.g. V0 Example: ```text curl --get 'https://blynk.io/external/api/update?token=123&dataStreamId=1&value=100' ``` #### Update Widget parameters You can update variuous properties of a widget \(in the mobile app\) which is using a specified Virtual Pin. Full list of properties here\(LINK\) ```text /external/api/update/property?token={token}&pin={pin}&{property}={value} ``` **Path parameters:** * `token`: AuthToken of the device * `property`: property name. Full list of properties is here \(LINK\) * `pin`: Virtual Pin number. e.g. V0 Example: ```text curl --get 'https://blynk.io/external/api/update/property?token=123&pin=V0&isDisabled=true' ``` ### Events #### Create Event Use HTTP **GET** method to create a new Event on Device Timeline ```text /external/api/logEvent?token={token}&code={event_name}&description={event_desciption} ``` **Parameters:** * `token`: AuthToken of the device * `code`: code of the event. Can be found in Product Template - [Events](https://github.com/blynkkk/blynkkk.github.io/tree/c0d7e83761c876050b97df1faa1120a59ba1f125/en/product-1/events/README.md) * `description`: optionally you can add custom description to the event and it will be rendered on Device Timeline in mobile apps and on the web Example: ```text curl --get 'https://blynk.io/external/api/logEvent?token=123&code=critical_error&description="custom description"' ``` Create Event on Device Timeline * `/external/api/logEvent?token={token}&code={event_name}` \`\` * `/external/api/logEvent?token={token}&code={event_name}&description={event_desciption}` ================================================ FILE: implementing.md ================================================ # Implementing a Blynk HW client \(library\) Currently we provide Arduino/C++ implementation of the library. It is very extensible and modular, look at [the list of supported hardware](./#supported-hardware). Adding new connection types and Arduino-compatible boards is easy. TODO: Porting guide. But some devices are programmed in other languages, like: * Espruino, JavaScript, Node.JS * MicroPython, Python * NodeMCU, eLua This document hints how to write a custom library. ## Blynk library main functions * Provide easy-to use API * Virtual pin handlers registration * Provide comfortable wrappers for some widgets * Manage connection * Should support different connection type/hardware, if applicable * Serialize/deserialize Blynk protocol * Handle direct pin operations * Should be portable across similar devices \(or same technology/programming language\), if possible * Should detect and notify the user about [troubles](./#troubleshooting) where possible \(especially Flood\) ### Adding new HW board Different boards can be added by creating JSON board description file. ```javascript { "name": "Arduino UNO", "map": { "digital": { "pins": { "D0": 0, "D1": 1, "D2": 2, "D3": 3, "D4": 4, "D5": 5, "D6": 6, "D7": 7, "D8": 8, "D9": 9, "D10": 10, "D11": 11, "D12": 12, "D13": 13 }, "ops": [ "dr", "dw" ] }, "analog": { "pins": { "A0": 14, "A1": 15, "A2": 16, "A3": 17, "A4": 18, "A5": 19 }, "ops": [ "dr", "dw", "ar" ], "arRange":[0, 1023] }, "pwm": { "pins": [ "D3", "D5", "D6", "D9", "D10", "D11" ], "ops": [ "aw" ], "awRange":[0, 255] }, "virtual": { "pinsRange": [ 0, 31 ], "ops": [ "vr", "vw" ] } } } ``` Look at the [full boards list](https://github.com/blynkkk/blynk-library/tree/master/boards_json). You can send us your own board description file for review and App integration. There may be a problem that you want to start testing your implementation, but your board is not listed int the Blynk App. On Android, we now have a "Generic Board" specially for such purposes. Unfortunately iOS does not have it yet. Basically you can select UNO board and check how it works using just virtual pins. Most digital pins will also work. Analog IO/PWM will not work in general, until we add your board to the App. ================================================ FILE: index.html ================================================
      ================================================ FILE: introanddownloads.md ================================================ ## Intro ## 🚨🚨🚨 **IMPORTANT:** > ## :warning: This documentation is for the LEGACY version of Blynk platform which is no longer supported and will be shut down. > You can sign up for the current version of Blynk platform [here](http://blynk.cloud/dashboard/register). > The new mobile apps can be downloaded from [App Store](https://apps.apple.com/us/app/blynk-iot/id1559317868) and [Google Play](https://play.google.com/store/apps/details?id=cloud.blynk&hl=en&gl=US). > The actual Blynk documentation is [here](https://docs.blynk.io/). This guide will help you understand how to get started using Blynk and give a comprehensive overview of all the features. If you want to jump straight into playing with Blynk, check out Getting Started. [Getting Started >](./#getting-started) ### How Blynk Works Blynk was designed for the Internet of Things. It can control hardware remotely, it can display sensor data, it can store data, vizualize it and do many other cool things. There are three major components in the platform: * **Blynk App** - allows to you create amazing interfaces for your projects using various widgets we provide. * **Blynk Server** - responsible for all the communications between the smartphone and hardware. You can use our Blynk Cloud or run your [private Blynk server](./#blynk-server) locally. It's open-source, could easily handle thousands of devices and can even be launched on a Raspberry Pi. * **Blynk Libraries** - for all the popular hardware platforms - enable communication with the server and process all the incoming and outcoming commands. Now imagine: every time you press a Button in the Blynk app, the message travels to ~~space~~ the Blynk Cloud, where it magically finds its way to your hardware. It works the same in the opposite direction and everything happens in a blynk of an eye. ![](.gitbook/assets/architecture.png) ### Features * Similar API & UI for all supported hardware & devices * Connection to the cloud using: * WiFi * Bluetooth and BLE * Ethernet * USB \(Serial\) * GSM * ... * Set of easy-to-use Widgets * Direct pin manipulation with no code writing * Easy to integrate and add new functionality using virtual pins * History data monitoring via SuperChart widget * Device-to-Device communication using Bridge Widget * Sending emails, tweets, push notifications, etc. * ... new features are constantly added! You can find [example sketches](https://github.com/blynkkk/blynk-library/tree/master/examples) covering basic Blynk Features. They are included in the library. All the sketches are designed to be easily combined with each other. ### What do I need to Blynk? At this point you might be thinking: **"Ok, I want it. What do I need to get started?"** – Just a couple of things, really: #### **1. Hardware**. An Arduino, Raspberry Pi, or a similar development kit. **Blynk works over the Internet.** This means that the hardware you choose should be able to connect to the internet. Some of the boards, like Arduino Uno will need an Ethernet or Wi-Fi Shield to communicate, others are already Internet-enabled: like the ESP8266, Raspberri Pi with WiFi dongle, Particle Photon or SparkFun Blynk Board. But even if you don't have a shield, you can connect it over USB to your laptop or desktop \(it's a bit more complicated for newbies, but we got you covered\). What's cool, is that the [list of hardware](./#supported-hardware) that works with Blynk is huge and will keep on growing. #### **2. A Smartphone**. The Blynk App is a well designed interface builder. It works on both iOS and Android, so no holywars here, ok? ## Downloads ### **Blynk Apps for iOS or Android** [![Drawing](.gitbook/assets/appstore-lrg.svg)](https://itunes.apple.com/us/app/blynk-control-arduino-raspberry/id808760481?ls=1&mt=8)        [![Drawing](https://play.google.com/intl/en_us/badges/images/apps/en-play-badge.png)](https://play.google.com/store/apps/details?id=cc.blynk) ### **Blynk Library** [Download The Blynk Library >](https://github.com/blynkkk/blynk-library/releases/latest) In case you forgot, or don't know how to install Arduino libraries [click here](http://www.arduino.cc/en/guide/libraries). ================================================ FILE: license.md ================================================ # License This project is released under The MIT License \(MIT\) ================================================ FILE: links.md ================================================ # Links * [Blynk site](https://www.blynk.cc) * [Blynk community](https://community.blynk.cc) * [Facebook](https://www.fb.com/blynkapp) * [Twitter](https://twitter.com/blynk_app) * [Blynk Library](https://github.com/blynkkk/blynk-library) * [Blynk Examples](https://github.com/blynkkk/blynk-library/tree/master/examples) * [Blynk Server](https://github.com/blynkkk/blynk-server) * [Kickstarter campaign](https://www.kickstarter.com/projects/167134865/blynk-build-an-app-for-your-arduino-project-in-5-m/description) ================================================ FILE: mobile/README.md ================================================ # mobile ================================================ FILE: mobile/accelerometer.md ================================================ ### Accelerometer Accelerometer is kind of [motion sensors](https://developer.android.com/guide/topics/sensors/sensors_motion.html) that allows you to detect motion of your smartphone. Useful for monitoring device movement, such as tilt, shake, rotation, or swing. Conceptually, an acceleration sensor determines the acceleration that is applied to a device by measuring the forces that are applied to the sensor. Measured in ```m/s^2``` applied to ```x```, ```y```, ```z``` axis. In order to accept data from it you need to : ```cpp BLYNK_WRITE(V1) { //acceleration force applied to axis x int x = param[0].asFloat(); //acceleration force applied to axis y int y = param[1].asFloat(); //acceleration force applied to axis z int z = param[2].asFloat(); } ``` Accelerometer doesn't work in background. ================================================ FILE: mobile/barometer.md ================================================ ### Barometer/pressure Barometer/pressure is kind of [environment sensors](https://developer.android.com/guide/topics/sensors/sensors_environment.html) that allows you to measure the ambient air pressure. Measured in in ```hPa``` or ```mbar```. In oder to accept data from it you need to : ```cpp BLYNK_WRITE(V1) { //pressure in mbar int pressure = param[0].asInt(); } ``` Barometer doesn't work in background. ================================================ FILE: mobile/ble.md ================================================ ### BLE Widget for enabling Bluetooth Low Energy support. At the moment BLE widget requires internet connection in order to login and load your profile. However this will be fixed soon. Also some Blynk widgets not allowed with BLE. Blynk currently support bunch of different modules. Please check sketches below. **Sketches:** [BLE](https://github.com/blynkkk/blynk-library/tree/master/examples/Boards_Bluetooth) ================================================ FILE: mobile/bluetooth.md ================================================ ### Bluetooth Widget for enabling Bluetooth support. At the moment Bluetooth widget supported only for Android and requires internet connection in order to login and load your profile. However this will be fixed soon. Also some Blynk widgets not allowed with Bluetooth. Blynk currently support bunch of different modules. Please check sketches below. **Sketches:** [Bluetooth](https://github.com/blynkkk/blynk-library/tree/master/examples/Boards_Bluetooth) ================================================ FILE: mobile/bridge.md ================================================ ### Bridge Bridge can be used for Device-to-Device communication (no app. involved). You can send digital/analog/virtual write commands from one device to another, knowing it's auth token. At the moment Bridge widget is not required on application side (it is mostly used for indication that we have such feature). **You can use multiple bridges to control multiple devices.** Bridge widget takes a virtual pin, and turns it into a channel to control another device. It means you can control any virtual, digital or analog pins of the target device. Be careful not to use pins like ```A0, A1, A2 ...``` when communicating between different device types, as Arduino Core may refer to wrong pins in such cases. Example code for device A which will send values to device B : ```cpp //Initiating Bridge Widget on V1 of Device A WidgetBridge bridge1(V1); ... void setup() { Blynk.begin(...); while (Blynk.connect() == false) { // Wait until Blynk is connected } bridge1.digitalWrite(9, HIGH); // will trigger D9 HIGH on Device B. No code on Device B required bridge1.analogWrite(10, 123); bridge1.virtualWrite(V1, "hello"); // you need to write code on Device B in order to receive this value. See below bridge1.virtualWrite(V2, "value1", "value2", "value3"); } BLYNK_CONNECTED() { bridge1.setAuthToken("OtherAuthToken"); // Token of the hardware B } ``` IMPORTANT: when performing ```virtualWrite()``` with Bridge Widget, Device B will need to process the incoming data from Device A. For example, if you are sending value from Device A to Device B using ```bridge.virtualWrite(V5)``` you would need to use this handler on Device B: ```cpp BLYNK_WRITE(V5){ int pinData = param.asInt(); //pinData variable will store value that came via Bridge } ``` Keep in mind that ```bridge.virtualWrite``` doesn't send any value to mobile app. You need to call ```Blynk.virtualWrite``` for that. **Sketch:** [Bridge](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Bridge/Bridge.ino) ================================================ FILE: mobile/button.md ================================================ ### Button Works in push or switch modes. Allows to send any number value on button click and button release events. By default button uses 0/1 (LOW/HIGH) values. Button sends 1 (HIGH) on press and sends 0 (LOW) on release. You can change button state from hardware side. For example, turn on button assigned to virtual pin V1 : ```cpp Blynk.virtualWrite(V1, HIGH); ``` You can change button labels from hardware with : ```cpp Blynk.setProperty(V1, "onLabel", "ON"); ``` ```cpp Blynk.setProperty(V1, "offLabel", "OFF"); ``` or change color : ```cpp //#D3435C - Blynk RED Blynk.setProperty(V1, "color", "#D3435C"); ``` You can also get button state from server in case your hardware was disconnected with Blynk Sync feature : ```cpp BLYNK_CONNECTED() { Blynk.syncVirtual(V1); } BLYNK_WRITE(V1) { int buttonState = param.asInt(); } ``` #### Home Screen Button You can also add button to your Android Home Screen. Button works via HTTPS in that case. Have in mind that in "Home Screen" mode button has few limitations. It may not work instantly due to Android Widget limitations. Button will update it's state only once per 15 min. **Note :** Adding home screen widget costs 100 energy. This energy not rechargeable. **Note :** Home Screen Widgets for Local Blynk servers requires port 8080 to be opened. **Sketch:** [Basic Sketch](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/BlynkBlink/BlynkBlink.ino) **Sketch:** [Physical Button Interrupt](https://github.com/blynkkk/blynk-library/blob/master/examples/More/Sync/ButtonInterrupt/ButtonInterrupt.ino) **Sketch:** [Physical Button Poll](https://github.com/blynkkk/blynk-library/blob/master/examples/More/Sync/ButtonPoll/ButtonPoll.ino) **Sketch:** [Physical Button State Sync](https://github.com/blynkkk/blynk-library/blob/master/examples/More/Sync/SyncPhysicalButton/SyncPhysicalButton.ino) ================================================ FILE: mobile/datastreams.md ================================================ # Datastreams ================================================ FILE: mobile/device_selector.md ================================================ ### Device Selector Device selector is a powerful widget which allows you to update widgets based on one active device. This widget is particularly helpful when you have a fleet of devices with similar functionality. Imagine you have 4 devices and every device has a Temperature & Humidity sensor connected to it. To display the data for all 4 devices you would need to add 8 widgets. With Device Selector, you can use only 2 Widgets which will display Temperature and Humidity based on the active device chosen in Device Selector. All you have to do is: 1. Add Device Selector Widget to the project 2. Add 2 widgets (for example Value Display Widget) to show Temperature and Humidity 3. In Widgets Settings you will be able assign them to Device Selector (Source or Target section) 4. Exit settings, Run the project. Now you can change the active device in Device Selector and you will see that Temperature and Humidity values are reflecting the data updates for the device you just picked. **NOTE : ** Webhook Widget will not work with Device Selector (yet). ================================================ FILE: mobile/device_tiles.md ================================================ ### Device Tiles Device tiles is a powerful widget and very similar to the device selector widget, but with UI. It allows you to display 1 pin per device per tile. This widget is particularly helpful when you have a fleet of devices with similar functionality. So you can group similar devices within one layout (template). ================================================ FILE: mobile/email.md ================================================ ### Email Email widget allows you to send email from your hardware to any address. Example code: ```cpp Blynk.email("my_email@example.com", "Subject", "Your message goes here"); ``` It also contains ```to``` field. With this field you may define receiver of email in the app. You may skip ```to``` field when you want to send email to your Blynk app login email: ```cpp Blynk.email("Subject", "Your message goes here"); ``` You can send either ```text/html``` or ```text/plain``` (some clients don't support ```text/html```) email. You can change this content type of email in the Mail widget settings. Additionally you may use ```{DEVICE_NAME}```, ```{DEVICE_OWNER_EMAIL}``` and ```{VENDOR_EMAIL}``` (for the local server) placeholders in the mail for the ```to```, ```subject``` and ```body``` fields: ```cpp Blynk.email("{DEVICE_OWNER_EMAIL}", "{DEVICE_NAME} : Alarm", "Your {DEVICE_NAME} has critical error!"); ``` Limitations : - Maximum allowed email + subject + message length is 120 symbols. However you can increase this limit if necessary by adding ```#define BLYNK_MAX_SENDBYTES XXX``` to you sketch. Where ```XXX``` is desired max length of your email. For example for ESP you can set this to 1200 max length ```#define BLYNK_MAX_SENDBYTES 1200```. The ```#define BLYNK_MAX_SENDBYTES 1200``` must be included before any of the Blynk includes. - Only 1 email per 5 seconds is allowed; - In case you are using gmail you are limited with 500 mails per day (by google). Other providers may have similar limitations, so please be careful; - User is limited with 100 messages per day; ### Unicode in email The library handles all strings as UTF8 Unicode. If you're facing problems, try to print your message to the Serial and see if it works (the terminal should be set to UTF-8 encoding). If it doesn't work, probably you should read about unicode support of your compiler. If it works, but your message is truncated - you need to increase message length limit (all Unicode symbols consume at least twice the size of Latin symbols). ### Increasing message length limit You can increase maximum message length by putting on the top of your sketch (before Blynk includes): ```cpp #define BLYNK_MAX_SENDBYTES 256 // Default is 128 ``` **Sketch:** [Email](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Email/Email.ino) ================================================ FILE: mobile/eventor.md ================================================ ### Eventor Eventor widget allows you to create simple behaviour rules or **events**. Let's look at a typical use case: read temperature from DHT sensor and send push notification when the temperature is over a certain limit : ```cpp float t = dht.readTemperature(); if (isnan(t)) { return; } if (t > 40) { Blynk.notify(String("Temperature is too high : ") + t); } ``` With Eventor you don't need to write this code. All you need is to send the value from the sensor to the server : ```cpp float t = dht.readTemperature(); Blynk.virtualWrite(V0, t); ``` Don't forget that ```virtualWrite``` commands should be wrapped in the timer and can't be used in the main loop. **NOTE** Don't forget to add notification widget. Eventor comes handy when you need to change conditions on the fly without re-uploading new sketch on the hardware. You can create as many **events** as you need. Eventor also could be triggered from the application side. You just need to assign the widget to the same pin as your Event within Eventor. Eventor doesn't constantly sends events. Let's consider simple event as above ```if (temperature > 40) send notification ```. When temperature goes beyond 40 threshold - notification action is triggered. If temperature continues to stay above the 40 threshold no actions will be triggered. But if ```temperature``` goes below threshold and then passes it again - notification will be sent again (there is no 5 sec limit on Eventor notifications). Eventor also supports Timer events. For example, you can set a pin ```V1``` ON/HIGH at 21:00:00 every Friday. With Eventor Time Event you can assign multiple timers on same pin, send any string/number, select days and timezone. In order to remove created **event** please use swipe. You can also swipe out last element in the Event itself. **Sketch:** [Eventor](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Eventor/Eventor.ino) **NOTE:** The timer widget rely on the server time and not your phone time. Sometimes the phone time may not match the server time. **NOTE** : Events are triggered only once when the condition is met. That's mean [chaining of events](https://community.blynk.cc/t/eventor-behavior-bug-feature/20962) is not possible (however, could be enabled for commercials). ================================================ FILE: mobile/gauge.md ================================================ ### Gauge A great visual way to display incoming numeric values. Can work in 2 modes : - PUSH mode (select if from Frequency Reading picker); - Frequency Reading mode; In PUSH mode you update gauge from hardware side with code : ```cpp Blynk.virtualWrite(V1, val); ``` In this mode every message that hardware sends to server is stored automatically on server. PUSH mode doesn't require application to be online or opened. With Frequency Reading mode you need to select update interval and application will trigger events with required timing. Your application should be open and running in order to make requests to hardware. You don't need any code for Analog and Digital pins in that case. However for virtual pins you need to use next code : ```cpp //triggered from app BLYNK_READ(V1) { //send to app Blynk.virtualWrite(V1, val); } ``` #### Formatting options Gauge also has "Label" field which allows use to use formatting. Let's assume, your sensor sends number 12.6789 to Blynk application. Next formatting options are supported: ```/pin/``` - displays the value without formatting (12.6789) ```/pin./``` - displays the value without decimal part (13) ```/pin.#/``` - displays the value with 1 decimal digit (12.7) ```/pin.##/``` - displays the value with two decimal places (12.68) #### Other options You can also change gauge label from hardware with : ```cpp Blynk.setProperty(V1, "label", "My Gauge Label"); ``` or change color : ```cpp //#D3435C - Blynk RED Blynk.setProperty(V1, "color", "#D3435C"); ``` **Sketch:** [BlynkBlink](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/BlynkBlink/BlynkBlink.ino) ================================================ FILE: mobile/gps_streaming.md ================================================ ### GPS Streaming Useful for monitoring smartphone location data such as latitude, longitude, altitude and speed (speed could be often 0 in case smartphone doesn't support it). In order to accept data from this widget you need to : ```cpp BLYNK_WRITE(V1) { float latitude = param[0].asFloat(); float longitude = param[1].asFloat(); float altitude = param[2].asFloat(); float speed = param[3].asFloat(); } ``` or you can use prepared wrapper ```GpsParam``` : ```cpp BLYNK_WRITE(V1) { GpsParam gps(param); // Print 6 decimal places for Lat Serial.println(gps.getLat(), 7); Serial.println(gps.getLon(), 7); Serial.println(gps.getAltitude(), 2); Serial.println(gps.getSpeed(), 2); } ``` GPS Streaming works in background. **Sketch:** [GPS Stream](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/GPS_Stream/GPS_Stream.ino) ================================================ FILE: mobile/gps_trigger.md ================================================ ### GPS Trigger GPS trigger widget allows easily trigger events when you arrive to or leave from some destination. This widget will work in background and periodically will check your coordinates. In case your location is within/out required radius (selected on widget map) widget will send ```HIGH```/```LOW``` command to hardware. For example, let's assume you have GPS Trigger widget assigned to pin ```V1``` and option ```Trigger When Enter```. In that case when you'll arrive to destination point widget will trigger ```HIGH``` event. ```cpp BLYNK_WRITE(V1) { int state = param.asInt(); if (state) { //You enter destination } else { //You leave destination } } ``` More details on how GPS widget works you can read [here](https://developer.android.com/guide/topics/location/strategies.html). GPS trigger widget works in background. ================================================ FILE: mobile/graph.md ================================================ ### Graph Easily plot incoming data from your project in various designs. You can also scroll and zoom graph. Can work in 2 modes : - PUSH mode (select if from Frequency Reading picker); - Frequency Reading mode; In PUSH mode you update gauge from hardware side with code : ```cpp Blynk.virtualWrite(V1, val); ``` In this mode every message that hardware sends to server is stored automatically on server. PUSH mode doesn't require application to be online or opened. With Frequency Reading mode you need to select update interval and application will trigger events with required timing. Your application should be open and running in order to make requests to hardware. You don't need any code for Analog and Digital pins in that case. However for virtual pins you need to use next code : ```cpp //triggered from app BLYNK_READ(V1) { //send to app Blynk.virtualWrite(V1, val); } ``` **Sketch:** [BlynkBlink](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/BlynkBlink/BlynkBlink.ino) ================================================ FILE: mobile/gravity.md ================================================ ### Gravity Gravity is kind of [motion sensors](https://developer.android.com/guide/topics/sensors/sensors_motion.html) that allows you to detect motion of your smartphone. Useful for monitoring device movement, such as tilt, shake, rotation, or swing. The gravity sensor provides a three dimensional vector indicating the direction and magnitude of gravity. Measured in ```m/s^2``` of gravity force applied to ```x```, ```y```, ```z``` axis. In oder to accept data from it you need to : ```cpp BLYNK_WRITE(V1) { //force of gravity applied to axis x int x = param[0].asFloat(); //force of gravity applied to axis y int y = param[1].asFloat(); //force of gravity applied to axis y int z = param[2].asFloat(); } ``` Gravity doesn't work in background. ================================================ FILE: mobile/humidity.md ================================================ ### Humidity Humidity is kind of [environment sensors](https://developer.android.com/guide/topics/sensors/sensors_environment.html) that allows you to measure ambient relative humidity. Measured in ```%``` - actual relative humidity in percent. In oder to accept data from it you need to : ```cpp BLYNK_WRITE(V1) { // humidity in % int humidity = param.asInt(); } ``` Humidity doesn't work in background. ================================================ FILE: mobile/image.md ================================================ ### Image Image widget allows you to display any image within your project. You need to provide http/s url to it. Url should be valid endpoint to the binary data of the image. Url shortener will not work. Right now image widget supports 2 display options: - **Fit**: Image will be scaled to fit height or width of the widget size; - **Fill**: Image will be scaled to fill widget area. Cropping may occur; You can make image widget interactive by providing multiple links to different images with different states and change displayed image index from your hardware or via Eventor widget. For example, select the first icon from the list : ```cpp Blynk.virtualWrite(V1, 1); //image indexing starts from 1 ``` You can also change opacity, scale or rotation of the displayed the image : ```cpp Blynk.setProperty(V1, "opacity", 50); // 0-100% ``` ```cpp Blynk.setProperty(V1, "scale", 30); // 0-100% ``` ```cpp Blynk.setProperty(V1, "rotation", 10); //0-360 degrees ``` also, you can fully replace the list of images from the hardware: ```cpp Blynk.setProperty(V1, "urls", "https://image1.jpg", "https://image2.jpg"); ``` or you can change individual image by it index: ```cpp Blynk.setProperty(V1, "url", 1, "https://image1.jpg"); ``` ================================================ FILE: mobile/joystick.md ================================================ ### Joystick Control servo movements in 4 directions. #### Settings: - **SPLIT**: Each of the parameters is sent directly to the Pin on your hardware (e.g D7). You don't need to write any code. **NOTE:** In this mode you send multiple commands from one widget, which can reduce performance of your hardware. Example: If you have a Joystick Widget and it's set to D3 and D4, it will send 2 commands over the Internet: ```cpp digitalWrite(3, x); digitalWrite(4, y); ``` - **MERGE**: When MERGE mode is selected, you are sending just 1 message, consisting of array of values. But you'll need to parse it on the hardware. This mode can be used with Virtual Pins only. Example: Add a Joystick Widget and set it to MERGE mode. Choose Virtual Pin V1 ```cpp BLYNK_WRITE(V1) // Joystick assigned to V1 { // get x int x = param[0].asInt(); // get y int y = param[1].asInt(); } ``` - **Rotate on Tilt** When it's ON, Joystick will automatically rotate if you use your smartphone in landscape orientation. - **Auto-Return** When it's OFF, Joystick handle will not return back to center position. It will stay where you left it. ### Send On Release **Send On Release** is available for most controller widgets and allows you to decrease data traffic on your hardware. For example, when you move joystick widget, commands are continuously streamed to the hardware, during a single joystick move you can send dozens of commands. There are use-cases where it's needed, however creating such a load may cause hardware reset. We recommend enabling **Send On Release** feature for most of the cases, unless you really need instant feedback. This option is enabled by default. ### Write interval Similar to above option. However, allows you to stream values to your hardware within certain interval. For example, setting write interval to 100 ms - means, that while you move slider only 1 value will be send to hardware within 100 ms. This option also used to decrease data traffic on your hardware. **Sketch:** [JoystickTwoAxis](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/JoystickTwoAxis/JoystickTwoAxis.ino) ================================================ FILE: mobile/labeled_value.md ================================================ ### Labeled Value Displays incoming data from your sensors or Virtual Pins. It is a better version of 'Value Display' as it has a formatting string, so you could format incoming value to any string you want. Can work in 2 modes : - PUSH mode (select if from Frequency Reading picker); - Frequency Reading mode; In PUSH mode you update value display from hardware side with code : ```cpp Blynk.virtualWrite(V1, val); ``` In this mode every message that hardware sends to server is stored automatically on server. PUSH mode doesn't require application to be online or opened. With Frequency Reading mode you need to select update interval and application will trigger events with required timing. Your application should be open and running in order to make requests to hardware. You don't need any code for Analog and digital pins in that case. However for virtual pins you need to use next code : ```cpp //triggered from app BLYNK_READ(V1) { //send to app Blynk.virtualWrite(V1, val); } ``` #### Formatting options Let's assume, your sensor sends number 12.6789 to Blynk application. Next formatting options are supported: ```/pin/``` - displays the value without formatting (12.6789) ```/pin./``` - displays the value without decimal part (13) ```/pin.#/``` - displays the value with 1 decimal digit (12.7) ```/pin.##/``` - displays the value with two decimal places (12.68) #### Home Screen Labeled Value You can also add Labeled Value to your Android Home Screen. Labeled Value works via HTTPS in that case. Have in mind that in "Home Screen" mode Labeled Value has few limitations. Labeled Value will update it's state only once per 15 min. You can change this via Widget Settings. However update interval less than 15 minutes is not guaranteed. You can also resize Labeled Value on Home Screen - just do long click on widget and resize it as you need. **Note :** Adding home screen widget costs 100 energy. This energy not rechargeable. **Note :** Home Screen Widgets for Local Blynk servers requires port 8080 to be opened. **Sketch:** [BlynkBlink](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/BlynkBlink/BlynkBlink.ino) ================================================ FILE: mobile/labeled_value_display.md ================================================ ### Labeled Value Displays incoming data from your sensors or Virtual Pins. It is a better version of 'Value Display' as it has a formatting string, so you could format incoming value to any string you want. Can work in 2 modes : - PUSH mode (select if from Frequency Reading picker); - Frequency Reading mode; In PUSH mode you update value display from hardware side with code : ```cpp Blynk.virtualWrite(V1, val); ``` In this mode every message that hardware sends to server is stored automatically on server. PUSH mode doesn't require application to be online or opened. With Frequency Reading mode you need to select update interval and application will trigger events with required timing. Your application should be open and running in order to make requests to hardware. You don't need any code for Analog and digital pins in that case. However for virtual pins you need to use next code : ```cpp //triggered from app BLYNK_READ(V1) { //send to app Blynk.virtualWrite(V1, val); } ``` #### Formatting options Let's assume, your sensor sends number 12.6789 to Blynk application. Next formatting options are supported: ```/pin/``` - displays the value without formatting (12.6789) ```/pin./``` - displays the value without decimal part (13) ```/pin.#/``` - displays the value with 1 decimal digit (12.7) ```/pin.##/``` - displays the value with two decimal places (12.68) #### Home Screen Labeled Value You can also add Labeled Value to your Android Home Screen. Labeled Value works via HTTPS in that case. Have in mind that in "Home Screen" mode Labeled Value has few limitations. Labeled Value will update it's state only once per 15 min. You can change this via Widget Settings. However update interval less than 15 minutes is not guaranteed. You can also resize Labeled Value on Home Screen - just do long click on widget and resize it as you need. **Note :** Adding home screen widget costs 100 energy. This energy not rechargeable. **Note :** Home Screen Widgets for Local Blynk servers requires port 8080 to be opened. **Sketch:** [BlynkBlink](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/BlynkBlink/BlynkBlink.ino) ================================================ FILE: mobile/lcd.md ================================================ ### LCD This is a regular 16x2 LCD display made in our secret facility in China. It can work in 2 modes : - Simple - Advanced #### Simple mode In simple mode your LCD widget performs as regular widget with Frequency reading. With Frequency Reading mode you need to select update interval and application will trigger events with required timing. Your application should be open and running in order to make requests to hardware. You don't need any code for Analog and Digital pins in that case. However for virtual pins you need to use next code : ```cpp //triggered from app BLYNK_READ(V1) { //send to app Blynk.virtualWrite(V1, val); } ``` In Simple mode LCD also supports formatting options. ##### Formatting options Let's assume, your sensor sends number 12.6789 to Blynk application. Next formatting options supported: ```/pin/``` - displays the value without formatting (12.6789) ```/pin./``` - displays the value without decimal part (13) ```/pin.#/``` - displays the value with 1 decimal digit (12.7) ```/pin.##/``` - displays the value with two decimal places (12.68) **Sketch:** [LCD Simple Mode Pushing](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/LCD/LCD_SimpleModePushing/LCD_SimpleModePushing.ino) **Sketch:** [LCD Simple Mode Reading](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/LCD/LCD_SimpleModeReading/LCD_SimpleModeReading.ino) #### Advanced mode Advanced mode is for experienced users. Allows you to use special commands to control LCD. #### Commands Init LCD variable : ```cpp WidgetLCD lcd(V1); ``` Send message : ```cpp lcd.print(x, y, "Your Message"); ``` Where ```x``` is a symbol position (0-15), ```y``` is a line number (0 or 1), Clear LCD : ```cpp lcd.clear(); ``` **Sketch:** [LCD Advanced Mode](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/LCD/LCD_AdvancedMode/LCD_AdvancedMode.ino) ================================================ FILE: mobile/led.md ================================================ ### LED A simple LED for indication. You need to send 0 in order to turn LED off. And 255 in order to turn LED on. Or just use Blynk API as described below : ```cpp //register to virtual pin 1 WidgetLED led1(V1); led1.off(); led1.on(); ``` All values between 0 and 255 will change LED brightness : ```cpp WidgetLED led2(V2); //set brightness of LED to 50%. led2.setValue(127); ``` You can also change LED color with : ```cpp //#D3435C - Blynk RED Blynk.setProperty(V1, "color", "#D3435C"); ``` #### Home Screen LED You can also add LED to your Android Home Screen. LED works via HTTPS in that case. Have in mind that in "Home Screen" mode LED has few limitations. LED will update it's state only once per 15 min. You can change this via Widget Settings. However update interval less than 15 minutes is not guaranteed. **Note :** Adding home screen widget costs 100 energy. This energy not rechargeable. **Note :** Home Screen Widgets for Local Blynk servers requires port 8080 to be opened. **Sketch:** [LED](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/LED/LED_Blink/LED_Blink.ino) ================================================ FILE: mobile/level_display.md ================================================ ### Level Display Displays incoming data from your sensors or Virtual Pins. Level Display is very similar to progress bar, it is very nice and fancy view for indication of "filled" events, like "level of battery". You can update value display from hardware side with code : ```cpp Blynk.virtualWrite(V1, val); ``` Every message that hardware sends to server is stored automatically on server. PUSH mode doesn't require application to be online or opened. **Sketch:** [Push Example](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/PushData/PushData.ino) ================================================ FILE: mobile/light.md ================================================ ### Light Light is kind of [environment sensors](https://developer.android.com/guide/topics/sensors/sensors_environment.html) that allows you to measure level of light (measures the ambient light level (illumination) in lx). In phones it is used to control screen brightness. In order to accept data from it you need to : ```cpp BLYNK_WRITE(V1) { //light value int lx = param.asInt(); } ``` Light doesn't work in background. ================================================ FILE: mobile/map.md ================================================ ### Map Map widget allows you set points/pins on map from hardware side. This is very useful widget in case you have multiple devices and you want track their values on map. You can send a point to map with regular virtual write command : ```cpp Blynk.virtualWrite(V1, pointIndex, lat, lon, "value"); ``` We also created a wrapper for you to make usage of map simpler : You can change button labels from hardware with : ```cpp WidgetMap myMap(V1); ... int index = 1; float lat = 51.5074; float lon = 0.1278; myMap.location(index, lat, lon, "value"); ``` Using save ```index``` allows you to override existing point value. **Sketch:** [Basic Sketch](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Map/Map.ino) ================================================ FILE: mobile/menu.md ================================================ ### Menu Menu widget allows you to send command to your hardware based on selection you made on UI. Menu sends index of element you selected and not label string. Sending index is starts from 1. It works same way as usual ComboBox element. Example code: ```cpp BLYNK_WRITE { switch (param.asInt()) { case 1: { // Item 1 Serial.println("Item 1 selected"); break; } case 2: { // Item 2 Serial.println("Item 2 selected"); break; } } } ``` You can also set Menu items from hardware side with : ```cpp Blynk.setProperty(V1, "labels", "label 1", "label 2", "label 3"); ``` **Sketch:** [Menu](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Menu/Menu.ino) ================================================ FILE: mobile/music_player.md ================================================ ### Music Player Simple UI element with 3 buttons - simulates music player interface. Every button sends it's own command to hardware : ```play```, ```stop```, ```prev```, ```next```. You can change widget state within the app from hardware side with next commands: ``` Blynk.virtualWrite(Vx, “play”); Blynk.virtualWrite(Vx, “stop”); ``` You can also change widget play/stop state with next code (equivalent to above commands) : ```Blynk.setProperty(V1, "isOnPlay", "false");``` **Sketch:** [Music Player](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Player/Player.ino) ================================================ FILE: mobile/notification.md ================================================ ### Push Notifications Push Notification widget allows you to send push notification from your hardware to your device. Currently it also contains 2 additional options : - **Notify when hardware offline** - you will get push notification in case your hardware went offline. - **Offline Ignore Period** - defines how long hardware could be offline (after it went offline) before sending notification. In case period is exceeded - "hardware offline" notification will be send. You will get no notification in case hardware was reconnected within specified period. - **Priority** high priority gives more chances that your message will be delivered without any delays. See detailed explanation [here](https://firebase.google.com/docs/cloud-messaging/concept-options#setting-the-priority-of-a-message). **WARNING** : high priority contributes more to battery drain compared to normal priority messages. Example code: ```cpp Blynk.notify("Hey, Blynkers! My hardware can push now!"); ``` You can also use placeholder for device name, that will be replaced on the server with your device name: ```cpp Blynk.notify("Hey, Blynkers! My {DEVICE_NAME} can push now!"); ``` Limitations : - Maximum allowed body length is 120 symbols; - Every device can send only 1 notification every 5 seconds; ### Unicode in push notifications The library handles all strings as UTF8 Unicode. If you're facing problems, try to print your message to the Serial and see if it works (the terminal should be set to UTF-8 encoding). If it doesn't work, probably you should read about unicode support of your compiler. If it works, but your message is truncated - you need to increase message length limit (all Unicode symbols consume at least twice the size of Latin symbols). ### Increasing message length limit You can increase maximum message length by putting on the top of your sketch (before Blynk includes): ```cpp #define BLYNK_MAX_SENDBYTES 256 // Default is 128 ``` **Sketch:** [PushNotification](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/PushNotification/PushNotification_Button/PushNotification_Button.ino) ================================================ FILE: mobile/numberInput.md ================================================ ### Numeric Input Numeric Input displays and let's you directly alter a number value. Similar to the Step widget, it has incrementing and decrementing buttons for quicker values changes, which you can setup (step, looping) in widget settings. ================================================ FILE: mobile/number_input.md ================================================ ### Numeric Input Numeric Input displays and let's you directly alter a number value. Similar to the Step widget, it has incrementing and decrementing buttons for quicker values changes, which you can setup (step, looping) in widget settings. ================================================ FILE: mobile/proximity.md ================================================ ### Proximity Proximity is kind of [position sensors](https://developer.android.com/guide/topics/sensors/sensors_position.html) that allows you to determine how close the face of a smartphone is to an object. Measured in ```cm``` - distance from phone face to object. However most of this sensors returns only FAR / NEAR information. So return value will be ```0/1```. Where 0/LOW is ```FAR``` and 1/HIGH is ```NEAR```. In order to accept data from it you need to : ```cpp BLYNK_WRITE(V1) { // distance to object int proximity = param.asInt(); if (proximity) { //NEAR } else { //FAR } } ``` Proximity doesn't work in background. ================================================ FILE: mobile/report.md ================================================ ### Reports Function of Reports widget is to configure and customize data reports in CSV format. You can choose between one-time or continuous scheduled reports. Also, within the Reports you can clear all the data collected by your devices. You need to configure initial inputs in Edit mode, and then, in Play mode you will be able to customize reports. #### Edit mode. Data inputs configuration In edit mode (when your project is stopped) you define the Datastreams you would like to later be included in reports. Reports widget is designed to work with the Device Tiles widget. If you don't use Device Tiles you can still select a single device or a group of devices as a source of data for reports. You have to choose either Device Tiles or single / group of the devices for the report. You can't combine these 2 options. #### Play mode. After you added source devices and their Datastreams click Play button and click on the Reports button. ### Customizing Reports. Every Report option supposes it's own settings: ```Report name``` - give your report a meaningful name. ```Data source``` - select the Datastreams you would like to be included in reports. ```Report Frequency``` - Defines how often reports will be sent. They can be one-time and scheduled. ```one-time``` - will instantly generate report and send it to the email addresses specified. Click on the right icon to send it. Scheduled reports can be sent ```daily```/```weekly```/```monthly```. ```At Time``` will set up a time of the day the report will be sent. ```Start```/```End``` specifies start and end date the reports will continue to be sent. For Weekly Report you can select a day of the week when report should be sent. For Monthly report you can choose whether to send report on the first or last day of the month. ```Recipients``` - specify up to 5 email addresses. ```Data resolution``` defines granularity of your reports. Supported granularities are: ```minute```, ```hourly``` and ```daily```. For example, when you generate daily report with 1 minute granularity you'll get ```24 * 60 * 60``` points in your daily report for every selected Datastream. ```Group data in reports by``` - specify the output format of the CSV file(s). ```Datastream``` you will get 1 CSV file for each Datastream. ```Device``` you will get 1 CSV file per each device. Each file will contain all of the included Datastreams. ```Report``` you will get 1 CSV file for all your devices and all your Datastreams. ```Timezone correction``` - specify the time zone adjustment if you need to get report date and time adjusted to a specific time zone ```Date and time format``` - defines the format of the timestamp field of your data. You can select ```2018-06-21 20:16:48```, ```2018-06-21T20:16:48+03:00``` or other supported formats. There is one specific ```Timestamp``` format - which reflects the difference between the current time and midnight, January 1, 1970 UTC measured in milliseconds. After the report is set up - click on "OK" button at the right upper corner. Your report is ready. Once you configured the report you will see when is the ```Next``` report scheduled and also a schedule for this report. After the report was sent at least once, you can see when the ```Last``` report was sent. ```Last``` label also contains the status regarding the report: - ```OK```: the report was generated and sent to the Recipients successfully; - ```No Data```: the report doesn't contain any data for the configured period; - ```Error```: something went wrong. Please contact the Blynk Team support; Reports will be generated even if your project is not in active (Play) mode. However, inactive projects don't generate any data. **NOTE:** all reports are encoded in UTF-16. Please, make sure you selected UTF-16 as required "Character set" for your csv reader. ================================================ FILE: mobile/rgb.md ================================================ ### zeRGBa zeRGBa is usual RGB controller (color picker). #### Settings: - **SPLIT**: Each of the parameters is sent directly to the Pin on your hardware (e.g D7). You don't need to write any code. **NOTE:** In this mode you send multiple commands from one widget, which can reduce performance of your hardware. Example: If you have a zeRGBa Widget and it's set to D1, D2, D3 it will send 3 commands over the Internet: ```cpp digitalWrite(1, r); digitalWrite(2, g); digitalWrite(3, b); ``` - **MERGE**: When MERGE mode is selected, you are sending just 1 message, consisting of array of values. But you'll need to parse it on the hardware. This mode can be used with Virtual Pins only. Example: Add a zeRGBa Widget and set it to MERGE mode. Choose Virtual Pin V1. ```cpp BLYNK_WRITE(V1) // zeRGBa assigned to V1 { // get a RED channel value int r = param[0].asInt(); // get a GREEN channel value int g = param[1].asInt(); // get a BLUE channel value int b = param[2].asInt(); } ``` - **Send On Release** is available for most controller widgets and allows you to decrease data traffic on your hardware. For example, when you move joystick widget, commands are continuously streamed to the hardware, during a single joystick move you can send dozens of commands. There are use-cases where it's needed, however creating such a load may cause hardware reset. We recommend enabling **Send On Release** feature for most of the cases, unless you really need instant feedback. This option is enabled by default. ### Write interval Similar to above option. However, allows you to stream values to your hardware within certain interval. For example, setting write interval to 100 ms - means, that while you move slider only 1 value will be send to hardware within 100 ms. This option also used to decrease data traffic on your hardware. ================================================ FILE: mobile/rtc.md ================================================ ### RTC Real-time clock allows you to get time from server. You can preselect any timezone on UI to get time on hardware in required locale. **Sketch:** [RTC](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/RTC/RTC.ino) ================================================ FILE: mobile/ru/accelerometer.md ================================================ ### Акселерометр (Accelerometer) Акселерометр один из [сенсоров движения](https://developer.android.com/guide/topics/sensors/sensors_motion.html), который позволяет определить движение Вашего телефона в пространстве. Он может пригодится для отслеживания таких событий как тряска, удар, поворот или наклон телефона. Концептуально, акселерометр определяет силу ускорения приложенную к вашему телефону. Единица измерения - м/c^2 приложенная к каждой из осей ```x```, ```y```, ```z```. Чтобы получить данные с сенсора нужно использовать следующий код : ```cpp BLYNK_WRITE(V1) { //сила ускорения, приложенная к оси x int x = param[0].asFloat(); //сила ускорения, приложенная к оси y int y = param[1].asFloat(); //сила ускорения, приложенная к оси z int z = param[2].asFloat(); } ``` Акселерометр не работает при свернутом приложении. ================================================ FILE: mobile/ru/barometer.md ================================================ ### Барометр/Давление (Barometer/pressure) Барометр один из сенсоров [окружающей среды](https://developer.android.com/guide/topics/sensors/sensors_environment.html) и позволяет измерять атмосферное давление. Измеряется в ```hPa``` (гПа) или ```mbar``` (мБар). Чтобы получить данные с сенсора нужно использовать следующий код : ```cpp BLYNK_WRITE(V1) { //Давление в мБар int pressure = param[0].asInt(); } ``` Барометр не работает при свернутом приложении. ================================================ FILE: mobile/ru/ble.md ================================================ ### Bluetooth с низким энергопотреблением Этот виджет позволяет включить блутзуз с низким энергопотреблением на вашем телефоне. На текущий момент виджет также требует наличия интернет соединения (постараемся пофиксить в ближайшем будущем). Некоторые типы виджетов нельзя использовать вместе с блутузом, например исторический граф, так как он требует чтобы данные отправлялись на сервер, чего блутуз виджет не делает. **Список поддерживаемых чипов и контроллеров:** [BLE](https://github.com/blynkkk/blynk-library/tree/master/examples/Boards_Bluetooth) ================================================ FILE: mobile/ru/bluetooth.md ================================================ ### Блютуз (Bluetooth) Этот виджет позволяет включить блютуз на вашем телефоне. На текущий момент виджет также требует наличия интернет соединения (постараемся пофиксить в ближайшем будущем) и поддерживается только на Android. Некоторые типы виджетов нельзя использовать вместе с блютузом, например исторический граф, так как он требует чтобы данные отправлялись на сервер, чего блютуз виджет не делает. **Список поддерживаемых чипов и контроллеров:** [BLE](https://github.com/blynkkk/blynk-library/tree/master/examples/Boards_Bluetooth) ================================================ FILE: mobile/ru/bridge.md ================================================ ### Мост (Bridge) Мост может быть использован для связи между устройствами (без участия приложения). Вы можете отправлять цифровые / аналоговые / виртуальные команды записи с одного устройства на другое, зная только токен авторизации. На данный момент виджет Мост не обязательно использовать в приложении (здесь он используется для указания того, что у нас есть такая функция). **Вы можете использовать несколько мостов для управления несколькими устройствами.** Виджет Мост использует виртуальный пин и превращает его в канал для управления другим устройством. Это означает, что вы можете контролировать любые виртуальные, цифровые или аналоговые пины целевого устройства. Будьте осторожны, не используйте пины типа ```A0, A1, A2 ...``` при обмене данными между различными типами устройств, так как в таких случаях Arduino Core может ссылаться на неверные пины. Пример кода для устройства A, которое будет отправлять значения на устройство B: ```cpp //Инициирует виджет Моста на V1 устройства A WidgetBridge bridge1(V1); ... void setup() { Blynk.begin(...); while (Blynk.connect() == false) { // Ждем пока Blynk подключится } bridge1.digitalWrite(9, HIGH); // выставим триггер HIGH на D9 // устройства B. Код на устройстве // B не требуется bridge1.analogWrite(10, 123); bridge1.virtualWrite(V1, "hello"); // вам нужно написать код на // устройстве B, чтобы получить // это значение. См. ниже bridge1.virtualWrite(V2, "value1", "value2", "value3"); } BLYNK_CONNECTED() { bridge1.setAuthToken("OtherAuthToken"); // токен с устройства B } ``` **ВАЖНО:** при выполнении ```virtualWrite()``` с виджета Мост, устройство B должно обрабатывать входящие данные с устройства A. Например, если вы отправляете значение с устройства A на устройство B, используя ```bridge.virtualWrite (V5)```, вам необходимо использовать свой обработчик на устройстве B: ```cpp BLYNK_WRITE(V5){ int pinData = param.asInt(); // переменная pinData будет хранить значение, // полученное через Bridge } ``` Имейте в виду, что ```bridge.virtualWrite``` не отправляет никаких значений в мобильное приложение. Для этого вам нужно вызвать ```Blynk.virtualWrite```. **Пример кода:** [Мост](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Bridge/Bridge.ino) ================================================ FILE: mobile/ru/button.md ================================================ ### Кнопка (Button) Кнопка может работать в двух режимах - в режиме переключателя (нажатие и отжатие посылает 1 сообщение) и в пуш режиме (нажатие посылает команду и отжатие посылает команду). Кнопка позволяет послать любое число. По умолчанию кнопка шлет 0/1 (LOW/HIGH). В пуш режиме кнопка шлет 1 (HIGH) на нажатие и 0 (LOW) при отжатии. Вы так же можете менять состояние кнопки с микроконтроллера. Например, включить кнопку на пине V1 можно так : ```cpp Blynk.virtualWrite(V1, HIGH); ``` Так же можно поменять тексты в кнопке : ```cpp Blynk.setProperty(V1, "onLabel", "Вкл"); ``` ```cpp Blynk.setProperty(V1, "offLabel", "Выкл"); ``` Название самой кнопки : ```cpp Blynk.setProperty(V1, "label", "Моя кнопочка"); ``` Или изменить ее цвет : ```cpp //#D3435C - Blynk RED Blynk.setProperty(V1, "color", "#D3435C"); ``` В случае если микроконтроллер был перегружен, Вы всегда можете получить последнее состояние кнопки с сервера с помощью фичи синхронизации состояния: ```cpp //как только подключились BLYNK_CONNECTED() { //запросить информацию у сервера о состоянии пина V1 Blynk.syncVirtual(V1); } //этот метод будет вызыван после ответа сервера BLYNK_WRITE(V1) { int buttonState = param.asInt(); } ``` #### Кнопка на рабочем столе Если Вы используете Android, то Вы можете добавить Blynk кнопку на рабочий стол. В этом случае кнопка будет работать по протоколу HTTPS. Такого рода кнопки имеют определенные ограничения по функционалу в связи с ограничениями платформы Android. Например, Вы не можете получить мгновенную синхронизацию состояния кнопки на рабочем столе с состоянием на микроконтроллере. Так как состояние кнопки на рабочем столе обновляется раз в 15 мин. **Замечание:** Добавление виджета кнопки на рабочий стол стоит 100 энергии. Эта энергия не возвращается после удаления виджета. Также такая кнопка будет работать на локальном сервере только если открыть порт 8080. **Пример кода:** [Базовый пример](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/BlynkBlink/BlynkBlink.ino) **Пример кода:** [Синхронизация состояния с физической кнопкой через прерывания](https://github.com/blynkkk/blynk-library/blob/master/examples/More/Sync/ButtonInterrupt/ButtonInterrupt.ino) **Пример кода:** [Синхронизация состояния с физической кнопкой через поллинг](https://github.com/blynkkk/blynk-library/blob/master/examples/More/Sync/ButtonPoll/ButtonPoll.ino) **Пример кода:** [Синхронизация состояния с физической кнопкой](https://github.com/blynkkk/blynk-library/blob/master/examples/More/Sync/SyncPhysicalButton/SyncPhysicalButton.ino) ================================================ FILE: mobile/ru/device_selector.md ================================================ ### Селектор устройств (Device Selector) Селектор устройств - это мощный виджет, который позволяет обновлять виджеты на основе одного активного устройства. Этот виджет особенно полезен, когда у вас есть несколько устройств с аналогичной функциональностью. Представьте, что у вас есть 4 устройства, и к каждому устройству подключен датчик температуры и влажности. Для отображения данных по всем 4 устройствам вам необходимо добавить 8 виджетов. С помощью Селектора устройств вы можете использовать только 2 виджета, которые будут отображать температуру и влажность в зависимости от активного устройства, выбранного в Селекторе. Все, что вам нужно сделать, это: 1. Добавить виджет Селектора устройств в проект 2. Добавить 2 виджета (например виджет отображения значений (Value Display Widget)), чтобы отобразить температуру и влажность 3. В настройках виджетов вы сможете назначить их на Селектор устройств (в разделе источника или цели) 4. Выйти из настроек, запустить проект Теперь вы можете изменить активное устройство в Селекторе устройств и увидите, что значения температуры и влажности отражают обновленные данные для только что выбранного вами устройства. **ПРИМЕЧАНИЕ:** Виджет вебхук ([Webhook](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/WebHook/WebHook_GET/WebHook_GET.ino)) пока не работает с Селектором устройств. ================================================ FILE: mobile/ru/device_tiles.md ================================================ ### Плитка устройств (Device Tiles) Плитка устройств - это мощный виджет, очень похожий на виджет Селектора устройств (Device Selector), но с пользовательским интерфейсом. Позволяет отображать один пин с устройства на одну плитку. Этот виджет особенно полезен, когда у вас есть несколько устройств с аналогичной функциональностью. Теперь вы можете группировать похожие устройства на одном макете (шаблоне). ================================================ FILE: mobile/ru/email.md ================================================ ### Электронная почта (Email) Виджет электронной почты позволяет отправлять электронные письма с вашего оборудования на любой адрес. Пример кода: ```cpp Blynk.email("my_email@example.com", "Тема", "Текст вашего сообщения"); ``` Код содержит первое поле ```to```. С помощью этого поля вы можете определить получателей электронной почты в приложении. Вы можете пропустить поле ```to```, если хотите отправить электронное письмо на адрес электронной почты используемый для входа в приложение Blynk: ```cpp Blynk.email("Тема", "Текст вашего сообщения"); ``` Вы можете отправить электронное писбом в форматах либо ```text/html```, либо ```text/plain``` (помните что некоторые клиенты не поддерживают ```text/html```). Вы можете изменить формат содержимого электронного письма в настройках виджета. Дополнительно в письме вы можете использовать заполнители/переменные ```{DEVICE_NAME}```, ```{DEVICE_OWNER_EMAIL}``` и ```{VENDOR_EMAIL}``` (для локального сервера) в полях ```to``` (кому),``` subject``` (тема) и ```body``` (текст сообщения): ```cpp Blynk.email("{DEVICE_OWNER_EMAIL}", "{DEVICE_NAME} : Тревога", "Ваше устройство {DEVICE_NAME} имеет критическую ошибку!"); ``` **Недостатки:** - Максимально допустимые ограничения (почта + тема + длина сообщения) = 120 символов. Однако вы можете увеличить этот лимит при необходимости добавив ```#define BLYNK_MAX_SENDBYTES XXX``` к вашему коду. Где ```XXX``` - это максимальная длина вашего письма в символах. Например, для ESP вы можете установить максимальную длину 1200 символов ```#define BLYNK_MAX_SENDBYTES 1200```. Параметр ```#define BLYNK_MAX_SENDBYTES 1200``` должен быть опредлен в коде до включения Blynk. - Разрешено отправлять 1 электронное письмо в течение 5 секунд; - Если вы используете Gmail сервис (Google), вы ограничены 500 письмами в день. Другие провайдеры могут иметь аналогичные ограничения, поэтому, пожалуйста, будьте внимательны; - Пользователи Blynk сервера ограничены 100 сообщениями в день; ### Кодировка в электронной почте Библиотека обрабатывает все строки в кодировке UTF-8. Если у вас возникли проблемы, попробуйте напечатать ваше сообщение в терминал COM порта и посмотрите на результат (терминал должен быть настроен на кодировку UTF-8). Если не работает, возможно, вам следует также прочитать о поддержке кодировок вашего компилятора. Если работает, но ваше сообщение обрезано - вам нужно увеличить ограничение длины сообщения (т.к. все символы кодировки UTF-8 потребляют как минимум вдвое больше байт информации если символы не Латинские). ### Увеличение лимита длины сообщения Вы можете увеличить максимальную длину сообщения, поместив в верхнюю часть своего кода строку (до опредления Blynk): ```cpp #define BLYNK_MAX_SENDBYTES 256 // По умолчанию 128 байт ``` **Пример кода:** [Электронная почта](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Email/Email.ino) ================================================ FILE: mobile/ru/eventor.md ================================================ ### Обработчик событий (Eventor) Виджет Обработчик событий позволяет создавать простые правила поведения или **события**. Давайте рассмотрим типичный вариант использования: считывание температуры с датчика DHT и отправка push-уведомления, когда температура превышает определенный предел: ```cpp float t = dht.readTemperature(); if (isnan(t)) { return; } if (t > 40) { Blynk.notify(String("Температура слишком высокая: ") + t); } ``` С Обработчиком событий вам не нужно писать этот код. Все, что вам нужно, это отправить значение с датчика на сервер Blynk: ```cpp float t = dht.readTemperature(); Blynk.virtualWrite(V0, t); ``` Не забывайте, что команды ```virtualWrite``` должны быть заключены в таймер и не должны использоваться в основном цикле ```loop```. **ПРИМЕЧАНИЕ:** Не забудьте добавить виджет уведомлений в приложении. Обработчик событий пригодится вам, когда нужно изменить условия на лету без повторной загрузки нового скетча на аппаратное обеспечение. Вы можете создать столько **событий**, сколько вам нужно. Обработчик событий также может быть запущен со стороны приложения. Вам просто нужно назначить виджет на тот же контакт, что и ваше событие в Обработчике событий. Обработчик событий не постоянно отправляет события. Давайте рассмотрим простой пример, как показано выше ```if (temperature > 40) send notification```. Когда температура превышает 40 пороговых значений - отправляется уведомление. Если температура продолжает оставаться выше 40 никакие повторные действия не будут инициированы. Но если ```temperature``` опускается ниже порогового значения, а затем проходит его снова уведомление будет отправлено повторно (для уведомлений Обработчика событий нет ограничения отправки в течение 5 секунд). Обработчик событий также поддерживает события таймера (Timer). Например, вы можете установить пин ```V1``` ON/HIGH в 21:00:00 каждую пятницу. В Обработчике событий вы можете назначить несколько таймеров на один и тот же пин, отправить любую строку/число, выбрать день и часовой пояс. Чтобы удалить созданное **событие**, пожалуйста, используйте сдвиг пальцем по экрану. Вы также можете перенести последний элемент самого события. **Пример кода:** [Обработчик событий](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Eventor/Eventor.ino) **ПРИМЕЧАНИЕ:** Виджет таймера зависит от времени сервера, а не вашего телефона. Иногда время телефона может не соответствовать времени сервера. **ПРИМЕЧАНИЕ:** события запускаются только один раз при выполнении условия. Это означитает что [цепочка событий] (https://community.blynk.cc/t/eventor-behavior-bug-feature/20962) невозможна (однако она может быть включена в коммерческой версии). ================================================ FILE: mobile/ru/gauge.md ================================================ ### Указатель (Gauge) Отличный визуальный способ отображения входящих числовых значений. Может работать в 2 режимах: - режим PUSH (выберается в списке выбора частоты считывания); - режим частоты считываний; В режиме PUSH вы обновляете значения указателя со стороны оборудования с помощью кода: ```cpp Blynk.virtualWrite(V1, val); ``` В этом режиме каждое сообщение, которое отправляет аппаратное устройство автоматически сохраняется на сервере. Режим PUSH не требует, чтобы приложение было онлайн или открыто. В режиме частоты считывния вам необходимо выбрать интервал обновления данных, и приложение будет запускать события считывния с требуемым периодичностью. Ваше приложение должно быть открыто и запущено для отправки запросов на оборудование. Вам не нужен код для аналоговых и цифровых выводов в даном случае. Однако для виртуальных выводов вам необходимо использовать следующий код: ```cpp //вызывать из приложения BLYNK_READ(V1) { //отправить в приложение Blynk.virtualWrite(V1, val); } ``` #### Параметры форматирования Указатель также имеет поле «Label» (Метка), которое позволяет использовать форматирование. Предположим, ваш датчик отправляет число 12.6789 в приложение Blynk. Поддерживаются следующие параметры форматирования: ```/pin/``` - отображает значение без форматирования (12.6789) ```/pin./``` - отображает значение без десятичной части (13) ```/pin.#/``` - отображает значение с одним десятичным знаком (12.7) ```/pin.##/``` - отображает значение с двумя десятичными знаками (12.68) #### Другие опции Вы также можете изменить метку прибора с помощью: ```cpp Blynk.setProperty(V1, "label", "Мое значение метки"); ``` или изменить цвет (кодировка RGB): ```cpp //#D3435C - Красный цвет Blynk.setProperty(V1, "color", "#D3435C"); ``` **Пример кода:** [Светодиод](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/BlynkBlink/BlynkBlink.ino) ================================================ FILE: mobile/ru/gps_streaming.md ================================================ ### Поток GPS (GPS Streaming) Полезно для мониторинга местонахождения смартфона получать данные о широте, долготе, высоте и скорости (скорость часто может быть 0, если смартфон не поддерживает ее измерение). Чтобы принимать данные из этого виджета, вам необходимо: ```cpp BLYNK_WRITE(V1) { float latitude = param[0].asFloat(); float longitude = param[1].asFloat(); float altitude = param[2].asFloat(); float speed = param[3].asFloat(); } ``` или вы можете использовать подготовленную оболочку ```GpsParam``` : ```cpp BLYNK_WRITE(V1) { GpsParam gps(param); //Печать лат/лон с 6 десятичными знаками Serial.println(gps.getLat(), 7); Serial.println(gps.getLon(), 7); Serial.println(gps.getAltitude(), 2); Serial.println(gps.getSpeed(), 2); } ``` Поток GPS работает в фоновом режиме. **Пример кода:** [Поток GPS](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/GPS_Stream/GPS_Stream.ino) ================================================ FILE: mobile/ru/gps_trigger.md ================================================ ### Триггер GPS (GPS Trigger) Виджет Триггер GPS позволяет легко инициировать события, когда вы входите или выходите из географической зоны. Этот виджет будет работать в фоновом режиме и периодически будет проверять ваши координаты. Если ваше местоположение находится в пределах или вне указанной зоны (географическая зона выбирается на карте виджета), виджет отправит команду ```HIGH```/``` LOW``` на аппаратное устройство. Например, Триггер GPS назначен для пина ```V1```, и включена опция ```Trigger When Enter```. В этом случае, когда вы окажитесь в указанной географической зоне виджет вызовет событие ```HIGH```. ```cpp BLYNK_WRITE(V1) { int state = param.asInt(); if (state) { //Вы вошли в зону } else { //Вы вышли из зоны } } ``` Подробнее о том, как работает GPS-виджет, вы можете прочитать [здесь](https://developer.android.com/guide/topics/location/strategies.html). **ВНИМАНИЕ:** Виджет Триггер GPS работает в фоновом режиме. ================================================ FILE: mobile/ru/graph.md ================================================ ### График (Graph) Легко отображать входящие данные из вашего проекта в графическом варинате. Вы также можете прокручивать и масштабировать график. Виджет может работать в двух режимах: - режим PUSH (выбирается из списка режимов частоты считывания); - режим частоты считывания; В режиме PUSH вы обновляете датчик со стороны оборудования с помощью кода: ```cpp Blynk.virtualWrite(V1, val); ``` В этом режиме каждое сообщение, которое аппаратное устройство отправляет на сервер, автоматически сохраняется на сервере. Режим PUSH не требует, чтобы приложение было онлайн или запущенно. В режиме частоты считывания вам нужно выбрать интервал обновления, и приложение будет запускать события с требуемым интервалом. Ваше приложение должно быть открыто и запущено для отправки запросов на оборудование. В данном случае вам не нужен код для аналоговых и цифровых пинов. Однако для виртуальных пинов вам необходимо использовать следующий код: ```cpp //вызываем из приложения BLYNK_READ(V1) { //отправляем в приложение Blynk.virtualWrite(V1, val); } ``` **Пример кода:** [Светодиод](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/BlynkBlink/BlynkBlink.ino) ================================================ FILE: mobile/ru/gravity.md ================================================ ### Гравитация (Gravity) Гравитация - это своего рода [датчики движения](https://developer.android.com/guide/topics/sensors/sensors_motion.html), который позволяет обнаруживать движение вашего смартфона. Полезно для мониторинга движения устройства, таких как наклон, встряхивание, вращение или качание. Датчик силы притяжения выдает трехмерный вектор, указывающий направление и величину силы притяжения. Измеряется в ```m/s^2``` силы притяжения, приложенной к оси ```x```, ```y```, ```z```. Для того, чтобы принять данные от него, вам необходимо: ```cpp BLYNK_WRITE(V1) { //сила притяжения, приложенная к оси x int x = param[0].asFloat(); //сила притяжения, приложенная к оси y int y = param[1].asFloat(); //сила притяжения, приложенная к оси y int z = param[2].asFloat(); } ``` **ВНИМАНИЕ:** Виджет гравитации не работает в фоновом режиме. ================================================ FILE: mobile/ru/humidity.md ================================================ ### Влажность (Humidity) Влажность является своего рода [датчиком среды](https://developer.android.com/guide/topics/sensors/sensors_environment.html), который позволяет измерять относительную влажность окружающей среды. Измеряется в ```%``` - фактически это относительная влажность в процентах. Для того, чтобы принять данные от датчика, вам необходимо: ```cpp BLYNK_WRITE(V1) { //Влажность в % int humidity = param.asInt(); } ``` **ВНИМАНИЕ:** Влажность не работает в фоновом режиме. ================================================ FILE: mobile/ru/image.md ================================================ ### Изображение (Image) Виджет изображений позволяет отображать любое изображение в вашем проекте. Вы должны предоставить http/s URL адрес. URL должен быть действительной конечной точкой для бинарных данных изображения. Укороченный URL робать не будет. Сейчас виджет изображения поддерживает два варианта отображения: - **Fit** (Вписать): изображение будет масштабировано, в соответствовии с высотой или шириной виджета; - **Fill** (Заполнить): изображение будет масштабировано для заполнения области виджета. Может произойти обрезка изображения; Вы можете сделать виджет Изображения интерактивным, предоставив несколько ссылок на разные изображения с разными состояниями и менять индекс отображаемого изображения с вашего оборудования или с помощью виджета [Обработчкий событий (Eventor)](https://github.com/blynkkk/blynkkk.github.io/blob/master/mobile/ru/eventor.md). Например, выберите первый значок из списка: ```cpp Blynk.virtualWrite(V1, 1); //индексация изображения начинается с 1 ``` Вы также можете изменить прозрачность, масштаб или поворот изображения: ```cpp Blynk.setProperty(V1, "opacity", 50); // прозраочность 0-100% ``` ```cpp Blynk.setProperty(V1, "scale", 30); // масштаб 0-100% ``` ```cpp Blynk.setProperty(V1, "rotation", 10); // 0-360 градусы ``` также вы можете полностью заменить список изображений с аппаратного устройства: ```cpp Blynk.setProperty(V1, "urls", "https://image1.jpg", "https://image2.jpg"); ``` или вы можете изменить индивидуальное изображение по его индексу: ```cpp Blynk.setProperty(V1, "url", 1, "https://image1.jpg"); ``` ================================================ FILE: mobile/ru/joystick.md ================================================ ### Джойстик (Joystick) Управление сервоприводом в 4 направлениях. #### Параметры: - **Раздельный** (SPLIT): Каждый из параметров отправляется непосредственно на пин вашего оборудования (например, D7 и D8). Вам не нужно писать код. **ПРИМЕЧАНИЕ:** В этом режиме вы отправляете несколько команд из одного виджета, что может снизить производительность вашего оборудования. **Пример:** Если у вас есть виджет Джойстика и он настроен на D3 и D4, он отправит две команды через Интернет: ```cpp digitalWrite(3, x); digitalWrite(4, y); ``` - **Совмещенный** (MERGE): Когда выбран режим MERGE, вы отправляете только 1 сообщение, состоящее из массива значений. Но вам нужно разобрать его на оборудовании устройства. Этот режим можно использовать только с виртуальными пин-ами. **Пример:** добавьте виджет Джойстика и установите его в режим "MERGE". Выберите виртуальный пин V1 ```cpp BLYNK_WRITE(V1) // Joystick assigned to V1 { // получить x int x = param[0].asInt(); // получить y int y = param[1].asInt(); } ``` - **Вращать при Наклоне** (Rotate on Tilt) Когда это параметр включен, Джойстик будет автоматически вращаться, если вы будете использовать смартфон в горизонтальной положении. - **Автовозврат** (Auto-Return) Когда это парамтер выключен, ручка джойстика не вернется в центральное положение. Она останется там, где вы ее оставили. ### Отправка при Отжатии (Send On Release) **Send On Release** доступно для большинства виджетов контроллеров и позволяет уменьшить трафик данных на ваше оборудование. Например, когда вы перемещаете виджет джойстика, команды непрерывно передаются на аппаратное устройство, во время одного движения джойстика вы можете отправлять десятки команд. Есть случаи, когда это необходимо, однако создание такой нагрузки может привести к зависанию или сбросу оборудования. Мы рекомендуем включить функцию **Send On Release** для большинства случаев, если вам не требуется мгновенная обратная связь. Эта опция включена по умолчанию. ### Интервал записи (Write interval) Похоже на вышеуказанный вариант. Однако, позволяет вам передавать значения на ваше оборудование в через определенные интервалы времени. Например, установка интервала записи на 100 мс означает, что при перемещении ползунка на аппаратное обеспечение будет отправлено только 1 значение в течение 100 мс. Эта опция также используется для уменьшения трафика данных на ваше оборудовании. **Пример кода:** [Джойстик две оси](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/JoystickTwoAxis/JoystickTwoAxis.ino) ================================================ FILE: mobile/ru/labeled_value.md ================================================ ### Значение переменной (Labeled Value) Отображает входящие данные с ваших датчиков или виртуальных пин-ов. Это лучшая версия «Отображения значений», так как в ней есть строка форматирования, где вы можете форматировать входящее значение в любую нужную вам строку. Может работать в 2 режимах: - режим PUSH (выбирается из списка частоты считывания); - режим частоты считывания. В режиме PUSH вы обновляете значения виджета со стороны аппаратного устройства с помощью кода: ```cpp Blynk.virtualWrite(V1, val); ``` В этом режиме каждое сообщение, которое аппаратное обеспечение отправляет на сервер, автоматически сохраняется на сервере. Режим PUSH не требует, чтобы приложение было онлайн или запущено. В режиме частоты считывания вам нужно выбрать интервал обновления, и приложение будет запускать события с требуемым интервалом. Ваше приложение должно быть открыто и запущено для отправки запросов на оборудование. В данном случае вам не нужен код для аналоговых и цифровых пин-ов. Однако для виртуальных пин-ов вам необходимо использовать следующий код: ```cpp //взызов из приложения BLYNK_READ(V1) { //отправка в приложение Blynk.virtualWrite(V1, val); } ``` #### Параметры форматирования Предположим, ваш датчик отправляет число 12.6789 в приложение Blynk. Поддерживаются следующие параметры форматирования: ```/pin/``` - отображает значение без форматирования (12.6789) ```/pin./``` - отображает значение без десятичной части (13) ```/pin.#/``` - отображает значение с одним десятичным знаком (12.7) ```/pin.##/``` - отображает значение с двумя десятичными знаками (12.68) #### Значение переменной на рабочем столе Вы также можете добавить значение переменной на рабочий стол Android. В этом случае значение переменной работает через HTTPS протокол. Имейте в виду, что в режиме «Рабочий стол» обновление значений переменной имеет некоторые ограничения. Значение переменной будет обновлять свое состояние только один раз в 15 минут. Вы можете изменить этот параметр в настройках виджета. Однако интервал обновления менее 15 минут не гарантируется. Вы также можете изменить размер виджета Значение переменной на главном экране - просто сделайте долгий тап на виджете и измените его размер на необходимый. **Примечание:** Добавление виджета на домашний экран стоит 100 энергии. Энергия при удалении виджета не восстанавливается. **Примечание:** Виджеты рабочего стола для локальных серверов Blynk требуют открыть порт 8080. **Пример кода:** [Базовый пример](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/BlynkBlink/BlynkBlink.ino) ================================================ FILE: mobile/ru/labeled_value_display.md ================================================ ### Значение переменной (Labeled Value) Отображает входящие данные с ваших датчиков или виртуальных пин-ов. Это лучшая версия «Отображения значений», так как в этом виджете есть строка форматирования, поэтому вы можете форматировать входящее значение в любую нужную вам строку. Может работать в 2 режимах: - режим PUSH ( выберитается из списка частоты считывания); - режим частоты считывания; В режиме PUSH вы должны обновлять отображение значений на аппаратной устройстве с помощью кода: ```cpp Blynk.virtualWrite(V1, val); ``` В этом режиме каждое сообщение, которое аппаратное устройств отправляет на сервер, автоматически сохраняется на сервере. Режим PUSH не требует, чтобы приложение было онлайн или запущено. В режиме частоты считывания вам нужно выбрать интервал обновления, и приложение будет запускать события с требуемым интервалом. Ваше приложение должно быть открыто и запущено для отправки запросов на оборудование. В данном случае вам не нужен код для аналоговых и цифровых пин-ов. Однако для виртуальных пин-ов вам необходимо использовать следующий код: ```cpp //вызываем из приложения BLYNK_READ(V1) { //отправляем в приложение Blynk.virtualWrite(V1, val); } ``` #### Параметры форматирования Предположим, ваш датчик отправляет число 12.6789 в приложение Blynk. Поддерживаются следующие параметры форматирования: ```/pin/``` - отображает значение без форматирования (12.6789) ```/pin./``` - отображает значение без десятичной части (13) ```/pin.#/``` - отображает значение с одним десятичным знаком (12.7) ```/pin.##/``` - отображает значение с двумя десятичными знаками (12.68) #### Значение переменной на главном экране Вы также можете добавить значение переменной на рабочий стол Android. В этом случае значение переменной работает через HTTPS протокол. Имейте в виду, что в режиме «Рабочий стол» значение переменной имеет некторые ограничения. Значение переменной будет обновлять свое состояние только один раз в 15 минут. Вы можете изменить этот параметр через настройки виджета. Однако интервал обновления менее 15 минут не гарантируется. Вы также можете изменить размер виджета Значение переменной на рабочем столе - просто сделайте длинный тап на виджете и измените его размер на необходимый. **Примечание:** Добавление виджета на домашний экран стоит 100 энергии. Эта энергия не восстанавливается. **Примечание:** Виджеты главного экрана для локальных серверов Blynk требуют открытия порта 8080. **Пример кода:** [Светодиод](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/BlynkBlink/BlynkBlink.ino) ================================================ FILE: mobile/ru/lcd.md ================================================ ### ЖК дисплей (LCD) Это обычный ЖК-дисплей 16x2, "сделанный" на нашем секретном предприятии в Китае. Виджет может работать в двух режимах: - Простой (Simple) - Расширенный (Advanced) #### Простой режим (Simple) В простом режиме ваш ЖК-виджет работает как обычный виджет с частотой чтения. В режиме частоты считывания вам нужно выбрать интервал обновления данных, и приложение будет запускать события с требуемым интервалом. Ваше приложение должно быть открыто и запущено для отправки запросов на оборудование. В данном случае вам не нужен код для аналоговых и цифровых пин-ов. Однако для виртуальных пин-ов вам необходимо использовать следующий код: ```cpp //вызываем из приложения BLYNK_READ(V1) { //отправляем в приложение Blynk.virtualWrite(V1, val); } ``` В простом режиме ЖК-дисплей также поддерживает параметры форматирования. #### Параметры форматирования Предположим, ваш датчик отправляет число 12.6789 в приложение Blynk. Поддерживаются следующие параметры форматирования: ```/pin/``` - отображает значение без форматирования (12.6789) ```/pin./``` - отображает значение без десятичной части (13) ```/pin.#/``` - отображает значение с одним десятичным знаком (12.7) ```/pin.##/``` - отображает значение с двумя десятичными знаками (12.68) **Пример кода:** [ЖК дисплей простой режим - PUSH](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/LCD/LCD_SimpleModePushing/LCD_SimpleModePushing.ino) **Пример кода:** [ЖК дисплей простой режим - 1 сек](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/LCD/LCD_SimpleModeReading/LCD_SimpleModeReading.ino) #### Расширенный режим (Advanced) Расширенный режим предназначен для опытных пользователей. Позволяет использовать специальные команды для управления ЖК-дисплеем. #### Команды Инициируем переменную ЖК-дисплея: ```cpp WidgetLCD lcd(V1); ``` Отправим сообщение: ```cpp lcd.print(x, y, "Ваше сообщение"); ``` Где ```x``` - позиция символа (0-15), ``` y``` - номер строки (0 или 1), Очистка ЖК-дисплея: ```cpp lcd.clear(); ``` **Пример кода:** [ЖК-дисплей расширенный режим](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/LCD/LCD_AdvancedMode/LCD_AdvancedMode.ino) ================================================ FILE: mobile/ru/led.md ================================================ ### Светодиод (LED) Простой светодиод для индикации. Вам нужно отправить 0, чтобы выключить светодиод. И 255 для того, чтобы включить светодиод. Или просто используйте Blynk API, как описано ниже: ```cpp //регистрируемся на виртуальном пине 1 WidgetLED led1(V1); led1.off(); led1.on(); ``` Все значения от 0 до 255 изменяют яркость светодиода: ```cpp WidgetLED led2(V2); //установить яркость светодиода на 50%. led2.setValue(127); ``` Вы также можете изменить цвет светодиода с помощью кода: ```cpp //#D3435C - Красный в RGB формате Blynk.setProperty(V1, "color", "#D3435C"); ``` #### Светодиод на рабочем столе Вы можете добавить виджет светодиод на рабочий стол Android. В этом случае светодиод работает через протокол HTTPS. Имейте в виду, что в режиме «Рабочий стол» виджет светодиода имеет некоторые ограничения. Светодиод будет обновлять свое состояние только один раз в 15 минут. Вы можете изменить этот интервал через настройки виджета. Однако интервал обновления менее 15 минут не гарантируется. **Примечание:** Добавление виджета на рабочий стол стоит 100 энергии. Эта энергия не возвращается при удалении виджета. **Примечание:** Виджеты рабочего стола для локальных серверов Blynk требуют открыть порт 8080. **Пример кода:** [Диод](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/LED/LED_Blink/LED_Blink.ino) ================================================ FILE: mobile/ru/level_display.md ================================================ ### Индикатор уровня (Level Display) Отображает входящие данные с ваших датчиков или виртуальных пин-ов. Отображение уровня очень похоже на индикатор выполнения процесса, это очень красивый и причудливый вид для индикации «выполненных» событий, например «уровня заряда батареи». Вы можете обновить отображение значения с аппаратной стороны с помощью кода: ```cpp Blynk.virtualWrite(V1, val); ``` Каждое сообщение, которое аппаратное устройство отправляет на сервер, автоматически сохраняется на сервере. Режим PUSH не требует, чтобы приложение было онлайн или запущено. **Пример кода:** [Пример PUSH](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/PushData/PushData.ino) ================================================ FILE: mobile/ru/light.md ================================================ ### Свет (Light) Свет - это своего рода [датчики окружающей среды](https://developer.android.com/guide/topics/sensors/sensors_environment.html), который позволяет измерять уровень освещенности (уровень внешней освещенности измеряется в люксах). В телефонах чаще всего используется для управления яркостью экрана. Для того, чтобы принять данные этого виджета, вам необходимо: ```cpp BLYNK_WRITE(V1) { //уровень освещенности int lx = param.asInt(); } ``` Виджет Свет не работает в фоновом режиме. ================================================ FILE: mobile/ru/map.md ================================================ ### Карта (Map) Виджет Карты позволяет устанавливать точки/флажки на карте со стороны оборудования. Это очень полезный виджет, если у вас есть несколько устройств, и вы хотите отслеживать их позиции на карте. Вы можете отправить точку на карту с помощью обычной команды виртуальной записи: ```cpp Blynk.virtualWrite(V1, pointIndex, lat, lon, "Название"); ``` Мы также создали оболочку, чтобы вы могли упростить использование виджета Карты. Вы можете изменить метки флажков на оборудовании с помощью кода: ```cpp WidgetMap myMap(V1); ... int index = 1; float lat = 51.5074; float lon = 0.1278; myMap.location(index, lat, lon, "Название"); ``` Использование уникальных ```index``` позволяет вам переопределить существующее значение точки. **Пример кода:** [Базовый пример Карты](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Map/Map.ino) ================================================ FILE: mobile/ru/menu.md ================================================ ### Меню (Menu) Виджет Меню позволяет отправлять команды на ваше оборудование на основе выборного списка, сделанного вами в пользовательском интерфейсе. Меню отправляет индекс выбранного элемента спика, а не саму строку. Отправляемый индекс начинается с 1. Он работает так же, как типовой элемент "Комбинированный список" ([ComboBox](https://ru.wikipedia.org/wiki/%D0%9A%D0%BE%D0%BC%D0%B1%D0%B8%D0%BD%D0%B8%D1%80%D0%BE%D0%B2%D0%B0%D0%BD%D0%BD%D1%8B%D0%B9_%D1%81%D0%BF%D0%B8%D1%81%D0%BE%D0%BA)). Пример кода: ```cpp BLYNK_WRITE { switch (param.asInt()) { case 1: { // Пункт 1 Serial.println("Выбран Пункт 1"); break; } case 2: { // Пункт 2 Serial.println("Выбран Пункт 2"); break; } } } ``` Вы также можете назначить пункты меню со стороны оборудования с помощью кода: ```cpp Blynk.setProperty(V1, "labels", "label 1", "label 2", "label 3"); ``` **Пример кода:** [Меню](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Menu/Menu.ino) ================================================ FILE: mobile/ru/music_player.md ================================================ ### Музыкальный проигрыватель (Music Player) Простой элемент интерфейса с 3 кнопками - имитирует интерфейс музыкального проигрывателя. Каждая кнопка отправляет свою команду на аппаратное устройство: ```play``` (воспроизвести), ```stop``` (стоп), ```prev``` (предыдущий), ```next``` (следующий). Вы можете изменить состояние виджета в приложении с аппаратной стороны с помощью следующих команд: ``` Blynk.virtualWrite(Vx, "play"); Blynk.virtualWrite(Vx, "stop"); ``` Вы также можете изменить состояние воспроизведение/остановка виджета с помощью следующего кода (эквивалент вышеупомянутых команд): ```Blynk.setProperty(V1, "isOnPlay", "false");``` **Пример кода:** [Музыкальный проигрыватель](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Player/Player.ino) ================================================ FILE: mobile/ru/notification.md ================================================ ### Всплывающие уведомления (Push Notifications) Виджет Push-уведомлений позволяет отправлять уведомления с вашего оборудования на ваше Android/iOS устройство. В настоящее время он также содержит три дополнительные опции: - **Уведомлять, когда оборудование отключено** (Notify when hardware offline) - вы получите push-уведомление, если ваше оборудование отключилось. - **Автономный период игнорирования** (Offline Ignore Period) - определяет, как долго оборудование может находиться в режиме ожидания (после того, как оно отключилось) перед отправкой уведомления. В случае превышения периода ожидания будет отправлено уведомление «Аппаратное отключение». Вы не получите уведомление, если оборудование переподключится в течение указанного периода. - **Приоритет** (Priority) - высокий (high) приоритет дает больше шансов, что ваше сообщение будет доставлено без задержек. См. более подробное объяснение [здесь](https://firebase.google.com/docs/cloud-messaging/concept-options#setting-the-priority-of-a-message). **ПРЕДУПРЕЖДЕНИЕ**: высокий приоритет способствует большей разрядке батареи, по сравнению с обычными приоритетом уведомлений. Пример кода: ```cpp Blynk.notify("Привет, Blynk-еры! Мое оборудование может отправлять уведомления!"); ``` Вы также можете использовать переменные/заполнители для имени устройства, который будет заменен с сервера именем вашего устройства: ```cpp Blynk.notify("Привет, Blynk-еры! Мой {DEVICE_NAME} может отправлять уведомления!"); ``` Ограничения: - Максимально допустимая длина уведомления составляет 120 символов; - Каждое устройство может отправлять только 1 уведомление каждые 5 секунд; ### Кодировка всплывающих уведомлений Библиотека обрабатывает все строки как в кодировке UTF-8. Если вы столкнулись с проблемами, попробуйте отправить ваше сообщение на последовательный порт и посмотреть, работает ли оно (терминал должен быть настроен на кодировку UTF-8). Если так не работает, возможно, вам следует прочитать о поддержке кодировки UTF-8 вашего компилятора. Если работает, но ваше сообщение урезано - вам необходимо увеличить ограничение длины сообщения (все символы UTF-8 потребляют как минимум вдвое больше байт информации). ### Увеличение лимита длины уведомления Вы можете увеличить максимальную длину сообщения, поместив строку (до включения Blynk) в верхнюю часть своего кода: ```cpp #define BLYNK_MAX_SENDBYTES 256 // По умолчанию 128 байт ``` **Пример кода:** [Всплывающие уведомления](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/PushNotification/PushNotification_Button/PushNotification_Button.ino) ================================================ FILE: mobile/ru/numberInput.md ================================================ ### Числовой ввод (Numeric Input) Числовой ввод отображается и позволяет вам непосредственно ввести числовое значение. Как и в виджете [Шаг (Step)](https://github.com/blynkkk/blynkkk.github.io/blob/master/mobile/ru/step.md), он также имеет кнопки увеличения и уменьшения для более быстрого изменения значений, вы можете установить (шаг, цикл) (step, looping) в настройках виджета. ================================================ FILE: mobile/ru/number_input.md ================================================ ### Числовой ввод (Numeric Input) Числовой ввод отображается и позволяет вам непосредственно изменить числовое значение. Как и в виджете [Шаг (Step)](https://github.com/blynkkk/blynkkk.github.io/blob/master/mobile/ru/step.md), он также имеет кнопки увеличения и уменьшения для более быстрого изменения значений, вы можете установить (шаг, цикл) (step, looping) в настройках виджета. ================================================ FILE: mobile/ru/proximity.md ================================================ ### Близость (Proximity) Близость - это своего рода [датчики положения](https://developer.android.com/guide/topics/sensors/sensors_position.html) это позволяет определить, насколько близко смартфон к лицу. Измеряется в ```cm``` (см) - расстояние от телефона до лица. Однако большинство этих датчиков возвращает только информацию FAR / NEAR. Поэтому, возвращаемое значение будет ```0 / 1```. Где 0 / LOW = ```FAR``` (далеко), а 1 / HIGH = ``` NEAR``` (рядом). Для того, чтобы принять данные из виджета, вам необходимо: ```cpp BLYNK_WRITE(V1) { // расстояние до объекта int proximity = param.asInt(); if (proximity) { // РЯДОМ } else { // ДАЛЕКО } } ``` Виджет близость не работает в фоновом режиме. ================================================ FILE: mobile/ru/report.md ================================================ ### Отчеты (Reports) Функция виджета Отчеты заключается в настройке и разметке отчетов данных в формате CSV. Вы можете выбрать разовые или переодически запланированные отчеты. Кроме того, в отчетах вы можете очистить все пользовательсике данные, собранные с ваших устройств. Вам необходимо настроить начальные параметры в режиме редактирования, а затем уже в режиме воспроизведения вы сможете настроить сами отчеты. #### Режим редактирования. Конфигурация ввода данных В режиме редактирования (когда ваш проект остановлен) вы определяете потоки данных, которые вы хотели бы позже включить в отчет. Виджет Отчеты предназначен для работы с виджетом [Плитка устройств (Device Tiles)](https://github.com/blynkkk/blynkkk.github.io/blob/master/mobile/ru/device_tiles.md). Если вы не используете плитки устройств, вы все равно можете выбрать одно устройство или группу устройств в качестве источника данных для отчетов. Вы должны выбрать либо [Плитку устройств](https://github.com/blynkkk/blynkkk.github.io/blob/master/mobile/ru/device_tiles.md), либо одино устройство, либо группу устройств для отчета. Вы не можете объединить эти оба варианта. #### Режим воспроизведения После добавления исходных устройств и их потоков данных нажмите кнопку «Воспроизвести» и нажмите кнопку «Отчеты». ### Настройка отчетов Каждый параметр отчета предполагает свои собственные настройки: ```Report name``` (Имя отчета) - дайте вашему отчету осмысленное имя. ```Data source``` (Источники данных) - выберите потоки данных, которые вы хотели бы включить в отчеты. ```Report Frequency``` (периодичность отчетов) - Определяет, как часто будут отправляться отчеты. Они могут быть разовыми и запланированными. ```one-time``` (Сейчас) - мгновенно сформирует отчет и отправит его на указанные адреса электронной почты. Нажмите на значок справа, чтобы отправить отчет. Запланированные отчеты могут быть отправлены ```daily```/```weekly```/```monthly``` (ежедневно/еженедельно/ежемесячно). ```At Time``` (Время) установите время дня, когда отчет будет отправлен. ```Start```/```End``` (Качало/Конец) указывает дату начала и окончания оправки отчетов. Для еженедельного отчета вы можете выбрать день недели, когда отчет должен быть отправлен. Для ежемесячного отчета вы можете выбрать, отправку отчета в первый или последний день месяца. ```Recipients``` (Получатели) - укажите до 5 адресов электронной почты.. ```Data resolution``` (Разрешение данных) определяет детализацию ваших отчетов. Поддерживаемые детализации: ```minute``` (ежеминутно), ```hourly``` (ежечасно) и ```daily``` (ежедневно). Например, когда вы генерируете ежедневный отчет с детализацией в 1 минуту, вы получаете ```24 * 60 * 60``` единиц данных в вашем ежедневном отчете за каждый выбранный поток. ```Group data in reports by``` (Группировка данных в отчетах) - укажите выходной формат файла-(ов) CSV: ```Datastream``` (Поток) - вы получите один CSV файл для каждого потока данных. ```Device``` (Устройство) - вы получите один CSV-файл на каждое устройство. Каждый файл будет содержать все включенные потоки данных. ```Report``` (Отчет) - вы получите один CSV-файл для всех ваших устройств и всех ваших потоков данных. ```Timezone correction``` (Времненная зона) - укажите корректировку часового пояса, если вам нужно настроить дату и время отчета на определенный часовой пояс. ```Date and time format``` (Формат даты и времени) - определяет формат поля временной метки ваших данных. Вы можете выбрать ```2018-06-21 20:16:48```, ```2018-06-21T20:16:48+03:00``` или другой поддерживаемый формат. Существует особый формат ```Timestamp``` (Временная метка), которая отражает разницу между текущим временем и полуночью 1 января 1970 года UTC, измеряемую в миллисекундах. После настройки отчета нажмите кнопку «ОК» в правом верхнем углу. Ваш отчет готов. После настройки отчета вы увидите, когда запланирован следущий отчет ```Next```, а также увидите расписание для этого отчета. После отправки отчета хотя бы один раз, вы можете увидеть дату его последней отправки ```Last```. ```Last``` (Последний) метка также содержит статус отправки отчета: - ```OK``` (Успешно): отчет был сгенерирован и успешно отправлен Получателям; - ```No Data``` (Нет данных): отчет не содержит данных за указанный период; - ```Error``` (Ошибка): что-то пошло не так. Пожалуйста, свяжитесь со службой поддержки Blynk. Отчеты будут генерироваться, даже если ваш проект не находится в активном (Play) режиме. Однако помните, неактивные проекты небудут генерировать данные. **ПРИМЕЧАНИЕ:** все отчеты формируются в кодировке UTF-16. Пожалуйста, убедитесь, что при открытии файла отчета вы выбрали кодировку UTF-16 в вашем CSV-редакторе. ================================================ FILE: mobile/ru/rgb.md ================================================ ### ЗеБРа (zeRGBa) ЗеБРа - это обычный RGB контроллер (палитры цветов). #### Настройки: - **SPLIT** (Раздельный): Каждый из параметров отправляется непосредственно на пин вашего оборудования (например, D7). Вам не нужно писать код. **ПРИМЕЧАНИЕ:** В этом режиме вы отправляете одновременно несколько команд из одного виджета, что может снизить производительность вашего оборудования. Пример: у вас есть виджет ЗеБРа и для него было установлено значение D1, D2, D3, он отправит 3 команды через Интернет: ```cpp digitalWrite(1, r); digitalWrite(2, g); digitalWrite(3, b); ``` - **MERGE** (Объединенный): Когда выбран режим MERGE, вы отправляете только 1 сообщение, состоящее из массива значений. Но в последствии вам нужно разобрать сообщение на своем оборудовании. Этот режим можно использовать только с виртуальными пин-ами. Пример: добавьте виджет ЗеБРа и установите его в режим MERGE. Выберите виртуальный контакт V1. ```cpp BLYNK_WRITE(V1) // ЗеБРа назначен на V1 { // получим значение КРАСНОГО канала int r = param[0].asInt(); // получим значение ЗЕЛЕНОГО канала int g = param[1].asInt(); // получим значение СИНЕГО канала int b = param[2].asInt(); } ``` - **Отправка при Отжатии (Send On Release)** доступно для большинства виджетов контроллеров и позволяет уменьшить трафик данных на вашем оборудовании. Например, когда вы перемещаете виджет джойстика, команды непрерывно передаются на аппаратное устройство, во время одного движения джойстика вы можете отправлять десятки команд. Есть случаи, когда это необходимо, однако создание такой нагрузки может привести к сбросу оборудования. Мы рекомендуем включить функцию **Отправка при Отжатии** для большинства случаев, если вам не требуется мгновенная обратная связь. Эта опция включена по умолчанию. ### Интервал записи (Write interval) Похоже на вышеуказанный вариант. Однако, позволяет вам передавать значения на ваше оборудование в через определенные интервалы времени. Например, установка интервала записи на 100 мс означает, что при перемещении ползунка на аппаратное обеспечение будет отправлено только 1 значение в течение 100 мс. Эта опция также используется для уменьшения трафика данных на ваше оборудовании. ================================================ FILE: mobile/ru/rtc.md ================================================ ### Часы реального времени (RTC) Часы реального времени позволяют получать время с сервера. Вы можете предварительно выбрать любой часовой пояс в пользовательском интерфейсе, чтобы получить время на оборудование из нужной локали. **Пример кода:** [Часы реального времени](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/RTC/RTC.ino) ================================================ FILE: mobile/ru/segmentedSwitch.md ================================================ ### Сегментированный переключатель (Segmented Switch) Виджет Сегментированный переключатель позволяет отправлять команды на ваше оборудование на основе выбора, сделанного вами в пользовательском интерфейсе. Сегментированный переключатель отправляет индекс выбранного вами элемента, а не строку метки. Отправленный индекс начинается с 1. Он работает так же, как типовой элемент [Комбинированный список (ComboBox)](https://ru.wikipedia.org/wiki/%D0%9A%D0%BE%D0%BC%D0%B1%D0%B8%D0%BD%D0%B8%D1%80%D0%BE%D0%B2%D0%B0%D0%BD%D0%BD%D1%8B%D0%B9_%D1%81%D0%BF%D0%B8%D1%81%D0%BE%D0%BA) или [Меню (Menu)](https://github.com/blynkkk/blynkkk.github.io/blob/master/mobile/ru/menu.md). Пример кода: ```cpp BLYNK_WRITE { switch (param.asInt()) { case 1: { // Пункт 1 Serial.println("Выбран пункт 1"); break; } case 2: { // Пункт 2 Serial.println("Выбран пункт 2"); break; } } } ``` Вы также можете установить пункты меню со стороны оборудования с помощью кода: ```cpp Blynk.setProperty(V1, "labels", "label 1", "label 2", "label 3"); ``` **Пример кода:** [Меню](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Menu/Menu.ino) ================================================ FILE: mobile/ru/segmented_control.md ================================================ ### Сегментированный переключатель (Segmented Switch) Виджет Сегментированный переключатель позволяет отправлять команды на ваше оборудование на основе выбора, сделанного вами в пользовательском интерфейсе. Сегментированный переключатель отправляет индекс выбранного вами элемента, а не строку метки. Отправленный индекс начинается с 1. Он работает так же, как типовой элемент [Комбинированный список (ComboBox)](https://ru.wikipedia.org/wiki/%D0%9A%D0%BE%D0%BC%D0%B1%D0%B8%D0%BD%D0%B8%D1%80%D0%BE%D0%B2%D0%B0%D0%BD%D0%BD%D1%8B%D0%B9_%D1%81%D0%BF%D0%B8%D1%81%D0%BE%D0%BA) или [Меню (Menu)](https://github.com/blynkkk/blynkkk.github.io/blob/master/mobile/ru/menu.md). Пример кода: ```cpp BLYNK_WRITE { switch (param.asInt()) { case 1: { // Пункт 1 Serial.println("Выбран пункт 1"); break; } case 2: { // Пункт 2 Serial.println("Выбран пункт 2"); break; } } } ``` Вы также можете установить пункты меню со стороны оборудования с помощью кода: ```cpp Blynk.setProperty(V1, "labels", "label 1", "label 2", "label 3"); ``` **Пример кода:** [Меню](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Menu/Menu.ino) ================================================ FILE: mobile/ru/slider.md ================================================ ### Слайдер (Slider) Слайдер очень похож на потенциометр. Он позволяет посылать значения в диапазоне от минимального значения к максимальному. Диапазон допустимых максимального и минимального значений определяется в приложении. Вы так же можете менять состояние слайдера с микроконтроллера. Например, Вы можете изменить положение ползунка в слайдере : ```cpp Blynk.virtualWrite(V1, 55); ``` Так же можно поменять текст в слайдере : ```cpp Blynk.setProperty(V1, "label", "Мой слайдерок"); ``` или изменить цвет : ```cpp //#D3435C - Карсный цвет в кодирвке RGB Blynk.setProperty(V1, "color", "#D3435C"); ``` ### Отправка при отжатии (Send On Release) **Отправка при отжатии** эта функциональность позволяет снизить количество сообщений которые отправляет слайдер при смещении ползунка. Даже при незначительном перемещени ползунка - приложение шлет довольно много команд. Для некторых микроконтроллеров это может быть очень большой нагрузкой и они могут начать перегружатся. Тем не менее есть сценарии использования для которых это очень важно. По умолчанию, слайдер будет слать значения когда вы отпускаете ползунок. Мы рекомендуем исползовать этот подход, кроме случая когда Вам необходимо получать промежуточные значения при движении ползунка слайдера. **Пример кода:** [Базовый пример](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/BlynkBlink/BlynkBlink.ino) ================================================ FILE: mobile/ru/step.md ================================================ ### Шаговое управление (Step Control) Шаговое управление похоже на две кнопки, назначенные одному пин-у. Одна кнопка увеличивает ваше значение на установленный шаг, а другая уменьшает его. Это очень полезно для случаев использования, когда вам нужно точно изменять ваши значения, но вы не можете достичь такой точности с помощью виджета [Cлайдера](https://github.com/blynkkk/blynkkk.github.io/tree/master/mobile/ru/slider.md). **Отправить шаг (Send Step)** опция позволяет вам отправлять на оборудование каждый шаг нвместо фактического значения виджета. **Зациклить значения (Loop value)** опция позволяет сбросить Шаговый виджет на начальное значение при достижении максимального. Вы можете изменить значение Шагового виджета со стороны оборудования. Например: ```cpp Blynk.virtualWrite(V1, val); ``` Вы можете изменить описание виджета со стороны оборудования с помощью кода: ```cpp Blynk.setProperty(V1, "label", "Мой счетчик."); ``` Вы можете изменить шаг виджета со стороны оборудования: ```cpp Blynk.setProperty(V1, "step", 10); ``` или изменить цвет: ```cpp //#D3435C - Красный цвет в RGB кодировке Blynk.setProperty(V1, "color", "#D3435C"); ``` Вы также можете получить состояние виджета Шагового управления с сервера в случае, если ваше оборудование отключилось, с помощью функции Blynk.Sync: ```cpp BLYNK_CONNECTED() { Blynk.syncVirtual(V1); } BLYNK_WRITE(V1) { int stepperValue = param.asInt(); } ``` ### Интервал записи (Write interval) Опция позволяет вам передавать значения на ваше оборудование в через определенные интервалы времени. Например, установка интервала записи на 100 мс означает, что при перемещении ползунка на аппаратное обеспечение будет отправлено только 1 значение в течение 100 мс. Эта опция также используется для уменьшения трафика данных на ваше оборудовании. **Пример кода:** [Базовый пример](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/BlynkBlink/BlynkBlink.ino) ================================================ FILE: mobile/ru/styled_button.md ================================================ ### Стилизованная кнопка (Styled Button) Работает в режиме кнопки или выключателя. Позволяет отправить любое числовое значение при нажатии и отпускании кнопки. По умолчанию кнопка использует значения 0/1 (HIGH/LOW). Кнопка при нажатии отправляет 1 (HIGH) а при отпускании отправляет 0 (LOW). Вы можете изменить состояние кнопки со стороны оборудования. Например, включить кнопку, назначенную виртуальному пин-у V1: ```cpp Blynk.virtualWrite(V1, HIGH); ``` Вы можете изменить надписи кнопок со стороны оборудования при помощи кода: ```cpp Blynk.setProperty(V1, "onLabel", "ВКЛ"); Blynk.setProperty(V1, "offLabel", "ВЫКЛ"); ``` или изменить цвет кнопки во включенном и выключенном состоянии: ```cpp Blynk.setProperty(V1, "onColor", "#D3435C"); Blynk.setProperty(V1, "offColor", "#D3435C"); ``` или изменить цвет фона кнопки: ```cpp Blynk.setProperty(V1, "onBackColor", "#00435C"); Blynk.setProperty(V1, "offBackColor", "#00435C"); ``` Вы также можете узнать состояние кнопки с сервера, если ваше оборудование внезапно отключилось, с помощью функции Blynk.Sync: ```cpp BLYNK_CONNECTED() { Blynk.syncVirtual(V1); } BLYNK_WRITE(V1) { int buttonState = param.asInt(); } ``` **Пример кода:** [Базовый пример](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/BlynkBlink/BlynkBlink.ino) **Пример кода:** [Синхронизация состояния с физической кнопкой через прерывания](https://github.com/blynkkk/blynk-library/blob/master/examples/More/Sync/ButtonInterrupt/ButtonInterrupt.ino) **Пример кода:** [Синхронизация состояния с физической кнопкой через поллинг](https://github.com/blynkkk/blynk-library/blob/master/examples/More/Sync/ButtonPoll/ButtonPoll.ino) **Пример кода:** [Синхронизация состояния с физической кнопкой](https://github.com/blynkkk/blynk-library/blob/master/examples/More/Sync/SyncPhysicalButton/SyncPhysicalButton.ino) ================================================ FILE: mobile/ru/super_chart.md ================================================ ### Диаграмма (SuperChart) Диаграмма используется для живой визуализации и хранения данных. Вы можете использовать виджет для логирования данных датчиков, бинарных событий и многого другого. Чтобы использовать виджет Диаграмма, вам нужно будет передать данные с оборудования с желаемым интервалом, используя таймеры. [Здесь приведен](https://examples.blynk.cc/?board=ESP8266&shield=ESP8266%20WiFi&example=GettingStarted%2FPushData) базовый пример передачи данных. #### Взаимодействие: - **Переключение между режимами текущий и временной** Нажмите диапазоны времени в нижней части виджета, чтобы изменить масштаб Диаграммы по времени. - **Тап по легенде графиков** показать или скрыть поток данных. - **Долгий тап на графике** покажет метку времени и соответствующие значения. - **Быстро проведите пальцем влево или вправо, чтобы увидеть предыдущие данные** впоследствии вы можете прокручивать данные назад и вперед в пределах заданного временного диапазона. - **Полноэкранный режим** нажмите эту кнопку, чтобы открыть полноэкранный режим в альбомной ориентации. Чтобы выйти из режима полного экрана, просто поверните телефон обратно в портретный режим. График должен вращаться автоматически. В полноэкранном режиме вы увидите X (время) и несколько шкал Y. Полноэкранный режим можно отключить в настройках виджета. - **Кнопка меню** Кнопка меню откроет дополнительные функции: - Экспорт в CSV - Стереть данные на сервере #### Настройки диаграммы: - **Заголовок диаграммы (Chart Title)** общее наименование диаграммы. - **Размер шрифта заголовка (Title Font Size)** выберите из 3 размеров шрифта. - **Выравнивание заголовка (Title Alignment)** выберите выравнивание заголовка диаграммы. Этот параметр влияет на положение заголовка и легенды в виджете. - **Показать ось X (время) (Show x-axis (time))** выберите настройку, если хотите показать шкалу времени внизу графика. - **Автоматическое масштабирование для всех потоков данных (Override Auto Scaling for All Datastreams)** отключение этой опции позволит выполнить ручную настройку для оси Y (см. ниже). - **Выбор масштаба времени (Time ranges picker)** Позволяет выбрать необходимые периоды (`15m`,` 30m`, `1h`,` 3h`, ...) и разрешение для вашего графика. Разрешение определяет, насколько подробные ваши данные. Прямо сейчас график поддерживает два типа разрешения: `standard` и `high`. Разрешение также зависит от выбранного периода. Например, `standard` разрешение для `1d` означает, что вы будете получать 24 значения в день (одно в час), а при `high` разрешении вы будете получать за` 1d` 1440 значений в день (одно в минуту). - **Потоки данных (Datastreams)** добавить потоки данных (см. ниже, как настроить потоки данных). #### Настройки потоков данных Виджет поддерживает до 4 потоков данных. Нажмите значок настроек потоков данных, чтобы открыть настройки. **Дизайн (Design)** выберите доступные типы диаграмм: - Линейная (Line) - С областями (Area) - Гистограмма (Bar) - Бинарная (Binary) (приведение данных к двоичному виду) **Цвет (Color)** выберите сплошные цвета или градиенты. **Источник и ввод (Source and input)** - Вы можете использовать три типа источника данных: **1. Виртуальный пин (Virtual Pin)** - выберите желаемое устройство и виртуальный пин для получения данных. **2. Теги (Tags)** - диаграмма может агрегировать данные с нескольких устройств, используя встроенные функции агрегирования. Например, если у вас есть 10 датчиков температуры, посылающих температуру с заданным интервалом, Вы можете отобразить среднее значение от 10 датчиков в виджете. Использование тегов: - **[Добавить Тэг](http://docs.blynk.cc/#blynk-main-operations-control-of-multiple-devices-tags)** на каждое устройство, с которого вы хотите агрегировать данные. Это можно сделать в настройках проекта Blynk. - **Отправить данные в виртуальный пин (Push data to the same Virtual Pin)** на каждое устройство. (т.е. ```Blynk.virtualWrite (V0, temperature);```) - **Выберите тег в качестве источника (Choose Tag as a source)** в виджете Диаграмма и используйте пин, куда поступают данные (т.е. V0) **Добступные функции:** - `SUM` будет суммировать все входящие значения в указанный виртуальный пин со всех устройств, помеченные выбранным тегом - `AVG` будет вычислять среднее значение - `MED` найдет среднее значение - `MIN` будет вычислять минимальное значение - `MAX` будет вычислять максимальное значение **ВАЖНО: Теги не работают в режиме реального времени.** **3. [Выбор устройства (Device Selector)](https://github.com/blynkkk/blynkkk.github.io/tree/master/mobile/ru/ device_selector.md)** Если вы добавите виджет Выбор устройства в свой проект, вы можете использовать его в качестве источника данных для Диаграммы. В том случае, когда вы меняете устройство, диаграмма будет автоматически обновляться. #### Настройки оси Y (Y-Axis Settings) Cуществует 4 режима масштабирования данных вдоль оси Y, активируется после отключения общей настройки виджета "Автоматическое масштабирование для всех потоков данных (Override Auto Scaling for All Datastreams)". **1. Авто (Auto)** Данные будут автоматически масштабироваться на основе минимальных и максимальных значений заданного периода времени. Это лучший вариант для начинающих. **2. Минимальный/Максимальный (Min/Max)** Когда выбран этот режим, шкала Y будет установлена на выбранные вами границы значений. Например, если ваше оборудование отправляет данные со значениями от -100 до 100, вы можете установить эти границы и данные графика будут отображены полностью. Вы также можете визуализировать данные в другом диапазоне. Допустим, входящие данные имеют значения в диапазоне 0-55, но вы хотели бы видеть только значения в диапазоне 30-50. Вы можете настроить диапазон, но если значения не соответствуют заданному масштабу оси Y, диаграмма будет обрезана. **3. Процент от высоты (% of Height)** Эта опция позволяет автоматически масштабировать входящие данные на виджете и размещать их так, как вы хотите. В этом режиме вы устанавливаете процент высоты виджета на экране от 0% до 100%. Если вы установите диапазон 0-100%, это будет полная автоматическая шкала. Независимо от того, в каком диапазоне поступают данные, он всегда будет масштабирован по всей высоте виджета. Если вы установите его на 0-25%, то график будет отображаться только на 1/4 высоты виджета. Этот параметр очень полезен для **Бинарной диаграммы** или для визуализации нескольких потоков данных на одной и той же диаграмме разными способами. **4. Дельта (Delta)** Пока данные остаются в пределах заданного значения дельты, график будет автоматически масштабироваться в этом диапазоне. Если дельта превышает диапазон, график автоматически масштабируется до минимальных/максимальных значений указанного периода. **Суффикс (Suffix)** Здесь вы можете указать суффикс, который будет отображаться со значениями во время длительного тап на графике. **Разрядность (Decimals)** Определяет формат числовых значений, когда вы нажимаете и удерживаете палец на графике. Возможные варианты: #, #.#, #.##, и т.д. **Соединиить отсуствующие точки графика (Connect Missing Data Points)** Если этот переключатель включен, то Диаграмма соединит все точки, даже если данные частично отсуствуют. Если для него установлено значение «ВЫКЛ», то вы увидите пропуски в случае отсутствия данных. **Настройки Бинарной диаграммы (Binary Chart Settings)** Этот тип диаграммы полезен для построения двоичных данных, например, когда устройство было включено или выключено, или когда было обнаружено движение или когда был достигнут определенный порог значений. Вам необходимо указать точку **Перехода (FLIP)**, которая будет точкой, в которой входящие данные будут принимать состояние `ИСТИНА (TRUE)` или `ЛОЖЬ (FALSE)`. Например, вы отправляете данные в диапазоне от 0 до 1023. Если вы установите `512` в качестве точки **Перехода (FLIP)**, то все, что выше `512` (исключая 512), будет записано как `ИСТИНА (TRUE)`, любое значение ниже `512` (включая 512) будет `ЛОЖЬ (FALSE)`. Другой пример: если вы отправляете `0 и 1` и устанавливаете `0` в качестве точки **Перехода FLIP**, то `1` будет `ИСТИНА`, а `0` будет `ЛОЖЬ`. **Маркеры состояния (State Labels):** Здесь вы можете указать, как `ИСТИНА/ЛОЖЬ` должны отображаться на графике когда вы нажимаете и удерживаете палец. Например, вы можете установить значение `ИСТИНА` как `Оборудование ВКЛ`, `ЛОЖЬ` как `Оборудование ВЫКЛ`. ================================================ FILE: mobile/ru/table.md ================================================ ### Таблица (Table) Табличный виджет удобен, когда вам нужно структурировать аналогичные данные в пределах одного графического элемента. Работает как обычная таблица. Вы можете добавить строку в таблицу с помощью кода: ``` Blynk.virtualWrite(V1, "add", id, "Имя", "Значение"); ``` Вы можете обновить строку в таблице с помощью кода: ``` Blynk.virtualWrite(V1, "update", id, "Новое имя", "Новое значение"); ``` Чтобы выделить любой элемент в таблице, используйте его идентификатор: ``` Blynk.virtualWrite(V1, "pick", 0); ``` Чтобы выбрать/отменить выбор (сделать значок зеленым/серым) элемент в таблице, используйте его идентификатор: ``` Blynk.virtualWrite(V1, "select", 0); Blynk.virtualWrite(V1, "deselect", 0); ``` Чтобы очистить таблицу используйте код: ``` Blynk.virtualWrite(V1, "clr"); ``` Вы также можете обрабатывать другие действия из таблицы. Например, использовать строку таблицы в качестве кнопки переключения. ``` BLYNK_WRITE(V1) { String cmd = param[0].asStr(); if (cmd == "select") { // строка в таблице была выбрана. int rowId = param[1].asInt(); } if (cmd == "deselect") { // строка в таблице была отменена. int rowId = param[1].asInt(); } if (cmd == "order") { // когда строки в таблице переупорядочиваются int oldRowIndex = param[1].asInt(); int newRowIndex = param[2].asInt(); } } ``` **Примечание:** Максимальное количество строк в таблице равно 100. Когда вы достигнете предела, таблица будет работать как список FIFO (Первый пришел - первый ушел). Это ограничение можно изменить, настроив свойство ```table.rows.pool.size``` в параметрах локального сервера. **Пример кода:** [Простое использование таблицы](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Table/Table_Simple/Table_Simple.ino) **Пример кода:** [Расширенное использование таблицы](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Table/Table_Advanced/Table_Advanced.ino) ================================================ FILE: mobile/ru/tabs.md ================================================ ### Вкладки (Tabs) Единственная цель виджета Вкладки - расширить пространство вашего проекта. Чтобы редактировать виджет Вкладок - просто нажмите на выбранную вкладку. Вы можете перетаскивать виджеты между вкладками. Из списка можно удалить только последнюю вкладку: чтобы удалить ее, проведите пальцем влево по ее названию в экране настроек виджета. Максимальное количество вкладок на iOS составляет 4. Максимальное количество вкладок на Android - 10. Оставайтесь с нами для предстоящего редизайна виджета вкладок! ================================================ FILE: mobile/ru/temperature.md ================================================ ### Температура (Temperature) Температура является своего рода [датчиком окружающей среды](https://developer.android.com/guide/topics/sensors/sensors_environment.html) который позволяет измерять температуру окружающего воздуха. Измеряется в ```°C``` - градусах Цельсия. Для приема данных из виджета, необходимо использовать код: ```cpp BLYNK_WRITE(V1) { // температура в градусах цельсия int celcius = param.asInt(); } ``` Виджет Температуры не работает в фоновом режиме. ================================================ FILE: mobile/ru/terminal.md ================================================ ### Терминал (Terminal) Отображает данные с вашего оборудования. Позволяет отправить любую строку с вашего оборудования. Терминал всегда хранит последние 25 сообщений, которые ваше оборудование отправило в Blynk. Этот ограничение может быть увеличено в настройках локального сервера с помощью параметра ```terminal.strings.pool.size```. С этим виджетом Вы можете использовать специальные команды: ```cpp // Печатает значения, как Serial.print terminal.print(); // Печатает значения, как Serial.println() terminal.println(); // Записать необработанные данные в буффер terminal.write(); // Убедится, что все данные были отправлены с устройства в терминал terminal.flush(); // Стереть все данные в терминале terminal.clear(); ``` **Пример кода:** [Терминал](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Terminal/Terminal.ino) ================================================ FILE: mobile/ru/textInput.md ================================================ ### Текстовый ввод (Text Input) Отображается как строка текстового ввода, где вы можете напрямую изменять строковое значение. Также вы можете ограничить максимальное количество вводимых символов в настройках виджета. ================================================ FILE: mobile/ru/text_input.md ================================================ ### Текстовый ввод (Text Input) Отображается как строка текстового ввода, где вы можете напрямую изменять строковое значение. Также вы можете ограничить максимальное количество вводимых символов в настройках виджета. ================================================ FILE: mobile/ru/time_input.md ================================================ ## Ввод времени (Time Input) Виджет Ввода времени позволяет вам выбрать время начала/окончания, день недели, часовой пояс, значения в формате до полудня/после полудня и отправить их на ваше оборудование. В настоящее время поддерживаются следующие форматы: ```ЧЧ:ММ``` и ```ЧЧ:ММ AM/PM```. Аппаратное устройстов будет отсчитывать время пользовательского интерфейса в виде секунд дня (```3600 * часов + 60 * минут```) для запуска/остановки времения. Время, которое виджет отправляет оборудованию, является локальным временем пользователя. Индексы по выбранных дней: ``` Понедельник - 1 Вторник - 2 ... Суббота - 6 Воскресенье - 7 ``` Вы также можете изменить состояние виджета в интерфейсе пользователя. Смотрите ниже примеры кода. **Пример кода:** [Простой Ввод времени для времени начала](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/TimeInput/SimpleTimeInput/SimpleTimeInput.ino) **Пример кода:** [Расширенный Ввод времени](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/TimeInput/AdvancedTimeInput/AdvancedTimeInput.ino) **Пример кода:** [Обновление Ввода времени в пользовательском интерфейсе](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/TimeInput/UpdateTimeInputState/UpdateTimeInputState.ino) ================================================ FILE: mobile/ru/timeinput.md ================================================ ## Ввод времени (Time Input) Виджет Ввода времени позволяет вам выбрать время начала/окончания, день недели, часовой пояс, значения в формате до полудня/после полудня и отправить их на ваше оборудование. В настоящее время поддерживаются следующие форматы: ```ЧЧ:ММ``` и ```ЧЧ:ММ AM/PM```. Аппаратное устройстов будет отсчитывать время пользовательского интерфейса в виде секунд дня (```3600 * часов + 60 * минут```) для запуска/остановки времения. Время, которое виджет отправляет оборудованию, является локальным временем пользователя. Индексы по выбранных дней: ``` Понедельник - 1 Вторник - 2 ... Суббота - 6 Воскресенье - 7 ``` Вы также можете изменить состояние виджета в интерфейсе пользователя. Смотрите ниже примеры кода. **Пример кода:** [Простой Ввод времени для времени начала](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/TimeInput/SimpleTimeInput/SimpleTimeInput.ino) **Пример кода:** [Расширенный Ввод времени](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/TimeInput/AdvancedTimeInput/AdvancedTimeInput.ino) **Пример кода:** [Обновление Ввода времени в пользовательском интерфейсе](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/TimeInput/UpdateTimeInputState/UpdateTimeInputState.ino) ================================================ FILE: mobile/ru/timer.md ================================================ ### Таймер (Timer) Таймер запускает действия в определенное время. Даже если смартфон не в сети. По умолчанию время начала отправляет 1 (HIGH), время остановки отправляет 0 (LOW). Вы можете изменить это поведение на любые другие значения. Вы можете изменить настройки Таймера в режиме «Запуска». В последней версии Android также есть улучшенный таймер в виджете [Обработчик событий](https://github.com/blynkkk/blynkkk.github.io/blob/master/mobile/ru/eventor.md). C [Обработчиком](https://github.com/blynkkk/blynkkk.github.io/blob/master/mobile/ru/eventor.md) событий вы можете назначить несколько таймеров на один и тот же пин, отправить любую строку/число, выбирать дни и часовой пояс. Рекомендуется использовать виджет [Обработчик событий](https://github.com/blynkkk/blynkkk.github.io/blob/master/mobile/ru/eventor.md) поверх виджета Таймер. Однако виджет Таймер по-прежнему подходит и для простых событий таймера. **ПРИМЕЧАНИЕ:** Виджет таймера зависит от времени сервера, а не вашего телефона. Иногда время телефона может не соответствовать времени сервера. **Пример кода:** [Таймер](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Timer/Timer.ino) ================================================ FILE: mobile/ru/twitter.md ================================================ ### Твиттер (Twitter) Виджет Твиттер соединяет вашу учетную запись сети Twitter с Blynk и позволяет отправлять "твиты" с вашего оборудования. Пример кода: ```cpp Blynk.tweet("Привет, Blynk-еры! Мой Arduino может слать твиты!"); ``` Ограничения : - нельзя отправлять 2 твита с одним и тем же сообщением (это политика Твиттера) - разрешен только 1 твит за 5 секунд ### Кодировка в Твиттере Библиотека обрабатывает все строки в кодировке UTF-8. Если вы столкнулись с проблемами, попробуйте напечатать ваше сообщение на последовательный порт и проверить, работает ли оно (COM терминал должен быть настроен на кодировку UTF-8). Если не работает, вам следует проверить поддержку UTF-8 вашего компилятора. Если работает, но ваше сообщение обрезано - вам нужно увеличить длины сообщения (все символы UTF-8 потребляют как минимум вдвое больше байт информации). ### Увеличение лимита длины сообщения Вы можете увеличить максимальную длину сообщения, поместив (до включения Blynk) в верхнюю часть своего кода строку: ```cpp #define BLYNK_MAX_SENDBYTES 256 // По умолчанию 128 байт ``` **Пример кода:** [Твиттер](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Twitter/Twitter.ino) ================================================ FILE: mobile/ru/value_display.md ================================================ ### Отображение значений (Value Display) Отображает входящие данные с ваших датчиков или виртуальных пин-ов. Может работать в двух режимах: - режим PUSH (выберается в списке выбора частоты считывания); - режим частоты считываний; В режиме PUSH вы обновляете значения виджета со стороны оборудования с помощью кода: ```cpp Blynk.virtualWrite(V1, val); ``` В этом режиме каждое сообщение, которое отправляет аппаратное устройство автоматически сохраняется на сервере. Режим PUSH не требует, чтобы приложение было онлайн или открыто. В режиме частоты считывния вам необходимо выбрать интервал обновления данных, и приложение будет запускать события считывния с требуемой периодичностью. Ваше приложение должно быть открыто и запущено для отправки запросов на оборудование. Вам не нужен код для аналоговых и цифровых выводов в даном случае. Однако для виртуальных выводов вам необходимо использовать следующий код: ```cpp //вызывать из приложения BLYNK_READ(V1) { //отправить в приложение Blynk.virtualWrite(V1, val); } ``` #### Отображение значений на рабочем столе Вы также можете добавить виджет отображение значения на рабочий стол Android. В этом случае отображение значений работает по протоколу HTTPS. Имейте в виду, что в режиме «Рабочий стол» отображение значений имеет несколько ограничений. Виджет будет обновлять свое состояние только один раз в 15 минут. Вы можете изменить это органичение через настройки виджета. Однако интервал обновления менее 15 минут не гарантируется. Вы также можете изменить размер отображаемого значения на рабочем столе - просто сделайте длинный тап на виджете и измените его размер на необходимый. **Примечание:** Добавление виджета на главный экран стоит 100 энергии. Эта энергия не возвращяется при удалении виджета. **Примечание:** Виджеты рабочего стола для локальных серверов Blynk требуют открытия порта 8080. **Пример кода:** [Базовый пример](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/BlynkBlink/BlynkBlink.ino) ================================================ FILE: mobile/ru/video.md ================================================ ## Видео трансляция (Video Streaming) Простой виджет, который позволяет отображать прямой эфир и потокове видео. Виджет поддерживает протоколы RTSP (RP, SDP), HTTP/S прогрессивной потоковой передачи, HTTP/S прямого эфира. Для получения дополнительной информации, пожалуйста ознакомтесь с [официальной документацией Android](https://developer.android.com/guide/appendix/media-formats.html). На данный момент команда Blynk не предоставляет потоковые серверы. Таким образом, вы можете осуществлять потоковую передачу непосредственно с ваше камеры или использовать сторонние сервисы, а также запустить собственны потоковый сервер (например, на оборудовании Raspberry). Вы можете остановить/запустить видео поток, нажав на сам виджет. Вы можете изменить URL-адрес видео потока с аппаратного устройства при помощи кода: ```cpp Blynk.setProperty(V1, "url", "http://my_new_video_url"); ``` ================================================ FILE: mobile/ru/webhook.md ================================================ ### Вебхук (Webhook) Вебхук очень мощный виджет, который позволяет Вам легко интегрироватся с любыми сторонними сервисами. С его помощью Вы можете слать любые HTTP/S запросы на любой сервер или устройство, которое имеет HTTP/S API (например, лампы Philips Hue). Вебхук вешается на вирутальный пин и любая команда, которая приходит на этот пин будет вызывать срабатывание HTTP/S запроса. Команды на такой виртуальный пин могут приходить как со стороны железа, так и со стороны приложения. То есть, Вы можете слать любой HTTP запрос при нажатии кнопки в приложении, если эта кнопка на том же пине что и вебхук. Вот простой пример, представьте, что Вы хотите слать данные с микроконтроллера не только в Blynk, но и в какой-то другой сервис, например - Google Docs или в thingspeak.com. Раньше Вам для этого пришлось бы писать что-то вроде : ```cpp WiFiClient client; if (client.connect("api.thingspeak.com", 80)) { client.print("POST /update HTTP/1.1\n"); client.print("Host: api.thingspeak.com\n"); client.print("Connection: close\n"); client.print("X-THINGSPEAKAPIKEY: " + apiKeyThingspeak1 + "\n"); client.print("Content-Type: application/x-www-form-urlencoded\n"); client.print("Content-Length: "); client.print(postStr.length()); client.print("\n\n"); client.print(postStr); } ``` С вебхуком этого больше делать не нужно. Достаточно лишь заполнить поля виджета в приложении и выполнить привычное: ```cpp Blynk.virtualWrite(V0, value); ``` Где V0 - пин вебхук виджета. В дополнение, Вы можете подставлять значение пина в URL: ```cpp https://api.thingspeak.com/update?api_key=xxxxxx&field1=/pin/ ``` или тело запроса : ```cpp ["/pin/"] ``` Так же можно отправлять несколько значений внутри одного пина (до 5) : ```/pin[0]/```,```/pin[1]/```, ```/pin[2]/``` Еще одна крутая штука - это возможность делать HTTP GET запросы на сервере и слать их результат на микроконтроллер. Прелесть тут в том, что Вам не нужно для этого писать сложный код на микроконтроллере. Представьте, что Вам нужно получить информацию о погоде от какого-то метио сервиса. Например, по такому запросу : ```http://api.sunrise-sunset.org/json?lat=33.3823&lng=35.1856&date=2016-10-01``` Вы можете вставить этот запрос в вебхук виджет, выбрать пин ```V0``` и написать : ```cpp BLYNK_WRITE(V0){ String webhookdata = param.asStr(); Serial.println(webhookdata); } ``` Теперь, каждый раз когда вы дергаете ```V0``` с помощью ```Blynk.virtualWrite(V0, 1)``` будет вызвана функция ```BLYNK_WRITE(V0)```. **Замечание:** обычно HTTP запросы довольно большие, поэтому Вам, вероятно, нужно будет увеличить лимит на максимальную длину сообщения на микроконтроллере ```#define BLYNK_MAX_READBYTES 1024```. **Замечание:** наше облако так же имеет определенные лимиты для вебхука. Мы разрешаем слать только 1 запрос в секунду. Это поведение можно изменить на локальном сервер через свойство ```webhooks.frequency.user.quota.limit```. Пожалуйста, используйте вебхуки с умом. Многие веб ресурсы не способны обрабатывать даже 1 запрос в секунду. **Замечание :** в случае если Ваш вебхук не выполнился 10 раз подряд - вебхук виджет будет остановлен. Чтобы восстановить его работу - нужно открыть и закрыть виджет в режиме редактирования. Не выполненными считаются запросы у которых код ответа не равен 200 или 302. ================================================ FILE: mobile/segmentedSwitch.md ================================================ ### Segmented Switch Segmented Switch widget allows you to send command to your hardware based on selection you made on UI. Segmented Switch sends index of element you selected and not label string. Sending index starts from 1. It works same way as usual ComboBox or Menu element. Example code: ```cpp BLYNK_WRITE { switch (param.asInt()) { case 1: { // Item 1 Serial.println("Item 1 selected"); break; } case 2: { // Item 2 Serial.println("Item 2 selected"); break; } } } ``` You can also set Menu items from hardware side with : ```cpp Blynk.setProperty(V1, "labels", "label 1", "label 2", "label 3"); ``` **Sketch:** [Menu](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Menu/Menu.ino) ================================================ FILE: mobile/segmented_control.md ================================================ ### Segmented Switch Segmented Switch widget allows you to send command to your hardware based on selection you made on UI. Segmented Switch sends index of element you selected and not label string. Sending index starts from 1. It works same way as usual ComboBox or Menu element. Example code: ```cpp BLYNK_WRITE { switch (param.asInt()) { case 1: { // Item 1 Serial.println("Item 1 selected"); break; } case 2: { // Item 2 Serial.println("Item 2 selected"); break; } } } ``` You can also set Menu items from hardware side with : ```cpp Blynk.setProperty(V1, "labels", "label 1", "label 2", "label 3"); ``` **Sketch:** [Menu](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Menu/Menu.ino) ================================================ FILE: mobile/slider.md ================================================ ### Slider Similar to potentiometer. Allows to send values between MIN and MAX. You can change slider state from hardware side. For example, set slider value assigned to virtual pin V1 to 55 : ```cpp Blynk.virtualWrite(V1, 55); ``` You can change slider label from hardware with : ```cpp Blynk.setProperty(V1, "label", "My Slider Label"); ``` or change color : ```cpp //#D3435C - Blynk RED Blynk.setProperty(V1, "color", "#D3435C"); ``` ### Fraction Defines how many digits after the point you would like to see when moving slider. When you have "No Fraction" that means slider will send only integer values without decimal point. "1 digit" means that values will look like 1.1, 1.2, ..., 2.0, etc. ### Send On Release **Send On Release** is available for most controller widgets and allows you to decrease data traffic on your hardware. For example, when you move slider widget, commands are continuously streamed to the hardware, during a single slider move you can send dozens of commands. There are use-cases where it's needed, however creating such a load may cause hardware reset. We recommend enabling **Send On Release** feature for most of the cases, unless you really need instant feedback. This option is enabled by default. ### Write interval Similar to above option. However, allows you to stream values to your hardware within certain interval. For example, setting write interval to 100 ms - means, that while you move slider only 1 value will be send to hardware within 100 ms. This option also used to decrease data traffic on your hardware. **Sketch:** [Basic Sketch](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/BlynkBlink/BlynkBlink.ino) ================================================ FILE: mobile/step.md ================================================ ### Step Control Step control is like 2 buttons assigned to 1 pin. One button increments your value by desired step and another one decrements it. It is very useful for use cases where you need to change your values very precisely and you can't achieve this precision with slider widget. **Send Step** option allows you to send step to hardware instead of actual value of step widget. **Loop value** option allows you to reset step widget to start value when maximum value is reached. You can change step state from hardware side. For example : ```cpp Blynk.virtualWrite(V1, val); ``` You can change step labels from hardware with : ```cpp Blynk.setProperty(V1, "label", "My Stepper"); ``` You can change the step of the step widget from hardware with : ```cpp Blynk.setProperty(V1, "step", 10); ``` or change color : ```cpp //#D3435C - Blynk RED Blynk.setProperty(V1, "color", "#D3435C"); ``` You can also get step control state from server in case your hardware was disconnected with Blynk Sync feature : ```cpp BLYNK_CONNECTED() { Blynk.syncVirtual(V1); } BLYNK_WRITE(V1) { int stepperValue = param.asInt(); } ``` ### Write interval Similar to above option. However, allows you to stream values to your hardware within certain interval. For example, setting write interval to 100 ms - means, that while you move slider only 1 value will be send to hardware within 100 ms. This option also used to decrease data traffic on your hardware. **Sketch:** [Basic Sketch](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/BlynkBlink/BlynkBlink.ino) ================================================ FILE: mobile/styled_button.md ================================================ ### Styled Button Works in push or switch modes. Allows to send any number value on button click and button release events. By default button uses 0/1 (LOW/HIGH) values. Button sends 1 (HIGH) on press and sends 0 (LOW) on release. You can change button state from hardware side. For example, turn on button assigned to virtual pin V1: ```cpp Blynk.virtualWrite(V1, HIGH); ``` You can change button labels from hardware with : ```cpp Blynk.setProperty(V1, "onLabel", "ON"); Blynk.setProperty(V1, "offLabel", "OFF"); ``` or change color of the button : ```cpp Blynk.setProperty(V1, "onColor", "#D3435C"); Blynk.setProperty(V1, "offColor", "#D3435C"); ``` or change background color of the button : ```cpp Blynk.setProperty(V1, "onBackColor", "#D3435C"); Blynk.setProperty(V1, "offBackColor", "#D3435C"); ``` You can also get button state from server in case your hardware was disconnected with Blynk Sync feature : ```cpp BLYNK_CONNECTED() { Blynk.syncVirtual(V1); } BLYNK_WRITE(V1) { int buttonState = param.asInt(); } ``` **Sketch:** [Basic Sketch](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/BlynkBlink/BlynkBlink.ino) **Sketch:** [Physical Button Interrupt](https://github.com/blynkkk/blynk-library/blob/master/examples/More/Sync/ButtonInterrupt/ButtonInterrupt.ino) **Sketch:** [Physical Button Poll](https://github.com/blynkkk/blynk-library/blob/master/examples/More/Sync/ButtonPoll/ButtonPoll.ino) **Sketch:** [Physical Button State Sync](https://github.com/blynkkk/blynk-library/blob/master/examples/More/Sync/SyncPhysicalButton/SyncPhysicalButton.ino) ================================================ FILE: mobile/super_chart.md ================================================ ### SuperChart SuperChart is used to visualise live and historical data. You can use it for sensor data, for binary event logging and more. To use SuperChart widget you would need to push the data from the hardware with the desired interval by using timers. [Here is](https://examples.blynk.cc/?board=ESP8266&shield=ESP8266%20WiFi&example=GettingStarted%2FPushData) a basic example for data pushing. #### Interactions: - **Switch between time ranges and Live mode**
      Tap time ranges at the bottom of the widget to change time ranges - **Tap Legend Elements** to show or hide datastreams
      - **Tap'n'hold to view timestamp and corresponding values** - **Quick swipe from left to right to reveal previous data**
      Then you can then scroll data back and forward within the given time range. - **Full Screen Mode**
      Press this button to open Full Screen view in landscape orientation. Simply rotate the phone back to portrait mode. Chart should rotate automagically. In full screen view you will see X (time) and multiple Y scales. Full Screen Mode can be disabled from widget Settings. - **Menu Button**
      Menu button will open additional functions: - Export to CSV - Erase Data on the server #### SuperChart Settings: - **Chart Title** - **Title Font Size**
      You have a choice of 3 font sizes - **Title Alignment**
      Choose chart title alignment. This setting also affects Title and Legend position on the Widget. - **Show x-axis (time)**
      Select it if you want to show the time label at the bottom of your chart. - **Time ranges picker**
      Allows you to select required periods (`15m`, `30m`, `1h`, `3h`, ...) and resolution for your chart. Resolution defines how precise your data is. Right now chart supports 2 types of resolution `standard` and `high`. Resolution also depends on the selected period. For example, `standard` resolution for `1d` means you'll get 24 points per day (1 per hour), with `high` resolution you'll get for `1d` 1440 points per day (1 per minute). - **Datastreams**
      Add datastreams (read below how to configure datastreams) #### Datastream Settings Widget supports up to 4 Datastreams. Press Datastream Settings Icon to open Datastream Settings. **Design:** Choose available types of Chart: - Line - Area - Bar - Binary (anchor LINK to binary) **Color:** Choose solid colors or gradients **Source and input:** You can use 3 types of Data source: **1. Virtual Pin** Choose the desired Device and Virtual Pin to read the data from. **2. Tags** SuperChart can aggregate data from multiple devices using built-in aggregation functions. For example, if you have 10 Temperature sensors sending temperature with the given period, you can plot average value from 10 sensors on the widget. To use Tags: - **[Add Tag](/#blynk-main-operations-control-of-multiple-devices-tags)** to every device you want to aggregate data from. - **Push data to the same Virtual Pin** on every device. (e.g. ```Blynk.virtualWrite (V0, temperature);```) - **Choose Tag as a source** in SuperChart Widget and use the pin where the data is coming to (e.g V0)
      **Functions available:** - `SUM` will summarize all incoming values to the specified Virtual Pin across all devices tagged with the chosen tag - `AVG` will plot average value - `MED` will find a median value - `MIN` will plot minimum value - `MAX` will plot maximum value **☝️ IMPORTANT: Tags are not working in Live Mode.** 3. **[Device Selector](/#widgets-time-input-device-selector)** If you add Device Selector Widget to your project, you can use it as a source for SuperChart. In this case, when you change the device in Device Selector, chart will be updated accordingly **Y-Axis Settings**
      There are 4 modes of how to scale data along the Y axis 1. *Auto*
      Data will be auto-scaled based on min and max values of the given time period. This is nice option to start with. 2. **Min/Max**
      When this mode is selected, Y scale will be set to the values you choose. For example, if your hardware sends data with values varying from -100 to 100, you can set the chart to this values and data will be rendered correctly. You may also want to visualize the data within some specific range. Let's say incoming data has values in the range of 0-55, but you would like to see only values in the range 30-50. You can set it up and if values are out of Y scale you configured, chart will be cropped 3. **% of Height**
      This option allows you to auto-scale incoming data on the widget and position it the way you want. In this mode, you set up the percentage of widget height on the screen, from 0% to 100%. If you set 0-100%, in fact it's a full auto-scale. No matter in which range the data is coming, it will be always scaled to the whole height of the widget. If you set it to 0-25%, then this chart will only be rendered on 1/4 of the widget height. This setting is very valuable for **Binary Chart** or for visualizing a few datastreams on the same chart in a different way. 4. *Delta*
      While data stays within the given Delta value, chart will be auto-scaled within this range. If delta exceeds the range, chart will be auto-scaled to min/max values of the given period. **Suffix**
      Here you can specify a suffix that will be shown during the Tap'n'hold. **Decimals**
      Defines the formatting of the graph value when you Tap'n'hold the graph. Possible options are: #, #.#, #.##, etc. **Connect Missing Data Points**
      If this switch is ON, then SuperChart will connect all the dots even if there was no data. If it's set to OFF, then you will see gaps in case there was no data. **Binary Chart Settings**
      This type of chart is useful to plot binary data, for example when unit was ON or OFF, or when motion was detected or when certain threshold was reached. You need to specify a **FLIP** point, which is the point where incoming data will be turned into TRUE or FALSE state. For example, you send the data in the range of `0 to 1023`. If you set `512` as a **FLIP** point, then everything above `512` (excluding 512) will be recorded as `TRUE`, any value below `512` (including 512) will be `FALSE`. Another example, if you send `0 and 1` and set `0` as a **FLIP** point, then `1` will be `TRUE`, `0` will be `FALSE` **State Labels:**
      Here you can specify how `TRUE/FALSE` should be shown in Tap'n'Hold mode. For example, you can set to `TRUE` to "Equipment ON" label, `FALSE` to "Equipment OFF". ================================================ FILE: mobile/table.md ================================================ ### Table Table widget comes handy when you need to structure similar data within 1 graphical element. It works as a usual table. You can add a row to the table with : ``` Blynk.virtualWrite(V1, "add", id, "Name", "Value"); ``` You can update a row in the table with : ``` Blynk.virtualWrite(V1, "update", id, "UpdatedName", "UpdatedValue"); ``` To highlight any item in a table by using it's id in a table : ``` Blynk.virtualWrite(V1, "pick", 0); ``` To select/deselect (make icon green/grey) item in a table by using it's row id in a table : ``` Blynk.virtualWrite(V1, "select", 0); Blynk.virtualWrite(V1, "deselect", 0); ``` To clear the table at any time with: ``` Blynk.virtualWrite(V1, "clr"); ``` You can also handle other actions coming from table. For example, use row as a switch button. ``` BLYNK_WRITE(V1) { String cmd = param[0].asStr(); if (cmd == "select") { //row in table was selected. int rowId = param[1].asInt(); } if (cmd == "deselect") { //row in table was deselected. int rowId = param[1].asInt(); } if (cmd == "order") { //rows in table where reodered int oldRowIndex = param[1].asInt(); int newRowIndex = param[2].asInt(); } } ``` **Note :** Max number of rows in the table is 100. When you reach the limit, table will work as FIFO (First In First Out) list. This limit can be changed by configuring ```table.rows.pool.size``` property for Local Server. **Sketch:** [Simple Table usage](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Table/Table_Simple/Table_Simple.ino) **Sketch:** [Advanced Table usage](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Table/Table_Advanced/Table_Advanced.ino) ================================================ FILE: mobile/tabs.md ================================================ ### Tabs The only purpose of Tabs widget is to extend your project space. In order to edit tabs widget - just tap on the selected tab. You can drag widgets between tabs. Only the last tab can be removed: to remove it swipe left on its name in Settings screen. The maximum number of tabs on iOS is 4 The maximum number of tabs on Android is 10 Stay tuned for an upcoming Tabs widget redesign! ================================================ FILE: mobile/temperature.md ================================================ ### Temperature Temperature is kind of [environment sensors](https://developer.android.com/guide/topics/sensors/sensors_environment.html) that allows you to measure ambient air temperature. Measured in ```°C``` - celcius. In order to accept data from it you need to : ```cpp BLYNK_WRITE(V1) { // temperature in celcius int celcius = param.asInt(); } ``` Temperature doesn't work in background. ================================================ FILE: mobile/terminal.md ================================================ ### Terminal Displays data from your hardware. Allows to send any string to your hardware. Terminal always stores last 25 messages your hardware had send to Blynk Cloud. This limit may be increased on Local Server with ```terminal.strings.pool.size``` property. You can use special commands with this widget: ```cpp // Print values, like Serial.print terminal.print(); // Print values, like Serial.println() terminal.println(); // Write a raw data buffer terminal.write(); // Ensure that data was sent out of device terminal.flush(); // Erase all values in the terminal terminal.clear(); ``` **Sketch:** [Terminal](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Terminal/Terminal.ino) ================================================ FILE: mobile/textInput.md ================================================ ### Text Input Text Input displays and let's you directly alter a string value. You can limit a maximum number of characters in widget settings. ================================================ FILE: mobile/text_input.md ================================================ # Text Input Text Input displays and let's you directly alter a string value. You can limit a maximum number of characters in widget settings. ================================================ FILE: mobile/time_input/README.md ================================================ # Time Input Time input widget allows you to select start/stop time, day of week, timezone, sunrise/sunset formatted values and send them to your hardware. Supported formats for time now are `HH:MM` and `HH:MM AM/PM`. Hardware will get selected on UI time as seconds of day \(`3600 * hours + 60 * minutes`\) for start/stop time. Time that widget sends to hardware is user local time. Selected days indexes : ```text Monday - 1 Tuesday - 2 ... Saturday - 6 Sundays - 7 ``` You can also change state of widget on UI. See below sketches. **Sketch:** [Simple Time Input for start time](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/TimeInput/SimpleTimeInput/SimpleTimeInput.ino) **Sketch:** [Advanced Time Input](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/TimeInput/AdvancedTimeInput/AdvancedTimeInput.ino) **Sketch:** [Update Time Input State on UI](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/TimeInput/UpdateTimeInputState/UpdateTimeInputState.ino) ================================================ FILE: mobile/time_input/untitled-1.md ================================================ # Alias [Permalink](https://github.com/blynkkk/blynkkk.github.io/blob/b1f1a439851d4000d4d85ddab2f72db8d227d6cc/new/en/datastream_alias.md) Cannot retrieve contributors at this time 7 lines \(4 sloc\) 332 Bytes ## Datastream: Alias Alias is an alternative Datastream name which can be changed by the end-user. For example, it can be used by voice assistants like Amazon Echo \(Alexa\) and Google Home Assistant . You can only use letters, digits and spaces. No other characters are allowed **IMPORTANT:** Duplicate aliases are not allowed. ================================================ FILE: mobile/time_input.md ================================================ ## Time Input Time input widget allows you to select start/stop time, day of week, timezone, sunrise/sunset formatted values and send them to your hardware. Supported formats for time now are ```HH:MM``` and ```HH:MM AM/PM```. Hardware will get selected on UI time as seconds of day (```3600 * hours + 60 * minutes```) for start/stop time. Time that widget sends to hardware is user local time. Selected days indexes : ``` Monday - 1 Tuesday - 2 ... Saturday - 6 Sundays - 7 ``` You can also change state of widget on UI. See below sketches. **Sketch:** [Simple Time Input for start time](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/TimeInput/SimpleTimeInput/SimpleTimeInput.ino) **Sketch:** [Advanced Time Input](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/TimeInput/AdvancedTimeInput/AdvancedTimeInput.ino) **Sketch:** [Update Time Input State on UI](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/TimeInput/UpdateTimeInputState/UpdateTimeInputState.ino) ================================================ FILE: mobile/timeinput.md ================================================ ## Time Input Time input widget allows you to select start/stop time, day of week, timezone, sunrise/sunset formatted values and send them to your hardware. Supported formats for time now are ```HH:MM``` and ```HH:MM AM/PM```. Hardware will get selected on UI time as seconds of day (```3600 * hours + 60 * minutes```) for start/stop time. Time that widget sends to hardware is user local time. Selected days indexes : ``` Monday - 1 Tuesday - 2 ... Saturday - 6 Sundays - 7 ``` You can also change state of widget on UI. See below sketches. **Sketch:** [Simple Time Input for start time](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/TimeInput/SimpleTimeInput/SimpleTimeInput.ino) **Sketch:** [Advanced Time Input](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/TimeInput/AdvancedTimeInput/AdvancedTimeInput.ino) **Sketch:** [Update Time Input State on UI](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/TimeInput/UpdateTimeInputState/UpdateTimeInputState.ino) ================================================ FILE: mobile/timer.md ================================================ ### Timer Timer triggers actions at a specific time. Even if smartphone is offline. By default start time sends 1 (HIGH), stop time sends 0 (LOW). You can change this with any other values. You can change timer settings in "run" mode. Recent Android version also has improved Timer within Eventor widget. With Eventor Time Event you can assign multiple timers on same pin, send any string/number, select days and timezone. It is recommended to use Eventor over Timer widget. However Timer widget is still suitable for simple timer events. **NOTE:** The timer widget rely on the server time and not your phone time. Sometimes the phone time may not match the server time. **Sketch:** [Timer](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Timer/Timer.ino) ================================================ FILE: mobile/twitter.md ================================================ ### Twitter Twitter widget connects your Twitter account to Blynk and allows you to send Tweets from your hardware. Example code: ```cpp Blynk.tweet("Hey, Blynkers! My Arduino can tweet now!"); ``` Limitations : - you can't send 2 tweets with same message (it's Twitter policy) - only 1 tweet per 5 seconds is allowed ### Unicode in Twitter The library handles all strings as UTF8 Unicode. If you're facing problems, try to print your message to the Serial and see if it works (the terminal should be set to UTF-8 encoding). If it doesn't work, probably you should read about unicode support of your compiler. If it works, but your message is truncated - you need to increase message length limit (all Unicode symbols consume at least twice the size of Latin symbols). ### Increasing message length limit You can increase maximum message length by putting on the top of your sketch (before Blynk includes): ```cpp #define BLYNK_MAX_SENDBYTES 256 // Default is 128 ``` **Sketch:** [Twitter](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Twitter/Twitter.ino) ================================================ FILE: mobile/value_display.md ================================================ ### Value Display Displays incoming data from your sensors or Virtual Pins. Can work in 2 modes : - PUSH mode (select it from Frequency Reading picker); - Frequency Reading mode; In PUSH mode you update value display from hardware side with code : ```cpp Blynk.virtualWrite(V1, val); ``` In this mode every message that hardware sends to server is stored automatically on server. PUSH mode doesn't require application to be online or opened. With Frequency Reading mode you need to select update interval and application will trigger events with required timing. Your application should be open and running in order to make requests to hardware. You don't need any code for Analog and Digital pins in that case. However for virtual pins you need to use next code : ```cpp //triggered from app BLYNK_READ(V1) { //send to app Blynk.virtualWrite(V1, val); } ``` #### Home Screen Value Display You can also add Value Display to your Android Home Screen. Value Display works via HTTPS in that case. Have in mind that in "Home Screen" mode Value Display has few limitations. Value Display will update it's state only once per 15 min. You can change this via Widget Settings. However update interval less than 15 minutes is not guaranteed. You can also resize Value Display on Home Screen - just do long click on widget and resize it as you need. **Note :** Adding home screen widget costs 100 energy. This energy not rechargeable. **Note :** Home Screen Widgets for Local Blynk servers requires port 8080 to be opened. **Sketch:** [BlynkBlink](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/BlynkBlink/BlynkBlink.ino) ================================================ FILE: mobile/video.md ================================================ ## Video Streaming Simple widget that allows you to display any live or video stream. Widget supports RTSP (RP, SDP), HTTP/S progressive streaming, HTTP/S live streaming. For more info please follow [official Android documentation](https://developer.android.com/guide/appendix/media-formats.html). At the moment Blynk doesn't provide streaming servers. So you can either stream directly from camera, use 3-d party services or host streaming server on own server (on raspberry for example). You can also stop/start video stream with click on widget. You can also change video url from hardware with : ```cpp Blynk.setProperty(V1, "url", "http://my_new_video_url"); ``` ================================================ FILE: mobile/webhook.md ================================================ ### Webhook Webhook is a widget for 3-d party integrations. With webhook widget you can send HTTP/S requests to any 3-d party server or device that has HTTP/S API (Philips Hue for instance). Any write operation from hardware side will trigger webhook widget (same way as for eventor). You can also trigger webhook from application side in case control widget assigned to same pin as webhook. You can trigger 3-d party service with single button click. For example, imagine a case when you want to send data from your hardware not only to Blynk but also to Thingspeak server. In typical, classic use case you'll need to write code like this (this is minimal and not full sketch) : ```cpp WiFiClient client; if (client.connect("api.thingspeak.com", 80)) { client.print("POST /update HTTP/1.1\n"); client.print("Host: api.thingspeak.com\n"); client.print("Connection: close\n"); client.print("X-THINGSPEAKAPIKEY: " + apiKeyThingspeak1 + "\n"); client.print("Content-Type: application/x-www-form-urlencoded\n"); client.print("Content-Length: "); client.print(postStr.length()); client.print("\n\n"); client.print(postStr); } ``` With webhook widget this is not necessary anymore. All you need just fill few fields. And do usual : ```cpp Blynk.virtualWrite(V0, value); ``` where V0 is pin assigned to webhook widget. Also you can use usual Blynk placeholders for pin value in body or url, for example : ```cpp https://api.thingspeak.com/update?api_key=xxxxxx&field1=/pin/ ``` or for body ```cpp ["/pin/"] ``` You can also refer to specific index of multi value pin (multi pin supports up to 5 values) : ```/pin[0]/```,```/pin[1]/```, ```/pin[2]/``` Another cool thing about webhook is that you can make GET requests from Blynk Server side and return response directly to your hardware. The beauty here is that you don't need to code request to 3-d party service. Imagine a case when you want to get weather from some 3-d party service. For example, you have an url ```http://api.sunrise-sunset.org/json?lat=33.3823&lng=35.1856&date=2016-10-01```, you can put it in widget, select ```V0``` pin, and do usual : ```cpp BLYNK_WRITE(V0){ String webhookdata = param.asStr(); Serial.println(webhookdata); } ``` Now, every time you'll trigger ```V0``` pin (with ```Blynk.virtualWrite(V0, 1)``` from hardware side or with control widget assigned to ```V0```) - ```BLYNK_WRITE(V0)``` will be triggered. **NOTE :** usually 3-d party servers returns big responses, so you have to increase hardware maximum allowed message size with ```#define BLYNK_MAX_READBYTES 1024```. Where ```1024``` - is maximum allowed message size. **NOTE :** Blynk cloud has limitation for webhook widget - you are allowed to send only 1 request per second. You can change this on local server with ```webhooks.frequency.user.quota.limit``` property. Please be very careful using webhooks, as many resources not capable to handle even 1 req/sec, so you may be banned on some of them. For example thingspeak allows to send 1 request per 15 seconds. **NOTE :** In order to avoid spamming Blynk Webhook has one more limitation - in case your webhook requests were failed 10 times in row your webhook widget will be stopped. In order to resume it you need to open widget and save it again. Failed requests are requests that return status code that are not equal to 200 or 302. **NOTE :** Webhook widget may affect ```Blynk.syncAll()``` feature. As returned response from server may be big. So, please, be careful with it. ================================================ FILE: mobile-app/untitled.md ================================================ # Untitled ================================================ FILE: new/en/product_categories.md ================================================ ### Info: Categories Use this option to group devices by their type on voice assistants (Alexa, Google Assistant) side. It allows you to control the entire group of devices by giving single commands. #### Examples: 1. voice command "Alexa, lights on" turns on all the bulbs in the room – you don't have to repeat the command for each of them; 2. voice command "Alexa, play the music" starts playing the music from the nearest or all the speakers (depending on assistants presets). Choose the corresponding device type(s) from the dropdown menu. ================================================ FILE: new/en/product_hotspot_prefix.md ================================================ ### Info: Hotspot Prefix It's used in case you set up the device (For example: ESP8266 or ESP32) as WiFi access point. Use this field to give a name to the future access point. This setting applies during device provisioning. ================================================ FILE: new/en/product_template_ids.md ================================================ ### Info: Template ID Product's Template ID is used to check if new Device is allowed to work with the Product's settings. Follow these steps to allow the Device to use Product's Template you need: - select the Product, open Info tab and copy it's Template ID (several Template IDs can be assigned to one Product); - in Arduino IDE sketch find a string that contains "#define BOARD_TEMPLATE_ID", change "TMPL0000" by pasting Template ID from the previosu step; - flash the Device The Device is ready for provision now. **Note: the Device will be refused by the app if it's and Product's Template ID don't match.** ================================================ FILE: ota.md ================================================ # OTA Blynk also supports over the air updates for - ESP8266, NodeMCU and SparkFun Blynk boards. OTA supported only for the private servers and for the paid customers for now. ## How does it work? * You need to use [regular sketch for exported apps](https://github.com/blynkkk/blynk-library/tree/master/examples/Blynk.Inject/Template_ESP8266); * After you launched your hardware you are ready for OTA; * You can trigger the firmware update for the specific hardware via it's token or for all hardware. ### Flow 1. User triggers OTA with one of below HTTPS request; 2. User provides within HTTPS request admin credentials and firmware binary file to update hardware with; 3. When hardware connects to server - server checks it firmware. In case, hardware firmware build date differs from uploaded firmware, than server sends special command to hardware with url for the new firmware; 4. Hardware processes url with below [handler](https://github.com/blynkkk/blynk-library/blob/master/examples/Blynk.Inject/Template_ESP8266/OTA.h#L31): ```text BLYNK_WRITE(InternalPinOTA) { //url to get firmware from. This is HTTP url //http://localhost:8080/static/ota/FUp_2441873656843727242_upload.bin overTheAirURL = param.asString(); ... } ``` 1. Hardware downloads new firmware and starts flashing firmware; ## Trigger update for the specific hardware ```text curl -v -F file=@Template_ESP8266.ino.nodemcu.bin --insecure -u admin@blynk.cc:admin https://localhost:9443/admin/ota/start?token=123 ``` * `Template_ESP8266.ino.nodemcu.bin` - is relative \(or full\) path to your firmware; * `--insecure` flag for servers with self-generated certificates. You don't need this flag if you used Let's Encrypt or other trusted certificates; * `admin@blynk.cc:admin` admin credentials to your server. This is default ones. Format is `username:password`. You can change it in `server.properties` file; * `token` is token of your hardware you want apply the firmware update to. The firmware update will be initiated only in case device is online; ## Trigger OTA for all devices Update for all devices will be triggered only when they are connected to the cloud. You need to remove the token part for that. ```text curl -v -F file=@Template_ESP8266.ino.nodemcu.bin --insecure -u admin@blynk.cc:admin https://localhost:9443/admin/ota/start ``` In that case, OTA will be triggered right after device connected to the server. In case device is online firmware update will be initiated only when device will be connected again. ## Trigger OTA for the specific user In that case firmware update will be triggered for all devices of specified user. ```text curl -v -F file=@Template_ESP8266.ino.nodemcu.bin --insecure -u admin@blynk.cc:admin https://localhost:9443/admin/ota/start?user=pupkin@gmail.com ``` ## Trigger OTA for specific user and project In that case firmware update will be triggered for all devices of specified user within specified project. ```text curl -v -F file=@Template_ESP8266.ino.nodemcu.bin --insecure -u admin@blynk.cc:admin https://localhost:9443/admin/ota/start?user=pupkin@gmail.com&project=123 ``` ## Stop OTA ```text curl -v --insecure -u admin@blynk.cc:admin https://localhost:9443/admin/ota/stop ``` ## How to make firmware In order to make firmware in Arduino IDE - go to menu: Sketch -> Export compiled Binary. _NOTE:_ ESP8266 right now takes firmware only via HTTP. And not HTTPS. ================================================ FILE: roadmap.md ================================================ # Roadmap We build Blynk based on Blynkers feedback but with limited resources we have to prioritize our features. At the moment list look like that: * App Sharing \(project sharing when other people can control your hardware, but can't modify your project\); Free Beta * App Sharing \(project sharing when other people can control your hardware, but can't modify your project\); Subscription based * Bluetooth Low Energy support; * Hardware state handling \(changing physical button state changes Blynk application state\); * Hardware online/offlane state improvements \(better indication for "is hardware online?", "is hardware offline?"\); * Project space increase * Direct Connect support \(for WiFi\); * RTC widget; * Design options for widgets \(size, button with icons, etc\); * Phone sensors widgets \(GPS, accelerometer\); * IP camera support; * Customizable look and feel of the project Under consideration: * Home screen widget \(to avoid opening App when you need only 1 button click\); * Haptic feedback \(vibration\) when touching widgets ================================================ FILE: ru/Amendments.md ================================================ #Blynk Amendments ###Tell every maker about Blynk No pressure. Just do it. Now. ###Make your idea work without Blynk Blynk can be easily integrated in almost any project. But before that - make it work **without** it. After you are sure that you can get all the sensor data or can control things from the code – integrate Blynk and make it even more awesome. ###Use search We are always happy to chat and help, but remember - every time you ask the question that was answered many many times before that, Blynk Team is not building a new widget or new cool feature. So: - google before asking - use search on our forum, it works really well - check Instructables ###Always wrap your code Though shalt not post code without ```wrapping it``` ================================================ FILE: ru/AppExport.md ================================================ # App Export ## Firmware for ESP8266, NodeMCU, BlynkBoard, etc. #### Prepare development environment 1. Install [Arduino IDE](https://www.arduino.cc/en/Main/Software) 2. Install [Blynk Library](https://github.com/blynkkk/blynk-library/releases/latest) and restart Arduino IDE 3. Install [ESP8266 core for Arduino](https://github.com/esp8266/Arduino#installing-with-boards-manager) 4. For Windows / OS X, you may need to install USB-Serial drivers according to your converter: - СP2102: https://www.silabs.com/products/mcu/Pages/USBtoUARTBridgeVCPDrivers.aspx - FTDI (FT232, etc): http://www.ftdichip.com/Drivers/VCP.htm - *TODO: Link to drivers for CH340 and PL2303.* 5. If your board has a NeoPixel RGB LED, install [Adafruit NeoPixel](https://github.com/adafruit/Adafruit_NeoPixel) library from Library Manager #### Build your Firmware 1. Open our example in Arduino IDE: ```File -> Examples -> Blynk -> Provisioning -> Blynk_ESP8266``` 2. Open ```Settings.h``` tab. 3. Configure your firmware: * ```BOARD_NAME``` - ... * ```BOARD_VENDOR``` - ... * ```PRODUCT_WIFI_SSID``` - ... #### Upload firmare 1. Select your board type: ```Tools -> Board -> [Your Board]``` 2. Select your port: ```Tools -> Port -> [...]``` 3. Verify and Upload! Note that for Blynk Board, you can select board type ```NodeMCU 1.0```. ================================================ FILE: ru/BlynkFirmware.md ================================================ # Прошивка Blynk ## Конфигурация ### Blynk.begin() Самый простой способ настроить Blynk - это использовать функцию ```Blynk.begin()```: ```cpp Blynk.begin(auth, ...); ``` Она имеет несколько параметров для разных моделей оборудования, а также зависит от типа подключения. Следуйте примеру скетча для вашей конкретной аппаратной модели. Что происходит внутри функции ```Blynk.begin()```: 1. Подключение к сети (WiFi, Ethernet, ...) 2. Вызов ```Blynk.config (...)``` для установки токена авторизации, адреса сервера и т.д. 3. Пытается сразу подключиться к серверу (может продлится в течении 30 сек) Если ваш тип платы/подключения пока не поддерживается - вы можете реализовать его самостоятельно. [Вот несколько примеров]https://github.com/blynkkk/blynk-library/tree/master/examples/More/ArduinoClient). ### Blynk.config() ```config()``` позволяет управлять сетевым подключением. Вы можете настроить тип подключения (WiFi, Ethernet, ...) самостоятельно, а затем соединиться: ```cpp Blynk.config(auth, server, port); ``` или так ```cpp Blynk.config(auth); ``` **ПРИМЕЧАНИЕ. После вызова ```Blynk.config (...)``` ваше оборудование еще не подключено к серверу.** Попытка покдлючение произойдет при выполнении программой первой функции ```Blynk.run ()``` или ```Blynk.connect()```. Чтобы пропустить подключение к серверу или отключить его вручную, вызовите ```Blynk.disconnect()``` после функции конфигурации. Используйте `connectWiFi` чтобы удобно настроить WiFi соединение: ```cpp Blynk.connectWiFi(ssid, pass); ``` Чтобы подключиться к открытой сети WiFi, укажите пустую строку (``""``). ## Управление соединением Есть несколько функций, которые помогут с управлением соединением: ### Blynk.connect() Эта функция будет продолжать попытки подключиться к серверу Blynk. Возвращает `true` при подключении, `false`, если истекло время ожидания. Время ожидания по умолчанию составляет 30 секунд. ```cpp bool result = Blynk.connect(); bool result = Blynk.connect(timeout); ``` ### Blynk.disconnect() Отключает оборудование от сервера Blynk: ```cpp Blynk.disconnect(); ``` ### Blynk.connected() Возвращает `true`, когда оборудование подключено к Серверу Blynk,` false`, если нет активного подключения к серверу Blynk. ```cpp bool result = Blynk.connected(); ``` ### Blynk.run() Эта функция должна вызываться часто, чтобы обрабатывать входящие команды и выполнять поддреживать соединения с Сервером Blynk. Обычно вызывается в цикле ```void loop () {}```. Эта команда может быть инициирована в других местах вашего кода, если только у вас не заканчивается памяти (в каскадных функциях с локальной памятью). Например, не рекомендуется вызывать ```Blynk.run ()``` внутри ```BLYNK_READ``` и ```BLYNK_WRITE``` на устройствах с маленькой оперативной памятью. ## Управление цифровыми и аналоговыми пинами Библиотека Blynk может выполнять основные операции ввода-вывода "из коробки": digitalRead digitalWrite analogRead analogWrite (ШИМ или Аналоговый сигнал в зависимости от платформы) Нет необходимости писать код для простых вещей, таких как светодиод, реле управления и аналоговые датчики. Просто выберите соответствующий пин в приложении Blynk и управляйте им напрямую без дополнительного кода ## Управление виртуальными пинами Виртуальные пины (Virtual Pins) - это способ обмена любыми данными между вашим оборудованием и приложением Blynk. Думайте о виртуальных пинах как о каналах для приема/передачи любых данных. Убедитесь, что вы различаете виртуальные контакты от физических GPIO пинов на вашем оборудовании. Виртуальные контакты не имеют физического представления. Виртуальные пины обычно используются для взаимодействия с другими библиотеками (Servo, LCD и др.) и реализации пользовательской логики. Устройство может отправлять данные в приложение, используя ```Blynk.virtualWrite (pin, value)```, и получать данные из приложения, используя ```BLYNK_WRITE (vPIN)```. Читайте ниже... #### Типы данных Виртуальных пинов Все значения виртуальных пинов всегда отправляются в виде строк, и нет никаких практических ограничений на данные, которые могут быть отправлены. Однако при работе с числами существуют определенные ограничения на аппаратную часть. Например, целое число на Arduino - 16-бит, допустимый диапазон значений от -32768 до 32767. Чтобы интерпретировать входящие данные как целые числа, числа с плавающей запятой, двойные числа и строки, используйте: ```cpp param.asInt(); param.asFloat(); param.asDouble(); param.asStr(); ``` Вы также можете получить RAW данные из буфера параметров: ```cpp param.getBuffer() param.getLength() ``` ### Blynk.virtualWrite(vPin, value) **ПРИМЕЧАНИЕ. Используйте BlynkTimer при использовании этой команды для отправки данных. В противном случае ваше оборудование будет терять связь с сервером** Отправка данных в различных форматах на виртуальные пины. ```cpp // ОТправка строки Blynk.virtualWrite(pin, "abc"); // Отправка числа Blynk.virtualWrite(pin, 123); // Отправка дробного числа Blynk.virtualWrite(pin, 12.34); // ОТправка массива значений Blynk.virtualWrite(pin, "hello", 123, 12.34); // ОТправка RAW данных Blynk.virtualWriteBinary(pin, buffer, length); ``` Вызов ```virtualWrite``` пытается немедленно отправить значение в сеть. **Примечание:** Для виртуальных контактов с номерами больше 127 синтаксис `V128` недоступен. Пожалуйста, используйте простой виртуальный пин-код, например: ```cpp Blynk.virtualWrite(128, "abc"); ``` ## BlynkTimer Важно посылать данные с интервалами и сохранять цикл void () как можно более свободным. `BlynkTimer` позволяет периодически отправлять данные с заданными интервалами, не мешая работе библиотеки Blynk `BlynkTimer` наследует [SimpleTimer Library](http://playground.arduino.cc/Code/SimpleTimer), хорошо известную и широко используемую библиотеку для обработки нескольких событий на оборудовании. `BlynkTimer` включен в библиотеку Blynk по умолчанию и нет необходимости устанавливать SimpleTimer отдельно или включать `SimpleTimer.h` - Один объект `BlynkTimer` позволяет планировать до 16 таймеров. - Улучшена совместимость с такими платами, как `Arduino 101`, `Intel Galileo` и т.д. - Когда таймер пытается запуститься несколько раз (из-за заблокированного цикла), он просто пропускает все пропущенные интервалы запуска и вызывает вашу функцию только один раз. Это отличается от `SimpleTimer`, который может вызывать вашу функцию несколько раз в этом сценарии. Для получения дополнительной информации об использовании таймера, пожалуйста [посмотрите](http://playground.arduino.cc/Code/SimpleTimer). А вот и BlynkTimer [пример скетча](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/PushData/PushData.ino#L30). Также помните, что один экземпляр ```BlynkTimer``` может запланировать до 16 таймеров, поэтому, скорее всего, вам понадобится только один экземпляр BlynkTimer в вашем скетче. ### BLYNK_WRITE(vPIN) ```BLYNK_WRITE``` это функция, вызывается каждый раз, когда устройство получает обновление значения виртуального пина от сервера (или приложения): Для чтения полученных данных используйте код: ```cpp BLYNK_WRITE(V0) { int value = param.asInt(); // Получить значение как целое число // Параметр может содержать несколько значений, в таком случае: int x = param[0].asInt(); int y = param[1].asInt(); } ``` **`BLYNK_WRITE` нельзя использовать внутри какого-либо цикла или функции. Это отдельная функция.** **Примечание:** Для виртуальных контактов с номерами > 127 используйте API `BLYNK_WRITE_DEFAULT()` ### BLYNK_READ(vPIN) ```BLYNK_READ``` - это функция, вызывается, когда от устройства требуется отправить текущее значение Виртуального пина на сервер. Обычно эта функция содержит вызов ```Blynk.virtualWrite```. ```cpp BLYNK_READ(V0) { Blynk.virtualWrite(V0, newValue); } ``` **Примечание:** Для виртуальных пинов с номерами более 127 используйте API `BLYNK_READ_DEFAULT()` ### BLYNK_WRITE_DEFAULT() Переопределяет обработчик для всех выводов, которые не покрыты пользовательскими функциями ```BLYNK_WRITE```. ```cpp BLYNK_WRITE_DEFAULT() { int pin = request.pin; // Какой именно пин обрабатывается? int value = param.asInt(); // Используйте param как обычно. } ``` ### BLYNK_READ_DEFAULT() Переопределяет обработчик для всех выводов, которые не покрыты пользовательскими функциями ```BLYNK_READ```. ```cpp BLYNK_READ_DEFAULT() { int pin = request.pin; // Какой именно пин обрабатывается? Blynk.virtualWrite(pin, newValue); } ``` ### BLYNK_CONNECTED() Используйте эту функцию, когда вам нужно запустить определенную процедуру, когда оборудование подключается к Blynk Cloud или локльному серверу. Чаще всего вызывают эту функцию для синхронизации значений Сервер-Приложение-Оборудование. ```cpp BLYNK_CONNECTED() { // Здесь Ваш код } ``` ### BLYNK_APP_CONNECTED() Эта функция вызывается каждый раз, когда клиент приложения Blynk подключается к серверу Blynk. ```cpp BLYNK_APP_CONNECTED() { // Здесь Ваш код } ``` **Примечание:** Сначала включите эту функцию в настройках проекта: [Пример](https://github.com/blynkkk/blynk-library/blob/master/examples/More/AppConnectedEvents/AppConnectedEvents.ino) ### BLYNK_APP_DISCONNECTED() Эта функция вызывается каждый раз, когда приложение Blynk отключается от Blynk Cloud или локального сервера. ```cpp BLYNK_APP_DISCONNECTED() { // Здесь Ваш код } ``` **Примечание.** Сначала включите эту функцию в настройках проекта: [Пример](https://github.com/blynkkk/blynk-library/blob/master/examples/More/AppConnectedEvents/AppConnectedEvents.ino) ### Blynk.syncAll() Запрашивает все сохраненные на сервере последние значения для всех виджетов. Все аналоговые/цифровые/виртуальные значения и состояния выводов будут установлены на последнее сохраненное значение. Каждый виртуальный вывод генерирует событие BLYNK_WRITE (). ```cpp BLYNK_CONNECTED() { Blynk.syncAll(); } ``` **Примечание:** Рекомендиуется использовать только на стадии написания кода (иногда возникают ошибки). Для надежности следует применять выборочную синхронзацию ``syncVirtual``. ### Blynk.syncVirtual(vPin) Эта команда обновляет отдельный виртуальный пин до последнего сохраненного значения на сервере. Когда он используется, вызывается соответствующий обработчик ```BLYNK_WRITE```. ```cpp Blynk.syncVirtual(V0); ``` Чтобы обновить несколько контактов, используйте код: ``` Blynk.syncVirtual(V0, V1, V6, V9, V16); ``` ### Blynk.setProperty(vPin, "property", value) Эта команда позволяет [изменить свойства виджета](#blynk-main-operations-change-widget-properties) ## Отладка ### #define BLYNK_PRINT ### #define BLYNK_DEBUG Чтобы включить отладочную информацию на последовательном порту по умолчанию, добавьте в начало скетча. **ВАЖНО: это должна быть первая строка в вашем коде**: ```cpp #define BLYNK_PRINT Serial // Определяет объект/порт, который используется для вывода #define BLYNK_DEBUG // Опционально, включает детализированный вывод ``` Обязательно включите последовательный вывод в ``setup()``: ```cpp Serial.begin(9600); ``` Откройте Serial Monitor, и вы увидите отладочные данные. Вы также можете использовать запасные аппаратные последовательные порты или SoftwareSerial для вывода отладочной информации (вам понадобится адаптер для подключения к ПК). **ПРЕДУПРЕЖДЕНИЕ:** Включение ```BLYNK_DEBUG```' замедлит вашу аппаратную производительность в 10 раз! ### BLYNK_LOG() Когда параметр ```BLYNK_PRINT``` определен, вы можете использовать ```BLYNK_LOG``` для записи ваших LOG журналов. Используется похоже на ```printf```: ```cpp BLYNK_LOG("This is my value: %d", 10); ``` On some platforms (like Arduino 101) the ```BLYNK_LOG``` may be unavailable, or may just use too much resources. In this case you can use a set of simpler log functions: На некоторых платформах (например, Arduino 101) ```BLYNK_LOG``` может быть недоступен или просто использовать слишком много ресурсов. В этом случае вы можете использовать набор более простых функций журнала: ```cpp BLYNK_LOG1("Hello World"); // Print a string BLYNK_LOG1(10); // Print a number BLYNK_LOG2("This is my value: ", 10); // Print 2 values BLYNK_LOG4("Temperature: ", 24, " Humidity: ", 55); // Print 4 values ... ``` ## Минимизация объема кода Чтобы свести к минимуму объем программы Flash/RAM памяти, вы можете отключить некоторые встроенные функции: 1. Comment-out ```#define BLYNK_PRINT``` to remove prints 2. Put on the top of your sketch: 1. Закомментируйте ```#define BLYNK_PRINT``` для отмены печати порт 2. Поместите верхнюю часть вашего скетча: ``` #define BLYNK_NO_BUILTIN // Отключить встроенные аналоговые и цифровые контакты #define BLYNK_NO_FLOAT // Отключить операции с плавающей точкой ``` ## Портирование, взлом Если вы хотите погрузиться в создание/взлом/портирование реализации библиотеки Blynk, пожалуйста, также ознакомтесь [с этой документацией](https://github.com/blynkkk/blynk-library/tree/master/extras/docs). ================================================ FILE: ru/BlynkMainOperations.md ================================================ # Blynk основные операции ## Виртуальные Пины (Pins) Blynk может напрямую управлять цифровыми и аналоговыми выводами ввода/вывода на вашем оборудовании. Вам даже не нужно писать для этого код. Отлично подходит для мигающих светодиодов, но частенько этого не достаточно... Мы разработали Виртуальные Пины для отправки **любых** данных с вашего микроконтроллера в приложение Blynk и обратно. Все, что вы подключите к своему оборудованию, сможет общаться с Blynk. С помощью Виртуальных Пинов вы можете отправить что-то из приложения, обработать его на микроконтроллере, а затем отправить обратно на смартфон. Вы можете запускать функции, считывать устройства I2C, преобразовывать значения, управлять сервоприводами и двигателями постоянного тока и т. д. Виртуальные Пины могут быть использованы для взаимодействия с внешними библиотеками (Servo, LCD и другие), а также реализовать пользовательские функции. Оборудование может передавать данные в виджеты через Виртуальные Пины, как здесь: ```cpp Blynk.virtualWrite(pin, "abc"); Blynk.virtualWrite(pin, 123); Blynk.virtualWrite(pin, 12.34); Blynk.virtualWrite(pin, "Привет", 123, 12.34); ``` Для получения дополнительной информации о виртуальных пинах, [прочитайте здесь](/#blynk-firmware-virtual-pins-control) ## Отправить данные из приложения на оборудование Вы можете отправлять любые данные из виджетов в приложении на ваше оборудование. Все [Виджеты Контроллеры](/#widgets-controllers) могут отправлять данные в Виртуальные Пины на вашем оборудовании. Например, приведенный ниже код показывает, как получить значения из виджета Кнопки (Button) в приложении. ```cpp BLYNK_WRITE(V1) //Виджет кнопки пишет данные в пин V1 { int pinData = param.asInt(); } ``` Когда вы нажимаете кнопку, приложение Blynk отправляет ```1``` На втором клике - отправляет ```0``` Вот как настроен виджет кнопки (Button): Полный пример кода: [Получение данных](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/GetData/GetData.ino#L24) ### Отправка массива из виджета Некоторые виджеты (например, джойстик, zeRGBa) имеют более одной единицы данных. Этот вывод может быть записан в Virtual Pin в виде массива значений. С аппаратной стороны - вы можете получить любой элемент массива [0,1,2 ...], используя код: ```cpp BLYNK_WRITE(V1) // Виджет ЗАПИСЫВАЕТ в Виртуальный Пин V1 { int x = param[0].asInt(); // получить первое значение int y = param[1].asInt(); // получить второе значение int z = param[N].asInt(); // получить N-ое значение } ``` **Пример кода:** [Джойстик две оси](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/JoystickTwoAxis/JoystickTwoAxis.ino#L24) ## Получить данные с аппаратного обеспечения Существует два способа передачи данных с вашего оборудования на виджеты в приложении через виртуальные контакты. ### Perform requests by Widget - Using Blynk built-in reading frequency while App is active by setting 'Reading Frequency' parameter to some interval: ```cpp BLYNK_READ(V5) // Widget in the app READs Virtal Pin V5 with the certain frequency { // This command writes Arduino's uptime in seconds to Virtual Pin V5 Blynk.virtualWrite(5, millis() / 1000); } ``` **Sketch:** [PushDataOnRequest](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/PushDataOnRequest/PushDataOnRequest.ino#L26) ### Pushing data from hardware If you need to PUSH sensor or other data from your hardware to Widget, you can write any logic you want. Just set the frequency to PUSH mode. Any command that hardware sends to Blynk Cloud is automatically stored on server and you get this info either with [History Graph](/#widgets-displays-superchart) widget or with [HTTP API](http://docs.blynkapi.apiary.io/#reference/0/pin-history-data/get-all-history-data-for-specific-pin). We recommend sending data in intervals and avoiding [Flood Error](https://docs.blynk.cc/#troubleshooting-flood-error). You can use timers like [BlynkTimer](/#blynk-firmware-blynktimer). Please read instructions inside this [example sketch](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/PushData/PushData.ino) for more details. Here is how it can work: ```cpp #include #include #include char auth[] = "YourAuthToken"; // Put your token here BlynkTimer timer; // Create a Timer object called "timer"! void setup() { Serial.begin(9600); Blynk.begin(auth); timer.setInterval(1000L, sendUptime); // Here you set interval (1sec) and which function to call } void sendUptime() { // This function sends Arduino up time every 1 second to Virtual Pin (V5) // In the app, Widget's reading frequency should be set to PUSH // You can send anything with any interval using this construction // Don't send more that 10 values per second Blynk.virtualWrite(V5, millis() / 1000); } void loop() { Blynk.run(); // all the Blynk magic happens here timer.run(); // BlynkTimer is working... } ``` **Sketch:** [PushData](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/PushData/PushData.ino#L30) ## State syncing ### For hardware If your hardware looses Internet connection or resets, you can restore all the values from Widgets in the Blynk app. ```cpp BLYNK_CONNECTED() { Blynk.syncAll(); } //here handlers for sync command BLYNK_WRITE(V0) { .... } ``` The ```Blynk.syncAll()``` command restores all the Widget's values based on the last saved values on the server. All analog and digital pin states will be restored. Every Virtual Pin will perform ```BLYNK_WRITE``` event. **WARNING**: if pin is empty and wasn't initialized - hardware will not get any response for those pin during sync. [Sync Hardware with App state](https://github.com/blynkkk/blynk-library/blob/master/examples/More/Sync/HardwareSyncStateFromApp/HardwareSyncStateFromApp.ino) You can also update a single Virtual Pin value by calling ```Blynk.syncVirtual(V0)``` or you can update several pins with ```Blynk.syncVirtual(V0, V1, V2, ...)```. You can also use server to store any value without widget. Just call ```Blynk.virtualWrite(V0, value)```. [Storing single value on server](https://github.com/blynkkk/blynk-library/blob/master/examples/More/ServerAsDataStorage/ServerAsDataStorage_SingleValue/ServerAsDataStorage_SingleValue.ino) [Storing multiple values on server](https://github.com/blynkkk/blynk-library/blob/master/examples/More/ServerAsDataStorage/ServerAsDataStorage_MultiValue/ServerAsDataStorage_MultiValue.ino) ### For app If you need to keep your hardware in sync with Widgets' state even if app is offline use ```Blynk.virtualWrite```. Imagine you have a LED Widget connected to the Virtual Pin V1 in the app, and a physical button attached to your hardware. When you press a physical button, you would expect to see updated state of the LED Widget in the app. To achieve that you need to send ```Blynk.virtualWrite(V1, 255)``` when a physical button gets pressed. [Represent physical button state via LED widget with interrupts](https://github.com/blynkkk/blynk-library/blob/master/examples/More/Sync/ButtonInterrupt/ButtonInterrupt.ino) [Represent physical button state via LED widget with polling](https://github.com/blynkkk/blynk-library/blob/master/examples/More/Sync/ButtonPoll/ButtonPoll.ino) [Represent physical button state via Button widget with polling](https://github.com/blynkkk/blynk-library/blob/master/examples/More/Sync/SyncPhysicalButton/SyncPhysicalButton.ino) ## Control of multiple devices Blynk app has support of multiple devices. That means you can assign any widget to specific device with own auth token. For example - you may have button on V1 that controls wi-fi bulb A and another button on V1 that controls wi-fi bulb B. In order to do this you need more than 1 device within your project. To achieve this please go to project settings and click on "Devices" section : You'll see list of devices : So you can add new device : After above steps, every widget will have one more field "Target" : Now you need to assign widget to device and after that widget will control only this specific device. That's it! Now you need to upload sketches with correct Auth Tokens to your hardware. ### Tags Tags feature allows you to group multiple devices. Tags are very useful in case you want to control few devices with 1 widget. For example, imagine a case when you have 3 smart bulbs and you want to turn on all those bulbs with one single click. You need to assign 3 devices to 1 tag and assign tag to button. That's it. Tag widgets also support state syncing. So you can get state of widget from your hardware. However you can't update state of such widgets from hardware. ## Devices online status Blynk app has support for online statuses for multiple devices. In ideal world when device closes tcp connection with some ```connection.close()``` - connected server will get notification regarding closed connection. So you can get instant status update on UI. However in real world this mostly exceptional situation. In majority of cases there is no easy and instant way to find out that connection is not active anymore. That's why Blynk uses ```HEARTBEAT``` mechanism. With this approach hardware periodically sends ```ping``` command with predefined interval (10 seconds by default, ```BLYNK_HEARTBEAT``` [property](https://github.com/blynkkk/blynk-library/blob/master/src/Blynk/BlynkConfig.h)). In case hardware don't send anything within 10 seconds server waits additional 5 seconds and after that connection assumed to be broken and closed by server. So on UI you'll see connection status update only after 15 seconds when it is actually happened. You can also change ```HEARTBEAT``` interval from hardware side via ```Blynk.config```. In that case ```newHeartbeatInterval * 2.3``` formula will be applied. So in case you you decided to set ```HEARTBEAT``` interval to 5 seconds. You'll get notification regarding connection with 11 sec delay in worst case. ## Project Settings Every project has it's own settings: - **Theme** - switch between the Light and Black Blynk Theme (Business accounts have wider choice); - **Keep screen always on** - allows you to use the Blynk app without going to the sleep mode (usually all mobile devices do that); - **Send app connected command** - with this option enabled the server will send "App Connected" and "App Disconnected" commands to your hardware when your Blynk app goes online/offline. [Usage example](https://github.com/blynkkk/blynk-library/blob/master/examples/More/AppConnectedEvents/AppConnectedEvents.ino); - **Do not show offline notifications** - right now, for debugging purposes, every time your hardware goes offline - the Blynk Server will notify you with popup in the app about that. However, when debugging is not needed or the Blynk app is used only via HTTP/S this notifications are meaningless. So this switch allows you to turn off this popups. Also this switch turns off the Push notification "Notify when offline" option. ## Change Widget properties Changing some of the widget properties from hardware side is also supported. For example, you can change the color of LED widget based on a condition: ``` //change LED color Blynk.setProperty(V0, "color", "#D3435C"); //change LED label Blynk.setProperty(V0, "label", "My New Widget Label"); //change MENU labels Blynk.setProperty(V0, "labels", "Menu Item 1", "Menu Item 2", "Menu Item 3"); ``` [Set Property for single value field](https://github.com/blynkkk/blynk-library/blob/master/examples/More/SetProperty/SetProperty_SingleValue/SetProperty_SingleValue.ino) [Set Property for multi value field](https://github.com/blynkkk/blynk-library/blob/master/examples/More/SetProperty/SetProperty_MultiValue/SetProperty_MultiValue.ino) **NOTE : ** Changing these parameters work **only** for widgets attached to Virtual pins (analog/digital pins won't work). Four widget properties are supported - ```color```, ```label```, ```min```, ```max``` for all widgets : ```label``` is string for label of all widgets. ```color``` is string in [HEX](http://www.w3schools.com/html/html_colors.asp) format (in the form: #RRGGBB, where RR (red), GG (green) and BB (blue) are hexadecimal values between 00 and FF). For example : ``` #define BLYNK_GREEN "#23C48E" #define BLYNK_BLUE "#04C0F8" #define BLYNK_YELLOW "#ED9D00" #define BLYNK_RED "#D3435C" #define BLYNK_DARK_BLUE "#5F7CD8" ``` ```min```, ```max``` - minimum and maximum values for the widget (for example range for the Slider). This numbers may be float. On firmware side, widget objects also support ```setLabel()``` and ```setColor()``` functions. Widget specific properties: **Button** ```onLabel``` / ```offLabel``` is string for ON/OFF label of button; **Styled Button** ```onLabel``` / ```offLabel``` is string for ON/OFF label of button; ```onColor``` / ```offColor``` is string in HEX format for ON/OFF colors of the button; ```onBackColor``` / ```offBackColor``` is string in HEX format for ON/OFF colors of the button background. **Music Player** ```isOnPlay``` is boolean accepts true/false. ``` Blynk.setProperty(V0, "isOnPlay", "true"); ``` **Menu** ```labels``` is list of strings for Menu widget selections; ``` Blynk.setProperty(V0, "labels", "label 1", "label 2", "label 3"); ``` **Video Streaming** ```cpp Blynk.setProperty(V1, "url", "http://my_new_video_url"); ``` **Step** ```cpp Blynk.setProperty(V1, "step", 10); ``` **Image** ```cpp Blynk.setProperty(V1, "opacity", 50); // 0-100% ``` ```cpp Blynk.setProperty(V1, "scale", 30); // 0-100% ``` ```cpp Blynk.setProperty(V1, "rotation", 10); //0-360 degrees ``` also, you can fully replace the list of images from the hardware: ```cpp Blynk.setProperty(V1, "urls", "https://image1.jpg", "https://image2.jpg"); ``` or you can change individual image by it index: ```cpp Blynk.setProperty(V1, "url", 1, "https://image1.jpg"); ``` You can also change widget properties via [HTTP API](http://docs.blynkapi.apiary.io/#). ## Limitations and Recommendations - Don't put ```Blynk.virtualWrite``` and any other ```Blynk.*``` command inside ```void loop()```- it will cause lot's of outgoing messages to our server and your connection will be terminated; - We recommend calling functions with intervals. For example, use [BlynkTimer](/#blynk-firmware-blynktimer) - Avoid using long delays with ```delay()``` – it may cause connection breaks; - If you send more than 100 values per second - you may cause [Flood Error](/#troubleshooting-flood-error) and your hardware will be automatically disconnected from the server; - Be careful sending a lot of ```Blynk.virtualWrite``` commands as most hardware is not very powerful (like ESP8266) so it may not handle many requests. ================================================ FILE: ru/BlynkProtocol.md ================================================ # Blynk protocol Blynk transfers binary messages with the following structure: | Command | Message Id | Length/Status | Body | |:-------------:|:-------------:|:---------------:|:--------:| | 1 byte | 2 bytes | 2 bytes | Variable | Message Id and Length are [big endian](http://en.wikipedia.org/wiki/Endianness#Big-endian). Body has a command-specific format. Command and Status definitions: [BlynkProtocolDefs.h](https://github.com/blynkkk/blynk-library/blob/master/Blynk/BlynkProtocolDefs.h) Another protocol description can be found [here](https://github.com/blynkkk/blynk-server/blob/master/README_FOR_APP_DEVS.md#protocol-messages). Typical Blynk library knows how to send(S)/process(P): S BLYNK_CMD_LOGIN + auth token SP BLYNK_CMD_PING SP BLYNK_CMD_RESPONSE SP BLYNK_CMD_BRIDGE SP BLYNK_CMD_HARDWARE S BLYNK_CMD_TWEET S BLYNK_CMD_EMAIL S BLYNK_CMD_PUSH_NOTIFICATION ## HARDWARE/BRIDGE command body The body of these commands are encoded as a sequence of strings, separated by ```'\0'``` ([Null character](http://en.wikipedia.org/wiki/Null_character)). Please note that the last value may be not Null-terminated. In the following command examples ```\0``` chars are replaced with spaces. ### Pin mode PinMode command is received by library after connection, or when a mobile application starts. pm pm ... Mode: * in - INPUT * out - OUTPUT * pu - INPUT_PULLUP * pd - INPUT_PULLDOWN ### Digital pin operations Digital write: dw Digital read: dr ### Analog pin operations aw ar ### Virtual pin operations vw ... vr ### Other operations info TODO ## Developer notes * Values in HW commands are plain text. * In response to ```dr/ar``` command, library should send ```dw/aw``` command on the same pin and with the same message id. * These situations should cause a connection drop, or reconnection attempt: * Message with ```ID=0``` is received * Message with unknown type is received ## Adding network interface 4 entities should be created to add a new network interface to Blynk: 1. Select connection interface that will be used for Blynk operation. This should be something like http://www.arduino.cc/en/Tutorial/WebClient Based on the API of the connection, create the **Transport**. Some examples may be found in the Adapters folder: * BlynkTransportSerial * BlynkTransportCC3000 * BlynkArduinoClient - *can be reused, if possible* 2. Create **Blynk representative class**, which contains connection-specific helper functions (like begin). Examples: * BlynkEthernet * BlynkSerial * BlynkCC3000 * BlynkWildFire * BlynkYun 3. Create **BlynkSimple*** header for your connection. This constructs main **Blynk instance**, so the user (mostly) doesn't need to get into such details. Examples: * BlynkSimpleEthernet.h * BlynkSimpleCC3000.h * BlynkSimpleWifi.h * BlynkSimpleUIPEthernet.h 4. Create a **simple example** for your platform ;) ### Example implementations Use these to play with the protocol and understand the basics: * [Pseudo-library in Python](https://github.com/blynkkk/blynk-library/blob/master/tests/pseudo-library.py) * [Node.js + Espruino](https://github.com/vshymanskyy/blynk-library-js) * [Arduino](https://github.com/blynkkk/blynk-library) * [Particle Core](https://github.com/vshymanskyy/blynk-library-spark) ================================================ FILE: ru/BlynkServer.md ================================================ # Сервер Blynk Сервер Blynk - это Java-сервер с открытым исходным кодом, отвечающий за пересылку сообщений между мобильным приложением Blynk и различными платами микроконтроллеров (например, Arduino, Raspberry Pi и т. д.). Загрузите последнюю сборку сервера: [Сервер Blynk >](https://github.com/blynkkk/blynk-server/releases) ## Зачем мне нужен локальный сервер Blynk? - Лучшая безопасность. Вы единственный, кто знает о сервере. Вы можете настроить политики безопасности в соответствии с вашими потребностями (MAC, IP-адреса, имена входа и т. Д.). Вы также можете сделать его доступным только в вашей частной сети. - Лучшая стабильность. Не нужно полагаться на стороннее облачное решение. У вас есть полный контроль. - Меньшая задержка обработки команд. Сервер как можно ближе к вам. - Максимальная конфиденциальность. Все данные хранятся локально и не передаются никому. ## Установка вашего собственного локального сервера Blynk Для получения подробных инструкций, пожалуйста прочитайте [страницу GitHub](https://github.com/blynkkk/blynk-server#blynk-server). ================================================ FILE: ru/FAQ.md ================================================ # Часто задаваемые вопросы (FAQ) - Я поддержал Blynk на Kickstarter. Где мои виджеты и почему приложение бесплатное? > Приложение бесплатно, потому что в противном случае вам придется заплатить, чтобы загрузить его. Так работает AppStore и Google Play. > Текущая версия Blynk имеет ограниченное количество виджетов. Мы решили сделать их бесплатными для всех, пока не создадим магазин. После этого каждый виджет будет платным. Однако каждый спонсор получит их бесплатно (согласно нашему обещанию). - Что такое Blynk Cloud? > Blynk Cloud - это программное обеспечение с открытым исходным кодом, написанное на Java с использованием простых и защищенных сокетов TCP/IP (для оборудования, которое его поддерживает) и работающее на нашем сервере. > Приложения Blynk для iOS и Android по умолчанию подключаются к Blynk Cloud. Доступ бесплатен для каждого пользователя Blynk. Мы также предоставляем дистрибутив Private Server для тех, кто хочет [установить его локально](/#blynk-server). - Сколько стоит доступ к Cloud Blynk Server? > Доступ бесплатен для каждого пользователя Blynk. - Могу ли я запустить сервер Blynk локально? > Да. Те из вас, кому нужна дополнительная безопасность или нет подключения к Интернету, могут установить локальный сервер Blynk и запустить его в своей локальной сети. Blynk Server имеет открытый исходный код, и его развертывание занимает менее нескольких секунд. Все инструкции и файлы находятся [здесь](/#blynk-server). - What are the requirements to run Private Blynk Server? > To run Private Blynk Server, all you need is Java Runtime Environment. - Каковы требования для запуска локального Blynk Сервера? > Для запуска локального Blynk Сервера все, что вам нужно, это Java Runtime Environment. - Могу ли я запустить сервер Blynk на Raspberry Pi? > Да, конечно! [инструкция](/#blynk-server-how-to-run-local-blynk-server-launch-blynk-server-on-raspberry-pi). - Приложение Blynk работает через Bluetooth? > Да. Это в работает даже в бета-версии. - Blynk поддерживает Ethernet / Wi-FI / UART? > Да, все из них. См. Полный список [поддерживаемого оборудования](/#support-hardware) и плат расширений. - У меня нет платы расширения. Могу ли я использовать Blynk с моим компьютером? > Да, вы можете использовать Blynk только с помощью USB-кабеля. Существует [пошаговая инструкция](/#other-hardware-connect-over-usb) о том, как это сделать. - Может ли Blynk справиться с несколькими Arduinos? > Да. Есть 3 способа: > - добавить несколько устройств в ваш проект. > - вы можете использовать один и тот же [Auth Token](/#Getting-Start-Getting-Start-With-Application-Auth-Token) для разного оборудования. В этом случае вы можете управлять несколькими аппаратными средствами с одной панели. > - вы можете сделать это, используя [функцию моста](/#widgets-other-bridge), которая позволяет отправлять сообщения с одного оборудования на другое. - Сохраняет ли сервер Blynk данные датчиков, когда приложение отключается? > Да, каждая команда, отправляемая оборудованием на сервер, сохраняется. Вы можете использовать виджет [Диаграмма](/#widgets-display-superchart) для его просмотра. - Сколько виртуальных пинов я могу использовать? > Это зависит в основном от вашего оборудования. Младшее оборудование может использовать до 32 виртуальных пинов. > Более мощный (например, ESP8266) может использовать до 128, но для этого требуется указать свойство BLYNK_USE_128_VPINS в вашем скетче. [Пример](https://github.com/blynkkk/blynk-library/blob/master/src/Blynk/BlynkConfig.h#L64). - Почему приложение требует все эти разрешения? > http://help.blynk.cc/faq/blynk-android-permissions-explained ================================================ FILE: ru/GettingStarted.md ================================================ # Начало работы Давайте начнем уже через 5 минут (чтение не считается!). Мы включим светодиод, подключенный к вашему Arduino, с помощью приложения Blynk на вашем смартфоне. Подключите светодиод, как показано на рисунке: ## Начало работы с приложением Blynk ### 1. Создать учетную запись Blynk После загрузки приложения Blynk вам необходимо создать новую учетную запись Blynk. Если она у вас уже есть, помните: эта учетная запись отделена от учетных записей, используемых для форума Blynk. Мы рекомендуем использовать **реальный** адрес электронной почты, потому что это упростит ситуацию с настройкой. #### Зачем я должен создавать аккаунт? Учетная запись необходима для хранения ваших проектов и доступа к ним с нескольких устройств из любого места. Также это мера безопасности. Вы всегда можете настроить свой собственный [локальный Blynk сервер](/#blynk-server) и иметь полный контроль. ### 2. Создать новый проект После того, как вы успешно вошли в свой аккаунт, начните с создания нового проекта. ### 3. Выберите ваше оборудование Выберите модель оборудования, которую вы будете использовать. Проверьте [список поддерживаемого оборудования](/#support-hardware)! ### 4. Ключ авторизации (Auth Token) **Ключ авторизации** - это уникальный идентификатор, необходимый для подключения вашего оборудования к вашему смартфону. Каждый новый проект, который вы создаете, будет иметь свой собственный Ключ авторизации. Вы получите Ключ авторизации автоматически на вашу электронную почту после создания проекта. Вы также можете скопировать его вручную. Нажмите на раздел устройств и выберите необходимое устройство: И вы увидите ключ: **ПРИМЕЧАНИЕ:** Не передавайте свой Ключ авторизации кому-либо, если только вы не хотите, чтобы кто-то имел доступ к вашему оборудованию. Отправлять ключ по электронной почте очень удобно. Нажмите кнопку `e-mail`, и токен будет отправлен на адрес электронной почты, который вы использовали для регистрации. Вы также можете нажать на строку Ключа, и она будет скопирована в буфер обмена. Теперь нажмите кнопку **"Создать"**. ### 5. Добавить виджет Ваш рабочий стол проекта пуст, давайте добавим кнопку для управления нашим светодиодом. Нажмите в любом месте на рабочем столе, чтобы открыть окно виджета. Все доступные виджеты расположены здесь. Теперь выберите виджет кнопку (Button). **Окно виджетов (Widget Box)** **Схвати-И-Брось (Drag-n-Drop)** - Нажмите и удерживайте виджет, чтобы перетащить его на новое место. **Настройки виджета (Widget Settings)** - Каждый виджет имеет свои настройки. Нажмите на виджет, чтобы добраться до них. Наиболее важным параметром для установки является **PIN** (контакт). Список контактов отражает физические контакты, определенные вашим оборудованием. Если ваш светодиод подключен к цифровому выводу 8 - выберите **D8** (**D** - означает digital - цифровой). ### 6. Запустить проект Когда вы закончите с настройками - нажмите кнопку **PLAY**. Это переключит вас из режима EDIT в режим PLAY, где вы можете взаимодействовать с оборудованием. В режиме воспроизведения вы не сможете перетаскивать или настраивать новые виджеты, нажав **STOP** вы вернетесь в режим редактирования. Вы получите сообщение "Arduino UNO is offline" (Arduino UNO не в сет). Мы рассмотрим это в следующем разделе. ## Начало работы с оборудованием ### Как использовать пример кода У вас должна быть установлена библиотека Blynk на вашем компьютере. Если нет - [нажмите здесь](/#downloads-blynk-library). Примеры скетчей (кода) помогут вам быстро подключить ваше оборудование и основные функции Blynk. Откройте пример эскиза в соответствии с используемой моделью оборудования или платой. Давайте рассмотрим пример кода для [Arduino UNO + Ethernet-плата](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/BlynkBlink/BlynkBlink.ino) ```cpp #define BLYNK_PRINT Serial #include #include #include char auth[] = "YourAuthToken"; void setup() { Serial.begin(9600); // Наблюдайет за состоянием подключения в терминале. Blynk.begin(auth); // Здесь ваше Arduino подключается к облаку Blynk. } void loop() { Blynk.run(); // Все чудеса Blynk происходят здесь... } ``` ### Ключ авторизации (Auth Token) В этом примере скейтча найдите такую строку: ```cpp char auth[] = "YourAuthToken"; ``` This is the [Auth Token](/#getting-started-getting-started-with-application-4-auth-token) that you emailed yourself. Please check your email and copy it, then paste it inside the quotation marks. Это [Ключ авторизации](/#getting-started-getting-started-with-application-4-auth-token), который вы должны отправить себе по электронной почте из приложения Blynk. Проверьте свою электронную почту, скопируйте его и вставьте в кавычки. Должно выглядеть примерно так: ``` char auth[] = "f45626c103a94983b469637978b0c78a"; ``` Загрузите скейтч в плату и откройте последовательный терминал. Подождите, пока не увидите что-то вроде этого: ``` Blynk v.X.X.X Your IP is 192.168.0.11 Connecting... Blynk connected! ``` **Великолепно! У вас все настроено! Теперь ваше оборудование подключено к Blynk Cloud!** ## Используем Blynk Вернитесь в приложение Blynk, нажмите кнопку и включите и выключите светодиод! Это должен быть наш Blynk. Изучайте [другие примеры скетчей](https://github.com/blynkkk/blynk-library/tree/master/examples). Не стесняйтесь экспериментировать и комбинировать различные примеры вместе, чтобы создавать свои собственные удивительные проекты. Например, подключите светодиод к выводу, с активным [ШИМ](http://www.arduino.cc/en/Tutorial/Fading) на Arduino и установите виджет - Слайдер (Slider) для управления яркостью светодиода. Используя те же шаги, что описанны выше. ================================================ FILE: ru/HardwareSetUps.md ================================================ # Аппаратные настройки ## Arduino через USB (без расширительных плат) Если у вас нет расширительной платы и ваше оборудование не имеет подключения к сети, вы все равно можете использовать Blynk - напрямую через USB: 1. Откройте [Arduino Serial USB пример](https://github.com/blynkkk/blynk-library/blob/master/examples/Boards_USB_Serial/Arduino_Serial_USB/Arduino_Serial_USB.ino) и замените [Auth Token](/#getting-started-getting-started-with-application-4-auth-token) ```cpp // Вы можете использовать запасной аппаратный серийный порт на платах, которые его имеют (например, Mega) #include SoftwareSerial DebugSerial(2, 3); // RX, TX #define BLYNK_PRINT DebugSerial #include // Вы должны получить Auth Token в приложении Blynk. // Перейдите в настройки проекта (значок гайки). char auth[] = "YourAuthToken"; void setup() { // Debug console DebugSerial.begin(9600); // Blynk will work through Serial Serial.begin(9600); Blynk.begin(auth, Serial); } void loop() { Blynk.run(); } ``` 2. Запустите скрипт, который обычно находится в папке ```/scripts```: - Windows:```My Documents\Arduino\libraries\Blynk\scripts``` - Mac ```User$/Documents/Arduino/libraries/Blynk/scripts``` **На Windows:** Откройте командную строку cmd.exe Задайте свой путь к папке blynk-ser.bat. Например: ``` cd C:\blynk-library-0.3.1\blynk-library-0.3.1\scripts ``` Run ```blynk-ser.bat``` file. For example : ```blynk-ser.bat -c COM4``` (where COM4 is port with your Arduino) Запустите файл ```blynk-ser.bat```. Например: ```blynk-ser.bat -c COM4``` (где COM4 - порт с вашим Arduino) И нажмите «Ввод», нажмите «Ввод» и нажмите «Ввод»... **На Linux и Mac**: Перейдите в папку ```/scripts.``` Например: ``` cd User$/Documents/Arduino/libraries/Blynk/scripts ``` Когда окажетесь внутри этой папки, запустите: ``` user:scripts User$ ./blynk-ser.sh ``` **Предупреждение:** Не закрывайте окно терминала с запущенным скриптом. В некоторых случаях вам также может потребоваться выполнить: ``` user:scripts User$ chmod +x blynk-ser.sh ``` Вам также может понадобиться запустить скрипт с функцией ```sudo``` ``` user:scripts User$ sudo ./blynk-ser.sh ``` Вот что вы увидите в приложении Terminal на Mac (адрес usbmodem может быть другим): ``` [ Press Ctrl+C to exit ] /dev/tty.usbmodem not found. Select serial port [ /dev/tty.usbmodem1451 ]: ``` Скопируйте адрес последовательного порта: ```/dev/ tty.usbmodem1451``` и вставьте его обратно: ``` Select serial port [ /dev/tty.usbmodem1451 ]: /dev/tty.usbmodem1451 ``` После того, как вы нажмете Enter, вы увидите текст, похожий на этот: ``` Resetting device /dev/tty.usbmodem1451... Connecting: GOPEN:/dev/tty.usbmodem1451,raw,echo=0,clocal=1,cs8,nonblock=1,ixoff=0,ixon=0,ispeed=9600,ospeed=9600,crtscts=0 <-> openssl-connect:blynk-cloud.com:9443,cafile=/Users/.../server.crt,nodelay 2015/10/03 00:29:45 socat[30438.2046857984] N opening character device "/dev/tty.usbmodem1451" for reading and writing 2015/10/03 00:29:45 socat[30438.2046857984] N opening connection to LEN=16 AF=2 45.55.195.102:9443 2015/10/03 00:29:45 socat[30438.2046857984] N successfully connected from local address LEN=16 AF=2 192.168.0.2:56821 2015/10/03 00:29:45 socat[30438.2046857984] N SSL connection using AES128-SHA 2015/10/03 00:29:45 socat[30438.2046857984] N starting data transfer loop with FDs [3,3] and [4,4] ``` **ПРИМЕЧАНИЕ:** Arduino IDE может жаловаться на то, что «программа не отвечает». Вам необходимо прекратить выполнение скрипта перед загрузкой нового скейтча. **Дополнительные материалы:** - [Учебник: Управление Arduino через USB с приложением Blynk. Плата Ethernet не требуется. Mac OS](https://www.youtube.com/watch?v=fgzvoan_3_w) - [Как управлять Arduino (без проводов) с помощью blynk через USB. Windows](https://www.youtube.com/watch?v=I_hgIj2FdPI) - [Учебные пособия: управление Arduino с помощью Blynk через USB](http://www.instructables.com/id/Control-arduino-using-Blynk-over-usb/) ## Raspberry Pi 1. Подключите Raspberry Pi к Интернету и откройте его консоль. 2. Запустите эту команду (она обновляет ваш репозиторий пакетов операционной системы, чтобы добавить необходимые пакеты): ``` curl -sL "https://deb.nodesource.com/setup_6.x" | sudo -E bash - ``` 3. Загрузите и соберите библиотеку Blynk JS, используя npm: ``` sudo apt-get update && sudo apt-get upgrade sudo apt-get install build-essential sudo apt-get install -g npm sudo npm install -g onoff sudo npm install -g blynk-library ``` 4. Запустите тестовый скрипт Blynk (поставьте свой ключ авторизации): ``` blynk-client 715f8cafe95f4a91bae319d0376caa8c ``` 5. Вы можете написать свой собственный скрипт на основе [примеров](https://github.com/vshymanskyy/blynk-library-js/tree/master/examples) 6. Чтобы включить автоматический перезапуск Blynk для Pi, найдите файл ```/etc/rc.local``` и добавьте туда: ``` node full_path_to_your_script.js ``` **Дополнительные материалы:** - [Учебные пособия: Blynk на Javascript для Raspberry Pi, Intel Edison и другие](http://www.instructables.com/id/Blynk-JavaScript-in-20-minutes-Raspberry-Pi-Edison) - [Учебные пособия: использование датчиков DHT11/DHT12 с Raspberry Pi и Blynk](http://www.instructables.com/id/Raspberry-Pi-Nodejs-Blynk-App-DHT11DHT22AM2302/?ALLSTEPS) **Примечание:** Вместо использования Node.js вы также можете создать версию библиотеки C++ (такую же, как для Arduino, на основе WiringPi): - [Библиотека README для Linux](https://github.com/blynkkk/blynk-library/blob/master/linux/README.md) - [Тема сообщества Blynk: How-To Raspberry Pi](https://community.blynk.cc/t/howto-for-raspberry-pi/332) - [Видеоурок - Настройка Blynk и Raspberry Pi](https://www.youtube.com/watch?v=iSG_8g6KyGE) ## Беспроводной ESP8266 Вы можете запустить Blynk прямо на ESP8266! Установите последнюю версию библиотеки ESP8266 для Arduino, используя [это руководство](https://github.com/esp8266/Arduino#installing-with-boards-manager). **Пример кода:** [ESP8266_Standalone](https://github.com/blynkkk/blynk-library/blob/master/examples/Boards_WiFi/ESP8266_Standalone/ESP8266_Standalone.ino) **Дополнительные материалы:** - [Учебные пособия: ESP8266 ESP-12 (Беспроводной) + Blynk](http://www.instructables.com/id/ESP8266-ESP-12Standalone-Blynk-101) - [Учебные пособия: ESP8266-12 (Беспроводной) датчик температуры lm35 + Blynk](http://www.instructables.com/id/ESP8266-12-blynk-wireless-temperature-LM35-sensor/?ALLSTEPS) - [Пошаговое руководство на русском языке](http://esp8266.ru/esp8266-blynk) ## NodeMCU Пожалуйста, следуйте [этой подробной инструкции](https://github.com/blynkkk/blynk-library/tree/master/examples/Boards_WiFi/NodeMCU#instruction-for-nodemcu-setup). Или посмотрите [этот видеоурок](https://www.youtube.com/watch?v=FhS44hGk1Lc). ## Arduino + ESP8266 WiFi с AT командами Этот тип подключения не рекомендуется для начинающих. Если вы хотите попробовать, пожалуйста, внимательно прочитайте [этот раздел справки](http://help.blynk.cc/hardware-and-libraries/arduino/esp8266-with-at-firmware) **Примечание:** Некоторые платы, такие как Arduino UNO WiFi от Arduino.org, не используют AT-команды (и не предоставляют соответствующих библиотек), поэтому это делает их непригодными для использования с Blynk. ## Particle Blynk работает со всем семейством продуктов Particle: Core, Photon и Electron. 1. Открыть [Particle Web IDE](https://build.particle.io/build). Требуется регистрация. 2. Идем в библиотеки. 3. Найдите ** Blynk ** в общих библиотеках и нажмите на него. 4. Откройте пример ```01_PARTICLE.INO```. 5. Нажмите «использовать этот пример» (use this example). 6. Поместите свой токен здесь: ```char auth [] ="YourAuthToken";``` и прошейте Particle! Вы можете отсканировать этот QR-код из приложения Blynk, и вы получите готовый к тесту проект для **Particle Photon**. Просто вставьте свой токен ключ в пример ```01_PARTICLE.INO```. **Дополнительные материалы:** - [Ядро Particle + DHT22](https://www.hackster.io/gusgonnet/temperature-humidity-monitor-with-blynk-7faa51) ================================================ FILE: ru/Implementing.md ================================================ # Implementing a Blynk HW client (library) Currently we provide Arduino/C++ implementation of the library. It is very extensible and modular, look at [the list of supported hardware](/#supported-hardware). Adding new connection types and Arduino-compatible boards is easy. TODO: Porting guide. But some devices are programmed in other languages, like: * Espruino, JavaScript, Node.JS * MicroPython, Python * NodeMCU, eLua This document hints how to write a custom library. ## Blynk library main functions * Provide easy-to use API * Virtual pin handlers registration * Provide comfortable wrappers for some widgets * Manage connection * Should support different connection type/hardware, if applicable * Serialize/deserialize Blynk protocol * Handle direct pin operations * Should be portable across similar devices (or same technology/programming language), if possible * Should detect and notify the user about [troubles](/#troubleshooting) where possible (especially Flood) ### Adding new HW board Different boards can be added by creating JSON board description file. ```json { "name": "Arduino UNO", "map": { "digital": { "pins": { "D0": 0, "D1": 1, "D2": 2, "D3": 3, "D4": 4, "D5": 5, "D6": 6, "D7": 7, "D8": 8, "D9": 9, "D10": 10, "D11": 11, "D12": 12, "D13": 13 }, "ops": [ "dr", "dw" ] }, "analog": { "pins": { "A0": 14, "A1": 15, "A2": 16, "A3": 17, "A4": 18, "A5": 19 }, "ops": [ "dr", "dw", "ar" ], "arRange":[0, 1023] }, "pwm": { "pins": [ "D3", "D5", "D6", "D9", "D10", "D11" ], "ops": [ "aw" ], "awRange":[0, 255] }, "virtual": { "pinsRange": [ 0, 31 ], "ops": [ "vr", "vw" ] } } } ``` Look at the [full boards list](https://github.com/blynkkk/blynk-library/tree/master/boards_json). You can send us your own board description file for review and App integration. There may be a problem that you want to start testing your implementation, but your board is not listed int the Blynk App. On Android, we now have a "Generic Board" specially for such purposes. Unfortunately iOS does not have it yet. Basically you can select UNO board and check how it works using just virtual pins. Most digital pins will also work. Analog IO/PWM will not work in general, until we add your board to the App. ================================================ FILE: ru/IntroAndDownloads.md ================================================ # Введение Это руководство поможет вам понять, как начать использовать Blynk, и даст исчерпывающий обзор всех функций. Если вы хотите начать использовать Blynk, ознакомьтесь с разделом Начало работы.
      [Начало работы >](/#getting-started) ## Как работает Blynk Блинк был разработан для "Интернета вещей" ([Internet of Things](https://ru.wikipedia.org/wiki/%D0%98%D0%BD%D1%82%D0%B5%D1%80%D0%BD%D0%B5%D1%82_%D0%B2%D0%B5%D1%89%D0%B5%D0%B9)). Он может управлять оборудованием удаленно, отображать данные датчиков, хранить данные, визуализировать их и делать много других интересных вещей. В платформе есть три основных компонента: - **Blynk App (Приложение-клиент)** - позволяет вам создавать разнообразные интерфейсы для ваших проектов, используя различные виджеты. - **Blynk Server (Сервер)** - отвечает за все коммуникации между смартфоном и оборудованием. Вы можете использовать наше Облако Blynk или запустить свой [личный сервер Blynk](/#blynk-server) локально. Он с открытым исходным кодом, может легко обрабатывать тысячи устройств и даже может быть запущен на устройствах типа Raspberry Pi. - **Blynk Libraries (Библиотеки)** - разработаны для всех популярных аппаратных платформ - обеспечивают связь с сервером и обрабатывать все входящие и исходящие команды. А теперь представьте: каждый раз, когда вы нажимаете кнопку в приложении Blynk, сообщение отправляется в ~~пространство~~ Облако Blynk, где оно "волшебным" образом попадает на ваше оборудование. Передача работает и в противоположном направлении, а все происходит в "мгновение ока". ## Характеристики * Типовой API и пользовательский интерфейс для всех поддерживаемых устройств и оборудования * Подключение к сети с помощью: * Wi-Fi * Bluetooth и BLE * Ethernet * USB (последовательный) * GSM * ... * Набор, простых в использовании, виджетов * Прямое управление пин-ами без написания кода * Простота интеграции и добавления новых функций с помощью виртуальных пин-ов * Мониторинг истории данных с помощью виджета [Диаграмма (SuperChart)](/#widgets-displays-superchart) * Связать устройства между собой при помощью виджета [Мост (Bridge)](/#widgets-other-bridge) * Отправка электронных писем, твитов, push-уведомлений и т.д. * ... постоянно добавляются новые функции! Вы можете найти [Примеры кода](https://github.com/blynkkk/blynk-library/tree/master/examples), охватывающие основные функции Blynk. Они так же включены в библиотеку Blynk. Все примеры разработаны так, чтобы их можно было легко комбинировать друг с другом. ## Что нужно для использования Blynk? В этот момент вы можете подумать: **«Хорошо, я хочу попробовать. Что мне нужно, чтобы начать?»** - на самом деле, всего пара вещей: #### **1. Аппаратные средства**. Arduino, Raspberry Pi или аналогичный набор для разработки. **Blynk работает через Интернет.** Это означает, что выбранное вами оборудование должно иметь возможность подключаться к Интернету. Некоторым платам, таким как Arduino Uno, понадобится Ethernet или Wi-Fi Shield для связи, другие уже подключены к Интернету, например: ESP8266, Raspberri Pi с WiFi-ключом, Particle Photon или SparkFun Blynk Board. Но даже если у вас нет подключения к сети, вы можете подключить устройства через USB к своему ноутбуку или настольному компьютеру (для новичков это немного сложнее, но мы вам поможем). Что действительно круто, так это то, что [список оборудования](/#support-hardware), который работает с Blynk, огромен и продолжает расти. #### **2. Смартфон**. Приложение Blynk - это качественно разработанный конструктор интерфейсов. Он работает как на iOS, так и на Android, давайте здесь обойдемся без священной войны, хорошо? # Загрузки ## **Приложения Blynk для iOS или Android**
      [Drawing](https://itunes.apple.com/us/app/blynk-control-arduino-raspberry/id808760481?ls=1&mt=8)        [Drawing](https://play.google.com/store/apps/details?id=cc.blynk) ## **Blynk библиотека**
      [Скачать библиотеку Blynk >](https://github.com/blynkkk/blynk-library/releases/latest) Если вы забыли или не знаете, как установить библиотеки Arduino [нажмите здесь](http://www.arduino.cc/en/guide/libraries). ================================================ FILE: ru/License.md ================================================ # Лицензия Этот проект выпущен под лицензией Открытого Программного Обеспечения ([MIT](https://ru.wikipedia.org/wiki/%D0%9B%D0%B8%D1%86%D0%B5%D0%BD%D0%B7%D0%B8%D1%8F_MIT)). ================================================ FILE: ru/Links.md ================================================ # Ссылочная информация * [Blynk site](https://www.blynk.cc) * [Blynk community](https://community.blynk.cc) * [Facebook](https://www.fb.com/blynkapp) * [Twitter](https://twitter.com/blynk_app) * [Blynk Library](https://github.com/blynkkk/blynk-library) * [Blynk Examples](https://github.com/blynkkk/blynk-library/tree/master/examples) * [Blynk Server](https://github.com/blynkkk/blynk-server) * [Kickstarter campaign](https://www.kickstarter.com/projects/167134865/blynk-build-an-app-for-your-arduino-project-in-5-m/description) ================================================ FILE: ru/OTA.md ================================================ # Обновление "по воздуху" (OTA) Blynk также поддерживает беспроводное обновления для плат ESP8266, NodeMCU и SparkFun Blynk. На данный момент ОТА поддерживается только для частных серверов и для платных клиентов. ## Как это работает? - Вам нужно использовать [обычный скетч для экспортируемых приложений](https://github.com/blynkkk/blynk-library/tree/master/examples/Blynk.Inject/Template_ESP8266); - После того, как вы запустили свое оборудование, все готово к обвнолению "по воздуху"; - Вы можете запустить обновление прошивки для конкретного оборудования через его токен или для всего оборудования в сети. ### Заливка прошивки 1. Пользователь запускает OTA одним из нижеуказанных HTTPS-запросов; 2. Пользователь предоставляет в HTTPS-запросе учетные данные администратора и двоичный файл прошивки для обновления оборудования; 3. Когда оборудование подключается к серверу - сервер проверяет его прошивку. В случае, если дата сборки аппаратной прошивки старше загруженной прошивки, сервер отправляет на аппаратное обеспечение специальную команду с URL для новой прошивки; 4. Оборудование обработает указанный URL-адрес таким [обработчиком](https://github.com/blynkkk/blynk-library/blob/master/examples/Blynk.Inject/Template_ESP8266/OTA.h#L31): ``` BLYNK_WRITE(InternalPinOTA) { //URL адрес с прошивкой. Возможен только HTTP адрес //http://localhost:8080/static/ota/FUp_2441873656843727242_upload.bin overTheAirURL = param.asString(); ... } ``` 5. Обрудование самостоятельно загружает новую прошивку и начинает обновление; ## Выборочное обновление для конкретного оборудования ``` curl -v -F file=@Template_ESP8266.ino.nodemcu.bin --insecure -u admin@blynk.cc:admin https://localhost:9443/admin/ota/start?token=123 ``` - ```Template_ESP8266.ino.nodemcu.bin``` - относительный (или полный) путь к вашей прошивке; - ```--insecure``` флаг для серверов с самостоятельно созданными сертификатами. Вам не нужен этот флаг, если вы использовали Let's Encrypt или другие доверенные сертификаты; - ```admin@blynk.cc:admin``` учетные данные администратора на вашем сервере. Указаны значения по умлочанию. Формат: ```username:password```. Вы можете изменить имя пользователя и пароль в файле ```server.properties```; - ```token``` ключь является признаком вашего оборудования, к которому вы хотите применить обновление прошивки. Обновление прошивки будет начато только в том случае, если устройство подключено к сети; ## Обновление "по воздуху" для всех устройств Обновление для всех устройств будет запускаться только тогда, когда они подключены к облаку. Для этого вам нужно удалить часть с токен ключом. ``` curl -v -F file=@Template_ESP8266.ino.nodemcu.bin --insecure -u admin@blynk.cc:admin https://localhost:9443/admin/ota/start ``` В этом случае OTA будет срабатывать сразу после подключения устройства к серверу. Если устройство подключено к сети, обновление встроенного ПО будет начато только после повторного подключения устройства. ## Обновление "по воздуху" от конкретного пользователя В этом случае обновление прошивки будет срабатывать для всех устройств, указанных пользователем. ``` curl -v -F file=@Template_ESP8266.ino.nodemcu.bin --insecure -u admin@blynk.cc:admin https://localhost:9443/admin/ota/start?user=pupkin@gmail.com ``` ## Обновление "по воздуху" для конкретного пользователя и проекта В этом случае обновление прошивки будет срабатывать для всех устройств указанного пользователя в указанном проекте. ``` curl -v -F file=@Template_ESP8266.ino.nodemcu.bin --insecure -u admin@blynk.cc:admin https://localhost:9443/admin/ota/start?user=pupkin@gmail.com&project=123 ``` ## Остановка OTA ``` curl -v --insecure -u admin@blynk.cc:admin https://localhost:9443/admin/ota/stop ``` ## Как сделать бинарную прошивку Чтобы сделать прошивку в Arduino IDE - зайдите в меню: Скетч -> Экспорт бинарного файла. **ПРИМЕЧАНИЕ:** ESP8266 принимает прошивку только по протоколу HTTP, а не HTTPS. ================================================ FILE: ru/README.md ================================================ # https://docs.blynk.cc/ ================================================ FILE: ru/Roadmap.md ================================================ #Roadmap We build Blynk based on Blynkers feedback but with limited resources we have to prioritize our features. At the moment list look like that: - App Sharing (project sharing when other people can control your hardware, but can't modify your project); Free Beta - App Sharing (project sharing when other people can control your hardware, but can't modify your project); Subscription based - Bluetooth Low Energy support; - Hardware state handling (changing physical button state changes Blynk application state); - Hardware online/offlane state improvements (better indication for "is hardware online?", "is hardware offline?"); - Project space increase - Direct Connect support (for WiFi); - RTC widget; - Design options for widgets (size, button with icons, etc); - Phone sensors widgets (GPS, accelerometer); - IP camera support; - Customizable look and feel of the project Under consideration: - Home screen widget (to avoid opening App when you need only 1 button click); - Haptic feedback (vibration) when touching widgets ================================================ FILE: ru/Security.md ================================================ # Безопасность Сервер Blynk имеет 5 открытых портов с разным уровнем безопасности. * **80** - простое TCP-соединение до оборудования (без защиты) * **8080** - простое TCP-соединение для оборудования на локальном сервере (без защиты) * **443** - соединение SSL/TLS для мобильных приложений и оборудования с SSL шифрованием * **9443** - соединение SSL / TLS для мобильных приложений на локальном сервере и оборудования с SSL шифрованием Оборудование может выбрать подключение к 443 (9443) или 80 (8080), в зависимости от его совместимости. Соединение между приложением и сервером всегда осуществляется через SSL/TLS шифрование, поэтому оно всегда защищено. Соединение между оборудованием и сервером зависит от ваших аппаратных возможностей. С локальным сервером Blynk тип соединения между оборудованием и сервером не так важен для безопасности, так как локальный сервер обычно размещается в локальной сети, поэтому злоумышленник не может перехватить трафик между оборудованием и сервером. ## Использование локального сервера Blynk Для обеспечения максимальной безопасности вы можете [установить Blynk server локально](/#blynk-server) и ограничить доступ к вашей локальной сети, чтобы никто, кроме вас, не мог получить доступ к серверу. В этом случае все данные хранятся локально в пределах только вашей сети и не отправлятся через Интернет. В случае локального сервера Blynk также нет необходимости защищать соединение между вашим оборудованием и сервером. Это справедливо для подключения по Ethernet и частично для соединения по Wi-Fi. В случае с Wi-Fi вы должны использовать WPA/WPA2 (защищенный доступ к Wi-Fi) шифрование для защиты беспроводного трафика. Алгоритмы WPA и WPA2 предлагают очень надежное шифрование, которое может защитить все данные, передаваемые по радиоканалу, при условии, что используется достаточно надежный пароль. Даже если ваши данные представляют собой обычный TCP/IP трафик, другой пользователь не сможет расшифровать захваченные пакеты. Тем не менее, убедитесь, что ваш пароль достаточно надежный, иначе единственным ограничивающим фактором для злоумышленника останется время. ## Использование SSL-шлюза Большинство платформ не способны обрабатывать SSL протокол, поэтому они подключаются по 80 порту. Однако наш [сценарий шлюза](https://github.com/blynkkk/blynk-library/blob/master/scripts/blynk-ser.sh) можно использовать для добавления SSL уровня безопасности SSL к соединениям. ```bash ./blynk-ser.sh -f SSL ``` Этот скрипт перенаправит все аппаратные соединения с порта 9443 сервера через шлюз SSL. Вы можете запустить этот скрипт на своем Raspberry Pi, настольном компьютере или даже прямо на своем роутере! **Примечание:** при использовании вашего собственного сервера вы должны перезаписать прилагаемый сертификат server.crt или указать его в сценарии с помощью ключа ```--cert```: ```bash ./blynk-ser.sh -f SSL -s -p 9443 --cert=.crt ``` Flag ```-f SSL``` is enabled by default for USB communication so you don't have to explicit declare it. **Note:** SSL is supported by the gateway only on Linux/OSX for now If you want to skip SSL, and connect to TCP, you can also do that: Флаг ```-f SSL``` включен по умолчанию при соединении через USB, поэтому вам не нужно его явно объявлять. **Примечание:** Пока SSL поддерживается шлюзом только в Linux/OSX. Если вы хотите пропустить SSL и подключиться к TCP, вы также можете сделать так: ```bash ./blynk-ser.sh -t TCP ``` ================================================ FILE: ru/Sharing.md ================================================ # Обмен проектами Blynk предлагает два типа обмена вашими проектами с другими людьми: - **Поделитесь доступом к вашему оборудованию.** Задумайтесь о том, чтобы дать кому-то использовать приложение от вашего проекта. Они не могут изменить интерфейс, но могут контролировать и наблюдать, что там происходит. - **Поделитесь конфигурацией вашего проекта.** Другие пользователи получат клон вашего проекта в Blynk, отсканировав QR-ссылку, но не смогут управлять вашим оборудованием. Это отлично подходит для обучения, учебных пособий и т.д. ## Общий доступ к вашему оборудованию Представьте, что вы даете кому-то приложение для управления вашим проектом. - люди, с которыми вы поделились своим проектом, не могут ничего изменить. Они могут только использовать его - вы можете обновить свое приложение, изменить макет, добавить виджеты, и оно сразу синхронизируется со всеми устройствами - вы можете отозвать доступ в любой момент Как это работает: - вы отправляете QR-код своим пользователям (любым способом по электронной почте, распечатываете, публикуете в социальных сетях, и т.п.) - другие скачивают приложение Blynk, сканируют ваш QR-код, и ваше приложение открывается у них готовыми к использованию. Им даже не нужно входить в систему или создавать учетную запись. Зайдите в настройки вашего проекта: Нажмите на кнопку «Generate Link» (Создать ссылку): Будет сгенеририрован QR-код, которым вы можете поделиться с другими: Это оно! Теперь **Выйдите из настроек и нажмите кнопку PLAY.** Другой человек должен будет установить приложение Blynk и отсканировать QR-код с экрана для входа в систему (сканирование из существующего профиля пока не поддерживается); **ПРИМЕЧАНИЕ:** Ваш проект должен быть активным, не забудьте нажать кнопку воспроизведения. **ПРЕДУПРЕЖДЕНИЕ:** Обмен QR-кодом стоит 1000 энергии, и эта энергия не подлежит восстановлению, даже если вы вообще не использовали обмен. ## Поделится своей конфигурацией проекта Если вы хотите поделиться настройками своего Проекта, не предоставляя доступ к вашему оборудованию (например, чтобы создать учебный материал или инструкцию) - выполните следующие действия: В настройках проекта перейдите к кнопке **Clone**. Она сгенерирует QR-код, которым вы можете поделиться с кем угодно. Другой человек **должен войти в приложение Blynk** и нажать кнопку QR в галерее проектов После проверки будет создан новый проект, все виджеты, настройки, макет будут клонированы. Другому человеку понадобится достаточно энергии, чтобы клонировать ваш проект. **Ключ аутентификации будет другим!**. Никто не получит доступ к вашему оборудованию. Они просто получают копию интейрфейса и настроек. ================================================ FILE: ru/SupportedHardware.md ================================================ # Поддерживаемое оборудование Blynk уже поддерживает более 400 плат, включая поддержку Arduino, Particle, ARM mbed, TI Energia, MicroPython, Node.js, OpenWRT и многих одноплатных компьютеров. Вы можете легко добавить свои собственные типы подключения (см. [здесь](https://github.com/blynkkk/blynk-library/tree/master/examples/More/ArduinoClient) примеры для Arduino)! ## Платформы - **Arduino** (https://github.com/blynkkk/blynk-library) - Arduino MKR WiFi 1010 - Arduino MKR GSM 1400 - Arduino MKR NB 1500 - Arduino Uno, Duemilanove - Arduino Nano, Mini, Pro Mini, Pro Micro, Due, Mega - Arduino 101 (Intel Curie, с BLE) - Arduino MKR1000 - Arduino Zero - Arduino Yún (включая WiFi и Ethernet, через Bridge) - Arduino.org UNO WiFi - Arduino MKR VIDOR 4000 (используйте пример для MKR WiFi 1010) - Arduino UNO WiFi Rev.2 (используйте пример для MKR WiFi 1010) - **Arduino-подобные** - Blynk Board - ESP8266 (Generic, NodeMCU, Witty Cloud, Huzzah, WeMos D1, Seeed Wio Link, etc.) - ESP32 (WiFi, BLE) - Nordic nRF51/nRF52 - базовые платы - Teensy 3.2/3.1 - Blue Pill (STM32F103C) - Realtek RTL8710 / Ameba via [RTLduino](https://github.com/pvvx/RtlDuino) - BBC micro:bit - LightBlue Bean *, soon* - DFRobot Bluno - RedBear Duo (WiFi, BLE) - RedBearLab Blend Micro - RedBearLab BLE Nano (v1 and v2) - Seeed Tiny BLE - Simblee BLE - RFduino BLE - The AirBoard (BLE-Link, RN-XV) - Feather M0 WiFi - Feather 32u4 BLE - Intel Edison - Intel Galileo - Fishino Guppy, Uno, Mega - TinyCircuits TinyDuino (CC3000) - Microduino/mCookie Core, Core+, CoreUSB - Wicked WildFire V2, V3, V4 - Digistump Oak - chipKIT Uno32 - Alorium XLR8 (FPGA) - LinkIt ONE (WiFi only) - **Энергеия** - Texas Instruments - CC3220SF-LaunchXL - CC3200-LaunchXL - Tiva C Connected LaunchPad - Stellaris LM4F120 LaunchPad - MSP430F5529 + CC3100 - LaunchPad MSP432 - RedBearLab (CC3200, WiFi Mini) - **Particle** (https://github.com/vshymanskyy/blynk-library-spark) - Core - Photon - Electron - RPi - SparkFun RedBoard - RedBear Duo (WiFi & BLE) - **ARM mbed** (https://developer.mbed.org/users/vshymanskyy/code/Blynk/) - Seeed Tiny BLE - RedBearLab BLE Nano - BBC micro:bit - STM32 Nucleo + Wiznet 5100 *, soon* - **JavaScript** (Node.js, Espruino, Browsers) (https://www.npmjs.com/package/blynk-library) - Regular PC with Linux / Windows / OS X - Raspberry Pi (Banana Pi, Orange Pi, ...) - BeagleBone Black - Onion Omega - Onion Omega 2 - Intel Galileo - Intel Edison - Intel Joule - LeMaker Guitar - LeMaker Banana Pro - Samsung ARTIK 5 - PandaBoard, CubieBoard, pcDuino, Tessel 2 - VoCore, VoCore2 (OpenWRT + [Espruino package](https://github.com/vshymanskyy/OpenWRT-Espruino-packages)) - Espruino Pico - ... - **Python** (https://github.com/vshymanskyy/blynk-library-python) - MicroPython - Python 2 - Python 3 - **Lua** (https://github.com/blezek/blynk-esp) - NodeMCU ## Типы подключения Arduino - USB (Serial), подключенный к ноутбуку или компьютеру - **Ethernet** - Arduino MKR ETH - Arduino Ethernet Shield (W5100) - Arduino Ethernet Shield 2 (W5500) - SeeedStudio Ethernet Shield V2.0 (W5200) - ENC28J60-based modules - **WiFi** - ESP8266 as WiFi modem (работает с оригинальной прошивкой) - Arduino WiFi 101 Shield - Arduino WiFi Shield - WIZnet WizFi310 - Adafruit CC3000 WiFi Breakout / Shield - RN-XV WiFly - **Bluetooth Smart (BLE 4.0)** - HM-10, HC-08 - DFRobot BLE-Link module - Microduino/mCookie BLE - RedBearLab BLE Mini - nRF8001-based boards (Adafruit Bluefruit LE, etc.) - **Bluetooth 2.0 Serial Port Profile (SPP)** - HC-05, HC-06, ... - **Cellular (GSM/3G/LTE)** - SIMCom SIM800 series (SIM800A, SIM800C, SIM800L, SIM800H, SIM808, SIM868) - SIMCom SIM900 series (SIM900A, SIM900D, SIM908, SIM968) - A6/A7 - M590 - BG96 - GPRSbee - Microduino GSM - Adafruit FONA (Mini Cellular GSM Breakout) - Adafruit FONA 800/808 Shield ## Сделано сообществом - [Marvell® EZ-Connect™ MW300/MW302](https://github.com/vshymanskyy/blynk-library-ez-connect) - [WIZnet-W5500-EVB](http://instructables.com/id/WIZnet-W5500-EVB-and-Blynk-App-communication) - [LabVIEW](https://github.com/juncaofish/NI-LabVIEWInterfaceforBlynk) - [Node-RED](https://github.com/gablau/node-red-contrib-blynk-ws) (can be used as bridge to HTTP, TCP, UDP, MQTT, XMPP, IRC, OSC...) ## Проблемные платы Эти платы не поддерживаются и не работают из коробки: - [Arduino Tian](http://www.arduino.org/products/boards/arduino-tian) Здесь список [**известных проблем с библиотекой Blynk**](https://github.com/blynkkk/blynk-library/issues?q=is%3Aissue+label%3A"for+reference"+) ================================================ FILE: ru/Troubleshooting.md ================================================ # Решение проблем ## Соединение Если у вас возникли проблемы с подключением, выполните следующие действия: 1. Убедитесь, что ваше оборудование, провода, кабели и блок питания находятся в исправном состоянии, не повреждены и т.д. Используйте качественные USB-кабели и USB-порты. 2. Проверьте проводку, используя примеры (клиент TCP/HTTP или аналогичный), **прилагаемые к вашему оборудованию**. * Как только вы поймете, как управлять соединением, использовать Blynk станет намного проще. 3. Попробуйте запустить команду ```telnet blynk-cloud.com 80``` со своего ПК, подключенного к той же сети, что и ваше оборудование. Вы должны увидеть что-то вроде: ```Подключено к blynk-cloud.com```. 4. Попробуйте запустить примеры Blynk по умолчанию для вашей платформы **без изменений**, чтобы увидеть, работают ли они. * Дважды проверьте, что вы выбрали **правильный пример** для вашего типа подключения и модели оборудования. * Наши примеры содержат **комментарии и объяснения**. **Читайте их внимательно.** * Убедитесь, что ваш токен авторизации действителен (скопирован из приложения и **не содержит пробелов и т.п.**) * Если это не работает, попробуйте заглянуть в [печать отладочной информации в порт](/#enable-debug). 5. Готово! Добавьте свои модификации и функциональность. Наслаждайтесь Blynk! **Примечание:** Если к вашей сети подключено несколько устройств, все они должны иметь разные MAC и IP-адреса. Например, при использовании двух Arduino UNO с Ethernet расширениями, пример по умолчанию для обоих из них вызовет проблемы с подключением. Вам следует использовать пример [ручная настройка Ethernet](https://github.com/blynkkk/blynk-library/blob/master/examples/Boards_Ethernet/Arduino_Ethernet_Manual/Arduino_Ethernet_Manual.ino). ## Подключение к сети WiFi Если у вас возникли проблемы с подключением по WiFi, пожалуйста, проверьте следующие ошибки: * Вы пытаетесь подключиться к сети 'WPA & WPA2 Enterprise' (часто используется в офисах), а ваш шилд не поддерживает этот метод шифрования * В вашей WiFi-сети есть страница входа, которая запрашивает ввод ключа доступа (часто используется в ресторанах) * Безопасность вашей сети Wi-Fi запрещает полное подключение чужих устройств (фильтрация MAC-адресов и т.п.) * Работает Брандмауэр. Порт по умолчанию для аппаратных подключений - 80 (8080 на локальном сервере). Убедитесь, что он открыт. ## Задержки (Delay) Если вы используете длительный ```delay()``` или отправляете свое оборудование в спящий режим внутри ```loop()```, ждите обрыва соединения и снижение производительности. ***НЕ ДЕЛАЙТЕ ЭТОГО:*** ```cpp void loop() { ... delay(1000); // это длительная задержка, которую следует избегать other_long_operation(); // другие длинные операторы ... Blynk.run(); } ``` **Примечание:** Это также относится к обработчикам BLYNK_READ & BLYNK_WRITE! **РЕШЕНИЕ:** Если вам нужно выполнять действия в определенные промежутки времени - используйте таймеры, например [BlynkTimer](/#blynk-firmware-blynktimer). ## Ошибки из-за флуда Если ваш код часто отправляет много запросов на наш сервер, ваше оборудование будет отключено. Приложение Blynk может показывать "Your hardware is offline" (Ваше оборудование отключено). Когда ```Blynk.virtualWrite``` находится в ```void loop```, он генерирует сотни «запросов» в секунду. Вот пример того, что может вызвать флуд. **НЕ ДЕЛАЙТЕ ЭТОГО:** ```cpp void loop() { Blynk.virtualWrite(1, value); // Эта строка отправляет сотни сообщений на сервер Blynk Blynk.run(); } ``` **РЕШЕНИЕ:** Если вам нужно выполнять действия в определенные промежутки времени - используйте таймеры, например [BlynkTimer](/#blynk-firmware-blynktimer). Использование ```delay()``` также не решит проблему. Это может вызвать [другую проблему](/#delay). Используйте таймеры! Если отправка сотен запросов - это то, что вам необходимо для вашего продукта, вы можете увеличить лимит на локальном сервере и в библиотеке Blynk. Для локального сервера вам необходимо изменить свойство ```user.message.quota.limit``` в файле ``` server.properties```: #100 запросов в секунду на одного пользователя. user.message.quota.limit=100 Для библиотеки вам нужно изменить свойство ```BLYNK_MSG_LIMIT``` в файле ``` BlynkConfig.h```: //Ограничьте количество исходящих команд. #define BLYNK_MSG_LIMIT 20 ## Включить отладку Чтобы включить отправку отладочной информации в серийный порт по умолчанию, добавьте код в верхней части скейтча **(это должна быть первая строка в скейтче)**: ```cpp #define BLYNK_DEBUG // Необязательно, запускает отладку #define BLYNK_PRINT Serial ``` И не забудьте включить серийный порт в ```void setup()```: ```cpp Serial.begin(9600); ``` Вы также можете использовать запасные аппаратные последовательные порты или SoftwareSerial для вывода отладочной информации (вам понадобится адаптер для подключения к ПК). **Примечание:** включение режима отладки замедлит аппаратную производительность в 10 раз. ## Проблема с Geo DNS Проблема с Geo DNS больше не является проблемой. Она была решена в 2017 году. ## Сброс пароля На экране входа нажмите "Forgot password?" (Забыли пароль?) а затем введите адрес электронной почты и кнопку ```Send```. Вы получите инструкции по электронной почте. ### Android сброс пароля 1. Откройте инструкцию в электронной почте **со своего смартфона или планшета**; 2. Нажмите кнопку «Reset now» в своем электронном письме; 3. Нажмите на значок Blynk в всплывающем окне и сбросьте пароль: ================================================ FILE: ru/Widgets.md ================================================ # Виджеты Виджеты являются интерфейсными модулями. Каждый из них выполняет определенную функцию ввода / вывода при взаимодействии с оборудованием. Есть 4 типа виджетов: - **Контроллеры** - используется для отправки команд, которые контролируют/управляют вашим оборудованием; - **Дисплеи** - используется для визуализации данных с датчиков и других источников; - **Уведомления** - отправляет сообщения и уведомления; - **Интерфейс** - виджеты для выполнения определенных функций графического интерфейса; - **Другие** - виджеты, которые не относятся ни к одной категории; Каждый виджет имеет свои настройки. Некоторые из виджетов (например, Bridge) просто включают функциональность, и у них нет никаких настроек. ## Общие настройки виджетов ### Выбор пина Это один из основных параметров, который вам нужно установить. Он определяет, какой пин контролировать или читать.. **Цыфровые Пины (Digital Pins)** - представляют физические пины цифрового ввода-вывода на вашем оборудовании. Выводы с поддержкой ШИМ помечены символом ```~``` **Аналоговые Пины (Analog Pins)** - представляют физические пины аналогового ввода-вывода на вашем оборудовании **Виртуальные пины (Virtual Pins)** - не имеют физической реализации. Они используются для передачи любых данных между приложение Blynk и вашим оборудованием. Узнайте больше о Виртуальных Пинах [здесь](../#blynk-main-operations-virtual-pins). ### Отображение данных Если вы хотите пересчитать входящие значения в определенный диапазон, вы можете использовать кнопку сопоставления значений: Допустим, ваш датчик отправляет значения от 0 до 1023. Но вы хотите в приложении отображать значения в диапазоне от 0 до 100. Когда сопоставление данных включено, входящее значение 1023 будет отображено как 100. ### РАЗДЕЛЬНО/ВМЕСТЕ (SPLIT/MERGE) Некоторые виджеты могут отправлять более одного значения. С помощью этого переключателя вы можете контролировать, как их отправлять. - **РАЗДЕЛЬНО**: Каждый из параметров отправляется непосредственно на пин вашего оборудовании (например, D7). Вам не нужно писать дополнительный код. **ПРИМЕЧАНИЕ:** В этом режиме вы отправляете несколько команд из одного виджета, это может снизить производительность вашего оборудования. **ПРИМЕР:** Если у вас есть виджет джойстика и он настроен на пины D3 и D4, то он отправит 2 команды через Интернет: ``` digitalWrite(3, value); digitalWrite(4, value); ``` - **ВМЕСТЕ:** Когда выбран режим ВМЕСТЕ, вы отправляете только 1 сообщение, состоящее из массива значений. Поэтому вам нужно разобрать его на совем оборудовании. Этот режим можно использовать только с Виртуальными пинами. **ПРИМЕР:** Добавьте виджет zeRGBa и установите его в режим ВМЕСТЕ. Выберите виртуальный пин V1 ``` BLYNK_WRITE(V1) // Существующий виджет, который записывает данные в V1 { int r = param[0].asInt(); // получить значение КРАСНОГО канала int g = param[1].asInt(); // получить значение ЗЕЛЕНОГО канала int b = param[2].asInt(); // получить значение СИНЕГО канала } ``` ### Разрядность (Decimals) Определяет, сколько десятичных знаков вы хотели бы видеть при перемещении ползунка. Когда выбрано «Без дроби» (No Fraction), ползунок будет отправлять только целочисленные значения без десятичных дробей. "1 знак" означает, что значения будут выглядеть как 1.1, 1.2, ..., 2.0 и т. Д. ### Отправка при Отжатии (Send On Release) Эта опция позволяет оптимизировать трафик данных на ваше оборудование. Например, когда вы перемещаете виджет джойстика, команды потоково передаются на ваше оборудование, во момент одного движения джойстика может отправляться десятки команд. Существуют варианты когда, это дейтсвительно необходимо, однако создание такой нагрузки может привести к перегрузке и сбросу оборудования. **Отправка при Отжатии** является рекомендуемой настройкой для большинства приложений. Данная настройка влключена по умолчанию. ### Интервал записи (Write interval) Аналогична опции «Отправка при Отжатии». Тем не менее, он позволяет вам передавать значения на ваше оборудование в течение определенного интервала. Например, установка **Интервала записи** на 100 мс означает, что при перемещении ползунка только 1 значение будет отправлено оборудованию в течение 100 мсек. Эта опция также используется для оптимизации потока трафика данных на ваше оборудование. ### Цветовой градиент (Color gradient) Когда вы выбираете градиент, он влияет на цвет элементов виджета на основе входящих значений. Например: вы устанавливаете виджет Указатель (Gauge) с параметрами Min и Max от 0 до 100 и выбираете зелено-желто-красный градиент. То когда оборудование отправляет данные: - `10`, Указатель изменит свой цвет на зеленый - `50` указатель изменит цвет на желтый - `80` указатель изменит цвет на красный Есть два типа градиентов, которые вы можете выбрать: - Теплый: Зеленый - Ораньжевый - Красный; - Холодный: Зеленый - Синий - Фиолетовый. ## Контроллеры (Controllers) ### Кнопка (Button) Works in push or switch modes. Allows to send ON and OFF (LOW/HIGH) values. Button sends 1 (HIGH) on press and sends 0 (LOW) on release. Работает в режиме кнопки или выключателя. Позволяет отправлять значения ВКЛ (ON) и ВЫКЛ (OFF) (НИЗКИЙ / ВЫСОКИЙ) (LOW / HIGH). Кнопка посылает 1 ВЫСОКИЙ (HIGH) при нажатии и 0 НИЗКИЙ (LOW) при отпускании. **Пример кода:** [Базовый пример](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/BlynkBlink/BlynkBlink.ino) ### Слайдер (Slider) Слайдер очень похож на потенциометр. Позволяет отправлять значения в заданном диапазоне MIN / MAX. **Пример кода:** [Базовый пример](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/BlynkBlink/BlynkBlink.ino) ### Таймер (Timer) Таймер запускает действия в определенное время. Даже если смартфон не в сети. По умолчанию время начала отправляет 1 (HIGH), время остановки отправляет 0 (LOW). Вы можете изменить это поведение на любые другие значения. Вы можете изменить настройки Таймера в режиме «Запуска». В последней версии Android также есть улучшенный таймер в виджете Обработчик событий. C [Обработчиком событий (Eventor)](../#widgets-other-obrabotchik-sobytij-eventor) вы можете назначить несколько таймеров на один и тот же пин, отправить любую строку/число, выбирать дни и часовой пояс. Рекомендуется использовать виджет Обработчик событий поверх виджета Таймер. Однако виджет Таймер по-прежнему подходит и для простых событий таймера. **ПРИМЕЧАНИЕ:** Виджет таймера зависит от времени сервера, а не вашего телефона. Иногда время телефона может не соответствовать времени сервера. **ПРИМЕЧАНИЕ:** Виджет таймера зависит от времени сервера, а не вашего телефона. Иногда время телефона может не соответствовать времени сервера. **Пример кода:** [Таймер](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Timer/Timer.ino) ### Джойстик (Joystick) Управление сервоприводом в 4 направлениях. #### Параметры: - режим РАЗДЕЛЬНО/ВМЕСТЕ (SPLIT/MERGE) - читаем [здесь](/#vidgety-obschie-nastroyki-vidgetov-razdelno-vmeste-split-merge) Виджеты ОБщие настройки виджетов РАЗДЕЛЬНО/ВМЕСТЕ (SPLIT/MERGE) - **Вращать при наклоне (Rotate on Tilt)** Когда этот параметр включен, Джойстик будет автоматически вращаться, если вы будете использовать смартфон в горизонтальной положении. - **Автовозрат (Auto-Return)** Когда этот парамтер выключен, ручка джойстика не вернется в центральное положение. Она останется там, где вы ее оставили. **Пример кода:** [Джойстик Две Оси](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/JoystickTwoAxis/JoystickTwoAxis.ino) ### ЗеБРа (zeRGBa) ЗеБРа - это обычный RGB контроллер (палитры цветов). #### Настройки: - **Раздельный (SPLIT)**: Каждый из параметров отправляется непосредственно на пин вашего оборудования (например, D7). Вам не нужно писать код. **ПРИМЕЧАНИЕ:** В этом режиме вы отправляете одновременно несколько команд из одного виджета, что может снизить производительность вашего оборудования. **ПРИМЕР:** у вас есть виджет ЗеБРа и для него было установлено значение D1, D2, D3, он отправит 3 команды через Интернет: ```cpp digitalWrite(1, r); digitalWrite(2, g); digitalWrite(3, b); ``` - **Объединенный (MERGE)**: Когда выбран этот режим, вы отправляете только 1 сообщение, состоящее из массива значений. Но в последствии вам нужно разобрать сообщение на своем оборудовании. Этот режим можно использовать только с виртуальными пин-ами. **ПРИМЕР:** добавьте виджет ЗеБРа и установите его в Объединенный режим (MERGE). Выберите виртуальный контакт V1. ```cpp BLYNK_WRITE(V1) // ЗеБРа назначен на V1 { // получим значение КРАСНОГО канала int r = param[0].asInt(); // получим значение ЗЕЛЕНОГО канала int g = param[1].asInt(); // получим значение СИНЕГО канала int b = param[2].asInt(); } ``` - **Отправка при Отжатии (Send On Release)** доступно для большинства виджетов контроллеров и позволяет уменьшить трафик данных на вашем оборудовании. Например, когда вы перемещаете виджет джойстика, команды непрерывно передаются на аппаратное устройство, во время одного движения джойстика вы можете отправлять десятки команд. Есть случаи, когда это необходимо, однако создание такой нагрузки может привести к сбросу оборудования. Мы рекомендуем включить функцию Отправка при Отжатии для большинства случаев, если вам не требуется мгновенная обратная связь. Эта опция включена по умолчанию. - **Интервал записи (Write interval)** Похоже на вышеуказанный вариант. Однако, позволяет вам передавать значения на ваше оборудование в через определенные интервалы времени. Например, установка интервала записи на 100 мс означает, что при перемещении ползунка на аппаратное обеспечение будет отправлено только 1 значение в течение 100 мс. Эта опция также используется для уменьшения трафика данных на ваше оборудовании. ### Шаговое управление (Step Control) Шаговое управление похоже на две кнопки, назначенные одному пин-у. Одна кнопка увеличивает ваше значение на установленный шаг, а другая уменьшает его. Это очень полезно для случаев использования, когда вам нужно точно изменять ваши значения, но вы не можете достичь такой точности с помощью виджета Cлайдера. **Отправить шаг (Send Step)** опция позволяет вам отправлять на оборудование каждый шаг нвместо фактического значения виджета. **Зациклить значения (Loop value)** опция позволяет сбросить Шаговый виджет на начальное значение при достижении максимального. **Пример кода:** [Базовый пример](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/BlynkBlink/BlynkBlink.ino) ## Дисплеи ### Отображение значений (Value Display) Отображает входящие данные с ваших датчиков или виртуальных пин-ов. Может работать в двух режимах: - режим PUSH (выберается в списке выбора частоты считывания); - режим частоты считываний; В режиме PUSH вы обновляете значения виджета со стороны оборудования с помощью кода: ```cpp Blynk.virtualWrite(V1, val); ``` В этом режиме каждое сообщение, которое отправляет аппаратное устройство автоматически сохраняется на сервере. Режим PUSH не требует, чтобы приложение было онлайн или открыто. В режиме частоты считывния вам необходимо выбрать интервал обновления данных, и приложение будет запускать события считывния с требуемой периодичностью. Ваше приложение должно быть открыто и запущено для отправки запросов на оборудование. Вам не нужен код для аналоговых и цифровых выводов в даном случае. Однако для виртуальных выводов вам необходимо использовать следующий код: ```cpp //вызывать из приложения BLYNK_READ(V1) { //отправить в приложение Blynk.virtualWrite(V1, val); } ``` #### Отображение значений на рабочем столе Вы также можете добавить виджет отображение значения на рабочий стол Android. В этом случае отображение значений работает по протоколу HTTPS. Имейте в виду, что в режиме «Рабочий стол» отображение значений имеет несколько ограничений. Виджет будет обновлять свое состояние только один раз в 15 минут. Вы можете изменить это органичение через настройки виджета. Однако интервал обновления менее 15 минут не гарантируется. Вы также можете изменить размер отображаемого значения на рабочем столе - просто сделайте длинный тап на виджете и измените его размер на необходимый. **Примечание:** Добавление виджета на главный экран стоит 100 энергии. Эта энергия не возвращяется при удалении виджета. **Примечание:** Виджеты рабочего стола для локальных серверов Blynk требуют открытия порта 8080. **Пример кода:** [Базовый пример](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/BlynkBlink/BlynkBlink.ino) ### Значение переменной (Labeled Value) Отображает входящие данные с ваших датчиков или виртуальных пин-ов. Это лучшая версия «Отображения значений», так как в этом виджете есть строка форматирования, поэтому вы можете форматировать входящее значение в любую нужную вам строку. Может работать в 2 режимах: - режим PUSH ( выберитается из списка частоты считывания); - режим частоты считывания; В режиме PUSH вы должны обновлять отображение значений на аппаратной устройстве с помощью кода: ```cpp Blynk.virtualWrite(V1, val); ``` В этом режиме каждое сообщение, которое аппаратное устройств отправляет на сервер, автоматически сохраняется на сервере. Режим PUSH не требует, чтобы приложение было онлайн или запущено. В режиме частоты считывания вам нужно выбрать интервал обновления, и приложение будет запускать события с требуемым интервалом. Ваше приложение должно быть открыто и запущено для отправки запросов на оборудование. В данном случае вам не нужен код для аналоговых и цифровых пин-ов. Однако для виртуальных пин-ов вам необходимо использовать следующий код: ```cpp //вызываем из приложения BLYNK_READ(V1) { //отправляем в приложение Blynk.virtualWrite(V1, val); } ``` #### Параметры форматирования Предположим, ваш датчик отправляет число 12.6789 в приложение Blynk. Поддерживаются следующие параметры форматирования: ```/pin/``` - отображает значение без форматирования (12.6789) ```/pin./``` - отображает значение без десятичной части (13) ```/pin.#/``` - отображает значение с одним десятичным знаком (12.7) ```/pin.##/``` - отображает значение с двумя десятичными знаками (12.68) #### Значение переменной на главном экране Вы также можете добавить значение переменной на рабочий стол Android. В этом случае значение переменной работает через HTTPS протокол. Имейте в виду, что в режиме «Рабочий стол» значение переменной имеет некторые ограничения. Значение переменной будет обновлять свое состояние только один раз в 15 минут. Вы можете изменить этот параметр через настройки виджета. Однако интервал обновления менее 15 минут не гарантируется. Вы также можете изменить размер виджета Значение переменной на рабочем столе - просто сделайте длинный тап на виджете и измените его размер на необходимый. **Примечание:** Добавление виджета на домашний экран стоит 100 энергии. Эта энергия не восстанавливается. **Примечание:** Виджеты главного экрана для локальных серверов Blynk требуют открытия порта 8080. **Пример кода:** [Светодиод](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/BlynkBlink/BlynkBlink.ino) ### Светодиод (LED) Простой светодиод для индикации. Вам нужно отправить 0, чтобы выключить светодиод. И 255 для того, чтобы включить светодиод. Или просто используйте Blynk API, как описано ниже: ```cpp //регистрируемся на виртуальном пине 1 WidgetLED led1(V1); led1.off(); led1.on(); ``` Все значения от 0 до 255 изменяют яркость светодиода: ```cpp WidgetLED led2(V2); //установить яркость светодиода на 50%. led2.setValue(127); ``` Вы также можете изменить цвет светодиода с помощью кода: ```cpp //#D3435C - Красный в RGB формате Blynk.setProperty(V1, "color", "#D3435C"); ``` #### Светодиод на рабочем столе Вы можете добавить виджет светодиод на рабочий стол Android. В этом случае светодиод работает через протокол HTTPS. Имейте в виду, что в режиме «Рабочий стол» виджет светодиода имеет некоторые ограничения. Светодиод будет обновлять свое состояние только один раз в 15 минут. Вы можете изменить этот интервал через настройки виджета. Однако интервал обновления менее 15 минут не гарантируется. **Примечание:** Добавление виджета на рабочий стол стоит 100 энергии. Эта энергия не возвращается при удалении виджета. **Примечание:** Виджеты рабочего стола для локальных серверов Blynk требуют открыть порт 8080. **Пример кода:** [Диод](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/LED/LED_Blink/LED_Blink.ino) ### Указатель (Gauge) Отличный визуальный способ отображения входящих числовых значений. Может работать в 2 режимах: - режим PUSH (выберается в списке выбора частоты считывания); - режим частоты считываний; В режиме PUSH вы обновляете значения указателя со стороны оборудования с помощью кода: ```cpp Blynk.virtualWrite(V1, val); ``` В этом режиме каждое сообщение, которое отправляет аппаратное устройство автоматически сохраняется на сервере. Режим PUSH не требует, чтобы приложение было онлайн или открыто. В режиме частоты считывния вам необходимо выбрать интервал обновления данных, и приложение будет запускать события считывния с требуемым периодичностью. Ваше приложение должно быть открыто и запущено для отправки запросов на оборудование. Вам не нужен код для аналоговых и цифровых выводов в даном случае. Однако для виртуальных выводов вам необходимо использовать следующий код: ```cpp //вызывать из приложения BLYNK_READ(V1) { //отправить в приложение Blynk.virtualWrite(V1, val); } ``` #### Параметры форматирования Указатель также имеет поле «Label» (Метка), которое позволяет использовать форматирование. Предположим, ваш датчик отправляет число 12.6789 в приложение Blynk. Поддерживаются следующие параметры форматирования: ```/pin/``` - отображает значение без форматирования (12.6789) ```/pin./``` - отображает значение без десятичной части (13) ```/pin.#/``` - отображает значение с одним десятичным знаком (12.7) ```/pin.##/``` - отображает значение с двумя десятичными знаками (12.68) #### Другие опции Вы также можете изменить метку прибора с помощью: ```cpp Blynk.setProperty(V1, "label", "Мое значение метки"); ``` или изменить цвет (кодировка RGB): ```cpp //#D3435C - Красный цвет Blynk.setProperty(V1, "color", "#D3435C"); ``` **Пример кода:** [Базовый пример](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/BlynkBlink/BlynkBlink.ino) ### ЖК дисплей (LCD) Это обычный ЖК-дисплей 16x2, "сделанный" на нашем секретном предприятии в Китае. Виджет может работать в двух режимах: - Простой (Simple) - Расширенный (Advanced) #### Простой режим (Simple) В простом режиме ваш ЖК-виджет работает как обычный виджет с частотой чтения. В режиме частоты считывания вам нужно выбрать интервал обновления данных, и приложение будет запускать события с требуемым интервалом. Ваше приложение должно быть открыто и запущено для отправки запросов на оборудование. В данном случае вам не нужен код для аналоговых и цифровых пин-ов. Однако для виртуальных пин-ов вам необходимо использовать следующий код: ```cpp //вызываем из приложения BLYNK_READ(V1) { //отправляем в приложение Blynk.virtualWrite(V1, val); } ``` В простом режиме ЖК-дисплей также поддерживает параметры форматирования. #### Параметры форматирования Предположим, ваш датчик отправляет число 12.6789 в приложение Blynk. Поддерживаются следующие параметры форматирования: ```/pin/``` - отображает значение без форматирования (12.6789) ```/pin./``` - отображает значение без десятичной части (13) ```/pin.#/``` - отображает значение с одним десятичным знаком (12.7) ```/pin.##/``` - отображает значение с двумя десятичными знаками (12.68) **Пример кода:** [ЖК дисплей простой режим - PUSH](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/LCD/LCD_SimpleModePushing/LCD_SimpleModePushing.ino) **Пример кода:** [ЖК дисплей простой режим - 1 сек](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/LCD/LCD_SimpleModeReading/LCD_SimpleModeReading.ino) #### Расширенный режим (Advanced) Расширенный режим предназначен для опытных пользователей. Позволяет использовать специальные команды для управления ЖК-дисплеем. #### Команды Инициируем переменную ЖК-дисплея: ```cpp WidgetLCD lcd(V1); ``` Отправим сообщение: ```cpp lcd.print(x, y, "Ваше сообщение"); ``` Где ```x``` - позиция символа (0-15), ``` y``` - номер строки (0 или 1), Очистка ЖК-дисплея: ```cpp lcd.clear(); ``` **Пример кода:** [ЖК-дисплей расширенный режим](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/LCD/LCD_AdvancedMode/LCD_AdvancedMode.ino) ### Диаграмма (SuperChart) Диаграмма используется для живой визуализации и хранения данных. Вы можете использовать виджет для логирования данных датчиков, бинарных событий и многого другого. Чтобы использовать виджет Диаграмма, вам нужно будет передать данные с оборудования с желаемым интервалом, используя таймеры. [Здесь приведен](https://examples.blynk.cc/?board=ESP8266&shield=ESP8266%20WiFi&example=GettingStarted%2FPushData) базовый пример передачи данных. #### Взаимодействие: - **Переключение между режимами текущий и временной** Нажмите диапазоны времени в нижней части виджета, чтобы изменить масштаб Диаграммы по времени. - **Тап по легенде графиков** показать или скрыть поток данных. - **Долгий тап на графике** покажет метку времени и соответствующие значения. - **Быстро проведите пальцем влево или вправо, чтобы увидеть предыдущие данные** впоследствии вы можете прокручивать данные назад и вперед в пределах заданного временного диапазона. - **Полноэкранный режим** нажмите эту кнопку, чтобы открыть полноэкранный режим в альбомной ориентации. Чтобы выйти из режима полного экрана, просто поверните телефон обратно в портретный режим. График должен вращаться автоматически. В полноэкранном режиме вы увидите X (время) и несколько шкал Y. Полноэкранный режим можно отключить в настройках виджета. - **Кнопка меню** Кнопка меню откроет дополнительные функции: - Экспорт в CSV - Стереть данные на сервере #### Настройки диаграммы: - **Заголовок диаграммы (Chart Title)** общее наименование диаграммы. - **Размер шрифта заголовка (Title Font Size)** выберите из 3 размеров шрифта. - **Выравнивание заголовка (Title Alignment)** выберите выравнивание заголовка диаграммы. Этот параметр влияет на положение заголовка и легенды в виджете. - **Показать ось X (время) (Show x-axis (time))** выберите настройку, если хотите показать шкалу времени внизу графика. - **Автоматическое масштабирование для всех потоков данных (Override Auto Scaling for All Datastreams)** отключение этой опции позволит выполнить ручную настройку для оси Y (см. ниже). - **Выбор масштаба времени (Time ranges picker)** Позволяет выбрать необходимые периоды (`15m`,` 30m`, `1h`,` 3h`, ...) и разрешение для вашего графика. Разрешение определяет, насколько подробные ваши данные. Прямо сейчас график поддерживает два типа разрешения: `standard` и `high`. Разрешение также зависит от выбранного периода. Например, `standard` разрешение для `1d` означает, что вы будете получать 24 значения в день (одно в час), а при `high` разрешении вы будете получать за` 1d` 1440 значений в день (одно в минуту). - **Потоки данных (Datastreams)** добавить потоки данных (см. ниже, как настроить потоки данных). #### Настройки потоков данных Виджет поддерживает до 4 потоков данных. Нажмите значок настроек потоков данных, чтобы открыть настройки. **Дизайн (Design)** выберите доступные типы диаграмм: - Линейная (Line) - С областями (Area) - Гистограмма (Bar) - Бинарная (Binary) (приведение данных к двоичному виду) **Цвет (Color)** выберите сплошные цвета или градиенты. **Источник и ввод (Source and input)** - Вы можете использовать три типа источника данных: **1. Виртуальный пин (Virtual Pin)** - выберите желаемое устройство и виртуальный пин для получения данных. **2. Теги (Tags)** - диаграмма может агрегировать данные с нескольких устройств, используя встроенные функции агрегирования. Например, если у вас есть 10 датчиков температуры, посылающих температуру с заданным интервалом, Вы можете отобразить среднее значение от 10 датчиков в виджете. Использование тегов: - **[Добавить Тэг](http://docs.blynk.cc/#blynk-main-operations-control-of-multiple-devices-tags)** на каждое устройство, с которого вы хотите агрегировать данные. Это можно сделать в настройках проекта Blynk. - **Отправить данные в виртуальный пин (Push data to the same Virtual Pin)** на каждое устройство. (т.е. ```Blynk.virtualWrite (V0, temperature);```) - **Выберите тег в качестве источника (Choose Tag as a source)** в виджете Диаграмма и используйте пин, куда поступают данные (т.е. V0) **Добступные функции:** - `SUM` будет суммировать все входящие значения в указанный виртуальный пин со всех устройств, помеченные выбранным тегом - `AVG` будет вычислять среднее значение - `MED` найдет среднее значение - `MIN` будет вычислять минимальное значение - `MAX` будет вычислять максимальное значение **ВАЖНО: Теги не работают в режиме реального времени.** **3. [Выбор устройства (Device Selector)](https://github.com/blynkkk/blynkkk.github.io/tree/master/mobile/ru/ device_selector.md)** Если вы добавите виджет Выбор устройства в свой проект, вы можете использовать его в качестве источника данных для Диаграммы. В том случае, когда вы меняете устройство, диаграмма будет автоматически обновляться. #### Настройки оси Y (Y-Axis Settings) Cуществует 4 режима масштабирования данных вдоль оси Y, активируется после отключения общей настройки виджета "Автоматическое масштабирование для всех потоков данных (Override Auto Scaling for All Datastreams)". **1. Авто (Auto)** Данные будут автоматически масштабироваться на основе минимальных и максимальных значений заданного периода времени. Это лучший вариант для начинающих. **2. Минимальный/Максимальный (Min/Max)** Когда выбран этот режим, шкала Y будет установлена на выбранные вами границы значений. Например, если ваше оборудование отправляет данные со значениями от -100 до 100, вы можете установить эти границы и данные графика будут отображены полностью. Вы также можете визуализировать данные в другом диапазоне. Допустим, входящие данные имеют значения в диапазоне 0-55, но вы хотели бы видеть только значения в диапазоне 30-50. Вы можете настроить диапазон, но если значения не соответствуют заданному масштабу оси Y, диаграмма будет обрезана. **3. Процент от высоты (% of Height)** Эта опция позволяет автоматически масштабировать входящие данные на виджете и размещать их так, как вы хотите. В этом режиме вы устанавливаете процент высоты виджета на экране от 0% до 100%. Если вы установите диапазон 0-100%, это будет полная автоматическая шкала. Независимо от того, в каком диапазоне поступают данные, он всегда будет масштабирован по всей высоте виджета. Если вы установите его на 0-25%, то график будет отображаться только на 1/4 высоты виджета. Этот параметр очень полезен для **Бинарной диаграммы** или для визуализации нескольких потоков данных на одной и той же диаграмме разными способами. **4. Дельта (Delta)** Пока данные остаются в пределах заданного значения дельты, график будет автоматически масштабироваться в этом диапазоне. Если дельта превышает диапазон, график автоматически масштабируется до минимальных/максимальных значений указанного периода. **Суффикс (Suffix)** Здесь вы можете указать суффикс, который будет отображаться со значениями во время длительного тап на графике. **Разрядность (Decimals)** Определяет формат числовых значений, когда вы нажимаете и удерживаете палец на графике. Возможные варианты: #, #.#, #.##, и т.д. **Соединиить отсуствующие точки графика (Connect Missing Data Points)** Если этот переключатель включен, то Диаграмма соединит все точки, даже если данные частично отсуствуют. Если для него установлено значение «ВЫКЛ», то вы увидите пропуски в случае отсутствия данных. **Настройки Бинарной диаграммы (Binary Chart Settings)** Этот тип диаграммы полезен для построения двоичных данных, например, когда устройство было включено или выключено, или когда было обнаружено движение или когда был достигнут определенный порог значений. Вам необходимо указать точку **Перехода (FLIP)**, которая будет точкой, в которой входящие данные будут принимать состояние `ИСТИНА (TRUE)` или `ЛОЖЬ (FALSE)`. Например, вы отправляете данные в диапазоне от 0 до 1023. Если вы установите `512` в качестве точки **Перехода (FLIP)**, то все, что выше `512` (исключая 512), будет записано как `ИСТИНА (TRUE)`, любое значение ниже `512` (включая 512) будет `ЛОЖЬ (FALSE)`. Другой пример: если вы отправляете `0 и 1` и устанавливаете `0` в качестве точки **Перехода FLIP**, то `1` будет `ИСТИНА`, а `0` будет `ЛОЖЬ`. **Маркеры состояния (State Labels):** Здесь вы можете указать, как `ИСТИНА/ЛОЖЬ` должны отображаться на графике когда вы нажимаете и удерживаете палец. Например, вы можете установить значение `ИСТИНА` как `Оборудование ВКЛ`, `ЛОЖЬ` как `Оборудование ВЫКЛ`. ### Терминал (Terminal) Отображает данные с вашего оборудования. Позволяет отправить любую строку с вашего оборудования. Терминал всегда хранит последние 25 сообщений, которые ваше оборудование отправило в Blynk. Этот ограничение может быть увеличено в настройках локального сервера с помощью параметра ```terminal.strings.pool.size```. С этим виджетом Вы можете использовать специальные команды: ```cpp // Печатает значения, как Serial.print terminal.print(); // Печатает значения, как Serial.println() terminal.println(); // Записать необработанные данные в буффер terminal.write(); // Убедится, что все данные были отправлены с устройства в терминал terminal.flush(); // Стереть все данные в терминале terminal.clear(); ``` **Пример кода:** [Терминал](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Terminal/Terminal.ino) ### Видео трансляция (Video Streaming) Простой виджет, который позволяет отображать прямой эфир и потокове видео. Виджет поддерживает протоколы RTSP (RP, SDP), HTTP/S прогрессивной потоковой передачи, HTTP/S прямого эфира. Для получения дополнительной информации, пожалуйста ознакомтесь с [официальной документацией Android](https://developer.android.com/guide/appendix/media-formats.html). На данный момент команда Blynk не предоставляет потоковые серверы. Таким образом, вы можете осуществлять потоковую передачу непосредственно с ваше камеры или использовать сторонние сервисы, а также запустить собственны потоковый сервер (например, на оборудовании Raspberry). Вы можете остановить/запустить видео поток, нажав на сам виджет. Вы можете изменить URL-адрес видео потока с аппаратного устройства при помощи кода: ```cpp Blynk.setProperty(V1, "url", "http://my_new_video_url"); ``` ### Индикатор уровня (Level Display) Отображает входящие данные с ваших датчиков или виртуальных пин-ов. Отображение уровня очень похоже на индикатор выполнения процесса, это очень красивый и причудливый вид для индикации «выполненных» событий, например «уровня заряда батареи». Вы можете обновить отображение значения с аппаратной стороны с помощью кода: ```cpp Blynk.virtualWrite(V1, val); ``` Каждое сообщение, которое аппаратное устройство отправляет на сервер, автоматически сохраняется на сервере. Режим PUSH не требует, чтобы приложение было онлайн или запущено. **Пример кода:** [Пример PUSH](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/PushData/PushData.ino) ## Уведомления (Notifications) ### Твиттер (Twitter) Виджет Твиттер соединяет вашу учетную запись сети Twitter с Blynk и позволяет отправлять "твиты" с вашего оборудования. Пример кода: ```cpp Blynk.tweet("Привет, Blynk-еры! Мой Arduino может слать твиты!"); ``` Ограничения : - нельзя отправлять 2 твита с одним и тем же сообщением (это политика Твиттера) - разрешен только 1 твит за 5 секунд ### Кодировка в Твиттере Библиотека обрабатывает все строки в кодировке UTF-8. Если вы столкнулись с проблемами, попробуйте напечатать ваше сообщение на последовательный порт и проверить, работает ли оно (COM терминал должен быть настроен на кодировку UTF-8). Если не работает, вам следует проверить поддержку UTF-8 вашего компилятора. Если работает, но ваше сообщение обрезано - вам нужно увеличить длины сообщения (все символы UTF-8 потребляют как минимум вдвое больше байт информации). ### Увеличение лимита длины сообщения Вы можете увеличить максимальную длину сообщения, поместив (до включения Blynk) в верхнюю часть своего кода строку: ```cpp #define BLYNK_MAX_SENDBYTES 256 // По умолчанию 128 байт ``` **Пример кода:** [Твиттер](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Twitter/Twitter.ino) ### Электронная почта (Email) Виджет электронной почты позволяет отправлять электронные письма с вашего оборудования на любой адрес. Пример кода: ```cpp Blynk.email("my_email@example.com", "Тема", "Текст вашего сообщения"); ``` Код содержит первое поле ```to```. С помощью этого поля вы можете определить получателей электронной почты в приложении. Вы можете пропустить поле ```to```, если хотите отправить электронное письмо на адрес электронной почты используемый для входа в приложение Blynk: ```cpp Blynk.email("Тема", "Текст вашего сообщения"); ``` Вы можете отправить электронное писбом в форматах либо ```text/html```, либо ```text/plain``` (помните что некоторые клиенты не поддерживают ```text/html```). Вы можете изменить формат содержимого электронного письма в настройках виджета. Дополнительно в письме вы можете использовать заполнители/переменные ```{DEVICE_NAME}```, ```{DEVICE_OWNER_EMAIL}``` и ```{VENDOR_EMAIL}``` (для локального сервера) в полях ```to``` (кому),``` subject``` (тема) и ```body``` (текст сообщения): ```cpp Blynk.email("{DEVICE_OWNER_EMAIL}", "{DEVICE_NAME} : Тревога", "Ваше устройство {DEVICE_NAME} имеет критическую ошибку!"); ``` **Недостатки:** - Максимально допустимые ограничения (почта + тема + длина сообщения) = 120 символов. Однако вы можете увеличить этот лимит при необходимости добавив ```#define BLYNK_MAX_SENDBYTES XXX``` к вашему коду. Где ```XXX``` - это максимальная длина вашего письма в символах. Например, для ESP вы можете установить максимальную длину 1200 символов ```#define BLYNK_MAX_SENDBYTES 1200```. Параметр ```#define BLYNK_MAX_SENDBYTES 1200``` должен быть опредлен в коде до включения Blynk. - Разрешено отправлять 1 электронное письмо в течение 5 секунд; - Если вы используете Gmail сервис (Google), вы ограничены 500 письмами в день. Другие провайдеры могут иметь аналогичные ограничения, поэтому, пожалуйста, будьте внимательны; - Пользователи Blynk сервера ограничены 100 сообщениями в день; ### Кодировка в электронной почте Библиотека обрабатывает все строки в кодировке UTF-8. Если у вас возникли проблемы, попробуйте напечатать ваше сообщение в терминал COM порта и посмотрите на результат (терминал должен быть настроен на кодировку UTF-8). Если не работает, возможно, вам следует также прочитать о поддержке кодировок вашего компилятора. Если работает, но ваше сообщение обрезано - вам нужно увеличить ограничение длины сообщения (т.к. все символы кодировки UTF-8 потребляют как минимум вдвое больше байт информации если символы не Латинские). ### Увеличение лимита длины сообщения Вы можете увеличить максимальную длину сообщения, поместив в верхнюю часть своего кода строку (до опредления Blynk): ```cpp #define BLYNK_MAX_SENDBYTES 256 // По умолчанию 128 байт ``` **Пример кода:** [Электронная почта](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Email/Email.ino) ### Всплывающие уведомления (Push Notifications) Виджет Push-уведомлений позволяет отправлять уведомления с вашего оборудования на ваше Android/iOS устройство. В настоящее время он также содержит три дополнительные опции: - **Уведомлять, когда оборудование отключено** (Notify when hardware offline) - вы получите push-уведомление, если ваше оборудование отключилось. - **Автономный период игнорирования** (Offline Ignore Period) - определяет, как долго оборудование может находиться в режиме ожидания (после того, как оно отключилось) перед отправкой уведомления. В случае превышения периода ожидания будет отправлено уведомление «Аппаратное отключение». Вы не получите уведомление, если оборудование переподключится в течение указанного периода. - **Приоритет** (Priority) - высокий (high) приоритет дает больше шансов, что ваше сообщение будет доставлено без задержек. См. более подробное объяснение [здесь](https://developers.google.com/cloud-messaging/concept-options#setting-the-priority-of-a-message). **ПРЕДУПРЕЖДЕНИЕ**: высокий приоритет способствует большей разрядке батареи, по сравнению с обычными приоритетом уведомлений. Пример кода: ```cpp Blynk.notify("Привет, Blynk-еры! Мое оборудование может отправлять уведомления!"); ``` Вы также можете использовать переменные/заполнители для имени устройства, который будет заменен с сервера именем вашего устройства: ```cpp Blynk.notify("Привет, Blynk-еры! Мой {DEVICE_NAME} может отправлять уведомления!"); ``` Ограничения: - Максимально допустимая длина уведомления составляет 120 символов; - Каждое устройство может отправлять только 1 уведомление каждые 5 секунд; ### Кодировка всплывающих уведомлений Библиотека обрабатывает все строки как в кодировке UTF-8. Если вы столкнулись с проблемами, попробуйте отправить ваше сообщение на последовательный порт и посмотреть, работает ли оно (терминал должен быть настроен на кодировку UTF-8). Если так не работает, возможно, вам следует прочитать о поддержке кодировки UTF-8 вашего компилятора. Если работает, но ваше сообщение урезано - вам необходимо увеличить ограничение длины сообщения (все символы UTF-8 потребляют как минимум вдвое больше байт информации). ### Увеличение лимита длины уведомления Вы можете увеличить максимальную длину сообщения, поместив строку (до включения Blynk) в верхнюю часть своего кода: ```cpp #define BLYNK_MAX_SENDBYTES 256 // По умолчанию 128 байт ``` **Пример кода:** [Всплывающие уведомления](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/PushNotification/PushNotification_Button/PushNotification_Button.ino) ## Интерфейсы ### Вкладки (Tabs) Единственная цель виджета Вкладки - расширить пространство вашего проекта. Чтобы редактировать виджет Вкладок - просто нажмите на выбранную вкладку. Вы можете перетаскивать виджеты между вкладками. Из списка можно удалить только последнюю вкладку: чтобы удалить ее, проведите пальцем влево по ее названию в экране настроек виджета. Максимальное количество вкладок на iOS составляет 4. Максимальное количество вкладок на Android - 10. Оставайтесь с нами для предстоящего редизайна виджета вкладок! ### Меню (Menu) Виджет Меню позволяет отправлять команды на ваше оборудование на основе выборного списка, сделанного вами в пользовательском интерфейсе. Меню отправляет индекс выбранного элемента спика, а не саму строку. Отправляемый индекс начинается с 1. Он работает так же, как типовой элемент "Комбинированный список" ([ComboBox](https://ru.wikipedia.org/wiki/%D0%9A%D0%BE%D0%BC%D0%B1%D0%B8%D0%BD%D0%B8%D1%80%D0%BE%D0%B2%D0%B0%D0%BD%D0%BD%D1%8B%D0%B9_%D1%81%D0%BF%D0%B8%D1%81%D0%BE%D0%BA)). Пример кода: ```cpp BLYNK_WRITE { switch (param.asInt()) { case 1: { // Пункт 1 Serial.println("Выбран Пункт 1"); break; } case 2: { // Пункт 2 Serial.println("Выбран Пункт 2"); break; } } } ``` Вы также можете назначить пункты меню со стороны оборудования с помощью кода: ```cpp Blynk.setProperty(V1, "labels", "label 1", "label 2", "label 3"); ``` **Пример кода:** [Меню](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Menu/Menu.ino) ## Ввод времени (Time Input) Виджет Ввода времени позволяет вам выбрать время начала/окончания, день недели, часовой пояс, значения в формате до полудня/после полудня и отправить их на ваше оборудование. В настоящее время поддерживаются следующие форматы: ```ЧЧ:ММ``` и ```ЧЧ:ММ AM/PM```. Аппаратное устройстов будет отсчитывать время пользовательского интерфейса в виде секунд дня (```3600 * часов + 60 * минут```) для запуска/остановки времения. Время, которое виджет отправляет оборудованию, является локальным временем пользователя. Индексы по выбранных дней: ``` Понедельник - 1 Вторник - 2 ... Суббота - 6 Воскресенье - 7 ``` Вы также можете изменить состояние виджета в интерфейсе пользователя. Смотрите ниже примеры кода. **Пример кода:** [Простой Ввод времени для времени начала](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/TimeInput/SimpleTimeInput/SimpleTimeInput.ino) **Пример кода:** [Расширенный Ввод времени](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/TimeInput/AdvancedTimeInput/AdvancedTimeInput.ino) **Пример кода:** [Обновление Ввода времени в пользовательском интерфейсе](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/TimeInput/UpdateTimeInputState/UpdateTimeInputState.ino) ### Карта (Map) Виджет Карты позволяет устанавливать точки/флажки на карте со стороны оборудования. Это очень полезный виджет, если у вас есть несколько устройств, и вы хотите отслеживать их позиции на карте. Вы можете отправить точку на карту с помощью обычной команды виртуальной записи: ```cpp Blynk.virtualWrite(V1, pointIndex, lat, lon, "Название"); ``` Мы также создали оболочку, чтобы вы могли упростить использование виджета Карты. Вы можете изменить метки флажков на оборудовании с помощью кода: ```cpp WidgetMap myMap(V1); ... int index = 1; float lat = 51.5074; float lon = 0.1278; myMap.location(index, lat, lon, "Название"); ``` Использование уникальных ```index``` позволяет вам переопределить существующее значение точки. **Пример кода:** [Базовый пример Карты](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Map/Map.ino) ### Таблица (Table) Табличный виджет удобен, когда вам нужно структурировать аналогичные данные в пределах одного графического элемента. Работает как обычная таблица. Вы можете добавить строку в таблицу с помощью кода: ``` Blynk.virtualWrite(V1, "add", id, "Имя", "Значение"); ``` Вы можете обновить строку в таблице с помощью кода: ``` Blynk.virtualWrite(V1, "update", id, "Новое имя", "Новое значение"); ``` Чтобы выделить любой элемент в таблице, используйте его идентификатор: ``` Blynk.virtualWrite(V1, "pick", 0); ``` Чтобы выбрать/отменить выбор (сделать значок зеленым/серым) элемент в таблице, используйте его идентификатор: ``` Blynk.virtualWrite(V1, "select", 0); Blynk.virtualWrite(V1, "deselect", 0); ``` Чтобы очистить таблицу используйте код: ``` Blynk.virtualWrite(V1, "clr"); ``` Вы также можете обрабатывать другие действия из таблицы. Например, использовать строку таблицы в качестве кнопки переключения. ``` BLYNK_WRITE(V1) { String cmd = param[0].asStr(); if (cmd == "select") { // строка в таблице была выбрана. int rowId = param[1].asInt(); } if (cmd == "deselect") { // строка в таблице была отменена. int rowId = param[1].asInt(); } if (cmd == "order") { // когда строки в таблице переупорядочиваются int oldRowIndex = param[1].asInt(); int newRowIndex = param[2].asInt(); } } ``` **Примечание:** Максимальное количество строк в таблице равно 100. Когда вы достигнете предела, таблица будет работать как список FIFO (Первый пришел - первый ушел). Это ограничение можно изменить, настроив свойство ```table.rows.pool.size``` в параметрах локального сервера. **Пример кода:** [Простое использование таблицы](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Table/Table_Simple/Table_Simple.ino) **Пример кода:** [Расширенное использование таблицы](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Table/Table_Advanced/Table_Advanced.ino) ### Селектор устройств (Device Selector) Селектор устройств - это мощный виджет, который позволяет обновлять виджеты на основе одного активного устройства. Этот виджет особенно полезен, когда у вас есть несколько устройств с аналогичной функциональностью. Представьте, что у вас есть 4 устройства, и к каждому устройству подключен датчик температуры и влажности. Для отображения данных по всем 4 устройствам вам необходимо добавить 8 виджетов. С помощью Селектора устройств вы можете использовать только 2 виджета, которые будут отображать температуру и влажность в зависимости от активного устройства, выбранного в Селекторе. Все, что вам нужно сделать, это: 1. Добавить виджет Селектора устройств в проект 2. Добавить 2 виджета (например виджет отображения значений (Value Display Widget)), чтобы отобразить температуру и влажность 3. В настройках виджетов вы сможете назначить их на Селектор устройств (в разделе источника или цели) 4. Выйти из настроек, запустить проект Теперь вы можете изменить активное устройство в Селекторе устройств и увидите, что значения температуры и влажности отражают обновленные данные для только что выбранного вами устройства. **ПРИМЕЧАНИЕ:** Виджет вебхук ([Webhook](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/WebHook/WebHook_GET/WebHook_GET.ino)) пока не работает с Селектором устройств. ### Плитка устройств (Device Tiles) Плитка устройств - это мощный виджет, очень похожий на виджет Селектора устройств (Device Selector), но с пользовательским интерфейсом. Позволяет отображать один пин с устройства на одну плитку. Этот виджет особенно полезен, когда у вас есть несколько устройств с аналогичной функциональностью. Теперь вы можете группировать похожие устройства на одном макете (шаблоне). ## Сенсоры ### Акселерометр (Accelerometer) Акселерометр один из [сенсоров движения](https://developer.android.com/guide/topics/sensors/sensors_motion.html), который позволяет определить движение Вашего телефона в пространстве. Он может пригодится для отслеживания таких событий как тряска, удар, поворот или наклон телефона. Концептуально, акселерометр определяет силу ускорения приложенную к вашему телефону. Единица измерения - м/c^2 приложенная к каждой из осей ```x```, ```y```, ```z```. Чтобы получить данные с сенсора нужно использовать следующий код : ```cpp BLYNK_WRITE(V1) { //сила ускорения, приложенная к оси x int x = param[0].asFloat(); //сила ускорения, приложенная к оси y int y = param[1].asFloat(); //сила ускорения, приложенная к оси z int z = param[2].asFloat(); } ``` Акселерометр не работает при свернутом приложении. ### Барометр/Давление (Barometer/pressure) Барометр один из сенсоров [окружающей среды](https://developer.android.com/guide/topics/sensors/sensors_environment.html) и позволяет измерять атмосферное давление. Измеряется в ```hPa``` (гПа) или ```mbar``` (мБар). Чтобы получить данные с сенсора нужно использовать следующий код : ```cpp BLYNK_WRITE(V1) { //Давление в мБар int pressure = param[0].asInt(); } ``` Барометр не работает при свернутом приложении. ### Гравитация (Gravity) Гравитация - это своего рода [датчики движения](https://developer.android.com/guide/topics/sensors/sensors_motion.html), который позволяет обнаруживать движение вашего смартфона. Полезно для мониторинга движения устройства, таких как наклон, встряхивание, вращение или качание. Датчик силы притяжения выдает трехмерный вектор, указывающий направление и величину силы притяжения. Измеряется в ```m/s^2``` силы притяжения, приложенной к оси ```x```, ```y```, ```z```. Для того, чтобы принять данные от него, вам необходимо: ```cpp BLYNK_WRITE(V1) { //сила притяжения, приложенная к оси x int x = param[0].asFloat(); //сила притяжения, приложенная к оси y int y = param[1].asFloat(); //сила притяжения, приложенная к оси y int z = param[2].asFloat(); } ``` **ВНИМАНИЕ:** Виджет гравитации не работает в фоновом режиме. ### Влажность (Humidity) Влажность является своего рода [датчиком среды](https://developer.android.com/guide/topics/sensors/sensors_environment.html), который позволяет измерять относительную влажность окружающей среды. Измеряется в ```%``` - фактически это относительная влажность в процентах. Для того, чтобы принять данные от датчика, вам необходимо: ```cpp BLYNK_WRITE(V1) { //Влажность в % int humidity = param.asInt(); } ``` **ВНИМАНИЕ:** Влажность не работает в фоновом режиме. ### Свет (Light) Свет - это своего рода [датчики окружающей среды](https://developer.android.com/guide/topics/sensors/sensors_environment.html), который позволяет измерять уровень освещенности (уровень внешней освещенности измеряется в люксах). В телефонах чаще всего используется для управления яркостью экрана. Для того, чтобы принять данные этого виджета, вам необходимо: ```cpp BLYNK_WRITE(V1) { //уровень освещенности int lx = param.asInt(); } ``` Виджет Свет не работает в фоновом режиме. ### Близость (Proximity) Близость - это своего рода [датчики положения](https://developer.android.com/guide/topics/sensors/sensors_position.html) это позволяет определить, насколько близко смартфон к лицу. Измеряется в ```cm``` (см) - расстояние от телефона до лица. Однако большинство этих датчиков возвращает только информацию FAR / NEAR. Поэтому, возвращаемое значение будет ```0 / 1```. Где 0 / LOW = ```FAR``` (далеко), а 1 / HIGH = ``` NEAR``` (рядом). Для того, чтобы принять данные из виджета, вам необходимо: ```cpp BLYNK_WRITE(V1) { // расстояние до объекта int proximity = param.asInt(); if (proximity) { // РЯДОМ } else { // ДАЛЕКО } } ``` Виджет близость не работает в фоновом режиме. ### Температура (Temperature) Температура является своего рода [датчиком окружающей среды](https://developer.android.com/guide/topics/sensors/sensors_environment.html) который позволяет измерять температуру окружающего воздуха. Измеряется в ```°C``` - градусах Цельсия. Для приема данных из виджета, необходимо использовать код: ```cpp BLYNK_WRITE(V1) { // температура в градусах цельсия int celcius = param.asInt(); } ``` Виджет Температуры не работает в фоновом режиме. ### Триггер GPS (GPS Trigger) Виджет Триггер GPS позволяет легко инициировать события, когда вы входите или выходите из географической зоны. Этот виджет будет работать в фоновом режиме и периодически будет проверять ваши координаты. Если ваше местоположение находится в пределах или вне указанной зоны (географическая зона выбирается на карте виджета), виджет отправит команду ```HIGH```/``` LOW``` на аппаратное устройство. Например, Триггер GPS назначен для пина ```V1```, и включена опция ```Trigger When Enter```. В этом случае, когда вы окажитесь в указанной географической зоне виджет вызовет событие ```HIGH```. ```cpp BLYNK_WRITE(V1) { int state = param.asInt(); if (state) { //Вы вошли в зону } else { //Вы вышли из зоны } } ``` Подробнее о том, как работает GPS-виджет, вы можете прочитать [здесь](https://developer.android.com/guide/topics/location/strategies.html). **ВНИМАНИЕ:** Виджет Триггер GPS работает в фоновом режиме. ### Поток GPS (GPS Streaming) Полезно для мониторинга местонахождения смартфона получать данные о широте, долготе, высоте и скорости (скорость часто может быть 0, если смартфон не поддерживает ее измерение). Чтобы принимать данные из этого виджета, вам необходимо: ```cpp BLYNK_WRITE(V1) { float latitude = param[0].asFloat(); float longitude = param[1].asFloat(); float altitude = param[2].asFloat(); float speed = param[3].asFloat(); } ``` или вы можете использовать подготовленную оболочку ```GpsParam``` : ```cpp BLYNK_WRITE(V1) { GpsParam gps(param); //Печать лат/лон с 6 десятичными знаками Serial.println(gps.getLat(), 7); Serial.println(gps.getLon(), 7); Serial.println(gps.getAltitude(), 2); Serial.println(gps.getSpeed(), 2); } ``` Поток GPS работает в фоновом режиме. **Пример кода:** [Поток GPS](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/GPS_Stream/GPS_Stream.ino) ## Другие ### Мост (Bridge) Мост может быть использован для связи между устройствами (без участия приложения). Вы можете отправлять цифровые / аналоговые / виртуальные команды записи с одного устройства на другое, зная только токен авторизации. На данный момент виджет Мост не обязательно использовать в приложении (здесь он используется для указания того, что у нас есть такая функция). **Вы можете использовать несколько мостов для управления несколькими устройствами.** Виджет Мост использует виртуальный пин и превращает его в канал для управления другим устройством. Это означает, что вы можете контролировать любые виртуальные, цифровые или аналоговые пины целевого устройства. Будьте осторожны, не используйте пины типа ```A0, A1, A2 ...``` при обмене данными между различными типами устройств, так как в таких случаях Arduino Core может ссылаться на неверные пины. Пример кода для устройства A, которое будет отправлять значения на устройство B: ```cpp //Инициирует виджет Моста на V1 устройства A WidgetBridge bridge1(V1); ... void setup() { Blynk.begin(...); while (Blynk.connect() == false) { // Ждем пока Blynk подключится } bridge1.digitalWrite(9, HIGH); // выставим триггер HIGH на D9 // устройства B. Код на устройстве // B не требуется bridge1.analogWrite(10, 123); bridge1.virtualWrite(V1, "hello"); // вам нужно написать код на // устройстве B, чтобы получить // это значение. См. ниже bridge1.virtualWrite(V2, "value1", "value2", "value3"); } BLYNK_CONNECTED() { bridge1.setAuthToken("OtherAuthToken"); // токен с устройства B } ``` **ВАЖНО:** при выполнении ```virtualWrite()``` с виджета Мост, устройство B должно обрабатывать входящие данные с устройства A. Например, если вы отправляете значение с устройства A на устройство B, используя ```bridge.virtualWrite (V5)```, вам необходимо использовать свой обработчик на устройстве B: ```cpp BLYNK_WRITE(V5){ int pinData = param.asInt(); // переменная pinData будет хранить значение, // полученное через Bridge } ``` Имейте в виду, что ```bridge.virtualWrite``` не отправляет никаких значений в мобильное приложение. Для этого вам нужно вызвать ```Blynk.virtualWrite```. **Пример кода:** [Мост](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Bridge/Bridge.ino) ### Обработчик событий (Eventor) Виджет Обработчик событий позволяет создавать простые правила поведения или **события**. Давайте рассмотрим типичный вариант использования: считывание температуры с датчика DHT и отправка push-уведомления, когда температура превышает определенный предел: ```cpp float t = dht.readTemperature(); if (isnan(t)) { return; } if (t > 40) { Blynk.notify(String("Температура слишком высокая: ") + t); } ``` С Обработчиком событий вам не нужно писать этот код. Все, что вам нужно, это отправить значение с датчика на сервер Blynk: ```cpp float t = dht.readTemperature(); Blynk.virtualWrite(V0, t); ``` Не забывайте, что команды ```virtualWrite``` должны быть заключены в таймер и не должны использоваться в основном цикле ```loop```. **ПРИМЕЧАНИЕ:** Не забудьте добавить виджет уведомлений в приложении. Обработчик событий пригодится вам, когда нужно изменить условия на лету без повторной загрузки нового скетча на аппаратное обеспечение. Вы можете создать столько **событий**, сколько вам нужно. Обработчик событий также может быть запущен со стороны приложения. Вам просто нужно назначить виджет на тот же контакт, что и ваше событие в Обработчике событий. Обработчик событий не постоянно отправляет события. Давайте рассмотрим простой пример, как показано выше ```if (temperature > 40) send notification```. Когда температура превышает 40 пороговых значений - отправляется уведомление. Если температура продолжает оставаться выше 40 никакие повторные действия не будут инициированы. Но если ```temperature``` опускается ниже порогового значения, а затем проходит его снова уведомление будет отправлено повторно (для уведомлений Обработчика событий нет ограничения отправки в течение 5 секунд). Обработчик событий также поддерживает события таймера (Timer). Например, вы можете установить пин ```V1``` ON/HIGH в 21:00:00 каждую пятницу. В Обработчике событий вы можете назначить несколько таймеров на один и тот же пин, отправить любую строку/число, выбрать день и часовой пояс. Чтобы удалить созданное **событие**, пожалуйста, используйте сдвиг пальцем по экрану. Вы также можете перенести последний элемент самого события. **Пример кода:** [Обработчик событий](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Eventor/Eventor.ino) **ПРИМЕЧАНИЕ:** Виджет таймера зависит от времени сервера, а не вашего телефона. Иногда время телефона может не соответствовать времени сервера. **ПРИМЕЧАНИЕ:** события запускаются только один раз при выполнении условия. Это означитает что [цепочка событий] (https://community.blynk.cc/t/eventor-behavior-bug-feature/20962) невозможна (однако она может быть включена в коммерческой версии). ### Часы реального времени (RTC) Часы реального времени позволяют получать время с сервера. Вы можете предварительно выбрать любой часовой пояс в пользовательском интерфейсе, чтобы получить время на оборудование из нужной локали. **Пример кода:** [Часы реального времени](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/RTC/RTC.ino) ### Bluetooth с низким энергопотреблением Этот виджет позволяет включить блутзуз с низким энергопотреблением на вашем телефоне. На текущий момент виджет также требует наличия интернет соединения (постараемся пофиксить в ближайшем будущем). Некоторые типы виджетов нельзя использовать вместе с блутузом, например исторический граф, так как он требует чтобы данные отправлялись на сервер, чего блутуз виджет не делает. **Список поддерживаемых чипов и контроллеров:** [BLE](https://github.com/blynkkk/blynk-library/tree/master/examples/Boards_Bluetooth) ### Блютуз (Bluetooth) Этот виджет позволяет включить блютуз на вашем телефоне. На текущий момент виджет также требует наличия интернет соединения (постараемся пофиксить в ближайшем будущем) и поддерживается только на Android. Некоторые типы виджетов нельзя использовать вместе с блютузом, например исторический граф, так как он требует чтобы данные отправлялись на сервер, чего блютуз виджет не делает. **Список поддерживаемых чипов и контроллеров:** [BLE](https://github.com/blynkkk/blynk-library/tree/master/examples/Boards_Bluetooth) ### Музыкальный проигрыватель (Music Player) Простой элемент интерфейса с 3 кнопками - имитирует интерфейс музыкального проигрывателя. Каждая кнопка отправляет свою команду на аппаратное устройство: ```play``` (воспроизвести), ```stop``` (стоп), ```prev``` (предыдущий), ```next``` (следующий). Вы можете изменить состояние виджета в приложении с аппаратной стороны с помощью следующих команд: ``` Blynk.virtualWrite(Vx, "play"); Blynk.virtualWrite(Vx, "stop"); ``` Вы также можете изменить состояние воспроизведение/остановка виджета с помощью следующего кода (эквивалент вышеупомянутых команд): ```Blynk.setProperty(V1, "isOnPlay", "false");``` **Пример кода:** [Музыкальный проигрыватель](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Player/Player.ino) ### Вебхук (Webhook) Вебхук очень мощный виджет, который позволяет Вам легко интегрироватся с любыми сторонними сервисами. С его помощью Вы можете слать любые HTTP/S запросы на любой сервер или устройство, которое имеет HTTP/S API (например, лампы Philips Hue). Вебхук вешается на вирутальный пин и любая команда, которая приходит на этот пин будет вызывать срабатывание HTTP/S запроса. Команды на такой виртуальный пин могут приходить как со стороны железа, так и со стороны приложения. То есть, Вы можете слать любой HTTP запрос при нажатии кнопки в приложении, если эта кнопка на том же пине что и вебхук. Вот простой пример, представьте, что Вы хотите слать данные с микроконтроллера не только в Blynk, но и в какой-то другой сервис, например - Google Docs или в thingspeak.com. Раньше Вам для этого пришлось бы писать что-то вроде : ```cpp WiFiClient client; if (client.connect("api.thingspeak.com", 80)) { client.print("POST /update HTTP/1.1\n"); client.print("Host: api.thingspeak.com\n"); client.print("Connection: close\n"); client.print("X-THINGSPEAKAPIKEY: " + apiKeyThingspeak1 + "\n"); client.print("Content-Type: application/x-www-form-urlencoded\n"); client.print("Content-Length: "); client.print(postStr.length()); client.print("\n\n"); client.print(postStr); } ``` С вебхуком этого больше делать не нужно. Достаточно лишь заполнить поля виджета в приложении и выполнить привычное: ```cpp Blynk.virtualWrite(V0, value); ``` Где V0 - пин вебхук виджета. В дополнение, Вы можете подставлять значение пина в URL: ```cpp https://api.thingspeak.com/update?api_key=xxxxxx&field1=/pin/ ``` или тело запроса : ```cpp ["/pin/"] ``` Так же можно отправлять несколько значений внутри одного пина (до 5) : ```/pin[0]/```,```/pin[1]/```, ```/pin[2]/``` Еще одна крутая штука - это возможность делать HTTP GET запросы на сервере и слать их результат на микроконтроллер. Прелесть тут в том, что Вам не нужно для этого писать сложный код на микроконтроллере. Представьте, что Вам нужно получить информацию о погоде от какого-то метио сервиса. Например, по такому запросу : ```http://api.sunrise-sunset.org/json?lat=33.3823&lng=35.1856&date=2016-10-01``` Вы можете вставить этот запрос в вебхук виджет, выбрать пин ```V0``` и написать : ```cpp BLYNK_WRITE(V0){ String webhookdata = param.asStr(); Serial.println(webhookdata); } ``` Теперь, каждый раз когда вы дергаете ```V0``` с помощью ```Blynk.virtualWrite(V0, 1)``` будет вызвана функция ```BLYNK_WRITE(V0)```. **Замечание:** обычно HTTP запросы довольно большие, поэтому Вам, вероятно, нужно будет увеличить лимит на максимальную длину сообщения на микроконтроллере ```#define BLYNK_MAX_READBYTES 1024```. **Замечание:** наше облако так же имеет определенные лимиты для вебхука. Мы разрешаем слать только 1 запрос в секунду. Это поведение можно изменить на локальном сервер через свойство ```webhooks.frequency.user.quota.limit```. Пожалуйста, используйте вебхуки с умом. Многие веб ресурсы не способны обрабатывать даже 1 запрос в секунду. **Замечание :** в случае если Ваш вебхук не выполнился 10 раз подряд - вебхук виджет будет остановлен. Чтобы восстановить его работу - нужно открыть и закрыть виджет в режиме редактирования. Не выполненными считаются запросы у которых код ответа не равен 200 или 302. ### Отчеты (Reports) Функция виджета Отчеты заключается в настройке и разметке отчетов данных в формате CSV. Вы можете выбрать разовые или переодически запланированные отчеты. Кроме того, в отчетах вы можете очистить все пользовательсике данные, собранные с ваших устройств. Вам необходимо настроить начальные параметры в режиме редактирования, а затем уже в режиме воспроизведения вы сможете настроить сами отчеты. #### Режим редактирования. Конфигурация ввода данных В режиме редактирования (когда ваш проект остановлен) вы определяете потоки данных, которые вы хотели бы позже включить в отчет. Виджет Отчеты предназначен для работы с виджетом [Плитка устройств (Device Tiles)](https://github.com/blynkkk/blynkkk.github.io/blob/master/mobile/ru/device_tiles.md). Если вы не используете плитки устройств, вы все равно можете выбрать одно устройство или группу устройств в качестве источника данных для отчетов. Вы должны выбрать либо [Плитку устройств](https://github.com/blynkkk/blynkkk.github.io/blob/master/mobile/ru/device_tiles.md), либо одино устройство, либо группу устройств для отчета. Вы не можете объединить эти оба варианта. #### Режим воспроизведения После добавления исходных устройств и их потоков данных нажмите кнопку «Воспроизвести» и нажмите кнопку «Отчеты». ### Настройка отчетов Каждый параметр отчета предполагает свои собственные настройки: ```Report name``` (Имя отчета) - дайте вашему отчету осмысленное имя. ```Data source``` (Источники данных) - выберите потоки данных, которые вы хотели бы включить в отчеты. ```Report Frequency``` (периодичность отчетов) - Определяет, как часто будут отправляться отчеты. Они могут быть разовыми и запланированными. ```one-time``` (Сейчас) - мгновенно сформирует отчет и отправит его на указанные адреса электронной почты. Нажмите на значок справа, чтобы отправить отчет. Запланированные отчеты могут быть отправлены ```daily```/```weekly```/```monthly``` (ежедневно/еженедельно/ежемесячно). ```At Time``` (Время) установите время дня, когда отчет будет отправлен. ```Start```/```End``` (Качало/Конец) указывает дату начала и окончания оправки отчетов. Для еженедельного отчета вы можете выбрать день недели, когда отчет должен быть отправлен. Для ежемесячного отчета вы можете выбрать, отправку отчета в первый или последний день месяца. ```Recipients``` (Получатели) - укажите до 5 адресов электронной почты.. ```Data resolution``` (Разрешение данных) определяет детализацию ваших отчетов. Поддерживаемые детализации: ```minute``` (ежеминутно), ```hourly``` (ежечасно) и ```daily``` (ежедневно). Например, когда вы генерируете ежедневный отчет с детализацией в 1 минуту, вы получаете ```24 * 60 * 60``` единиц данных в вашем ежедневном отчете за каждый выбранный поток. ```Group data in reports by``` (Группировка данных в отчетах) - укажите выходной формат файла-(ов) CSV: ```Datastream``` (Поток) - вы получите один CSV файл для каждого потока данных. ```Device``` (Устройство) - вы получите один CSV-файл на каждое устройство. Каждый файл будет содержать все включенные потоки данных. ```Report``` (Отчет) - вы получите один CSV-файл для всех ваших устройств и всех ваших потоков данных. ```Timezone correction``` (Времненная зона) - укажите корректировку часового пояса, если вам нужно настроить дату и время отчета на определенный часовой пояс. ```Date and time format``` (Формат даты и времени) - определяет формат поля временной метки ваших данных. Вы можете выбрать ```2018-06-21 20:16:48```, ```2018-06-21T20:16:48+03:00``` или другой поддерживаемый формат. Существует особый формат ```Timestamp``` (Временная метка), которая отражает разницу между текущим временем и полуночью 1 января 1970 года UTC, измеряемую в миллисекундах. После настройки отчета нажмите кнопку «ОК» в правом верхнем углу. Ваш отчет готов. После настройки отчета вы увидите, когда запланирован следущий отчет ```Next```, а также увидите расписание для этого отчета. После отправки отчета хотя бы один раз, вы можете увидеть дату его последней отправки ```Last```. ```Last``` (Последний) метка также содержит статус отправки отчета: - ```OK``` (Успешно): отчет был сгенерирован и успешно отправлен Получателям; - ```No Data``` (Нет данных): отчет не содержит данных за указанный период; - ```Error``` (Ошибка): что-то пошло не так. Пожалуйста, свяжитесь со службой поддержки Blynk. Отчеты будут генерироваться, даже если ваш проект не находится в активном (Play) режиме. Однако помните, неактивные проекты небудут генерировать данные. **ПРИМЕЧАНИЕ:** все отчеты формируются в кодировке UTF-16. Пожалуйста, убедитесь, что при открытии файла отчета вы выбрали кодировку UTF-16 в вашем CSV-редакторе. ================================================ FILE: ru/amendments.md ================================================ # Blynk Amendments ## Tell every maker about Blynk No pressure. Just do it. Now. ## Make your idea work without Blynk Blynk can be easily integrated in almost any project. But before that - make it work **without** it. After you are sure that you can get all the sensor data or can control things from the code – integrate Blynk and make it even more awesome. ## Use search We are always happy to chat and help, but remember - every time you ask the question that was answered many many times before that, Blynk Team is not building a new widget or new cool feature. So: * google before asking * use search on our forum, it works really well * check Instructables **Always wrap your code** Though shalt not post code without `wrapping it` ================================================ FILE: ru/appexport.md ================================================ # App Export ## Firmware for ESP8266, NodeMCU, BlynkBoard, etc. ### Prepare development environment 1. Install [Arduino IDE](https://www.arduino.cc/en/Main/Software) 2. Install [Blynk Library](https://github.com/blynkkk/blynk-library/releases/latest) and restart Arduino IDE 3. Install [ESP8266 core for Arduino](https://github.com/esp8266/Arduino#installing-with-boards-manager) 4. For Windows / OS X, you may need to install USB-Serial drivers according to your converter: * СP2102: [https://www.silabs.com/products/mcu/Pages/USBtoUARTBridgeVCPDrivers.aspx](https://www.silabs.com/products/mcu/Pages/USBtoUARTBridgeVCPDrivers.aspx) * FTDI \(FT232, etc\): [http://www.ftdichip.com/Drivers/VCP.htm](http://www.ftdichip.com/Drivers/VCP.htm) * _TODO: Link to drivers for CH340 and PL2303._ 5. If your board has a NeoPixel RGB LED, install [Adafruit NeoPixel](https://github.com/adafruit/Adafruit_NeoPixel) library from Library Manager ### Build your Firmware 1. Open our example in Arduino IDE: `File -> Examples -> Blynk -> Provisioning -> Blynk_ESP8266` 2. Open `Settings.h` tab. 3. Configure your firmware: * `BOARD_NAME` - ... * `BOARD_VENDOR` - ... * `PRODUCT_WIFI_SSID` - ... ### Upload firmare 1. Select your board type: `Tools -> Board -> [Your Board]` 2. Select your port: `Tools -> Port -> [...]` 3. Verify and Upload! Note that for Blynk Board, you can select board type `NodeMCU 1.0`. ================================================ FILE: ru/blynkfirmware.md ================================================ # Прошивка Blynk ## Конфигурация ### Blynk.begin\(\) Самый простой способ настроить Blynk - это использовать функцию `Blynk.begin()`: ```cpp Blynk.begin(auth, ...); ``` Она имеет несколько параметров для разных моделей оборудования, а также зависит от типа подключения. Следуйте примеру скетча для вашей конкретной аппаратной модели. Что происходит внутри функции `Blynk.begin()`: 1. Подключение к сети \(WiFi, Ethernet, ...\) 2. Вызов `Blynk.config (...)` для установки токена авторизации, адреса сервера и т.д. 3. Пытается сразу подключиться к серверу \(может продлится в течении 30 сек\) Если ваш тип платы/подключения пока не поддерживается - вы можете реализовать его самостоятельно. \[Вот несколько примеров\][https://github.com/blynkkk/blynk-library/tree/master/examples/More/ArduinoClient](https://github.com/blynkkk/blynk-library/tree/master/examples/More/ArduinoClient)\). ### Blynk.config\(\) `config()` позволяет управлять сетевым подключением. Вы можете настроить тип подключения \(WiFi, Ethernet, ...\) самостоятельно, а затем соединиться: ```cpp Blynk.config(auth, server, port); ``` или так ```cpp Blynk.config(auth); ``` **ПРИМЕЧАНИЕ. После вызова `Blynk.config (...)` ваше оборудование еще не подключено к серверу.** Попытка покдлючение произойдет при выполнении программой первой функции `Blynk.run ()` или `Blynk.connect()`. Чтобы пропустить подключение к серверу или отключить его вручную, вызовите `Blynk.disconnect()` после функции конфигурации. Используйте `connectWiFi` чтобы удобно настроить WiFi соединение: ```cpp Blynk.connectWiFi(ssid, pass); ``` Чтобы подключиться к открытой сети WiFi, укажите пустую строку \(`""`\). ## Управление соединением Есть несколько функций, которые помогут с управлением соединением: ### Blynk.connect\(\) Эта функция будет продолжать попытки подключиться к серверу Blynk. Возвращает `true` при подключении, `false`, если истекло время ожидания. Время ожидания по умолчанию составляет 30 секунд. ```cpp bool result = Blynk.connect(); bool result = Blynk.connect(timeout); ``` ### Blynk.disconnect\(\) Отключает оборудование от сервера Blynk: ```cpp Blynk.disconnect(); ``` ### Blynk.connected\(\) Возвращает `true`, когда оборудование подключено к Серверу Blynk,`false`, если нет активного подключения к серверу Blynk. ```cpp bool result = Blynk.connected(); ``` ### Blynk.run\(\) Эта функция должна вызываться часто, чтобы обрабатывать входящие команды и выполнять поддреживать соединения с Сервером Blynk. Обычно вызывается в цикле `void loop () {}`. Эта команда может быть инициирована в других местах вашего кода, если только у вас не заканчивается памяти \(в каскадных функциях с локальной памятью\). Например, не рекомендуется вызывать `Blynk.run ()` внутри `BLYNK_READ` и `BLYNK_WRITE` на устройствах с маленькой оперативной памятью. ## Управление цифровыми и аналоговыми пинами Библиотека Blynk может выполнять основные операции ввода-вывода "из коробки": ```text digitalRead digitalWrite analogRead analogWrite (ШИМ или Аналоговый сигнал в зависимости от платформы) ``` Нет необходимости писать код для простых вещей, таких как светодиод, реле управления и аналоговые датчики. Просто выберите соответствующий пин в приложении Blynk и управляйте им напрямую без дополнительного кода ## Управление виртуальными пинами Виртуальные пины \(Virtual Pins\) - это способ обмена любыми данными между вашим оборудованием и приложением Blynk. Думайте о виртуальных пинах как о каналах для приема/передачи любых данных. Убедитесь, что вы различаете виртуальные контакты от физических GPIO пинов на вашем оборудовании. Виртуальные контакты не имеют физического представления. Виртуальные пины обычно используются для взаимодействия с другими библиотеками \(Servo, LCD и др.\) и реализации пользовательской логики. Устройство может отправлять данные в приложение, используя `Blynk.virtualWrite (pin, value)`, и получать данные из приложения, используя `BLYNK_WRITE (vPIN)`. Читайте ниже... #### Типы данных Виртуальных пинов Все значения виртуальных пинов всегда отправляются в виде строк, и нет никаких практических ограничений на данные, которые могут быть отправлены. Однако при работе с числами существуют определенные ограничения на аппаратную часть. Например, целое число на Arduino - 16-бит, допустимый диапазон значений от -32768 до 32767. Чтобы интерпретировать входящие данные как целые числа, числа с плавающей запятой, двойные числа и строки, используйте: ```cpp param.asInt(); param.asFloat(); param.asDouble(); param.asStr(); ``` Вы также можете получить RAW данные из буфера параметров: ```cpp param.getBuffer() param.getLength() ``` ### Blynk.virtualWrite\(vPin, value\) **ПРИМЕЧАНИЕ. Используйте BlynkTimer при использовании этой команды для отправки данных. В противном случае ваше оборудование будет терять связь с сервером** Отправка данных в различных форматах на виртуальные пины. ```cpp // ОТправка строки Blynk.virtualWrite(pin, "abc"); // Отправка числа Blynk.virtualWrite(pin, 123); // Отправка дробного числа Blynk.virtualWrite(pin, 12.34); // ОТправка массива значений Blynk.virtualWrite(pin, "hello", 123, 12.34); // ОТправка RAW данных Blynk.virtualWriteBinary(pin, buffer, length); ``` Вызов `virtualWrite` пытается немедленно отправить значение в сеть. **Примечание:** Для виртуальных контактов с номерами больше 127 синтаксис `V128` недоступен. Пожалуйста, используйте простой виртуальный пин-код, например: ```cpp Blynk.virtualWrite(128, "abc"); ``` ## BlynkTimer Важно посылать данные с интервалами и сохранять цикл void \(\) как можно более свободным. `BlynkTimer` позволяет периодически отправлять данные с заданными интервалами, не мешая работе библиотеки Blynk `BlynkTimer` наследует [SimpleTimer Library](http://playground.arduino.cc/Code/SimpleTimer), хорошо известную и широко используемую библиотеку для обработки нескольких событий на оборудовании. `BlynkTimer` включен в библиотеку Blynk по умолчанию и нет необходимости устанавливать SimpleTimer отдельно или включать `SimpleTimer.h` * Один объект `BlynkTimer` позволяет планировать до 16 таймеров. * Улучшена совместимость с такими платами, как `Arduino 101`, `Intel Galileo` и т.д. * Когда таймер пытается запуститься несколько раз \(из-за заблокированного цикла\), он просто пропускает все пропущенные интервалы запуска и вызывает вашу функцию только один раз. Это отличается от `SimpleTimer`, который может вызывать вашу функцию несколько раз в этом сценарии. Для получения дополнительной информации об использовании таймера, пожалуйста [посмотрите](http://playground.arduino.cc/Code/SimpleTimer). А вот и BlynkTimer [пример скетча](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/PushData/PushData.ino#L30). Также помните, что один экземпляр `BlynkTimer` может запланировать до 16 таймеров, поэтому, скорее всего, вам понадобится только один экземпляр BlynkTimer в вашем скетче. ### BLYNK\_WRITE\(vPIN\) `BLYNK_WRITE` это функция, вызывается каждый раз, когда устройство получает обновление значения виртуального пина от сервера \(или приложения\): Для чтения полученных данных используйте код: ```cpp BLYNK_WRITE(V0) { int value = param.asInt(); // Получить значение как целое число // Параметр может содержать несколько значений, в таком случае: int x = param[0].asInt(); int y = param[1].asInt(); } ``` **`BLYNK_WRITE` нельзя использовать внутри какого-либо цикла или функции. Это отдельная функция.** **Примечание:** Для виртуальных контактов с номерами > 127 используйте API `BLYNK_WRITE_DEFAULT()` ### BLYNK\_READ\(vPIN\) `BLYNK_READ` - это функция, вызывается, когда от устройства требуется отправить текущее значение Виртуального пина на сервер. Обычно эта функция содержит вызов `Blynk.virtualWrite`. ```cpp BLYNK_READ(V0) { Blynk.virtualWrite(V0, newValue); } ``` **Примечание:** Для виртуальных пинов с номерами более 127 используйте API `BLYNK_READ_DEFAULT()` ### BLYNK\_WRITE\_DEFAULT\(\) Переопределяет обработчик для всех выводов, которые не покрыты пользовательскими функциями `BLYNK_WRITE`. ```cpp BLYNK_WRITE_DEFAULT() { int pin = request.pin; // Какой именно пин обрабатывается? int value = param.asInt(); // Используйте param как обычно. } ``` ### BLYNK\_READ\_DEFAULT\(\) Переопределяет обработчик для всех выводов, которые не покрыты пользовательскими функциями `BLYNK_READ`. ```cpp BLYNK_READ_DEFAULT() { int pin = request.pin; // Какой именно пин обрабатывается? Blynk.virtualWrite(pin, newValue); } ``` ### BLYNK\_CONNECTED\(\) Используйте эту функцию, когда вам нужно запустить определенную процедуру, когда оборудование подключается к Blynk Cloud или локльному серверу. Чаще всего вызывают эту функцию для синхронизации значений Сервер-Приложение-Оборудование. ```cpp BLYNK_CONNECTED() { // Здесь Ваш код } ``` ### BLYNK\_APP\_CONNECTED\(\) Эта функция вызывается каждый раз, когда клиент приложения Blynk подключается к серверу Blynk. ```cpp BLYNK_APP_CONNECTED() { // Здесь Ваш код } ``` **Примечание:** Сначала включите эту функцию в настройках проекта: ![](../.gitbook/assets/app_connected_setting%20%281%29.png) [Пример](https://github.com/blynkkk/blynk-library/blob/master/examples/More/AppConnectedEvents/AppConnectedEvents.ino) ### BLYNK\_APP\_DISCONNECTED\(\) Эта функция вызывается каждый раз, когда приложение Blynk отключается от Blynk Cloud или локального сервера. ```cpp BLYNK_APP_DISCONNECTED() { // Здесь Ваш код } ``` **Примечание.** Сначала включите эту функцию в настройках проекта: ![](../.gitbook/assets/app_connected_setting.png) [Пример](https://github.com/blynkkk/blynk-library/blob/master/examples/More/AppConnectedEvents/AppConnectedEvents.ino) ### Blynk.syncAll\(\) Запрашивает все сохраненные на сервере последние значения для всех виджетов. Все аналоговые/цифровые/виртуальные значения и состояния выводов будут установлены на последнее сохраненное значение. Каждый виртуальный вывод генерирует событие BLYNK\_WRITE \(\). ```cpp BLYNK_CONNECTED() { Blynk.syncAll(); } ``` **Примечание:** Рекомендиуется использовать только на стадии написания кода \(иногда возникают ошибки\). Для надежности следует применять выборочную синхронзацию `syncVirtual`. ### Blynk.syncVirtual\(vPin\) Эта команда обновляет отдельный виртуальный пин до последнего сохраненного значения на сервере. Когда он используется, вызывается соответствующий обработчик `BLYNK_WRITE`. ```cpp Blynk.syncVirtual(V0); ``` Чтобы обновить несколько контактов, используйте код: ```text Blynk.syncVirtual(V0, V1, V6, V9, V16); ``` ### Blynk.setProperty\(vPin, "property", value\) Эта команда позволяет [изменить свойства виджета](blynkfirmware.md#blynk-main-operations-change-widget-properties) ## Отладка ### \#define BLYNK\_PRINT ### \#define BLYNK\_DEBUG Чтобы включить отладочную информацию на последовательном порту по умолчанию, добавьте в начало скетча. **ВАЖНО: это должна быть первая строка в вашем коде**: ```cpp #define BLYNK_PRINT Serial // Определяет объект/порт, который используется для вывода #define BLYNK_DEBUG // Опционально, включает детализированный вывод ``` Обязательно включите последовательный вывод в `setup()`: ```cpp Serial.begin(9600); ``` Откройте Serial Monitor, и вы увидите отладочные данные. Вы также можете использовать запасные аппаратные последовательные порты или SoftwareSerial для вывода отладочной информации \(вам понадобится адаптер для подключения к ПК\). **ПРЕДУПРЕЖДЕНИЕ:** Включение `BLYNK_DEBUG`' замедлит вашу аппаратную производительность в 10 раз! ### BLYNK\_LOG\(\) Когда параметр `BLYNK_PRINT` определен, вы можете использовать `BLYNK_LOG` для записи ваших LOG журналов. Используется похоже на `printf`: ```cpp BLYNK_LOG("This is my value: %d", 10); ``` On some platforms \(like Arduino 101\) the `BLYNK_LOG` may be unavailable, or may just use too much resources. In this case you can use a set of simpler log functions: На некоторых платформах \(например, Arduino 101\) `BLYNK_LOG` может быть недоступен или просто использовать слишком много ресурсов. В этом случае вы можете использовать набор более простых функций журнала: ```cpp BLYNK_LOG1("Hello World"); // Print a string BLYNK_LOG1(10); // Print a number BLYNK_LOG2("This is my value: ", 10); // Print 2 values BLYNK_LOG4("Temperature: ", 24, " Humidity: ", 55); // Print 4 values ... ``` ## Минимизация объема кода Чтобы свести к минимуму объем программы Flash/RAM памяти, вы можете отключить некоторые встроенные функции: 1. Comment-out `#define BLYNK_PRINT` to remove prints 2. Put on the top of your sketch: 3. Закомментируйте `#define BLYNK_PRINT` для отмены печати порт 4. Поместите верхнюю часть вашего скетча: ```text #define BLYNK_NO_BUILTIN // Отключить встроенные аналоговые и цифровые контакты #define BLYNK_NO_FLOAT // Отключить операции с плавающей точкой ``` ## Портирование, взлом Если вы хотите погрузиться в создание/взлом/портирование реализации библиотеки Blynk, пожалуйста, также ознакомтесь [с этой документацией](https://github.com/blynkkk/blynk-library/tree/master/extras/docs). ================================================ FILE: ru/blynkmainoperations.md ================================================ # Blynk основные операции ## Виртуальные Пины \(Pins\) Blynk может напрямую управлять цифровыми и аналоговыми выводами ввода/вывода на вашем оборудовании. Вам даже не нужно писать для этого код. Отлично подходит для мигающих светодиодов, но частенько этого не достаточно... Мы разработали Виртуальные Пины для отправки **любых** данных с вашего микроконтроллера в приложение Blynk и обратно. Все, что вы подключите к своему оборудованию, сможет общаться с Blynk. С помощью Виртуальных Пинов вы можете отправить что-то из приложения, обработать его на микроконтроллере, а затем отправить обратно на смартфон. Вы можете запускать функции, считывать устройства I2C, преобразовывать значения, управлять сервоприводами и двигателями постоянного тока и т. д. Виртуальные Пины могут быть использованы для взаимодействия с внешними библиотеками \(Servo, LCD и другие\), а также реализовать пользовательские функции. Оборудование может передавать данные в виджеты через Виртуальные Пины, как здесь: ```cpp Blynk.virtualWrite(pin, "abc"); Blynk.virtualWrite(pin, 123); Blynk.virtualWrite(pin, 12.34); Blynk.virtualWrite(pin, "Привет", 123, 12.34); ``` Для получения дополнительной информации о виртуальных пинах, [прочитайте здесь](../#blynk-firmware-virtual-pins-control) ## Отправить данные из приложения на оборудование Вы можете отправлять любые данные из виджетов в приложении на ваше оборудование. Все [Виджеты Контроллеры](../#widgets-controllers) могут отправлять данные в Виртуальные Пины на вашем оборудовании. Например, приведенный ниже код показывает, как получить значения из виджета Кнопки \(Button\) в приложении. ```cpp BLYNK_WRITE(V1) //Виджет кнопки пишет данные в пин V1 { int pinData = param.asInt(); } ``` Когда вы нажимаете кнопку, приложение Blynk отправляет `1` На втором клике - отправляет `0` Вот как настроен виджет кнопки \(Button\): ![](../.gitbook/assets/button_virtual_1.png) Полный пример кода: [Получение данных](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/GetData/GetData.ino#L24) ### Отправка массива из виджета Некоторые виджеты \(например, джойстик, zeRGBa\) имеют более одной единицы данных. ![](../.gitbook/assets/joystick_merge_mode.png) Этот вывод может быть записан в Virtual Pin в виде массива значений. С аппаратной стороны - вы можете получить любой элемент массива \[0,1,2 ...\], используя код: ```cpp BLYNK_WRITE(V1) // Виджет ЗАПИСЫВАЕТ в Виртуальный Пин V1 { int x = param[0].asInt(); // получить первое значение int y = param[1].asInt(); // получить второе значение int z = param[N].asInt(); // получить N-ое значение } ``` **Пример кода:** [Джойстик две оси](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/JoystickTwoAxis/JoystickTwoAxis.ino#L24) ## Получить данные с аппаратного обеспечения Существует два способа передачи данных с вашего оборудования на виджеты в приложении через виртуальные контакты. ### Perform requests by Widget * Using Blynk built-in reading frequency while App is active by setting 'Reading Frequency' parameter to some interval: ![](../.gitbook/assets/frequency_reading_pull.png) ```cpp BLYNK_READ(V5) // Widget in the app READs Virtal Pin V5 with the certain frequency { // This command writes Arduino's uptime in seconds to Virtual Pin V5 Blynk.virtualWrite(5, millis() / 1000); } ``` **Sketch:** [PushDataOnRequest](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/PushDataOnRequest/PushDataOnRequest.ino#L26) ### Pushing data from hardware If you need to PUSH sensor or other data from your hardware to Widget, you can write any logic you want. Just set the frequency to PUSH mode. Any command that hardware sends to Blynk Cloud is automatically stored on server and you get this info either with [History Graph](../#widgets-displays-superchart) widget or with [HTTP API](http://docs.blynkapi.apiary.io/#reference/0/pin-history-data/get-all-history-data-for-specific-pin). ![](https://github.com/blynkkk/blynkkk.github.io/tree/b1f1a439851d4000d4d85ddab2f72db8d227d6cc/ru/images/frequency_reading_push.png) We recommend sending data in intervals and avoiding [Flood Error](https://docs.blynk.cc/#troubleshooting-flood-error). You can use timers like [BlynkTimer](../#blynk-firmware-blynktimer). Please read instructions inside this [example sketch](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/PushData/PushData.ino) for more details. Here is how it can work: ```cpp #include #include #include char auth[] = "YourAuthToken"; // Put your token here BlynkTimer timer; // Create a Timer object called "timer"! void setup() { Serial.begin(9600); Blynk.begin(auth); timer.setInterval(1000L, sendUptime); // Here you set interval (1sec) and which function to call } void sendUptime() { // This function sends Arduino up time every 1 second to Virtual Pin (V5) // In the app, Widget's reading frequency should be set to PUSH // You can send anything with any interval using this construction // Don't send more that 10 values per second Blynk.virtualWrite(V5, millis() / 1000); } void loop() { Blynk.run(); // all the Blynk magic happens here timer.run(); // BlynkTimer is working... } ``` **Sketch:** [PushData](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/PushData/PushData.ino#L30) ## State syncing ### For hardware If your hardware looses Internet connection or resets, you can restore all the values from Widgets in the Blynk app. ```cpp BLYNK_CONNECTED() { Blynk.syncAll(); } //here handlers for sync command BLYNK_WRITE(V0) { .... } ``` The `Blynk.syncAll()` command restores all the Widget's values based on the last saved values on the server. All analog and digital pin states will be restored. Every Virtual Pin will perform `BLYNK_WRITE` event. **WARNING**: if pin is empty and wasn't initialized - hardware will not get any response for those pin during sync. [Sync Hardware with App state](https://github.com/blynkkk/blynk-library/blob/master/examples/More/Sync/HardwareSyncStateFromApp/HardwareSyncStateFromApp.ino) You can also update a single Virtual Pin value by calling `Blynk.syncVirtual(V0)` or you can update several pins with `Blynk.syncVirtual(V0, V1, V2, ...)`. You can also use server to store any value without widget. Just call `Blynk.virtualWrite(V0, value)`. [Storing single value on server](https://github.com/blynkkk/blynk-library/blob/master/examples/More/ServerAsDataStorage/ServerAsDataStorage_SingleValue/ServerAsDataStorage_SingleValue.ino) [Storing multiple values on server](https://github.com/blynkkk/blynk-library/blob/master/examples/More/ServerAsDataStorage/ServerAsDataStorage_MultiValue/ServerAsDataStorage_MultiValue.ino) ### For app If you need to keep your hardware in sync with Widgets' state even if app is offline use `Blynk.virtualWrite`. Imagine you have a LED Widget connected to the Virtual Pin V1 in the app, and a physical button attached to your hardware. When you press a physical button, you would expect to see updated state of the LED Widget in the app. To achieve that you need to send `Blynk.virtualWrite(V1, 255)` when a physical button gets pressed. [Represent physical button state via LED widget with interrupts](https://github.com/blynkkk/blynk-library/blob/master/examples/More/Sync/ButtonInterrupt/ButtonInterrupt.ino) [Represent physical button state via LED widget with polling](https://github.com/blynkkk/blynk-library/blob/master/examples/More/Sync/ButtonPoll/ButtonPoll.ino) [Represent physical button state via Button widget with polling](https://github.com/blynkkk/blynk-library/blob/master/examples/More/Sync/SyncPhysicalButton/SyncPhysicalButton.ino) ## Control of multiple devices Blynk app has support of multiple devices. That means you can assign any widget to specific device with own auth token. For example - you may have button on V1 that controls wi-fi bulb A and another button on V1 that controls wi-fi bulb B. In order to do this you need more than 1 device within your project. To achieve this please go to project settings and click on "Devices" section : ![](https://github.com/blynkkk/blynkkk.github.io/tree/b1f1a439851d4000d4d85ddab2f72db8d227d6cc/ru/images/new_project_settings.png) You'll see list of devices : ![](https://github.com/blynkkk/blynkkk.github.io/tree/b1f1a439851d4000d4d85ddab2f72db8d227d6cc/ru/images/list_of_devices.png) So you can add new device : ![](https://github.com/blynkkk/blynkkk.github.io/tree/b1f1a439851d4000d4d85ddab2f72db8d227d6cc/ru/images/new_device.png) After above steps, every widget will have one more field "Target" : ![](https://github.com/blynkkk/blynkkk.github.io/tree/b1f1a439851d4000d4d85ddab2f72db8d227d6cc/ru/images/widget_settings_devices.png) Now you need to assign widget to device and after that widget will control only this specific device. That's it! Now you need to upload sketches with correct Auth Tokens to your hardware. ### Tags Tags feature allows you to group multiple devices. Tags are very useful in case you want to control few devices with 1 widget. For example, imagine a case when you have 3 smart bulbs and you want to turn on all those bulbs with one single click. You need to assign 3 devices to 1 tag and assign tag to button. That's it. Tag widgets also support state syncing. So you can get state of widget from your hardware. However you can't update state of such widgets from hardware. ## Devices online status Blynk app has support for online statuses for multiple devices. ![](https://github.com/blynkkk/blynkkk.github.io/tree/b1f1a439851d4000d4d85ddab2f72db8d227d6cc/ru/images/online_status.png) In ideal world when device closes tcp connection with some `connection.close()` - connected server will get notification regarding closed connection. So you can get instant status update on UI. However in real world this mostly exceptional situation. In majority of cases there is no easy and instant way to find out that connection is not active anymore. That's why Blynk uses `HEARTBEAT` mechanism. With this approach hardware periodically sends `ping` command with predefined interval \(10 seconds by default, `BLYNK_HEARTBEAT` [property](https://github.com/blynkkk/blynk-library/blob/master/src/Blynk/BlynkConfig.h)\). In case hardware don't send anything within 10 seconds server waits additional 5 seconds and after that connection assumed to be broken and closed by server. So on UI you'll see connection status update only after 15 seconds when it is actually happened. You can also change `HEARTBEAT` interval from hardware side via `Blynk.config`. In that case `newHeartbeatInterval * 2.3` formula will be applied. So in case you you decided to set `HEARTBEAT` interval to 5 seconds. You'll get notification regarding connection with 11 sec delay in worst case. ## Project Settings Every project has it's own settings: * **Theme** - switch between the Light and Black Blynk Theme \(Business accounts have wider choice\); * **Keep screen always on** - allows you to use the Blynk app without going to the sleep mode \(usually all mobile devices do that\); * **Send app connected command** - with this option enabled the server will send "App Connected" and "App Disconnected" commands to your hardware when your Blynk app goes online/offline. [Usage example](https://github.com/blynkkk/blynk-library/blob/master/examples/More/AppConnectedEvents/AppConnectedEvents.ino); * **Do not show offline notifications** - right now, for debugging purposes, every time your hardware goes offline - the Blynk Server will notify you with popup in the app about that. However, when debugging is not needed or the Blynk app is used only via HTTP/S this notifications are meaningless. So this switch allows you to turn off this popups. Also this switch turns off the Push notification "Notify when offline" option. ## Change Widget properties Changing some of the widget properties from hardware side is also supported. For example, you can change the color of LED widget based on a condition: ```text //change LED color Blynk.setProperty(V0, "color", "#D3435C"); //change LED label Blynk.setProperty(V0, "label", "My New Widget Label"); //change MENU labels Blynk.setProperty(V0, "labels", "Menu Item 1", "Menu Item 2", "Menu Item 3"); ``` [Set Property for single value field](https://github.com/blynkkk/blynk-library/blob/master/examples/More/SetProperty/SetProperty_SingleValue/SetProperty_SingleValue.ino) [Set Property for multi value field](https://github.com/blynkkk/blynk-library/blob/master/examples/More/SetProperty/SetProperty_MultiValue/SetProperty_MultiValue.ino) **NOTE :** Changing these parameters work **only** for widgets attached to Virtual pins \(analog/digital pins won't work\). Four widget properties are supported - `color`, `label`, `min`, `max` for all widgets : `label` is string for label of all widgets. `color` is string in [HEX](http://www.w3schools.com/html/html_colors.asp) format \(in the form: \#RRGGBB, where RR \(red\), GG \(green\) and BB \(blue\) are hexadecimal values between 00 and FF\). For example : ```text #define BLYNK_GREEN "#23C48E" #define BLYNK_BLUE "#04C0F8" #define BLYNK_YELLOW "#ED9D00" #define BLYNK_RED "#D3435C" #define BLYNK_DARK_BLUE "#5F7CD8" ``` `min`, `max` - minimum and maximum values for the widget \(for example range for the Slider\). This numbers may be float. On firmware side, widget objects also support `setLabel()` and `setColor()` functions. Widget specific properties: **Button** `onLabel` / `offLabel` is string for ON/OFF label of button; **Styled Button** `onLabel` / `offLabel` is string for ON/OFF label of button; `onColor` / `offColor` is string in HEX format for ON/OFF colors of the button; `onBackColor` / `offBackColor` is string in HEX format for ON/OFF colors of the button background. **Music Player** `isOnPlay` is boolean accepts true/false. ```text Blynk.setProperty(V0, "isOnPlay", "true"); ``` **Menu** `labels` is list of strings for Menu widget selections; ```text Blynk.setProperty(V0, "labels", "label 1", "label 2", "label 3"); ``` **Video Streaming** ```cpp Blynk.setProperty(V1, "url", "http://my_new_video_url"); ``` **Step** ```cpp Blynk.setProperty(V1, "step", 10); ``` **Image** ```cpp Blynk.setProperty(V1, "opacity", 50); // 0-100% ``` ```cpp Blynk.setProperty(V1, "scale", 30); // 0-100% ``` ```cpp Blynk.setProperty(V1, "rotation", 10); //0-360 degrees ``` also, you can fully replace the list of images from the hardware: ```cpp Blynk.setProperty(V1, "urls", "https://image1.jpg", "https://image2.jpg"); ``` or you can change individual image by it index: ```cpp Blynk.setProperty(V1, "url", 1, "https://image1.jpg"); ``` You can also change widget properties via [HTTP API](http://docs.blynkapi.apiary.io/#). ## Limitations and Recommendations * Don't put `Blynk.virtualWrite` and any other `Blynk.*` command inside `void loop()`- it will cause lot's of outgoing messages to our server and your connection will be terminated; * We recommend calling functions with intervals. For example, use [BlynkTimer](../#blynk-firmware-blynktimer) * Avoid using long delays with `delay()` – it may cause connection breaks; * If you send more than 100 values per second - you may cause [Flood Error](../#troubleshooting-flood-error) and your hardware will be automatically disconnected from the server; * Be careful sending a lot of `Blynk.virtualWrite` commands as most hardware is not very powerful \(like ESP8266\) so it may not handle many requests. ================================================ FILE: ru/blynkprotocol.md ================================================ # Blynk protocol Blynk transfers binary messages with the following structure: | Command | Message Id | Length/Status | Body | | :---: | :---: | :---: | :---: | | 1 byte | 2 bytes | 2 bytes | Variable | Message Id and Length are [big endian](http://en.wikipedia.org/wiki/Endianness#Big-endian). Body has a command-specific format. Command and Status definitions: [BlynkProtocolDefs.h](https://github.com/blynkkk/blynk-library/blob/master/Blynk/BlynkProtocolDefs.h) Another protocol description can be found [here](https://github.com/blynkkk/blynk-server/blob/master/README_FOR_APP_DEVS.md#protocol-messages). Typical Blynk library knows how to send\(S\)/process\(P\): ```text S BLYNK_CMD_LOGIN + auth token SP BLYNK_CMD_PING SP BLYNK_CMD_RESPONSE SP BLYNK_CMD_BRIDGE SP BLYNK_CMD_HARDWARE S BLYNK_CMD_TWEET S BLYNK_CMD_EMAIL S BLYNK_CMD_PUSH_NOTIFICATION ``` ## HARDWARE/BRIDGE command body The body of these commands are encoded as a sequence of strings, separated by `'\0'` \([Null character](http://en.wikipedia.org/wiki/Null_character)\). Please note that the last value may be not Null-terminated. In the following command examples `\0` chars are replaced with spaces. ### Pin mode PinMode command is received by library after connection, or when a mobile application starts. ```text pm pm ... ``` Mode: * in - INPUT * out - OUTPUT * pu - INPUT\_PULLUP * pd - INPUT\_PULLDOWN ### Digital pin operations Digital write: ```text dw ``` Digital read: ```text dr ``` ### Analog pin operations ```text aw ar ``` ### Virtual pin operations ```text vw ... vr ``` ### Other operations ```text info ``` TODO ## Developer notes * Values in HW commands are plain text. * In response to `dr/ar` command, library should send `dw/aw` command on the same pin and with the same message id. * These situations should cause a connection drop, or reconnection attempt: * Message with `ID=0` is received * Message with unknown type is received ## Adding network interface 4 entities should be created to add a new network interface to Blynk: 1. Select connection interface that will be used for Blynk operation. This should be something like [http://www.arduino.cc/en/Tutorial/WebClient](http://www.arduino.cc/en/Tutorial/WebClient) Based on the API of the connection, create the **Transport**. Some examples may be found in the Adapters folder: * BlynkTransportSerial * BlynkTransportCC3000 * BlynkArduinoClient - _can be reused, if possible_ 2. Create **Blynk representative class**, which contains connection-specific helper functions \(like begin\). Examples: * BlynkEthernet * BlynkSerial * BlynkCC3000 * BlynkWildFire * BlynkYun 3. Create **BlynkSimple\*** header for your connection. This constructs main **Blynk instance**, so the user \(mostly\) doesn't need to get into such details. Examples: * BlynkSimpleEthernet.h * BlynkSimpleCC3000.h * BlynkSimpleWifi.h * BlynkSimpleUIPEthernet.h 4. Create a **simple example** for your platform ;\) ### Example implementations Use these to play with the protocol and understand the basics: * [Pseudo-library in Python](https://github.com/blynkkk/blynk-library/blob/master/tests/pseudo-library.py) * [Node.js + Espruino](https://github.com/vshymanskyy/blynk-library-js) * [Arduino](https://github.com/blynkkk/blynk-library) * [Particle Core](https://github.com/vshymanskyy/blynk-library-spark) ================================================ FILE: ru/blynkserver.md ================================================ # Сервер Blynk Сервер Blynk - это Java-сервер с открытым исходным кодом, отвечающий за пересылку сообщений между мобильным приложением Blynk и различными платами микроконтроллеров \(например, Arduino, Raspberry Pi и т. д.\). Загрузите последнюю сборку сервера: [Сервер Blynk >](https://github.com/blynkkk/blynk-server/releases) ## Зачем мне нужен локальный сервер Blynk? * Лучшая безопасность. Вы единственный, кто знает о сервере. Вы можете настроить политики безопасности в соответствии с вашими потребностями \(MAC, IP-адреса, имена входа и т. Д.\). Вы также можете сделать его доступным только в вашей частной сети. * Лучшая стабильность. Не нужно полагаться на стороннее облачное решение. У вас есть полный контроль. * Меньшая задержка обработки команд. Сервер как можно ближе к вам. * Максимальная конфиденциальность. Все данные хранятся локально и не передаются никому. ## Установка вашего собственного локального сервера Blynk Для получения подробных инструкций, пожалуйста прочитайте [страницу GitHub](https://github.com/blynkkk/blynk-server#blynk-server). ================================================ FILE: ru/faq.md ================================================ # Часто задаваемые вопросы \(FAQ\) * Я поддержал Blynk на Kickstarter. Где мои виджеты и почему приложение бесплатное? > Приложение бесплатно, потому что в противном случае вам придется заплатить, чтобы загрузить его. Так работает AppStore и Google Play. Текущая версия Blynk имеет ограниченное количество виджетов. Мы решили сделать их бесплатными для всех, пока не создадим магазин. После этого каждый виджет будет платным. Однако каждый спонсор получит их бесплатно \(согласно нашему обещанию\). * Что такое Blynk Cloud? > Blynk Cloud - это программное обеспечение с открытым исходным кодом, написанное на Java с использованием простых и защищенных сокетов TCP/IP \(для оборудования, которое его поддерживает\) и работающее на нашем сервере. Приложения Blynk для iOS и Android по умолчанию подключаются к Blynk Cloud. Доступ бесплатен для каждого пользователя Blynk. Мы также предоставляем дистрибутив Private Server для тех, кто хочет [установить его локально](../#blynk-server). * Сколько стоит доступ к Cloud Blynk Server? > Доступ бесплатен для каждого пользователя Blynk. * Могу ли я запустить сервер Blynk локально? > Да. Те из вас, кому нужна дополнительная безопасность или нет подключения к Интернету, могут установить локальный сервер Blynk и запустить его в своей локальной сети. Blynk Server имеет открытый исходный код, и его развертывание занимает менее нескольких секунд. Все инструкции и файлы находятся [здесь](../#blynk-server). * What are the requirements to run Private Blynk Server? > To run Private Blynk Server, all you need is Java Runtime Environment. * Каковы требования для запуска локального Blynk Сервера? > Для запуска локального Blynk Сервера все, что вам нужно, это Java Runtime Environment. * Могу ли я запустить сервер Blynk на Raspberry Pi? > Да, конечно! [инструкция](../#blynk-server-how-to-run-local-blynk-server-launch-blynk-server-on-raspberry-pi). * Приложение Blynk работает через Bluetooth? > Да. Это в работает даже в бета-версии. * Blynk поддерживает Ethernet / Wi-FI / UART? > Да, все из них. См. Полный список [поддерживаемого оборудования](../#support-hardware) и плат расширений. * У меня нет платы расширения. Могу ли я использовать Blynk с моим компьютером? > Да, вы можете использовать Blynk только с помощью USB-кабеля. Существует [пошаговая инструкция](../#other-hardware-connect-over-usb) о том, как это сделать. * Может ли Blynk справиться с несколькими Arduinos? > Да. Есть 3 способа: > > * добавить несколько устройств в ваш проект. > * вы можете использовать один и тот же [Auth Token](../#Getting-Start-Getting-Start-With-Application-Auth-Token) для разного оборудования. В этом случае вы можете управлять несколькими аппаратными средствами с одной панели. > * вы можете сделать это, используя [функцию моста](../#widgets-other-bridge), которая позволяет отправлять сообщения с одного оборудования на другое. * Сохраняет ли сервер Blynk данные датчиков, когда приложение отключается? > Да, каждая команда, отправляемая оборудованием на сервер, сохраняется. Вы можете использовать виджет [Диаграмма](../#widgets-display-superchart) для его просмотра. * Сколько виртуальных пинов я могу использовать? > Это зависит в основном от вашего оборудования. Младшее оборудование может использовать до 32 виртуальных пинов. Более мощный \(например, ESP8266\) может использовать до 128, но для этого требуется указать свойство BLYNK\_USE\_128\_VPINS в вашем скетче. [Пример](https://github.com/blynkkk/blynk-library/blob/master/src/Blynk/BlynkConfig.h#L64). * Почему приложение требует все эти разрешения? > [http://help.blynk.cc/faq/blynk-android-permissions-explained](http://help.blynk.cc/faq/blynk-android-permissions-explained) ================================================ FILE: ru/gettingstarted.md ================================================ # Начало работы Давайте начнем уже через 5 минут \(чтение не считается!\). Мы включим светодиод, подключенный к вашему Arduino, с помощью приложения Blynk на вашем смартфоне. Подключите светодиод, как показано на рисунке: ![](../.gitbook/assets/Arduino_LED.jpg) ## Начало работы с приложением Blynk ### 1. Создать учетную запись Blynk После загрузки приложения Blynk вам необходимо создать новую учетную запись Blynk. Если она у вас уже есть, помните: эта учетная запись отделена от учетных записей, используемых для форума Blynk. Мы рекомендуем использовать **реальный** адрес электронной почты, потому что это упростит ситуацию с настройкой. ![](../.gitbook/assets/register_account.png) #### Зачем я должен создавать аккаунт? Учетная запись необходима для хранения ваших проектов и доступа к ним с нескольких устройств из любого места. Также это мера безопасности. Вы всегда можете настроить свой собственный [локальный Blynk сервер](../#blynk-server) и иметь полный контроль. ### 2. Создать новый проект После того, как вы успешно вошли в свой аккаунт, начните с создания нового проекта. ![](../.gitbook/assets/create_project_button.png) ### 3. Выберите ваше оборудование Выберите модель оборудования, которую вы будете использовать. Проверьте [список поддерживаемого оборудования](../#support-hardware)! ![](../.gitbook/assets/select_hardware.png) ### 4. Ключ авторизации \(Auth Token\) **Ключ авторизации** - это уникальный идентификатор, необходимый для подключения вашего оборудования к вашему смартфону. Каждый новый проект, который вы создаете, будет иметь свой собственный Ключ авторизации. Вы получите Ключ авторизации автоматически на вашу электронную почту после создания проекта. Вы также можете скопировать его вручную. Нажмите на раздел устройств и выберите необходимое устройство: ![](../.gitbook/assets/token_1.png) И вы увидите ключ: ![](../.gitbook/assets/new_device.png) **ПРИМЕЧАНИЕ:** Не передавайте свой Ключ авторизации кому-либо, если только вы не хотите, чтобы кто-то имел доступ к вашему оборудованию. Отправлять ключ по электронной почте очень удобно. Нажмите кнопку `e-mail`, и токен будет отправлен на адрес электронной почты, который вы использовали для регистрации. Вы также можете нажать на строку Ключа, и она будет скопирована в буфер обмена. Теперь нажмите кнопку **"Создать"**. ![](../.gitbook/assets/new_project.png) ### 5. Добавить виджет Ваш рабочий стол проекта пуст, давайте добавим кнопку для управления нашим светодиодом. Нажмите в любом месте на рабочем столе, чтобы открыть окно виджета. Все доступные виджеты расположены здесь. Теперь выберите виджет кнопку \(Button\). **Окно виджетов \(Widget Box\)** ![](../.gitbook/assets/widgets_box.png) **Схвати-И-Брось \(Drag-n-Drop\)** - Нажмите и удерживайте виджет, чтобы перетащить его на новое место. **Настройки виджета \(Widget Settings\)** - Каждый виджет имеет свои настройки. Нажмите на виджет, чтобы добраться до них. ![](../.gitbook/assets/button_settings.png) Наиболее важным параметром для установки является **PIN** \(контакт\). Список контактов отражает физические контакты, определенные вашим оборудованием. Если ваш светодиод подключен к цифровому выводу 8 - выберите **D8** \(**D** - означает digital - цифровой\). ![](../.gitbook/assets/pin_selection%20%281%29.png) ### 6. Запустить проект Когда вы закончите с настройками - нажмите кнопку **PLAY**. Это переключит вас из режима EDIT в режим PLAY, где вы можете взаимодействовать с оборудованием. В режиме воспроизведения вы не сможете перетаскивать или настраивать новые виджеты, нажав **STOP** вы вернетесь в режим редактирования. Вы получите сообщение "Arduino UNO is offline" \(Arduino UNO не в сет\). Мы рассмотрим это в следующем разделе. ![](../.gitbook/assets/play_button.png) ## Начало работы с оборудованием ### Как использовать пример кода У вас должна быть установлена библиотека Blynk на вашем компьютере. Если нет - [нажмите здесь](../#downloads-blynk-library). Примеры скетчей \(кода\) помогут вам быстро подключить ваше оборудование и основные функции Blynk. Откройте пример эскиза в соответствии с используемой моделью оборудования или платой. ![](../.gitbook/assets/connection_type_sketch.png) Давайте рассмотрим пример кода для [Arduino UNO + Ethernet-плата](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/BlynkBlink/BlynkBlink.ino) ```cpp #define BLYNK_PRINT Serial #include #include #include char auth[] = "YourAuthToken"; void setup() { Serial.begin(9600); // Наблюдайет за состоянием подключения в терминале. Blynk.begin(auth); // Здесь ваше Arduino подключается к облаку Blynk. } void loop() { Blynk.run(); // Все чудеса Blynk происходят здесь... } ``` ### Ключ авторизации \(Auth Token\) В этом примере скейтча найдите такую строку: ```cpp char auth[] = "YourAuthToken"; ``` This is the [Auth Token](../#getting-started-getting-started-with-application-4-auth-token) that you emailed yourself. Please check your email and copy it, then paste it inside the quotation marks. Это [Ключ авторизации](../#getting-started-getting-started-with-application-4-auth-token), который вы должны отправить себе по электронной почте из приложения Blynk. Проверьте свою электронную почту, скопируйте его и вставьте в кавычки. Должно выглядеть примерно так: ```text char auth[] = "f45626c103a94983b469637978b0c78a"; ``` Загрузите скейтч в плату и откройте последовательный терминал. Подождите, пока не увидите что-то вроде этого: ```text Blynk v.X.X.X Your IP is 192.168.0.11 Connecting... Blynk connected! ``` **Великолепно! У вас все настроено! Теперь ваше оборудование подключено к Blynk Cloud!** ## Используем Blynk Вернитесь в приложение Blynk, нажмите кнопку и включите и выключите светодиод! Это должен быть наш Blynk. ![](../.gitbook/assets/button_pressed.png) Изучайте [другие примеры скетчей](https://github.com/blynkkk/blynk-library/tree/master/examples). Не стесняйтесь экспериментировать и комбинировать различные примеры вместе, чтобы создавать свои собственные удивительные проекты. Например, подключите светодиод к выводу, с активным [ШИМ](http://www.arduino.cc/en/Tutorial/Fading) на Arduino и установите виджет - Слайдер \(Slider\) для управления яркостью светодиода. Используя те же шаги, что описанны выше. ================================================ FILE: ru/hardwaresetups.md ================================================ # Аппаратные настройки ## Arduino через USB \(без расширительных плат\) Если у вас нет расширительной платы и ваше оборудование не имеет подключения к сети, вы все равно можете использовать Blynk - напрямую через USB: 1. Откройте [Arduino Serial USB пример](https://github.com/blynkkk/blynk-library/blob/master/examples/Boards_USB_Serial/Arduino_Serial_USB/Arduino_Serial_USB.ino) и замените [Auth Token](../#getting-started-getting-started-with-application-4-auth-token) ```cpp // Вы можете использовать запасной аппаратный серийный порт на платах, которые его имеют (например, Mega) #include SoftwareSerial DebugSerial(2, 3); // RX, TX #define BLYNK_PRINT DebugSerial #include // Вы должны получить Auth Token в приложении Blynk. // Перейдите в настройки проекта (значок гайки). char auth[] = "YourAuthToken"; void setup() { // Debug console DebugSerial.begin(9600); // Blynk will work through Serial Serial.begin(9600); Blynk.begin(auth, Serial); } void loop() { Blynk.run(); } ``` 1. Запустите скрипт, который обычно находится в папке `/scripts`: * Windows:`My Documents\Arduino\libraries\Blynk\scripts` * Mac `User$/Documents/Arduino/libraries/Blynk/scripts` **На Windows:** Откройте командную строку cmd.exe Задайте свой путь к папке blynk-ser.bat. Например: ```text cd C:\blynk-library-0.3.1\blynk-library-0.3.1\scripts ``` Run `blynk-ser.bat` file. For example : `blynk-ser.bat -c COM4` \(where COM4 is port with your Arduino\) Запустите файл `blynk-ser.bat`. Например: `blynk-ser.bat -c COM4` \(где COM4 - порт с вашим Arduino\) И нажмите «Ввод», нажмите «Ввод» и нажмите «Ввод»... **На Linux и Mac**: Перейдите в папку `/scripts.` Например: ```text cd User$/Documents/Arduino/libraries/Blynk/scripts ``` Когда окажетесь внутри этой папки, запустите: ```text user:scripts User$ ./blynk-ser.sh ``` **Предупреждение:** Не закрывайте окно терминала с запущенным скриптом. В некоторых случаях вам также может потребоваться выполнить: ```text user:scripts User$ chmod +x blynk-ser.sh ``` Вам также может понадобиться запустить скрипт с функцией `sudo` ```text user:scripts User$ sudo ./blynk-ser.sh ``` Вот что вы увидите в приложении Terminal на Mac \(адрес usbmodem может быть другим\): ```text [ Press Ctrl+C to exit ] /dev/tty.usbmodem not found. Select serial port [ /dev/tty.usbmodem1451 ]: ``` Скопируйте адрес последовательного порта: `/dev/ tty.usbmodem1451` и вставьте его обратно: ```text Select serial port [ /dev/tty.usbmodem1451 ]: /dev/tty.usbmodem1451 ``` После того, как вы нажмете Enter, вы увидите текст, похожий на этот: ```text Resetting device /dev/tty.usbmodem1451... Connecting: GOPEN:/dev/tty.usbmodem1451,raw,echo=0,clocal=1,cs8,nonblock=1,ixoff=0,ixon=0,ispeed=9600,ospeed=9600,crtscts=0 <-> openssl-connect:blynk-cloud.com:9443,cafile=/Users/.../server.crt,nodelay 2015/10/03 00:29:45 socat[30438.2046857984] N opening character device "/dev/tty.usbmodem1451" for reading and writing 2015/10/03 00:29:45 socat[30438.2046857984] N opening connection to LEN=16 AF=2 45.55.195.102:9443 2015/10/03 00:29:45 socat[30438.2046857984] N successfully connected from local address LEN=16 AF=2 192.168.0.2:56821 2015/10/03 00:29:45 socat[30438.2046857984] N SSL connection using AES128-SHA 2015/10/03 00:29:45 socat[30438.2046857984] N starting data transfer loop with FDs [3,3] and [4,4] ``` **ПРИМЕЧАНИЕ:** Arduino IDE может жаловаться на то, что «программа не отвечает». Вам необходимо прекратить выполнение скрипта перед загрузкой нового скейтча. **Дополнительные материалы:** * [Учебник: Управление Arduino через USB с приложением Blynk. Плата Ethernet не требуется. Mac OS](https://www.youtube.com/watch?v=fgzvoan_3_w) * [Как управлять Arduino \(без проводов\) с помощью blynk через USB. Windows](https://www.youtube.com/watch?v=I_hgIj2FdPI) * [Учебные пособия: управление Arduino с помощью Blynk через USB](http://www.instructables.com/id/Control-arduino-using-Blynk-over-usb/) ## Raspberry Pi 1. Подключите Raspberry Pi к Интернету и откройте его консоль. 2. Запустите эту команду \(она обновляет ваш репозиторий пакетов операционной системы, чтобы добавить необходимые пакеты\): ```text curl -sL "https://deb.nodesource.com/setup_6.x" | sudo -E bash - ``` 3. Загрузите и соберите библиотеку Blynk JS, используя npm: ```text sudo apt-get update && sudo apt-get upgrade sudo apt-get install build-essential sudo apt-get install -g npm sudo npm install -g onoff sudo npm install -g blynk-library ``` 4. Запустите тестовый скрипт Blynk \(поставьте свой ключ авторизации\): ```text blynk-client 715f8cafe95f4a91bae319d0376caa8c ``` 5. Вы можете написать свой собственный скрипт на основе [примеров](https://github.com/vshymanskyy/blynk-library-js/tree/master/examples) 6. Чтобы включить автоматический перезапуск Blynk для Pi, найдите файл `/etc/rc.local` и добавьте туда: ```text node full_path_to_your_script.js ``` **Дополнительные материалы:** * [Учебные пособия: Blynk на Javascript для Raspberry Pi, Intel Edison и другие](http://www.instructables.com/id/Blynk-JavaScript-in-20-minutes-Raspberry-Pi-Edison) * [Учебные пособия: использование датчиков DHT11/DHT12 с Raspberry Pi и Blynk](http://www.instructables.com/id/Raspberry-Pi-Nodejs-Blynk-App-DHT11DHT22AM2302/?ALLSTEPS) **Примечание:** Вместо использования Node.js вы также можете создать версию библиотеки C++ \(такую же, как для Arduino, на основе WiringPi\): * [Библиотека README для Linux](https://github.com/blynkkk/blynk-library/blob/master/linux/README.md) * [Тема сообщества Blynk: How-To Raspberry Pi](https://community.blynk.cc/t/howto-for-raspberry-pi/332) * [Видеоурок - Настройка Blynk и Raspberry Pi](https://www.youtube.com/watch?v=iSG_8g6KyGE) ## Беспроводной ESP8266 Вы можете запустить Blynk прямо на ESP8266! Установите последнюю версию библиотеки ESP8266 для Arduino, используя [это руководство](https://github.com/esp8266/Arduino#installing-with-boards-manager). **Пример кода:** [ESP8266\_Standalone](https://github.com/blynkkk/blynk-library/blob/master/examples/Boards_WiFi/ESP8266_Standalone/ESP8266_Standalone.ino) **Дополнительные материалы:** * [Учебные пособия: ESP8266 ESP-12 \(Беспроводной\) + Blynk](http://www.instructables.com/id/ESP8266-ESP-12Standalone-Blynk-101) * [Учебные пособия: ESP8266-12 \(Беспроводной\) датчик температуры lm35 + Blynk](http://www.instructables.com/id/ESP8266-12-blynk-wireless-temperature-LM35-sensor/?ALLSTEPS) * [Пошаговое руководство на русском языке](http://esp8266.ru/esp8266-blynk) ## NodeMCU Пожалуйста, следуйте [этой подробной инструкции](https://github.com/blynkkk/blynk-library/tree/master/examples/Boards_WiFi/NodeMCU#instruction-for-nodemcu-setup). Или посмотрите [этот видеоурок](https://www.youtube.com/watch?v=FhS44hGk1Lc). ## Arduino + ESP8266 WiFi с AT командами Этот тип подключения не рекомендуется для начинающих. Если вы хотите попробовать, пожалуйста, внимательно прочитайте [этот раздел справки](http://help.blynk.cc/hardware-and-libraries/arduino/esp8266-with-at-firmware) **Примечание:** Некоторые платы, такие как Arduino UNO WiFi от Arduino.org, не используют AT-команды \(и не предоставляют соответствующих библиотек\), поэтому это делает их непригодными для использования с Blynk. ## Particle Blynk работает со всем семейством продуктов Particle: Core, Photon и Electron. 1. Открыть [Particle Web IDE](https://build.particle.io/build). Требуется регистрация. 2. Идем в библиотеки. 3. Найдите **Blynk** в общих библиотеках и нажмите на него. 4. Откройте пример `01_PARTICLE.INO`. 5. Нажмите «использовать этот пример» \(use this example\). 6. Поместите свой токен здесь: `char auth [] ="YourAuthToken";` и прошейте Particle! Вы можете отсканировать этот QR-код из приложения Blynk, и вы получите готовый к тесту проект для **Particle Photon**. Просто вставьте свой токен ключ в пример `01_PARTICLE.INO`. ![](../.gitbook/assets/Particle%20Demo1530733075.png) **Дополнительные материалы:** * [Ядро Particle + DHT22](https://www.hackster.io/gusgonnet/temperature-humidity-monitor-with-blynk-7faa51) ================================================ FILE: ru/http.md ================================================ # HTTP RESTful API Blynk HTTP RESTful API позволяет легко считывать и записывать значения Pins в приложениях Blynk и на оборудовании. Описание API можно найти [здесь](http://docs.blynkapi.apiary.io). **Предупреждение**: Blynk HTTP API все еще имеет проблему с GEO DNS. Это означает, что вам нужно использовать прямой IP-адрес сервера вместо WEB-имени, чтобы заставить его работать с такими сторонними сервисами, как IFTTT. ================================================ FILE: ru/implementing.md ================================================ # Implementing a Blynk HW client \(library\) Currently we provide Arduino/C++ implementation of the library. It is very extensible and modular, look at [the list of supported hardware](../#supported-hardware). Adding new connection types and Arduino-compatible boards is easy. TODO: Porting guide. But some devices are programmed in other languages, like: * Espruino, JavaScript, Node.JS * MicroPython, Python * NodeMCU, eLua This document hints how to write a custom library. ## Blynk library main functions * Provide easy-to use API * Virtual pin handlers registration * Provide comfortable wrappers for some widgets * Manage connection * Should support different connection type/hardware, if applicable * Serialize/deserialize Blynk protocol * Handle direct pin operations * Should be portable across similar devices \(or same technology/programming language\), if possible * Should detect and notify the user about [troubles](../#troubleshooting) where possible \(especially Flood\) ### Adding new HW board Different boards can be added by creating JSON board description file. ```javascript { "name": "Arduino UNO", "map": { "digital": { "pins": { "D0": 0, "D1": 1, "D2": 2, "D3": 3, "D4": 4, "D5": 5, "D6": 6, "D7": 7, "D8": 8, "D9": 9, "D10": 10, "D11": 11, "D12": 12, "D13": 13 }, "ops": [ "dr", "dw" ] }, "analog": { "pins": { "A0": 14, "A1": 15, "A2": 16, "A3": 17, "A4": 18, "A5": 19 }, "ops": [ "dr", "dw", "ar" ], "arRange":[0, 1023] }, "pwm": { "pins": [ "D3", "D5", "D6", "D9", "D10", "D11" ], "ops": [ "aw" ], "awRange":[0, 255] }, "virtual": { "pinsRange": [ 0, 31 ], "ops": [ "vr", "vw" ] } } } ``` Look at the [full boards list](https://github.com/blynkkk/blynk-library/tree/master/boards_json). You can send us your own board description file for review and App integration. There may be a problem that you want to start testing your implementation, but your board is not listed int the Blynk App. On Android, we now have a "Generic Board" specially for such purposes. Unfortunately iOS does not have it yet. Basically you can select UNO board and check how it works using just virtual pins. Most digital pins will also work. Analog IO/PWM will not work in general, until we add your board to the App. ================================================ FILE: ru/introanddownloads.md ================================================ # IntroAndDownloads ## Введение Это руководство поможет вам понять, как начать использовать Blynk, и даст исчерпывающий обзор всех функций. Если вы хотите начать использовать Blynk, ознакомьтесь с разделом Начало работы. [Начало работы >](../#getting-started) ### Как работает Blynk Блинк был разработан для "Интернета вещей" \([Internet of Things](https://ru.wikipedia.org/wiki/%D0%98%D0%BD%D1%82%D0%B5%D1%80%D0%BD%D0%B5%D1%82_%D0%B2%D0%B5%D1%89%D0%B5%D0%B9)\). Он может управлять оборудованием удаленно, отображать данные датчиков, хранить данные, визуализировать их и делать много других интересных вещей. В платформе есть три основных компонента: * **Blynk App \(Приложение-клиент\)** - позволяет вам создавать разнообразные интерфейсы для ваших проектов, используя различные виджеты. * **Blynk Server \(Сервер\)** - отвечает за все коммуникации между смартфоном и оборудованием. Вы можете использовать наше Облако Blynk или запустить свой [личный сервер Blynk](../#blynk-server) локально. Он с открытым исходным кодом, может легко обрабатывать тысячи устройств и даже может быть запущен на устройствах типа Raspberry Pi. * **Blynk Libraries \(Библиотеки\)** - разработаны для всех популярных аппаратных платформ - обеспечивают связь с сервером и обрабатывать все входящие и исходящие команды. А теперь представьте: каждый раз, когда вы нажимаете кнопку в приложении Blynk, сообщение отправляется в ~~пространство~~ Облако Blynk, где оно "волшебным" образом попадает на ваше оборудование. Передача работает и в противоположном направлении, а все происходит в "мгновение ока". ![](../.gitbook/assets/architecture.png) ### Характеристики * Типовой API и пользовательский интерфейс для всех поддерживаемых устройств и оборудования * Подключение к сети с помощью: * Wi-Fi * Bluetooth и BLE * Ethernet * USB \(последовательный\) * GSM * ... * Набор, простых в использовании, виджетов * Прямое управление пин-ами без написания кода * Простота интеграции и добавления новых функций с помощью виртуальных пин-ов * Мониторинг истории данных с помощью виджета [Диаграмма \(SuperChart\)](../#widgets-displays-superchart) * Связать устройства между собой при помощью виджета [Мост \(Bridge\)](../#widgets-other-bridge) * Отправка электронных писем, твитов, push-уведомлений и т.д. * ... постоянно добавляются новые функции! Вы можете найти [Примеры кода](https://github.com/blynkkk/blynk-library/tree/master/examples), охватывающие основные функции Blynk. Они так же включены в библиотеку Blynk. Все примеры разработаны так, чтобы их можно было легко комбинировать друг с другом. ### Что нужно для использования Blynk? В этот момент вы можете подумать: **«Хорошо, я хочу попробовать. Что мне нужно, чтобы начать?»** - на самом деле, всего пара вещей: #### **1. Аппаратные средства**. Arduino, Raspberry Pi или аналогичный набор для разработки. **Blynk работает через Интернет.** Это означает, что выбранное вами оборудование должно иметь возможность подключаться к Интернету. Некоторым платам, таким как Arduino Uno, понадобится Ethernet или Wi-Fi Shield для связи, другие уже подключены к Интернету, например: ESP8266, Raspberri Pi с WiFi-ключом, Particle Photon или SparkFun Blynk Board. Но даже если у вас нет подключения к сети, вы можете подключить устройства через USB к своему ноутбуку или настольному компьютеру \(для новичков это немного сложнее, но мы вам поможем\). Что действительно круто, так это то, что [список оборудования](../#support-hardware), который работает с Blynk, огромен и продолжает расти. #### **2. Смартфон**. Приложение Blynk - это качественно разработанный конструктор интерфейсов. Он работает как на iOS, так и на Android, давайте здесь обойдемся без священной войны, хорошо? ## Загрузки ### **Приложения Blynk для iOS или Android** [![Drawing](../.gitbook/assets/appstore-lrg.svg)](https://itunes.apple.com/us/app/blynk-control-arduino-raspberry/id808760481?ls=1&mt=8)        [![Drawing](https://play.google.com/intl/en_us/badges/images/apps/en-play-badge.png)](https://play.google.com/store/apps/details?id=cc.blynk) ### **Blynk библиотека** [Скачать библиотеку Blynk >](https://github.com/blynkkk/blynk-library/releases/latest) Если вы забыли или не знаете, как установить библиотеки Arduino [нажмите здесь](http://www.arduino.cc/en/guide/libraries). ================================================ FILE: ru/license.md ================================================ # Лицензия Этот проект выпущен под лицензией Открытого Программного Обеспечения \([MIT](https://ru.wikipedia.org/wiki/%D0%9B%D0%B8%D1%86%D0%B5%D0%BD%D0%B7%D0%B8%D1%8F_MIT)\). ================================================ FILE: ru/links.md ================================================ # Ссылочная информация * [Blynk site](https://www.blynk.cc) * [Blynk community](https://community.blynk.cc) * [Facebook](https://www.fb.com/blynkapp) * [Twitter](https://twitter.com/blynk_app) * [Blynk Library](https://github.com/blynkkk/blynk-library) * [Blynk Examples](https://github.com/blynkkk/blynk-library/tree/master/examples) * [Blynk Server](https://github.com/blynkkk/blynk-server) * [Kickstarter campaign](https://www.kickstarter.com/projects/167134865/blynk-build-an-app-for-your-arduino-project-in-5-m/description) ================================================ FILE: ru/ota.md ================================================ # Обновление "по воздуху" \(OTA\) Blynk также поддерживает беспроводное обновления для плат ESP8266, NodeMCU и SparkFun Blynk. На данный момент ОТА поддерживается только для частных серверов и для платных клиентов. ## Как это работает? * Вам нужно использовать [обычный скетч для экспортируемых приложений](https://github.com/blynkkk/blynk-library/tree/master/examples/Blynk.Inject/Template_ESP8266); * После того, как вы запустили свое оборудование, все готово к обвнолению "по воздуху"; * Вы можете запустить обновление прошивки для конкретного оборудования через его токен или для всего оборудования в сети. ### Заливка прошивки 1. Пользователь запускает OTA одним из нижеуказанных HTTPS-запросов; 2. Пользователь предоставляет в HTTPS-запросе учетные данные администратора и двоичный файл прошивки для обновления оборудования; 3. Когда оборудование подключается к серверу - сервер проверяет его прошивку. В случае, если дата сборки аппаратной прошивки старше загруженной прошивки, сервер отправляет на аппаратное обеспечение специальную команду с URL для новой прошивки; 4. Оборудование обработает указанный URL-адрес таким [обработчиком](https://github.com/blynkkk/blynk-library/blob/master/examples/Blynk.Inject/Template_ESP8266/OTA.h#L31): ```text BLYNK_WRITE(InternalPinOTA) { //URL адрес с прошивкой. Возможен только HTTP адрес //http://localhost:8080/static/ota/FUp_2441873656843727242_upload.bin overTheAirURL = param.asString(); ... } ``` 5. Обрудование самостоятельно загружает новую прошивку и начинает обновление; ## Выборочное обновление для конкретного оборудования ```text curl -v -F file=@Template_ESP8266.ino.nodemcu.bin --insecure -u admin@blynk.cc:admin https://localhost:9443/admin/ota/start?token=123 ``` * `Template_ESP8266.ino.nodemcu.bin` - относительный \(или полный\) путь к вашей прошивке; * `--insecure` флаг для серверов с самостоятельно созданными сертификатами. Вам не нужен этот флаг, если вы использовали Let's Encrypt или другие доверенные сертификаты; * `admin@blynk.cc:admin` учетные данные администратора на вашем сервере. Указаны значения по умлочанию. Формат: `username:password`. Вы можете изменить имя пользователя и пароль в файле `server.properties`; * `token` ключь является признаком вашего оборудования, к которому вы хотите применить обновление прошивки. Обновление прошивки будет начато только в том случае, если устройство подключено к сети; ## Обновление "по воздуху" для всех устройств Обновление для всех устройств будет запускаться только тогда, когда они подключены к облаку. Для этого вам нужно удалить часть с токен ключом. ```text curl -v -F file=@Template_ESP8266.ino.nodemcu.bin --insecure -u admin@blynk.cc:admin https://localhost:9443/admin/ota/start ``` В этом случае OTA будет срабатывать сразу после подключения устройства к серверу. Если устройство подключено к сети, обновление встроенного ПО будет начато только после повторного подключения устройства. ## Обновление "по воздуху" от конкретного пользователя В этом случае обновление прошивки будет срабатывать для всех устройств, указанных пользователем. ```text curl -v -F file=@Template_ESP8266.ino.nodemcu.bin --insecure -u admin@blynk.cc:admin https://localhost:9443/admin/ota/start?user=pupkin@gmail.com ``` ## Обновление "по воздуху" для конкретного пользователя и проекта В этом случае обновление прошивки будет срабатывать для всех устройств указанного пользователя в указанном проекте. ```text curl -v -F file=@Template_ESP8266.ino.nodemcu.bin --insecure -u admin@blynk.cc:admin https://localhost:9443/admin/ota/start?user=pupkin@gmail.com&project=123 ``` ## Остановка OTA ```text curl -v --insecure -u admin@blynk.cc:admin https://localhost:9443/admin/ota/stop ``` ## Как сделать бинарную прошивку Чтобы сделать прошивку в Arduino IDE - зайдите в меню: Скетч -> Экспорт бинарного файла. **ПРИМЕЧАНИЕ:** ESP8266 принимает прошивку только по протоколу HTTP, а не HTTPS. ================================================ FILE: ru/readme.md ================================================ ### Перевод на русский язык. WEB-help. Copyright, 2019. ================================================ FILE: ru/roadmap.md ================================================ # Roadmap We build Blynk based on Blynkers feedback but with limited resources we have to prioritize our features. At the moment list look like that: * App Sharing \(project sharing when other people can control your hardware, but can't modify your project\); Free Beta * App Sharing \(project sharing when other people can control your hardware, but can't modify your project\); Subscription based * Bluetooth Low Energy support; * Hardware state handling \(changing physical button state changes Blynk application state\); * Hardware online/offlane state improvements \(better indication for "is hardware online?", "is hardware offline?"\); * Project space increase * Direct Connect support \(for WiFi\); * RTC widget; * Design options for widgets \(size, button with icons, etc\); * Phone sensors widgets \(GPS, accelerometer\); * IP camera support; * Customizable look and feel of the project Under consideration: * Home screen widget \(to avoid opening App when you need only 1 button click\); * Haptic feedback \(vibration\) when touching widgets ================================================ FILE: ru/ru.md ================================================ # Перевод на русский язык. WEB-help. Copyright, 2019. ================================================ FILE: ru/security.md ================================================ # Безопасность Сервер Blynk имеет 5 открытых портов с разным уровнем безопасности. * **80** - простое TCP-соединение до оборудования \(без защиты\) * **8080** - простое TCP-соединение для оборудования на локальном сервере \(без защиты\) * **443** - соединение SSL/TLS для мобильных приложений и оборудования с SSL шифрованием * **9443** - соединение SSL / TLS для мобильных приложений на локальном сервере и оборудования с SSL шифрованием Оборудование может выбрать подключение к 443 \(9443\) или 80 \(8080\), в зависимости от его совместимости. Соединение между приложением и сервером всегда осуществляется через SSL/TLS шифрование, поэтому оно всегда защищено. Соединение между оборудованием и сервером зависит от ваших аппаратных возможностей. С локальным сервером Blynk тип соединения между оборудованием и сервером не так важен для безопасности, так как локальный сервер обычно размещается в локальной сети, поэтому злоумышленник не может перехватить трафик между оборудованием и сервером. ## Использование локального сервера Blynk Для обеспечения максимальной безопасности вы можете [установить Blynk server локально](../#blynk-server) и ограничить доступ к вашей локальной сети, чтобы никто, кроме вас, не мог получить доступ к серверу. В этом случае все данные хранятся локально в пределах только вашей сети и не отправлятся через Интернет. В случае локального сервера Blynk также нет необходимости защищать соединение между вашим оборудованием и сервером. Это справедливо для подключения по Ethernet и частично для соединения по Wi-Fi. В случае с Wi-Fi вы должны использовать WPA/WPA2 \(защищенный доступ к Wi-Fi\) шифрование для защиты беспроводного трафика. Алгоритмы WPA и WPA2 предлагают очень надежное шифрование, которое может защитить все данные, передаваемые по радиоканалу, при условии, что используется достаточно надежный пароль. Даже если ваши данные представляют собой обычный TCP/IP трафик, другой пользователь не сможет расшифровать захваченные пакеты. Тем не менее, убедитесь, что ваш пароль достаточно надежный, иначе единственным ограничивающим фактором для злоумышленника останется время. ## Использование SSL-шлюза Большинство платформ не способны обрабатывать SSL протокол, поэтому они подключаются по 80 порту. Однако наш [сценарий шлюза](https://github.com/blynkkk/blynk-library/blob/master/scripts/blynk-ser.sh) можно использовать для добавления SSL уровня безопасности SSL к соединениям. ```bash ./blynk-ser.sh -f SSL ``` Этот скрипт перенаправит все аппаратные соединения с порта 9443 сервера через шлюз SSL. Вы можете запустить этот скрипт на своем Raspberry Pi, настольном компьютере или даже прямо на своем роутере! **Примечание:** при использовании вашего собственного сервера вы должны перезаписать прилагаемый сертификат server.crt или указать его в сценарии с помощью ключа `--cert`: ```bash ./blynk-ser.sh -f SSL -s -p 9443 --cert=.crt ``` Flag `-f SSL` is enabled by default for USB communication so you don't have to explicit declare it. **Note:** SSL is supported by the gateway only on Linux/OSX for now If you want to skip SSL, and connect to TCP, you can also do that: Флаг `-f SSL` включен по умолчанию при соединении через USB, поэтому вам не нужно его явно объявлять. **Примечание:** Пока SSL поддерживается шлюзом только в Linux/OSX. Если вы хотите пропустить SSL и подключиться к TCP, вы также можете сделать так: ```bash ./blynk-ser.sh -t TCP ``` ================================================ FILE: ru/sharing.md ================================================ # Обмен проектами Blynk предлагает два типа обмена вашими проектами с другими людьми: * **Поделитесь доступом к вашему оборудованию.** Задумайтесь о том, чтобы дать кому-то использовать приложение от вашего проекта. Они не могут изменить интерфейс, но могут контролировать и наблюдать, что там происходит. * **Поделитесь конфигурацией вашего проекта.** Другие пользователи получат клон вашего проекта в Blynk, отсканировав QR-ссылку, но не смогут управлять вашим оборудованием. Это отлично подходит для обучения, учебных пособий и т.д. ## Общий доступ к вашему оборудованию Представьте, что вы даете кому-то приложение для управления вашим проектом. * люди, с которыми вы поделились своим проектом, не могут ничего изменить. Они могут только использовать его * вы можете обновить свое приложение, изменить макет, добавить виджеты, и оно сразу синхронизируется со всеми устройствами * вы можете отозвать доступ в любой момент Как это работает: * вы отправляете QR-код своим пользователям \(любым способом по электронной почте, распечатываете, публикуете в социальных сетях, и т.п.\) * другие скачивают приложение Blynk, сканируют ваш QR-код, и ваше приложение открывается у них готовыми к использованию. Им даже не нужно входить в систему или создавать учетную запись. Зайдите в настройки вашего проекта: ![](../.gitbook/assets/dash_settings_sharing.png) Нажмите на кнопку «Generate Link» \(Создать ссылку\): ![](../.gitbook/assets/dash_settings_sharing_generate.png) Будет сгенеририрован QR-код, которым вы можете поделиться с другими: ![](../.gitbook/assets/dash_public_sharing.png) Это оно! Теперь **Выйдите из настроек и нажмите кнопку PLAY.** Другой человек должен будет установить приложение Blynk и отсканировать QR-код с экрана для входа в систему \(сканирование из существующего профиля пока не поддерживается\); ![](../.gitbook/assets/scan_qr.png) **ПРИМЕЧАНИЕ:** Ваш проект должен быть активным, не забудьте нажать кнопку воспроизведения. **ПРЕДУПРЕЖДЕНИЕ:** Обмен QR-кодом стоит 1000 энергии, и эта энергия не подлежит восстановлению, даже если вы вообще не использовали обмен. ## Поделится своей конфигурацией проекта Если вы хотите поделиться настройками своего Проекта, не предоставляя доступ к вашему оборудованию \(например, чтобы создать учебный материал или инструкцию\) - выполните следующие действия: В настройках проекта перейдите к кнопке **Clone**. ![](../.gitbook/assets/clone.png) Она сгенерирует QR-код, которым вы можете поделиться с кем угодно. ![](../.gitbook/assets/QR.png) Другой человек **должен войти в приложение Blynk** и нажать кнопку QR в галерее проектов ![](../.gitbook/assets/QR_button_edit.png) После проверки будет создан новый проект, все виджеты, настройки, макет будут клонированы. Другому человеку понадобится достаточно энергии, чтобы клонировать ваш проект. **Ключ аутентификации будет другим!**. Никто не получит доступ к вашему оборудованию. Они просто получают копию интейрфейса и настроек. ================================================ FILE: ru/supportedhardware.md ================================================ # Поддерживаемое оборудование Blynk уже поддерживает более 400 плат, включая поддержку Arduino, Particle, ARM mbed, TI Energia, MicroPython, Node.js, OpenWRT и многих одноплатных компьютеров. Вы можете легко добавить свои собственные типы подключения \(см. [здесь](https://github.com/blynkkk/blynk-library/tree/master/examples/More/ArduinoClient) примеры для Arduino\)! ## Платформы * **Arduino** \([https://github.com/blynkkk/blynk-library](https://github.com/blynkkk/blynk-library)\) * Arduino MKR WiFi 1010 * Arduino MKR GSM 1400 * Arduino MKR NB 1500 * Arduino Uno, Duemilanove * Arduino Nano, Mini, Pro Mini, Pro Micro, Due, Mega * Arduino 101 \(Intel Curie, с BLE\) * Arduino MKR1000 * Arduino Zero * Arduino Yún \(включая WiFi и Ethernet, через Bridge\) * Arduino.org UNO WiFi * Arduino MKR VIDOR 4000 \(используйте пример для MKR WiFi 1010\) * Arduino UNO WiFi Rev.2 \(используйте пример для MKR WiFi 1010\) * **Arduino-подобные** * Blynk Board * ESP8266 \(Generic, NodeMCU, Witty Cloud, Huzzah, WeMos D1, Seeed Wio Link, etc.\) * ESP32 \(WiFi, BLE\) * Nordic nRF51/nRF52 - базовые платы * Teensy 3.2/3.1 * Blue Pill \(STM32F103C\) * Realtek RTL8710 / Ameba via [RTLduino](https://github.com/pvvx/RtlDuino) * BBC micro:bit * LightBlue Bean _, soon_ * DFRobot Bluno * RedBear Duo \(WiFi, BLE\) * RedBearLab Blend Micro * RedBearLab BLE Nano \(v1 and v2\) * Seeed Tiny BLE * Simblee BLE * RFduino BLE * The AirBoard \(BLE-Link, RN-XV\) * Feather M0 WiFi * Feather 32u4 BLE * Intel Edison * Intel Galileo * Fishino Guppy, Uno, Mega * TinyCircuits TinyDuino \(CC3000\) * Microduino/mCookie Core, Core+, CoreUSB * Wicked WildFire V2, V3, V4 * Digistump Oak * chipKIT Uno32 * Alorium XLR8 \(FPGA\) * LinkIt ONE \(WiFi only\) * **Энергеия** * Texas Instruments * CC3220SF-LaunchXL * CC3200-LaunchXL * Tiva C Connected LaunchPad * Stellaris LM4F120 LaunchPad * MSP430F5529 + CC3100 * LaunchPad MSP432 * RedBearLab \(CC3200, WiFi Mini\) * **Particle** \([https://github.com/vshymanskyy/blynk-library-spark](https://github.com/vshymanskyy/blynk-library-spark)\) * Core * Photon * Electron * RPi * SparkFun RedBoard * RedBear Duo \(WiFi & BLE\) * **ARM mbed** \([https://developer.mbed.org/users/vshymanskyy/code/Blynk/](https://developer.mbed.org/users/vshymanskyy/code/Blynk/)\) * Seeed Tiny BLE * RedBearLab BLE Nano * BBC micro:bit * STM32 Nucleo + Wiznet 5100 _, soon_ * **JavaScript** \(Node.js, Espruino, Browsers\) \([https://www.npmjs.com/package/blynk-library](https://www.npmjs.com/package/blynk-library)\) * Regular PC with Linux / Windows / OS X * Raspberry Pi \(Banana Pi, Orange Pi, ...\) * BeagleBone Black * Onion Omega * Onion Omega 2 * Intel Galileo * Intel Edison * Intel Joule * LeMaker Guitar * LeMaker Banana Pro * Samsung ARTIK 5 * PandaBoard, CubieBoard, pcDuino, Tessel 2 * VoCore, VoCore2 \(OpenWRT + [Espruino package](https://github.com/vshymanskyy/OpenWRT-Espruino-packages)\) * Espruino Pico * ... * **Python** \([https://github.com/vshymanskyy/blynk-library-python](https://github.com/vshymanskyy/blynk-library-python)\) * MicroPython * Python 2 * Python 3 * **Lua** \([https://github.com/blezek/blynk-esp](https://github.com/blezek/blynk-esp)\) * NodeMCU ## Типы подключения Arduino * USB \(Serial\), подключенный к ноутбуку или компьютеру * **Ethernet** * Arduino MKR ETH * Arduino Ethernet Shield \(W5100\) * Arduino Ethernet Shield 2 \(W5500\) * SeeedStudio Ethernet Shield V2.0 \(W5200\) * ENC28J60-based modules * **WiFi** * ESP8266 as WiFi modem \(работает с оригинальной прошивкой\) * Arduino WiFi 101 Shield * Arduino WiFi Shield * WIZnet WizFi310 * Adafruit CC3000 WiFi Breakout / Shield * RN-XV WiFly * **Bluetooth Smart \(BLE 4.0\)** * HM-10, HC-08 * DFRobot BLE-Link module * Microduino/mCookie BLE * RedBearLab BLE Mini * nRF8001-based boards \(Adafruit Bluefruit LE, etc.\) * **Bluetooth 2.0 Serial Port Profile \(SPP\)** * HC-05, HC-06, ... * **Cellular \(GSM/3G/LTE\)** * SIMCom SIM800 series \(SIM800A, SIM800C, SIM800L, SIM800H, SIM808, SIM868\) * SIMCom SIM900 series \(SIM900A, SIM900D, SIM908, SIM968\) * A6/A7 * M590 * BG96 * GPRSbee * Microduino GSM * Adafruit FONA \(Mini Cellular GSM Breakout\) * Adafruit FONA 800/808 Shield ## Сделано сообществом * [Marvell® EZ-Connect™ MW300/MW302](https://github.com/vshymanskyy/blynk-library-ez-connect) * [WIZnet-W5500-EVB](http://instructables.com/id/WIZnet-W5500-EVB-and-Blynk-App-communication) * [LabVIEW](https://github.com/juncaofish/NI-LabVIEWInterfaceforBlynk) * [Node-RED](https://github.com/gablau/node-red-contrib-blynk-ws) \(can be used as bridge to HTTP, TCP, UDP, MQTT, XMPP, IRC, OSC...\) ## Проблемные платы Эти платы не поддерживаются и не работают из коробки: * [Arduino Tian](http://www.arduino.org/products/boards/arduino-tian) Здесь список \[**известных проблем с библиотекой Blynk**\]\([https://github.com/blynkkk/blynk-library/issues?q=is%3Aissue+label%3A"for+reference"+](https://github.com/blynkkk/blynk-library/issues?q=is%3Aissue+label%3A"for+reference"+)\) ================================================ FILE: ru/troubleshooting.md ================================================ # Решение проблем ## Соединение Если у вас возникли проблемы с подключением, выполните следующие действия: 1. Убедитесь, что ваше оборудование, провода, кабели и блок питания находятся в исправном состоянии, не повреждены и т.д. Используйте качественные USB-кабели и USB-порты. 2. Проверьте проводку, используя примеры \(клиент TCP/HTTP или аналогичный\), **прилагаемые к вашему оборудованию**. * Как только вы поймете, как управлять соединением, использовать Blynk станет намного проще. 3. Попробуйте запустить команду `telnet blynk-cloud.com 80` со своего ПК, подключенного к той же сети, что и ваше оборудование. Вы должны увидеть что-то вроде: `Подключено к blynk-cloud.com`. 4. Попробуйте запустить примеры Blynk по умолчанию для вашей платформы **без изменений**, чтобы увидеть, работают ли они. * Дважды проверьте, что вы выбрали **правильный пример** для вашего типа подключения и модели оборудования. * Наши примеры содержат **комментарии и объяснения**. **Читайте их внимательно.** * Убедитесь, что ваш токен авторизации действителен \(скопирован из приложения и **не содержит пробелов и т.п.**\) * Если это не работает, попробуйте заглянуть в [печать отладочной информации в порт](../#enable-debug). 5. Готово! Добавьте свои модификации и функциональность. Наслаждайтесь Blynk! **Примечание:** Если к вашей сети подключено несколько устройств, все они должны иметь разные MAC и IP-адреса. Например, при использовании двух Arduino UNO с Ethernet расширениями, пример по умолчанию для обоих из них вызовет проблемы с подключением. Вам следует использовать пример [ручная настройка Ethernet](https://github.com/blynkkk/blynk-library/blob/master/examples/Boards_Ethernet/Arduino_Ethernet_Manual/Arduino_Ethernet_Manual.ino). ## Подключение к сети WiFi Если у вас возникли проблемы с подключением по WiFi, пожалуйста, проверьте следующие ошибки: * Вы пытаетесь подключиться к сети 'WPA & WPA2 Enterprise' \(часто используется в офисах\), а ваш шилд не поддерживает этот метод шифрования * В вашей WiFi-сети есть страница входа, которая запрашивает ввод ключа доступа \(часто используется в ресторанах\) * Безопасность вашей сети Wi-Fi запрещает полное подключение чужих устройств \(фильтрация MAC-адресов и т.п.\) * Работает Брандмауэр. Порт по умолчанию для аппаратных подключений - 80 \(8080 на локальном сервере\). Убедитесь, что он открыт. ## Задержки \(Delay\) Если вы используете длительный `delay()` или отправляете свое оборудование в спящий режим внутри `loop()`, ждите обрыва соединения и снижение производительности. _**НЕ ДЕЛАЙТЕ ЭТОГО:**_ ```cpp void loop() { ... delay(1000); // это длительная задержка, которую следует избегать other_long_operation(); // другие длинные операторы ... Blynk.run(); } ``` **Примечание:** Это также относится к обработчикам BLYNK\_READ & BLYNK\_WRITE! **РЕШЕНИЕ:** Если вам нужно выполнять действия в определенные промежутки времени - используйте таймеры, например [BlynkTimer](../#blynk-firmware-blynktimer). ## Ошибки из-за флуда Если ваш код часто отправляет много запросов на наш сервер, ваше оборудование будет отключено. Приложение Blynk может показывать "Your hardware is offline" \(Ваше оборудование отключено\). Когда `Blynk.virtualWrite` находится в `void loop`, он генерирует сотни «запросов» в секунду. Вот пример того, что может вызвать флуд. **НЕ ДЕЛАЙТЕ ЭТОГО:** ```cpp void loop() { Blynk.virtualWrite(1, value); // Эта строка отправляет сотни сообщений на сервер Blynk Blynk.run(); } ``` **РЕШЕНИЕ:** Если вам нужно выполнять действия в определенные промежутки времени - используйте таймеры, например [BlynkTimer](../#blynk-firmware-blynktimer). Использование `delay()` также не решит проблему. Это может вызвать [другую проблему](../#delay). Используйте таймеры! Если отправка сотен запросов - это то, что вам необходимо для вашего продукта, вы можете увеличить лимит на локальном сервере и в библиотеке Blynk. Для локального сервера вам необходимо изменить свойство `user.message.quota.limit` в файле `server.properties`: ```text #100 запросов в секунду на одного пользователя. user.message.quota.limit=100 ``` Для библиотеки вам нужно изменить свойство `BLYNK_MSG_LIMIT` в файле `BlynkConfig.h`: ```text //Ограничьте количество исходящих команд. #define BLYNK_MSG_LIMIT 20 ``` ## Включить отладку Чтобы включить отправку отладочной информации в серийный порт по умолчанию, добавьте код в верхней части скейтча **\(это должна быть первая строка в скейтче\)**: ```cpp #define BLYNK_DEBUG // Необязательно, запускает отладку #define BLYNK_PRINT Serial ``` И не забудьте включить серийный порт в `void setup()`: ```cpp Serial.begin(9600); ``` Вы также можете использовать запасные аппаратные последовательные порты или SoftwareSerial для вывода отладочной информации \(вам понадобится адаптер для подключения к ПК\). **Примечание:** включение режима отладки замедлит аппаратную производительность в 10 раз. ## Проблема с Geo DNS Проблема с Geo DNS больше не является проблемой. Она была решена в 2017 году. ## Сброс пароля На экране входа нажмите "Forgot password?" \(Забыли пароль?\) а затем введите адрес электронной почты и кнопку `Send`. Вы получите инструкции по электронной почте. ### Android сброс пароля 1. Откройте инструкцию в электронной почте **со своего смартфона или планшета**; 2. Нажмите кнопку «Reset now» в своем электронном письме; 3. Нажмите на значок Blynk в всплывающем окне и сбросьте пароль: ![](../.gitbook/assets/reset.png) ================================================ FILE: ru/widgets.md ================================================ # Виджеты Виджеты являются интерфейсными модулями. Каждый из них выполняет определенную функцию ввода / вывода при взаимодействии с оборудованием. Есть 4 типа виджетов: * **Контроллеры** - используется для отправки команд, которые контролируют/управляют вашим оборудованием; * **Дисплеи** - используется для визуализации данных с датчиков и других источников; * **Уведомления** - отправляет сообщения и уведомления; * **Интерфейс** - виджеты для выполнения определенных функций графического интерфейса; * **Другие** - виджеты, которые не относятся ни к одной категории; Каждый виджет имеет свои настройки. Некоторые из виджетов \(например, Bridge\) просто включают функциональность, и у них нет никаких настроек. ## Общие настройки виджетов ### Выбор пина Это один из основных параметров, который вам нужно установить. Он определяет, какой пин контролировать или читать.. ![](../.gitbook/assets/pin_selection.png) **Цыфровые Пины \(Digital Pins\)** - представляют физические пины цифрового ввода-вывода на вашем оборудовании. Выводы с поддержкой ШИМ помечены символом `~` **Аналоговые Пины \(Analog Pins\)** - представляют физические пины аналогового ввода-вывода на вашем оборудовании **Виртуальные пины \(Virtual Pins\)** - не имеют физической реализации. Они используются для передачи любых данных между приложение Blynk и вашим оборудованием. Узнайте больше о Виртуальных Пинах [здесь](../#blynk-main-operations-virtual-pins). ### Отображение данных Если вы хотите пересчитать входящие значения в определенный диапазон, вы можете использовать кнопку сопоставления значений: ![](../.gitbook/assets/display_edit_mapping.png) Допустим, ваш датчик отправляет значения от 0 до 1023. Но вы хотите в приложении отображать значения в диапазоне от 0 до 100. Когда сопоставление данных включено, входящее значение 1023 будет отображено как 100. ### РАЗДЕЛЬНО/ВМЕСТЕ \(SPLIT/MERGE\) Некоторые виджеты могут отправлять более одного значения. С помощью этого переключателя вы можете контролировать, как их отправлять. * **РАЗДЕЛЬНО**: Каждый из параметров отправляется непосредственно на пин вашего оборудовании \(например, D7\). Вам не нужно писать дополнительный код. **ПРИМЕЧАНИЕ:** В этом режиме вы отправляете несколько команд из одного виджета, это может снизить производительность вашего оборудования. **ПРИМЕР:** Если у вас есть виджет джойстика и он настроен на пины D3 и D4, то он отправит 2 команды через Интернет: ```text digitalWrite(3, value); digitalWrite(4, value); ``` * **ВМЕСТЕ:** Когда выбран режим ВМЕСТЕ, вы отправляете только 1 сообщение, состоящее из массива значений. Поэтому вам нужно разобрать его на совем оборудовании. Этот режим можно использовать только с Виртуальными пинами. **ПРИМЕР:** Добавьте виджет zeRGBa и установите его в режим ВМЕСТЕ. Выберите виртуальный пин V1 ```text BLYNK_WRITE(V1) // Существующий виджет, который записывает данные в V1 { int r = param[0].asInt(); // получить значение КРАСНОГО канала int g = param[1].asInt(); // получить значение ЗЕЛЕНОГО канала int b = param[2].asInt(); // получить значение СИНЕГО канала } ``` ### Разрядность \(Decimals\) Определяет, сколько десятичных знаков вы хотели бы видеть при перемещении ползунка. Когда выбрано «Без дроби» \(No Fraction\), ползунок будет отправлять только целочисленные значения без десятичных дробей. "1 знак" означает, что значения будут выглядеть как 1.1, 1.2, ..., 2.0 и т. Д. ### Отправка при Отжатии \(Send On Release\) Эта опция позволяет оптимизировать трафик данных на ваше оборудование. Например, когда вы перемещаете виджет джойстика, команды потоково передаются на ваше оборудование, во момент одного движения джойстика может отправляться десятки команд. Существуют варианты когда, это дейтсвительно необходимо, однако создание такой нагрузки может привести к перегрузке и сбросу оборудования. **Отправка при Отжатии** является рекомендуемой настройкой для большинства приложений. Данная настройка влключена по умолчанию. ### Интервал записи \(Write interval\) Аналогична опции «Отправка при Отжатии». Тем не менее, он позволяет вам передавать значения на ваше оборудование в течение определенного интервала. Например, установка **Интервала записи** на 100 мс означает, что при перемещении ползунка только 1 значение будет отправлено оборудованию в течение 100 мсек. Эта опция также используется для оптимизации потока трафика данных на ваше оборудование. ### Цветовой градиент \(Color gradient\) Когда вы выбираете градиент, он влияет на цвет элементов виджета на основе входящих значений. Например: вы устанавливаете виджет Указатель \(Gauge\) с параметрами Min и Max от 0 до 100 и выбираете зелено-желто-красный градиент. То когда оборудование отправляет данные: * `10`, Указатель изменит свой цвет на зеленый * `50` указатель изменит цвет на желтый * `80` указатель изменит цвет на красный Есть два типа градиентов, которые вы можете выбрать: * Теплый: Зеленый - Ораньжевый - Красный; * Холодный: Зеленый - Синий - Фиолетовый. ## Контроллеры \(Controllers\) ### Кнопка \(Button\) Works in push or switch modes. Allows to send ON and OFF \(LOW/HIGH\) values. Button sends 1 \(HIGH\) on press and sends 0 \(LOW\) on release. Работает в режиме кнопки или выключателя. Позволяет отправлять значения ВКЛ \(ON\) и ВЫКЛ \(OFF\) \(НИЗКИЙ / ВЫСОКИЙ\) \(LOW / HIGH\). Кнопка посылает 1 ВЫСОКИЙ \(HIGH\) при нажатии и 0 НИЗКИЙ \(LOW\) при отпускании. ![](../.gitbook/assets/button.png) ![](../.gitbook/assets/button_edit.png) **Пример кода:** [Базовый пример](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/BlynkBlink/BlynkBlink.ino) ### Слайдер \(Slider\) Слайдер очень похож на потенциометр. Позволяет отправлять значения в заданном диапазоне MIN / MAX. ![](../.gitbook/assets/slider.png) ![](../.gitbook/assets/slider_edit.png) **Пример кода:** [Базовый пример](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/BlynkBlink/BlynkBlink.ino) ### Таймер \(Timer\) Таймер запускает действия в определенное время. Даже если смартфон не в сети. По умолчанию время начала отправляет 1 \(HIGH\), время остановки отправляет 0 \(LOW\). Вы можете изменить это поведение на любые другие значения. Вы можете изменить настройки Таймера в режиме «Запуска». В последней версии Android также есть улучшенный таймер в виджете Обработчик событий. C [Обработчиком событий \(Eventor\)](../#widgets-other-obrabotchik-sobytij-eventor) вы можете назначить несколько таймеров на один и тот же пин, отправить любую строку/число, выбирать дни и часовой пояс. Рекомендуется использовать виджет Обработчик событий поверх виджета Таймер. Однако виджет Таймер по-прежнему подходит и для простых событий таймера. **ПРИМЕЧАНИЕ:** Виджет таймера зависит от времени сервера, а не вашего телефона. Иногда время телефона может не соответствовать времени сервера. ![](../.gitbook/assets/timer.png) ![](../.gitbook/assets/timer_edit.png) **ПРИМЕЧАНИЕ:** Виджет таймера зависит от времени сервера, а не вашего телефона. Иногда время телефона может не соответствовать времени сервера. **Пример кода:** [Таймер](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Timer/Timer.ino) ### Джойстик \(Joystick\) Управление сервоприводом в 4 направлениях. #### Параметры: * режим РАЗДЕЛЬНО/ВМЕСТЕ \(SPLIT/MERGE\) - читаем [здесь](../#vidgety-obschie-nastroyki-vidgetov-razdelno-vmeste-split-merge) Виджеты ОБщие настройки виджетов РАЗДЕЛЬНО/ВМЕСТЕ \(SPLIT/MERGE\) * **Вращать при наклоне \(Rotate on Tilt\)** Когда этот параметр включен, Джойстик будет автоматически вращаться, если вы будете использовать смартфон в горизонтальной положении. * **Автовозрат \(Auto-Return\)** Когда этот парамтер выключен, ручка джойстика не вернется в центральное положение. Она останется там, где вы ее оставили. ![](../.gitbook/assets/joystick.png) ![](../.gitbook/assets/joystick_edit.png) **Пример кода:** [Джойстик Две Оси](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/JoystickTwoAxis/JoystickTwoAxis.ino) ### ЗеБРа \(zeRGBa\) ЗеБРа - это обычный RGB контроллер \(палитры цветов\). #### Настройки: * **Раздельный \(SPLIT\)**: Каждый из параметров отправляется непосредственно на пин вашего оборудования \(например, D7\). Вам не нужно писать код. **ПРИМЕЧАНИЕ:** В этом режиме вы отправляете одновременно несколько команд из одного виджета, что может снизить производительность вашего оборудования. **ПРИМЕР:** у вас есть виджет ЗеБРа и для него было установлено значение D1, D2, D3, он отправит 3 команды через Интернет: ```cpp digitalWrite(1, r); digitalWrite(2, g); digitalWrite(3, b); ``` * **Объединенный \(MERGE\)**: Когда выбран этот режим, вы отправляете только 1 сообщение, состоящее из массива значений. Но в последствии вам нужно разобрать сообщение на своем оборудовании. Этот режим можно использовать только с виртуальными пин-ами. **ПРИМЕР:** добавьте виджет ЗеБРа и установите его в Объединенный режим \(MERGE\). Выберите виртуальный контакт V1. ```cpp BLYNK_WRITE(V1) // ЗеБРа назначен на V1 { // получим значение КРАСНОГО канала int r = param[0].asInt(); // получим значение ЗЕЛЕНОГО канала int g = param[1].asInt(); // получим значение СИНЕГО канала int b = param[2].asInt(); } ``` * **Отправка при Отжатии \(Send On Release\)** доступно для большинства виджетов контроллеров и позволяет уменьшить трафик данных на вашем оборудовании. Например, когда вы перемещаете виджет джойстика, команды непрерывно передаются на аппаратное устройство, во время одного движения джойстика вы можете отправлять десятки команд. Есть случаи, когда это необходимо, однако создание такой нагрузки может привести к сбросу оборудования. Мы рекомендуем включить функцию Отправка при Отжатии для большинства случаев, если вам не требуется мгновенная обратная связь. Эта опция включена по умолчанию. * **Интервал записи \(Write interval\)** Похоже на вышеуказанный вариант. Однако, позволяет вам передавать значения на ваше оборудование в через определенные интервалы времени. Например, установка интервала записи на 100 мс означает, что при перемещении ползунка на аппаратное обеспечение будет отправлено только 1 значение в течение 100 мс. Эта опция также используется для уменьшения трафика данных на ваше оборудовании. ### Шаговое управление \(Step Control\) Шаговое управление похоже на две кнопки, назначенные одному пин-у. Одна кнопка увеличивает ваше значение на установленный шаг, а другая уменьшает его. Это очень полезно для случаев использования, когда вам нужно точно изменять ваши значения, но вы не можете достичь такой точности с помощью виджета Cлайдера. **Отправить шаг \(Send Step\)** опция позволяет вам отправлять на оборудование каждый шаг нвместо фактического значения виджета. **Зациклить значения \(Loop value\)** опция позволяет сбросить Шаговый виджет на начальное значение при достижении максимального. **Пример кода:** [Базовый пример](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/BlynkBlink/BlynkBlink.ino) ## Дисплеи ### Отображение значений \(Value Display\) Отображает входящие данные с ваших датчиков или виртуальных пин-ов. ![](../.gitbook/assets/display.png) ![](../.gitbook/assets/display_edit.png) Может работать в двух режимах: * режим PUSH \(выберается в списке выбора частоты считывания\); * режим частоты считываний; В режиме PUSH вы обновляете значения виджета со стороны оборудования с помощью кода: ```cpp Blynk.virtualWrite(V1, val); ``` В этом режиме каждое сообщение, которое отправляет аппаратное устройство автоматически сохраняется на сервере. Режим PUSH не требует, чтобы приложение было онлайн или открыто. В режиме частоты считывния вам необходимо выбрать интервал обновления данных, и приложение будет запускать события считывния с требуемой периодичностью. Ваше приложение должно быть открыто и запущено для отправки запросов на оборудование. Вам не нужен код для аналоговых и цифровых выводов в даном случае. Однако для виртуальных выводов вам необходимо использовать следующий код: ```cpp //вызывать из приложения BLYNK_READ(V1) { //отправить в приложение Blynk.virtualWrite(V1, val); } ``` #### Отображение значений на рабочем столе Вы также можете добавить виджет отображение значения на рабочий стол Android. В этом случае отображение значений работает по протоколу HTTPS. Имейте в виду, что в режиме «Рабочий стол» отображение значений имеет несколько ограничений. Виджет будет обновлять свое состояние только один раз в 15 минут. Вы можете изменить это органичение через настройки виджета. Однако интервал обновления менее 15 минут не гарантируется. Вы также можете изменить размер отображаемого значения на рабочем столе - просто сделайте длинный тап на виджете и измените его размер на необходимый. **Примечание:** Добавление виджета на главный экран стоит 100 энергии. Эта энергия не возвращяется при удалении виджета. **Примечание:** Виджеты рабочего стола для локальных серверов Blynk требуют открытия порта 8080. **Пример кода:** [Базовый пример](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/BlynkBlink/BlynkBlink.ino) ### Значение переменной \(Labeled Value\) Отображает входящие данные с ваших датчиков или виртуальных пин-ов. Это лучшая версия «Отображения значений», так как в этом виджете есть строка форматирования, поэтому вы можете форматировать входящее значение в любую нужную вам строку. ![](../.gitbook/assets/display%20%281%29.png) ![](../.gitbook/assets/labeled_value_edit.png) Может работать в 2 режимах: * режим PUSH \( выберитается из списка частоты считывания\); * режим частоты считывания; В режиме PUSH вы должны обновлять отображение значений на аппаратной устройстве с помощью кода: ```cpp Blynk.virtualWrite(V1, val); ``` В этом режиме каждое сообщение, которое аппаратное устройств отправляет на сервер, автоматически сохраняется на сервере. Режим PUSH не требует, чтобы приложение было онлайн или запущено. В режиме частоты считывания вам нужно выбрать интервал обновления, и приложение будет запускать события с требуемым интервалом. Ваше приложение должно быть открыто и запущено для отправки запросов на оборудование. В данном случае вам не нужен код для аналоговых и цифровых пин-ов. Однако для виртуальных пин-ов вам необходимо использовать следующий код: ```cpp //вызываем из приложения BLYNK_READ(V1) { //отправляем в приложение Blynk.virtualWrite(V1, val); } ``` #### Параметры форматирования Предположим, ваш датчик отправляет число 12.6789 в приложение Blynk. Поддерживаются следующие параметры форматирования: `/pin/` - отображает значение без форматирования \(12.6789\) `/pin./` - отображает значение без десятичной части \(13\) `/pin.#/` - отображает значение с одним десятичным знаком \(12.7\) `/pin.##/` - отображает значение с двумя десятичными знаками \(12.68\) ![](../.gitbook/assets/labeled_value_format_edit.png) #### Значение переменной на главном экране Вы также можете добавить значение переменной на рабочий стол Android. В этом случае значение переменной работает через HTTPS протокол. Имейте в виду, что в режиме «Рабочий стол» значение переменной имеет некторые ограничения. Значение переменной будет обновлять свое состояние только один раз в 15 минут. Вы можете изменить этот параметр через настройки виджета. Однако интервал обновления менее 15 минут не гарантируется. Вы также можете изменить размер виджета Значение переменной на рабочем столе - просто сделайте длинный тап на виджете и измените его размер на необходимый. **Примечание:** Добавление виджета на домашний экран стоит 100 энергии. Эта энергия не восстанавливается. **Примечание:** Виджеты главного экрана для локальных серверов Blynk требуют открытия порта 8080. **Пример кода:** [Светодиод](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/BlynkBlink/BlynkBlink.ino) ### Светодиод \(LED\) Простой светодиод для индикации. Вам нужно отправить 0, чтобы выключить светодиод. И 255 для того, чтобы включить светодиод. Или просто используйте Blynk API, как описано ниже: ```cpp //регистрируемся на виртуальном пине 1 WidgetLED led1(V1); led1.off(); led1.on(); ``` Все значения от 0 до 255 изменяют яркость светодиода: ```cpp WidgetLED led2(V2); //установить яркость светодиода на 50%. led2.setValue(127); ``` Вы также можете изменить цвет светодиода с помощью кода: ```cpp //#D3435C - Красный в RGB формате Blynk.setProperty(V1, "color", "#D3435C"); ``` ![](../.gitbook/assets/led.png) #### Светодиод на рабочем столе Вы можете добавить виджет светодиод на рабочий стол Android. В этом случае светодиод работает через протокол HTTPS. Имейте в виду, что в режиме «Рабочий стол» виджет светодиода имеет некоторые ограничения. Светодиод будет обновлять свое состояние только один раз в 15 минут. Вы можете изменить этот интервал через настройки виджета. Однако интервал обновления менее 15 минут не гарантируется. **Примечание:** Добавление виджета на рабочий стол стоит 100 энергии. Эта энергия не возвращается при удалении виджета. **Примечание:** Виджеты рабочего стола для локальных серверов Blynk требуют открыть порт 8080. **Пример кода:** [Диод](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/LED/LED_Blink/LED_Blink.ino) ### Указатель \(Gauge\) Отличный визуальный способ отображения входящих числовых значений. ![](../.gitbook/assets/gauge.png) ![](../.gitbook/assets/gauge_edit.png) Может работать в 2 режимах: * режим PUSH \(выберается в списке выбора частоты считывания\); * режим частоты считываний; В режиме PUSH вы обновляете значения указателя со стороны оборудования с помощью кода: ```cpp Blynk.virtualWrite(V1, val); ``` В этом режиме каждое сообщение, которое отправляет аппаратное устройство автоматически сохраняется на сервере. Режим PUSH не требует, чтобы приложение было онлайн или открыто. В режиме частоты считывния вам необходимо выбрать интервал обновления данных, и приложение будет запускать события считывния с требуемым периодичностью. Ваше приложение должно быть открыто и запущено для отправки запросов на оборудование. Вам не нужен код для аналоговых и цифровых выводов в даном случае. Однако для виртуальных выводов вам необходимо использовать следующий код: ```cpp //вызывать из приложения BLYNK_READ(V1) { //отправить в приложение Blynk.virtualWrite(V1, val); } ``` #### Параметры форматирования Указатель также имеет поле «Label» \(Метка\), которое позволяет использовать форматирование. Предположим, ваш датчик отправляет число 12.6789 в приложение Blynk. Поддерживаются следующие параметры форматирования: `/pin/` - отображает значение без форматирования \(12.6789\) `/pin./` - отображает значение без десятичной части \(13\) `/pin.#/` - отображает значение с одним десятичным знаком \(12.7\) `/pin.##/` - отображает значение с двумя десятичными знаками \(12.68\) #### Другие опции Вы также можете изменить метку прибора с помощью: ```cpp Blynk.setProperty(V1, "label", "Мое значение метки"); ``` или изменить цвет \(кодировка RGB\): ```cpp //#D3435C - Красный цвет Blynk.setProperty(V1, "color", "#D3435C"); ``` **Пример кода:** [Базовый пример](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/BlynkBlink/BlynkBlink.ino) ### ЖК дисплей \(LCD\) Это обычный ЖК-дисплей 16x2, "сделанный" на нашем секретном предприятии в Китае. Виджет может работать в двух режимах: * Простой \(Simple\) * Расширенный \(Advanced\) #### Простой режим \(Simple\) В простом режиме ваш ЖК-виджет работает как обычный виджет с частотой чтения. В режиме частоты считывания вам нужно выбрать интервал обновления данных, и приложение будет запускать события с требуемым интервалом. Ваше приложение должно быть открыто и запущено для отправки запросов на оборудование. В данном случае вам не нужен код для аналоговых и цифровых пин-ов. Однако для виртуальных пин-ов вам необходимо использовать следующий код: ```cpp //вызываем из приложения BLYNK_READ(V1) { //отправляем в приложение Blynk.virtualWrite(V1, val); } ``` В простом режиме ЖК-дисплей также поддерживает параметры форматирования. #### Параметры форматирования Предположим, ваш датчик отправляет число 12.6789 в приложение Blynk. Поддерживаются следующие параметры форматирования: `/pin/` - отображает значение без форматирования \(12.6789\) `/pin./` - отображает значение без десятичной части \(13\) `/pin.#/` - отображает значение с одним десятичным знаком \(12.7\) `/pin.##/` - отображает значение с двумя десятичными знаками \(12.68\) ![](../.gitbook/assets/lcd_format_edit.png) **Пример кода:** [ЖК дисплей простой режим - PUSH](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/LCD/LCD_SimpleModePushing/LCD_SimpleModePushing.ino) **Пример кода:** [ЖК дисплей простой режим - 1 сек](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/LCD/LCD_SimpleModeReading/LCD_SimpleModeReading.ino) #### Расширенный режим \(Advanced\) Расширенный режим предназначен для опытных пользователей. Позволяет использовать специальные команды для управления ЖК-дисплеем. #### Команды Инициируем переменную ЖК-дисплея: ```cpp WidgetLCD lcd(V1); ``` Отправим сообщение: ```cpp lcd.print(x, y, "Ваше сообщение"); ``` Где `x` - позиция символа \(0-15\), `y` - номер строки \(0 или 1\), Очистка ЖК-дисплея: ```cpp lcd.clear(); ``` ![](../.gitbook/assets/lcd.png) ![](../.gitbook/assets/lcd_edit.png) **Пример кода:** [ЖК-дисплей расширенный режим](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/LCD/LCD_AdvancedMode/LCD_AdvancedMode.ino) ### Диаграмма \(SuperChart\) Диаграмма используется для живой визуализации и хранения данных. Вы можете использовать виджет для логирования данных датчиков, бинарных событий и многого другого. Чтобы использовать виджет Диаграмма, вам нужно будет передать данные с оборудования с желаемым интервалом, используя таймеры. [Здесь приведен](https://examples.blynk.cc/?board=ESP8266&shield=ESP8266%20WiFi&example=GettingStarted%2FPushData) базовый пример передачи данных. #### Взаимодействие: * **Переключение между режимами текущий и временной** Нажмите диапазоны времени в нижней части виджета, чтобы изменить масштаб Диаграммы по времени. * **Тап по легенде графиков** показать или скрыть поток данных. * **Долгий тап на графике** покажет метку времени и соответствующие значения. ![](../.gitbook/assets/tapnhold_charts.png) * **Быстро проведите пальцем влево или вправо, чтобы увидеть предыдущие данные** впоследствии вы можете прокручивать данные назад и вперед в пределах заданного временного диапазона. ![](../.gitbook/assets/swipe_charts.png) * **Полноэкранный режим** нажмите эту кнопку, чтобы открыть полноэкранный режим в альбомной ориентации. ![](../.gitbook/assets/fullscreen_charts.png) Чтобы выйти из режима полного экрана, просто поверните телефон обратно в портретный режим. График должен вращаться автоматически. В полноэкранном режиме вы увидите X \(время\) и несколько шкал Y. Полноэкранный режим можно отключить в настройках виджета. * **Кнопка меню** Кнопка меню откроет дополнительные функции: * Экспорт в CSV * Стереть данные на сервере ![](../.gitbook/assets/menu_charts.png) #### Настройки диаграммы: * **Заголовок диаграммы \(Chart Title\)** общее наименование диаграммы. * **Размер шрифта заголовка \(Title Font Size\)** выберите из 3 размеров шрифта. * **Выравнивание заголовка \(Title Alignment\)** выберите выравнивание заголовка диаграммы. Этот параметр влияет на положение заголовка и легенды в виджете. * **Показать ось X \(время\) \(Show x-axis \(time\)\)** выберите настройку, если хотите показать шкалу времени внизу графика. * **Автоматическое масштабирование для всех потоков данных \(Override Auto Scaling for All Datastreams\)** отключение этой опции позволит выполнить ручную настройку для оси Y \(см. ниже\). * **Выбор масштаба времени \(Time ranges picker\)** Позволяет выбрать необходимые периоды \(`15m`,`30m`, `1h`,`3h`, ...\) и разрешение для вашего графика. Разрешение определяет, насколько подробные ваши данные. Прямо сейчас график поддерживает два типа разрешения: `standard` и `high`. Разрешение также зависит от выбранного периода. Например, `standard` разрешение для `1d` означает, что вы будете получать 24 значения в день \(одно в час\), а при `high` разрешении вы будете получать за`1d` 1440 значений в день \(одно в минуту\). * **Потоки данных \(Datastreams\)** добавить потоки данных \(см. ниже, как настроить потоки данных\). #### Настройки потоков данных Виджет поддерживает до 4 потоков данных. Нажмите значок настроек потоков данных, чтобы открыть настройки. ![](../.gitbook/assets/datastream_charts.png) **Дизайн \(Design\)** выберите доступные типы диаграмм: * Линейная \(Line\) * С областями \(Area\) * Гистограмма \(Bar\) * Бинарная \(Binary\) \(приведение данных к двоичному виду\) **Цвет \(Color\)** выберите сплошные цвета или градиенты. **Источник и ввод \(Source and input\)** - Вы можете использовать три типа источника данных: **1. Виртуальный пин \(Virtual Pin\)** - выберите желаемое устройство и виртуальный пин для получения данных. **2. Теги \(Tags\)** - диаграмма может агрегировать данные с нескольких устройств, используя встроенные функции агрегирования. Например, если у вас есть 10 датчиков температуры, посылающих температуру с заданным интервалом, Вы можете отобразить среднее значение от 10 датчиков в виджете. Использование тегов: * [**Добавить Тэг**](http://docs.blynk.cc/#blynk-main-operations-control-of-multiple-devices-tags) на каждое устройство, с которого вы хотите агрегировать данные. Это можно сделать в настройках проекта Blynk. * **Отправить данные в виртуальный пин \(Push data to the same Virtual Pin\)** на каждое устройство. \(т.е. `Blynk.virtualWrite (V0, temperature);`\) * **Выберите тег в качестве источника \(Choose Tag as a source\)** в виджете Диаграмма и используйте пин, куда поступают данные \(т.е. V0\) **Добступные функции:** * `SUM` будет суммировать все входящие значения в указанный виртуальный пин со всех устройств, помеченные выбранным тегом * `AVG` будет вычислять среднее значение * `MED` найдет среднее значение * `MIN` будет вычислять минимальное значение * `MAX` будет вычислять максимальное значение **ВАЖНО: Теги не работают в режиме реального времени.** **3.** [**Выбор устройства \(Device Selector\)**](https://github.com/blynkkk/blynkkk.github.io/tree/master/mobile/ru/%20device_selector.md) Если вы добавите виджет Выбор устройства в свой проект, вы можете использовать его в качестве источника данных для Диаграммы. В том случае, когда вы меняете устройство, диаграмма будет автоматически обновляться. #### Настройки оси Y \(Y-Axis Settings\) Cуществует 4 режима масштабирования данных вдоль оси Y, активируется после отключения общей настройки виджета "Автоматическое масштабирование для всех потоков данных \(Override Auto Scaling for All Datastreams\)". **1. Авто \(Auto\)** Данные будут автоматически масштабироваться на основе минимальных и максимальных значений заданного периода времени. Это лучший вариант для начинающих. **2. Минимальный/Максимальный \(Min/Max\)** Когда выбран этот режим, шкала Y будет установлена на выбранные вами границы значений. Например, если ваше оборудование отправляет данные со значениями от -100 до 100, вы можете установить эти границы и данные графика будут отображены полностью. ![](../.gitbook/assets/yScale_manual_charts.png) Вы также можете визуализировать данные в другом диапазоне. Допустим, входящие данные имеют значения в диапазоне 0-55, но вы хотели бы видеть только значения в диапазоне 30-50. Вы можете настроить диапазон, но если значения не соответствуют заданному масштабу оси Y, диаграмма будет обрезана. **3. Процент от высоты \(% of Height\)** Эта опция позволяет автоматически масштабировать входящие данные на виджете и размещать их так, как вы хотите. В этом режиме вы устанавливаете процент высоты виджета на экране от 0% до 100%. ![](../.gitbook/assets/yheight2_charts.png) Если вы установите диапазон 0-100%, это будет полная автоматическая шкала. Независимо от того, в каком диапазоне поступают данные, он всегда будет масштабирован по всей высоте виджета. Если вы установите его на 0-25%, то график будет отображаться только на 1/4 высоты виджета. ![](../.gitbook/assets/yheight2_manual_charts.png) Этот параметр очень полезен для **Бинарной диаграммы** или для визуализации нескольких потоков данных на одной и той же диаграмме разными способами. ![](../.gitbook/assets/binary_charts.png) **4. Дельта \(Delta\)** Пока данные остаются в пределах заданного значения дельты, график будет автоматически масштабироваться в этом диапазоне. Если дельта превышает диапазон, график автоматически масштабируется до минимальных/максимальных значений указанного периода. **Суффикс \(Suffix\)** Здесь вы можете указать суффикс, который будет отображаться со значениями во время длительного тап на графике. **Разрядность \(Decimals\)** Определяет формат числовых значений, когда вы нажимаете и удерживаете палец на графике. Возможные варианты: \#, \#.\#, \#.\#\#, и т.д. **Соединиить отсуствующие точки графика \(Connect Missing Data Points\)** Если этот переключатель включен, то Диаграмма соединит все точки, даже если данные частично отсуствуют. ![](../.gitbook/assets/datapoints1_charts.png) Если для него установлено значение «ВЫКЛ», то вы увидите пропуски в случае отсутствия данных. ![](../.gitbook/assets/datapoints2_charts.png) **Настройки Бинарной диаграммы \(Binary Chart Settings\)** Этот тип диаграммы полезен для построения двоичных данных, например, когда устройство было включено или выключено, или когда было обнаружено движение или когда был достигнут определенный порог значений. Вам необходимо указать точку **Перехода \(FLIP\)**, которая будет точкой, в которой входящие данные будут принимать состояние `ИСТИНА (TRUE)` или `ЛОЖЬ (FALSE)`. Например, вы отправляете данные в диапазоне от 0 до 1023. Если вы установите `512` в качестве точки **Перехода \(FLIP\)**, то все, что выше `512` \(исключая 512\), будет записано как `ИСТИНА (TRUE)`, любое значение ниже `512` \(включая 512\) будет `ЛОЖЬ (FALSE)`. Другой пример: если вы отправляете `0 и 1` и устанавливаете `0` в качестве точки **Перехода FLIP**, то `1` будет `ИСТИНА`, а `0` будет `ЛОЖЬ`. **Маркеры состояния \(State Labels\):** Здесь вы можете указать, как `ИСТИНА/ЛОЖЬ` должны отображаться на графике когда вы нажимаете и удерживаете палец. Например, вы можете установить значение `ИСТИНА` как `Оборудование ВКЛ`, `ЛОЖЬ` как `Оборудование ВЫКЛ`. ### Терминал \(Terminal\) Отображает данные с вашего оборудования. Позволяет отправить любую строку с вашего оборудования. Терминал всегда хранит последние 25 сообщений, которые ваше оборудование отправило в Blynk. Этот ограничение может быть увеличено в настройках локального сервера с помощью параметра `terminal.strings.pool.size`. С этим виджетом Вы можете использовать специальные команды: ```cpp // Печатает значения, как Serial.print terminal.print(); // Печатает значения, как Serial.println() terminal.println(); // Записать необработанные данные в буффер terminal.write(); // Убедится, что все данные были отправлены с устройства в терминал terminal.flush(); // Стереть все данные в терминале terminal.clear(); ``` ![](../.gitbook/assets/terminal.png) ![](../.gitbook/assets/terminal_edit.png) **Пример кода:** [Терминал](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Terminal/Terminal.ino) ### Видео трансляция \(Video Streaming\) Простой виджет, который позволяет отображать прямой эфир и потокове видео. Виджет поддерживает протоколы RTSP \(RP, SDP\), HTTP/S прогрессивной потоковой передачи, HTTP/S прямого эфира. Для получения дополнительной информации, пожалуйста ознакомтесь с [официальной документацией Android](https://developer.android.com/guide/appendix/media-formats.html). На данный момент команда Blynk не предоставляет потоковые серверы. Таким образом, вы можете осуществлять потоковую передачу непосредственно с ваше камеры или использовать сторонние сервисы, а также запустить собственны потоковый сервер \(например, на оборудовании Raspberry\). Вы можете остановить/запустить видео поток, нажав на сам виджет. Вы можете изменить URL-адрес видео потока с аппаратного устройства при помощи кода: ```cpp Blynk.setProperty(V1, "url", "http://my_new_video_url"); ``` ### Индикатор уровня \(Level Display\) Отображает входящие данные с ваших датчиков или виртуальных пин-ов. Отображение уровня очень похоже на индикатор выполнения процесса, это очень красивый и причудливый вид для индикации «выполненных» событий, например «уровня заряда батареи». Вы можете обновить отображение значения с аппаратной стороны с помощью кода: ```cpp Blynk.virtualWrite(V1, val); ``` Каждое сообщение, которое аппаратное устройство отправляет на сервер, автоматически сохраняется на сервере. Режим PUSH не требует, чтобы приложение было онлайн или запущено. **Пример кода:** [Пример PUSH](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/PushData/PushData.ino) ## Уведомления \(Notifications\) ### Твиттер \(Twitter\) Виджет Твиттер соединяет вашу учетную запись сети Twitter с Blynk и позволяет отправлять "твиты" с вашего оборудования. ![](../.gitbook/assets/TwitterON.png) Пример кода: ```cpp Blynk.tweet("Привет, Blynk-еры! Мой Arduino может слать твиты!"); ``` Ограничения : * нельзя отправлять 2 твита с одним и тем же сообщением \(это политика Твиттера\) * разрешен только 1 твит за 5 секунд ### Кодировка в Твиттере Библиотека обрабатывает все строки в кодировке UTF-8. Если вы столкнулись с проблемами, попробуйте напечатать ваше сообщение на последовательный порт и проверить, работает ли оно \(COM терминал должен быть настроен на кодировку UTF-8\). Если не работает, вам следует проверить поддержку UTF-8 вашего компилятора. Если работает, но ваше сообщение обрезано - вам нужно увеличить длины сообщения \(все символы UTF-8 потребляют как минимум вдвое больше байт информации\). ### Увеличение лимита длины сообщения Вы можете увеличить максимальную длину сообщения, поместив \(до включения Blynk\) в верхнюю часть своего кода строку: ```cpp #define BLYNK_MAX_SENDBYTES 256 // По умолчанию 128 байт ``` **Пример кода:** [Твиттер](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Twitter/Twitter.ino) ### Электронная почта \(Email\) Виджет электронной почты позволяет отправлять электронные письма с вашего оборудования на любой адрес. Пример кода: ```cpp Blynk.email("my_email@example.com", "Тема", "Текст вашего сообщения"); ``` Код содержит первое поле `to`. С помощью этого поля вы можете определить получателей электронной почты в приложении. Вы можете пропустить поле `to`, если хотите отправить электронное письмо на адрес электронной почты используемый для входа в приложение Blynk: ```cpp Blynk.email("Тема", "Текст вашего сообщения"); ``` Вы можете отправить электронное писбом в форматах либо `text/html`, либо `text/plain` \(помните что некоторые клиенты не поддерживают `text/html`\). Вы можете изменить формат содержимого электронного письма в настройках виджета. Дополнительно в письме вы можете использовать заполнители/переменные `{DEVICE_NAME}`, `{DEVICE_OWNER_EMAIL}` и `{VENDOR_EMAIL}` \(для локального сервера\) в полях `to` \(кому\),`subject` \(тема\) и `body` \(текст сообщения\): ```cpp Blynk.email("{DEVICE_OWNER_EMAIL}", "{DEVICE_NAME} : Тревога", "Ваше устройство {DEVICE_NAME} имеет критическую ошибку!"); ``` ![](../.gitbook/assets/mail.png) **Недостатки:** * Максимально допустимые ограничения \(почта + тема + длина сообщения\) = 120 символов. Однако вы можете увеличить этот лимит при необходимости добавив `#define BLYNK_MAX_SENDBYTES XXX` к вашему коду. Где `XXX` - это максимальная длина вашего письма в символах. Например, для ESP вы можете установить максимальную длину 1200 символов `#define BLYNK_MAX_SENDBYTES 1200`. Параметр `#define BLYNK_MAX_SENDBYTES 1200` должен быть опредлен в коде до включения Blynk. * Разрешено отправлять 1 электронное письмо в течение 5 секунд; * Если вы используете Gmail сервис \(Google\), вы ограничены 500 письмами в день. Другие провайдеры могут иметь аналогичные ограничения, поэтому, пожалуйста, будьте внимательны; * Пользователи Blynk сервера ограничены 100 сообщениями в день; ### Кодировка в электронной почте Библиотека обрабатывает все строки в кодировке UTF-8. Если у вас возникли проблемы, попробуйте напечатать ваше сообщение в терминал COM порта и посмотрите на результат \(терминал должен быть настроен на кодировку UTF-8\). Если не работает, возможно, вам следует также прочитать о поддержке кодировок вашего компилятора. Если работает, но ваше сообщение обрезано - вам нужно увеличить ограничение длины сообщения \(т.к. все символы кодировки UTF-8 потребляют как минимум вдвое больше байт информации если символы не Латинские\). ### Увеличение лимита длины сообщения Вы можете увеличить максимальную длину сообщения, поместив в верхнюю часть своего кода строку \(до опредления Blynk\): ```cpp #define BLYNK_MAX_SENDBYTES 256 // По умолчанию 128 байт ``` **Пример кода:** [Электронная почта](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Email/Email.ino) ### Всплывающие уведомления \(Push Notifications\) Виджет Push-уведомлений позволяет отправлять уведомления с вашего оборудования на ваше Android/iOS устройство. В настоящее время он также содержит три дополнительные опции: * **Уведомлять, когда оборудование отключено** \(Notify when hardware offline\) - вы получите push-уведомление, если ваше оборудование отключилось. * **Автономный период игнорирования** \(Offline Ignore Period\) - определяет, как долго оборудование может находиться в режиме ожидания \(после того, как оно отключилось\) перед отправкой уведомления. В случае превышения периода ожидания будет отправлено уведомление «Аппаратное отключение». Вы не получите уведомление, если оборудование переподключится в течение указанного периода. * **Приоритет** \(Priority\) - высокий \(high\) приоритет дает больше шансов, что ваше сообщение будет доставлено без задержек. См. более подробное объяснение [здесь](https://developers.google.com/cloud-messaging/concept-options#setting-the-priority-of-a-message). **ПРЕДУПРЕЖДЕНИЕ**: высокий приоритет способствует большей разрядке батареи, по сравнению с обычными приоритетом уведомлений. ![](../.gitbook/assets/push.png) Пример кода: ```cpp Blynk.notify("Привет, Blynk-еры! Мое оборудование может отправлять уведомления!"); ``` Вы также можете использовать переменные/заполнители для имени устройства, который будет заменен с сервера именем вашего устройства: ```cpp Blynk.notify("Привет, Blynk-еры! Мой {DEVICE_NAME} может отправлять уведомления!"); ``` Ограничения: * Максимально допустимая длина уведомления составляет 120 символов; * Каждое устройство может отправлять только 1 уведомление каждые 5 секунд; ### Кодировка всплывающих уведомлений Библиотека обрабатывает все строки как в кодировке UTF-8. Если вы столкнулись с проблемами, попробуйте отправить ваше сообщение на последовательный порт и посмотреть, работает ли оно \(терминал должен быть настроен на кодировку UTF-8\). Если так не работает, возможно, вам следует прочитать о поддержке кодировки UTF-8 вашего компилятора. Если работает, но ваше сообщение урезано - вам необходимо увеличить ограничение длины сообщения \(все символы UTF-8 потребляют как минимум вдвое больше байт информации\). ### Увеличение лимита длины уведомления Вы можете увеличить максимальную длину сообщения, поместив строку \(до включения Blynk\) в верхнюю часть своего кода: ```cpp #define BLYNK_MAX_SENDBYTES 256 // По умолчанию 128 байт ``` **Пример кода:** [Всплывающие уведомления](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/PushNotification/PushNotification_Button/PushNotification_Button.ino) ## Интерфейсы ### Вкладки \(Tabs\) Единственная цель виджета Вкладки - расширить пространство вашего проекта. Чтобы редактировать виджет Вкладок - просто нажмите на выбранную вкладку. Вы можете перетаскивать виджеты между вкладками. Из списка можно удалить только последнюю вкладку: чтобы удалить ее, проведите пальцем влево по ее названию в экране настроек виджета. Максимальное количество вкладок на iOS составляет 4. Максимальное количество вкладок на Android - 10. Оставайтесь с нами для предстоящего редизайна виджета вкладок! ![](../.gitbook/assets/tabs_settings.png) ### Меню \(Menu\) Виджет Меню позволяет отправлять команды на ваше оборудование на основе выборного списка, сделанного вами в пользовательском интерфейсе. Меню отправляет индекс выбранного элемента спика, а не саму строку. Отправляемый индекс начинается с 1. Он работает так же, как типовой элемент "Комбинированный список" \([ComboBox](https://ru.wikipedia.org/wiki/%D0%9A%D0%BE%D0%BC%D0%B1%D0%B8%D0%BD%D0%B8%D1%80%D0%BE%D0%B2%D0%B0%D0%BD%D0%BD%D1%8B%D0%B9_%D1%81%D0%BF%D0%B8%D1%81%D0%BE%D0%BA)\). ![](../.gitbook/assets/menu_edit.png) Пример кода: ```cpp BLYNK_WRITE { switch (param.asInt()) { case 1: { // Пункт 1 Serial.println("Выбран Пункт 1"); break; } case 2: { // Пункт 2 Serial.println("Выбран Пункт 2"); break; } } } ``` Вы также можете назначить пункты меню со стороны оборудования с помощью кода: ```cpp Blynk.setProperty(V1, "labels", "label 1", "label 2", "label 3"); ``` **Пример кода:** [Меню](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Menu/Menu.ino) ## Ввод времени \(Time Input\) Виджет Ввода времени позволяет вам выбрать время начала/окончания, день недели, часовой пояс, значения в формате до полудня/после полудня и отправить их на ваше оборудование. В настоящее время поддерживаются следующие форматы: `ЧЧ:ММ` и `ЧЧ:ММ AM/PM`. Аппаратное устройстов будет отсчитывать время пользовательского интерфейса в виде секунд дня \(`3600 * часов + 60 * минут`\) для запуска/остановки времения. Время, которое виджет отправляет оборудованию, является локальным временем пользователя. Индексы по выбранных дней: ```text Понедельник - 1 Вторник - 2 ... Суббота - 6 Воскресенье - 7 ``` Вы также можете изменить состояние виджета в интерфейсе пользователя. Смотрите ниже примеры кода. **Пример кода:** [Простой Ввод времени для времени начала](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/TimeInput/SimpleTimeInput/SimpleTimeInput.ino) **Пример кода:** [Расширенный Ввод времени](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/TimeInput/AdvancedTimeInput/AdvancedTimeInput.ino) **Пример кода:** [Обновление Ввода времени в пользовательском интерфейсе](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/TimeInput/UpdateTimeInputState/UpdateTimeInputState.ino) ### Карта \(Map\) Виджет Карты позволяет устанавливать точки/флажки на карте со стороны оборудования. Это очень полезный виджет, если у вас есть несколько устройств, и вы хотите отслеживать их позиции на карте. Вы можете отправить точку на карту с помощью обычной команды виртуальной записи: ```cpp Blynk.virtualWrite(V1, pointIndex, lat, lon, "Название"); ``` Мы также создали оболочку, чтобы вы могли упростить использование виджета Карты. Вы можете изменить метки флажков на оборудовании с помощью кода: ```cpp WidgetMap myMap(V1); ... int index = 1; float lat = 51.5074; float lon = 0.1278; myMap.location(index, lat, lon, "Название"); ``` Использование уникальных `index` позволяет вам переопределить существующее значение точки. **Пример кода:** [Базовый пример Карты](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Map/Map.ino) ### Таблица \(Table\) Табличный виджет удобен, когда вам нужно структурировать аналогичные данные в пределах одного графического элемента. Работает как обычная таблица. Вы можете добавить строку в таблицу с помощью кода: ```text Blynk.virtualWrite(V1, "add", id, "Имя", "Значение"); ``` Вы можете обновить строку в таблице с помощью кода: ```text Blynk.virtualWrite(V1, "update", id, "Новое имя", "Новое значение"); ``` Чтобы выделить любой элемент в таблице, используйте его идентификатор: ```text Blynk.virtualWrite(V1, "pick", 0); ``` Чтобы выбрать/отменить выбор \(сделать значок зеленым/серым\) элемент в таблице, используйте его идентификатор: ```text Blynk.virtualWrite(V1, "select", 0); Blynk.virtualWrite(V1, "deselect", 0); ``` Чтобы очистить таблицу используйте код: ```text Blynk.virtualWrite(V1, "clr"); ``` Вы также можете обрабатывать другие действия из таблицы. Например, использовать строку таблицы в качестве кнопки переключения. ```text BLYNK_WRITE(V1) { String cmd = param[0].asStr(); if (cmd == "select") { // строка в таблице была выбрана. int rowId = param[1].asInt(); } if (cmd == "deselect") { // строка в таблице была отменена. int rowId = param[1].asInt(); } if (cmd == "order") { // когда строки в таблице переупорядочиваются int oldRowIndex = param[1].asInt(); int newRowIndex = param[2].asInt(); } } ``` **Примечание:** Максимальное количество строк в таблице равно 100. Когда вы достигнете предела, таблица будет работать как список FIFO \(Первый пришел - первый ушел\). Это ограничение можно изменить, настроив свойство `table.rows.pool.size` в параметрах локального сервера. **Пример кода:** [Простое использование таблицы](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Table/Table_Simple/Table_Simple.ino) **Пример кода:** [Расширенное использование таблицы](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Table/Table_Advanced/Table_Advanced.ino) ### Селектор устройств \(Device Selector\) Селектор устройств - это мощный виджет, который позволяет обновлять виджеты на основе одного активного устройства. Этот виджет особенно полезен, когда у вас есть несколько устройств с аналогичной функциональностью. Представьте, что у вас есть 4 устройства, и к каждому устройству подключен датчик температуры и влажности. Для отображения данных по всем 4 устройствам вам необходимо добавить 8 виджетов. С помощью Селектора устройств вы можете использовать только 2 виджета, которые будут отображать температуру и влажность в зависимости от активного устройства, выбранного в Селекторе. Все, что вам нужно сделать, это: 1. Добавить виджет Селектора устройств в проект 2. Добавить 2 виджета \(например виджет отображения значений \(Value Display Widget\)\), чтобы отобразить температуру и влажность 3. В настройках виджетов вы сможете назначить их на Селектор устройств \(в разделе источника или цели\) 4. Выйти из настроек, запустить проект Теперь вы можете изменить активное устройство в Селекторе устройств и увидите, что значения температуры и влажности отражают обновленные данные для только что выбранного вами устройства. **ПРИМЕЧАНИЕ:** Виджет вебхук \([Webhook](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/WebHook/WebHook_GET/WebHook_GET.ino)\) пока не работает с Селектором устройств. ### Плитка устройств \(Device Tiles\) Плитка устройств - это мощный виджет, очень похожий на виджет Селектора устройств \(Device Selector\), но с пользовательским интерфейсом. Позволяет отображать один пин с устройства на одну плитку. Этот виджет особенно полезен, когда у вас есть несколько устройств с аналогичной функциональностью. Теперь вы можете группировать похожие устройства на одном макете \(шаблоне\). ## Сенсоры ### Акселерометр \(Accelerometer\) Акселерометр один из [сенсоров движения](https://developer.android.com/guide/topics/sensors/sensors_motion.html), который позволяет определить движение Вашего телефона в пространстве. Он может пригодится для отслеживания таких событий как тряска, удар, поворот или наклон телефона. Концептуально, акселерометр определяет силу ускорения приложенную к вашему телефону. Единица измерения - м/c^2 приложенная к каждой из осей `x`, `y`, `z`. Чтобы получить данные с сенсора нужно использовать следующий код : ```cpp BLYNK_WRITE(V1) { //сила ускорения, приложенная к оси x int x = param[0].asFloat(); //сила ускорения, приложенная к оси y int y = param[1].asFloat(); //сила ускорения, приложенная к оси z int z = param[2].asFloat(); } ``` Акселерометр не работает при свернутом приложении. ### Барометр/Давление \(Barometer/pressure\) Барометр один из сенсоров [окружающей среды](https://developer.android.com/guide/topics/sensors/sensors_environment.html) и позволяет измерять атмосферное давление. Измеряется в `hPa` \(гПа\) или `mbar` \(мБар\). Чтобы получить данные с сенсора нужно использовать следующий код : ```cpp BLYNK_WRITE(V1) { //Давление в мБар int pressure = param[0].asInt(); } ``` Барометр не работает при свернутом приложении. ### Гравитация \(Gravity\) Гравитация - это своего рода [датчики движения](https://developer.android.com/guide/topics/sensors/sensors_motion.html), который позволяет обнаруживать движение вашего смартфона. Полезно для мониторинга движения устройства, таких как наклон, встряхивание, вращение или качание. Датчик силы притяжения выдает трехмерный вектор, указывающий направление и величину силы притяжения. Измеряется в `m/s^2` силы притяжения, приложенной к оси `x`, `y`, `z`. Для того, чтобы принять данные от него, вам необходимо: ```cpp BLYNK_WRITE(V1) { //сила притяжения, приложенная к оси x int x = param[0].asFloat(); //сила притяжения, приложенная к оси y int y = param[1].asFloat(); //сила притяжения, приложенная к оси y int z = param[2].asFloat(); } ``` **ВНИМАНИЕ:** Виджет гравитации не работает в фоновом режиме. ### Влажность \(Humidity\) Влажность является своего рода [датчиком среды](https://developer.android.com/guide/topics/sensors/sensors_environment.html), который позволяет измерять относительную влажность окружающей среды. Измеряется в `%` - фактически это относительная влажность в процентах. Для того, чтобы принять данные от датчика, вам необходимо: ```cpp BLYNK_WRITE(V1) { //Влажность в % int humidity = param.asInt(); } ``` **ВНИМАНИЕ:** Влажность не работает в фоновом режиме. ### Свет \(Light\) Свет - это своего рода [датчики окружающей среды](https://developer.android.com/guide/topics/sensors/sensors_environment.html), который позволяет измерять уровень освещенности \(уровень внешней освещенности измеряется в люксах\). В телефонах чаще всего используется для управления яркостью экрана. Для того, чтобы принять данные этого виджета, вам необходимо: ```cpp BLYNK_WRITE(V1) { //уровень освещенности int lx = param.asInt(); } ``` Виджет Свет не работает в фоновом режиме. ### Близость \(Proximity\) Близость - это своего рода [датчики положения](https://developer.android.com/guide/topics/sensors/sensors_position.html) это позволяет определить, насколько близко смартфон к лицу. Измеряется в `cm` \(см\) - расстояние от телефона до лица. Однако большинство этих датчиков возвращает только информацию FAR / NEAR. Поэтому, возвращаемое значение будет `0 / 1`. Где 0 / LOW = `FAR` \(далеко\), а 1 / HIGH = `NEAR` \(рядом\). Для того, чтобы принять данные из виджета, вам необходимо: ```cpp BLYNK_WRITE(V1) { // расстояние до объекта int proximity = param.asInt(); if (proximity) { // РЯДОМ } else { // ДАЛЕКО } } ``` Виджет близость не работает в фоновом режиме. ### Температура \(Temperature\) Температура является своего рода [датчиком окружающей среды](https://developer.android.com/guide/topics/sensors/sensors_environment.html) который позволяет измерять температуру окружающего воздуха. Измеряется в `°C` - градусах Цельсия. Для приема данных из виджета, необходимо использовать код: ```cpp BLYNK_WRITE(V1) { // температура в градусах цельсия int celcius = param.asInt(); } ``` Виджет Температуры не работает в фоновом режиме. ### Триггер GPS \(GPS Trigger\) Виджет Триггер GPS позволяет легко инициировать события, когда вы входите или выходите из географической зоны. Этот виджет будет работать в фоновом режиме и периодически будет проверять ваши координаты. Если ваше местоположение находится в пределах или вне указанной зоны \(географическая зона выбирается на карте виджета\), виджет отправит команду `HIGH`/`LOW` на аппаратное устройство. Например, Триггер GPS назначен для пина `V1`, и включена опция `Trigger When Enter`. В этом случае, когда вы окажитесь в указанной географической зоне виджет вызовет событие `HIGH`. ```cpp BLYNK_WRITE(V1) { int state = param.asInt(); if (state) { //Вы вошли в зону } else { //Вы вышли из зоны } } ``` Подробнее о том, как работает GPS-виджет, вы можете прочитать [здесь](https://developer.android.com/guide/topics/location/strategies.html). **ВНИМАНИЕ:** Виджет Триггер GPS работает в фоновом режиме. ### Поток GPS \(GPS Streaming\) Полезно для мониторинга местонахождения смартфона получать данные о широте, долготе, высоте и скорости \(скорость часто может быть 0, если смартфон не поддерживает ее измерение\). Чтобы принимать данные из этого виджета, вам необходимо: ```cpp BLYNK_WRITE(V1) { float latitude = param[0].asFloat(); float longitude = param[1].asFloat(); float altitude = param[2].asFloat(); float speed = param[3].asFloat(); } ``` или вы можете использовать подготовленную оболочку `GpsParam` : ```cpp BLYNK_WRITE(V1) { GpsParam gps(param); //Печать лат/лон с 6 десятичными знаками Serial.println(gps.getLat(), 7); Serial.println(gps.getLon(), 7); Serial.println(gps.getAltitude(), 2); Serial.println(gps.getSpeed(), 2); } ``` Поток GPS работает в фоновом режиме. **Пример кода:** [Поток GPS](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/GPS_Stream/GPS_Stream.ino) ## Другие ### Мост \(Bridge\) Мост может быть использован для связи между устройствами \(без участия приложения\). Вы можете отправлять цифровые / аналоговые / виртуальные команды записи с одного устройства на другое, зная только токен авторизации. На данный момент виджет Мост не обязательно использовать в приложении \(здесь он используется для указания того, что у нас есть такая функция\). **Вы можете использовать несколько мостов для управления несколькими устройствами.** ![](../.gitbook/assets/bridge.png) Виджет Мост использует виртуальный пин и превращает его в канал для управления другим устройством. Это означает, что вы можете контролировать любые виртуальные, цифровые или аналоговые пины целевого устройства. Будьте осторожны, не используйте пины типа `A0, A1, A2 ...` при обмене данными между различными типами устройств, так как в таких случаях Arduino Core может ссылаться на неверные пины. Пример кода для устройства A, которое будет отправлять значения на устройство B: ```cpp //Инициирует виджет Моста на V1 устройства A WidgetBridge bridge1(V1); ... void setup() { Blynk.begin(...); while (Blynk.connect() == false) { // Ждем пока Blynk подключится } bridge1.digitalWrite(9, HIGH); // выставим триггер HIGH на D9 // устройства B. Код на устройстве // B не требуется bridge1.analogWrite(10, 123); bridge1.virtualWrite(V1, "hello"); // вам нужно написать код на // устройстве B, чтобы получить // это значение. См. ниже bridge1.virtualWrite(V2, "value1", "value2", "value3"); } BLYNK_CONNECTED() { bridge1.setAuthToken("OtherAuthToken"); // токен с устройства B } ``` **ВАЖНО:** при выполнении `virtualWrite()` с виджета Мост, устройство B должно обрабатывать входящие данные с устройства A. Например, если вы отправляете значение с устройства A на устройство B, используя `bridge.virtualWrite (V5)`, вам необходимо использовать свой обработчик на устройстве B: ```cpp BLYNK_WRITE(V5){ int pinData = param.asInt(); // переменная pinData будет хранить значение, // полученное через Bridge } ``` Имейте в виду, что `bridge.virtualWrite` не отправляет никаких значений в мобильное приложение. Для этого вам нужно вызвать `Blynk.virtualWrite`. **Пример кода:** [Мост](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Bridge/Bridge.ino) ### Обработчик событий \(Eventor\) Виджет Обработчик событий позволяет создавать простые правила поведения или **события**. Давайте рассмотрим типичный вариант использования: считывание температуры с датчика DHT и отправка push-уведомления, когда температура превышает определенный предел: ```cpp float t = dht.readTemperature(); if (isnan(t)) { return; } if (t > 40) { Blynk.notify(String("Температура слишком высокая: ") + t); } ``` С Обработчиком событий вам не нужно писать этот код. Все, что вам нужно, это отправить значение с датчика на сервер Blynk: ```cpp float t = dht.readTemperature(); Blynk.virtualWrite(V0, t); ``` Не забывайте, что команды `virtualWrite` должны быть заключены в таймер и не должны использоваться в основном цикле `loop`. ![](../.gitbook/assets/eventor_for_temp_example.png) **ПРИМЕЧАНИЕ:** Не забудьте добавить виджет уведомлений в приложении. Обработчик событий пригодится вам, когда нужно изменить условия на лету без повторной загрузки нового скетча на аппаратное обеспечение. Вы можете создать столько **событий**, сколько вам нужно. Обработчик событий также может быть запущен со стороны приложения. Вам просто нужно назначить виджет на тот же контакт, что и ваше событие в Обработчике событий. Обработчик событий не постоянно отправляет события. Давайте рассмотрим простой пример, как показано выше `if (temperature > 40) send notification`. Когда температура превышает 40 пороговых значений - отправляется уведомление. Если температура продолжает оставаться выше 40 никакие повторные действия не будут инициированы. Но если `temperature` опускается ниже порогового значения, а затем проходит его снова уведомление будет отправлено повторно \(для уведомлений Обработчика событий нет ограничения отправки в течение 5 секунд\). Обработчик событий также поддерживает события таймера \(Timer\). Например, вы можете установить пин `V1` ON/HIGH в 21:00:00 каждую пятницу. В Обработчике событий вы можете назначить несколько таймеров на один и тот же пин, отправить любую строку/число, выбрать день и часовой пояс. Чтобы удалить созданное **событие**, пожалуйста, используйте сдвиг пальцем по экрану. Вы также можете перенести последний элемент самого события. **Пример кода:** [Обработчик событий](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Eventor/Eventor.ino) **ПРИМЕЧАНИЕ:** Виджет таймера зависит от времени сервера, а не вашего телефона. Иногда время телефона может не соответствовать времени сервера. **ПРИМЕЧАНИЕ:** события запускаются только один раз при выполнении условия. Это означитает что \[цепочка событий\] \([https://community.blynk.cc/t/eventor-behavior-bug-feature/20962](https://community.blynk.cc/t/eventor-behavior-bug-feature/20962)\) невозможна \(однако она может быть включена в коммерческой версии\). ![](../.gitbook/assets/eventor_edit.png) ### Часы реального времени \(RTC\) Часы реального времени позволяют получать время с сервера. Вы можете предварительно выбрать любой часовой пояс в пользовательском интерфейсе, чтобы получить время на оборудование из нужной локали. ![](../.gitbook/assets/rtc_edit.png) **Пример кода:** [Часы реального времени](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/RTC/RTC.ino) ### Bluetooth с низким энергопотреблением Этот виджет позволяет включить блутзуз с низким энергопотреблением на вашем телефоне. На текущий момент виджет также требует наличия интернет соединения \(постараемся пофиксить в ближайшем будущем\). Некоторые типы виджетов нельзя использовать вместе с блутузом, например исторический граф, так как он требует чтобы данные отправлялись на сервер, чего блутуз виджет не делает. **Список поддерживаемых чипов и контроллеров:** [BLE](https://github.com/blynkkk/blynk-library/tree/master/examples/Boards_Bluetooth) ### Блютуз \(Bluetooth\) Этот виджет позволяет включить блютуз на вашем телефоне. На текущий момент виджет также требует наличия интернет соединения \(постараемся пофиксить в ближайшем будущем\) и поддерживается только на Android. Некоторые типы виджетов нельзя использовать вместе с блютузом, например исторический граф, так как он требует чтобы данные отправлялись на сервер, чего блютуз виджет не делает. **Список поддерживаемых чипов и контроллеров:** [BLE](https://github.com/blynkkk/blynk-library/tree/master/examples/Boards_Bluetooth) ### Музыкальный проигрыватель \(Music Player\) Простой элемент интерфейса с 3 кнопками - имитирует интерфейс музыкального проигрывателя. Каждая кнопка отправляет свою команду на аппаратное устройство: `play` \(воспроизвести\), `stop` \(стоп\), `prev` \(предыдущий\), `next` \(следующий\). Вы можете изменить состояние виджета в приложении с аппаратной стороны с помощью следующих команд: ```text Blynk.virtualWrite(Vx, "play"); Blynk.virtualWrite(Vx, "stop"); ``` Вы также можете изменить состояние воспроизведение/остановка виджета с помощью следующего кода \(эквивалент вышеупомянутых команд\): `Blynk.setProperty(V1, "isOnPlay", "false");` **Пример кода:** [Музыкальный проигрыватель](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Player/Player.ino) ### Вебхук \(Webhook\) Вебхук очень мощный виджет, который позволяет Вам легко интегрироватся с любыми сторонними сервисами. С его помощью Вы можете слать любые HTTP/S запросы на любой сервер или устройство, которое имеет HTTP/S API \(например, лампы Philips Hue\). Вебхук вешается на вирутальный пин и любая команда, которая приходит на этот пин будет вызывать срабатывание HTTP/S запроса. Команды на такой виртуальный пин могут приходить как со стороны железа, так и со стороны приложения. То есть, Вы можете слать любой HTTP запрос при нажатии кнопки в приложении, если эта кнопка на том же пине что и вебхук. Вот простой пример, представьте, что Вы хотите слать данные с микроконтроллера не только в Blynk, но и в какой-то другой сервис, например - Google Docs или в thingspeak.com. Раньше Вам для этого пришлось бы писать что-то вроде : ```cpp WiFiClient client; if (client.connect("api.thingspeak.com", 80)) { client.print("POST /update HTTP/1.1\n"); client.print("Host: api.thingspeak.com\n"); client.print("Connection: close\n"); client.print("X-THINGSPEAKAPIKEY: " + apiKeyThingspeak1 + "\n"); client.print("Content-Type: application/x-www-form-urlencoded\n"); client.print("Content-Length: "); client.print(postStr.length()); client.print("\n\n"); client.print(postStr); } ``` С вебхуком этого больше делать не нужно. ![](../.gitbook/assets/webhook_settings.png) Достаточно лишь заполнить поля виджета в приложении и выполнить привычное: ```cpp Blynk.virtualWrite(V0, value); ``` Где V0 - пин вебхук виджета. В дополнение, Вы можете подставлять значение пина в URL: ```cpp https://api.thingspeak.com/update?api_key=xxxxxx&field1=/pin/ ``` или тело запроса : ```cpp ["/pin/"] ``` Так же можно отправлять несколько значений внутри одного пина \(до 5\) : `/pin[0]/`,`/pin[1]/`, `/pin[2]/` Еще одна крутая штука - это возможность делать HTTP GET запросы на сервере и слать их результат на микроконтроллер. Прелесть тут в том, что Вам не нужно для этого писать сложный код на микроконтроллере. Представьте, что Вам нужно получить информацию о погоде от какого-то метио сервиса. Например, по такому запросу : ```text Вы можете вставить этот запрос в вебхук виджет, выбрать пин ```V0``` и написать : ```cpp BLYNK_WRITE(V0){ String webhookdata = param.asStr(); Serial.println(webhookdata); } ``` Теперь, каждый раз когда вы дергаете `V0` с помощью `Blynk.virtualWrite(V0, 1)` будет вызвана функция `BLYNK_WRITE(V0)`. **Замечание:** обычно HTTP запросы довольно большие, поэтому Вам, вероятно, нужно будет увеличить лимит на максимальную длину сообщения на микроконтроллере `#define BLYNK_MAX_READBYTES 1024`. **Замечание:** наше облако так же имеет определенные лимиты для вебхука. Мы разрешаем слать только 1 запрос в секунду. Это поведение можно изменить на локальном сервер через свойство `webhooks.frequency.user.quota.limit`. Пожалуйста, используйте вебхуки с умом. Многие веб ресурсы не способны обрабатывать даже 1 запрос в секунду. **Замечание :** в случае если Ваш вебхук не выполнился 10 раз подряд - вебхук виджет будет остановлен. Чтобы восстановить его работу - нужно открыть и закрыть виджет в режиме редактирования. Не выполненными считаются запросы у которых код ответа не равен 200 или 302. ### Отчеты \(Reports\) Функция виджета Отчеты заключается в настройке и разметке отчетов данных в формате CSV. Вы можете выбрать разовые или переодически запланированные отчеты. Кроме того, в отчетах вы можете очистить все пользовательсике данные, собранные с ваших устройств. Вам необходимо настроить начальные параметры в режиме редактирования, а затем уже в режиме воспроизведения вы сможете настроить сами отчеты. #### Режим редактирования. Конфигурация ввода данных В режиме редактирования \(когда ваш проект остановлен\) вы определяете потоки данных, которые вы хотели бы позже включить в отчет. Виджет Отчеты предназначен для работы с виджетом [Плитка устройств \(Device Tiles\)](https://github.com/blynkkk/blynkkk.github.io/blob/master/mobile/ru/device_tiles.md). Если вы не используете плитки устройств, вы все равно можете выбрать одно устройство или группу устройств в качестве источника данных для отчетов. Вы должны выбрать либо [Плитку устройств](https://github.com/blynkkk/blynkkk.github.io/blob/master/mobile/ru/device_tiles.md), либо одино устройство, либо группу устройств для отчета. Вы не можете объединить эти оба варианта. #### Режим воспроизведения После добавления исходных устройств и их потоков данных нажмите кнопку «Воспроизвести» и нажмите кнопку «Отчеты». ### Настройка отчетов Каждый параметр отчета предполагает свои собственные настройки: `Report name` \(Имя отчета\) - дайте вашему отчету осмысленное имя. `Data source` \(Источники данных\) - выберите потоки данных, которые вы хотели бы включить в отчеты. `Report Frequency` \(периодичность отчетов\) - Определяет, как часто будут отправляться отчеты. Они могут быть разовыми и запланированными. `one-time` \(Сейчас\) - мгновенно сформирует отчет и отправит его на указанные адреса электронной почты. Нажмите на значок справа, чтобы отправить отчет. Запланированные отчеты могут быть отправлены `daily`/`weekly`/`monthly` \(ежедневно/еженедельно/ежемесячно\). `At Time` \(Время\) установите время дня, когда отчет будет отправлен. `Start`/`End` \(Качало/Конец\) указывает дату начала и окончания оправки отчетов. Для еженедельного отчета вы можете выбрать день недели, когда отчет должен быть отправлен. Для ежемесячного отчета вы можете выбрать, отправку отчета в первый или последний день месяца. `Recipients` \(Получатели\) - укажите до 5 адресов электронной почты.. `Data resolution` \(Разрешение данных\) определяет детализацию ваших отчетов. Поддерживаемые детализации: `minute` \(ежеминутно\), `hourly` \(ежечасно\) и `daily` \(ежедневно\). Например, когда вы генерируете ежедневный отчет с детализацией в 1 минуту, вы получаете `24 * 60 * 60` единиц данных в вашем ежедневном отчете за каждый выбранный поток. `Group data in reports by` \(Группировка данных в отчетах\) - укажите выходной формат файла-\(ов\) CSV: `Datastream` \(Поток\) - вы получите один CSV файл для каждого потока данных. `Device` \(Устройство\) - вы получите один CSV-файл на каждое устройство. Каждый файл будет содержать все включенные потоки данных. `Report` \(Отчет\) - вы получите один CSV-файл для всех ваших устройств и всех ваших потоков данных. `Timezone correction` \(Времненная зона\) - укажите корректировку часового пояса, если вам нужно настроить дату и время отчета на определенный часовой пояс. `Date and time format` \(Формат даты и времени\) - определяет формат поля временной метки ваших данных. Вы можете выбрать `2018-06-21 20:16:48`, `2018-06-21T20:16:48+03:00` или другой поддерживаемый формат. Существует особый формат `Timestamp` \(Временная метка\), которая отражает разницу между текущим временем и полуночью 1 января 1970 года UTC, измеряемую в миллисекундах. После настройки отчета нажмите кнопку «ОК» в правом верхнем углу. Ваш отчет готов. После настройки отчета вы увидите, когда запланирован следущий отчет `Next`, а также увидите расписание для этого отчета. После отправки отчета хотя бы один раз, вы можете увидеть дату его последней отправки `Last`. `Last` \(Последний\) метка также содержит статус отправки отчета: * `OK` \(Успешно\): отчет был сгенерирован и успешно отправлен Получателям; * `No Data` \(Нет данных\): отчет не содержит данных за указанный период; * `Error` \(Ошибка\): что-то пошло не так. Пожалуйста, свяжитесь со службой поддержки Blynk. Отчеты будут генерироваться, даже если ваш проект не находится в активном \(Play\) режиме. Однако помните, неактивные проекты небудут генерировать данные. **ПРИМЕЧАНИЕ:** все отчеты формируются в кодировке UTF-16. Пожалуйста, убедитесь, что при открытии файла отчета вы выбрали кодировку UTF-16 в вашем CSV-редакторе. ================================================ FILE: scripts/flatdoc.js ================================================ /*! * Flatdoc - (c) 2013, 2014 Rico Sta. Cruz * http://ricostacruz.com/flatdoc * @license MIT */ (function($) { var exports = this; var marked; /** * Basic Flatdoc module. * * The main entry point is `Flatdoc.run()`, which invokes the [Runner]. * * Flatdoc.run({ * fetcher: Flatdoc.github('rstacruz/backbone-patterns'); * }); * * These fetcher functions are available: * * Flatdoc.github('owner/repo') * Flatdoc.github('owner/repo', 'API.md') * Flatdoc.github('owner/repo', 'API.md', 'branch') * Flatdoc.bitbucket('owner/repo') * Flatdoc.bitbucket('owner/repo', 'API.md') * Flatdoc.bitbucket('owner/repo', 'API.md', 'branch') * Flatdoc.file('http://path/to/url') * Flatdoc.file([ 'http://path/to/url', ... ]) */ var Flatdoc = exports.Flatdoc = {}; /** * Creates a runner. * See [Flatdoc]. */ Flatdoc.run = function(options) { $(function() { (new Flatdoc.runner(options)).run(); }); }; /** * File fetcher function. * * Fetches a given `url` via AJAX. * See [Runner#run()] for a description of fetcher functions. */ Flatdoc.file = function(url) { function loadData(locations, response, callback) { if (locations.length === 0) callback(null, response); else $.get(locations.shift()) .fail(function(e) { callback(e, null); }) .done(function (data) { if (response.length > 0) response += '\n\n'; response += data; loadData(locations, response, callback); }); } return function(callback) { loadData(url instanceof Array ? url : [url], '', callback); }; }; /** * Github fetcher. * Fetches from repo `repo` (in format 'user/repo'). * * If the parameter `filepath` is supplied, it fetches the contents of that * given file in the repo's default branch. To fetch the contents of * `filepath` from a different branch, the parameter `ref` should be * supplied with the target branch name. * * See [Runner#run()] for a description of fetcher functions. * * See: http://developer.github.com/v3/repos/contents/ */ Flatdoc.github = function(repo, filepath, ref) { var url; if (filepath) { url = 'https://api.github.com/repos/'+repo+'/contents/'+filepath; } else { url = 'https://api.github.com/repos/'+repo+'/readme'; } if (ref) { url += '?ref='+ref; } return function(callback) { $.get(url) .fail(function(e) { callback(e, null); }) .done(function(data) { var markdown = exports.Base64.decode(data.content); callback(null, markdown); }); }; }; /** * Bitbucket fetcher. * Fetches from repo `repo` (in format 'user/repo'). * * If the parameter `filepath` is supplied, it fetches the contents of that * given file in the repo. * * See [Runner#run()] for a description of fetcher functions. * * See: https://confluence.atlassian.com/display/BITBUCKET/src+Resources#srcResources-GETrawcontentofanindividualfile * See: http://ben.onfabrik.com/posts/embed-bitbucket-source-code-on-your-website * Bitbucket appears to have stricter restrictions on * Access-Control-Allow-Origin, and so the method here is a bit * more complicated than for Github * * If you don't pass a branch name, then 'default' for Hg repos is assumed * For git, you should pass 'master'. In both cases, you should also be able * to pass in a revision number here -- in Mercurial, this also includes * things like 'tip' or the repo-local integer revision number * Default to Mercurial because Git users historically tend to use GitHub */ Flatdoc.bitbucket = function(repo, filepath, branch) { if (!filepath) filepath = 'readme.md'; if (!branch) branch = 'default'; var url = 'https://bitbucket.org/api/1.0/repositories/'+repo+'/src/'+branch+'/'+filepath; return function(callback) { $.ajax({ url: url, dataType: 'jsonp', error: function(xhr, status, error) { alert(error); }, success: function(response) { var markdown = response.data; callback(null, markdown); } }); }; }; /** * Parser module. * Parses a given Markdown document and returns a JSON object with data * on the Markdown document. * * var data = Flatdoc.parser.parse('markdown source here'); * console.log(data); * * data == { * title: 'My Project', * content: '

      This project is a...', * menu: {...} * } */ var Parser = Flatdoc.parser = {}; /** * Parses a given Markdown document. * See `Parser` for more info. */ Parser.parse = function(source, highlight) { marked = exports.marked; Parser.setMarkedOptions(highlight); var html = $("

      " + marked(source)); var h1 = html.find('h1').eq(0); var title = h1.text(); // Mangle content Transformer.mangle(html); var menu = Transformer.getMenu(html); return { title: title, content: html, menu: menu }; }; Parser.setMarkedOptions = function(highlight) { marked.setOptions({ highlight: function(code, lang) { if (lang) { return highlight(code, lang); } return code; } }); }; /** * Transformer module. * This takes care of any HTML mangling needed. The main entry point is * `.mangle()` which applies all transformations needed. * * var $content = $("

      Hello there, this is a docu..."); * Flatdoc.transformer.mangle($content); * * If you would like to change any of the transformations, decorate any of * the functions in `Flatdoc.transformer`. */ var Transformer = Flatdoc.transformer = {}; /** * Takes a given HTML `$content` and improves the markup of it by executing * the transformations. * * > See: [Transformer](#transformer) */ Transformer.mangle = function($content) { this.addIDs($content); this.buttonize($content); this.smartquotes($content); }; /** * Adds IDs to headings. */ Transformer.addIDs = function($content) { var slugs = ['', '', '']; $content.find('h1, h2, h3').each(function() { var $el = $(this); var num = parseInt(this.nodeName[1]); var text = $el.text(); var slug = Flatdoc.slugify(text); if (num > 1) slug = slugs[num - 2] + '-' + slug; slugs.length = num - 1; slugs = slugs.concat([slug, slug]); $el.attr('id', slug); }); }; /** * Returns menu data for a given HTML. * * menu = Flatdoc.transformer.getMenu($content); * menu == { * level: 0, * items: [{ * section: "Getting started", * level: 1, * items: [...]}, ...]} */ Transformer.getMenu = function($content) { var root = {items: [], id: '', level: 0}; var cache = [root]; function mkdir_p(level) { cache.length = level + 1; var obj = cache[level]; if (!obj) { var parent = (level > 1) ? mkdir_p(level-1) : root; obj = { items: [], level: level }; cache = cache.concat([obj, obj]); parent.items.push(obj); } return obj; } $content.find('h1, h2, h3').each(function() { var $el = $(this); var level = +(this.nodeName.substr(1)); var parent = mkdir_p(level-1); var obj = { section: $el.text(), items: [], level: level, id: $el.attr('id') }; parent.items.push(obj); cache[level] = obj; }); return root; }; /** * Changes "button >" text to buttons. */ Transformer.buttonize = function($content) { $content.find('a').each(function() { var $a = $(this); var m = $a.text().match(/^(.*) >$/); if (m) $a.text(m[1]).addClass('button'); }); }; /** * Applies smart quotes to a given element. * It leaves `code` and `pre` blocks alone. */ Transformer.smartquotes = function ($content) { var nodes = getTextNodesIn($content), len = nodes.length; for (var i=0; i/g, '>') .replace(/("[^\"]*?")/g, '$1') .replace(/('[^\']*?')/g, '$1') .replace(/\/\/(.*)/gm, '//$1') .replace(/\/\*(.*)\*\//gm, '/*$1*/') .replace(/(\d+\.\d+)/gm, '$1') .replace(/(\d+)/gm, '$1') .replace(/\bnew *(\w+)/gm, 'new $1') .replace(/\b(function|new|throw|return|var|if|else)\b/gm, '$1'); }; Highlighters.html = function(code) { return code .replace(//g, '>') .replace(/("[^\"]*?")/g, '$1') .replace(/('[^\']*?')/g, '$1') .replace(/<!--(.*)-->/g, '<!--$1-->') .replace(/<([^!][^\s&]*)/g, '<$1'); }; Highlighters.generic = function(code) { return code .replace(//g, '>') .replace(/("[^\"]*?")/g, '$1') .replace(/('[^\']*?')/g, '$1') .replace(/(\/\/|#)(.*)/gm, '$1$2') .replace(/(\d+\.\d+)/gm, '$1') .replace(/(\d+)/gm, '$1'); }; /** * Menu view. Renders menus */ var MenuView = Flatdoc.menuView = function(menu) { var $el = $("

        "); function process(node, $parent) { var id = node.id || 'root'; var $li = $('
      • ') .attr('id', id + '-item') .addClass('level-' + node.level) .appendTo($parent); if (node.section) { var $a = $('') .html(node.section) .attr('id', id + '-link') .attr('href', '#' + node.id) .addClass('level-' + node.level) .appendTo($li); } if (node.items.length > 0) { var $ul = $('
          ') .addClass('level-' + (node.level+1)) .attr('id', id + '-list') .appendTo($li); node.items.forEach(function(item) { process(item, $ul); }); } } process(menu, $el); return $el; }; /** * A runner module that fetches via a `fetcher` function. * * var runner = new Flatdoc.runner({ * fetcher: Flatdoc.url('readme.txt') * }); * runner.run(); * * The following options are available: * * - `fetcher` - a function that takes a callback as an argument and * executes that callback when data is returned. * * See: [Flatdoc.run()] */ var Runner = Flatdoc.runner = function(options) { this.initialize(options); }; Runner.prototype.root = '[role~="flatdoc"]'; Runner.prototype.menu = '[role~="flatdoc-menu"]'; Runner.prototype.title = '[role~="flatdoc-title"]'; Runner.prototype.content = '[role~="flatdoc-content"]'; Runner.prototype.initialize = function(options) { $.extend(this, options); }; /** * Syntax highlighting. * * You may define a custom highlight function such as `highlight` from * the highlight.js library. * * Flatdoc.run({ * highlight: function (code, value) { * return hljs.highlight(lang, code).value; * }, * ... * }); * */ Runner.prototype.highlight = function(code, lang) { var fn = Flatdoc.highlighters[lang] || Flatdoc.highlighters.generic; return fn(code); }; /** * Loads the Markdown document (via the fetcher), parses it, and applies it * to the elements. */ Runner.prototype.run = function() { var doc = this; $(doc.root).trigger('flatdoc:loading'); doc.fetcher(function(err, markdown) { if (err) { console.error('[Flatdoc] fetching Markdown data failed.', err); return; } var data = Flatdoc.parser.parse(markdown, doc.highlight); doc.applyData(data, doc); var id = location.hash.substr(1); if (id) { var el = document.getElementById(id); if (el) el.scrollIntoView(true); } $(doc.root).trigger('flatdoc:ready'); }); }; /** * Applies given doc data `data` to elements in object `elements`. */ Runner.prototype.applyData = function(data) { var elements = this; elements.el('title').html(data.title); elements.el('content').html(data.content.find('>*')); elements.el('menu').html(MenuView(data.menu)); }; /** * Fetches a given element from the DOM. * * Returns a jQuery object. * @api private */ Runner.prototype.el = function(aspect) { return $(this[aspect], this.root); }; /* * Helpers */ // http://stackoverflow.com/questions/298750/how-do-i-select-text-nodes-with-jquery function getTextNodesIn(el) { var exclude = 'iframe,pre,code'; return $(el).find(':not('+exclude+')').andSelf().contents().filter(function() { return this.nodeType == 3 && $(this).closest(exclude).length === 0; }); } // http://www.leancrew.com/all-this/2010/11/smart-quotes-in-javascript/ function quotify(a) { a = a.replace(/(^|[\-\u2014\s(\["])'/g, "$1\u2018"); // opening singles a = a.replace(/'/g, "\u2019"); // closing singles & apostrophes a = a.replace(/(^|[\-\u2014\/\[(\u2018\s])"/g, "$1\u201c"); // opening doubles a = a.replace(/"/g, "\u201d"); // closing doubles a = a.replace(/\.\.\./g, "\u2026"); // ellipses a = a.replace(/--/g, "\u2014"); // em-dashes return a; } })(jQuery); /* jshint ignore:start */ /*! * marked - a markdown parser * Copyright (c) 2011-2013, Christopher Jeffrey. (MIT Licensed) * https://github.com/chjj/marked */ (function(){var t={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:o,hr:/^( *[-*_]){3,} *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *#* *(?:\n+|$)/,nptable:o,lheading:/^([^\n]+)\n *(=|-){3,} *\n*/,blockquote:/^( *>[^\n]+(\n[^\n]+)*\n*)+/,list:/^( *)(bull) [\s\S]+?(?:hr|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:/^ *(?:comment|closed|closing) *(?:\n{2,}|\s*$)/,def:/^ *\[([^\]]+)\]: *]+)>?(?: +["(]([^\n]+)[")])? *(?:\n+|$)/,table:o,paragraph:/^((?:[^\n]+\n?(?!hr|heading|lheading|blockquote|tag|def))+)\n*/,text:/^[^\n]+/};t.bullet=/(?:[*+-]|\d+\.)/;t.item=/^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/;t.item=l(t.item,"gm")(/bull/g,t.bullet)();t.list=l(t.list)(/bull/g,t.bullet)("hr",/\n+(?=(?: *[-*_]){3,} *(?:\n+|$))/)();t._tag="(?!(?:"+"a|em|strong|small|s|cite|q|dfn|abbr|data|time|code"+"|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo"+"|span|br|wbr|ins|del|img)\\b)\\w+(?!:/|@)\\b";t.html=l(t.html)("comment",//)("closed",/<(tag)[\s\S]+?<\/\1>/)("closing",/])*?>/)(/tag/g,t._tag)();t.paragraph=l(t.paragraph)("hr",t.hr)("heading",t.heading)("lheading",t.lheading)("blockquote",t.blockquote)("tag","<"+t._tag)("def",t.def)();t.normal=h({},t);t.gfm=h({},t.normal,{fences:/^ *(`{3,}|~{3,}) *(\S+)? *\n([\s\S]+?)\s*\1 *(?:\n+|$)/,paragraph:/^/});t.gfm.paragraph=l(t.paragraph)("(?!","(?!"+t.gfm.fences.source.replace("\\1","\\2")+"|")();t.tables=h({},t.gfm,{nptable:/^ *(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*/,table:/^ *\|(.+)\n *\|( *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*/});function e(e){this.tokens=[];this.tokens.links={};this.options=e||a.defaults;this.rules=t.normal;if(this.options.gfm){if(this.options.tables){this.rules=t.tables}else{this.rules=t.gfm}}}e.rules=t;e.lex=function(t,n){var s=new e(n);return s.lex(t)};e.prototype.lex=function(t){t=t.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n");return this.token(t,true)};e.prototype.token=function(e,n){var e=e.replace(/^ +$/gm,""),s,i,r,l,o,h,a,u,p;while(e){if(r=this.rules.newline.exec(e)){e=e.substring(r[0].length);if(r[0].length>1){this.tokens.push({type:"space"})}}if(r=this.rules.code.exec(e)){e=e.substring(r[0].length);r=r[0].replace(/^ {4}/gm,"");this.tokens.push({type:"code",text:!this.options.pedantic?r.replace(/\n+$/,""):r});continue}if(r=this.rules.fences.exec(e)){e=e.substring(r[0].length);this.tokens.push({type:"code",lang:r[2],text:r[3]});continue}if(r=this.rules.heading.exec(e)){e=e.substring(r[0].length);this.tokens.push({type:"heading",depth:r[1].length,text:r[2]});continue}if(n&&(r=this.rules.nptable.exec(e))){e=e.substring(r[0].length);h={type:"table",header:r[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:r[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:r[3].replace(/\n$/,"").split("\n")};for(u=0;u ?/gm,"");this.token(r,n);this.tokens.push({type:"blockquote_end"});continue}if(r=this.rules.list.exec(e)){e=e.substring(r[0].length);l=r[2];this.tokens.push({type:"list_start",ordered:l.length>1});r=r[0].match(this.rules.item);s=false;p=r.length;u=0;for(;u1&&o.length>1)){e=r.slice(u+1).join("\n")+e;u=p-1}}i=s||/\n\n(?!\s*$)/.test(h);if(u!==p-1){s=h[h.length-1]==="\n";if(!i)i=s}this.tokens.push({type:i?"loose_item_start":"list_item_start"});this.token(h,false);this.tokens.push({type:"list_item_end"})}this.tokens.push({type:"list_end"});continue}if(r=this.rules.html.exec(e)){e=e.substring(r[0].length);this.tokens.push({type:this.options.sanitize?"paragraph":"html",pre:r[1]==="pre"||r[1]==="script",text:r[0]});continue}if(n&&(r=this.rules.def.exec(e))){e=e.substring(r[0].length);this.tokens.links[r[1].toLowerCase()]={href:r[2],title:r[3]};continue}if(n&&(r=this.rules.table.exec(e))){e=e.substring(r[0].length);h={type:"table",header:r[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:r[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:r[3].replace(/(?: *\| *)?\n$/,"").split("\n")};for(u=0;u])/,autolink:/^<([^ >]+(@|:\/)[^ >]+)>/,url:o,tag:/^|^<\/?\w+(?:"[^"]*"|'[^']*'|[^'">])*?>/,link:/^!?\[(inside)\]\(href\)/,reflink:/^!?\[(inside)\]\s*\[([^\]]*)\]/,nolink:/^!?\[((?:\[[^\]]*\]|[^\[\]])*)\]/,strong:/^__([\s\S]+?)__(?!_)|^\*\*([\s\S]+?)\*\*(?!\*)/,em:/^\b_((?:__|[\s\S])+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/,code:/^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,br:/^ {2,}\n(?!\s*$)/,del:o,text:/^[\s\S]+?(?=[\\?(?:\s+['"]([\s\S]*?)['"])?\s*/;n.link=l(n.link)("inside",n._inside)("href",n._href)();n.reflink=l(n.reflink)("inside",n._inside)();n.normal=h({},n);n.pedantic=h({},n.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/});n.gfm=h({},n.normal,{escape:l(n.escape)("])","~|])")(),url:/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,del:/^~~(?=\S)([\s\S]*?\S)~~/,text:l(n.text)("]|","~]|")("|","|https?://|")()});n.breaks=h({},n.gfm,{br:l(n.br)("{2,}","*")(),text:l(n.gfm.text)("{2,}","*")()});function s(t,e){this.options=e||a.defaults;this.links=t;this.rules=n.normal;if(!this.links){throw new Error("Tokens array requires a `links` property.")}if(this.options.gfm){if(this.options.breaks){this.rules=n.breaks}else{this.rules=n.gfm}}else if(this.options.pedantic){this.rules=n.pedantic}}s.rules=n;s.output=function(t,e,n){var i=new s(e,n);return i.output(t)};s.prototype.output=function(t){var e="",n,s,i,l;while(t){if(l=this.rules.escape.exec(t)){t=t.substring(l[0].length);e+=l[1];continue}if(l=this.rules.autolink.exec(t)){t=t.substring(l[0].length);if(l[2]==="@"){s=l[1][6]===":"?this.mangle(l[1].substring(7)):this.mangle(l[1]);i=this.mangle("mailto:")+s}else{s=r(l[1]);i=s}e+=''+s+"";continue}if(l=this.rules.url.exec(t)){t=t.substring(l[0].length);s=r(l[1]);i=s;e+=''+s+"";continue}if(l=this.rules.tag.exec(t)){t=t.substring(l[0].length);e+=this.options.sanitize?r(l[0]):l[0];continue}if(l=this.rules.link.exec(t)){t=t.substring(l[0].length);e+=this.outputLink(l,{href:l[2],title:l[3]});continue}if((l=this.rules.reflink.exec(t))||(l=this.rules.nolink.exec(t))){t=t.substring(l[0].length);n=(l[2]||l[1]).replace(/\s+/g," ");n=this.links[n.toLowerCase()];if(!n||!n.href){e+=l[0][0];t=l[0].substring(1)+t;continue}e+=this.outputLink(l,n);continue}if(l=this.rules.strong.exec(t)){t=t.substring(l[0].length);e+=""+this.output(l[2]||l[1])+"";continue}if(l=this.rules.em.exec(t)){t=t.substring(l[0].length);e+=""+this.output(l[2]||l[1])+"";continue}if(l=this.rules.code.exec(t)){t=t.substring(l[0].length);e+=""+r(l[2],true)+"";continue}if(l=this.rules.br.exec(t)){t=t.substring(l[0].length);e+="
          ";continue}if(l=this.rules.del.exec(t)){t=t.substring(l[0].length);e+=""+this.output(l[1])+"";continue}if(l=this.rules.text.exec(t)){t=t.substring(l[0].length);e+=r(l[0]);continue}if(t){throw new Error("Infinite loop on byte: "+t.charCodeAt(0))}}return e};s.prototype.outputLink=function(t,e){if(t[0][0]!=="!"){return'"+this.output(t[1])+""}else{return''+r(t[1])+'"}};s.prototype.smartypants=function(t){if(!this.options.smartypants)return t;return t.replace(/--/g,"—").replace(/'([^']*)'/g,"‘$1’").replace(/"([^"]*)"/g,"“$1”").replace(/\.{3}/g,"…")};s.prototype.mangle=function(t){var e="",n=t.length,s=0,i;for(;s.5){i="x"+i.toString(16)}e+="&#"+i+";"}return e};function i(t){this.tokens=[];this.token=null;this.options=t||a.defaults}i.parse=function(t,e){var n=new i(e);return n.parse(t)};i.prototype.parse=function(t){this.inline=new s(t.links,this.options);this.tokens=t.reverse();var e="";while(this.next()){e+=this.tok()}return e};i.prototype.next=function(){return this.token=this.tokens.pop()};i.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0};i.prototype.parseText=function(){var t=this.token.text;while(this.peek().type==="text"){t+="\n"+this.next().text}return this.inline.output(t)};i.prototype.tok=function(){switch(this.token.type){case"space":{return""}case"hr":{return"
          \n"}case"heading":{return""+this.inline.output(this.token.text)+"\n"}case"code":{if(this.options.highlight){var t=this.options.highlight(this.token.text,this.token.lang);if(t!=null&&t!==this.token.text){this.token.escaped=true;this.token.text=t}}if(!this.token.escaped){this.token.text=r(this.token.text,true)}return"
          "+this.token.text+"
          \n"}case"table":{var e="",n,s,i,l,o;e+="\n\n";for(s=0;s'+n+"\n":""+n+"\n"}e+="\n\n";e+="\n";for(s=0;s\n";for(o=0;o'+l+"\n":""+l+"\n"}e+="\n"}e+="\n";return"\n"+e+"
          \n"}case"blockquote_start":{var e="";while(this.next().type!=="blockquote_end"){e+=this.tok()}return"
          \n"+e+"
          \n"}case"list_start":{var h=this.token.ordered?"ol":"ul",e="";while(this.next().type!=="list_end"){e+=this.tok()}return"<"+h+">\n"+e+"\n"}case"list_item_start":{var e="";while(this.next().type!=="list_item_end"){e+=this.token.type==="text"?this.parseText():this.tok()}return"
        • "+e+"
        • \n"}case"loose_item_start":{var e="";while(this.next().type!=="list_item_end"){e+=this.tok()}return"
        • "+e+"
        • \n"}case"html":{return!this.token.pre&&!this.options.pedantic?this.inline.output(this.token.text):this.token.text}case"paragraph":{return"

          "+this.inline.output(this.token.text)+"

          \n"}case"text":{return"

          "+this.parseText()+"

          \n"}}};function r(t,e){return t.replace(!e?/&(?!#?\w+;)/g:/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function l(t,e){t=t.source;e=e||"";return function n(s,i){if(!s)return new RegExp(t,e);i=i.source||i;i=i.replace(/(^|[^\[])\^/g,"$1");t=t.replace(s,i);return n}}function o(){}o.exec=o;function h(t){var e=1,n,s;for(;eAn error occured:

          "+r(f.message+"",true)+"
          "}throw f}}a.options=a.setOptions=function(t){h(a.defaults,t);return a};a.defaults={gfm:true,tables:true,breaks:false,pedantic:false,sanitize:false,smartLists:false,silent:false,highlight:null,langPrefix:"lang-"};a.Parser=i;a.parser=i.parse;a.Lexer=e;a.lexer=e.lex;a.InlineLexer=s;a.inlineLexer=s.output;a.parse=a;if(typeof exports==="object"){module.exports=a}else if(typeof define==="function"&&define.amd){define(function(){return a})}else{this.marked=a}}).call(function(){return this||(typeof window!=="undefined"?window:global)}()); /*! * base64.js * http://github.com/dankogai/js-base64 */ (function(r){"use strict";if(r.Base64)return;var e="2.1.2";var t;if(typeof module!=="undefined"&&module.exports){t=require("buffer").Buffer}var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";var a=function(r){var e={};for(var t=0,n=r.length;t>>6)+o(128|e&63):o(224|e>>>12&15)+o(128|e>>>6&63)+o(128|e&63)}else{var e=65536+(r.charCodeAt(0)-55296)*1024+(r.charCodeAt(1)-56320);return o(240|e>>>18&7)+o(128|e>>>12&63)+o(128|e>>>6&63)+o(128|e&63)}};var c=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g;var i=function(r){return r.replace(c,u)};var f=function(r){var e=[0,2,1][r.length%3],t=r.charCodeAt(0)<<16|(r.length>1?r.charCodeAt(1):0)<<8|(r.length>2?r.charCodeAt(2):0),a=[n.charAt(t>>>18),n.charAt(t>>>12&63),e>=2?"=":n.charAt(t>>>6&63),e>=1?"=":n.charAt(t&63)];return a.join("")};var h=r.btoa||function(r){return r.replace(/[\s\S]{1,3}/g,f)};var d=t?function(r){return new t(r).toString("base64")}:function(r){return h(i(r))};var v=function(r,e){return!e?d(r):d(r).replace(/[+\/]/g,function(r){return r=="+"?"-":"_"}).replace(/=/g,"")};var g=function(r){return v(r,true)};var l=new RegExp(["[À-ß][€-¿]","[à-ï][€-¿]{2}","[ð-÷][€-¿]{3}"].join("|"),"g");var A=function(r){switch(r.length){case 4:var e=(7&r.charCodeAt(0))<<18|(63&r.charCodeAt(1))<<12|(63&r.charCodeAt(2))<<6|63&r.charCodeAt(3),t=e-65536;return o((t>>>10)+55296)+o((t&1023)+56320);case 3:return o((15&r.charCodeAt(0))<<12|(63&r.charCodeAt(1))<<6|63&r.charCodeAt(2));default:return o((31&r.charCodeAt(0))<<6|63&r.charCodeAt(1))}};var s=function(r){return r.replace(l,A)};var p=function(r){var e=r.length,t=e%4,n=(e>0?a[r.charAt(0)]<<18:0)|(e>1?a[r.charAt(1)]<<12:0)|(e>2?a[r.charAt(2)]<<6:0)|(e>3?a[r.charAt(3)]:0),u=[o(n>>>16),o(n>>>8&255),o(n&255)];u.length-=[0,0,2,1][t];return u.join("")};var C=r.atob||function(r){return r.replace(/[\s\S]{1,4}/g,p)};var b=t?function(r){return new t(r,"base64").toString()}:function(r){return s(C(r))};var B=function(r){return b(r.replace(/[-_]/g,function(r){return r=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,""))};r.Base64={VERSION:e,atob:C,btoa:h,fromBase64:B,toBase64:v,utob:i,encode:v,encodeURI:g,btou:s,decode:B};if(typeof Object.defineProperty==="function"){var S=function(r){return{value:r,enumerable:false,writable:true,configurable:true}};r.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",S(function(){return B(this)}));Object.defineProperty(String.prototype,"toBase64",S(function(r){return v(this,r)}));Object.defineProperty(String.prototype,"toBase64URI",S(function(){return v(this,true)}))}}})(this); /*! * node-parameterize 0.0.7 * https://github.com/fyalavuz/node-parameterize * Exported as `Flatdoc.slugify` */ (function(r){var LATIN_MAP={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","Æ":"AE","Ç":"C","È":"E","É":"E","Ê":"E","Ë":"E","Ì":"I","Í":"I","Î":"I","Ï":"I","Ð":"D","Ñ":"N","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ő":"O","Ø":"O","Ù":"U","Ú":"U","Û":"U","Ü":"U","Ű":"U","Ý":"Y","Þ":"TH","ß":"ss","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","æ":"ae","ç":"c","è":"e","é":"e","ê":"e","ë":"e","ì":"i","í":"i","î":"i","ï":"i","ð":"d","ñ":"n","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ő":"o","ø":"o","ù":"u","ú":"u","û":"u","ü":"u","ű":"u","ý":"y","þ":"th","ÿ":"y"};var LATIN_SYMBOLS_MAP={"©":"(c)"};var GREEK_MAP={"α":"a","β":"b","γ":"g","δ":"d","ε":"e","ζ":"z","η":"h","θ":"8","ι":"i","κ":"k","λ":"l","μ":"m","ν":"n","ξ":"3","ο":"o","π":"p","ρ":"r","σ":"s","τ":"t","υ":"y","φ":"f","χ":"x","ψ":"ps","ω":"w","ά":"a","έ":"e","ί":"i","ό":"o","ύ":"y","ή":"h","ώ":"w","ς":"s","ϊ":"i","ΰ":"y","ϋ":"y","ΐ":"i","Α":"A","Β":"B","Γ":"G","Δ":"D","Ε":"E","Ζ":"Z","Η":"H","Θ":"8","Ι":"I","Κ":"K","Λ":"L","Μ":"M","Ν":"N","Ξ":"3","Ο":"O","Π":"P","Ρ":"R","Σ":"S","Τ":"T","Υ":"Y","Φ":"F","Χ":"X","Ψ":"PS","Ω":"W","Ά":"A","Έ":"E","Ί":"I","Ό":"O","Ύ":"Y","Ή":"H","Ώ":"W","Ϊ":"I","Ϋ":"Y"};var TURKISH_MAP={"ş":"s","Ş":"S","ı":"i","İ":"I","ç":"c","Ç":"C","ü":"u","Ü":"U","ö":"o","Ö":"O","ğ":"g","Ğ":"G"};var RUSSIAN_MAP={"а":"a","б":"b","в":"v","г":"g","д":"d","е":"e","ё":"yo","ж":"zh","з":"z","и":"i","й":"j","к":"k","л":"l","м":"m","н":"n","о":"o","п":"p","р":"r","с":"s","т":"t","у":"u","ф":"f","х":"h","ц":"c","ч":"ch","ш":"sh","щ":"sh","ъ":"","ы":"y","ь":"","э":"e","ю":"yu","я":"ya","А":"A","Б":"B","В":"V","Г":"G","Д":"D","Е":"E","Ё":"Yo","Ж":"Zh","З":"Z","И":"I","Й":"J","К":"K","Л":"L","М":"M","Н":"N","О":"O","П":"P","Р":"R","С":"S","Т":"T","У":"U","Ф":"F","Х":"H","Ц":"C","Ч":"Ch","Ш":"Sh","Щ":"Sh","Ъ":"","Ы":"Y","Ь":"","Э":"E","Ю":"Yu","Я":"Ya"};var UKRAINIAN_MAP={"Є":"Ye","І":"I","Ї":"Yi","Ґ":"G","є":"ye","і":"i","ї":"yi","ґ":"g"};var CZECH_MAP={"č":"c","ď":"d","ě":"e","ň":"n","ř":"r","š":"s","ť":"t","ů":"u","ž":"z","Č":"C","Ď":"D","Ě":"E","Ň":"N","Ř":"R","Š":"S","Ť":"T","Ů":"U","Ž":"Z"};var POLISH_MAP={"ą":"a","ć":"c","ę":"e","ł":"l","ń":"n","ó":"o","ś":"s","ź":"z","ż":"z","Ą":"A","Ć":"C","Ę":"e","Ł":"L","Ń":"N","Ó":"o","Ś":"S","Ź":"Z","Ż":"Z"};var LATVIAN_MAP={"ā":"a","č":"c","ē":"e","ģ":"g","ī":"i","ķ":"k","ļ":"l","ņ":"n","š":"s","ū":"u","ž":"z","Ā":"A","Č":"C","Ē":"E","Ģ":"G","Ī":"i","Ķ":"k","Ļ":"L","Ņ":"N","Š":"S","Ū":"u","Ž":"Z"};var ALL_DOWNCODE_MAPS=new Array;ALL_DOWNCODE_MAPS[0]=LATIN_MAP;ALL_DOWNCODE_MAPS[1]=LATIN_SYMBOLS_MAP;ALL_DOWNCODE_MAPS[2]=GREEK_MAP;ALL_DOWNCODE_MAPS[3]=TURKISH_MAP;ALL_DOWNCODE_MAPS[4]=RUSSIAN_MAP;ALL_DOWNCODE_MAPS[5]=UKRAINIAN_MAP;ALL_DOWNCODE_MAPS[6]=CZECH_MAP;ALL_DOWNCODE_MAPS[7]=POLISH_MAP;ALL_DOWNCODE_MAPS[8]=LATVIAN_MAP;var Downcoder=new Object;Downcoder.Initialize=function(){if(Downcoder.map)return;Downcoder.map={};Downcoder.chars="";for(var i in ALL_DOWNCODE_MAPS){var lookup=ALL_DOWNCODE_MAPS[i];for(var c in lookup){Downcoder.map[c]=lookup[c];Downcoder.chars+=c}}Downcoder.regex=new RegExp("["+Downcoder.chars+"]|[^"+Downcoder.chars+"]+","g")};downcode=function(slug){Downcoder.Initialize();var downcoded="";var pieces=slug.match(Downcoder.regex);if(pieces){for(var i=0;iarticle,aside,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}"; c=d.insertBefore(c.lastChild,d.firstChild);b.hasCSS=!!c}g||t(a,b);return a}var k=l.html5||{},s=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,r=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,j,o="_html5shiv",h=0,n={},g;(function(){try{var a=f.createElement("a");a.innerHTML="";j="hidden"in a;var b;if(!(b=1==a.childNodes.length)){f.createElement("a");var c=f.createDocumentFragment();b="undefined"==typeof c.cloneNode|| "undefined"==typeof c.createDocumentFragment||"undefined"==typeof c.createElement}g=b}catch(d){g=j=!0}})();var e={elements:k.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup main mark meter nav output progress section summary time video",version:"3.6.2",shivCSS:!1!==k.shivCSS,supportsUnknownElements:g,shivMethods:!1!==k.shivMethods,type:"default",shivDocument:q,createElement:p,createDocumentFragment:function(a,b){a||(a=f);if(g)return a.createDocumentFragment(); for(var b=b||i(a),c=b.frag.cloneNode(),d=0,e=m(),h=e.length;d fakeBody = doc.createElement( "body" ), div = doc.createElement( "div" ); div.id = "mq-test-1"; div.style.cssText = "position:absolute;top:-100em"; fakeBody.style.background = "none"; fakeBody.appendChild(div); return function(q){ div.innerHTML = "­"; docElem.insertBefore( fakeBody, refNode ); bool = div.offsetWidth === 42; docElem.removeChild( fakeBody ); return { matches: bool, media: q }; }; }( document )); /*! Respond.js v1.1.0: min/max-width media query polyfill. (c) Scott Jehl. MIT/GPLv2 Lic. j.mp/respondjs */ (function( win ){ "use strict"; //exposed namespace var respond = {}; win.respond = respond; //define update even in native-mq-supporting browsers, to avoid errors respond.update = function(){}; //expose media query support flag for external use respond.mediaQueriesSupported = win.matchMedia && win.matchMedia( "only all" ).matches; //if media queries are supported, exit here if( respond.mediaQueriesSupported ){ return; } //define vars var doc = win.document, docElem = doc.documentElement, mediastyles = [], rules = [], appendedEls = [], parsedSheets = {}, resizeThrottle = 30, head = doc.getElementsByTagName( "head" )[0] || docElem, base = doc.getElementsByTagName( "base" )[0], links = head.getElementsByTagName( "link" ), requestQueue = [], //loop stylesheets, send text content to translate ripCSS = function(){ for( var i = 0; i < links.length; i++ ){ var sheet = links[ i ], href = sheet.href, media = sheet.media, isCSS = sheet.rel && sheet.rel.toLowerCase() === "stylesheet"; //only links plz and prevent re-parsing if( !!href && isCSS && !parsedSheets[ href ] ){ // selectivizr exposes css through the rawCssText expando if (sheet.styleSheet && sheet.styleSheet.rawCssText) { translate( sheet.styleSheet.rawCssText, href, media ); parsedSheets[ href ] = true; } else { if( (!/^([a-zA-Z:]*\/\/)/.test( href ) && !base) || href.replace( RegExp.$1, "" ).split( "/" )[0] === win.location.host ){ requestQueue.push( { href: href, media: media } ); } } } } makeRequests(); }, //recurse through request queue, get css text makeRequests = function(){ if( requestQueue.length ){ var thisRequest = requestQueue.shift(); ajax( thisRequest.href, function( styles ){ translate( styles, thisRequest.href, thisRequest.media ); parsedSheets[ thisRequest.href ] = true; // by wrapping recursive function call in setTimeout // we prevent "Stack overflow" error in IE7 win.setTimeout(function(){ makeRequests(); },0); } ); } }, //find media blocks in css text, convert to style blocks translate = function( styles, href, media ){ var qs = styles.match( /@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi ), ql = qs && qs.length || 0; //try to get CSS path href = href.substring( 0, href.lastIndexOf( "/" ) ); var repUrls = function( css ){ return css.replace( /(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g, "$1" + href + "$2$3" ); }, useMedia = !ql && media; //if path exists, tack on trailing slash if( href.length ){ href += "/"; } //if no internal queries exist, but media attr does, use that //note: this currently lacks support for situations where a media attr is specified on a link AND //its associated stylesheet has internal CSS media queries. //In those cases, the media attribute will currently be ignored. if( useMedia ){ ql = 1; } for( var i = 0; i < ql; i++ ){ var fullq, thisq, eachq, eql; //media attr if( useMedia ){ fullq = media; rules.push( repUrls( styles ) ); } //parse for styles else{ fullq = qs[ i ].match( /@media *([^\{]+)\{([\S\s]+?)$/ ) && RegExp.$1; rules.push( RegExp.$2 && repUrls( RegExp.$2 ) ); } eachq = fullq.split( "," ); eql = eachq.length; for( var j = 0; j < eql; j++ ){ thisq = eachq[ j ]; mediastyles.push( { media : thisq.split( "(" )[ 0 ].match( /(only\s+)?([a-zA-Z]+)\s?/ ) && RegExp.$2 || "all", rules : rules.length - 1, hasquery : thisq.indexOf("(") > -1, minw : thisq.match( /\(\s*min\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/ ) && parseFloat( RegExp.$1 ) + ( RegExp.$2 || "" ), maxw : thisq.match( /\(\s*max\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/ ) && parseFloat( RegExp.$1 ) + ( RegExp.$2 || "" ) } ); } } applyMedia(); }, lastCall, resizeDefer, // returns the value of 1em in pixels getEmValue = function() { var ret, div = doc.createElement('div'), body = doc.body, fakeUsed = false; div.style.cssText = "position:absolute;font-size:1em;width:1em"; if( !body ){ body = fakeUsed = doc.createElement( "body" ); body.style.background = "none"; } body.appendChild( div ); docElem.insertBefore( body, docElem.firstChild ); ret = div.offsetWidth; if( fakeUsed ){ docElem.removeChild( body ); } else { body.removeChild( div ); } //also update eminpx before returning ret = eminpx = parseFloat(ret); return ret; }, //cached container for 1em value, populated the first time it's needed eminpx, //enable/disable styles applyMedia = function( fromResize ){ var name = "clientWidth", docElemProp = docElem[ name ], currWidth = doc.compatMode === "CSS1Compat" && docElemProp || doc.body[ name ] || docElemProp, styleBlocks = {}, lastLink = links[ links.length-1 ], now = (new Date()).getTime(); //throttle resize calls if( fromResize && lastCall && now - lastCall < resizeThrottle ){ win.clearTimeout( resizeDefer ); resizeDefer = win.setTimeout( applyMedia, resizeThrottle ); return; } else { lastCall = now; } for( var i in mediastyles ){ if( mediastyles.hasOwnProperty( i ) ){ var thisstyle = mediastyles[ i ], min = thisstyle.minw, max = thisstyle.maxw, minnull = min === null, maxnull = max === null, em = "em"; if( !!min ){ min = parseFloat( min ) * ( min.indexOf( em ) > -1 ? ( eminpx || getEmValue() ) : 1 ); } if( !!max ){ max = parseFloat( max ) * ( max.indexOf( em ) > -1 ? ( eminpx || getEmValue() ) : 1 ); } // if there's no media query at all (the () part), or min or max is not null, and if either is present, they're true if( !thisstyle.hasquery || ( !minnull || !maxnull ) && ( minnull || currWidth >= min ) && ( maxnull || currWidth <= max ) ){ if( !styleBlocks[ thisstyle.media ] ){ styleBlocks[ thisstyle.media ] = []; } styleBlocks[ thisstyle.media ].push( rules[ thisstyle.rules ] ); } } } //remove any existing respond style element(s) for( var j in appendedEls ){ if( appendedEls.hasOwnProperty( j ) ){ if( appendedEls[ j ] && appendedEls[ j ].parentNode === head ){ head.removeChild( appendedEls[ j ] ); } } } //inject active styles, grouped by media type for( var k in styleBlocks ){ if( styleBlocks.hasOwnProperty( k ) ){ var ss = doc.createElement( "style" ), css = styleBlocks[ k ].join( "\n" ); ss.type = "text/css"; ss.media = k; //originally, ss was appended to a documentFragment and sheets were appended in bulk. //this caused crashes in IE in a number of circumstances, such as when the HTML element had a bg image set, so appending beforehand seems best. Thanks to @dvelyk for the initial research on this one! head.insertBefore( ss, lastLink.nextSibling ); if ( ss.styleSheet ){ ss.styleSheet.cssText = css; } else { ss.appendChild( doc.createTextNode( css ) ); } //push to appendedEls to track for later removal appendedEls.push( ss ); } } }, //tweaked Ajax functions from Quirksmode ajax = function( url, callback ) { var req = xmlHttp(); if (!req){ return; } req.open( "GET", url, true ); req.onreadystatechange = function () { if ( req.readyState !== 4 || req.status !== 200 && req.status !== 304 ){ return; } callback( req.responseText ); }; if ( req.readyState === 4 ){ return; } req.send( null ); }, //define ajax obj xmlHttp = (function() { var xmlhttpmethod = false; try { xmlhttpmethod = new win.XMLHttpRequest(); } catch( e ){ xmlhttpmethod = new win.ActiveXObject( "Microsoft.XMLHTTP" ); } return function(){ return xmlhttpmethod; }; })(); //translate CSS ripCSS(); //expose update for re-running respond later on respond.update = ripCSS; //adjust on resize function callMedia(){ applyMedia( true ); } if( win.addEventListener ){ win.addEventListener( "resize", callMedia, false ); } else if( win.attachEvent ){ win.attachEvent( "onresize", callMedia ); } })(this); ================================================ FILE: scripts/script.js ================================================ (function($) { var $window = $(window); var $document = $(document); /* * Scrollspy. */ $document.on('flatdoc:ready', function() { $("h2, h3").scrollagent(function(cid, pid, currentElement, previousElement) { if (pid) { $("[href='#"+pid+"']").removeClass('active'); } if (cid) { $("[href='#"+cid+"']").addClass('active'); } }); }); /* * Anchor jump links. */ $document.on('flatdoc:ready', function() { $('.menu a').anchorjump(); }); /* * Title card. */ $(function() { var $card = $('.title-card'); if (!$card.length) return; var $header = $('.header'); var headerHeight = $header.length ? $header.outerHeight() : 0; $window .on('resize.title-card', function() { var windowWidth = $window.width(); if (windowWidth < 480) { $card.css('height', ''); } else { var height = $window.height(); $card.css('height', height - headerHeight); } }) .trigger('resize.title-card'); }); /* * Sidebar stick. */ $(function() { var $sidebar = $('.menubar'); var elTop; $window .on('resize.sidestick', function() { $sidebar.removeClass('fixed'); elTop = $sidebar.offset().top; $window.trigger('scroll.sidestick'); }) .on('scroll.sidestick', function() { var scrollY = $window.scrollTop(); $sidebar.toggleClass('fixed', (scrollY >= elTop)); }) .trigger('resize.sidestick'); }); })(jQuery); /*! jQuery.scrollagent (c) 2012, Rico Sta. Cruz. MIT License. * https://github.com/rstacruz/jquery-stuff/tree/master/scrollagent */ // Call $(...).scrollagent() with a callback function. // // The callback will be called everytime the focus changes. // // Example: // // $("h2").scrollagent(function(cid, pid, currentElement, previousElement) { // if (pid) { // $("[href='#"+pid+"']").removeClass('active'); // } // if (cid) { // $("[href='#"+cid+"']").addClass('active'); // } // }); (function($) { $.fn.scrollagent = function(options, callback) { // Account for $.scrollspy(function) if (typeof callback === 'undefined') { callback = options; options = {}; } var $sections = $(this); var $parent = options.parent || $(window); // Find the top offsets of each section var offsets = []; $sections.each(function(i) { var offset = $(this).attr('data-anchor-offset') ? parseInt($(this).attr('data-anchor-offset'), 10) : (options.offset || 0); offsets.push({ id: $(this).attr('id'), index: i, el: this, offset: offset }); }); // State var current = null; var height = null; var range = null; // Save the height. Do this only whenever the window is resized so we don't // recalculate often. $(window).on('resize', function() { height = $parent.height(); range = $(document).height(); }); // Find the current active section every scroll tick. $parent.on('scroll', function() { var y = $parent.scrollTop(); y += height * (0.3 + 0.7 * Math.pow(y/range, 2)); var latest = null; for (var i in offsets) { if (offsets.hasOwnProperty(i)) { var offset = offsets[i]; if ($(offset.el).offset().top + offset.offset < y) latest = offset; } } if (latest && (!current || (latest.index !== current.index))) { callback.call($sections, latest ? latest.id : null, current ? current.id : null, latest ? latest.el : null, current ? current.el : null); current = latest; } }); $(window).trigger('resize'); $parent.trigger('scroll'); return this; }; })(jQuery); /*! Anchorjump (c) 2012, Rico Sta. Cruz. MIT License. * http://github.com/rstacruz/jquery-stuff/tree/master/anchorjump */ // Makes anchor jumps happen with smooth scrolling. // // $("#menu a").anchorjump(); // $("#menu a").anchorjump({ offset: -30 }); // // // Via delegate: // $("#menu").anchorjump({ for: 'a', offset: -30 }); // // You may specify a parent. This makes it scroll down to the parent. // Great for tabbed views. // // $('#menu a').anchorjump({ parent: '.anchor' }); // // You can jump to a given area. // // $.anchorjump('#bank-deposit', options); (function($) { var defaults = { 'speed': 500, 'offset': 0, 'for': null, 'parent': null }; $.fn.anchorjump = function(options) { options = $.extend({}, defaults, options); if (options['for']) { this.on('click', options['for'], onClick); } else { this.on('click', onClick); } function onClick(e) { var $a = $(e.target).closest('a'); if (e.ctrlKey || e.metaKey || e.altKey || $a.attr('target')) return; e.preventDefault(); var href = $a.attr('href'); $.anchorjump(href, options); } }; // Jump to a given area. $.anchorjump = function(href, options) { options = $.extend({}, defaults, options); var top = 0; if (href != '#') { var $area = $(href); // Find the parent if (options.parent) { var $parent = $area.closest(options.parent); if ($parent.length) { $area = $parent; } } if (!$area.length) { return; } // Determine the pixel offset; use the default if not available var offset = $area.attr('data-anchor-offset') ? parseInt($area.attr('data-anchor-offset'), 10) : options.offset; top = Math.max(0, $area.offset().top + offset); } $('html, body').animate({ scrollTop: top }, options.speed); $('body').trigger('anchor', href); // Add the location hash via pushState. if (window.history.pushState) { window.history.pushState({ href: href }, "", href); } }; })(jQuery); ================================================ FILE: security.md ================================================ # Security Blynk server has 5 ports open for different security levels. * **80** - plain TCP connection for the hardware \(no security\) * **8080** - plain TCP connection for hardware \(no security\) * **443** - SSL/TLS connection for the Mobile Apps and hardware with SSL * **9443** - SSL/TLS connection for the Mobile Apps and hardware with SSL Hardware may select to connect to 443 \(9443\) or 80 \(8080\), depending on it's capabilities. Connection between the app and the server is always is done through SSL/TLS, so it is always secured. Connection between the hardware and server depends on your hardware capabilities. ## Use Local Blynk Server Local Blynk Server is no longer supported. ## Use SSL gateway Most platforms are not capable to handle SSL, so they connect to 80. However, our [gateway script](https://github.com/blynkkk/blynk-library/blob/master/scripts/blynk-ser.sh) can be used to add SSL security layer to communication. ```bash ./blynk-ser.sh -f SSL ``` This will forward all hardware connections from 9443 port to the server via SSL gateway. You can run this script on your Raspberry Pi, desktop computer, or even directly on your router! **Note:** when using your own server, you should overwrite the bundled server.crt certificate, or specify it to the script using `--cert` switch: ```bash ./blynk-ser.sh -f SSL -s -p 9443 --cert=.crt ``` Flag `-f SSL` is enabled by default for USB communication so you don't have to explicit declare it. **Note:** SSL is supported by the gateway only on Linux/OSX for now If you want to skip SSL, and connect to TCP, you can also do that: ```bash ./blynk-ser.sh -t TCP ``` ================================================ FILE: sharing.md ================================================ # Sharing Blynk offers two types of sharing your projects with other people: * **Share access to your hardware.** Think about giving someone an App for your Project. They can't modify, but can control and see what's there. * **Share your Project configuration.** Others will get a clone of your project by scanning a given QR link, but they won't be able to control your hardware. It's great for tutorials, instructables, etc. ## Shared access to your hardware Imagine giving someone an App to control your Project. * people you’ve shared your project with can’t modify anything. They can only use it * you can update your app, change the layout, add widgets and it’s immediately synced to everyone * you can revoke access at any moment How it works: * you send the QR code to your users \(you can email, print, post to social media, do whatever you want\) * others download Blynk app, scan the QR code and your app opens for them ready to use. They don’t even need to login or create an account. Go to your Project's Settings: ![](.gitbook/assets/dash_settings_sharing.png) Click on "Generate Link" button : ![](.gitbook/assets/dash_settings_sharing_generate.png) It will generate QR code you can share with others: ![](.gitbook/assets/dash_public_sharing.png) That's it! Now **Exit the settings and press PLAY button.** Another person would need to install Blynk app and scan QR code from the login screen \(scanning from existing profile is not yet supported\) ; ![](.gitbook/assets/scan_qr.png) **NOTE:** Your Project should be active, don't forget to press Play button. **WARNING:** Sharing costs 1000 energy and this energy is not recoverable even you didn't use sharing at all. ## Share your Project configuration In case you want to share your Project's set up without giving access to your hardware \(for example to make a tutorial or instructable\)- follow the steps: In Project's Settings go to **Clone** button. ![](.gitbook/assets/clone.png) It will generate QR code you can share with anyone. ![](.gitbook/assets/QR.png) Another person **should Log In to Blynk app** and press QR button in Projects gallery ![](.gitbook/assets/QR_button_edit.png) After the scan, a new Project will be created, all the widgets, settings, layout will be cloned. Another person would need enough Energy Balance to clone your Project. **Auth Token will be different!**. Nobody will get access to your hardware. They just get a copy of the layout and settings. ================================================ FILE: supportedhardware.md ================================================ # Supported Hardware Blynk supports more than 400 boards already, including support for Arduino, Particle, ARM mbed, TI Energia, MicroPython, Node.js, OpenWRT and many Single Board Computers. You can add your own connection types easily \(see [these](https://github.com/blynkkk/blynk-library/tree/master/examples/More/ArduinoClient) examples for Arduino\)! ## Platforms * **Arduino** \([https://github.com/blynkkk/blynk-library](https://github.com/blynkkk/blynk-library)\) * Arduino MKR WiFi 1010 * Arduino MKR GSM 1400 * Arduino MKR NB 1500 * Arduino Uno, Duemilanove * Arduino Nano, Mini, Pro Mini, Pro Micro, Due, Mega * Arduino 101 \(Intel Curie, with BLE\) * Arduino MKR1000 * Arduino Zero * Arduino Yún \(onboard WiFi and Ethernet, via Bridge\) * Arduino.org UNO WiFi * Arduino MKR VIDOR 4000 \(use the example for MKR WiFi 1010\) * Arduino UNO WiFi Rev.2 \(use the example for MKR WiFi 1010\) * **Arduino-like** * Blynk Board * ESP8266 \(Generic, NodeMCU, Witty Cloud, Huzzah, WeMos D1, Seeed Wio Link, etc.\) * ESP32 \(WiFi, BLE\) * Nordic nRF51/nRF52 - based boards * Teensy 3.2/3.1 * Blue Pill \(STM32F103C\) * Realtek RTL8710 / Ameba via [RTLduino](https://github.com/pvvx/RtlDuino) * BBC micro:bit * LightBlue Bean _, soon_ * DFRobot Bluno * RedBear Duo \(WiFi, BLE\) * RedBearLab Blend Micro * RedBearLab BLE Nano \(v1 and v2\) * Seeed Tiny BLE * Simblee BLE * RFduino BLE * The AirBoard \(BLE-Link, RN-XV\) * Feather M0 WiFi * Feather 32u4 BLE * Intel Edison * Intel Galileo * Fishino Guppy, Uno, Mega * TinyCircuits TinyDuino \(CC3000\) * Microduino/mCookie Core, Core+, CoreUSB * Wicked WildFire V2, V3, V4 * Digistump Oak * chipKIT Uno32 * Alorium XLR8 \(FPGA\) * LinkIt ONE \(WiFi only\) * **Energia** * Texas Instruments * CC3220SF-LaunchXL * CC3200-LaunchXL * Tiva C Connected LaunchPad * Stellaris LM4F120 LaunchPad * MSP430F5529 + CC3100 * LaunchPad MSP432 * RedBearLab \(CC3200, WiFi Mini\) * **Particle** [https://github.com/vshymanskyy/blynk-library-spark](https://github.com/vshymanskyy/blynk-library-spark)\) * Core * Photon * Electron * RPi * SparkFun RedBoard * RedBear Duo \(WiFi & BLE\) * **ARM mbed** \([https://developer.mbed.org/users/vshymanskyy/code/Blynk/](https://developer.mbed.org/users/vshymanskyy/code/Blynk/)\) * Seeed Tiny BLE * RedBearLab BLE Nano * BBC micro:bit * STM32 Nucleo + Wiznet 5100 _, soon_ * **JavaScript** \(Node.js, Espruino, Browsers\) \([https://www.npmjs.com/package/blynk-library](https://www.npmjs.com/package/blynk-library)\) * Regular PC with Linux / Windows / OS X * Raspberry Pi \(Banana Pi, Orange Pi, ...\) * BeagleBone Black * Onion Omega * Onion Omega 2 * Intel Galileo * Intel Edison * Intel Joule * LeMaker Guitar * LeMaker Banana Pro * Samsung ARTIK 5 * PandaBoard, CubieBoard, pcDuino, Tessel 2 * VoCore, VoCore2 \(OpenWRT + [Espruino package](https://github.com/vshymanskyy/OpenWRT-Espruino-packages)\) * Espruino Pico * ... * **Python** \([https://github.com/vshymanskyy/blynk-library-python](https://github.com/vshymanskyy/blynk-library-python)\) * MicroPython * Python 2 * Python 3 * **Lua** \([https://github.com/blezek/blynk-esp](https://github.com/blezek/blynk-esp)\) * NodeMCU ## Arduino connection types * USB \(Serial\), connected to your laptop or desktop * **Ethernet** * Arduino MKR ETH * Arduino Ethernet Shield \(W5100\) * Arduino Ethernet Shield 2 \(W5500\) * SeeedStudio Ethernet Shield V2.0 \(W5200\) * ENC28J60-based modules * **WiFi** * ESP8266 as WiFi modem \(running original firmware\) * Arduino WiFi 101 Shield * Arduino WiFi Shield * WIZnet WizFi310 * Adafruit CC3000 WiFi Breakout / Shield * RN-XV WiFly * **Bluetooth Smart \(BLE 4.0\)** * HM-10, HC-08 * DFRobot BLE-Link module * Microduino/mCookie BLE * RedBearLab BLE Mini * nRF8001-based boards \(Adafruit Bluefruit LE, etc.\) * **Bluetooth 2.0 Serial Port Profile \(SPP\)** * HC-05, HC-06, ... * **Cellular \(GSM/3G/LTE\)** * SIMCom SIM800 series \(SIM800A, SIM800C, SIM800L, SIM800H, SIM808, SIM868\) * SIMCom SIM900 series \(SIM900A, SIM900D, SIM908, SIM968\) * A6/A7 * M590 * BG96 * GPRSbee * Microduino GSM * Adafruit FONA \(Mini Cellular GSM Breakout\) * Adafruit FONA 800/808 Shield ## Made by Community * [Marvell® EZ-Connect™ MW300/MW302](https://github.com/vshymanskyy/blynk-library-ez-connect) * [WIZnet-W5500-EVB](http://instructables.com/id/WIZnet-W5500-EVB-and-Blynk-App-communication) * [LabVIEW](https://github.com/juncaofish/NI-LabVIEWInterfaceforBlynk) * [Node-RED](https://github.com/gablau/node-red-contrib-blynk-ws) \(can be used as bridge to HTTP, TCP, UDP, MQTT, XMPP, IRC, OSC...\) ## Problematic Boards These boards are not supported and do not work out of the box: * [Arduino Tian](http://www.arduino.org/products/boards/arduino-tian) Here is a list of \[**known library issues**\]\([https://github.com/blynkkk/blynk-library/issues?q=is%3Aissue+label%3A"for+reference"+](https://github.com/blynkkk/blynk-library/issues?q=is%3Aissue+label%3A"for+reference"+)\) ================================================ FILE: table.css ================================================ .StatusCake table{font-family:verdana,arial,sans-serif;font-size:11px;color:#333;border-width:1px;border-color:#deeaee;border-collapse:collapse}.StatusCake{width:50%}.StatusCake table th{background:#c8d7dc;border-width:1px;color:#fff;padding:8px;border-style:solid;border-color:#deeaee}.PoweredBy{width:170px;float:right;text-align:center;margin-right:16px;font-size:12px;padding-top:2px;font-family:Verdana,Geneva,sans-serif;font-weight:700;height:18px;-webkit-border-bottom-right-radius:7px;-webkit-border-bottom-left-radius:7px;-moz-border-radius-bottomright:7px;-moz-border-radius-bottomleft:7px;border-bottom-right-radius:7px;border-bottom-left-radius:7px;background:#fff;background:-moz-linear-gradient(top,rgba(255,255,255,1) 0%,rgba(229,229,229,1) 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0%,rgba(255,255,255,1)),color-stop(100%,rgba(229,229,229,1)));background:-webkit-linear-gradient(top,rgba(255,255,255,1) 0%,rgba(229,229,229,1) 100%);background:-o-linear-gradient(top,rgba(255,255,255,1) 0%,rgba(229,229,229,1) 100%);background:-ms-linear-gradient(top,rgba(255,255,255,1) 0%,rgba(229,229,229,1) 100%);background:linear-gradient(to bottom,rgba(255,255,255,1) 0%,rgba(229,229,229,1) 100%);filter:progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff',endColorstr='#e5e5e5',GradientType=0 )}.PoweredBy a{color:#40626c;text-shadow:1px 1px #fff;text-decoration:none}.StatusCake table tr{background-color:#fff}.StatusCake .title{display:block;width:100%;height:32px;margin-top:15px;background:#f2f5f6;background:-moz-linear-gradient(top,#f2f5f6 0%,#e3eaed 37%,#c8d7dc 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#f2f5f6),color-stop(37%,#e3eaed),color-stop(100%,#c8d7dc));background:-webkit-linear-gradient(top,#f2f5f6 0%,#e3eaed 37%,#c8d7dc 100%);background:-o-linear-gradient(top,#f2f5f6 0%,#e3eaed 37%,#c8d7dc 100%);background:-ms-linear-gradient(top,#f2f5f6 0%,#e3eaed 37%,#c8d7dc 100%);background:linear-gradient(to bottom,#f2f5f6 0%,#e3eaed 37%,#c8d7dc 100%);filter:progid:DXImageTransform.Microsoft.gradient( startColorstr='#f2f5f6',endColorstr='#c8d7dc',GradientType=0 );-webkit-border-top-left-radius:7px;-webkit-border-top-right-radius:7px;-moz-border-radius-topleft:7px;-moz-border-radius-topright:7px;border-top-left-radius:7px;border-top-right-radius:7px}.StatusCake .title .text{padding:7px;font-size:14px;width:70%;float:left;font-family:verdana,arial,sans-serif;font-weight:700;color:#2f6779}#StatusTable{cursor:pointer!important}.StatusCake table tr:hover{background:#f2f5f6;background:-moz-linear-gradient(top,#f2f5f6 0%,#e3eaed 37%,#c8d7dc 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#f2f5f6),color-stop(37%,#e3eaed),color-stop(100%,#c8d7dc));background:-webkit-linear-gradient(top,#f2f5f6 0%,#e3eaed 37%,#c8d7dc 100%);background:-o-linear-gradient(top,#f2f5f6 0%,#e3eaed 37%,#c8d7dc 100%);background:-ms-linear-gradient(top,#f2f5f6 0%,#e3eaed 37%,#c8d7dc 100%);background:linear-gradient(to bottom,#f2f5f6 0%,#e3eaed 37%,#c8d7dc 100%);filter:progid:DXImageTransform.Microsoft.gradient( startColorstr='#f2f5f6',endColorstr='#c8d7dc',GradientType=0 )}.StatusCake .StatusGreen{background:#24c48e;background:-moz-linear-gradient(top,#24c48e 0%,#abdc28 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#24c48e),color-stop(100%,#abdc28));background:-webkit-linear-gradient(top,#24c48e 0%,#abdc28 100%);background:-o-linear-gradient(top,#24c48e 0%,#abdc28 100%);background:-ms-linear-gradient(top,#24c48e 0%,#abdc28 100%);background:linear-gradient(to bottom,#24c48e 0%,#abdc28 100%);filter:progid:DXImageTransform.Microsoft.gradient( startColorstr='#24c48e',endColorstr='#abdc28',GradientType=0 )}.StatusCake .StatusRed{background:#a90329;background:-moz-linear-gradient(top,#a90329 0%,#8f0222 44%,#6d0019 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#a90329),color-stop(44%,#8f0222),color-stop(100%,#6d0019));background:-webkit-linear-gradient(top,#a90329 0%,#8f0222 44%,#6d0019 100%);background:-o-linear-gradient(top,#a90329 0%,#8f0222 44%,#6d0019 100%);background:-ms-linear-gradient(top,#a90329 0%,#8f0222 44%,#6d0019 100%);background:linear-gradient(to bottom,#a90329 0%,#8f0222 44%,#6d0019 100%);color:#fff;filter:progid:DXImageTransform.Microsoft.gradient( startColorstr='#a90329',endColorstr='#6d0019',GradientType=0 )}.StatusCake table td{border-width:1px;padding:8px;border-style:solid;border-color:#deeaee} ================================================ FILE: themes/blynk.css ================================================ /*! Squarespace LESS Compiler (less.js language v1.3.3) */ /*! normalize.css v2.1.3 | MIT License | git.io/normalize */ article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,video{display:inline-block}audio:not([controls]){display:none;height:0}[hidden],template{display:none}html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}a{background:transparent}a:focus{outline:thin dotted}a:active,a:hover{outline:0}h1{font-size:2em;margin:.67em 0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}mark{background:#ff0;color:#000}code,kbd,pre,samp{font-family:monospace,serif;font-size:1em}pre{white-space:pre-wrap}q{quotes:"\201C" "\201D" "\2018" "\2019"}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:0}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}button,input,select,textarea{font-family:inherit;font-size:100%;margin:0}button,input{line-height:normal}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}input[type="search"]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}textarea{overflow:auto;vertical-align:top}table{border-collapse:collapse;border-spacing:0}nav ul{list-style-type:none;margin:0;padding:0} /*! Squarespace LESS Compiler (less.js language v1.3.3) */ .clear{zoom:1}.clear:after{display:block;visibility:hidden;font-size:0;height:0;clear:both;content:"."}@-webkit-keyframes spin-frames{from{-webkit-transform:rotate(0deg);-webkit-animation-timing-function:linear}to{-webkit-transform:rotate(360deg);-webkit-animation-timing-function:linear}}@-moz-keyframes spin-frames{from{-moz-transform:rotate(0deg);-moz-animation-timing-function:linear}to{-moz-transform:rotate(360deg);-moz-animation-timing-function:linear}}.sqs-lightbox-signup-spinner{position:fixed !important;left:50% !important;margin-top:-150px !important;margin-left:-150px !important;width:300px !important;height:300px !important}.squarespace-signup-text{font-family:'proxima-nova','Helvetica Neue',Helvetica,Arial,sans-serif;color:#fff;width:300px;text-align:center;padding-top:15px;line-height:21px;font-size:15px;padding-bottom:100px}.squarespace-signup-text .join-thank-you{font-weight:bold;padding-bottom:20px}.squarespace-signup-spinner{background:transparent url('//static.squarespace.com/universal/images-v6/big-gear.png') center center no-repeat;width:300px !important;height:220px !important;-webkit-animation-duration:2s;-moz-animation-duration:2s;-o-animation-duration:2s;animation-duration:2s;-webkit-animation-iteration-count:infinite;-moz-animation-iteration-count:infinite;-o-animation-iteration-count:infinite;animation-iteration-count:infinite;-webkit-animation-name:spin-frames;-moz-animation-name:spin-frames;-o-animation-name:spin-frames;animation-name:spin-frames}.squarespace-signup-spinner.stopped{-webkit-animation-name:stopped;-moz-animation-name:stopped;-o-animation-name:stopped;animation-name:stopped}.sqs-lightbox.light .squarespace-signup-text{font:12px / 22px 'Gotham SSm A','Gotham SSm B','Gotham SSm','Gotham','Proxima Nova','Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif !important;background-color:transparent !important;letter-spacing:0 !important;display:block !important;float:none !important;color:#000 !important;height:auto !important;width:auto !important;margin:0 !important;padding:0 !important;text-transform:none !important;color:#3e3e3e}.sqs-lightbox.light .squarespace-signup-spinner{background:transparent url('//static.squarespace.com/universal/images-v6/big-gear-dark.png') center center no-repeat}.sqs-g{letter-spacing:-.31em;*letter-spacing:normal;*word-spacing:-.43em;text-rendering:optimizespeed}.opera-only :-o-prefocus,.sqs-g{word-spacing:-.43em}.yui3-u,.sqs-u{display:inline-block;zoom:1;*display:inline;letter-spacing:normal;word-spacing:normal;vertical-align:top;text-rendering:auto}.sqs-u-1,.sqs-u-1-2,.sqs-u-1-3,.sqs-u-2-3,.sqs-u-1-4,.sqs-u-3-4,.sqs-u-1-5,.sqs-u-2-5,.sqs-u-3-5,.sqs-u-4-5,.sqs-u-1-6,.sqs-u-5-6,.sqs-u-1-8,.sqs-u-3-8,.sqs-u-5-8,.sqs-u-7-8,.sqs-u-1-12,.sqs-u-5-12,.sqs-u-7-12,.sqs-u-11-12,.sqs-u-1-24,.sqs-u-5-24,.sqs-u-7-24,.sqs-u-11-24,.sqs-u-13-24,.sqs-u-17-24,.sqs-u-19-24,.sqs-u-23-24{display:inline-block;zoom:1;*display:inline;letter-spacing:normal;word-spacing:normal;vertical-align:top;text-rendering:auto}.sqs-u-1{display:block}.sqs-u-1-2{width:50%}.sqs-u-1-3{width:33.33333%}.sqs-u-2-3{width:66.66666%}.sqs-u-1-4{width:25%}.sqs-u-3-4{width:75%}.sqs-u-1-5{width:20%}.sqs-u-2-5{width:40%}.sqs-u-3-5{width:60%}.sqs-u-4-5{width:80%}.sqs-u-1-6{width:16.656%}.sqs-u-5-6{width:83.33%}.sqs-u-1-8{width:12.5%}.sqs-u-3-8{width:37.5%}.sqs-u-5-8{width:62.5%}.sqs-u-7-8{width:87.5%}.sqs-u-1-12{width:8.3333%}.sqs-u-5-12{width:41.6666%}.sqs-u-7-12{width:58.3333%}.sqs-u-11-12{width:91.6666%}.sqs-u-1-24{width:4.1666%}.sqs-u-5-24{width:20.8333%}.sqs-u-7-24{width:29.1666%}.sqs-u-11-24{width:45.8333%}.sqs-u-13-24{width:54.1666%}.sqs-u-17-24{width:70.8333%}.sqs-u-19-24{width:79.1666%}.sqs-u-23-24{width:95.8333%}#sqs-css-stamp.cssgrids{display:none}.yui3-widget-hidden{display:none}.yui3-widget-content{overflow:hidden}.yui3-widget-content-expanded{box-sizing:border-box;height:100%}.yui3-widget-tmp-forcesize{overflow:hidden !important}.sqs-panel{position:absolute}.sqs-panel-hidden{visibility:hidden}.sqs-widget-tmp-forcesize .sqs-panel-content{overflow:hidden !important}.sqs-panel .sqs-widget-hd{position:relative}.sqs-panel .sqs-widget-hd .sqs-widget-buttons{position:absolute;top:0;right:0}.sqs-panel .sqs-widget-ft .sqs-widget-buttons{display:inline-block;*display:inline;zoom:1}.yui3-slider,.yui3-slider-rail{display:-moz-inline-stack;display:inline-block;*display:inline;zoom:1;vertical-align:middle}.yui3-slider-content{position:relative;display:block}.yui3-slider-rail{position:relative}.yui3-slider-rail-cap-top,.yui3-slider-rail-cap-left,.yui3-slider-rail-cap-bottom,.yui3-slider-rail-cap-right,.yui3-slider-thumb,.yui3-slider-thumb-image,.yui3-slider-thumb-shadow{position:absolute}.yui3-slider-thumb{overflow:hidden}.sqs-aclist,.yui3-aclist{position:absolute;z-index:10}.sqs-aclist-hidden,.yui3-aclist-hidden{visibility:hidden}.sqs-aclist-aria,.yui3-aclist-aria{left:-9999px;position:absolute}.sqs-aclist-list,.yui3-aclist-list{list-style:none;margin:0;overflow:hidden;padding:0}.sqs-aclist-item,.yui3-aclist-item{cursor:pointer;list-style:none;padding:2px 5px}.sqs-aclist-item-active,.yui3-aclist-item-active{outline:#afafaf dotted thin}body.native-currency-code-usd .sqs-money-native:before{content:'$'}body.native-currency-code-cad .sqs-money-native:before{content:'$'}body.native-currency-code-cad .sqs-money-native:after{content:' CAD'}body.native-currency-code-gbp .sqs-money-native:before{content:'£'}body.native-currency-code-eur .sqs-money-native:before{content:'€'}body.native-currency-code-aud .sqs-money-native:before{content:'$'}body.native-currency-code-aud .sqs-money-native:after{content:' AUD'}body.native-currency-code-chf .sqs-money-native:before{content:'CHF'}.password-prompt-overlay{z-index:50499;position:fixed;left:0;top:0;right:0;bottom:0;opacity:0;-webkit-transition:all .2s cubic-bezier(.645,.045,.355,1);transition:all .2s cubic-bezier(.645,.045,.355,1);background:#000;background:-webkit-gradient(radial,50% 25%,0,50% 25%,800,from(rgba(0,0,0,.85)),to(#000)) transparent;background:-moz-radial-gradient(center 45deg,circle cover,rgba(0,0,0,.85) 0%,#000 100%) transparent}.sqs-password-prompt{background:#f2f2f2;box-shadow:0 4px 33px rgba(0,0,0,.22),0 0 0 1px rgba(0,0,0,.04);position:absolute;left:50%;top:100px;margin-left:-160px;z-index:50500;-webkit-transition:all .2s cubic-bezier(.645,.045,.355,1);transition:all .2s cubic-bezier(.645,.045,.355,1);height:190px;width:320px;opacity:0;-webkit-transform:scale(.98);-moz-transform:scale(.98);-ms-transform:scale(.98);transform:scale(.98)}.sqs-password-prompt.shown{opacity:1;-webkit-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}.sqs-password-prompt-content .title{text-transform:uppercase;font-weight:500;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;border-bottom:1px solid #e2e2e2}.sqs-password-prompt-content .password{box-sizing:border-box;position:relative;background-color:#fff;padding:11px;line-height:22px;height:44px;width:100%;color:#3e3e3e;border:none}.sqs-password-prompt-content .password:focus{outline:none}.sqs-password-prompt-content .title,.sqs-password-prompt-content .fields{padding:16.5px 33px}.sqs-password-prompt-content .buttons{position:absolute;bottom:0;width:100%;border-top:1px solid #e4e4e4;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex}.sqs-password-prompt-content .buttons:empty{border-top:0}.sqs-password-prompt-content .buttons>*{-webkit-box-flex:1;-moz-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;display:flex;align-items:center;justify-content:center;border-left:1px solid #e4e4e4 !important}.sqs-password-prompt-content .buttons>*:first-child{border-left:none !important}.sqs-password-prompt-content .buttons input,.sqs-password-prompt-content .buttons button{background:transparent}.sqs-password-prompt-content .buttons a{border-bottom:none}.sqs-password-prompt-content .buttons>*{cursor:pointer;outline:none;background:#f2f2f2;padding:11px;text-align:center;-webkit-transition:background-color .1s ease-in-out;transition:background-color .1s ease-in-out;line-height:22px;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;font-family:inherit;-webkit-appearance:none;-moz-appearance:none;appearance:none}.sqs-password-prompt-content .buttons>*,.sqs-password-prompt-content .buttons>*>*{color:#3e3e3e !important;-webkit-appearance:none;border:0;text-transform:uppercase;outline:none;font-size:11px;font-weight:500}.sqs-password-prompt-content .buttons>*:hover{background-color:#fff;box-shadow:none}.sqs-system-error{color:#3e3e3e !important;background:transparent url('//static.squarespace.com/universal/images-v6/damask/error-dark.png') center center no-repeat;background-position:12px 12px}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:1.5dppx){.sqs-system-error{background-image:url('//static.squarespace.com/universal/images-v6/damask/error-dark@2x.png');background-size:44px}}.sqs-system-error input{cursor:pointer;outline:none;background:#3e3e3e;padding:11px;text-align:center;-webkit-transition:background-color .1s ease-in-out;transition:background-color .1s ease-in-out;line-height:22px;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;font-family:inherit;-webkit-appearance:none;-moz-appearance:none;appearance:none}.sqs-system-error input,.sqs-system-error input>*{color:#fff !important;-webkit-appearance:none;border:0;text-transform:uppercase;outline:none;font-size:11px;font-weight:500}.sqs-system-error input:hover{background-color:#000;box-shadow:none}.sqs-system-error-overlay.dialog-screen-overlay{background:rgba(242,242,242,.98)}.sqs-widgets-confirmation{position:absolute;z-index:1000000;font-size:12px}.sqs-widgets-confirmation-content{color:inherit;background-color:#f2f2f2;padding:22px 33px;text-align:center;box-shadow:0 4px 33px rgba(0,0,0,.22),0 0 0 1px rgba(0,0,0,.04)}.sqs-widgets-confirmation-content>.title{text-transform:uppercase;font-weight:500;margin-bottom:11px}.sqs-widgets-confirmation-content .message{margin:11px 0;line-height:22px}.sqs-widgets-confirmation-content .fields{margin-bottom:11px}.sqs-widgets-confirmation-content .fields .check-field-wrapper{padding:0}.sqs-widgets-confirmation-content .fields .check-field-wrapper .field-description{background:none}.sqs-widgets-confirmation-content .buttons{border-top:1px solid #e4e4e4;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;margin:22px -33px -22px}.sqs-widgets-confirmation-content .buttons:empty{border-top:0}.sqs-widgets-confirmation-content .buttons>*{-webkit-box-flex:1;-moz-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;display:flex;align-items:center;justify-content:center;border-left:1px solid #e4e4e4 !important}.sqs-widgets-confirmation-content .buttons>*:first-child{border-left:none !important}.sqs-widgets-confirmation-content .buttons input,.sqs-widgets-confirmation-content .buttons button{background:transparent}.sqs-widgets-confirmation-content .buttons a{border-bottom:none}.sqs-widgets-confirmation-content .buttons .confirmation-button:not(.reject){cursor:pointer;outline:none;background:#f2f2f2;padding:11px;text-align:center;-webkit-transition:background-color .1s ease-in-out;transition:background-color .1s ease-in-out;line-height:22px;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;font-family:inherit;-webkit-appearance:none;-moz-appearance:none;appearance:none}.sqs-widgets-confirmation-content .buttons .confirmation-button:not(.reject),.sqs-widgets-confirmation-content .buttons .confirmation-button:not(.reject)>*{color:#3e3e3e !important;-webkit-appearance:none;border:0;text-transform:uppercase;outline:none;font-size:11px;font-weight:500}.sqs-widgets-confirmation-content .buttons .confirmation-button:not(.reject):hover{background-color:#fff;box-shadow:none}.sqs-widgets-confirmation-content .buttons .confirmation-button.reject{cursor:pointer;outline:none;background:#f2f2f2;padding:11px;text-align:center;-webkit-transition:background-color .1s ease-in-out;transition:background-color .1s ease-in-out;line-height:22px;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;font-family:inherit;-webkit-appearance:none;-moz-appearance:none;appearance:none}.sqs-widgets-confirmation-content .buttons .confirmation-button.reject,.sqs-widgets-confirmation-content .buttons .confirmation-button.reject>*{color:#3e3e3e !important;-webkit-appearance:none;border:0;text-transform:uppercase;outline:none;font-size:11px;font-weight:500}.sqs-widgets-confirmation-content .buttons .confirmation-button.reject:hover{background-color:#000;box-shadow:none}.sqs-widgets-confirmation-content .buttons .confirmation-button.reject:hover{background-color:#f0523d}.sqs-widgets-confirmation-content .buttons .confirmation-button.reject:hover,.sqs-widgets-confirmation-content .buttons .confirmation-button.reject:hover *{color:#fff !important}.sqs-widgets-confirmation.sqs-widgets-data-confirmation .sqs-widgets-confirmation-content{text-align:left}.sqs-widgets-confirmation.danger-zone .sqs-widgets-confirmation-content{color:#fff !important;background-color:#f0523d}.sqs-widgets-confirmation.danger-zone .sqs-widgets-confirmation-content .buttons .confirmation-button{background-color:#f0523d;color:#fff !important}.sqs-widgets-confirmation.danger-zone .sqs-widgets-confirmation-content .buttons .confirmation-button:hover{background-color:#e4351e}.sqs-widgets-confirmation.dangerous-confirmation-button .sqs-widgets-confirmation-content .buttons .confirm:hover{background-color:#f0523d;color:#fff !important}.sqs-widgets-confirmation.reject-warning .buttons .confirmation-button.reject:hover{background-color:#f0523d;color:#fff}.sqs-widgets-confirmation.delete-collection .confirmation-button.confirm:hover{background-color:#f0523d;color:#fff !important}.sqs-widgets-confirmation.with-media .title:empty,.sqs-widgets-confirmation.with-media .message:empty{display:none}.sqs-widgets-confirmation.with-media .title:empty+.message:empty+.media{margin-top:-22px}.sqs-widgets-confirmation.with-media .media{display:block;position:relative;margin:0px -33px}.sqs-widgets-confirmation.with-media .media>*{display:block;position:relative;margin:0 auto}.sqs-widgets-confirmation.with-media .buttons{margin-top:0px}.sqs-widgets-confirmation.shown .media>*{width:100%}.sqs-widgets-confirmation{opacity:0;-webkit-transform:scale(.96);-moz-transform:scale(.96);-ms-transform:scale(.96);transform:scale(.96)}.sqs-widgets-confirmation.mobile{-webkit-transform:translatey(-50%);-moz-transform:translatey(-50%);-ms-transform:translatey(-50%);transform:translatey(-50%)}.sqs-widgets-confirmation.shown{opacity:1;-webkit-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);transform:scale(1);-webkit-animation-name:show-confirmation;-moz-animation-name:show-confirmation;-o-animation-name:show-confirmation;animation-name:show-confirmation;-webkit-animation-iteration-count:1;-moz-animation-iteration-count:1;-o-animation-iteration-count:1;animation-iteration-count:1;-webkit-animation-duration:.3s;-moz-animation-duration:.3s;-o-animation-duration:.3s;animation-duration:.3s}.sqs-widgets-confirmation.shown.mobile{-webkit-transform:translatey(0);-moz-transform:translatey(0);-ms-transform:translatey(0);transform:translatey(0);-webkit-animation-name:show-confirmation-mobile;-moz-animation-name:show-confirmation-mobile;-o-animation-name:show-confirmation-mobile;animation-name:show-confirmation-mobile}.sqs-widgets-confirmation.hiding{opacity:0;-webkit-animation-name:none;-moz-animation-name:none;-o-animation-name:none;animation-name:none;-webkit-transition-property:all;transition-property:all;-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transform:scale(.96);-moz-transform:scale(.96);-ms-transform:scale(.96);transform:scale(.96)}.sqs-widgets-confirmation.hiding.mobile{-webkit-transform:translatey(-50%);-moz-transform:translatey(-50%);-ms-transform:translatey(-50%);transform:translatey(-50%)}.sqs-widgets-confirmation-hidden{display:none}@-webkit-keyframes show-confirmation{from{opacity:0;-webkit-transform:scale(.96);-moz-transform:scale(.96);-ms-transform:scale(.96);transform:scale(.96)}to{opacity:1;-webkit-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}}@-moz-keyframes show-confirmation{from{opacity:0;-webkit-transform:scale(.96);-moz-transform:scale(.96);-ms-transform:scale(.96);transform:scale(.96)}to{opacity:1;-webkit-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}}@keyframes show-confirmation{from{opacity:0;-webkit-transform:scale(.96);-moz-transform:scale(.96);-ms-transform:scale(.96);transform:scale(.96)}to{opacity:1;-webkit-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}}@-webkit-keyframes show-confirmation-mobile{from{-webkit-transform:translatey(-50%);-moz-transform:translatey(-50%);-ms-transform:translatey(-50%);transform:translatey(-50%)}to{-webkit-transform:translatey(0);-moz-transform:translatey(0);-ms-transform:translatey(0);transform:translatey(0)}}@keyframes show-confirmation-mobile{from{-webkit-transform:translatey(-50%);-moz-transform:translatey(-50%);-ms-transform:translatey(-50%);transform:translatey(-50%)}to{-webkit-transform:translatey(0);-moz-transform:translatey(0);-ms-transform:translatey(0);transform:translatey(0)}}.sqs-widgets-confirmation-overlay{display:block;background:#000;position:fixed;top:0;left:0;width:100%;height:100%;opacity:.4;z-index:999999}.ReactModal__Overlay{-webkit-perspective:600;perspective:600;opacity:0;overflow-x:hidden;overflow-y:auto;background-color:rgba(0,0,0,.4);z-index:999999}.ReactModal__Overlay--after-open{opacity:1;-webkit-transition:opacity 150ms;transition:opacity 150ms}.ReactModal__Content{position:fixed;top:50%;left:50%;transform-origin:top left;-webkit-transform:scale(.96) translate(-50%,-50%);-moz-transform:scale(.96) translate(-50%,-50%);-ms-transform:scale(.96) translate(-50%,-50%);transform:scale(.96) translate(-50%,-50%)}.ReactModal__Content.positionToPoint{transform-origin:center center;-webkit-transform:scale(.96);-moz-transform:scale(.96);-ms-transform:scale(.96);transform:scale(.96)}.ReactModal__Content:focus{outline:none}.ReactModal__Content--after-open{-webkit-transform:scale(1) translate(-50%,-50%);-moz-transform:scale(1) translate(-50%,-50%);-ms-transform:scale(1) translate(-50%,-50%);transform:scale(1) translate(-50%,-50%);-webkit-transition:transform 300ms;transition:transform 300ms}.ReactModal__Content--after-open.positionToPoint{-webkit-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}.ReactModal__Overlay--before-close{opacity:0}.ReactModal__Content--before-close{-webkit-transform:scale(.96) translate(-50%,-50%);-moz-transform:scale(.96) translate(-50%,-50%);-ms-transform:scale(.96) translate(-50%,-50%);transform:scale(.96) translate(-50%,-50%);-webkit-transition:transform 300ms;transition:transform 300ms}.ReactModal__Content--before-close.positionToPoint{-webkit-transform:scale(.96);-moz-transform:scale(.96);-ms-transform:scale(.96);transform:scale(.96)}.ReactModal__Content.modal-dialog{border:none;background-color:transparent}.Modal{color:inherit;background-color:#f2f2f2;padding:22px 33px;box-sizing:border-box;box-shadow:0 4px 33px rgba(0,0,0,.22),0 0 0 1px rgba(0,0,0,.04)}.Modal-header{text-transform:uppercase;font-weight:500;margin-bottom:11px}.Modal-body{margin:11px 0}.Modal-fields{margin-bottom:11px}.Modal-fields .check-field-wrapper{padding:0}.Modal-fields .check-field-wrapper .field-description{background:none}.Modal-footer{border-top:1px solid #e4e4e4;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;margin:22px -33px -22px}.Modal-footer:empty{border-top:0}.Modal-footer>*{-webkit-box-flex:1;-moz-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;display:flex;align-items:center;justify-content:center;border-left:1px solid #e4e4e4 !important}.Modal-footer>*:first-child{border-left:none !important}.Modal-footer input,.Modal-footer button{background:transparent}.Modal-footer a{border-bottom:none}.Modal-button{cursor:pointer;outline:none;background:#f2f2f2;padding:11px;text-align:center;-webkit-transition:background-color .1s ease-in-out;transition:background-color .1s ease-in-out;line-height:22px;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;font-family:inherit;-webkit-appearance:none;-moz-appearance:none;appearance:none}.Modal-button,.Modal-button>*{color:#3e3e3e !important;-webkit-appearance:none;border:0;text-transform:uppercase;outline:none;font-size:11px;font-weight:500}.Modal-button:hover{background-color:#fff;box-shadow:none}.Modal-button--danger{cursor:pointer;outline:none;background:#f2f2f2;padding:11px;text-align:center;-webkit-transition:background-color .1s ease-in-out;transition:background-color .1s ease-in-out;line-height:22px;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;font-family:inherit;-webkit-appearance:none;-moz-appearance:none;appearance:none}.Modal-button--danger,.Modal-button--danger>*{color:#3e3e3e !important;-webkit-appearance:none;border:0;text-transform:uppercase;outline:none;font-size:11px;font-weight:500}.Modal-button--danger:hover{background-color:#000;box-shadow:none}.Modal-button--danger:hover{background-color:#f0523d}.Modal-button--danger:hover,.Modal-button--danger:hover *{color:#fff !important}.Survey-prompt{margin-top:11px;font-size:12px;color:#797979}.SurveyModal-body{overflow:hidden}.SurveyModal-title{text-transform:uppercase;font-weight:500;font-size:16px}.SurveyModal .expand-enter{max-height:0;-webkit-transition:max-height .6s ease-in-out;transition:max-height .6s ease-in-out}.SurveyModal .expand-enter.expand-enter-active{max-height:500px}body.no-scroll{height:100%;position:fixed}.no-scroll{overflow:hidden !important}.sqs-lightbox-overlay{position:fixed;opacity:0;top:0;left:0;background:#000;height:100%;width:100%}.sqs-lightbox-overlay.sqs-lightbox-overlay-style-orb{background:-webkit-gradient(radial,50% 25%,0,50% 25%,800,from(rgba(0,0,0,.75)),to(#000));background:-moz-radial-gradient(center 45deg,circle cover,rgba(0,0,0,.75) 0%,#000 100%)}.sqs-lightbox-overlay.light{background:rgba(242,242,242,.98) !important;color:#3e3e3e}.sqs-lightbox-overlay.white.sqs-lightbox-overlay-style-orb{background:-webkit-gradient(radial,50% 25%,0,50% 25%,800,from(rgba(255,255,255,.96)),to(#fff));background:-moz-radial-gradient(center 45deg,circle cover,from(rgba(255,255,255,.96)),to(#fff))}.sqsp-tooltip{color:inherit;background-color:#f2f2f2;padding:22px 33px;box-shadow:0 4px 33px rgba(0,0,0,.22),0 0 0 1px rgba(0,0,0,.04);position:absolute;overflow:hidden;text-align:left !important;max-width:250px}.sqsp-tooltip .title{text-transform:uppercase;font-weight:500;margin-bottom:11px}.sqsp-tooltip .description{margin:11px 0}.sqsp-tooltip .buttons{margin:22px -33px -22px;border-top:1px solid #e4e4e4;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex}.sqsp-tooltip .buttons:empty{border-top:0}.sqsp-tooltip .buttons>*{-webkit-box-flex:1;-moz-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;display:flex;align-items:center;justify-content:center;border-left:1px solid #e4e4e4 !important}.sqsp-tooltip .buttons>*:first-child{border-left:none !important}.sqsp-tooltip .buttons input,.sqsp-tooltip .buttons button{background:transparent}.sqsp-tooltip .buttons a{border-bottom:none}.sqsp-tooltip .buttons a:not(.reject){cursor:pointer;outline:none;background:#f2f2f2;padding:11px;text-align:center;-webkit-transition:background-color .1s ease-in-out;transition:background-color .1s ease-in-out;line-height:22px;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;font-family:inherit;-webkit-appearance:none;-moz-appearance:none;appearance:none}.sqsp-tooltip .buttons a:not(.reject),.sqsp-tooltip .buttons a:not(.reject)>*{color:#3e3e3e !important;-webkit-appearance:none;border:0;text-transform:uppercase;outline:none;font-size:11px;font-weight:500}.sqsp-tooltip .buttons a:not(.reject):hover{background-color:#fff;box-shadow:none}.sqsp-tooltip .buttons a.reject{cursor:pointer;outline:none;background:#f2f2f2;padding:11px;text-align:center;-webkit-transition:background-color .1s ease-in-out;transition:background-color .1s ease-in-out;line-height:22px;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;font-family:inherit;-webkit-appearance:none;-moz-appearance:none;appearance:none}.sqsp-tooltip .buttons a.reject,.sqsp-tooltip .buttons a.reject>*{color:#3e3e3e !important;-webkit-appearance:none;border:0;text-transform:uppercase;outline:none;font-size:11px;font-weight:500}.sqsp-tooltip .buttons a.reject:hover{background-color:#000;box-shadow:none}.sqsp-tooltip .buttons a.reject:hover{background-color:#f0523d}.sqsp-tooltip .buttons a.reject:hover,.sqsp-tooltip .buttons a.reject:hover *{color:#fff !important}.sqs-action-overlay{position:absolute;top:0;right:0;white-space:nowrap;-webkit-transition:opacity .1s ease-out;transition:opacity .1s ease-out;opacity:0;background-color:#3e3e3e;overflow:hidden;z-index:50;height:32px;border-radius:3px}.sqs-action-overlay.loading{opacity:1}.sqs-action-overlay.bottom{top:auto;bottom:0}.sqs-action-overlay>div{display:inline-block;height:32px;width:33px;opacity:.3;cursor:pointer}.sqs-action-overlay>div:hover{opacity:.9}.sqs-action-overlay>div:active,.sqs-action-overlay>div:focus{opacity:1}.sqs-action-overlay>div.edit-image,.sqs-action-overlay>div.edit{background:transparent url('//static.squarespace.com/universal/images-v6/damask/edit-16-light.png') center center no-repeat}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:1.5dppx){.sqs-action-overlay>div.edit-image,.sqs-action-overlay>div.edit{background-image:url('//static.squarespace.com/universal/images-v6/damask/edit-32-light.png');background-size:16px}}.sqs-action-overlay>div.edit.loading{background:none}.sqs-action-overlay>div.image-info{background:transparent url('//static.squarespace.com/universal/images-v6/damask/settings-16-light.png') center center no-repeat}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:1.5dppx){.sqs-action-overlay>div.image-info{background-image:url('//static.squarespace.com/universal/images-v6/damask/settings-32-light.png');background-size:16px}}.sqs-action-overlay>div.remove,.sqs-action-overlay>div.remove-image{background:transparent url('//static.squarespace.com/universal/images-v6/damask/trash-9-light.png') center center no-repeat;cursor:pointer}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:1.5dppx){.sqs-action-overlay>div.remove,.sqs-action-overlay>div.remove-image{background-image:url('//static.squarespace.com/universal/images-v6/damask/trash-9-light@2x.png');background-size:9px 11px}}.sqs-action-overlay>div.remove:hover,.sqs-action-overlay>div.remove-image:hover{background:transparent url('//static.squarespace.com/universal/images-v6/damask/trash-9-red.png') center center no-repeat}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:1.5dppx){.sqs-action-overlay>div.remove:hover,.sqs-action-overlay>div.remove-image:hover{background-image:url('//static.squarespace.com/universal/images-v6/damask/trash-9-red@2x.png');background-size:9px 11px}}.sqs-action-overlay>div.remove:hover,.sqs-action-overlay>div.remove-image:hover{background:#f0523d url('//static.squarespace.com/universal/images-v6/damask/trash-9-light.png') center center no-repeat}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:1.5dppx){.sqs-action-overlay>div.remove:hover,.sqs-action-overlay>div.remove-image:hover{background-image:url('//static.squarespace.com/universal/images-v6/damask/trash-9-light@2x.png');background-size:9px 11px}}.sqs-action-overlay>div.video-info{background:transparent url('//static.squarespace.com/universal/images-v6/damask/settings-16-light.png') center center no-repeat}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:1.5dppx){.sqs-action-overlay>div.video-info{background-image:url('//static.squarespace.com/universal/images-v6/damask/settings-32-light.png');background-size:16px}}.sqs-action-overlay>div.getty{background:transparent url('//static.squarespace.com/universal/images-v6/damask/getty-16-light.png') center center no-repeat}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:1.5dppx){.sqs-action-overlay>div.getty{background-image:url('//static.squarespace.com/universal/images-v6/damask/getty-32-light.png');background-size:16px}}.sqs-action-overlay>div.buy{background:transparent url('//static.squarespace.com/universal/images-v6/damask/shopping-cart-16-light.png') center center no-repeat}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:1.5dppx){.sqs-action-overlay>div.buy{background-image:url('//static.squarespace.com/universal/images-v6/damask/shopping-cart-32-light.png');background-size:16px}}.sqs-action-overlay>div.remove-video{background:transparent url('//static.squarespace.com/universal/images-v6/damask/trash-9-light.png') center center no-repeat;cursor:pointer}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:1.5dppx){.sqs-action-overlay>div.remove-video{background-image:url('//static.squarespace.com/universal/images-v6/damask/trash-9-light@2x.png');background-size:9px 11px}}.sqs-action-overlay>div.remove-video:hover{background:transparent url('//static.squarespace.com/universal/images-v6/damask/trash-9-red.png') center center no-repeat}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:1.5dppx){.sqs-action-overlay>div.remove-video:hover{background-image:url('//static.squarespace.com/universal/images-v6/damask/trash-9-red@2x.png');background-size:9px 11px}}.sqs-action-overlay>div.remove-video:hover{background:#f0523d url('//static.squarespace.com/universal/images-v6/damask/trash-9-light.png') center center no-repeat}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:1.5dppx){.sqs-action-overlay>div.remove-video:hover{background-image:url('//static.squarespace.com/universal/images-v6/damask/trash-9-light@2x.png');background-size:9px 11px}}.sqs-action-overlay>div.loading{background:none;position:relative;opacity:1}.sqs-action-overlay>div.loading .sqs-spin.default{position:relative;top:50%;left:50%;-webkit-transform:translatex(-50%) translatey(-50%);-moz-transform:translatex(-50%) translatey(-50%);-ms-transform:translatex(-50%) translatey(-50%);transform:translatex(-50%) translatey(-50%)}.sqs-action-overlay-container:hover .sqs-action-overlay{opacity:1}.touch .sqs-action-overlay{opacity:1}.image-focal-point{border-radius:14px;height:14px;width:14px;margin-left:-10px;margin-top:-10px;position:absolute;border:3px solid rgba(255,255,255,.8);background:rgba(0,0,0,.2);cursor:move;opacity:0}.sqs-loading-overlay-node{background:rgba(255,255,255,.9)}.sqs-loading-overlay-node .sqs-spin{position:absolute;top:50%;left:50%}.sqs-loading-overlay-node .sqs-spin.large{margin-top:-11px;margin-left:-11px}.sqs-loading-overlay-node .sqs-spin.extra-large{margin-top:-20px;margin-left:-20px}.sqs-loading-overlay-node.has-title .title{position:absolute;top:50%;width:100%;text-align:center;margin-top:22px;color:#999;font-size:14px}.sqs-loading-overlay-node.has-title .sqs-spin{margin-top:-22px}body>.login-wrapper{position:fixed;top:0;left:0;height:100%;width:100%;z-index:30100;transition:all .5s ease-in-out}body>.login-wrapper.hidden{opacity:0}@font-face{font-family:'squarespace-ui-font';src:url('//static.squarespace.com/universal/fonts/squarespace-ui-font.eot');src:url('//static.squarespace.com/universal/fonts/squarespace-ui-font.eot?#iefix') format('embedded-opentype'),url('//static.squarespace.com/universal/fonts/squarespace-ui-font.svg#squarespace-ui-font') format('svg'),url('//static.squarespace.com/universal/fonts/squarespace-ui-font.woff') format('woff'),url('//static.squarespace.com/universal/fonts/squarespace-ui-font.ttf') format('truetype');font-weight:normal;font-style:normal}.sqs-ui-font-family{font-family:'squarespace-ui-font';font-style:normal;speak:none;font-weight:normal;-webkit-font-smoothing:antialiased}[class^="sqs-ui-font-"]:before,[class*=" sqs-ui-font-"]:before{font-family:'squarespace-ui-font';font-style:normal;speak:none;font-weight:normal;-webkit-font-smoothing:antialiased}/*IE9_SPLIT_MARKER*/ [data-icon]:before{font-family:'squarespace-ui-font';font-style:normal;speak:none;font-weight:normal;-webkit-font-smoothing:antialiased;content:attr(data-icon)}.sqs-gallery-container a{border-bottom:0 !important}.sqs-gallery-container iframe{width:100%;height:100%;background:transparent;display:block}.sqs-gallery-controls .previous,.sqs-gallery-controls .next{position:absolute;top:50%;outline:none;color:#fff !important;z-index:999;font-size:14px;line-height:40px;margin-top:-30px;background-color:rgba(0,0,0,.12);display:inline-block;padding:10px;-webkit-transition:all 200ms cubic-bezier(.25,.46,.45,.94);-moz-transition:all 200ms cubic-bezier(.25,.46,.45,.94);-ms-transition:all 200ms cubic-bezier(.25,.46,.45,.94);-o-transition:all 200ms cubic-bezier(.25,.46,.45,.94);transition:all 200ms cubic-bezier(.25,.46,.45,.94)}.sqs-gallery-controls .previous:hover,.sqs-gallery-controls .next:hover{background-color:rgba(0,0,0,.2);color:#fff}.sqs-gallery-controls .previous{left:0px}.sqs-gallery-controls .previous:before{font-family:'squarespace-ui-font';font-style:normal;speak:none;font-weight:normal;-webkit-font-smoothing:antialiased;content:"\e02c";text-align:center;display:inline-block;vertical-align:middle}.sqs-gallery-controls .previous:before{font-size:32px;width:32px;height:32px;line-height:32px}.sqs-gallery-controls .next{right:0px}.sqs-gallery-controls .next:before{font-family:'squarespace-ui-font';font-style:normal;speak:none;font-weight:normal;-webkit-font-smoothing:antialiased;content:"\e02d";text-align:center;display:inline-block;vertical-align:middle}.sqs-gallery-controls .next:before{font-size:32px;width:32px;height:32px;line-height:32px}.sqs-gallery-controls .next:before,.sqs-gallery-controls .previous:before{font-size:24px;width:24px;height:24px;line-height:24px}.sqs-gallery-design-stacked{position:relative;text-align:left}.sqs-gallery-design-stacked-slide{position:absolute;top:0;left:0;width:100%;height:100%}.sqs-gallery-design-stacked-slide img{box-shadow:#000 0em 0em 0em}.sqs-gallery-design-stacked-slide.normal img{height:100%}.sqs-gallery-design-stacked-slide:only-child{cursor:default}.sqs-gallery-design-stacked-scrollHorz,.sqs-gallery-design-stacked-swipe{overflow:hidden}.sqs-gallery-design-stacked-scrollHorz .sqs-gallery-design-stacked-slide,.sqs-gallery-design-stacked-swipe .sqs-gallery-design-stacked-slide{position:relative;float:left}.sqs-gallery-design-stacked-swipe-wrapper{overflow-x:scroll;-webkit-transform:translatez(0);-ms-overflow-style:none;-ms-scroll-chaining:none;-ms-scroll-snap-type:mandatory;-ms-scroll-snap-points-x:snapinterval(0%,100%)}.sqs-gallery-design-strip{position:relative;overflow:hidden;height:100%}.sqs-gallery-design-strip .sqs-wrapper{position:relative;height:100%}.sqs-gallery-design-strip-slide{float:left;height:100% !important;max-width:none !important;width:auto !important;cursor:pointer;position:relative}.sqs-gallery-design-strip-slide .sqs-video-wrapper{height:100% !important}.sqs-gallery-design-strip-slide:only-child{cursor:default}.sqs-gallery-design-autocolumns{position:relative}.sqs-gallery-design-autocolumns-slide{position:absolute}.sqs-gallery-design-autocolumns-slide img{width:100%;display:inline-block;-webkit-transition:opacity .2s;transition:opacity .2s;opacity:1}.sqs-gallery-design-autocolumns-slide img.loading{opacity:0}.sqs-gallery-design-autocolumns-slide.content-fit img,.sqs-gallery-design-autocolumns-slide .content-fit img{width:auto}.sqs-gallery-design-autocolumns-slide.slide-stretched img{height:100%}.sqs-gallery-design-carousel .sqs-gallery-controls{overflow:hidden}.sqs-gallery-design-carousel .sqs-gallery-controls .next,.sqs-gallery-design-carousel .sqs-gallery-controls .previous{display:block;float:right;position:relative;top:auto;left:auto;right:auto;bottom:auto;margin:0 0 15px 0;padding:0;background-color:transparent;color:inherit !important;font-size:16px;line-height:16px;cursor:pointer}.sqs-gallery-design-carousel .sqs-gallery-controls.show-hover-effect .previous:hover,.sqs-gallery-design-carousel .sqs-gallery-controls.show-hover-effect .next:hover{background-color:transparent;color:#1d1d1d;opacity:1}.sqs-gallery-design-carousel .sqs-gallery-controls.show-hover-effect .sqs-disabled:hover{cursor:default;opacity:.4}.sqs-gallery-design-carousel .sqs-gallery-controls .next:before{font-family:'squarespace-ui-font';font-style:normal;speak:none;font-weight:normal;-webkit-font-smoothing:antialiased;content:"\e02d";text-align:center;display:inline-block;vertical-align:middle}.sqs-gallery-design-carousel .sqs-gallery-controls .next:before{font-size:32px;width:32px;height:32px;line-height:32px}.sqs-gallery-design-carousel .sqs-gallery-controls .next:before{font-size:16px;width:16px;height:16px;line-height:16px}.sqs-gallery-design-carousel .sqs-gallery-controls .previous{margin-right:10px}.sqs-gallery-design-carousel .sqs-gallery-controls .previous:before{font-family:'squarespace-ui-font';font-style:normal;speak:none;font-weight:normal;-webkit-font-smoothing:antialiased;content:"\e02c";text-align:center;display:inline-block;vertical-align:middle}.sqs-gallery-design-carousel .sqs-gallery-controls .previous:before{font-size:32px;width:32px;height:32px;line-height:32px}.sqs-gallery-design-carousel .sqs-gallery-controls .previous:before{font-size:16px;width:16px;height:16px;line-height:16px}.sqs-gallery-design-carousel .sqs-gallery-controls .sqs-disabled{cursor:default;opacity:.4}.sqs-gallery-design-carousel .sqs-gallery-controls .sqs-hidden{display:none}.sqs-gallery-design-carousel .sqs-gallery-container{width:100%;overflow:hidden}.sqs-gallery-design-carousel .sqs-gallery{margin:0 0 0 -1% !important;white-space:nowrap;vertical-align:top;font-size:0;-webkit-transition:-webkit-transform .4s ease;-moz-transition:-moz-transform .4s ease;-ms-transition:-ms-transform .4s ease;-o-transition:-o-transform .4s ease;transition:transform .4s ease}.sqs-gallery-design-carousel .sqs-gallery-design-carousel-slide{display:inline-block;width:33.66666666666667%;padding:0 1%;white-space:nowrap;vertical-align:top;font-size:0}.sqs-gallery-design-carousel .sqs-gallery-design-carousel-slide img{width:100%;height:auto}.sqs-gallery-design-carousel .sqs-gallery-design-carousel-slide *{white-space:normal}.sqs-gallery-design-carousel.sqs-gallery-design-carousel-slides-in-view-1 .sqs-gallery-design-carousel-slide{width:101%}.sqs-gallery-design-carousel.sqs-gallery-design-carousel-slides-in-view-2 .sqs-gallery-design-carousel-slide{width:50.5%}.sqs-gallery-design-carousel.sqs-gallery-design-carousel-slides-in-view-3 .sqs-gallery-design-carousel-slide:nth-child(3n+1),.sqs-gallery-design-carousel.sqs-gallery-design-carousel-slides-in-view-3 .sqs-gallery-design-carousel-slide:nth-child(3n+2){width:33.66%}.sqs-gallery-design-carousel.sqs-gallery-design-carousel-slides-in-view-3 .sqs-gallery-design-carousel-slide:nth-child(3n+3){width:33.68%}.sqs-gallery-design-carousel.sqs-gallery-design-carousel-slides-in-view-4 .sqs-gallery-design-carousel-slide{width:25.25%}.sqs-gallery-design-carousel.sqs-gallery-design-carousel-slides-in-view-5 .sqs-gallery-design-carousel-slide{width:20.2%}@media screen and (max-width:724px){.sqs-gallery-design-carousel.sqs-gallery-design-carousel-slides-in-view-4 .sqs-gallery-design-carousel-slide:nth-child(3n+1),.sqs-gallery-design-carousel.sqs-gallery-design-carousel-slides-in-view-4 .sqs-gallery-design-carousel-slide:nth-child(3n+2),.sqs-gallery-design-carousel.sqs-gallery-design-carousel-slides-in-view-5 .sqs-gallery-design-carousel-slide:nth-child(3n+1),.sqs-gallery-design-carousel.sqs-gallery-design-carousel-slides-in-view-5 .sqs-gallery-design-carousel-slide:nth-child(3n+2){width:33.66%}.sqs-gallery-design-carousel.sqs-gallery-design-carousel-slides-in-view-4 .sqs-gallery-design-carousel-slide:nth-child(3n+3),.sqs-gallery-design-carousel.sqs-gallery-design-carousel-slides-in-view-5 .sqs-gallery-design-carousel-slide:nth-child(3n+3){width:33.68%}}@media screen and (max-width:480px){.sqs-gallery-design-carousel.sqs-gallery-design-carousel-slides-in-view-3 .sqs-gallery-design-carousel-slide,.sqs-gallery-design-carousel.sqs-gallery-design-carousel-slides-in-view-4 .sqs-gallery-design-carousel-slide,.sqs-gallery-design-carousel.sqs-gallery-design-carousel-slides-in-view-5 .sqs-gallery-design-carousel-slide{width:50.5% !important}}.sqs-gallery-design-list .sqs-gallery-design-list-slide{overflow:hidden;margin-bottom:17px !important;padding-bottom:17px !important}.sqs-gallery-design-list .sqs-gallery-image-container{float:left;width:25%;padding-right:20px;box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box}.sqs-gallery-design-list .sqs-gallery-meta-container{float:left;width:75%;box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box}.sqs-gallery-design-list .sqs-gallery-design-list-slide.no-image .sqs-gallery-image-container{width:0 !important}.sqs-gallery-design-list .sqs-gallery-design-list-slide.no-image .sqs-gallery-meta-container{width:100% !important}@media screen and (max-width:480px){.sqs-gallery-design-list .sqs-gallery-design-list-slide:not(.no-image) .sqs-gallery-image-container{width:35% !important}.sqs-gallery-design-list .sqs-gallery-design-list-slide:not(.no-image) .sqs-gallery-meta-container{width:65% !important}}.sqs-gallery-design-autorows .sqs-gallery-design-autorows-slide{float:left;cursor:pointer;overflow:hidden}.sqs-gallery-design-autorows .sqs-gallery-design-autorows-slide img{height:100%}.sqs-gallery-design-autorows .sqs-gallery-design-autorows-slide .meta{display:none}.sqs-gallery-design-autogrid{zoom:1}.sqs-gallery-design-autogrid:after{display:block;visibility:hidden;font-size:0;height:0;clear:both;content:"."}.sqs-gallery-design-autogrid-slide{position:relative;float:left}.sqs-gallery-design-autogrid-slide .img-wrapper{height:0}.sqs-gallery-design-autogrid-slide img{width:100%}.yui3-lightbox2{-moz-user-select:text;-webkit-user-select:text;-ms-user-select:text;user-select:text}.yui3-lightbox2 .yui3-lightbox2-content{height:100%;left:0;position:absolute;width:100%;overflow:hidden}.yui3-lightbox2 .sqs-lightbox-slideshow{height:100%;opacity:0;z-index:100000001}.yui3-lightbox2 .sqs-lightbox-slideshow .sqs-lightbox-padder{position:absolute;text-align:left;top:2%;left:2%;bottom:2%;right:2%}.yui3-lightbox2 .sqs-lightbox-overlay{position:absolute;opacity:0;top:0;left:0;background:#000;height:100%;width:100%}.yui3-lightbox2 .sqs-lightbox-meta{position:absolute;padding:20px;color:#fff;z-index:100000001;margin:20px auto 0;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";opacity:0;-webkit-transition:opacity ease-out .2s;transition:opacity ease-out .2s}.yui3-lightbox2 .sqs-lightbox-meta.overlay-description-visible{background:#000;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=70)";background:rgba(0,0,0,.7);opacity:1 !important}.yui3-lightbox2 .sqs-lightbox-meta p:first-child{margin-top:0}.yui3-lightbox2 .sqs-lightbox-meta p:last-child{margin-bottom:0}.yui3-lightbox2 .sqs-lightbox-meta h1{font-size:1em;color:#fff;margin:0 0 10px}.yui3-lightbox2 .sqs-lightbox-meta p a{color:#fff;text-decoration:underline}.yui3-lightbox2 .sqs-lightbox-close,.yui3-lightbox2 .sqs-lightbox-previous,.yui3-lightbox2 .sqs-lightbox-next,.yui3-lightbox2 .sqs-lightbox-meta-trigger{position:absolute;z-index:100000002;display:inline-block;color:#ccc;height:20px;width:20px;font-size:26px;cursor:pointer;outline:none}.yui3-lightbox2 .sqs-lightbox-next,.yui3-lightbox2 .sqs-lightbox-previous{padding:12px;opacity:0;top:50%;margin-top:-22px;-webkit-transition:opacity .2s;transition:opacity .2s}.yui3-lightbox2 .sqs-lightbox-next.mouseover,.yui3-lightbox2 .sqs-lightbox-previous.mouseover{opacity:1}.yui3-lightbox2 .sqs-lightbox-next{right:2%}.yui3-lightbox2 .sqs-lightbox-next:before{font-family:'squarespace-ui-font';font-style:normal;speak:none;font-weight:normal;-webkit-font-smoothing:antialiased;content:"\e02d";text-align:center;display:inline-block;vertical-align:middle}.yui3-lightbox2 .sqs-lightbox-next:before{font-size:32px;width:32px;height:32px;line-height:32px}.yui3-lightbox2 .sqs-lightbox-previous{left:2%}.yui3-lightbox2 .sqs-lightbox-previous:before{font-family:'squarespace-ui-font';font-style:normal;speak:none;font-weight:normal;-webkit-font-smoothing:antialiased;content:"\e02c";text-align:center;display:inline-block;vertical-align:middle}.yui3-lightbox2 .sqs-lightbox-previous:before{font-size:32px;width:32px;height:32px;line-height:32px}.yui3-lightbox2 .sqs-lightbox-next::before,.yui3-lightbox2 .sqs-lightbox-previous::before{font-size:22px}.yui3-lightbox2 .sqs-lightbox-close{padding:2px;right:2%;top:2%;text-align:right}.yui3-lightbox2 .sqs-lightbox-close:before{font-family:'squarespace-ui-font';font-style:normal;speak:none;font-weight:normal;-webkit-font-smoothing:antialiased;content:"\e02e";text-align:center;display:inline-block;vertical-align:middle}.yui3-lightbox2 .sqs-lightbox-close:before{font-size:32px;width:32px;height:32px;line-height:32px}.yui3-lightbox2 .sqs-lightbox-meta-trigger{bottom:0;right:0;padding:2%;text-align:center;font-size:26px;line-height:.5;text-align:right}body.sqs-lightbox-open{position:static !important;overflow-y:hidden}.sqs-gallery img:not([src]){opacity:0}.fadeable-plugged.display-status-hidden{display:none}.sqs-video-wrapper .intrinsic{max-width:100%}.sqs-video-wrapper.video-none{position:relative}.sqs-video-wrapper.video-fill{position:absolute;width:100%;height:100%}.sqs-video-wrapper.video-fit{position:absolute;width:100%}.sqs-video-wrapper.video-fit .intrinsic{width:100%}.sqs-video-wrapper.video-fit .intrinsic-inner{position:relative}.sqs-video-wrapper iframe{position:absolute;top:0;left:0;width:100%;height:100%}.sqs-video-wrapper object,.sqs-video-wrapper embed{position:absolute;top:0;left:0;width:100%;height:100%}.sqs-video-wrapper .sqs-video-overlay{display:block;position:absolute;top:0;left:0;width:100%;height:100%;background-size:cover;color:#000;background-position:center center;background-repeat:no-repeat}.sqs-video-wrapper .sqs-video-overlay .sqs-video-opaque{position:absolute;bottom:0;width:100%;height:100%;background:#000;opacity:0}.sqs-video-wrapper .sqs-video-overlay.no-thumb .sqs-video-opaque{opacity:1}.sqs-video-wrapper .sqs-video-overlay .sqs-video-icon{opacity:.8;position:absolute;top:50%;left:50%;background-image:url('//static.squarespace.com/universal/images-v6/icons/icon-video-48-light-solid.png');background-position:center center;background-repeat:no-repeat;height:48px;width:48px;margin-left:-24px;margin-top:-24px;cursor:pointer}html.blogapp .sqs-video-wrapper .sqs-video-overlay .sqs-video-icon{background-image:url('gallery-play-big.png');height:80px;width:80px;margin-left:-40px;margin-top:-40px;opacity:.75}@media only screen and (-webkit-min-device-pixel-ratio:2),only screen and (min-resolution:192dpi){html.blogapp .sqs-video-wrapper .sqs-video-overlay .sqs-video-icon{background-image:url('gallery-play-big@2x.png');background-size:80px}}.sqs-video-wrapper.video-invalid{position:static !important;height:48px !important}.sqs-video-wrapper .sqs-video-invalid-wrapper{position:absolute;top:0;left:0;width:100%;height:100%;overflow:hidden}.sqs-follow-button-hidden{display:none}body.sqs-search-ui{background:red;overflow:hidden;color:red}body.sqs-search-ui-fullscreen.no-scroll{position:static}.sqs-search-ui-input-box{padding-bottom:10px}body.sqs-search-ui-fullscreen .sqs-search-ui{background:#fff;position:fixed;top:0;left:0;right:0;bottom:0;z-index:100000;padding:100px 100px 50px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif}body.sqs-search-ui-fullscreen .sqs-search-ui.display-status-hidden{position:absolute}body.sqs-search-ui-fullscreen .sqs-search-ui-close{-webkit-transition:opacity .1s ease-out;transition:opacity .1s ease-out;position:absolute;top:0;right:0;height:60px;width:60px;background:transparent url('//static.squarespace.com/universal/images-v6/icons/icon-closethin-15-dark.png') center center no-repeat;z-index:10100;opacity:.4;cursor:pointer}body.sqs-search-ui-fullscreen .sqs-search-ui-close:hover{opacity:1}body.sqs-search-ui-fullscreen .sqs-search-ui input{position:fixed;top:0;left:0;right:0;margin-left:96px;margin-top:60px;font-weight:500;font-family:inherit}body.sqs-search-ui-fullscreen .sqs-search-ui .yui3-aclist,body.sqs-search-ui-fullscreen .sqs-search-ui .yui3-scrollingautocompletelist{margin-left:96px;font-size:11px;line-height:18px;padding-left:5px;position:fixed;top:130px;left:0;color:#000;background:#fff;width:300px}body.sqs-search-ui-fullscreen .sqs-search-ui .yui3-aclist .yui3-aclist-item,body.sqs-search-ui-fullscreen .sqs-search-ui .yui3-scrollingautocompletelist .yui3-aclist-item{list-style:none;margin-top:2px}body.sqs-search-ui-fullscreen .sqs-search-ui .yui3-aclist .yui3-aclist-item-active,body.sqs-search-ui-fullscreen .sqs-search-ui .yui3-scrollingautocompletelist .yui3-aclist-item-active{outline:none;color:#000;font-weight:bold}body.sqs-search-ui-fullscreen .sqs-search-ui-list{position:absolute;top:200px;left:0;right:0;bottom:0;margin:-1px 85px 0}body.sqs-search-ui-fullscreen .sqs-search-ui-list .search-results{position:absolute;width:100%}body.sqs-search-ui-fullscreen .sqs-search-ui-pagination{display:none}body.sqs-search-ui-fullscreen .sqs-search-ui-item{padding:16px}body.sqs-search-ui-fullscreen .sqs-search-ui-item.active{background-color:#fcfcfc}body.sqs-search-ui-fullscreen .sqs-search-ui-item img{height:50px;width:50px;float:left;margin-right:16px}body.sqs-search-ui-fullscreen .sqs-search-ui-item .sqs-title .record-type{font-weight:200;color:#888;font-size:11px;padding-left:7px;display:none}body.sqs-search-ui-fullscreen .sqs-search-ui-item .sqs-title .edit{-webkit-transition:color,background-color .1s ease-out;transition:color,background-color .1s ease-out;background:#f2f2f2;color:#111;font-size:10px;padding:2px 10px;border-radius:10px;margin-left:6px}body.sqs-search-ui-fullscreen .sqs-search-ui-item .sqs-title .edit:hover{background:#111;color:#fff}@media screen and (max-width:600px){body.sqs-search-ui-fullscreen .sqs-search-ui{padding:8em 2em 0}body.sqs-search-ui-fullscreen .sqs-search-ui input{margin-left:1em}body.sqs-search-ui-fullscreen .sqs-search-ui .yui3-aclist,body.sqs-search-ui-fullscreen .sqs-search-ui .yui3-scrollingautocompletelist{display:none}body.sqs-search-ui-fullscreen .sqs-search-ui-list{top:150px;margin:0 2em}}.sqs-search-container .search-notice{font-size:12px;color:#000}.sqs-search-container .search-notice.error{color:#d10000}.sqs-search-container .search-notice.hide{display:none}.sqs-search-container-waiting{background:#fff;height:100%;width:100%;position:absolute;opacity:.5}.sqs-search-container a{color:#999;text-decoration:none}.sqs-search-container input{background:none;border:none;outline:none;font-size:30px}.sqs-search-container input::-webkit-input-placeholder{color:#eee}.sqs-search-container input:-moz-placeholder{color:#eee}.sqs-search-container input::selection{color:#fff;background-color:#000}.sqs-search-container input:focus{box-shadow:none;border:none}.sqs-search-container-list{overflow-y:auto;overflow-x:hidden}.sqs-search-container-list .search-results{border-top:1px solid rgba(200,200,200,.35);border-bottom:1px solid rgba(200,200,200,.35)}.sqs-search-container-list .search-results.empty{border:none}.search-result:first-child .sqs-search-container-item{border-top:none}.sqs-search-container-item{position:relative;border-top:1px solid rgba(200,200,200,.35);zoom:1;cursor:pointer}.sqs-search-container-item:after{display:block;visibility:hidden;font-size:0;height:0;clear:both;content:"."}.sqs-search-container-item:first-child{margin-top:0}.sqs-search-container-item mark{font-weight:bold}.sqs-search-container-item em{font-style:italic}.sqs-search-container-item .sqs-title{font-size:1.5em;font-weight:400;line-height:1.3em;margin-bottom:.5em}.sqs-search-container-item .sqs-content{font-weight:400;font-size:1em;line-height:1.4em}.sqs-search-container-item .sqs-content span{margin:2px 0}.sqs-search-container .loading{opacity:.75}.sqs-search-container .loading .desc{display:block;float:left;padding-top:4px;padding-left:12px}.sqs-search-container .loading .spinner-wrapper{display:block;float:left}@media screen and (max-width:600px){.sqs-search-container-list{top:160px}.sqs-search-container-list .search-results{margin-right:0px}.sqs-search-container input{font-size:24px !important}}.sqs-ss-badge{position:fixed;height:44px;overflow:hidden;border-radius:44px;width:44px;background:#000;opacity:0;cursor:pointer;z-index:10001;-webkit-transition:all .4s cubic-bezier(.23,1,.32,1);transition:all .4s cubic-bezier(.23,1,.32,1)}.sqs-ss-badge-content{white-space:nowrap}.sqs-ss-badge .badge-closed,.sqs-ss-badge .badge-open{display:inline-block;vertical-align:top;height:44px;-webkit-transform:scale(1) translatez(0);-moz-transform:scale(1) translatez(0);-ms-transform:scale(1) translatez(0);transform:scale(1) translatez(0);-webkit-transition:all .4s cubic-bezier(.23,1,.32,1);transition:all .4s cubic-bezier(.23,1,.32,1)}.sqs-ss-badge .badge-closed{width:44px;background:transparent url('//static.squarespace.com/universal/images-v6/icons/icon-squarespace-16-light.png') center center no-repeat}.sqs-ss-badge .badge-open{width:0;opacity:0}.sqs-ss-badge .badge-open .badge-open-inner{white-space:nowrap}.sqs-ss-badge .badge-open .badge-open-inner h2{color:#e2e2e2 !important;font:300 10px 'proxima-nova','HelveticaNeue-Light','Helvetica Neue Light','Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif !important;line-height:44px !important;letter-spacing:1px;text-transform:uppercase;margin:0 !important}.sqs-ss-badge[data-position="top-left"]{top:22px;left:22px}.sqs-ss-badge[data-position="top-center"]{right:0;top:20px;left:0;margin:auto;-webkit-transform:translatey(-100px);-moz-transform:translatey(-100px);-ms-transform:translatey(-100px);transform:translatey(-100px)}.sqs-ss-badge[data-position="top-right"]{top:22px;right:22px}.sqs-ss-badge[data-position="bottom-left"]{bottom:22px;left:22px}.sqs-ss-badge[data-position="bottom-center"]{right:0;bottom:20px;left:0;margin:auto}.sqs-ss-badge[data-position="bottom-right"]{right:22px;bottom:22px}.sqs-ss-badge.badge-auto-hide[data-position="top-left"],.sqs-ss-badge.badge-auto-hide[data-position="top-center"],.sqs-ss-badge.badge-auto-hide[data-position="top-right"]{-webkit-transform:translatey(-100px);-moz-transform:translatey(-100px);-ms-transform:translatey(-100px);transform:translatey(-100px)}.sqs-ss-badge.badge-auto-hide[data-position="bottom-left"],.sqs-ss-badge.badge-auto-hide[data-position="bottom-center"],.sqs-ss-badge.badge-auto-hide[data-position="bottom-right"]{-webkit-transform:translatey(100px);-moz-transform:translatey(100px);-ms-transform:translatey(100px);transform:translatey(100px)}.sqs-ss-badge.is-mobile[data-devices="desktop-only"]{display:none}.sqs-ss-badge[data-type="white"]{background:#fff}.sqs-ss-badge[data-type="white"] .badge-open .badge-open-inner h2{color:#111 !important}.sqs-ss-badge[data-type="white"] .badge-closed{background-image:url("//static.squarespace.com/universal/images-v6/icons/icon-squarespace-16-dark.png")}.sqs-ss-badge.badge-visible{opacity:1;-webkit-transform:translatez(0) !important;-moz-transform:translatez(0) !important;-ms-transform:translatez(0) !important;transform:translatez(0) !important}.sqs-ss-badge:not(.is-mobile):hover{width:220px;border-radius:0}.sqs-ss-badge:not(.is-mobile):hover .badge-open{transform:none;opacity:1}.sqs-ss-badge-mobile-info-bar-present[data-position="bottom-left"],.sqs-ss-badge-mobile-info-bar-present[data-position="bottom-center"],.sqs-ss-badge-mobile-info-bar-present[data-position="bottom-right"]{bottom:72px}.sqs-ss-badge:not(.is-mobile):hover+.sqs-ss-badge-cover{visibility:visible;opacity:1}.sqs-ss-badge[data-position="top-left"]+.sqs-ss-badge-cover{background:-moz-radial-gradient(top left,circle cover,rgba(0,0,0,.1) 0%,rgba(0,0,0,.5) 100%);background:-ms-radial-gradient(top left,circle cover,rgba(0,0,0,.1) 0%,rgba(0,0,0,.5) 100%);background:radial-gradient(circle at top left,rgba(0,0,0,.1) 0%,rgba(0,0,0,.5) 100%)}.sqs-ss-badge[data-position="top-center"]+.sqs-ss-badge-cover{background:-moz-radial-gradient(top center,circle cover,rgba(0,0,0,.1) 0%,rgba(0,0,0,.5) 100%);background:-ms-radial-gradient(top center,circle cover,rgba(0,0,0,.1) 0%,rgba(0,0,0,.5) 100%);background:radial-gradient(circle at top center,rgba(0,0,0,.1) 0%,rgba(0,0,0,.5) 100%)}.sqs-ss-badge[data-position="top-right"]+.sqs-ss-badge-cover{background:-moz-radial-gradient(top right,circle cover,rgba(0,0,0,.1) 0%,rgba(0,0,0,.5) 100%);background:-ms-radial-gradient(top right,circle cover,rgba(0,0,0,.1) 0%,rgba(0,0,0,.5) 100%);background:radial-gradient(circle at top right,rgba(0,0,0,.1) 0%,rgba(0,0,0,.5) 100%)}.sqs-ss-badge[data-position="bottom-left"]+.sqs-ss-badge-cover{background:-moz-radial-gradient(bottom left,circle cover,rgba(0,0,0,.1) 0%,rgba(0,0,0,.5) 100%);background:-ms-radial-gradient(bottom left,circle cover,rgba(0,0,0,.1) 0%,rgba(0,0,0,.5) 100%);background:radial-gradient(circle at bottom left,rgba(0,0,0,.1) 0%,rgba(0,0,0,.5) 100%)}.sqs-ss-badge[data-position="bottom-center"]+.sqs-ss-badge-cover{background:-moz-radial-gradient(bottom center,circle cover,rgba(0,0,0,.1) 0%,rgba(0,0,0,.5) 100%);background:-ms-radial-gradient(bottom center,circle cover,rgba(0,0,0,.1) 0%,rgba(0,0,0,.5) 100%);background:radial-gradient(circle at bottom center,rgba(0,0,0,.1) 0%,rgba(0,0,0,.5) 100%)}.sqs-ss-badge[data-position="bottom-right"]+.sqs-ss-badge-cover{background:-moz-radial-gradient(bottom right,circle cover,rgba(0,0,0,.1) 0%,rgba(0,0,0,.5) 100%);background:-ms-radial-gradient(bottom right,circle cover,rgba(0,0,0,.1) 0%,rgba(0,0,0,.5) 100%);background:radial-gradient(circle at bottom right,rgba(0,0,0,.1) 0%,rgba(0,0,0,.5) 100%)}body.sqs-style-mode[data-position="top-left"]{top:22px;left:242px}body.sqs-style-mode[data-position="bottom-left"]{bottom:22px;left:242px}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dppx){.sqs-ss-badge .badge-closed{background-size:16px;background-image:url("//static.squarespace.com/universal/images-v6/icons/icon-squarespace-32-light.png")}.sqs-ss-badge[data-type="white"] .badge-closed{background-image:url("//static.squarespace.com/universal/images-v6/icons/icon-squarespace-32-dark.png")}}.sqs-ss-badge-cover{position:fixed;width:100%;height:100%;top:0;left:0;opacity:0;visibility:hidden;background-color:rgba(0,0,0,.6);z-index:10000;-webkit-transition:all .3s ease;transition:all .3s ease}.sqs-licensed-asset-preview-bar{z-index:9999;position:fixed;left:0;right:0;bottom:0;height:88px;background-color:#3e3e3e;color:#fff;padding:11px;box-sizing:border-box}.sqs-licensed-asset-preview-bar-content{text-align:center;position:absolute;top:50%;width:100%;-webkit-transform:translate(0,-50%);-moz-transform:translate(0,-50%);-ms-transform:translate(0,-50%);transform:translate(0,-50%)}.sqs-licensed-asset-preview-bar-content span{font-family:helvetica,sans-serif;text-transform:uppercase;letter-spacing:1px;font-weight:500;font-size:11px}.sqs-mobile-info-bar{position:fixed;z-index:10000;bottom:0;left:0;width:100%;background:#ebebeb;-webkit-transition:all .2s cubic-bezier(.23,.47,.32,1);transition:all .2s cubic-bezier(.23,.47,.32,1)}.sqs-mobile-info-bar-content{-webkit-backface-visibility:hidden}.sqs-mobile-info-bar-triggers{font-size:0;padding:0 20px;text-align:center}.sqs-mobile-info-bar-trigger{cursor:pointer;display:inline-block;width:25%;padding:15px 0;text-align:center}.sqs-mobile-info-bar-trigger a{display:block}.sqs-mobile-info-bar-trigger-icon{display:block;width:16px;height:16px;margin:0 auto 8px auto;background-size:contain;background-repeat:no-repeat}.sqs-mobile-info-bar-trigger-label{display:block;font-size:10px;line-height:1em;letter-spacing:1px;color:#222;text-transform:uppercase;font-family:'proxima-nova',arial,sans-serif}.sqs-mobile-info-bar-trigger[data-type="location"] .sqs-mobile-info-bar-trigger-icon{background-image:url(//static.squarespace.com/universal/images-v6/mobile-info-bar/map.png)}.sqs-mobile-info-bar-trigger[data-type="contactEmail"] .sqs-mobile-info-bar-trigger-icon{background-image:url(//static.squarespace.com/universal/images-v6/mobile-info-bar/email.png)}.sqs-mobile-info-bar-trigger[data-type="contactPhoneNumber"] .sqs-mobile-info-bar-trigger-icon{background-image:url(//static.squarespace.com/universal/images-v6/mobile-info-bar/call.png)}.sqs-mobile-info-bar-trigger[data-type="businessHours"] .sqs-mobile-info-bar-trigger-icon{background-image:url(//static.squarespace.com/universal/images-v6/mobile-info-bar/hours.png)}.sqs-mobile-info-bar-overlay{visibility:hidden;position:fixed;top:0;left:0;width:100%;height:100%;opacity:0;background:#ebebeb;color:#222;-webkit-transition:opacity .2s cubic-bezier(.23,.47,.32,1);transition:opacity .2s cubic-bezier(.23,.47,.32,1)}.sqs-mobile-info-bar-overlay-content,.sqs-mobile-info-bar-overlay-content>div{position:absolute !important;top:0;left:0;width:100%;height:100%}.sqs-mobile-info-bar-overlay-content>div{display:none}.sqs-mobile-info-bar-overlay-content .sqs-business-hours{top:10%;left:10%;width:80%;height:80%}.sqs-mobile-info-bar-overlay-content .sqs-mobile-info-bar-map{top:0;left:0;width:100%;height:100%}.sqs-mobile-info-bar-overlay-content .sqs-mobile-info-bar-address{position:absolute;width:100%;height:auto;color:#aaa;background:#ebebeb;bottom:0;padding:20px;font-size:12px;line-height:19px;font-family:'proxima-nova',arial,sans-serif;box-sizing:border-box}.sqs-mobile-info-bar-overlay-content .sqs-mobile-info-bar-address [data-type="addressTitle"]{color:#222;font-size:14px;line-height:14px;margin:2px 0 7px 0}.sqs-mobile-info-bar-overlay-content .sqs-mobile-info-bar-address-link{background:url(//static.squarespace.com/universal/images-v6/icons/icon-external-link-18-dark.png) no-repeat;position:absolute;width:18px;height:18px;top:50%;right:20px;margin-top:-9px}.sqs-mobile-info-bar-overlay-close{cursor:pointer;position:fixed;background:#ebebeb;top:10px;right:10px;padding:13px}.sqs-mobile-info-bar-overlay-close:after{content:'×';display:block;font-family:helvetica,arial,sans-serif;font-weight:100;font-size:19px;line-height:15px;padding:0;color:#222}.sqs-mobile-info-bar-show-overlay{z-index:10010}.sqs-mobile-info-bar-show-overlay .sqs-mobile-info-bar-overlay{opacity:1;visibility:visible}.sqs-mobile-info-bar-dark{background:#222}.sqs-mobile-info-bar-dark .sqs-mobile-info-bar-overlay{background:#222;color:#fff}.sqs-mobile-info-bar-dark .sqs-mobile-info-bar-address{background:#222}.sqs-mobile-info-bar-dark .sqs-mobile-info-bar-address [data-type="addressTitle"]{color:#fff}.sqs-mobile-info-bar-dark .sqs-mobile-info-bar-address-link{background-image:url(//static.squarespace.com/universal/images-v6/icons/icon-external-link-18-light.png)}.sqs-mobile-info-bar-dark .sqs-mobile-info-bar-trigger-label{color:#fff}.sqs-mobile-info-bar-dark .sqs-mobile-info-bar-trigger[data-type="location"] .sqs-mobile-info-bar-trigger-icon{background-image:url(//static.squarespace.com/universal/images-v6/mobile-info-bar/map-light.png)}.sqs-mobile-info-bar-dark .sqs-mobile-info-bar-trigger[data-type="contactEmail"] .sqs-mobile-info-bar-trigger-icon{background-image:url(//static.squarespace.com/universal/images-v6/mobile-info-bar/email-light.png)}.sqs-mobile-info-bar-dark .sqs-mobile-info-bar-trigger[data-type="contactPhoneNumber"] .sqs-mobile-info-bar-trigger-icon{background-image:url(//static.squarespace.com/universal/images-v6/mobile-info-bar/call-light.png)}.sqs-mobile-info-bar-dark .sqs-mobile-info-bar-trigger[data-type="businessHours"] .sqs-mobile-info-bar-trigger-icon{background-image:url(//static.squarespace.com/universal/images-v6/mobile-info-bar/hours-light.png)}.sqs-mobile-info-bar-dark .sqs-mobile-info-bar-overlay-close,.sqs-mobile-info-bar-overlay-close-dark{background:#222}.sqs-mobile-info-bar-dark .sqs-mobile-info-bar-overlay-close:after,.sqs-mobile-info-bar-overlay-close-dark:after{color:#fff}.sqs-style-mode .sqs-mobile-info-bar,.sqs-mobile-info-bar-hide{-webkit-transform:translate3d(0,100px,0);-moz-transform:translate3d(0,100px,0);-ms-transform:translate3d(0,100px,0);transform:translate3d(0,100px,0)}.sqs-business-hours{max-width:250px;margin-left:auto;margin-right:auto}.sqs-business-hours-day{margin:.5em 0;font-family:'proxima-nova',sans-serif;font-size:16px;line-height:1.4;font-style:normal;letter-spacing:1px;zoom:1}.sqs-business-hours-day-label{color:#aaa;float:left;position:relative;top:2px;width:35%;margin-right:10%;font-size:13px;text-transform:uppercase;text-align:right}.sqs-business-hours-day-hours{float:right;width:55%}.sqs-business-hours-day .closed{color:#999}.sqs-business-hours-day:after{display:block;visibility:hidden;font-size:0;height:0;clear:both;content:"."}.sqs-business-hours-store{text-align:center;margin:1em 0 3em 0;color:#aaa;font-family:'proxima-nova',sans-serif;font-size:16px;line-height:1.65}.sqs-business-hours-store span{text-transform:uppercase;letter-spacing:2px;color:#222;font-size:20px}.sqs-business-hours-dark .sqs-business-hours-store span{color:#fff}/*IE9_SPLIT_MARKER*/ /*! Squarespace LESS Compiler (less.js language v1.3.3) */ .sqs-block.vsize-1 .sqs-block-content{height:34px}.sqs-block.vsize-2 .sqs-block-content{height:68px}.sqs-block.vsize-3 .sqs-block-content{height:102px}.sqs-block.vsize-4 .sqs-block-content{height:136px}.sqs-block.vsize-5 .sqs-block-content{height:170px}.sqs-block.vsize-6 .sqs-block-content{height:204px}.sqs-block.vsize-7 .sqs-block-content{height:238px}.sqs-block.vsize-8 .sqs-block-content{height:272px}.sqs-block.vsize-9 .sqs-block-content{height:306px}.sqs-block.vsize-10 .sqs-block-content{height:340px}.sqs-block.vsize-11 .sqs-block-content{height:374px}.sqs-block.vsize-12 .sqs-block-content{height:408px}.sqs-block.vsize-13 .sqs-block-content{height:442px}.sqs-block.vsize-14 .sqs-block-content{height:476px}.sqs-block.vsize-15 .sqs-block-content{height:510px}.sqs-block.vsize-16 .sqs-block-content{height:544px}.sqs-block.vsize-17 .sqs-block-content{height:578px}.sqs-block.vsize-18 .sqs-block-content{height:612px}.sqs-block.vsize-19 .sqs-block-content{height:646px}.sqs-block.vsize-20 .sqs-block-content{height:680px}.sqs-block.vsize-21 .sqs-block-content{height:714px}.sqs-block.vsize-22 .sqs-block-content{height:748px}.sqs-block.vsize-23 .sqs-block-content{height:782px}.sqs-block.vsize-24 .sqs-block-content{height:816px}.sqs-block.vsize-25 .sqs-block-content{height:850px}.sqs-block.vsize-26 .sqs-block-content{height:884px}.sqs-block.vsize-27 .sqs-block-content{height:918px}.sqs-block.vsize-28 .sqs-block-content{height:952px}.sqs-block.vsize-29 .sqs-block-content{height:986px}.sqs-block.vsize-30 .sqs-block-content{height:1020px}.sqs-row{width:auto !important;*zoom:1}.sqs-row:before,.sqs-row:after{content:"";display:table}.sqs-row:after{clear:both}[class*=sqs-col]{float:left}[class*=sqs-col] .sqs-block{padding-left:17px;padding-right:17px}[class*=sqs-col]:last-child{padding-right:0}.sqs-col-12{width:100%}.sqs-col-12 .sqs-col-12{width:100%}.sqs-col-12 .sqs-col-11{width:91.6667%}.sqs-col-12 .sqs-col-10{width:83.3333%}.sqs-col-12 .sqs-col-9{width:75%}.sqs-col-12 .sqs-col-8{width:66.6667%}.sqs-col-12 .sqs-col-7{width:58.3333%}.sqs-col-12 .sqs-col-6{width:50%}.sqs-col-12 .sqs-col-5{width:41.6667%}.sqs-col-12 .sqs-col-4{width:33.3333%}.sqs-col-12 .sqs-col-3{width:25%}.sqs-col-12 .sqs-col-2{width:16.6667%}.sqs-col-12 .sqs-col-1{width:8.3333%}.sqs-col-11{width:91.6667%}.sqs-col-11 .sqs-col-11{width:100%}.sqs-col-11 .sqs-col-10{width:90.9091%}.sqs-col-11 .sqs-col-9{width:81.8182%}.sqs-col-11 .sqs-col-8{width:72.7273%}.sqs-col-11 .sqs-col-7{width:63.6364%}.sqs-col-11 .sqs-col-6{width:54.5455%}.sqs-col-11 .sqs-col-5{width:45.4545%}.sqs-col-11 .sqs-col-4{width:36.3636%}.sqs-col-11 .sqs-col-3{width:27.2727%}.sqs-col-11 .sqs-col-2{width:18.1818%}.sqs-col-11 .sqs-col-1{width:9.0909%}.sqs-col-10{width:83.3333%}.sqs-col-10 .sqs-col-10{width:100%}.sqs-col-10 .sqs-col-9{width:90%}.sqs-col-10 .sqs-col-8{width:80%}.sqs-col-10 .sqs-col-7{width:70%}.sqs-col-10 .sqs-col-6{width:60%}.sqs-col-10 .sqs-col-5{width:50%}.sqs-col-10 .sqs-col-4{width:40%}.sqs-col-10 .sqs-col-3{width:30%}.sqs-col-10 .sqs-col-2{width:20%}.sqs-col-10 .sqs-col-1{width:10%}.sqs-col-9{width:75%}.sqs-col-9 .sqs-col-9{width:100%}.sqs-col-9 .sqs-col-8{width:88.8889%}.sqs-col-9 .sqs-col-7{width:77.7778%}.sqs-col-9 .sqs-col-6{width:66.6667%}.sqs-col-9 .sqs-col-5{width:55.5556%}.sqs-col-9 .sqs-col-4{width:44.4444%}.sqs-col-9 .sqs-col-3{width:33.3333%}.sqs-col-9 .sqs-col-2{width:22.2222%}.sqs-col-9 .sqs-col-1{width:11.1111%}.sqs-col-8{width:66.6667%}.sqs-col-8 .sqs-col-8{width:100%}.sqs-col-8 .sqs-col-7{width:87.5%}.sqs-col-8 .sqs-col-6{width:75%}.sqs-col-8 .sqs-col-5{width:62.5%}.sqs-col-8 .sqs-col-4{width:50%}.sqs-col-8 .sqs-col-3{width:37.5%}.sqs-col-8 .sqs-col-2{width:25%}.sqs-col-8 .sqs-col-1{width:12.5%}.sqs-col-7{width:58.3333%}.sqs-col-7 .sqs-col-7{width:100%}.sqs-col-7 .sqs-col-6{width:85.7143%}.sqs-col-7 .sqs-col-5{width:71.4286%}.sqs-col-7 .sqs-col-4{width:57.1429%}.sqs-col-7 .sqs-col-3{width:42.8571%}.sqs-col-7 .sqs-col-2{width:28.5714%}.sqs-col-7 .sqs-col-1{width:14.2857%}.sqs-col-6{width:50%}.sqs-col-6 .sqs-col-6{width:100%}.sqs-col-6 .sqs-col-5{width:83.3333%}.sqs-col-6 .sqs-col-4{width:66.6667%}.sqs-col-6 .sqs-col-3{width:50%}.sqs-col-6 .sqs-col-2{width:33.3333%}.sqs-col-6 .sqs-col-1{width:16.6667%}.sqs-col-5{width:41.6667%}.sqs-col-5 .sqs-col-5{width:100%}.sqs-col-5 .sqs-col-4{width:80%}.sqs-col-5 .sqs-col-3{width:60%}.sqs-col-5 .sqs-col-2{width:40%}.sqs-col-5 .sqs-col-1{width:20%}.sqs-col-4{width:33.3333%}.sqs-col-4 .sqs-col-4{width:100%}.sqs-col-4 .sqs-col-3{width:75%}.sqs-col-4 .sqs-col-2{width:50%}.sqs-col-4 .sqs-col-1{width:25%}.sqs-col-3{width:25%}.sqs-col-3 .sqs-col-3{width:100%}.sqs-col-3 .sqs-col-2{width:66.6667%}.sqs-col-3 .sqs-col-1{width:33.3333%}.sqs-col-2{width:16.6667%}.sqs-col-2 .sqs-col-2{width:100%}.sqs-col-2 .sqs-col-1{width:50%}.sqs-col-1{width:8.3333%}.sqs-col-1 .sqs-col-1{width:100%}.sqs-layout > .sqs-row{margin-left:-17px;margin-right:-17px}.sqs-layout:not(.sqs-editing) .sqs-row .sqs-block:not(.float):first-child{padding-top:0}.sqs-layout:not(.sqs-editing) .sqs-block+.sqs-row .sqs-block:not(.float):first-child{padding-top:17px}.sqs-layout:not(.sqs-editing) .sqs-row+.sqs-row .sqs-block:not(.float):first-child{padding-top:17px}.sqs-layout:not(.sqs-editing)>.sqs-row:first-child>[class*=sqs-col]:first-child>.sqs-block:last-child,.sqs-layout:not(.sqs-editing) .sqs-block+.sqs-row .sqs-block:not(.float):last-child{padding-bottom:17px}.sqs-layout:not(.sqs-editing) .sqs-row+.sqs-row:not(:last-child) .sqs-block:last-child{padding-bottom:17px}.sqs-block.sized .sqs-block-content{overflow:hidden}.text-align-center{text-align:center}.text-align-right{text-align:right}.columns-1 [class*=sqs-col-]{width:100% !important}.sqs-block .state-message,.sqs-state-message{font:400 normal 12px / 22px 'Gotham SSm A','Gotham SSm B','Gotham SSm','Gotham','Proxima Nova','Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;letter-spacing:normal;padding:19px;padding-left:60px;color:#3e3e3e;position:relative;background-color:rgba(128,128,128,.15000000000000002)}.sqs-block .state-message:after,.sqs-state-message:after{content:" ";position:absolute;top:0;left:0;height:60px;width:60px;background:transparent url(/universal/images-v6/icons/block-indicator-dark.png) no-repeat center}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:1.5dppx){.sqs-block .state-message:after,.sqs-state-message:after{background-image:url('/universal/images-v6/icons/block-indicator-dark@2x.png');background-size:22px}}.sqs-block .state-message.information,.sqs-state-message.information{background:#222;padding:30px 20px;text-align:center;color:#999;font-size:11px}.sqs-block .state-message .title,.sqs-state-message .title{padding-bottom:8px;font-size:14px}html.cameron .sqs-block .state-message .title,html.cameron .sqs-state-message .title{color:#eee}.sqs-block .state-message>.sqs-state-message-button,.sqs-state-message>.sqs-state-message-button,.sqs-block .state-message .sqs-state-message-buttons-wrapper,.sqs-state-message .sqs-state-message-buttons-wrapper{margin-top:19px;margin-left:-41px;display:block !important;position:relative}.sqs-block .state-message .sqs-state-message-button,.sqs-state-message .sqs-state-message-button{cursor:pointer;outline:none;background:#3e3e3e;padding:11px;-webkit-transition:background-color .1s ease-in-out;-moz-transition:background-color .1s ease-in-out;-ms-transition:background-color .1s ease-in-out;-o-transition:background-color .1s ease-in-out;transition:background-color .1s ease-in-out;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;font-family:inherit;-webkit-appearance:none;-moz-appearance:none;appearance:none;line-height:22px;text-align:center;display:inline-block;position:relative}.sqs-block .state-message .sqs-state-message-button,.sqs-state-message .sqs-state-message-button,.sqs-block .state-message .sqs-state-message-button>*,.sqs-state-message .sqs-state-message-button>*{color:#fff !important;-webkit-appearance:none;border:0;text-transform:uppercase;outline:none;font-size:11px;font-weight:500}.sqs-block .state-message .sqs-state-message-button:hover,.sqs-state-message .sqs-state-message-button:hover{background-color:#000;box-shadow:none}.sqs-layout.sqs-editing .sqs-block .sqs-block .state-message .sqs-state-message-button,.sqs-layout.sqs-editing .sqs-block .sqs-state-message .sqs-state-message-button{z-index:1001}.sqs-col-0{width:0;display:none}.sqs-block{position:relative;height:auto;outline:1px solid transparent;-webkit-transition:box-shadow .1s ease-in-out;-moz-transition:box-shadow .1s ease-in-out;-ms-transition:box-shadow .1s ease-in-out;-o-transition:box-shadow .1s ease-in-out;transition:box-shadow .1s ease-in-out;padding-top:17px;padding-bottom:17px}.sqs-block:not(.sqs-block-html):not(.sqs-block-markdown){clear:both}.sqs-layout.sqs-editing .sqs-block.sqs-block-focused:not(.sqs-block-html),.sqs-layout.sqs-editing .sqs-block.sqs-block-editing:not(.sqs-block-html),html:not(.blogapp) .sqs-layout.sqs-editing .sqs-block.sqs-block.sqs-selected,html:not(.blogapp) .sqs-layout.sqs-editing .sqs-block.sqs-block-editable:hover,.sqs-layout.sqs-editing .sqs-block.sqs-confirmation-open{box-shadow:inset 0 0 0 1px rgba(0,0,0,.1)}.sqs-layout.sqs-editing .sqs-block.sqs-block-focused.sqs-block-html:hover,.sqs-layout.sqs-editing .sqs-block.sqs-block.sqs-selected.sqs-block-html.sqs-block-editing{box-shadow:none !important}.sqs-layout.sqs-editing .sqs-block.sqs-dd-dragging,.sqs-layout.sqs-editing .sqs-block.yui3-dd-dragging{z-index:9995 !important;opacity:.3;-webkit-transition:opacity .15s ease-in-out, -webkit-transform .15s ease-in-out;-moz-transition:opacity .15s ease-in-out, -webkit-transform .15s ease-in-out;-ms-transition:opacity .15s ease-in-out, -webkit-transform .15s ease-in-out;-o-transition:opacity .15s ease-in-out, -webkit-transform .15s ease-in-out;transition:opacity .15s ease-in-out, -webkit-transform .15s ease-in-out;box-sizing:border-box}.sqs-block iframe.embedded-scripts-preview{display:block;position:relative;border:0}.sqs-block .removed-script{display:block;opacity:.6}.sqs-block .removed-script::before{content:'Script Disabled';font-style:italic}html.blogapp .sqs-block{-webkit-transition:none !important;-moz-transition:none !important;-ms-transition:none !important;-o-transition:none !important;transition:none !important}html .sqs-block.sqs-block-editable:not(.sqs-block-editing){cursor:url(/universal/images-v6/grab.cur) 8 8,move;cursor:-webkit-grab;cursor:-moz-grab}html .sqs-block.sqs-block-editable:not(.sqs-block-editing) .sqs-dd-invalid-handle{cursor:default}html.sqs-dragging-block *{cursor:url(/universal/images-v6/grabbing.cur) 8 8,move;cursor:-webkit-grabbing;cursor:-moz-grabbing}html .sqs-locked-layout .sqs-block{cursor:default !important}html .sqs-block.sqs-block-html .sqs-block-content{cursor:auto}.sqs-block.sqs-block-code img{max-width:100%}.sqs-block-hidden{height:0;overflow:hidden}.yui3-overlay-hidden{display:none}.sqs-editing-overlay{position:absolute;top:0;left:0;right:0;bottom:0;z-index:1000;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.sqs-locked-height .sqs-editing-overlay{background-color:rgba(255,255,255,.5)}html.browser-msie .sqs-editing-overlay{background-color:rgba(128,128,128,.05)}body.sqs-dragging .sqs-layout .sqs-content-overlay{display:block !important}.sqs-content-overlay{position:absolute;left:0;width:100%}[class*=aspect-overlay]{padding-bottom:20px;position:absolute}[class*=aspect-overlay] .yui3-overlay-content{background:rgba(0,0,0,.9);color:#fff;font:12px/24px 'Helvetica Neue',Helvetica,Arial,sans-serif;text-align:center;width:50px;border-radius:5px}.sqs-block .yui3-resize-handle{display:none;position:absolute;height:50px;width:50px}.sqs-block .yui3-resize-handles-wrapper{z-index:10}.sqs-block .yui3-resize-handle-inner{position:absolute;top:50%;left:50%;margin-top:-7px;margin-left:-7px;height:13px;width:13px;border-radius:100px;background-color:grey}.sqs-block .yui3-resize-handle-b{margin-bottom:-25px;margin-left:-25px;bottom:-1px;left:50%;cursor:row-resize}.sqs-block .yui3-resize-handle-l{left:0;top:0;bottom:0;width:10px;cursor:col-resize}.sqs-block .yui3-resize-handle-r{right:0;top:0;bottom:0;width:10px;cursor:col-resize}.sqs-block .yui3-resize-handle.sqs-dd-dragging .yui3-resize-handle,.sqs-block .yui3-resize-handle.yui3-dd-dragging .yui3-resize-handle{display:none}.sqs-block[class*=focused] .yui3-resize-handle,.sqs-block.sqs-block-editing .yui3-resize-handle{display:block;z-index:9999}.sqs-block[class*=float]{z-index:10 !important;box-sizing:border-box;clear:none}.sqs-block[class*=float-left]{float:left;margin-right:17px}.sqs-block[class*=float-left]+ .sqs-block[class*=float-left]{clear:left}.sqs-block[class*=float-right]{float:right;margin-left:17px}.sqs-block[class*=float-right]+ .sqs-block[class*=float-right]{clear:right}.sqs-remove-button{position:absolute !important;border-radius:100px;background:#111 url('icon_close_14_light.png') center center no-repeat;background-size:7px;cursor:pointer}body.sqs-index .sqs-remove-button{background:#111 url('/universal/images-v6/icons/icon_close_14_light.png') center center no-repeat}.sqs-block-error{padding-top:12px;padding-bottom:12px}.sqs-block-error .sqs-block-content{border:1px solid #ddd;background:#eee;color:#333}html.blogapp .sqs-block-error{padding-top:17px;padding-bottom:17px}html.blogapp .sqs-block-error .sqs-block-content{padding:6px 12px}html.blogapp .sqs-state-message,html.blogapp .state-message{display:block;border:1px solid #ddd;padding:6px 12px;background:#eee;text-align:center;color:#333}.sqs-block .sqs-intrinsic{position:relative !important}.sqs-block .sqs-intrinsic .sqs-intrinsic-content{position:absolute !important;top:0;left:0;height:100%;max-width:none;width:100%}@font-face{font-family:'squarespace-ui-font';src:url('//static.squarespace.com/universal/fonts/squarespace-ui-font.eot');src:url('//static.squarespace.com/universal/fonts/squarespace-ui-font.eot?#iefix') format('embedded-opentype'),url('//static.squarespace.com/universal/fonts/squarespace-ui-font.svg#squarespace-ui-font') format('svg'),url('//static.squarespace.com/universal/fonts/squarespace-ui-font.woff') format('woff'),url('//static.squarespace.com/universal/fonts/squarespace-ui-font.ttf') format('truetype');font-weight:normal;font-style:normal}.sqs-ui-font-family{font-family:'squarespace-ui-font';font-style:normal;speak:none;font-weight:normal;-webkit-font-smoothing:antialiased}[class^="sqs-ui-font-"]:before,[class*=" sqs-ui-font-"]:before{font-family:'squarespace-ui-font';font-style:normal;speak:none;font-weight:normal;-webkit-font-smoothing:antialiased}[data-icon]:before{font-family:'squarespace-ui-font';font-style:normal;speak:none;font-weight:normal;-webkit-font-smoothing:antialiased;content:attr(data-icon)}#list-paging a,#item-paging a{text-decoration:none}#list-paging a.newer .pagination-icon:before,#item-paging a.newer .pagination-icon:before{font-family:'squarespace-ui-font';font-style:normal;speak:none;font-weight:normal;-webkit-font-smoothing:antialiased;content:"\e000";text-align:center;display:inline-block;vertical-align:middle}#list-paging a.newer .pagination-icon:before,#item-paging a.newer .pagination-icon:before{font-size:16px;width:16px;height:16px;line-height:16px}#list-paging a.newer .pagination-icon:before,#item-paging a.newer .pagination-icon:before{font-size:inherit;width:16px;height:16px;line-height:16px}#list-paging a.older .pagination-icon:after,#item-paging a.older .pagination-icon:after{font-family:'squarespace-ui-font';font-style:normal;speak:none;font-weight:normal;-webkit-font-smoothing:antialiased;content:"\e003";text-align:center;display:inline-block;vertical-align:middle}#list-paging a.older .pagination-icon:after,#item-paging a.older .pagination-icon:after{font-size:16px;width:16px;height:16px;line-height:16px}#list-paging a.older .pagination-icon:after,#item-paging a.older .pagination-icon:after{font-size:inherit;width:16px;height:16px;line-height:16px}#list-paging,#item-paging{border-top:1px solid #e3e3e3;border-bottom:1px solid #e3e3e3;margin:3em 0 0 0}#list-paging a,#item-paging a{padding:1.5em 0;display:inline-block;width:48%}#list-paging a.newer .pagination-icon,#item-paging a.newer .pagination-icon{margin-right:.5em}#list-paging a.newer:after,#item-paging a.newer:after{content:"Newer"}#list-paging a.older,#item-paging a.older{float:right;text-align:right}#list-paging a.older .pagination-icon,#item-paging a.older .pagination-icon{margin-left:.5em}#list-paging a.older:before,#item-paging a.older:before{content:"Older"}#list-paging a.disabled,#item-paging a.disabled{color:#ddd}.like-share{float:right}.like-share .sqs-simple-like{display:inline-block;margin-right:.5em}.like-share .sqs-simple-like .like-icon{float:none;display:inline-block;vertical-align:middle}.like-share .squarespace-social-buttons{display:inline-block;margin-right:.5em}.like-share .squarespace-social-buttons .ss-social-button-icon{float:none;display:inline-block;vertical-align:middle}.like-share.empty{display:none}body:not(.event-show-past-events) .eventlist.eventlist--past{display:none}.eventlist-event{position:relative;margin:68px 0 0 0;padding:0}.eventlist-event:first-of-type{margin:0}.eventlist-column-thumbnail{display:block;float:left;width:35%;height:0;padding-bottom:23.333333333333332%;text-decoration:none !important;background:rgba(110,110,110,.05)}.eventlist-column-thumbnail img{-webkit-transition:opacity .3s ease-in;-moz-transition:opacity .3s ease-in;-ms-transition:opacity .3s ease-in;-o-transition:opacity .3s ease-in;transition:opacity .3s ease-in}.eventlist-column-thumbnail img:not(.loaded){opacity:0}body:not(.event-thumbnails) .eventlist-column-thumbnail{display:none}.event-disable-item-pages .eventlist-column-thumbnail{cursor:default;pointer-events:none}.event-thumbnail-size-11-square .eventlist-column-thumbnail{padding-bottom:35%}.event-thumbnail-size-32-standard .eventlist-column-thumbnail{padding-bottom:23.333333333333332%}.event-thumbnail-size-23-standard-vertical .eventlist-column-thumbnail{padding-bottom:52.5%}.event-thumbnail-size-43-four-thirds .eventlist-column-thumbnail{padding-bottom:26.25%}.event-thumbnail-size-169-widescreen .eventlist-column-thumbnail{padding-bottom:19.6875%}.event-thumbnail-size-2401-anamorphic-widescreen .eventlist-column-thumbnail{padding-bottom:14.583333333333334%}.eventlist-column-thumbnail:empty{height:auto;min-height:100px;padding-bottom:0 !important;background:transparent}.eventlist-column-date{display:block;position:absolute;top:0;left:0;width:35%;margin:0;padding:0;color:#333 !important;text-decoration:none !important}.event-disable-item-pages .eventlist-column-date{cursor:default;pointer-events:none}body:not(.event-date-label) .eventlist-column-date{display:none}body:not(.event-thumbnails) .eventlist-column-date{position:static;float:left;width:70px}.eventlist-datetag{display:table;position:absolute;top:10px;right:10px;height:auto;min-height:70px;width:70px;margin:0;padding:0;background:#fff;color:#333;font-size:14px;line-height:14px;text-align:center;box-sizing:border-box}body:not(.event-thumbnails) .eventlist-datetag{position:static;background:#e8ecec}.eventlist-event:not(.eventlist-event--hasimg) .eventlist-datetag{top:0;background:#e8ecec}.eventlist-datetag-inner{display:table-cell;vertical-align:middle;margin:0;padding:6px;color:inherit;font-size:0;line-height:0;letter-spacing:0}.eventlist-datetag-startdate--month,.eventlist-datetag-startdate--day,.eventlist-datetag-time,.eventlist-datetag-enddate{margin:3px 0;line-height:1em;text-transform:uppercase;white-space:nowrap}.eventlist-event--past .eventlist-datetag-startdate--month,.eventlist-event--past .eventlist-datetag-startdate--day,.eventlist-event--past .eventlist-datetag-time,.eventlist-event--past .eventlist-datetag-enddate{opacity:.3}.eventlist-datetag-time,.eventlist-datetag-enddate{border-top:1px solid #ddd;margin:6px 0 0 0;padding-top:6px;font-size:11px}.eventlist-datetag-startdate--month{font-size:14px;margin-top:6px}.eventlist-datetag-startdate--day{font-size:26px}body:not(.event-date-label-time) .eventlist-datetag-time{display:none}.eventlist-datetag-enddate:before{content:"to "}.eventlist-datetag-status{display:none;position:absolute;top:0px;left:35px;width:1px;height:70px;background:#000;-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);-o-transform:rotate(45deg);transform:rotate(45deg)}.eventlist-event--past .eventlist-datetag-status{display:block}.eventlist-event--past.eventlist-event--multiday .eventlist-datetag-status,body.event-date-label-time .eventlist-event--past .eventlist-datetag-status{top:0px;height:85px;-webkit-transform:rotate(38deg);-moz-transform:rotate(38deg);-ms-transform:rotate(38deg);-o-transform:rotate(38deg);transform:rotate(38deg)}.eventlist-column-info{float:left;width:65%;padding:0 0 0 34px;box-sizing:border-box}body:not(.event-thumbnails) .eventlist-column-info{width:calc(100% - 70px);width:-webkit-calc(100% - 70px);width:-moz-calc(100% - 70px)}body:not(.event-thumbnails):not(.event-date-label) .eventlist-column-info{width:100%;padding-left:0}.eventlist-cats{margin:0 0 4.25px 0;padding:0;font-size:14px;line-height:1.4em}.eventlist-cats a{color:inherit !important;text-decoration:none !important}body:not(.event-list-show-cats) .eventlist-cats{display:none}.eventlist-title{margin:0 0 17px 0 !important;padding:0 !important;font-size:28px !important;line-height:1.2em !important}.eventlist-title .eventlist-title-link{margin:0 !important;padding:0 !important;color:inherit !important;text-decoration:none !important;font-size:inherit !important;line-height:inherit !important}.eventlist-title .eventlist-title-link:empty:before{content:"Untitled Event"}.event-disable-item-pages .eventlist-title .eventlist-title-link{cursor:default;pointer-events:none}.eventlist-meta{list-style-type:none;margin:0 0 17px 0;padding:0}.eventlist-meta-item{margin:0;padding:0;text-align:left}.event-icons .eventlist-meta-item{position:relative;padding-left:25.5px}.event-icons .eventlist-meta-item:before{opacity:.5;position:absolute;top:3px;left:-2px}.event-icons .eventlist-meta-item.eventlist-meta-date:before{font-family:'squarespace-ui-font';font-style:normal;speak:none;font-weight:normal;-webkit-font-smoothing:antialiased;content:"\e015";text-align:center;display:inline-block;vertical-align:middle}.event-icons .eventlist-meta-item.eventlist-meta-date:before{font-size:16px;width:16px;height:16px;line-height:16px}.event-icons .eventlist-meta-item.eventlist-meta-time:before{font-family:'squarespace-ui-font';font-style:normal;speak:none;font-weight:normal;-webkit-font-smoothing:antialiased;content:"\e00c";text-align:center;display:inline-block;vertical-align:middle}.event-icons .eventlist-meta-item.eventlist-meta-time:before{font-size:16px;width:16px;height:16px;line-height:16px}.event-icons .eventlist-meta-item.eventlist-meta-address:before{font-family:'squarespace-ui-font';font-style:normal;speak:none;font-weight:normal;-webkit-font-smoothing:antialiased;content:"\e02f";text-align:center;display:inline-block;vertical-align:middle}.event-icons .eventlist-meta-item.eventlist-meta-address:before{font-size:16px;width:16px;height:16px;line-height:16px}body:not(.event-list-date) .eventlist-meta-date,body:not(.event-list-time) .eventlist-meta-time,body:not(.event-list-address) .eventlist-meta-address{display:none}.event-list-time .eventlist-event--multiday .eventlist-meta-date .event-date:after{content:", "}.event-list-time .eventlist-event--multiday .eventlist-meta-time{display:inline-block}.eventlist-meta-address-line:after{content:", "}.eventlist-meta-address-line:last-of-type:after{content:none}.eventlist-meta-address-maplink:before{content:"(map)"}body:not(.event-list-icalgcal-links) .eventlist-meta-export{display:none}.eventlist-meta-export-google:before{content:'Google Calendar'}.eventlist-meta-export-divider{margin:0 4px}.eventlist-meta-export-divider:before{content:"\00B7"}.eventlist-meta-export-ical:before{content:'ICS'}body:not(.event-excerpts) .eventlist-description,body:not(.event-excerpts) .eventlist-excerpt{display:none}.eventlist-excerpt{margin:0 0 17px 0}.eventlist-button{margin:5.666666666666667px 0 25.5px 0;display:inline-block;width:auto;height:auto;padding:1em 2.5em;color:#fff;background-color:#272727;border-width:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:12px;line-height:1em;font-weight:normal;font-style:normal;text-transform:uppercase;letter-spacing:0px;text-align:center;text-decoration:none;cursor:pointer;outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none}.eventlist-button:before{content:"View Event \2192"}body:not(.event-list-cta-button) .eventlist-button{display:none !important}body:not(.event-list-like-and-share-buttons) .eventlist-actions{display:none}.eventlist-actions .sqs-simple-like{line-height:inherit}.eventlist-actions .sqs-simple-like .like-count{margin-right:1.2em}.eventlist-actions .sqs-simple-like .like-count:before{font-family:'squarespace-ui-font';font-style:normal;speak:none;font-weight:normal;-webkit-font-smoothing:antialiased;content:"\e012";text-align:center;display:inline-block;vertical-align:middle}.eventlist-actions .sqs-simple-like .like-count:before{font-size:16px;width:16px;height:16px;line-height:16px}.eventlist-actions .sqs-simple-like .like-count:before{margin-right:.2em;position:relative;top:.13em;font-size:1.2em;width:auto;height:auto;line-height:inherit;text-align:left;vertical-align:initial}.eventlist-actions .sqs-simple-like .like-icon{display:none}.eventlist-actions .ss-social-button:before{font-family:'squarespace-ui-font';font-style:normal;speak:none;font-weight:normal;-webkit-font-smoothing:antialiased;content:"\e02b";text-align:center;display:inline-block;vertical-align:middle}.eventlist-actions .ss-social-button:before{font-size:16px;width:16px;height:16px;line-height:16px}.eventlist-actions .ss-social-button:before{margin-right:.4em;font-size:.85em;width:auto;height:auto;line-height:inherit;text-align:left;vertical-align:initial}.eventlist-actions .ss-social-button div{display:inline-block}.eventlist-actions .ss-social-button-icon{display:none !important}.eventlist-filter{font-size:18px;line-height:1em;margin:0 0 51px 0}.eventlist-filter:before{content:"Filtering by: "}.eventlist-past-upcoming-divider{display:none;height:0;border:none;border-top:1px solid rgba(230,230,230,.8);font-size:68px;line-height:68px}.eventlist--upcoming+.eventlist--past .eventlist-past-upcoming-divider{display:block}.event-datetime-divider:before{content:" \2013 "}.eventlist-empty:before{content:"There are no upcoming events at this time."}.eventitem-backlink{display:inline-block;margin:0 0 51px 0;text-transform:uppercase}.eventitem-backlink:before{content:"\2190\0020 Back to All Events"}body:not(.event-item-back-link) .eventitem-backlink{display:none}.eventitem{position:relative}.eventitem-column-meta{float:left;width:30%;box-sizing:border-box}.eventitem-title{margin:0 0 34px 0 !important;padding:0 !important;font-size:28px !important;line-height:1.2em !important}.eventitem-title:empty:before{content:"Untitled Event"}.eventitem-meta{list-style-type:none;margin:0 0 17px 0;padding:0}.eventitem-meta-item{margin:0;padding:0;font-size:.9em;line-height:1.6em}.eventitem--multiday .eventitem-meta-date .event-date:after{content:", "}.eventitem--multiday .eventitem-meta-time{display:inline-block}.eventitem-meta-address-line:after{content:", "}.eventitem-meta-address-line:last-of-type:after{content:none}.eventitem-meta-address-line.eventitem-meta-address-line--title{display:block}.eventitem-meta-address-line.eventitem-meta-address-line--title:after{content:none}.eventitem-meta-address-maplink:before{content:"(map)"}body:not(.event-icalgcal-links) .event-meta-addtocalendar-container{display:none}.eventitem-meta-export-google:before{content:"Google Calendar"}.eventitem-meta-export-divider{margin:0 4px}.eventitem-meta-export-divider:before{content:"\00B7"}.eventitem-meta-export-ical:before{content:"ICS"}.eventitem-meta-cats:before{content:"Posted in "}.eventitem-meta-tags:before{content:"Tagged "}.event-meta-socialicon-container .sqs-simple-like{line-height:inherit}.event-meta-socialicon-container .sqs-simple-like .like-count{margin-right:1.2em}.event-meta-socialicon-container .sqs-simple-like .like-count:before{font-family:'squarespace-ui-font';font-style:normal;speak:none;font-weight:normal;-webkit-font-smoothing:antialiased;content:"\e012";text-align:center;display:inline-block;vertical-align:middle}.event-meta-socialicon-container .sqs-simple-like .like-count:before{font-size:16px;width:16px;height:16px;line-height:16px}.event-meta-socialicon-container .sqs-simple-like .like-count:before{margin-right:.2em;position:relative;top:.13em;font-size:1.2em;width:auto;height:auto;line-height:inherit;text-align:left;vertical-align:initial}.event-meta-socialicon-container .sqs-simple-like .like-icon{display:none}.event-meta-socialicon-container .ss-social-button:before{font-family:'squarespace-ui-font';font-style:normal;speak:none;font-weight:normal;-webkit-font-smoothing:antialiased;content:"\e02b";text-align:center;display:inline-block;vertical-align:middle}.event-meta-socialicon-container .ss-social-button:before{font-size:16px;width:16px;height:16px;line-height:16px}.event-meta-socialicon-container .ss-social-button:before{margin-right:.4em;font-size:.85em;width:auto;height:auto;line-height:inherit;text-align:left;vertical-align:initial}.event-meta-socialicon-container .ss-social-button div{display:inline-block}.event-meta-socialicon-container .ss-social-button-icon{display:none !important}body:not(.event-like-and-share-buttons) .event-meta-socialicon-container{display:none}.eventitem-column-content{float:left;width:70%;padding-left:34px;box-sizing:border-box}.eventitem-content-footer{margin:17px 0 0 0}.eventitem-content-footer .eventitem-sourceurl{margin:0 0 8.5px 0}.eventitem-content-footer .eventitem-sourceurl:before{content:"Source: "}.eventitem-content-footer .eventitem-meta{margin:0 0 8.5px 0}.eventitem-content-footer .eventitem-meta>*{font-size:inherit}.eventitem-pager{margin:170px 0 0 0}.eventitem-pager-newer,.eventitem-pager-older{float:left;display:inline-block;text-decoration:none;box-sizing:border-box}.eventitem-pager-older .eventitem-pager-date:before{content:"Earlier Event: "}.eventitem-pager-newer{float:right;text-align:right}.eventitem-pager-newer .eventitem-pager-date:before{content:"Later Event: "}.eventitem-pager-disabled{opacity:.4}.event-list-compact-view .eventlist-column-thumbnail,.event-list-compact-view .eventlist-column-date,.event-list-compact-view .eventlist-column-info{width:100% !important}.event-list-compact-view .eventlist-column-thumbnail:empty{min-height:0}.event-list-compact-view.event-thumbnail-size-11-square .eventlist-column-thumbnail{padding-bottom:100%}.event-list-compact-view.event-thumbnail-size-32-standard .eventlist-column-thumbnail{padding-bottom:66.666%}.event-list-compact-view.event-thumbnail-size-23-standard-vertical .eventlist-column-thumbnail{padding-bottom:150%}.event-list-compact-view.event-thumbnail-size-43-four-thirds .eventlist-column-thumbnail{padding-bottom:75%}.event-list-compact-view.event-thumbnail-size-169-widescreen .eventlist-column-thumbnail{padding-bottom:56.25%}.event-list-compact-view.event-thumbnail-size-2401-anamorphic-widescreen .eventlist-column-thumbnail{padding-bottom:41.666%}.event-list-compact-view .eventlist-datetag{left:0;right:auto}.event-list-compact-view.event-thumbnails .eventlist-event--hasimg .eventlist-datetag{left:10px}.event-list-compact-view.event-thumbnails .eventlist-event:not(.eventlist-event--hasimg) .eventlist-column-date{position:static;float:left;width:70px}.event-list-compact-view.event-thumbnails .eventlist-event:not(.eventlist-event--hasimg) .eventlist-column-date .eventlist-datetag{position:static}.event-list-compact-view .eventlist-column-info{margin:25.5px 0 0 0;padding:0}.event-list-compact-viewbody:not(.event-thumbnails):not(.event-date-label) .eventlist-event{margin-top:34px}.event-list-compact-viewbody:not(.event-thumbnails):not(.event-date-label) .eventlist-column-info{margin-top:0}.event-list-compact-view .eventitem-title{margin-bottom:17px !important}.event-list-compact-view .eventitem-column-meta{margin-bottom:34px}.event-list-compact-view .eventitem-column-meta,.event-list-compact-view .eventitem-column-content{float:none;width:auto;padding:0}.event-item-compact-view .eventitem-title{margin-bottom:17px !important}.event-item-compact-view .eventitem-column-meta{margin-bottom:34px}.event-item-compact-view .eventitem-column-meta,.event-item-compact-view .eventitem-column-content{float:none;width:auto;padding:0}@media only screen and (max-width:639px){.eventlist-column-thumbnail,.eventlist-column-date,.eventlist-column-info{width:100% !important}.eventlist-column-thumbnail:empty{min-height:0}.event-thumbnail-size-11-square .eventlist-column-thumbnail{padding-bottom:100%}.event-thumbnail-size-32-standard .eventlist-column-thumbnail{padding-bottom:66.666%}.event-thumbnail-size-23-standard-vertical .eventlist-column-thumbnail{padding-bottom:150%}.event-thumbnail-size-43-four-thirds .eventlist-column-thumbnail{padding-bottom:75%}.event-thumbnail-size-169-widescreen .eventlist-column-thumbnail{padding-bottom:56.25%}.event-thumbnail-size-2401-anamorphic-widescreen .eventlist-column-thumbnail{padding-bottom:41.666%}.eventlist-datetag{left:0;right:auto}.event-thumbnails .eventlist-event--hasimg .eventlist-datetag{left:10px}.event-thumbnails .eventlist-event:not(.eventlist-event--hasimg) .eventlist-column-date{position:static;float:left;width:70px}.event-thumbnails .eventlist-event:not(.eventlist-event--hasimg) .eventlist-column-date .eventlist-datetag{position:static}.eventlist-column-info{margin:25.5px 0 0 0;padding:0}body:not(.event-thumbnails):not(.event-date-label) .eventlist-event{margin-top:34px}body:not(.event-thumbnails):not(.event-date-label) .eventlist-column-info{margin-top:0}.eventitem-title{margin-bottom:17px !important}.eventitem-column-meta{margin-bottom:34px}.eventitem-column-meta,.eventitem-column-content{float:none;width:auto;padding:0}.eventitem-title{margin-bottom:17px !important}.eventitem-column-meta{margin-bottom:34px}.eventitem-column-meta,.eventitem-column-content{float:none;width:auto;padding:0}}.event-time-24hr{display:none}.event-time-format .event-time-12hr{display:none}.event-time-format .event-time-24hr{display:inline}.sqs-audio-playlist{zoom:1}.sqs-audio-playlist.loading{visibility:hidden}.sqs-audio-playlist:after{display:block;visibility:hidden;font-size:0;height:0;clear:both;content:"."}.sqs-audio-playlist:after{display:block;visibility:hidden;font-size:0;height:0;clear:both;content:"."}.sqs-audio-playlist.hidden{display:none}.sqs-audio-playlist .album-info{width:33%;float:left;zoom:1}.sqs-audio-playlist .album-info:after{display:block;visibility:hidden;font-size:0;height:0;clear:both;content:"."}.sqs-audio-playlist .album-info:after{display:block;visibility:hidden;font-size:0;height:0;clear:both;content:"."}.sqs-audio-playlist .album-cover-wrapper{position:relative;width:90px;height:90px;margin-bottom:30px}.sqs-audio-playlist .album-controls{position:absolute;top:0;right:0;bottom:0;left:0;cursor:pointer}.sqs-audio-playlist .album-controls .button{-webkit-transition:.25s all linear;-moz-transition:.25s all linear;-ms-transition:.25s all linear;-o-transition:.25s all linear;transition:.25s all linear;-moz-border-radius:50%;border-radius:50%;position:absolute;bottom:50%;left:50%;display:block;width:90px;height:90px;margin-bottom:-45px;margin-left:-45px;background:#000}.sqs-audio-playlist .album-controls .icon{display:block;position:relative;left:50%;top:50%;margin-top:-20px;margin-left:-10px;width:0px;height:0px;border-top:18px solid transparent;border-bottom:18px solid transparent;border-left:30px solid #fff;-webkit-transform:translatez();-ms-transform:translatez();transform:translatez()}.sqs-audio-playlist .album-title{font-size:1.5em;margin:0}.sqs-audio-playlist .album-title a{text-decoration:none}.sqs-audio-playlist.playing .album-controls .button .icon{border-width:0px;margin-top:-15px;margin-left:-13px}.sqs-audio-playlist.playing .album-controls .button .icon,.sqs-audio-playlist.playing .album-controls .button .icon:before{height:30px;width:10px;background-color:#fff}.sqs-audio-playlist.playing .album-controls .button .icon:before{content:'';display:block;margin-left:16px}.sqs-audio-playlist.has-album-cover .album-cover-wrapper{position:relative;width:100%;height:0;padding-bottom:100%;margin-bottom:20px}.sqs-audio-playlist.has-album-cover .album-cover{position:absolute;top:0;right:0;bottom:0;left:0}.sqs-audio-playlist.has-album-cover .button{background:rgba(0,0,0,.7);opacity:.9}.sqs-audio-playlist.has-album-cover:hover .button{background:rgba(0,0,0,.9)}.sqs-audio-playlist.has-album-cover.playing .album-controls .button{margin:-15px;bottom:0;left:0;-webkit-transform:scale(.4,.4);-ms-transform:scale(.4,.4);transform:scale(.4,.4)}.sqs-audio-playlist.has-album-cover.playing .album-controls .button .icon{border-width:0px;margin-top:-15px;margin-left:-13px}.sqs-audio-playlist.has-album-cover.playing .album-controls .button .icon,.sqs-audio-playlist.has-album-cover.playing .album-controls .button .icon:before{height:30px;width:10px;background-color:#fff}.sqs-audio-playlist.has-album-cover.playing .album-controls .button .icon:before{content:'';display:block;margin-left:16px}.sqs-audio-playlist.has-album-cover.playing .track{opacity:.4}.sqs-audio-playlist.has-album-cover.playing .track:hover,.sqs-audio-playlist.has-album-cover.playing .track.selected{opacity:1}.sqs-audio-playlist .tracks{float:right;width:60%;margin:0;padding:0}.sqs-audio-playlist .track{list-style-type:none;padding:0;margin:0 0 5%;cursor:pointer;zoom:1;font-style:normal;font-weight:normal;letter-spacing:0;text-transform:none;font-size:13px;line-height:1.4em}.sqs-audio-playlist .track:after{display:block;visibility:hidden;font-size:0;height:0;clear:both;content:"."}.sqs-audio-playlist .track:after{display:block;visibility:hidden;font-size:0;height:0;clear:both;content:"."}.sqs-audio-playlist .track-progress-bar{clear:both;height:2px;position:relative;cursor:pointer;padding-bottom:2.5%}.sqs-audio-playlist .track-progress-bar .bar{position:absolute;top:0;left:0;height:2px;width:0%}.sqs-audio-playlist .track-progress-bar .bar.bg{width:100%}.sqs-audio-playlist .track-progress-bar .bar.play-bar{position:relative}.sqs-audio-playlist .track-meta{float:right;text-align:right}.sqs-audio-playlist .track-info .title a{font-size:16px}.sqs-audio-playlist.tablet .album-info,.sqs-audio-playlist.tablet .tracks{width:100%;float:none}.sqs-audio-playlist.tablet .album-info{padding-bottom:8%}.sqs-audio-playlist.tablet .album-cover-wrapper{float:left;margin-right:30px}.sqs-audio-playlist.tablet.has-album-cover .album-cover-wrapper{width:40%;padding-bottom:40%}.sqs-audio-playlist.tablet.no-main-image .album-description{margin-left:120px}.sqs-audio-playlist.phone .album-info,.sqs-audio-playlist.phone .tracks{width:100%;float:none}.sqs-audio-playlist.phone .tracks{margin-top:30px}.sqs-audio-playlist.phone .tracks .track{margin-bottom:10%}.sqs-audio-playlist.phone .album-info{padding-bottom:0}.sqs-audio-playlist.phone .album-cover-wrapper{float:none;margin-right:0;margin-bottom:20px}.sqs-audio-playlist.phone.has-album-cover .album-cover-wrapper{width:100%;padding-bottom:100%}.sqs-audio-playlist.phone.no-main-image .album-description{margin-left:0}.sqs-audio-playlist .track-progress-bar{-webkit-tap-highlight-color:rgba(0,0,0,.5)}.sqs-audio-playlist .track-progress-bar .bar{-webkit-tap-highlight-color:rgba(0,0,0,.5)}.sqs-audio-playlist .track-progress-bar .bar.bg{background-color:#000;background-color:rgba(0,0,0,.1)}.sqs-audio-playlist .track-progress-bar .bar.load-bar{background-color:#000;background-color:rgba(0,0,0,.05)}.sqs-audio-playlist .track-progress-bar .bar.play-bar{background-color:#000;background-color:rgba(0,0,0,.8)}.sqs-audio-playlist .track-meta .track-time{color:#000;color:rgba(0,0,0,.5)}.sqs-audio-playlist .track-meta .actions{color:#000;color:rgba(0,0,0,.2)}.sqs-audio-playlist .track-meta .actions a{color:#000;color:rgba(0,0,0,.5)}.sqs-audio-playlist .track-meta .actions a:hover{color:#000;color:rgba(0,0,0,.8)}.sqs-audio-playlist .track-info .title a{color:#000;color:rgba(0,0,0,.85)}.sqs-audio-playlist .track-info .artist{color:#000;color:rgba(0,0,0,.5)}.hide-album-share-link .sqs-audio-playlist .squarespace-social-buttons{display:none}#productList{clear:both;margin-left:-3%;margin-top:-3%;width:103%}#productList .product{cursor:pointer;float:left;margin-left:2.912621359223301%;margin-top:3%;position:relative;width:30.420711974110034%;-webkit-transform:translatez(0)}#productList .product .product-image{-webkit-transition:opacity .14s ease-out}#productList .product .product-image .intrinsic{padding-bottom:100%;line-height:0;position:relative;overflow:hidden}#productList .product .product-image .intrinsic>div{position:absolute;top:0;left:0;bottom:0;right:0;background-color:rgba(0,0,0,0)}#productList .product .product-image img{-webkit-transition:opacity .3s ease-out;-moz-transition:opacity .3s ease-out;transition:opacity .3s ease-out}#productList .product .product-mark{position:absolute;top:15px;right:0;background:#222;padding:6px 8px;color:#fff;line-height:1em;text-transform:uppercase;-webkit-font-smoothing:antialiased}#productList .product .product-title{font-size:15px;line-height:1.5em;margin-top:1em}#productList .product .product-price{font-size:12px;display:none;line-height:1.5em}#productList .product .product-price .original-price{text-decoration:line-through;opacity:.7;filter:alpha(opacity=70)}#productList .product .product-price .strikeout{text-decoration:line-through}#productList .product .product-image img{will-change:opacity}#productList .product:hover .product-image img{opacity:.8;filter:alpha(opacity=80)}#productList .product .product-quick-view-button-hover-zone{opacity:0;position:absolute;top:0;left:0;width:100%;height:0}#productList .product:hover .product-quick-view-button-hover-zone{opacity:1}#productList .product .product-quick-view-button-container{position:absolute;top:auto;bottom:10%;width:100%;text-align:center}#productList .product:nth-child(3n+1){clear:left}#productList ul.pagination{clear:both;margin-top:15px;margin-left:2.912621359223301%}#productList ul.pagination li{display:inline-block}#productList ul.pagination li.previous-page{text-align:left}#productList ul.pagination li.next-page{text-align:right}.product-list-alignment-center #productList .product-title,.product-list-alignment-center #productList .product-price{text-align:center}.product-item-size-11-square #productList .product .product-image .intrinsic,.product-item-size-11-square #productList .product .product-quick-view-button-hover-zone{padding-bottom:100%}.product-item-size-32-standard #productList .product .product-image .intrinsic,.product-item-size-32-standard #productList .product .product-quick-view-button-hover-zone{padding-bottom:66.666%}.product-item-size-23-standard-vertical #productList .product .product-image .intrinsic,.product-item-size-23-standard-vertical #productList .product .product-quick-view-button-hover-zone{padding-bottom:150%}.product-item-size-43-four-thirds #productList .product .product-image .intrinsic,.product-item-size-43-four-thirds #productList .product .product-quick-view-button-hover-zone{padding-bottom:75%}.product-item-size-169-widescreen #productList .product .product-image .intrinsic,.product-item-size-169-widescreen #productList .product .product-quick-view-button-hover-zone{padding-bottom:56.25%}@media only screen and (min-width:700px){.no-touch .product-list-titles-overlay #productList .product .product-image{margin:0}.no-touch .product-list-titles-overlay #productList .product .product-overlay{position:absolute;top:0;left:0;bottom:0;right:0;background:rgba(0,0,0,.6);color:#fff;-webkit-font-smoothing:antialiased}.no-touch .product-list-titles-overlay #productList .product .product-mark{font-size:12px;line-height:normal}.no-touch .product-list-titles-overlay #productList .product .product-meta{position:absolute;width:80%;margin:0 10%;top:50%}.no-touch .product-list-titles-overlay #productList .product .product-title{font-size:16px;font-weight:700;line-height:1.5em;color:#fff}.no-touch .product-list-titles-overlay #productList .product .product-price{font-size:13px;line-height:normal;color:#fff}.no-touch .product-list-titles-overlay #productList .product .product-overlay{opacity:0;-webkit-transition:opacity .3s ease-out;-moz-transition:opacity .3s ease-out;-ms-transition:opacity .3s ease-out;-o-transition:opacity .3s ease-out;transition:opacity .3s ease-out;filter:alpha(opacity=0)}.no-touch .product-list-titles-overlay #productList .product .product-mark{opacity:1;-webkit-transition:opacity .3s ease-out;-moz-transition:opacity .3s ease-out;-ms-transition:opacity .3s ease-out;-o-transition:opacity .3s ease-out;transition:opacity .3s ease-out;filter:alpha(opacity=100)}.no-touch .product-list-titles-overlay #productList .product .product-meta{opacity:0;-webkit-transition:opacity .35s cubic-bezier(0,0,1,1);-moz-transition:opacity .35s cubic-bezier(0,0,1,1);-ms-transition:opacity .35s cubic-bezier(0,0,1,1);-o-transition:opacity .35s cubic-bezier(0,0,1,1);transition:opacity .35s cubic-bezier(0,0,1,1);filter:alpha(opacity=0)}.no-touch .product-list-titles-overlay #productList .product .product-title{margin-top:5px;-webkit-transition:margin .3s cubic-bezier(0,0,.28,1);-moz-transition:margin .3s cubic-bezier(0,0,.28,1);-ms-transition:margin .3s cubic-bezier(0,0,.28,1);-o-transition:margin .3s cubic-bezier(0,0,.28,1);transition:margin .3s cubic-bezier(0,0,.28,1)}.no-touch .product-list-titles-overlay #productList .product .product-title,.no-touch .product-list-titles-overlay #productList .product .product-price{text-align:center}.no-touch .product-list-titles-overlay #productList .product:hover .product-overlay{opacity:1;filter:alpha(opacity=100)}.no-touch .product-list-titles-overlay #productList .product:hover .product-mark{opacity:0;filter:alpha(opacity=0)}.no-touch .product-list-titles-overlay #productList .product:hover .product-meta{opacity:1;filter:alpha(opacity=100)}.no-touch .product-list-titles-overlay #productList .product:hover .product-title{margin-top:0}}.product-list-titles-under .product-meta{margin-top:0 !important}.show-product-price #productList .product .product-price{display:block}.sqs-style-mode .product-overlay{opacity:1 !important}.sqs-style-mode .product-mark{opacity:0 !important}.sqs-style-mode .product-meta{opacity:1 !important}#productNav{text-transform:uppercase;margin-bottom:30px;display:none}.product-title.mobile{display:none}#productDetails{position:relative;float:right;width:48.5%}#productDetails .product-title{margin:0 0 .5em}#productDetails .product-mark{float:right;background:#222;padding:6px 8px;color:#fff;line-height:1em;text-transform:uppercase;-webkit-font-smoothing:subpixel-antialiased;font-size:12px}#productDetails .product-price{margin:1em 0;font-size:16px;line-height:1.5em}#productDetails .product-price input{width:130px;height:30px;padding-left:5px}#productDetails .product-price .minimum-price{margin-top:3px;margin-left:10px}#productDetails .product-price .original-price{text-decoration:line-through;opacity:.7;filter:alpha(opacity=70)}#productDetails .product-price .strikeout{text-decoration:line-through}#productDetails .product-variants .variant-option{margin:1.2em 0}#productDetails .product-variants .variant-out-of-stock{color:#c00}#productDetails .product-quantity-select{margin-top:1.2em 0}#productDetails input{padding:5px 10px;border:1px solid #ccc;-moz-border-radius:3px;border-radius:3px}.product-sharing{display:none}.product-social-sharing .product-sharing{display:block}#productGallery{width:48.5%;float:left}#productGallery .intrinsic{max-width:100%}#productGallery .wrapper{padding-bottom:100%;position:relative}#productGallery #productSlideshow{position:absolute;top:0;bottom:0;left:0;width:100%;background-color:rgba(0,0,0,0)}#productGallery #productSlideshow .slide{height:100%;width:100%;overflow:hidden;cursor:pointer}#productGallery #productThumbnails{margin-left:-5px;visibility:hidden;overflow:hidden}#productGallery #productThumbnails .slide{width:50px;height:50px;margin:5px 0 0 5px;font-size:0;cursor:pointer;float:left;background-color:rgba(0,0,0,0)}.product-gallery-size-11-square #productGallery .intrinsic .wrapper{padding-bottom:100%}.product-gallery-size-32-standard #productGallery .intrinsic .wrapper{padding-bottom:66.666%}.product-gallery-size-23-standard-vertical #productGallery .intrinsic .wrapper{padding-bottom:150%}.product-gallery-size-43-four-thirds #productGallery .intrinsic .wrapper{padding-bottom:75%}.product-gallery-size-169-widescreen #productGallery .intrinsic .wrapper{padding-bottom:56.25%}.product-description{clear:both;margin-top:24px}.show-product-item-nav #productWrapper #productNav{display:block}.sqs-add-to-cart-button-wrapper{visibility:hidden}.sqs-add-to-cart-button{display:inline-block;width:auto;height:auto;padding:1em 2.5em;color:#fff;background-color:#272727;border-width:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:12px;line-height:1em;font-weight:normal;font-style:normal;text-transform:uppercase;letter-spacing:0px;text-align:center;text-decoration:none;cursor:pointer;outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;font-size:13px}.sqs-add-to-cart-button-inner{position:relative}.sqs-add-to-cart-button.cart-adding .sqs-spin{position:absolute;top:50%;margin-top:-12px}.sqs-add-to-cart-button.cart-adding .status-text{display:inline-block;margin-left:35px}.sqs-add-to-cart-button.cart-added .status-text{margin-left:0}.collection-type-products .sqs-add-to-cart-button{margin:20px 0;padding:1.5em 4em !important}.sqs-donate-button{display:inline-block;width:auto;height:auto;padding:1em 2.5em;color:#fff;background-color:#272727;border-width:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:12px;line-height:1em;font-weight:normal;font-style:normal;text-transform:uppercase;letter-spacing:0px;text-align:center;text-decoration:none;cursor:pointer;outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none}@media only screen and (max-width:700px){#productSummary .product-title{display:none}#productSummary .product-title.mobile{display:block}.product-meta{margin-top:0 !important}#productDetails,#productGallery{width:100%;float:none}#productList{width:100%;margin-left:0;margin-top:0}#productList .product{float:left;margin-left:0;margin-top:0;width:100%;cursor:pointer;margin-bottom:3%}#productList .product .product-image{margin-bottom:3%}#productList .product .product-image .content-fit{position:absolute;top:0;left:0;bottom:0;right:0}#productList .product .product-image img{-webkit-transition:opacity .3s ease-out}.product-quick-view{display:none}}.collection-type-gallery:not(.gallery-design-grid) .arrow.previous-slide:before{font-family:'squarespace-ui-font';font-style:normal;speak:none;font-weight:normal;-webkit-font-smoothing:antialiased;content:"\e000";text-align:center;display:inline-block;vertical-align:middle}.collection-type-gallery:not(.gallery-design-grid) .arrow.previous-slide:before{font-size:16px;width:16px;height:16px;line-height:16px}.collection-type-gallery:not(.gallery-design-grid) .arrow.previous-slide:before{font-size:16px;width:40px;height:40px;line-height:40px}.collection-type-gallery:not(.gallery-design-grid) .arrow.next-slide:before{font-family:'squarespace-ui-font';font-style:normal;speak:none;font-weight:normal;-webkit-font-smoothing:antialiased;content:"\e003";text-align:center;display:inline-block;vertical-align:middle}.collection-type-gallery:not(.gallery-design-grid) .arrow.next-slide:before{font-size:16px;width:16px;height:16px;line-height:16px}.collection-type-gallery:not(.gallery-design-grid) .arrow.next-slide:before{font-size:16px;width:40px;height:40px;line-height:40px}.collection-type-gallery.gallery-design-grid .dots,.collection-type-gallery.gallery-design-grid .thumbnail-wrapper,.collection-type-gallery.gallery-design-grid .circles,.collection-type-gallery.gallery-design-grid .numbers,.collection-type-gallery.gallery-design-grid .simple{display:none}.collection-type-gallery.gallery-design-grid .slide{cursor:pointer}.collection-type-gallery.gallery-design-grid .slide .slide-meta{display:none}.collection-type-gallery.gallery-design-grid .slide>a{display:block;height:100%}.collection-type-gallery.gallery-design-grid.lightbox-style-light .yui3-lightbox2 .sqs-lightbox-overlay{background:#fff}.collection-type-gallery.gallery-design-grid.lightbox-style-light .yui3-lightbox2 .sqs-lightbox-close,.collection-type-gallery.gallery-design-grid.lightbox-style-light .yui3-lightbox2 .sqs-lightbox-previous,.collection-type-gallery.gallery-design-grid.lightbox-style-light .yui3-lightbox2 .sqs-lightbox-next,.collection-type-gallery.gallery-design-grid.lightbox-style-light .yui3-lightbox2 .sqs-lightbox-meta-trigger{color:#111}.collection-type-gallery:not(.gallery-design-grid) .sqs-system-gallery{cursor:pointer;opacity:0;zoom:1;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";-webkit-transition:opacity .2s ease-out;-moz-transition:opacity .2s ease-out;-ms-transition:opacity .2s ease-out;-o-transition:opacity .2s ease-out;transition:opacity .2s ease-out}.collection-type-gallery:not(.gallery-design-grid) .sqs-system-gallery .arrow,.collection-type-gallery:not(.gallery-design-grid) .sqs-system-gallery .icons span{-moz-user-select:-moz-none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.collection-type-gallery:not(.gallery-design-grid) .sqs-system-gallery .gallery-wrapper{position:relative;width:100%}.collection-type-gallery:not(.gallery-design-grid) .sqs-system-gallery .gallery-wrapper .slides{display:block;width:100%;height:100% !important;-webkit-transition:opacity .2s ease-out;-moz-transition:opacity .2s ease-out;-ms-transition:opacity .2s ease-out;-o-transition:opacity .2s ease-out;transition:opacity .2s ease-out}.collection-type-gallery:not(.gallery-design-grid) .sqs-system-gallery .gallery-wrapper .slides .slide{opacity:0;zoom:1;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";height:100% !important}.collection-type-gallery:not(.gallery-design-grid) .sqs-system-gallery .gallery-wrapper .slides .slide>a{display:block;height:100%}.collection-type-gallery:not(.gallery-design-grid) .sqs-system-gallery .slides-controls{position:relative;z-index:991;overflow:hidden}.collection-type-gallery:not(.gallery-design-grid) .sqs-system-gallery .arrow{z-index:997;position:absolute;width:100%;height:40px;margin-top:-20px;text-align:center;line-height:40px;font-weight:bold;color:#fff;background:#222;-webkit-transition:opacity .1s ease-in;-moz-transition:opacity .1s ease-in;-ms-transition:opacity .1s ease-in;-o-transition:opacity .1s ease-in;transition:opacity .1s ease-in}.collection-type-gallery:not(.gallery-design-grid) .sqs-system-gallery .arrow.previous-slide{left:0;margin-left:2%;width:40px;height:40px}.collection-type-gallery:not(.gallery-design-grid) .sqs-system-gallery .arrow.next-slide{right:0;margin-right:2%;float:right;width:40px;height:40px}.collection-type-gallery:not(.gallery-design-grid) .sqs-system-gallery .arrow.sqs-disabled{opacity:0}.collection-type-gallery:not(.gallery-design-grid) .sqs-system-gallery .dots,.collection-type-gallery:not(.gallery-design-grid) .sqs-system-gallery .thumbnail-wrapper,.collection-type-gallery:not(.gallery-design-grid) .sqs-system-gallery .circles,.collection-type-gallery:not(.gallery-design-grid) .sqs-system-gallery .numbers,.collection-type-gallery:not(.gallery-design-grid) .sqs-system-gallery .simple{display:none;margin:20px 0}.collection-type-gallery:not(.gallery-design-grid) .sqs-system-gallery .dots.sqs-gallery-controls-disabled,.collection-type-gallery:not(.gallery-design-grid) .sqs-system-gallery .thumbnail-wrapper.sqs-gallery-controls-disabled,.collection-type-gallery:not(.gallery-design-grid) .sqs-system-gallery .circles.sqs-gallery-controls-disabled,.collection-type-gallery:not(.gallery-design-grid) .sqs-system-gallery .numbers.sqs-gallery-controls-disabled,.collection-type-gallery:not(.gallery-design-grid) .sqs-system-gallery .simple.sqs-gallery-controls-disabled{display:none}.collection-type-gallery:not(.gallery-design-grid) .sqs-system-gallery .dots{text-align:center}.collection-type-gallery:not(.gallery-design-grid) .sqs-system-gallery .dots .dot{font-size:30px;margin:0 5px}.collection-type-gallery:not(.gallery-design-grid) .sqs-system-gallery .dots .dot:after{content:"·"}.collection-type-gallery:not(.gallery-design-grid) .sqs-system-gallery .numbers{text-align:center}.collection-type-gallery:not(.gallery-design-grid) .sqs-system-gallery .numbers .number{font-size:12px;margin:0 .5em}.collection-type-gallery:not(.gallery-design-grid) .sqs-system-gallery .circles{font-size:0;position:absolute;bottom:0;text-align:center;z-index:999;width:100%;height:16px;margin:40px 0}.collection-type-gallery:not(.gallery-design-grid) .sqs-system-gallery .circles .circle{display:inline-block;width:10px;height:10px;border:2px solid #fff;margin:0 5px;border-radius:100%;-webkit-border-radius:999px}.collection-type-gallery:not(.gallery-design-grid) .sqs-system-gallery .circles .circle.sqs-active-slide{background:#fff}.collection-type-gallery:not(.gallery-design-grid) .sqs-system-gallery .simple{text-align:center;font-size:12px}.collection-type-gallery:not(.gallery-design-grid) .sqs-system-gallery .simple .previous.sqs-disabled,.collection-type-gallery:not(.gallery-design-grid) .sqs-system-gallery .simple .next.sqs-disabled{opacity:.5}.collection-type-gallery:not(.gallery-design-grid) .sqs-system-gallery .simple .current-index{letter-spacing:2px}.collection-type-gallery:not(.gallery-design-grid) .sqs-system-gallery .simple .current-index:after{content:" / "}.collection-type-gallery:not(.gallery-design-grid) .sqs-system-gallery .simple .previous{float:left}.collection-type-gallery:not(.gallery-design-grid) .sqs-system-gallery .simple .previous:after{content:"Previous"}.collection-type-gallery:not(.gallery-design-grid) .sqs-system-gallery .simple .next{float:right}.collection-type-gallery:not(.gallery-design-grid) .sqs-system-gallery .simple .next:after{content:"Next"}.collection-type-gallery:not(.gallery-design-grid) .sqs-system-gallery .dots .dot,.collection-type-gallery:not(.gallery-design-grid) .sqs-system-gallery .numbers .number,.collection-type-gallery:not(.gallery-design-grid) .sqs-system-gallery .thumbnail-wrapper .thumbnail{opacity:.5}.collection-type-gallery:not(.gallery-design-grid) .sqs-system-gallery .dots .dot.sqs-active-slide,.collection-type-gallery:not(.gallery-design-grid) .sqs-system-gallery .numbers .number.sqs-active-slide,.collection-type-gallery:not(.gallery-design-grid) .sqs-system-gallery .thumbnail-wrapper .thumbnail.sqs-active-slide{opacity:1}.collection-type-gallery:not(.gallery-design-grid) .sqs-system-gallery .thumbnail-wrapper .thumbnail{width:100px !important}.collection-type-gallery:not(.gallery-design-grid) .sqs-system-gallery .slide-meta{display:none;position:absolute;width:100%;bottom:0;z-index:996;height:auto;background:rgba(0,0,0,.7);padding:24px 0}.collection-type-gallery:not(.gallery-design-grid) .sqs-system-gallery .slide-meta .title{margin:0;font-size:14px;color:#fff;padding:0 2%}.collection-type-gallery:not(.gallery-design-grid) .sqs-system-gallery .slide-meta .description{margin-top:.5em;display:inline-block;padding:0 2%}.collection-type-gallery:not(.gallery-design-grid) .sqs-system-gallery .slide-meta .description p,.collection-type-gallery:not(.gallery-design-grid) .sqs-system-gallery .slide-meta .clickthrough a{font-size:13px;line-height:1.4em;color:#999}.collection-type-gallery:not(.gallery-design-grid) .sqs-system-gallery .slide-meta .description p,.collection-type-gallery:not(.gallery-design-grid) .sqs-system-gallery .slide-meta .clickthrough{margin:0}.collection-type-gallery:not(.gallery-design-grid) .sqs-system-gallery .slide-meta .description p a{color:#999;text-decoration:underline}.collection-type-gallery:not(.gallery-design-grid) .sqs-system-gallery .slide-meta .clickthrough{display:inline-block}.collection-type-gallery:not(.gallery-design-grid) .sqs-system-gallery .slide-meta .clickthrough a{border-bottom:1px solid}.collection-type-gallery:not(.gallery-design-grid) .sqs-system-gallery .slide-meta .clickthrough a:before{content:"Read more"}.collection-type-gallery:not(.gallery-design-grid) .sqs-system-gallery.sqs-system-gallery-init{position:relative}.collection-type-gallery:not(.gallery-design-grid) .sqs-system-gallery.sqs-system-gallery-init>*{display:none}.collection-type-gallery:not(.gallery-design-grid) .sqs-system-gallery.sqs-system-gallery-ready{opacity:.01;opacity:1;zoom:1;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=10)"}.collection-type-gallery:not(.gallery-design-grid) .sqs-system-gallery.sqs-system-gallery-interaction .arrow{opacity:0}.collection-type-gallery:not(.gallery-design-grid) .sqs-system-gallery.sqs-system-gallery-interaction.sqs-system-gallery-hover-slides-left .arrow.previous-slide:not(.sqs-disabled),.collection-type-gallery:not(.gallery-design-grid) .sqs-system-gallery.sqs-system-gallery-video-iframe .arrow.previous-slide:not(.sqs-disabled){opacity:1}.collection-type-gallery:not(.gallery-design-grid) .sqs-system-gallery.sqs-system-gallery-interaction.sqs-system-gallery-hover-slides-right .arrow.next-slide:not(.sqs-disabled),.collection-type-gallery:not(.gallery-design-grid) .sqs-system-gallery.sqs-system-gallery-video-iframe .arrow.next-slide:not(.sqs-disabled){opacity:1}.collection-type-gallery:not(.gallery-design-grid).dialog-open .arrow.previous-slide:not(.sqs-disabled){opacity:1}.collection-type-gallery:not(.gallery-design-grid).dialog-open .arrow.next-slide:not(.sqs-disabled){opacity:1}.collection-type-gallery:not(.gallery-design-grid).gallery-navigation-thumbnails .sqs-system-gallery .thumbnail-wrapper{display:block}.collection-type-gallery:not(.gallery-design-grid).gallery-navigation-bullets .sqs-system-gallery .dots{display:block}.collection-type-gallery:not(.gallery-design-grid).gallery-navigation-numbers .sqs-system-gallery .numbers{display:block}.collection-type-gallery:not(.gallery-design-grid).gallery-navigation-circles .sqs-system-gallery .slide-meta{bottom:auto;top:0}.collection-type-gallery:not(.gallery-design-grid).gallery-navigation-circles .sqs-system-gallery .circles{display:block}.collection-type-gallery:not(.gallery-design-grid).gallery-navigation-simple .sqs-system-gallery .simple{display:block}.collection-type-gallery:not(.gallery-design-grid).gallery-info-overlay-always-show .sqs-system-gallery .slide-meta.show{display:block}.collection-type-gallery:not(.gallery-design-grid).gallery-info-overlay-show-on-hover .slide:hover .slide-meta.show{display:block}.collection-type-gallery:not(.gallery-design-grid):not(.gallery-show-arrows) .sqs-system-gallery .arrow{opacity:0 !important}.collection-type-gallery:not(.gallery-design-grid).gallery-aspect-ratio-11-square .sqs-system-gallery.sqs-system-gallery-init{padding-bottom:100%}.collection-type-gallery:not(.gallery-design-grid).gallery-aspect-ratio-11-square .thumbnail-wrapper{height:100px}.collection-type-gallery:not(.gallery-design-grid).gallery-aspect-ratio-32-standard .sqs-system-gallery.sqs-system-gallery-init{padding-bottom:66.66%}.collection-type-gallery:not(.gallery-design-grid).gallery-aspect-ratio-32-standard .thumbnail-wrapper{height:66px}.collection-type-gallery:not(.gallery-design-grid).gallery-aspect-ratio-43-four-thirds .sqs-system-gallery.sqs-system-gallery-init{padding-bottom:75%}.collection-type-gallery:not(.gallery-design-grid).gallery-aspect-ratio-43-four-thirds .thumbnail-wrapper{height:75px}.collection-type-gallery:not(.gallery-design-grid).gallery-aspect-ratio-169-widescreen .sqs-system-gallery.sqs-system-gallery-init{padding-bottom:56.25%}.collection-type-gallery:not(.gallery-design-grid).gallery-aspect-ratio-169-widescreen .thumbnail-wrapper{height:56.25px}.collection-type-gallery:not(.gallery-design-grid).gallery-arrow-style-circular .sqs-system-gallery .arrow{border-radius:100%;-webkit-border-radius:999px}.collection-type-gallery:not(.gallery-design-grid).gallery-arrow-style-round-corners .sqs-system-gallery .arrow{border-radius:10%;-webkit-border-radius:4px}.collection-type-gallery:not(.gallery-design-grid).gallery-arrow-style-rectangular .sqs-system-gallery .arrow{border-radius:0;-webkit-border-radius:0}.collection-type-gallery:not(.gallery-design-grid).gallery-arrow-style-no-background .sqs-system-gallery .arrow{border-radius:0;background:none;-webkit-border-radius:0}@media screen and (max-width:480px){.collection-type-gallery .sqs-system-gallery .slide-meta{display:none !important}}.sqs-gallery-block-stacked{padding:0;margin:0}.sqs-gallery-block-stacked a{border:0}.sqs-gallery-block-stacked .image-wrapper{margin:0 0 1px 0;line-height:1px}.sqs-gallery-block-stacked .image-wrapper img{width:100%}.sqs-gallery-block-stacked .meta{display:none;max-width:28em}.sqs-gallery-block-stacked.sqs-gallery-block-show-meta .meta{display:block}.sqs-gallery-block-stacked .meta-inside{margin-bottom:28px;margin-top:14px}.sqs-gallery-block-stacked .meta-title{margin-bottom:.3em}.sqs-gallery-block-stacked .meta-description{font-size:.9em;line-height:1.5em}.sqs-gallery-block-stacked .meta-description p{margin-bottom:0;margin-top:0}.sqs-gallery-block-slideshow{position:relative;background-color:rgba(175,175,175,.1)}.sqs-gallery-block-slideshow .slide>a{position:absolute;top:0;left:0;width:100%;height:100%;display:block}.sqs-gallery-block-slideshow .slide .meta{opacity:0}.sqs-gallery-block-slideshow .meta{position:absolute;opacity:0;background-color:#111;background-color:rgba(0,0,0,.3)}.sqs-gallery-block-slideshow .meta .meta-title{color:#fff}.sqs-gallery-block-slideshow .meta .meta-title{font-size:18px;line-height:1.2em;letter-spacing:1px}.sqs-gallery-block-slideshow .meta .meta-title+.meta-description{margin-top:.3em}.sqs-gallery-block-slideshow .meta .meta-description,.sqs-gallery-block-slideshow .meta .meta-description p{color:#ddd;color:rgba(255,255,255,.95);font-size:14px;line-height:1.5em}.sqs-gallery-block-slideshow .meta .meta-description strong{color:inherit}.sqs-gallery-block-slideshow .meta .meta-description *:first-child{margin-top:0}.sqs-gallery-block-slideshow .meta .meta-description *:last-child{margin-bottom:0}.sqs-gallery-block-slideshow .meta-inside{padding:25px}.sqs-gallery-block-slideshow .meta a,.sqs-gallery-block-slideshow .meta a:hover{color:#fff;text-decoration:underline}.sqs-gallery-block-slideshow .meta.overflow{overflow-y:auto}.sqs-gallery-block-slideshow .slide.loaded .meta{opacity:1}.sqs-gallery-block-slideshow.sqs-gallery-block-meta-hover .meta{opacity:0 !important;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"}.sqs-gallery-block-slideshow.sqs-gallery-block-meta-hover .slide:hover .meta{opacity:1 !important;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=70)"}.sqs-gallery-block-slideshow .meta{display:none;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"}.sqs-gallery-block-slideshow.sqs-gallery-block-show-meta .sqs-active-slide .meta{display:block;opacity:1;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=70)"}.sqs-gallery-block-slideshow.sqs-gallery-block-show-meta .mobile-view .slide.loaded>a{line-height:0;height:auto;position:static}.sqs-gallery-block-slideshow.sqs-gallery-block-show-meta .mobile-view .slide.loaded .sqs-video-wrapper{position:static}.sqs-gallery-block-slideshow.sqs-gallery-block-show-meta .mobile-view .slide.loaded .meta{background-color:transparent;color:inherit;padding:20px 0 10px 0;margin:0;max-width:none !important;opacity:1 !important;position:static !important}.sqs-gallery-block-slideshow.sqs-gallery-block-show-meta .mobile-view .slide.loaded .meta .meta-inside{padding:0}.sqs-gallery-block-slideshow.sqs-gallery-block-show-meta .mobile-view .slide.loaded .meta .meta-title,.sqs-gallery-block-slideshow.sqs-gallery-block-show-meta .mobile-view .slide.loaded .meta .meta-description,.sqs-gallery-block-slideshow.sqs-gallery-block-show-meta .mobile-view .slide.loaded .meta .meta-description p{color:inherit}.sqs-gallery-block-slideshow.sqs-gallery-block-show-meta .mobile-view .slide.loaded .meta .meta-title{font-size:.9em}.sqs-gallery-block-slideshow.sqs-gallery-block-show-meta .mobile-view .slide.loaded .meta .meta-description{font-size:.9em}.sqs-gallery-block-slideshow.sqs-gallery-block-show-meta .mobile-view .slide.loaded .meta .meta-description p{font-size:1em;line-height:1.3em}.sqs-gallery-block-slideshow .slide.video-playing .meta{display:none}.sqs-gallery-block-slideshow.sqs-gallery-block-meta-position-top .meta,.sqs-gallery-block-slideshow.sqs-gallery-block-meta-position-top-left .meta,.sqs-gallery-block-slideshow.sqs-gallery-block-meta-position-top-right .meta{top:0px}.sqs-gallery-block-slideshow.sqs-gallery-block-meta-position-top-left .meta,.sqs-gallery-block-slideshow.sqs-gallery-block-meta-position-top-right .meta{max-width:50%;margin:20px}.sqs-gallery-block-slideshow.sqs-gallery-block-meta-position-center .meta{max-width:50%;top:50%;left:50%;text-align:center}.sqs-gallery-block-slideshow.sqs-gallery-block-meta-position-bottom .meta,.sqs-gallery-block-slideshow.sqs-gallery-block-meta-position-bottom-left .meta,.sqs-gallery-block-slideshow.sqs-gallery-block-meta-position-bottom-right .meta{bottom:0px}.sqs-gallery-block-slideshow.sqs-gallery-block-meta-position-bottom .meta{background:-moz-linear-gradient(top,rgba(0,0,0,0) 0%,rgba(30,30,30,.3) 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0%,rgba(0,0,0,0)),color-stop(100%,rgba(30,30,30,.3)));background:-webkit-linear-gradient(top,rgba(0,0,0,0) 0%,rgba(30,30,30,.3) 100%);background:-o-linear-gradient(top,rgba(0,0,0,0) 0%,rgba(30,30,30,.3) 100%);background:-ms-linear-gradient(top,rgba(0,0,0,0) 0%,rgba(30,30,30,.3) 100%);background:linear-gradient(to bottom,rgba(0,0,0,0) 0%,rgba(30,30,30,.3) 100%)}.sqs-gallery-block-slideshow.sqs-gallery-block-meta-position-bottom .meta-inside{padding:30px 20px 15px}.sqs-gallery-block-slideshow.sqs-gallery-block-meta-position-bottom-left .meta,.sqs-gallery-block-slideshow.sqs-gallery-block-meta-position-bottom-right .meta{max-width:50%;margin:20px}.sqs-gallery-block-slider{position:relative;height:100%}.sqs-gallery-block-grid.sqs-gallery-thumbnails-per-row-1 .sqs-gallery-design-grid-slide{width:100%}.sqs-gallery-block-grid.sqs-gallery-thumbnails-per-row-2 .sqs-gallery-design-grid-slide{width:50%}.sqs-gallery-block-grid.sqs-gallery-thumbnails-per-row-3 .sqs-gallery-design-grid-slide{width:33.333333333333336%}.sqs-gallery-block-grid.sqs-gallery-thumbnails-per-row-4 .sqs-gallery-design-grid-slide{width:25%}.sqs-gallery-block-grid.sqs-gallery-thumbnails-per-row-5 .sqs-gallery-design-grid-slide{width:20%}.sqs-gallery-block-grid.sqs-gallery-thumbnails-per-row-6 .sqs-gallery-design-grid-slide{width:16.666666666666668%}.sqs-gallery-block-grid.sqs-gallery-thumbnails-per-row-7 .sqs-gallery-design-grid-slide{width:14.285714285714286%}.sqs-gallery-block-grid.sqs-gallery-thumbnails-per-row-8 .sqs-gallery-design-grid-slide{width:12.5%}.sqs-gallery-block-grid.sqs-gallery-thumbnails-per-row-9 .sqs-gallery-design-grid-slide{width:11.11111111111111%}.sqs-gallery-block-grid.sqs-gallery-thumbnails-per-row-10 .sqs-gallery-design-grid-slide{width:10%}.sqs-gallery-block-grid.sqs-gallery-aspect-ratio-square .slide .margin-wrapper a.image-slide-anchor,.sqs-gallery-block-grid.sqs-gallery-aspect-ratio-square .slide .margin-wrapper .content-wrapper,.sqs-gallery-block-grid.sqs-gallery-aspect-ratio-square .slide .margin-wrapper .content-wrapper.content-fill .sqs-video-wrapper{padding-bottom:100%}.sqs-gallery-block-grid.sqs-gallery-aspect-ratio-standard .slide .margin-wrapper a.image-slide-anchor,.sqs-gallery-block-grid.sqs-gallery-aspect-ratio-standard .slide .margin-wrapper .content-wrapper,.sqs-gallery-block-grid.sqs-gallery-aspect-ratio-standard .slide .margin-wrapper .content-wrapper.content-fill .sqs-video-wrapper{padding-bottom:66.666%}.sqs-gallery-block-grid.sqs-gallery-aspect-ratio-standard-vertical .slide .margin-wrapper a.image-slide-anchor,.sqs-gallery-block-grid.sqs-gallery-aspect-ratio-standard-vertical .slide .margin-wrapper .content-wrapper,.sqs-gallery-block-grid.sqs-gallery-aspect-ratio-standard-vertical .slide .margin-wrapper .content-wrapper.content-fill .sqs-video-wrapper{padding-bottom:150%}.sqs-gallery-block-grid.sqs-gallery-aspect-ratio-four-three .slide .margin-wrapper a.image-slide-anchor,.sqs-gallery-block-grid.sqs-gallery-aspect-ratio-four-three .slide .margin-wrapper .content-wrapper,.sqs-gallery-block-grid.sqs-gallery-aspect-ratio-four-three .slide .margin-wrapper .content-wrapper.content-fill .sqs-video-wrapper{padding-bottom:75%}.sqs-gallery-block-grid.sqs-gallery-aspect-ratio-three-four-vertical .slide .margin-wrapper a.image-slide-anchor,.sqs-gallery-block-grid.sqs-gallery-aspect-ratio-three-four-vertical .slide .margin-wrapper .content-wrapper,.sqs-gallery-block-grid.sqs-gallery-aspect-ratio-three-four-vertical .slide .margin-wrapper .content-wrapper.content-fill .sqs-video-wrapper{padding-bottom:133.333%}.sqs-gallery-block-grid.sqs-gallery-aspect-ratio-widescreen .slide .margin-wrapper a.image-slide-anchor,.sqs-gallery-block-grid.sqs-gallery-aspect-ratio-widescreen .slide .margin-wrapper .content-wrapper,.sqs-gallery-block-grid.sqs-gallery-aspect-ratio-widescreen .slide .margin-wrapper .content-wrapper.content-fill .sqs-video-wrapper{padding-bottom:56.25%}.sqs-gallery-block-grid.sqs-gallery-aspect-ratio-anamorphic-widescreen .slide .margin-wrapper a.image-slide-anchor,.sqs-gallery-block-grid.sqs-gallery-aspect-ratio-anamorphic-widescreen .slide .margin-wrapper .content-wrapper,.sqs-gallery-block-grid.sqs-gallery-aspect-ratio-anamorphic-widescreen .slide .margin-wrapper .content-wrapper.content-fill .sqs-video-wrapper{padding-bottom:41.666%}.sqs-gallery-block-grid .slide{float:left;width:25%}.sqs-gallery-block-grid .slide .margin-wrapper{position:relative}.sqs-gallery-block-grid .slide .margin-wrapper a.image-slide-anchor{padding-bottom:100%;width:100%;height:0;display:block}.sqs-gallery-block-grid .slide .margin-wrapper a.image-slide-anchor img{display:inline-block}.sqs-gallery-block-grid .slide .margin-wrapper .content-wrapper{padding-bottom:100%;width:100%;display:block}.sqs-gallery-block-grid .slide .margin-wrapper .content-wrapper.content-fill .sqs-video-wrapper{height:0;padding-bottom:100%}.sqs-gallery-block-grid .slide .margin-wrapper .image-slide-title{text-align:center;display:none}.sqs-gallery-block-grid .slide .meta{position:relative}.sqs-gallery-block-grid .slide .meta h1{font-size:12px;letter-spacing:normal;margin:0}.sqs-block .sqs-gallery-thumbnails .sqs-video-thumbnail{position:relative}.sqs-block .sqs-gallery-thumbnails .sqs-video-thumbnail img{height:100%}.sqs-block .sqs-gallery-thumbnails .sqs-video-thumbnail .sqs-video-thumbnail-icon{opacity:1;position:absolute;top:50%;left:50%;background-image:url('//static.squarespace.com/universal/images-v6/icons/icon-video-24-light-solid.png');background-position:center center;height:24px;width:24px;margin-left:-12px;margin-top:-12px}.sqs-block .sqs-gallery-thumbnails .sqs-video-thumbnail.no-image .sqs-video-thumbnail-inner{background-image:url('//static.squarespace.com/universal/images-v6/icons/icon-video-24-light-solid.png');background-position:center center;background-repeat:no-repeat}.sqs-block .sqs-gallery-thumbnails .sqs-video-thumbnail:not(.no-image).loading .sqs-video-thumbnail-icon{opacity:0}.sqs-block .sqs-gallery-thumbnails .sqs-video-thumbnail .sqs-video-thumbnail-inner{height:100%;background:#000}.sqs-block .sqs-gallery-thumbnails .sqs-gallery-design-strip-slide{opacity:.5}.sqs-block .sqs-gallery-thumbnails .sqs-gallery-design-strip-slide.sqs-active-slide{opacity:1}@media only screen and (max-width:480px){.sqs-gallery-block-slideshow .meta{display:none !important}}@media only screen and (device-width:768px){.sqs-gallery-block-slideshow.sqs-gallery-block-show-meta .meta{opacity:1 !important}}.sqs-block.gallery-block .sqs-helper .sqs-handle-bottom{display:none}.sqs-block.gallery-block.sized .sqs-helper .sqs-handle-bottom{display:block}.sqs-layout.editing .sqs-block.gallery-block:hover .sqs-gallery-block-slideshow.sqs-gallery-block-meta-hover .meta{opacity:1 !important}.summary-block ul{list-style-type:none;margin:0;padding:0}.summary-block .summary-item:not(:last-child){margin-bottom:24px}.summary-block .summary-collection-title{display:none}.summary-block .summary-thumbnail{overflow:hidden;height:150px}.summary-block .summary-title{font-size:1.2em}.summary-block .summary-content-below-thumbnail .summary-title{margin:1em 0 0 0}.summary-block .summary-excerpt{margin:.75em 0}.summary-block .summary-excerpt p{font-size:.9em}.summary-block .timestamp{display:block;font-size:.8em;text-transform:uppercase}.summary-block .summary-more-link{display:none;margin-left:3px}.sqs-block-collectionlink .collectionlink-thumbnail,.link-block .collectionlink-thumbnail{overflow:hidden;height:150px}.sqs-block-collectionlink .collectionlink-thumbnail a,.link-block .collectionlink-thumbnail a{display:block;height:100%}.sqs-block-collectionlink .collectionlink-title,.link-block .collectionlink-title{font-size:1.2em}.sqs-block-collectionlink .collectionlink-title a,.link-block .collectionlink-title a{display:block}.sqs-block-collectionlink .collectionlink-content-below-thumbnail .collectionlink-title,.link-block .collectionlink-content-below-thumbnail .collectionlink-title{margin:1em 0 0 0}.sqs-block-collectionlink .collectionlink-description,.link-block .collectionlink-description{margin:.75em 0}.sqs-block-collectionlink .collectionlink-description p,.link-block .collectionlink-description p{font-size:.9em}.sqs-block-collectionlink .collection-more-link,.link-block .collection-more-link{display:none;margin-left:3px}.sqs-svg-icon--wrapper{position:relative;cursor:pointer;overflow:hidden;display:inline-block;width:32px;height:32px;text-decoration:none;-webkit-transform:translatez(0);-moz-transform:translatez(0);-ms-transform:translatez(0);-o-transform:translatez(0);transform:translatez(0)}.sqs-svg-icon--wrapper>div{position:absolute;top:0;left:0;width:100%;height:100%}.sqs-svg-icon--wrapper svg{position:absolute;top:0;left:0;width:100%;height:100%}.sqs-svg-icon--wrapper{border-color:transparent}.social-icons-size-extra-small.social-icons-style-regular .sqs-svg-icon--wrapper{width:16px;height:16px;margin:0 5px}.social-icons-size-small.social-icons-style-regular .sqs-svg-icon--wrapper{width:20px;height:20px;margin:0 6px}.social-icons-size-medium.social-icons-style-regular .sqs-svg-icon--wrapper{width:24px;height:24px;margin:0 7px}.social-icons-size-large.social-icons-style-regular .sqs-svg-icon--wrapper{width:28px;height:28px;margin:0 8px}.social-icons-size-extra-large.social-icons-style-regular .sqs-svg-icon--wrapper{width:32px;height:32px;margin:0 9px}.social-icons-size-extra-small.social-icons-style-border .sqs-svg-icon--wrapper,.social-icons-size-extra-small.social-icons-style-knockout .sqs-svg-icon--wrapper,.social-icons-size-extra-small.social-icons-style-solid .sqs-svg-icon--wrapper{width:24px;height:24px;margin:0 3px}.social-icons-size-small.social-icons-style-border .sqs-svg-icon--wrapper,.social-icons-size-small.social-icons-style-knockout .sqs-svg-icon--wrapper,.social-icons-size-small.social-icons-style-solid .sqs-svg-icon--wrapper{width:28px;height:28px;margin:0 4px}.social-icons-size-medium.social-icons-style-border .sqs-svg-icon--wrapper,.social-icons-size-medium.social-icons-style-knockout .sqs-svg-icon--wrapper,.social-icons-size-medium.social-icons-style-solid .sqs-svg-icon--wrapper{width:32px;height:32px;margin:0 4px}.social-icons-size-large.social-icons-style-border .sqs-svg-icon--wrapper,.social-icons-size-large.social-icons-style-knockout .sqs-svg-icon--wrapper,.social-icons-size-large.social-icons-style-solid .sqs-svg-icon--wrapper{width:36px;height:36px;margin:0 5px}.social-icons-size-extra-large.social-icons-style-border .sqs-svg-icon--wrapper,.social-icons-size-extra-large.social-icons-style-knockout .sqs-svg-icon--wrapper,.social-icons-size-extra-large.social-icons-style-solid .sqs-svg-icon--wrapper{width:48px;height:48px;margin:0 6px}.social-icons-shape-square .sqs-svg-icon--wrapper{border-radius:0}.social-icons-style-border.social-icons-shape-circle .sqs-svg-icon--wrapper,.social-icons-style-solid.social-icons-shape-circle .sqs-svg-icon--wrapper,.social-icons-style-knockout.social-icons-shape-circle .sqs-svg-icon--wrapper{border-radius:50%}.social-icons-style-border.social-icons-shape-rounded .sqs-svg-icon--wrapper,.social-icons-style-solid.social-icons-shape-rounded .sqs-svg-icon--wrapper,.social-icons-style-knockout.social-icons-shape-rounded .sqs-svg-icon--wrapper{border-radius:15%}.social-icons-style-border .sqs-svg-icon--wrapper{border:2px solid;box-sizing:border-box}.social-icons-style-regular .sqs-svg-icon--wrapper>div{-webkit-transform:scale(2);-moz-transform:scale(2);-ms-transform:scale(2);-o-transform:scale(2);transform:scale(2)}.sqs-svg-icon--wrapper:first-of-type{margin-left:0 !important}.sqs-svg-icon--wrapper:last-of-type{margin-right:0 !important}.social-icons-color-standard.social-icons-style-regular .fivehundredpix .sqs-use--icon{fill:#00aeef}.social-icons-color-standard.social-icons-style-regular .fivehundredpix .sqs-use--background,.social-icons-color-standard.social-icons-style-regular .fivehundredpix .sqs-use--mask{fill:transparent}.social-icons-color-standard.social-icons-style-regular .sqs-svg-icon--list:hover .fivehundredpix .sqs-use--icon,.social-icons-color-standard.social-icons-style-regular.sqs-svg-icon--list:hover .fivehundredpix .sqs-use--icon{fill:rgba(0,174,239,.4)}.social-icons-color-standard.social-icons-style-regular .sqs-svg-icon--list:hover .fivehundredpix:hover .sqs-use--icon,.social-icons-color-standard.social-icons-style-regular.sqs-svg-icon--list:hover .fivehundredpix:hover .sqs-use--icon{fill:#00aeef}.social-icons-color-standard.social-icons-style-border .fivehundredpix{border-color:#00aeef}.social-icons-color-standard.social-icons-style-border .fivehundredpix .sqs-use--background{fill:transparent}.social-icons-color-standard.social-icons-style-border .fivehundredpix .sqs-use--icon{fill:#00aeef}.social-icons-color-standard.social-icons-style-border .fivehundredpix .sqs-use--mask{fill:transparent}.social-icons-color-standard.social-icons-style-border .fivehundredpix:hover{background-color:#00aeef}.social-icons-color-standard.social-icons-style-border .fivehundredpix:hover .sqs-use--icon{fill:#fff}.social-icons-color-standard.social-icons-style-knockout .fivehundredpix .sqs-use--background{fill:transparent}.social-icons-color-standard.social-icons-style-knockout .fivehundredpix .sqs-use--icon{fill:transparent}.social-icons-color-standard.social-icons-style-knockout .fivehundredpix .sqs-use--mask{fill:#00aeef}.social-icons-color-standard.social-icons-style-knockout .sqs-svg-icon--list:hover .fivehundredpix .sqs-use--mask,.social-icons-color-standard.social-icons-style-knockout.sqs-svg-icon--list:hover .fivehundredpix .sqs-use--mask{fill:rgba(0,174,239,.4)}.social-icons-color-standard.social-icons-style-knockout .sqs-svg-icon--list:hover .fivehundredpix:hover .sqs-use--mask,.social-icons-color-standard.social-icons-style-knockout.sqs-svg-icon--list:hover .fivehundredpix:hover .sqs-use--mask{fill:#00aeef}.social-icons-color-standard.social-icons-style-solid .fivehundredpix .sqs-use--mask{fill:#00aeef}.social-icons-color-standard.social-icons-style-solid .fivehundredpix .sqs-use--icon{fill:transparent}.social-icons-color-standard.social-icons-style-solid .fivehundredpix .sqs-use--background{fill:#fff}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .fivehundredpix .sqs-use--mask,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .fivehundredpix .sqs-use--mask{fill:rgba(0,174,239,.4)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .fivehundredpix .sqs-use--icon,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .fivehundredpix .sqs-use--icon{fill:rgba(255,255,255,.4)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .fivehundredpix .sqs-use--background,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .fivehundredpix .sqs-use--background{fill:rgba(255,255,255,0)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .fivehundredpix:hover .sqs-use--mask,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .fivehundredpix:hover .sqs-use--mask{fill:#00aeef}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .fivehundredpix:hover .sqs-use--icon,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .fivehundredpix:hover .sqs-use--icon{fill:rgba(255,255,255,0)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .fivehundredpix:hover .sqs-use--background,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .fivehundredpix:hover .sqs-use--background{fill:#fff}.social-icons-color-standard.social-icons-style-regular .bandsintown .sqs-use--icon{fill:#00b4b3}.social-icons-color-standard.social-icons-style-regular .bandsintown .sqs-use--background,.social-icons-color-standard.social-icons-style-regular .bandsintown .sqs-use--mask{fill:transparent}.social-icons-color-standard.social-icons-style-regular .sqs-svg-icon--list:hover .bandsintown .sqs-use--icon,.social-icons-color-standard.social-icons-style-regular.sqs-svg-icon--list:hover .bandsintown .sqs-use--icon{fill:rgba(0,180,179,.4)}.social-icons-color-standard.social-icons-style-regular .sqs-svg-icon--list:hover .bandsintown:hover .sqs-use--icon,.social-icons-color-standard.social-icons-style-regular.sqs-svg-icon--list:hover .bandsintown:hover .sqs-use--icon{fill:#00b4b3}.social-icons-color-standard.social-icons-style-border .bandsintown{border-color:#00b4b3}.social-icons-color-standard.social-icons-style-border .bandsintown .sqs-use--background{fill:transparent}.social-icons-color-standard.social-icons-style-border .bandsintown .sqs-use--icon{fill:#00b4b3}.social-icons-color-standard.social-icons-style-border .bandsintown .sqs-use--mask{fill:transparent}.social-icons-color-standard.social-icons-style-border .bandsintown:hover{background-color:#00b4b3}.social-icons-color-standard.social-icons-style-border .bandsintown:hover .sqs-use--icon{fill:#fff}.social-icons-color-standard.social-icons-style-knockout .bandsintown .sqs-use--background{fill:transparent}.social-icons-color-standard.social-icons-style-knockout .bandsintown .sqs-use--icon{fill:transparent}.social-icons-color-standard.social-icons-style-knockout .bandsintown .sqs-use--mask{fill:#00b4b3}.social-icons-color-standard.social-icons-style-knockout .sqs-svg-icon--list:hover .bandsintown .sqs-use--mask,.social-icons-color-standard.social-icons-style-knockout.sqs-svg-icon--list:hover .bandsintown .sqs-use--mask{fill:rgba(0,180,179,.4)}.social-icons-color-standard.social-icons-style-knockout .sqs-svg-icon--list:hover .bandsintown:hover .sqs-use--mask,.social-icons-color-standard.social-icons-style-knockout.sqs-svg-icon--list:hover .bandsintown:hover .sqs-use--mask{fill:#00b4b3}.social-icons-color-standard.social-icons-style-solid .bandsintown .sqs-use--mask{fill:#00b4b3}.social-icons-color-standard.social-icons-style-solid .bandsintown .sqs-use--icon{fill:transparent}.social-icons-color-standard.social-icons-style-solid .bandsintown .sqs-use--background{fill:#fff}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .bandsintown .sqs-use--mask,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .bandsintown .sqs-use--mask{fill:rgba(0,180,179,.4)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .bandsintown .sqs-use--icon,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .bandsintown .sqs-use--icon{fill:rgba(255,255,255,.4)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .bandsintown .sqs-use--background,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .bandsintown .sqs-use--background{fill:rgba(255,255,255,0)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .bandsintown:hover .sqs-use--mask,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .bandsintown:hover .sqs-use--mask{fill:#00b4b3}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .bandsintown:hover .sqs-use--icon,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .bandsintown:hover .sqs-use--icon{fill:rgba(255,255,255,0)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .bandsintown:hover .sqs-use--background,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .bandsintown:hover .sqs-use--background{fill:#fff}.social-icons-color-standard.social-icons-style-regular .behance .sqs-use--icon{fill:#1769ff}.social-icons-color-standard.social-icons-style-regular .behance .sqs-use--background,.social-icons-color-standard.social-icons-style-regular .behance .sqs-use--mask{fill:transparent}.social-icons-color-standard.social-icons-style-regular .sqs-svg-icon--list:hover .behance .sqs-use--icon,.social-icons-color-standard.social-icons-style-regular.sqs-svg-icon--list:hover .behance .sqs-use--icon{fill:rgba(23,105,255,.4)}.social-icons-color-standard.social-icons-style-regular .sqs-svg-icon--list:hover .behance:hover .sqs-use--icon,.social-icons-color-standard.social-icons-style-regular.sqs-svg-icon--list:hover .behance:hover .sqs-use--icon{fill:#1769ff}.social-icons-color-standard.social-icons-style-border .behance{border-color:#1769ff}.social-icons-color-standard.social-icons-style-border .behance .sqs-use--background{fill:transparent}.social-icons-color-standard.social-icons-style-border .behance .sqs-use--icon{fill:#1769ff}.social-icons-color-standard.social-icons-style-border .behance .sqs-use--mask{fill:transparent}.social-icons-color-standard.social-icons-style-border .behance:hover{background-color:#1769ff}.social-icons-color-standard.social-icons-style-border .behance:hover .sqs-use--icon{fill:#fff}.social-icons-color-standard.social-icons-style-knockout .behance .sqs-use--background{fill:transparent}.social-icons-color-standard.social-icons-style-knockout .behance .sqs-use--icon{fill:transparent}.social-icons-color-standard.social-icons-style-knockout .behance .sqs-use--mask{fill:#1769ff}.social-icons-color-standard.social-icons-style-knockout .sqs-svg-icon--list:hover .behance .sqs-use--mask,.social-icons-color-standard.social-icons-style-knockout.sqs-svg-icon--list:hover .behance .sqs-use--mask{fill:rgba(23,105,255,.4)}.social-icons-color-standard.social-icons-style-knockout .sqs-svg-icon--list:hover .behance:hover .sqs-use--mask,.social-icons-color-standard.social-icons-style-knockout.sqs-svg-icon--list:hover .behance:hover .sqs-use--mask{fill:#1769ff}.social-icons-color-standard.social-icons-style-solid .behance .sqs-use--mask{fill:#1769ff}.social-icons-color-standard.social-icons-style-solid .behance .sqs-use--icon{fill:transparent}.social-icons-color-standard.social-icons-style-solid .behance .sqs-use--background{fill:#fff}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .behance .sqs-use--mask,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .behance .sqs-use--mask{fill:rgba(23,105,255,.4)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .behance .sqs-use--icon,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .behance .sqs-use--icon{fill:rgba(255,255,255,.4)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .behance .sqs-use--background,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .behance .sqs-use--background{fill:rgba(255,255,255,0)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .behance:hover .sqs-use--mask,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .behance:hover .sqs-use--mask{fill:#1769ff}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .behance:hover .sqs-use--icon,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .behance:hover .sqs-use--icon{fill:rgba(255,255,255,0)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .behance:hover .sqs-use--background,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .behance:hover .sqs-use--background{fill:#fff}.social-icons-color-standard.social-icons-style-regular .codepen .sqs-use--icon{fill:#222}.social-icons-color-standard.social-icons-style-regular .codepen .sqs-use--background,.social-icons-color-standard.social-icons-style-regular .codepen .sqs-use--mask{fill:transparent}.social-icons-color-standard.social-icons-style-regular .sqs-svg-icon--list:hover .codepen .sqs-use--icon,.social-icons-color-standard.social-icons-style-regular.sqs-svg-icon--list:hover .codepen .sqs-use--icon{fill:rgba(34,34,34,.4)}.social-icons-color-standard.social-icons-style-regular .sqs-svg-icon--list:hover .codepen:hover .sqs-use--icon,.social-icons-color-standard.social-icons-style-regular.sqs-svg-icon--list:hover .codepen:hover .sqs-use--icon{fill:#222}.social-icons-color-standard.social-icons-style-border .codepen{border-color:#222}.social-icons-color-standard.social-icons-style-border .codepen .sqs-use--background{fill:transparent}.social-icons-color-standard.social-icons-style-border .codepen .sqs-use--icon{fill:#222}.social-icons-color-standard.social-icons-style-border .codepen .sqs-use--mask{fill:transparent}.social-icons-color-standard.social-icons-style-border .codepen:hover{background-color:#222}.social-icons-color-standard.social-icons-style-border .codepen:hover .sqs-use--icon{fill:#fff}.social-icons-color-standard.social-icons-style-knockout .codepen .sqs-use--background{fill:transparent}.social-icons-color-standard.social-icons-style-knockout .codepen .sqs-use--icon{fill:transparent}.social-icons-color-standard.social-icons-style-knockout .codepen .sqs-use--mask{fill:#222}.social-icons-color-standard.social-icons-style-knockout .sqs-svg-icon--list:hover .codepen .sqs-use--mask,.social-icons-color-standard.social-icons-style-knockout.sqs-svg-icon--list:hover .codepen .sqs-use--mask{fill:rgba(34,34,34,.4)}.social-icons-color-standard.social-icons-style-knockout .sqs-svg-icon--list:hover .codepen:hover .sqs-use--mask,.social-icons-color-standard.social-icons-style-knockout.sqs-svg-icon--list:hover .codepen:hover .sqs-use--mask{fill:#222}.social-icons-color-standard.social-icons-style-solid .codepen .sqs-use--mask{fill:#222}.social-icons-color-standard.social-icons-style-solid .codepen .sqs-use--icon{fill:transparent}.social-icons-color-standard.social-icons-style-solid .codepen .sqs-use--background{fill:#fff}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .codepen .sqs-use--mask,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .codepen .sqs-use--mask{fill:rgba(34,34,34,.4)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .codepen .sqs-use--icon,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .codepen .sqs-use--icon{fill:rgba(255,255,255,.4)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .codepen .sqs-use--background,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .codepen .sqs-use--background{fill:rgba(255,255,255,0)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .codepen:hover .sqs-use--mask,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .codepen:hover .sqs-use--mask{fill:#222}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .codepen:hover .sqs-use--icon,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .codepen:hover .sqs-use--icon{fill:rgba(255,255,255,0)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .codepen:hover .sqs-use--background,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .codepen:hover .sqs-use--background{fill:#fff}.social-icons-color-standard.social-icons-style-regular .dribbble .sqs-use--icon{fill:#ea4c89}.social-icons-color-standard.social-icons-style-regular .dribbble .sqs-use--background,.social-icons-color-standard.social-icons-style-regular .dribbble .sqs-use--mask{fill:transparent}.social-icons-color-standard.social-icons-style-regular .sqs-svg-icon--list:hover .dribbble .sqs-use--icon,.social-icons-color-standard.social-icons-style-regular.sqs-svg-icon--list:hover .dribbble .sqs-use--icon{fill:rgba(234,76,137,.4)}.social-icons-color-standard.social-icons-style-regular .sqs-svg-icon--list:hover .dribbble:hover .sqs-use--icon,.social-icons-color-standard.social-icons-style-regular.sqs-svg-icon--list:hover .dribbble:hover .sqs-use--icon{fill:#ea4c89}.social-icons-color-standard.social-icons-style-border .dribbble{border-color:#ea4c89}.social-icons-color-standard.social-icons-style-border .dribbble .sqs-use--background{fill:transparent}.social-icons-color-standard.social-icons-style-border .dribbble .sqs-use--icon{fill:#ea4c89}.social-icons-color-standard.social-icons-style-border .dribbble .sqs-use--mask{fill:transparent}.social-icons-color-standard.social-icons-style-border .dribbble:hover{background-color:#ea4c89}.social-icons-color-standard.social-icons-style-border .dribbble:hover .sqs-use--icon{fill:#fff}.social-icons-color-standard.social-icons-style-knockout .dribbble .sqs-use--background{fill:transparent}.social-icons-color-standard.social-icons-style-knockout .dribbble .sqs-use--icon{fill:transparent}.social-icons-color-standard.social-icons-style-knockout .dribbble .sqs-use--mask{fill:#ea4c89}.social-icons-color-standard.social-icons-style-knockout .sqs-svg-icon--list:hover .dribbble .sqs-use--mask,.social-icons-color-standard.social-icons-style-knockout.sqs-svg-icon--list:hover .dribbble .sqs-use--mask{fill:rgba(234,76,137,.4)}.social-icons-color-standard.social-icons-style-knockout .sqs-svg-icon--list:hover .dribbble:hover .sqs-use--mask,.social-icons-color-standard.social-icons-style-knockout.sqs-svg-icon--list:hover .dribbble:hover .sqs-use--mask{fill:#ea4c89}.social-icons-color-standard.social-icons-style-solid .dribbble .sqs-use--mask{fill:#ea4c89}.social-icons-color-standard.social-icons-style-solid .dribbble .sqs-use--icon{fill:transparent}.social-icons-color-standard.social-icons-style-solid .dribbble .sqs-use--background{fill:#fff}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .dribbble .sqs-use--mask,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .dribbble .sqs-use--mask{fill:rgba(234,76,137,.4)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .dribbble .sqs-use--icon,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .dribbble .sqs-use--icon{fill:rgba(255,255,255,.4)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .dribbble .sqs-use--background,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .dribbble .sqs-use--background{fill:rgba(255,255,255,0)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .dribbble:hover .sqs-use--mask,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .dribbble:hover .sqs-use--mask{fill:#ea4c89}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .dribbble:hover .sqs-use--icon,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .dribbble:hover .sqs-use--icon{fill:rgba(255,255,255,0)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .dribbble:hover .sqs-use--background,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .dribbble:hover .sqs-use--background{fill:#fff}.social-icons-color-standard.social-icons-style-regular .dropbox .sqs-use--icon{fill:#007ee5}.social-icons-color-standard.social-icons-style-regular .dropbox .sqs-use--background,.social-icons-color-standard.social-icons-style-regular .dropbox .sqs-use--mask{fill:transparent}.social-icons-color-standard.social-icons-style-regular .sqs-svg-icon--list:hover .dropbox .sqs-use--icon,.social-icons-color-standard.social-icons-style-regular.sqs-svg-icon--list:hover .dropbox .sqs-use--icon{fill:rgba(0,126,229,.4)}.social-icons-color-standard.social-icons-style-regular .sqs-svg-icon--list:hover .dropbox:hover .sqs-use--icon,.social-icons-color-standard.social-icons-style-regular.sqs-svg-icon--list:hover .dropbox:hover .sqs-use--icon{fill:#007ee5}.social-icons-color-standard.social-icons-style-border .dropbox{border-color:#007ee5}.social-icons-color-standard.social-icons-style-border .dropbox .sqs-use--background{fill:transparent}.social-icons-color-standard.social-icons-style-border .dropbox .sqs-use--icon{fill:#007ee5}.social-icons-color-standard.social-icons-style-border .dropbox .sqs-use--mask{fill:transparent}.social-icons-color-standard.social-icons-style-border .dropbox:hover{background-color:#007ee5}.social-icons-color-standard.social-icons-style-border .dropbox:hover .sqs-use--icon{fill:#fff}.social-icons-color-standard.social-icons-style-knockout .dropbox .sqs-use--background{fill:transparent}.social-icons-color-standard.social-icons-style-knockout .dropbox .sqs-use--icon{fill:transparent}.social-icons-color-standard.social-icons-style-knockout .dropbox .sqs-use--mask{fill:#007ee5}.social-icons-color-standard.social-icons-style-knockout .sqs-svg-icon--list:hover .dropbox .sqs-use--mask,.social-icons-color-standard.social-icons-style-knockout.sqs-svg-icon--list:hover .dropbox .sqs-use--mask{fill:rgba(0,126,229,.4)}.social-icons-color-standard.social-icons-style-knockout .sqs-svg-icon--list:hover .dropbox:hover .sqs-use--mask,.social-icons-color-standard.social-icons-style-knockout.sqs-svg-icon--list:hover .dropbox:hover .sqs-use--mask{fill:#007ee5}.social-icons-color-standard.social-icons-style-solid .dropbox .sqs-use--mask{fill:#007ee5}.social-icons-color-standard.social-icons-style-solid .dropbox .sqs-use--icon{fill:transparent}.social-icons-color-standard.social-icons-style-solid .dropbox .sqs-use--background{fill:#fff}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .dropbox .sqs-use--mask,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .dropbox .sqs-use--mask{fill:rgba(0,126,229,.4)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .dropbox .sqs-use--icon,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .dropbox .sqs-use--icon{fill:rgba(255,255,255,.4)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .dropbox .sqs-use--background,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .dropbox .sqs-use--background{fill:rgba(255,255,255,0)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .dropbox:hover .sqs-use--mask,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .dropbox:hover .sqs-use--mask{fill:#007ee5}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .dropbox:hover .sqs-use--icon,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .dropbox:hover .sqs-use--icon{fill:rgba(255,255,255,0)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .dropbox:hover .sqs-use--background,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .dropbox:hover .sqs-use--background{fill:#fff}.social-icons-color-standard.social-icons-style-regular .email .sqs-use--icon{fill:#222}.social-icons-color-standard.social-icons-style-regular .email .sqs-use--background,.social-icons-color-standard.social-icons-style-regular .email .sqs-use--mask{fill:transparent}.social-icons-color-standard.social-icons-style-regular .sqs-svg-icon--list:hover .email .sqs-use--icon,.social-icons-color-standard.social-icons-style-regular.sqs-svg-icon--list:hover .email .sqs-use--icon{fill:rgba(34,34,34,.4)}.social-icons-color-standard.social-icons-style-regular .sqs-svg-icon--list:hover .email:hover .sqs-use--icon,.social-icons-color-standard.social-icons-style-regular.sqs-svg-icon--list:hover .email:hover .sqs-use--icon{fill:#222}.social-icons-color-standard.social-icons-style-border .email{border-color:#222}.social-icons-color-standard.social-icons-style-border .email .sqs-use--background{fill:transparent}.social-icons-color-standard.social-icons-style-border .email .sqs-use--icon{fill:#222}.social-icons-color-standard.social-icons-style-border .email .sqs-use--mask{fill:transparent}.social-icons-color-standard.social-icons-style-border .email:hover{background-color:#222}.social-icons-color-standard.social-icons-style-border .email:hover .sqs-use--icon{fill:#fff}.social-icons-color-standard.social-icons-style-knockout .email .sqs-use--background{fill:transparent}.social-icons-color-standard.social-icons-style-knockout .email .sqs-use--icon{fill:transparent}.social-icons-color-standard.social-icons-style-knockout .email .sqs-use--mask{fill:#222}.social-icons-color-standard.social-icons-style-knockout .sqs-svg-icon--list:hover .email .sqs-use--mask,.social-icons-color-standard.social-icons-style-knockout.sqs-svg-icon--list:hover .email .sqs-use--mask{fill:rgba(34,34,34,.4)}.social-icons-color-standard.social-icons-style-knockout .sqs-svg-icon--list:hover .email:hover .sqs-use--mask,.social-icons-color-standard.social-icons-style-knockout.sqs-svg-icon--list:hover .email:hover .sqs-use--mask{fill:#222}.social-icons-color-standard.social-icons-style-solid .email .sqs-use--mask{fill:#222}.social-icons-color-standard.social-icons-style-solid .email .sqs-use--icon{fill:transparent}.social-icons-color-standard.social-icons-style-solid .email .sqs-use--background{fill:#fff}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .email .sqs-use--mask,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .email .sqs-use--mask{fill:rgba(34,34,34,.4)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .email .sqs-use--icon,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .email .sqs-use--icon{fill:rgba(255,255,255,.4)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .email .sqs-use--background,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .email .sqs-use--background{fill:rgba(255,255,255,0)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .email:hover .sqs-use--mask,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .email:hover .sqs-use--mask{fill:#222}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .email:hover .sqs-use--icon,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .email:hover .sqs-use--icon{fill:rgba(255,255,255,0)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .email:hover .sqs-use--background,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .email:hover .sqs-use--background{fill:#fff}.social-icons-color-standard.social-icons-style-regular .facebook .sqs-use--icon{fill:#3b5998}.social-icons-color-standard.social-icons-style-regular .facebook .sqs-use--background,.social-icons-color-standard.social-icons-style-regular .facebook .sqs-use--mask{fill:transparent}.social-icons-color-standard.social-icons-style-regular .sqs-svg-icon--list:hover .facebook .sqs-use--icon,.social-icons-color-standard.social-icons-style-regular.sqs-svg-icon--list:hover .facebook .sqs-use--icon{fill:rgba(59,89,152,.4)}.social-icons-color-standard.social-icons-style-regular .sqs-svg-icon--list:hover .facebook:hover .sqs-use--icon,.social-icons-color-standard.social-icons-style-regular.sqs-svg-icon--list:hover .facebook:hover .sqs-use--icon{fill:#3b5998}.social-icons-color-standard.social-icons-style-border .facebook{border-color:#3b5998}.social-icons-color-standard.social-icons-style-border .facebook .sqs-use--background{fill:transparent}.social-icons-color-standard.social-icons-style-border .facebook .sqs-use--icon{fill:#3b5998}.social-icons-color-standard.social-icons-style-border .facebook .sqs-use--mask{fill:transparent}.social-icons-color-standard.social-icons-style-border .facebook:hover{background-color:#3b5998}.social-icons-color-standard.social-icons-style-border .facebook:hover .sqs-use--icon{fill:#fff}.social-icons-color-standard.social-icons-style-knockout .facebook .sqs-use--background{fill:transparent}.social-icons-color-standard.social-icons-style-knockout .facebook .sqs-use--icon{fill:transparent}.social-icons-color-standard.social-icons-style-knockout .facebook .sqs-use--mask{fill:#3b5998}.social-icons-color-standard.social-icons-style-knockout .sqs-svg-icon--list:hover .facebook .sqs-use--mask,.social-icons-color-standard.social-icons-style-knockout.sqs-svg-icon--list:hover .facebook .sqs-use--mask{fill:rgba(59,89,152,.4)}.social-icons-color-standard.social-icons-style-knockout .sqs-svg-icon--list:hover .facebook:hover .sqs-use--mask,.social-icons-color-standard.social-icons-style-knockout.sqs-svg-icon--list:hover .facebook:hover .sqs-use--mask{fill:#3b5998}.social-icons-color-standard.social-icons-style-solid .facebook .sqs-use--mask{fill:#3b5998}.social-icons-color-standard.social-icons-style-solid .facebook .sqs-use--icon{fill:transparent}.social-icons-color-standard.social-icons-style-solid .facebook .sqs-use--background{fill:#fff}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .facebook .sqs-use--mask,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .facebook .sqs-use--mask{fill:rgba(59,89,152,.4)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .facebook .sqs-use--icon,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .facebook .sqs-use--icon{fill:rgba(255,255,255,.4)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .facebook .sqs-use--background,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .facebook .sqs-use--background{fill:rgba(255,255,255,0)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .facebook:hover .sqs-use--mask,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .facebook:hover .sqs-use--mask{fill:#3b5998}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .facebook:hover .sqs-use--icon,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .facebook:hover .sqs-use--icon{fill:rgba(255,255,255,0)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .facebook:hover .sqs-use--background,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .facebook:hover .sqs-use--background{fill:#fff}.social-icons-color-standard.social-icons-style-regular .flickr .sqs-use--icon{fill:#0063dc}.social-icons-color-standard.social-icons-style-regular .flickr .sqs-use--background,.social-icons-color-standard.social-icons-style-regular .flickr .sqs-use--mask{fill:transparent}.social-icons-color-standard.social-icons-style-regular .sqs-svg-icon--list:hover .flickr .sqs-use--icon,.social-icons-color-standard.social-icons-style-regular.sqs-svg-icon--list:hover .flickr .sqs-use--icon{fill:rgba(0,99,220,.4)}.social-icons-color-standard.social-icons-style-regular .sqs-svg-icon--list:hover .flickr:hover .sqs-use--icon,.social-icons-color-standard.social-icons-style-regular.sqs-svg-icon--list:hover .flickr:hover .sqs-use--icon{fill:#0063dc}.social-icons-color-standard.social-icons-style-border .flickr{border-color:#0063dc}.social-icons-color-standard.social-icons-style-border .flickr .sqs-use--background{fill:transparent}.social-icons-color-standard.social-icons-style-border .flickr .sqs-use--icon{fill:#0063dc}.social-icons-color-standard.social-icons-style-border .flickr .sqs-use--mask{fill:transparent}.social-icons-color-standard.social-icons-style-border .flickr:hover{background-color:#0063dc}.social-icons-color-standard.social-icons-style-border .flickr:hover .sqs-use--icon{fill:#fff}.social-icons-color-standard.social-icons-style-knockout .flickr .sqs-use--background{fill:transparent}.social-icons-color-standard.social-icons-style-knockout .flickr .sqs-use--icon{fill:transparent}.social-icons-color-standard.social-icons-style-knockout .flickr .sqs-use--mask{fill:#0063dc}.social-icons-color-standard.social-icons-style-knockout .sqs-svg-icon--list:hover .flickr .sqs-use--mask,.social-icons-color-standard.social-icons-style-knockout.sqs-svg-icon--list:hover .flickr .sqs-use--mask{fill:rgba(0,99,220,.4)}.social-icons-color-standard.social-icons-style-knockout .sqs-svg-icon--list:hover .flickr:hover .sqs-use--mask,.social-icons-color-standard.social-icons-style-knockout.sqs-svg-icon--list:hover .flickr:hover .sqs-use--mask{fill:#0063dc}.social-icons-color-standard.social-icons-style-solid .flickr .sqs-use--mask{fill:#0063dc}.social-icons-color-standard.social-icons-style-solid .flickr .sqs-use--icon{fill:transparent}.social-icons-color-standard.social-icons-style-solid .flickr .sqs-use--background{fill:#fff}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .flickr .sqs-use--mask,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .flickr .sqs-use--mask{fill:rgba(0,99,220,.4)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .flickr .sqs-use--icon,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .flickr .sqs-use--icon{fill:rgba(255,255,255,.4)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .flickr .sqs-use--background,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .flickr .sqs-use--background{fill:rgba(255,255,255,0)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .flickr:hover .sqs-use--mask,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .flickr:hover .sqs-use--mask{fill:#0063dc}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .flickr:hover .sqs-use--icon,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .flickr:hover .sqs-use--icon{fill:rgba(255,255,255,0)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .flickr:hover .sqs-use--background,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .flickr:hover .sqs-use--background{fill:#fff}.social-icons-color-standard.social-icons-style-regular .foursquare .sqs-use--icon{fill:#f94877}.social-icons-color-standard.social-icons-style-regular .foursquare .sqs-use--background,.social-icons-color-standard.social-icons-style-regular .foursquare .sqs-use--mask{fill:transparent}.social-icons-color-standard.social-icons-style-regular .sqs-svg-icon--list:hover .foursquare .sqs-use--icon,.social-icons-color-standard.social-icons-style-regular.sqs-svg-icon--list:hover .foursquare .sqs-use--icon{fill:rgba(249,72,119,.4)}.social-icons-color-standard.social-icons-style-regular .sqs-svg-icon--list:hover .foursquare:hover .sqs-use--icon,.social-icons-color-standard.social-icons-style-regular.sqs-svg-icon--list:hover .foursquare:hover .sqs-use--icon{fill:#f94877}.social-icons-color-standard.social-icons-style-border .foursquare{border-color:#f94877}.social-icons-color-standard.social-icons-style-border .foursquare .sqs-use--background{fill:transparent}.social-icons-color-standard.social-icons-style-border .foursquare .sqs-use--icon{fill:#f94877}.social-icons-color-standard.social-icons-style-border .foursquare .sqs-use--mask{fill:transparent}.social-icons-color-standard.social-icons-style-border .foursquare:hover{background-color:#f94877}.social-icons-color-standard.social-icons-style-border .foursquare:hover .sqs-use--icon{fill:#fff}.social-icons-color-standard.social-icons-style-knockout .foursquare .sqs-use--background{fill:transparent}.social-icons-color-standard.social-icons-style-knockout .foursquare .sqs-use--icon{fill:transparent}.social-icons-color-standard.social-icons-style-knockout .foursquare .sqs-use--mask{fill:#f94877}.social-icons-color-standard.social-icons-style-knockout .sqs-svg-icon--list:hover .foursquare .sqs-use--mask,.social-icons-color-standard.social-icons-style-knockout.sqs-svg-icon--list:hover .foursquare .sqs-use--mask{fill:rgba(249,72,119,.4)}.social-icons-color-standard.social-icons-style-knockout .sqs-svg-icon--list:hover .foursquare:hover .sqs-use--mask,.social-icons-color-standard.social-icons-style-knockout.sqs-svg-icon--list:hover .foursquare:hover .sqs-use--mask{fill:#f94877}.social-icons-color-standard.social-icons-style-solid .foursquare .sqs-use--mask{fill:#f94877}.social-icons-color-standard.social-icons-style-solid .foursquare .sqs-use--icon{fill:transparent}.social-icons-color-standard.social-icons-style-solid .foursquare .sqs-use--background{fill:#fff}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .foursquare .sqs-use--mask,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .foursquare .sqs-use--mask{fill:rgba(249,72,119,.4)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .foursquare .sqs-use--icon,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .foursquare .sqs-use--icon{fill:rgba(255,255,255,.4)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .foursquare .sqs-use--background,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .foursquare .sqs-use--background{fill:rgba(255,255,255,0)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .foursquare:hover .sqs-use--mask,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .foursquare:hover .sqs-use--mask{fill:#f94877}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .foursquare:hover .sqs-use--icon,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .foursquare:hover .sqs-use--icon{fill:rgba(255,255,255,0)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .foursquare:hover .sqs-use--background,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .foursquare:hover .sqs-use--background{fill:#fff}.social-icons-color-standard.social-icons-style-regular .github .sqs-use--icon{fill:#4183c4}.social-icons-color-standard.social-icons-style-regular .github .sqs-use--background,.social-icons-color-standard.social-icons-style-regular .github .sqs-use--mask{fill:transparent}.social-icons-color-standard.social-icons-style-regular .sqs-svg-icon--list:hover .github .sqs-use--icon,.social-icons-color-standard.social-icons-style-regular.sqs-svg-icon--list:hover .github .sqs-use--icon{fill:rgba(65,131,196,.4)}.social-icons-color-standard.social-icons-style-regular .sqs-svg-icon--list:hover .github:hover .sqs-use--icon,.social-icons-color-standard.social-icons-style-regular.sqs-svg-icon--list:hover .github:hover .sqs-use--icon{fill:#4183c4}.social-icons-color-standard.social-icons-style-border .github{border-color:#4183c4}.social-icons-color-standard.social-icons-style-border .github .sqs-use--background{fill:transparent}.social-icons-color-standard.social-icons-style-border .github .sqs-use--icon{fill:#4183c4}.social-icons-color-standard.social-icons-style-border .github .sqs-use--mask{fill:transparent}.social-icons-color-standard.social-icons-style-border .github:hover{background-color:#4183c4}.social-icons-color-standard.social-icons-style-border .github:hover .sqs-use--icon{fill:#fff}.social-icons-color-standard.social-icons-style-knockout .github .sqs-use--background{fill:transparent}.social-icons-color-standard.social-icons-style-knockout .github .sqs-use--icon{fill:transparent}.social-icons-color-standard.social-icons-style-knockout .github .sqs-use--mask{fill:#4183c4}.social-icons-color-standard.social-icons-style-knockout .sqs-svg-icon--list:hover .github .sqs-use--mask,.social-icons-color-standard.social-icons-style-knockout.sqs-svg-icon--list:hover .github .sqs-use--mask{fill:rgba(65,131,196,.4)}.social-icons-color-standard.social-icons-style-knockout .sqs-svg-icon--list:hover .github:hover .sqs-use--mask,.social-icons-color-standard.social-icons-style-knockout.sqs-svg-icon--list:hover .github:hover .sqs-use--mask{fill:#4183c4}.social-icons-color-standard.social-icons-style-solid .github .sqs-use--mask{fill:#4183c4}.social-icons-color-standard.social-icons-style-solid .github .sqs-use--icon{fill:transparent}.social-icons-color-standard.social-icons-style-solid .github .sqs-use--background{fill:#fff}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .github .sqs-use--mask,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .github .sqs-use--mask{fill:rgba(65,131,196,.4)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .github .sqs-use--icon,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .github .sqs-use--icon{fill:rgba(255,255,255,.4)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .github .sqs-use--background,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .github .sqs-use--background{fill:rgba(255,255,255,0)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .github:hover .sqs-use--mask,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .github:hover .sqs-use--mask{fill:#4183c4}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .github:hover .sqs-use--icon,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .github:hover .sqs-use--icon{fill:rgba(255,255,255,0)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .github:hover .sqs-use--background,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .github:hover .sqs-use--background{fill:#fff}.social-icons-color-standard.social-icons-style-regular .googleplay .sqs-use--icon{fill:#5adfcb}.social-icons-color-standard.social-icons-style-regular .googleplay .sqs-use--background,.social-icons-color-standard.social-icons-style-regular .googleplay .sqs-use--mask{fill:transparent}.social-icons-color-standard.social-icons-style-regular .sqs-svg-icon--list:hover .googleplay .sqs-use--icon,.social-icons-color-standard.social-icons-style-regular.sqs-svg-icon--list:hover .googleplay .sqs-use--icon{fill:rgba(90,223,203,.4)}.social-icons-color-standard.social-icons-style-regular .sqs-svg-icon--list:hover .googleplay:hover .sqs-use--icon,.social-icons-color-standard.social-icons-style-regular.sqs-svg-icon--list:hover .googleplay:hover .sqs-use--icon{fill:#5adfcb}.social-icons-color-standard.social-icons-style-border .googleplay{border-color:#5adfcb}.social-icons-color-standard.social-icons-style-border .googleplay .sqs-use--background{fill:transparent}.social-icons-color-standard.social-icons-style-border .googleplay .sqs-use--icon{fill:#5adfcb}.social-icons-color-standard.social-icons-style-border .googleplay .sqs-use--mask{fill:transparent}.social-icons-color-standard.social-icons-style-border .googleplay:hover{background-color:#5adfcb}.social-icons-color-standard.social-icons-style-border .googleplay:hover .sqs-use--icon{fill:#fff}.social-icons-color-standard.social-icons-style-knockout .googleplay .sqs-use--background{fill:transparent}.social-icons-color-standard.social-icons-style-knockout .googleplay .sqs-use--icon{fill:transparent}.social-icons-color-standard.social-icons-style-knockout .googleplay .sqs-use--mask{fill:#5adfcb}.social-icons-color-standard.social-icons-style-knockout .sqs-svg-icon--list:hover .googleplay .sqs-use--mask,.social-icons-color-standard.social-icons-style-knockout.sqs-svg-icon--list:hover .googleplay .sqs-use--mask{fill:rgba(90,223,203,.4)}.social-icons-color-standard.social-icons-style-knockout .sqs-svg-icon--list:hover .googleplay:hover .sqs-use--mask,.social-icons-color-standard.social-icons-style-knockout.sqs-svg-icon--list:hover .googleplay:hover .sqs-use--mask{fill:#5adfcb}.social-icons-color-standard.social-icons-style-solid .googleplay .sqs-use--mask{fill:#5adfcb}.social-icons-color-standard.social-icons-style-solid .googleplay .sqs-use--icon{fill:transparent}.social-icons-color-standard.social-icons-style-solid .googleplay .sqs-use--background{fill:#fff}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .googleplay .sqs-use--mask,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .googleplay .sqs-use--mask{fill:rgba(90,223,203,.4)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .googleplay .sqs-use--icon,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .googleplay .sqs-use--icon{fill:rgba(255,255,255,.4)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .googleplay .sqs-use--background,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .googleplay .sqs-use--background{fill:rgba(255,255,255,0)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .googleplay:hover .sqs-use--mask,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .googleplay:hover .sqs-use--mask{fill:#5adfcb}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .googleplay:hover .sqs-use--icon,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .googleplay:hover .sqs-use--icon{fill:rgba(255,255,255,0)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .googleplay:hover .sqs-use--background,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .googleplay:hover .sqs-use--background{fill:#fff}.social-icons-color-standard.social-icons-style-regular .google .sqs-use--icon{fill:#dd4b39}.social-icons-color-standard.social-icons-style-regular .google .sqs-use--background,.social-icons-color-standard.social-icons-style-regular .google .sqs-use--mask{fill:transparent}.social-icons-color-standard.social-icons-style-regular .sqs-svg-icon--list:hover .google .sqs-use--icon,.social-icons-color-standard.social-icons-style-regular.sqs-svg-icon--list:hover .google .sqs-use--icon{fill:rgba(221,75,57,.4)}.social-icons-color-standard.social-icons-style-regular .sqs-svg-icon--list:hover .google:hover .sqs-use--icon,.social-icons-color-standard.social-icons-style-regular.sqs-svg-icon--list:hover .google:hover .sqs-use--icon{fill:#dd4b39}.social-icons-color-standard.social-icons-style-border .google{border-color:#dd4b39}.social-icons-color-standard.social-icons-style-border .google .sqs-use--background{fill:transparent}.social-icons-color-standard.social-icons-style-border .google .sqs-use--icon{fill:#dd4b39}.social-icons-color-standard.social-icons-style-border .google .sqs-use--mask{fill:transparent}.social-icons-color-standard.social-icons-style-border .google:hover{background-color:#dd4b39}.social-icons-color-standard.social-icons-style-border .google:hover .sqs-use--icon{fill:#fff}.social-icons-color-standard.social-icons-style-knockout .google .sqs-use--background{fill:transparent}.social-icons-color-standard.social-icons-style-knockout .google .sqs-use--icon{fill:transparent}.social-icons-color-standard.social-icons-style-knockout .google .sqs-use--mask{fill:#dd4b39}.social-icons-color-standard.social-icons-style-knockout .sqs-svg-icon--list:hover .google .sqs-use--mask,.social-icons-color-standard.social-icons-style-knockout.sqs-svg-icon--list:hover .google .sqs-use--mask{fill:rgba(221,75,57,.4)}.social-icons-color-standard.social-icons-style-knockout .sqs-svg-icon--list:hover .google:hover .sqs-use--mask,.social-icons-color-standard.social-icons-style-knockout.sqs-svg-icon--list:hover .google:hover .sqs-use--mask{fill:#dd4b39}.social-icons-color-standard.social-icons-style-solid .google .sqs-use--mask{fill:#dd4b39}.social-icons-color-standard.social-icons-style-solid .google .sqs-use--icon{fill:transparent}.social-icons-color-standard.social-icons-style-solid .google .sqs-use--background{fill:#fff}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .google .sqs-use--mask,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .google .sqs-use--mask{fill:rgba(221,75,57,.4)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .google .sqs-use--icon,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .google .sqs-use--icon{fill:rgba(255,255,255,.4)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .google .sqs-use--background,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .google .sqs-use--background{fill:rgba(255,255,255,0)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .google:hover .sqs-use--mask,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .google:hover .sqs-use--mask{fill:#dd4b39}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .google:hover .sqs-use--icon,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .google:hover .sqs-use--icon{fill:rgba(255,255,255,0)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .google:hover .sqs-use--background,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .google:hover .sqs-use--background{fill:#fff}.social-icons-color-standard.social-icons-style-regular .houzz .sqs-use--icon{fill:#7ac143}.social-icons-color-standard.social-icons-style-regular .houzz .sqs-use--background,.social-icons-color-standard.social-icons-style-regular .houzz .sqs-use--mask{fill:transparent}.social-icons-color-standard.social-icons-style-regular .sqs-svg-icon--list:hover .houzz .sqs-use--icon,.social-icons-color-standard.social-icons-style-regular.sqs-svg-icon--list:hover .houzz .sqs-use--icon{fill:rgba(122,193,67,.4)}.social-icons-color-standard.social-icons-style-regular .sqs-svg-icon--list:hover .houzz:hover .sqs-use--icon,.social-icons-color-standard.social-icons-style-regular.sqs-svg-icon--list:hover .houzz:hover .sqs-use--icon{fill:#7ac143}.social-icons-color-standard.social-icons-style-border .houzz{border-color:#7ac143}.social-icons-color-standard.social-icons-style-border .houzz .sqs-use--background{fill:transparent}.social-icons-color-standard.social-icons-style-border .houzz .sqs-use--icon{fill:#7ac143}.social-icons-color-standard.social-icons-style-border .houzz .sqs-use--mask{fill:transparent}.social-icons-color-standard.social-icons-style-border .houzz:hover{background-color:#7ac143}.social-icons-color-standard.social-icons-style-border .houzz:hover .sqs-use--icon{fill:#fff}.social-icons-color-standard.social-icons-style-knockout .houzz .sqs-use--background{fill:transparent}.social-icons-color-standard.social-icons-style-knockout .houzz .sqs-use--icon{fill:transparent}.social-icons-color-standard.social-icons-style-knockout .houzz .sqs-use--mask{fill:#7ac143}.social-icons-color-standard.social-icons-style-knockout .sqs-svg-icon--list:hover .houzz .sqs-use--mask,.social-icons-color-standard.social-icons-style-knockout.sqs-svg-icon--list:hover .houzz .sqs-use--mask{fill:rgba(122,193,67,.4)}.social-icons-color-standard.social-icons-style-knockout .sqs-svg-icon--list:hover .houzz:hover .sqs-use--mask,.social-icons-color-standard.social-icons-style-knockout.sqs-svg-icon--list:hover .houzz:hover .sqs-use--mask{fill:#7ac143}.social-icons-color-standard.social-icons-style-solid .houzz .sqs-use--mask{fill:#7ac143}.social-icons-color-standard.social-icons-style-solid .houzz .sqs-use--icon{fill:transparent}.social-icons-color-standard.social-icons-style-solid .houzz .sqs-use--background{fill:#fff}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .houzz .sqs-use--mask,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .houzz .sqs-use--mask{fill:rgba(122,193,67,.4)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .houzz .sqs-use--icon,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .houzz .sqs-use--icon{fill:rgba(255,255,255,.4)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .houzz .sqs-use--background,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .houzz .sqs-use--background{fill:rgba(255,255,255,0)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .houzz:hover .sqs-use--mask,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .houzz:hover .sqs-use--mask{fill:#7ac143}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .houzz:hover .sqs-use--icon,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .houzz:hover .sqs-use--icon{fill:rgba(255,255,255,0)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .houzz:hover .sqs-use--background,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .houzz:hover .sqs-use--background{fill:#fff}.social-icons-color-standard.social-icons-style-regular .instagram .sqs-use--icon{fill:#3f729b}.social-icons-color-standard.social-icons-style-regular .instagram .sqs-use--background,.social-icons-color-standard.social-icons-style-regular .instagram .sqs-use--mask{fill:transparent}.social-icons-color-standard.social-icons-style-regular .sqs-svg-icon--list:hover .instagram .sqs-use--icon,.social-icons-color-standard.social-icons-style-regular.sqs-svg-icon--list:hover .instagram .sqs-use--icon{fill:rgba(63,114,155,.4)}.social-icons-color-standard.social-icons-style-regular .sqs-svg-icon--list:hover .instagram:hover .sqs-use--icon,.social-icons-color-standard.social-icons-style-regular.sqs-svg-icon--list:hover .instagram:hover .sqs-use--icon{fill:#3f729b}.social-icons-color-standard.social-icons-style-border .instagram{border-color:#3f729b}.social-icons-color-standard.social-icons-style-border .instagram .sqs-use--background{fill:transparent}.social-icons-color-standard.social-icons-style-border .instagram .sqs-use--icon{fill:#3f729b}.social-icons-color-standard.social-icons-style-border .instagram .sqs-use--mask{fill:transparent}.social-icons-color-standard.social-icons-style-border .instagram:hover{background-color:#3f729b}.social-icons-color-standard.social-icons-style-border .instagram:hover .sqs-use--icon{fill:#fff}.social-icons-color-standard.social-icons-style-knockout .instagram .sqs-use--background{fill:transparent}.social-icons-color-standard.social-icons-style-knockout .instagram .sqs-use--icon{fill:transparent}.social-icons-color-standard.social-icons-style-knockout .instagram .sqs-use--mask{fill:#3f729b}.social-icons-color-standard.social-icons-style-knockout .sqs-svg-icon--list:hover .instagram .sqs-use--mask,.social-icons-color-standard.social-icons-style-knockout.sqs-svg-icon--list:hover .instagram .sqs-use--mask{fill:rgba(63,114,155,.4)}.social-icons-color-standard.social-icons-style-knockout .sqs-svg-icon--list:hover .instagram:hover .sqs-use--mask,.social-icons-color-standard.social-icons-style-knockout.sqs-svg-icon--list:hover .instagram:hover .sqs-use--mask{fill:#3f729b}.social-icons-color-standard.social-icons-style-solid .instagram .sqs-use--mask{fill:#3f729b}.social-icons-color-standard.social-icons-style-solid .instagram .sqs-use--icon{fill:transparent}.social-icons-color-standard.social-icons-style-solid .instagram .sqs-use--background{fill:#fff}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .instagram .sqs-use--mask,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .instagram .sqs-use--mask{fill:rgba(63,114,155,.4)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .instagram .sqs-use--icon,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .instagram .sqs-use--icon{fill:rgba(255,255,255,.4)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .instagram .sqs-use--background,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .instagram .sqs-use--background{fill:rgba(255,255,255,0)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .instagram:hover .sqs-use--mask,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .instagram:hover .sqs-use--mask{fill:#3f729b}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .instagram:hover .sqs-use--icon,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .instagram:hover .sqs-use--icon{fill:rgba(255,255,255,0)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .instagram:hover .sqs-use--background,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .instagram:hover .sqs-use--background{fill:#fff}.social-icons-color-standard.social-icons-style-regular .itunes .sqs-use--icon{fill:#ff3241}.social-icons-color-standard.social-icons-style-regular .itunes .sqs-use--background,.social-icons-color-standard.social-icons-style-regular .itunes .sqs-use--mask{fill:transparent}.social-icons-color-standard.social-icons-style-regular .sqs-svg-icon--list:hover .itunes .sqs-use--icon,.social-icons-color-standard.social-icons-style-regular.sqs-svg-icon--list:hover .itunes .sqs-use--icon{fill:rgba(255,50,65,.4)}.social-icons-color-standard.social-icons-style-regular .sqs-svg-icon--list:hover .itunes:hover .sqs-use--icon,.social-icons-color-standard.social-icons-style-regular.sqs-svg-icon--list:hover .itunes:hover .sqs-use--icon{fill:#ff3241}.social-icons-color-standard.social-icons-style-border .itunes{border-color:#ff3241}.social-icons-color-standard.social-icons-style-border .itunes .sqs-use--background{fill:transparent}.social-icons-color-standard.social-icons-style-border .itunes .sqs-use--icon{fill:#ff3241}.social-icons-color-standard.social-icons-style-border .itunes .sqs-use--mask{fill:transparent}.social-icons-color-standard.social-icons-style-border .itunes:hover{background-color:#ff3241}.social-icons-color-standard.social-icons-style-border .itunes:hover .sqs-use--icon{fill:#fff}.social-icons-color-standard.social-icons-style-knockout .itunes .sqs-use--background{fill:transparent}.social-icons-color-standard.social-icons-style-knockout .itunes .sqs-use--icon{fill:transparent}.social-icons-color-standard.social-icons-style-knockout .itunes .sqs-use--mask{fill:#ff3241}.social-icons-color-standard.social-icons-style-knockout .sqs-svg-icon--list:hover .itunes .sqs-use--mask,.social-icons-color-standard.social-icons-style-knockout.sqs-svg-icon--list:hover .itunes .sqs-use--mask{fill:rgba(255,50,65,.4)}.social-icons-color-standard.social-icons-style-knockout .sqs-svg-icon--list:hover .itunes:hover .sqs-use--mask,.social-icons-color-standard.social-icons-style-knockout.sqs-svg-icon--list:hover .itunes:hover .sqs-use--mask{fill:#ff3241}.social-icons-color-standard.social-icons-style-solid .itunes .sqs-use--mask{fill:#ff3241}.social-icons-color-standard.social-icons-style-solid .itunes .sqs-use--icon{fill:transparent}.social-icons-color-standard.social-icons-style-solid .itunes .sqs-use--background{fill:#fff}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .itunes .sqs-use--mask,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .itunes .sqs-use--mask{fill:rgba(255,50,65,.4)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .itunes .sqs-use--icon,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .itunes .sqs-use--icon{fill:rgba(255,255,255,.4)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .itunes .sqs-use--background,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .itunes .sqs-use--background{fill:rgba(255,255,255,0)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .itunes:hover .sqs-use--mask,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .itunes:hover .sqs-use--mask{fill:#ff3241}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .itunes:hover .sqs-use--icon,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .itunes:hover .sqs-use--icon{fill:rgba(255,255,255,0)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .itunes:hover .sqs-use--background,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .itunes:hover .sqs-use--background{fill:#fff}.social-icons-color-standard.social-icons-style-regular .linkedin .sqs-use--icon{fill:#0976b4}.social-icons-color-standard.social-icons-style-regular .linkedin .sqs-use--background,.social-icons-color-standard.social-icons-style-regular .linkedin .sqs-use--mask{fill:transparent}.social-icons-color-standard.social-icons-style-regular .sqs-svg-icon--list:hover .linkedin .sqs-use--icon,.social-icons-color-standard.social-icons-style-regular.sqs-svg-icon--list:hover .linkedin .sqs-use--icon{fill:rgba(9,118,180,.4)}.social-icons-color-standard.social-icons-style-regular .sqs-svg-icon--list:hover .linkedin:hover .sqs-use--icon,.social-icons-color-standard.social-icons-style-regular.sqs-svg-icon--list:hover .linkedin:hover .sqs-use--icon{fill:#0976b4}.social-icons-color-standard.social-icons-style-border .linkedin{border-color:#0976b4}.social-icons-color-standard.social-icons-style-border .linkedin .sqs-use--background{fill:transparent}.social-icons-color-standard.social-icons-style-border .linkedin .sqs-use--icon{fill:#0976b4}.social-icons-color-standard.social-icons-style-border .linkedin .sqs-use--mask{fill:transparent}.social-icons-color-standard.social-icons-style-border .linkedin:hover{background-color:#0976b4}.social-icons-color-standard.social-icons-style-border .linkedin:hover .sqs-use--icon{fill:#fff}.social-icons-color-standard.social-icons-style-knockout .linkedin .sqs-use--background{fill:transparent}.social-icons-color-standard.social-icons-style-knockout .linkedin .sqs-use--icon{fill:transparent}.social-icons-color-standard.social-icons-style-knockout .linkedin .sqs-use--mask{fill:#0976b4}.social-icons-color-standard.social-icons-style-knockout .sqs-svg-icon--list:hover .linkedin .sqs-use--mask,.social-icons-color-standard.social-icons-style-knockout.sqs-svg-icon--list:hover .linkedin .sqs-use--mask{fill:rgba(9,118,180,.4)}.social-icons-color-standard.social-icons-style-knockout .sqs-svg-icon--list:hover .linkedin:hover .sqs-use--mask,.social-icons-color-standard.social-icons-style-knockout.sqs-svg-icon--list:hover .linkedin:hover .sqs-use--mask{fill:#0976b4}.social-icons-color-standard.social-icons-style-solid .linkedin .sqs-use--mask{fill:#0976b4}.social-icons-color-standard.social-icons-style-solid .linkedin .sqs-use--icon{fill:transparent}.social-icons-color-standard.social-icons-style-solid .linkedin .sqs-use--background{fill:#fff}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .linkedin .sqs-use--mask,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .linkedin .sqs-use--mask{fill:rgba(9,118,180,.4)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .linkedin .sqs-use--icon,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .linkedin .sqs-use--icon{fill:rgba(255,255,255,.4)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .linkedin .sqs-use--background,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .linkedin .sqs-use--background{fill:rgba(255,255,255,0)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .linkedin:hover .sqs-use--mask,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .linkedin:hover .sqs-use--mask{fill:#0976b4}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .linkedin:hover .sqs-use--icon,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .linkedin:hover .sqs-use--icon{fill:rgba(255,255,255,0)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .linkedin:hover .sqs-use--background,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .linkedin:hover .sqs-use--background{fill:#fff}.social-icons-color-standard.social-icons-style-regular .medium .sqs-use--icon{fill:#222}.social-icons-color-standard.social-icons-style-regular .medium .sqs-use--background,.social-icons-color-standard.social-icons-style-regular .medium .sqs-use--mask{fill:transparent}.social-icons-color-standard.social-icons-style-regular .sqs-svg-icon--list:hover .medium .sqs-use--icon,.social-icons-color-standard.social-icons-style-regular.sqs-svg-icon--list:hover .medium .sqs-use--icon{fill:rgba(34,34,34,.4)}.social-icons-color-standard.social-icons-style-regular .sqs-svg-icon--list:hover .medium:hover .sqs-use--icon,.social-icons-color-standard.social-icons-style-regular.sqs-svg-icon--list:hover .medium:hover .sqs-use--icon{fill:#222}.social-icons-color-standard.social-icons-style-border .medium{border-color:#222}.social-icons-color-standard.social-icons-style-border .medium .sqs-use--background{fill:transparent}.social-icons-color-standard.social-icons-style-border .medium .sqs-use--icon{fill:#222}.social-icons-color-standard.social-icons-style-border .medium .sqs-use--mask{fill:transparent}.social-icons-color-standard.social-icons-style-border .medium:hover{background-color:#222}.social-icons-color-standard.social-icons-style-border .medium:hover .sqs-use--icon{fill:#fff}.social-icons-color-standard.social-icons-style-knockout .medium .sqs-use--background{fill:transparent}.social-icons-color-standard.social-icons-style-knockout .medium .sqs-use--icon{fill:transparent}.social-icons-color-standard.social-icons-style-knockout .medium .sqs-use--mask{fill:#222}.social-icons-color-standard.social-icons-style-knockout .sqs-svg-icon--list:hover .medium .sqs-use--mask,.social-icons-color-standard.social-icons-style-knockout.sqs-svg-icon--list:hover .medium .sqs-use--mask{fill:rgba(34,34,34,.4)}.social-icons-color-standard.social-icons-style-knockout .sqs-svg-icon--list:hover .medium:hover .sqs-use--mask,.social-icons-color-standard.social-icons-style-knockout.sqs-svg-icon--list:hover .medium:hover .sqs-use--mask{fill:#222}.social-icons-color-standard.social-icons-style-solid .medium .sqs-use--mask{fill:#222}.social-icons-color-standard.social-icons-style-solid .medium .sqs-use--icon{fill:transparent}.social-icons-color-standard.social-icons-style-solid .medium .sqs-use--background{fill:#fff}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .medium .sqs-use--mask,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .medium .sqs-use--mask{fill:rgba(34,34,34,.4)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .medium .sqs-use--icon,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .medium .sqs-use--icon{fill:rgba(255,255,255,.4)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .medium .sqs-use--background,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .medium .sqs-use--background{fill:rgba(255,255,255,0)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .medium:hover .sqs-use--mask,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .medium:hover .sqs-use--mask{fill:#222}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .medium:hover .sqs-use--icon,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .medium:hover .sqs-use--icon{fill:rgba(255,255,255,0)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .medium:hover .sqs-use--background,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .medium:hover .sqs-use--background{fill:#fff}.social-icons-color-standard.social-icons-style-regular .meetup .sqs-use--icon{fill:#e0393e}.social-icons-color-standard.social-icons-style-regular .meetup .sqs-use--background,.social-icons-color-standard.social-icons-style-regular .meetup .sqs-use--mask{fill:transparent}.social-icons-color-standard.social-icons-style-regular .sqs-svg-icon--list:hover .meetup .sqs-use--icon,.social-icons-color-standard.social-icons-style-regular.sqs-svg-icon--list:hover .meetup .sqs-use--icon{fill:rgba(224,57,62,.4)}.social-icons-color-standard.social-icons-style-regular .sqs-svg-icon--list:hover .meetup:hover .sqs-use--icon,.social-icons-color-standard.social-icons-style-regular.sqs-svg-icon--list:hover .meetup:hover .sqs-use--icon{fill:#e0393e}.social-icons-color-standard.social-icons-style-border .meetup{border-color:#e0393e}.social-icons-color-standard.social-icons-style-border .meetup .sqs-use--background{fill:transparent}.social-icons-color-standard.social-icons-style-border .meetup .sqs-use--icon{fill:#e0393e}.social-icons-color-standard.social-icons-style-border .meetup .sqs-use--mask{fill:transparent}.social-icons-color-standard.social-icons-style-border .meetup:hover{background-color:#e0393e}.social-icons-color-standard.social-icons-style-border .meetup:hover .sqs-use--icon{fill:#fff}.social-icons-color-standard.social-icons-style-knockout .meetup .sqs-use--background{fill:transparent}.social-icons-color-standard.social-icons-style-knockout .meetup .sqs-use--icon{fill:transparent}.social-icons-color-standard.social-icons-style-knockout .meetup .sqs-use--mask{fill:#e0393e}.social-icons-color-standard.social-icons-style-knockout .sqs-svg-icon--list:hover .meetup .sqs-use--mask,.social-icons-color-standard.social-icons-style-knockout.sqs-svg-icon--list:hover .meetup .sqs-use--mask{fill:rgba(224,57,62,.4)}.social-icons-color-standard.social-icons-style-knockout .sqs-svg-icon--list:hover .meetup:hover .sqs-use--mask,.social-icons-color-standard.social-icons-style-knockout.sqs-svg-icon--list:hover .meetup:hover .sqs-use--mask{fill:#e0393e}.social-icons-color-standard.social-icons-style-solid .meetup .sqs-use--mask{fill:#e0393e}.social-icons-color-standard.social-icons-style-solid .meetup .sqs-use--icon{fill:transparent}.social-icons-color-standard.social-icons-style-solid .meetup .sqs-use--background{fill:#fff}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .meetup .sqs-use--mask,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .meetup .sqs-use--mask{fill:rgba(224,57,62,.4)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .meetup .sqs-use--icon,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .meetup .sqs-use--icon{fill:rgba(255,255,255,.4)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .meetup .sqs-use--background,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .meetup .sqs-use--background{fill:rgba(255,255,255,0)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .meetup:hover .sqs-use--mask,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .meetup:hover .sqs-use--mask{fill:#e0393e}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .meetup:hover .sqs-use--icon,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .meetup:hover .sqs-use--icon{fill:rgba(255,255,255,0)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .meetup:hover .sqs-use--background,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .meetup:hover .sqs-use--background{fill:#fff}.social-icons-color-standard.social-icons-style-regular .pinterest .sqs-use--icon{fill:#cc2127}.social-icons-color-standard.social-icons-style-regular .pinterest .sqs-use--background,.social-icons-color-standard.social-icons-style-regular .pinterest .sqs-use--mask{fill:transparent}.social-icons-color-standard.social-icons-style-regular .sqs-svg-icon--list:hover .pinterest .sqs-use--icon,.social-icons-color-standard.social-icons-style-regular.sqs-svg-icon--list:hover .pinterest .sqs-use--icon{fill:rgba(204,33,39,.4)}.social-icons-color-standard.social-icons-style-regular .sqs-svg-icon--list:hover .pinterest:hover .sqs-use--icon,.social-icons-color-standard.social-icons-style-regular.sqs-svg-icon--list:hover .pinterest:hover .sqs-use--icon{fill:#cc2127}.social-icons-color-standard.social-icons-style-border .pinterest{border-color:#cc2127}.social-icons-color-standard.social-icons-style-border .pinterest .sqs-use--background{fill:transparent}.social-icons-color-standard.social-icons-style-border .pinterest .sqs-use--icon{fill:#cc2127}.social-icons-color-standard.social-icons-style-border .pinterest .sqs-use--mask{fill:transparent}.social-icons-color-standard.social-icons-style-border .pinterest:hover{background-color:#cc2127}.social-icons-color-standard.social-icons-style-border .pinterest:hover .sqs-use--icon{fill:#fff}.social-icons-color-standard.social-icons-style-knockout .pinterest .sqs-use--background{fill:transparent}.social-icons-color-standard.social-icons-style-knockout .pinterest .sqs-use--icon{fill:transparent}.social-icons-color-standard.social-icons-style-knockout .pinterest .sqs-use--mask{fill:#cc2127}.social-icons-color-standard.social-icons-style-knockout .sqs-svg-icon--list:hover .pinterest .sqs-use--mask,.social-icons-color-standard.social-icons-style-knockout.sqs-svg-icon--list:hover .pinterest .sqs-use--mask{fill:rgba(204,33,39,.4)}.social-icons-color-standard.social-icons-style-knockout .sqs-svg-icon--list:hover .pinterest:hover .sqs-use--mask,.social-icons-color-standard.social-icons-style-knockout.sqs-svg-icon--list:hover .pinterest:hover .sqs-use--mask{fill:#cc2127}.social-icons-color-standard.social-icons-style-solid .pinterest .sqs-use--mask{fill:#cc2127}.social-icons-color-standard.social-icons-style-solid .pinterest .sqs-use--icon{fill:transparent}.social-icons-color-standard.social-icons-style-solid .pinterest .sqs-use--background{fill:#fff}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .pinterest .sqs-use--mask,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .pinterest .sqs-use--mask{fill:rgba(204,33,39,.4)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .pinterest .sqs-use--icon,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .pinterest .sqs-use--icon{fill:rgba(255,255,255,.4)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .pinterest .sqs-use--background,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .pinterest .sqs-use--background{fill:rgba(255,255,255,0)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .pinterest:hover .sqs-use--mask,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .pinterest:hover .sqs-use--mask{fill:#cc2127}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .pinterest:hover .sqs-use--icon,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .pinterest:hover .sqs-use--icon{fill:rgba(255,255,255,0)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .pinterest:hover .sqs-use--background,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .pinterest:hover .sqs-use--background{fill:#fff}.social-icons-color-standard.social-icons-style-regular .rdio .sqs-use--icon{fill:#006ed2}.social-icons-color-standard.social-icons-style-regular .rdio .sqs-use--background,.social-icons-color-standard.social-icons-style-regular .rdio .sqs-use--mask{fill:transparent}.social-icons-color-standard.social-icons-style-regular .sqs-svg-icon--list:hover .rdio .sqs-use--icon,.social-icons-color-standard.social-icons-style-regular.sqs-svg-icon--list:hover .rdio .sqs-use--icon{fill:rgba(0,110,210,.4)}.social-icons-color-standard.social-icons-style-regular .sqs-svg-icon--list:hover .rdio:hover .sqs-use--icon,.social-icons-color-standard.social-icons-style-regular.sqs-svg-icon--list:hover .rdio:hover .sqs-use--icon{fill:#006ed2}.social-icons-color-standard.social-icons-style-border .rdio{border-color:#006ed2}.social-icons-color-standard.social-icons-style-border .rdio .sqs-use--background{fill:transparent}.social-icons-color-standard.social-icons-style-border .rdio .sqs-use--icon{fill:#006ed2}.social-icons-color-standard.social-icons-style-border .rdio .sqs-use--mask{fill:transparent}.social-icons-color-standard.social-icons-style-border .rdio:hover{background-color:#006ed2}.social-icons-color-standard.social-icons-style-border .rdio:hover .sqs-use--icon{fill:#fff}.social-icons-color-standard.social-icons-style-knockout .rdio .sqs-use--background{fill:transparent}.social-icons-color-standard.social-icons-style-knockout .rdio .sqs-use--icon{fill:transparent}.social-icons-color-standard.social-icons-style-knockout .rdio .sqs-use--mask{fill:#006ed2}.social-icons-color-standard.social-icons-style-knockout .sqs-svg-icon--list:hover .rdio .sqs-use--mask,.social-icons-color-standard.social-icons-style-knockout.sqs-svg-icon--list:hover .rdio .sqs-use--mask{fill:rgba(0,110,210,.4)}.social-icons-color-standard.social-icons-style-knockout .sqs-svg-icon--list:hover .rdio:hover .sqs-use--mask,.social-icons-color-standard.social-icons-style-knockout.sqs-svg-icon--list:hover .rdio:hover .sqs-use--mask{fill:#006ed2}.social-icons-color-standard.social-icons-style-solid .rdio .sqs-use--mask{fill:#006ed2}.social-icons-color-standard.social-icons-style-solid .rdio .sqs-use--icon{fill:transparent}.social-icons-color-standard.social-icons-style-solid .rdio .sqs-use--background{fill:#fff}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .rdio .sqs-use--mask,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .rdio .sqs-use--mask{fill:rgba(0,110,210,.4)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .rdio .sqs-use--icon,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .rdio .sqs-use--icon{fill:rgba(255,255,255,.4)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .rdio .sqs-use--background,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .rdio .sqs-use--background{fill:rgba(255,255,255,0)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .rdio:hover .sqs-use--mask,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .rdio:hover .sqs-use--mask{fill:#006ed2}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .rdio:hover .sqs-use--icon,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .rdio:hover .sqs-use--icon{fill:rgba(255,255,255,0)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .rdio:hover .sqs-use--background,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .rdio:hover .sqs-use--background{fill:#fff}.social-icons-color-standard.social-icons-style-regular .reddit .sqs-use--icon{fill:#ff4500}.social-icons-color-standard.social-icons-style-regular .reddit .sqs-use--background,.social-icons-color-standard.social-icons-style-regular .reddit .sqs-use--mask{fill:transparent}.social-icons-color-standard.social-icons-style-regular .sqs-svg-icon--list:hover .reddit .sqs-use--icon,.social-icons-color-standard.social-icons-style-regular.sqs-svg-icon--list:hover .reddit .sqs-use--icon{fill:rgba(255,69,0,.4)}.social-icons-color-standard.social-icons-style-regular .sqs-svg-icon--list:hover .reddit:hover .sqs-use--icon,.social-icons-color-standard.social-icons-style-regular.sqs-svg-icon--list:hover .reddit:hover .sqs-use--icon{fill:#ff4500}.social-icons-color-standard.social-icons-style-border .reddit{border-color:#ff4500}.social-icons-color-standard.social-icons-style-border .reddit .sqs-use--background{fill:transparent}.social-icons-color-standard.social-icons-style-border .reddit .sqs-use--icon{fill:#ff4500}.social-icons-color-standard.social-icons-style-border .reddit .sqs-use--mask{fill:transparent}.social-icons-color-standard.social-icons-style-border .reddit:hover{background-color:#ff4500}.social-icons-color-standard.social-icons-style-border .reddit:hover .sqs-use--icon{fill:#fff}.social-icons-color-standard.social-icons-style-knockout .reddit .sqs-use--background{fill:transparent}.social-icons-color-standard.social-icons-style-knockout .reddit .sqs-use--icon{fill:transparent}.social-icons-color-standard.social-icons-style-knockout .reddit .sqs-use--mask{fill:#ff4500}.social-icons-color-standard.social-icons-style-knockout .sqs-svg-icon--list:hover .reddit .sqs-use--mask,.social-icons-color-standard.social-icons-style-knockout.sqs-svg-icon--list:hover .reddit .sqs-use--mask{fill:rgba(255,69,0,.4)}.social-icons-color-standard.social-icons-style-knockout .sqs-svg-icon--list:hover .reddit:hover .sqs-use--mask,.social-icons-color-standard.social-icons-style-knockout.sqs-svg-icon--list:hover .reddit:hover .sqs-use--mask{fill:#ff4500}.social-icons-color-standard.social-icons-style-solid .reddit .sqs-use--mask{fill:#ff4500}.social-icons-color-standard.social-icons-style-solid .reddit .sqs-use--icon{fill:transparent}.social-icons-color-standard.social-icons-style-solid .reddit .sqs-use--background{fill:#fff}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .reddit .sqs-use--mask,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .reddit .sqs-use--mask{fill:rgba(255,69,0,.4)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .reddit .sqs-use--icon,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .reddit .sqs-use--icon{fill:rgba(255,255,255,.4)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .reddit .sqs-use--background,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .reddit .sqs-use--background{fill:rgba(255,255,255,0)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .reddit:hover .sqs-use--mask,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .reddit:hover .sqs-use--mask{fill:#ff4500}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .reddit:hover .sqs-use--icon,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .reddit:hover .sqs-use--icon{fill:rgba(255,255,255,0)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .reddit:hover .sqs-use--background,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .reddit:hover .sqs-use--background{fill:#fff}.social-icons-color-standard.social-icons-style-regular .rss .sqs-use--icon{fill:#222}.social-icons-color-standard.social-icons-style-regular .rss .sqs-use--background,.social-icons-color-standard.social-icons-style-regular .rss .sqs-use--mask{fill:transparent}.social-icons-color-standard.social-icons-style-regular .sqs-svg-icon--list:hover .rss .sqs-use--icon,.social-icons-color-standard.social-icons-style-regular.sqs-svg-icon--list:hover .rss .sqs-use--icon{fill:rgba(34,34,34,.4)}.social-icons-color-standard.social-icons-style-regular .sqs-svg-icon--list:hover .rss:hover .sqs-use--icon,.social-icons-color-standard.social-icons-style-regular.sqs-svg-icon--list:hover .rss:hover .sqs-use--icon{fill:#222}.social-icons-color-standard.social-icons-style-border .rss{border-color:#222}.social-icons-color-standard.social-icons-style-border .rss .sqs-use--background{fill:transparent}.social-icons-color-standard.social-icons-style-border .rss .sqs-use--icon{fill:#222}.social-icons-color-standard.social-icons-style-border .rss .sqs-use--mask{fill:transparent}.social-icons-color-standard.social-icons-style-border .rss:hover{background-color:#222}.social-icons-color-standard.social-icons-style-border .rss:hover .sqs-use--icon{fill:#fff}.social-icons-color-standard.social-icons-style-knockout .rss .sqs-use--background{fill:transparent}.social-icons-color-standard.social-icons-style-knockout .rss .sqs-use--icon{fill:transparent}.social-icons-color-standard.social-icons-style-knockout .rss .sqs-use--mask{fill:#222}.social-icons-color-standard.social-icons-style-knockout .sqs-svg-icon--list:hover .rss .sqs-use--mask,.social-icons-color-standard.social-icons-style-knockout.sqs-svg-icon--list:hover .rss .sqs-use--mask{fill:rgba(34,34,34,.4)}.social-icons-color-standard.social-icons-style-knockout .sqs-svg-icon--list:hover .rss:hover .sqs-use--mask,.social-icons-color-standard.social-icons-style-knockout.sqs-svg-icon--list:hover .rss:hover .sqs-use--mask{fill:#222}.social-icons-color-standard.social-icons-style-solid .rss .sqs-use--mask{fill:#222}.social-icons-color-standard.social-icons-style-solid .rss .sqs-use--icon{fill:transparent}.social-icons-color-standard.social-icons-style-solid .rss .sqs-use--background{fill:#fff}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .rss .sqs-use--mask,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .rss .sqs-use--mask{fill:rgba(34,34,34,.4)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .rss .sqs-use--icon,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .rss .sqs-use--icon{fill:rgba(255,255,255,.4)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .rss .sqs-use--background,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .rss .sqs-use--background{fill:rgba(255,255,255,0)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .rss:hover .sqs-use--mask,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .rss:hover .sqs-use--mask{fill:#222}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .rss:hover .sqs-use--icon,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .rss:hover .sqs-use--icon{fill:rgba(255,255,255,0)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .rss:hover .sqs-use--background,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .rss:hover .sqs-use--background{fill:#fff}.social-icons-color-standard.social-icons-style-regular .smugmug .sqs-use--icon{fill:#7dbb00}.social-icons-color-standard.social-icons-style-regular .smugmug .sqs-use--background,.social-icons-color-standard.social-icons-style-regular .smugmug .sqs-use--mask{fill:transparent}.social-icons-color-standard.social-icons-style-regular .sqs-svg-icon--list:hover .smugmug .sqs-use--icon,.social-icons-color-standard.social-icons-style-regular.sqs-svg-icon--list:hover .smugmug .sqs-use--icon{fill:rgba(125,187,0,.4)}.social-icons-color-standard.social-icons-style-regular .sqs-svg-icon--list:hover .smugmug:hover .sqs-use--icon,.social-icons-color-standard.social-icons-style-regular.sqs-svg-icon--list:hover .smugmug:hover .sqs-use--icon{fill:#7dbb00}.social-icons-color-standard.social-icons-style-border .smugmug{border-color:#7dbb00}.social-icons-color-standard.social-icons-style-border .smugmug .sqs-use--background{fill:transparent}.social-icons-color-standard.social-icons-style-border .smugmug .sqs-use--icon{fill:#7dbb00}.social-icons-color-standard.social-icons-style-border .smugmug .sqs-use--mask{fill:transparent}.social-icons-color-standard.social-icons-style-border .smugmug:hover{background-color:#7dbb00}.social-icons-color-standard.social-icons-style-border .smugmug:hover .sqs-use--icon{fill:#fff}.social-icons-color-standard.social-icons-style-knockout .smugmug .sqs-use--background{fill:transparent}.social-icons-color-standard.social-icons-style-knockout .smugmug .sqs-use--icon{fill:transparent}.social-icons-color-standard.social-icons-style-knockout .smugmug .sqs-use--mask{fill:#7dbb00}.social-icons-color-standard.social-icons-style-knockout .sqs-svg-icon--list:hover .smugmug .sqs-use--mask,.social-icons-color-standard.social-icons-style-knockout.sqs-svg-icon--list:hover .smugmug .sqs-use--mask{fill:rgba(125,187,0,.4)}.social-icons-color-standard.social-icons-style-knockout .sqs-svg-icon--list:hover .smugmug:hover .sqs-use--mask,.social-icons-color-standard.social-icons-style-knockout.sqs-svg-icon--list:hover .smugmug:hover .sqs-use--mask{fill:#7dbb00}.social-icons-color-standard.social-icons-style-solid .smugmug .sqs-use--mask{fill:#7dbb00}.social-icons-color-standard.social-icons-style-solid .smugmug .sqs-use--icon{fill:transparent}.social-icons-color-standard.social-icons-style-solid .smugmug .sqs-use--background{fill:#fff}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .smugmug .sqs-use--mask,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .smugmug .sqs-use--mask{fill:rgba(125,187,0,.4)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .smugmug .sqs-use--icon,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .smugmug .sqs-use--icon{fill:rgba(255,255,255,.4)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .smugmug .sqs-use--background,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .smugmug .sqs-use--background{fill:rgba(255,255,255,0)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .smugmug:hover .sqs-use--mask,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .smugmug:hover .sqs-use--mask{fill:#7dbb00}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .smugmug:hover .sqs-use--icon,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .smugmug:hover .sqs-use--icon{fill:rgba(255,255,255,0)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .smugmug:hover .sqs-use--background,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .smugmug:hover .sqs-use--background{fill:#fff}.social-icons-color-standard.social-icons-style-regular .soundcloud .sqs-use--icon{fill:#f60}.social-icons-color-standard.social-icons-style-regular .soundcloud .sqs-use--background,.social-icons-color-standard.social-icons-style-regular .soundcloud .sqs-use--mask{fill:transparent}.social-icons-color-standard.social-icons-style-regular .sqs-svg-icon--list:hover .soundcloud .sqs-use--icon,.social-icons-color-standard.social-icons-style-regular.sqs-svg-icon--list:hover .soundcloud .sqs-use--icon{fill:rgba(255,102,0,.4)}.social-icons-color-standard.social-icons-style-regular .sqs-svg-icon--list:hover .soundcloud:hover .sqs-use--icon,.social-icons-color-standard.social-icons-style-regular.sqs-svg-icon--list:hover .soundcloud:hover .sqs-use--icon{fill:#f60}.social-icons-color-standard.social-icons-style-border .soundcloud{border-color:#f60}.social-icons-color-standard.social-icons-style-border .soundcloud .sqs-use--background{fill:transparent}.social-icons-color-standard.social-icons-style-border .soundcloud .sqs-use--icon{fill:#f60}.social-icons-color-standard.social-icons-style-border .soundcloud .sqs-use--mask{fill:transparent}.social-icons-color-standard.social-icons-style-border .soundcloud:hover{background-color:#f60}.social-icons-color-standard.social-icons-style-border .soundcloud:hover .sqs-use--icon{fill:#fff}.social-icons-color-standard.social-icons-style-knockout .soundcloud .sqs-use--background{fill:transparent}.social-icons-color-standard.social-icons-style-knockout .soundcloud .sqs-use--icon{fill:transparent}.social-icons-color-standard.social-icons-style-knockout .soundcloud .sqs-use--mask{fill:#f60}.social-icons-color-standard.social-icons-style-knockout .sqs-svg-icon--list:hover .soundcloud .sqs-use--mask,.social-icons-color-standard.social-icons-style-knockout.sqs-svg-icon--list:hover .soundcloud .sqs-use--mask{fill:rgba(255,102,0,.4)}.social-icons-color-standard.social-icons-style-knockout .sqs-svg-icon--list:hover .soundcloud:hover .sqs-use--mask,.social-icons-color-standard.social-icons-style-knockout.sqs-svg-icon--list:hover .soundcloud:hover .sqs-use--mask{fill:#f60}.social-icons-color-standard.social-icons-style-solid .soundcloud .sqs-use--mask{fill:#f60}.social-icons-color-standard.social-icons-style-solid .soundcloud .sqs-use--icon{fill:transparent}.social-icons-color-standard.social-icons-style-solid .soundcloud .sqs-use--background{fill:#fff}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .soundcloud .sqs-use--mask,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .soundcloud .sqs-use--mask{fill:rgba(255,102,0,.4)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .soundcloud .sqs-use--icon,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .soundcloud .sqs-use--icon{fill:rgba(255,255,255,.4)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .soundcloud .sqs-use--background,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .soundcloud .sqs-use--background{fill:rgba(255,255,255,0)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .soundcloud:hover .sqs-use--mask,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .soundcloud:hover .sqs-use--mask{fill:#f60}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .soundcloud:hover .sqs-use--icon,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .soundcloud:hover .sqs-use--icon{fill:rgba(255,255,255,0)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .soundcloud:hover .sqs-use--background,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .soundcloud:hover .sqs-use--background{fill:#fff}.social-icons-color-standard.social-icons-style-regular .spotify .sqs-use--icon{fill:#84bd00}.social-icons-color-standard.social-icons-style-regular .spotify .sqs-use--background,.social-icons-color-standard.social-icons-style-regular .spotify .sqs-use--mask{fill:transparent}.social-icons-color-standard.social-icons-style-regular .sqs-svg-icon--list:hover .spotify .sqs-use--icon,.social-icons-color-standard.social-icons-style-regular.sqs-svg-icon--list:hover .spotify .sqs-use--icon{fill:rgba(132,189,0,.4)}.social-icons-color-standard.social-icons-style-regular .sqs-svg-icon--list:hover .spotify:hover .sqs-use--icon,.social-icons-color-standard.social-icons-style-regular.sqs-svg-icon--list:hover .spotify:hover .sqs-use--icon{fill:#84bd00}.social-icons-color-standard.social-icons-style-border .spotify{border-color:#84bd00}.social-icons-color-standard.social-icons-style-border .spotify .sqs-use--background{fill:transparent}.social-icons-color-standard.social-icons-style-border .spotify .sqs-use--icon{fill:#84bd00}.social-icons-color-standard.social-icons-style-border .spotify .sqs-use--mask{fill:transparent}.social-icons-color-standard.social-icons-style-border .spotify:hover{background-color:#84bd00}.social-icons-color-standard.social-icons-style-border .spotify:hover .sqs-use--icon{fill:#fff}.social-icons-color-standard.social-icons-style-knockout .spotify .sqs-use--background{fill:transparent}.social-icons-color-standard.social-icons-style-knockout .spotify .sqs-use--icon{fill:transparent}.social-icons-color-standard.social-icons-style-knockout .spotify .sqs-use--mask{fill:#84bd00}.social-icons-color-standard.social-icons-style-knockout .sqs-svg-icon--list:hover .spotify .sqs-use--mask,.social-icons-color-standard.social-icons-style-knockout.sqs-svg-icon--list:hover .spotify .sqs-use--mask{fill:rgba(132,189,0,.4)}.social-icons-color-standard.social-icons-style-knockout .sqs-svg-icon--list:hover .spotify:hover .sqs-use--mask,.social-icons-color-standard.social-icons-style-knockout.sqs-svg-icon--list:hover .spotify:hover .sqs-use--mask{fill:#84bd00}.social-icons-color-standard.social-icons-style-solid .spotify .sqs-use--mask{fill:#84bd00}.social-icons-color-standard.social-icons-style-solid .spotify .sqs-use--icon{fill:transparent}.social-icons-color-standard.social-icons-style-solid .spotify .sqs-use--background{fill:#fff}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .spotify .sqs-use--mask,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .spotify .sqs-use--mask{fill:rgba(132,189,0,.4)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .spotify .sqs-use--icon,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .spotify .sqs-use--icon{fill:rgba(255,255,255,.4)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .spotify .sqs-use--background,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .spotify .sqs-use--background{fill:rgba(255,255,255,0)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .spotify:hover .sqs-use--mask,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .spotify:hover .sqs-use--mask{fill:#84bd00}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .spotify:hover .sqs-use--icon,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .spotify:hover .sqs-use--icon{fill:rgba(255,255,255,0)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .spotify:hover .sqs-use--background,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .spotify:hover .sqs-use--background{fill:#fff}.social-icons-color-standard.social-icons-style-regular .squarespace .sqs-use--icon{fill:#222}.social-icons-color-standard.social-icons-style-regular .squarespace .sqs-use--background,.social-icons-color-standard.social-icons-style-regular .squarespace .sqs-use--mask{fill:transparent}.social-icons-color-standard.social-icons-style-regular .sqs-svg-icon--list:hover .squarespace .sqs-use--icon,.social-icons-color-standard.social-icons-style-regular.sqs-svg-icon--list:hover .squarespace .sqs-use--icon{fill:rgba(34,34,34,.4)}.social-icons-color-standard.social-icons-style-regular .sqs-svg-icon--list:hover .squarespace:hover .sqs-use--icon,.social-icons-color-standard.social-icons-style-regular.sqs-svg-icon--list:hover .squarespace:hover .sqs-use--icon{fill:#222}.social-icons-color-standard.social-icons-style-border .squarespace{border-color:#222}.social-icons-color-standard.social-icons-style-border .squarespace .sqs-use--background{fill:transparent}.social-icons-color-standard.social-icons-style-border .squarespace .sqs-use--icon{fill:#222}.social-icons-color-standard.social-icons-style-border .squarespace .sqs-use--mask{fill:transparent}.social-icons-color-standard.social-icons-style-border .squarespace:hover{background-color:#222}.social-icons-color-standard.social-icons-style-border .squarespace:hover .sqs-use--icon{fill:#fff}.social-icons-color-standard.social-icons-style-knockout .squarespace .sqs-use--background{fill:transparent}.social-icons-color-standard.social-icons-style-knockout .squarespace .sqs-use--icon{fill:transparent}.social-icons-color-standard.social-icons-style-knockout .squarespace .sqs-use--mask{fill:#222}.social-icons-color-standard.social-icons-style-knockout .sqs-svg-icon--list:hover .squarespace .sqs-use--mask,.social-icons-color-standard.social-icons-style-knockout.sqs-svg-icon--list:hover .squarespace .sqs-use--mask{fill:rgba(34,34,34,.4)}.social-icons-color-standard.social-icons-style-knockout .sqs-svg-icon--list:hover .squarespace:hover .sqs-use--mask,.social-icons-color-standard.social-icons-style-knockout.sqs-svg-icon--list:hover .squarespace:hover .sqs-use--mask{fill:#222}.social-icons-color-standard.social-icons-style-solid .squarespace .sqs-use--mask{fill:#222}.social-icons-color-standard.social-icons-style-solid .squarespace .sqs-use--icon{fill:transparent}.social-icons-color-standard.social-icons-style-solid .squarespace .sqs-use--background{fill:#fff}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .squarespace .sqs-use--mask,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .squarespace .sqs-use--mask{fill:rgba(34,34,34,.4)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .squarespace .sqs-use--icon,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .squarespace .sqs-use--icon{fill:rgba(255,255,255,.4)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .squarespace .sqs-use--background,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .squarespace .sqs-use--background{fill:rgba(255,255,255,0)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .squarespace:hover .sqs-use--mask,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .squarespace:hover .sqs-use--mask{fill:#222}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .squarespace:hover .sqs-use--icon,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .squarespace:hover .sqs-use--icon{fill:rgba(255,255,255,0)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .squarespace:hover .sqs-use--background,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .squarespace:hover .sqs-use--background{fill:#fff}.social-icons-color-standard.social-icons-style-regular .stumbleupon .sqs-use--icon{fill:#eb4924}.social-icons-color-standard.social-icons-style-regular .stumbleupon .sqs-use--background,.social-icons-color-standard.social-icons-style-regular .stumbleupon .sqs-use--mask{fill:transparent}.social-icons-color-standard.social-icons-style-regular .sqs-svg-icon--list:hover .stumbleupon .sqs-use--icon,.social-icons-color-standard.social-icons-style-regular.sqs-svg-icon--list:hover .stumbleupon .sqs-use--icon{fill:rgba(235,73,36,.4)}.social-icons-color-standard.social-icons-style-regular .sqs-svg-icon--list:hover .stumbleupon:hover .sqs-use--icon,.social-icons-color-standard.social-icons-style-regular.sqs-svg-icon--list:hover .stumbleupon:hover .sqs-use--icon{fill:#eb4924}.social-icons-color-standard.social-icons-style-border .stumbleupon{border-color:#eb4924}.social-icons-color-standard.social-icons-style-border .stumbleupon .sqs-use--background{fill:transparent}.social-icons-color-standard.social-icons-style-border .stumbleupon .sqs-use--icon{fill:#eb4924}.social-icons-color-standard.social-icons-style-border .stumbleupon .sqs-use--mask{fill:transparent}.social-icons-color-standard.social-icons-style-border .stumbleupon:hover{background-color:#eb4924}.social-icons-color-standard.social-icons-style-border .stumbleupon:hover .sqs-use--icon{fill:#fff}.social-icons-color-standard.social-icons-style-knockout .stumbleupon .sqs-use--background{fill:transparent}.social-icons-color-standard.social-icons-style-knockout .stumbleupon .sqs-use--icon{fill:transparent}.social-icons-color-standard.social-icons-style-knockout .stumbleupon .sqs-use--mask{fill:#eb4924}.social-icons-color-standard.social-icons-style-knockout .sqs-svg-icon--list:hover .stumbleupon .sqs-use--mask,.social-icons-color-standard.social-icons-style-knockout.sqs-svg-icon--list:hover .stumbleupon .sqs-use--mask{fill:rgba(235,73,36,.4)}.social-icons-color-standard.social-icons-style-knockout .sqs-svg-icon--list:hover .stumbleupon:hover .sqs-use--mask,.social-icons-color-standard.social-icons-style-knockout.sqs-svg-icon--list:hover .stumbleupon:hover .sqs-use--mask{fill:#eb4924}.social-icons-color-standard.social-icons-style-solid .stumbleupon .sqs-use--mask{fill:#eb4924}.social-icons-color-standard.social-icons-style-solid .stumbleupon .sqs-use--icon{fill:transparent}.social-icons-color-standard.social-icons-style-solid .stumbleupon .sqs-use--background{fill:#fff}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .stumbleupon .sqs-use--mask,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .stumbleupon .sqs-use--mask{fill:rgba(235,73,36,.4)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .stumbleupon .sqs-use--icon,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .stumbleupon .sqs-use--icon{fill:rgba(255,255,255,.4)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .stumbleupon .sqs-use--background,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .stumbleupon .sqs-use--background{fill:rgba(255,255,255,0)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .stumbleupon:hover .sqs-use--mask,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .stumbleupon:hover .sqs-use--mask{fill:#eb4924}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .stumbleupon:hover .sqs-use--icon,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .stumbleupon:hover .sqs-use--icon{fill:rgba(255,255,255,0)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .stumbleupon:hover .sqs-use--background,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .stumbleupon:hover .sqs-use--background{fill:#fff}.social-icons-color-standard.social-icons-style-regular .tumblr .sqs-use--icon{fill:#35465d}.social-icons-color-standard.social-icons-style-regular .tumblr .sqs-use--background,.social-icons-color-standard.social-icons-style-regular .tumblr .sqs-use--mask{fill:transparent}.social-icons-color-standard.social-icons-style-regular .sqs-svg-icon--list:hover .tumblr .sqs-use--icon,.social-icons-color-standard.social-icons-style-regular.sqs-svg-icon--list:hover .tumblr .sqs-use--icon{fill:rgba(53,70,93,.4)}.social-icons-color-standard.social-icons-style-regular .sqs-svg-icon--list:hover .tumblr:hover .sqs-use--icon,.social-icons-color-standard.social-icons-style-regular.sqs-svg-icon--list:hover .tumblr:hover .sqs-use--icon{fill:#35465d}.social-icons-color-standard.social-icons-style-border .tumblr{border-color:#35465d}.social-icons-color-standard.social-icons-style-border .tumblr .sqs-use--background{fill:transparent}.social-icons-color-standard.social-icons-style-border .tumblr .sqs-use--icon{fill:#35465d}.social-icons-color-standard.social-icons-style-border .tumblr .sqs-use--mask{fill:transparent}.social-icons-color-standard.social-icons-style-border .tumblr:hover{background-color:#35465d}.social-icons-color-standard.social-icons-style-border .tumblr:hover .sqs-use--icon{fill:#fff}.social-icons-color-standard.social-icons-style-knockout .tumblr .sqs-use--background{fill:transparent}.social-icons-color-standard.social-icons-style-knockout .tumblr .sqs-use--icon{fill:transparent}.social-icons-color-standard.social-icons-style-knockout .tumblr .sqs-use--mask{fill:#35465d}.social-icons-color-standard.social-icons-style-knockout .sqs-svg-icon--list:hover .tumblr .sqs-use--mask,.social-icons-color-standard.social-icons-style-knockout.sqs-svg-icon--list:hover .tumblr .sqs-use--mask{fill:rgba(53,70,93,.4)}.social-icons-color-standard.social-icons-style-knockout .sqs-svg-icon--list:hover .tumblr:hover .sqs-use--mask,.social-icons-color-standard.social-icons-style-knockout.sqs-svg-icon--list:hover .tumblr:hover .sqs-use--mask{fill:#35465d}.social-icons-color-standard.social-icons-style-solid .tumblr .sqs-use--mask{fill:#35465d}.social-icons-color-standard.social-icons-style-solid .tumblr .sqs-use--icon{fill:transparent}.social-icons-color-standard.social-icons-style-solid .tumblr .sqs-use--background{fill:#fff}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .tumblr .sqs-use--mask,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .tumblr .sqs-use--mask{fill:rgba(53,70,93,.4)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .tumblr .sqs-use--icon,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .tumblr .sqs-use--icon{fill:rgba(255,255,255,.4)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .tumblr .sqs-use--background,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .tumblr .sqs-use--background{fill:rgba(255,255,255,0)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .tumblr:hover .sqs-use--mask,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .tumblr:hover .sqs-use--mask{fill:#35465d}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .tumblr:hover .sqs-use--icon,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .tumblr:hover .sqs-use--icon{fill:rgba(255,255,255,0)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .tumblr:hover .sqs-use--background,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .tumblr:hover .sqs-use--background{fill:#fff}.social-icons-color-standard.social-icons-style-regular .twitch .sqs-use--icon{fill:#6441a5}.social-icons-color-standard.social-icons-style-regular .twitch .sqs-use--background,.social-icons-color-standard.social-icons-style-regular .twitch .sqs-use--mask{fill:transparent}.social-icons-color-standard.social-icons-style-regular .sqs-svg-icon--list:hover .twitch .sqs-use--icon,.social-icons-color-standard.social-icons-style-regular.sqs-svg-icon--list:hover .twitch .sqs-use--icon{fill:rgba(100,65,165,.4)}.social-icons-color-standard.social-icons-style-regular .sqs-svg-icon--list:hover .twitch:hover .sqs-use--icon,.social-icons-color-standard.social-icons-style-regular.sqs-svg-icon--list:hover .twitch:hover .sqs-use--icon{fill:#6441a5}.social-icons-color-standard.social-icons-style-border .twitch{border-color:#6441a5}.social-icons-color-standard.social-icons-style-border .twitch .sqs-use--background{fill:transparent}.social-icons-color-standard.social-icons-style-border .twitch .sqs-use--icon{fill:#6441a5}.social-icons-color-standard.social-icons-style-border .twitch .sqs-use--mask{fill:transparent}.social-icons-color-standard.social-icons-style-border .twitch:hover{background-color:#6441a5}.social-icons-color-standard.social-icons-style-border .twitch:hover .sqs-use--icon{fill:#fff}.social-icons-color-standard.social-icons-style-knockout .twitch .sqs-use--background{fill:transparent}.social-icons-color-standard.social-icons-style-knockout .twitch .sqs-use--icon{fill:transparent}.social-icons-color-standard.social-icons-style-knockout .twitch .sqs-use--mask{fill:#6441a5}.social-icons-color-standard.social-icons-style-knockout .sqs-svg-icon--list:hover .twitch .sqs-use--mask,.social-icons-color-standard.social-icons-style-knockout.sqs-svg-icon--list:hover .twitch .sqs-use--mask{fill:rgba(100,65,165,.4)}.social-icons-color-standard.social-icons-style-knockout .sqs-svg-icon--list:hover .twitch:hover .sqs-use--mask,.social-icons-color-standard.social-icons-style-knockout.sqs-svg-icon--list:hover .twitch:hover .sqs-use--mask{fill:#6441a5}.social-icons-color-standard.social-icons-style-solid .twitch .sqs-use--mask{fill:#6441a5}.social-icons-color-standard.social-icons-style-solid .twitch .sqs-use--icon{fill:transparent}.social-icons-color-standard.social-icons-style-solid .twitch .sqs-use--background{fill:#fff}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .twitch .sqs-use--mask,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .twitch .sqs-use--mask{fill:rgba(100,65,165,.4)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .twitch .sqs-use--icon,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .twitch .sqs-use--icon{fill:rgba(255,255,255,.4)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .twitch .sqs-use--background,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .twitch .sqs-use--background{fill:rgba(255,255,255,0)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .twitch:hover .sqs-use--mask,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .twitch:hover .sqs-use--mask{fill:#6441a5}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .twitch:hover .sqs-use--icon,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .twitch:hover .sqs-use--icon{fill:rgba(255,255,255,0)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .twitch:hover .sqs-use--background,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .twitch:hover .sqs-use--background{fill:#fff}.social-icons-color-standard.social-icons-style-regular .twitter .sqs-use--icon{fill:#55acee}.social-icons-color-standard.social-icons-style-regular .twitter .sqs-use--background,.social-icons-color-standard.social-icons-style-regular .twitter .sqs-use--mask{fill:transparent}.social-icons-color-standard.social-icons-style-regular .sqs-svg-icon--list:hover .twitter .sqs-use--icon,.social-icons-color-standard.social-icons-style-regular.sqs-svg-icon--list:hover .twitter .sqs-use--icon{fill:rgba(85,172,238,.4)}.social-icons-color-standard.social-icons-style-regular .sqs-svg-icon--list:hover .twitter:hover .sqs-use--icon,.social-icons-color-standard.social-icons-style-regular.sqs-svg-icon--list:hover .twitter:hover .sqs-use--icon{fill:#55acee}.social-icons-color-standard.social-icons-style-border .twitter{border-color:#55acee}.social-icons-color-standard.social-icons-style-border .twitter .sqs-use--background{fill:transparent}.social-icons-color-standard.social-icons-style-border .twitter .sqs-use--icon{fill:#55acee}.social-icons-color-standard.social-icons-style-border .twitter .sqs-use--mask{fill:transparent}.social-icons-color-standard.social-icons-style-border .twitter:hover{background-color:#55acee}.social-icons-color-standard.social-icons-style-border .twitter:hover .sqs-use--icon{fill:#fff}.social-icons-color-standard.social-icons-style-knockout .twitter .sqs-use--background{fill:transparent}.social-icons-color-standard.social-icons-style-knockout .twitter .sqs-use--icon{fill:transparent}.social-icons-color-standard.social-icons-style-knockout .twitter .sqs-use--mask{fill:#55acee}.social-icons-color-standard.social-icons-style-knockout .sqs-svg-icon--list:hover .twitter .sqs-use--mask,.social-icons-color-standard.social-icons-style-knockout.sqs-svg-icon--list:hover .twitter .sqs-use--mask{fill:rgba(85,172,238,.4)}.social-icons-color-standard.social-icons-style-knockout .sqs-svg-icon--list:hover .twitter:hover .sqs-use--mask,.social-icons-color-standard.social-icons-style-knockout.sqs-svg-icon--list:hover .twitter:hover .sqs-use--mask{fill:#55acee}.social-icons-color-standard.social-icons-style-solid .twitter .sqs-use--mask{fill:#55acee}.social-icons-color-standard.social-icons-style-solid .twitter .sqs-use--icon{fill:transparent}.social-icons-color-standard.social-icons-style-solid .twitter .sqs-use--background{fill:#fff}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .twitter .sqs-use--mask,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .twitter .sqs-use--mask{fill:rgba(85,172,238,.4)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .twitter .sqs-use--icon,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .twitter .sqs-use--icon{fill:rgba(255,255,255,.4)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .twitter .sqs-use--background,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .twitter .sqs-use--background{fill:rgba(255,255,255,0)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .twitter:hover .sqs-use--mask,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .twitter:hover .sqs-use--mask{fill:#55acee}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .twitter:hover .sqs-use--icon,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .twitter:hover .sqs-use--icon{fill:rgba(255,255,255,0)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .twitter:hover .sqs-use--background,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .twitter:hover .sqs-use--background{fill:#fff}.social-icons-color-standard.social-icons-style-regular .vevo .sqs-use--icon{fill:#ff0031}.social-icons-color-standard.social-icons-style-regular .vevo .sqs-use--background,.social-icons-color-standard.social-icons-style-regular .vevo .sqs-use--mask{fill:transparent}.social-icons-color-standard.social-icons-style-regular .sqs-svg-icon--list:hover .vevo .sqs-use--icon,.social-icons-color-standard.social-icons-style-regular.sqs-svg-icon--list:hover .vevo .sqs-use--icon{fill:rgba(255,0,49,.4)}.social-icons-color-standard.social-icons-style-regular .sqs-svg-icon--list:hover .vevo:hover .sqs-use--icon,.social-icons-color-standard.social-icons-style-regular.sqs-svg-icon--list:hover .vevo:hover .sqs-use--icon{fill:#ff0031}.social-icons-color-standard.social-icons-style-border .vevo{border-color:#ff0031}.social-icons-color-standard.social-icons-style-border .vevo .sqs-use--background{fill:transparent}.social-icons-color-standard.social-icons-style-border .vevo .sqs-use--icon{fill:#ff0031}.social-icons-color-standard.social-icons-style-border .vevo .sqs-use--mask{fill:transparent}.social-icons-color-standard.social-icons-style-border .vevo:hover{background-color:#ff0031}.social-icons-color-standard.social-icons-style-border .vevo:hover .sqs-use--icon{fill:#fff}.social-icons-color-standard.social-icons-style-knockout .vevo .sqs-use--background{fill:transparent}.social-icons-color-standard.social-icons-style-knockout .vevo .sqs-use--icon{fill:transparent}.social-icons-color-standard.social-icons-style-knockout .vevo .sqs-use--mask{fill:#ff0031}.social-icons-color-standard.social-icons-style-knockout .sqs-svg-icon--list:hover .vevo .sqs-use--mask,.social-icons-color-standard.social-icons-style-knockout.sqs-svg-icon--list:hover .vevo .sqs-use--mask{fill:rgba(255,0,49,.4)}.social-icons-color-standard.social-icons-style-knockout .sqs-svg-icon--list:hover .vevo:hover .sqs-use--mask,.social-icons-color-standard.social-icons-style-knockout.sqs-svg-icon--list:hover .vevo:hover .sqs-use--mask{fill:#ff0031}.social-icons-color-standard.social-icons-style-solid .vevo .sqs-use--mask{fill:#ff0031}.social-icons-color-standard.social-icons-style-solid .vevo .sqs-use--icon{fill:transparent}.social-icons-color-standard.social-icons-style-solid .vevo .sqs-use--background{fill:#fff}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .vevo .sqs-use--mask,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .vevo .sqs-use--mask{fill:rgba(255,0,49,.4)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .vevo .sqs-use--icon,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .vevo .sqs-use--icon{fill:rgba(255,255,255,.4)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .vevo .sqs-use--background,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .vevo .sqs-use--background{fill:rgba(255,255,255,0)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .vevo:hover .sqs-use--mask,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .vevo:hover .sqs-use--mask{fill:#ff0031}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .vevo:hover .sqs-use--icon,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .vevo:hover .sqs-use--icon{fill:rgba(255,255,255,0)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .vevo:hover .sqs-use--background,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .vevo:hover .sqs-use--background{fill:#fff}.social-icons-color-standard.social-icons-style-regular .vimeo .sqs-use--icon{fill:#1ab7ea}.social-icons-color-standard.social-icons-style-regular .vimeo .sqs-use--background,.social-icons-color-standard.social-icons-style-regular .vimeo .sqs-use--mask{fill:transparent}.social-icons-color-standard.social-icons-style-regular .sqs-svg-icon--list:hover .vimeo .sqs-use--icon,.social-icons-color-standard.social-icons-style-regular.sqs-svg-icon--list:hover .vimeo .sqs-use--icon{fill:rgba(26,183,234,.4)}.social-icons-color-standard.social-icons-style-regular .sqs-svg-icon--list:hover .vimeo:hover .sqs-use--icon,.social-icons-color-standard.social-icons-style-regular.sqs-svg-icon--list:hover .vimeo:hover .sqs-use--icon{fill:#1ab7ea}.social-icons-color-standard.social-icons-style-border .vimeo{border-color:#1ab7ea}.social-icons-color-standard.social-icons-style-border .vimeo .sqs-use--background{fill:transparent}.social-icons-color-standard.social-icons-style-border .vimeo .sqs-use--icon{fill:#1ab7ea}.social-icons-color-standard.social-icons-style-border .vimeo .sqs-use--mask{fill:transparent}.social-icons-color-standard.social-icons-style-border .vimeo:hover{background-color:#1ab7ea}.social-icons-color-standard.social-icons-style-border .vimeo:hover .sqs-use--icon{fill:#fff}.social-icons-color-standard.social-icons-style-knockout .vimeo .sqs-use--background{fill:transparent}.social-icons-color-standard.social-icons-style-knockout .vimeo .sqs-use--icon{fill:transparent}.social-icons-color-standard.social-icons-style-knockout .vimeo .sqs-use--mask{fill:#1ab7ea}.social-icons-color-standard.social-icons-style-knockout .sqs-svg-icon--list:hover .vimeo .sqs-use--mask,.social-icons-color-standard.social-icons-style-knockout.sqs-svg-icon--list:hover .vimeo .sqs-use--mask{fill:rgba(26,183,234,.4)}.social-icons-color-standard.social-icons-style-knockout .sqs-svg-icon--list:hover .vimeo:hover .sqs-use--mask,.social-icons-color-standard.social-icons-style-knockout.sqs-svg-icon--list:hover .vimeo:hover .sqs-use--mask{fill:#1ab7ea}.social-icons-color-standard.social-icons-style-solid .vimeo .sqs-use--mask{fill:#1ab7ea}.social-icons-color-standard.social-icons-style-solid .vimeo .sqs-use--icon{fill:transparent}.social-icons-color-standard.social-icons-style-solid .vimeo .sqs-use--background{fill:#fff}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .vimeo .sqs-use--mask,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .vimeo .sqs-use--mask{fill:rgba(26,183,234,.4)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .vimeo .sqs-use--icon,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .vimeo .sqs-use--icon{fill:rgba(255,255,255,.4)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .vimeo .sqs-use--background,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .vimeo .sqs-use--background{fill:rgba(255,255,255,0)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .vimeo:hover .sqs-use--mask,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .vimeo:hover .sqs-use--mask{fill:#1ab7ea}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .vimeo:hover .sqs-use--icon,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .vimeo:hover .sqs-use--icon{fill:rgba(255,255,255,0)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .vimeo:hover .sqs-use--background,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .vimeo:hover .sqs-use--background{fill:#fff}.social-icons-color-standard.social-icons-style-regular .vine .sqs-use--icon{fill:#00b488}.social-icons-color-standard.social-icons-style-regular .vine .sqs-use--background,.social-icons-color-standard.social-icons-style-regular .vine .sqs-use--mask{fill:transparent}.social-icons-color-standard.social-icons-style-regular .sqs-svg-icon--list:hover .vine .sqs-use--icon,.social-icons-color-standard.social-icons-style-regular.sqs-svg-icon--list:hover .vine .sqs-use--icon{fill:rgba(0,180,136,.4)}.social-icons-color-standard.social-icons-style-regular .sqs-svg-icon--list:hover .vine:hover .sqs-use--icon,.social-icons-color-standard.social-icons-style-regular.sqs-svg-icon--list:hover .vine:hover .sqs-use--icon{fill:#00b488}.social-icons-color-standard.social-icons-style-border .vine{border-color:#00b488}.social-icons-color-standard.social-icons-style-border .vine .sqs-use--background{fill:transparent}.social-icons-color-standard.social-icons-style-border .vine .sqs-use--icon{fill:#00b488}.social-icons-color-standard.social-icons-style-border .vine .sqs-use--mask{fill:transparent}.social-icons-color-standard.social-icons-style-border .vine:hover{background-color:#00b488}.social-icons-color-standard.social-icons-style-border .vine:hover .sqs-use--icon{fill:#fff}.social-icons-color-standard.social-icons-style-knockout .vine .sqs-use--background{fill:transparent}.social-icons-color-standard.social-icons-style-knockout .vine .sqs-use--icon{fill:transparent}.social-icons-color-standard.social-icons-style-knockout .vine .sqs-use--mask{fill:#00b488}.social-icons-color-standard.social-icons-style-knockout .sqs-svg-icon--list:hover .vine .sqs-use--mask,.social-icons-color-standard.social-icons-style-knockout.sqs-svg-icon--list:hover .vine .sqs-use--mask{fill:rgba(0,180,136,.4)}.social-icons-color-standard.social-icons-style-knockout .sqs-svg-icon--list:hover .vine:hover .sqs-use--mask,.social-icons-color-standard.social-icons-style-knockout.sqs-svg-icon--list:hover .vine:hover .sqs-use--mask{fill:#00b488}.social-icons-color-standard.social-icons-style-solid .vine .sqs-use--mask{fill:#00b488}.social-icons-color-standard.social-icons-style-solid .vine .sqs-use--icon{fill:transparent}.social-icons-color-standard.social-icons-style-solid .vine .sqs-use--background{fill:#fff}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .vine .sqs-use--mask,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .vine .sqs-use--mask{fill:rgba(0,180,136,.4)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .vine .sqs-use--icon,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .vine .sqs-use--icon{fill:rgba(255,255,255,.4)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .vine .sqs-use--background,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .vine .sqs-use--background{fill:rgba(255,255,255,0)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .vine:hover .sqs-use--mask,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .vine:hover .sqs-use--mask{fill:#00b488}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .vine:hover .sqs-use--icon,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .vine:hover .sqs-use--icon{fill:rgba(255,255,255,0)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .vine:hover .sqs-use--background,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .vine:hover .sqs-use--background{fill:#fff}.social-icons-color-standard.social-icons-style-regular .vsco .sqs-use--icon{fill:#a9a849}.social-icons-color-standard.social-icons-style-regular .vsco .sqs-use--background,.social-icons-color-standard.social-icons-style-regular .vsco .sqs-use--mask{fill:transparent}.social-icons-color-standard.social-icons-style-regular .sqs-svg-icon--list:hover .vsco .sqs-use--icon,.social-icons-color-standard.social-icons-style-regular.sqs-svg-icon--list:hover .vsco .sqs-use--icon{fill:rgba(169,168,73,.4)}.social-icons-color-standard.social-icons-style-regular .sqs-svg-icon--list:hover .vsco:hover .sqs-use--icon,.social-icons-color-standard.social-icons-style-regular.sqs-svg-icon--list:hover .vsco:hover .sqs-use--icon{fill:#a9a849}.social-icons-color-standard.social-icons-style-border .vsco{border-color:#a9a849}.social-icons-color-standard.social-icons-style-border .vsco .sqs-use--background{fill:transparent}.social-icons-color-standard.social-icons-style-border .vsco .sqs-use--icon{fill:#a9a849}.social-icons-color-standard.social-icons-style-border .vsco .sqs-use--mask{fill:transparent}.social-icons-color-standard.social-icons-style-border .vsco:hover{background-color:#a9a849}.social-icons-color-standard.social-icons-style-border .vsco:hover .sqs-use--icon{fill:#fff}.social-icons-color-standard.social-icons-style-knockout .vsco .sqs-use--background{fill:transparent}.social-icons-color-standard.social-icons-style-knockout .vsco .sqs-use--icon{fill:transparent}.social-icons-color-standard.social-icons-style-knockout .vsco .sqs-use--mask{fill:#a9a849}.social-icons-color-standard.social-icons-style-knockout .sqs-svg-icon--list:hover .vsco .sqs-use--mask,.social-icons-color-standard.social-icons-style-knockout.sqs-svg-icon--list:hover .vsco .sqs-use--mask{fill:rgba(169,168,73,.4)}.social-icons-color-standard.social-icons-style-knockout .sqs-svg-icon--list:hover .vsco:hover .sqs-use--mask,.social-icons-color-standard.social-icons-style-knockout.sqs-svg-icon--list:hover .vsco:hover .sqs-use--mask{fill:#a9a849}.social-icons-color-standard.social-icons-style-solid .vsco .sqs-use--mask{fill:#a9a849}.social-icons-color-standard.social-icons-style-solid .vsco .sqs-use--icon{fill:transparent}.social-icons-color-standard.social-icons-style-solid .vsco .sqs-use--background{fill:#fff}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .vsco .sqs-use--mask,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .vsco .sqs-use--mask{fill:rgba(169,168,73,.4)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .vsco .sqs-use--icon,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .vsco .sqs-use--icon{fill:rgba(255,255,255,.4)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .vsco .sqs-use--background,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .vsco .sqs-use--background{fill:rgba(255,255,255,0)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .vsco:hover .sqs-use--mask,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .vsco:hover .sqs-use--mask{fill:#a9a849}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .vsco:hover .sqs-use--icon,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .vsco:hover .sqs-use--icon{fill:rgba(255,255,255,0)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .vsco:hover .sqs-use--background,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .vsco:hover .sqs-use--background{fill:#fff}.social-icons-color-standard.social-icons-style-regular .yelp .sqs-use--icon{fill:#c41200}.social-icons-color-standard.social-icons-style-regular .yelp .sqs-use--background,.social-icons-color-standard.social-icons-style-regular .yelp .sqs-use--mask{fill:transparent}.social-icons-color-standard.social-icons-style-regular .sqs-svg-icon--list:hover .yelp .sqs-use--icon,.social-icons-color-standard.social-icons-style-regular.sqs-svg-icon--list:hover .yelp .sqs-use--icon{fill:rgba(196,18,0,.4)}.social-icons-color-standard.social-icons-style-regular .sqs-svg-icon--list:hover .yelp:hover .sqs-use--icon,.social-icons-color-standard.social-icons-style-regular.sqs-svg-icon--list:hover .yelp:hover .sqs-use--icon{fill:#c41200}.social-icons-color-standard.social-icons-style-border .yelp{border-color:#c41200}.social-icons-color-standard.social-icons-style-border .yelp .sqs-use--background{fill:transparent}.social-icons-color-standard.social-icons-style-border .yelp .sqs-use--icon{fill:#c41200}.social-icons-color-standard.social-icons-style-border .yelp .sqs-use--mask{fill:transparent}.social-icons-color-standard.social-icons-style-border .yelp:hover{background-color:#c41200}.social-icons-color-standard.social-icons-style-border .yelp:hover .sqs-use--icon{fill:#fff}.social-icons-color-standard.social-icons-style-knockout .yelp .sqs-use--background{fill:transparent}.social-icons-color-standard.social-icons-style-knockout .yelp .sqs-use--icon{fill:transparent}.social-icons-color-standard.social-icons-style-knockout .yelp .sqs-use--mask{fill:#c41200}.social-icons-color-standard.social-icons-style-knockout .sqs-svg-icon--list:hover .yelp .sqs-use--mask,.social-icons-color-standard.social-icons-style-knockout.sqs-svg-icon--list:hover .yelp .sqs-use--mask{fill:rgba(196,18,0,.4)}.social-icons-color-standard.social-icons-style-knockout .sqs-svg-icon--list:hover .yelp:hover .sqs-use--mask,.social-icons-color-standard.social-icons-style-knockout.sqs-svg-icon--list:hover .yelp:hover .sqs-use--mask{fill:#c41200}.social-icons-color-standard.social-icons-style-solid .yelp .sqs-use--mask{fill:#c41200}.social-icons-color-standard.social-icons-style-solid .yelp .sqs-use--icon{fill:transparent}.social-icons-color-standard.social-icons-style-solid .yelp .sqs-use--background{fill:#fff}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .yelp .sqs-use--mask,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .yelp .sqs-use--mask{fill:rgba(196,18,0,.4)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .yelp .sqs-use--icon,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .yelp .sqs-use--icon{fill:rgba(255,255,255,.4)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .yelp .sqs-use--background,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .yelp .sqs-use--background{fill:rgba(255,255,255,0)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .yelp:hover .sqs-use--mask,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .yelp:hover .sqs-use--mask{fill:#c41200}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .yelp:hover .sqs-use--icon,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .yelp:hover .sqs-use--icon{fill:rgba(255,255,255,0)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .yelp:hover .sqs-use--background,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .yelp:hover .sqs-use--background{fill:#fff}.social-icons-color-standard.social-icons-style-regular .youtube .sqs-use--icon{fill:#e52d27}.social-icons-color-standard.social-icons-style-regular .youtube .sqs-use--background,.social-icons-color-standard.social-icons-style-regular .youtube .sqs-use--mask{fill:transparent}.social-icons-color-standard.social-icons-style-regular .sqs-svg-icon--list:hover .youtube .sqs-use--icon,.social-icons-color-standard.social-icons-style-regular.sqs-svg-icon--list:hover .youtube .sqs-use--icon{fill:rgba(229,45,39,.4)}.social-icons-color-standard.social-icons-style-regular .sqs-svg-icon--list:hover .youtube:hover .sqs-use--icon,.social-icons-color-standard.social-icons-style-regular.sqs-svg-icon--list:hover .youtube:hover .sqs-use--icon{fill:#e52d27}.social-icons-color-standard.social-icons-style-border .youtube{border-color:#e52d27}.social-icons-color-standard.social-icons-style-border .youtube .sqs-use--background{fill:transparent}.social-icons-color-standard.social-icons-style-border .youtube .sqs-use--icon{fill:#e52d27}.social-icons-color-standard.social-icons-style-border .youtube .sqs-use--mask{fill:transparent}.social-icons-color-standard.social-icons-style-border .youtube:hover{background-color:#e52d27}.social-icons-color-standard.social-icons-style-border .youtube:hover .sqs-use--icon{fill:#fff}.social-icons-color-standard.social-icons-style-knockout .youtube .sqs-use--background{fill:transparent}.social-icons-color-standard.social-icons-style-knockout .youtube .sqs-use--icon{fill:transparent}.social-icons-color-standard.social-icons-style-knockout .youtube .sqs-use--mask{fill:#e52d27}.social-icons-color-standard.social-icons-style-knockout .sqs-svg-icon--list:hover .youtube .sqs-use--mask,.social-icons-color-standard.social-icons-style-knockout.sqs-svg-icon--list:hover .youtube .sqs-use--mask{fill:rgba(229,45,39,.4)}.social-icons-color-standard.social-icons-style-knockout .sqs-svg-icon--list:hover .youtube:hover .sqs-use--mask,.social-icons-color-standard.social-icons-style-knockout.sqs-svg-icon--list:hover .youtube:hover .sqs-use--mask{fill:#e52d27}.social-icons-color-standard.social-icons-style-solid .youtube .sqs-use--mask{fill:#e52d27}.social-icons-color-standard.social-icons-style-solid .youtube .sqs-use--icon{fill:transparent}.social-icons-color-standard.social-icons-style-solid .youtube .sqs-use--background{fill:#fff}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .youtube .sqs-use--mask,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .youtube .sqs-use--mask{fill:rgba(229,45,39,.4)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .youtube .sqs-use--icon,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .youtube .sqs-use--icon{fill:rgba(255,255,255,.4)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .youtube .sqs-use--background,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .youtube .sqs-use--background{fill:rgba(255,255,255,0)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .youtube:hover .sqs-use--mask,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .youtube:hover .sqs-use--mask{fill:#e52d27}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .youtube:hover .sqs-use--icon,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .youtube:hover .sqs-use--icon{fill:rgba(255,255,255,0)}.social-icons-color-standard.social-icons-style-solid .sqs-svg-icon--list:hover .youtube:hover .sqs-use--background,.social-icons-color-standard.social-icons-style-solid.sqs-svg-icon--list:hover .youtube:hover .sqs-use--background{fill:#fff}.sqs-svg-icon--wrapper{-webkit-transition:background-color 170ms ease-in-out;-moz-transition:background-color 170ms ease-in-out;-ms-transition:background-color 170ms ease-in-out;-o-transition:background-color 170ms ease-in-out;transition:background-color 170ms ease-in-out}.sqs-use--icon,.sqs-use--mask,.sqs-use--background{-webkit-transition:fill 170ms ease-in-out;-moz-transition:fill 170ms ease-in-out;-ms-transition:fill 170ms ease-in-out;-o-transition:fill 170ms ease-in-out;transition:fill 170ms ease-in-out}.social-solid-icon-anim-out 0%{fill:#fff}.social-solid-icon-anim-out 100%{fill:rgba(255,255,255,.4)}@-webkit-keyframes social-solid-icon-anim-out{0%{fill:#fff}100%{fill:rgba(255,255,255,.4)}}@keyframes social-solid-icon-anim{0%{fill:#fff}100%{fill:rgba(255,255,255,.4)}}.social-solid-icon-anim-off 0%{fill:rgba(255,255,255,.4)}.social-solid-icon-anim-off 99%{fill:#fff}.social-solid-icon-anim-off 100%{fill:rgba(255,255,255,0)}@-webkit-keyframes social-solid-icon-anim-off{0%{fill:rgba(255,255,255,.4)}99%{fill:#fff}100%{fill:rgba(255,255,255,0)}}@keyframes social-solid-icon-anim{0%{fill:rgba(255,255,255,.4)}99%{fill:#fff}100%{fill:rgba(255,255,255,0)}}.social-solid-icon-anim-in 0%{fill:rgba(255,255,255,.4)}.social-solid-icon-anim-in 100%{fill:#fff}@-webkit-keyframes social-solid-icon-anim-in{0%{fill:rgba(255,255,255,.4)}100%{fill:#fff}}/*IE9_SPLIT_MARKER*/ @keyframes social-solid-icon-anim{0%{fill:rgba(255,255,255,.4)}100%{fill:#fff}}.social-icons-style-solid .sqs-use--background{-webkit-transition:fill 0ms 170ms ease-in-out;-moz-transition:fill 0ms 170ms ease-in-out;-ms-transition:fill 0ms 170ms ease-in-out;-o-transition:fill 0ms 170ms ease-in-out;transition:fill 0ms 170ms ease-in-out}.social-icons-style-solid .sqs-use--icon{-webkit-animation:social-solid-icon-anim-off 170ms ease-in-out;animation:social-solid-icon-anim-off 170ms ease-in-out}.social-icons-style-solid .sqs-svg-icon--list:hover .sqs-use--icon,.social-icons-style-solid.sqs-svg-icon--list:hover .sqs-use--icon{-webkit-animation:social-solid-icon-anim-out 170ms ease-in-out;animation:social-solid-icon-anim-out 170ms ease-in-out}.social-icons-style-solid .sqs-svg-icon--list:hover .sqs-use--background,.social-icons-style-solid.sqs-svg-icon--list:hover .sqs-use--background{-webkit-transition:fill 0ms 0ms ease-in-out;-moz-transition:fill 0ms 0ms ease-in-out;-ms-transition:fill 0ms 0ms ease-in-out;-o-transition:fill 0ms 0ms ease-in-out;transition:fill 0ms 0ms ease-in-out}.social-icons-style-solid .sqs-svg-icon--list:hover .sqs-svg-icon--wrapper:hover .sqs-use--icon,.social-icons-style-solid.sqs-svg-icon--list:hover .sqs-svg-icon--wrapper:hover .sqs-use--icon{-webkit-animation:social-solid-icon-anim-in 170ms ease-in-out;animation:social-solid-icon-anim-in 170ms ease-in-out}.social-icons-style-solid .sqs-svg-icon--list:hover .sqs-svg-icon--wrapper:hover .sqs-use--background,.social-icons-style-solid.sqs-svg-icon--list:hover .sqs-svg-icon--wrapper:hover .sqs-use--background{-webkit-transition:fill 0ms 160ms ease-in-out;-moz-transition:fill 0ms 160ms ease-in-out;-ms-transition:fill 0ms 160ms ease-in-out;-o-transition:fill 0ms 160ms ease-in-out;transition:fill 0ms 160ms ease-in-out}.sqs-svg-icon--list.social-icon-alignment-left{text-align:left}.sqs-svg-icon--list.social-icon-alignment-right{text-align:right}.sqs-svg-icon--list.social-icon-alignment-center{text-align:center}.rss-block .social-rss:before,.rss-block .social-rss-square:before,.rss-block .social-rss-round:before{font-family:'social-icon-font';speak:none;font-style:normal;font-weight:normal;line-height:1;-webkit-font-smoothing:antialiased;position:relative;top:0;margin-right:10px;font-size:.7em}.rss-block .social-rss:before{content:"\e630"}.social-icons-style-regular .sqs-use--icon{fill:#fff}.social-icons-style-regular .sqs-use--background,.social-icons-style-regular .sqs-use--mask{fill:transparent}.social-icons-style-regular.social-icons-color-white .sqs-use--icon{fill:#fff}.social-icons-style-regular.social-icons-color-white .sqs-use--background,.social-icons-style-regular.social-icons-color-white .sqs-use--mask{fill:transparent}.social-icons-style-regular.social-icons-color-black .sqs-use--icon{fill:#222}.social-icons-style-regular.social-icons-color-black .sqs-use--background,.social-icons-style-regular.social-icons-color-black .sqs-use--mask{fill:transparent}.social-icons-style-border .sqs-svg-icon--wrapper{border-color:#fff}.social-icons-style-border .sqs-use--icon{fill:#fff}.social-icons-style-border .sqs-use--background,.social-icons-style-border .sqs-use--mask{fill:transparent}.social-icons-style-border.social-icons-color-white .sqs-svg-icon--wrapper{border-color:#fff}.social-icons-style-border.social-icons-color-white .sqs-use--icon{fill:#fff}.social-icons-style-border.social-icons-color-white .sqs-use--background,.social-icons-style-border.social-icons-color-white .sqs-use--mask{fill:transparent}.social-icons-style-border.social-icons-color-black .sqs-svg-icon--wrapper{border-color:#222}.social-icons-style-border.social-icons-color-black .sqs-use--icon{fill:#222}.social-icons-style-border.social-icons-color-black .sqs-use--background,.social-icons-style-border.social-icons-color-black .sqs-use--mask{fill:transparent}.social-icons-style-knockout .sqs-use--mask{fill:#fff}.social-icons-style-knockout .sqs-use--background,.social-icons-style-knockout .sqs-use--icon{fill:transparent}.social-icons-style-knockout.social-icons-color-white .sqs-use--mask{fill:#fff}.social-icons-style-knockout.social-icons-color-white .sqs-use--background,.social-icons-style-knockout.social-icons-color-white .sqs-use--icon{fill:transparent}.social-icons-style-knockout.social-icons-color-black .sqs-use--mask{fill:#222}.social-icons-style-knockout.social-icons-color-black .sqs-use--background,.social-icons-style-knockout.social-icons-color-black .sqs-use--icon{fill:transparent}.social-icons-style-solid .sqs-use--icon{fill:#222}.social-icons-style-solid .sqs-use--background{fill:#222}.social-icons-style-solid .sqs-use--mask{fill:#fff}.social-icons-style-solid.social-icons-color-white .sqs-use--icon{fill:#222}.social-icons-style-solid.social-icons-color-white .sqs-use--background{fill:#fff}.social-icons-style-solid.social-icons-color-white .sqs-use--mask{fill:#fff}.social-icons-style-solid.social-icons-color-black .sqs-use--icon{fill:#fff}.social-icons-style-solid.social-icons-color-black .sqs-use--background{fill:#222}.social-icons-style-solid.social-icons-color-black .sqs-use--mask{fill:#222}.social-icons-style-border .sqs-svg-icon--wrapper:hover{background-color:#fff}.social-icons-style-border .sqs-svg-icon--wrapper:hover .sqs-use--icon{fill:#222}.social-icons-style-border.social-icons-color-white .sqs-svg-icon--wrapper:hover{background-color:#fff}.social-icons-style-border.social-icons-color-white .sqs-svg-icon--wrapper:hover .sqs-use--icon{fill:#222}.social-icons-style-border.social-icons-color-black .sqs-svg-icon--wrapper:hover{background-color:#222}.social-icons-style-border.social-icons-color-black .sqs-svg-icon--wrapper:hover .sqs-use--icon{fill:#fff}.social-icons-style-regular:hover .sqs-svg-icon--wrapper .sqs-use--icon{fill:rgba(255,255,255,.4)}.social-icons-style-regular:hover .sqs-svg-icon--wrapper:hover .sqs-use--icon{fill:#fff}.social-icons-style-regular.social-icons-color-white:hover .sqs-svg-icon--wrapper .sqs-use--icon{fill:rgba(255,255,255,.4)}.social-icons-style-regular.social-icons-color-white:hover .sqs-svg-icon--wrapper:hover .sqs-use--icon{fill:#fff}.social-icons-style-regular.social-icons-color-black:hover .sqs-svg-icon--wrapper .sqs-use--icon{fill:rgba(34,34,34,.4)}.social-icons-style-regular.social-icons-color-black:hover .sqs-svg-icon--wrapper:hover .sqs-use--icon{fill:#222}.social-icons-style-knockout:hover .sqs-svg-icon--wrapper .sqs-use--mask{fill:rgba(255,255,255,.4)}.social-icons-style-knockout:hover .sqs-svg-icon--wrapper:hover .sqs-use--mask{fill:#fff}.social-icons-style-knockout.social-icons-color-white:hover .sqs-svg-icon--wrapper .sqs-use--mask{fill:rgba(255,255,255,.4)}.social-icons-style-knockout.social-icons-color-white:hover .sqs-svg-icon--wrapper:hover .sqs-use--mask{fill:#fff}.social-icons-style-knockout.social-icons-color-black:hover .sqs-svg-icon--wrapper .sqs-use--mask{fill:rgba(34,34,34,.4)}.social-icons-style-knockout.social-icons-color-black:hover .sqs-svg-icon--wrapper:hover .sqs-use--mask{fill:#222}.social-icons-style-solid:hover .sqs-svg-icon--wrapper .sqs-use--mask{fill:rgba(255,255,255,.4)}.social-icons-style-solid:hover .sqs-svg-icon--wrapper .sqs-use--icon{fill:rgba(34,34,34,.4)}.social-icons-style-solid:hover .sqs-svg-icon--wrapper .sqs-use--background{fill:rgba(34,34,34,0)}.social-icons-style-solid:hover .sqs-svg-icon--wrapper:hover .sqs-use--mask{fill:#fff}.social-icons-style-solid:hover .sqs-svg-icon--wrapper:hover .sqs-use--icon{fill:rgba(34,34,34,0)}.social-icons-style-solid:hover .sqs-svg-icon--wrapper:hover .sqs-use--background{fill:#222}.social-icons-style-solid.social-icons-color-white:hover .sqs-svg-icon--wrapper .sqs-use--mask,.social-icons-style-solid.social-icons-color-black:hover .sqs-svg-icon--wrapper .sqs-use--mask{fill:rgba(255,255,255,.4)}.social-icons-style-solid.social-icons-color-white:hover .sqs-svg-icon--wrapper .sqs-use--icon,.social-icons-style-solid.social-icons-color-black:hover .sqs-svg-icon--wrapper .sqs-use--icon{fill:rgba(34,34,34,.4)}.social-icons-style-solid.social-icons-color-white:hover .sqs-svg-icon--wrapper .sqs-use--background,.social-icons-style-solid.social-icons-color-black:hover .sqs-svg-icon--wrapper .sqs-use--background{fill:rgba(34,34,34,0)}.social-icons-style-solid.social-icons-color-white:hover .sqs-svg-icon--wrapper:hover .sqs-use--mask,.social-icons-style-solid.social-icons-color-black:hover .sqs-svg-icon--wrapper:hover .sqs-use--mask{fill:#222}.social-icons-style-solid.social-icons-color-white:hover .sqs-svg-icon--wrapper:hover .sqs-use--icon,.social-icons-style-solid.social-icons-color-black:hover .sqs-svg-icon--wrapper:hover .sqs-use--icon{fill:rgba(255,255,255,0)}.social-icons-style-solid.social-icons-color-white:hover .sqs-svg-icon--wrapper:hover .sqs-use--background,.social-icons-style-solid.social-icons-color-black:hover .sqs-svg-icon--wrapper:hover .sqs-use--background{fill:#fff}@font-face{font-family:'social-icon-font';src:url('//static.squarespace.com/universal/fonts/social-20141119/social-icon-font.eot');src:url('//static.squarespace.com/universal/fonts/social-20141119/social-icon-font.eot?#iefix') format('embedded-opentype'),url('//static.squarespace.com/universal/fonts/social-20141119/social-icon-font.woff') format('woff'),url('//static.squarespace.com/universal/fonts/social-20141119/social-icon-font.ttf') format('truetype'),url('//static.squarespace.com/universal/fonts/social-20141119/social-icon-font.svg#social-icon-font') format('svg');font-weight:normal;font-style:normal}.social-smugmug:before,.social-dribbble:before,.social-youtube:before,.social-vimeo:before,.social-twitter:before,.social-tumblr:before,.social-pinterest:before,.social-linkedin:before,.social-instagram:before,.social-google:before,.social-foursquare:before,.social-flickr:before,.social-facebook:before,.social-fivehundredpix:before,.social-fivehundredpx:before,.social-email:before,.social-github:before,.social-rss:before,.social-spotify:before,.social-soundcloud:before,.social-itunes:before,.social-googleplay:before,.social-dropbox:before,.social-bandsintown:before,.social-behance:before,.social-codepen:before,.social-medium:before,.social-rdio:before,.social-squarespace:before,.social-vine:before,.social-yelp:before,.social-vevo:before,.social-meetup:before,.social-twitch:before,.social-vsco:before,.social-smugmug-square:before,.social-dribbble-square:before,.social-youtube-square:before,.social-vimeo-square:before,.social-twitter-square:before,.social-tumblr-square:before,.social-pinterest-square:before,.social-linkedin-square:before,.social-instagram-square:before,.social-google-square:before,.social-foursquare-square:before,.social-flickr-square:before,.social-facebook-square:before,.social-fivehundredpix-square:before,.social-fivehundredpx-square:before,.social-email-square:before,.social-github-square:before,.social-rss-square:before,.social-spotify-square:before,.social-soundcloud-square:before,.social-itunes-square:before,.social-googleplay-square:before,.social-dropbox-square:before,.social-bandsintown-square:before,.social-behance-square:before,.social-codepen-square:before,.social-medium-square:before,.social-rdio-square:before,.social-squarespace-square:before,.social-vine-square:before,.social-yelp-square:before,.social-vevo-square:before,.social-meetup-square:before,.social-twitch-square:before,.social-vsco-square:before,.social-smugmug-round:before,.social-dribbble-round:before,.social-youtube-round:before,.social-vimeo-round:before,.social-twitter-round:before,.social-tumblr-round:before,.social-pinterest-round:before,.social-linkedin-round:before,.social-instagram-round:before,.social-google-round:before,.social-foursquare-round:before,.social-flickr-round:before,.social-facebook-round:before,.social-fivehundredpix-round:before,.social-fivehundredpx-round:before,.social-email-round:before,.social-github-round:before,.social-rss-round:before,.social-spotify-round:before,.social-soundcloud-round:before,.social-itunes-round:before,.social-googleplay-round:before,.social-dropbox-round:before,.social-bandsintown-round:before,.social-behance-round:before,.social-codepen-round:before,.social-medium-round:before,.social-rdio-round:before,.social-squarespace-round:before,.social-vine-round:before,.social-yelp-round:before,.social-vevo-round:before,.social-meetup-round:before,.social-twitch-round:before,.social-vsco-round:before{font-family:'social-icon-font';speak:none;font-style:normal;font-weight:normal;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.social-smugmug:before{content:"\e600"}.social-icon-style-square .social-smugmug:before{content:"\e601"}.social-icon-style-round .social-smugmug:before{content:"\e602"}.social-dribbble:before{content:"\e603"}.social-icon-style-square .social-dribbble:before{content:"\e604"}.social-icon-style-round .social-dribbble:before{content:"\e605"}.social-youtube:before{content:"\e606"}.social-icon-style-square .social-youtube:before{content:"\e607"}.social-icon-style-round .social-youtube:before{content:"\e608"}.social-vimeo:before{content:"\e609"}.social-icon-style-square .social-vimeo:before{content:"\e60a"}.social-icon-style-round .social-vimeo:before{content:"\e60b"}.social-twitter:before{content:"\e60c"}.social-icon-style-square .social-twitter:before{content:"\e60d"}.social-icon-style-round .social-twitter:before{content:"\e60e"}.social-tumblr:before{content:"\e60f"}.social-icon-style-square .social-tumblr:before{content:"\e610"}.social-icon-style-round .social-tumblr:before{content:"\e611"}.social-pinterest:before{content:"\e612"}.social-icon-style-square .social-pinterest:before{content:"\e613"}.social-icon-style-round .social-pinterest:before{content:"\e614"}.social-linkedin:before{content:"\e615"}.social-icon-style-square .social-linkedin:before{content:"\e616"}.social-icon-style-round .social-linkedin:before{content:"\e617"}.social-instagram:before{content:"\e618"}.social-icon-style-square .social-instagram:before{content:"\e619"}.social-icon-style-round .social-instagram:before{content:"\e61a"}.social-google:before{content:"\e61b"}.social-icon-style-square .social-google:before{content:"\e61c"}.social-icon-style-round .social-google:before{content:"\e61d"}.social-googleauth2:before{content:"\e61b"}.social-foursquare:before{content:"\e61e"}.social-icon-style-square .social-foursquare:before{content:"\e61f"}.social-icon-style-round .social-foursquare:before{content:"\e620"}.social-flickr:before{content:"\e621"}.social-icon-style-square .social-flickr:before{content:"\e622"}.social-icon-style-round .social-flickr:before{content:"\e623"}.social-facebook:before{content:"\e624"}.social-icon-style-square .social-facebook:before{content:"\e625"}.social-icon-style-round .social-facebook:before{content:"\e626"}.social-fivehundredpix:before{content:"\e627"}.social-icon-style-square .social-fivehundredpix:before{content:"\e628"}.social-icon-style-round .social-fivehundredpix:before{content:"\e629"}.social-fivehundredpx:before{content:"\e627"}.social-icon-style-square .social-fivehundredpx:before{content:"\e628"}.social-icon-style-round .social-fivehundredpx:before{content:"\e629"}.social-email:before{content:"\e62a"}.social-icon-style-square .social-email:before{content:"\e62b"}.social-icon-style-round .social-email:before{content:"\e62c"}.social-github:before{content:"\e62d"}.social-icon-style-square .social-github:before{content:"\e62e"}.social-icon-style-round .social-github:before{content:"\e62f"}.social-rss:before{content:"\e630"}.social-icon-style-square .social-rss:before{content:"\e631"}.social-icon-style-round .social-rss:before{content:"\e632"}.social-spotify:before{content:"\e633"}.social-icon-style-square .social-spotify:before{content:"\e634"}.social-icon-style-round .social-spotify:before{content:"\e635"}.social-soundcloud:before{content:"\e636"}.social-icon-style-square .social-soundcloud:before{content:"\e637"}.social-icon-style-round .social-soundcloud:before{content:"\e638"}.social-itunes:before{content:"\e639"}.social-icon-style-square .social-itunes:before{content:"\e63a"}.social-icon-style-round .social-itunes:before{content:"\e63b"}.social-googleplay:before{content:"\e63c"}.social-icon-style-square .social-googleplay:before{content:"\e63d"}.social-icon-style-round .social-googleplay:before{content:"\e63e"}.social-dropbox:before{content:"\e63f"}.social-icon-style-square .social-dropbox:before{content:"\e640"}.social-icon-style-round .social-dropbox:before{content:"\e641"}.social-bandsintown:before{content:"\e642"}.social-icon-style-square .social-bandsintown:before{content:"\e643"}.social-icon-style-round .social-bandsintown:before{content:"\e644"}.social-behance:before{content:"\e645"}.social-icon-style-square .social-behance:before{content:"\e646"}.social-icon-style-round .social-behance:before{content:"\e647"}.social-codepen:before{content:"\e648"}.social-icon-style-square .social-codepen:before{content:"\e649"}.social-icon-style-round .social-codepen:before{content:"\e64a"}.social-medium:before{content:"\e64b"}.social-icon-style-square .social-medium:before{content:"\e64c"}.social-icon-style-round .social-medium:before{content:"\e64d"}.social-rdio:before{content:"\e64e"}.social-icon-style-square .social-rdio:before{content:"\e64f"}.social-icon-style-round .social-rdio:before{content:"\e650"}.social-squarespace:before{content:"\e651"}.social-icon-style-square .social-squarespace:before{content:"\e652"}.social-icon-style-round .social-squarespace:before{content:"\e653"}.social-vine:before{content:"\e654"}.social-icon-style-square .social-vine:before{content:"\e655"}.social-icon-style-round .social-vine:before{content:"\e656"}.social-yelp:before{content:"\e657"}.social-icon-style-square .social-yelp:before{content:"\e658"}.social-icon-style-round .social-yelp:before{content:"\e659"}.social-meetup:before{content:"\e65a"}.social-icon-style-square .social-meetup:before{content:"\e65b"}.social-icon-style-round .social-meetup:before{content:"\e65c"}.social-vevo:before{content:"\e65d"}.social-icon-style-square .social-vevo:before{content:"\e65e"}.social-icon-style-round .social-vevo:before{content:"\e65f"}.social-twitch:before{content:"\e660"}.social-icon-style-square .social-twitch:before{content:"\e661"}.social-icon-style-round .social-twitch:before{content:"\e662"}.social-vsco:before{content:"\e663"}.social-icon-style-square .social-vsco:before{content:"\e664"}.social-icon-style-round .social-vsco:before{content:"\e665"}.sqs-block-socialaccountlinks .social-account-svg-list,.sqs-block-socialaccountlinks-v2 .social-account-svg-list{text-align:left}.sqs-block-socialaccountlinks .social-account-svg-list:before,.sqs-block-socialaccountlinks-v2 .social-account-svg-list:before,.sqs-block-socialaccountlinks .social-account-svg-list:after,.sqs-block-socialaccountlinks-v2 .social-account-svg-list:after{content:"";display:table}.sqs-block-socialaccountlinks .social-account-svg-list:after,.sqs-block-socialaccountlinks-v2 .social-account-svg-list:after{clear:both}.sqs-block-socialaccountlinks .social-account-svg-list a,.sqs-block-socialaccountlinks-v2 .social-account-svg-list a,.sqs-block-socialaccountlinks .social-account-svg-list a:link,.sqs-block-socialaccountlinks-v2 .social-account-svg-list a:link,.sqs-block-socialaccountlinks .social-account-svg-list a:visited,.sqs-block-socialaccountlinks-v2 .social-account-svg-list a:visited{display:inline-block;width:20px;height:20px;font-size:20px;color:#111;text-decoration:none !important;*zoom:1;*display:inline;font-weight:normal}.sqs-block-socialaccountlinks .social-account-svg-list a:before,.sqs-block-socialaccountlinks-v2 .social-account-svg-list a:before,.sqs-block-socialaccountlinks .social-account-svg-list a:link:before,.sqs-block-socialaccountlinks-v2 .social-account-svg-list a:link:before,.sqs-block-socialaccountlinks .social-account-svg-list a:visited:before,.sqs-block-socialaccountlinks-v2 .social-account-svg-list a:visited:before{font-size:20px;line-height:20px}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-alignment-left a,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-alignment-left a{margin-right:.75em}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-alignment-right a,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-alignment-right a{margin-left:.75em}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-alignment-center a,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-alignment-center a{margin:0 .375em}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-alignment-center,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-alignment-center{text-align:center}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-alignment-right,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-alignment-right{text-align:right}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-white a,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-white a,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-white a:visited,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-white a:visited{color:#fff}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a.social-bandsintown,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a.social-bandsintown,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:link.social-bandsintown,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:link.social-bandsintown,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:visited.social-bandsintown,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:visited.social-bandsintown{color:#00b4b3}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a.social-behance,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a.social-behance,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:link.social-behance,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:link.social-behance,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:visited.social-behance,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:visited.social-behance{color:#1769ff}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a.social-codepen,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a.social-codepen,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:link.social-codepen,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:link.social-codepen,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:visited.social-codepen,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:visited.social-codepen{color:#222}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a.social-dribbble,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a.social-dribbble,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:link.social-dribbble,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:link.social-dribbble,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:visited.social-dribbble,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:visited.social-dribbble{color:#ea4c89}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a.social-dropbox,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a.social-dropbox,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:link.social-dropbox,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:link.social-dropbox,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:visited.social-dropbox,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:visited.social-dropbox{color:#007ee5}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a.social-email,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a.social-email,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:link.social-email,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:link.social-email,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:visited.social-email,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:visited.social-email{color:#222}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a.social-facebook,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a.social-facebook,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:link.social-facebook,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:link.social-facebook,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:visited.social-facebook,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:visited.social-facebook{color:#3b5998}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a.social-fivehundredpix,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a.social-fivehundredpix,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:link.social-fivehundredpix,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:link.social-fivehundredpix,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:visited.social-fivehundredpix,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:visited.social-fivehundredpix,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a.social-fivehundredpx,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a.social-fivehundredpx,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:link.social-fivehundredpx,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:link.social-fivehundredpx,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:visited.social-fivehundredpx,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:visited.social-fivehundredpx{color:#00aeef}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a.social-flickr,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a.social-flickr,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:link.social-flickr,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:link.social-flickr,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:visited.social-flickr,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:visited.social-flickr{color:#0063dc}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a.social-foursquare,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a.social-foursquare,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:link.social-foursquare,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:link.social-foursquare,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:visited.social-foursquare,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:visited.social-foursquare{color:#f94877}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a.social-github,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a.social-github,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:link.social-github,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:link.social-github,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:visited.social-github,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:visited.social-github{color:#4183c4}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a.social-google,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a.social-google,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:link.social-google,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:link.social-google,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:visited.social-google,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:visited.social-google{color:#dd4b39}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a.social-googleplay,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a.social-googleplay,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:link.social-googleplay,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:link.social-googleplay,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:visited.social-googleplay,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:visited.social-googleplay{color:#5adfcb}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a.social-instagram,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a.social-instagram,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:link.social-instagram,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:link.social-instagram,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:visited.social-instagram,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:visited.social-instagram{color:#3f729b}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a.social-itunes,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a.social-itunes,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:link.social-itunes,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:link.social-itunes,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:visited.social-itunes,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:visited.social-itunes{color:#ff3241}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a.social-linkedin,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a.social-linkedin,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:link.social-linkedin,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:link.social-linkedin,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:visited.social-linkedin,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:visited.social-linkedin{color:#0976b4}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a.social-medium,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a.social-medium,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:link.social-medium,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:link.social-medium,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:visited.social-medium,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:visited.social-medium{color:#222}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a.social-meetup,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a.social-meetup,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:link.social-meetup,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:link.social-meetup,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:visited.social-meetup,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:visited.social-meetup{color:#e0393e}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a.social-pinterest,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a.social-pinterest,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:link.social-pinterest,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:link.social-pinterest,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:visited.social-pinterest,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:visited.social-pinterest{color:#cc2127}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a.social-rdio,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a.social-rdio,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:link.social-rdio,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:link.social-rdio,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:visited.social-rdio,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:visited.social-rdio{color:#006ed2}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a.social-rss,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a.social-rss,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:link.social-rss,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:link.social-rss,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:visited.social-rss,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:visited.social-rss{color:#222}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a.social-smugmug,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a.social-smugmug,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:link.social-smugmug,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:link.social-smugmug,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:visited.social-smugmug,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:visited.social-smugmug{color:#7dbb00}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a.social-soundcloud,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a.social-soundcloud,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:link.social-soundcloud,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:link.social-soundcloud,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:visited.social-soundcloud,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:visited.social-soundcloud{color:#f80}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a.social-spotify,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a.social-spotify,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:link.social-spotify,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:link.social-spotify,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:visited.social-spotify,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:visited.social-spotify{color:#84bd00}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a.social-squarespace,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a.social-squarespace,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:link.social-squarespace,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:link.social-squarespace,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:visited.social-squarespace,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:visited.social-squarespace{color:#222}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a.social-tumblr,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a.social-tumblr,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:link.social-tumblr,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:link.social-tumblr,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:visited.social-tumblr,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:visited.social-tumblr{color:#35465d}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a.social-twitter,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a.social-twitter,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:link.social-twitter,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:link.social-twitter,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:visited.social-twitter,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:visited.social-twitter{color:#55acee}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a.social-vimeo,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a.social-vimeo,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:link.social-vimeo,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:link.social-vimeo,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:visited.social-vimeo,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:visited.social-vimeo{color:#1ab7ea}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a.social-vine,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a.social-vine,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:link.social-vine,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:link.social-vine,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:visited.social-vine,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:visited.social-vine{color:#00b488}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a.social-yelp,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a.social-yelp,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:link.social-yelp,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:link.social-yelp,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:visited.social-yelp,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:visited.social-yelp{color:#c41200}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a.social-youtube,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a.social-youtube,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:link.social-youtube,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:link.social-youtube,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:visited.social-youtube,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:visited.social-youtube{color:#e52d27}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a.social-meetup,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a.social-meetup,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:link.social-meetup,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:link.social-meetup,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:visited.social-meetup,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:visited.social-meetup{color:#e0393e}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a.social-vevo,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a.social-vevo,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:link.social-vevo,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:link.social-vevo,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:visited.social-vevo,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:visited.social-vevo{color:#ff0031}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a.social-twitch,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a.social-twitch,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:link.social-twitch,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:link.social-twitch,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:visited.social-twitch,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:visited.social-twitch{color:#6441a5}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a.social-vsco,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a.social-vsco,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:link.social-vsco,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:link.social-vsco,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:visited.social-vsco,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:visited.social-vsco{color:#a9a849}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-size-large a,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-size-large a,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-size-large a:link,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-size-large a:link,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-size-large a:visited,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-size-large a:visited{width:24px;height:24px;font-size:24px}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-size-large a:before,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-size-large a:before,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-size-large a:link:before,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-size-large a:link:before,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-size-large a:visited:before,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-size-large a:visited:before{font-size:24px;line-height:24px}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-size-small a,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-size-small a,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-size-small a:link,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-size-small a:link,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-size-small a:visited,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-size-small a:visited{width:16px;height:16px;font-size:16px}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-size-small a:before,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-size-small a:before,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-size-small a:link:before,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-size-small a:link:before,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-size-small a:visited:before,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-size-small a:visited:before{font-size:16px;line-height:16px}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-style-round a,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-style-round a,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-style-square a,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-style-square a,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-style-round a:link,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-style-round a:link,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-style-square a:link,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-style-square a:link,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-style-round a:visited,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-style-round a:visited,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-style-square a:visited,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-style-square a:visited{width:30px;height:30px;font-size:30px}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-style-round a:before,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-style-round a:before,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-style-square a:before,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-style-square a:before,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-style-round a:link:before,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-style-round a:link:before,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-style-square a:link:before,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-style-square a:link:before,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-style-round a:visited:before,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-style-round a:visited:before,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-style-square a:visited:before,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-style-square a:visited:before{font-size:30px;line-height:30px}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-style-round.social-icon-alignment-left a,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-style-round.social-icon-alignment-left a,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-style-square.social-icon-alignment-left a,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-style-square.social-icon-alignment-left a{margin-right:.25em}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-style-round.social-icon-alignment-right a,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-style-round.social-icon-alignment-right a,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-style-square.social-icon-alignment-right a,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-style-square.social-icon-alignment-right a{margin-left:.25em}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-style-round.social-icon-alignment-center a,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-style-round.social-icon-alignment-center a,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-style-square.social-icon-alignment-center a,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-style-square.social-icon-alignment-center a{margin:0 .125em}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-size-large.social-icon-style-round a,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-size-large.social-icon-style-round a,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-size-large.social-icon-style-square a,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-size-large.social-icon-style-square a,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-size-large.social-icon-style-round a:link,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-size-large.social-icon-style-round a:link,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-size-large.social-icon-style-square a:link,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-size-large.social-icon-style-square a:link,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-size-large.social-icon-style-round a:visited,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-size-large.social-icon-style-round a:visited,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-size-large.social-icon-style-square a:visited,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-size-large.social-icon-style-square a:visited{width:36px;height:36px;font-size:36px}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-size-large.social-icon-style-round a:before,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-size-large.social-icon-style-round a:before,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-size-large.social-icon-style-square a:before,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-size-large.social-icon-style-square a:before,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-size-large.social-icon-style-round a:link:before,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-size-large.social-icon-style-round a:link:before,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-size-large.social-icon-style-square a:link:before,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-size-large.social-icon-style-square a:link:before,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-size-large.social-icon-style-round a:visited:before,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-size-large.social-icon-style-round a:visited:before,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-size-large.social-icon-style-square a:visited:before,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-size-large.social-icon-style-square a:visited:before{font-size:36px;line-height:36px}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-size-small.social-icon-style-round a,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-size-small.social-icon-style-round a,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-size-small.social-icon-style-square a,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-size-small.social-icon-style-square a,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-size-small.social-icon-style-round a:link,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-size-small.social-icon-style-round a:link,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-size-small.social-icon-style-square a:link,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-size-small.social-icon-style-square a:link,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-size-small.social-icon-style-round a:visited,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-size-small.social-icon-style-round a:visited,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-size-small.social-icon-style-square a:visited,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-size-small.social-icon-style-square a:visited{width:24px;height:24px;font-size:24px}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-size-small.social-icon-style-round a:before,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-size-small.social-icon-style-round a:before,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-size-small.social-icon-style-square a:before,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-size-small.social-icon-style-square a:before,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-size-small.social-icon-style-round a:link:before,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-size-small.social-icon-style-round a:link:before,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-size-small.social-icon-style-square a:link:before,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-size-small.social-icon-style-square a:link:before,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-size-small.social-icon-style-round a:visited:before,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-size-small.social-icon-style-round a:visited:before,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-size-small.social-icon-style-square a:visited:before,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-size-small.social-icon-style-square a:visited:before{font-size:24px;line-height:24px}.sqs-album-block{zoom:1;font-size:13px;color:#282828}.sqs-album-block .social-links{display:inline-block;line-height:3em}.sqs-album-block .social-links .social-account-svg-list{text-align:left}.sqs-album-block .social-links .social-account-svg-list:before,.sqs-album-block .social-links .social-account-svg-list:after{content:"";display:table}.sqs-album-block .social-links .social-account-svg-list:after{clear:both}.sqs-album-block .social-links .social-account-svg-list a,.sqs-album-block .social-links .social-account-svg-list a:link,.sqs-album-block .social-links .social-account-svg-list a:visited{display:inline-block;width:20px;height:20px;font-size:20px;color:#111;text-decoration:none !important;*zoom:1;*display:inline;font-weight:normal}.sqs-album-block .social-links .social-account-svg-list a:before,.sqs-album-block .social-links .social-account-svg-list a:link:before,.sqs-album-block .social-links .social-account-svg-list a:visited:before{font-size:20px;line-height:20px}.sqs-album-block .social-links .social-account-svg-list.social-icon-alignment-left a{margin-right:.75em}.sqs-album-block .social-links .social-account-svg-list.social-icon-alignment-right a{margin-left:.75em}.sqs-album-block .social-links .social-account-svg-list.social-icon-alignment-center a{margin:0 .375em}.sqs-album-block .social-links .social-account-svg-list.social-icon-alignment-center{text-align:center}.sqs-album-block .social-links .social-account-svg-list.social-icon-alignment-right{text-align:right}.sqs-album-block .social-links .social-account-svg-list.social-icon-color-white a,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-white a:visited{color:#fff}.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a.social-bandsintown,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:link.social-bandsintown,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:visited.social-bandsintown{color:#00b4b3}.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a.social-behance,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:link.social-behance,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:visited.social-behance{color:#1769ff}.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a.social-codepen,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:link.social-codepen,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:visited.social-codepen{color:#222}.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a.social-dribbble,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:link.social-dribbble,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:visited.social-dribbble{color:#ea4c89}.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a.social-dropbox,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:link.social-dropbox,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:visited.social-dropbox{color:#007ee5}.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a.social-email,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:link.social-email,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:visited.social-email{color:#222}.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a.social-facebook,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:link.social-facebook,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:visited.social-facebook{color:#3b5998}.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a.social-fivehundredpix,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:link.social-fivehundredpix,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:visited.social-fivehundredpix,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a.social-fivehundredpx,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:link.social-fivehundredpx,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:visited.social-fivehundredpx{color:#00aeef}.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a.social-flickr,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:link.social-flickr,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:visited.social-flickr{color:#0063dc}.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a.social-foursquare,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:link.social-foursquare,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:visited.social-foursquare{color:#f94877}.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a.social-github,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:link.social-github,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:visited.social-github{color:#4183c4}.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a.social-google,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:link.social-google,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:visited.social-google{color:#dd4b39}.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a.social-googleplay,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:link.social-googleplay,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:visited.social-googleplay{color:#5adfcb}.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a.social-instagram,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:link.social-instagram,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:visited.social-instagram{color:#3f729b}.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a.social-itunes,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:link.social-itunes,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:visited.social-itunes{color:#ff3241}.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a.social-linkedin,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:link.social-linkedin,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:visited.social-linkedin{color:#0976b4}.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a.social-medium,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:link.social-medium,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:visited.social-medium{color:#222}.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a.social-meetup,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:link.social-meetup,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:visited.social-meetup{color:#e0393e}.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a.social-pinterest,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:link.social-pinterest,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:visited.social-pinterest{color:#cc2127}.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a.social-rdio,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:link.social-rdio,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:visited.social-rdio{color:#006ed2}.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a.social-rss,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:link.social-rss,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:visited.social-rss{color:#222}.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a.social-smugmug,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:link.social-smugmug,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:visited.social-smugmug{color:#7dbb00}.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a.social-soundcloud,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:link.social-soundcloud,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:visited.social-soundcloud{color:#f80}.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a.social-spotify,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:link.social-spotify,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:visited.social-spotify{color:#84bd00}.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a.social-squarespace,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:link.social-squarespace,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:visited.social-squarespace{color:#222}.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a.social-tumblr,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:link.social-tumblr,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:visited.social-tumblr{color:#35465d}.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a.social-twitter,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:link.social-twitter,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:visited.social-twitter{color:#55acee}.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a.social-vimeo,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:link.social-vimeo,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:visited.social-vimeo{color:#1ab7ea}.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a.social-vine,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:link.social-vine,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:visited.social-vine{color:#00b488}.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a.social-yelp,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:link.social-yelp,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:visited.social-yelp{color:#c41200}.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a.social-youtube,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:link.social-youtube,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:visited.social-youtube{color:#e52d27}.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a.social-meetup,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:link.social-meetup,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:visited.social-meetup{color:#e0393e}.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a.social-vevo,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:link.social-vevo,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:visited.social-vevo{color:#ff0031}.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a.social-twitch,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:link.social-twitch,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:visited.social-twitch{color:#6441a5}.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a.social-vsco,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:link.social-vsco,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:visited.social-vsco{color:#a9a849}.sqs-album-block .social-links .social-account-svg-list.social-icon-size-large a,.sqs-album-block .social-links .social-account-svg-list.social-icon-size-large a:link,.sqs-album-block .social-links .social-account-svg-list.social-icon-size-large a:visited{width:24px;height:24px;font-size:24px}.sqs-album-block .social-links .social-account-svg-list.social-icon-size-large a:before,.sqs-album-block .social-links .social-account-svg-list.social-icon-size-large a:link:before,.sqs-album-block .social-links .social-account-svg-list.social-icon-size-large a:visited:before{font-size:24px;line-height:24px}.sqs-album-block .social-links .social-account-svg-list.social-icon-size-small a,.sqs-album-block .social-links .social-account-svg-list.social-icon-size-small a:link,.sqs-album-block .social-links .social-account-svg-list.social-icon-size-small a:visited{width:16px;height:16px;font-size:16px}.sqs-album-block .social-links .social-account-svg-list.social-icon-size-small a:before,.sqs-album-block .social-links .social-account-svg-list.social-icon-size-small a:link:before,.sqs-album-block .social-links .social-account-svg-list.social-icon-size-small a:visited:before{font-size:16px;line-height:16px}.sqs-album-block .social-links .social-account-svg-list.social-icon-style-round a,.sqs-album-block .social-links .social-account-svg-list.social-icon-style-square a,.sqs-album-block .social-links .social-account-svg-list.social-icon-style-round a:link,.sqs-album-block .social-links .social-account-svg-list.social-icon-style-square a:link,.sqs-album-block .social-links .social-account-svg-list.social-icon-style-round a:visited,.sqs-album-block .social-links .social-account-svg-list.social-icon-style-square a:visited{width:30px;height:30px;font-size:30px}.sqs-album-block .social-links .social-account-svg-list.social-icon-style-round a:before,.sqs-album-block .social-links .social-account-svg-list.social-icon-style-square a:before,.sqs-album-block .social-links .social-account-svg-list.social-icon-style-round a:link:before,.sqs-album-block .social-links .social-account-svg-list.social-icon-style-square a:link:before,.sqs-album-block .social-links .social-account-svg-list.social-icon-style-round a:visited:before,.sqs-album-block .social-links .social-account-svg-list.social-icon-style-square a:visited:before{font-size:30px;line-height:30px}.sqs-album-block .social-links .social-account-svg-list.social-icon-style-round.social-icon-alignment-left a,.sqs-album-block .social-links .social-account-svg-list.social-icon-style-square.social-icon-alignment-left a{margin-right:.25em}.sqs-album-block .social-links .social-account-svg-list.social-icon-style-round.social-icon-alignment-right a,.sqs-album-block .social-links .social-account-svg-list.social-icon-style-square.social-icon-alignment-right a{margin-left:.25em}.sqs-album-block .social-links .social-account-svg-list.social-icon-style-round.social-icon-alignment-center a,.sqs-album-block .social-links .social-account-svg-list.social-icon-style-square.social-icon-alignment-center a{margin:0 .125em}.sqs-album-block .social-links .social-account-svg-list.social-icon-size-large.social-icon-style-round a,.sqs-album-block .social-links .social-account-svg-list.social-icon-size-large.social-icon-style-square a,.sqs-album-block .social-links .social-account-svg-list.social-icon-size-large.social-icon-style-round a:link,.sqs-album-block .social-links .social-account-svg-list.social-icon-size-large.social-icon-style-square a:link,.sqs-album-block .social-links .social-account-svg-list.social-icon-size-large.social-icon-style-round a:visited,.sqs-album-block .social-links .social-account-svg-list.social-icon-size-large.social-icon-style-square a:visited{width:36px;height:36px;font-size:36px}.sqs-album-block .social-links .social-account-svg-list.social-icon-size-large.social-icon-style-round a:before,.sqs-album-block .social-links .social-account-svg-list.social-icon-size-large.social-icon-style-square a:before,.sqs-album-block .social-links .social-account-svg-list.social-icon-size-large.social-icon-style-round a:link:before,.sqs-album-block .social-links .social-account-svg-list.social-icon-size-large.social-icon-style-square a:link:before,.sqs-album-block .social-links .social-account-svg-list.social-icon-size-large.social-icon-style-round a:visited:before,.sqs-album-block .social-links .social-account-svg-list.social-icon-size-large.social-icon-style-square a:visited:before{font-size:36px;line-height:36px}.sqs-album-block .social-links .social-account-svg-list.social-icon-size-small.social-icon-style-round a,.sqs-album-block .social-links .social-account-svg-list.social-icon-size-small.social-icon-style-square a,.sqs-album-block .social-links .social-account-svg-list.social-icon-size-small.social-icon-style-round a:link,.sqs-album-block .social-links .social-account-svg-list.social-icon-size-small.social-icon-style-square a:link,.sqs-album-block .social-links .social-account-svg-list.social-icon-size-small.social-icon-style-round a:visited,.sqs-album-block .social-links .social-account-svg-list.social-icon-size-small.social-icon-style-square a:visited{width:24px;height:24px;font-size:24px}.sqs-album-block .social-links .social-account-svg-list.social-icon-size-small.social-icon-style-round a:before,.sqs-album-block .social-links .social-account-svg-list.social-icon-size-small.social-icon-style-square a:before,.sqs-album-block .social-links .social-account-svg-list.social-icon-size-small.social-icon-style-round a:link:before,.sqs-album-block .social-links .social-account-svg-list.social-icon-size-small.social-icon-style-square a:link:before,.sqs-album-block .social-links .social-account-svg-list.social-icon-size-small.social-icon-style-round a:visited:before,.sqs-album-block .social-links .social-account-svg-list.social-icon-size-small.social-icon-style-square a:visited:before{font-size:24px;line-height:24px}.sqs-album-block .social-links .social-account-svg-list{text-align:left}.sqs-album-block .social-links .social-account-svg-list:before,.sqs-album-block .social-links .social-account-svg-list:after{content:"";display:table}.sqs-album-block .social-links .social-account-svg-list:after{clear:both}.sqs-album-block .social-links .social-account-svg-list a,.sqs-album-block .social-links .social-account-svg-list a:link,.sqs-album-block .social-links .social-account-svg-list a:visited{display:inline-block;width:20px;height:20px;font-size:20px;color:#111;text-decoration:none !important;*zoom:1;*display:inline;font-weight:normal}.sqs-album-block .social-links .social-account-svg-list a:before,.sqs-album-block .social-links .social-account-svg-list a:link:before,.sqs-album-block .social-links .social-account-svg-list a:visited:before{font-size:20px;line-height:20px}.sqs-album-block .social-links .social-account-svg-list.social-icon-alignment-left a{margin-right:.75em}.sqs-album-block .social-links .social-account-svg-list.social-icon-alignment-right a{margin-left:.75em}.sqs-album-block .social-links .social-account-svg-list.social-icon-alignment-center a{margin:0 .375em}.sqs-album-block .social-links .social-account-svg-list.social-icon-alignment-center{text-align:center}.sqs-album-block .social-links .social-account-svg-list.social-icon-alignment-right{text-align:right}.sqs-album-block .social-links .social-account-svg-list.social-icon-color-white a,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-white a:visited{color:#fff}.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a.social-bandsintown,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:link.social-bandsintown,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:visited.social-bandsintown{color:#00b4b3}.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a.social-behance,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:link.social-behance,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:visited.social-behance{color:#1769ff}.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a.social-codepen,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:link.social-codepen,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:visited.social-codepen{color:#222}.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a.social-dribbble,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:link.social-dribbble,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:visited.social-dribbble{color:#ea4c89}.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a.social-dropbox,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:link.social-dropbox,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:visited.social-dropbox{color:#007ee5}.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a.social-email,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:link.social-email,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:visited.social-email{color:#222}.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a.social-facebook,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:link.social-facebook,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:visited.social-facebook{color:#3b5998}.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a.social-fivehundredpix,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:link.social-fivehundredpix,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:visited.social-fivehundredpix,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a.social-fivehundredpx,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:link.social-fivehundredpx,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:visited.social-fivehundredpx{color:#00aeef}.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a.social-flickr,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:link.social-flickr,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:visited.social-flickr{color:#0063dc}.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a.social-foursquare,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:link.social-foursquare,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:visited.social-foursquare{color:#f94877}.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a.social-github,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:link.social-github,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:visited.social-github{color:#4183c4}.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a.social-google,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:link.social-google,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:visited.social-google{color:#dd4b39}.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a.social-googleplay,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:link.social-googleplay,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:visited.social-googleplay{color:#5adfcb}.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a.social-instagram,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:link.social-instagram,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:visited.social-instagram{color:#3f729b}.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a.social-itunes,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:link.social-itunes,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:visited.social-itunes{color:#ff3241}.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a.social-linkedin,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:link.social-linkedin,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:visited.social-linkedin{color:#0976b4}.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a.social-medium,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:link.social-medium,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:visited.social-medium{color:#222}.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a.social-meetup,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:link.social-meetup,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:visited.social-meetup{color:#e0393e}.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a.social-pinterest,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:link.social-pinterest,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:visited.social-pinterest{color:#cc2127}.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a.social-rdio,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:link.social-rdio,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:visited.social-rdio{color:#006ed2}.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a.social-rss,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:link.social-rss,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:visited.social-rss{color:#222}.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a.social-smugmug,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:link.social-smugmug,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:visited.social-smugmug{color:#7dbb00}.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a.social-soundcloud,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:link.social-soundcloud,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:visited.social-soundcloud{color:#f80}.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a.social-spotify,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:link.social-spotify,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:visited.social-spotify{color:#84bd00}.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a.social-squarespace,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:link.social-squarespace,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:visited.social-squarespace{color:#222}.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a.social-tumblr,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:link.social-tumblr,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:visited.social-tumblr{color:#35465d}.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a.social-twitter,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:link.social-twitter,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:visited.social-twitter{color:#55acee}.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a.social-vimeo,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:link.social-vimeo,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:visited.social-vimeo{color:#1ab7ea}.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a.social-vine,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:link.social-vine,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:visited.social-vine{color:#00b488}.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a.social-yelp,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:link.social-yelp,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:visited.social-yelp{color:#c41200}.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a.social-youtube,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:link.social-youtube,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:visited.social-youtube{color:#e52d27}.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a.social-meetup,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:link.social-meetup,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:visited.social-meetup{color:#e0393e}.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a.social-vevo,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:link.social-vevo,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:visited.social-vevo{color:#ff0031}.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a.social-twitch,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:link.social-twitch,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:visited.social-twitch{color:#6441a5}.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a.social-vsco,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:link.social-vsco,.sqs-album-block .social-links .social-account-svg-list.social-icon-color-standard a:visited.social-vsco{color:#a9a849}.sqs-album-block .social-links .social-account-svg-list.social-icon-size-large a,.sqs-album-block .social-links .social-account-svg-list.social-icon-size-large a:link,.sqs-album-block .social-links .social-account-svg-list.social-icon-size-large a:visited{width:24px;height:24px;font-size:24px}.sqs-album-block .social-links .social-account-svg-list.social-icon-size-large a:before,.sqs-album-block .social-links .social-account-svg-list.social-icon-size-large a:link:before,.sqs-album-block .social-links .social-account-svg-list.social-icon-size-large a:visited:before{font-size:24px;line-height:24px}.sqs-album-block .social-links .social-account-svg-list.social-icon-size-small a,.sqs-album-block .social-links .social-account-svg-list.social-icon-size-small a:link,.sqs-album-block .social-links .social-account-svg-list.social-icon-size-small a:visited{width:16px;height:16px;font-size:16px}.sqs-album-block .social-links .social-account-svg-list.social-icon-size-small a:before,.sqs-album-block .social-links .social-account-svg-list.social-icon-size-small a:link:before,.sqs-album-block .social-links .social-account-svg-list.social-icon-size-small a:visited:before{font-size:16px;line-height:16px}.sqs-album-block .social-links .social-account-svg-list.social-icon-style-round a,.sqs-album-block .social-links .social-account-svg-list.social-icon-style-square a,.sqs-album-block .social-links .social-account-svg-list.social-icon-style-round a:link,.sqs-album-block .social-links .social-account-svg-list.social-icon-style-square a:link,.sqs-album-block .social-links .social-account-svg-list.social-icon-style-round a:visited,.sqs-album-block .social-links .social-account-svg-list.social-icon-style-square a:visited{width:30px;height:30px;font-size:30px}.sqs-album-block .social-links .social-account-svg-list.social-icon-style-round a:before,.sqs-album-block .social-links .social-account-svg-list.social-icon-style-square a:before,.sqs-album-block .social-links .social-account-svg-list.social-icon-style-round a:link:before,.sqs-album-block .social-links .social-account-svg-list.social-icon-style-square a:link:before,.sqs-album-block .social-links .social-account-svg-list.social-icon-style-round a:visited:before,.sqs-album-block .social-links .social-account-svg-list.social-icon-style-square a:visited:before{font-size:30px;line-height:30px}.sqs-album-block .social-links .social-account-svg-list.social-icon-style-round.social-icon-alignment-left a,.sqs-album-block .social-links .social-account-svg-list.social-icon-style-square.social-icon-alignment-left a{margin-right:.25em}.sqs-album-block .social-links .social-account-svg-list.social-icon-style-round.social-icon-alignment-right a,.sqs-album-block .social-links .social-account-svg-list.social-icon-style-square.social-icon-alignment-right a{margin-left:.25em}.sqs-album-block .social-links .social-account-svg-list.social-icon-style-round.social-icon-alignment-center a,.sqs-album-block .social-links .social-account-svg-list.social-icon-style-square.social-icon-alignment-center a{margin:0 .125em}.sqs-album-block .social-links .social-account-svg-list.social-icon-size-large.social-icon-style-round a,.sqs-album-block .social-links .social-account-svg-list.social-icon-size-large.social-icon-style-square a,.sqs-album-block .social-links .social-account-svg-list.social-icon-size-large.social-icon-style-round a:link,.sqs-album-block .social-links .social-account-svg-list.social-icon-size-large.social-icon-style-square a:link,.sqs-album-block .social-links .social-account-svg-list.social-icon-size-large.social-icon-style-round a:visited,.sqs-album-block .social-links .social-account-svg-list.social-icon-size-large.social-icon-style-square a:visited{width:36px;height:36px;font-size:36px}.sqs-album-block .social-links .social-account-svg-list.social-icon-size-large.social-icon-style-round a:before,.sqs-album-block .social-links .social-account-svg-list.social-icon-size-large.social-icon-style-square a:before,.sqs-album-block .social-links .social-account-svg-list.social-icon-size-large.social-icon-style-round a:link:before,.sqs-album-block .social-links .social-account-svg-list.social-icon-size-large.social-icon-style-square a:link:before,.sqs-album-block .social-links .social-account-svg-list.social-icon-size-large.social-icon-style-round a:visited:before,.sqs-album-block .social-links .social-account-svg-list.social-icon-size-large.social-icon-style-square a:visited:before{font-size:36px;line-height:36px}.sqs-album-block .social-links .social-account-svg-list.social-icon-size-small.social-icon-style-round a,.sqs-album-block .social-links .social-account-svg-list.social-icon-size-small.social-icon-style-square a,.sqs-album-block .social-links .social-account-svg-list.social-icon-size-small.social-icon-style-round a:link,.sqs-album-block .social-links .social-account-svg-list.social-icon-size-small.social-icon-style-square a:link,.sqs-album-block .social-links .social-account-svg-list.social-icon-size-small.social-icon-style-round a:visited,.sqs-album-block .social-links .social-account-svg-list.social-icon-size-small.social-icon-style-square a:visited{width:24px;height:24px;font-size:24px}.sqs-album-block .social-links .social-account-svg-list.social-icon-size-small.social-icon-style-round a:before,.sqs-album-block .social-links .social-account-svg-list.social-icon-size-small.social-icon-style-square a:before,.sqs-album-block .social-links .social-account-svg-list.social-icon-size-small.social-icon-style-round a:link:before,.sqs-album-block .social-links .social-account-svg-list.social-icon-size-small.social-icon-style-square a:link:before,.sqs-album-block .social-links .social-account-svg-list.social-icon-size-small.social-icon-style-round a:visited:before,.sqs-album-block .social-links .social-account-svg-list.social-icon-size-small.social-icon-style-square a:visited:before{font-size:24px;line-height:24px}.sqs-album-block:after{display:block;visibility:hidden;font-size:0;height:0;clear:both;content:"."}.sqs-album-block:after{display:block;visibility:hidden;font-size:0;height:0;clear:both;content:"."}.sqs-album-block .album-info{width:33%;float:left;zoom:1}.sqs-album-block .album-info:after{display:block;visibility:hidden;font-size:0;height:0;clear:both;content:"."}.sqs-album-block .album-info:after{display:block;visibility:hidden;font-size:0;height:0;clear:both;content:"."}.sqs-album-block .album-cover-wrapper{position:relative;width:90px;height:90px;margin-bottom:30px}.sqs-album-block .album-controls{position:absolute;top:0;right:0;bottom:0;left:0;cursor:pointer}.sqs-album-block .album-controls .button{-webkit-transition:.25s all linear;-moz-transition:.25s all linear;-ms-transition:.25s all linear;-o-transition:.25s all linear;transition:.25s all linear;-moz-border-radius:50%;border-radius:50%;position:absolute;bottom:50%;left:50%;display:block;width:90px;height:90px;margin-bottom:-45px;margin-left:-45px;background:#000}.sqs-album-block .album-controls .icon{display:block;position:relative;left:50%;top:50%;margin-top:-20px;margin-left:-10px;width:0px;height:0px;border-top:18px solid transparent;border-bottom:18px solid transparent;border-left:30px solid #fff;-webkit-transform:translatez();-ms-transform:translatez();transform:translatez()}.sqs-album-block .album-title{margin:0;margin-bottom:3px}.sqs-album-block.playing .album-controls .button .icon{border-width:0px;margin-top:-15px;margin-left:-13px}.sqs-album-block.playing .album-controls .button .icon,.sqs-album-block.playing .album-controls .button .icon:before{height:30px;width:10px;background-color:#fff}.sqs-album-block.playing .album-controls .button .icon:before{content:'';display:block;margin-left:16px}.sqs-album-block.has-album-cover .album-cover-wrapper{position:relative;width:100%;height:0;padding-bottom:100%;margin-bottom:20px}.sqs-album-block.has-album-cover .album-cover{position:absolute;top:0;right:0;bottom:0;left:0}.sqs-album-block.has-album-cover .button{background:rgba(0,0,0,.7);opacity:.9}.sqs-album-block.has-album-cover:hover .button{background:rgba(0,0,0,.9)}.sqs-album-block.has-album-cover.playing .album-controls .button{margin:-15px;bottom:0;left:0;-webkit-transform:scale(.4,.4);-ms-transform:scale(.4,.4);transform:scale(.4,.4)}.sqs-album-block.playing .track{opacity:.4}.sqs-album-block.playing .track:hover,.sqs-album-block.playing .track.selected,.sqs-album-block.playing .track.universal-track{opacity:1}.sqs-album-block .tracks{float:right;width:60%;margin:0;padding:0}.sqs-album-block .track{list-style-type:none;padding:0;margin:0 0 36px;cursor:pointer;zoom:1;font-style:normal;font-weight:normal;letter-spacing:0;text-transform:none;line-height:1.4em}.sqs-album-block .track:after{display:block;visibility:hidden;font-size:0;height:0;clear:both;content:"."}.sqs-album-block .track:after{display:block;visibility:hidden;font-size:0;height:0;clear:both;content:"."}.sqs-album-block .track-progress-bar{clear:both;height:2px;position:relative;cursor:pointer;padding-bottom:2.5%}.sqs-album-block .track-progress-bar .bar{position:absolute;top:0;left:0;height:4px;width:0%}.sqs-album-block .track-progress-bar .bar.bg{width:100%}.sqs-album-block .track-progress-bar .bar.play-bar{position:relative}.sqs-album-block .timers{float:right;text-align:right;margin-left:1em}.sqs-album-block .tracks .timers .elapsed{display:none}.sqs-album-block.playing .tracks .track.selected .timers .duration,.sqs-album-block.paused .tracks .track.selected .timers .duration{display:none}.sqs-album-block.playing .tracks .track.selected .timers .elapsed,.sqs-album-block.paused .tracks .track.selected .timers .elapsed{display:block}.sqs-album-block .universal-player{display:none;margin-top:25px;width:100%}.sqs-album-block .universal-player .universal-progress{padding-bottom:1em}.sqs-album-block .universal-controls{margin-bottom:1em}.sqs-album-block .universal-controls .play-pause-group{display:inline-block}.sqs-album-block .universal-controls .next-prev-group{display:inline-block;float:right}.sqs-album-block .universal-controls .pause{display:none}.sqs-album-block.playing .universal-controls .pause{display:block}.sqs-album-block.playing .universal-controls .play{display:none}.sqs-album-block.hide-track-artists .artist{display:none}.sqs-album-block.md .album-info,.sqs-album-block.md .tracks{width:100%;float:none}.sqs-album-block.md .album-info{padding-bottom:60px}.sqs-album-block.md .album-cover-wrapper{float:left;margin-right:30px}.sqs-album-block.md.has-album-cover .album-cover-wrapper{width:40%;padding-bottom:40%}.sqs-album-block.md.no-main-image .album-description{margin-left:120px}.sqs-album-block.sm .album-info,.sqs-album-block.sm .tracks{width:100%;float:none}.sqs-album-block.sm .tracks{margin-top:30px}.sqs-album-block.sm .tracks .track{margin-bottom:27px}.sqs-album-block.sm .album-info{padding-bottom:0}.sqs-album-block.sm .album-cover-wrapper{float:none;margin-right:0;margin-bottom:20px}.sqs-album-block.sm.has-album-cover .album-cover-wrapper{width:100%;padding-bottom:100%;float:none;margin-right:0}.sqs-album-block.sm.no-main-image .album-description{margin-left:0}.sqs-album-block.mini-player .album-description,.sqs-album-block.mini-player .album-title,.sqs-album-block.mini-player .album-artist-name,.sqs-album-block.mini-player .tracks,.sqs-album-block.mini-player .social-links{display:none}.sqs-album-block.mini-player.no-album-cover .album-info{display:none}.sqs-album-block.mini-player.lg.has-album-cover .album-info,.sqs-album-block.mini-player.md.has-album-cover .album-info{width:145px;display:inline-block;float:left;padding-bottom:0;margin-right:1em}.sqs-album-block.mini-player.lg .universal-player,.sqs-album-block.mini-player.md .universal-player{display:inline-block}.sqs-album-block.mini-player.lg.has-album-cover .universal-player,.sqs-album-block.mini-player.md.has-album-cover .universal-player{width:calc(100% - 145px - 1em)}.sqs-album-block.mini-player.lg.has-album-cover .play-pause-group,.sqs-album-block.mini-player.md.has-album-cover .play-pause-group{display:none}.sqs-album-block.mini-player.lg.has-album-cover .next-prev-group,.sqs-album-block.mini-player.md.has-album-cover .next-prev-group{float:none}.sqs-album-block.mini-player.lg.has-album-cover .album-cover-wrapper,.sqs-album-block.mini-player.md.has-album-cover .album-cover-wrapper{padding-bottom:100%;width:145px;margin:0;float:none}.sqs-album-block.mini-player.sm .universal-player{display:block}.sqs-album-block .album-title{font-weight:bold;font-size:20px}.sqs-album-block .album-description{line-height:21px;font-size:13px}.sqs-album-block.sm .album-description{font-size:11px}.sqs-album-block .title a{font-size:15px;text-decoration:none}.sqs-album-block .tracks .timers .elapsed:before{content:"("}.sqs-album-block .tracks .timers .elapsed:after{content:")"}.sqs-album-block .universal-controls{text-transform:uppercase}.sqs-album-block .universal-controls a{text-decoration:none}.sqs-album-block .track-progress-bar{-webkit-tap-highlight-color:rgba(40,40,40,.17)}.sqs-album-block .track-progress-bar .bar{-webkit-tap-highlight-color:rgba(40,40,40,.17)}.sqs-album-block .track-progress-bar .bar.bg{background-color:rgba(40,40,40,.17)}.sqs-album-block .track-progress-bar .bar.load-bar{background-color:rgba(40,40,40,.07)}.sqs-album-block .track-progress-bar .bar.play-bar{background-color:#282828}.sqs-album-block .timers,.sqs-album-block .artist,.sqs-album-block .album-description{color:rgba(40,40,40,.5)}.sqs-album-block .track.selected .timers .elapsed{color:#282828}.sqs-album-block .title a{color:#282828}.sqs-album-block .universal-controls a{color:#282828}.sqs-album-block.inverted{color:#d7d7d7}.sqs-album-block.inverted .track-progress-bar{-webkit-tap-highlight-color:rgba(215,215,215,.17)}.sqs-album-block.inverted .track-progress-bar .bar{-webkit-tap-highlight-color:rgba(215,215,215,.17)}.sqs-album-block.inverted .track-progress-bar .bar.bg{background-color:rgba(215,215,215,.17)}.sqs-album-block.inverted .track-progress-bar .bar.load-bar{background-color:rgba(215,215,215,.07)}.sqs-album-block.inverted .track-progress-bar .bar.play-bar{background-color:#d7d7d7}.sqs-album-block.inverted .timers,.sqs-album-block.inverted .artist,.sqs-album-block.inverted .album-description{color:rgba(215,215,215,.5)}.sqs-album-block.inverted .track.selected .timers .elapsed{color:#d7d7d7}.sqs-album-block.inverted .title a{color:#d7d7d7}.sqs-album-block.inverted .universal-controls a{color:#d7d7d7}.social-summary-block .state-message.synchronizing{background-image:none;padding-left:15px}.social-summary-block .state-message.synchronizing .sync-text{float:left;margin-left:10px}.social-summary-block .state-message.synchronizing .spinner{float:left;background:transparent url('//static.squarespace.com/universal/images-v6/icons/icon-settings-16-light.png') center center no-repeat;height:19px;width:19px;-webkit-animation-duration:2s;-moz-animation-duration:2s;-o-animation-duration:2s;animation-duration:2s;-webkit-animation-iteration-count:infinite;-moz-animation-iteration-count:infinite;-o-animation-iteration-count:infinite;animation-iteration-count:infinite;-webkit-animation-name:spin-frames;-moz-animation-name:spin-frames;-o-animation-name:spin-frames;animation-name:spin-frames}.product-block .image-container{position:relative;display:block;width:100%}.product-block .image-container a{display:block;width:100%}.product-block .image-container img{width:100%;max-width:100%}.product-block .image-container .product-mark{position:absolute;top:15px;right:0;background:#222;padding:6px 8px;color:#fff;line-height:1em;text-transform:uppercase;-webkit-font-smoothing:antialiased}.product-block .productDetails.center{text-align:center}.product-block .productDetails.right{text-align:right}.product-block .productDetails .product-title{font-size:1.3em;line-height:1em;margin:1em 0 .2em 0;display:inline-block}.product-block .productDetails .product-price{font-size:1.1em;margin:0 0 1em 0}.product-block .productDetails .product-price input{width:130px;height:30px;padding-left:5px}.product-block .productDetails .product-price .minimum-price{margin-top:3px;margin-left:10px}.product-block .productDetails .product-price .original-price{text-decoration:line-through;opacity:.7;filter:alpha(opacity=70)}.product-block .productDetails .product-price .strikeout{text-decoration:line-through}.product-block .productDetails .product-variants .variant-option{margin:0 0 1em 0}.product-block .productDetails .product-variants .variant-out-of-stock{color:#c00;margin-top:8px}.product-block .buy-button,.product-block .sqs-add-to-cart-button-wrapper{margin:20px 0;display:block}.product-block .buy-button:hover,.product-block .sqs-add-to-cart-button-wrapper:hover{opacity:1}.product-block .sqs-add-to-cart-button{display:inline-block;width:auto;height:auto;padding:1em 2.5em;color:#fff;background-color:#272727;border-width:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:12px;line-height:1em;font-weight:normal;font-style:normal;text-transform:uppercase;letter-spacing:0px;text-align:center;text-decoration:none;cursor:pointer;outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none}.product-block .sqs-amazon-button{display:inline-block;width:auto;height:auto;padding:1em 2.5em;color:#fff;background-color:#272727;border-width:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:12px;line-height:1em;font-weight:normal;font-style:normal;text-transform:uppercase;letter-spacing:0px;text-align:center;text-decoration:none;cursor:pointer;outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;text-transform:none}.product-block .center .sqs-amazon-button{text-align:center}.product-block .right .sqs-amazon-button{text-align:right}.sqs-block-quote figure{margin:1em 0}.sqs-block-quote blockquote{margin:0}.sqs-block-quote .source{text-align:right}.foursquare-block ul{list-style-type:none;margin:0;padding:0;line-height:1.4em}.foursquare-block ul .foursquare-checkin{margin-bottom:12px}.foursquare-block ul .foursquare-checkin a{border:0}.foursquare-block ul .foursquare-checkin .foursquare-icon-wrapper{float:left}.foursquare-block ul .foursquare-checkin .foursquare-text{margin-left:42px;font-size:12px}.foursquare-block ul .foursquare-checkin .foursquare-venue{font-weight:bold}.foursquare-block ul .foursquare-checkin .foursquare-location{display:inline-block;padding-left:4px}.foursquare-block ul .foursquare-checkin .foursquare-timestamp{font-size:10px}.tagcloud-block ul{list-style-type:none;margin:0;padding-left:0}.tagcloud-block ul li{display:inline-block}.sqs-block-postsbycategory ul,.sqs-block-postsbyauthor ul,.sqs-block-postsbytag ul,.sqs-block-postsbymonth ul{list-style-type:none;margin:0;padding:0}.sqs-block-postsbycategory ul li,.sqs-block-postsbyauthor ul li,.sqs-block-postsbytag ul li,.sqs-block-postsbymonth ul li{margin:0 0 .3em 0;padding:0}.sqs-block-postsbycategory .count,.sqs-block-postsbyauthor .count,.sqs-block-postsbytag .count,.sqs-block-postsbymonth .count{display:none}.sqs-block-image .sqs-image-caption p,.sqs-block-image .image-caption p{font-size:12px;line-height:1.68em}.sqs-block-image .sqs-image-caption p a,.sqs-block-image .image-caption p a{display:inline}body.squarespace-config .sqs-block-image .sqs-image-caption{color:#999}body.squarespace-config .sqs-block-image .sqs-image-caption p{margin-bottom:0}body.squarespace-config .sqs-block-image .sqs-image-caption.sqs-placeholder-show{margin-top:1em}body.squarespace-config .sqs-block-image .sqs-image-caption .sqs-html-content{min-height:23px}.sqs-block-image:not(.sqs-block-focused) .sqs-image-caption.sqs-placeholder-show{display:none}.sqs-block-image .sqs-placeholder p{margin:0;margin-top:.7em}.sqs-block-image .image-block-outer-wrapper .image-block-wrapper img{max-width:none}.sqs-block-image .image-block-lightbox{cursor:pointer;display:block}.sqs-block-image .lightbox img{cursor:pointer}.sqs-block-image.sized .image-block-wrapper{overflow:hidden;padding-bottom:inherit !important}.sqs-block-image.sized .image-block-wrapper img{text-align:inherit;max-width:none}.sqs-block-image img{display:block}.sqs-block-image .image-block-wrapper.sqs-default-image{text-align:center}.sqs-block-image .image-block-wrapper.sqs-default-image img{display:inline-block}.sqs-block-image .image-block-outer-wrapper.layout-caption-overlay .intrinsic,.sqs-block-image .image-block-outer-wrapper.layout-caption-overlay-hover .intrinsic{position:relative}.sqs-block-image .image-block-outer-wrapper.layout-caption-overlay .intrinsic .image-caption-wrapper,.sqs-block-image .image-block-outer-wrapper.layout-caption-overlay-hover .intrinsic .image-caption-wrapper{position:absolute;overflow:hidden;top:auto;bottom:0;left:0;right:0;padding:18px;background:rgba(0,0,0,.7)}.sqs-block-image .image-block-outer-wrapper.layout-caption-overlay .intrinsic .image-caption-wrapper h1,.sqs-block-image .image-block-outer-wrapper.layout-caption-overlay-hover .intrinsic .image-caption-wrapper h1,.sqs-block-image .image-block-outer-wrapper.layout-caption-overlay .intrinsic .image-caption-wrapper strong,.sqs-block-image .image-block-outer-wrapper.layout-caption-overlay-hover .intrinsic .image-caption-wrapper strong{color:#eee}.sqs-block-image .image-block-outer-wrapper.layout-caption-overlay .intrinsic .image-caption-wrapper p,.sqs-block-image .image-block-outer-wrapper.layout-caption-overlay-hover .intrinsic .image-caption-wrapper p{color:#bbb;line-height:1.68em}.sqs-block-image .image-block-outer-wrapper.layout-caption-overlay .intrinsic .image-caption-wrapper p a,.sqs-block-image .image-block-outer-wrapper.layout-caption-overlay-hover .intrinsic .image-caption-wrapper p a{color:#bbb;text-decoration:underline}.sqs-block-image .image-block-outer-wrapper.layout-caption-overlay .intrinsic .image-caption-wrapper p:first-child,.sqs-block-image .image-block-outer-wrapper.layout-caption-overlay-hover .intrinsic .image-caption-wrapper p:first-child{padding-top:0;margin-top:0}.sqs-block-image .image-block-outer-wrapper.layout-caption-overlay .intrinsic .image-caption-wrapper p:last-child,.sqs-block-image .image-block-outer-wrapper.layout-caption-overlay-hover .intrinsic .image-caption-wrapper p:last-child{padding-bottom:0;margin-bottom:0}.sqs-block-image .image-block-outer-wrapper.layout-caption-overlay-hover:hover .image-caption-wrapper{visibility:visible;opacity:1}.sqs-block-image .image-block-outer-wrapper.layout-caption-overlay-hover .image-caption-wrapper{visibility:hidden;opacity:0;-webkit-transition:opacity .1s ease-out;-moz-transition:opacity .1s ease-out;-ms-transition:opacity .1s ease-out;-o-transition:opacity .1s ease-out;transition:opacity .1s ease-out}.sqs-block-image .image-block-outer-wrapper.layout-caption-overlay-hover:hover .image-caption{margin-bottom:0}.sqs-block-image .image-block-outer-wrapper.layout-caption-overlay-hover .image-caption{-webkit-transition:margin-bottom .1s ease-out;-moz-transition:margin-bottom .1s ease-out;-ms-transition:margin-bottom .1s ease-out;-o-transition:margin-bottom .1s ease-out;transition:margin-bottom .1s ease-out;margin-bottom:-5px}.sqs-block-image .image-block-outer-wrapper.layout-image-left{zoom:1}.sqs-block-image .image-block-outer-wrapper.layout-image-left:after{display:block;visibility:hidden;font-size:0;height:0;clear:both;content:"."}.sqs-block-image .image-block-outer-wrapper.layout-image-left .image-block-wrapper{float:left}.sqs-block-image .image-block-outer-wrapper.layout-image-left .image-caption-wrapper{float:left}.sqs-block-image .image-block-outer-wrapper.layout-image-left .image-caption{padding-left:15px}.sqs-block-image .image-block-outer-wrapper.layout-image-left .image-caption h1{font-size:18px;line-height:24px}.sqs-block-image .image-block-outer-wrapper.layout-image-right{zoom:1}.sqs-block-image .image-block-outer-wrapper.layout-image-right:after{display:block;visibility:hidden;font-size:0;height:0;clear:both;content:"."}.sqs-block-image .image-block-outer-wrapper.layout-image-right .image-block-wrapper{float:right}.sqs-block-image .image-block-outer-wrapper.layout-image-right .image-caption-wrapper{float:right;text-align:right}.sqs-block-image .image-block-outer-wrapper.layout-image-right .image-caption{padding-right:15px}.sqs-block-image .image-block-outer-wrapper.layout-image-right .image-caption h1{font-size:18px;line-height:24px}.sqs-block-image .image-block-wrapper{line-height:0;text-align:center;position:relative;overflow:hidden}.sqs-block-image .image-block-wrapper img{max-width:100%}.sqs-block-image .image-block-wrapper img.block-stretch{width:100%}.sqs-block-image .image-block-wrapper.float-right .image-block-wrapper{text-align:right}.sqs-block-image .intrinsic{margin:auto}.sqs-block-image .intrinsic .image-block-wrapper img{position:absolute;top:0;left:0;width:100%}.sqs-block-image .sqs-action-overlay{z-index:1000}.sqs-block-image .processing{background:#ccc;text-align:center}.sqs-block-image .processing .progress-container{background:#ccc;top:15px}.sqs-block-image .processing-failed{background:#ccc;text-align:center;position:relative;height:100%}.sqs-block-image.vsize-1 .image-block-wrapper{height:34px}.sqs-block-image.vsize-2 .image-block-wrapper{height:68px}.sqs-block-image.vsize-3 .image-block-wrapper{height:102px}.sqs-block-image.vsize-4 .image-block-wrapper{height:136px}.sqs-block-image.vsize-5 .image-block-wrapper{height:170px}.sqs-block-image.vsize-6 .image-block-wrapper{height:204px}.sqs-block-image.vsize-7 .image-block-wrapper{height:238px}.sqs-block-image.vsize-8 .image-block-wrapper{height:272px}.sqs-block-image.vsize-9 .image-block-wrapper{height:306px}.sqs-block-image.vsize-10 .image-block-wrapper{height:340px}.sqs-block-image.vsize-11 .image-block-wrapper{height:374px}.sqs-block-image.vsize-12 .image-block-wrapper{height:408px}.sqs-block-image.vsize-13 .image-block-wrapper{height:442px}.sqs-block-image.vsize-14 .image-block-wrapper{height:476px}.sqs-block-image.vsize-15 .image-block-wrapper{height:510px}.sqs-block-image.vsize-16 .image-block-wrapper{height:544px}.sqs-block-image.vsize-17 .image-block-wrapper{height:578px}.sqs-block-image.vsize-18 .image-block-wrapper{height:612px}.sqs-block-image.vsize-19 .image-block-wrapper{height:646px}.sqs-block-image.vsize-20 .image-block-wrapper{height:680px}.sqs-block-image.vsize-21 .image-block-wrapper{height:714px}.sqs-block-image.vsize-22 .image-block-wrapper{height:748px}.sqs-block-image.vsize-23 .image-block-wrapper{height:782px}.sqs-block-image.vsize-24 .image-block-wrapper{height:816px}.sqs-block-image.vsize-25 .image-block-wrapper{height:850px}.sqs-block-image.vsize-26 .image-block-wrapper{height:884px}.sqs-block-image.vsize-27 .image-block-wrapper{height:918px}.sqs-block-image.vsize-28 .image-block-wrapper{height:952px}.sqs-block-image.vsize-29 .image-block-wrapper{height:986px}.sqs-block-image.vsize-30 .image-block-wrapper{height:1020px}.sqs-block-image.vsize-1 .sqs-block-content{height:auto;overflow:visible}.sqs-block-image.vsize-2 .sqs-block-content{height:auto;overflow:visible}.sqs-block-image.vsize-3 .sqs-block-content{height:auto;overflow:visible}.sqs-block-image.vsize-4 .sqs-block-content{height:auto;overflow:visible}.sqs-block-image.vsize-5 .sqs-block-content{height:auto;overflow:visible}.sqs-block-image.vsize-6 .sqs-block-content{height:auto;overflow:visible}.sqs-block-image.vsize-7 .sqs-block-content{height:auto;overflow:visible}.sqs-block-image.vsize-8 .sqs-block-content{height:auto;overflow:visible}.sqs-block-image.vsize-9 .sqs-block-content{height:auto;overflow:visible}.sqs-block-image.vsize-10 .sqs-block-content{height:auto;overflow:visible}.sqs-block-image.vsize-11 .sqs-block-content{height:auto;overflow:visible}.sqs-block-image.vsize-12 .sqs-block-content{height:auto;overflow:visible}.sqs-block-image.vsize-13 .sqs-block-content{height:auto;overflow:visible}.sqs-block-image.vsize-14 .sqs-block-content{height:auto;overflow:visible}.sqs-block-image.vsize-15 .sqs-block-content{height:auto;overflow:visible}.sqs-block-image.vsize-16 .sqs-block-content{height:auto;overflow:visible}.sqs-block-image.vsize-17 .sqs-block-content{height:auto;overflow:visible}.sqs-block-image.vsize-18 .sqs-block-content{height:auto;overflow:visible}.sqs-block-image.vsize-19 .sqs-block-content{height:auto;overflow:visible}.sqs-block-image.vsize-20 .sqs-block-content{height:auto;overflow:visible}.sqs-block-image.vsize-21 .sqs-block-content{height:auto;overflow:visible}.sqs-block-image.vsize-22 .sqs-block-content{height:auto;overflow:visible}.sqs-block-image.vsize-23 .sqs-block-content{height:auto;overflow:visible}.sqs-block-image.vsize-24 .sqs-block-content{height:auto;overflow:visible}.sqs-block-image.vsize-25 .sqs-block-content{height:auto;overflow:visible}.sqs-block-image.vsize-26 .sqs-block-content{height:auto;overflow:visible}.sqs-block-image.vsize-27 .sqs-block-content{height:auto;overflow:visible}.sqs-block-image.vsize-28 .sqs-block-content{height:auto;overflow:visible}.sqs-block-image.vsize-29 .sqs-block-content{height:auto;overflow:visible}.sqs-block-image.vsize-30 .sqs-block-content{height:auto;overflow:visible}.sqs-block-horizontalrule hr{border:none;color:#bbb;background-color:#bbb;height:1px}.sqs-block-html{clear:none}.sqs-block-html .sqs-block-content{outline:none}.sqs-block-html .sqs-block-content>*:first-child{margin-top:0}.sqs-block-html .sqs-block-content>*:last-child{margin-bottom:0}.sqs-html{position:relative;z-index:1}.sqs-html .sqs-html-content{outline:none;z-index:2}.sqs-html .sqs-html-hidden{display:none}.sqs-block-markdown{clear:none}.sqs-block-markdown .sqs-block-content{position:relative}.sqs-block-markdown .sqs-block-content *:first-child{margin-top:0}.sqs-block-markdown .sqs-block-content *:last-child{margin-bottom:0}.sqs-block-markdown .sqs-placeholder{color:#999}.sqs-block-markdown .sqs-editing-overlay{display:none}.sqs-block-markdown hr{border:none;border-bottom:1px solid #ccc;width:75%;margin-left:auto;margin-right:auto}.sqs-block-markdown textarea{position:absolute;top:17px;bottom:0;left:17px;right:17px;width:calc( 100% - 34px);padding:0;margin:0;border:none;background:transparent;outline:none;resize:none;overflow:hidden;color:#333}.sqs-block-markdown .textarea-clone{margin:0;min-height:18px;visibility:hidden}.sqs-block-markdown textarea,.sqs-block-markdown .textarea-clone{font:15px/18px 'Courier New',monospace !important;white-space:pre-wrap;word-wrap:break-word}.sqs-block-markdown img{max-width:100%;height:auto}.source-code{white-space:pre;overflow:auto}.cm-keyword{color:#708}.cm-atom{color:#219}.cm-number{color:#164}.cm-def{color:blue}.cm-variable-2{color:#05a}.cm-variable-3{color:#085}.cm-comment{color:#aaa}.cm-string{color:#1a1}.cm-string-2{color:#5f0}.cm-meta{color:#555}.cm-error{color:red}.cm-qualifier{color:#555}.cm-builtin{color:#30a}.cm-bracket{color:#cc7}.cm-tag{color:#170}.cm-attribute{color:#00c}.cm-header{color:#000}.cm-quote{color:#900}.cm-hr{color:#999}.cm-link{color:#00c}.dark .cm-comment{color:#75715e}.dark .cm-atom{color:#ae81ff}.dark .cm-number{color:#ae81ff}.dark .cm-property,.dark .cm-attribute{color:#a6e22e}.dark .cm-keyword{color:#f92672}.dark .cm-string{color:#e6db74}.dark .cm-variable-2{color:#9effff}.dark .cm-def{color:#fd971f}.dark .cm-error{background:#f92672;color:#f8f8f0}.dark .cm-bracket{color:#f8f8f2}.dark .cm-tag{color:#f92672}.dark .cm-link{color:#ae81ff}.code-block .state-message:not(:last-child){margin-bottom:10px}.embed-block .intrinsic,.video-block .intrinsic,.embed-block .sqs-block-content .intrinsic,.video-block .sqs-block-content .intrinsic{position:relative}.embed-block .intrinsic .embed-block-wrapper:not(.embed-block-provider-SoundCloud),.video-block .intrinsic .embed-block-wrapper:not(.embed-block-provider-SoundCloud),.embed-block .sqs-block-content .intrinsic .embed-block-wrapper:not(.embed-block-provider-SoundCloud),.video-block .sqs-block-content .intrinsic .embed-block-wrapper:not(.embed-block-provider-SoundCloud){position:relative}.embed-block .intrinsic .embed-block-wrapper:not(.embed-block-provider-SoundCloud) .sqs-video-wrapper,.video-block .intrinsic .embed-block-wrapper:not(.embed-block-provider-SoundCloud) .sqs-video-wrapper,.embed-block .sqs-block-content .intrinsic .embed-block-wrapper:not(.embed-block-provider-SoundCloud) .sqs-video-wrapper,.video-block .sqs-block-content .intrinsic .embed-block-wrapper:not(.embed-block-provider-SoundCloud) .sqs-video-wrapper{position:absolute;top:0;left:0;width:100%;height:100%}.embed-block .intrinsic .embed-block-wrapper:not(.embed-block-provider-SoundCloud) iframe,.video-block .intrinsic .embed-block-wrapper:not(.embed-block-provider-SoundCloud) iframe,.embed-block .sqs-block-content .intrinsic .embed-block-wrapper:not(.embed-block-provider-SoundCloud) iframe,.video-block .sqs-block-content .intrinsic .embed-block-wrapper:not(.embed-block-provider-SoundCloud) iframe{position:absolute;top:0;left:0;width:100%;height:100%}.embed-block .intrinsic .embed-block-wrapper:not(.embed-block-provider-SoundCloud) .flickr-oembed,.video-block .intrinsic .embed-block-wrapper:not(.embed-block-provider-SoundCloud) .flickr-oembed,.embed-block .sqs-block-content .intrinsic .embed-block-wrapper:not(.embed-block-provider-SoundCloud) .flickr-oembed,.video-block .sqs-block-content .intrinsic .embed-block-wrapper:not(.embed-block-provider-SoundCloud) .flickr-oembed{position:absolute;top:0;left:0;width:100%;height:100%}.embed-block .intrinsic .embed-block-provider-SoundCloud,.video-block .intrinsic .embed-block-provider-SoundCloud,.embed-block .sqs-block-content .intrinsic .embed-block-provider-SoundCloud,.video-block .sqs-block-content .intrinsic .embed-block-provider-SoundCloud{padding-bottom:0 !important}.embed-block .intrinsic .embed-block-provider-SoundCloud iframe,.video-block .intrinsic .embed-block-provider-SoundCloud iframe,.embed-block .sqs-block-content .intrinsic .embed-block-provider-SoundCloud iframe,.video-block .sqs-block-content .intrinsic .embed-block-provider-SoundCloud iframe{width:100%}.sqs-block-soundcloud .sqs-intrinsic iframe{position:absolute;top:0;left:0;width:100% !important;height:100% !important}.sqs-block-audio{min-height:34px}.sqs-block-tourdates .sqs-spin{position:absolute;top:50px;left:50%;margin-left:-15px}.sqs-block-tourdates .tour-list{list-style-type:none;margin:0;padding:0;min-height:150px}.sqs-block-tourdates .loaded .tour-list{min-height:0}.sqs-block-tourdates .tour-item{position:relative;margin:0;padding:17px 0;border-bottom:1px solid rgba(130,130,130,.15);overflow:hidden}.sqs-block-tourdates .tour-item.clone{display:none}.sqs-block-tourdates .tour-item:first-of-type{padding-top:0}.sqs-block-tourdates .tour-item:last-of-type{border:none}.sqs-block-tourdates .loaded .tour-item-no-results:after{content:'There are no upcoming tour dates.'}.sqs-block-tourdates .tour-timeframe,.sqs-block-tourdates .tour-venue,.sqs-block-tourdates .tour-location,.sqs-block-tourdates .tour-actions{float:left;box-sizing:border-box;font-size:16px;line-height:28px}.sqs-block-tourdates .tour-timeframe{width:120px;white-space:nowrap;padding:2px 0 0 0;font-size:13px !important;font-weight:bold;letter-spacing:.5px}.sqs-block-tourdates .tour-date,.sqs-block-tourdates .tour-weekday{box-sizing:border-box;display:inline-block;width:50%;text-transform:uppercase}.sqs-block-tourdates .tour-venue{width:calc(60% - 171px);width:-webkit-calc(60% - 171px);width:-moz-calc(60% - 171px);padding:1px 25.5px 0 0}.sqs-block-tourdates .tour-venue-link,.sqs-block-tourdates .tour-location-link{color:inherit !important;text-decoration:none !important}.sqs-block-tourdates .tour-venue-name,.sqs-block-tourdates .tour-lineup{display:block}.sqs-block-tourdates .tour-lineup{opacity:.6;margin-top:2px;font-size:14px;line-height:18px}.sqs-block-tourdates .tour-lineup:before{content:'w/ '}.sqs-block-tourdates .tour-lineup-item{display:inline}.sqs-block-tourdates .tour-lineup-item:after{content:', '}.sqs-block-tourdates .tour-lineup-item:last-of-type:after{content:none}.sqs-block-tourdates .tour-location{width:calc(40% - 114px);width:-webkit-calc(40% - 114px);width:-moz-calc(40% - 114px);padding:1px 25.5px 0 0}.sqs-block-tourdates .tour-actions{width:165px;white-space:nowrap;text-align:right}.sqs-block-tourdates .tour-button{width:auto;height:auto;padding:1em 2.5em;color:#fff;background-color:#272727;border-width:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:12px;line-height:1em;font-weight:normal;font-style:normal;text-transform:uppercase;letter-spacing:0px;text-align:center;text-decoration:none;cursor:pointer;outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;display:inline-block;padding:0 12px !important;font-size:11px !important;line-height:28px}.sqs-block-tourdates .tour-button--ticket:empty{display:none}.sqs-block-tourdates .tour-button--disabled.tour-button,.sqs-block-tourdates .tour-button--soldout.tour-button,.sqs-block-tourdates .tour-button--disabled.tour-button:hover,.sqs-block-tourdates .tour-button--soldout.tour-button:hover{opacity:.3;cursor:default;pointer-events:none}.sqs-block-tourdates .tour-button--rsvp:before{content:'RSVP'}.sqs-block-tourdates .tourblock-compact-mode .tour-item{display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-flex-flow:column nowrap;-moz-flex-flow:column nowrap;-ms-flex-flow:column nowrap;flex-flow:column nowrap;-webkit-box-pack:flex-start;-ms-flex-pack:flex-start;-webkit-box-pack:start;-ms-flex-pack:start;-webkit-justify-content:flex-start;-moz-justify-content:flex-start;justify-content:flex-start;width:100%;position:relative;padding:20px 0;flex-direction:column;-webkit-box-orient:vertical;overflow:visible}.sqs-block-tourdates .tourblock-compact-mode .tour-item:first-of-type{padding-top:0}.sqs-block-tourdates .tourblock-compact-mode .tour-timeframe,.sqs-block-tourdates .tourblock-compact-mode .tour-venue,.sqs-block-tourdates .tourblock-compact-mode .tour-location,.sqs-block-tourdates .tourblock-compact-mode .tour-actions{float:none;display:block;width:auto;-webkit-flex-basis:auto;-moz-flex-basis:auto;-ms-flex-preferred-size:auto;flex-basis:auto;padding-top:0 !important}.sqs-block-tourdates .tourblock-compact-mode .tour-timeframe{-webkit-box-ordinal-group:1;-moz-box-ordinal-group:1;-ms-flex-order:1;-webkit-order:1;order:1}.sqs-block-tourdates .tourblock-compact-mode .tour-location{-webkit-box-ordinal-group:2;-moz-box-ordinal-group:2;-ms-flex-order:2;-webkit-order:2;order:2}.sqs-block-tourdates .tourblock-compact-mode .tour-venue{-webkit-box-ordinal-group:3;-moz-box-ordinal-group:3;-ms-flex-order:3;-webkit-order:3;order:3}.sqs-block-tourdates .tourblock-compact-mode .tour-timeframe{margin-bottom:14px;right:0}.sqs-block-tourdates .tourblock-compact-mode .tour-date,.sqs-block-tourdates .tourblock-compact-mode .tour-weekday{width:auto;margin-right:5px}.sqs-block-tourdates .tourblock-compact-mode .tour-lineup{margin-top:0}.sqs-block-tourdates .tourblock-compact-mode .tour-actions{position:absolute;top:18px;right:0}.sqs-block-tourdates .tourblock-compact-mode .tour-item:first-of-type .tour-actions{top:-2px}.sqs-block-tourdates .tourblock-has-small-container .tour-item{display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-flex-flow:column nowrap;-moz-flex-flow:column nowrap;-ms-flex-flow:column nowrap;flex-flow:column nowrap;-webkit-box-pack:flex-start;-ms-flex-pack:flex-start;-webkit-box-pack:start;-ms-flex-pack:start;-webkit-justify-content:flex-start;-moz-justify-content:flex-start;justify-content:flex-start;width:100%;position:relative;padding:20px 0;flex-direction:column;-webkit-box-orient:vertical;overflow:visible}.sqs-block-tourdates .tourblock-has-small-container .tour-item:first-of-type{padding-top:0}.sqs-block-tourdates .tourblock-has-small-container .tour-timeframe,.sqs-block-tourdates .tourblock-has-small-container .tour-venue,.sqs-block-tourdates .tourblock-has-small-container .tour-location,.sqs-block-tourdates .tourblock-has-small-container .tour-actions{float:none;display:block;width:auto;-webkit-flex-basis:auto;-moz-flex-basis:auto;-ms-flex-preferred-size:auto;flex-basis:auto;padding-top:0 !important}.sqs-block-tourdates .tourblock-has-small-container .tour-timeframe{-webkit-box-ordinal-group:1;-moz-box-ordinal-group:1;-ms-flex-order:1;-webkit-order:1;order:1}.sqs-block-tourdates .tourblock-has-small-container .tour-location{-webkit-box-ordinal-group:2;-moz-box-ordinal-group:2;-ms-flex-order:2;-webkit-order:2;order:2}.sqs-block-tourdates .tourblock-has-small-container .tour-venue{-webkit-box-ordinal-group:3;-moz-box-ordinal-group:3;-ms-flex-order:3;-webkit-order:3;order:3}.sqs-block-tourdates .tourblock-has-small-container .tour-timeframe{margin-bottom:14px;right:0}.sqs-block-tourdates .tourblock-has-small-container .tour-date,.sqs-block-tourdates .tourblock-has-small-container .tour-weekday{width:auto;margin-right:5px}.sqs-block-tourdates .tourblock-has-small-container .tour-lineup{margin-top:0}.sqs-block-tourdates .tourblock-has-small-container .tour-actions{position:absolute;top:18px;right:0}.sqs-block-tourdates .tourblock-has-small-container .tour-item:first-of-type .tour-actions{top:-2px}@media screen and (max-width:450px){.sqs-block-tourdates .tour-item{display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-flex-flow:column nowrap;-moz-flex-flow:column nowrap;-ms-flex-flow:column nowrap;flex-flow:column nowrap;-webkit-box-pack:flex-start;-ms-flex-pack:flex-start;-webkit-box-pack:start;-ms-flex-pack:start;-webkit-justify-content:flex-start;-moz-justify-content:flex-start;justify-content:flex-start;width:100%;position:relative;padding:20px 0;flex-direction:column;-webkit-box-orient:vertical;overflow:visible}.sqs-block-tourdates .tour-item:first-of-type{padding-top:0}.sqs-block-tourdates .tour-timeframe,.sqs-block-tourdates .tour-venue,.sqs-block-tourdates .tour-location,.sqs-block-tourdates .tour-actions{float:none;display:block;width:auto;-webkit-flex-basis:auto;-moz-flex-basis:auto;-ms-flex-preferred-size:auto;flex-basis:auto;padding-top:0 !important}.sqs-block-tourdates .tour-timeframe{-webkit-box-ordinal-group:1;-moz-box-ordinal-group:1;-ms-flex-order:1;-webkit-order:1;order:1}.sqs-block-tourdates .tour-location{-webkit-box-ordinal-group:2;-moz-box-ordinal-group:2;-ms-flex-order:2;-webkit-order:2;order:2}.sqs-block-tourdates .tour-venue{-webkit-box-ordinal-group:3;-moz-box-ordinal-group:3;-ms-flex-order:3;-webkit-order:3;order:3}.sqs-block-tourdates .tour-timeframe{margin-bottom:14px;right:0}.sqs-block-tourdates .tour-date,.sqs-block-tourdates .tour-weekday{width:auto;margin-right:5px}.sqs-block-tourdates .tour-lineup{margin-top:0}.sqs-block-tourdates .tour-actions{position:absolute;top:18px;right:0}.sqs-block-tourdates .tour-item:first-of-type .tour-actions{top:-2px}}.button-style-outline .sqs-block-tourdates .tour-timeframe{padding-top:3px}.button-style-outline .sqs-block-tourdates .tour-venue,.button-style-outline .sqs-block-tourdates .tour-location{padding-top:2px}.button-style-outline .sqs-block-tourdates .tour-button{margin-left:2px}.sqs-search-ui-button-wrapper{position:relative}.sqs-search-ui-button-wrapper.color-dark .search-input{background-image:url(/universal/images-v6/icons/icon-searchqueries-20-dark.png);border:1px solid #aaa}.sqs-search-ui-button-wrapper.color-dark::-webkit-input-placeholder{color:#666}.sqs-search-ui-button-wrapper.color-dark:-moz-placeholder{color:#666}.sqs-search-ui-button-wrapper.color-dark::-moz-placeholder{color:#666}.sqs-search-ui-button-wrapper.color-dark:-ms-input-placeholder{color:#666}.sqs-search-ui-button-wrapper.color-light .search-input{background-image:url(/universal/images-v6/icons/icon-searchqueries-20-light.png);color:#f7f7f7;border:1px solid #eee}.sqs-search-ui-button-wrapper.color-light::-webkit-input-placeholder{color:#ddd}.sqs-search-ui-button-wrapper.color-light:-moz-placeholder{color:#ddd}.sqs-search-ui-button-wrapper.color-light::-moz-placeholder{color:#ddd}.sqs-search-ui-button-wrapper.color-light:-ms-input-placeholder{color:#ddd}.sqs-search-ui-button-wrapper .search-input{opacity:.7;-webkit-transition:opacity .2s ease-out;-moz-transition:opacity .2s ease-out;-ms-transition:opacity .2s ease-out;-o-transition:opacity .2s ease-out;transition:opacity .2s ease-out;-webkit-transition:background-image .2s ease-out;-moz-transition:background-image .2s ease-out;-ms-transition:background-image .2s ease-out;-o-transition:background-image .2s ease-out;transition:background-image .2s ease-out;padding:12px 12px 12px 45px;background:no-repeat 15px 50%;width:100%;min-height:20px;display:block;outline:0;box-sizing:border-box}.sqs-search-ui-button-wrapper .search-input.loading{background-image:none}.sqs-search-ui-button-wrapper .search-input.disabled{cursor:pointer}.sqs-search-ui-button-wrapper .search-input.hover-effect:hover,.sqs-search-ui-button-wrapper .search-input.hover-effect:focus{opacity:1}.sqs-search-ui-button-wrapper .search-input:hover::-webkit-input-placeholder{font-style:normal}.sqs-search-ui-button-wrapper .search-input:hover:-moz-placeholder{font-style:normal}.sqs-search-ui-button-wrapper .search-input:hover::-moz-placeholder{font-style:normal}.sqs-search-ui-button-wrapper .search-input:hover:-ms-input-placeholder{font-style:normal}.sqs-search-ui-button-wrapper .spinner-wrapper{position:absolute;top:50%;-webkit-transform:translatey(-50%);-moz-transform:translatey(-50%);-ms-transform:translatey(-50%);-o-transform:translatey(-50%);transform:translatey(-50%);left:18px}.sqs-search-ui-button-wrapper .spinner-wrapper .sqs-spin{display:block;vertical-align:middle}.sqs-search-preview-ui{position:absolute;z-index:999999;background-color:#fff;width:100%}.sqs-search-preview-ui .sqs-search-ui-result{border-top:none;border:1px solid #ddd}.sqs-search-preview-ui .sqs-search-ui-result .search-result-notice{background-color:#fff;font-weight:200;font-size:12px;padding:6px 12px}.sqs-search-preview-ui .sqs-search-ui-result .search-result-notice.hide{display:none}.sqs-search-preview-ui .sqs-search-ui-result .sqs-search-ui-list{max-height:500px;overflow-x:hidden;overflow-y:scroll}.sqs-search-preview-ui .sqs-search-ui-result .sqs-search-ui-list .search-result{padding:16px;cursor:pointer;border-bottom:1px solid #ddd;-webkit-transition:background-color .2s ease-out;-moz-transition:background-color .2s ease-out;-ms-transition:background-color .2s ease-out;-o-transition:background-color .2s ease-out;transition:background-color .2s ease-out}.sqs-search-preview-ui .sqs-search-ui-result .sqs-search-ui-list .search-result:last-child{border-bottom:none}.sqs-search-preview-ui .sqs-search-ui-result .sqs-search-ui-list .search-result.selected,.sqs-search-preview-ui .sqs-search-ui-result .sqs-search-ui-list .search-result:hover{background-color:#f5f5f5}.sqs-search-preview-ui .sqs-search-ui-result .sqs-search-ui-list .search-result .sqs-search-ui-item{border-top:none}.sqs-search-preview-ui .sqs-search-ui-result .sqs-search-ui-list .search-result .sqs-search-ui-item em{color:#222;font-style:italic}.sqs-search-preview-ui .sqs-search-ui-result .sqs-search-ui-list .search-result .sqs-search-ui-item .sqs-main-image{position:absolute;top:0;left:0;right:0;bottom:0}.sqs-search-preview-ui .sqs-search-ui-result .sqs-search-ui-list .search-result .sqs-search-ui-item .sqs-main-image-container{width:50px;float:right;margin-left:5px;box-shadow:#ddd 1px -1px 5px}.sqs-search-preview-ui .sqs-search-ui-result .sqs-search-ui-list .search-result .sqs-search-ui-item .sqs-main-image-intrinsic{position:relative;width:100%;height:0;padding-bottom:100%}.sqs-search-preview-ui .sqs-search-ui-result .sqs-search-ui-list .search-result .sqs-search-ui-item .sqs-title{font-size:16px;line-height:1.2em;margin-bottom:.5em;color:#333}.sqs-search-preview-ui .sqs-search-ui-result .sqs-search-ui-list .search-result .sqs-search-ui-item .sqs-content{font-size:12px;line-height:1.4em}.sqs-search-preview-ui.no-image .sqs-main-image-container{display:none}.sqs-block-map .sqs-block-map-content{position:relative}.sqs-block-map .sqs-block-map-content .sqs-map-wrapper{position:absolute !important;top:0;left:0;height:100%;max-width:none;width:100%}.rss-block .social-rss:before{position:relative;top:-.05em;margin-right:.4em;font-size:.7em}.twitter-block .tweet-list{list-style-type:none;margin:0 0 2.2em 0;padding:0}.twitter-block .tweet{margin:0 0 2.2em 0}.twitter-block .tweet a{border:0}.twitter-block .tweet .tweet-avatar-wrapper{float:left}.twitter-block .tweet .tweet-avatar{border-radius:2px}.twitter-block .tweet .tweet-text-wrapper{margin-left:60px}.twitter-block .tweet.no-avatar .tweet-text-wrapper{margin-left:0px}.twitter-block .tweet .tweet-from{font-size:1.1em;margin:0 0 .5em 0;line-height:1em;font-weight:bold}.twitter-block .tweet .tweet-timestamp a{font-size:.8em}.form-wrapper .field-list{line-height:normal}.form-wrapper .field-list fieldset,.form-wrapper .field-list legend{margin:0;padding:0;border:0}.form-wrapper .field-list legend{display:none}.form-wrapper .field-list textarea{min-height:100px;resize:vertical}.form-wrapper .field-list textarea.medium{min-height:200px}.form-wrapper .field-list textarea.large{min-height:300px}.form-wrapper .field-list .section{margin:2em 0;padding-bottom:.3em;font-size:.9em;text-transform:uppercase}.form-wrapper .field-list .section.underline{border-bottom:1px solid #999}.form-wrapper .field-list .section:nth-child(1){margin:0 0 2em 0}.form-wrapper .field-list .title{display:block}.form-wrapper .field-list .description{padding:.5em 0 .5em;font-size:12px;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=70)";filter:alpha(opacity=70);-moz-opacity:.7;-khtml-opacity:.7;opacity:.7;display:block}.form-wrapper .field-list .field{position:relative;margin:0 0 24px}.form-wrapper .field-list .field .caption{font-size:12px}.form-wrapper .field-list .field .caption .field-element{font-size:14px}.form-wrapper .field-list .field .field-element{width:100%;padding:12px;margin:6px 0 4px;border:1px solid #ccc;background:#fafafa;font-family:sans-serif;font-size:12px;line-height:normal;box-sizing:border-box;border-radius:2px}.form-wrapper .field-list .field .field-element:focus{background:#fff;-webkit-transition:background .1s ease-in;-moz-transition:background .1s ease-in;-ms-transition:background .1s ease-in;-o-transition:background .1s ease-in;transition:background .1s ease-in;outline:none}.form-wrapper .field-list .field select{margin:6px 0 4px;max-width:100%}.form-wrapper .field-list .field .prefix{position:absolute;bottom:16px;left:8px;color:#aaa;font-family:sans-serif;font-size:13px;line-height:16px}.form-wrapper .field-list .field.twitter .field-element{padding-left:22px}.form-wrapper .field-list .field.currency.hassymbol .field-element{padding-left:20px}.form-wrapper .field-list .field.website .field-element{padding-left:45px}.form-wrapper .field-list .field.checkbox label,.form-wrapper .field-list .field.radio label{cursor:pointer}.form-wrapper .field-list .field.checkbox input,.form-wrapper .field-list .field.radio input{margin-right:5px}.form-wrapper .field-list .field .option{margin:6px 0 4px;font-size:13px}.form-wrapper .field-list .field.likert .item{overflow:hidden;margin:1.6em 0 1.6em 0}.form-wrapper .field-list .field.likert .question{margin:0 0 .5em 0;font-size:.9em}.form-wrapper .field-list .field.likert .option{width:20%;float:left;text-align:left;border-top:1px solid #ddd}.form-wrapper .field-list .field.likert .option label{margin:0;padding:0 0 0 1px;font-size:.9em;display:block;cursor:pointer}.form-wrapper .field-list .field.likert .option input{margin:10px 0;display:block}.form-wrapper .field-list .field.likert .option:last-of-type{border-right:none}.form-wrapper .field-list .fields{margin:0 0 0 -2%}.form-wrapper .field-list .fields .title,.form-wrapper .field-list .fields .description,.form-wrapper .field-list .fields .field,.form-wrapper .field-list .fields .field-error{margin-left:2%}.form-wrapper .field-list .fields .field{float:left}.form-wrapper .field-list .fields .field.two-digits{width:3.5em}.form-wrapper .field-list .fields .field.three-digits{width:4.2em}.form-wrapper .field-list .fields .field.four-digits{width:4.8em}.form-wrapper .field-list .fields .field.ampm{width:4.5em}.form-wrapper .field-list .fields.name .field{width:48%}.form-wrapper .field-list .fields.address .field.address1,.form-wrapper .field-list .fields.address .field.address2{width:98%}.form-wrapper .field-list .fields.address .field.city{width:70%}.form-wrapper .field-list .fields.address .field.state-province{width:26%}.form-wrapper .field-list .fields.address .field.zip{width:36%}.form-wrapper .field-list .fields.address .field.country{width:98%}.form-wrapper .field-list .fields.payment .field.card-expiry-month{width:40%}.form-wrapper .field-list .fields.payment .field.card-expiry-year{width:40%}.form-wrapper .field-list .form-item.error,.form-wrapper .field-list .form-item.error .caption,.form-wrapper .field-list .form-item.error .title,.form-wrapper .field-list .form-item.error .description{color:#bd0000}.form-wrapper .field-list .form-item.error input,.form-wrapper .field-list .form-item.error textarea{border:1px solid #e99292}.form-wrapper .form-button-wrapper--align-left{text-align:left}.form-wrapper .form-button-wrapper--align-center{text-align:center}.form-wrapper .form-button-wrapper--align-right{text-align:right}.form-wrapper input[type=submit]{display:inline-block;width:auto;height:auto;padding:1em 2.5em;color:#fff;background-color:#272727;border-width:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:12px;line-height:1em;font-weight:normal;font-style:normal;text-transform:uppercase;letter-spacing:0px;text-align:center;text-decoration:none;cursor:pointer;outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;font-size:14px;text-transform:none}.form-wrapper .form-submission-text{margin-top:20px}.form-wrapper .field-error{color:#fff;background:#cc3b3b url('//static.squarespace.com/universal/images-v6/standard/icon_close_7_light.png') no-repeat 9px 50%;padding:5px 15px 3px 25px;font-size:13px;border-radius:2px;margin:12px 0;line-height:23px;display:inline-block}.form-wrapper .field .field-error{margin-bottom:.5em}.form-wrapper .submitting .field-list{opacity:.7}.form-wrapper .hidden,.form-wrapper.hidden{display:none}.form-block .lightbox-handle-wrapper--align-left{text-align:left}.form-block .lightbox-handle-wrapper--align-center{text-align:center}.form-block .lightbox-handle-wrapper--align-right{text-align:right}.form-block .lightbox-handle{display:inline-block;width:auto;height:auto;padding:1em 2.5em;color:#fff;background-color:#272727;border-width:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:12px;line-height:1em;font-weight:normal;font-style:normal;text-transform:uppercase;letter-spacing:0px;text-align:center;text-decoration:none;cursor:pointer;outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;font-size:14px;text-transform:none}.sqs-modal-lightbox{width:100%;font-size:14px;text-transform:none;font-style:normal;text-decoration:none}.sqs-modal-lightbox-content{z-index:100000000;position:absolute;height:100%;width:100%;top:0}.sqs-modal-lightbox-content .lightbox-background{position:absolute;top:0;width:100%;height:100%;background:#000;opacity:.4}.sqs-modal-lightbox-content .lightbox-inner{position:absolute;overflow:auto;-webkit-overflow-scrolling:touch;width:100%;height:100%;top:0}.sqs-modal-lightbox-content .lightbox-inner .lightbox-content{max-width:600px;margin:0 auto;position:relative;padding:40px;background:#fff}.sqs-modal-lightbox-content .lightbox-inner .lightbox-content .form-wrapper{color:#222;font-family:inherit}.sqs-modal-lightbox-content .lightbox-inner .lightbox-content .form-wrapper .form-title{font-size:22px;line-height:1.2em;margin-right:22px;color:#333}.sqs-modal-lightbox-content .lightbox-inner .lightbox-content .form-wrapper .form-inner-wrapper form{margin-top:55px}.sqs-modal-lightbox-content .lightbox-inner .lightbox-content .form-wrapper .form-inner-wrapper form .radio .option{margin-left:1px}.sqs-modal-lightbox-content .lightbox-inner .lightbox-content .lightbox-close{position:absolute;color:#333;font-size:22px;width:22px;line-height:22px;top:40px;right:40px;text-align:center;cursor:pointer}@media only screen and (max-width:600px){.sqs-modal-lightbox .lightbox-inner{background:#fff}.sqs-modal-lightbox .lightbox-inner .lightbox-content{margin-top:0 !important}}html.sqs-modal-lightbox-open,html.sqs-modal-lightbox-open body{overflow:hidden}.menu-block .menu-selector{margin-bottom:3em}.menu-block .menu-selector label{display:inline-block;padding:0 .5em;font-size:1.1em}.menu-block .menu-select-button{display:none}.menu-block .menu-header{margin-bottom:3em}.menu-block .menu-section{margin-top:1em}.menu-block .menu-section+.menu-section{margin-top:5em}.menu-block .menu-section-header{margin-bottom:2em;padding-bottom:1em}.menu-block .menu-section-title{font-size:1.5em}.menu-block .menu-section-description{font-size:.85em;line-height:1.4em}.menu-block .menu-item{margin-bottom:2em;margin-top:0;line-height:1.2em}.menu-block .menu-item-title{font-size:1.1em;font-weight:700;line-height:1.2em}.menu-block .menu-item-description{line-height:1.3em;margin-top:5px}.menu-block .menu-item-price-bottom{margin:.5em 0}.menu-block .menu-item-option{font-size:.8em;font-style:italic}.menu-block .menu-style-classic .menu-selector,.menu-block .menu-style-classic .menu-header,.menu-block .menu-style-classic .menu-section-title,.menu-block .menu-style-classic .menu-section-description{text-align:center}.menu-block .menu-style-classic .menu-items{-webkit-column-width:18em;-webkit-column-gap:3em;-moz-column-width:18em;-moz-column-gap:3em;-ms-column-width:18em;-ms-column-gap:3em;-o-column-width:18em;-o-column-gap:3em;column-width:18em;column-gap:3em}.menu-block .menu-style-classic .menu-item{page-break-inside:avoid;-webkit-column-break-inside:avoid;-moz-column-break-inside:avoid;-ms-column-break-inside:avoid;-o-column-break-inside:avoid;break-inside:avoid;width:100%}.menu-block .menu-style-classic .menu-item-description{margin-right:3em}.menu-block .menu-style-classic .menu-item-price-top{float:right;padding-left:20px}.menu-block .menu-style-classic .menu-item-price-bottom{display:none}.menu-block .menu-style-simple .menu-selector,.menu-block .menu-style-simple .menu{text-align:center}.menu-block .menu-style-simple .menu-item-price-top{display:none}.donation-block .sqs-donate-button-wrapper{display:block}.donation-block .sqs-donate-button-wrapper--align-left{text-align:left}.donation-block .sqs-donate-button-wrapper--align-center{text-align:center}.donation-block .sqs-donate-button-wrapper--align-right{text-align:right}.donation-block .sqs-donate-button{display:inline-block;width:auto;height:auto;padding:1em 2.5em;color:#fff;background-color:#272727;border-width:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:12px;line-height:1em;font-weight:normal;font-style:normal;text-transform:uppercase;letter-spacing:0px;text-align:center;text-decoration:none;cursor:pointer;outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none}.sqs-block-opentable-hidden{display:none !important}.sqs-block-opentable iframe{visibility:hidden;position:absolute}.sqs-block-opentable *{box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box}.sqs-block-opentable #OT_form{padding:0;margin:0;width:165px;width:auto}.sqs-block-opentable .OT_wrapper{border:none;border-radius:0;background-color:rgba(0,0,0,.05);font-family:inherit;width:100%;margin:0;padding:34px 17px 40px;background:rgba(0,0,0,.05);color:#272727;font-size:15px;line-height:1em;text-align:center;position:relative}.sqs-block-opentable .OT_header{width:85%;margin:0 auto;position:relative}.sqs-block-opentable .OT_title{position:relative;width:100%;margin:0 0 17px 0;padding:0;font-size:30px;color:#272727;color:rgba(0,0,0,.95);font-weight:normal;text-align:center;line-height:1em}.sqs-block-opentable .OT_subtitle{margin:0;padding:0;font-size:10px;letter-spacing:.15em;color:#272727;color:rgba(0,0,0,.8);text-transform:uppercase;font-weight:normal;white-space:nowrap;width:auto;line-height:1em}.sqs-block-opentable .OT_list{list-style:none;margin:28px 0 0 0;padding:0;width:auto;display:inline-block;line-height:1em}.sqs-block-opentable .OT_day,.sqs-block-opentable .OT_time,.sqs-block-opentable .OT_party{margin:0 12px;padding:6px 0 6px 35px;height:auto;background-image:url('/universal/images-v6/icons/opentable-icons.svg');background-repeat:no-repeat;background-position:0 0;width:33%;min-width:150px;max-width:180px;position:relative;border:none !important;list-style:none;display:inline-block;line-height:1em}.sqs-block-opentable.sqs-block-opentable-hide-fields .OT_day,.sqs-block-opentable.sqs-block-opentable-hide-fields .OT_time,.sqs-block-opentable.sqs-block-opentable-hide-fields .OT_party{display:none}.sqs-block-opentable.sqs-block-opentable-hide-fields .OT_submit{margin:0}.sqs-block-opentable .OT_day{margin:0 12px;padding:6px 0 6px 35px;background-position:-18px -7px;border:none;list-style:none;background-size:123px}.sqs-block-opentable .OT_time{background-position:-18px -55px;border:none}.sqs-block-opentable .OT_party{background-position:-18px -102px;border:none}.sqs-block-opentable .OT_searchTimeField,.sqs-block-opentable .OT_searchDateField,.sqs-block-opentable .OT_searchPartyField{font-family:inherit;background:#fff url('/universal/images-v6/icons/opentable-icons.svg') no-repeat;color:#272727;font-weight:normal;margin:0;border:1px solid rgba(0,0,0,.12);width:100%;height:auto;font-size:13px;font-style:normal;padding:.7em 1.1em;border-radius:0px;cursor:pointer;line-height:normal;outline:none;background-position:right -14px top -75px;background-size:43px;-moz-background-clip:padding;-webkit-background-clip:padding;background-clip:padding-box}.sqs-block-opentable #OT_timeList,.sqs-block-opentable #OT_partyList{max-height:195px;overflow:auto;border:1px solid rgba(0,0,0,.12);position:absolute;width:auto;top:100%;left:35px;right:0;display:none;margin-top:-7px;text-align:left;-moz-background-clip:padding;-webkit-background-clip:padding;background-clip:padding-box}.sqs-block-opentable .OT_navList{list-style:none;padding:0;margin:-6px 0 0 0;float:none;position:absolute;background-color:#fff;z-index:200;width:auto;top:100%;left:35px;right:0}.sqs-block-opentable .OT_navListItem{padding:0;margin:0;position:relative;float:none;line-height:1em;width:auto;list-style:none}.sqs-block-opentable #OT_timeList .OT_navListItem,.sqs-block-opentable #OT_partyList .OT_navListItem{width:auto}.sqs-block-opentable #OT_timeList li a.OT_navLink,.sqs-block-opentable #OT_partyList li a.OT_navLink{border:0;width:auto}.sqs-block-opentable a.OT_navLink:link,.sqs-block-opentable a.OT_navLink:visited,.sqs-block-opentable a.OT_navLink:hover,.sqs-block-opentable a.OT_navLink:active{font-family:inherit;color:#272727;text-decoration:none;font-size:13px;line-height:1em;width:auto;display:block;padding:.7em 1.1em;border:none}.sqs-block-opentable a.OT_navLink:hover,.sqs-block-opentable a.OT_navLink.selected,.sqs-block-opentable a.OT_navLink:active{background-color:rgba(0,0,0,.05);color:#272727;opacity:1}.sqs-block-opentable a.OT_navLink.selected,.sqs-block-opentable a.OT_navLink:active{background-color:rgba(0,0,0,.12)}.sqs-block-opentable .OT_submit{margin:24px 0 0 0;padding:0;width:auto;height:auto;list-style:none;display:block}.sqs-block-opentable .OTButton,.sqs-block-opentable #OTButton{width:auto;text-align:center;margin:0;padding:0}.sqs-block-opentable a.OT_Find_a_Table:link,.sqs-block-opentable a.OT_Find_a_Table:visited,.sqs-block-opentable a.OT_Find_a_Table:hover,.sqs-block-opentable a.OT_Find_a_Table:active{background-image:none;background-repeat:repeat;background-position:0 0;background-color:#272727;background-color:rgba(0,0,0,.95);font-family:inherit;font-size:13px;font-weight:normal;text-decoration:none;color:#fff;text-align:center;height:auto;display:inline-block;padding:1.1em 2.3em;line-height:normal;text-shadow:none;opacity:.8;position:relative;width:auto;border:none;text-transform:uppercase;white-space:nowrap;cursor:pointer;outline:none;-webkit-appearance:none;-moz-appearance:none;-webkit-transition:opacity .3s ease-out,background .3s ease-out;-moz-transition:opacity .3s ease-out,background .3s ease-out;-ms-transition:opacity .3s ease-out,background .3s ease-out;-o-transition:opacity .3s ease-out,background .3s ease-out;transition:opacity .3s ease-out,background .3s ease-out}.opentable-style-light .OT_wrapper{color:#fff}.opentable-style-light .OT_title{color:#fff}.opentable-style-light .OT_subtitle{color:#fff}.opentable-style-light a.OT_Find_a_Table:link,.opentable-style-light a.OT_Find_a_Table:visited,.opentable-style-light a.OT_Find_a_Table:hover,.opentable-style-light a.OT_Find_a_Table:active{background-color:#272727;background-color:rgba(0,0,0,.3);background:rgba(0,0,0,.05)}.opentable-style-light a.OT_Find_a_Table:link:hover,.opentable-style-light a.OT_Find_a_Table:visited:hover,.opentable-style-light a.OT_Find_a_Table:hover:hover,.opentable-style-light a.OT_Find_a_Table:active:hover{background-color:#272727;background-color:rgba(0,0,0,.8);background:rgba(0,0,0,.05)}.opentable-style-light .OT_day{background-position:-80px -7px}.opentable-style-light .OT_time{background-position:-80px -55px}.opentable-style-light .OT_party{background-position:-80px -102px}.hide-opentable-icons .OT_day,.hide-opentable-icons .OT_time,.hide-opentable-icons .OT_party{margin:0;padding:6px;background:none}.hide-opentable-icons #OT_timeList,.hide-opentable-icons #OT_partyList,.hide-opentable-icons .OT_navList{left:6px;right:6px}.no-svg .OT_day,.no-svg .OT_time,.no-svg .OT_party,.no-svg .OT_searchTimeField,.no-svg .OT_searchDateField,.no-svg .OT_searchPartyField{background-image:url('/universal/images-v6/icons/opentable-icons.png')}.sqs-svg-icon--list.social-icon-alignment-left{text-align:left}.sqs-svg-icon--list.social-icon-alignment-right{text-align:right}.sqs-svg-icon--list.social-icon-alignment-center{text-align:center}.rss-block .social-rss:before,.rss-block .social-rss-square:before,.rss-block .social-rss-round:before{font-family:'social-icon-font';speak:none;font-style:normal;font-weight:normal;line-height:1;-webkit-font-smoothing:antialiased;position:relative;top:0;margin-right:10px;font-size:.7em}.rss-block .social-rss:before{content:"\e630"}.social-icons-style-regular .sqs-use--icon{fill:#fff}.social-icons-style-regular .sqs-use--background,.social-icons-style-regular .sqs-use--mask{fill:transparent}.social-icons-style-regular.social-icons-color-white .sqs-use--icon{fill:#fff}.social-icons-style-regular.social-icons-color-white .sqs-use--background,.social-icons-style-regular.social-icons-color-white .sqs-use--mask{fill:transparent}.social-icons-style-regular.social-icons-color-black .sqs-use--icon{fill:#222}.social-icons-style-regular.social-icons-color-black .sqs-use--background,.social-icons-style-regular.social-icons-color-black .sqs-use--mask{fill:transparent}.social-icons-style-border .sqs-svg-icon--wrapper{border-color:#fff}.social-icons-style-border .sqs-use--icon{fill:#fff}.social-icons-style-border .sqs-use--background,.social-icons-style-border .sqs-use--mask{fill:transparent}.social-icons-style-border.social-icons-color-white .sqs-svg-icon--wrapper{border-color:#fff}.social-icons-style-border.social-icons-color-white .sqs-use--icon{fill:#fff}.social-icons-style-border.social-icons-color-white .sqs-use--background,.social-icons-style-border.social-icons-color-white .sqs-use--mask{fill:transparent}.social-icons-style-border.social-icons-color-black .sqs-svg-icon--wrapper{border-color:#222}.social-icons-style-border.social-icons-color-black .sqs-use--icon{fill:#222}.social-icons-style-border.social-icons-color-black .sqs-use--background,.social-icons-style-border.social-icons-color-black .sqs-use--mask{fill:transparent}.social-icons-style-knockout .sqs-use--mask{fill:#fff}.social-icons-style-knockout .sqs-use--background,.social-icons-style-knockout .sqs-use--icon{fill:transparent}.social-icons-style-knockout.social-icons-color-white .sqs-use--mask{fill:#fff}.social-icons-style-knockout.social-icons-color-white .sqs-use--background,.social-icons-style-knockout.social-icons-color-white .sqs-use--icon{fill:transparent}.social-icons-style-knockout.social-icons-color-black .sqs-use--mask{fill:#222}.social-icons-style-knockout.social-icons-color-black .sqs-use--background,.social-icons-style-knockout.social-icons-color-black .sqs-use--icon{fill:transparent}.social-icons-style-solid .sqs-use--icon{fill:#222}.social-icons-style-solid .sqs-use--background{fill:#222}.social-icons-style-solid .sqs-use--mask{fill:#fff}.social-icons-style-solid.social-icons-color-white .sqs-use--icon{fill:#222}.social-icons-style-solid.social-icons-color-white .sqs-use--background{fill:#fff}.social-icons-style-solid.social-icons-color-white .sqs-use--mask{fill:#fff}.social-icons-style-solid.social-icons-color-black .sqs-use--icon{fill:#fff}.social-icons-style-solid.social-icons-color-black .sqs-use--background{fill:#222}.social-icons-style-solid.social-icons-color-black .sqs-use--mask{fill:#222}.social-icons-style-border .sqs-svg-icon--wrapper:hover{background-color:#fff}.social-icons-style-border .sqs-svg-icon--wrapper:hover .sqs-use--icon{fill:#222}.social-icons-style-border.social-icons-color-white .sqs-svg-icon--wrapper:hover{background-color:#fff}.social-icons-style-border.social-icons-color-white .sqs-svg-icon--wrapper:hover .sqs-use--icon{fill:#222}.social-icons-style-border.social-icons-color-black .sqs-svg-icon--wrapper:hover{background-color:#222}.social-icons-style-border.social-icons-color-black .sqs-svg-icon--wrapper:hover .sqs-use--icon{fill:#fff}.social-icons-style-regular:hover .sqs-svg-icon--wrapper .sqs-use--icon{fill:rgba(255,255,255,.4)}.social-icons-style-regular:hover .sqs-svg-icon--wrapper:hover .sqs-use--icon{fill:#fff}.social-icons-style-regular.social-icons-color-white:hover .sqs-svg-icon--wrapper .sqs-use--icon{fill:rgba(255,255,255,.4)}.social-icons-style-regular.social-icons-color-white:hover .sqs-svg-icon--wrapper:hover .sqs-use--icon{fill:#fff}.social-icons-style-regular.social-icons-color-black:hover .sqs-svg-icon--wrapper .sqs-use--icon{fill:rgba(34,34,34,.4)}.social-icons-style-regular.social-icons-color-black:hover .sqs-svg-icon--wrapper:hover .sqs-use--icon{fill:#222}.social-icons-style-knockout:hover .sqs-svg-icon--wrapper .sqs-use--mask{fill:rgba(255,255,255,.4)}.social-icons-style-knockout:hover .sqs-svg-icon--wrapper:hover .sqs-use--mask{fill:#fff}.social-icons-style-knockout.social-icons-color-white:hover .sqs-svg-icon--wrapper .sqs-use--mask{fill:rgba(255,255,255,.4)}.social-icons-style-knockout.social-icons-color-white:hover .sqs-svg-icon--wrapper:hover .sqs-use--mask{fill:#fff}.social-icons-style-knockout.social-icons-color-black:hover .sqs-svg-icon--wrapper .sqs-use--mask{fill:rgba(34,34,34,.4)}.social-icons-style-knockout.social-icons-color-black:hover .sqs-svg-icon--wrapper:hover .sqs-use--mask{fill:#222}.social-icons-style-solid:hover .sqs-svg-icon--wrapper .sqs-use--mask{fill:rgba(255,255,255,.4)}.social-icons-style-solid:hover .sqs-svg-icon--wrapper .sqs-use--icon{fill:rgba(34,34,34,.4)}.social-icons-style-solid:hover .sqs-svg-icon--wrapper .sqs-use--background{fill:rgba(34,34,34,0)}.social-icons-style-solid:hover .sqs-svg-icon--wrapper:hover .sqs-use--mask{fill:#fff}.social-icons-style-solid:hover .sqs-svg-icon--wrapper:hover .sqs-use--icon{fill:rgba(34,34,34,0)}.social-icons-style-solid:hover .sqs-svg-icon--wrapper:hover .sqs-use--background{fill:#222}.social-icons-style-solid.social-icons-color-white:hover .sqs-svg-icon--wrapper .sqs-use--mask,.social-icons-style-solid.social-icons-color-black:hover .sqs-svg-icon--wrapper .sqs-use--mask{fill:rgba(255,255,255,.4)}.social-icons-style-solid.social-icons-color-white:hover .sqs-svg-icon--wrapper .sqs-use--icon,.social-icons-style-solid.social-icons-color-black:hover .sqs-svg-icon--wrapper .sqs-use--icon{fill:rgba(34,34,34,.4)}.social-icons-style-solid.social-icons-color-white:hover .sqs-svg-icon--wrapper .sqs-use--background,.social-icons-style-solid.social-icons-color-black:hover .sqs-svg-icon--wrapper .sqs-use--background{fill:rgba(34,34,34,0)}.social-icons-style-solid.social-icons-color-white:hover .sqs-svg-icon--wrapper:hover .sqs-use--mask,.social-icons-style-solid.social-icons-color-black:hover .sqs-svg-icon--wrapper:hover .sqs-use--mask{fill:#222}.social-icons-style-solid.social-icons-color-white:hover .sqs-svg-icon--wrapper:hover .sqs-use--icon,.social-icons-style-solid.social-icons-color-black:hover .sqs-svg-icon--wrapper:hover .sqs-use--icon{fill:rgba(255,255,255,0)}.social-icons-style-solid.social-icons-color-white:hover .sqs-svg-icon--wrapper:hover .sqs-use--background,.social-icons-style-solid.social-icons-color-black:hover .sqs-svg-icon--wrapper:hover .sqs-use--background{fill:#fff}.sqs-block-socialaccountlinks .social-account-svg-list,.sqs-block-socialaccountlinks-v2 .social-account-svg-list{text-align:left}.sqs-block-socialaccountlinks .social-account-svg-list:before,.sqs-block-socialaccountlinks-v2 .social-account-svg-list:before,.sqs-block-socialaccountlinks .social-account-svg-list:after,.sqs-block-socialaccountlinks-v2 .social-account-svg-list:after{content:"";display:table}.sqs-block-socialaccountlinks .social-account-svg-list:after,.sqs-block-socialaccountlinks-v2 .social-account-svg-list:after{clear:both}.sqs-block-socialaccountlinks .social-account-svg-list a,.sqs-block-socialaccountlinks-v2 .social-account-svg-list a,.sqs-block-socialaccountlinks .social-account-svg-list a:link,.sqs-block-socialaccountlinks-v2 .social-account-svg-list a:link,.sqs-block-socialaccountlinks .social-account-svg-list a:visited,.sqs-block-socialaccountlinks-v2 .social-account-svg-list a:visited{display:inline-block;width:20px;height:20px;font-size:20px;color:#111;text-decoration:none !important;*zoom:1;*display:inline;font-weight:normal}.sqs-block-socialaccountlinks .social-account-svg-list a:before,.sqs-block-socialaccountlinks-v2 .social-account-svg-list a:before,.sqs-block-socialaccountlinks .social-account-svg-list a:link:before,.sqs-block-socialaccountlinks-v2 .social-account-svg-list a:link:before,.sqs-block-socialaccountlinks .social-account-svg-list a:visited:before,.sqs-block-socialaccountlinks-v2 .social-account-svg-list a:visited:before{font-size:20px;line-height:20px}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-alignment-left a,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-alignment-left a{margin-right:.75em}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-alignment-right a,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-alignment-right a{margin-left:.75em}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-alignment-center a,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-alignment-center a{margin:0 .375em}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-alignment-center,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-alignment-center{text-align:center}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-alignment-right,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-alignment-right{text-align:right}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-white a,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-white a,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-white a:visited,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-white a:visited{color:#fff}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a.social-bandsintown,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a.social-bandsintown,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:link.social-bandsintown,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:link.social-bandsintown,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:visited.social-bandsintown,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:visited.social-bandsintown{color:#00b4b3}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a.social-behance,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a.social-behance,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:link.social-behance,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:link.social-behance,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:visited.social-behance,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:visited.social-behance{color:#1769ff}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a.social-codepen,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a.social-codepen,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:link.social-codepen,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:link.social-codepen,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:visited.social-codepen,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:visited.social-codepen{color:#222}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a.social-dribbble,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a.social-dribbble,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:link.social-dribbble,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:link.social-dribbble,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:visited.social-dribbble,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:visited.social-dribbble{color:#ea4c89}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a.social-dropbox,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a.social-dropbox,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:link.social-dropbox,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:link.social-dropbox,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:visited.social-dropbox,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:visited.social-dropbox{color:#007ee5}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a.social-email,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a.social-email,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:link.social-email,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:link.social-email,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:visited.social-email,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:visited.social-email{color:#222}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a.social-facebook,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a.social-facebook,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:link.social-facebook,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:link.social-facebook,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:visited.social-facebook,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:visited.social-facebook{color:#3b5998}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a.social-fivehundredpix,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a.social-fivehundredpix,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:link.social-fivehundredpix,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:link.social-fivehundredpix,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:visited.social-fivehundredpix,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:visited.social-fivehundredpix,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a.social-fivehundredpx,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a.social-fivehundredpx,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:link.social-fivehundredpx,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:link.social-fivehundredpx,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:visited.social-fivehundredpx,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:visited.social-fivehundredpx{color:#00aeef}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a.social-flickr,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a.social-flickr,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:link.social-flickr,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:link.social-flickr,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:visited.social-flickr,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:visited.social-flickr{color:#0063dc}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a.social-foursquare,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a.social-foursquare,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:link.social-foursquare,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:link.social-foursquare,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:visited.social-foursquare,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:visited.social-foursquare{color:#f94877}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a.social-github,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a.social-github,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:link.social-github,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:link.social-github,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:visited.social-github,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:visited.social-github{color:#4183c4}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a.social-google,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a.social-google,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:link.social-google,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:link.social-google,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:visited.social-google,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:visited.social-google{color:#dd4b39}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a.social-googleplay,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a.social-googleplay,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:link.social-googleplay,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:link.social-googleplay,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:visited.social-googleplay,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:visited.social-googleplay{color:#5adfcb}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a.social-instagram,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a.social-instagram,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:link.social-instagram,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:link.social-instagram,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:visited.social-instagram,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:visited.social-instagram{color:#3f729b}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a.social-itunes,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a.social-itunes,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:link.social-itunes,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:link.social-itunes,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:visited.social-itunes,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:visited.social-itunes{color:#ff3241}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a.social-linkedin,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a.social-linkedin,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:link.social-linkedin,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:link.social-linkedin,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:visited.social-linkedin,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:visited.social-linkedin{color:#0976b4}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a.social-medium,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a.social-medium,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:link.social-medium,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:link.social-medium,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:visited.social-medium,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:visited.social-medium{color:#222}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a.social-meetup,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a.social-meetup,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:link.social-meetup,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:link.social-meetup,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:visited.social-meetup,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:visited.social-meetup{color:#e0393e}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a.social-pinterest,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a.social-pinterest,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:link.social-pinterest,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:link.social-pinterest,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:visited.social-pinterest,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:visited.social-pinterest{color:#cc2127}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a.social-rdio,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a.social-rdio,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:link.social-rdio,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:link.social-rdio,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:visited.social-rdio,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:visited.social-rdio{color:#006ed2}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a.social-rss,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a.social-rss,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:link.social-rss,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:link.social-rss,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:visited.social-rss,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:visited.social-rss{color:#222}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a.social-smugmug,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a.social-smugmug,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:link.social-smugmug,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:link.social-smugmug,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:visited.social-smugmug,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:visited.social-smugmug{color:#7dbb00}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a.social-soundcloud,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a.social-soundcloud,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:link.social-soundcloud,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:link.social-soundcloud,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:visited.social-soundcloud,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:visited.social-soundcloud{color:#f80}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a.social-spotify,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a.social-spotify,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:link.social-spotify,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:link.social-spotify,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:visited.social-spotify,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:visited.social-spotify{color:#84bd00}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a.social-squarespace,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a.social-squarespace,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:link.social-squarespace,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:link.social-squarespace,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:visited.social-squarespace,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:visited.social-squarespace{color:#222}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a.social-tumblr,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a.social-tumblr,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:link.social-tumblr,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:link.social-tumblr,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:visited.social-tumblr,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:visited.social-tumblr{color:#35465d}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a.social-twitter,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a.social-twitter,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:link.social-twitter,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:link.social-twitter,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:visited.social-twitter,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:visited.social-twitter{color:#55acee}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a.social-vimeo,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a.social-vimeo,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:link.social-vimeo,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:link.social-vimeo,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:visited.social-vimeo,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:visited.social-vimeo{color:#1ab7ea}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a.social-vine,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a.social-vine,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:link.social-vine,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:link.social-vine,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:visited.social-vine,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:visited.social-vine{color:#00b488}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a.social-yelp,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a.social-yelp,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:link.social-yelp,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:link.social-yelp,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:visited.social-yelp,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:visited.social-yelp{color:#c41200}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a.social-youtube,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a.social-youtube,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:link.social-youtube,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:link.social-youtube,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:visited.social-youtube,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:visited.social-youtube{color:#e52d27}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a.social-meetup,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a.social-meetup,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:link.social-meetup,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:link.social-meetup,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:visited.social-meetup,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:visited.social-meetup{color:#e0393e}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a.social-vevo,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a.social-vevo,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:link.social-vevo,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:link.social-vevo,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:visited.social-vevo,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:visited.social-vevo{color:#ff0031}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a.social-twitch,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a.social-twitch,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:link.social-twitch,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:link.social-twitch,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:visited.social-twitch,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:visited.social-twitch{color:#6441a5}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a.social-vsco,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a.social-vsco,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:link.social-vsco,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:link.social-vsco,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-color-standard a:visited.social-vsco,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-color-standard a:visited.social-vsco{color:#a9a849}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-size-large a,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-size-large a,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-size-large a:link,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-size-large a:link,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-size-large a:visited,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-size-large a:visited{width:24px;height:24px;font-size:24px}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-size-large a:before,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-size-large a:before,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-size-large a:link:before,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-size-large a:link:before,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-size-large a:visited:before,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-size-large a:visited:before{font-size:24px;line-height:24px}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-size-small a,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-size-small a,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-size-small a:link,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-size-small a:link,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-size-small a:visited,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-size-small a:visited{width:16px;height:16px;font-size:16px}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-size-small a:before,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-size-small a:before,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-size-small a:link:before,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-size-small a:link:before,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-size-small a:visited:before,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-size-small a:visited:before{font-size:16px;line-height:16px}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-style-round a,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-style-round a,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-style-square a,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-style-square a,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-style-round a:link,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-style-round a:link,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-style-square a:link,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-style-square a:link,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-style-round a:visited,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-style-round a:visited,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-style-square a:visited,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-style-square a:visited{width:30px;height:30px;font-size:30px}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-style-round a:before,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-style-round a:before,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-style-square a:before,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-style-square a:before,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-style-round a:link:before,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-style-round a:link:before,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-style-square a:link:before,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-style-square a:link:before,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-style-round a:visited:before,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-style-round a:visited:before,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-style-square a:visited:before,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-style-square a:visited:before{font-size:30px;line-height:30px}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-style-round.social-icon-alignment-left a,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-style-round.social-icon-alignment-left a,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-style-square.social-icon-alignment-left a,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-style-square.social-icon-alignment-left a{margin-right:.25em}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-style-round.social-icon-alignment-right a,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-style-round.social-icon-alignment-right a,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-style-square.social-icon-alignment-right a,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-style-square.social-icon-alignment-right a{margin-left:.25em}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-style-round.social-icon-alignment-center a,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-style-round.social-icon-alignment-center a,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-style-square.social-icon-alignment-center a,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-style-square.social-icon-alignment-center a{margin:0 .125em}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-size-large.social-icon-style-round a,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-size-large.social-icon-style-round a,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-size-large.social-icon-style-square a,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-size-large.social-icon-style-square a,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-size-large.social-icon-style-round a:link,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-size-large.social-icon-style-round a:link,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-size-large.social-icon-style-square a:link,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-size-large.social-icon-style-square a:link,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-size-large.social-icon-style-round a:visited,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-size-large.social-icon-style-round a:visited,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-size-large.social-icon-style-square a:visited,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-size-large.social-icon-style-square a:visited{width:36px;height:36px;font-size:36px}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-size-large.social-icon-style-round a:before,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-size-large.social-icon-style-round a:before,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-size-large.social-icon-style-square a:before,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-size-large.social-icon-style-square a:before,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-size-large.social-icon-style-round a:link:before,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-size-large.social-icon-style-round a:link:before,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-size-large.social-icon-style-square a:link:before,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-size-large.social-icon-style-square a:link:before,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-size-large.social-icon-style-round a:visited:before,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-size-large.social-icon-style-round a:visited:before,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-size-large.social-icon-style-square a:visited:before,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-size-large.social-icon-style-square a:visited:before{font-size:36px;line-height:36px}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-size-small.social-icon-style-round a,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-size-small.social-icon-style-round a,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-size-small.social-icon-style-square a,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-size-small.social-icon-style-square a,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-size-small.social-icon-style-round a:link,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-size-small.social-icon-style-round a:link,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-size-small.social-icon-style-square a:link,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-size-small.social-icon-style-square a:link,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-size-small.social-icon-style-round a:visited,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-size-small.social-icon-style-round a:visited,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-size-small.social-icon-style-square a:visited,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-size-small.social-icon-style-square a:visited{width:24px;height:24px;font-size:24px}.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-size-small.social-icon-style-round a:before,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-size-small.social-icon-style-round a:before,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-size-small.social-icon-style-square a:before,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-size-small.social-icon-style-square a:before,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-size-small.social-icon-style-round a:link:before,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-size-small.social-icon-style-round a:link:before,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-size-small.social-icon-style-square a:link:before,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-size-small.social-icon-style-square a:link:before,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-size-small.social-icon-style-round a:visited:before,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-size-small.social-icon-style-round a:visited:before,.sqs-block-socialaccountlinks .social-account-svg-list.social-icon-size-small.social-icon-style-square a:visited:before,.sqs-block-socialaccountlinks-v2 .social-account-svg-list.social-icon-size-small.social-icon-style-square a:visited:before{font-size:24px;line-height:24px}.newsletter-block *{box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box}.newsletter-block .newsletter-form-wrapper{width:100%;padding:34px 17px;background:rgba(0,199,166,0);color:#272727;font-size:15px}.newsletter-block .newsletter-form-wrapper.hidden,.newsletter-block .newsletter-form-wrapper .hidden{display:none}.newsletter-block .newsletter-form{text-align:center}.newsletter-block .newsletter-form-header{width:85%;margin:0 auto}.newsletter-block .newsletter-form-header-title{margin:0 0 17px 0;padding:0;color:#272727;font-size:30px;line-height:1.2em;text-align:center}.newsletter-block .newsletter-form-header-title a{color:#272727 !important;text-decoration:underline}.newsletter-block .newsletter-form-header-description p{margin:17px 0;padding:0;color:#272727;font-size:15px;line-height:1.6em;text-align:center}.newsletter-block .newsletter-form-header-description a{color:#272727 !important;text-decoration:underline}.newsletter-block .newsletter-form-body{padding:0 0 12px 0}.newsletter-block .newsletter-form-fields-wrapper{display:inline-block;width:auto;margin:12px 0 0 0}.newsletter-block .newsletter-form-name-fieldset{display:inline-block;width:auto;margin:0;padding:0;border:none}.newsletter-block .newsletter-form-field-wrapper{display:inline-block;width:auto;padding:6px 3px}.newsletter-block .newsletter-form-field-label{display:none}.newsletter-block .newsletter-form-field-element{width:100%;padding:1em;background:#fff;border:1px solid rgba(0,0,0,.12);font-family:inherit;font-size:15px;line-height:normal;outline:none;-moz-background-clip:padding;-webkit-background-clip:padding;background-clip:padding-box;-webkit-transition:background .3s ease-out,border .3s ease-out;-moz-transition:background .3s ease-out,border .3s ease-out;-ms-transition:background .3s ease-out,border .3s ease-out;-o-transition:background .3s ease-out,border .3s ease-out;transition:background .3s ease-out,border .3s ease-out}.newsletter-block .newsletter-form-field-element:focus{background:#fff;-moz-background-clip:padding;-webkit-background-clip:padding;background-clip:padding-box}.newsletter-block .newsletter-form-field-element::-webkit-input-placeholder{color:rgba(0,0,0,.3)}.newsletter-block .newsletter-form-field-element:-moz-placeholder{color:rgba(0,0,0,.3)}.newsletter-block .newsletter-form-field-element::-moz-placeholder{color:rgba(0,0,0,.3)}.newsletter-block .newsletter-form-field-element:-ms-input-placeholder{color:rgba(0,0,0,.3)}.newsletter-block .field-error{display:none}.newsletter-block .newsletter-form-field-wrapper .field-error{display:block;margin-bottom:12px;padding:6px;background:#fed9db;color:#f23d3d;font-size:12px;line-height:normal}.newsletter-block .newsletter-form-button-wrapper{display:inline-block;width:auto;margin:12px 0 0 0;padding:6px 3px}.newsletter-block .newsletter-form-button{position:relative;width:auto;padding:1em 2.25em;color:#fff;background-color:#23c890;border:1px solid #23c890 !important;font-family:inherit;font-size:15px;line-height:normal;font-weight:normal;text-align:center;text-transform:uppercase;white-space:nowrap;cursor:pointer;outline:none;-webkit-appearance:none;-moz-appearance:none}.newsletter-block .newsletter-form-spinner.sqs-spin.light.large{visibility:hidden;position:absolute;top:50%;left:50%;height:22px;width:22px;margin-top:-11px;margin-left:-11px}.newsletter-block .newsletter-form:not(.submitting) .newsletter-form-spinner.sqs-spin.light.large{-webkit-animation:none;-moz-animation:none;-ms-animation:none;-o-animation:none;animation:none}.newsletter-block .newsletter-form.submitting .newsletter-form-spinner.sqs-spin.light.large{visibility:visible}.newsletter-block .newsletter-form.submitting .newsletter-form-button-label{visibility:hidden}.newsletter-block .newsletter-form-footnote p{opacity:.8;margin:17px 0;padding:0;color:#272727;font-size:12px !important;line-height:normal}.newsletter-block .newsletter-form-footnote p:last-child{margin-bottom:0}.newsletter-block .newsletter-form-footnote a{color:#272727 !important;text-decoration:underline}.newsletter-block .form-submission-text p{margin:17px 0;padding:0;color:#272727;font-size:15px;line-height:1.6em}.newsletter-block .form-submission-text p:first-child{margin-top:0}.newsletter-block .form-submission-text p:last-child{margin-bottom:0}.newsletter-block .form-submission-text a{color:#272727 !important;text-decoration:underline}.newsletter-style-light .newsletter-block .newsletter-form-wrapper,.newsletter-style-light .newsletter-block .newsletter-form-header-title,.newsletter-style-light .newsletter-block .newsletter-form-header-description p,.newsletter-style-light .newsletter-block .newsletter-form-footnote p,.newsletter-style-light .newsletter-block .form-submission-text p{color:#fff}.newsletter-style-light .newsletter-block .newsletter-form-header-title a,.newsletter-style-light .newsletter-block .newsletter-form-header-description a,.newsletter-style-light .newsletter-block .newsletter-form-footnote a,.newsletter-style-light .newsletter-block .form-submission-text a{color:#fff !important}.newsletter-form-small-mode .newsletter-form-wrapper{padding:22px 17px}.newsletter-form-small-mode .newsletter-form-header{width:100%}.newsletter-form-small-mode .newsletter-form-header-title{font-size:22.5px !important;margin:0 0 14px 0}.newsletter-form-small-mode .newsletter-form-header-description p{margin:0 0 14px 0;line-height:normal}.newsletter-form-small-mode .newsletter-form-body{padding:0 0 6px 0}.newsletter-form-small-mode .newsletter-form-fields-wrapper{display:block}.newsletter-form-small-mode .newsletter-form-name-fieldset{width:100%}.newsletter-form-small-mode .newsletter-form-field-wrapper,.newsletter-form-small-mode .newsletter-form-button-wrapper{display:block;width:100%;min-width:0;padding:5px 0}.newsletter-form-small-mode .newsletter-form-button-wrapper{margin:6px 0 0 0}.newsletter-form-small-mode .newsletter-form-footnote p{margin:14px 0}.newsletter-form-small-mode .newsletter-form-footnote p:last-child{margin-bottom:0}.newsletter-form-small-mode .form-submission-text p{margin:14px 0;line-height:normal}.newsletter-form-small-mode .form-submission-text p:first-child{margin-top:0}.newsletter-form-small-mode .form-submission-text p:last-child{margin-bottom:0}@media screen and (max-width:320px){.newsletter-block .newsletter-form-wrapper{padding:22px 17px}.newsletter-block .newsletter-form-header{width:100%}.newsletter-block .newsletter-form-header-title{font-size:22.5px !important;margin:0 0 14px 0}.newsletter-block .newsletter-form-header-description p{margin:0 0 14px 0;line-height:normal}.newsletter-block .newsletter-form-body{padding:0 0 6px 0}.newsletter-block .newsletter-form-fields-wrapper{display:block}.newsletter-block .newsletter-form-name-fieldset{width:100%}.newsletter-block .newsletter-form-field-wrapper,.newsletter-block .newsletter-form-button-wrapper{display:block;width:100%;min-width:0;padding:5px 0}.newsletter-block .newsletter-form-button-wrapper{margin:6px 0 0 0}.newsletter-block .newsletter-form-footnote p{margin:14px 0}.newsletter-block .newsletter-form-footnote p:last-child{margin-bottom:0}.newsletter-block .form-submission-text p{margin:14px 0;line-height:normal}.newsletter-block .form-submission-text p:first-child{margin-top:0}.newsletter-block .form-submission-text p:last-child{margin-bottom:0}}.newsletter-block.newsletter-form-has-small-container .newsletter-form-wrapper{padding:22px 17px}.newsletter-block.newsletter-form-has-small-container .newsletter-form-header{width:100%}.newsletter-block.newsletter-form-has-small-container .newsletter-form-header-title{font-size:22.5px !important;margin:0 0 14px 0}.newsletter-block.newsletter-form-has-small-container .newsletter-form-header-description p{margin:0 0 14px 0;line-height:normal}.newsletter-block.newsletter-form-has-small-container .newsletter-form-body{padding:0 0 6px 0}.newsletter-block.newsletter-form-has-small-container .newsletter-form-fields-wrapper{display:block}.newsletter-block.newsletter-form-has-small-container .newsletter-form-name-fieldset{width:100%}.newsletter-block.newsletter-form-has-small-container .newsletter-form-field-wrapper,.newsletter-block.newsletter-form-has-small-container .newsletter-form-button-wrapper{display:block;width:100%;min-width:0;padding:5px 0}.newsletter-block.newsletter-form-has-small-container .newsletter-form-button-wrapper{margin:6px 0 0 0}.newsletter-block.newsletter-form-has-small-container .newsletter-form-footnote p{margin:14px 0}.newsletter-block.newsletter-form-has-small-container .newsletter-form-footnote p:last-child{margin-bottom:0}.newsletter-block.newsletter-form-has-small-container .form-submission-text p{margin:14px 0;line-height:normal}.newsletter-block.newsletter-form-has-small-container .form-submission-text p:first-child{margin-top:0}.newsletter-block.newsletter-form-has-small-container .form-submission-text p:last-child{margin-bottom:0}.newsletter-block.newsletter-form-has-regular-container .newsletter-form-field-wrapper{min-width:250px}.small-button-block-font{font-family:"proxima-nova","Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:600;font-style:normal;text-transform:uppercase;letter-spacing:1px}.medium-button-block-font{font-family:"proxima-nova","Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:600;font-style:normal;text-transform:uppercase;letter-spacing:1px}.large-button-block-font{font-family:"proxima-nova","Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:600;font-style:normal;text-transform:uppercase;letter-spacing:1px}.sqs-block-button .sqs-block-button-container--left{text-align:left}.sqs-block-button .sqs-block-button-container--center{text-align:center}.sqs-block-button .sqs-block-button-container--right{text-align:right}.sqs-block-button .sqs-block-button-element{display:inline-block;width:auto;height:auto;padding:1em 2.5em;color:#fff;background-color:#272727;border-width:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:12px;line-height:1em;font-weight:normal;font-style:normal;text-transform:uppercase;letter-spacing:0px;text-align:center;text-decoration:none;cursor:pointer;outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;line-height:normal}.sqs-block-button .sqs-block-button-element:hover{opacity:1}.sqs-block-button .sqs-block-button-element--small{padding:13px 26px;color:#23c890;background-color:#29292d;border-color:#29292d;font-size:12px;font-family:"proxima-nova","Helvetica Neue",Helvetica,Arial,sans-serif;font-family:"proxima-nova";text-transform:uppercase;letter-spacing:1px;font-weight:600;font-style:normal}.sqs-block-button .sqs-block-button-element--medium{padding:21px 34px;color:#fff;background-color:#23c890;border-color:#23c890;font-size:15px;font-family:"proxima-nova","Helvetica Neue",Helvetica,Arial,sans-serif;text-transform:uppercase;letter-spacing:1px;font-weight:600;font-style:normal}.sqs-block-button .sqs-block-button-element--large{padding:25px 46px;color:#fff;background-color:#23c890;border-color:#23c890;font-size:20px;font-family:"proxima-nova","Helvetica Neue",Helvetica,Arial,sans-serif;font-family:"proxima-nova";text-transform:uppercase;letter-spacing:1px;font-weight:600;font-style:normal}.small-button-style-solid .sqs-block-button .sqs-block-button-element--small,.medium-button-style-solid .sqs-block-button .sqs-block-button-element--medium,.large-button-style-solid .sqs-block-button .sqs-block-button-element--large{-webkit-transition:.1s opacity linear;-moz-transition:.1s opacity linear;-o-transition:.1s opacity linear;transition:.1s opacity linear;-webkit-backface-visibility:hidden}.small-button-style-solid .sqs-block-button .sqs-block-button-element--small:hover,.medium-button-style-solid .sqs-block-button .sqs-block-button-element--medium:hover,.large-button-style-solid .sqs-block-button .sqs-block-button-element--large:hover{opacity:.8}.small-button-style-outline .sqs-block-button .sqs-block-button-element--small,.medium-button-style-outline .sqs-block-button .sqs-block-button-element--medium,.large-button-style-outline .sqs-block-button .sqs-block-button-element--large{border-width:2px;border-style:solid;background-color:transparent;-webkit-transition:0.1s background-color linear, 0.1s color linear;-moz-transition:0.1s background-color linear, 0.1s color linear;-o-transition:0.1s background-color linear, 0.1s color linear;transition:0.1s background-color linear, 0.1s color linear}.small-button-style-outline .sqs-block-button .sqs-block-button-element--small:hover,.medium-button-style-outline .sqs-block-button .sqs-block-button-element--medium:hover,.large-button-style-outline .sqs-block-button .sqs-block-button-element--large:hover{color:#fff}.small-button-style-outline .sqs-block-button .sqs-block-button-element--small{color:#29292d}.small-button-style-outline .sqs-block-button .sqs-block-button-element--small:hover{background-color:#29292d;color:#fff}.medium-button-style-outline .sqs-block-button .sqs-block-button-element--medium{color:#23c890}.medium-button-style-outline .sqs-block-button .sqs-block-button-element--medium:hover{background-color:#23c890;color:#1d1d1d;color:#fff}.large-button-style-outline .sqs-block-button .sqs-block-button-element--large{color:#23c890}.large-button-style-outline .sqs-block-button .sqs-block-button-element--large:hover{background-color:#23c890;color:#1d1d1d;color:#fff}.small-button-style-raised .sqs-block-button .sqs-block-button-element--small,.medium-button-style-raised .sqs-block-button .sqs-block-button-element--medium,.large-button-style-raised .sqs-block-button .sqs-block-button-element--large{position:relative;-webkit-transition:.1s background-color linear;-moz-transition:.1s background-color linear;-o-transition:.1s background-color linear;transition:.1s background-color linear}.small-button-style-raised .sqs-block-button .sqs-block-button-element--small:active,.medium-button-style-raised .sqs-block-button .sqs-block-button-element--medium:active,.large-button-style-raised .sqs-block-button .sqs-block-button-element--large:active{top:1px}.small-button-style-raised .sqs-block-button .sqs-block-button-element--small{-webkit-box-shadow:0 2px 0 0 #161618;-moz-box-shadow:0 2px 0 0 #161618;box-shadow:0 2px 0 0 #161618}.small-button-style-raised .sqs-block-button .sqs-block-button-element--small:hover{background-color:#303035}.small-button-style-raised .sqs-block-button .sqs-block-button-element--small:active{-webkit-box-shadow:0 1px 0 0 #161618;-moz-box-shadow:0 1px 0 0 #161618;box-shadow:0 1px 0 0 #161618}.medium-button-style-raised .sqs-block-button .sqs-block-button-element--medium{-webkit-box-shadow:0 2px 0 0 #1da577;-moz-box-shadow:0 2px 0 0 #1da577;box-shadow:0 2px 0 0 #1da577}.medium-button-style-raised .sqs-block-button .sqs-block-button-element--medium:hover{background-color:#25d599}.medium-button-style-raised .sqs-block-button .sqs-block-button-element--medium:active{-webkit-box-shadow:0 1px 0 0 #1da577;-moz-box-shadow:0 1px 0 0 #1da577;box-shadow:0 1px 0 0 #1da577}.large-button-style-raised .sqs-block-button .sqs-block-button-element--large{-webkit-box-shadow:0 3px 0 0 #1da577;-moz-box-shadow:0 3px 0 0 #1da577;box-shadow:0 3px 0 0 #1da577}.large-button-style-raised .sqs-block-button .sqs-block-button-element--large:hover{background-color:#25d599}.large-button-style-raised .sqs-block-button .sqs-block-button-element--large:active{top:2px;-webkit-box-shadow:0 1px 0 0 #1da577;-moz-box-shadow:0 1px 0 0 #1da577;box-shadow:0 1px 0 0 #1da577}.small-button-shape-rounded .sqs-block-button .sqs-block-button-element--small,.medium-button-shape-rounded .sqs-block-button .sqs-block-button-element--medium,.large-button-shape-rounded .sqs-block-button .sqs-block-button-element--large{border-radius:3px}.small-button-shape-pill .sqs-block-button .sqs-block-button-element--small,.medium-button-shape-pill .sqs-block-button .sqs-block-button-element--medium,.large-button-shape-pill .sqs-block-button .sqs-block-button-element--large{border-radius:300px}@media screen and (max-width:640px){.sqs-block-button .sqs-block-button-element--large{padding:21px 34px;font-size:15px}}.sqs-block-summary-v2 *{box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box}.sqs-block-summary-v2 .summary-heading{display:none;margin:0 0 15px 0;padding-right:10px;font-size:14px;line-height:normal;text-transform:uppercase}.sqs-block-summary-v2 .summary-carousel-pager{display:none}.sqs-block-summary-v2 .summary-item-list{list-style-type:none;margin:0;padding:0}.sqs-block-summary-v2 .summary-item{visibility:hidden;overflow:hidden}.sqs-block-summary-v2 .summary-item.positioned{visibility:visible}.sqs-block-summary-v2 .summary-thumbnail-container{display:block}.sqs-block-summary-v2 .summary-thumbnail-container:hover{opacity:1 !important}.sqs-block-summary-v2 .img-wrapper,.sqs-block-summary-v2 .sqs-video-wrapper{position:relative;width:100%;height:auto}.sqs-block-summary-v2 .img-wrapper img,.sqs-block-summary-v2 .sqs-video-wrapper img{opacity:0;display:block;width:100%;height:auto;font-size:13px;line-height:normal;-webkit-transition:.6s opacity;-moz-transition:.6s opacity;-ms-transition:.6s opacity;-o-transition:.6s opacity;transition:.6s opacity}.sqs-block-summary-v2 .img-wrapper img.loaded,.sqs-block-summary-v2 .sqs-video-wrapper img.loaded{opacity:1}.sqs-block-summary-v2 .summary-product-status .product-mark{position:absolute;top:15px;right:0;padding:6px 8px;background:#222;color:#fff;font-size:14px;line-height:14px;text-transform:uppercase;-webkit-font-smoothing:antialiased;box-sizing:content-box;-webkit-box-sizing:content-box;-moz-box-sizing:content-box}.sqs-block-summary-v2 .summary-product-quick-view{opacity:0;position:absolute;bottom:20px;left:0;width:100%;font-size:14px;text-align:center;-webkit-transition:.6s opacity;-moz-transition:.6s opacity;-ms-transition:.6s opacity;-o-transition:.6s opacity;transition:.6s opacity}.sqs-block-summary-v2 .summary-item:hover .summary-product-quick-view{opacity:1}.sqs-block-summary-v2 .summary-thumbnail-event-date{display:none;position:absolute;top:10px;right:10px;height:50px;width:50px;padding:3px;background:#fff;text-align:center;box-sizing:content-box;-webkit-box-sizing:content-box;-moz-box-sizing:content-box}.sqs-block-summary-v2 .summary-thumbnail-event-date-inner{display:table-cell;vertical-align:middle}.sqs-block-summary-v2 .summary-thumbnail-event-date-month{display:block;color:#333;font-size:14px;line-height:14px;text-transform:uppercase}.sqs-block-summary-v2 .summary-thumbnail-event-date-day{display:block;color:#333;font-size:26px;line-height:26px}.sqs-block-summary-v2 .summary-content{text-align:left}.sqs-block-summary-v2 .summary-title{margin:0 0 10px 0;font-size:20px;line-height:1.2em;text-align:left}.sqs-block-summary-v2 .summary-price{margin:0 0 10px 0}.sqs-block-summary-v2 .summary-price .product-price{font-size:14px;line-height:20px;text-align:left}.sqs-block-summary-v2 .summary-price .product-price .original-price{opacity:.7;filter:alpha(opacity=70);text-decoration:line-through}.sqs-block-summary-v2 .summary-excerpt{margin:0 0 10px 0}.sqs-block-summary-v2 .summary-excerpt p,.sqs-block-summary-v2 .summary-excerpt ul,.sqs-block-summary-v2 .summary-excerpt li{font-size:14px;line-height:1.4em;margin:0 0 10px 0;text-align:left}.sqs-block-summary-v2 .summary-excerpt p:first-of-type,.sqs-block-summary-v2 .summary-excerpt ul:first-of-type,.sqs-block-summary-v2 .summary-excerpt li:first-of-type{margin-top:0 !important}.sqs-block-summary-v2 .summary-excerpt p:last-of-type,.sqs-block-summary-v2 .summary-excerpt ul:last-of-type,.sqs-block-summary-v2 .summary-excerpt li:last-of-type{margin-bottom:0 !important}.sqs-block-summary-v2 .summary-read-more-link{display:none;margin:0 0 10px 0;font-size:14px;line-height:20px;text-align:left}.sqs-block-summary-v2 .summary-read-more-link:after{content:'Read More \2192'}.sqs-block-summary-v2 .summary-metadata-container{display:none;font-size:13px;line-height:normal}.sqs-block-summary-v2 .summary-block-setting-metadata-position-above-title .summary-metadata-container--above-title,.sqs-block-summary-v2 .summary-block-setting-metadata-position-below-title .summary-metadata-container--below-title,.sqs-block-summary-v2 .summary-block-setting-metadata-position-below-content .summary-metadata-container--below-content{display:block}.sqs-block-summary-v2 .summary-block-setting-metadata-position-above-title.summary-block-setting-primary-metadata-date .summary-metadata-container,.sqs-block-summary-v2 .summary-block-setting-metadata-position-below-title.summary-block-setting-primary-metadata-date .summary-metadata-container,.sqs-block-summary-v2 .summary-block-setting-metadata-position-above-title.summary-block-setting-secondary-metadata-date .summary-metadata-container,.sqs-block-summary-v2 .summary-block-setting-metadata-position-below-title.summary-block-setting-secondary-metadata-date .summary-metadata-container,.sqs-block-summary-v2 .summary-block-setting-metadata-position-above-title.summary-block-setting-primary-metadata-event-time .summary-metadata-container,.sqs-block-summary-v2 .summary-block-setting-metadata-position-below-title.summary-block-setting-primary-metadata-event-time .summary-metadata-container,.sqs-block-summary-v2 .summary-block-setting-metadata-position-above-title.summary-block-setting-secondary-metadata-event-time .summary-metadata-container,.sqs-block-summary-v2 .summary-block-setting-metadata-position-below-title.summary-block-setting-secondary-metadata-event-time .summary-metadata-container,.sqs-block-summary-v2 .summary-block-setting-metadata-position-above-title.summary-block-setting-primary-metadata-cats .summary-item-has-cats .summary-metadata-container,.sqs-block-summary-v2 .summary-block-setting-metadata-position-below-title.summary-block-setting-primary-metadata-cats .summary-item-has-cats .summary-metadata-container,.sqs-block-summary-v2 .summary-block-setting-metadata-position-above-title.summary-block-setting-secondary-metadata-cats .summary-item-has-cats .summary-metadata-container,.sqs-block-summary-v2 .summary-block-setting-metadata-position-below-title.summary-block-setting-secondary-metadata-cats .summary-item-has-cats .summary-metadata-container,.sqs-block-summary-v2 .summary-block-setting-metadata-position-above-title.summary-block-setting-primary-metadata-tags .summary-item-has-tags .summary-metadata-container,.sqs-block-summary-v2 .summary-block-setting-metadata-position-below-title.summary-block-setting-primary-metadata-tags .summary-item-has-tags .summary-metadata-container,.sqs-block-summary-v2 .summary-block-setting-metadata-position-above-title.summary-block-setting-secondary-metadata-tags .summary-item-has-tags .summary-metadata-container,.sqs-block-summary-v2 .summary-block-setting-metadata-position-below-title.summary-block-setting-secondary-metadata-tags .summary-item-has-tags .summary-metadata-container,.sqs-block-summary-v2 .summary-block-setting-metadata-position-above-title.summary-block-setting-primary-metadata-author .summary-item-has-author .summary-metadata-container,.sqs-block-summary-v2 .summary-block-setting-metadata-position-below-title.summary-block-setting-primary-metadata-author .summary-item-has-author .summary-metadata-container,.sqs-block-summary-v2 .summary-block-setting-metadata-position-above-title.summary-block-setting-secondary-metadata-author .summary-item-has-author .summary-metadata-container,.sqs-block-summary-v2 .summary-block-setting-metadata-position-below-title.summary-block-setting-secondary-metadata-author .summary-item-has-author .summary-metadata-container,.sqs-block-summary-v2 .summary-block-setting-metadata-position-above-title.summary-block-setting-primary-metadata-comments .summary-item-has-comments-enabled .summary-metadata-container,.sqs-block-summary-v2 .summary-block-setting-metadata-position-below-title.summary-block-setting-primary-metadata-comments .summary-item-has-comments-enabled .summary-metadata-container,.sqs-block-summary-v2 .summary-block-setting-metadata-position-above-title.summary-block-setting-secondary-metadata-comments .summary-item-has-comments-enabled .summary-metadata-container,.sqs-block-summary-v2 .summary-block-setting-metadata-position-below-title.summary-block-setting-secondary-metadata-comments .summary-item-has-comments-enabled .summary-metadata-container,.sqs-block-summary-v2 .summary-block-setting-metadata-position-above-title.summary-block-setting-primary-metadata-location .summary-item-has-location .summary-metadata-container,.sqs-block-summary-v2 .summary-block-setting-metadata-position-below-title.summary-block-setting-primary-metadata-location .summary-item-has-location .summary-metadata-container,.sqs-block-summary-v2 .summary-block-setting-metadata-position-above-title.summary-block-setting-secondary-metadata-location .summary-item-has-location .summary-metadata-container,.sqs-block-summary-v2 .summary-block-setting-metadata-position-below-title.summary-block-setting-secondary-metadata-location .summary-item-has-location .summary-metadata-container{margin:0 0 10px 0}.sqs-block-summary-v2 .summary-metadata{display:none}.sqs-block-summary-v2 .summary-block-setting-primary-metadata-date .summary-metadata--primary,.sqs-block-summary-v2 .summary-block-setting-primary-metadata-event-time .summary-metadata--primary,.sqs-block-summary-v2 .summary-block-setting-primary-metadata-cats .summary-item-has-cats .summary-metadata--primary,.sqs-block-summary-v2 .summary-block-setting-primary-metadata-tags .summary-item-has-tags .summary-metadata--primary,.sqs-block-summary-v2 .summary-block-setting-primary-metadata-author .summary-item-has-author .summary-metadata--primary,.sqs-block-summary-v2 .summary-block-setting-primary-metadata-comments .summary-item-has-comments-enabled .summary-metadata--primary,.sqs-block-summary-v2 .summary-block-setting-primary-metadata-location .summary-item-has-location .summary-metadata--primary{display:inline-block}.sqs-block-summary-v2 .summary-block-setting-secondary-metadata-date .summary-metadata--secondary,.sqs-block-summary-v2 .summary-block-setting-secondary-metadata-event-time .summary-metadata--secondary,.sqs-block-summary-v2 .summary-block-setting-secondary-metadata-cats .summary-item-has-cats .summary-metadata--secondary,.sqs-block-summary-v2 .summary-block-setting-secondary-metadata-tags .summary-item-has-tags .summary-metadata--secondary,.sqs-block-summary-v2 .summary-block-setting-secondary-metadata-author .summary-item-has-author .summary-metadata--secondary,.sqs-block-summary-v2 .summary-block-setting-secondary-metadata-comments .summary-item-has-comments-enabled .summary-metadata--secondary,.sqs-block-summary-v2 .summary-block-setting-secondary-metadata-location .summary-item-has-location .summary-metadata--secondary{display:inline-block}.sqs-block-summary-v2 .summary-metadata-item{display:none;opacity:.7;margin:0;font-size:13px;line-height:1.4em;text-transform:none}.sqs-block-summary-v2 .summary-metadata-item a,.sqs-block-summary-v2 .summary-metadata-item a:hover{opacity:1;text-decoration:none}.sqs-block-summary-v2 .summary-block-setting-primary-metadata-date .summary-metadata--primary .summary-metadata-item--date,.sqs-block-summary-v2 .summary-block-setting-primary-metadata-event-time .summary-metadata--primary .summary-metadata-item--event-time,.sqs-block-summary-v2 .summary-block-setting-primary-metadata-cats .summary-item-has-cats .summary-metadata--primary .summary-metadata-item--cats,.sqs-block-summary-v2 .summary-block-setting-primary-metadata-tags .summary-item-has-tags .summary-metadata--primary .summary-metadata-item--tags,.sqs-block-summary-v2 .summary-block-setting-primary-metadata-author .summary-item-has-author .summary-metadata--primary .summary-metadata-item--author,.sqs-block-summary-v2 .summary-block-setting-primary-metadata-comments .summary-item-has-comments-enabled .summary-metadata--primary .summary-metadata-item--comments,.sqs-block-summary-v2 .summary-block-setting-primary-metadata-location .summary-item-has-location .summary-metadata--primary .summary-metadata-item--location{display:inline-block}.sqs-block-summary-v2 .summary-block-setting-secondary-metadata-date .summary-metadata--secondary .summary-metadata-item--date,.sqs-block-summary-v2 .summary-block-setting-secondary-metadata-event-time .summary-metadata--secondary .summary-metadata-item--event-time,.sqs-block-summary-v2 .summary-block-setting-secondary-metadata-cats .summary-item-has-cats .summary-metadata--secondary .summary-metadata-item--cats,.sqs-block-summary-v2 .summary-block-setting-secondary-metadata-tags .summary-item-has-tags .summary-metadata--secondary .summary-metadata-item--tags,.sqs-block-summary-v2 .summary-block-setting-secondary-metadata-author .summary-item-has-author .summary-metadata--secondary .summary-metadata-item--author,.sqs-block-summary-v2 .summary-block-setting-secondary-metadata-comments .summary-item-has-comments-enabled .summary-metadata--secondary .summary-metadata-item--comments,.sqs-block-summary-v2 .summary-block-setting-secondary-metadata-location .summary-item-has-location .summary-metadata--secondary .summary-metadata-item--location{display:inline-block}.sqs-block-summary-v2 .summary-block-setting-secondary-metadata-date .summary-metadata--primary .summary-metadata-item:after,.sqs-block-summary-v2 .summary-block-setting-secondary-metadata-event-time .summary-metadata--primary .summary-metadata-item:after,.sqs-block-summary-v2 .summary-block-setting-secondary-metadata-cats .summary-item-has-cats .summary-metadata--primary .summary-metadata-item:after,.sqs-block-summary-v2 .summary-block-setting-secondary-metadata-tags .summary-item-has-tags .summary-metadata--primary .summary-metadata-item:after,.sqs-block-summary-v2 .summary-block-setting-secondary-metadata-author .summary-item-has-author .summary-metadata--primary .summary-metadata-item:after,.sqs-block-summary-v2 .summary-block-setting-secondary-metadata-comments .summary-item-has-comments-enabled .summary-metadata--primary .summary-metadata-item:after,.sqs-block-summary-v2 .summary-block-setting-secondary-metadata-location .summary-item-has-location .summary-metadata--primary .summary-metadata-item:after{content:" ·";margin:0 .3em}.sqs-block-summary-v2 .summary-block-setting-text-size-extralarge .summary-title{font-size:54px}.sqs-block-summary-v2 .summary-block-setting-text-size-extralarge .summary-excerpt p{font-size:16px}.sqs-block-summary-v2 .summary-block-setting-text-size-large .summary-title{font-size:30px}.sqs-block-summary-v2 .summary-block-setting-text-size-medium .summary-title{font-size:20px}.sqs-block-summary-v2 .summary-block-setting-text-size-small .summary-title{font-size:14px}.sqs-block-summary-v2 .summary-block-setting-text-align-center .summary-title,.sqs-block-summary-v2 .summary-block-setting-text-align-center .summary-price .product-price,.sqs-block-summary-v2 .summary-block-setting-text-align-center .summary-excerpt p,.sqs-block-summary-v2 .summary-block-setting-text-align-center .summary-read-more-link,.sqs-block-summary-v2 .summary-block-setting-text-align-center .summary-content{text-align:center}.sqs-block-summary-v2 .summary-block-setting-text-align-right .summary-title,.sqs-block-summary-v2 .summary-block-setting-text-align-right .summary-price .product-price,.sqs-block-summary-v2 .summary-block-setting-text-align-right .summary-excerpt p,.sqs-block-summary-v2 .summary-block-setting-text-align-right .summary-read-more-link,.sqs-block-summary-v2 .summary-block-setting-text-align-right .summary-content{text-align:right}.sqs-block-summary-v2 .summary-item-record-type-text .summary-read-more-link{display:block}.sqs-block-summary-v2 .summary-item-record-type-event .summary-thumbnail-event-date{display:table}.sqs-block-summary-v2 .summary-thumbnail-container{margin:0}.sqs-block-summary-v2 .summary-block-setting-show-title .summary-thumbnail-container,.sqs-block-summary-v2 .summary-block-setting-show-price .summary-item-record-type-store-item .summary-thumbnail-container,.sqs-block-summary-v2 .summary-block-setting-show-excerpt .summary-thumbnail-container,.sqs-block-summary-v2 .summary-block-wrapper:not(.summary-block-setting-primary-metadata-none) .summary-thumbnail-container,.sqs-block-summary-v2 .summary-block-wrapper:not(.summary-block-setting-secondary-metadata-none) .summary-thumbnail-container{margin:0 0 15px 0}.sqs-block-summary-v2 .summary-block-wrapper:not(.summary-block-setting-show-excerpt) .summary-title,.sqs-block-summary-v2 .summary-block-wrapper:not(.summary-block-setting-show-excerpt) .summary-price{margin:0 0 2px 0}.sqs-block-summary-v2 .summary-block-wrapper:not(.summary-block-setting-show-excerpt).summary-block-setting-metadata-position-above-title.summary-block-setting-primary-metadata-date .summary-metadata-container,.sqs-block-summary-v2 .summary-block-wrapper:not(.summary-block-setting-show-excerpt).summary-block-setting-metadata-position-below-title.summary-block-setting-primary-metadata-date .summary-metadata-container,.sqs-block-summary-v2 .summary-block-wrapper:not(.summary-block-setting-show-excerpt).summary-block-setting-metadata-position-above-title.summary-block-setting-secondary-metadata-date .summary-metadata-container,.sqs-block-summary-v2 .summary-block-wrapper:not(.summary-block-setting-show-excerpt).summary-block-setting-metadata-position-below-title.summary-block-setting-secondary-metadata-date .summary-metadata-container,.sqs-block-summary-v2 .summary-block-wrapper:not(.summary-block-setting-show-excerpt).summary-block-setting-metadata-position-above-title.summary-block-setting-primary-metadata-event-time .summary-metadata-container,.sqs-block-summary-v2 .summary-block-wrapper:not(.summary-block-setting-show-excerpt).summary-block-setting-metadata-position-below-title.summary-block-setting-primary-metadata-event-time .summary-metadata-container,.sqs-block-summary-v2 .summary-block-wrapper:not(.summary-block-setting-show-excerpt).summary-block-setting-metadata-position-above-title.summary-block-setting-secondary-metadata-event-time .summary-metadata-container,.sqs-block-summary-v2 .summary-block-wrapper:not(.summary-block-setting-show-excerpt).summary-block-setting-metadata-position-below-title.summary-block-setting-secondary-metadata-event-time .summary-metadata-container,.sqs-block-summary-v2 .summary-block-wrapper:not(.summary-block-setting-show-excerpt).summary-block-setting-metadata-position-above-title.summary-block-setting-primary-metadata-cats .summary-item-has-cats .summary-metadata-container,.sqs-block-summary-v2 .summary-block-wrapper:not(.summary-block-setting-show-excerpt).summary-block-setting-metadata-position-below-title.summary-block-setting-primary-metadata-cats .summary-item-has-cats .summary-metadata-container,.sqs-block-summary-v2 .summary-block-wrapper:not(.summary-block-setting-show-excerpt).summary-block-setting-metadata-position-above-title.summary-block-setting-secondary-metadata-cats .summary-item-has-cats .summary-metadata-container,.sqs-block-summary-v2 .summary-block-wrapper:not(.summary-block-setting-show-excerpt).summary-block-setting-metadata-position-below-title.summary-block-setting-secondary-metadata-cats .summary-item-has-cats .summary-metadata-container,.sqs-block-summary-v2 .summary-block-wrapper:not(.summary-block-setting-show-excerpt).summary-block-setting-metadata-position-above-title.summary-block-setting-primary-metadata-tags .summary-item-has-tags .summary-metadata-container,.sqs-block-summary-v2 .summary-block-wrapper:not(.summary-block-setting-show-excerpt).summary-block-setting-metadata-position-below-title.summary-block-setting-primary-metadata-tags .summary-item-has-tags .summary-metadata-container,.sqs-block-summary-v2 .summary-block-wrapper:not(.summary-block-setting-show-excerpt).summary-block-setting-metadata-position-above-title.summary-block-setting-secondary-metadata-tags .summary-item-has-tags .summary-metadata-container,.sqs-block-summary-v2 .summary-block-wrapper:not(.summary-block-setting-show-excerpt).summary-block-setting-metadata-position-below-title.summary-block-setting-secondary-metadata-tags .summary-item-has-tags .summary-metadata-container,.sqs-block-summary-v2 .summary-block-wrapper:not(.summary-block-setting-show-excerpt).summary-block-setting-metadata-position-above-title.summary-block-setting-primary-metadata-author .summary-item-has-author .summary-metadata-container,.sqs-block-summary-v2 .summary-block-wrapper:not(.summary-block-setting-show-excerpt).summary-block-setting-metadata-position-below-title.summary-block-setting-primary-metadata-author .summary-item-has-author .summary-metadata-container,.sqs-block-summary-v2 .summary-block-wrapper:not(.summary-block-setting-show-excerpt).summary-block-setting-metadata-position-above-title.summary-block-setting-secondary-metadata-author .summary-item-has-author .summary-metadata-container,.sqs-block-summary-v2 .summary-block-wrapper:not(.summary-block-setting-show-excerpt).summary-block-setting-metadata-position-below-title.summary-block-setting-secondary-metadata-author .summary-item-has-author .summary-metadata-container,.sqs-block-summary-v2 .summary-block-wrapper:not(.summary-block-setting-show-excerpt).summary-block-setting-metadata-position-above-title.summary-block-setting-primary-metadata-comments .summary-item-has-comments-enabled .summary-metadata-container,.sqs-block-summary-v2 .summary-block-wrapper:not(.summary-block-setting-show-excerpt).summary-block-setting-metadata-position-below-title.summary-block-setting-primary-metadata-comments .summary-item-has-comments-enabled .summary-metadata-container,.sqs-block-summary-v2 .summary-block-wrapper:not(.summary-block-setting-show-excerpt).summary-block-setting-metadata-position-above-title.summary-block-setting-secondary-metadata-comments .summary-item-has-comments-enabled .summary-metadata-container,.sqs-block-summary-v2 .summary-block-wrapper:not(.summary-block-setting-show-excerpt).summary-block-setting-metadata-position-below-title.summary-block-setting-secondary-metadata-comments .summary-item-has-comments-enabled .summary-metadata-container,.sqs-block-summary-v2 .summary-block-wrapper:not(.summary-block-setting-show-excerpt).summary-block-setting-metadata-position-above-title.summary-block-setting-primary-metadata-location .summary-item-has-location .summary-metadata-container,.sqs-block-summary-v2 .summary-block-wrapper:not(.summary-block-setting-show-excerpt).summary-block-setting-metadata-position-below-title.summary-block-setting-primary-metadata-location .summary-item-has-location .summary-metadata-container,.sqs-block-summary-v2 .summary-block-wrapper:not(.summary-block-setting-show-excerpt).summary-block-setting-metadata-position-above-title.summary-block-setting-secondary-metadata-location .summary-item-has-location .summary-metadata-container,.sqs-block-summary-v2 .summary-block-wrapper:not(.summary-block-setting-show-excerpt).summary-block-setting-metadata-position-below-title.summary-block-setting-secondary-metadata-location .summary-item-has-location .summary-metadata-container{margin:0 0 2px 0}.sqs-block-summary-v2 .summary-block-setting-design-list .summary-item{visibility:visible !important;margin-bottom:17px !important;padding-bottom:17px !important}.sqs-block-summary-v2 .summary-block-setting-design-list .summary-item.summary-item-show-thumbnail{margin-bottom:17px !important;padding-bottom:17px !important}.sqs-block-summary-v2 .summary-block-setting-design-list .summary-thumbnail-container{margin:0 !important}.sqs-block-summary-v2 .summary-block-setting-design-list.summary-block-setting-design-list-thumbnail-right .summary-thumbnail-container{float:right;padding:0 0 0 20px}.sqs-block-summary-v2 .summary-block-setting-design-list.summary-block-setting-design-list-thumbnail-right .summary-item-record-type-store-item .product-mark{right:0;left:auto}.sqs-block-summary-v2 .summary-block-setting-design-list .summary-item-record-type-store-item .product-mark{left:0;right:auto}.sqs-block-summary-v2 .summary-block-setting-design-list .summary-item-record-type-event .summary-thumbnail-event-date{display:none}.sqs-block-summary-v2 .summary-block-setting-design-carousel .summary-carousel-pager{display:block}.sqs-block-summary-v2 .summary-block-setting-design-carousel .summary-block-header{overflow:hidden}.sqs-block-summary-v2 .summary-block-setting-design-carousel .summary-heading{display:block;float:left;width:calc(100% - 50px);width:-webkit-calc(100% - 50px);width:-moz-calc(100% - 50px)}.sqs-block-summary-v2 .summary-block-setting-design-carousel .summary-collection-title{display:none}.sqs-block-summary-v2 .summary-block-setting-design-carousel .summary-carousel-pager{float:right;width:50px}@media only screen and (max-width:700px){.sqs-block-summary-v2 .summary-product-quick-view{display:none}}.sqs-block-archive .archive-group-list,.sqs-block-archive .archive-item-list{list-style-type:none;margin:0;padding:0}.sqs-block-archive .archive-group-count::before{content:"("}.sqs-block-archive .archive-group-count::after{content:")"}.sqs-block-archive .archive-block-setting-layout-list.archive-block-setting-multicolumns .archive-group-list{columns:140px;column-gap:60px;-moz-columns:140px;-moz-column-gap:60px;-webkit-columns:140px;-webkit-column-gap:60px}.sqs-block-archive .archive-block-setting-layout-index .archive-group-name-link{font-size:1.4em;line-height:1.4em;text-decoration:none}.sqs-block-archive .archive-block-setting-layout-index .archive-item-list{display:block;margin:1.4em 0 2.8em 0;font-size:1em;line-height:1.4em}.sqs-block-archive .archive-block-setting-layout-index .archive-item{margin:0 0 .7em 0}.sqs-block-archive .archive-block-setting-layout-index .archive-item.archive-item--show-date{margin:0 0 1.4em 0}.sqs-block-archive .archive-block-setting-layout-index .archive-item-date-before{display:none;opacity:.7;margin-right:5px}.sqs-block-archive .archive-block-setting-layout-index .archive-item-link{display:block;margin-right:5px;color:inherit !important}.sqs-block-archive .archive-block-setting-layout-index .archive-item-link--untitled::before{content:"Untitled"}.sqs-block-archive .archive-block-setting-layout-index .archive-item-date-after{display:block;opacity:.7}.sqs-block-archive .archive-block-setting-layout-index.archive-block-setting-multicolumns .archive-group-list{columns:225px;column-gap:60px;-moz-columns:225px;-moz-column-gap:60px;-webkit-columns:225px;-webkit-column-gap:60px}.sqs-block-archive .archive-block-setting-layout-index.archive-block-setting-multicolumns .archive-group{display:inline-block;column-break-inside:avoid;-moz-column-break-inside:avoid;-webkit-column-break-inside:avoid}.sqs-block-archive .archive-block-setting-layout-index.archive-block-setting-multicolumns .archive-group-name-link,.sqs-block-archive .archive-block-setting-layout-index.archive-block-setting-multicolumns .archive-item-list{display:inline-block;min-width:225px}.sqs-block-archive .archive-block-setting-layout-dropdown.archive-block-wrapper{max-width:300px;background:rgba(0,0,0,.025);border-radius:1px}.sqs-block-archive .archive-block-setting-layout-dropdown .archive-dropdown-toggle-checkbox{position:absolute;left:-9999px}.sqs-block-archive .archive-block-setting-layout-dropdown .archive-dropdown-toggle-checkbox:checked~.archive-group-list{display:block}.sqs-block-archive .archive-block-setting-layout-dropdown .archive-dropdown-toggle-checkbox:checked~.archive-dropdown-toggle-label .archive-dropdown-toggle-icon:before{font-family:'squarespace-ui-font';font-style:normal;speak:none;font-weight:normal;-webkit-font-smoothing:antialiased;content:"\e006";text-align:center;display:inline-block;vertical-align:middle}.sqs-block-archive .archive-block-setting-layout-dropdown .archive-dropdown-toggle-checkbox:checked~.archive-dropdown-toggle-label .archive-dropdown-toggle-icon:before{font-size:16px;width:16px;height:16px;line-height:16px}.sqs-block-archive .archive-block-setting-layout-dropdown .archive-dropdown-toggle-checkbox:checked~.archive-dropdown-toggle-label .archive-dropdown-toggle-icon:before{font-size:1em;width:1em;height:1em;line-height:1em}.sqs-block-archive .archive-block-setting-layout-dropdown .archive-dropdown-toggle-label{display:block;padding:12px 18px;font-size:1em;line-height:1.6em;cursor:pointer;overflow:hidden;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.sqs-block-archive .archive-block-setting-layout-dropdown .archive-dropdown-toggle-title{float:left;width:90%;padding-right:5px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;box-sizing:border-box}.sqs-block-archive .archive-block-setting-layout-dropdown .archive-dropdown-toggle-icon{position:relative;bottom:1px;float:right;width:10%;text-align:right;box-sizing:border-box}.sqs-block-archive .archive-block-setting-layout-dropdown .archive-dropdown-toggle-icon:before{font-family:'squarespace-ui-font';font-style:normal;speak:none;font-weight:normal;-webkit-font-smoothing:antialiased;content:"\e009";text-align:center;display:inline-block;vertical-align:middle}.sqs-block-archive .archive-block-setting-layout-dropdown .archive-dropdown-toggle-icon:before{font-size:16px;width:16px;height:16px;line-height:16px}.sqs-block-archive .archive-block-setting-layout-dropdown .archive-dropdown-toggle-icon:before{font-size:1em;width:1em;height:1em;line-height:1em}.sqs-block-archive .archive-block-setting-layout-dropdown .archive-group-list{display:none;padding:0 18px 12px}.sqs-block-archive .archive-block-setting-layout-dropdown .archive-group-name-link{text-decoration:none}@media only screen and (max-width:400px){.sqs-block-archive .archive-block-setting-layout-dropdown.archive-block-wrapper{max-width:none}}.sqs-block-archive.sqs-edit-dialog-open .sqs-editing-overlay,.sqs-block-archive.sqs-edit-dialog-open .sqs-block-editor-button-container{z-index:1}.sqs-block-archive.sqs-edit-dialog-open .sqs-block-archive-content{position:relative;z-index:1000}.sqs-block-archive.sqs-edit-dialog-open .archive-group-list{pointer-events:none}.sqs-block-spacer .sqs-block-content{visibility:hidden}.sqs-layout .html-block.sqs-block img{max-width:100%;height:auto}.sqs-layout .html-block.sqs-block img[align=left]{margin-right:34px}.sqs-layout .html-block.sqs-block img[align=right]{margin-left:34px}.sqs-layout .html-block.sqs-block img[align=top]{vertical-align:top}.sqs-layout .html-block.sqs-block img[align=middle]{vertical-align:middle}.sqs-layout .html-block.sqs-block img[align=bottom]{vertical-align:bottom}.sqs-layout .html-block.sqs-block .full-image-float-left,.sqs-layout .html-block.sqs-block .thumbnail-image-float-left{float:left;margin-right:34px}.sqs-layout .html-block.sqs-block .full-image-float-right,.sqs-layout .html-block.sqs-block .thumbnail-image-float-right{float:right;margin-left:34px}.sqs-layout .html-block.sqs-block .full-image-block{display:block;margin-bottom:34px}.sqs-layout .html-block.sqs-block div[data-src="v5"] img{max-width:100%}.sqs-layout .html-block.sqs-block .thumbnail-caption{display:block}.sqs-layout .html-block.sqs-block .entry-content img{margin:0 0 34px 0}.sqs-layout .html-block.sqs-block .alignleft,.sqs-layout .html-block.sqs-block img.alignleft{margin-right:34px;display:inline;float:left;width:auto}.sqs-layout .html-block.sqs-block .alignright,.sqs-layout .html-block.sqs-block img.alignright{margin-left:34px;display:inline;float:right;width:auto}.sqs-layout .html-block.sqs-block .aligncenter,.sqs-layout .html-block.sqs-block img.aligncenter{margin-right:auto;margin-left:auto;display:block;clear:both;width:auto}.sqs-layout .html-block.sqs-block blockquote.left{margin-right:34px;text-align:right;margin-left:0;width:33%;float:left}.sqs-layout .html-block.sqs-block blockquote.right{margin-left:34px;text-align:left;margin-right:0;width:33%;float:right}.system-button-font{font-family:"proxima-nova",sans-serif;font-weight:600;font-style:normal;text-transform:uppercase;letter-spacing:1px}body:not(.button-style-default) .sqs-editable-button,body:not(.button-style-default) .sqs-editable-button-layout{display:inline-block;width:auto;height:auto;padding:1em 2.5em;border-width:0;text-align:center;cursor:pointer;outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none}body:not(.button-style-default) .sqs-editable-button:hover,body:not(.button-style-default) .sqs-editable-button-layout:hover{opacity:1}body:not(.button-style-default) .sqs-editable-button,body:not(.button-style-default) .sqs-editable-button-color{color:#fff;background-color:#23c890;border-color:#23c890}body:not(.button-style-default) .sqs-editable-button,body:not(.button-style-default) .sqs-editable-button-font{font-family:"proxima-nova",sans-serif;letter-spacing:1px;font-family:"proxima-nova";text-transform:uppercase;letter-spacing:.6px;font-weight:600;font-style:normal}body:not(.button-style-default).button-style-solid .sqs-editable-button,body:not(.button-style-default).button-style-solid .sqs-editable-button-style{-webkit-transition:.1s opacity linear;-moz-transition:.1s opacity linear;-o-transition:.1s opacity linear;transition:.1s opacity linear;-webkit-backface-visibility:hidden}body:not(.button-style-default).button-style-solid .sqs-editable-button:hover,body:not(.button-style-default).button-style-solid .sqs-editable-button-style:hover{opacity:.8}body:not(.button-style-default).button-style-outline .sqs-editable-button,body:not(.button-style-default).button-style-outline .sqs-editable-button-style{border-width:2px;border-style:solid;-webkit-transition:0.1s background-color linear, 0.1s color linear;-moz-transition:0.1s background-color linear, 0.1s color linear;-o-transition:0.1s background-color linear, 0.1s color linear;transition:0.1s background-color linear, 0.1s color linear}body:not(.button-style-default).button-style-outline .sqs-editable-button,body:not(.button-style-default).button-style-outline .sqs-editable-button-color{background-color:transparent;color:#23c890}body:not(.button-style-default).button-style-outline .sqs-editable-button:hover,body:not(.button-style-default).button-style-outline .sqs-editable-button-color:hover{background-color:#23c890;color:#1d1d1d;color:#fff}body:not(.button-style-default).button-style-raised .sqs-editable-button,body:not(.button-style-default).button-style-raised .sqs-editable-button-style{position:relative;-webkit-transition:.1s background-color linear;-moz-transition:.1s background-color linear;-o-transition:.1s background-color linear;transition:.1s background-color linear}body:not(.button-style-default).button-style-raised .sqs-editable-button:active,body:not(.button-style-default).button-style-raised .sqs-editable-button-style:active{top:1px}body:not(.button-style-default).button-style-raised .sqs-editable-button,body:not(.button-style-default).button-style-raised .sqs-editable-button-color{-webkit-box-shadow:0 2px 0 0 #1da577;-moz-box-shadow:0 2px 0 0 #1da577;box-shadow:0 2px 0 0 #1da577}body:not(.button-style-default).button-style-raised .sqs-editable-button:hover,body:not(.button-style-default).button-style-raised .sqs-editable-button-color:hover{background-color:#25d599}body:not(.button-style-default).button-style-raised .sqs-editable-button:active,body:not(.button-style-default).button-style-raised .sqs-editable-button-color:active{-webkit-box-shadow:0 1px 0 0 #1da577;-moz-box-shadow:0 1px 0 0 #1da577;box-shadow:0 1px 0 0 #1da577}body:not(.button-style-default).button-corner-style-square .sqs-editable-button,body:not(.button-style-default).button-corner-style-square .sqs-editable-button-shape{border-radius:0}body:not(.button-style-default).button-corner-style-rounded .sqs-editable-button,body:not(.button-style-default).button-corner-style-rounded .sqs-editable-button-shape{border-radius:3px}body:not(.button-style-default).button-corner-style-pill .sqs-editable-button,body:not(.button-style-default).button-corner-style-pill .sqs-editable-button-shape{border-radius:300px}body:not(.button-style-default).button-style-outline .newsletter-block .newsletter-form-button{border-width:1px;-webkit-box-shadow:inset 0px 0px 0px 1px #23c890;-moz-box-shadow:inset 0px 0px 0px 1px #23c890;box-shadow:inset 0px 0px 0px 1px #23c890;background:transparent;color:#23c890}body:not(.button-style-default).button-style-outline .newsletter-block .newsletter-form-button:hover{background-color:#23c890;color:#1d1d1d;color:#fff}body:not(.button-style-default).button-style-raised .newsletter-block .newsletter-form-button{border-width:0 !important;top:-1px;-webkit-box-shadow:0 2px 0 0 #1da577;-moz-box-shadow:0 2px 0 0 #1da577;box-shadow:0 2px 0 0 #1da577}body:not(.button-style-default).button-style-raised .newsletter-block .newsletter-form-button:hover{background-color:#25d599}body:not(.button-style-default).button-style-raised .newsletter-block .newsletter-form-button:active{top:0px;-webkit-box-shadow:0 1px 0 0 #1da577;-moz-box-shadow:0 1px 0 0 #1da577;box-shadow:0 1px 0 0 #1da577}body:not(.button-style-default) .opentable-block .OT_Find_a_Table{font-family:"proxima-nova",sans-serif;letter-spacing:1px;font-family:"proxima-nova";text-transform:uppercase;letter-spacing:.6px;font-weight:600;font-style:normal}body:not(.button-style-default).button-corner-style-rounded .opentable-block .OT_Find_a_Table{border-radius:3px}body:not(.button-style-default).button-corner-style-pill .opentable-block .OT_Find_a_Table{border-radius:300px}.announcement-bar-font{font-family:'proxima-nova',arial,sans-serif;font-size:13px;font-weight:300;font-style:normal;letter-spacing:1px;text-transform:none}.sqs-announcement-bar{overflow:hidden;position:relative;top:0;left:0;z-index:10000;background:#f5dc00;text-align:center;-webkit-transition:height .3s cubic-bezier(.23,1,.32,1);-moz-transition:height .3s cubic-bezier(.23,1,.32,1);-ms-transition:height .3s cubic-bezier(.23,1,.32,1);-o-transition:height .3s cubic-bezier(.23,1,.32,1);transition:height .3s cubic-bezier(.23,1,.32,1)}.sqs-announcement-bar-url{position:absolute;top:0;left:0;width:100%;height:100%}.sqs-announcement-bar-text{padding:.8em 3em;font-family:'proxima-nova',arial,sans-serif;font-size:13px;font-weight:300;font-family:"proxima-nova";font-size:19px;text-transform:none;letter-spacing:1px;font-weight:700;font-style:normal;line-height:1.2em}.sqs-announcement-bar-text p{color:#000;margin:0;font-family:'proxima-nova',arial,sans-serif;font-size:13px;font-weight:300;font-family:"proxima-nova";font-size:19px;text-transform:none;letter-spacing:1px;font-weight:700;font-style:normal;line-height:inherit}.sqs-announcement-bar-text a{position:relative;color:#000 !important;text-decoration:underline !important}.sqs-announcement-bar-close{cursor:pointer;position:absolute;top:0;right:0;width:2.8em;height:2.78em;background:rgba(0,0,0,.15);color:#000}.sqs-announcement-bar-close:after{content:'×';display:block;font-family:helvetica,arial,sans-serif;font-size:1em;font-weight:100;line-height:2.7em;letter-spacing:normal;padding:0}.sqs-announcement-bar-hidden{height:0 !important}@media screen and (max-width:1024px){.sqs-announcement-bar-text,.sqs-announcement-bar-text p{font-size:13px}}@font-face{font-family:'social-icon-font';src:url('//static.squarespace.com/universal/fonts/social-20141119/social-icon-font.eot');src:url('//static.squarespace.com/universal/fonts/social-20141119/social-icon-font.eot?#iefix') format('embedded-opentype'),url('//static.squarespace.com/universal/fonts/social-20141119/social-icon-font.woff') format('woff'),url('//static.squarespace.com/universal/fonts/social-20141119/social-icon-font.ttf') format('truetype'),url('//static.squarespace.com/universal/fonts/social-20141119/social-icon-font.svg#social-icon-font') format('svg');font-weight:normal;font-style:normal}.social-smugmug:before,.social-dribbble:before,.social-youtube:before,.social-vimeo:before,.social-twitter:before,.social-tumblr:before,.social-pinterest:before,.social-linkedin:before,.social-instagram:before,.social-google:before,.social-foursquare:before,.social-flickr:before,.social-facebook:before,.social-fivehundredpix:before,.social-fivehundredpx:before,.social-email:before,.social-github:before,.social-rss:before,.social-spotify:before,.social-soundcloud:before,.social-itunes:before,.social-googleplay:before,.social-dropbox:before,.social-bandsintown:before,.social-behance:before,.social-codepen:before,.social-medium:before,.social-rdio:before,.social-squarespace:before,.social-vine:before,.social-yelp:before,.social-vevo:before,.social-meetup:before,.social-twitch:before,.social-vsco:before,.social-smugmug-square:before,.social-dribbble-square:before,.social-youtube-square:before,.social-vimeo-square:before,.social-twitter-square:before,.social-tumblr-square:before,.social-pinterest-square:before,.social-linkedin-square:before,.social-instagram-square:before,.social-google-square:before,.social-foursquare-square:before,.social-flickr-square:before,.social-facebook-square:before,.social-fivehundredpix-square:before,.social-fivehundredpx-square:before,.social-email-square:before,.social-github-square:before,.social-rss-square:before,.social-spotify-square:before,.social-soundcloud-square:before,.social-itunes-square:before,.social-googleplay-square:before,.social-dropbox-square:before,.social-bandsintown-square:before,.social-behance-square:before,.social-codepen-square:before,.social-medium-square:before,.social-rdio-square:before,.social-squarespace-square:before,.social-vine-square:before,.social-yelp-square:before,.social-vevo-square:before,.social-meetup-square:before,.social-twitch-square:before,.social-vsco-square:before,.social-smugmug-round:before,.social-dribbble-round:before,.social-youtube-round:before,.social-vimeo-round:before,.social-twitter-round:before,.social-tumblr-round:before,.social-pinterest-round:before,.social-linkedin-round:before,.social-instagram-round:before,.social-google-round:before,.social-foursquare-round:before,.social-flickr-round:before,.social-facebook-round:before,.social-fivehundredpix-round:before,.social-fivehundredpx-round:before,.social-email-round:before,.social-github-round:before,.social-rss-round:before,.social-spotify-round:before,.social-soundcloud-round:before,.social-itunes-round:before,.social-googleplay-round:before,.social-dropbox-round:before,.social-bandsintown-round:before,.social-behance-round:before,.social-codepen-round:before,.social-medium-round:before,.social-rdio-round:before,.social-squarespace-round:before,.social-vine-round:before,.social-yelp-round:before,.social-vevo-round:before,.social-meetup-round:before,.social-twitch-round:before,.social-vsco-round:before{font-family:'social-icon-font';speak:none;font-style:normal;font-weight:normal;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.social-smugmug:before{content:"\e600"}.social-icon-style-square .social-smugmug:before{content:"\e601"}.social-icon-style-round .social-smugmug:before{content:"\e602"}.social-dribbble:before{content:"\e603"}.social-icon-style-square .social-dribbble:before{content:"\e604"}.social-icon-style-round .social-dribbble:before{content:"\e605"}.social-youtube:before{content:"\e606"}.social-icon-style-square .social-youtube:before{content:"\e607"}.social-icon-style-round .social-youtube:before{content:"\e608"}.social-vimeo:before{content:"\e609"}.social-icon-style-square .social-vimeo:before{content:"\e60a"}.social-icon-style-round .social-vimeo:before{content:"\e60b"}.social-twitter:before{content:"\e60c"}.social-icon-style-square .social-twitter:before{content:"\e60d"}.social-icon-style-round .social-twitter:before{content:"\e60e"}.social-tumblr:before{content:"\e60f"}.social-icon-style-square .social-tumblr:before{content:"\e610"}.social-icon-style-round .social-tumblr:before{content:"\e611"}.social-pinterest:before{content:"\e612"}.social-icon-style-square .social-pinterest:before{content:"\e613"}.social-icon-style-round .social-pinterest:before{content:"\e614"}.social-linkedin:before{content:"\e615"}.social-icon-style-square .social-linkedin:before{content:"\e616"}.social-icon-style-round .social-linkedin:before{content:"\e617"}.social-instagram:before{content:"\e618"}.social-icon-style-square .social-instagram:before{content:"\e619"}.social-icon-style-round .social-instagram:before{content:"\e61a"}.social-google:before{content:"\e61b"}.social-icon-style-square .social-google:before{content:"\e61c"}.social-icon-style-round .social-google:before{content:"\e61d"}.social-googleauth2:before{content:"\e61b"}.social-foursquare:before{content:"\e61e"}.social-icon-style-square .social-foursquare:before{content:"\e61f"}.social-icon-style-round .social-foursquare:before{content:"\e620"}.social-flickr:before{content:"\e621"}.social-icon-style-square .social-flickr:before{content:"\e622"}.social-icon-style-round .social-flickr:before{content:"\e623"}.social-facebook:before{content:"\e624"}.social-icon-style-square .social-facebook:before{content:"\e625"}.social-icon-style-round .social-facebook:before{content:"\e626"}.social-fivehundredpix:before{content:"\e627"}.social-icon-style-square .social-fivehundredpix:before{content:"\e628"}.social-icon-style-round .social-fivehundredpix:before{content:"\e629"}.social-fivehundredpx:before{content:"\e627"}.social-icon-style-square .social-fivehundredpx:before{content:"\e628"}.social-icon-style-round .social-fivehundredpx:before{content:"\e629"}.social-email:before{content:"\e62a"}.social-icon-style-square .social-email:before{content:"\e62b"}.social-icon-style-round .social-email:before{content:"\e62c"}.social-github:before{content:"\e62d"}.social-icon-style-square .social-github:before{content:"\e62e"}.social-icon-style-round .social-github:before{content:"\e62f"}.social-rss:before{content:"\e630"}.social-icon-style-square .social-rss:before{content:"\e631"}.social-icon-style-round .social-rss:before{content:"\e632"}.social-spotify:before{content:"\e633"}.social-icon-style-square .social-spotify:before{content:"\e634"}.social-icon-style-round .social-spotify:before{content:"\e635"}.social-soundcloud:before{content:"\e636"}.social-icon-style-square .social-soundcloud:before{content:"\e637"}.social-icon-style-round .social-soundcloud:before{content:"\e638"}.social-itunes:before{content:"\e639"}.social-icon-style-square .social-itunes:before{content:"\e63a"}.social-icon-style-round .social-itunes:before{content:"\e63b"}.social-googleplay:before{content:"\e63c"}.social-icon-style-square .social-googleplay:before{content:"\e63d"}.social-icon-style-round .social-googleplay:before{content:"\e63e"}.social-dropbox:before{content:"\e63f"}.social-icon-style-square .social-dropbox:before{content:"\e640"}.social-icon-style-round .social-dropbox:before{content:"\e641"}.social-bandsintown:before{content:"\e642"}.social-icon-style-square .social-bandsintown:before{content:"\e643"}.social-icon-style-round .social-bandsintown:before{content:"\e644"}.social-behance:before{content:"\e645"}.social-icon-style-square .social-behance:before{content:"\e646"}.social-icon-style-round .social-behance:before{content:"\e647"}.social-codepen:before{content:"\e648"}.social-icon-style-square .social-codepen:before{content:"\e649"}.social-icon-style-round .social-codepen:before{content:"\e64a"}.social-medium:before{content:"\e64b"}.social-icon-style-square .social-medium:before{content:"\e64c"}.social-icon-style-round .social-medium:before{content:"\e64d"}.social-rdio:before{content:"\e64e"}.social-icon-style-square .social-rdio:before{content:"\e64f"}.social-icon-style-round .social-rdio:before{content:"\e650"}.social-squarespace:before{content:"\e651"}.social-icon-style-square .social-squarespace:before{content:"\e652"}.social-icon-style-round .social-squarespace:before{content:"\e653"}.social-vine:before{content:"\e654"}.social-icon-style-square .social-vine:before{content:"\e655"}.social-icon-style-round .social-vine:before{content:"\e656"}.social-yelp:before{content:"\e657"}.social-icon-style-square .social-yelp:before{content:"\e658"}.social-icon-style-round .social-yelp:before{content:"\e659"}.social-meetup:before{content:"\e65a"}.social-icon-style-square .social-meetup:before{content:"\e65b"}.social-icon-style-round .social-meetup:before{content:"\e65c"}.social-vevo:before{content:"\e65d"}.social-icon-style-square .social-vevo:before{content:"\e65e"}.social-icon-style-round .social-vevo:before{content:"\e65f"}.social-twitch:before{content:"\e660"}.social-icon-style-square .social-twitch:before{content:"\e661"}.social-icon-style-round .social-twitch:before{content:"\e662"}.social-vsco:before{content:"\e663"}.social-icon-style-square .social-vsco:before{content:"\e664"}.social-icon-style-round .social-vsco:before{content:"\e665"}.sqs-product-quick-view-lightbox .sqs-product-quick-view-content{padding:60px}.sqs-product-quick-view-lightbox-next-button,.sqs-product-quick-view-lightbox-prev-button{position:fixed;top:50%;width:90%;max-width:900px;height:70px;margin-top:-35px;color:#fff;font-size:inherit;line-height:70px;cursor:pointer;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.sqs-product-quick-view-lightbox-next-button:before,.sqs-product-quick-view-lightbox-prev-button:before{font-weight:bold}.sqs-product-quick-view-lightbox-next-button{text-align:right;margin-left:50px;padding-right:23.333333333333332px}.sqs-product-quick-view-lightbox-next-button:before{font-family:'squarespace-ui-font';font-style:normal;speak:none;font-weight:normal;-webkit-font-smoothing:antialiased;content:"\e02d";text-align:center;display:inline-block;vertical-align:middle}.sqs-product-quick-view-lightbox-next-button:before{font-size:32px;width:32px;height:32px;line-height:32px}.sqs-product-quick-view-lightbox-next-button:before{font-size:30px;width:30px;height:30px;line-height:30px}.sqs-product-quick-view-lightbox-prev-button{margin-left:-73.33333333333333px;padding-left:23.333333333333332px}.sqs-product-quick-view-lightbox-prev-button:before{font-family:'squarespace-ui-font';font-style:normal;speak:none;font-weight:normal;-webkit-font-smoothing:antialiased;content:"\e02c";text-align:center;display:inline-block;vertical-align:middle}.sqs-product-quick-view-lightbox-prev-button:before{font-size:32px;width:32px;height:32px;line-height:32px}.sqs-product-quick-view-lightbox-prev-button:before{font-size:30px;width:30px;height:30px;line-height:30px}.sqs-product-quick-view-lightbox-element-hidden{opacity:0;visibility:hidden;cursor:default}.sqs-product-quick-view-lightbox #productDetails{width:47%}.sqs-product-quick-view-lightbox .sqs-add-to-cart-button{margin:20px 0}@media only screen and (max-width:960px){.sqs-product-quick-view-lightbox .sqs-product-quick-view-content{padding:40px}}@media only screen and (max-width:850px){.sqs-product-quick-view-lightbox #productSummary .product-title{display:none}.sqs-product-quick-view-lightbox #productSummary .product-title.mobile{display:block;margin-top:0}.sqs-product-quick-view-lightbox .product-meta{margin-top:0 !important}.sqs-product-quick-view-lightbox #productDetails,.sqs-product-quick-view-lightbox #productGallery{width:100%;float:none}}.sqs-product-quick-view-lightbox.sqs-modal-lightbox{visibility:visible}.sqs-product-quick-view-lightbox.sqs-modal-lightbox[hidden]{visibility:hidden;display:block !important}.sqs-product-quick-view-lightbox.sqs-modal-lightbox[hidden] .sqs-modal-lightbox-content{left:-9999px;opacity:0;transition:none}.sqs-product-quick-view-lightbox.sqs-modal-lightbox .sqs-modal-lightbox-content{transition:opacity .15s ease-out}.sqs-product-quick-view-lightbox.sqs-modal-lightbox .sqs-modal-lightbox-content .lightbox-inner .lightbox-content{width:90%;max-width:900px;padding:0px}.sqs-product-quick-view-lightbox.sqs-modal-lightbox .sqs-modal-lightbox-content .lightbox-inner .lightbox-content .lightbox-close{position:fixed;top:0;right:0;width:70px;height:70px;color:transparent;font-size:inherit;line-height:70px;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.sqs-product-quick-view-lightbox.sqs-modal-lightbox .sqs-modal-lightbox-content .lightbox-inner .lightbox-content .lightbox-close:before{font-family:'squarespace-ui-font';font-style:normal;speak:none;font-weight:normal;-webkit-font-smoothing:antialiased;content:"\e02e";text-align:center;display:inline-block;vertical-align:middle}.sqs-product-quick-view-lightbox.sqs-modal-lightbox .sqs-modal-lightbox-content .lightbox-inner .lightbox-content .lightbox-close:before{font-size:32px;width:32px;height:32px;line-height:32px}.sqs-product-quick-view-lightbox.sqs-modal-lightbox .sqs-modal-lightbox-content .lightbox-inner .lightbox-content .lightbox-close:before{font-size:42px;width:42px;height:42px;line-height:42px}.sqs-product-quick-view-lightbox.sqs-modal-lightbox .sqs-modal-lightbox-content .lightbox-inner .lightbox-content .lightbox-close:before{color:#fff;font-weight:lighter}.sqs-product-quick-view-lightbox.sqs-modal-lightbox~.sqs-widgets-confirmation{z-index:100000001}.sqs-product-quick-view-button{display:inline-block;width:auto;height:auto;padding:1em 2.5em;color:#fff;background-color:#272727;border-width:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:12px;line-height:1em;font-weight:normal;font-style:normal;text-transform:uppercase;letter-spacing:0px;text-align:center;text-decoration:none;cursor:pointer;outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;font-size:14px}.site-title-font{font-family:"proxima-nova","Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:600;font-style:normal;font-size:20px;letter-spacing:2px;text-transform:uppercase}.nav-font{font-family:"proxima-nova","Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:600;font-style:normal;font-size:14px;letter-spacing:1px;text-transform:uppercase;text-decoration:none}.nav-button-font{font-family:"proxima-nova","Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:700;font-style:normal;letter-spacing:1px;text-transform:uppercase;text-decoration:none}.banner-heading-font{font-family:"proxima-nova","Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:400;font-style:normal;font-size:48px;letter-spacing:0px;text-transform:none;line-height:1em}.banner-text-font{font-family:"proxima-nova","Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:400;font-style:normal;font-size:18px;letter-spacing:0px;text-transform:none;line-height:1.5em}.banner-button-font{font-family:"proxima-nova","Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:700;font-style:normal;font-size:16px;letter-spacing:1px;text-transform:uppercase;text-decoration:none}.body-font{font-family:"proxima-nova","Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:400;font-style:normal;font-size:16px;letter-spacing:0px;line-height:1.6em}.heading1-font{font-family:"proxima-nova","Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:400;font-style:normal;font-size:48px;letter-spacing:0px;text-transform:none;line-height:1.2em}.heading2-font{font-family:"proxima-nova","Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:400;font-style:normal;font-size:32px;letter-spacing:0px;text-transform:none;line-height:1.2em}.heading3-font{font-family:"proxima-nova","Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:400;font-style:normal;font-size:21px;letter-spacing:0px;text-transform:none;line-height:1.2em}.quote-font{font-family:Georgia,"Times New Roman",serif;font-weight:400;font-style:italic;font-size:27px;letter-spacing:0px;line-height:1.65em}.summary-heading-font{font-family:"proxima-nova","Helvetica Neue",Helvetica,Arial,sans-serif;font-style:normal;font-weight:400;letter-spacing:1px;text-transform:uppercase}.subnav-title-font{font-family:"proxima-nova","Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:700;font-style:normal;font-size:14px;letter-spacing:1px;text-transform:uppercase;text-decoration:none}.subnav-link-font{font-family:"proxima-nova","Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:400;font-style:normal;font-size:14px;letter-spacing:1px;text-transform:uppercase;text-decoration:none}.footer-nav-font{font-family:"proxima-nova","Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:400;font-style:normal;font-size:14px;letter-spacing:1px;text-transform:uppercase;text-decoration:none}.site-info-font{font-family:"proxima-nova","Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:600;font-style:normal;font-size:14px;letter-spacing:1px;text-transform:uppercase;text-decoration:none}html:not(.js) body[class^=collection-] img{max-width:100%}html:not(.js) body[class^=collection-] [href="#"]{display:none !important;visibility:hidden}.hidden{display:none !important;visibility:hidden}.visuallyhidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.visuallyhidden.focusable:active,.visuallyhidden.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.invisible{visibility:hidden}img[data-src]:not([src]){visibility:hidden}.full-image-float-left,.thumbnail-image-float-left{float:left;margin-right:1.5em}.full-image-float-right,.thumbnail-image-float-right{float:right;margin-left:1.5em}.full-image-block{display:block;margin-bottom:1.5em}.thumbnail-caption{display:block}.clearfix:before,.clearfix:after{content:" ";display:table}.clearfix:after{clear:both}@media print{*{background:transparent !important;color:#000 !important;box-shadow:none !important;text-shadow:none !important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="javascript:"]:after,a[href^="#"]:after{content:""}pre,blockquote{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}img{max-width:100% !important}@page {margin:.5cm}p,h2,h3{orphans:3;widows:3}h2,h3{page-break-after:avoid}}.border-box,.border-box:before,.border-box:after{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.header-anim 0%{opacity:0}.header-anim 72%{opacity:0}.header-anim 100%{opacity:1}@-webkit-keyframes header-anim{0%{opacity:0}72%{opacity:0}100%{opacity:1}}@keyframes header-anim{0%{opacity:0}72%{opacity:0}100%{opacity:1}}.feature-bg-anim 0%{opacity:0}.feature-bg-anim 50%{opacity:0}.feature-bg-anim 100%{opacity:1}@-webkit-keyframes feature-bg-anim{0%{opacity:0}50%{opacity:0}100%{opacity:1}}@keyframes feature-bg-anim{0%{opacity:0}50%{opacity:0}100%{opacity:1}}.feature-text-anim 0%{opacity:0;-webkit-transform:translate3d(0,10px,0);-moz-transform:translate3d(0,10px,0);-ms-transform:translate3d(0,10px,0);-o-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}.feature-text-anim 75%{opacity:0;-webkit-transform:translate3d(0,10px,0);-moz-transform:translate3d(0,10px,0);-ms-transform:translate3d(0,10px,0);-o-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}.feature-text-anim 100%{opacity:1;-webkit-transform:translate3d(0,0,0);-moz-transform:translate3d(0,0,0);-ms-transform:translate3d(0,0,0);-o-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}@-webkit-keyframes feature-text-anim{0%{opacity:0;-webkit-transform:translate3d(0,10px,0);-moz-transform:translate3d(0,10px,0);-ms-transform:translate3d(0,10px,0);-o-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}75%{opacity:0;-webkit-transform:translate3d(0,10px,0);-moz-transform:translate3d(0,10px,0);-ms-transform:translate3d(0,10px,0);-o-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}100%{opacity:1;-webkit-transform:translate3d(0,0,0);-moz-transform:translate3d(0,0,0);-ms-transform:translate3d(0,0,0);-o-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@keyframes feature-text-anim{0%{opacity:0;-webkit-transform:translate3d(0,10px,0);-moz-transform:translate3d(0,10px,0);-ms-transform:translate3d(0,10px,0);-o-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}75%{opacity:0;-webkit-transform:translate3d(0,10px,0);-moz-transform:translate3d(0,10px,0);-ms-transform:translate3d(0,10px,0);-o-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}100%{opacity:1;-webkit-transform:translate3d(0,0,0);-moz-transform:translate3d(0,0,0);-ms-transform:translate3d(0,0,0);-o-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.feature-text-anim-alt 0%{opacity:0;-webkit-transform:translate3d(-50%,-45%,0);-moz-transform:translate3d(-50%,-45%,0);-ms-transform:translate3d(-50%,-45%,0);-o-transform:translate3d(-50%,-45%,0);transform:translate3d(-50%,-45%,0)}.feature-text-anim-alt 67%{opacity:0;-webkit-transform:translate3d(-50%,-45%,0);-moz-transform:translate3d(-50%,-45%,0);-ms-transform:translate3d(-50%,-45%,0);-o-transform:translate3d(-50%,-45%,0);transform:translate3d(-50%,-45%,0)}.feature-text-anim-alt 100%{opacity:1;-webkit-transform:translate3d(-50%,-50%,0);-moz-transform:translate3d(-50%,-50%,0);-ms-transform:translate3d(-50%,-50%,0);-o-transform:translate3d(-50%,-50%,0);transform:translate3d(-50%,-50%,0)}@-webkit-keyframes feature-text-anim-alt{0%{opacity:0;-webkit-transform:translate3d(-50%,-45%,0);-moz-transform:translate3d(-50%,-45%,0);-ms-transform:translate3d(-50%,-45%,0);-o-transform:translate3d(-50%,-45%,0);transform:translate3d(-50%,-45%,0)}67%{opacity:0;-webkit-transform:translate3d(-50%,-45%,0);-moz-transform:translate3d(-50%,-45%,0);-ms-transform:translate3d(-50%,-45%,0);-o-transform:translate3d(-50%,-45%,0);transform:translate3d(-50%,-45%,0)}100%{opacity:1;-webkit-transform:translate3d(-50%,-50%,0);-moz-transform:translate3d(-50%,-50%,0);-ms-transform:translate3d(-50%,-50%,0);-o-transform:translate3d(-50%,-50%,0);transform:translate3d(-50%,-50%,0)}}@keyframes feature-text-anim-alt{0%{opacity:0;-webkit-transform:translate3d(-50%,-45%,0);-moz-transform:translate3d(-50%,-45%,0);-ms-transform:translate3d(-50%,-45%,0);-o-transform:translate3d(-50%,-45%,0);transform:translate3d(-50%,-45%,0)}67%{opacity:0;-webkit-transform:translate3d(-50%,-45%,0);-moz-transform:translate3d(-50%,-45%,0);-ms-transform:translate3d(-50%,-45%,0);-o-transform:translate3d(-50%,-45%,0);transform:translate3d(-50%,-45%,0)}100%{opacity:1;-webkit-transform:translate3d(-50%,-50%,0);-moz-transform:translate3d(-50%,-50%,0);-ms-transform:translate3d(-50%,-50%,0);-o-transform:translate3d(-50%,-50%,0);transform:translate3d(-50%,-50%,0)}}*::selection{background-color:#000;color:#fff}body{background-color:#29292d}#siteWrapper{font-family:"proxima-nova","Helvetica Neue",Helvetica,Arial,sans-serif;line-height:1.6em;font-family:"adelle-sans";font-size:16px;line-height:1.7em;letter-spacing:0px;font-weight:400;font-style:normal;color:rgba(13,13,13,.7)}.sqs-modal-lightbox-content .lightbox-inner .lightbox-content .form-wrapper{font-family:"proxima-nova","Helvetica Neue",Helvetica,Arial,sans-serif;line-height:1.6em;font-family:"adelle-sans";font-size:16px;line-height:1.7em;letter-spacing:0px;font-weight:400;font-style:normal}.html-block a:not(.sqs-block-button-element),.markdown-block a:not(.sqs-block-button-element),.entry-more-link a:not(.sqs-block-button-element),.twitter-block a:not(.sqs-block-button-element),.foursquare-block a:not(.sqs-block-button-element),.rss-block a:not(.sqs-block-button-element),.layout-caption-below .image-caption a:not(.sqs-block-button-element),.summary-excerpt a:not(.sqs-block-button-element),.album-description a:not(.sqs-block-button-element),.product-excerpt a:not(.sqs-block-button-element),.product-description a:not(.sqs-block-button-element),.eventlist-excerpt a:not(.sqs-block-button-element),.html-block a:not(.sqs-block-button-element):visited,.markdown-block a:not(.sqs-block-button-element):visited,.entry-more-link a:not(.sqs-block-button-element):visited,.twitter-block a:not(.sqs-block-button-element):visited,.foursquare-block a:not(.sqs-block-button-element):visited,.rss-block a:not(.sqs-block-button-element):visited,.layout-caption-below .image-caption a:not(.sqs-block-button-element):visited,.summary-excerpt a:not(.sqs-block-button-element):visited,.album-description a:not(.sqs-block-button-element):visited,.product-excerpt a:not(.sqs-block-button-element):visited,.product-description a:not(.sqs-block-button-element):visited,.eventlist-excerpt a:not(.sqs-block-button-element):visited{color:#3d9991;text-decoration:none}a{text-decoration:none;color:rgba(13,13,13,.7)}.sqs-lightbox-meta a{color:inherit;text-decoration:underline}h1,h2,h3{text-rendering:optimizeLegibility}article header h1 a{color:rgba(26,26,26,.9)}h1,.entry-title{font-family:"proxima-nova","Helvetica Neue",Helvetica,Arial,sans-serif;font-size:48px;font-family:"adelle-sans";font-size:32px;line-height:1.2em;text-transform:none;letter-spacing:0px;font-weight:400;font-style:normal}h1,.entry-title{color:rgba(26,26,26,.9)}h2{font-family:"proxima-nova","Helvetica Neue",Helvetica,Arial,sans-serif;font-size:32px;letter-spacing:0px;text-transform:none;font-family:"proxima-nova";font-size:22px;line-height:1.2em;text-transform:uppercase;letter-spacing:2px;font-weight:400;font-style:normal}h2,.summary-title a{color:#4a4a4a}h3{font-family:"proxima-nova","Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:400;font-size:21px;letter-spacing:0px;text-transform:none;line-height:1.2em;font-family:"proxima-nova";font-size:16px;line-height:1em;text-transform:uppercase;letter-spacing:1px;font-weight:600;font-style:normal}h3{color:rgba(26,26,26,.9)}h1,h2,h3,.entry-title{margin:1em 0 .5em}h1:first-child,h2:first-child,h3:first-child,.entry-title:first-child{margin-top:0}blockquote{margin:0;padding:.5em 2.5em;font-style:italic}.entry-actions,.entry-comments,.eventitem-addtocallinks,.album-info .engagement,.entry-dateline,.entry-byline,.entry-morefrom,.entry-tags,.entry-source,.eventitem-backlink,.sqs-audio-playlist .tracks .track-info .artist,.summary-info-item{color:rgba(26,26,26,.4)}.entry-actions a,.entry-comments a,.eventitem-addtocallinks a,.album-info .engagement a,.entry-dateline a,.entry-byline a,.entry-morefrom a,.entry-tags a,.entry-source a,.eventitem-backlink a,.sqs-audio-playlist .tracks .track-info .artist a,.summary-info-item a{color:rgba(26,26,26,.4)}.sqs-block-summary-v2 .summary-info-item{opacity:1}.comment-count{font-family:"proxima-nova","Helvetica Neue",Helvetica,Arial,sans-serif;line-height:1.6em;font-family:"adelle-sans";font-size:16px;line-height:1.7em;letter-spacing:0px;font-weight:400;font-style:normal;color:rgba(13,13,13,.7)}.quote-block figure{font-family:Georgia,"Times New Roman",serif;font-style:italic;font-size:27px;font-family:"adobe-garamond-pro";font-size:20px;line-height:1.65em;letter-spacing:0px;font-weight:400;font-style:normal;color:rgba(26,26,26,.9);padding:32px 32px 0;text-align:center;margin:0}.quote-block blockquote{padding:0;border-left-width:0;font-style:inherit}.quote-block blockquote>span:first-child{font-size:4em;display:block;opacity:.3}.quote-block blockquote>span:last-child{display:none}.quote-block .source{font-size:.875em;padding-top:1em;opacity:.5;text-align:center}.sqs-block-horizontalrule hr{border-style:none;border-width:0;margin:32px 0;color:rgba(13,13,13,.15);background-color:rgba(13,13,13,.15)}#preFooter .sqs-block-horizontalrule hr{color:rgba(255,255,255,.15);background-color:rgba(255,255,255,.15)}#footer .sqs-block-horizontalrule hr{color:rgba(255,255,255,.15);background-color:rgba(255,255,255,.15)}#siteWrapper{position:relative;padding:0;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}#siteWrapper{background-color:#fff}.sqs-cart-dropzone .sqs-pill-shopping-cart{z-index:9999}@media screen and (min-width:641px){.sqs-cart-dropzone{position:absolute;top:100px;right:20px;width:auto;max-width:282px;z-index:999}}.category-nav .nav-section-label,.folder-nav .nav-section-label{font-family:"proxima-nova","Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:700;font-size:14px;letter-spacing:1px;text-transform:uppercase;font-family:"adobe-garamond-pro";font-size:22px;text-transform:none;text-decoration:none;letter-spacing:0px;font-weight:400;font-style:normal;line-height:1.2em;color:#00746b;margin-bottom:.5em}.category-nav a,.folder-nav a,.category-nav a:visited,.folder-nav a:visited{font-family:"proxima-nova","Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:400;letter-spacing:1px;font-family:"proxima-nova";font-size:14px;text-transform:uppercase;text-decoration:none;letter-spacing:2px;font-weight:600;font-style:normal;color:rgba(26,26,26,.4);line-height:1.25em;display:block;padding:0 0 .75em}.category-nav a:hover,.folder-nav a:hover,.category-nav a:visited:hover,.folder-nav a:visited:hover{color:#1a1a1a}.category-nav li.active-link:not(.all) a,.folder-nav li.active-link:not(.all) a,.category-nav li.active-link:not(.all) a:visited,.folder-nav li.active-link:not(.all) a:visited{color:#1a1a1a}.view-list #categoryNav ul li.active-link.all a,.view-list #categoryNav ul li.active-link.all a:visited{color:#1a1a1a}.header-inner,.footer-inner,.pre-footer-inner{width:auto;margin:auto;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.footer-inner,.pre-footer-inner{max-width:1020px}#header{padding:0 20px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;z-index:1000;top:0;left:0;width:100%;line-height:1em;background-color:#212121;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;position:relative}#header a{text-decoration:none}#header #siteTitle{position:relative;z-index:1000}.header-inner,.footer-inner,.pre-footer-inner .sqs-layout{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.header-inner{padding:20px 0;display:table;width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-animation:header-anim 1s ease-in-out;animation:header-anim 1s ease-in-out}.footer-inner{padding:64px 32px}.pre-footer-inner .sqs-layout{padding:32px}.pre-footer-inner .sqs-layout.empty{padding:0 32px}body:not(.sqs-edit-mode) .pre-footer-inner .sqs-layout.empty{max-height:0}.transparent-header #header{background-color:transparent;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;position:absolute}body:not(.has-banner-image).transparent-header #header,.collection-type-gallery.has-banner-image.transparent-header #header{background-color:#212121;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;position:relative}#preFooter{background-color:#fff;-moz-osx-font-smoothing:auto;-webkit-font-smoothing:subpixel-antialiased}#preFooter{color:rgba(255,255,255,.7)}#preFooter h1,#preFooter h2,#preFooter h3{color:rgba(255,255,255,.7)}.pre-footer-inner{-webkit-transition:all .25s ease-in-out .1s;-moz-transition:all .25s ease-in-out .1s;-ms-transition:all .25s ease-in-out .1s;-o-transition:all .25s ease-in-out .1s;transition:all .25s ease-in-out .1s}.pre-footer-inner a:not(.sqs-block-button-element):not(.sqs-svg-icon--wrapper),.pre-footer-inner a:visited:not(.sqs-block-button-element):not(.sqs-svg-icon--wrapper){color:rgba(255,255,255,.7);border-bottom:1px solid rgba(255,255,255,.7)}.pre-footer-inner .social-account-list a,.pre-footer-inner .social-account-list a:visited{text-decoration:none;border:none}.unscrolled .pre-footer-inner{opacity:0;-webkit-transform:translate3d(0,12px,0);-moz-transform:translate3d(0,12px,0);-ms-transform:translate3d(0,12px,0);-o-transform:translate3d(0,12px,0);transform:translate3d(0,12px,0)}#footer{background-color:#29292d;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}#footer .html-block a,#footer .html-block a:visited{color:rgba(255,255,255,.8);border-bottom:1px solid rgba(255,255,255,.8)}#footer nav:not(.social-account-list){font-family:"proxima-nova","Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;letter-spacing:1px;font-family:"proxima-nova";font-size:13px;text-transform:uppercase;text-decoration:none;letter-spacing:2px;font-weight:400;font-style:normal}#footer nav:not(.social-account-list) a,#footer nav:not(.social-account-list) a:visited,#footer nav:not(.social-account-list) label{text-decoration:none;line-height:1.25em;color:#fff;border:none}#footer nav:not(.social-account-list) a.active,#footer nav:not(.social-account-list) a:visited.active,#footer nav:not(.social-account-list) label.active,#footer nav:not(.social-account-list) a:hover,#footer nav:not(.social-account-list) a:visited:hover,#footer nav:not(.social-account-list) label:hover{color:#fff}#footer .folder .subnav{background-color:#29292d}#footer{color:rgba(255,255,255,.8)}#footer h1,#footer h2,#footer h3{color:rgba(255,255,255,.8)}#page{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;width:auto;margin:auto;max-width:1020px;padding:96px 32px;-moz-osx-font-smoothing:auto;-webkit-font-smoothing:subpixel-antialiased}#content{width:100%;display:block}.collection-type-page #content{margin:auto}#folderNav,#categoryNav,#rightSidebar{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;width:26.5625%;width:calc(255px - 0%);display:inline-block;vertical-align:top}#folderNav,#categoryNav{padding-right:64px}li.filter{display:none;visibility:hidden}#rightSidebar{padding-left:64px;font-size:.85em}.collection-type-blog #content{width:73.4375%;width:calc(100% - 255px);display:inline-block;vertical-align:top}.collection-type-page:not(.hide-page-sidebar) #folderNav+#content,.collection-type-products:not(.hide-products-sidebar) #folderNav+#content,.collection-type-page:not(.hide-page-sidebar) #categoryNav+#content,.collection-type-products:not(.hide-products-sidebar) #categoryNav+#content{width:73.4375%;width:calc(100% - 255px);display:inline-block;vertical-align:top}@media only screen and (min-width:641px){#header{width:100%}#header #logoWrapper,#header #siteTitleWrapper,#header #headerNav{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;display:table-cell;vertical-align:middle}#header #mainNavWrapper{position:relative;z-index:1000}#header #headerNav{text-align:right}#header #logoWrapper,#header #logoImage{width:140px}#header #siteTitleWrapper,#header #siteTitle{width:165px}#header.tweaking #logoWrapper,#header.tweaking #siteTitleWrapper,#header.tweaking #mainNavWrapper{border:1px solid #14aaff}}#logoImage{margin:0;font-size:0;max-width:100%}#logoImage a{display:block}#logoImage img{height:auto;max-height:100px;width:auto;max-width:100%}#siteTitle,#siteTitle a{font-family:"proxima-nova","Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:600;font-size:20px;letter-spacing:2px;text-transform:uppercase;font-family:"proxima-nova";font-size:27px;text-transform:none;letter-spacing:0px;font-weight:300;font-style:normal;color:#1fd699;margin:0;padding-top:0;padding-bottom:0;line-height:1em}.hide-page-sidebar #folderNav{display:none}.hide-page-sidebar #folderNav+#content{display:block}.hide-products-sidebar #categoryNav{display:none}.hide-products-sidebar #categoryNav+#content{display:block}.hide-sidebar-title .category-nav .nav-section-label,.hide-sidebar-title .folder-nav .nav-section-label{display:none}.collection-type-page.has-promoted-gallery #promotedGalleryWrapper .sqs-block,.collection-type-index.has-promoted-gallery #promotedGalleryWrapper .sqs-block,.collection-type-page.has-promoted-gallery .promoted-gallery-wrapper .sqs-block,.collection-type-index.has-promoted-gallery .promoted-gallery-wrapper .sqs-block{padding:0 !important}.collection-type-page.has-promoted-gallery #promotedGalleryWrapper .sqs-gallery-block-slideshow,.collection-type-index.has-promoted-gallery #promotedGalleryWrapper .sqs-gallery-block-slideshow,.collection-type-page.has-promoted-gallery .promoted-gallery-wrapper .sqs-gallery-block-slideshow,.collection-type-index.has-promoted-gallery .promoted-gallery-wrapper .sqs-gallery-block-slideshow{width:100%;height:600px !important;max-width:100%;margin:0;padding:0;opacity:1}.collection-type-page.has-promoted-gallery #promotedGalleryWrapper .sqs-gallery-block-slideshow .sqs-gallery,.collection-type-index.has-promoted-gallery #promotedGalleryWrapper .sqs-gallery-block-slideshow .sqs-gallery,.collection-type-page.has-promoted-gallery .promoted-gallery-wrapper .sqs-gallery-block-slideshow .sqs-gallery,.collection-type-index.has-promoted-gallery .promoted-gallery-wrapper .sqs-gallery-block-slideshow .sqs-gallery{width:100%;height:600px !important;max-width:100%}.collection-type-page.has-promoted-gallery.transparent-header #promotedGalleryWrapper .sqs-gallery-block-slideshow,.collection-type-index.has-promoted-gallery.transparent-header #promotedGalleryWrapper .sqs-gallery-block-slideshow,.collection-type-page.has-promoted-gallery.transparent-header .promoted-gallery-wrapper .sqs-gallery-block-slideshow,.collection-type-index.has-promoted-gallery.transparent-header .promoted-gallery-wrapper .sqs-gallery-block-slideshow{height:700px !important}.collection-type-page.has-promoted-gallery.transparent-header #promotedGalleryWrapper .sqs-gallery-block-slideshow .sqs-gallery,.collection-type-index.has-promoted-gallery.transparent-header #promotedGalleryWrapper .sqs-gallery-block-slideshow .sqs-gallery,.collection-type-page.has-promoted-gallery.transparent-header .promoted-gallery-wrapper .sqs-gallery-block-slideshow .sqs-gallery,.collection-type-index.has-promoted-gallery.transparent-header .promoted-gallery-wrapper .sqs-gallery-block-slideshow .sqs-gallery{height:700px !important}.collection-type-page.has-promoted-gallery.collection-type-index.transparent-header .index-section:not(:first-of-type) #promotedGalleryWrapper .sqs-gallery-block-slideshow,.collection-type-index.has-promoted-gallery.collection-type-index.transparent-header .index-section:not(:first-of-type) #promotedGalleryWrapper .sqs-gallery-block-slideshow,.collection-type-page.has-promoted-gallery.collection-type-index.transparent-header .index-section:not(:first-of-type) .promoted-gallery-wrapper .sqs-gallery-block-slideshow,.collection-type-index.has-promoted-gallery.collection-type-index.transparent-header .index-section:not(:first-of-type) .promoted-gallery-wrapper .sqs-gallery-block-slideshow{height:600px !important}.collection-type-page.has-promoted-gallery.collection-type-index.transparent-header .index-section:not(:first-of-type) #promotedGalleryWrapper .sqs-gallery-block-slideshow .sqs-gallery,.collection-type-index.has-promoted-gallery.collection-type-index.transparent-header .index-section:not(:first-of-type) #promotedGalleryWrapper .sqs-gallery-block-slideshow .sqs-gallery,.collection-type-page.has-promoted-gallery.collection-type-index.transparent-header .index-section:not(:first-of-type) .promoted-gallery-wrapper .sqs-gallery-block-slideshow .sqs-gallery,.collection-type-index.has-promoted-gallery.collection-type-index.transparent-header .index-section:not(:first-of-type) .promoted-gallery-wrapper .sqs-gallery-block-slideshow .sqs-gallery{height:600px !important}.collection-type-page.has-promoted-gallery.loading #promotedGalleryWrapper .sqs-gallery-block-slideshow,.collection-type-index.has-promoted-gallery.loading #promotedGalleryWrapper .sqs-gallery-block-slideshow,.collection-type-page.has-promoted-gallery.loading .promoted-gallery-wrapper .sqs-gallery-block-slideshow,.collection-type-index.has-promoted-gallery.loading .promoted-gallery-wrapper .sqs-gallery-block-slideshow{opacity:0}.collection-type-page.has-promoted-gallery .banner-thumbnail-wrapper,.collection-type-index.has-promoted-gallery .promoted-full~.banner-thumbnail-wrapper{display:none}.collection-type-page.has-promoted-gallery .sqs-gallery-meta-container .sqs-gallery-controls .previous,.collection-type-index.has-promoted-gallery .sqs-gallery-meta-container .sqs-gallery-controls .previous,.collection-type-page.has-promoted-gallery .sqs-gallery-meta-container .sqs-gallery-controls .next,.collection-type-index.has-promoted-gallery .sqs-gallery-meta-container .sqs-gallery-controls .next{background-color:transparent}.collection-type-page.has-promoted-gallery .sqs-gallery-meta-container .sqs-gallery-controls .previous:hover,.collection-type-index.has-promoted-gallery .sqs-gallery-meta-container .sqs-gallery-controls .previous:hover,.collection-type-page.has-promoted-gallery .sqs-gallery-meta-container .sqs-gallery-controls .next:hover,.collection-type-index.has-promoted-gallery .sqs-gallery-meta-container .sqs-gallery-controls .next:hover{background-color:transparent}.banner-slideshow-controls-none .sqs-gallery-meta-container .sqs-gallery-controls .previous,.banner-slideshow-controls-none .sqs-gallery-meta-container .sqs-gallery-controls .next{display:none}.collection-type-page.has-promoted-gallery #promotedGalleryWrapper .sqs-gallery-thumbnails,.collection-type-index.has-promoted-gallery #promotedGalleryWrapper .sqs-gallery-thumbnails,.collection-type-page.has-promoted-gallery .promoted-gallery-wrapper .sqs-gallery-thumbnails,.collection-type-index.has-promoted-gallery .promoted-gallery-wrapper .sqs-gallery-thumbnails{display:none;height:0;padding:0;margin:0}.has-promoted-gallery .promoted-gallery-wrapper [data-type="video"] .meta{display:none}.has-promoted-gallery #promotedGalleryWrapper .sqs-gallery-block-slideshow.sqs-gallery-block-meta-position-bottom .meta,.has-promoted-gallery .promoted-gallery-wrapper .sqs-gallery-block-slideshow.sqs-gallery-block-meta-position-bottom .meta,.has-promoted-gallery #promotedGalleryWrapper .sqs-gallery-block-slideshow.sqs-gallery-block-meta-position-top .meta,.has-promoted-gallery .promoted-gallery-wrapper .sqs-gallery-block-slideshow.sqs-gallery-block-meta-position-top .meta,.has-promoted-gallery #promotedGalleryWrapper .sqs-gallery-block-slideshow.sqs-gallery-block-meta-position-top-left .meta,.has-promoted-gallery .promoted-gallery-wrapper .sqs-gallery-block-slideshow.sqs-gallery-block-meta-position-top-left .meta,.has-promoted-gallery #promotedGalleryWrapper .sqs-gallery-block-slideshow.sqs-gallery-block-meta-position-center .meta,.has-promoted-gallery .promoted-gallery-wrapper .sqs-gallery-block-slideshow.sqs-gallery-block-meta-position-center .meta,.has-promoted-gallery #promotedGalleryWrapper .sqs-gallery-block-slideshow.sqs-gallery-block-meta-position-bottom-left .meta,.has-promoted-gallery .promoted-gallery-wrapper .sqs-gallery-block-slideshow.sqs-gallery-block-meta-position-bottom-left .meta,.has-promoted-gallery #promotedGalleryWrapper .sqs-gallery-block-slideshow.sqs-gallery-block-meta-position-bottom-right .meta,.has-promoted-gallery .promoted-gallery-wrapper .sqs-gallery-block-slideshow.sqs-gallery-block-meta-position-bottom-right .meta,.has-promoted-gallery #promotedGalleryWrapper .sqs-gallery-block-slideshow.sqs-gallery-block-meta-position-top-right .meta,.has-promoted-gallery .promoted-gallery-wrapper .sqs-gallery-block-slideshow.sqs-gallery-block-meta-position-top-right .meta{left:50% !important;top:50% !important;-webkit-transform:translate(-50%,-45%) !important;-moz-transform:translate(-50%,-45%) !important;-ms-transform:translate(-50%,-45%) !important;-o-transform:translate(-50%,-45%) !important;transform:translate(-50%,-45%) !important;-webkit-transition:all .25s ease-in-out .3s;-moz-transition:all .25s ease-in-out .3s;-ms-transition:all .25s ease-in-out .3s;-o-transition:all .25s ease-in-out .3s;transition:all .25s ease-in-out .3s;opacity:0;margin:0 !important}.has-promoted-gallery #promotedGalleryWrapper .sqs-gallery-block-slideshow.sqs-gallery-block-meta-position-bottom .sqs-active-slide.loaded .meta,.has-promoted-gallery .promoted-gallery-wrapper .sqs-gallery-block-slideshow.sqs-gallery-block-meta-position-bottom .sqs-active-slide.loaded .meta,.has-promoted-gallery #promotedGalleryWrapper .sqs-gallery-block-slideshow.sqs-gallery-block-meta-position-top .sqs-active-slide.loaded .meta,.has-promoted-gallery .promoted-gallery-wrapper .sqs-gallery-block-slideshow.sqs-gallery-block-meta-position-top .sqs-active-slide.loaded .meta,.has-promoted-gallery #promotedGalleryWrapper .sqs-gallery-block-slideshow.sqs-gallery-block-meta-position-top-left .sqs-active-slide.loaded .meta,.has-promoted-gallery .promoted-gallery-wrapper .sqs-gallery-block-slideshow.sqs-gallery-block-meta-position-top-left .sqs-active-slide.loaded .meta,.has-promoted-gallery #promotedGalleryWrapper .sqs-gallery-block-slideshow.sqs-gallery-block-meta-position-center .sqs-active-slide.loaded .meta,.has-promoted-gallery .promoted-gallery-wrapper .sqs-gallery-block-slideshow.sqs-gallery-block-meta-position-center .sqs-active-slide.loaded .meta,.has-promoted-gallery #promotedGalleryWrapper .sqs-gallery-block-slideshow.sqs-gallery-block-meta-position-bottom-left .sqs-active-slide.loaded .meta,.has-promoted-gallery .promoted-gallery-wrapper .sqs-gallery-block-slideshow.sqs-gallery-block-meta-position-bottom-left .sqs-active-slide.loaded .meta,.has-promoted-gallery #promotedGalleryWrapper .sqs-gallery-block-slideshow.sqs-gallery-block-meta-position-bottom-right .sqs-active-slide.loaded .meta,.has-promoted-gallery .promoted-gallery-wrapper .sqs-gallery-block-slideshow.sqs-gallery-block-meta-position-bottom-right .sqs-active-slide.loaded .meta,.has-promoted-gallery #promotedGalleryWrapper .sqs-gallery-block-slideshow.sqs-gallery-block-meta-position-top-right .sqs-active-slide.loaded .meta,.has-promoted-gallery .promoted-gallery-wrapper .sqs-gallery-block-slideshow.sqs-gallery-block-meta-position-top-right .sqs-active-slide.loaded .meta{-webkit-transform:translate(-50%,-50%) !important;-moz-transform:translate(-50%,-50%) !important;-ms-transform:translate(-50%,-50%) !important;-o-transform:translate(-50%,-50%) !important;transform:translate(-50%,-50%) !important;opacity:1}.has-promoted-gallery #promotedGalleryWrapper .sqs-gallery-block-slideshow .hide-body-text .meta .meta-description p,.has-promoted-gallery .promoted-gallery-wrapper .sqs-gallery-block-slideshow .hide-body-text .meta .meta-description p{width:100%;visibility:hidden;line-height:0 !important;margin:0 auto}.has-promoted-gallery #promotedGalleryWrapper .sqs-gallery-block-slideshow .hide-body-text .meta .meta-description p:first-child>strong,.has-promoted-gallery .promoted-gallery-wrapper .sqs-gallery-block-slideshow .hide-body-text .meta .meta-description p:first-child>strong{margin-top:0 !important}.has-promoted-gallery #promotedGalleryWrapper .sqs-gallery-block-slideshow .hide-body-text .meta .meta-description p>strong,.has-promoted-gallery .promoted-gallery-wrapper .sqs-gallery-block-slideshow .hide-body-text .meta .meta-description p>strong,.has-promoted-gallery #promotedGalleryWrapper .sqs-gallery-block-slideshow .hide-body-text .meta .meta-description p>em>strong,.has-promoted-gallery .promoted-gallery-wrapper .sqs-gallery-block-slideshow .hide-body-text .meta .meta-description p>em>strong{visibility:visible;line-height:1em !important;margin:20px auto}.has-promoted-gallery #promotedGalleryWrapper .sqs-gallery-block-slideshow .hide-body-text .meta .meta-description p>em>strong,.has-promoted-gallery .promoted-gallery-wrapper .sqs-gallery-block-slideshow .hide-body-text .meta .meta-description p>em>strong{font-style:italic}.has-promoted-gallery #promotedGalleryWrapper .sqs-gallery-block-slideshow .hide-body-text .meta .meta-description p:last-child>a,.has-promoted-gallery .promoted-gallery-wrapper .sqs-gallery-block-slideshow .hide-body-text .meta .meta-description p:last-child>a{visibility:visible;line-height:1em !important}.has-promoted-gallery #promotedGalleryWrapper .sqs-gallery-block-slideshow .meta,.has-promoted-gallery .promoted-gallery-wrapper .sqs-gallery-block-slideshow .meta{text-align:center;background-color:transparent !important;background:none !important;margin:0;z-index:100;height:auto !important;overflow-y:visible !important;text-rendering:optimizeLegibility}.has-promoted-gallery #promotedGalleryWrapper .sqs-gallery-block-slideshow .meta .meta-inside,.has-promoted-gallery .promoted-gallery-wrapper .sqs-gallery-block-slideshow .meta .meta-inside{padding:0 32px}.has-promoted-gallery #promotedGalleryWrapper .sqs-gallery-block-slideshow .meta .meta-title,.has-promoted-gallery .promoted-gallery-wrapper .sqs-gallery-block-slideshow .meta .meta-title{display:none;margin:0;padding:0}.has-promoted-gallery #promotedGalleryWrapper .sqs-gallery-block-slideshow .meta .meta-description p,.has-promoted-gallery .promoted-gallery-wrapper .sqs-gallery-block-slideshow .meta .meta-description p{font-family:"proxima-nova","Helvetica Neue",Helvetica,Arial,sans-serif;font-size:18px;letter-spacing:0px;line-height:1.5em;font-family:"camingodos-web";font-size:49px;line-height:1em;text-transform:none;letter-spacing:1px;font-weight:400;font-style:normal;color:#fff;margin:20px auto;width:700px !important}.has-promoted-gallery #promotedGalleryWrapper .sqs-gallery-block-slideshow .meta .meta-description p>strong,.has-promoted-gallery .promoted-gallery-wrapper .sqs-gallery-block-slideshow .meta .meta-description p>strong,.has-promoted-gallery #promotedGalleryWrapper .sqs-gallery-block-slideshow .meta .meta-description p>em>strong,.has-promoted-gallery .promoted-gallery-wrapper .sqs-gallery-block-slideshow .meta .meta-description p>em>strong{display:block;font-family:"proxima-nova","Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:400;font-size:48px;letter-spacing:0px;font-family:"adelle-sans";font-size:41px;line-height:1em;text-transform:none;letter-spacing:4px;font-weight:100;font-style:normal;color:#fff}.has-promoted-gallery #promotedGalleryWrapper .sqs-gallery-block-slideshow .meta .meta-description p>em>strong,.has-promoted-gallery .promoted-gallery-wrapper .sqs-gallery-block-slideshow .meta .meta-description p>em>strong{font-style:italic}.has-promoted-gallery #promotedGalleryWrapper .sqs-gallery-block-slideshow .meta .meta-description p:last-child>a,.has-promoted-gallery .promoted-gallery-wrapper .sqs-gallery-block-slideshow .meta .meta-description p:last-child>a{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:"proxima-nova","Helvetica Neue",Helvetica,Arial,sans-serif;font-size:16px;letter-spacing:1px;font-family:"proxima-nova";font-size:20px;text-transform:uppercase;letter-spacing:2px;font-weight:700;font-style:normal;text-decoration:none;padding:1em 1.75em;display:inline-block;line-height:1em;margin:10px auto;color:#29292d}.has-promoted-gallery #promotedGalleryWrapper .sqs-gallery-block-slideshow .meta .meta-description p:last-child>a,.has-promoted-gallery .promoted-gallery-wrapper .sqs-gallery-block-slideshow .meta .meta-description p:last-child>a{background-color:#23c890;-webkit-transition:background-color .1s 0s ease-in-out,color .1s 0s ease-in-out;-moz-transition:background-color .1s 0s ease-in-out,color .1s 0s ease-in-out;-ms-transition:background-color .1s 0s ease-in-out,color .1s 0s ease-in-out;-o-transition:background-color .1s 0s ease-in-out,color .1s 0s ease-in-out;transition:background-color .1s 0s ease-in-out,color .1s 0s ease-in-out}.has-promoted-gallery #promotedGalleryWrapper .sqs-gallery-block-slideshow .meta .meta-description p:last-child>a:hover,.has-promoted-gallery .promoted-gallery-wrapper .sqs-gallery-block-slideshow .meta .meta-description p:last-child>a:hover{background-color:rgba(35,200,144,.8)}.has-promoted-gallery #promotedGalleryWrapper .sqs-gallery-block-slideshow .meta .meta-description p:empty,.has-promoted-gallery .promoted-gallery-wrapper .sqs-gallery-block-slideshow .meta .meta-description p:empty{display:none}.transparent-header.has-promoted-gallery #promotedGalleryWrapper .sqs-gallery-block-slideshow .meta,.transparent-header.has-promoted-gallery .promoted-gallery-wrapper .sqs-gallery-block-slideshow .meta{padding-top:25px}.collection-type-index.transparent-header.has-promoted-gallery .index-section:not(:first-of-type) #promotedGalleryWrapper .sqs-gallery-block-slideshow .meta,.collection-type-index.transparent-header.has-promoted-gallery .index-section:not(:first-of-type) .promoted-gallery-wrapper .sqs-gallery-block-slideshow .meta{padding-top:0}.has-promoted-gallery #promotedGalleryWrapper .sqs-gallery-block-slideshow .meta,.has-promoted-gallery .promoted-gallery-wrapper .sqs-gallery-block-slideshow .meta{max-width:100% !important;width:1084px !important;bottom:auto}.sqs-featured-posts-gallery .title-desc-wrapper{max-width:100% !important;width:1084px !important;text-align:center}#promotedGalleryWrapper,.promoted-gallery-wrapper,.banner-thumbnail-wrapper,.sqs-featured-posts-gallery{background-color:#001a16;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}#promotedGalleryWrapper .color-overlay,.promoted-gallery-wrapper .color-overlay,.banner-thumbnail-wrapper .color-overlay,.sqs-featured-posts-gallery .color-overlay{position:absolute;top:0;right:0;bottom:0;left:0;background-color:rgba(0,26,22,.5);z-index:99}.collection-type-blog .no-main-image .color-overlay{background-color:#001a16}.banner-thumbnail-wrapper{position:relative;overflow:hidden;min-height:320px;width:100%}.view-list .banner-thumbnail-wrapper,.collection-type-page .banner-thumbnail-wrapper,.collection-type-index .banner-thumbnail-wrapper{min-height:0;padding:130px 0}.transparent-header.view-list .banner-thumbnail-wrapper,.transparent-header.collection-type-page .banner-thumbnail-wrapper{padding:180px 0 155px}.collection-type-index.transparent-header.view-list .index-section:not(:first-of-type) .banner-thumbnail-wrapper,.collection-type-index.transparent-header.collection-type-page .index-section:not(:first-of-type) .banner-thumbnail-wrapper{padding:130px 0}#thumbnail{position:absolute;top:0;left:0;bottom:0;right:0;-webkit-animation:feature-bg-anim .6s ease-in-out;animation:feature-bg-anim .6s ease-in-out}.desc-wrapper{-webkit-animation:feature-text-anim .75s ease-in-out;animation:feature-text-anim .75s ease-in-out;z-index:100;position:relative;width:100%;max-width:956px;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;margin:0 auto;padding:32px;text-align:center;text-rendering:optimizeLegibility}.desc-wrapper p{font-family:"proxima-nova","Helvetica Neue",Helvetica,Arial,sans-serif;font-size:18px;letter-spacing:0px;line-height:1.5em;font-family:"camingodos-web";font-size:49px;line-height:1em;text-transform:none;letter-spacing:1px;font-weight:400;font-style:normal;color:#fff;margin:20px auto;-webkit-transform:translatez(0)}.desc-wrapper p a{color:#fff;border-bottom:1px solid #fff}.desc-wrapper p>strong,.desc-wrapper p>em>strong{display:block;font-family:"proxima-nova","Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:400;font-size:48px;letter-spacing:0px;font-family:"adelle-sans";font-size:41px;line-height:1em;text-transform:none;letter-spacing:4px;font-weight:100;font-style:normal;color:#fff}.desc-wrapper p>em>strong{font-style:italic}.desc-wrapper p:last-child>a{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:"proxima-nova","Helvetica Neue",Helvetica,Arial,sans-serif;font-size:16px;letter-spacing:1px;font-family:"proxima-nova";font-size:20px;text-transform:uppercase;letter-spacing:2px;font-weight:700;font-style:normal;text-decoration:none;padding:1em 1.75em;background-color:#23c890;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:inline-block;line-height:1em;margin:10px 0;color:#29292d;border:none;-webkit-transition:background-color .1s 0s ease-in-out,color .1s 0s ease-in-out;-moz-transition:background-color .1s 0s ease-in-out,color .1s 0s ease-in-out;-ms-transition:background-color .1s 0s ease-in-out,color .1s 0s ease-in-out;-o-transition:background-color .1s 0s ease-in-out,color .1s 0s ease-in-out;transition:background-color .1s 0s ease-in-out,color .1s 0s ease-in-out}.desc-wrapper p:last-child>a:hover{background-color:rgba(35,200,144,.8)}.desc-wrapper p:last-child>a+a{margin-left:1em}.desc-wrapper p:empty{display:none}body:not(.collection-type-gallery).banner-button-style-outline .desc-wrapper p:last-child>a,body:not(.collection-type-gallery).banner-button-style-outline.has-promoted-gallery #promotedGalleryWrapper .sqs-gallery-block-slideshow .meta-description p:last-child>a,body:not(.collection-type-gallery).banner-button-style-outline.has-promoted-gallery .promoted-gallery-wrapper .sqs-gallery-block-slideshow .meta-description p:last-child>a{background-color:transparent;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;border:2px solid #23c890 !important;color:#23c890}body:not(.collection-type-gallery).banner-button-style-outline .desc-wrapper p:last-child>a:hover,body:not(.collection-type-gallery).banner-button-style-outline.has-promoted-gallery #promotedGalleryWrapper .sqs-gallery-block-slideshow .meta-description p:last-child>a:hover,body:not(.collection-type-gallery).banner-button-style-outline.has-promoted-gallery .promoted-gallery-wrapper .sqs-gallery-block-slideshow .meta-description p:last-child>a:hover{background-color:#23c890;color:#181818;color:#efefef}body:not(.collection-type-gallery).banner-button-style-raised .desc-wrapper p:last-child>a,body:not(.collection-type-gallery).banner-button-style-raised.has-promoted-gallery #promotedGalleryWrapper .sqs-gallery-block-slideshow .meta-description p:last-child>a,body:not(.collection-type-gallery).banner-button-style-raised.has-promoted-gallery .promoted-gallery-wrapper .sqs-gallery-block-slideshow .meta-description p:last-child>a{-webkit-box-shadow:0px .2em 0px 0px #1da577;-moz-box-shadow:0px .2em 0px 0px #1da577;box-shadow:0px .2em 0px 0px #1da577}body:not(.collection-type-gallery).banner-button-style-raised .desc-wrapper p:last-child>a:hover,body:not(.collection-type-gallery).banner-button-style-raised.has-promoted-gallery #promotedGalleryWrapper .sqs-gallery-block-slideshow .meta-description p:last-child>a:hover,body:not(.collection-type-gallery).banner-button-style-raised.has-promoted-gallery .promoted-gallery-wrapper .sqs-gallery-block-slideshow .meta-description p:last-child>a:hover{background-color:#25d599}body:not(.collection-type-gallery).banner-button-corner-style-rounded .desc-wrapper p:last-child>a,body:not(.collection-type-gallery).banner-button-corner-style-rounded.has-promoted-gallery #promotedGalleryWrapper .sqs-gallery-block-slideshow .meta-description p:last-child>a,body:not(.collection-type-gallery).banner-button-corner-style-rounded.has-promoted-gallery .promoted-gallery-wrapper .sqs-gallery-block-slideshow .meta-description p:last-child>a{-webkit-border-radius:3px;border-radius:3px}body:not(.collection-type-gallery).banner-button-corner-style-pill .desc-wrapper p:last-child>a,body:not(.collection-type-gallery).banner-button-corner-style-pill.has-promoted-gallery #promotedGalleryWrapper .sqs-gallery-block-slideshow .meta-description p:last-child>a,body:not(.collection-type-gallery).banner-button-corner-style-pill.has-promoted-gallery .promoted-gallery-wrapper .sqs-gallery-block-slideshow .meta-description p:last-child>a{-webkit-border-radius:300px;border-radius:300px}#headerNav nav a,#sidecarNav nav a,#headerNav nav a:visited,#sidecarNav nav a:visited,#headerNav nav label,#sidecarNav nav label{font-family:"proxima-nova","Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:600;letter-spacing:1px;font-family:"proxima-nova";font-size:14px;text-transform:uppercase;text-decoration:none;letter-spacing:2px;font-weight:700;font-style:normal;line-height:1em;color:#fff}#headerNav nav a:hover,#sidecarNav nav a:hover,#headerNav nav a:visited:hover,#sidecarNav nav a:visited:hover,#headerNav nav label:hover,#sidecarNav nav label:hover{color:#1fd699}#headerNav nav .active>a,#sidecarNav nav .active>a,#headerNav nav .active>a:visited,#sidecarNav nav .active>a:visited,#headerNav nav .active>label,#sidecarNav nav .active>label{color:#1fd699}#headerNav nav .subnav,#sidecarNav nav .subnav{background-color:#212121}@media only screen and (min-width:641px){.show-on-scroll-wrapper #header{position:fixed !important;top:-20px;left:0;width:100%;visibility:hidden;opacity:0;background-color:#212121;-webkit-transform:translate3d(0,0,0);-moz-transform:translate3d(0,0,0);-ms-transform:translate3d(0,0,0);-o-transform:translate3d(0,0,0);transform:translate3d(0,0,0);-webkit-transition:opacity .14s ease-in-out,visibility 0s .14s linear,top .14s ease-in-out;-moz-transition:opacity .14s ease-in-out,visibility 0s .14s linear,top .14s ease-in-out;-ms-transition:opacity .14s ease-in-out,visibility 0s .14s linear,top .14s ease-in-out;-o-transition:opacity .14s ease-in-out,visibility 0s .14s linear,top .14s ease-in-out;transition:opacity .14s ease-in-out,visibility 0s .14s linear,top .14s ease-in-out}.show-on-scroll-wrapper.show #header{top:0;visibility:visible;opacity:1;-webkit-transition:opacity .14s ease-in-out,visibility 0s 0s linear,top .14s ease-in-out;-moz-transition:opacity .14s ease-in-out,visibility 0s 0s linear,top .14s ease-in-out;-ms-transition:opacity .14s ease-in-out,visibility 0s 0s linear,top .14s ease-in-out;-o-transition:opacity .14s ease-in-out,visibility 0s 0s linear,top .14s ease-in-out;transition:opacity .14s ease-in-out,visibility 0s 0s linear,top .14s ease-in-out}body:not(.force-mobile-nav) #headerNav{white-space:nowrap}body:not(.force-mobile-nav) .nav-wrapper{position:relative}body:not(.force-mobile-nav) .nav-wrapper nav>div{display:inline-block;vertical-align:middle;margin:0}body:not(.force-mobile-nav) .nav-wrapper nav>div a,body:not(.force-mobile-nav) .nav-wrapper nav>div label{-webkit-transition:color .1s 0s ease-in-out;-moz-transition:color .1s 0s ease-in-out;-ms-transition:color .1s 0s ease-in-out;-o-transition:color .1s 0s ease-in-out;transition:color .1s 0s ease-in-out}body:not(.force-mobile-nav) .nav-wrapper nav>div>a,body:not(.force-mobile-nav) .nav-wrapper nav>div label{display:block;padding:.75em 1em}body:not(.force-mobile-nav) .nav-wrapper nav>div:last-child>a,body:not(.force-mobile-nav) .nav-wrapper nav>div:last-child label{padding-right:0}body:not(.force-mobile-nav) .nav-wrapper#headerNav{text-align:right}body:not(.force-mobile-nav) #secondaryNavWrapper.nav-wrapper .folder .subnav{top:auto;bottom:100%;-webkit-transform-origin:0 100%;-moz-transform-origin:0 100%;-ms-transform-origin:0 100%;-o-transform-origin:0 100%;transform-origin:0 100%}html:not(.touch-styles) body:not(.force-mobile-nav) .nav-wrapper .folder .subnav{text-align:left;padding:1em 0;display:inline-block;position:absolute;top:100%;left:-.5em;z-index:1000;font-size:14px;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;white-space:nowrap;-webkit-transform:scale(1,0);-moz-transform:scale(1,0);-ms-transform:scale(1,0);-o-transform:scale(1,0);transform:scale(1,0);-webkit-transform-origin:0 0;-moz-transform-origin:0 0;-ms-transform-origin:0 0;-o-transform-origin:0 0;transform-origin:0 0;-webkit-transition:-webkit-transform .14s 0s ease-in-out;-moz-transition:-moz-transform .14s 0s ease-in-out;-ms-transition:-ms-transform .14s 0s ease-in-out;-o-transition:-o-transform .14s 0s ease-in-out;transition:transform .14s 0s ease-in-out}html:not(.touch-styles) body:not(.force-mobile-nav) .nav-wrapper .folder .subnav>div{opacity:0;padding:0;-webkit-transition:opacity .05s 0s ease-in-out;-moz-transition:opacity .05s 0s ease-in-out;-ms-transition:opacity .05s 0s ease-in-out;-o-transition:opacity .05s 0s ease-in-out;transition:opacity .05s 0s ease-in-out}html:not(.touch-styles) body:not(.force-mobile-nav) .nav-wrapper .folder .subnav>div a{display:block;padding:.5em 1.5em;-webkit-transform:translatez(0);-moz-transform:translatez(0);-ms-transform:translatez(0);-o-transform:translatez(0);transform:translatez(0)}html:not(.touch-styles) body:not(.force-mobile-nav) .nav-wrapper .folder .subnav.right{left:auto;right:-.5em}html:not(.touch-styles) body:not(.force-mobile-nav) .nav-wrapper .folder:hover .subnav{-webkit-transform:scale(1,1);-moz-transform:scale(1,1);-ms-transform:scale(1,1);-o-transform:scale(1,1);transform:scale(1,1)}html:not(.touch-styles) body:not(.force-mobile-nav) .nav-wrapper .folder:hover .subnav>div{opacity:1;-webkit-transition:opacity .14s .14s ease-in-out;-moz-transition:opacity .14s .14s ease-in-out;-ms-transition:opacity .14s .14s ease-in-out;-o-transition:opacity .14s .14s ease-in-out;transition:opacity .14s .14s ease-in-out}html:not(.touch-styles) body:not(.force-mobile-nav) #siteWrapper .nav-wrapper .folder:last-child .subnav{text-align:right;right:-1.5em;left:auto}}#sidecarNav .folder label:before{content:'+';padding-right:.25em;width:.75em;display:inline-block}#sidecarNav .folder .folder-toggle-box:checked~label:before{content:'–'}.touch-styles .folder{position:relative}.touch-styles .folder-toggle-label~.subnav{height:0;max-height:0;overflow:hidden;padding:0 1.5em 0;font-size:14px;text-align:left}.touch-styles .folder-toggle-label~.subnav>div{padding:1em 0 0}.touch-styles .folder-toggle-box:checked~.subnav{height:auto;max-height:999px;padding:0 1em 1em}.touch-styles #header .folder-toggle-label~.subnav{position:absolute;left:0}.touch-styles #header .folder:last-child .subnav{text-align:right;right:-1em;left:auto}.force-mobile-nav #sidecarNav .folder-toggle-label~.subnav{height:0;max-height:0;overflow:hidden;padding:0 1.5em;font-size:14px}.force-mobile-nav #sidecarNav .folder-toggle-label~.subnav>div{padding:.5em 0}.force-mobile-nav #sidecarNav .folder-toggle-box:checked~.subnav{height:auto;max-height:999px;padding:0 1em 1em}.force-mobile-nav #secondaryNavWrapper.nav-wrapper{position:relative}.force-mobile-nav #secondaryNavWrapper.nav-wrapper nav>div{display:inline-block;vertical-align:middle;margin:0}.force-mobile-nav #secondaryNavWrapper.nav-wrapper nav>div>a,.force-mobile-nav #secondaryNavWrapper.nav-wrapper nav>div label{display:block;padding:.75em 1em}.force-mobile-nav #secondaryNavWrapper.nav-wrapper nav>div:first-child>a,.force-mobile-nav #secondaryNavWrapper.nav-wrapper nav>div:first-child label{padding-left:0}.force-mobile-nav #secondaryNavWrapper.nav-wrapper .folder .subnav{display:inline-block;position:absolute;top:auto;bottom:100%;left:-.5em;z-index:1000;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;white-space:nowrap;-webkit-transform-origin:0 100%;-moz-transform-origin:0 100%;-ms-transform-origin:0 100%;-o-transform-origin:0 100%;transform-origin:0 100%;text-align:left;padding:1em 0;-webkit-transform:scale(1,0);-moz-transform:scale(1,0);-ms-transform:scale(1,0);-o-transform:scale(1,0);transform:scale(1,0);-webkit-transition:-webkit-transform .14s 0s ease-in-out;-moz-transition:-moz-transform .14s 0s ease-in-out;-ms-transition:-ms-transform .14s 0s ease-in-out;-o-transition:-o-transform .14s 0s ease-in-out;transition:transform .14s 0s ease-in-out}.force-mobile-nav #secondaryNavWrapper.nav-wrapper .folder .subnav>div{opacity:0;padding:0;-webkit-transition:opacity .05s 0s ease-in-out;-moz-transition:opacity .05s 0s ease-in-out;-ms-transition:opacity .05s 0s ease-in-out;-o-transition:opacity .05s 0s ease-in-out;transition:opacity .05s 0s ease-in-out}.force-mobile-nav #secondaryNavWrapper.nav-wrapper .folder .subnav>div a{display:block;padding:.5em 1.5em;-webkit-transform:translatez(0);-moz-transform:translatez(0);-ms-transform:translatez(0);-o-transform:translatez(0);transform:translatez(0)}.force-mobile-nav #secondaryNavWrapper.nav-wrapper .folder:last-child .subnav{text-align:right;right:-.5em;left:auto}.force-mobile-nav #secondaryNavWrapper.nav-wrapper .folder:hover .subnav{-webkit-transform:scale(1,1);-moz-transform:scale(1,1);-ms-transform:scale(1,1);-o-transform:scale(1,1);transform:scale(1,1)}.force-mobile-nav #secondaryNavWrapper.nav-wrapper .folder:hover .subnav>div{opacity:1;-webkit-transition:opacity .14s .14s ease-in-out;-moz-transition:opacity .14s .14s ease-in-out;-ms-transition:opacity .14s .14s ease-in-out;-o-transition:opacity .14s .14s ease-in-out;transition:opacity .14s .14s ease-in-out}.folder{position:relative}.folder-toggle-label{cursor:pointer}body{-webkit-animation:bugfix infinite 1s}@-webkit-keyframes bugfix{from{padding:0}to{padding:0}}#mobileNavToggle:checked~.body-overlay{position:absolute;top:0;bottom:0;left:0;right:0;z-index:9999;cursor:e-resize;-webkit-transform:translatex(-260px) translatez(0);-moz-transform:translatex(-260px) translatez(0);-ms-transform:translatex(-260px) translatez(0);-o-transform:translatex(-260px) translatez(0);transform:translatex(-260px) translatez(0)}#sidecarNav{position:fixed;width:260px;z-index:-1;top:0;right:0;bottom:0;height:100%;line-height:1em;text-align:left;overflow:auto;visibility:hidden;background-color:#212121;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-transition:height 0s .14s linear,visibility 0s .14s linear;-moz-transition:height 0s .14s linear,visibility 0s .14s linear;-ms-transition:height 0s .14s linear,visibility 0s .14s linear;-o-transition:height 0s .14s linear,visibility 0s .14s linear;transition:height 0s .14s linear,visibility 0s .14s linear}#sidecarNav nav{padding:24px 36px 72px}#sidecarNav nav div{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}#sidecarNav nav div a,#sidecarNav nav div label{display:block;padding:.75em 0}#sidecarNav nav div .subnav>div a{padding:0 0 .5em}#sidecarNav nav div .subnav>div:last-child a{padding-bottom:1em}.force-mobile-nav #header #headerNav{display:none}.force-mobile-nav #sidecarNav .site-title{vertical-align:middle}.force-mobile-nav .mobile-nav-toggle-label{display:none;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;z-index:100;width:10%;position:absolute;z-index:1002;top:50%;right:20px;margin-top:-8px;padding:0;vertical-align:middle;line-height:16px;text-align:right;cursor:pointer;user-select:none;color:#fff;width:22px;height:22px}.force-mobile-nav .mobile-nav-toggle-label .top-bar,.force-mobile-nav .mobile-nav-toggle-label .middle-bar,.force-mobile-nav .mobile-nav-toggle-label .bottom-bar{width:22px;height:2px;background-color:#fff;-webkit-transition:-webkit-transform .1s 0s ease-in-out,top .1s .1s ease-in-out;-moz-transition:-moz-transform .1s 0s ease-in-out,top .1s .1s ease-in-out;-ms-transition:-ms-transform .1s 0s ease-in-out,top .1s .1s ease-in-out;-o-transition:-o-transform .1s 0s ease-in-out,top .1s .1s ease-in-out;transition:transform .1s 0s ease-in-out,top .1s .1s ease-in-out;-webkit-transform-origin:50% 50%;-moz-transform-origin:50% 50%;-ms-transform-origin:50% 50%;-o-transform-origin:50% 50%;transform-origin:50% 50%;position:absolute;top:0;right:0}.force-mobile-nav .mobile-nav-toggle-label .middle-bar{-webkit-transition:opacity 0s .15s linear;-moz-transition:opacity 0s .15s linear;-ms-transition:opacity 0s .15s linear;-o-transition:opacity 0s .15s linear;transition:opacity 0s .15s linear;top:7px}.force-mobile-nav .mobile-nav-toggle-label .bottom-bar{top:14px}.force-mobile-nav #mainNavWrapper{display:block;position:fixed;width:260px;z-index:-1;top:0;right:0;bottom:0;height:100%;line-height:1em;text-align:left;overflow:auto;background-color:#212121;-webkit-overflow-scrolling:touch;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-transform:translate3d(260px,0,0);-moz-transform:translate3d(260px,0,0);-ms-transform:translate3d(260px,0,0);-o-transform:translate3d(260px,0,0);transform:translate3d(260px,0,0);-webkit-transition:-webkit-transform 0s 0s ease-in-out;-moz-transition:-moz-transform 0s 0s ease-in-out;-ms-transition:-ms-transform 0s 0s ease-in-out;-o-transition:-o-transform 0s 0s ease-in-out;transition:transform 0s 0s ease-in-out}.force-mobile-nav #mainNavWrapper nav{padding:32px 40px;display:none}.force-mobile-nav #mainNavWrapper nav div{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.force-mobile-nav #mainNavWrapper nav div a,.force-mobile-nav #mainNavWrapper nav div label{display:block;padding:.75em 0}.force-mobile-nav #mainNavWrapper nav div .subnav>div a{padding:0 0 .5em}.force-mobile-nav #mainNavWrapper nav div .subnav>div:last-child a{padding-bottom:1em}.force-mobile-nav #siteWrapper{width:100%;-webkit-transition:-webkit-transform .2s ease-in-out;-moz-transition:-moz-transform .2s ease-in-out;-ms-transition:-ms-transform .2s ease-in-out;-o-transition:-o-transform .2s ease-in-out;transition:transform .2s ease-in-out}.force-mobile-nav #mobileNavToggle:checked~#siteWrapper{position:fixed;-webkit-transform:translatex(-260px);-webkit-transform:translate3d(-260px,0,0);-moz-transform:translatex(-260px) translatez(0);-moz-transform:translate3d(-260px,0,0);-ms-transform:translatex(-260px) translatez(0);-ms-transform:translate3d(-260px,0,0);-o-transform:translatex(-260px) translatez(0);-o-transform:translate3d(-260px,0,0);transform:translatex(-260px) translatez(0);transform:translate3d(-260px,0,0)}.force-mobile-nav #mobileNavToggle:checked~#siteWrapper .mobile-nav-toggle-label .top-bar,.force-mobile-nav #mobileNavToggle:checked~#siteWrapper .mobile-nav-toggle-label .bottom-bar{-webkit-transition:top .1s .1s ease-in-out,-webkit-transform .1s .2s ease-in-out;-moz-transition:top .1s .1s ease-in-out,-moz-transform .1s .2s ease-in-out;-ms-transition:top .1s .1s ease-in-out,-ms-transform .1s .2s ease-in-out;-o-transition:top .1s .1s ease-in-out,-o-transform .1s .2s ease-in-out;transition:top .1s .1s ease-in-out,transform .1s .2s ease-in-out}.force-mobile-nav #mobileNavToggle:checked~#siteWrapper .mobile-nav-toggle-label .top-bar{-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);-o-transform:rotate(45deg);transform:rotate(45deg);top:7px}.force-mobile-nav #mobileNavToggle:checked~#siteWrapper .mobile-nav-toggle-label .middle-bar{opacity:0}.force-mobile-nav #mobileNavToggle:checked~#siteWrapper .mobile-nav-toggle-label .bottom-bar{-webkit-transform:rotate(-45deg);-moz-transform:rotate(-45deg);-ms-transform:rotate(-45deg);-o-transform:rotate(-45deg);transform:rotate(-45deg);top:7px}.force-mobile-nav #mobileNavToggle:checked~#sidecarNav{height:100%;visibility:visible;-webkit-transition:height 0s .14s linear,visibility 0s 0s linear;-moz-transition:height 0s .14s linear,visibility 0s 0s linear;-ms-transition:height 0s .14s linear,visibility 0s 0s linear;-o-transition:height 0s .14s linear,visibility 0s 0s linear;transition:height 0s .14s linear,visibility 0s 0s linear}.force-mobile-nav.enable-nav-button #sidecarNav nav>div:not(.folder):last-child a{display:inline-block;margin:1em 0 0 0;line-height:1;padding:1em 1.5em}.force-mobile-nav .folder-toggle-box:checked~.subnav{padding:.25em 0 .5em}@media only screen and (min-width:641px){.sqs-style-mode.dialog-open.force-mobile-nav #mobileNavToggle:checked~#siteWrapper{-webkit-transform:translate3d(-480px,0,0);-moz-transform:translate3d(-480px,0,0);-ms-transform:translate3d(-480px,0,0);-o-transform:translate3d(-480px,0,0);transform:translate3d(-480px,0,0)}}.mobile-nav-toggle-label{display:none}.enable-nav-button #headerNav nav>div:not(.folder):last-child a,.enable-nav-button #sidecarNav nav>div:not(.folder):last-child a{font-family:"proxima-nova","Helvetica Neue",Helvetica,Arial,sans-serif;font-family:"proxima-nova";text-transform:uppercase;text-decoration:none;letter-spacing:1px;font-weight:700;font-style:normal;margin-left:1em;padding:1em 1.5em !important;display:block;background-color:#23c890;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;color:#fff;-webkit-transition:background-color .1s 0s ease-in-out,color .1s 0s ease-in-out;-moz-transition:background-color .1s 0s ease-in-out,color .1s 0s ease-in-out;-ms-transition:background-color .1s 0s ease-in-out,color .1s 0s ease-in-out;-o-transition:background-color .1s 0s ease-in-out,color .1s 0s ease-in-out;transition:background-color .1s 0s ease-in-out,color .1s 0s ease-in-out}.enable-nav-button #headerNav nav>div:not(.folder):last-child a:hover,.enable-nav-button #sidecarNav nav>div:not(.folder):last-child a:hover{background-color:rgba(35,200,144,.8)}.nav-button-style-outline.enable-nav-button #headerNav nav>div:not(.folder):last-child a,.nav-button-style-outline.enable-nav-button #sidecarNav nav>div:not(.folder):last-child a{background-color:transparent;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;border:2px solid #23c890;color:#23c890}.nav-button-style-outline.enable-nav-button #headerNav nav>div:not(.folder):last-child a:hover,.nav-button-style-outline.enable-nav-button #sidecarNav nav>div:not(.folder):last-child a:hover{background-color:#23c890;color:#181818;color:#efefef}.nav-button-style-raised.enable-nav-button #headerNav nav>div:not(.folder):last-child a,.nav-button-style-raised.enable-nav-button #sidecarNav nav>div:not(.folder):last-child a{-webkit-box-shadow:0px .2em 0px 0px #1da577;-moz-box-shadow:0px .2em 0px 0px #1da577;box-shadow:0px .2em 0px 0px #1da577}.nav-button-style-raised.enable-nav-button #headerNav nav>div:not(.folder):last-child a:hover,.nav-button-style-raised.enable-nav-button #sidecarNav nav>div:not(.folder):last-child a:hover{background-color:#25d599}.nav-button-corner-style-rounded.enable-nav-button #headerNav nav>div:not(.folder):last-child a,.nav-button-corner-style-rounded.enable-nav-button #sidecarNav nav>div:not(.folder):last-child a{-webkit-border-radius:3px;border-radius:3px}.nav-button-corner-style-pill.enable-nav-button #headerNav nav>div:not(.folder):last-child a,.nav-button-corner-style-pill.enable-nav-button #sidecarNav nav>div:not(.folder):last-child a{-webkit-border-radius:300px;border-radius:300px}.back-to-top-nav{display:none}#secondaryNavWrapper{padding:0 0 1.5em;z-index:3;position:relative;line-height:1.25em;right:auto}#secondaryNavWrapper nav>div:first-child>a,#secondaryNavWrapper nav>div:first-child label{padding-left:0}#siteInfo{font-family:"proxima-nova","Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:600;letter-spacing:1px;font-family:"proxima-nova";font-size:14px;text-transform:uppercase;text-decoration:none;letter-spacing:2px;font-weight:400;font-style:normal;color:rgba(255,255,255,.8)}#siteInfo a,#siteInfo a:visited{color:rgba(255,255,255,.8)}.site-phone,.site-email{white-space:nowrap}.site-address+.site-phone,.site-address+.site-email,.site-phone+.site-email{margin-left:1em}.center-navigation--info #secondaryNavWrapper{text-align:center;left:auto}.center-navigation--info #siteInfo{text-align:center}.hide-site-info #siteInfo{display:none}#footerBlocks:not(.empty){margin-top:1.5em}.folder-nav-toggle-label,.category-nav-toggle-label{display:none}.sqs-simple-like{line-height:inherit}.sqs-simple-like .like-count{margin-right:1.2em}.sqs-simple-like .like-count:before{font-family:'squarespace-ui-font';font-style:normal;speak:none;font-weight:normal;-webkit-font-smoothing:antialiased;content:"\e012";text-align:center;display:inline-block;vertical-align:middle}.sqs-simple-like .like-count:before{font-size:16px;width:16px;height:16px;line-height:16px}.sqs-simple-like .like-count:before{margin-right:.2em;position:relative;top:.13em;font-size:1.2em;width:auto;height:auto;line-height:inherit;text-align:left;vertical-align:initial}.sqs-simple-like .like-icon{display:none}.ss-social-button:before{font-family:'squarespace-ui-font';font-style:normal;speak:none;font-weight:normal;-webkit-font-smoothing:antialiased;content:"\e02b";text-align:center;display:inline-block;vertical-align:middle}.ss-social-button:before{font-size:16px;width:16px;height:16px;line-height:16px}.ss-social-button:before{margin-right:.4em;font-size:.85em;width:auto;height:auto;line-height:inherit;text-align:left;vertical-align:initial}.ss-social-button div{display:inline-block}.ss-social-button-icon{display:none !important}#indexList figure{width:100%}#indexList figure a{display:block}#indexList figure img{max-width:100%}.embed-block iframe,.embed-block img{max-width:100%}.sqs-block.image-block .image-caption-wrapper p{font-size:.875em;line-height:1.25em}html.touch .squarespace-comments .comments-content .comment-list .comment .comment-header .controls .squarespace-comment-buttons .comment-control{opacity:1}#productList .product .product-title,.no-touch .product-list-titles-overlay #productList .product .product-title{font-size:1.25em;line-height:1.25em;margin-bottom:.75em}#productList .product .product-price,.no-touch .product-list-titles-overlay #productList .product .product-price{font-size:1em;line-height:1.25em;margin-top:.5em;margin-bottom:.75em}.collection-type-gallery.full-width-gallery #page{max-width:100%;padding:32px}.banner-thumbnail-wrapper.sqs-frontend-edit-wrapper.sqs-frontend-outline{outline-offset:0px}.banner-thumbnail-wrapper .sqs-frontend-edit{top:auto !important;bottom:1px !important;right:1px}.sqs-layout:not(.sqs-editing)>.sqs-row:last-child>[class*=sqs-col]>.sqs-block:last-child{padding-bottom:0}.sqs-layout:not(.sqs-editing)>.sqs-row:last-child>[class*=sqs-col]:first-child>.sqs-block:last-child{padding-bottom:0}.sqs-layout:not(.sqs-editing)>.sqs-row:last-child>[class*=sqs-col]:last-child>.sqs-block:last-child{padding-bottom:0}.has-promoted-gallery #promotedGalleryWrapper .reduce-text-size .meta .meta-description p,.has-promoted-gallery .promoted-gallery-wrapper .reduce-text-size .meta .meta-description p{font-size:14px;letter-spacing:2px}.has-promoted-gallery #promotedGalleryWrapper .reduce-text-size .meta .meta-description p>strong,.has-promoted-gallery .promoted-gallery-wrapper .reduce-text-size .meta .meta-description p>strong,.has-promoted-gallery #promotedGalleryWrapper .reduce-text-size .meta .meta-description p>em>strong,.has-promoted-gallery .promoted-gallery-wrapper .reduce-text-size .meta .meta-description p>em>strong{font-size:22px;letter-spacing:2px}.has-promoted-gallery #promotedGalleryWrapper .reduce-text-size .meta .meta-description p:last-child>a,.has-promoted-gallery .promoted-gallery-wrapper .reduce-text-size .meta .meta-description p:last-child>a{font-size:13px;letter-spacing:2px}.sqs-block-summary-v2 .summary-title,.sqs-block-summary-v2 .summary-heading{font-family:"proxima-nova","Helvetica Neue",Helvetica,Arial,sans-serif;text-transform:uppercase;letter-spacing:1px;font-weight:400;font-style:normal;color:#666}.sqs-block-summary-v2 .summary-title a,.sqs-block-summary-v2 .summary-heading a,.sqs-block-summary-v2 .summary-title a:link,.sqs-block-summary-v2 .summary-heading a:link,.sqs-block-summary-v2 .summary-title a:visited,.sqs-block-summary-v2 .summary-heading a:visited{color:#666}.sqs-block-summary-v2 .summary-title a:hover,.sqs-block-summary-v2 .summary-heading a:hover,.sqs-block-summary-v2 .summary-title a:link:hover,.sqs-block-summary-v2 .summary-heading a:link:hover,.sqs-block-summary-v2 .summary-title a:visited:hover,.sqs-block-summary-v2 .summary-heading a:visited:hover{color:#3d9991}.sqs-block-summary-v2 a,.sqs-block-summary-v2 a:link,.sqs-block-summary-v2 a:visited{color:#3d9991}.sqs-block-summary-v2 .summary-metadata-item{color:rgba(26,26,26,.4)}.sqs-block-summary-v2 .summary-metadata-item a,.sqs-block-summary-v2 .summary-metadata-item a:link,.sqs-block-summary-v2 .summary-metadata-item a:visited{color:rgba(26,26,26,.4)}.sqs-block-summary-v2 .summary-metadata-item a:hover,.sqs-block-summary-v2 .summary-metadata-item a:link:hover,.sqs-block-summary-v2 .summary-metadata-item a:visited:hover{color:#3d9991}#preFooter nav:not(.social-icons-style-border) a,#footer nav:not(.social-icons-style-border) a,#preFooter nav:not(.social-icons-style-border) a:visited,#footer nav:not(.social-icons-style-border) a:visited{border-bottom:none}#preFooter nav.sqs-svg-icon--list,#footer nav.sqs-svg-icon--list{text-decoration:none !important}#rightSidebar hr{margin:initial}.view-list .filter-heading{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;max-width:1020px;margin:0 auto -32px;padding:32px 32px 0}.view-list .filter-heading span:after{content:'\00D7';padding-left:1em}.view-list .filter-heading a{font-family:"proxima-nova","Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:600;letter-spacing:1px;font-family:"proxima-nova";font-size:14px;text-transform:uppercase;letter-spacing:2px;font-weight:700;font-style:normal;color:#3d9991;text-decoration:none;padding:.5em 0;border-bottom:2px solid #3d9991}.view-list:not(.collection-type-blog) .filter-heading{display:none}.view-list .entry+.entry{margin-top:128px}.view-list .excerpt-thumb{display:none;height:12em;width:12em;margin:0 1em 2em 0;float:left;overflow:hidden}.view-list .excerpt-thumb a{display:block;height:100%}.view-list .p-summary p:first-child{margin-top:0}.view-item .blog-item article.has-main-image .meta-above-title,.view-item .blog-item article.has-main-image .entry-title,.view-item .blog-item article.has-main-image .entry-title-passthrough{display:none}.view-item .blog-item .entry-footer{margin-top:2em}.entry-header{margin-bottom:36px}.entry-dateline,.entry-byline,.entry-morefrom{display:inline}.entry-title{margin:12px 0}.entry-title-passthrough:after{content:" \279D";font:normal .9em sans-serif}.entry-more-link{margin-bottom:0}.entry-more-link a{display:block;min-width:2em;min-height:1em}.entry-more-link a:before{content:"Read More"}.entry-more-link a:after{content:" \279D";font:normal .9em sans-serif}.entry-footer{margin-top:1em;line-height:1.25em}.entry-tags,.entry-source{max-width:30em}.entry-source{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.entry-actions .entry-comments,.entry-actions .sqs-disqus-comment-link{display:inline-block;margin-right:1em;text-decoration:none}.entry-actions .entry-comments:before,.entry-actions .sqs-disqus-comment-link:before{font-family:'squarespace-ui-font';font-style:normal;speak:none;font-weight:normal;-webkit-font-smoothing:antialiased;content:"\e010";text-align:center;display:inline-block;vertical-align:middle}.entry-actions .entry-comments:before,.entry-actions .sqs-disqus-comment-link:before{font-size:16px;width:16px;height:16px;line-height:16px}.entry-actions .entry-comments:before,.entry-actions .sqs-disqus-comment-link:before{margin-right:.2em;position:relative;top:.12em;font-size:1.2em;width:auto;height:auto;line-height:inherit;text-align:left;vertical-align:initial}.pagination{margin-top:6em}.pagination>div{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;display:inline-block;vertical-align:top;width:50%}.pagination>div a{display:block;color:#3d9991}.pagination .newer{padding-right:1em}.pagination .older{padding-left:1em;text-align:right}.center-entry-title--meta.hide-blog-sidebar .filter-heading,.center-entry-title--meta.hide-blog-sidebar .entry-header,.center-entry-title--meta.hide-blog-sidebar .entry-footer{text-align:center}.center-entry-title--meta.hide-blog-sidebar .entry-tags{margin-left:auto;margin-right:auto}.hide-entry-author:not(.meta-priority-author) .entry-author{display:none}.hide-blog-sidebar.collection-type-blog #page #rightSidebar{display:none}.hide-blog-sidebar.collection-type-blog #page #content{width:100%;max-width:700px;display:block;margin:0 auto}.hide-blog-sidebar.collection-type-blog.view-list .filter-heading{max-width:700px;padding-left:0}.hide-blog-recents #rightSidebar .recent-posts{display:none}.hide-blog-categories #rightSidebar .blog-categories{display:none}.hide-list-entry-footer.view-list .entry-footer{display:none}.meta-priority-date .meta-above-title .entry-morefrom{display:none}.meta-priority-date .meta-above-title .entry-author{display:none}.meta-priority-date .meta-below-title .entry-dateline{display:none}.meta-priority-date.hide-entry-author .no-categories{margin:0}.meta-priority-date:not(.hide-entry-author) .meta-below-title .entry-morefrom:before{content:'\00B7';padding:0 .5em}.meta-priority-date .sqs-featured-posts-gallery .title-desc-wrapper .post-author,.meta-priority-date .blog-item-wrapper .post-author,.meta-priority-date .recent-posts .post-author{display:none}.meta-priority-date .sqs-featured-posts-gallery .title-desc-wrapper .post-category,.meta-priority-date .blog-item-wrapper .post-category,.meta-priority-date .recent-posts .post-category{display:none}.meta-priority-category .meta-above-title .entry-dateline{display:none}.meta-priority-category .meta-above-title .entry-author{display:none}.meta-priority-category .meta-below-title .entry-morefrom{display:none}.meta-priority-category:not(.hide-entry-author) .meta-below-title .entry-dateline:before{content:'\00B7';padding:0 .5em}.meta-priority-category .sqs-featured-posts-gallery .title-desc-wrapper .post-author,.meta-priority-category .blog-item-wrapper .post-author,.meta-priority-category .recent-posts .post-author{display:none}.meta-priority-category .sqs-featured-posts-gallery .title-desc-wrapper .post-date,.meta-priority-category .blog-item-wrapper .post-date,.meta-priority-category .recent-posts .post-date{display:none}.meta-priority-author .meta-above-title .entry-dateline{display:none}.meta-priority-author .meta-above-title .entry-morefrom{display:none}.meta-priority-author .meta-below-title .entry-author{display:none}.meta-priority-author .meta-below-title .entry-morefrom:before{content:'\00B7';padding:0 .5em}.meta-priority-author .sqs-featured-posts-gallery .title-desc-wrapper .post-date,.meta-priority-author .blog-item-wrapper .post-date,.meta-priority-author .recent-posts .post-date{display:none}.meta-priority-author .sqs-featured-posts-gallery .title-desc-wrapper .post-category,.meta-priority-author .blog-item-wrapper .post-category,.meta-priority-author .recent-posts .post-category{display:none}.meta-priority-none .meta-above-title .entry-dateline{display:none}.meta-priority-none .meta-above-title .entry-morefrom{display:none}.meta-priority-none .meta-above-title .entry-author{display:none}.meta-priority-none .entry-morefrom:before{content:'\00B7';padding:0 .5em}.meta-priority-none:not(.hide-entry-author) .entry-dateline:before{content:'\00B7';padding:0 .5em}.meta-priority-none .sqs-featured-posts-gallery .title-desc-wrapper .post-date,.meta-priority-none .blog-item-wrapper .post-date,.meta-priority-none .recent-posts .post-date{display:none}.meta-priority-none .sqs-featured-posts-gallery .title-desc-wrapper .post-category,.meta-priority-none .blog-item-wrapper .post-category,.meta-priority-none .recent-posts .post-category{display:none}.meta-priority-none .sqs-featured-posts-gallery .title-desc-wrapper .post-author,.meta-priority-none .blog-item-wrapper .post-author,.meta-priority-none .recent-posts .post-author{display:none}.collection-type-blog.view-item .banner-thumbnail-wrapper{min-height:0;padding:130px 0}.collection-type-blog.view-item.transparent-header .banner-thumbnail-wrapper{padding:180px 0 155px}.blog-item-wrapper{display:block;z-index:100;position:relative;width:100%;max-width:1084px;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;margin:0 auto;padding:32px;text-align:center;text-rendering:optimizeLegibility}.blog-item-wrapper .title-desc-wrapper{-webkit-animation:feature-text-anim .75s ease-in-out;animation:feature-text-anim .75s ease-in-out}.blog-item-wrapper .post-title{font-family:"proxima-nova","Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:400;font-size:48px;letter-spacing:0px;font-family:"adelle-sans";font-size:41px;line-height:1em;text-transform:none;letter-spacing:4px;font-weight:100;font-style:normal;-webkit-transform:translatez(0);text-decoration:none;color:#fff}.blog-item-wrapper .post-date,.blog-item-wrapper .post-author,.blog-item-wrapper .post-category{display:block;font-family:"proxima-nova","Helvetica Neue",Helvetica,Arial,sans-serif;font-size:18px;letter-spacing:0px;line-height:1.5em;font-family:"camingodos-web";font-size:49px;line-height:1em;text-transform:none;letter-spacing:1px;font-weight:400;font-style:normal;color:#fff;line-height:1.125em;margin-bottom:.75em;-webkit-transform:translatez(0)}.blog-item-wrapper .post-date a,.blog-item-wrapper .post-author a,.blog-item-wrapper .post-category a{color:#fff}.sqs-featured-posts-gallery .arrow.previous-slide:before{font-family:'squarespace-ui-font';font-style:normal;speak:none;font-weight:normal;-webkit-font-smoothing:antialiased;content:"\e02c";text-align:center;display:inline-block;vertical-align:middle}.sqs-featured-posts-gallery .arrow.previous-slide:before{font-size:32px;width:32px;height:32px;line-height:32px}.sqs-featured-posts-gallery .arrow.previous-slide:before{font-size:24px;width:24px;height:24px;line-height:24px}.sqs-featured-posts-gallery .arrow.next-slide:before{font-family:'squarespace-ui-font';font-style:normal;speak:none;font-weight:normal;-webkit-font-smoothing:antialiased;content:"\e02d";text-align:center;display:inline-block;vertical-align:middle}.sqs-featured-posts-gallery .arrow.next-slide:before{font-size:32px;width:32px;height:32px;line-height:32px}.sqs-featured-posts-gallery .arrow.next-slide:before{font-size:24px;width:24px;height:24px;line-height:24px}.sqs-featured-posts-gallery .arrow,.sqs-featured-posts-gallery .icons span{display:none;-moz-user-select:-moz-none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.sqs-featured-posts-gallery .gallery-wrapper{position:relative;width:100%}.sqs-featured-posts-gallery .gallery-wrapper .posts{display:block;width:100%;height:600px !important}.sqs-featured-posts-gallery .gallery-wrapper .posts .post{height:600px !important;width:100%;background-color:#001a16;-webkit-transform:translatez(0);-moz-transform:translatez(0);-ms-transform:translatez(0);-o-transform:translatez(0);transform:translatez(0)}.sqs-featured-posts-gallery .gallery-wrapper .posts .post:not(:first-of-type){opacity:0}.sqs-featured-posts-gallery .gallery-wrapper .posts .post:first-of-type img{-webkit-animation:feature-bg-anim .6s ease-in-out;animation:feature-bg-anim .6s ease-in-out}.sqs-featured-posts-gallery .gallery-wrapper .posts .post a{display:block}.sqs-featured-posts-gallery.loaded .gallery-wrapper .posts .post{opacity:1}.sqs-featured-posts-gallery .slides-controls{position:relative;z-index:991;overflow:hidden;cursor:pointer}.sqs-featured-posts-gallery .circles{display:none;margin:20px 0;cursor:pointer}.sqs-featured-posts-gallery .circles.sqs-gallery-controls-disabled{display:none}.sqs-featured-posts-gallery.sqs-featured-posts-gallery-interaction .arrow{opacity:0}.sqs-featured-posts-gallery.sqs-featured-posts-gallery-interaction.sqs-featured-posts-gallery-hover-slides-left .arrow.previous-slide:not(.sqs-disabled),.sqs-featured-posts-gallery.sqs-featured-posts-gallery-video-iframe .arrow.previous-slide:not(.sqs-disabled){opacity:1}.sqs-featured-posts-gallery.sqs-featured-posts-gallery-interaction.sqs-featured-posts-gallery-hover-slides-right .arrow.next-slide:not(.sqs-disabled),.sqs-featured-posts-gallery.sqs-featured-posts-gallery-video-iframe .arrow.next-slide:not(.sqs-disabled){opacity:1}.sqs-featured-posts-gallery .title-desc-wrapper{position:absolute;left:50%;top:50%;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;padding:32px 0;-webkit-transform:translate(-50%,-45%) !important;-moz-transform:translate(-50%,-45%) !important;-ms-transform:translate(-50%,-45%) !important;-o-transform:translate(-50%,-45%) !important;transform:translate(-50%,-45%) !important;z-index:1000;opacity:0;-webkit-transition:all .25s ease-in-out .3s;-moz-transition:all .25s ease-in-out .3s;-ms-transition:all .25s ease-in-out .3s;-o-transition:all .25s ease-in-out .3s;transition:all .25s ease-in-out .3s;text-rendering:optimizeLegibility}.sqs-featured-posts-gallery .title-desc-wrapper .post-title{margin-bottom:.75em;-webkit-transform:translatez(0)}.sqs-featured-posts-gallery .title-desc-wrapper .post-title a{font-family:"proxima-nova","Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:400;font-size:48px;letter-spacing:0px;font-family:"adelle-sans";font-size:41px;line-height:1em;text-transform:none;letter-spacing:4px;font-weight:100;font-style:normal;text-decoration:none;color:#fff;padding-left:4px}.sqs-featured-posts-gallery .title-desc-wrapper .post-date,.sqs-featured-posts-gallery .title-desc-wrapper .post-author,.sqs-featured-posts-gallery .title-desc-wrapper .post-category{display:block;font-family:"proxima-nova","Helvetica Neue",Helvetica,Arial,sans-serif;font-size:18px;letter-spacing:0px;line-height:1.5em;font-family:"camingodos-web";font-size:49px;line-height:1em;text-transform:none;letter-spacing:1px;font-weight:400;font-style:normal;color:#fff;line-height:1.125em;margin-bottom:.75em;-webkit-transform:translatez(0)}.sqs-featured-posts-gallery .title-desc-wrapper .post-date a,.sqs-featured-posts-gallery .title-desc-wrapper .post-author a,.sqs-featured-posts-gallery .title-desc-wrapper .post-category a{color:#fff}.sqs-featured-posts-gallery .title-desc-wrapper .post-excerpt{font-family:"proxima-nova","Helvetica Neue",Helvetica,Arial,sans-serif;font-size:18px;letter-spacing:0px;line-height:1.5em;font-family:"camingodos-web";font-size:49px;line-height:1em;text-transform:none;letter-spacing:1px;font-weight:400;font-style:normal;color:#fff;margin-bottom:.75em;display:none}.sqs-featured-posts-gallery .title-desc-wrapper .post-excerpt p{margin:0}.sqs-featured-posts-gallery .title-desc-wrapper .post-excerpt p~p{margin-top:.75em}.sqs-featured-posts-gallery .title-desc-wrapper .view-post{font-family:"proxima-nova","Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:600;letter-spacing:1px;font-family:"proxima-nova";font-size:14px;text-transform:uppercase;letter-spacing:2px;font-weight:700;font-style:normal;text-decoration:none;display:block;-webkit-transform:translatez(0);line-height:1em;margin-top:1.4em}.sqs-featured-posts-gallery .title-desc-wrapper .view-post:before{content:'View Post';display:inline-block;font-family:"proxima-nova","Helvetica Neue",Helvetica,Arial,sans-serif;font-size:18px;letter-spacing:0px;line-height:1.5em;font-family:"camingodos-web";font-size:49px;line-height:1em;text-transform:none;letter-spacing:1px;font-weight:400;font-style:normal;color:#fff;line-height:1.125em;vertical-align:middle}.sqs-featured-posts-gallery .title-desc-wrapper .view-post:after{display:inline-block;content:'\279D';color:#fff;font:normal .9em sans-serif;margin-left:6px;vertical-align:middle}.sqs-featured-posts-gallery .loaded .title-desc-wrapper{-webkit-transform:translate(-50%,-50%) !important;-moz-transform:translate(-50%,-50%) !important;-ms-transform:translate(-50%,-50%) !important;-o-transform:translate(-50%,-50%) !important;transform:translate(-50%,-50%) !important;opacity:1}.transparent-header .sqs-featured-posts-gallery .gallery-wrapper .posts{height:700px !important}.transparent-header .sqs-featured-posts-gallery .gallery-wrapper .posts .post{height:100% !important}.transparent-header .sqs-featured-posts-gallery .title-desc-wrapper{padding:57px 0 32px}.banner-slideshow-controls-both .sqs-featured-posts-gallery .arrow,.banner-slideshow-controls-arrows .sqs-featured-posts-gallery .arrow{display:block;position:absolute;top:50%;outline:none;color:#fff !important;z-index:999;font-size:14px;line-height:40px;margin-top:-30px;display:inline-block;padding:10px;cursor:pointer}.banner-slideshow-controls-both .sqs-featured-posts-gallery .arrow.previous-slide,.banner-slideshow-controls-arrows .sqs-featured-posts-gallery .arrow.previous-slide{left:0}.banner-slideshow-controls-both .sqs-featured-posts-gallery .arrow.next-slide,.banner-slideshow-controls-arrows .sqs-featured-posts-gallery .arrow.next-slide{right:0;float:right}.banner-slideshow-controls-both .sqs-featured-posts-gallery .arrow.sqs-disabled,.banner-slideshow-controls-arrows .sqs-featured-posts-gallery .arrow.sqs-disabled{opacity:0}.collection-type-index #page{max-width:100%;padding:0}.collection-type-index .page-content{max-width:1020px;margin:0 auto;padding:96px 32px}.collection-type-index .promoted-gallery-wrapper .sqs-block{padding-top:0;padding-bottom:0}.index-section.empty .page-content{display:none}@media only screen and (max-width:1024px){.touch-styles a,.touch-styles label{-webkit-tap-highlight-color:rgba(0,0,0,0) !important;-moz-tap-highlight-color:rgba(0,0,0,0) !important;tap-highlight-color:rgba(0,0,0,0) !important}.sqs-block-horizontalrule hr{margin:32px 0}.sqs-featured-posts-gallery .title-desc-wrapper{max-width:90% !important;width:90% !important;text-align:center;padding:0 20px}.sqs-featured-posts-gallery .title-desc-wrapper .post-excerpt{max-width:90%}}@media only screen and (max-device-height:768px){.collection-type-page.has-promoted-gallery #promotedGalleryWrapper .sqs-gallery-block-slideshow,.collection-type-index.has-promoted-gallery #promotedGalleryWrapper .sqs-gallery-block-slideshow,.collection-type-page.has-promoted-gallery .promoted-gallery-wrapper .sqs-gallery-block-slideshow,.collection-type-index.has-promoted-gallery .promoted-gallery-wrapper .sqs-gallery-block-slideshow{height:600px !important}.collection-type-page.has-promoted-gallery #promotedGalleryWrapper .sqs-gallery-block-slideshow .sqs-gallery,.collection-type-index.has-promoted-gallery #promotedGalleryWrapper .sqs-gallery-block-slideshow .sqs-gallery,.collection-type-page.has-promoted-gallery .promoted-gallery-wrapper .sqs-gallery-block-slideshow .sqs-gallery,.collection-type-index.has-promoted-gallery .promoted-gallery-wrapper .sqs-gallery-block-slideshow .sqs-gallery{height:600px !important}.collection-type-page.has-promoted-gallery.transparent-header #promotedGalleryWrapper .sqs-gallery-block-slideshow,.collection-type-index.has-promoted-gallery.transparent-header #promotedGalleryWrapper .sqs-gallery-block-slideshow,.collection-type-page.has-promoted-gallery.transparent-header .promoted-gallery-wrapper .sqs-gallery-block-slideshow,.collection-type-index.has-promoted-gallery.transparent-header .promoted-gallery-wrapper .sqs-gallery-block-slideshow{height:640px !important}.collection-type-page.has-promoted-gallery.transparent-header #promotedGalleryWrapper .sqs-gallery-block-slideshow .sqs-gallery,.collection-type-index.has-promoted-gallery.transparent-header #promotedGalleryWrapper .sqs-gallery-block-slideshow .sqs-gallery,.collection-type-page.has-promoted-gallery.transparent-header .promoted-gallery-wrapper .sqs-gallery-block-slideshow .sqs-gallery,.collection-type-index.has-promoted-gallery.transparent-header .promoted-gallery-wrapper .sqs-gallery-block-slideshow .sqs-gallery{height:640px !important}.collection-type-page.has-promoted-gallery.transparent-header #promotedGalleryWrapper .sqs-gallery-block-slideshow .meta .meta-inside,.collection-type-index.has-promoted-gallery.transparent-header #promotedGalleryWrapper .sqs-gallery-block-slideshow .meta .meta-inside,.collection-type-page.has-promoted-gallery.transparent-header .promoted-gallery-wrapper .sqs-gallery-block-slideshow .meta .meta-inside,.collection-type-index.has-promoted-gallery.transparent-header .promoted-gallery-wrapper .sqs-gallery-block-slideshow .meta .meta-inside{padding-top:40px}.collection-type-page.has-promoted-gallery.transparent-header.collection-type-index .index-section:not(:first-of-type) #promotedGalleryWrapper .sqs-gallery-block-slideshow,.collection-type-index.has-promoted-gallery.transparent-header.collection-type-index .index-section:not(:first-of-type) #promotedGalleryWrapper .sqs-gallery-block-slideshow,.collection-type-page.has-promoted-gallery.transparent-header.collection-type-index .index-section:not(:first-of-type) .promoted-gallery-wrapper .sqs-gallery-block-slideshow,.collection-type-index.has-promoted-gallery.transparent-header.collection-type-index .index-section:not(:first-of-type) .promoted-gallery-wrapper .sqs-gallery-block-slideshow{height:600px !important}.collection-type-page.has-promoted-gallery.transparent-header.collection-type-index .index-section:not(:first-of-type) #promotedGalleryWrapper .sqs-gallery-block-slideshow .sqs-gallery,.collection-type-index.has-promoted-gallery.transparent-header.collection-type-index .index-section:not(:first-of-type) #promotedGalleryWrapper .sqs-gallery-block-slideshow .sqs-gallery,.collection-type-page.has-promoted-gallery.transparent-header.collection-type-index .index-section:not(:first-of-type) .promoted-gallery-wrapper .sqs-gallery-block-slideshow .sqs-gallery,.collection-type-index.has-promoted-gallery.transparent-header.collection-type-index .index-section:not(:first-of-type) .promoted-gallery-wrapper .sqs-gallery-block-slideshow .sqs-gallery{height:600px !important}.collection-type-page.has-promoted-gallery.transparent-header.collection-type-index .index-section:not(:first-of-type) #promotedGalleryWrapper .sqs-gallery-block-slideshow .meta .meta-inside,.collection-type-index.has-promoted-gallery.transparent-header.collection-type-index .index-section:not(:first-of-type) #promotedGalleryWrapper .sqs-gallery-block-slideshow .meta .meta-inside,.collection-type-page.has-promoted-gallery.transparent-header.collection-type-index .index-section:not(:first-of-type) .promoted-gallery-wrapper .sqs-gallery-block-slideshow .meta .meta-inside,.collection-type-index.has-promoted-gallery.transparent-header.collection-type-index .index-section:not(:first-of-type) .promoted-gallery-wrapper .sqs-gallery-block-slideshow .meta .meta-inside{padding-top:0}.sqs-featured-posts-gallery .gallery-wrapper .posts{height:600px !important}.sqs-featured-posts-gallery .gallery-wrapper .posts .post{height:600px !important}.transparent-header .sqs-featured-posts-gallery .gallery-wrapper .posts{height:640px !important}.transparent-header .sqs-featured-posts-gallery .gallery-wrapper .posts .post{height:640px !important}.transparent-header .sqs-featured-posts-gallery .title-desc-wrapper{padding:60px 20px 20px}.view-list .banner-thumbnail-wrapper,.collection-type-page .banner-thumbnail-wrapper,.collection-type-blog.view-item .banner-thumbnail-wrapper{padding-top:0;padding-bottom:0}.view-list .banner-thumbnail-wrapper:not(.has-description),.collection-type-page .banner-thumbnail-wrapper:not(.has-description),.collection-type-blog.view-item .banner-thumbnail-wrapper:not(.has-description){min-height:120px}.view-list.transparent-header .banner-thumbnail-wrapper,.collection-type-page.transparent-header .banner-thumbnail-wrapper,.collection-type-blog.view-item.transparent-header .banner-thumbnail-wrapper{padding:60px 0 20px}.collection-type-index.view-list.transparent-header .index-section:not(:first-of-type) .banner-thumbnail-wrapper{padding-top:0;padding-bottom:0}}@media only screen and (max-device-height:640px){.collection-type-page.has-promoted-gallery #promotedGalleryWrapper .sqs-gallery-block-slideshow,.collection-type-index.has-promoted-gallery #promotedGalleryWrapper .sqs-gallery-block-slideshow,.collection-type-page.has-promoted-gallery .promoted-gallery-wrapper .sqs-gallery-block-slideshow,.collection-type-index.has-promoted-gallery .promoted-gallery-wrapper .sqs-gallery-block-slideshow{height:300px !important}.collection-type-page.has-promoted-gallery #promotedGalleryWrapper .sqs-gallery-block-slideshow .sqs-gallery,.collection-type-index.has-promoted-gallery #promotedGalleryWrapper .sqs-gallery-block-slideshow .sqs-gallery,.collection-type-page.has-promoted-gallery .promoted-gallery-wrapper .sqs-gallery-block-slideshow .sqs-gallery,.collection-type-index.has-promoted-gallery .promoted-gallery-wrapper .sqs-gallery-block-slideshow .sqs-gallery{height:300px !important}.collection-type-page.has-promoted-gallery.transparent-header #promotedGalleryWrapper .sqs-gallery-block-slideshow,.collection-type-index.has-promoted-gallery.transparent-header #promotedGalleryWrapper .sqs-gallery-block-slideshow,.collection-type-page.has-promoted-gallery.transparent-header .promoted-gallery-wrapper .sqs-gallery-block-slideshow,.collection-type-index.has-promoted-gallery.transparent-header .promoted-gallery-wrapper .sqs-gallery-block-slideshow{height:340px !important}.collection-type-page.has-promoted-gallery.transparent-header #promotedGalleryWrapper .sqs-gallery-block-slideshow .sqs-gallery,.collection-type-index.has-promoted-gallery.transparent-header #promotedGalleryWrapper .sqs-gallery-block-slideshow .sqs-gallery,.collection-type-page.has-promoted-gallery.transparent-header .promoted-gallery-wrapper .sqs-gallery-block-slideshow .sqs-gallery,.collection-type-index.has-promoted-gallery.transparent-header .promoted-gallery-wrapper .sqs-gallery-block-slideshow .sqs-gallery{height:340px !important}.collection-type-page.has-promoted-gallery.transparent-header.collection-type-index .index-section:not(:first-of-type) #promotedGalleryWrapper .sqs-gallery-block-slideshow,.collection-type-index.has-promoted-gallery.transparent-header.collection-type-index .index-section:not(:first-of-type) #promotedGalleryWrapper .sqs-gallery-block-slideshow,.collection-type-page.has-promoted-gallery.transparent-header.collection-type-index .index-section:not(:first-of-type) .promoted-gallery-wrapper .sqs-gallery-block-slideshow,.collection-type-index.has-promoted-gallery.transparent-header.collection-type-index .index-section:not(:first-of-type) .promoted-gallery-wrapper .sqs-gallery-block-slideshow{height:300px !important}.collection-type-page.has-promoted-gallery.transparent-header.collection-type-index .index-section:not(:first-of-type) #promotedGalleryWrapper .sqs-gallery-block-slideshow .sqs-gallery,.collection-type-index.has-promoted-gallery.transparent-header.collection-type-index .index-section:not(:first-of-type) #promotedGalleryWrapper .sqs-gallery-block-slideshow .sqs-gallery,.collection-type-page.has-promoted-gallery.transparent-header.collection-type-index .index-section:not(:first-of-type) .promoted-gallery-wrapper .sqs-gallery-block-slideshow .sqs-gallery,.collection-type-index.has-promoted-gallery.transparent-header.collection-type-index .index-section:not(:first-of-type) .promoted-gallery-wrapper .sqs-gallery-block-slideshow .sqs-gallery{height:300px !important}.sqs-featured-posts-gallery .gallery-wrapper .posts{height:300px !important}.sqs-featured-posts-gallery .gallery-wrapper .posts .post{height:300px !important}.transparent-header .sqs-featured-posts-gallery .gallery-wrapper .posts{height:340px !important}.transparent-header .sqs-featured-posts-gallery .gallery-wrapper .posts .post{height:340px !important}.view-list .banner-thumbnail-wrapper:not(.has-description),.collection-type-page .banner-thumbnail-wrapper:not(.has-description),.collection-type-blog.view-item .banner-thumbnail-wrapper:not(.has-description){min-height:80px}}@media only screen and (max-width:767px){#page{padding:32px}.collection-type-blog:not(.hide-sidebar) #content,.collection-type-blog:not(.hide-sidebar) #rightSidebar{display:block;width:100%}.collection-type-blog:not(.hide-sidebar) #rightSidebar{padding-top:20px;padding-left:0}.has-promoted-gallery #promotedGalleryWrapper .sqs-gallery-block-slideshow .meta,.has-promoted-gallery .promoted-gallery-wrapper .sqs-gallery-block-slideshow .meta{max-width:90% !important;width:90% !important}.has-promoted-gallery #promotedGalleryWrapper .sqs-gallery-block-slideshow .meta .meta-inside,.has-promoted-gallery .promoted-gallery-wrapper .sqs-gallery-block-slideshow .meta .meta-inside{padding:0 20px}.has-promoted-gallery #promotedGalleryWrapper .sqs-gallery-block-slideshow .meta .meta-inside p,.has-promoted-gallery .promoted-gallery-wrapper .sqs-gallery-block-slideshow .meta .meta-inside p{width:90% !important}.sqs-featured-posts-gallery .title-desc-wrapper{max-width:90% !important;width:90% !important;text-align:center;padding:0 20px}.sqs-featured-posts-gallery .title-desc-wrapper .post-excerpt{max-width:90%}}@media only screen and (max-device-width:667px){.back-to-top-nav{display:block}.back-to-top{display:inline-block}.back-to-top a{display:block;padding:.75em 1em}}@media only screen and (max-width:640px){.sqs-layout [class*=sqs-col]{float:none !important;width:auto !important}.sqs-layout .spacer-block{display:none}.sqs-layout .sqs-row .sqs-block:first-child{padding-top:17px !important}.sqs-layout .sqs-row .sqs-block:last-child{padding-bottom:17px !important}.sqs-layout .sqs-row+.sqs-row,.sqs-layout .sqs-row+.sqs-block{margin-top:0 !important}.sqs-gallery-design-grid-slide{width:50% !important;margin:0 0 10px 0 !important}#page{padding:40px 20px}#header{padding:0 20px}h1,.entry-title{font-size:30px}.sqs-block-horizontalrule hr{margin:initial}blockquote{padding:.5em 20px}.quote-block figure{padding:20px}.entry-header{margin-bottom:12px}.view-list .filter-heading{margin:0 auto;padding:1em 1em 0}.view-list .entry+.entry{margin-top:80px}body:not(.collection-type-gallery) .desc-wrapper p,body:not(.collection-type-gallery).has-promoted-gallery #promotedGalleryWrapper .sqs-gallery-block-slideshow .meta-description p,body:not(.collection-type-gallery).has-promoted-gallery .promoted-gallery-wrapper .sqs-gallery-block-slideshow .meta-description p{font-size:18px;margin:10px auto}body:not(.collection-type-gallery) .desc-wrapper p>strong,body:not(.collection-type-gallery).has-promoted-gallery #promotedGalleryWrapper .sqs-gallery-block-slideshow .meta-description p>strong,body:not(.collection-type-gallery).has-promoted-gallery .promoted-gallery-wrapper .sqs-gallery-block-slideshow .meta-description p>strong,body:not(.collection-type-gallery) .desc-wrapper p>em>strong,body:not(.collection-type-gallery).has-promoted-gallery #promotedGalleryWrapper .sqs-gallery-block-slideshow .meta-description p>em>strong,body:not(.collection-type-gallery).has-promoted-gallery .promoted-gallery-wrapper .sqs-gallery-block-slideshow .meta-description p>em>strong{font-size:30px;letter-spacing:2px}body:not(.collection-type-gallery) .desc-wrapper p:last-child>a,body:not(.collection-type-gallery).has-promoted-gallery #promotedGalleryWrapper .sqs-gallery-block-slideshow .meta-description p:last-child>a,body:not(.collection-type-gallery).has-promoted-gallery .promoted-gallery-wrapper .sqs-gallery-block-slideshow .meta-description p:last-child>a{font-size:13px;margin:5px auto}.collection-type-page.has-promoted-gallery .main-content .sqs-layout>.sqs-row:first-child>.sqs-col-12:first-child{width:100% !important}.collection-type-page.has-promoted-gallery .main-content .sqs-layout>.sqs-row:first-child>.sqs-col-12:first-child>.gallery-block:first-child{padding-top:0 !important;padding-bottom:0 !important}.collection-type-page.has-promoted-gallery .main-content .sqs-layout>.sqs-row:first-child>.sqs-col-12:first-child>.gallery-block:first-child .sqs-gallery{height:300px !important}.collection-type-page.has-promoted-gallery #promotedGalleryWrapper .sqs-gallery-block-slideshow .meta .meta-inside,.collection-type-index.has-promoted-gallery .promoted-gallery-wrapper .sqs-gallery-block-slideshow .meta .meta-inside{padding:20px}.collection-type-page.has-promoted-gallery #promotedGalleryWrapper .sqs-video-wrapper+.meta,.collection-type-index.has-promoted-gallery .promoted-gallery-wrapper .sqs-video-wrapper+.meta{display:none}.sqs-featured-posts-gallery .title-desc-wrapper{padding:20px 20px}.sqs-featured-posts-gallery .title-desc-wrapper .post-title,.sqs-featured-posts-gallery .title-desc-wrapper .post-title a{font-size:30px;letter-spacing:2px}.sqs-featured-posts-gallery .title-desc-wrapper .post-excerpt{display:none}.blog-item-wrapper .post-title,.blog-item-wrapper .post-title a{font-size:30px;letter-spacing:2px}.blog-item-wrapper .post-date,.blog-item-wrapper .post-author,.blog-item-wrapper .post-category,.blog-item-wrapper .post-date a,.blog-item-wrapper .post-author a,.blog-item-wrapper .post-category a{font-size:18px}.header-inner{padding:20px 0;display:block}.footer-inner,.pre-footer-inner .sqs-layout{padding:20px}#logoWrapper,#siteTitleWrapper{display:inline-block;vertical-align:middle;max-width:240px;padding:0;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}#logoWrapper #logoImage img,#siteTitleWrapper #logoImage img{max-height:50px;max-width:100%;width:auto;height:auto}#logoWrapper{width:140px}#productList .product{margin-bottom:40px}#productList .product .product-title{margin-top:.5em}.sqs-featured-posts-gallery .title-desc-wrapper .view-post{display:none}.sqs-featured-posts-gallery .title-desc-wrapper .view-post:before,.sqs-featured-posts-gallery .title-desc-wrapper .view-post:after{display:none}.sqs-featured-posts-gallery .title-desc-wrapper .post-date,.sqs-featured-posts-gallery .title-desc-wrapper .post-category,.sqs-featured-posts-gallery .title-desc-wrapper .post-author{font-size:16px}.index-section-wrapper.page-content{padding:20px}body{-webkit-animation:bugfix infinite 1s}@-webkit-keyframes bugfix{from{padding:0}to{padding:0}}#headerNav{display:none}#siteTitle,#siteTitle a{font-size:16px;line-height:1}#showOnScrollWrapper{display:none}.mobile-nav-toggle-label{display:none;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;z-index:100;width:10%;position:absolute;z-index:1002;top:50%;right:20px;margin-top:-8px;padding:0;vertical-align:middle;line-height:16px;text-align:right;cursor:pointer;user-select:none;color:#fff;width:22px;height:22px}.mobile-nav-toggle-label .top-bar,.mobile-nav-toggle-label .middle-bar,.mobile-nav-toggle-label .bottom-bar{width:22px;height:2px;background-color:#fff;-webkit-transition:-webkit-transform .15s 0s ease-in-out,top .15s .15s ease-in-out;-moz-transition:-moz-transform .15s 0s ease-in-out,top .15s .15s ease-in-out;-ms-transition:-ms-transform .15s 0s ease-in-out,top .15s .15s ease-in-out;-o-transition:-o-transform .15s 0s ease-in-out,top .15s .15s ease-in-out;transition:transform .15s 0s ease-in-out,top .15s .15s ease-in-out;-webkit-transform-origin:50% 50%;-moz-transform-origin:50% 50%;-ms-transform-origin:50% 50%;-o-transform-origin:50% 50%;transform-origin:50% 50%;position:absolute;top:0;right:0}.mobile-nav-toggle-label .middle-bar{-webkit-transition:opacity 0s .15s linear;-moz-transition:opacity 0s .15s linear;-ms-transition:opacity 0s .15s linear;-o-transition:opacity 0s .15s linear;transition:opacity 0s .15s linear;top:7px}.mobile-nav-toggle-label .bottom-bar{top:14px}.mobile-nav-toggle-label.fixed-nav-toggle-label{position:fixed;top:5px;right:5px;z-index:1001;visibility:hidden;opacity:0;padding:20px;margin-top:0;background-color:#212121;width:42px;height:36px;-webkit-transition:opacity .17s ease-in-out;-moz-transition:opacity .17s ease-in-out;-ms-transition:opacity .17s ease-in-out;-o-transition:opacity .17s ease-in-out;transition:opacity .17s ease-in-out}.mobile-nav-toggle-label.fixed-nav-toggle-label .top-bar,.mobile-nav-toggle-label.fixed-nav-toggle-label .middle-bar,.mobile-nav-toggle-label.fixed-nav-toggle-label .bottom-bar{margin-top:12px;margin-right:10px}.fix-header-nav .mobile-nav-toggle-label.fixed-nav-toggle-label{visibility:visible;opacity:1}#sidecarNav .folder-toggle-label~.subnav,#secondaryNavWrapper .folder-toggle-label~.subnav{height:0;max-height:0;overflow:hidden;padding:0 1.5em;font-size:14px}#sidecarNav .folder-toggle-label~.subnav>div,#secondaryNavWrapper .folder-toggle-label~.subnav>div{padding:.5em 0}#sidecarNav .folder-toggle-box:checked~.subnav,#secondaryNavWrapper .folder-toggle-box:checked~.subnav{height:auto;max-height:999px;padding:0 1em 1em}#siteWrapper{height:99.9%;width:100%;-webkit-transition:-webkit-transform .14s ease-in-out;-moz-transition:-moz-transform .14s ease-in-out;-ms-transition:-ms-transform .14s ease-in-out;-o-transition:-o-transform .14s ease-in-out;transition:transform .14s ease-in-out}#mobileNavToggle:checked~#sidecarNav{-webkit-overflow-scrolling:touch;visibility:visible;-webkit-transition:height 0s .14s linear,visibility 0s 0s linear;-moz-transition:height 0s .14s linear,visibility 0s 0s linear;-ms-transition:height 0s .14s linear,visibility 0s 0s linear;-o-transition:height 0s .14s linear,visibility 0s 0s linear;transition:height 0s .14s linear,visibility 0s 0s linear}#mobileNavToggle:checked~.sqs-announcement-bar-dropzone{display:none}#mobileNavToggle:checked~#siteWrapper{position:fixed;height:100%;-webkit-transform:translate3d(-260px,0,0);-moz-transform:translate3d(-260px,0,0);-ms-transform:translate3d(-260px,0,0);-o-transform:translate3d(-260px,0,0);transform:translate3d(-260px,0,0)}#mobileNavToggle:checked~#siteWrapper .mobile-nav-toggle-label .top-bar,#mobileNavToggle:checked~#siteWrapper .mobile-nav-toggle-label .bottom-bar{-webkit-transition:top .15s .15s ease-in-out,-webkit-transform .15s .3s ease-in-out;-moz-transition:top .15s .15s ease-in-out,-moz-transform .15s .3s ease-in-out;-ms-transition:top .15s .15s ease-in-out,-ms-transform .15s .3s ease-in-out;-o-transition:top .15s .15s ease-in-out,-o-transform .15s .3 ease-in-out;transition:top .15s .15s ease-in-out,transform .15s .3s ease-in-out}#mobileNavToggle:checked~#siteWrapper .mobile-nav-toggle-label .top-bar{-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);-o-transform:rotate(45deg);transform:rotate(45deg);top:7px}#mobileNavToggle:checked~#siteWrapper .mobile-nav-toggle-label .middle-bar{opacity:0}#mobileNavToggle:checked~#siteWrapper .mobile-nav-toggle-label .bottom-bar{-webkit-transform:rotate(-45deg);-moz-transform:rotate(-45deg);-ms-transform:rotate(-45deg);-o-transform:rotate(-45deg);transform:rotate(-45deg);top:7px}.enable-nav-button #sidecarNav nav>div:not(.folder):last-child a{display:inline-block;margin:.75em 0 0 0;line-height:1;padding:1em 1.5em}.folder-toggle-box:checked~.subnav{padding:.25em 0 .5em}.pre-footer-inner,.footer-inner{text-align:center}.pre-footer-inner .socialaccountlinks-block .social-account-list,.footer-inner .socialaccountlinks-block .social-account-list,.pre-footer-inner .back-to-top,.footer-inner .back-to-top{text-align:center;margin:24px 0}.pre-footer-inner .sqs-block-button-container--right,.footer-inner .sqs-block-button-container--right,.pre-footer-inner .sqs-block-button-container--center,.footer-inner .sqs-block-button-container--center,.pre-footer-inner .sqs-block-button-container--left,.footer-inner .sqs-block-button-container--left{text-align:center}#secondaryNavWrapper #secondaryNavigation div{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;display:block}#secondaryNavWrapper #secondaryNavigation div a,#secondaryNavWrapper #secondaryNavigation div label{display:block;padding:.7em 0}#secondaryNavWrapper #secondaryNavigation>div{margin-right:0%}.site-phone,.site-email{display:block;margin-left:0 !important}.site-email>span{display:none}.site-email:before{content:'Email'}.folder-nav-toggle-label,.category-nav-toggle-label{display:block;width:100%;z-index:2;position:absolute;top:0;right:0;padding-top:12px;cursor:pointer;font-size:21px;line-height:14px;text-align:right}.folder-nav-toggle-label:after,.category-nav-toggle-label:after{content:"+";display:block;text-align:right}#folderNav,#categoryNav{display:block;width:100%;position:relative;padding-bottom:1.5em}#folderNav+#content,#categoryNav+#content{display:block;width:100%}#folderNav .folder-nav,#categoryNav .folder-nav{position:relative;z-index:1}#folderNav .category-nav,#categoryNav .category-nav{margin-bottom:1em;position:relative;z-index:1}#folderNav li,#categoryNav li{padding-top:.75em;padding-bottom:.75em}#folderNav li.nav-section-label,#categoryNav li.nav-section-label{display:none}#folderNav li.filter,#categoryNav li.filter{display:block;visibility:visible}#folderNav li a,#categoryNav li a,#folderNav li.nav-section-label,#categoryNav li.nav-section-label{font-size:14px;line-height:1}#folderNav li:not(.filter),#categoryNav li:not(.filter){display:none}.collection-type-page:not(.hide-page-sidebar) #folderNav+#content,.collection-type-products:not(.hide-products-sidebar) #folderNav+#content,.collection-type-page:not(.hide-page-sidebar) #categoryNav+#content,.collection-type-products:not(.hide-products-sidebar) #categoryNav+#content{display:block;width:100%}#folderNav #folderNavToggle:checked+.folder-nav-toggle-label{z-index:0}#folderNav #folderNavToggle:checked+.folder-nav-toggle-label:after{content:'–'}#folderNav #folderNavToggle:checked~.folder-nav li:not(.active-link){display:block}#folderNav #folderNavToggle:checked~.folder-nav li:not(.active-link).nav-section-label{display:none}#categoryNav #categoryNavToggle:checked+.category-nav-toggle-label{z-index:0}#categoryNav #categoryNavToggle:checked+.category-nav-toggle-label:after{content:'–'}#categoryNav #categoryNavToggle:checked~.category-nav li:not(.filter){display:block}#categoryNav #categoryNavToggle:checked~.category-nav li:not(.filter).nav-section-label{display:none}}@media only screen and (max-width:480px){#promotedGalleryWrapper .sqs-gallery-block-slideshow .meta,.promoted-gallery-wrapper .sqs-gallery-block-slideshow .meta{display:block !important}}.site-title-font{font-family:"proxima-nova";font-size:27px;text-transform:none;letter-spacing:0px;font-weight:300;font-style:normal}.nav-font{font-family:"proxima-nova";font-size:14px;text-transform:uppercase;text-decoration:none;letter-spacing:2px;font-weight:700;font-style:normal}.nav-button-font{font-family:"proxima-nova";text-transform:uppercase;text-decoration:none;letter-spacing:1px;font-weight:700;font-style:normal}.banner-heading-font{font-family:"adelle-sans";font-size:41px;line-height:1em;text-transform:none;letter-spacing:4px;font-weight:100;font-style:normal}.banner-text-font{font-family:"camingodos-web";font-size:49px;line-height:1em;text-transform:none;letter-spacing:1px;font-weight:400;font-style:normal}.banner-button-font{font-family:"proxima-nova";font-size:20px;text-transform:uppercase;text-decoration:none;letter-spacing:2px;font-weight:700;font-style:normal}.body-font{font-family:"adelle-sans";font-size:16px;line-height:1.7em;letter-spacing:0px;font-weight:400;font-style:normal}.heading1-font{font-family:"adelle-sans";font-size:32px;line-height:1.2em;text-transform:none;letter-spacing:0px;font-weight:400;font-style:normal}.heading2-font{font-family:"proxima-nova";font-size:22px;line-height:1.2em;text-transform:uppercase;letter-spacing:2px;font-weight:400;font-style:normal}.heading3-font{font-family:"proxima-nova";font-size:16px;line-height:1em;text-transform:uppercase;letter-spacing:1px;font-weight:600;font-style:normal}.quote-font{font-family:"adobe-garamond-pro";font-size:20px;line-height:1.65em;letter-spacing:0px;font-weight:400;font-style:normal}.summary-heading-font{font-family:"proxima-nova","Helvetica Neue",Helvetica,Arial,sans-serif;text-transform:uppercase;letter-spacing:1px;font-weight:400;font-style:normal}.subnav-title-font{font-family:"adobe-garamond-pro";font-size:22px;text-transform:none;text-decoration:none;letter-spacing:0px;font-weight:400;font-style:normal}.subnav-link-font{font-family:"proxima-nova";font-size:14px;text-transform:uppercase;text-decoration:none;letter-spacing:2px;font-weight:600;font-style:normal}.footer-nav-font{font-family:"proxima-nova";font-size:13px;text-transform:uppercase;text-decoration:none;letter-spacing:2px;font-weight:400;font-style:normal}.site-info-font{font-family:"proxima-nova";font-size:14px;text-transform:uppercase;text-decoration:none;letter-spacing:2px;font-weight:400;font-style:normal}.small-button-block-font{font-family:"proxima-nova";text-transform:uppercase;letter-spacing:1px;font-weight:600;font-style:normal}.medium-button-block-font{font-family:"proxima-nova","Helvetica Neue",Helvetica,Arial,sans-serif;text-transform:uppercase;letter-spacing:1px;font-weight:600;font-style:normal}.large-button-block-font{font-family:"proxima-nova";text-transform:uppercase;letter-spacing:1px;font-weight:600;font-style:normal}.system-button-font{font-family:"proxima-nova";text-transform:uppercase;letter-spacing:.6px;font-weight:600;font-style:normal}.announcement-bar-font{font-family:"proxima-nova";font-size:19px;text-transform:none;letter-spacing:1px;font-weight:700;font-style:normal} /*! Squarespace LESS Compiler (less.js language v1.3.3) */ #header{position:fixed !important;padding:5;height:5;background-color:rgba(41,41,45,.9) !important}#preFooter{display:none} ================================================ FILE: themes/prism.css ================================================ /* http://prismjs.com/download.html?themes=prism-okaidia&languages=markup+css+clike+javascript+c+csharp+cpp */ /** * okaidia theme for JavaScript, CSS and HTML * Loosely based on Monokai textmate theme by http://www.monokai.nl/ * @author ocodia */ code[class*="language-"], pre[class*="language-"] { color: #f8f8f2; text-shadow: 0 1px rgba(0, 0, 0, 0.3); font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; direction: ltr; text-align: left; white-space: pre; word-spacing: normal; word-break: normal; line-height: 1.5; -moz-tab-size: 4; -o-tab-size: 4; tab-size: 4; -webkit-hyphens: none; -moz-hyphens: none; -ms-hyphens: none; hyphens: none; } /* Code blocks */ pre[class*="language-"] { padding: 1em; margin: .5em 0; overflow: auto; border-radius: 0.3em; } :not(pre) > code[class*="language-"], pre[class*="language-"] { background: #272822; } /* Inline code */ :not(pre) > code[class*="language-"] { padding: .1em; border-radius: .3em; } .token.comment, .token.prolog, .token.doctype, .token.cdata { color: slategray; } .token.punctuation { color: #f8f8f2; } .namespace { opacity: .7; } .token.property, .token.tag, .token.constant, .token.symbol, .token.deleted { color: #f92672; } .token.boolean, .token.number { color: #ae81ff; } .token.selector, .token.attr-name, .token.string, .token.char, .token.builtin, .token.inserted { color: #a6e22e; } .token.operator, .token.entity, .token.url, .language-css .token.string, .style .token.string, .token.variable { color: #f8f8f2; } .token.atrule, .token.attr-value, .token.function { color: #e6db74; } .token.keyword { color: #66d9ef; } .token.regex, .token.important { color: #fd971f; } .token.important, .token.bold { font-weight: bold; } .token.italic { font-style: italic; } .token.entity { cursor: help; } ================================================ FILE: troubleshooting.md ================================================ # Troubleshooting ## Connection If you experience connection problems, follow these steps: 1. Check that your hardware, wires, cables and power supply are good quality, not harmed or damaged, etc. Use high power USB cables and USB ports. 2. Check your wiring using the examples \(TCP/HTTP Client or similar\) **provided with your shield and hardware**. * Once you understand how to manage connection, it's much easier to use Blynk. 3. Try running command `telnet blynk-cloud.com 80` from your PC, connected to the same network as your hardware. You should see something like: `Connected to blynk-cloud.com.`. 4. Try running Blynk default examples for your platform **without modifications** to see if it is working. * Double-check that you have selected **the right example** for your connection type and hardware model. * Our examples come with **comments and explanations**. **Read them carefully.** * Check that your Auth Token is valid \(copied from the App and **doesn't contain spaces, etc.**\) * If it doesn't work, try looking into [serial debug prints](./#enable-debug). 5. Done! Add your modifications and functionality. Enjoy Blynk! _**Note:**_ when you have multiple devices connected to your network, they should all have different MAC and IP addresses. For example, when using 2 Arduino UNO with Ethernet shields, flashing default example to both of them will cause connection problems. You should use [manual ethernet configuration](https://github.com/blynkkk/blynk-library/blob/master/examples/Boards_Ethernet/Arduino_Ethernet_Manual/Arduino_Ethernet_Manual.ino) example. ## WiFi network connection If you encounter WiFi connection problems, please check these pitfalls: * You're trying to connect to "WPA & WPA2 Enterprise" network \(often used in offices\), and your shield does not support this security method * Your WiFi network has a login page that requests entering an access token \(often used in restaurants\) * Your WiFi network security disallows connecting alien devices completely \(MAC filtering, etc\) * There is a firewall running. Default port for hardware connections is 80. Make sure it's open. ## Delay If you use long `delay()` or send your hardware to sleep inside of the `loop()` expect connection drops and downgraded performance. _**DON'T DO THAT:**_ ```cpp void loop() { ... delay(1000); // this is long delay, that should be avoided other_long_operation(); ... Blynk.run(); } ``` _**Note:**_ This also applies to the BLYNK\_READ & BLYNK\_WRITE handlers! _**SOLUTION:**_ If you need to perform actions in time intervals - use timers, for example [BlynkTimer](./#blynk-firmware-blynktimer). ## Flood Error If your code frequently sends a lot of requests to our server, your hardware will be disconnected. Blynk App may show "Your hardware is offline" When `Blynk.virtualWrite` is in the `void loop`, it generates hundreds of "writes" per second Here is an example of what may cause flood. _**DON'T DO THAT:**_ ```cpp void loop() { Blynk.virtualWrite(1, value); // This line sends hundreds of messages to Blynk server Blynk.run(); } ``` _**SOLUTION:**_ If you need to perform actions in time intervals - use timers, for example [BlynkTimer](./#blynk-firmware-blynktimer). Using `delay()` will not solve the problem either. It may cause [another issue](./#delay). Use timers! If sending hundreds of requests is what you need for your product you may increase flood limit on local server and within Blynk library. For local server you need to change `user.message.quota.limit` property within `server.properties` file : ```text #100 Req/sec rate limit per user. user.message.quota.limit=100 ``` For library you need to change `BLYNK_MSG_LIMIT` property within `BlynkConfig.h` file : ```text //Limit the amount of outgoing commands. #define BLYNK_MSG_LIMIT 20 ``` ## Enable debug To enable debug prints on the default Serial, add this on the top of your sketch **\(it should be the first line in your sketch\)**: ```cpp #define BLYNK_DEBUG // Optional, this enables lots of prints #define BLYNK_PRINT Serial ``` And enable serial in `void setup()`: ```cpp Serial.begin(9600); ``` You can also use spare Hardware serial ports or SoftwareSerial for debug output \(you will need an adapter to connect to it with your PC\). _**Note:**_ enabling debug mode will slow down your hardware processing speed up to 10 times. ## Geo DNS problem Geo DNS issue is no longer a problem. It was solved in 2017. ## Reset password On login screen click on "Forgot password?" label and than type your email and `Send` button. You'll get instruction on your email. ### Android reset password flow 1. Open instruction email **from your smartphone or tablet**; 2. Click on "Reset now" button in your email; 3. Click on Blynk icon in below popup and reset the pass: ![](.gitbook/assets/reset.png) ================================================ FILE: untitled/README.md ================================================ # blynkkk/blynkkk.github.io ## Files [Permalink](tree/blynkkk-blynkkk.github.io.md) Failed to load latest commit information. Type Name Latest commit message Commit time ## About GitHub pages ### Resources ### License You can’t perform that action at this time. ================================================ FILE: untitled/accelerometer.md ================================================ # Accelerometer Accelerometer is kind of [motion sensors](https://developer.android.com/guide/topics/sensors/sensors_motion.html) that allows you to detect motion of your smartphone. Useful for monitoring device movement, such as tilt, shake, rotation, or swing. Conceptually, an acceleration sensor determines the acceleration that is applied to a device by measuring the forces that are applied to the sensor. Measured in `m/s^2` applied to `x`, `y`, `z` axis. In order to accept data from it you need to : ```cpp BLYNK_WRITE(V1) { //acceleration force applied to axis x int x = param[0].asFloat(); //acceleration force applied to axis y int y = param[1].asFloat(); //acceleration force applied to axis z int z = param[2].asFloat(); } ``` Accelerometer doesn't work in background. ================================================ FILE: untitled/archive/README.md ================================================ # archive ================================================ FILE: untitled/archive/bad-request-github.md ================================================ # Bad request · GitHub You have sent an invalid request. Please do not send this request again. ================================================ FILE: untitled/archive/joystick.md ================================================ # joystick ## Джойстик \(Joystick\) Управление сервоприводом в 4 направлениях. ### Параметры: * **Раздельный** \(SPLIT\): Каждый из параметров отправляется непосредственно на пин вашего оборудования \(например, D7 и D8\). Вам не нужно писать код. **ПРИМЕЧАНИЕ:** В этом режиме вы отправляете несколько команд из одного виджета, что может снизить производительность вашего оборудования. **Пример:** Если у вас есть виджет Джойстика и он настроен на D3 и D4, он отправит две команды через Интернет: ```cpp digitalWrite(3, x); digitalWrite(4, y); ``` * **Совмещенный** \(MERGE\): Когда выбран режим MERGE, вы отправляете только 1 сообщение, состоящее из массива значений. Но вам нужно разобрать его на оборудовании устройства. Этот режим можно использовать только с виртуальными пин-ами. **Пример:** добавьте виджет Джойстика и установите его в режим "MERGE". Выберите виртуальный пин V1 ```cpp BLYNK_WRITE(V1) // Joystick assigned to V1 { // получить x int x = param[0].asInt(); // получить y int y = param[1].asInt(); } ``` * **Вращать при Наклоне** \(Rotate on Tilt\) Когда это параметр включен, Джойстик будет автоматически вращаться, если вы будете использовать смартфон в горизонтальной положении. * **Автовозврат** \(Auto-Return\) Когда это парамтер выключен, ручка джойстика не вернется в центральное положение. Она останется там, где вы ее оставили. ## Отправка при Отжатии \(Send On Release\) **Send On Release** доступно для большинства виджетов контроллеров и позволяет уменьшить трафик данных на ваше оборудование. Например, когда вы перемещаете виджет джойстика, команды непрерывно передаются на аппаратное устройство, во время одного движения джойстика вы можете отправлять десятки команд. Есть случаи, когда это необходимо, однако создание такой нагрузки может привести к зависанию или сбросу оборудования. Мы рекомендуем включить функцию **Send On Release** для большинства случаев, если вам не требуется мгновенная обратная связь. Эта опция включена по умолчанию. ## Интервал записи \(Write interval\) Похоже на вышеуказанный вариант. Однако, позволяет вам передавать значения на ваше оборудование в через определенные интервалы времени. Например, установка интервала записи на 100 мс означает, что при перемещении ползунка на аппаратное обеспечение будет отправлено только 1 значение в течение 100 мс. Эта опция также используется для уменьшения трафика данных на ваше оборудовании. **Пример кода:** [Джойстик две оси](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/JoystickTwoAxis/JoystickTwoAxis.ino) ================================================ FILE: untitled/archive/super_chart.md ================================================ # Диаграмма \(SuperChart\) Диаграмма используется для живой визуализации и хранения данных. Вы можете использовать виджет для логирования данных датчиков, бинарных событий и многого другого. Чтобы использовать виджет Диаграмма, вам нужно будет передать данные с оборудования с желаемым интервалом, используя таймеры. [Здесь приведен](https://examples.blynk.cc/?board=ESP8266&shield=ESP8266%20WiFi&example=GettingStarted%2FPushData) базовый пример передачи данных. ## Взаимодействие: * **Переключение между режимами текущий и временной** Нажмите диапазоны времени в нижней части виджета, чтобы изменить масштаб Диаграммы по времени. * **Тап по легенде графиков** показать или скрыть поток данных. * **Долгий тап на графике** покажет метку времени и соответствующие значения. * **Быстро проведите пальцем влево или вправо, чтобы увидеть предыдущие данные** впоследствии вы можете прокручивать данные назад и вперед в пределах заданного временного диапазона. * **Полноэкранный режим** нажмите эту кнопку, чтобы открыть полноэкранный режим в альбомной ориентации. Чтобы выйти из режима полного экрана, просто поверните телефон обратно в портретный режим. График должен вращаться автоматически. В полноэкранном режиме вы увидите X \(время\) и несколько шкал Y. Полноэкранный режим можно отключить в настройках виджета. * **Кнопка меню** Кнопка меню откроет дополнительные функции: * Экспорт в CSV * Стереть данные на сервере ## Настройки диаграммы: * **Заголовок диаграммы \(Chart Title\)** общее наименование диаграммы. * **Размер шрифта заголовка \(Title Font Size\)** выберите из 3 размеров шрифта. * **Выравнивание заголовка \(Title Alignment\)** выберите выравнивание заголовка диаграммы. Этот параметр влияет на положение заголовка и легенды в виджете. * **Показать ось X \(время\) \(Show x-axis \(time\)\)** выберите настройку, если хотите показать шкалу времени внизу графика. * **Автоматическое масштабирование для всех потоков данных \(Override Auto Scaling for All Datastreams\)** отключение этой опции позволит выполнить ручную настройку для оси Y \(см. ниже\). * **Выбор масштаба времени \(Time ranges picker\)** Позволяет выбрать необходимые периоды \(`15m`,`30m`, `1h`,`3h`, ...\) и разрешение для вашего графика. Разрешение определяет, насколько подробные ваши данные. Прямо сейчас график поддерживает два типа разрешения: `standard` и `high`. Разрешение также зависит от выбранного периода. Например, `standard` разрешение для `1d` означает, что вы будете получать 24 значения в день \(одно в час\), а при `high` разрешении вы будете получать за`1d` 1440 значений в день \(одно в минуту\). * **Потоки данных \(Datastreams\)** добавить потоки данных \(см. ниже, как настроить потоки данных\). ## Настройки потоков данных Виджет поддерживает до 4 потоков данных. Нажмите значок настроек потоков данных, чтобы открыть настройки. **Дизайн \(Design\)** выберите доступные типы диаграмм: * Линейная \(Line\) * С областями \(Area\) * Гистограмма \(Bar\) * Бинарная \(Binary\) \(приведение данных к двоичному виду\) **Цвет \(Color\)** выберите сплошные цвета или градиенты. **Источник и ввод \(Source and input\)** - Вы можете использовать три типа источника данных: **1. Виртуальный пин \(Virtual Pin\)** - выберите желаемое устройство и виртуальный пин для получения данных. **2. Теги \(Tags\)** - диаграмма может агрегировать данные с нескольких устройств, используя встроенные функции агрегирования. Например, если у вас есть 10 датчиков температуры, посылающих температуру с заданным интервалом, Вы можете отобразить среднее значение от 10 датчиков в виджете. Использование тегов: * [**Добавить Тэг**](http://docs.blynk.cc/#blynk-main-operations-control-of-multiple-devices-tags) на каждое устройство, с которого вы хотите агрегировать данные. Это можно сделать в настройках проекта Blynk. * **Отправить данные в виртуальный пин \(Push data to the same Virtual Pin\)** на каждое устройство. \(т.е. `Blynk.virtualWrite (V0, temperature);`\) * **Выберите тег в качестве источника \(Choose Tag as a source\)** в виджете Диаграмма и используйте пин, куда поступают данные \(т.е. V0\) **Добступные функции:** * `SUM` будет суммировать все входящие значения в указанный виртуальный пин со всех устройств, помеченные выбранным тегом * `AVG` будет вычислять среднее значение * `MED` найдет среднее значение * `MIN` будет вычислять минимальное значение * `MAX` будет вычислять максимальное значение **ВАЖНО: Теги не работают в режиме реального времени.** **3.** [**Выбор устройства \(Device Selector\)**](https://github.com/blynkkk/blynkkk.github.io/tree/master/mobile/ru/%20device_selector.md) Если вы добавите виджет Выбор устройства в свой проект, вы можете использовать его в качестве источника данных для Диаграммы. В том случае, когда вы меняете устройство, диаграмма будет автоматически обновляться. ## Настройки оси Y \(Y-Axis Settings\) Cуществует 4 режима масштабирования данных вдоль оси Y, активируется после отключения общей настройки виджета "Автоматическое масштабирование для всех потоков данных \(Override Auto Scaling for All Datastreams\)". **1. Авто \(Auto\)** Данные будут автоматически масштабироваться на основе минимальных и максимальных значений заданного периода времени. Это лучший вариант для начинающих. **2. Минимальный/Максимальный \(Min/Max\)** Когда выбран этот режим, шкала Y будет установлена на выбранные вами границы значений. Например, если ваше оборудование отправляет данные со значениями от -100 до 100, вы можете установить эти границы и данные графика будут отображены полностью. Вы также можете визуализировать данные в другом диапазоне. Допустим, входящие данные имеют значения в диапазоне 0-55, но вы хотели бы видеть только значения в диапазоне 30-50. Вы можете настроить диапазон, но если значения не соответствуют заданному масштабу оси Y, диаграмма будет обрезана. **3. Процент от высоты \(% of Height\)** Эта опция позволяет автоматически масштабировать входящие данные на виджете и размещать их так, как вы хотите. В этом режиме вы устанавливаете процент высоты виджета на экране от 0% до 100%. Если вы установите диапазон 0-100%, это будет полная автоматическая шкала. Независимо от того, в каком диапазоне поступают данные, он всегда будет масштабирован по всей высоте виджета. Если вы установите его на 0-25%, то график будет отображаться только на 1/4 высоты виджета. Этот параметр очень полезен для **Бинарной диаграммы** или для визуализации нескольких потоков данных на одной и той же диаграмме разными способами. **4. Дельта \(Delta\)** Пока данные остаются в пределах заданного значения дельты, график будет автоматически масштабироваться в этом диапазоне. Если дельта превышает диапазон, график автоматически масштабируется до минимальных/максимальных значений указанного периода. **Суффикс \(Suffix\)** Здесь вы можете указать суффикс, который будет отображаться со значениями во время длительного тап на графике. **Разрядность \(Decimals\)** Определяет формат числовых значений, когда вы нажимаете и удерживаете палец на графике. Возможные варианты: \#, \#.\#, \#.\#\#, и т.д. **Соединиить отсуствующие точки графика \(Connect Missing Data Points\)** Если этот переключатель включен, то Диаграмма соединит все точки, даже если данные частично отсуствуют. Если для него установлено значение «ВЫКЛ», то вы увидите пропуски в случае отсутствия данных. **Настройки Бинарной диаграммы \(Binary Chart Settings\)** Этот тип диаграммы полезен для построения двоичных данных, например, когда устройство было включено или выключено, или когда было обнаружено движение или когда был достигнут определенный порог значений. Вам необходимо указать точку **Перехода \(FLIP\)**, которая будет точкой, в которой входящие данные будут принимать состояние `ИСТИНА (TRUE)` или `ЛОЖЬ (FALSE)`. Например, вы отправляете данные в диапазоне от 0 до 1023. Если вы установите `512` в качестве точки **Перехода \(FLIP\)**, то все, что выше `512` \(исключая 512\), будет записано как `ИСТИНА (TRUE)`, любое значение ниже `512` \(включая 512\) будет `ЛОЖЬ (FALSE)`. Другой пример: если вы отправляете `0 и 1` и устанавливаете `0` в качестве точки **Перехода FLIP**, то `1` будет `ИСТИНА`, а `0` будет `ЛОЖЬ`. **Маркеры состояния \(State Labels\):** Здесь вы можете указать, как `ИСТИНА/ЛОЖЬ` должны отображаться на графике когда вы нажимаете и удерживаете палец. Например, вы можете установить значение `ИСТИНА` как `Оборудование ВКЛ`, `ЛОЖЬ` как `Оборудование ВЫКЛ`. ================================================ FILE: untitled/barometer.md ================================================ # Barometer/pressure Barometer/pressure is kind of [environment sensors](https://developer.android.com/guide/topics/sensors/sensors_environment.html) that allows you to measure the ambient air pressure. Measured in in `hPa` or `mbar`. In oder to accept data from it you need to : ```cpp BLYNK_WRITE(V1) { //pressure in mbar int pressure = param[0].asInt(); } ``` Barometer doesn't work in background. ================================================ FILE: untitled/ble.md ================================================ # BLE Widget for enabling Bluetooth Low Energy support. At the moment BLE widget requires internet connection in order to login and load your profile. However this will be fixed soon. Also some Blynk widgets not allowed with BLE. Blynk currently support bunch of different modules. Please check sketches below. **Sketches:** [BLE](https://github.com/blynkkk/blynk-library/tree/master/examples/Boards_Bluetooth) ================================================ FILE: untitled/blob/README.md ================================================ # blob ================================================ FILE: untitled/blob/master.md ================================================ # master ================================================ FILE: untitled/blob/menu/README.md ================================================ # Меню \(Menu\) Виджет Меню позволяет отправлять команды на ваше оборудование на основе выборного списка, сделанного вами в пользовательском интерфейсе. Меню отправляет индекс выбранного элемента спика, а не саму строку. Отправляемый индекс начинается с 1. Он работает так же, как типовой элемент "Комбинированный список" \([ComboBox](https://ru.wikipedia.org/wiki/%D0%9A%D0%BE%D0%BC%D0%B1%D0%B8%D0%BD%D0%B8%D1%80%D0%BE%D0%B2%D0%B0%D0%BD%D0%BD%D1%8B%D0%B9_%D1%81%D0%BF%D0%B8%D1%81%D0%BE%D0%BA)\). Пример кода: ```cpp BLYNK_WRITE { switch (param.asInt()) { case 1: { // Пункт 1 Serial.println("Выбран Пункт 1"); break; } case 2: { // Пункт 2 Serial.println("Выбран Пункт 2"); break; } } } ``` Вы также можете назначить пункты меню со стороны оборудования с помощью кода: ```cpp Blynk.setProperty(V1, "labels", "label 1", "label 2", "label 3"); ``` **Пример кода:** [Меню](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Menu/Menu.ino) ================================================ FILE: untitled/blob/menu/blynkkk-blynkkk.github.io-1.md ================================================ # blynkkk/blynkkk.github.io [Permalink](https://github.com/blynkkk/blynkkk.github.io/blob/b1f1a439851d4000d4d85ddab2f72db8d227d6cc/Amendments.md) Cannot retrieve contributors at this time 12 lines \(12 sloc\) 744 Bytes \#Blynk Amendments \#\#\#Tell every maker about Blynk No pressure. Just do it. Now. \#\#\#Make your idea work without Blynk Blynk can be easily integrated in almost any project. But before that - make it work **without** it. After you are sure that you can get all the sensor data or can control things from the code – integrate Blynk and make it even more awesome. \#\#\#Use search We are always happy to chat and help, but remember - every time you ask the question that was answered many many times before that, Blynk Team is not building a new widget or new cool feature. So: * google before asking * use search on our forum, it works really well * check Instructables \#\#\#Always wrap your code Though shalt not post code without `wrapping it` ================================================ FILE: untitled/blob/proximity.md ================================================ # Близость \(Proximity\) Близость - это своего рода [датчики положения](https://developer.android.com/guide/topics/sensors/sensors_position.html) это позволяет определить, насколько близко смартфон к лицу. Измеряется в `cm` \(см\) - расстояние от телефона до лица. Однако большинство этих датчиков возвращает только информацию FAR / NEAR. Поэтому, возвращаемое значение будет `0 / 1`. Где 0 / LOW = `FAR` \(далеко\), а 1 / HIGH = `NEAR` \(рядом\). Для того, чтобы принять данные из виджета, вам необходимо: ```cpp BLYNK_WRITE(V1) { // расстояние до объекта int proximity = param.asInt(); if (proximity) { // РЯДОМ } else { // ДАЛЕКО } } ``` Виджет близость не работает в фоновом режиме. ================================================ FILE: untitled/blob/styled_button/README.md ================================================ # Стилизованная кнопка \(Styled Button\) Работает в режиме кнопки или выключателя. Позволяет отправить любое числовое значение при нажатии и отпускании кнопки. По умолчанию кнопка использует значения 0/1 \(HIGH/LOW\). Кнопка при нажатии отправляет 1 \(HIGH\) а при отпускании отправляет 0 \(LOW\). Вы можете изменить состояние кнопки со стороны оборудования. Например, включить кнопку, назначенную виртуальному пин-у V1: ```cpp Blynk.virtualWrite(V1, HIGH); ``` Вы можете изменить надписи кнопок со стороны оборудования при помощи кода: ```cpp Blynk.setProperty(V1, "onLabel", "ВКЛ"); Blynk.setProperty(V1, "offLabel", "ВЫКЛ"); ``` или изменить цвет кнопки во включенном и выключенном состоянии: ```cpp Blynk.setProperty(V1, "onColor", "#D3435C"); Blynk.setProperty(V1, "offColor", "#D3435C"); ``` или изменить цвет фона кнопки: ```cpp Blynk.setProperty(V1, "onBackColor", "#00435C"); Blynk.setProperty(V1, "offBackColor", "#00435C"); ``` Вы также можете узнать состояние кнопки с сервера, если ваше оборудование внезапно отключилось, с помощью функции Blynk.Sync: ```cpp BLYNK_CONNECTED() { Blynk.syncVirtual(V1); } BLYNK_WRITE(V1) { int buttonState = param.asInt(); } ``` **Пример кода:** [Базовый пример](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/BlynkBlink/BlynkBlink.ino) **Пример кода:** [Синхронизация состояния с физической кнопкой через прерывания](https://github.com/blynkkk/blynk-library/blob/master/examples/More/Sync/ButtonInterrupt/ButtonInterrupt.ino) **Пример кода:** [Синхронизация состояния с физической кнопкой через поллинг](https://github.com/blynkkk/blynk-library/blob/master/examples/More/Sync/ButtonPoll/ButtonPoll.ino) **Пример кода:** [Синхронизация состояния с физической кнопкой](https://github.com/blynkkk/blynk-library/blob/master/examples/More/Sync/SyncPhysicalButton/SyncPhysicalButton.ino) ================================================ FILE: untitled/blob/styled_button/blynkkk-blynkkk.github.io.md ================================================ # blynkkk/blynkkk.github.io [Permalink](https://github.com/blynkkk/blynkkk.github.io/blob/b1f1a439851d4000d4d85ddab2f72db8d227d6cc/License.md)Branch: master ### [blynkkk.github.io]()/**License.md** [Go to file](../../find/blynkkk-blynkkk.github.io.md) * [Go to file T](../../find/blynkkk-blynkkk.github.io.md) * * * Copy path Cannot retrieve contributors at this time 2 lines \(2 sloc\) 63 Bytes [Raw](https://github.com/blynkkk/blynkkk.github.io/raw/master/License.md) [Blame](https://github.com/blynkkk/blynkkk.github.io/blame/master/License.md) ## License This project is released under The MIT License \(MIT\) ================================================ FILE: untitled/blob/textinput.md ================================================ # Текстовый ввод \(Text Input\) Отображается как строка текстового ввода, где вы можете напрямую изменять строковое значение. Также вы можете ограничить максимальное количество вводимых символов в настройках виджета. ================================================ FILE: untitled/blob/timeinput/README.md ================================================ # Ввод времени \(Time Input\) Виджет Ввода времени позволяет вам выбрать время начала/окончания, день недели, часовой пояс, значения в формате до полудня/после полудня и отправить их на ваше оборудование. В настоящее время поддерживаются следующие форматы: `ЧЧ:ММ` и `ЧЧ:ММ AM/PM`. Аппаратное устройстов будет отсчитывать время пользовательского интерфейса в виде секунд дня \(`3600 * часов + 60 * минут`\) для запуска/остановки времения. Время, которое виджет отправляет оборудованию, является локальным временем пользователя. Индексы по выбранных дней: ```text Понедельник - 1 Вторник - 2 ... Суббота - 6 Воскресенье - 7 ``` Вы также можете изменить состояние виджета в интерфейсе пользователя. Смотрите ниже примеры кода. **Пример кода:** [Простой Ввод времени для времени начала](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/TimeInput/SimpleTimeInput/SimpleTimeInput.ino) **Пример кода:** [Расширенный Ввод времени](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/TimeInput/AdvancedTimeInput/AdvancedTimeInput.ino) **Пример кода:** [Обновление Ввода времени в пользовательском интерфейсе](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/TimeInput/UpdateTimeInputState/UpdateTimeInputState.ino) ================================================ FILE: untitled/blob/timeinput/blynkkk-blynkkk.github.io-2.md ================================================ # blynkkk/blynkkk.github.io [Permalink](https://github.com/blynkkk/blynkkk.github.io/blob/b1f1a439851d4000d4d85ddab2f72db8d227d6cc/AppExport.md) Cannot retrieve contributors at this time 28 lines \(23 sloc\) 1.3 KB ## App Export ### Firmware for ESP8266, NodeMCU, BlynkBoard, etc. #### Prepare development environment 1. Install [Arduino IDE](https://www.arduino.cc/en/Main/Software) 2. Install [Blynk Library](https://github.com/blynkkk/blynk-library/releases/latest) and restart Arduino IDE 3. Install [ESP8266 core for Arduino](https://github.com/esp8266/Arduino#installing-with-boards-manager) 4. For Windows / OS X, you may need to install USB-Serial drivers according to your converter: * СP2102: [https://www.silabs.com/products/mcu/Pages/USBtoUARTBridgeVCPDrivers.aspx](https://www.silabs.com/products/mcu/Pages/USBtoUARTBridgeVCPDrivers.aspx) * FTDI \(FT232, etc\): [http://www.ftdichip.com/Drivers/VCP.htm](http://www.ftdichip.com/Drivers/VCP.htm) * _TODO: Link to drivers for CH340 and PL2303._ 1. If your board has a NeoPixel RGB LED, install [Adafruit NeoPixel](https://github.com/adafruit/Adafruit_NeoPixel) library from Library Manager #### Build your Firmware 1. Open our example in Arduino IDE: `File -> Examples -> Blynk -> Provisioning -> Blynk_ESP8266` 2. Open `Settings.h` tab. 3. Configure your firmware: * `BOARD_NAME` - ... * `BOARD_VENDOR` - ... * `PRODUCT_WIFI_SSID` - ... #### Upload firmare 1. Select your board type: `Tools -> Board -> [Your Board]` 2. Select your port: `Tools -> Port -> [...]` 3. Verify and Upload! Note that for Blynk Board, you can select board type `NodeMCU 1.0`. ================================================ FILE: untitled/bluetooth.md ================================================ # Bluetooth Widget for enabling Bluetooth support. At the moment Bluetooth widget supported only for Android and requires internet connection in order to login and load your profile. However this will be fixed soon. Also some Blynk widgets not allowed with Bluetooth. Blynk currently support bunch of different modules. Please check sketches below. **Sketches:** [Bluetooth](https://github.com/blynkkk/blynk-library/tree/master/examples/Boards_Bluetooth) ================================================ FILE: untitled/blynkkk-blynkkk.github.io/README.md ================================================ # blynkkk/blynkkk.github.io You can’t perform that action at this time. ================================================ FILE: untitled/blynkkk-blynkkk.github.io/gps_trigger.md ================================================ # Триггер GPS \(GPS Trigger\) Виджет Триггер GPS позволяет легко инициировать события, когда вы входите или выходите из географической зоны. Этот виджет будет работать в фоновом режиме и периодически будет проверять ваши координаты. Если ваше местоположение находится в пределах или вне указанной зоны \(географическая зона выбирается на карте виджета\), виджет отправит команду `HIGH`/`LOW` на аппаратное устройство. Например, Триггер GPS назначен для пина `V1`, и включена опция `Trigger When Enter`. В этом случае, когда вы окажитесь в указанной географической зоне виджет вызовет событие `HIGH`. ```cpp BLYNK_WRITE(V1) { int state = param.asInt(); if (state) { //Вы вошли в зону } else { //Вы вышли из зоны } } ``` Подробнее о том, как работает GPS-виджет, вы можете прочитать [здесь](https://developer.android.com/guide/topics/location/strategies.html). **ВНИМАНИЕ:** Виджет Триггер GPS работает в фоновом режиме. ================================================ FILE: untitled/blynkkk-blynkkk.github.io-1/README.md ================================================ # blynkkk/blynkkk.github.io You can’t perform that action at this time. ================================================ FILE: untitled/blynkkk-blynkkk.github.io-1/rtc.md ================================================ # Часы реального времени \(RTC\) Часы реального времени позволяют получать время с сервера. Вы можете предварительно выбрать любой часовой пояс в пользовательском интерфейсе, чтобы получить время на оборудование из нужной локали. **Пример кода:** [Часы реального времени](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/RTC/RTC.ino) ================================================ FILE: untitled/blynkkk-blynkkk.github.io-2/README.md ================================================ # blynkkk/blynkkk.github.io [Labels 7](https://github.com/blynkkk/blynkkk.github.io/labels) [Milestones 0](https://github.com/blynkkk/blynkkk.github.io/milestones) New issue **Have a question about this project?** Sign up for a free GitHub account to open an issue and contact its maintainers and the community. By clicking “Sign up for GitHub”, you agree to our [terms of service](https://help.github.com/terms) and [privacy statement](https://help.github.com/privacy). We’ll occasionally send you account related emails. Already on GitHub? [Sign in](https://github.com/login?return_to=%2Fblynkkk%2Fblynkkk.github.io%2Fissues%2Fnew) to your account **ProTip!** Type g p on any issue or pull request to go back to the pull request listing page. ================================================ FILE: untitled/blynkkk-blynkkk.github.io-2/eventor.md ================================================ # Обработчик событий \(Eventor\) Виджет Обработчик событий позволяет создавать простые правила поведения или **события**. Давайте рассмотрим типичный вариант использования: считывание температуры с датчика DHT и отправка push-уведомления, когда температура превышает определенный предел: ```cpp float t = dht.readTemperature(); if (isnan(t)) { return; } if (t > 40) { Blynk.notify(String("Температура слишком высокая: ") + t); } ``` С Обработчиком событий вам не нужно писать этот код. Все, что вам нужно, это отправить значение с датчика на сервер Blynk: ```cpp float t = dht.readTemperature(); Blynk.virtualWrite(V0, t); ``` Не забывайте, что команды `virtualWrite` должны быть заключены в таймер и не должны использоваться в основном цикле `loop`. **ПРИМЕЧАНИЕ:** Не забудьте добавить виджет уведомлений в приложении. Обработчик событий пригодится вам, когда нужно изменить условия на лету без повторной загрузки нового скетча на аппаратное обеспечение. Вы можете создать столько **событий**, сколько вам нужно. Обработчик событий также может быть запущен со стороны приложения. Вам просто нужно назначить виджет на тот же контакт, что и ваше событие в Обработчике событий. Обработчик событий не постоянно отправляет события. Давайте рассмотрим простой пример, как показано выше `if (temperature > 40) send notification`. Когда температура превышает 40 пороговых значений - отправляется уведомление. Если температура продолжает оставаться выше 40 никакие повторные действия не будут инициированы. Но если `temperature` опускается ниже порогового значения, а затем проходит его снова уведомление будет отправлено повторно \(для уведомлений Обработчика событий нет ограничения отправки в течение 5 секунд\). Обработчик событий также поддерживает события таймера \(Timer\). Например, вы можете установить пин `V1` ON/HIGH в 21:00:00 каждую пятницу. В Обработчике событий вы можете назначить несколько таймеров на один и тот же пин, отправить любую строку/число, выбрать день и часовой пояс. Чтобы удалить созданное **событие**, пожалуйста, используйте сдвиг пальцем по экрану. Вы также можете перенести последний элемент самого события. **Пример кода:** [Обработчик событий](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Eventor/Eventor.ino) **ПРИМЕЧАНИЕ:** Виджет таймера зависит от времени сервера, а не вашего телефона. Иногда время телефона может не соответствовать времени сервера. **ПРИМЕЧАНИЕ:** события запускаются только один раз при выполнении условия. Это означитает что \[цепочка событий\] \([https://community.blynk.cc/t/eventor-behavior-bug-feature/20962](https://community.blynk.cc/t/eventor-behavior-bug-feature/20962)\) невозможна \(однако она может быть включена в коммерческой версии\). ================================================ FILE: untitled/blynkkk-blynkkk.github.io-3/README.md ================================================ # blynkkk/blynkkk.github.io **ProTip!** Adding [no:label](https://github.com/blynkkk/blynkkk.github.io/issues?q=is%3Apr+is%3Aopen+no%3Alabel) will show everything without a label. You can’t perform that action at this time. ================================================ FILE: untitled/blynkkk-blynkkk.github.io-3/email.md ================================================ # email ## Электронная почта \(Email\) Виджет электронной почты позволяет отправлять электронные письма с вашего оборудования на любой адрес. Пример кода: ```cpp Blynk.email("my_email@example.com", "Тема", "Текст вашего сообщения"); ``` Код содержит первое поле `to`. С помощью этого поля вы можете определить получателей электронной почты в приложении. Вы можете пропустить поле `to`, если хотите отправить электронное письмо на адрес электронной почты используемый для входа в приложение Blynk: ```cpp Blynk.email("Тема", "Текст вашего сообщения"); ``` Вы можете отправить электронное писбом в форматах либо `text/html`, либо `text/plain` \(помните что некоторые клиенты не поддерживают `text/html`\). Вы можете изменить формат содержимого электронного письма в настройках виджета. Дополнительно в письме вы можете использовать заполнители/переменные `{DEVICE_NAME}`, `{DEVICE_OWNER_EMAIL}` и `{VENDOR_EMAIL}` \(для локального сервера\) в полях `to` \(кому\),`subject` \(тема\) и `body` \(текст сообщения\): ```cpp Blynk.email("{DEVICE_OWNER_EMAIL}", "{DEVICE_NAME} : Тревога", "Ваше устройство {DEVICE_NAME} имеет критическую ошибку!"); ``` **Недостатки:** * Максимально допустимые ограничения \(почта + тема + длина сообщения\) = 120 символов. Однако вы можете увеличить этот лимит при необходимости добавив `#define BLYNK_MAX_SENDBYTES XXX` к вашему коду. Где `XXX` - это максимальная длина вашего письма в символах. Например, для ESP вы можете установить максимальную длину 1200 символов `#define BLYNK_MAX_SENDBYTES 1200`. Параметр `#define BLYNK_MAX_SENDBYTES 1200` должен быть опредлен в коде до включения Blynk. * Разрешено отправлять 1 электронное письмо в течение 5 секунд; * Если вы используете Gmail сервис \(Google\), вы ограничены 500 письмами в день. Другие провайдеры могут иметь аналогичные ограничения, поэтому, пожалуйста, будьте внимательны; * Пользователи Blynk сервера ограничены 100 сообщениями в день; ## Кодировка в электронной почте Библиотека обрабатывает все строки в кодировке UTF-8. Если у вас возникли проблемы, попробуйте напечатать ваше сообщение в терминал COM порта и посмотрите на результат \(терминал должен быть настроен на кодировку UTF-8\). Если не работает, возможно, вам следует также прочитать о поддержке кодировок вашего компилятора. Если работает, но ваше сообщение обрезано - вам нужно увеличить ограничение длины сообщения \(т.к. все символы кодировки UTF-8 потребляют как минимум вдвое больше байт информации если символы не Латинские\). ## Увеличение лимита длины сообщения Вы можете увеличить максимальную длину сообщения, поместив в верхнюю часть своего кода строку \(до опредления Blynk\): ```cpp #define BLYNK_MAX_SENDBYTES 256 // По умолчанию 128 байт ``` **Пример кода:** [Электронная почта](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Email/Email.ino) ================================================ FILE: untitled/blynkkk-blynkkk.github.io-4/README.md ================================================ # blynkkk/blynkkk.github.io Automate your workflow from idea to production GitHub Actions makes it easy to automate all your software workflows, now with world-class CI/CD. Build, test, and deploy your code right from GitHub. ![Operating systems and containers](https://github.githubassets.com/images/modules/actions/actions-linux-and-containers.svg) ## Linux, macOS, Windows, ARM, and containers Hosted runners for every major OS make it easy to build and test all your projects. Run directly on a VM or inside a container. Use your own VMs, in the cloud or on-prem, with self-hosted runners. ![Matrix builds](https://github.githubassets.com/images/modules/actions/actions-matrix.svg) ## Matrix builds Save time with matrix workflows that simultaneously test across multiple operating systems and versions of your runtime. ![Any language](https://github.githubassets.com/images/modules/actions/actions-any-lang.svg) ## Any language GitHub Actions supports Node.js, Python, Java, Ruby, PHP, Go, Rust, .NET, and more. Build, test, and deploy applications in your language of choice. ![Live logs](https://github.githubassets.com/images/modules/actions/actions-live-logs.svg) ## Live logs See your workflow run in realtime with color and emoji. It’s one click to copy a link that highlights a specific line number to share a CI/CD failure. ![Secret store](https://github.githubassets.com/images/modules/actions/actions-secret-store.svg) ## Built-in secret store Automate your software development practices with workflow files embracing the Git flow by codifying it in your repository. ![Multi-container testing](https://github.githubassets.com/images/modules/actions/actions-multi-container-testing.svg) ## Multi-container testing Test your web service and its DB in your workflow by simply adding some `docker-compose` to your workflow file. ================================================ FILE: untitled/blynkkk-blynkkk.github.io-4/tabs.md ================================================ # Вкладки \(Tabs\) Единственная цель виджета Вкладки - расширить пространство вашего проекта. Чтобы редактировать виджет Вкладок - просто нажмите на выбранную вкладку. Вы можете перетаскивать виджеты между вкладками. Из списка можно удалить только последнюю вкладку: чтобы удалить ее, проведите пальцем влево по ее названию в экране настроек виджета. Максимальное количество вкладок на iOS составляет 4. Максимальное количество вкладок на Android - 10. Оставайтесь с нами для предстоящего редизайна виджета вкладок! ================================================ FILE: untitled/blynkkk-blynkkk.github.io-5/README.md ================================================ # blynkkk/blynkkk.github.io Organize your issues with project boards Did you know you can manage projects in the same place you keep your code? Set up a project board on GitHub to streamline and automate your workflow. ![get organized](https://github.githubassets.com/images/modules/projects/octicon-get-organized.svg) Sort tasks Add issues and pull requests to your board and prioritize them alongside note cards containing ideas or task lists. ![plan project](https://github.githubassets.com/images/modules/projects/octicon-plan-project.svg) Plan your project Sort tasks into columns by status. You can label columns with status indicators like "To Do", "In Progress", and "Done". ![automate workflow](https://github.githubassets.com/images/modules/projects/octicon-automate-workflow.svg) Automate your workflow Set up triggering events to save time on project management—we’ll move tasks into the right columns for you. ![track progress](https://github.githubassets.com/images/modules/projects/octicon-track-progress.svg) Track progress Keep track of everything happening in your project and see exactly what’s changed since the last time you looked. ![share status](https://github.githubassets.com/images/modules/projects/octicon-share-status.svg) Share status Each card has a unique URL, making it easy to share and discuss individual tasks with your team. ![finish project](https://github.githubassets.com/images/modules/projects/octicon-finish-project.svg) Wrap up After you wrap up your work, close your project board to remove it from your active projects list. On to the next project! ================================================ FILE: untitled/blynkkk-blynkkk.github.io-5/map.md ================================================ # Карта \(Map\) Виджет Карты позволяет устанавливать точки/флажки на карте со стороны оборудования. Это очень полезный виджет, если у вас есть несколько устройств, и вы хотите отслеживать их позиции на карте. Вы можете отправить точку на карту с помощью обычной команды виртуальной записи: ```cpp Blynk.virtualWrite(V1, pointIndex, lat, lon, "Название"); ``` Мы также создали оболочку, чтобы вы могли упростить использование виджета Карты. Вы можете изменить метки флажков на оборудовании с помощью кода: ```cpp WidgetMap myMap(V1); ... int index = 1; float lat = 51.5074; float lon = 0.1278; myMap.location(index, lat, lon, "Название"); ``` Использование уникальных `index` позволяет вам переопределить существующее значение точки. **Пример кода:** [Базовый пример Карты](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Map/Map.ino) ================================================ FILE: untitled/blynkkk-blynkkk.github.io-6/README.md ================================================ # blynkkk/blynkkk.github.io Period: 1 week Filter activity [24 hours](https://github.com/blynkkk/blynkkk.github.io/pulse/daily) [3 days](https://github.com/blynkkk/blynkkk.github.io/pulse/halfweekly) [1 week](./) [1 month](https://github.com/blynkkk/blynkkk.github.io/pulse/monthly) ## Overview * 2 Active Pull Requests 8 Active Issues * * [1 Merged Pull Request](./#merged-pull-requests) * [1 Proposed Pull Request](./#proposed-pull-requests) * [8 Closed Issues](./#closed-issues) * 0 New Issues ## Loading contribution data... ![GitHub loading spinner](https://github.githubassets.com/images/spinners/octocat-spinner-128.gif) ## Could not load contribution data Please try again later ![](https://github.githubassets.com/images/spinners/octocat-spinner-128.gif) ## 1 Pull request merged by 1 person * Merged \#41 [Change float to double](../pull/change-float-to-double-by-earlold-pull-request-41.md)Jul 1, 2020 ## 1 Pull request proposed by 1 person * Proposed \#42 [Create Template IDs, Categories and Hotspot prefix decription files.](https://github.com/blynkkk/blynkkk.github.io/pull/42)Jul 1, 2020 ## 8 Issues closed by 1 person * Closed \#29 [The Button “How can I build my own app?” leads to the same page](https://github.com/blynkkk/blynkkk.github.io/issues/29)Jun 30, 2020 * Closed \#28 [Two identical instruction gifs on one page](https://github.com/blynkkk/blynkkk.github.io/issues/28)Jun 30, 2020 * Closed \#24 [Add missing mobile help pages](https://github.com/blynkkk/blynkkk.github.io/issues/24)Jun 30, 2020 * Closed \#21 [Add brew installation instruction for Mac](https://github.com/blynkkk/blynkkk.github.io/issues/21)Jun 30, 2020 * Closed \#30 [Link doesn't work \(no such anchor "resetting the board"\)](https://github.com/blynkkk/blynkkk.github.io/issues/30)Jun 30, 2020 * Closed \#31 [No picture zooming effect on some pictures](https://github.com/blynkkk/blynkkk.github.io/issues/31)Jun 30, 2020 * Closed \#32 [Typos and grammar issues](https://github.com/blynkkk/blynkkk.github.io/issues/32)Jun 30, 2020 * Closed \#40 [Joystick + servo not working, but it working with slider](https://github.com/blynkkk/blynkkk.github.io/issues/40)Jun 30, 2020 ================================================ FILE: untitled/blynkkk-blynkkk.github.io-6/ble.md ================================================ # Bluetooth с низким энергопотреблением Этот виджет позволяет включить блутзуз с низким энергопотреблением на вашем телефоне. На текущий момент виджет также требует наличия интернет соединения \(постараемся пофиксить в ближайшем будущем\). Некоторые типы виджетов нельзя использовать вместе с блутузом, например исторический граф, так как он требует чтобы данные отправлялись на сервер, чего блутуз виджет не делает. **Список поддерживаемых чипов и контроллеров:** [BLE](https://github.com/blynkkk/blynk-library/tree/master/examples/Boards_Bluetooth) ================================================ FILE: untitled/blynkkk-blynkkk.github.io-7/README.md ================================================ # blynkkk/blynkkk.github.io This commit was created on GitHub.com and signed with a **verified signature** using GitHub’s key. ================================================ FILE: untitled/blynkkk-blynkkk.github.io-7/device_tiles.md ================================================ # Плитка устройств \(Device Tiles\) Плитка устройств - это мощный виджет, очень похожий на виджет Селектора устройств \(Device Selector\), но с пользовательским интерфейсом. Позволяет отображать один пин с устройства на одну плитку. Этот виджет особенно полезен, когда у вас есть несколько устройств с аналогичной функциональностью. Теперь вы можете группировать похожие устройства на одном макете \(шаблоне\). ================================================ FILE: untitled/blynkkk-blynkkk.github.io-8/README.md ================================================ # blynkkk/blynkkk.github.io ![](https://github.githubassets.com/images/spinners/octocat-spinner-128.gif) You can’t perform that action at this time. ================================================ FILE: untitled/blynkkk-blynkkk.github.io-8/temperature.md ================================================ # Температура \(Temperature\) Температура является своего рода [датчиком окружающей среды](https://developer.android.com/guide/topics/sensors/sensors_environment.html) который позволяет измерять температуру окружающего воздуха. Измеряется в `°C` - градусах Цельсия. Для приема данных из виджета, необходимо использовать код: ```cpp BLYNK_WRITE(V1) { // температура в градусах цельсия int celcius = param.asInt(); } ``` Виджет Температуры не работает в фоновом режиме. ================================================ FILE: untitled/blynkkk-blynkkk.github.io-9/README.md ================================================ # blynkkk/blynkkk.github.io Releases are powered by [tagging specific points of history](https://git-scm.com/book/en/Git-Basics-Tagging) in a repository. They’re great for marking release points like `v1.0`. ================================================ FILE: untitled/blynkkk-blynkkk.github.io-9/value_display.md ================================================ # Отображение значений \(Value Display\) Отображает входящие данные с ваших датчиков или виртуальных пин-ов. Может работать в двух режимах: * режим PUSH \(выберается в списке выбора частоты считывания\); * режим частоты считываний; В режиме PUSH вы обновляете значения виджета со стороны оборудования с помощью кода: ```cpp Blynk.virtualWrite(V1, val); ``` В этом режиме каждое сообщение, которое отправляет аппаратное устройство автоматически сохраняется на сервере. Режим PUSH не требует, чтобы приложение было онлайн или открыто. В режиме частоты считывния вам необходимо выбрать интервал обновления данных, и приложение будет запускать события считывния с требуемой периодичностью. Ваше приложение должно быть открыто и запущено для отправки запросов на оборудование. Вам не нужен код для аналоговых и цифровых выводов в даном случае. Однако для виртуальных выводов вам необходимо использовать следующий код: ```cpp //вызывать из приложения BLYNK_READ(V1) { //отправить в приложение Blynk.virtualWrite(V1, val); } ``` ## Отображение значений на рабочем столе Вы также можете добавить виджет отображение значения на рабочий стол Android. В этом случае отображение значений работает по протоколу HTTPS. Имейте в виду, что в режиме «Рабочий стол» отображение значений имеет несколько ограничений. Виджет будет обновлять свое состояние только один раз в 15 минут. Вы можете изменить это органичение через настройки виджета. Однако интервал обновления менее 15 минут не гарантируется. Вы также можете изменить размер отображаемого значения на рабочем столе - просто сделайте длинный тап на виджете и измените его размер на необходимый. **Примечание:** Добавление виджета на главный экран стоит 100 энергии. Эта энергия не возвращяется при удалении виджета. **Примечание:** Виджеты рабочего стола для локальных серверов Blynk требуют открытия порта 8080. **Пример кода:** [Базовый пример](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/BlynkBlink/BlynkBlink.ino) ================================================ FILE: untitled/bridge.md ================================================ # Bridge Bridge can be used for Device-to-Device communication \(no app. involved\). You can send digital/analog/virtual write commands from one device to another, knowing it's auth token. At the moment Bridge widget is not required on application side \(it is mostly used for indication that we have such feature\). **You can use multiple bridges to control multiple devices.** Bridge widget takes a virtual pin, and turns it into a channel to control another device. It means you can control any virtual, digital or analog pins of the target device. Be careful not to use pins like `A0, A1, A2 ...` when communicating between different device types, as Arduino Core may refer to wrong pins in such cases. Example code for device A which will send values to device B : ```cpp //Initiating Bridge Widget on V1 of Device A WidgetBridge bridge1(V1); ... void setup() { Blynk.begin(...); while (Blynk.connect() == false) { // Wait until Blynk is connected } bridge1.digitalWrite(9, HIGH); // will trigger D9 HIGH on Device B. No code on Device B required bridge1.analogWrite(10, 123); bridge1.virtualWrite(V1, "hello"); // you need to write code on Device B in order to receive this value. See below bridge1.virtualWrite(V2, "value1", "value2", "value3"); } BLYNK_CONNECTED() { bridge1.setAuthToken("OtherAuthToken"); // Token of the hardware B } ``` IMPORTANT: when performing `virtualWrite()` with Bridge Widget, Device B will need to process the incoming data from Device A. For example, if you are sending value from Device A to Device B using `bridge.virtualWrite(V5)` you would need to use this handler on Device B: ```cpp BLYNK_WRITE(V5){ int pinData = param.asInt(); //pinData variable will store value that came via Bridge } ``` Keep in mind that `bridge.virtualWrite` doesn't send any value to mobile app. You need to call `Blynk.virtualWrite` for that. **Sketch:** [Bridge](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Bridge/Bridge.ino) ================================================ FILE: untitled/build-software-better-together/README.md ================================================ # Build software better, together ## Security overview * ![Code alert](https://github.githubassets.com/images/modules/site/icons/security-admin.svg) View security details for this repository See security announcements from this repository's maintainers * Security policy — Active View how to securely report security vulnerabilities for this repository [View security policy](https://github.com/blynkkk/blynkkk.github.io/security/policy) * You can’t perform that action at this time. ================================================ FILE: untitled/build-software-better-together/video.md ================================================ # Видео трансляция \(Video Streaming\) Простой виджет, который позволяет отображать прямой эфир и потокове видео. Виджет поддерживает протоколы RTSP \(RP, SDP\), HTTP/S прогрессивной потоковой передачи, HTTP/S прямого эфира. Для получения дополнительной информации, пожалуйста ознакомтесь с [официальной документацией Android](https://developer.android.com/guide/appendix/media-formats.html). На данный момент команда Blynk не предоставляет потоковые серверы. Таким образом, вы можете осуществлять потоковую передачу непосредственно с ваше камеры или использовать сторонние сервисы, а также запустить собственны потоковый сервер \(например, на оборудовании Raspberry\). Вы можете остановить/запустить видео поток, нажав на сам виджет. Вы можете изменить URL-адрес видео потока с аппаратного устройства при помощи кода: ```cpp Blynk.setProperty(V1, "url", "http://my_new_video_url"); ``` ================================================ FILE: untitled/button.md ================================================ # Button Works in push or switch modes. Allows to send any number value on button click and button release events. By default button uses 0/1 \(LOW/HIGH\) values. Button sends 1 \(HIGH\) on press and sends 0 \(LOW\) on release. You can change button state from hardware side. For example, turn on button assigned to virtual pin V1 : ```cpp Blynk.virtualWrite(V1, HIGH); ``` You can change button labels from hardware with : ```cpp Blynk.setProperty(V1, "onLabel", "ON"); ``` ```cpp Blynk.setProperty(V1, "offLabel", "OFF"); ``` or change color : ```cpp //#D3435C - Blynk RED Blynk.setProperty(V1, "color", "#D3435C"); ``` You can also get button state from server in case your hardware was disconnected with Blynk Sync feature : ```cpp BLYNK_CONNECTED() { Blynk.syncVirtual(V1); } BLYNK_WRITE(V1) { int buttonState = param.asInt(); } ``` ## Home Screen Button You can also add button to your Android Home Screen. Button works via HTTPS in that case. Have in mind that in "Home Screen" mode button has few limitations. It may not work instantly due to Android Widget limitations. Button will update it's state only once per 15 min. **Note :** Adding home screen widget costs 100 energy. This energy not rechargeable. **Note :** Home Screen Widgets for Local Blynk servers requires port 8080 to be opened. **Sketch:** [Basic Sketch](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/BlynkBlink/BlynkBlink.ino) **Sketch:** [Physical Button Interrupt](https://github.com/blynkkk/blynk-library/blob/master/examples/More/Sync/ButtonInterrupt/ButtonInterrupt.ino) **Sketch:** [Physical Button Poll](https://github.com/blynkkk/blynk-library/blob/master/examples/More/Sync/ButtonPoll/ButtonPoll.ino) **Sketch:** [Physical Button State Sync](https://github.com/blynkkk/blynk-library/blob/master/examples/More/Sync/SyncPhysicalButton/SyncPhysicalButton.ino) ================================================ FILE: untitled/commit/README.md ================================================ # commit ================================================ FILE: untitled/commit/change-float-to-double-41-b1f1a43.md ================================================ # Change float to double \(\#41\)@b1f1a43 [Permalink](change-float-to-double-41-b1f1a43.md) Showing with **2 additions** and **2 deletions**. 1. +2 −2 [new/en/datastream\_datatype.md](change-float-to-double-41-b1f1a43.md#diff-d66679912b8da08f2b80ec11fa273d90) | | @@ -7,14 +7,14 @@ Make sure you choose a correct Data Type for your data. Currently, these Data Ty | | | :--- | :--- | :--- | | | | \| Type \| Min \| Max \| | | | | \|:--------------:\|:---------------------------:\|:----------------------------:\| | | | | \| \`\`\`Integer\`\`\` \| -2,147,483,648 \| 2,147,483,647 \| | | | | \| \`\`\`Float\`\`\` \| -1.8 x 10^300 \| 4.9 x 10^-324 \| | | | | \| \`\`\`Double\`\`\` \| -1.8 x 10^300 \| 4.9 x 10^-324 \| | | | | \| \`\`\`String\`\`\` \| any value is accepted \| | | | | | | | | | | | | \*\*IMPORTANT:\*\* | | | | | | | | Blynk server will ignore values that don't match the Data Type | | | | | | | | Example: if Datastream has Data Type set to \`\`\`Integer\`\`\`, but Hardware sends \`\`\`123.45\`\`\`, this value will be skipped because it is \`\`\`Float\`\`\`, not \`\`\`Integer\`\`\`. | | | | Example: if Datastream has Data Type set to \`\`\`Integer\`\`\`, but Hardware sends \`\`\`123.45\`\`\`, this value will be skipped because it is \`\`\`Double\`\`\`, not \`\`\`Integer\`\`\`. | | | | | | | | If the incoming value goes out of range of Min or Max setting, this value will be "cropped" to match this setting. | ================================================ FILE: untitled/commit/gauge.md ================================================ # Указатель \(Gauge\) Отличный визуальный способ отображения входящих числовых значений. Может работать в 2 режимах: * режим PUSH \(выберается в списке выбора частоты считывания\); * режим частоты считываний; В режиме PUSH вы обновляете значения указателя со стороны оборудования с помощью кода: ```cpp Blynk.virtualWrite(V1, val); ``` В этом режиме каждое сообщение, которое отправляет аппаратное устройство автоматически сохраняется на сервере. Режим PUSH не требует, чтобы приложение было онлайн или открыто. В режиме частоты считывния вам необходимо выбрать интервал обновления данных, и приложение будет запускать события считывния с требуемым периодичностью. Ваше приложение должно быть открыто и запущено для отправки запросов на оборудование. Вам не нужен код для аналоговых и цифровых выводов в даном случае. Однако для виртуальных выводов вам необходимо использовать следующий код: ```cpp //вызывать из приложения BLYNK_READ(V1) { //отправить в приложение Blynk.virtualWrite(V1, val); } ``` ## Параметры форматирования Указатель также имеет поле «Label» \(Метка\), которое позволяет использовать форматирование. Предположим, ваш датчик отправляет число 12.6789 в приложение Blynk. Поддерживаются следующие параметры форматирования: `/pin/` - отображает значение без форматирования \(12.6789\) `/pin./` - отображает значение без десятичной части \(13\) `/pin.#/` - отображает значение с одним десятичным знаком \(12.7\) `/pin.##/` - отображает значение с двумя десятичными знаками \(12.68\) ## Другие опции Вы также можете изменить метку прибора с помощью: ```cpp Blynk.setProperty(V1, "label", "Мое значение метки"); ``` или изменить цвет \(кодировка RGB\): ```cpp //#D3435C - Красный цвет Blynk.setProperty(V1, "color", "#D3435C"); ``` **Пример кода:** [Светодиод](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/BlynkBlink/BlynkBlink.ino) ================================================ FILE: untitled/commit/music_player.md ================================================ # Музыкальный проигрыватель \(Music Player\) Простой элемент интерфейса с 3 кнопками - имитирует интерфейс музыкального проигрывателя. Каждая кнопка отправляет свою команду на аппаратное устройство: `play` \(воспроизвести\), `stop` \(стоп\), `prev` \(предыдущий\), `next` \(следующий\). Вы можете изменить состояние виджета в приложении с аппаратной стороны с помощью следующих команд: ```text Blynk.virtualWrite(Vx, "play"); Blynk.virtualWrite(Vx, "stop"); ``` Вы также можете изменить состояние воспроизведение/остановка виджета с помощью следующего кода \(эквивалент вышеупомянутых команд\): `Blynk.setProperty(V1, "isOnPlay", "false");` **Пример кода:** [Музыкальный проигрыватель](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Player/Player.ino) ================================================ FILE: untitled/commits/README.md ================================================ # commits ================================================ FILE: untitled/commits/blynkkk-blynkkk.github.io.md ================================================ # blynkkk/blynkkk.github.io 1. Verified This commit was created on GitHub.com and signed with a **verified signature** using GitHub’s key. 2. Verified This commit was created on GitHub.com and signed with a **verified signature** using GitHub’s key. 3. Verified This commit was created on GitHub.com and signed with a **verified signature** using GitHub’s key. 4. Verified This commit was created on GitHub.com and signed with a **verified signature** using GitHub’s key. 5. 6. Verified This commit was created on GitHub.com and signed with a **verified signature** using GitHub’s key. 7. 8. 9. 10. Verified This commit was created on GitHub.com and signed with a **verified signature** using GitHub’s key. 11. 12. 13. Verified This commit was created on GitHub.com and signed with a **verified signature** using GitHub’s key. 14. Verified This commit was created on GitHub.com and signed with a **verified signature** using GitHub’s key. 15. Verified This commit was created on GitHub.com and signed with a **verified signature** using GitHub’s key. 16. Verified This commit was created on GitHub.com and signed with a **verified signature** using GitHub’s key. 17. Verified This commit was created on GitHub.com and signed with a **verified signature** using GitHub’s key. 18. Verified This commit was created on GitHub.com and signed with a **verified signature** using GitHub’s key. 19. Verified This commit was created on GitHub.com and signed with a **verified signature** using GitHub’s key. 20. Verified This commit was created on GitHub.com and signed with a **verified signature** using GitHub’s key. 21. Verified This commit was created on GitHub.com and signed with a **verified signature** using GitHub’s key. 22. Verified This commit was created on GitHub.com and signed with a **verified signature** using GitHub’s key. 23. Verified This commit was created on GitHub.com and signed with a **verified signature** using GitHub’s key. 24. Verified This commit was created on GitHub.com and signed with a **verified signature** using GitHub’s key. 25. Verified This commit was created on GitHub.com and signed with a **verified signature** using GitHub’s key. 26. Verified This commit was created on GitHub.com and signed with a **verified signature** using GitHub’s key. 27. Verified This commit was created on GitHub.com and signed with a **verified signature** using GitHub’s key. 28. Verified This commit was created on GitHub.com and signed with a **verified signature** using GitHub’s key. 29. Verified This commit was created on GitHub.com and signed with a **verified signature** using GitHub’s key. 30. Verified This commit was created on GitHub.com and signed with a **verified signature** using GitHub’s key. 31. Verified This commit was created on GitHub.com and signed with a **verified signature** using GitHub’s key. 32. Verified This commit was created on GitHub.com and signed with a **verified signature** using GitHub’s key. 33. Verified This commit was created on GitHub.com and signed with a **verified signature** using GitHub’s key. 34. Verified This commit was created on GitHub.com and signed with a **verified signature** using GitHub’s key. 35. Verified This commit was created on GitHub.com and signed with a **verified signature** using GitHub’s key. ================================================ FILE: untitled/commits/light.md ================================================ # Свет \(Light\) Свет - это своего рода [датчики окружающей среды](https://developer.android.com/guide/topics/sensors/sensors_environment.html), который позволяет измерять уровень освещенности \(уровень внешней освещенности измеряется в люксах\). В телефонах чаще всего используется для управления яркостью экрана. Для того, чтобы принять данные этого виджета, вам необходимо: ```cpp BLYNK_WRITE(V1) { //уровень освещенности int lx = param.asInt(); } ``` Виджет Свет не работает в фоновом режиме. ================================================ FILE: untitled/commits/time_input.md ================================================ # Ввод времени \(Time Input\) Виджет Ввода времени позволяет вам выбрать время начала/окончания, день недели, часовой пояс, значения в формате до полудня/после полудня и отправить их на ваше оборудование. В настоящее время поддерживаются следующие форматы: `ЧЧ:ММ` и `ЧЧ:ММ AM/PM`. Аппаратное устройстов будет отсчитывать время пользовательского интерфейса в виде секунд дня \(`3600 * часов + 60 * минут`\) для запуска/остановки времения. Время, которое виджет отправляет оборудованию, является локальным временем пользователя. Индексы по выбранных дней: ```text Понедельник - 1 Вторник - 2 ... Суббота - 6 Воскресенье - 7 ``` Вы также можете изменить состояние виджета в интерфейсе пользователя. Смотрите ниже примеры кода. **Пример кода:** [Простой Ввод времени для времени начала](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/TimeInput/SimpleTimeInput/SimpleTimeInput.ino) **Пример кода:** [Расширенный Ввод времени](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/TimeInput/AdvancedTimeInput/AdvancedTimeInput.ino) **Пример кода:** [Обновление Ввода времени в пользовательском интерфейсе](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/TimeInput/UpdateTimeInputState/UpdateTimeInputState.ino) ================================================ FILE: untitled/device_selector.md ================================================ # Device Selector Device selector is a powerful widget which allows you to update widgets based on one active device. This widget is particularly helpful when you have a fleet of devices with similar functionality. Imagine you have 4 devices and every device has a Temperature & Humidity sensor connected to it. To display the data for all 4 devices you would need to add 8 widgets. With Device Selector, you can use only 2 Widgets which will display Temperature and Humidity based on the active device chosen in Device Selector. All you have to do is: 1. Add Device Selector Widget to the project 2. Add 2 widgets \(for example Value Display Widget\) to show Temperature and Humidity 3. In Widgets Settings you will be able assign them to Device Selector \(Source or Target section\) 4. Exit settings, Run the project. Now you can change the active device in Device Selector and you will see that Temperature and Humidity values are reflecting the data updates for the device you just picked. **NOTE :** Webhook Widget will not work with Device Selector \(yet\). ================================================ FILE: untitled/device_tiles.md ================================================ # Device Tiles Device tiles is a powerful widget and very similar to the device selector widget, but with UI. It allows you to display 1 pin per device per tile. This widget is particularly helpful when you have a fleet of devices with similar functionality. So you can group similar devices within one layout \(template\). ================================================ FILE: untitled/email.md ================================================ # email ## Email Email widget allows you to send email from your hardware to any address. Example code: ```cpp Blynk.email("my_email@example.com", "Subject", "Your message goes here"); ``` It also contains `to` field. With this field you may define receiver of email in the app. You may skip `to` field when you want to send email to your Blynk app login email: ```cpp Blynk.email("Subject", "Your message goes here"); ``` You can send either `text/html` or `text/plain` \(some clients don't support `text/html`\) email. You can change this content type of email in the Mail widget settings. Additionally you may use `{DEVICE_NAME}`, `{DEVICE_OWNER_EMAIL}` and `{VENDOR_EMAIL}` \(for the local server\) placeholders in the mail for the `to`, `subject` and `body` fields: ```cpp Blynk.email("{DEVICE_OWNER_EMAIL}", "{DEVICE_NAME} : Alarm", "Your {DEVICE_NAME} has critical error!"); ``` Limitations : * Maximum allowed email + subject + message length is 120 symbols. However you can increase this limit if necessary by adding `#define BLYNK_MAX_SENDBYTES XXX` to you sketch. Where `XXX` is desired max length of your email. For example for ESP you can set this to 1200 max length `#define BLYNK_MAX_SENDBYTES 1200`. The `#define BLYNK_MAX_SENDBYTES 1200` must be included before any of the Blynk includes. * Only 1 email per 5 seconds is allowed; * In case you are using gmail you are limited with 500 mails per day \(by google\). Other providers may have similar limitations, so please be careful; * User is limited with 100 messages per day; ## Unicode in email The library handles all strings as UTF8 Unicode. If you're facing problems, try to print your message to the Serial and see if it works \(the terminal should be set to UTF-8 encoding\). If it doesn't work, probably you should read about unicode support of your compiler. If it works, but your message is truncated - you need to increase message length limit \(all Unicode symbols consume at least twice the size of Latin symbols\). ## Increasing message length limit You can increase maximum message length by putting on the top of your sketch \(before Blynk includes\): ```cpp #define BLYNK_MAX_SENDBYTES 256 // Default is 128 ``` **Sketch:** [Email](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Email/Email.ino) ================================================ FILE: untitled/eventor.md ================================================ # Eventor Eventor widget allows you to create simple behaviour rules or **events**. Let's look at a typical use case: read temperature from DHT sensor and send push notification when the temperature is over a certain limit : ```cpp float t = dht.readTemperature(); if (isnan(t)) { return; } if (t > 40) { Blynk.notify(String("Temperature is too high : ") + t); } ``` With Eventor you don't need to write this code. All you need is to send the value from the sensor to the server : ```cpp float t = dht.readTemperature(); Blynk.virtualWrite(V0, t); ``` Don't forget that `virtualWrite` commands should be wrapped in the timer and can't be used in the main loop. **NOTE** Don't forget to add notification widget. Eventor comes handy when you need to change conditions on the fly without re-uploading new sketch on the hardware. You can create as many **events** as you need. Eventor also could be triggered from the application side. You just need to assign the widget to the same pin as your Event within Eventor. Eventor doesn't constantly sends events. Let's consider simple event as above `if (temperature > 40) send notification`. When temperature goes beyond 40 threshold - notification action is triggered. If temperature continues to stay above the 40 threshold no actions will be triggered. But if `temperature` goes below threshold and then passes it again - notification will be sent again \(there is no 5 sec limit on Eventor notifications\). Eventor also supports Timer events. For example, you can set a pin `V1` ON/HIGH at 21:00:00 every Friday. With Eventor Time Event you can assign multiple timers on same pin, send any string/number, select days and timezone. In order to remove created **event** please use swipe. You can also swipe out last element in the Event itself. **Sketch:** [Eventor](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Eventor/Eventor.ino) **NOTE:** The timer widget rely on the server time and not your phone time. Sometimes the phone time may not match the server time. **NOTE** : Events are triggered only once when the condition is met. That's mean [chaining of events](https://community.blynk.cc/t/eventor-behavior-bug-feature/20962) is not possible \(however, could be enabled for commercials\). ================================================ FILE: untitled/find/README.md ================================================ # find ================================================ FILE: untitled/find/blynkkk-blynkkk.github.io.md ================================================ # blynkkk/blynkkk.github.io You can’t perform that action at this time. ================================================ FILE: untitled/find/image.md ================================================ # Изображение \(Image\) Виджет изображений позволяет отображать любое изображение в вашем проекте. Вы должны предоставить http/s URL адрес. URL должен быть действительной конечной точкой для бинарных данных изображения. Укороченный URL робать не будет. Сейчас виджет изображения поддерживает два варианта отображения: * **Fit** \(Вписать\): изображение будет масштабировано, в соответствовии с высотой или шириной виджета; * **Fill** \(Заполнить\): изображение будет масштабировано для заполнения области виджета. Может произойти обрезка изображения; Вы можете сделать виджет Изображения интерактивным, предоставив несколько ссылок на разные изображения с разными состояниями и менять индекс отображаемого изображения с вашего оборудования или с помощью виджета [Обработчкий событий \(Eventor\)](https://github.com/blynkkk/blynkkk.github.io/blob/master/mobile/ru/eventor.md). Например, выберите первый значок из списка: ```cpp Blynk.virtualWrite(V1, 1); //индексация изображения начинается с 1 ``` Вы также можете изменить прозрачность, масштаб или поворот изображения: ```cpp Blynk.setProperty(V1, "opacity", 50); // прозраочность 0-100% ``` ```cpp Blynk.setProperty(V1, "scale", 30); // масштаб 0-100% ``` ```cpp Blynk.setProperty(V1, "rotation", 10); // 0-360 градусы ``` также вы можете полностью заменить список изображений с аппаратного устройства: ```cpp Blynk.setProperty(V1, "urls", "https://image1.jpg", "https://image2.jpg"); ``` или вы можете изменить индивидуальное изображение по его индексу: ```cpp Blynk.setProperty(V1, "url", 1, "https://image1.jpg"); ``` ================================================ FILE: untitled/find/terminal.md ================================================ # Терминал \(Terminal\) Отображает данные с вашего оборудования. Позволяет отправить любую строку с вашего оборудования. Терминал всегда хранит последние 25 сообщений, которые ваше оборудование отправило в Blynk. Этот ограничение может быть увеличено в настройках локального сервера с помощью параметра `terminal.strings.pool.size`. С этим виджетом Вы можете использовать специальные команды: ```cpp // Печатает значения, как Serial.print terminal.print(); // Печатает значения, как Serial.println() terminal.println(); // Записать необработанные данные в буффер terminal.write(); // Убедится, что все данные были отправлены с устройства в терминал terminal.flush(); // Стереть все данные в терминале terminal.clear(); ``` **Пример кода:** [Терминал](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Terminal/Terminal.ino) ================================================ FILE: untitled/gauge.md ================================================ # Gauge A great visual way to display incoming numeric values. Can work in 2 modes : * PUSH mode \(select if from Frequency Reading picker\); * Frequency Reading mode; In PUSH mode you update gauge from hardware side with code : ```cpp Blynk.virtualWrite(V1, val); ``` In this mode every message that hardware sends to server is stored automatically on server. PUSH mode doesn't require application to be online or opened. With Frequency Reading mode you need to select update interval and application will trigger events with required timing. Your application should be open and running in order to make requests to hardware. You don't need any code for Analog and Digital pins in that case. However for virtual pins you need to use next code : ```cpp //triggered from app BLYNK_READ(V1) { //send to app Blynk.virtualWrite(V1, val); } ``` ## Formatting options Gauge also has "Label" field which allows use to use formatting. Let's assume, your sensor sends number 12.6789 to Blynk application. Next formatting options are supported: `/pin/` - displays the value without formatting \(12.6789\) `/pin./` - displays the value without decimal part \(13\) `/pin.#/` - displays the value with 1 decimal digit \(12.7\) `/pin.##/` - displays the value with two decimal places \(12.68\) ## Other options You can also change gauge label from hardware with : ```cpp Blynk.setProperty(V1, "label", "My Gauge Label"); ``` or change color : ```cpp //#D3435C - Blynk RED Blynk.setProperty(V1, "color", "#D3435C"); ``` **Sketch:** [BlynkBlink](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/BlynkBlink/BlynkBlink.ino) ================================================ FILE: untitled/gps_streaming.md ================================================ # GPS Streaming Useful for monitoring smartphone location data such as latitude, longitude, altitude and speed \(speed could be often 0 in case smartphone doesn't support it\). In order to accept data from this widget you need to : ```cpp BLYNK_WRITE(V1) { float latitude = param[0].asFloat(); float longitude = param[1].asFloat(); float altitude = param[2].asFloat(); float speed = param[3].asFloat(); } ``` or you can use prepared wrapper `GpsParam` : ```cpp BLYNK_WRITE(V1) { GpsParam gps(param); // Print 6 decimal places for Lat Serial.println(gps.getLat(), 7); Serial.println(gps.getLon(), 7); Serial.println(gps.getAltitude(), 2); Serial.println(gps.getSpeed(), 2); } ``` GPS Streaming works in background. **Sketch:** [GPS Stream](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/GPS_Stream/GPS_Stream.ino) ================================================ FILE: untitled/gps_trigger.md ================================================ # GPS Trigger GPS trigger widget allows easily trigger events when you arrive to or leave from some destination. This widget will work in background and periodically will check your coordinates. In case your location is within/out required radius \(selected on widget map\) widget will send `HIGH`/`LOW` command to hardware. For example, let's assume you have GPS Trigger widget assigned to pin `V1` and option `Trigger When Enter`. In that case when you'll arrive to destination point widget will trigger `HIGH` event. ```cpp BLYNK_WRITE(V1) { int state = param.asInt(); if (state) { //You enter destination } else { //You leave destination } } ``` More details on how GPS widget works you can read [here](https://developer.android.com/guide/topics/location/strategies.html). GPS trigger widget works in background. ================================================ FILE: untitled/graph.md ================================================ # Graph Easily plot incoming data from your project in various designs. You can also scroll and zoom graph. Can work in 2 modes : * PUSH mode \(select if from Frequency Reading picker\); * Frequency Reading mode; In PUSH mode you update gauge from hardware side with code : ```cpp Blynk.virtualWrite(V1, val); ``` In this mode every message that hardware sends to server is stored automatically on server. PUSH mode doesn't require application to be online or opened. With Frequency Reading mode you need to select update interval and application will trigger events with required timing. Your application should be open and running in order to make requests to hardware. You don't need any code for Analog and Digital pins in that case. However for virtual pins you need to use next code : ```cpp //triggered from app BLYNK_READ(V1) { //send to app Blynk.virtualWrite(V1, val); } ``` **Sketch:** [BlynkBlink](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/BlynkBlink/BlynkBlink.ino) ================================================ FILE: untitled/gravity.md ================================================ # Gravity Gravity is kind of [motion sensors](https://developer.android.com/guide/topics/sensors/sensors_motion.html) that allows you to detect motion of your smartphone. Useful for monitoring device movement, such as tilt, shake, rotation, or swing. The gravity sensor provides a three dimensional vector indicating the direction and magnitude of gravity. Measured in `m/s^2` of gravity force applied to `x`, `y`, `z` axis. In oder to accept data from it you need to : ```cpp BLYNK_WRITE(V1) { //force of gravity applied to axis x int x = param[0].asFloat(); //force of gravity applied to axis y int y = param[1].asFloat(); //force of gravity applied to axis y int z = param[2].asFloat(); } ``` Gravity doesn't work in background. ================================================ FILE: untitled/humidity.md ================================================ # Humidity Humidity is kind of [environment sensors](https://developer.android.com/guide/topics/sensors/sensors_environment.html) that allows you to measure ambient relative humidity. Measured in `%` - actual relative humidity in percent. In oder to accept data from it you need to : ```cpp BLYNK_WRITE(V1) { // humidity in % int humidity = param.asInt(); } ``` Humidity doesn't work in background. ================================================ FILE: untitled/image.md ================================================ # Image Image widget allows you to display any image within your project. You need to provide http/s url to it. Url should be valid endpoint to the binary data of the image. Url shortener will not work. Right now image widget supports 2 display options: * **Fit**: Image will be scaled to fit height or width of the widget size; * **Fill**: Image will be scaled to fill widget area. Cropping may occur; You can make image widget interactive by providing multiple links to different images with different states and change displayed image index from your hardware or via Eventor widget. For example, select the first icon from the list : ```cpp Blynk.virtualWrite(V1, 1); //image indexing starts from 1 ``` You can also change opacity, scale or rotation of the displayed the image : ```cpp Blynk.setProperty(V1, "opacity", 50); // 0-100% ``` ```cpp Blynk.setProperty(V1, "scale", 30); // 0-100% ``` ```cpp Blynk.setProperty(V1, "rotation", 10); //0-360 degrees ``` also, you can fully replace the list of images from the hardware: ```cpp Blynk.setProperty(V1, "urls", "https://image1.jpg", "https://image2.jpg"); ``` or you can change individual image by it index: ```cpp Blynk.setProperty(V1, "url", 1, "https://image1.jpg"); ``` ================================================ FILE: untitled/joystick.md ================================================ # joystick ## Joystick Control servo movements in 4 directions. ### Settings: * **SPLIT**: Each of the parameters is sent directly to the Pin on your hardware \(e.g D7\). You don't need to write any code. **NOTE:** In this mode you send multiple commands from one widget, which can reduce performance of your hardware. Example: If you have a Joystick Widget and it's set to D3 and D4, it will send 2 commands over the Internet: ```cpp digitalWrite(3, x); digitalWrite(4, y); ``` * **MERGE**: When MERGE mode is selected, you are sending just 1 message, consisting of array of values. But you'll need to parse it on the hardware. This mode can be used with Virtual Pins only. Example: Add a Joystick Widget and set it to MERGE mode. Choose Virtual Pin V1 ```cpp BLYNK_WRITE(V1) // Joystick assigned to V1 { // get x int x = param[0].asInt(); // get y int y = param[1].asInt(); } ``` * **Rotate on Tilt** When it's ON, Joystick will automatically rotate if you use your smartphone in landscape orientation. * **Auto-Return** When it's OFF, Joystick handle will not return back to center position. It will stay where you left it. ## Send On Release **Send On Release** is available for most controller widgets and allows you to decrease data traffic on your hardware. For example, when you move joystick widget, commands are continuously streamed to the hardware, during a single joystick move you can send dozens of commands. There are use-cases where it's needed, however creating such a load may cause hardware reset. We recommend enabling **Send On Release** feature for most of the cases, unless you really need instant feedback. This option is enabled by default. ## Write interval Similar to above option. However, allows you to stream values to your hardware within certain interval. For example, setting write interval to 100 ms - means, that while you move slider only 1 value will be send to hardware within 100 ms. This option also used to decrease data traffic on your hardware. **Sketch:** [JoystickTwoAxis](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/JoystickTwoAxis/JoystickTwoAxis.ino) ================================================ FILE: untitled/labeled_value.md ================================================ # Labeled Value Displays incoming data from your sensors or Virtual Pins. It is a better version of 'Value Display' as it has a formatting string, so you could format incoming value to any string you want. Can work in 2 modes : * PUSH mode \(select if from Frequency Reading picker\); * Frequency Reading mode; In PUSH mode you update value display from hardware side with code : ```cpp Blynk.virtualWrite(V1, val); ``` In this mode every message that hardware sends to server is stored automatically on server. PUSH mode doesn't require application to be online or opened. With Frequency Reading mode you need to select update interval and application will trigger events with required timing. Your application should be open and running in order to make requests to hardware. You don't need any code for Analog and digital pins in that case. However for virtual pins you need to use next code : ```cpp //triggered from app BLYNK_READ(V1) { //send to app Blynk.virtualWrite(V1, val); } ``` ## Formatting options Let's assume, your sensor sends number 12.6789 to Blynk application. Next formatting options are supported: `/pin/` - displays the value without formatting \(12.6789\) `/pin./` - displays the value without decimal part \(13\) `/pin.#/` - displays the value with 1 decimal digit \(12.7\) `/pin.##/` - displays the value with two decimal places \(12.68\) ## Home Screen Labeled Value You can also add Labeled Value to your Android Home Screen. Labeled Value works via HTTPS in that case. Have in mind that in "Home Screen" mode Labeled Value has few limitations. Labeled Value will update it's state only once per 15 min. You can change this via Widget Settings. However update interval less than 15 minutes is not guaranteed. You can also resize Labeled Value on Home Screen - just do long click on widget and resize it as you need. **Note :** Adding home screen widget costs 100 energy. This energy not rechargeable. **Note :** Home Screen Widgets for Local Blynk servers requires port 8080 to be opened. **Sketch:** [BlynkBlink](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/BlynkBlink/BlynkBlink.ino) ================================================ FILE: untitled/labeled_value_display.md ================================================ # Labeled Value Displays incoming data from your sensors or Virtual Pins. It is a better version of 'Value Display' as it has a formatting string, so you could format incoming value to any string you want. Can work in 2 modes : * PUSH mode \(select if from Frequency Reading picker\); * Frequency Reading mode; In PUSH mode you update value display from hardware side with code : ```cpp Blynk.virtualWrite(V1, val); ``` In this mode every message that hardware sends to server is stored automatically on server. PUSH mode doesn't require application to be online or opened. With Frequency Reading mode you need to select update interval and application will trigger events with required timing. Your application should be open and running in order to make requests to hardware. You don't need any code for Analog and digital pins in that case. However for virtual pins you need to use next code : ```cpp //triggered from app BLYNK_READ(V1) { //send to app Blynk.virtualWrite(V1, val); } ``` ## Formatting options Let's assume, your sensor sends number 12.6789 to Blynk application. Next formatting options are supported: `/pin/` - displays the value without formatting \(12.6789\) `/pin./` - displays the value without decimal part \(13\) `/pin.#/` - displays the value with 1 decimal digit \(12.7\) `/pin.##/` - displays the value with two decimal places \(12.68\) ## Home Screen Labeled Value You can also add Labeled Value to your Android Home Screen. Labeled Value works via HTTPS in that case. Have in mind that in "Home Screen" mode Labeled Value has few limitations. Labeled Value will update it's state only once per 15 min. You can change this via Widget Settings. However update interval less than 15 minutes is not guaranteed. You can also resize Labeled Value on Home Screen - just do long click on widget and resize it as you need. **Note :** Adding home screen widget costs 100 energy. This energy not rechargeable. **Note :** Home Screen Widgets for Local Blynk servers requires port 8080 to be opened. **Sketch:** [BlynkBlink](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/BlynkBlink/BlynkBlink.ino) ================================================ FILE: untitled/lcd.md ================================================ # LCD This is a regular 16x2 LCD display made in our secret facility in China. It can work in 2 modes : * Simple * Advanced ## Simple mode In simple mode your LCD widget performs as regular widget with Frequency reading. With Frequency Reading mode you need to select update interval and application will trigger events with required timing. Your application should be open and running in order to make requests to hardware. You don't need any code for Analog and Digital pins in that case. However for virtual pins you need to use next code : ```cpp //triggered from app BLYNK_READ(V1) { //send to app Blynk.virtualWrite(V1, val); } ``` In Simple mode LCD also supports formatting options. ### Formatting options Let's assume, your sensor sends number 12.6789 to Blynk application. Next formatting options supported: `/pin/` - displays the value without formatting \(12.6789\) `/pin./` - displays the value without decimal part \(13\) `/pin.#/` - displays the value with 1 decimal digit \(12.7\) `/pin.##/` - displays the value with two decimal places \(12.68\) **Sketch:** [LCD Simple Mode Pushing](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/LCD/LCD_SimpleModePushing/LCD_SimpleModePushing.ino) **Sketch:** [LCD Simple Mode Reading](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/LCD/LCD_SimpleModeReading/LCD_SimpleModeReading.ino) ## Advanced mode Advanced mode is for experienced users. Allows you to use special commands to control LCD. ## Commands Init LCD variable : ```cpp WidgetLCD lcd(V1); ``` Send message : ```cpp lcd.print(x, y, "Your Message"); ``` Where `x` is a symbol position \(0-15\), `y` is a line number \(0 or 1\), Clear LCD : ```cpp lcd.clear(); ``` **Sketch:** [LCD Advanced Mode](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/LCD/LCD_AdvancedMode/LCD_AdvancedMode.ino) ================================================ FILE: untitled/led.md ================================================ # LED A simple LED for indication. You need to send 0 in order to turn LED off. And 255 in order to turn LED on. Or just use Blynk API as described below : ```cpp //register to virtual pin 1 WidgetLED led1(V1); led1.off(); led1.on(); ``` All values between 0 and 255 will change LED brightness : ```cpp WidgetLED led2(V2); //set brightness of LED to 50%. led2.setValue(127); ``` You can also change LED color with : ```cpp //#D3435C - Blynk RED Blynk.setProperty(V1, "color", "#D3435C"); ``` ## Home Screen LED You can also add LED to your Android Home Screen. LED works via HTTPS in that case. Have in mind that in "Home Screen" mode LED has few limitations. LED will update it's state only once per 15 min. You can change this via Widget Settings. However update interval less than 15 minutes is not guaranteed. **Note :** Adding home screen widget costs 100 energy. This energy not rechargeable. **Note :** Home Screen Widgets for Local Blynk servers requires port 8080 to be opened. **Sketch:** [LED](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/LED/LED_Blink/LED_Blink.ino) ================================================ FILE: untitled/level_display.md ================================================ # Level Display Displays incoming data from your sensors or Virtual Pins. Level Display is very similar to progress bar, it is very nice and fancy view for indication of "filled" events, like "level of battery". You can update value display from hardware side with code : ```cpp Blynk.virtualWrite(V1, val); ``` Every message that hardware sends to server is stored automatically on server. PUSH mode doesn't require application to be online or opened. **Sketch:** [Push Example](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/PushData/PushData.ino) ================================================ FILE: untitled/light.md ================================================ # Light Light is kind of [environment sensors](https://developer.android.com/guide/topics/sensors/sensors_environment.html) that allows you to measure level of light \(measures the ambient light level \(illumination\) in lx\). In phones it is used to control screen brightness. In order to accept data from it you need to : ```cpp BLYNK_WRITE(V1) { //light value int lx = param.asInt(); } ``` Light doesn't work in background. ================================================ FILE: untitled/map.md ================================================ # Map Map widget allows you set points/pins on map from hardware side. This is very useful widget in case you have multiple devices and you want track their values on map. You can send a point to map with regular virtual write command : ```cpp Blynk.virtualWrite(V1, pointIndex, lat, lon, "value"); ``` We also created a wrapper for you to make usage of map simpler : You can change button labels from hardware with : ```cpp WidgetMap myMap(V1); ... int index = 1; float lat = 51.5074; float lon = 0.1278; myMap.location(index, lat, lon, "value"); ``` Using save `index` allows you to override existing point value. **Sketch:** [Basic Sketch](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Map/Map.ino) ================================================ FILE: untitled/menu.md ================================================ # Menu Menu widget allows you to send command to your hardware based on selection you made on UI. Menu sends index of element you selected and not label string. Sending index is starts from 1. It works same way as usual ComboBox element. Example code: ```cpp BLYNK_WRITE { switch (param.asInt()) { case 1: { // Item 1 Serial.println("Item 1 selected"); break; } case 2: { // Item 2 Serial.println("Item 2 selected"); break; } } } ``` You can also set Menu items from hardware side with : ```cpp Blynk.setProperty(V1, "labels", "label 1", "label 2", "label 3"); ``` **Sketch:** [Menu](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Menu/Menu.ino) ================================================ FILE: untitled/music_player.md ================================================ # Music Player Simple UI element with 3 buttons - simulates music player interface. Every button sends it's own command to hardware : `play`, `stop`, `prev`, `next`. You can change widget state within the app from hardware side with next commands: ```text Blynk.virtualWrite(Vx, “play”); Blynk.virtualWrite(Vx, “stop”); ``` You can also change widget play/stop state with next code \(equivalent to above commands\) : `Blynk.setProperty(V1, "isOnPlay", "false");` **Sketch:** [Music Player](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Player/Player.ino) ================================================ FILE: untitled/network/README.md ================================================ # network ================================================ FILE: untitled/network/blynkkk-blynkkk.github.io.md ================================================ # blynkkk/blynkkk.github.io [![@blynkkk](https://avatars3.githubusercontent.com/u/11541426?s=32&v=4)](https://github.com/blynkkk) [blynkkk](https://github.com/blynkkk) / [blynkkk.github.io]() ![](https://github.githubassets.com/images/modules/network/t.png) [![@091500](https://avatars1.githubusercontent.com/u/418832?s=32&v=4)](https://github.com/091500) [091500](https://github.com/091500) / [blynkkk.github.io](https://github.com/091500/blynkkk.github.io) ![](https://github.githubassets.com/images/modules/network/t.png) [![@3mmar7amed](https://avatars1.githubusercontent.com/u/45490495?s=32&v=4)](https://github.com/3mmar7amed) [3mmar7amed](https://github.com/3mmar7amed) / [blynkkk.github.io](https://github.com/3mmar7amed/blynkkk.github.io) ![](https://github.githubassets.com/images/modules/network/t.png) [![@AlexArGC](https://avatars3.githubusercontent.com/u/48761297?s=32&v=4)](https://github.com/AlexArGC) [AlexArGC](https://github.com/AlexArGC) / [blynkkk.github.io](https://github.com/AlexArGC/blynkkk.github.io) ![](https://github.githubassets.com/images/modules/network/t.png) [![@alexkipar](https://avatars2.githubusercontent.com/u/107899?s=32&v=4)](https://github.com/alexkipar) [alexkipar](https://github.com/alexkipar) / [blynkkk.github.io](https://github.com/alexkipar/blynkkk.github.io) ![](https://github.githubassets.com/images/modules/network/t.png) [![@amonhk](https://avatars3.githubusercontent.com/u/23211255?s=32&v=4)](https://github.com/amonhk) [amonhk](https://github.com/amonhk) / [blynkkk.github.io](https://github.com/amonhk/blynkkk.github.io) ![](https://github.githubassets.com/images/modules/network/t.png) [![@AndrewDamz](https://avatars3.githubusercontent.com/u/46534689?s=32&v=4)](https://github.com/AndrewDamz) [AndrewDamz](https://github.com/AndrewDamz) / [blynkkk.github.io](https://github.com/AndrewDamz/blynkkk.github.io) ![](https://github.githubassets.com/images/modules/network/t.png) [![@anonGitHum](https://avatars1.githubusercontent.com/u/14102967?s=32&v=4)](https://github.com/anonGitHum) [anonGitHum](https://github.com/anonGitHum) / [blynkkk.github.io](https://github.com/anonGitHum/blynkkk.github.io) ![](https://github.githubassets.com/images/modules/network/t.png) [![@ArnieX](https://avatars0.githubusercontent.com/u/2325116?s=32&v=4)](https://github.com/ArnieX) [ArnieX](https://github.com/ArnieX) / [blynkkk.github.io](https://github.com/ArnieX/blynkkk.github.io) ![](https://github.githubassets.com/images/modules/network/t.png) [![@art-fm98](https://avatars2.githubusercontent.com/u/40850614?s=32&v=4)](https://github.com/art-fm98) [art-fm98](https://github.com/art-fm98) / [blynkkk.github.io](https://github.com/art-fm98/blynkkk.github.io) ![](https://github.githubassets.com/images/modules/network/t.png) [![@BillTheBest](https://avatars3.githubusercontent.com/u/1173938?s=32&v=4)](https://github.com/BillTheBest) [BillTheBest](https://github.com/BillTheBest) / [blynkkk.github.io](https://github.com/BillTheBest/blynkkk.github.io) ![](https://github.githubassets.com/images/modules/network/t.png) [![@bittercrow](https://avatars2.githubusercontent.com/u/12152088?s=32&v=4)](https://github.com/bittercrow) [bittercrow](https://github.com/bittercrow) / [blynkkk.github.io](https://github.com/bittercrow/blynkkk.github.io) ![](https://github.githubassets.com/images/modules/network/t.png) [![@Booteille](https://avatars0.githubusercontent.com/u/2203721?s=32&v=4)](https://github.com/Booteille) [Booteille](https://github.com/Booteille) / [blynk-docs-fr](https://github.com/Booteille/blynk-docs-fr) ![](https://github.githubassets.com/images/modules/network/i.png) ![](https://github.githubassets.com/images/modules/network/l.png) [![@LibrEduc](https://avatars0.githubusercontent.com/u/33196220?s=32&v=4)](https://github.com/LibrEduc) [LibrEduc](https://github.com/LibrEduc) / [blynk-docs-fr](https://github.com/LibrEduc/blynk-docs-fr) ![](https://github.githubassets.com/images/modules/network/t.png) [![@ceviana](https://avatars3.githubusercontent.com/u/13856315?s=32&v=4)](https://github.com/ceviana) [ceviana](https://github.com/ceviana) / [blynkkk.github.io](https://github.com/ceviana/blynkkk.github.io) ![](https://github.githubassets.com/images/modules/network/t.png) [![@codeitbhanu](https://avatars3.githubusercontent.com/u/22428590?s=32&v=4)](https://github.com/codeitbhanu) [codeitbhanu](https://github.com/codeitbhanu) / [blynkkk.github.io](https://github.com/codeitbhanu/blynkkk.github.io) ![](https://github.githubassets.com/images/modules/network/t.png) [![@Crewin](https://avatars1.githubusercontent.com/u/25099719?s=32&v=4)](https://github.com/Crewin) [Crewin](https://github.com/Crewin) / [blynkkk.github.io](https://github.com/Crewin/blynkkk.github.io) ![](https://github.githubassets.com/images/modules/network/t.png) [![@DjElectron](https://avatars2.githubusercontent.com/u/58311735?s=32&v=4)](https://github.com/DjElectron) [DjElectron](https://github.com/DjElectron) / [blynkkk.github.io](https://github.com/DjElectron/blynkkk.github.io) ![](https://github.githubassets.com/images/modules/network/t.png) [![@EarlOld](https://avatars3.githubusercontent.com/u/24506752?s=32&v=4)](https://github.com/EarlOld) [EarlOld](https://github.com/EarlOld) / [blynkkk.github.io](https://github.com/EarlOld/blynkkk.github.io) ![](https://github.githubassets.com/images/modules/network/t.png) [![@EddieBogart](https://avatars3.githubusercontent.com/u/66404846?s=32&v=4)](https://github.com/EddieBogart) [EddieBogart](https://github.com/EddieBogart) / [blynkkk.github.io](https://github.com/EddieBogart/blynkkk.github.io) ![](https://github.githubassets.com/images/modules/network/t.png) [![@eledir](https://avatars1.githubusercontent.com/u/4344290?s=32&v=4)](https://github.com/eledir) [eledir](https://github.com/eledir) / [blynkkk.github.io](https://github.com/eledir/blynkkk.github.io) ![](https://github.githubassets.com/images/modules/network/t.png) [![@emil01](https://avatars2.githubusercontent.com/u/315038?s=32&v=4)](https://github.com/emil01) [emil01](https://github.com/emil01) / [blynkkk.github.io](https://github.com/emil01/blynkkk.github.io) ![](https://github.githubassets.com/images/modules/network/t.png) [![@emoritani](https://avatars3.githubusercontent.com/u/10086050?s=32&v=4)](https://github.com/emoritani) [emoritani](https://github.com/emoritani) / [blynkkk.github.io](https://github.com/emoritani/blynkkk.github.io) ![](https://github.githubassets.com/images/modules/network/t.png) [![@Fettkeewl](https://avatars1.githubusercontent.com/u/25577040?s=32&v=4)](https://github.com/Fettkeewl) [Fettkeewl](https://github.com/Fettkeewl) / [blynkkk.github.io](https://github.com/Fettkeewl/blynkkk.github.io) ![](https://github.githubassets.com/images/modules/network/t.png) [![@franksmicro](https://avatars3.githubusercontent.com/u/499151?s=32&v=4)](https://github.com/franksmicro) [franksmicro](https://github.com/franksmicro) / [blynkkk.github.io](https://github.com/franksmicro/blynkkk.github.io) ![](https://github.githubassets.com/images/modules/network/t.png) [![@Ganeshsh2244](https://avatars2.githubusercontent.com/u/52893635?s=32&v=4)](https://github.com/Ganeshsh2244) [Ganeshsh2244](https://github.com/Ganeshsh2244) / [blynkkk.github.io](https://github.com/Ganeshsh2244/blynkkk.github.io) ![](https://github.githubassets.com/images/modules/network/t.png) [![@HokoriXIII](https://avatars3.githubusercontent.com/u/3841066?s=32&v=4)](https://github.com/HokoriXIII) [HokoriXIII](https://github.com/HokoriXIII) / [blynkkk.github.io](https://github.com/HokoriXIII/blynkkk.github.io) ![](https://github.githubassets.com/images/modules/network/t.png) [![@houzhenggang](https://avatars2.githubusercontent.com/u/2803928?s=32&v=4)](https://github.com/houzhenggang) [houzhenggang](https://github.com/houzhenggang) / [blynkkk.github.io](https://github.com/houzhenggang/blynkkk.github.io) ![](https://github.githubassets.com/images/modules/network/t.png) [![@igaidai4uk](https://avatars3.githubusercontent.com/u/2185483?s=32&v=4)](https://github.com/igaidai4uk) [igaidai4uk](https://github.com/igaidai4uk) / [blynkkk.github.io](https://github.com/igaidai4uk/blynkkk.github.io) ![](https://github.githubassets.com/images/modules/network/t.png) [![@ingmiguelyepezcivil](https://avatars1.githubusercontent.com/u/61588404?s=32&v=4)](https://github.com/ingmiguelyepezcivil) [ingmiguelyepezcivil](https://github.com/ingmiguelyepezcivil) / [blynkkk.github.io](https://github.com/ingmiguelyepezcivil/blynkkk.github.io) ![](https://github.githubassets.com/images/modules/network/t.png) [![@jctecnum](https://avatars0.githubusercontent.com/u/48631580?s=32&v=4)](https://github.com/jctecnum) [jctecnum](https://github.com/jctecnum) / [blynkkk.github.io](https://github.com/jctecnum/blynkkk.github.io) ![](https://github.githubassets.com/images/modules/network/t.png) [![@Jwarni](https://avatars3.githubusercontent.com/u/3473622?s=32&v=4)](https://github.com/Jwarni) [Jwarni](https://github.com/Jwarni) / [blynkkk.github.io](https://github.com/Jwarni/blynkkk.github.io) ![](https://github.githubassets.com/images/modules/network/t.png) [![@langtupt](https://avatars3.githubusercontent.com/u/18097488?s=32&v=4)](https://github.com/langtupt) [langtupt](https://github.com/langtupt) / [blynkkk.github.io](https://github.com/langtupt/blynkkk.github.io) ![](https://github.githubassets.com/images/modules/network/t.png) [![@livelytech](https://avatars2.githubusercontent.com/u/58115111?s=32&v=4)](https://github.com/livelytech) [livelytech](https://github.com/livelytech) / [blynkkk.github.io](https://github.com/livelytech/blynkkk.github.io) ![](https://github.githubassets.com/images/modules/network/t.png) [![@Manoharsai](https://avatars1.githubusercontent.com/u/2752217?s=32&v=4)](https://github.com/Manoharsai) [Manoharsai](https://github.com/Manoharsai) / [blynkkk.github.io](https://github.com/Manoharsai/blynkkk.github.io) ![](https://github.githubassets.com/images/modules/network/t.png) [![@Mark-Pan](https://avatars3.githubusercontent.com/u/67413917?s=32&v=4)](https://github.com/Mark-Pan) [Mark-Pan](https://github.com/Mark-Pan) / [blynkkk.github.io](https://github.com/Mark-Pan/blynkkk.github.io) ![](https://github.githubassets.com/images/modules/network/t.png) [![@MarkAYoder](https://avatars3.githubusercontent.com/u/660054?s=32&v=4)](https://github.com/MarkAYoder) [MarkAYoder](https://github.com/MarkAYoder) / [blynkkk.github.io](https://github.com/MarkAYoder/blynkkk.github.io) ![](https://github.githubassets.com/images/modules/network/t.png) [![@mayankmaurya123](https://avatars1.githubusercontent.com/u/42763562?s=32&v=4)](https://github.com/mayankmaurya123) [mayankmaurya123](https://github.com/mayankmaurya123) / [blynkkk.github.io](https://github.com/mayankmaurya123/blynkkk.github.io) ![](https://github.githubassets.com/images/modules/network/t.png) [![@MD14](https://avatars2.githubusercontent.com/u/7752122?s=32&v=4)](https://github.com/MD14) [MD14](https://github.com/MD14) / [blynkkk.github.io](https://github.com/MD14/blynkkk.github.io) ![](https://github.githubassets.com/images/modules/network/t.png) [![@mopster81](https://avatars1.githubusercontent.com/u/60694641?s=32&v=4)](https://github.com/mopster81) [mopster81](https://github.com/mopster81) / [blynkkk.github.io](https://github.com/mopster81/blynkkk.github.io) ![](https://github.githubassets.com/images/modules/network/t.png) [![@mulengakatebe](https://avatars1.githubusercontent.com/u/517856?s=32&v=4)](https://github.com/mulengakatebe) [mulengakatebe](https://github.com/mulengakatebe) / [blynkkk.github.io](https://github.com/mulengakatebe/blynkkk.github.io) ![](https://github.githubassets.com/images/modules/network/t.png) [![@Noriffik](https://avatars3.githubusercontent.com/u/1632308?s=32&v=4)](https://github.com/Noriffik) [Noriffik](https://github.com/Noriffik) / [blynkkk.github.io](https://github.com/Noriffik/blynkkk.github.io) ![](https://github.githubassets.com/images/modules/network/t.png) [![@nucarbn](https://avatars1.githubusercontent.com/u/24677156?s=32&v=4)](https://github.com/nucarbn) [nucarbn](https://github.com/nucarbn) / [blynkkk.github.io](https://github.com/nucarbn/blynkkk.github.io) ![](https://github.githubassets.com/images/modules/network/t.png) [![@Olaclemmy](https://avatars1.githubusercontent.com/u/15816561?s=32&v=4)](https://github.com/Olaclemmy) [Olaclemmy](https://github.com/Olaclemmy) / [blynkkk.github.io](https://github.com/Olaclemmy/blynkkk.github.io) ![](https://github.githubassets.com/images/modules/network/t.png) [![@perrywarner](https://avatars2.githubusercontent.com/u/7812136?s=32&v=4)](https://github.com/perrywarner) [perrywarner](https://github.com/perrywarner) / [blynkkk.github.io](https://github.com/perrywarner/blynkkk.github.io) ![](https://github.githubassets.com/images/modules/network/t.png) [![@pganguly](https://avatars0.githubusercontent.com/u/12072626?s=32&v=4)](https://github.com/pganguly) [pganguly](https://github.com/pganguly) / [blynkkk.github.io](https://github.com/pganguly/blynkkk.github.io) ![](https://github.githubassets.com/images/modules/network/t.png) [![@quehanwei](https://avatars0.githubusercontent.com/u/1967943?s=32&v=4)](https://github.com/quehanwei) [quehanwei](https://github.com/quehanwei) / [blynkkk.github.io](https://github.com/quehanwei/blynkkk.github.io) ![](https://github.githubassets.com/images/modules/network/t.png) [![@Refenz](https://avatars2.githubusercontent.com/u/16590099?s=32&v=4)](https://github.com/Refenz) [Refenz](https://github.com/Refenz) / [blynkkk.github.io](https://github.com/Refenz/blynkkk.github.io) ![](https://github.githubassets.com/images/modules/network/t.png) [![@samanpiwpay](https://avatars0.githubusercontent.com/u/32676028?s=32&v=4)](https://github.com/samanpiwpay) [samanpiwpay](https://github.com/samanpiwpay) / [blynkkk.github.io](https://github.com/samanpiwpay/blynkkk.github.io) ![](https://github.githubassets.com/images/modules/network/t.png) [![@sanyaade-iot](https://avatars1.githubusercontent.com/u/7230207?s=32&v=4)](https://github.com/sanyaade-iot) [sanyaade-iot](https://github.com/sanyaade-iot) / [blynkkk.github.io](https://github.com/sanyaade-iot/blynkkk.github.io) ![](https://github.githubassets.com/images/modules/network/t.png) [![@SCKStef](https://avatars0.githubusercontent.com/u/3851625?s=32&v=4)](https://github.com/SCKStef) [SCKStef](https://github.com/SCKStef) / [blynkkk.github.io](https://github.com/SCKStef/blynkkk.github.io) ![](https://github.githubassets.com/images/modules/network/t.png) [![@seco](https://avatars2.githubusercontent.com/u/629386?s=32&v=4)](https://github.com/seco) [seco](https://github.com/seco) / [blynkkk.github.io](https://github.com/seco/blynkkk.github.io) ![](https://github.githubassets.com/images/modules/network/t.png) [![@shoorik007](https://avatars0.githubusercontent.com/u/31213414?s=32&v=4)](https://github.com/shoorik007) [shoorik007](https://github.com/shoorik007) / [blynkkk.github.io](https://github.com/shoorik007/blynkkk.github.io) ![](https://github.githubassets.com/images/modules/network/t.png) [![@skhshimul](https://avatars3.githubusercontent.com/u/54437831?s=32&v=4)](https://github.com/skhshimul) [skhshimul](https://github.com/skhshimul) / [blynkkk.github.io](https://github.com/skhshimul/blynkkk.github.io) ![](https://github.githubassets.com/images/modules/network/t.png) [![@slaith](https://avatars2.githubusercontent.com/u/1351947?s=32&v=4)](https://github.com/slaith) [slaith](https://github.com/slaith) / [blynkkk.github.io](https://github.com/slaith/blynkkk.github.io) ![](https://github.githubassets.com/images/modules/network/t.png) [![@Smol777](https://avatars1.githubusercontent.com/u/35020360?s=32&v=4)](https://github.com/Smol777) [Smol777](https://github.com/Smol777) / [blynkkk.github.io](https://github.com/Smol777/blynkkk.github.io) ![](https://github.githubassets.com/images/modules/network/t.png) [![@Songkran4](https://avatars3.githubusercontent.com/u/65441525?s=32&v=4)](https://github.com/Songkran4) [Songkran4](https://github.com/Songkran4) / [blynkkk.github.io](https://github.com/Songkran4/blynkkk.github.io) ![](https://github.githubassets.com/images/modules/network/t.png) [![@soulith](https://avatars2.githubusercontent.com/u/42127728?s=32&v=4)](https://github.com/soulith) [soulith](https://github.com/soulith) / [blynkkk.github.io](https://github.com/soulith/blynkkk.github.io) ![](https://github.githubassets.com/images/modules/network/t.png) [![@tech-rostand](https://avatars1.githubusercontent.com/u/30441214?s=32&v=4)](https://github.com/tech-rostand) [tech-rostand](https://github.com/tech-rostand) / [blynkkk.github.io](https://github.com/tech-rostand/blynkkk.github.io) ![](https://github.githubassets.com/images/modules/network/t.png) [![@tsanalytics](https://avatars1.githubusercontent.com/u/13785036?s=32&v=4)](https://github.com/tsanalytics) [tsanalytics](https://github.com/tsanalytics) / [blynkkk.github.io](https://github.com/tsanalytics/blynkkk.github.io) ![](https://github.githubassets.com/images/modules/network/t.png) [![@turikumana](https://avatars0.githubusercontent.com/u/57685029?s=32&v=4)](https://github.com/turikumana) [turikumana](https://github.com/turikumana) / [blynkkk.github.io](https://github.com/turikumana/blynkkk.github.io) ![](https://github.githubassets.com/images/modules/network/t.png) [![@vg9889](https://avatars3.githubusercontent.com/u/25285266?s=32&v=4)](https://github.com/vg9889) [vg9889](https://github.com/vg9889) / [blynkkk.github.io](https://github.com/vg9889/blynkkk.github.io) ![](https://github.githubassets.com/images/modules/network/t.png) [![@vipinkumardil5](https://avatars0.githubusercontent.com/u/62417657?s=32&v=4)](https://github.com/vipinkumardil5) [vipinkumardil5](https://github.com/vipinkumardil5) / [blynkkk.github.io](https://github.com/vipinkumardil5/blynkkk.github.io) ![](https://github.githubassets.com/images/modules/network/t.png) [![@vyacheslav-code](https://avatars2.githubusercontent.com/u/30864886?s=32&v=4)](https://github.com/vyacheslav-code) [vyacheslav-code](https://github.com/vyacheslav-code) / [blynkkk.github.io](https://github.com/vyacheslav-code/blynkkk.github.io) ![](https://github.githubassets.com/images/modules/network/t.png) [![@wahyusetiarno](https://avatars0.githubusercontent.com/u/49818005?s=32&v=4)](https://github.com/wahyusetiarno) [wahyusetiarno](https://github.com/wahyusetiarno) / [blynkkk.github.io](https://github.com/wahyusetiarno/blynkkk.github.io) ![](https://github.githubassets.com/images/modules/network/t.png) [![@Whitebimmer](https://avatars2.githubusercontent.com/u/26184082?s=32&v=4)](https://github.com/Whitebimmer) [Whitebimmer](https://github.com/Whitebimmer) / [blynkkk.github.io](https://github.com/Whitebimmer/blynkkk.github.io) ![](https://github.githubassets.com/images/modules/network/l.png) [![@WhizzCat](https://avatars0.githubusercontent.com/u/17166886?s=32&v=4)](https://github.com/WhizzCat) [WhizzCat](https://github.com/WhizzCat) / [blynkkk.github.io](https://github.com/WhizzCat/blynkkk.github.io) ================================================ FILE: untitled/network/numberinput.md ================================================ # Числовой ввод \(Numeric Input\) Числовой ввод отображается и позволяет вам непосредственно ввести числовое значение. Как и в виджете [Шаг \(Step\)](https://github.com/blynkkk/blynkkk.github.io/blob/master/mobile/ru/step.md), он также имеет кнопки увеличения и уменьшения для более быстрого изменения значений, вы можете установить \(шаг, цикл\) \(step, looping\) в настройках виджета. ================================================ FILE: untitled/network/slider.md ================================================ # slider ## Слайдер \(Slider\) Слайдер очень похож на потенциометр. Он позволяет посылать значения в диапазоне от минимального значения к максимальному. Диапазон допустимых максимального и минимального значений определяется в приложении. Вы так же можете менять состояние слайдера с микроконтроллера. Например, Вы можете изменить положение ползунка в слайдере : ```cpp Blynk.virtualWrite(V1, 55); ``` Так же можно поменять текст в слайдере : ```cpp Blynk.setProperty(V1, "label", "Мой слайдерок"); ``` или изменить цвет : ```cpp //#D3435C - Карсный цвет в кодирвке RGB Blynk.setProperty(V1, "color", "#D3435C"); ``` ## Отправка при отжатии \(Send On Release\) **Отправка при отжатии** эта функциональность позволяет снизить количество сообщений которые отправляет слайдер при смещении ползунка. Даже при незначительном перемещени ползунка - приложение шлет довольно много команд. Для некторых микроконтроллеров это может быть очень большой нагрузкой и они могут начать перегружатся. Тем не менее есть сценарии использования для которых это очень важно. По умолчанию, слайдер будет слать значения когда вы отпускаете ползунок. Мы рекомендуем исползовать этот подход, кроме случая когда Вам необходимо получать промежуточные значения при движении ползунка слайдера. **Пример кода:** [Базовый пример](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/BlynkBlink/BlynkBlink.ino) ================================================ FILE: untitled/notification.md ================================================ # notification ## Push Notifications Push Notification widget allows you to send push notification from your hardware to your device. Currently it also contains 2 additional options : * **Notify when hardware offline** - you will get push notification in case your hardware went offline. * **Offline Ignore Period** - defines how long hardware could be offline \(after it went offline\) before sending notification. In case period is exceeded - "hardware offline" notification will be send. You will get no notification in case hardware was reconnected within specified period. * **Priority** high priority gives more chances that your message will be delivered without any delays. See detailed explanation [here](https://firebase.google.com/docs/cloud-messaging/concept-options#setting-the-priority-of-a-message). **WARNING** : high priority contributes more to battery drain compared to normal priority messages. Example code: ```cpp Blynk.notify("Hey, Blynkers! My hardware can push now!"); ``` You can also use placeholder for device name, that will be replaced on the server with your device name: ```cpp Blynk.notify("Hey, Blynkers! My {DEVICE_NAME} can push now!"); ``` Limitations : * Maximum allowed body length is 120 symbols; * Every device can send only 1 notification every 5 seconds; ## Unicode in push notifications The library handles all strings as UTF8 Unicode. If you're facing problems, try to print your message to the Serial and see if it works \(the terminal should be set to UTF-8 encoding\). If it doesn't work, probably you should read about unicode support of your compiler. If it works, but your message is truncated - you need to increase message length limit \(all Unicode symbols consume at least twice the size of Latin symbols\). ## Increasing message length limit You can increase maximum message length by putting on the top of your sketch \(before Blynk includes\): ```cpp #define BLYNK_MAX_SENDBYTES 256 // Default is 128 ``` **Sketch:** [PushNotification](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/PushNotification/PushNotification_Button/PushNotification_Button.ino) ================================================ FILE: untitled/number_input.md ================================================ # Numeric Input Numeric Input displays and let's you directly alter a number value. Similar to the Step widget, it has incrementing and decrementing buttons for quicker values changes, which you can setup \(step, looping\) in widget settings. ================================================ FILE: untitled/numberinput.md ================================================ # Numeric Input Numeric Input displays and let's you directly alter a number value. Similar to the Step widget, it has incrementing and decrementing buttons for quicker values changes, which you can setup \(step, looping\) in widget settings. ================================================ FILE: untitled/proximity.md ================================================ # Proximity Proximity is kind of [position sensors](https://developer.android.com/guide/topics/sensors/sensors_position.html) that allows you to determine how close the face of a smartphone is to an object. Measured in `cm` - distance from phone face to object. However most of this sensors returns only FAR / NEAR information. So return value will be `0/1`. Where 0/LOW is `FAR` and 1/HIGH is `NEAR`. In order to accept data from it you need to : ```cpp BLYNK_WRITE(V1) { // distance to object int proximity = param.asInt(); if (proximity) { //NEAR } else { //FAR } } ``` Proximity doesn't work in background. ================================================ FILE: untitled/pull/README.md ================================================ # pull ================================================ FILE: untitled/pull/change-float-to-double-by-earlold-pull-request-41.md ================================================ # Change float to double by EarlOld · Pull Request \#41 **Have a question about this project?** Sign up for a free GitHub account to open an issue and contact its maintainers and the community.Pick a usernameEmail AddressPassword By clicking “Sign up for GitHub”, you agree to our [terms of service](https://help.github.com/terms) and [privacy statement](https://help.github.com/privacy). We’ll occasionally send you account related emails. Already on GitHub? [Sign in](https://github.com/login?return_to=%2Fblynkkk%2Fblynkkk.github.io%2Fissues%2Fnew) to your account ================================================ FILE: untitled/pull/text_input.md ================================================ # Текстовый ввод \(Text Input\) Отображается как строка текстового ввода, где вы можете напрямую изменять строковое значение. Также вы можете ограничить максимальное количество вводимых символов в настройках виджета. ================================================ FILE: untitled/pull/webhook.md ================================================ # Вебхук \(Webhook\) Вебхук очень мощный виджет, который позволяет Вам легко интегрироватся с любыми сторонними сервисами. С его помощью Вы можете слать любые HTTP/S запросы на любой сервер или устройство, которое имеет HTTP/S API \(например, лампы Philips Hue\). Вебхук вешается на вирутальный пин и любая команда, которая приходит на этот пин будет вызывать срабатывание HTTP/S запроса. Команды на такой виртуальный пин могут приходить как со стороны железа, так и со стороны приложения. То есть, Вы можете слать любой HTTP запрос при нажатии кнопки в приложении, если эта кнопка на том же пине что и вебхук. Вот простой пример, представьте, что Вы хотите слать данные с микроконтроллера не только в Blynk, но и в какой-то другой сервис, например - Google Docs или в thingspeak.com. Раньше Вам для этого пришлось бы писать что-то вроде : ```cpp WiFiClient client; if (client.connect("api.thingspeak.com", 80)) { client.print("POST /update HTTP/1.1\n"); client.print("Host: api.thingspeak.com\n"); client.print("Connection: close\n"); client.print("X-THINGSPEAKAPIKEY: " + apiKeyThingspeak1 + "\n"); client.print("Content-Type: application/x-www-form-urlencoded\n"); client.print("Content-Length: "); client.print(postStr.length()); client.print("\n\n"); client.print(postStr); } ``` С вебхуком этого больше делать не нужно. Достаточно лишь заполнить поля виджета в приложении и выполнить привычное: ```cpp Blynk.virtualWrite(V0, value); ``` Где V0 - пин вебхук виджета. В дополнение, Вы можете подставлять значение пина в URL: ```cpp https://api.thingspeak.com/update?api_key=xxxxxx&field1=/pin/ ``` или тело запроса : ```cpp ["/pin/"] ``` Так же можно отправлять несколько значений внутри одного пина \(до 5\) : `/pin[0]/`,`/pin[1]/`, `/pin[2]/` Еще одна крутая штука - это возможность делать HTTP GET запросы на сервере и слать их результат на микроконтроллер. Прелесть тут в том, что Вам не нужно для этого писать сложный код на микроконтроллере. Представьте, что Вам нужно получить информацию о погоде от какого-то метио сервиса. Например, по такому запросу : ```text Вы можете вставить этот запрос в вебхук виджет, выбрать пин ```V0``` и написать : ```cpp BLYNK_WRITE(V0){ String webhookdata = param.asStr(); Serial.println(webhookdata); } ``` Теперь, каждый раз когда вы дергаете `V0` с помощью `Blynk.virtualWrite(V0, 1)` будет вызвана функция `BLYNK_WRITE(V0)`. **Замечание:** обычно HTTP запросы довольно большие, поэтому Вам, вероятно, нужно будет увеличить лимит на максимальную длину сообщения на микроконтроллере `#define BLYNK_MAX_READBYTES 1024`. **Замечание:** наше облако так же имеет определенные лимиты для вебхука. Мы разрешаем слать только 1 запрос в секунду. Это поведение можно изменить на локальном сервер через свойство `webhooks.frequency.user.quota.limit`. Пожалуйста, используйте вебхуки с умом. Многие веб ресурсы не способны обрабатывать даже 1 запрос в секунду. **Замечание :** в случае если Ваш вебхук не выполнился 10 раз подряд - вебхук виджет будет остановлен. Чтобы восстановить его работу - нужно открыть и закрыть виджет в режиме редактирования. Не выполненными считаются запросы у которых код ответа не равен 200 или 302. ================================================ FILE: untitled/report.md ================================================ # report ## Reports Function of Reports widget is to configure and customize data reports in CSV format. You can choose between one-time or continuous scheduled reports. Also, within the Reports you can clear all the data collected by your devices. You need to configure initial inputs in Edit mode, and then, in Play mode you will be able to customize reports. ### Edit mode. Data inputs configuration In edit mode \(when your project is stopped\) you define the Datastreams you would like to later be included in reports. Reports widget is designed to work with the Device Tiles widget. If you don't use Device Tiles you can still select a single device or a group of devices as a source of data for reports. You have to choose either Device Tiles or single / group of the devices for the report. You can't combine these 2 options. ### Play mode. After you added source devices and their Datastreams click Play button and click on the Reports button. ## Customizing Reports. Every Report option supposes it's own settings: `Report name` - give your report a meaningful name. `Data source` - select the Datastreams you would like to be included in reports. `Report Frequency` - Defines how often reports will be sent. They can be one-time and scheduled. `one-time` - will instantly generate report and send it to the email addresses specified. Click on the right icon to send it. Scheduled reports can be sent `daily`/`weekly`/`monthly`. `At Time` will set up a time of the day the report will be sent. `Start`/`End` specifies start and end date the reports will continue to be sent. For Weekly Report you can select a day of the week when report should be sent. For Monthly report you can choose whether to send report on the first or last day of the month. `Recipients` - specify up to 5 email addresses. `Data resolution` defines granularity of your reports. Supported granularities are: `minute`, `hourly` and `daily`. For example, when you generate daily report with 1 minute granularity you'll get `24 * 60 * 60` points in your daily report for every selected Datastream. `Group data in reports by` - specify the output format of the CSV file\(s\). `Datastream` you will get 1 CSV file for each Datastream. `Device` you will get 1 CSV file per each device. Each file will contain all of the included Datastreams. `Report` you will get 1 CSV file for all your devices and all your Datastreams. `Timezone correction` - specify the time zone adjustment if you need to get report date and time adjusted to a specific time zone `Date and time format` - defines the format of the timestamp field of your data. You can select `2018-06-21 20:16:48`, `2018-06-21T20:16:48+03:00` or other supported formats. There is one specific `Timestamp` format - which reflects the difference between the current time and midnight, January 1, 1970 UTC measured in milliseconds. After the report is set up - click on "OK" button at the right upper corner. Your report is ready. Once you configured the report you will see when is the `Next` report scheduled and also a schedule for this report. After the report was sent at least once, you can see when the `Last` report was sent. `Last` label also contains the status regarding the report: * `OK`: the report was generated and sent to the Recipients successfully; * `No Data`: the report doesn't contain any data for the configured period; * `Error`: something went wrong. Please contact the Blynk Team support; Reports will be generated even if your project is not in active \(Play\) mode. However, inactive projects don't generate any data. **NOTE:** all reports are encoded in UTF-16. Please, make sure you selected UTF-16 as required "Character set" for your csv reader. ================================================ FILE: untitled/rgb.md ================================================ # rgb ## zeRGBa zeRGBa is usual RGB controller \(color picker\). ### Settings: * **SPLIT**: Each of the parameters is sent directly to the Pin on your hardware \(e.g D7\). You don't need to write any code. **NOTE:** In this mode you send multiple commands from one widget, which can reduce performance of your hardware. Example: If you have a zeRGBa Widget and it's set to D1, D2, D3 it will send 3 commands over the Internet: ```cpp digitalWrite(1, r); digitalWrite(2, g); digitalWrite(3, b); ``` * **MERGE**: When MERGE mode is selected, you are sending just 1 message, consisting of array of values. But you'll need to parse it on the hardware. This mode can be used with Virtual Pins only. Example: Add a zeRGBa Widget and set it to MERGE mode. Choose Virtual Pin V1. ```cpp BLYNK_WRITE(V1) // zeRGBa assigned to V1 { // get a RED channel value int r = param[0].asInt(); // get a GREEN channel value int g = param[1].asInt(); // get a BLUE channel value int b = param[2].asInt(); } ``` * **Send On Release** is available for most controller widgets and allows you to decrease data traffic on your hardware. For example, when you move joystick widget, commands are continuously streamed to the hardware, during a single joystick move you can send dozens of commands. There are use-cases where it's needed, however creating such a load may cause hardware reset. We recommend enabling **Send On Release** feature for most of the cases, unless you really need instant feedback. This option is enabled by default. ## Write interval Similar to above option. However, allows you to stream values to your hardware within certain interval. For example, setting write interval to 100 ms - means, that while you move slider only 1 value will be send to hardware within 100 ms. This option also used to decrease data traffic on your hardware. ================================================ FILE: untitled/rtc.md ================================================ # RTC Real-time clock allows you to get time from server. You can preselect any timezone on UI to get time on hardware in required locale. **Sketch:** [RTC](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/RTC/RTC.ino) ================================================ FILE: untitled/ru.md ================================================ # ru ================================================ FILE: untitled/segmented_control.md ================================================ # Segmented Switch Segmented Switch widget allows you to send command to your hardware based on selection you made on UI. Segmented Switch sends index of element you selected and not label string. Sending index starts from 1. It works same way as usual ComboBox or Menu element. Example code: ```cpp BLYNK_WRITE { switch (param.asInt()) { case 1: { // Item 1 Serial.println("Item 1 selected"); break; } case 2: { // Item 2 Serial.println("Item 2 selected"); break; } } } ``` You can also set Menu items from hardware side with : ```cpp Blynk.setProperty(V1, "labels", "label 1", "label 2", "label 3"); ``` **Sketch:** [Menu](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Menu/Menu.ino) ================================================ FILE: untitled/segmentedswitch.md ================================================ # Segmented Switch Segmented Switch widget allows you to send command to your hardware based on selection you made on UI. Segmented Switch sends index of element you selected and not label string. Sending index starts from 1. It works same way as usual ComboBox or Menu element. Example code: ```cpp BLYNK_WRITE { switch (param.asInt()) { case 1: { // Item 1 Serial.println("Item 1 selected"); break; } case 2: { // Item 2 Serial.println("Item 2 selected"); break; } } } ``` You can also set Menu items from hardware side with : ```cpp Blynk.setProperty(V1, "labels", "label 1", "label 2", "label 3"); ``` **Sketch:** [Menu](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Menu/Menu.ino) ================================================ FILE: untitled/slider.md ================================================ # slider ## Slider Similar to potentiometer. Allows to send values between MIN and MAX. You can change slider state from hardware side. For example, set slider value assigned to virtual pin V1 to 55 : ```cpp Blynk.virtualWrite(V1, 55); ``` You can change slider label from hardware with : ```cpp Blynk.setProperty(V1, "label", "My Slider Label"); ``` or change color : ```cpp //#D3435C - Blynk RED Blynk.setProperty(V1, "color", "#D3435C"); ``` ## Fraction Defines how many digits after the point you would like to see when moving slider. When you have "No Fraction" that means slider will send only integer values without decimal point. "1 digit" means that values will look like 1.1, 1.2, ..., 2.0, etc. ## Send On Release **Send On Release** is available for most controller widgets and allows you to decrease data traffic on your hardware. For example, when you move slider widget, commands are continuously streamed to the hardware, during a single slider move you can send dozens of commands. There are use-cases where it's needed, however creating such a load may cause hardware reset. We recommend enabling **Send On Release** feature for most of the cases, unless you really need instant feedback. This option is enabled by default. ## Write interval Similar to above option. However, allows you to stream values to your hardware within certain interval. For example, setting write interval to 100 ms - means, that while you move slider only 1 value will be send to hardware within 100 ms. This option also used to decrease data traffic on your hardware. **Sketch:** [Basic Sketch](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/BlynkBlink/BlynkBlink.ino) ================================================ FILE: untitled/step.md ================================================ # step ## Step Control Step control is like 2 buttons assigned to 1 pin. One button increments your value by desired step and another one decrements it. It is very useful for use cases where you need to change your values very precisely and you can't achieve this precision with slider widget. **Send Step** option allows you to send step to hardware instead of actual value of step widget. **Loop value** option allows you to reset step widget to start value when maximum value is reached. You can change step state from hardware side. For example : ```cpp Blynk.virtualWrite(V1, val); ``` You can change step labels from hardware with : ```cpp Blynk.setProperty(V1, "label", "My Stepper"); ``` You can change the step of the step widget from hardware with : ```cpp Blynk.setProperty(V1, "step", 10); ``` or change color : ```cpp //#D3435C - Blynk RED Blynk.setProperty(V1, "color", "#D3435C"); ``` You can also get step control state from server in case your hardware was disconnected with Blynk Sync feature : ```cpp BLYNK_CONNECTED() { Blynk.syncVirtual(V1); } BLYNK_WRITE(V1) { int stepperValue = param.asInt(); } ``` ## Write interval Similar to above option. However, allows you to stream values to your hardware within certain interval. For example, setting write interval to 100 ms - means, that while you move slider only 1 value will be send to hardware within 100 ms. This option also used to decrease data traffic on your hardware. **Sketch:** [Basic Sketch](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/BlynkBlink/BlynkBlink.ino) ================================================ FILE: untitled/styled_button.md ================================================ # Styled Button Works in push or switch modes. Allows to send any number value on button click and button release events. By default button uses 0/1 \(LOW/HIGH\) values. Button sends 1 \(HIGH\) on press and sends 0 \(LOW\) on release. You can change button state from hardware side. For example, turn on button assigned to virtual pin V1: ```cpp Blynk.virtualWrite(V1, HIGH); ``` You can change button labels from hardware with : ```cpp Blynk.setProperty(V1, "onLabel", "ON"); Blynk.setProperty(V1, "offLabel", "OFF"); ``` or change color of the button : ```cpp Blynk.setProperty(V1, "onColor", "#D3435C"); Blynk.setProperty(V1, "offColor", "#D3435C"); ``` or change background color of the button : ```cpp Blynk.setProperty(V1, "onBackColor", "#D3435C"); Blynk.setProperty(V1, "offBackColor", "#D3435C"); ``` You can also get button state from server in case your hardware was disconnected with Blynk Sync feature : ```cpp BLYNK_CONNECTED() { Blynk.syncVirtual(V1); } BLYNK_WRITE(V1) { int buttonState = param.asInt(); } ``` **Sketch:** [Basic Sketch](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/BlynkBlink/BlynkBlink.ino) **Sketch:** [Physical Button Interrupt](https://github.com/blynkkk/blynk-library/blob/master/examples/More/Sync/ButtonInterrupt/ButtonInterrupt.ino) **Sketch:** [Physical Button Poll](https://github.com/blynkkk/blynk-library/blob/master/examples/More/Sync/ButtonPoll/ButtonPoll.ino) **Sketch:** [Physical Button State Sync](https://github.com/blynkkk/blynk-library/blob/master/examples/More/Sync/SyncPhysicalButton/SyncPhysicalButton.ino) ================================================ FILE: untitled/super_chart.md ================================================ # SuperChart SuperChart is used to visualise live and historical data. You can use it for sensor data, for binary event logging and more. To use SuperChart widget you would need to push the data from the hardware with the desired interval by using timers. [Here is](https://examples.blynk.cc/?board=ESP8266&shield=ESP8266%20WiFi&example=GettingStarted%2FPushData) a basic example for data pushing. ## Interactions: * **Switch between time ranges and Live mode** </br>Tap time ranges at the bottom of the widget to change time ranges * **Tap Legend Elements** to show or hide datastreams </br> * **Tap'n'hold to view timestamp and corresponding values** * **Quick swipe from left to right to reveal previous data**</br> Then you can then scroll data back and forward within the given time range. * **Full Screen Mode**</br> Press this button to open Full Screen view in landscape orientation. Simply rotate the phone back to portrait mode. Chart should rotate automagically. In full screen view you will see X \(time\) and multiple Y scales. Full Screen Mode can be disabled from widget Settings. * **Menu Button**</br> Menu button will open additional functions: * Export to CSV * Erase Data on the server ## SuperChart Settings: * **Chart Title** * **Title Font Size**</br> You have a choice of 3 font sizes * **Title Alignment**</br> Choose chart title alignment. This setting also affects Title and Legend position on the Widget. * **Show x-axis \(time\)**</br> Select it if you want to show the time label at the bottom of your chart. * **Time ranges picker**</br> Allows you to select required periods \(`15m`, `30m`, `1h`, `3h`, ...\) and resolution for your chart. Resolution defines how precise your data is. Right now chart supports 2 types of resolution `standard` and `high`. Resolution also depends on the selected period. For example, `standard` resolution for `1d` means you'll get 24 points per day \(1 per hour\), with `high` resolution you'll get for `1d` 1440 points per day \(1 per minute\). * **Datastreams**</br> Add datastreams \(read below how to configure datastreams\) ## Datastream Settings Widget supports up to 4 Datastreams. Press Datastream Settings Icon to open Datastream Settings. **Design:** Choose available types of Chart: * Line * Area * Bar * Binary \(anchor LINK to binary\) **Color:** Choose solid colors or gradients **Source and input:** You can use 3 types of Data source: **1. Virtual Pin** Choose the desired Device and Virtual Pin to read the data from. **2. Tags** SuperChart can aggregate data from multiple devices using built-in aggregation functions. For example, if you have 10 Temperature sensors sending temperature with the given period, you can plot average value from 10 sensors on the widget. To use Tags: * [**Add Tag**](../#blynk-main-operations-control-of-multiple-devices-tags) to every device you want to aggregate data from. * **Push data to the same Virtual Pin** on every device. \(e.g. `Blynk.virtualWrite (V0, temperature);`\) * **Choose Tag as a source** in SuperChart Widget and use the pin where the data is coming to \(e.g V0\) **Functions available:** * `SUM` will summarize all incoming values to the specified Virtual Pin across all devices tagged with the chosen tag * `AVG` will plot average value * `MED` will find a median value * `MIN` will plot minimum value * `MAX` will plot maximum value **☝️ IMPORTANT: Tags are not working in Live Mode.** 1. [**Device Selector**](../#widgets-time-input-device-selector) If you add Device Selector Widget to your project, you can use it as a source for SuperChart. In this case, when you change the device in Device Selector, chart will be updated accordingly **Y-Axis Settings** There are 4 modes of how to scale data along the Y axis 1. _Auto_ Data will be auto-scaled based on min and max values of the given time period. This is nice option to start with. 2. **Min/Max** When this mode is selected, Y scale will be set to the values you choose. For example, if your hardware sends data with values varying from -100 to 100, you can set the chart to this values and data will be rendered correctly. You may also want to visualize the data within some specific range. Let's say incoming data has values in the range of 0-55, but you would like to see only values in the range 30-50. You can set it up and if values are out of Y scale you configured, chart will be cropped 1. **% of Height** This option allows you to auto-scale incoming data on the widget and position it the way you want. In this mode, you set up the percentage of widget height on the screen, from 0% to 100%. If you set 0-100%, in fact it's a full auto-scale. No matter in which range the data is coming, it will be always scaled to the whole height of the widget. If you set it to 0-25%, then this chart will only be rendered on 1/4 of the widget height. This setting is very valuable for **Binary Chart** or for visualizing a few datastreams on the same chart in a different way. 1. _Delta_ While data stays within the given Delta value, chart will be auto-scaled within this range. If delta exceeds the range, chart will be auto-scaled to min/max values of the given period. **Suffix** Here you can specify a suffix that will be shown during the Tap'n'hold. **Decimals** Defines the formatting of the graph value when you Tap'n'hold the graph. Possible options are: \#, \#.\#, \#.\#\#, etc. **Connect Missing Data Points** If this switch is ON, then SuperChart will connect all the dots even if there was no data. If it's set to OFF, then you will see gaps in case there was no data. **Binary Chart Settings** This type of chart is useful to plot binary data, for example when unit was ON or OFF, or when motion was detected or when certain threshold was reached. You need to specify a **FLIP** point, which is the point where incoming data will be turned into TRUE or FALSE state. For example, you send the data in the range of `0 to 1023`. If you set `512` as a **FLIP** point, then everything above `512` \(excluding 512\) will be recorded as `TRUE`, any value below `512` \(including 512\) will be `FALSE`. Another example, if you send `0 and 1` and set `0` as a **FLIP** point, then `1` will be `TRUE`, `0` will be `FALSE` **State Labels:** Here you can specify how `TRUE/FALSE` should be shown in Tap'n'Hold mode. For example, you can set to `TRUE` to "Equipment ON" label, `FALSE` to "Equipment OFF". ================================================ FILE: untitled/table.md ================================================ # Table Table widget comes handy when you need to structure similar data within 1 graphical element. It works as a usual table. You can add a row to the table with : ```text Blynk.virtualWrite(V1, "add", id, "Name", "Value"); ``` You can update a row in the table with : ```text Blynk.virtualWrite(V1, "update", id, "UpdatedName", "UpdatedValue"); ``` To highlight any item in a table by using it's id in a table : ```text Blynk.virtualWrite(V1, "pick", 0); ``` To select/deselect \(make icon green/grey\) item in a table by using it's row id in a table : ```text Blynk.virtualWrite(V1, "select", 0); Blynk.virtualWrite(V1, "deselect", 0); ``` To clear the table at any time with: ```text Blynk.virtualWrite(V1, "clr"); ``` You can also handle other actions coming from table. For example, use row as a switch button. ```text BLYNK_WRITE(V1) { String cmd = param[0].asStr(); if (cmd == "select") { //row in table was selected. int rowId = param[1].asInt(); } if (cmd == "deselect") { //row in table was deselected. int rowId = param[1].asInt(); } if (cmd == "order") { //rows in table where reodered int oldRowIndex = param[1].asInt(); int newRowIndex = param[2].asInt(); } } ``` **Note :** Max number of rows in the table is 100. When you reach the limit, table will work as FIFO \(First In First Out\) list. This limit can be changed by configuring `table.rows.pool.size` property for Local Server. **Sketch:** [Simple Table usage](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Table/Table_Simple/Table_Simple.ino) **Sketch:** [Advanced Table usage](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Table/Table_Advanced/Table_Advanced.ino) ================================================ FILE: untitled/tabs.md ================================================ # Tabs The only purpose of Tabs widget is to extend your project space. In order to edit tabs widget - just tap on the selected tab. You can drag widgets between tabs. Only the last tab can be removed: to remove it swipe left on its name in Settings screen. The maximum number of tabs on iOS is 4 The maximum number of tabs on Android is 10 Stay tuned for an upcoming Tabs widget redesign! ================================================ FILE: untitled/temperature.md ================================================ # Temperature Temperature is kind of [environment sensors](https://developer.android.com/guide/topics/sensors/sensors_environment.html) that allows you to measure ambient air temperature. Measured in `°C` - celcius. In order to accept data from it you need to : ```cpp BLYNK_WRITE(V1) { // temperature in celcius int celcius = param.asInt(); } ``` Temperature doesn't work in background. ================================================ FILE: untitled/terminal.md ================================================ # Terminal Displays data from your hardware. Allows to send any string to your hardware. Terminal always stores last 25 messages your hardware had send to Blynk Cloud. This limit may be increased on Local Server with `terminal.strings.pool.size` property. You can use special commands with this widget: ```cpp // Print values, like Serial.print terminal.print(); // Print values, like Serial.println() terminal.println(); // Write a raw data buffer terminal.write(); // Ensure that data was sent out of device terminal.flush(); // Erase all values in the terminal terminal.clear(); ``` **Sketch:** [Terminal](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Terminal/Terminal.ino) ================================================ FILE: untitled/textinput.md ================================================ # Text Input Text Input displays and let's you directly alter a string value. You can limit a maximum number of characters in widget settings. ================================================ FILE: untitled/timeinput.md ================================================ # Time Input Time input widget allows you to select start/stop time, day of week, timezone, sunrise/sunset formatted values and send them to your hardware. Supported formats for time now are `HH:MM` and `HH:MM AM/PM`. Hardware will get selected on UI time as seconds of day \(`3600 * hours + 60 * minutes`\) for start/stop time. Time that widget sends to hardware is user local time. Selected days indexes : ```text Monday - 1 Tuesday - 2 ... Saturday - 6 Sundays - 7 ``` You can also change state of widget on UI. See below sketches. **Sketch:** [Simple Time Input for start time](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/TimeInput/SimpleTimeInput/SimpleTimeInput.ino) **Sketch:** [Advanced Time Input](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/TimeInput/AdvancedTimeInput/AdvancedTimeInput.ino) **Sketch:** [Update Time Input State on UI](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/TimeInput/UpdateTimeInputState/UpdateTimeInputState.ino) ================================================ FILE: untitled/timer.md ================================================ # Timer Timer triggers actions at a specific time. Even if smartphone is offline. By default start time sends 1 \(HIGH\), stop time sends 0 \(LOW\). You can change this with any other values. You can change timer settings in "run" mode. Recent Android version also has improved Timer within Eventor widget. With Eventor Time Event you can assign multiple timers on same pin, send any string/number, select days and timezone. It is recommended to use Eventor over Timer widget. However Timer widget is still suitable for simple timer events. **NOTE:** The timer widget rely on the server time and not your phone time. Sometimes the phone time may not match the server time. **Sketch:** [Timer](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Timer/Timer.ino) ================================================ FILE: untitled/tree/README.md ================================================ # tree ================================================ FILE: untitled/tree/accelerometer/README.md ================================================ # Акселерометр \(Accelerometer\) Акселерометр один из [сенсоров движения](https://developer.android.com/guide/topics/sensors/sensors_motion.html), который позволяет определить движение Вашего телефона в пространстве. Он может пригодится для отслеживания таких событий как тряска, удар, поворот или наклон телефона. Концептуально, акселерометр определяет силу ускорения приложенную к вашему телефону. Единица измерения - м/c^2 приложенная к каждой из осей `x`, `y`, `z`. Чтобы получить данные с сенсора нужно использовать следующий код : ```cpp BLYNK_WRITE(V1) { //сила ускорения, приложенная к оси x int x = param[0].asFloat(); //сила ускорения, приложенная к оси y int y = param[1].asFloat(); //сила ускорения, приложенная к оси z int z = param[2].asFloat(); } ``` Акселерометр не работает при свернутом приложении. ================================================ FILE: untitled/tree/accelerometer/new.md ================================================ # new ================================================ FILE: untitled/tree/barometer.md ================================================ # Барометр/Давление \(Barometer/pressure\) Барометр один из сенсоров [окружающей среды](https://developer.android.com/guide/topics/sensors/sensors_environment.html) и позволяет измерять атмосферное давление. Измеряется в `hPa` \(гПа\) или `mbar` \(мБар\). Чтобы получить данные с сенсора нужно использовать следующий код : ```cpp BLYNK_WRITE(V1) { //Давление в мБар int pressure = param[0].asInt(); } ``` Барометр не работает при свернутом приложении. ================================================ FILE: untitled/tree/bluetooth/README.md ================================================ # Блютуз \(Bluetooth\) Этот виджет позволяет включить блютуз на вашем телефоне. На текущий момент виджет также требует наличия интернет соединения \(постараемся пофиксить в ближайшем будущем\) и поддерживается только на Android. Некоторые типы виджетов нельзя использовать вместе с блютузом, например исторический граф, так как он требует чтобы данные отправлялись на сервер, чего блютуз виджет не делает. **Список поддерживаемых чипов и контроллеров:** [BLE](https://github.com/blynkkk/blynk-library/tree/master/examples/Boards_Bluetooth) ================================================ FILE: untitled/tree/bluetooth/blynkkk-blynkkk.github.io-4.md ================================================ # blynkkk/blynkkk.github.io [Permalink](https://github.com/blynkkk/blynkkk.github.io/tree/b1f1a439851d4000d4d85ddab2f72db8d227d6cc/ru) Failed to load latest commit information. Type Name Latest commit message Commit time You can’t perform that action at this time. ================================================ FILE: untitled/tree/blynkkk-blynkkk.github.io.md ================================================ # blynkkk/blynkkk.github.io Tree: b1f1a43985 [Go to file](https://github.com/blynkkk/blynkkk.github.io/find/b1f1a439851d4000d4d85ddab2f72db8d227d6cc)Code #### Clone with HTTPS Use Git or checkout with SVN using the web URL. * [Open with GitHub Desktop](https://desktop.github.com/) * [Download ZIP](https://github.com/blynkkk/blynkkk.github.io/archive/b1f1a439851d4000d4d85ddab2f72db8d227d6cc.zip) ## Latest commit [![@EarlOld](https://avatars1.githubusercontent.com/u/24506752?s=60&u=ebee15703b94cc6d8af2807ba50979d376548c35&v=4)](https://github.com/EarlOld) [EarlOld](../blynkkk-blynkkk.github.io-7/) committed [b1f1a43](../commit/change-float-to-double-41-b1f1a43.md)Jul 1, 2020 [Change float to double \(](../commit/change-float-to-double-41-b1f1a43.md)[\#41](../pull/change-float-to-double-by-earlold-pull-request-41.md)[\)](../commit/change-float-to-double-41-b1f1a43.md) ## Git stats * [ **918** commits](https://github.com/blynkkk/blynkkk.github.io/commits/b1f1a439851d4000d4d85ddab2f72db8d227d6cc) * [**10** branches](../blynkkk-blynkkk.github.io-8/) * [**0** tags](../blynkkk-blynkkk.github.io-9/) ## Files [Permalink](blynkkk-blynkkk.github.io.md) Failed to load latest commit information. Type Name Latest commit message Commit time [css](https://github.com/blynkkk/blynkkk.github.io/tree/b1f1a439851d4000d4d85ddab2f72db8d227d6cc/css) [google-code-prettify](https://github.com/blynkkk/blynkkk.github.io/tree/b1f1a439851d4000d4d85ddab2f72db8d227d6cc/google-code-prettify) [images](https://github.com/blynkkk/blynkkk.github.io/tree/b1f1a439851d4000d4d85ddab2f72db8d227d6cc/images) [mobile](https://github.com/blynkkk/blynkkk.github.io/tree/b1f1a439851d4000d4d85ddab2f72db8d227d6cc/mobile) [new/en](https://github.com/blynkkk/blynkkk.github.io/tree/b1f1a439851d4000d4d85ddab2f72db8d227d6cc/new/en) [ru](https://github.com/blynkkk/blynkkk.github.io/tree/b1f1a439851d4000d4d85ddab2f72db8d227d6cc/ru) [scripts](https://github.com/blynkkk/blynkkk.github.io/tree/b1f1a439851d4000d4d85ddab2f72db8d227d6cc/scripts) [themes](https://github.com/blynkkk/blynkkk.github.io/tree/b1f1a439851d4000d4d85ddab2f72db8d227d6cc/themes) [Amendments.md](https://github.com/blynkkk/blynkkk.github.io/blob/b1f1a439851d4000d4d85ddab2f72db8d227d6cc/Amendments.md) [AppExport.md](https://github.com/blynkkk/blynkkk.github.io/blob/b1f1a439851d4000d4d85ddab2f72db8d227d6cc/AppExport.md) [BlynkFirmware.md](https://github.com/blynkkk/blynkkk.github.io/blob/b1f1a439851d4000d4d85ddab2f72db8d227d6cc/BlynkFirmware.md) [BlynkMainOperations.md](https://github.com/blynkkk/blynkkk.github.io/blob/b1f1a439851d4000d4d85ddab2f72db8d227d6cc/BlynkMainOperations.md) [BlynkProtocol.md](https://github.com/blynkkk/blynkkk.github.io/blob/b1f1a439851d4000d4d85ddab2f72db8d227d6cc/BlynkProtocol.md) [BlynkServer.md](https://github.com/blynkkk/blynkkk.github.io/blob/b1f1a439851d4000d4d85ddab2f72db8d227d6cc/BlynkServer.md) [CNAME](https://github.com/blynkkk/blynkkk.github.io/blob/b1f1a439851d4000d4d85ddab2f72db8d227d6cc/CNAME) [FAQ.md](https://github.com/blynkkk/blynkkk.github.io/blob/b1f1a439851d4000d4d85ddab2f72db8d227d6cc/FAQ.md) [GettingStarted.md](https://github.com/blynkkk/blynkkk.github.io/blob/b1f1a439851d4000d4d85ddab2f72db8d227d6cc/GettingStarted.md) [HardwareSetUps.md](https://github.com/blynkkk/blynkkk.github.io/blob/b1f1a439851d4000d4d85ddab2f72db8d227d6cc/HardwareSetUps.md) [Implementing.md](https://github.com/blynkkk/blynkkk.github.io/blob/b1f1a439851d4000d4d85ddab2f72db8d227d6cc/Implementing.md) [IntroAndDownloads.md](https://github.com/blynkkk/blynkkk.github.io/blob/b1f1a439851d4000d4d85ddab2f72db8d227d6cc/IntroAndDownloads.md) [License.md](https://github.com/blynkkk/blynkkk.github.io/blob/b1f1a439851d4000d4d85ddab2f72db8d227d6cc/License.md) [Links.md](https://github.com/blynkkk/blynkkk.github.io/blob/b1f1a439851d4000d4d85ddab2f72db8d227d6cc/Links.md) [OTA.md](https://github.com/blynkkk/blynkkk.github.io/blob/b1f1a439851d4000d4d85ddab2f72db8d227d6cc/OTA.md) [README.md](https://github.com/blynkkk/blynkkk.github.io/blob/b1f1a439851d4000d4d85ddab2f72db8d227d6cc/README.md) [Roadmap.md](https://github.com/blynkkk/blynkkk.github.io/blob/b1f1a439851d4000d4d85ddab2f72db8d227d6cc/Roadmap.md) [Security.md](https://github.com/blynkkk/blynkkk.github.io/blob/b1f1a439851d4000d4d85ddab2f72db8d227d6cc/Security.md) [Sharing.md](https://github.com/blynkkk/blynkkk.github.io/blob/b1f1a439851d4000d4d85ddab2f72db8d227d6cc/Sharing.md) [SupportedHardware.md](https://github.com/blynkkk/blynkkk.github.io/blob/b1f1a439851d4000d4d85ddab2f72db8d227d6cc/SupportedHardware.md) [Troubleshooting.md](https://github.com/blynkkk/blynkkk.github.io/blob/b1f1a439851d4000d4d85ddab2f72db8d227d6cc/Troubleshooting.md) [Widgets-RU.md](https://github.com/blynkkk/blynkkk.github.io/blob/b1f1a439851d4000d4d85ddab2f72db8d227d6cc/Widgets-RU.md) [Widgets.md](https://github.com/blynkkk/blynkkk.github.io/blob/b1f1a439851d4000d4d85ddab2f72db8d227d6cc/Widgets.md) [favicon.ico](https://github.com/blynkkk/blynkkk.github.io/blob/b1f1a439851d4000d4d85ddab2f72db8d227d6cc/favicon.ico) [http.md](https://github.com/blynkkk/blynkkk.github.io/blob/b1f1a439851d4000d4d85ddab2f72db8d227d6cc/http.md) [index.html](https://github.com/blynkkk/blynkkk.github.io/blob/b1f1a439851d4000d4d85ddab2f72db8d227d6cc/index.html) [table.css](https://github.com/blynkkk/blynkkk.github.io/blob/b1f1a439851d4000d4d85ddab2f72db8d227d6cc/table.css) ## README.md ### [https://docs.blynk.cc/](https://docs.blynk.cc/) ================================================ FILE: untitled/tree/bridge.md ================================================ # Мост \(Bridge\) Мост может быть использован для связи между устройствами \(без участия приложения\). Вы можете отправлять цифровые / аналоговые / виртуальные команды записи с одного устройства на другое, зная только токен авторизации. На данный момент виджет Мост не обязательно использовать в приложении \(здесь он используется для указания того, что у нас есть такая функция\). **Вы можете использовать несколько мостов для управления несколькими устройствами.** Виджет Мост использует виртуальный пин и превращает его в канал для управления другим устройством. Это означает, что вы можете контролировать любые виртуальные, цифровые или аналоговые пины целевого устройства. Будьте осторожны, не используйте пины типа `A0, A1, A2 ...` при обмене данными между различными типами устройств, так как в таких случаях Arduino Core может ссылаться на неверные пины. Пример кода для устройства A, которое будет отправлять значения на устройство B: ```cpp //Инициирует виджет Моста на V1 устройства A WidgetBridge bridge1(V1); ... void setup() { Blynk.begin(...); while (Blynk.connect() == false) { // Ждем пока Blynk подключится } bridge1.digitalWrite(9, HIGH); // выставим триггер HIGH на D9 // устройства B. Код на устройстве // B не требуется bridge1.analogWrite(10, 123); bridge1.virtualWrite(V1, "hello"); // вам нужно написать код на // устройстве B, чтобы получить // это значение. См. ниже bridge1.virtualWrite(V2, "value1", "value2", "value3"); } BLYNK_CONNECTED() { bridge1.setAuthToken("OtherAuthToken"); // токен с устройства B } ``` **ВАЖНО:** при выполнении `virtualWrite()` с виджета Мост, устройство B должно обрабатывать входящие данные с устройства A. Например, если вы отправляете значение с устройства A на устройство B, используя `bridge.virtualWrite (V5)`, вам необходимо использовать свой обработчик на устройстве B: ```cpp BLYNK_WRITE(V5){ int pinData = param.asInt(); // переменная pinData будет хранить значение, // полученное через Bridge } ``` Имейте в виду, что `bridge.virtualWrite` не отправляет никаких значений в мобильное приложение. Для этого вам нужно вызвать `Blynk.virtualWrite`. **Пример кода:** [Мост](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Bridge/Bridge.ino) ================================================ FILE: untitled/tree/button/README.md ================================================ # Кнопка \(Button\) Кнопка может работать в двух режимах - в режиме переключателя \(нажатие и отжатие посылает 1 сообщение\) и в пуш режиме \(нажатие посылает команду и отжатие посылает команду\). Кнопка позволяет послать любое число. По умолчанию кнопка шлет 0/1 \(LOW/HIGH\). В пуш режиме кнопка шлет 1 \(HIGH\) на нажатие и 0 \(LOW\) при отжатии. Вы так же можете менять состояние кнопки с микроконтроллера. Например, включить кнопку на пине V1 можно так : ```cpp Blynk.virtualWrite(V1, HIGH); ``` Так же можно поменять тексты в кнопке : ```cpp Blynk.setProperty(V1, "onLabel", "Вкл"); ``` ```cpp Blynk.setProperty(V1, "offLabel", "Выкл"); ``` Название самой кнопки : ```cpp Blynk.setProperty(V1, "label", "Моя кнопочка"); ``` Или изменить ее цвет : ```cpp //#D3435C - Blynk RED Blynk.setProperty(V1, "color", "#D3435C"); ``` В случае если микроконтроллер был перегружен, Вы всегда можете получить последнее состояние кнопки с сервера с помощью фичи синхронизации состояния: ```cpp //как только подключились BLYNK_CONNECTED() { //запросить информацию у сервера о состоянии пина V1 Blynk.syncVirtual(V1); } //этот метод будет вызыван после ответа сервера BLYNK_WRITE(V1) { int buttonState = param.asInt(); } ``` ## Кнопка на рабочем столе Если Вы используете Android, то Вы можете добавить Blynk кнопку на рабочий стол. В этом случае кнопка будет работать по протоколу HTTPS. Такого рода кнопки имеют определенные ограничения по функционалу в связи с ограничениями платформы Android. Например, Вы не можете получить мгновенную синхронизацию состояния кнопки на рабочем столе с состоянием на микроконтроллере. Так как состояние кнопки на рабочем столе обновляется раз в 15 мин. **Замечание:** Добавление виджета кнопки на рабочий стол стоит 100 энергии. Эта энергия не возвращается после удаления виджета. Также такая кнопка будет работать на локальном сервере только если открыть порт 8080. **Пример кода:** [Базовый пример](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/BlynkBlink/BlynkBlink.ino) **Пример кода:** [Синхронизация состояния с физической кнопкой через прерывания](https://github.com/blynkkk/blynk-library/blob/master/examples/More/Sync/ButtonInterrupt/ButtonInterrupt.ino) **Пример кода:** [Синхронизация состояния с физической кнопкой через поллинг](https://github.com/blynkkk/blynk-library/blob/master/examples/More/Sync/ButtonPoll/ButtonPoll.ino) **Пример кода:** [Синхронизация состояния с физической кнопкой](https://github.com/blynkkk/blynk-library/blob/master/examples/More/Sync/SyncPhysicalButton/SyncPhysicalButton.ino) ================================================ FILE: untitled/tree/button/blynkkk-blynkkk.github.io-3.md ================================================ # blynkkk/blynkkk.github.io [Permalink](https://github.com/blynkkk/blynkkk.github.io/tree/b1f1a439851d4000d4d85ddab2f72db8d227d6cc/mobile) Failed to load latest commit information. Type Name Latest commit message Commit time ================================================ FILE: untitled/tree/device_selector.md ================================================ # Селектор устройств \(Device Selector\) Селектор устройств - это мощный виджет, который позволяет обновлять виджеты на основе одного активного устройства. Этот виджет особенно полезен, когда у вас есть несколько устройств с аналогичной функциональностью. Представьте, что у вас есть 4 устройства, и к каждому устройству подключен датчик температуры и влажности. Для отображения данных по всем 4 устройствам вам необходимо добавить 8 виджетов. С помощью Селектора устройств вы можете использовать только 2 виджета, которые будут отображать температуру и влажность в зависимости от активного устройства, выбранного в Селекторе. Все, что вам нужно сделать, это: 1. Добавить виджет Селектора устройств в проект 2. Добавить 2 виджета \(например виджет отображения значений \(Value Display Widget\)\), чтобы отобразить температуру и влажность 3. В настройках виджетов вы сможете назначить их на Селектор устройств \(в разделе источника или цели\) 4. Выйти из настроек, запустить проект Теперь вы можете изменить активное устройство в Селекторе устройств и увидите, что значения температуры и влажности отражают обновленные данные для только что выбранного вами устройства. **ПРИМЕЧАНИЕ:** Виджет вебхук \([Webhook](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/WebHook/WebHook_GET/WebHook_GET.ino)\) пока не работает с Селектором устройств. ================================================ FILE: untitled/tree/gps_streaming.md ================================================ # Поток GPS \(GPS Streaming\) Полезно для мониторинга местонахождения смартфона получать данные о широте, долготе, высоте и скорости \(скорость часто может быть 0, если смартфон не поддерживает ее измерение\). Чтобы принимать данные из этого виджета, вам необходимо: ```cpp BLYNK_WRITE(V1) { float latitude = param[0].asFloat(); float longitude = param[1].asFloat(); float altitude = param[2].asFloat(); float speed = param[3].asFloat(); } ``` или вы можете использовать подготовленную оболочку `GpsParam` : ```cpp BLYNK_WRITE(V1) { GpsParam gps(param); //Печать лат/лон с 6 десятичными знаками Serial.println(gps.getLat(), 7); Serial.println(gps.getLon(), 7); Serial.println(gps.getAltitude(), 2); Serial.println(gps.getSpeed(), 2); } ``` Поток GPS работает в фоновом режиме. **Пример кода:** [Поток GPS](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/GPS_Stream/GPS_Stream.ino) ================================================ FILE: untitled/tree/graph/README.md ================================================ # График \(Graph\) Легко отображать входящие данные из вашего проекта в графическом варинате. Вы также можете прокручивать и масштабировать график. Виджет может работать в двух режимах: * режим PUSH \(выбирается из списка режимов частоты считывания\); * режим частоты считывания; В режиме PUSH вы обновляете датчик со стороны оборудования с помощью кода: ```cpp Blynk.virtualWrite(V1, val); ``` В этом режиме каждое сообщение, которое аппаратное устройство отправляет на сервер, автоматически сохраняется на сервере. Режим PUSH не требует, чтобы приложение было онлайн или запущенно. В режиме частоты считывания вам нужно выбрать интервал обновления, и приложение будет запускать события с требуемым интервалом. Ваше приложение должно быть открыто и запущено для отправки запросов на оборудование. В данном случае вам не нужен код для аналоговых и цифровых пинов. Однако для виртуальных пинов вам необходимо использовать следующий код: ```cpp //вызываем из приложения BLYNK_READ(V1) { //отправляем в приложение Blynk.virtualWrite(V1, val); } ``` **Пример кода:** [Светодиод](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/BlynkBlink/BlynkBlink.ino) ================================================ FILE: untitled/tree/graph/blynkkk-blynkkk.github.io-6.md ================================================ # blynkkk/blynkkk.github.io [Permalink](https://github.com/blynkkk/blynkkk.github.io/tree/b1f1a439851d4000d4d85ddab2f72db8d227d6cc/themes) Failed to load latest commit information. Type Name Latest commit message Commit time ================================================ FILE: untitled/tree/gravity/README.md ================================================ # Гравитация \(Gravity\) Гравитация - это своего рода [датчики движения](https://developer.android.com/guide/topics/sensors/sensors_motion.html), который позволяет обнаруживать движение вашего смартфона. Полезно для мониторинга движения устройства, таких как наклон, встряхивание, вращение или качание. Датчик силы притяжения выдает трехмерный вектор, указывающий направление и величину силы притяжения. Измеряется в `m/s^2` силы притяжения, приложенной к оси `x`, `y`, `z`. Для того, чтобы принять данные от него, вам необходимо: ```cpp BLYNK_WRITE(V1) { //сила притяжения, приложенная к оси x int x = param[0].asFloat(); //сила притяжения, приложенная к оси y int y = param[1].asFloat(); //сила притяжения, приложенная к оси y int z = param[2].asFloat(); } ``` **ВНИМАНИЕ:** Виджет гравитации не работает в фоновом режиме. ================================================ FILE: untitled/tree/gravity/blynkkk-blynkkk.github.io-5.md ================================================ # blynkkk/blynkkk.github.io [Permalink](https://github.com/blynkkk/blynkkk.github.io/tree/b1f1a439851d4000d4d85ddab2f72db8d227d6cc/scripts) Failed to load latest commit information. Type Name Latest commit message Commit time ================================================ FILE: untitled/tree/humidity/README.md ================================================ # Влажность \(Humidity\) Влажность является своего рода [датчиком среды](https://developer.android.com/guide/topics/sensors/sensors_environment.html), который позволяет измерять относительную влажность окружающей среды. Измеряется в `%` - фактически это относительная влажность в процентах. Для того, чтобы принять данные от датчика, вам необходимо: ```cpp BLYNK_WRITE(V1) { //Влажность в % int humidity = param.asInt(); } ``` **ВНИМАНИЕ:** Влажность не работает в фоновом режиме. ================================================ FILE: untitled/tree/humidity/blynkkk-blynkkk.github.io-1.md ================================================ # blynkkk/blynkkk.github.io ```text http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> Javascript code prettifier Languages : CH Javascript code prettifier Setup Downloadhttp://code.google.com/p/google-code-prettify/downloads/list">Download> a distribution Include the script tag below in your document >script src="https://google-code-prettify.googlecode.com/svn/loader/run_prettify.js>> See Getting" rel="nofollow">http://code.google.com/p/google-code-prettify/wiki/GettingStarted">Getting Started to configure that URL with options you need. Look at the skin" rel="nofollow">http://google-code-prettify.googlecode.com/svn/trunk/styles/index.html">skin gallery and pick styles that suit you.UsagePut code snippets in
          ...
          or ... and it will automatically be pretty printed.The originalPrettierclass Voila {public: // Voila static const string VOILA = "Voila"; // will not interfere with embedded tags.}class Voila {public: // Voila static const string VOILA = "Voila"; // will not interfere with embedded tags.}FAQFor which languages does it work?The comments in prettify.js are authoritative but the lexer should work on a number of languages including C and friends, Java, Python, Bash, SQL, HTML, XML, CSS, Javascript, Makefiles, and Rust. It works passably on Ruby, PHP, VB, and Awk and a decent subset of Perl and Ruby, but, because of commenting conventions, but doesn't work on Smalltalk.Other languages are supported via extensions:If you'd like to add an extension for your favorite language, please look at src/lang-lisp.js and file an http://code.google.com/p/google-code-prettify/issues/list" >issue including your language extension, and a testcase.How do I specify the language of my code?You don't need to specify the language since prettyprint() will guess. You can specify a language by specifying the language extension along with the prettyprint class like so:
            The lang-* class specifies the language file extensions.  File extensions supported by default include    "bsh", "c", "cc", "cpp", "cs", "csh", "cyc", "cv", "htm", "html",    "java", "js", "m", "mxml", "perl", "pl", "pm", "py", "rb", "sh",    "xhtml", "xml", "xsl".
          You may also use the http://dev.w3.org/html5/spec-author-view/the-code-element.html#the-code-element" >HTML 5 convention of embedding a code element inside the PRE and using language-java style classes. E.g....It doesn't work on ?Yes. Prettifying obfuscated code is like putting lipstick on a pig — i.e. outside the scope of this tool.Which browsers does it work with?It's been tested with IE 6, Firefox 1.5 & 2, and Safari 2.0.4. Look at the test page to see if it works in your browser.What's changed?See the change logWhy doesn't Prettyprinting of strings work on WordPress?Apparently wordpress does "smart quoting" which changes close quotes. This causes end quotes to not match up with open quotes.This breaks prettifying as well as copying and pasting of code samples. See http://wordpress.org/support/topic/125038" >WordPress's help center for info on how to stop smart quoting of code snippets.How do I put line numbers in my code?You can use the linenums class to turn on line numbering. If your code doesn't start at line number 1, you can add a colon and a line number to the end of that class as in linenums:52.For example
          // This is line 4.foo();bar();baz();boo();far();faz();
           produces// This is line 4.foo();bar();baz();boo();far();faz();How do I prevent a portion of markup from being marked as code?You can use the nocode class to identify a span of markup that is not code.
          int x = foo();  /* This is a comment  This is not code  Continuation of comment */int y = bar();
          producesint x = foo(); /* This is a comment This is not code Continuation of comment */int y = bar();For a more complete example see the issue22 testcase.I get an error message "a is not a function" or "opt_whenDone is not a function"If you are calling prettyPrint via an event handler, wrap it in a function. Instead of doing addEventListener('load', prettyPrint, false); wrap it in a closure like addEventListener('load', function (event) { prettyPrint() }, false); so that the browser does not pass an event object to prettyPrint which will confuse it.How can I customize the colors and styles of my code? Prettify adds with classes describing the kind of code. You can create CSS styles to matches these classes. See the http://google-code-prettify.googlecode.com/svn/trunk/styles/index.html"> theme gallery for examples.I can't add classes to my code (because it comes from Markdown, etc.) Instead of
           you can use a comment or processing instructions that survives processing instructions :  works as explained in Getting" rel="nofollow">http://code.google.com/p/google-code-prettify/wiki/GettingStarted">Getting Started
          ```
          
          
          
          ================================================
          FILE: untitled/tree/labeled_value.md
          ================================================
          # Значение переменной \(Labeled Value\)
          
          Отображает входящие данные с ваших датчиков или виртуальных пин-ов. Это лучшая версия «Отображения значений», так как в ней есть строка форматирования, где вы можете форматировать входящее значение в любую нужную вам строку.
          
          Может работать в 2 режимах:
          
          * режим PUSH \(выбирается из списка частоты считывания\);
          * режим частоты считывания.
          
            В режиме PUSH вы обновляете значения виджета со стороны аппаратного устройства с помощью кода:
          
          ```cpp
          Blynk.virtualWrite(V1, val);
          ```
          
          В этом режиме каждое сообщение, которое аппаратное обеспечение отправляет на сервер, автоматически сохраняется на сервере. Режим PUSH не требует, чтобы приложение было онлайн или запущено.
          
          В режиме частоты считывания вам нужно выбрать интервал обновления, и приложение будет запускать события с требуемым интервалом. Ваше приложение должно быть открыто и запущено для отправки запросов на оборудование. В данном случае вам не нужен код для аналоговых и цифровых пин-ов. Однако для виртуальных пин-ов вам необходимо использовать следующий код:
          
          ```cpp
          //взызов из приложения
          BLYNK_READ(V1)
          {
            //отправка в приложение
            Blynk.virtualWrite(V1, val);
          }
          ```
          
          ## Параметры форматирования
          
          Предположим, ваш датчик отправляет число 12.6789 в приложение Blynk. Поддерживаются следующие параметры форматирования:
          
          `/pin/` - отображает значение без форматирования \(12.6789\)
          
          `/pin./` - отображает значение без десятичной части \(13\)
          
          `/pin.#/` - отображает значение с одним десятичным знаком \(12.7\)
          
          `/pin.##/` - отображает значение с двумя десятичными знаками \(12.68\)
          
          ## Значение переменной на рабочем столе
          
          Вы также можете добавить значение переменной на рабочий стол Android. В этом случае значение переменной работает через HTTPS протокол. Имейте в виду, что в режиме «Рабочий стол» обновление значений переменной имеет некоторые ограничения. Значение переменной будет обновлять свое состояние только один раз в 15 минут. Вы можете изменить этот параметр в настройках виджета. Однако интервал обновления менее 15 минут не гарантируется. Вы также можете изменить размер виджета Значение переменной на главном экране - просто сделайте долгий тап на виджете и измените его размер на необходимый.
          
          **Примечание:** Добавление виджета на домашний экран стоит 100 энергии. Энергия при удалении виджета не восстанавливается.
          
          **Примечание:** Виджеты рабочего стола для локальных серверов Blynk требуют открыть порт 8080.
          
          **Пример кода:** [Базовый пример](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/BlynkBlink/BlynkBlink.ino)
          
          
          
          ================================================
          FILE: untitled/tree/labeled_value_display.md
          ================================================
          # Значение переменной \(Labeled Value\)
          
          Отображает входящие данные с ваших датчиков или виртуальных пин-ов. Это лучшая версия «Отображения значений», так как в этом виджете есть строка форматирования, поэтому вы можете форматировать входящее значение в любую нужную вам строку.
          
          Может работать в 2 режимах:
          
          * режим PUSH \( выберитается из списка частоты считывания\);
          * режим частоты считывания;
          
          В режиме PUSH вы должны обновлять отображение значений на аппаратной устройстве с помощью кода:
          
          ```cpp
          Blynk.virtualWrite(V1, val);
          ```
          
          В этом режиме каждое сообщение, которое аппаратное устройств отправляет на сервер, автоматически сохраняется на сервере. Режим PUSH не требует, чтобы приложение было онлайн или запущено.
          
          В режиме частоты считывания вам нужно выбрать интервал обновления, и приложение будет запускать события с требуемым интервалом. Ваше приложение должно быть открыто и запущено для отправки запросов на оборудование. В данном случае вам не нужен код для аналоговых и цифровых пин-ов. Однако для виртуальных пин-ов вам необходимо использовать следующий код:
          
          ```cpp
          //вызываем из приложения
          BLYNK_READ(V1)
          {
            //отправляем в приложение
            Blynk.virtualWrite(V1, val);
          }
          ```
          
          ## Параметры форматирования
          
          Предположим, ваш датчик отправляет число 12.6789 в приложение Blynk. Поддерживаются следующие параметры форматирования:
          
          `/pin/` - отображает значение без форматирования \(12.6789\)
          
          `/pin./` - отображает значение без десятичной части \(13\)
          
          `/pin.#/` - отображает значение с одним десятичным знаком \(12.7\)
          
          `/pin.##/` - отображает значение с двумя десятичными знаками \(12.68\)
          
          ## Значение переменной на главном экране
          
          Вы также можете добавить значение переменной на рабочий стол Android. В этом случае значение переменной работает через HTTPS протокол. Имейте в виду, что в режиме «Рабочий стол» значение переменной имеет некторые ограничения. Значение переменной будет обновлять свое состояние только один раз в 15 минут. Вы можете изменить этот параметр через настройки виджета. Однако интервал обновления менее 15 минут не гарантируется. Вы также можете изменить размер виджета Значение переменной на рабочем столе - просто сделайте длинный тап на виджете и измените его размер на необходимый.
          
          **Примечание:** Добавление виджета на домашний экран стоит 100 энергии. Эта энергия не восстанавливается.
          
          **Примечание:** Виджеты главного экрана для локальных серверов Blynk требуют открытия порта 8080.
          
          **Пример кода:** [Светодиод](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/BlynkBlink/BlynkBlink.ino)
          
          
          
          ================================================
          FILE: untitled/tree/lcd.md
          ================================================
          # ЖК дисплей \(LCD\)
          
          Это обычный ЖК-дисплей 16x2, "сделанный" на нашем секретном предприятии в Китае. Виджет может работать в двух режимах:
          
          * Простой \(Simple\)
          * Расширенный \(Advanced\)
          
          ## Простой режим \(Simple\)
          
          В простом режиме ваш ЖК-виджет работает как обычный виджет с частотой чтения.
          
          В режиме частоты считывания вам нужно выбрать интервал обновления данных, и приложение будет запускать события с требуемым интервалом. Ваше приложение должно быть открыто и запущено для отправки запросов на оборудование. В данном случае вам не нужен код для аналоговых и цифровых пин-ов. Однако для виртуальных пин-ов вам необходимо использовать следующий код:
          
          ```cpp
          //вызываем из приложения
          BLYNK_READ(V1)
          {
            //отправляем в приложение
            Blynk.virtualWrite(V1, val);
          }
          ```
          
          В простом режиме ЖК-дисплей также поддерживает параметры форматирования.
          
          ## Параметры форматирования
          
          Предположим, ваш датчик отправляет число 12.6789 в приложение Blynk. Поддерживаются следующие параметры форматирования:
          
          `/pin/` - отображает значение без форматирования \(12.6789\)
          
          `/pin./` - отображает значение без десятичной части \(13\)
          
          `/pin.#/` - отображает значение с одним десятичным знаком \(12.7\)
          
          `/pin.##/` - отображает значение с двумя десятичными знаками \(12.68\)
          
          **Пример кода:** [ЖК дисплей простой режим - PUSH](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/LCD/LCD_SimpleModePushing/LCD_SimpleModePushing.ino)
          
          **Пример кода:** [ЖК дисплей простой режим - 1 сек](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/LCD/LCD_SimpleModeReading/LCD_SimpleModeReading.ino)
          
          ## Расширенный режим \(Advanced\)
          
          Расширенный режим предназначен для опытных пользователей. Позволяет использовать специальные команды для управления ЖК-дисплеем.
          
          ## Команды
          
          Инициируем переменную ЖК-дисплея:
          
          ```cpp
          WidgetLCD lcd(V1);
          ```
          
          Отправим сообщение:
          
          ```cpp
          lcd.print(x, y, "Ваше сообщение");
          ```
          
          Где `x` - позиция символа \(0-15\), `y` - номер строки \(0 или 1\),
          
          Очистка ЖК-дисплея:
          
          ```cpp
          lcd.clear();
          ```
          
          **Пример кода:** [ЖК-дисплей расширенный режим](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/LCD/LCD_AdvancedMode/LCD_AdvancedMode.ino)
          
          
          
          ================================================
          FILE: untitled/tree/led.md
          ================================================
          # Светодиод \(LED\)
          
          Простой светодиод для индикации. Вам нужно отправить 0, чтобы выключить светодиод. И 255 для того, чтобы включить светодиод. Или просто используйте Blynk API, как описано ниже:
          
          ```cpp
          //регистрируемся на виртуальном пине 1
          WidgetLED led1(V1);
          led1.off();
          led1.on();
          ```
          
          Все значения от 0 до 255 изменяют яркость светодиода:
          
          ```cpp
          WidgetLED led2(V2);
          //установить яркость светодиода на 50%.
          led2.setValue(127);
          ```
          
          Вы также можете изменить цвет светодиода с помощью кода:
          
          ```cpp
          //#D3435C - Красный в RGB формате
          Blynk.setProperty(V1, "color", "#D3435C");
          ```
          
          ## Светодиод на рабочем столе
          
          Вы можете добавить виджет светодиод на рабочий стол Android. В этом случае светодиод работает через протокол HTTPS. Имейте в виду, что в режиме «Рабочий стол» виджет светодиода имеет некоторые ограничения. Светодиод будет обновлять свое состояние только один раз в 15 минут. Вы можете изменить этот интервал через настройки виджета. Однако интервал обновления менее 15 минут не гарантируется.
          
          **Примечание:** Добавление виджета на рабочий стол стоит 100 энергии. Эта энергия не возвращается при удалении виджета.
          
          **Примечание:** Виджеты рабочего стола для локальных серверов Blynk требуют открыть порт 8080.
          
          **Пример кода:** [Диод](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/LED/LED_Blink/LED_Blink.ino)
          
          
          
          ================================================
          FILE: untitled/tree/level_display.md
          ================================================
          # Индикатор уровня \(Level Display\)
          
          Отображает входящие данные с ваших датчиков или виртуальных пин-ов. Отображение уровня очень похоже на индикатор выполнения процесса, это очень красивый и причудливый вид для индикации «выполненных» событий, например «уровня заряда батареи». Вы можете обновить отображение значения с аппаратной стороны с помощью кода:
          
          ```cpp
          Blynk.virtualWrite(V1, val);
          ```
          
          Каждое сообщение, которое аппаратное устройство отправляет на сервер, автоматически сохраняется на сервере. Режим PUSH не требует, чтобы приложение было онлайн или запущено.
          
          **Пример кода:** [Пример PUSH](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/PushData/PushData.ino)
          
          
          
          ================================================
          FILE: untitled/tree/master.md
          ================================================
          # master
          
          
          
          ================================================
          FILE: untitled/tree/notification.md
          ================================================
          # notification
          
          ## Всплывающие уведомления \(Push Notifications\)
          
          Виджет Push-уведомлений позволяет отправлять уведомления с вашего оборудования на ваше Android/iOS устройство. В настоящее время он также содержит три дополнительные опции:
          
          * **Уведомлять, когда оборудование отключено** \(Notify when hardware offline\) - вы получите push-уведомление, если ваше оборудование отключилось.
          * **Автономный период игнорирования** \(Offline Ignore Period\) - определяет, как долго оборудование может находиться в режиме ожидания \(после того, как оно отключилось\) перед отправкой уведомления.
          
          В случае превышения периода ожидания будет отправлено уведомление «Аппаратное отключение». Вы не получите уведомление, если оборудование переподключится в течение указанного периода.
          
          * **Приоритет** \(Priority\) - высокий \(high\) приоритет дает больше шансов, что ваше сообщение будет доставлено без задержек. См. более подробное объяснение [здесь](https://firebase.google.com/docs/cloud-messaging/concept-options#setting-the-priority-of-a-message).
          
          **ПРЕДУПРЕЖДЕНИЕ**: высокий приоритет способствует большей разрядке батареи, по сравнению с обычными приоритетом уведомлений.
          
          Пример кода:
          
          ```cpp
          Blynk.notify("Привет, Blynk-еры! Мое оборудование может отправлять уведомления!");
          ```
          
          Вы также можете использовать переменные/заполнители для имени устройства, который будет заменен с сервера именем вашего устройства:
          
          ```cpp
          Blynk.notify("Привет, Blynk-еры! Мой {DEVICE_NAME} может отправлять уведомления!");
          ```
          
          Ограничения:
          
          * Максимально допустимая длина уведомления составляет 120 символов;
          * Каждое устройство может отправлять только 1 уведомление каждые 5 секунд;
          
          ## Кодировка всплывающих уведомлений
          
          Библиотека обрабатывает все строки как в кодировке UTF-8. Если вы столкнулись с проблемами, попробуйте отправить ваше сообщение на последовательный порт и посмотреть, работает ли оно \(терминал должен быть настроен на кодировку UTF-8\). Если так не работает, возможно, вам следует прочитать о поддержке кодировки UTF-8 вашего компилятора. Если работает, но ваше сообщение урезано - вам необходимо увеличить ограничение длины сообщения \(все символы UTF-8 потребляют как минимум вдвое больше байт информации\).
          
          ## Увеличение лимита длины уведомления
          
          Вы можете увеличить максимальную длину сообщения, поместив строку \(до включения Blynk\) в верхнюю часть своего кода:
          
          ```cpp
          #define BLYNK_MAX_SENDBYTES 256 // По умолчанию 128 байт
          ```
          
          **Пример кода:** [Всплывающие уведомления](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/PushNotification/PushNotification_Button/PushNotification_Button.ino)
          
          
          
          ================================================
          FILE: untitled/tree/number_input/README.md
          ================================================
          # Числовой ввод \(Numeric Input\)
          
          Числовой ввод отображается и позволяет вам непосредственно изменить числовое значение. Как и в виджете [Шаг \(Step\)](https://github.com/blynkkk/blynkkk.github.io/blob/master/mobile/ru/step.md), он также имеет кнопки увеличения и уменьшения для более быстрого изменения значений, вы можете установить \(шаг, цикл\) \(step, looping\) в настройках виджета.
          
          
          
          ================================================
          FILE: untitled/tree/number_input/blynkkk-blynkkk.github.io.md
          ================================================
          # blynkkk/blynkkk.github.io
          
           [Permalink](https://github.com/blynkkk/blynkkk.github.io/tree/b1f1a439851d4000d4d85ddab2f72db8d227d6cc/css)
          
           Failed to load latest commit information.
          
          Type
          
          Name
          
          Latest commit message
          
          Commit time
          
           You can’t perform that action at this time. 
          
          
          
          ================================================
          FILE: untitled/tree/report.md
          ================================================
          # report
          
          ## Отчеты \(Reports\)
          
          Функция виджета Отчеты заключается в настройке и разметке отчетов данных в формате CSV. Вы можете выбрать разовые или переодически запланированные отчеты.
          
          Кроме того, в отчетах вы можете очистить все пользовательсике данные, собранные с ваших устройств.
          
          Вам необходимо настроить начальные параметры в режиме редактирования, а затем уже в режиме воспроизведения вы сможете настроить сами отчеты.
          
          ### Режим редактирования. Конфигурация ввода данных
          
          В режиме редактирования \(когда ваш проект остановлен\) вы определяете потоки данных, которые вы хотели бы позже включить в отчет. Виджет Отчеты предназначен для работы с виджетом [Плитка устройств \(Device Tiles\)](https://github.com/blynkkk/blynkkk.github.io/blob/master/mobile/ru/device_tiles.md). Если вы не используете плитки устройств, вы все равно можете выбрать одно устройство или группу устройств в качестве источника данных для отчетов.
          
          Вы должны выбрать либо [Плитку устройств](https://github.com/blynkkk/blynkkk.github.io/blob/master/mobile/ru/device_tiles.md), либо одино устройство, либо группу устройств для отчета. Вы не можете объединить эти оба варианта.
          
          ### Режим воспроизведения
          
          После добавления исходных устройств и их потоков данных нажмите кнопку «Воспроизвести» и нажмите кнопку «Отчеты».
          
          ## Настройка отчетов
          
          Каждый параметр отчета предполагает свои собственные настройки:
          
          `Report name` \(Имя отчета\) - дайте вашему отчету осмысленное имя.
          
          `Data source` \(Источники данных\) - выберите потоки данных, которые вы хотели бы включить в отчеты.
          
          `Report Frequency` \(периодичность отчетов\) - Определяет, как часто будут отправляться отчеты. Они могут быть разовыми и запланированными.
          
          `one-time` \(Сейчас\) - мгновенно сформирует отчет и отправит его на указанные адреса электронной почты. Нажмите на значок справа, чтобы отправить отчет.
          
          Запланированные отчеты могут быть отправлены `daily`/`weekly`/`monthly` \(ежедневно/еженедельно/ежемесячно\).
          
          `At Time` \(Время\) установите время дня, когда отчет будет отправлен. `Start`/`End` \(Качало/Конец\) указывает дату начала и окончания оправки отчетов.
          
          Для еженедельного отчета вы можете выбрать день недели, когда отчет должен быть отправлен. Для ежемесячного отчета вы можете выбрать, отправку отчета в первый или последний день месяца.
          
          `Recipients` \(Получатели\) - укажите до 5 адресов электронной почты..
          
          `Data resolution` \(Разрешение данных\) определяет детализацию ваших отчетов. Поддерживаемые детализации: `minute` \(ежеминутно\), `hourly` \(ежечасно\) и `daily` \(ежедневно\). Например, когда вы генерируете ежедневный отчет с детализацией в 1 минуту, вы получаете `24 * 60 * 60` единиц данных в вашем ежедневном отчете за каждый выбранный поток.
          
          `Group data in reports by` \(Группировка данных в отчетах\) - укажите выходной формат файла-\(ов\) CSV:
          
          `Datastream` \(Поток\) - вы получите один CSV файл для каждого потока данных.
          
          `Device` \(Устройство\) - вы получите один CSV-файл на каждое устройство. Каждый файл будет содержать все включенные потоки данных.
          
          `Report` \(Отчет\) - вы получите один CSV-файл для всех ваших устройств и всех ваших потоков данных.
          
          `Timezone correction` \(Времненная зона\) - укажите корректировку часового пояса, если вам нужно настроить дату и время отчета на определенный часовой пояс.
          
          `Date and time format` \(Формат даты и времени\) - определяет формат поля временной метки ваших данных. Вы можете выбрать `2018-06-21 20:16:48`, `2018-06-21T20:16:48+03:00` или другой поддерживаемый формат.
          
          Существует особый формат `Timestamp` \(Временная метка\), которая отражает разницу между текущим временем и полуночью 1 января 1970 года UTC, измеряемую в миллисекундах.
          
          После настройки отчета нажмите кнопку «ОК» в правом верхнем углу. Ваш отчет готов.
          
          После настройки отчета вы увидите, когда запланирован следущий отчет `Next`, а также увидите расписание для этого отчета.
          
          После отправки отчета хотя бы один раз, вы можете увидеть дату его последней отправки `Last`.
          
          `Last` \(Последний\) метка также содержит статус отправки отчета:
          
          * `OK` \(Успешно\):  отчет был сгенерирован и успешно отправлен Получателям;
          * `No Data` \(Нет данных\): отчет не содержит данных за указанный период;
          * `Error` \(Ошибка\):  что-то пошло не так. Пожалуйста, свяжитесь со службой поддержки Blynk.
          
          Отчеты будут генерироваться, даже если ваш проект не находится в активном \(Play\) режиме. Однако помните, неактивные проекты небудут генерировать данные.
          
          **ПРИМЕЧАНИЕ:** все отчеты формируются в кодировке UTF-16. Пожалуйста, убедитесь, что при открытии файла отчета вы выбрали кодировку UTF-16 в вашем CSV-редакторе.
          
          
          
          ================================================
          FILE: untitled/tree/rgb.md
          ================================================
          # rgb
          
          ## ЗеБРа \(zeRGBa\)
          
          ЗеБРа - это обычный RGB контроллер \(палитры цветов\).
          
          ### Настройки:
          
          * **SPLIT** \(Раздельный\): Каждый из параметров отправляется непосредственно на пин вашего оборудования \(например, D7\). Вам не нужно писать код.
          
          **ПРИМЕЧАНИЕ:** В этом режиме вы отправляете одновременно несколько команд из одного виджета, что может снизить производительность вашего оборудования.
          
          Пример: у вас есть виджет ЗеБРа и для него было установлено значение D1, D2, D3, он отправит 3 команды через Интернет:
          
          ```cpp
          digitalWrite(1, r);
          digitalWrite(2, g);
          digitalWrite(3, b);
          ```
          
          * **MERGE** \(Объединенный\):
          
            Когда выбран режим MERGE, вы отправляете только 1 сообщение, состоящее из массива значений. Но в последствии вам нужно разобрать сообщение на своем оборудовании.
          
          Этот режим можно использовать только с виртуальными пин-ами.
          
          Пример: добавьте виджет ЗеБРа и установите его в режим MERGE. Выберите виртуальный контакт V1.
          
          ```cpp
          BLYNK_WRITE(V1) // ЗеБРа назначен на V1 
          {
              // получим значение КРАСНОГО канала
              int r = param[0].asInt();
              // получим значение ЗЕЛЕНОГО канала
              int g = param[1].asInt();
              // получим значение СИНЕГО канала
              int b = param[2].asInt();
          }
          ```
          
          * **Отправка при Отжатии \(Send On Release\)** доступно для большинства виджетов контроллеров и позволяет уменьшить трафик данных на вашем оборудовании. Например, когда вы перемещаете виджет джойстика, команды непрерывно передаются на аппаратное устройство, во время одного движения джойстика вы можете отправлять десятки команд. Есть случаи, когда это необходимо, однако создание такой нагрузки может привести к сбросу оборудования. Мы рекомендуем включить функцию **Отправка при Отжатии** для большинства случаев, если вам не требуется мгновенная обратная связь. Эта опция включена по умолчанию.
          
          ## Интервал записи \(Write interval\)
          
          Похоже на вышеуказанный вариант. Однако, позволяет вам передавать значения на ваше оборудование в через определенные интервалы времени. Например, установка интервала записи на 100 мс означает, что при перемещении ползунка на аппаратное обеспечение будет отправлено только 1 значение в течение 100 мс. Эта опция также используется для уменьшения трафика данных на ваше оборудовании.
          
          
          
          ================================================
          FILE: untitled/tree/segmented_control/README.md
          ================================================
          # Сегментированный переключатель \(Segmented Switch\)
          
          Виджет Сегментированный переключатель позволяет отправлять команды на ваше оборудование на основе выбора, сделанного вами в пользовательском интерфейсе. Сегментированный переключатель отправляет индекс выбранного вами элемента, а не строку метки. Отправленный индекс начинается с 1. Он работает так же, как типовой элемент [Комбинированный список \(ComboBox\)](https://ru.wikipedia.org/wiki/%D0%9A%D0%BE%D0%BC%D0%B1%D0%B8%D0%BD%D0%B8%D1%80%D0%BE%D0%B2%D0%B0%D0%BD%D0%BD%D1%8B%D0%B9_%D1%81%D0%BF%D0%B8%D1%81%D0%BE%D0%BA) или [Меню \(Menu\)](https://github.com/blynkkk/blynkkk.github.io/blob/master/mobile/ru/menu.md).
          
          Пример кода:
          
          ```cpp
          BLYNK_WRITE {
            switch (param.asInt()) {
              case 1: { // Пункт 1
                Serial.println("Выбран пункт 1");
                break;
              }
              case 2: { // Пункт 2
                Serial.println("Выбран пункт 2");
                break;
              }    
            }
          }
          ```
          
          Вы также можете установить пункты меню со стороны оборудования с помощью кода:
          
          ```cpp
          Blynk.setProperty(V1, "labels", "label 1", "label 2", "label 3");
          ```
          
          **Пример кода:** [Меню](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Menu/Menu.ino)
          
          
          
          ================================================
          FILE: untitled/tree/segmented_control/blynkkk-blynkkk.github.io-2.md
          ================================================
          # blynkkk/blynkkk.github.io
          
           Failed to load latest commit information.
          
          
          
          ================================================
          FILE: untitled/tree/segmentedswitch.md
          ================================================
          # Сегментированный переключатель \(Segmented Switch\)
          
          Виджет Сегментированный переключатель позволяет отправлять команды на ваше оборудование на основе выбора, сделанного вами в пользовательском интерфейсе. Сегментированный переключатель отправляет индекс выбранного вами элемента, а не строку метки. Отправленный индекс начинается с 1. Он работает так же, как типовой элемент [Комбинированный список \(ComboBox\)](https://ru.wikipedia.org/wiki/%D0%9A%D0%BE%D0%BC%D0%B1%D0%B8%D0%BD%D0%B8%D1%80%D0%BE%D0%B2%D0%B0%D0%BD%D0%BD%D1%8B%D0%B9_%D1%81%D0%BF%D0%B8%D1%81%D0%BE%D0%BA) или [Меню \(Menu\)](https://github.com/blynkkk/blynkkk.github.io/blob/master/mobile/ru/menu.md).
          
          Пример кода:
          
          ```cpp
          BLYNK_WRITE {
            switch (param.asInt()) {
              case 1: { // Пункт 1
                Serial.println("Выбран пункт 1");
                break;
              }
              case 2: { // Пункт 2
                Serial.println("Выбран пункт 2");
                break;
              }    
            }
          }
          ```
          
          Вы также можете установить пункты меню со стороны оборудования с помощью кода:
          
          ```cpp
          Blynk.setProperty(V1, "labels", "label 1", "label 2", "label 3");
          ```
          
          **Пример кода:** [Меню](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Menu/Menu.ino)
          
          
          
          ================================================
          FILE: untitled/tree/step.md
          ================================================
          # step
          
          ## Шаговое управление \(Step Control\)
          
          Шаговое управление похоже на две кнопки, назначенные одному пин-у. Одна кнопка увеличивает ваше значение на установленный шаг, а другая уменьшает его. Это очень полезно для случаев использования, когда вам нужно точно изменять ваши значения, но вы не можете достичь такой точности с помощью виджета [Cлайдера](https://github.com/blynkkk/blynkkk.github.io/tree/master/mobile/ru/slider.md).
          
          **Отправить шаг \(Send Step\)** опция позволяет вам отправлять на оборудование каждый шаг нвместо фактического значения виджета.
          
          **Зациклить значения \(Loop value\)** опция позволяет сбросить Шаговый виджет на начальное значение при достижении максимального.
          
          Вы можете изменить значение Шагового виджета со стороны оборудования. Например:
          
          ```cpp
          Blynk.virtualWrite(V1, val);
          ```
          
          Вы можете изменить описание виджета со стороны оборудования с помощью кода:
          
          ```cpp
          Blynk.setProperty(V1, "label", "Мой счетчик.");
          ```
          
          Вы можете изменить шаг виджета со стороны оборудования:
          
          ```cpp
          Blynk.setProperty(V1, "step", 10);
          ```
          
          или изменить цвет:
          
          ```cpp
          //#D3435C - Красный цвет в RGB кодировке
          Blynk.setProperty(V1, "color", "#D3435C");
          ```
          
          Вы также можете получить состояние виджета Шагового управления с сервера в случае, если ваше оборудование отключилось, с помощью функции Blynk.Sync:
          
          ```cpp
          BLYNK_CONNECTED() {
            Blynk.syncVirtual(V1);
          }
          
          BLYNK_WRITE(V1) {
            int stepperValue = param.asInt();
          }
          ```
          
          ## Интервал записи \(Write interval\)
          
          Опция позволяет вам передавать значения на ваше оборудование в через определенные интервалы времени. Например, установка интервала записи на 100 мс означает, что при перемещении ползунка на аппаратное обеспечение будет отправлено только 1 значение в течение 100 мс. Эта опция также используется для уменьшения трафика данных на ваше оборудовании.
          
          **Пример кода:** [Базовый пример](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/BlynkBlink/BlynkBlink.ino)
          
          
          
          ================================================
          FILE: untitled/tree/table/README.md
          ================================================
          # Таблица \(Table\)
          
          Табличный виджет удобен, когда вам нужно структурировать аналогичные данные в пределах одного графического элемента. Работает как обычная таблица.
          
          Вы можете добавить строку в таблицу с помощью кода:
          
          ```text
          Blynk.virtualWrite(V1, "add", id, "Имя", "Значение");
          ```
          
          Вы можете обновить строку в таблице с помощью кода:
          
          ```text
          Blynk.virtualWrite(V1, "update", id, "Новое имя", "Новое значение");
          ```
          
          Чтобы выделить любой элемент в таблице, используйте его идентификатор:
          
          ```text
          Blynk.virtualWrite(V1, "pick", 0);
          ```
          
          Чтобы выбрать/отменить выбор \(сделать значок зеленым/серым\) элемент в таблице, используйте его идентификатор:
          
          ```text
          Blynk.virtualWrite(V1, "select", 0);
          Blynk.virtualWrite(V1, "deselect", 0);
          ```
          
          Чтобы очистить таблицу используйте код:
          
          ```text
          Blynk.virtualWrite(V1, "clr");
          ```
          
          Вы также можете обрабатывать другие действия из таблицы. Например, использовать строку таблицы в качестве кнопки переключения.
          
          ```text
          BLYNK_WRITE(V1) {
             String cmd = param[0].asStr();
             if (cmd == "select") {
                 // строка в таблице была выбрана.
                 int rowId = param[1].asInt();
             }
             if (cmd == "deselect") {
                 // строка в таблице была отменена.
                 int rowId = param[1].asInt();
             }
             if (cmd == "order") {
                 // когда строки в таблице переупорядочиваются
                 int oldRowIndex = param[1].asInt();
                 int newRowIndex = param[2].asInt();
             }
          }
          ```
          
          **Примечание:** Максимальное количество строк в таблице равно 100. Когда вы достигнете предела, таблица будет работать как список FIFO \(Первый пришел - первый ушел\). Это ограничение можно изменить, настроив свойство `table.rows.pool.size` в параметрах локального сервера.
          
          **Пример кода:** [Простое использование таблицы](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Table/Table_Simple/Table_Simple.ino)
          
          **Пример кода:** [Расширенное использование таблицы](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Table/Table_Advanced/Table_Advanced.ino)
          
          
          
          ================================================
          FILE: untitled/tree/table/blynkkk-blynkkk.github.io.md
          ================================================
          # blynkkk/blynkkk.github.io
          
           [Permalink](https://github.com/blynkkk/blynkkk.github.io/tree/b1f1a439851d4000d4d85ddab2f72db8d227d6cc/new/en)
          
           Failed to load latest commit information.
          
          Type
          
          Name
          
          Latest commit message
          
          Commit time
          
          
          
          ================================================
          FILE: untitled/tree/timer.md
          ================================================
          # Таймер \(Timer\)
          
          Таймер запускает действия в определенное время. Даже если смартфон не в сети. По умолчанию время начала отправляет 1 \(HIGH\), время остановки отправляет 0 \(LOW\). Вы можете изменить это поведение на любые другие значения. Вы можете изменить настройки Таймера в режиме «Запуска». В последней версии Android также есть улучшенный таймер в виджете [Обработчик событий](https://github.com/blynkkk/blynkkk.github.io/blob/master/mobile/ru/eventor.md).
          
          C [Обработчиком](https://github.com/blynkkk/blynkkk.github.io/blob/master/mobile/ru/eventor.md) событий вы можете назначить несколько таймеров на один и тот же пин, отправить любую строку/число, выбирать дни и часовой пояс. Рекомендуется использовать виджет [Обработчик событий](https://github.com/blynkkk/blynkkk.github.io/blob/master/mobile/ru/eventor.md) поверх виджета Таймер. Однако виджет Таймер по-прежнему подходит и для простых событий таймера.
          
          **ПРИМЕЧАНИЕ:** Виджет таймера зависит от времени сервера, а не вашего телефона. Иногда время телефона может не соответствовать времени сервера.
          
          **Пример кода:** [Таймер](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Timer/Timer.ino)
          
          
          
          ================================================
          FILE: untitled/tree/twitter.md
          ================================================
          # twitter
          
          ## Твиттер \(Twitter\)
          
          Виджет Твиттер соединяет вашу учетную запись сети Twitter с Blynk и позволяет отправлять "твиты" с вашего оборудования.
          
          Пример кода:
          
          ```cpp
          Blynk.tweet("Привет, Blynk-еры! Мой Arduino может слать твиты!");
          ```
          
          Ограничения :
          
          * нельзя отправлять 2 твита с одним и тем же сообщением \(это политика Твиттера\)
          * разрешен только 1 твит за 5 секунд
          
          ## Кодировка в Твиттере
          
          Библиотека обрабатывает все строки в кодировке UTF-8. Если вы столкнулись с проблемами, попробуйте напечатать ваше сообщение на последовательный порт и проверить, работает ли оно \(COM терминал должен быть настроен на кодировку UTF-8\). Если не работает, вам следует проверить поддержку UTF-8 вашего компилятора. Если работает, но ваше сообщение обрезано - вам нужно увеличить длины сообщения \(все символы UTF-8 потребляют как минимум вдвое больше байт информации\).
          
          ## Увеличение лимита длины сообщения
          
          Вы можете увеличить максимальную длину сообщения, поместив \(до включения Blynk\) в верхнюю часть своего кода строку:
          
          ```cpp
          #define BLYNK_MAX_SENDBYTES 256 // По умолчанию 128 байт
          ```
          
          **Пример кода:** [Твиттер](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Twitter/Twitter.ino)
          
          
          
          ================================================
          FILE: untitled/twitter.md
          ================================================
          # twitter
          
          ## Twitter
          
          Twitter widget connects your Twitter account to Blynk and allows you to send Tweets from your hardware.
          
          Example code:
          
          ```cpp
          Blynk.tweet("Hey, Blynkers! My Arduino can tweet now!");
          ```
          
          Limitations :
          
          * you can't send 2 tweets with same message \(it's Twitter policy\)
          * only 1 tweet per 5 seconds is allowed
          
          ## Unicode in Twitter
          
          The library handles all strings as UTF8 Unicode. If you're facing problems, try to print your message to the Serial and see if it works \(the terminal should be set to UTF-8 encoding\). If it doesn't work, probably you should read about unicode support of your compiler. If it works, but your message is truncated - you need to increase message length limit \(all Unicode symbols consume at least twice the size of Latin symbols\).
          
          ## Increasing message length limit
          
          You can increase maximum message length by putting on the top of your sketch \(before Blynk includes\):
          
          ```cpp
          #define BLYNK_MAX_SENDBYTES 256 // Default is 128
          ```
          
          **Sketch:** [Twitter](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Twitter/Twitter.ino)
          
          
          
          ================================================
          FILE: untitled/value_display.md
          ================================================
          # Value Display
          
          Displays incoming data from your sensors or Virtual Pins. Can work in 2 modes :
          
          * PUSH mode \(select it from Frequency Reading picker\);
          * Frequency Reading mode;
          
          In PUSH mode you update value display from hardware side with code :
          
          ```cpp
          Blynk.virtualWrite(V1, val);
          ```
          
          In this mode every message that hardware sends to server is stored automatically on server. PUSH mode doesn't require application to be online or opened.
          
          With Frequency Reading mode you need to select update interval and application will trigger events with required timing. Your application should be open and running in order to make requests to hardware. You don't need any code for Analog and Digital pins in that case. However for virtual pins you need to use next code :
          
          ```cpp
          //triggered from app
          BLYNK_READ(V1)
          {
            //send to app
            Blynk.virtualWrite(V1, val);
          }
          ```
          
          ## Home Screen Value Display
          
          You can also add Value Display to your Android Home Screen. Value Display works via HTTPS in that case. Have in mind that in "Home Screen" mode Value Display has few limitations. Value Display will update it's state only once per 15 min. You can change this via Widget Settings. However update interval less than 15 minutes is not guaranteed.  
          You can also resize Value Display on Home Screen - just do long click on widget and resize it as you need.
          
          **Note :** Adding home screen widget costs 100 energy. This energy not rechargeable. **Note :** Home Screen Widgets for Local Blynk servers requires port 8080 to be opened.
          
          **Sketch:** [BlynkBlink](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/BlynkBlink/BlynkBlink.ino)
          
          
          
          ================================================
          FILE: untitled/video.md
          ================================================
          # Video Streaming
          
          Simple widget that allows you to display any live or video stream. Widget supports RTSP \(RP, SDP\), HTTP/S progressive streaming, HTTP/S live streaming. For more info please follow [official Android documentation](https://developer.android.com/guide/appendix/media-formats.html).
          
          At the moment Blynk doesn't provide streaming servers. So you can either stream directly from camera, use 3-d party services or host streaming server on own server \(on raspberry for example\).
          
          You can also stop/start video stream with click on widget.
          
          You can also change video url from hardware with :
          
          ```cpp
          Blynk.setProperty(V1, "url", "http://my_new_video_url");
          ```
          
          
          
          ================================================
          FILE: untitled/webhook.md
          ================================================
          # Webhook
          
          Webhook is a widget for 3-d party integrations. With webhook widget you can send HTTP/S requests to any 3-d party server or device that has HTTP/S API \(Philips Hue for instance\).
          
          Any write operation from hardware side will trigger webhook widget \(same way as for eventor\). You can also trigger webhook from application side in case control widget assigned to same pin as webhook. You can trigger 3-d party service with single button click.
          
          For example, imagine a case when you want to send data from your hardware not only to Blynk but also to Thingspeak server. In typical, classic use case you'll need to write code like this \(this is minimal and not full sketch\) :
          
          ```cpp
          WiFiClient client;
          if (client.connect("api.thingspeak.com", 80)) {
              client.print("POST /update HTTP/1.1\n");
              client.print("Host: api.thingspeak.com\n");
              client.print("Connection: close\n");
              client.print("X-THINGSPEAKAPIKEY: " + apiKeyThingspeak1 + "\n");
              client.print("Content-Type: application/x-www-form-urlencoded\n");
              client.print("Content-Length: ");
              client.print(postStr.length());
              client.print("\n\n");
              client.print(postStr);
          }
          ```
          
          With webhook widget this is not necessary anymore. All you need just fill few fields.
          
          And do usual :
          
          ```cpp
          Blynk.virtualWrite(V0, value);
          ```
          
          where V0 is pin assigned to webhook widget.
          
          Also you can use usual Blynk placeholders for pin value in body or url, for example :
          
          ```cpp
          https://api.thingspeak.com/update?api_key=xxxxxx&field1=/pin/
          ```
          
          or for body
          
          ```cpp
          ["/pin/"]
          ```
          
          You can also refer to specific index of multi value pin \(multi pin supports up to 5 values\) :
          
          `/pin[0]/`,`/pin[1]/`, `/pin[2]/`
          
          Another cool thing about webhook is that you can make GET requests from Blynk Server side and return response directly to your hardware. The beauty here is that you don't need to code request to 3-d party service. Imagine a case when you want to get weather from some 3-d party service. For example, you have an url `http://api.sunrise-sunset.org/json?lat=33.3823&lng=35.1856&date=2016-10-01`, you can put it in widget, select `V0` pin, and do usual :
          
          ```cpp
          BLYNK_WRITE(V0){
            String webhookdata = param.asStr();
            Serial.println(webhookdata);
          }
          ```
          
          Now, every time you'll trigger `V0` pin \(with `Blynk.virtualWrite(V0, 1)` from hardware side or with control widget assigned to `V0`\) - `BLYNK_WRITE(V0)` will be triggered.
          
          **NOTE :** usually 3-d party servers returns big responses, so you have to increase hardware maximum allowed message size with `#define BLYNK_MAX_READBYTES 1024`. Where `1024` - is maximum allowed message size.
          
          **NOTE :** Blynk cloud has limitation for webhook widget - you are allowed to send only 1 request per second. You can change this on local server with `webhooks.frequency.user.quota.limit` property. Please be very careful using webhooks, as many resources not capable to handle even 1 req/sec, so you may be banned on some of them. For example thingspeak allows to send 1 request per 15 seconds.
          
          **NOTE :** In order to avoid spamming Blynk Webhook has one more limitation - in case your webhook requests were failed 10 times in row your webhook widget will be stopped. In order to resume it you need to open widget and save it again. Failed requests are requests that return status code that are not equal to 200 or 302.
          
          **NOTE :** Webhook widget may affect `Blynk.syncAll()` feature. As returned response from server may be big. So, please, be careful with it.
          
          
          
          ================================================
          FILE: widgets-ru.md
          ================================================
          

          🚨🚨🚨 ВАЖНО:

          # Widgets Widgets are interface modules. Each of them performs a specific input/ output function when communicating with the hardware. There are 4 types of Widgets: * **Controllers** - used to send commands that control your hardware * **Displays** - used for data visualization from sensors and other sources; * **Notifications** - send messages and notifications; * **Interface** - widgets to perform certain GUI functions; * **Other** - widgets that don't belong to any category; Each Widget has it's own settings. Some of the Widgets \(e.g. Bridge\) just enable functionality and they don't have any settings. ## Common Widget Settings ### Pin Selector This is one of the main parameters you need to set. It defines which pin to control or to read from. ![](.gitbook/assets/pin_selection.png) **Digital Pins** - represent physical Digital IO pins on your hardware. PWM-enabled pins are marked with the `~` symbol **Analog Pins** - represent physical Analog IO pins on your hardware **Virtual Pins** - have no physical representation. They are used to transfer any data between Blynk App and your hardware. Read more about Virtual Pins [here](./#blynk-main-operations-virtual-pins). ### Data Mapping In case you want to map incoming values to specific range you may use mapping button: ![](.gitbook/assets/display_edit_mapping.png) Let's say your sensor sends values from 0 to 1023. But you want to display values in a range 0 to 100 in the app. When Data Mapping enabled, incoming value 1023 will be mapped to 100. ### SPLIT/MERGE Some of the Widgets can send more than one value. And with this switch you can control how to send them. * **SPLIT**: Each of the parameters is sent directly to the Pin on your hardware \(e.g D7\). You don't need to write any code. **NOTE:** In this mode you send multiple commands from one widget, which can reduce performance of your hardware. Example: If you have a Joystick Widget and it's set to D3 and D4, it will send 2 commands over the Internet: ```cpp digitalWrite(3, value); digitalWrite(4, value); ``` * **MERGE:** When MERGE mode is selected, you are sending just 1 message, consisting of array of values. But you'll need to parse it on the hardware. This mode can be used with Virtual Pins only. Example: Add a zeRGBa Widget and set it to MERGE mode. Choose Virtual Pin V1 ```cpp BLYNK_WRITE(V1) // There is a Widget that WRITEs data to V1 { int r = param[0].asInt(); // get a RED channel value int g = param[1].asInt(); // get a GREEN channel value int b = param[2].asInt(); // get a BLUE channel value } ``` ### Decimals Defines how many decimals you would like to see when moving a Slider. When "No Fraction" is chosen, slider will only send integer values with no decimals. "1 digit" means that values will look like 1.1, 1.2, ..., 2.0, etc. ### Send On Release This option allows you to optimize data traffic on your hardware. For example, when you move joystick widget, commands are streamed to the hardware, during a single joystick move you can send dozens of commands. There are use-cases where it's needed, however creating such a load may lead to hardware overload and reset. **Send On Release** is a recommended setting for majority of applications. This is also a default setting. ### Write interval Similar to "Send on Release" option. However, it allows you to stream values to your hardware within certain interval. For example, setting **write interval** to 100 ms means that while you move the slider, only 1 value will be sent to hardware within 100 ms period. This option is also used to optimize data traffic flow to your hardware. ### Color gradient When you choose gradient, it affects the color of widget elements based on invoming values. For example: You set Gauge Widget with Min and Max parameters of 0-100, and choose green-yellow-red gradient. When hardware sends: * `10`, Gauge will change it's color to green color * `50` will change Gauge to yellow color * `80` will change Gauge to red color There are 2 types of gradients you can choose from: * Warm: Green - Orange - Red; * Cold: Green - Blue - Violet; ## Controllers ### Кнопка \(Button\) Кнопка может работать в двух режимах - в режиме переключателя \(нажатие и отжатие посылает 1 сообщение\) и в пуш режиме \(нажатие посылает команду и отжатие посылает команду\). Кнопка позволяет послать любое число. По умолчанию кнопка шлет 0/1 \(LOW/HIGH\). В пуш режиме кнопка шлет 1 \(HIGH\) на нажатие и 0 \(LOW\) при отжатии. Вы так же можете менять состояние кнопки с микроконтроллера. Например, включить кнопку на пине V1 можно так : ```cpp Blynk.virtualWrite(V1, HIGH); ``` Так же можно поменять тексты в кнопке : ```cpp Blynk.setProperty(V1, "onLabel", "Вкл"); ``` ```cpp Blynk.setProperty(V1, "offLabel", "Выкл"); ``` Название самой кнопки : ```cpp Blynk.setProperty(V1, "label", "Моя кнопочка"); ``` Или изменить ее цвет : ```cpp //#D3435C - Blynk RED Blynk.setProperty(V1, "color", "#D3435C"); ``` В случае если микроконтроллер был перегружен, Вы всегда можете получить последнее состояние кнопки с сервера с помощью фичи синхронизации состояния: ```cpp //как только подключились BLYNK_CONNECTED() { //запросить информацию у сервера о состоянии пина V1 Blynk.syncVirtual(V1); } //этот метод будет вызыван после ответа сервера BLYNK_WRITE(V1) { int buttonState = param.asInt(); } ``` #### Кнопка на рабочем столе Если Вы используете Android, то Вы можете добавить Blynk кнопку на рабочий стол. В этом случае кнопка будет работать по протоколу HTTPS. Такого рода кнопки имеют определенные ограничения по функционалу в связи с ограничениями платформы Android. Например, Вы не можете получить мгновенную синхронизацию состояния кнопки на рабочем столе с состоянием на микроконтроллере. Так как состояние кнопки на рабочем столе обновляется раз в 15 мин. **Замечание:** Добавление виджета кнопки на рабочий стол стоит 100 энергии. Эта энергия не возвращается после удаления виджета. Также такая кнопка будет работать на локальном сервере только если открыть порт 8080. **Пример кода:** [Базовый пример](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/BlynkBlink/BlynkBlink.ino) **Пример кода:** [Синхронизация состояния с физической кнопкой через прерывания](https://github.com/blynkkk/blynk-library/blob/master/examples/More/Sync/ButtonInterrupt/ButtonInterrupt.ino) **Пример кода:** [Синхронизация состояния с физической кнопкой через поллинг](https://github.com/blynkkk/blynk-library/blob/master/examples/More/Sync/ButtonPoll/ButtonPoll.ino) **Пример кода:** [Синхронизация состояния с физической кнопкой](https://github.com/blynkkk/blynk-library/blob/master/examples/More/Sync/SyncPhysicalButton/SyncPhysicalButton.ino) ### Слайдер \(Slider\) Слайдер очень похож на потенциометр. Он позволяет посылать значения в диапазоне от минимального значения к максимальному. Диапазон допустимых максимального и минимального значений определяется в приложении. Вы так же можете менять состояние слайдера с микроконтроллера. Например, Вы можете изменить положение ползунка в слайдере : ```cpp Blynk.virtualWrite(V1, 55); ``` Так же можно поменять текст в слайдере : ```cpp Blynk.setProperty(V1, "label", "Мой слайдерок"); ``` или изменить цвет : ```cpp //#D3435C - Карсный цвет в кодирвке RGB Blynk.setProperty(V1, "color", "#D3435C"); ``` ### Таймер \(Timer\) Таймер запускает действия в определенное время. Даже если смартфон не в сети. По умолчанию время начала отправляет 1 \(HIGH\), время остановки отправляет 0 \(LOW\). Вы можете изменить это поведение на любые другие значения. Вы можете изменить настройки Таймера в режиме «Запуска». В последней версии Android также есть улучшенный таймер в виджете [Обработчик событий](https://github.com/blynkkk/blynkkk.github.io/blob/master/mobile/ru/eventor.md). C [Обработчиком](https://github.com/blynkkk/blynkkk.github.io/blob/master/mobile/ru/eventor.md) событий вы можете назначить несколько таймеров на один и тот же пин, отправить любую строку/число, выбирать дни и часовой пояс. Рекомендуется использовать виджет [Обработчик событий](https://github.com/blynkkk/blynkkk.github.io/blob/master/mobile/ru/eventor.md) поверх виджета Таймер. Однако виджет Таймер по-прежнему подходит и для простых событий таймера. **ПРИМЕЧАНИЕ:** Виджет таймера зависит от времени сервера, а не вашего телефона. Иногда время телефона может не соответствовать времени сервера. **Пример кода:** [Таймер](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Timer/Timer.ino) ### Джойстик \(Joystick\) Управление сервоприводом в 4 направлениях. #### Параметры: * **Раздельный** \(SPLIT\): Каждый из параметров отправляется непосредственно на пин вашего оборудования \(например, D7 и D8\). Вам не нужно писать код. **ПРИМЕЧАНИЕ:** В этом режиме вы отправляете несколько команд из одного виджета, что может снизить производительность вашего оборудования. **Пример:** Если у вас есть виджет Джойстика и он настроен на D3 и D4, он отправит две команды через Интернет: ```cpp digitalWrite(3, x); digitalWrite(4, y); ``` * **Совмещенный** \(MERGE\): Когда выбран режим MERGE, вы отправляете только 1 сообщение, состоящее из массива значений. Но вам нужно разобрать его на оборудовании устройства. Этот режим можно использовать только с виртуальными пин-ами. **Пример:** добавьте виджет Джойстика и установите его в режим "MERGE". Выберите виртуальный пин V1 ```cpp BLYNK_WRITE(V1) // Joystick assigned to V1 { // получить x int x = param[0].asInt(); // получить y int y = param[1].asInt(); } ``` * **Поворт/Наклон** \(Rotate on Tilt\) Когда это параметр включен, Джойстик будет автоматически вращаться, если вы будете использовать смартфон в горизонтальной положении. * **Автовозврат** \(Auto-Return\) Когда это парамтер выключен, ручка джойстика не вернется в центральное положение. Она останется там, где вы ее оставили. ### Отправка при Отжатии \(Send On Release\) **Send On Release** доступно для большинства виджетов контроллеров и позволяет уменьшить трафик данных на ваше оборудование. Например, когда вы перемещаете виджет джойстика, команды непрерывно передаются на аппаратное устройство, во время одного движения джойстика вы можете отправлять десятки команд. Есть случаи, когда это необходимо, однако создание такой нагрузки может привести к зависанию или сбросу оборудования. Мы рекомендуем включить функцию **Send On Release** для большинства случаев, если вам не требуется мгновенная обратная связь. Эта опция включена по умолчанию. ### Интервал записи \(Write interval\) Похоже на вышеуказанный вариант. Однако, позволяет вам передавать значения на ваше оборудование в через определенные интервалы времени. Например, установка интервала записи на 100 мс означает, что при перемещении ползунка на аппаратное обеспечение будет отправлено только 1 значение в течение 100 мс. Эта опция также используется для уменьшения трафика данных на ваше оборудовании. **Пример кода:** [Джойстик две оси](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/JoystickTwoAxis/JoystickTwoAxis.ino) ### Шаговое управление \(Step Control\) Шаговое управление похоже на две кнопки, назначенные одному пин-у. Одна кнопка увеличивает ваше значение на установленный шаг, а другая уменьшает его. Это очень полезно для случаев использования, когда вам нужно точно изменять ваши значения, но вы не можете достичь такой точности с помощью виджета [Cлайдера](https://github.com/blynkkk/blynkkk.github.io/tree/master/mobile/ru/slider.md). **Отправить шаг \(Send Step\)** опция позволяет вам отправлять на оборудование каждый шаг нвместо фактического значения виджета. **Зациклить значения \(Loop value\)** опция позволяет сбросить Шаговый виджет на начальное значение при достижении максимального. Вы можете изменить значение Шагового виджета со стороны оборудования. Например: ```cpp Blynk.virtualWrite(V1, val); ``` Вы можете изменить описание виджета со стороны оборудования с помощью кода: ```cpp Blynk.setProperty(V1, "label", "Мой счетчик."); ``` Вы можете изменить шаг виджета со стороны оборудования: ```cpp Blynk.setProperty(V1, "step", 10); ``` или изменить цвет: ```cpp //#D3435C - Красный цвет в RGB кодировке Blynk.setProperty(V1, "color", "#D3435C"); ``` Вы также можете получить состояние виджета Шагового управления с сервера в случае, если ваше оборудование отключилось, с помощью функции Blynk.Sync: ```cpp BLYNK_CONNECTED() { Blynk.syncVirtual(V1); } BLYNK_WRITE(V1) { int stepperValue = param.asInt(); } ``` ## Displays ### Отображение значений \(Value Display\) Отображает входящие данные с ваших датчиков или виртуальных пин-ов. Может работать в двух режимах: * режим PUSH \(выберается в списке выбора частоты считывания\); * режим частоты считываний; В режиме PUSH вы обновляете значения виджета со стороны оборудования с помощью кода: ```cpp Blynk.virtualWrite(V1, val); ``` В этом режиме каждое сообщение, которое отправляет аппаратное устройство автоматически сохраняется на сервере. Режим PUSH не требует, чтобы приложение было онлайн или открыто. В режиме частоты считывния вам необходимо выбрать интервал обновления данных, и приложение будет запускать события считывния с требуемой периодичностью. Ваше приложение должно быть открыто и запущено для отправки запросов на оборудование. Вам не нужен код для аналоговых и цифровых выводов в даном случае. Однако для виртуальных выводов вам необходимо использовать следующий код: ```cpp //вызывать из приложения BLYNK_READ(V1) { //отправить в приложение Blynk.virtualWrite(V1, val); } ``` #### Отображение значений на рабочем столе Вы также можете добавить виджет отображение значения на рабочий стол Android. В этом случае отображение значений работает по протоколу HTTPS. Имейте в виду, что в режиме «Рабочий стол» отображение значений имеет несколько ограничений. Виджет будет обновлять свое состояние только один раз в 15 минут. Вы можете изменить это органичение через настройки виджета. Однако интервал обновления менее 15 минут не гарантируется. Вы также можете изменить размер отображаемого значения на рабочем столе - просто сделайте длинный тап на виджете и измените его размер на необходимый. **Примечание:** Добавление виджета на главный экран стоит 100 энергии. Эта энергия не возвращяется при удалении виджета. **Примечание:** Виджеты рабочего стола для локальных серверов Blynk требуют открытия порта 8080. **Пример кода:** [Базовый пример](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/BlynkBlink/BlynkBlink.ino) ### Интервал записи \(Write interval\) Опция позволяет вам передавать значения на ваше оборудование в через определенные интервалы времени. Например, установка интервала записи на 100 мс означает, что при перемещении ползунка на аппаратное обеспечение будет отправлено только 1 значение в течение 100 мс. Эта опция также используется для уменьшения трафика данных на ваше оборудовании. **Пример кода:** [Базовый пример](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/BlynkBlink/BlynkBlink.ino) ### Светодиод \(LED\) Простой светодиод для индикации. Вам нужно отправить 0, чтобы выключить светодиод. И 255 для того, чтобы включить светодиод. Или просто используйте Blynk API, как описано ниже: ```cpp //регистрируемся на виртуальном пине 1 WidgetLED led1(V1); led1.off(); led1.on(); ``` Все значения от 0 до 255 изменяют яркость светодиода: ```cpp WidgetLED led2(V2); //установить яркость светодиода на 50%. led2.setValue(127); ``` Вы также можете изменить цвет светодиода с помощью кода: ```cpp //#D3435C - Красный в RGB формате Blynk.setProperty(V1, "color", "#D3435C"); ``` #### Светодиод на рабочем столе Вы можете добавить виджет светодиод на рабочий стол Android. В этом случае светодиод работает через протокол HTTPS. Имейте в виду, что в режиме «Рабочий стол» виджет светодиода имеет некоторые ограничения. Светодиод будет обновлять свое состояние только один раз в 15 минут. Вы можете изменить этот интервал через настройки виджета. Однако интервал обновления менее 15 минут не гарантируется. **Примечание:** Добавление виджета на рабочий стол стоит 100 энергии. Эта энергия не возвращается при удалении виджета. **Примечание:** Виджеты рабочего стола для локальных серверов Blynk требуют открыть порт 8080. **Пример кода:** [Базовый пример](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/LED/LED_Blink/LED_Blink.ino) ### Указатель \(Gauge\) Отличный визуальный способ отображения входящих числовых значений. Может работать в 2 режимах: * режим PUSH \(выберается в списке выбора частоты считывания\); * режим частоты считываний; В режиме PUSH вы обновляете значения указателя со стороны оборудования с помощью кода: ```cpp Blynk.virtualWrite(V1, val); ``` В этом режиме каждое сообщение, которое отправляет аппаратное устройство автоматически сохраняется на сервере. Режим PUSH не требует, чтобы приложение было онлайн или открыто. В режиме частоты считывния вам необходимо выбрать интервал обновления данных, и приложение будет запускать события считывния с требуемым периодичностью. Ваше приложение должно быть открыто и запущено для отправки запросов на оборудование. Вам не нужен код для аналоговых и цифровых выводов в даном случае. Однако для виртуальных выводов вам необходимо использовать следующий код: ```cpp //вызывать из приложения BLYNK_READ(V1) { //отправить в приложение Blynk.virtualWrite(V1, val); } ``` #### Параметры форматирования Указатель также имеет поле «Label» \(Метка\), которое позволяет использовать форматирование. Предположим, ваш датчик отправляет число 12.6789 в приложение Blynk. Поддерживаются следующие параметры форматирования: `/pin/` - отображает значение без форматирования \(12.6789\) `/pin./` - отображает значение без десятичной части \(13\) `/pin.#/` - отображает значение с одним десятичным знаком \(12.7\) `/pin.##/` - отображает значение с двумя десятичными знаками \(12.68\) #### Другие опции Вы также можете изменить метку прибора с помощью: ```cpp Blynk.setProperty(V1, "label", "Мое значение метки"); ``` или изменить цвет \(кодировка RGB\): ```cpp //#D3435C - Красный цвет Blynk.setProperty(V1, "color", "#D3435C"); ``` **Пример кода:** [Светодиод](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/BlynkBlink/BlynkBlink.ino) ### ЖК дисплей \(LCD\) Это обычный ЖК-дисплей 16x2, "сделанный" на нашем секретном предприятии в Китае. Виджет может работать в двух режимах: * Простой \(Simple\) * Расширенный \(Advanced\) #### Простой режим \(Simple\) В простом режиме ваш ЖК-виджет работает как обычный виджет с частотой чтения. В режиме частоты считывания вам нужно выбрать интервал обновления данных, и приложение будет запускать события с требуемым интервалом. Ваше приложение должно быть открыто и запущено для отправки запросов на оборудование. В данном случае вам не нужен код для аналоговых и цифровых пин-ов. Однако для виртуальных пин-ов вам необходимо использовать следующий код: ```cpp //вызываем из приложения BLYNK_READ(V1) { //отправляем в приложение Blynk.virtualWrite(V1, val); } ``` В простом режиме ЖК-дисплей также поддерживает параметры форматирования. #### Параметры форматирования Предположим, ваш датчик отправляет число 12.6789 в приложение Blynk. Поддерживаются следующие параметры форматирования: `/pin/` - отображает значение без форматирования \(12.6789\) `/pin./` - отображает значение без десятичной части \(13\) `/pin.#/` - отображает значение с одним десятичным знаком \(12.7\) `/pin.##/` - отображает значение с двумя десятичными знаками \(12.68\) **Пример кода:** [ЖК дисплей простой режим - PUSH](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/LCD/LCD_SimpleModePushing/LCD_SimpleModePushing.ino) **Пример кода:** [ЖК дисплей простой режим - 1 сек](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/LCD/LCD_SimpleModeReading/LCD_SimpleModeReading.ino) #### Расширенный режим \(Advanced\) Расширенный режим предназначен для опытных пользователей. Позволяет использовать специальные команды для управления ЖК-дисплеем. #### Команды Инициируем переменную ЖК-дисплея: ```cpp WidgetLCD lcd(V1); ``` Отправим сообщение: ```cpp lcd.print(x, y, "Ваше сообщение"); ``` Где `x` - позиция символа \(0-15\), `y` - номер строки \(0 или 1\), Очистка ЖК-дисплея: ```cpp lcd.clear(); ``` **Пример кода:** [ЖК-дисплей расширенный режим](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/LCD/LCD_AdvancedMode/LCD_AdvancedMode.ino) ### Диаграмма \(SuperChart\) Диаграмма используется для живой визуализации и хранения данных. Вы можете использовать виджет для логирования данных датчиков, бинарных событий и многого другого. Чтобы использовать виджет Диаграмма, вам нужно будет передать данные с оборудования с желаемым интервалом, используя таймеры. [Здесь приведен](https://examples.blynk.cc/?board=ESP8266&shield=ESP8266%20WiFi&example=GettingStarted%2FPushData) базовый пример передачи данных. #### Взаимодействие: * **Переключение между режимами текущий и временной** Нажмите диапазоны времени в нижней части виджета, чтобы изменить масштаб Диаграммы по времени. * **Тап по легенде графиков** показать или скрыть поток данных. * **Долги тап на графике** покажет метку времени и соответствующие значения. * **Быстро проведите пальцем влево или вправо, чтобы увидеть предыдущие данные** впоследствии вы можете прокручивать данные назад и вперед в пределах заданного временного диапазона. * **Полноэкранный режим** нажмите эту кнопку, чтобы открыть полноэкранный режим в альбомной ориентации. Чтобы выйти из режима полного экрана, просто поверните телефон обратно в портретный режим. График должен вращаться автоматически. В полноэкранном режиме вы увидите X \(время\) и несколько шкал Y. Полноэкранный режим можно отключить в настройках виджета. * **Кнопка меню** Кнопка меню откроет дополнительные функции: * Экспорт в CSV * Стереть данные на сервере #### Настройки диаграммы: * **Заголовок диаграммы \(Chart Title\)** общее наименование диаграммы. * **Размер шрифта заголовка \(Title Font Size\)** выберите из 3 размеров шрифта. * **Выравнивание заголовка \(Title Alignment\)** выберите выравнивание заголовка диаграммы. Этот параметр влияет на положение заголовка и легенды в виджете. * **Показать ось X \(время\) \(Show x-axis \(time\)\)** выберите настройку, если хотите показать шкалу времени внизу графика. * **Автоматическое масштабирование для всех потоков данных \(Override Auto Scaling for All Datastreams\)** отключение этой опции позволит выполнить ручную настройку для оси Y \(см. ниже\). * **Выбор масштаба времени \(Time ranges picker\)** Позволяет выбрать необходимые периоды \(`15m`,`30m`, `1h`,`3h`, ...\) и разрешение для вашего графика. Разрешение определяет, насколько подробные ваши данные. Прямо сейчас график поддерживает два типа разрешения: `standard` и `high`. Разрешение также зависит от выбранного периода. Например, `standard` разрешение для `1d` означает, что вы будете получать 24 значения в день \(одно в час\), а при `high` разрешении вы будете получать за`1d` 1440 значений в день \(одно в минуту\). * **Потоки данных \(Datastreams\)** добавить потоки данных \(см. ниже, как настроить потоки данных\). #### Настройки потоков данных Виджет поддерживает до 4 потоков данных. Нажмите значок настроек потоков данных, чтобы открыть настройки. **Дизайн \(Design\)** выберите доступные типы диаграмм: * Линейная \(Line\) * С областями \(Area\) * Гистограмма \(Bar\) * Бинарная \(Binary\) \(приведение данных к двоичному виду\) **Цвет \(Color\)** выберите сплошные цвета или градиенты. **Источник и ввод \(Source and input\)** - Вы можете использовать три типа источника данных: **1. Виртуальный пин \(Virtual Pin\)** - выберите желаемое устройство и виртуальный пин для получения данных. **2. Теги \(Tags\)** - диаграмма может агрегировать данные с нескольких устройств, используя встроенные функции агрегирования. Например, если у вас есть 10 датчиков температуры, посылающих температуру с заданным интервалом, Вы можете отобразить среднее значение от 10 датчиков в виджете. Использование тегов: * [**Добавить Тэг**](http://docs.blynk.cc/#blynk-main-operations-control-of-multiple-devices-tags) на каждое устройство, с которого вы хотите агрегировать данные. Это можно сделать в настройках проекта Blynk. * **Отправить данные в виртуальный пин \(Push data to the same Virtual Pin\)** на каждое устройство. \(т.е. `Blynk.virtualWrite (V0, temperature);`\) * **Выберите тег в качестве источника \(Choose Tag as a source\)** в виджете Диаграмма и используйте пин, куда поступают данные \(т.е. V0\) **Добступные функции:** * `SUM` будет суммировать все входящие значения в указанный виртуальный пин со всех устройств, помеченные выбранным тегом * `AVG` будет вычислять среднее значение * `MED` найдет среднее значение * `MIN` будет вычислять минимальное значение * `MAX` будет вычислять максимальное значение **ВАЖНО: Теги не работают в режиме реального времени.** **3.** [**Выбор устройства \(Device Selector\)**](https://github.com/blynkkk/blynkkk.github.io/tree/master/mobile/ru/%20device_selector.md) Если вы добавите виджет Выбор устройства в свой проект, вы можете использовать его в качестве источника данных для Диаграммы. В том случае, когда вы меняете устройство, диаграмма будет автоматически обновляться. #### Настройки оси Y \(Y-Axis Settings\) Cуществует 4 режима масштабирования данных вдоль оси Y, активируется после отключения общей настройки виджета "Автоматическое масштабирование для всех потоков данных \(Override Auto Scaling for All Datastreams\)". **1. Авто \(Auto\)** Данные будут автоматически масштабироваться на основе минимальных и максимальных значений заданного периода времени. Это лучший вариант для начинающих. **2. Минимальный/Максимальный \(Min/Max\)** Когда выбран этот режим, шкала Y будет установлена на выбранные вами границы значений. Например, если ваше оборудование отправляет данные со значениями от -100 до 100, вы можете установить эти границы и данные графика будут отображены полностью. Вы также можете визуализировать данные в другом диапазоне. Допустим, входящие данные имеют значения в диапазоне 0-55, но вы хотели бы видеть только значения в диапазоне 30-50. Вы можете настроить диапазон, но если значения не соответствуют заданному масштабу оси Y, диаграмма будет обрезана. **3. Процент от высоты \(% of Height\)** Эта опция позволяет автоматически масштабировать входящие данные на виджете и размещать их так, как вы хотите. В этом режиме вы устанавливаете процент высоты виджета на экране от 0% до 100%. Если вы установите диапазон 0-100%, это будет полная автоматическая шкала. Независимо от того, в каком диапазоне поступают данные, он всегда будет масштабирован по всей высоте виджета. Если вы установите его на 0-25%, то график будет отображаться только на 1/4 высоты виджета. Этот параметр очень полезен для **Бинарной диаграммы** или для визуализации нескольких потоков данных на одной и той же диаграмме разными способами. **4. Дельта \(Delta\)** Пока данные остаются в пределах заданного значения дельты, график будет автоматически масштабироваться в этом диапазоне. Если дельта превышает диапазон, график автоматически масштабируется до минимальных/максимальных значений указанного периода. **Суффикс \(Suffix\)** Здесь вы можете указать суффикс, который будет отображаться со значениями во время длительного тап на графике. **Разрядность \(Decimals\)** Определяет формат числовых значений, когда вы нажимаете и удерживаете палец на графике. Возможные варианты: \#, \#.\#, \#.\#\#, и т.д. **Соединиить отсуствующие точки графика \(Connect Missing Data Points\)** Если этот переключатель включен, то Диаграмма соединит все точки, даже если данные частично отсуствуют. Если для него установлено значение «ВЫКЛ», то вы увидите пропуски в случае отсутствия данных. **Настройки Бинарной диаграммы \(Binary Chart Settings\)** Этот тип диаграммы полезен для построения двоичных данных, например, когда устройство было включено или выключено, или когда было обнаружено движение или когда был достигнут определенный порог значений. Вам необходимо указать точку **Перехода \(FLIP\)**, которая будет точкой, в которой входящие данные будут принимать состояние `ИСТИНА (TRUE)` или `ЛОЖЬ (FALSE)`. Например, вы отправляете данные в диапазоне от 0 до 1023. Если вы установите `512` в качестве точки **Перехода \(FLIP\)**, то все, что выше `512` \(исключая 512\), будет записано как `ИСТИНА (TRUE)`, любое значение ниже `512` \(включая 512\) будет `ЛОЖЬ (FALSE)`. Другой пример: если вы отправляете `0 и 1` и устанавливаете `0` в качестве точки **Перехода FLIP**, то `1` будет `ИСТИНА`, а `0` будет `ЛОЖЬ`. **Маркеры состояния \(State Labels\):** Здесь вы можете указать, как `ИСТИНА/ЛОЖЬ` должны отображаться на графике когда вы нажимаете и удерживаете палец. Например, вы можете установить значение `ИСТИНА` как `Оборудование ВКЛ`, `ЛОЖЬ` как `Оборудование ВЫКЛ`. ### Видео трансляция \(Video Streaming\) Простой виджет, который позволяет отображать прямой эфир и потокове видео. Виджет поддерживает протоколы RTSP \(RP, SDP\), HTTP/S прогрессивной потоковой передачи, HTTP/S прямого эфира. Для получения дополнительной информации, пожалуйста ознакомтесь с [официальной документацией Android](https://developer.android.com/guide/appendix/media-formats.html). На данный момент команда Blynk не предоставляет потоковые серверы. Таким образом, вы можете осуществлять потоковую передачу непосредственно с ваше камеры или использовать сторонние сервисы, а также запустить собственны потоковый сервер \(например, на оборудовании Raspberry\). Вы можете остановить/запустить видео поток, нажав на сам виджет. Вы можете изменить URL-адрес видео потока с аппаратного устройства при помощи кода: ```cpp Blynk.setProperty(V1, "url", "http://my_new_video_url"); ``` ### Индикатор уровня \(Level Display\) Отображает входящие данные с ваших датчиков или виртуальных пин-ов. Отображение уровня очень похоже на индикатор выполнения процесса, это очень красивый и причудливый вид для индикации «выполненных» событий, например «уровня заряда батареи». Вы можете обновить отображение значения с аппаратной стороны с помощью кода: ```cpp Blynk.virtualWrite(V1, val); ``` Каждое сообщение, которое аппаратное устройство отправляет на сервер, автоматически сохраняется на сервере. Режим PUSH не требует, чтобы приложение было онлайн или запущено. **Пример кода:** [Пример PUSH](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/PushData/PushData.ino) ## Interface ### Вкладки \(Tabs\) Единственная цель виджета Вкладки - расширить пространство вашего проекта. Чтобы редактировать виджет Вкладок - просто нажмите на выбранную вкладку. Вы можете перетаскивать виджеты между вкладками. Из списка можно удалить только последнюю вкладку: чтобы удалить ее, проведите пальцем влево по ее названию в экране настроек виджета. Максимальное количество вкладок на iOS составляет 4. Максимальное количество вкладок на Android - 10. Оставайтесь с нами для предстоящего редизайна виджета вкладок! ### Меню \(Menu\) Виджет Меню позволяет отправлять команды на ваше оборудование на основе выборного списка, сделанного вами в пользовательском интерфейсе. Меню отправляет индекс выбранного элемента спика, а не саму строку. Отправляемый индекс начинается с 1. Он работает так же, как типовой элемент "Комбинированный список" \([ComboBox](https://ru.wikipedia.org/wiki/%D0%9A%D0%BE%D0%BC%D0%B1%D0%B8%D0%BD%D0%B8%D1%80%D0%BE%D0%B2%D0%B0%D0%BD%D0%BD%D1%8B%D0%B9_%D1%81%D0%BF%D0%B8%D1%81%D0%BE%D0%BA)\). Пример кода: ```cpp BLYNK_WRITE { switch (param.asInt()) { case 1: { // Пункт 1 Serial.println("Выбран Пункт 1"); break; } case 2: { // Пункт 2 Serial.println("Выбран Пункт 2"); break; } } } ``` Вы также можете назначить пункты меню со стороны оборудования с помощью кода: ```cpp Blynk.setProperty(V1, "labels", "label 1", "label 2", "label 3"); ``` **Пример кода:** [Меню](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Menu/Menu.ino) ### Ввод времени \(Time Input\) Виджет Ввода времени позволяет вам выбрать время начала/окончания, день недели, часовой пояс, значения в формате до полудня/после полудня и отправить их на ваше оборудование. В настоящее время поддерживаются следующие форматы: `ЧЧ:ММ` и `ЧЧ:ММ AM/PM`. Аппаратное устройстов будет отсчитывать время пользовательского интерфейса в виде секунд дня \(`3600 * часов + 60 * минут`\) для запуска/остановки времения. Время, которое виджет отправляет оборудованию, является локальным временем пользователя. Индексы по выбранных дней: ```text Понедельник - 1 Вторник - 2 ... Суббота - 6 Воскресенье - 7 ``` Вы также можете изменить состояние виджета в интерфейсе пользователя. Смотрите ниже примеры кода. **Пример кода:** [Простой Ввод времени для времени начала](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/TimeInput/SimpleTimeInput/SimpleTimeInput.ino) **Пример кода:** [Расширенный Ввод времени](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/TimeInput/AdvancedTimeInput/AdvancedTimeInput.ino) **Пример кода:** [Обновление Ввода времени в пользовательском интерфейсе](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/TimeInput/UpdateTimeInputState/UpdateTimeInputState.ino) ### Карта \(Map\) Виджет Карты позволяет устанавливать точки/флажки на карте со стороны оборудования. Это очень полезный виджет, если у вас есть несколько устройств, и вы хотите отслеживать их позиции на карте. Вы можете отправить точку на карту с помощью обычной команды виртуальной записи: ```cpp Blynk.virtualWrite(V1, pointIndex, lat, lon, "Название"); ``` Мы также создали оболочку, чтобы вы могли упростить использование виджета Карты. Вы можете изменить метки флажков на оборудовании с помощью кода: ```cpp WidgetMap myMap(V1); ... int index = 1; float lat = 51.5074; float lon = 0.1278; myMap.location(index, lat, lon, "Название"); ``` Использование уникальных `index` позволяет вам переопределить существующее значение точки. **Пример кода:** [Базовый пример Карты](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Map/Map.ino) ### Таблица \(Table\) Табличный виджет удобен, когда вам нужно структурировать аналогичные данные в пределах одного графического элемента. Работает как обычная таблица. Вы можете добавить строку в таблицу с помощью кода: ```text Blynk.virtualWrite(V1, "add", id, "Имя", "Значение"); ``` Вы можете обновить строку в таблице с помощью кода: ```text Blynk.virtualWrite(V1, "update", id, "Новое имя", "Новое значение"); ``` Чтобы выделить любой элемент в таблице, используйте его идентификатор: ```text Blynk.virtualWrite(V1, "pick", 0); ``` Чтобы выбрать/отменить выбор \(сделать значок зеленым/серым\) элемент в таблице, используйте его идентификатор: ```text Blynk.virtualWrite(V1, "select", 0); Blynk.virtualWrite(V1, "deselect", 0); ``` Чтобы очистить таблицу используйте код: ```text Blynk.virtualWrite(V1, "clr"); ``` Вы также можете обрабатывать другие действия из таблицы. Например, использовать строку таблицы в качестве кнопки переключения. ```text BLYNK_WRITE(V1) { String cmd = param[0].asStr(); if (cmd == "select") { // строка в таблице была выбрана. int rowId = param[1].asInt(); } if (cmd == "deselect") { // строка в таблице была отменена. int rowId = param[1].asInt(); } if (cmd == "order") { // когда строки в таблице переупорядочиваются int oldRowIndex = param[1].asInt(); int newRowIndex = param[2].asInt(); } } ``` **Примечание:** Максимальное количество строк в таблице равно 100. Когда вы достигнете предела, таблица будет работать как список FIFO \(Первый пришел - первый ушел\). Это ограничение можно изменить, настроив свойство `table.rows.pool.size` в параметрах локального сервера. **Пример кода:** [Простое использование таблицы](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Table/Table_Simple/Table_Simple.ino) **Пример кода:** [Расширенное использование таблицы](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Table/Table_Advanced/Table_Advanced.ino) ### Селектор устройств \(Device Selector\) Селектор устройств - это мощный виджет, который позволяет обновлять виджеты на основе одного активного устройства. Этот виджет особенно полезен, когда у вас есть несколько устройств с аналогичной функциональностью. Представьте, что у вас есть 4 устройства, и к каждому устройству подключен датчик температуры и влажности. Для отображения данных по всем 4 устройствам вам необходимо добавить 8 виджетов. С помощью Селектора устройств вы можете использовать только 2 виджета, которые будут отображать температуру и влажность в зависимости от активного устройства, выбранного в Селекторе. Все, что вам нужно сделать, это: 1. Добавить виджет Селектора устройств в проект 2. Добавить 2 виджета \(например виджет отображения значений \(Value Display Widget\)\), чтобы отобразить температуру и влажность 3. В настройках виджетов вы сможете назначить их на Селектор устройств \(в разделе источника или цели\) 4. Выйти из настроек, запустить проект Теперь вы можете изменить активное устройство в Селекторе устройств и увидите, что значения температуры и влажности отражают обновленные данные для только что выбранного вами устройства. **ПРИМЕЧАНИЕ:** Виджет вебхук \([Webhook](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/WebHook/WebHook_GET/WebHook_GET.ino)\) пока не работает с Селектором устройств. ### Плитка устройств \(Device Tiles\) Плитка устройств - это мощный виджет, очень похожий на виджет Селектора устройств \(Device Selector\), но с пользовательским интерфейсом. Позволяет отображать один пин с устройства на одну плитку. Этот виджет особенно полезен, когда у вас есть несколько устройств с аналогичной функциональностью. Теперь вы можете группировать похожие устройства на одном макете \(шаблоне\). ## Sensors ### Акселерометр \(Accelerometer\) Акселерометр один из [сенсоров движения](https://developer.android.com/guide/topics/sensors/sensors_motion.html), который позволяет определить движение Вашего телефона в пространстве. Он может пригодится для отслеживания таких событий как тряска, удар, поворот или наклон телефона. Концептуально, акселерометр определяет силу ускорения приложенную к вашему телефону. Единица измерения - м/c^2 приложенная к каждой из осей `x`, `y`, `z`. Чтобы получить данные с сенсора нужно использовать следующий код : ```cpp BLYNK_WRITE(V1) { //сила ускорения, приложенная к оси x int x = param[0].asFloat(); //сила ускорения, приложенная к оси y int y = param[1].asFloat(); //сила ускорения, приложенная к оси z int z = param[2].asFloat(); } ``` Акселерометр не работает при свернутом приложении. ### Барометр/Давление \(Barometer/pressure\) Барометр один из сенсоров [окружающей среды](https://developer.android.com/guide/topics/sensors/sensors_environment.html) и позволяет измерять атмосферное давление. Измеряется в `hPa` \(гПа\) или `mbar` \(мБар\). Чтобы получить данные с сенсора нужно использовать следующий код : ```cpp BLYNK_WRITE(V1) { //Давление в мБар int pressure = param[0].asInt(); } ``` Барометр не работает при свернутом приложении. ### Гравитация \(Gravity\) Гравитация - это своего рода [датчики движения](https://developer.android.com/guide/topics/sensors/sensors_motion.html), который позволяет обнаруживать движение вашего смартфона. Полезно для мониторинга движения устройства, таких как наклон, встряхивание, вращение или качание. Датчик силы притяжения выдает трехмерный вектор, указывающий направление и величину силы притяжения. Измеряется в `m/s^2` силы притяжения, приложенной к оси `x`, `y`, `z`. Для того, чтобы принять данные от него, вам необходимо: ```cpp BLYNK_WRITE(V1) { //сила притяжения, приложенная к оси x int x = param[0].asFloat(); //сила притяжения, приложенная к оси y int y = param[1].asFloat(); //сила притяжения, приложенная к оси y int z = param[2].asFloat(); } ``` **ВНИМАНИЕ:** Виджет гравитации не работает в фоновом режиме. ### Влажность \(Humidity\) Влажность является своего рода [датчиком среды](https://developer.android.com/guide/topics/sensors/sensors_environment.html), который позволяет измерять относительную влажность окружающей среды. Измеряется в `%` - фактически это относительная влажность в процентах. Для того, чтобы принять данные от датчика, вам необходимо: ```cpp BLYNK_WRITE(V1) { //Влажность в % int humidity = param.asInt(); } ``` **ВНИМАНИЕ:** Влажность не работает в фоновом режиме. ### Свет \(Light\) Свет - это своего рода [датчики окружающей среды](https://developer.android.com/guide/topics/sensors/sensors_environment.html), который позволяет измерять уровень освещенности \(уровень внешней освещенности измеряется в люксах\). В телефонах чаще всего используется для управления яркостью экрана. Для того, чтобы принять данные этого виджета, вам необходимо: ```cpp BLYNK_WRITE(V1) { //уровень освещенности int lx = param.asInt(); } ``` Виджет Свет не работает в фоновом режиме. ### Близость \(Proximity\) Близость - это своего рода [датчики положения](https://developer.android.com/guide/topics/sensors/sensors_position.html) это позволяет определить, насколько близко смартфон к лицу. Измеряется в `cm` \(см\) - расстояние от телефона до лица. Однако большинство этих датчиков возвращает только информацию FAR / NEAR. Поэтому, возвращаемое значение будет `0 / 1`. Где 0 / LOW = `FAR` \(далеко\), а 1 / HIGH = `NEAR` \(рядом\). Для того, чтобы принять данные из виджета, вам необходимо: ```cpp BLYNK_WRITE(V1) { // расстояние до объекта int proximity = param.asInt(); if (proximity) { // РЯДОМ } else { // ДАЛЕКО } } ``` Виджет близость не работает в фоновом режиме. ### Температура \(Temperature\) Температура является своего рода [датчиком окружающей среды](https://developer.android.com/guide/topics/sensors/sensors_environment.html) который позволяет измерять температуру окружающего воздуха. Измеряется в `°C` - градусах Цельсия. Для приема данных из виджета, необходимо использовать код: ```cpp BLYNK_WRITE(V1) { // температура в градусах цельсия int celcius = param.asInt(); } ``` Виджет Температуры не работает в фоновом режиме. ### Триггер GPS \(GPS Trigger\) Виджет Триггер GPS позволяет легко инициировать события, когда вы входите или выходите из географической зоны. Этот виджет будет работать в фоновом режиме и периодически будет проверять ваши координаты. Если ваше местоположение находится в пределах или вне указанной зоны \(географическая зона выбирается на карте виджета\), виджет отправит команду `HIGH`/`LOW` на аппаратное устройство. Например, Триггер GPS назначен для пина `V1`, и включена опция `Trigger When Enter`. В этом случае, когда вы окажитесь в указанной географической зоне виджет вызовет событие `HIGH`. ```cpp BLYNK_WRITE(V1) { int state = param.asInt(); if (state) { //Вы вошли в зону } else { //Вы вышли из зоны } } ``` Подробнее о том, как работает GPS-виджет, вы можете прочитать [здесь](https://developer.android.com/guide/topics/location/strategies.html). **ВНИМАНИЕ:** Виджет Триггер GPS работает в фоновом режиме. ### Поток GPS \(GPS Streaming\) Полезно для мониторинга местонахождения смартфона получать данные о широте, долготе, высоте и скорости \(скорость часто может быть 0, если смартфон не поддерживает ее измерение\). Чтобы принимать данные из этого виджета, вам необходимо: ```cpp BLYNK_WRITE(V1) { float latitude = param[0].asFloat(); float longitude = param[1].asFloat(); float altitude = param[2].asFloat(); float speed = param[3].asFloat(); } ``` или вы можете использовать подготовленную оболочку `GpsParam` : ```cpp BLYNK_WRITE(V1) { GpsParam gps(param); //Печать лат/лон с 6 десятичными знаками Serial.println(gps.getLat(), 7); Serial.println(gps.getLon(), 7); Serial.println(gps.getAltitude(), 2); Serial.println(gps.getSpeed(), 2); } ``` Поток GPS работает в фоновом режиме. **Пример кода:** [Поток GPS](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/GPS_Stream/GPS_Stream.ino) ## Other ### Мост \(Bridge\) Мост может быть использован для связи между устройствами \(без участия приложения\). Вы можете отправлять цифровые / аналоговые / виртуальные команды записи с одного устройства на другое, зная только токен авторизации. На данный момент виджет Мост не обязательно использовать в приложении \(здесь он используется для указания того, что у нас есть такая функция\). **Вы можете использовать несколько мостов для управления несколькими устройствами.** Виджет Мост использует виртуальный пин и превращает его в канал для управления другим устройством. Это означает, что вы можете контролировать любые виртуальные, цифровые или аналоговые пины целевого устройства. Будьте осторожны, не используйте пины типа `A0, A1, A2 ...` при обмене данными между различными типами устройств, так как в таких случаях Arduino Core может ссылаться на неверные пины. Пример кода для устройства A, которое будет отправлять значения на устройство B: ```cpp //Инициирует виджет Моста на V1 устройства A WidgetBridge bridge1(V1); ... void setup() { Blynk.begin(...); while (Blynk.connect() == false) { // Ждем пока Blynk подключится } bridge1.digitalWrite(9, HIGH); // выставим триггер HIGH на D9 устройства B. Код на устройстве B не требуется bridge1.analogWrite(10, 123); bridge1.virtualWrite(V1, "hello"); // вам нужно написать код на устройстве B, чтобы получить это значение. См. ниже bridge1.virtualWrite(V2, "value1", "value2", "value3"); } BLYNK_CONNECTED() { bridge1.setAuthToken("OtherAuthToken"); // токен с устройства B } ``` **ВАЖНО:** при выполнении `virtualWrite()` с виджета Мост, устройство B должно обрабатывать входящие данные с устройства A. Например, если вы отправляете значение с устройства A на устройство B, используя `bridge.virtualWrite (V5)`, вам необходимо использовать свой обработчик на устройстве B: ```cpp BLYNK_WRITE(V5){ int pinData = param.asInt(); //pinData variable will store value that came via Bridge } ``` Имейте в виду, что `bridge.virtualWrite` не отправляет никаких значений в мобильное приложение. Для этого вам нужно вызвать `Blynk.virtualWrite`. **Пример кода:** [Мост](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Bridge/Bridge.ino) ### Обработчик событий \(Eventor\) Виджет Обработчик событий позволяет создавать простые правила поведения или **события**. Давайте рассмотрим типичный вариант использования: считывание температуры с датчика DHT и отправка push-уведомления, когда температура превышает определенный предел: ```cpp float t = dht.readTemperature(); if (isnan(t)) { return; } if (t > 40) { Blynk.notify(String("Температура слишком высокая: ") + t); } ``` С Обработчиком событий вам не нужно писать этот код. Все, что вам нужно, это отправить значение с датчика на сервер Blynk: ```cpp float t = dht.readTemperature(); Blynk.virtualWrite(V0, t); ``` Не забывайте, что команды `virtualWrite` должны быть заключены в таймер и не должны использоваться в основном цикле `loop`. **ПРИМЕЧАНИЕ:** Не забудьте добавить виджет уведомлений в приложении. Обработчик событий пригодится вам, когда нужно изменить условия на лету без повторной загрузки нового скетча на аппаратное обеспечение. Вы можете создать столько **событий**, сколько вам нужно. Обработчик событий также может быть запущен со стороны приложения. Вам просто нужно назначить виджет на тот же контакт, что и ваше событие в Обработчике событий. Обработчик событий не постоянно отправляет события. Давайте рассмотрим простой пример, как показано выше `if (temperature > 40) send notification`. Когда температура превышает 40 пороговых значений - отправляется уведомление. Если температура продолжает оставаться выше 40 никакие повторные действия не будут инициированы. Но если `temperature` опускается ниже порогового значения, а затем проходит его снова уведомление будет отправлено повторно \(для уведомлений Обработчика событий нет ограничения отправки в течение 5 секунд\). Обработчик событий также поддерживает события таймера \(Timer\). Например, вы можете установить пин `V1` ON/HIGH в 21:00:00 каждую пятницу. В Обработчике событий вы можете назначить несколько таймеров на один и тот же пин, отправить любую строку/число, выбрать день и часовой пояс. Чтобы удалить созданное **событие**, пожалуйста, используйте сдвиг пальцем по экрану. Вы также можете перенести последний элемент самого события. **Пример кода:** [Обработчик событий](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Eventor/Eventor.ino) **ПРИМЕЧАНИЕ:** Виджет таймера зависит от времени сервера, а не вашего телефона. Иногда время телефона может не соответствовать времени сервера. **ПРИМЕЧАНИЕ:** события запускаются только один раз при выполнении условия. Это означитает что \[цепочка событий\] \([https://community.blynk.cc/t/eventor-behavior-bug-feature/20962](https://community.blynk.cc/t/eventor-behavior-bug-feature/20962)\) невозможна \(однако она может быть включена в коммерческой версии\). ### Часы реального времени \(RTC\) Часы реального времени позволяют получать время с сервера. Вы можете предварительно выбрать любой часовой пояс в пользовательском интерфейсе, чтобы получить время на оборудование из нужной локали. **Пример кода:** [Часы реального времени](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/RTC/RTC.ino) ### Bluetooth с низким энергопотреблением Этот виджет позволяет включить блутзуз с низким энергопотреблением на вашем телефоне. На текущий момент виджет также требует наличия интернет соединения \(постараемся пофиксить в ближайшем будущем\). Некоторые типы виджетов нельзя использовать вместе с блутузом, например исторический граф, так как он требует чтобы данные отправлялись на сервер, чего блутуз виджет не делает. **Список поддерживаемых чипов и контроллеров:** [BLE](https://github.com/blynkkk/blynk-library/tree/master/examples/Boards_Bluetooth) ### Блютуз \(Bluetooth\) Этот виджет позволяет включить блютуз на вашем телефоне. На текущий момент виджет также требует наличия интернет соединения \(постараемся пофиксить в ближайшем будущем\) и поддерживается только на Android. Некоторые типы виджетов нельзя использовать вместе с блютузом, например исторический граф, так как он требует чтобы данные отправлялись на сервер, чего блютуз виджет не делает. **Список поддерживаемых чипов и контроллеров:** [BLE](https://github.com/blynkkk/blynk-library/tree/master/examples/Boards_Bluetooth) ### Музыкальный проигрыватель \(Music Player\) Простой элемент интерфейса с 3 кнопками - имитирует интерфейс музыкального проигрывателя. Каждая кнопка отправляет свою команду на аппаратное устройство: `play` \(воспроизвести\), `stop` \(стоп\), `prev` \(предыдущий\), `next` \(следующий\). Вы можете изменить состояние виджета в приложении с аппаратной стороны с помощью следующих команд: ```text Blynk.virtualWrite(Vx, "play"); Blynk.virtualWrite(Vx, "stop"); ``` Вы также можете изменить состояние воспроизведение/остановка виджета с помощью следующего кода \(эквивалент вышеупомянутых команд\): `Blynk.setProperty(V1, "isOnPlay", "false");` **Пример кода:** [Музыкальный проигрыватель](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Player/Player.ino) ### Вебхук \(Webhook\) Вебхук очень мощный виджет, который позволяет Вам легко интегрироватся с любыми сторонними сервисами. С его помощью Вы можете слать любые HTTP/S запросы на любой сервер или устройство, которое имеет HTTP/S API \(например, лампы Philips Hue\). Вебхук вешается на вирутальный пин и любая команда, которая приходит на этот пин будет вызывать срабатывание HTTP/S запроса. Команды на такой виртуальный пин могут приходить как со стороны железа, так и со стороны приложения. То есть, Вы можете слать любой HTTP запрос при нажатии кнопки в приложении, если эта кнопка на том же пине что и вебхук. Вот простой пример, представьте, что Вы хотите слать данные с микроконтроллера не только в Blynk, но и в какой-то другой сервис, например - Google Docs или в thingspeak.com. Раньше Вам для этого пришлось бы писать что-то вроде : ```cpp WiFiClient client; if (client.connect("api.thingspeak.com", 80)) { client.print("POST /update HTTP/1.1\n"); client.print("Host: api.thingspeak.com\n"); client.print("Connection: close\n"); client.print("X-THINGSPEAKAPIKEY: " + apiKeyThingspeak1 + "\n"); client.print("Content-Type: application/x-www-form-urlencoded\n"); client.print("Content-Length: "); client.print(postStr.length()); client.print("\n\n"); client.print(postStr); } ``` С вебхуком этого больше делать не нужно. Достаточно лишь заполнить поля виджета в приложении и выполнить привычное: ```cpp Blynk.virtualWrite(V0, value); ``` Где V0 - пин вебхук виджета. В дополнение, Вы можете подставлять значение пина в URL: ```cpp https://api.thingspeak.com/update?api_key=xxxxxx&field1=/pin/ ``` или тело запроса : ```cpp ["/pin/"] ``` Так же можно отправлять несколько значений внутри одного пина \(до 5\) : `/pin[0]/`,`/pin[1]/`, `/pin[2]/` Еще одна крутая штука - это возможность делать HTTP GET запросы на сервере и слать их результат на микроконтроллер. Прелесть тут в том, что Вам не нужно для этого писать сложный код на микроконтроллере. Представьте, что Вам нужно получить информацию о погоде от какого-то метио сервиса. Например, по такому запросу : ```text Вы можете вставить этот запрос в вебхук виджет, выбрать пин ```V0``` и написать : ```cpp BLYNK_WRITE(V0){ String webhookdata = param.asStr(); Serial.println(webhookdata); } ``` Теперь, каждый раз когда вы дергаете `V0` с помощью `Blynk.virtualWrite(V0, 1)` будет вызвана функция `BLYNK_WRITE(V0)`. **Замечание:** обычно HTTP запросы довольно большие, поэтому Вам, вероятно, нужно будет увеличить лимит на максимальную длину сообщения на микроконтроллере `#define BLYNK_MAX_READBYTES 1024`. **Замечание:** наше облако так же имеет определенные лимиты для вебхука. Мы разрешаем слать только 1 запрос в секунду. Это поведение можно изменить на локальном сервер через свойство `webhooks.frequency.user.quota.limit`. Пожалуйста, используйте вебхуки с умом. Многие веб ресурсы не способны обрабатывать даже 1 запрос в секунду. **Замечание :** в случае если Ваш вебхук не выполнился 10 раз подряд - вебхук виджет будет остановлен. Чтобы восстановить его работу - нужно открыть и закрыть виджет в режиме редактирования. Не выполненными считаются запросы у которых код ответа не равен 200 или 302. ### Отчеты \(Reports\) Функция виджета Отчеты заключается в настройке и разметке отчетов данных в формате CSV. Вы можете выбрать разовые или переодически запланированные отчеты. Кроме того, в отчетах вы можете очистить все пользовательсике данные, собранные с ваших устройств. Вам необходимо настроить начальные параметры в режиме редактирования, а затем уже в режиме воспроизведения вы сможете настроить сами отчеты. #### Режим редактирования. Конфигурация ввода данных В режиме редактирования \(когда ваш проект остановлен\) вы определяете потоки данных, которые вы хотели бы позже включить в отчет. Виджет Отчеты предназначен для работы с виджетом [Плитка устройств \(Device Tiles\)](https://github.com/blynkkk/blynkkk.github.io/blob/master/mobile/ru/device_tiles.md). Если вы не используете плитки устройств, вы все равно можете выбрать одно устройство или группу устройств в качестве источника данных для отчетов. Вы должны выбрать либо [Плитку устройств](https://github.com/blynkkk/blynkkk.github.io/blob/master/mobile/ru/device_tiles.md), либо одино устройство, либо группу устройств для отчета. Вы не можете объединить эти оба варианта. #### Режим воспроизведения После добавления исходных устройств и их потоков данных нажмите кнопку «Воспроизвести» и нажмите кнопку «Отчеты». ### Настройка отчетов Каждый параметр отчета предполагает свои собственные настройки: `Report name` \(Имя отчета\) - дайте вашему отчету осмысленное имя. `Data source` \(Источники данных\) - выберите потоки данных, которые вы хотели бы включить в отчеты. `Report Frequency` \(периодичность отчетов\) - Определяет, как часто будут отправляться отчеты. Они могут быть разовыми и запланированными. `one-time` \(Сейчас\) - мгновенно сформирует отчет и отправит его на указанные адреса электронной почты. Нажмите на значок справа, чтобы отправить отчет. Запланированные отчеты могут быть отправлены `daily`/`weekly`/`monthly` \(ежедневно/еженедельно/ежемесячно\). `At Time` \(Время\) установите время дня, когда отчет будет отправлен. `Start`/`End` \(Качало/Конец\) указывает дату начала и окончания оправки отчетов. Для еженедельного отчета вы можете выбрать день недели, когда отчет должен быть отправлен. Для ежемесячного отчета вы можете выбрать, отправку отчета в первый или последний день месяца. `Recipients` \(Получатели\) - укажите до 5 адресов электронной почты.. `Data resolution` \(Разрешение данных\) определяет детализацию ваших отчетов. Поддерживаемые детализации: `minute` \(ежеминутно\), `hourly` \(ежечасно\) и `daily` \(ежедневно\). Например, когда вы генерируете ежедневный отчет с детализацией в 1 минуту, вы получаете `24 * 60 * 60` единиц данных в вашем ежедневном отчете за каждый выбранный поток. `Group data in reports by` \(Группировка данных в отчетах\) - укажите выходной формат файла-\(ов\) CSV: `Datastream` \(Поток\) - вы получите один CSV файл для каждого потока данных. `Device` \(Устройство\) - вы получите один CSV-файл на каждое устройство. Каждый файл будет содержать все включенные потоки данных. `Report` \(Отчет\) - вы получите один CSV-файл для всех ваших устройств и всех ваших потоков данных. `Timezone correction` \(Времненная зона\) - укажите корректировку часового пояса, если вам нужно настроить дату и время отчета на определенный часовой пояс. `Date and time format` \(Формат даты и времени\) - определяет формат поля временной метки ваших данных. Вы можете выбрать `2018-06-21 20:16:48`, `2018-06-21T20:16:48+03:00` или другой поддерживаемый формат. Существует особый формат `Timestamp` \(Временная метка\), которая отражает разницу между текущим временем и полуночью 1 января 1970 года UTC, измеряемую в миллисекундах. После настройки отчета нажмите кнопку «ОК» в правом верхнем углу. Ваш отчет готов. После настройки отчета вы увидите, когда запланирован следущий отчет `Next`, а также увидите расписание для этого отчета. После отправки отчета хотя бы один раз, вы можете увидеть дату его последней отправки `Last`. `Last` \(Последний\) метка также содержит статус отправки отчета: * `OK` \(Успешно\): отчет был сгенерирован и успешно отправлен Получателям; * `No Data` \(Нет данных\): отчет не содержит данных за указанный период; * `Error` \(Ошибка\): что-то пошло не так. Пожалуйста, свяжитесь со службой поддержки Blynk. Отчеты будут генерироваться, даже если ваш проект не находится в активном \(Play\) режиме. Однако помните, неактивные проекты небудут генерировать данные. **ПРИМЕЧАНИЕ:** все отчеты формируются в кодировке UTF-16. Пожалуйста, убедитесь, что при открытии файла отчета вы выбрали кодировку UTF-16 в вашем CSV-редакторе. ### Отчеты \(Reports\) Функция виджета Отчеты заключается в настройке и разметке отчетов данных в формате CSV. Вы можете выбрать разовые или переодически запланированные отчеты. Кроме того, в отчетах вы можете очистить все пользовательсике данные, собранные с ваших устройств. Вам необходимо настроить начальные параметры в режиме редактирования, а затем уже в режиме воспроизведения вы сможете настроить сами отчеты. #### Режим редактирования. Конфигурация ввода данных В режиме редактирования \(когда ваш проект остановлен\) вы определяете потоки данных, которые вы хотели бы позже включить в отчет. Виджет Отчеты предназначен для работы с виджетом [Плитка устройств \(Device Tiles\)](https://github.com/blynkkk/blynkkk.github.io/blob/master/mobile/ru/device_tiles.md). Если вы не используете плитки устройств, вы все равно можете выбрать одно устройство или группу устройств в качестве источника данных для отчетов. Вы должны выбрать либо [Плитку устройств](https://github.com/blynkkk/blynkkk.github.io/blob/master/mobile/ru/device_tiles.md), либо одино устройство, либо группу устройств для отчета. Вы не можете объединить эти оба варианта. #### Режим воспроизведения После добавления исходных устройств и их потоков данных нажмите кнопку «Воспроизвести» и нажмите кнопку «Отчеты». ### Настройка отчетов Каждый параметр отчета предполагает свои собственные настройки: `Report name` \(Имя отчета\) - дайте вашему отчету осмысленное имя. `Data source` \(Источники данных\) - выберите потоки данных, которые вы хотели бы включить в отчеты. `Report Frequency` \(периодичность отчетов\) - Определяет, как часто будут отправляться отчеты. Они могут быть разовыми и запланированными. `one-time` \(Сейчас\) - мгновенно сформирует отчет и отправит его на указанные адреса электронной почты. Нажмите на значок справа, чтобы отправить отчет. Запланированные отчеты могут быть отправлены `daily`/`weekly`/`monthly` \(ежедневно/еженедельно/ежемесячно\). `At Time` \(Время\) установите время дня, когда отчет будет отправлен. `Start`/`End` \(Качало/Конец\) указывает дату начала и окончания оправки отчетов. Для еженедельного отчета вы можете выбрать день недели, когда отчет должен быть отправлен. Для ежемесячного отчета вы можете выбрать, отправку отчета в первый или последний день месяца. `Recipients` \(Получатели\) - укажите до 5 адресов электронной почты.. `Data resolution` \(Разрешение данных\) определяет детализацию ваших отчетов. Поддерживаемые детализации: `minute` \(ежеминутно\), `hourly` \(ежечасно\) и `daily` \(ежедневно\). Например, когда вы генерируете ежедневный отчет с детализацией в 1 минуту, вы получаете `24 * 60 * 60` единиц данных в вашем ежедневном отчете за каждый выбранный поток. `Group data in reports by` \(Группировка данных в отчетах\) - укажите выходной формат файла-\(ов\) CSV: `Datastream` \(Поток\) - вы получите один CSV файл для каждого потока данных. `Device` \(Устройство\) - вы получите один CSV-файл на каждое устройство. Каждый файл будет содержать все включенные потоки данных. `Report` \(Отчет\) - вы получите один CSV-файл для всех ваших устройств и всех ваших потоков данных. `Timezone correction` \(Времненная зона\) - укажите корректировку часового пояса, если вам нужно настроить дату и время отчета на определенный часовой пояс. `Date and time format` \(Формат даты и времени\) - определяет формат поля временной метки ваших данных. Вы можете выбрать `2018-06-21 20:16:48`, `2018-06-21T20:16:48+03:00` или другой поддерживаемый формат. Существует особый формат `Timestamp` \(Временная метка\), которая отражает разницу между текущим временем и полуночью 1 января 1970 года UTC, измеряемую в миллисекундах. После настройки отчета нажмите кнопку «ОК» в правом верхнем углу. Ваш отчет готов. После настройки отчета вы увидите, когда запланирован следущий отчет `Next`, а также увидите расписание для этого отчета. После отправки отчета хотя бы один раз, вы можете увидеть дату его последней отправки `Last`. `Last` \(Последний\) метка также содержит статус отправки отчета: * `OK` \(Успешно\): отчет был сгенерирован и успешно отправлен Получателям; * `No Data` \(Нет данных\): отчет не содержит данных за указанный период; * `Error` \(Ошибка\): что-то пошло не так. Пожалуйста, свяжитесь со службой поддержки Blynk. Отчеты будут генерироваться, даже если ваш проект не находится в активном \(Play\) режиме. Однако помните, неактивные проекты небудут генерировать данные. **ПРИМЕЧАНИЕ:** все отчеты формируются в кодировке UTF-16. Пожалуйста, убедитесь, что при открытии файла отчета вы выбрали кодировку UTF-16 в вашем CSV-редакторе. ================================================ FILE: widgets.md ================================================ # Widgets Widgets are interface modules. Each of them performs a specific input/ output function when communicating with the hardware. There are 4 types of Widgets: * **Controllers** - used to send commands that control your hardware * **Displays** - used for data visualization from sensors and other sources; * **Notifications** - send messages and notifications; * **Interface** - widgets to perform certain GUI functions; * **Other** - widgets that don't belong to any category; Each Widget has it's own settings. Some of the Widgets \(e.g. Bridge\) just enable functionality and they don't have any settings. ## Common Widget Settings ### Pin Selector This is one of the main parameters you need to set. It defines which pin to control or to read from. ![](.gitbook/assets/pin_selection.png) **Digital Pins** - represent physical Digital IO pins on your hardware. PWM-enabled pins are marked with the `~` symbol **Analog Pins** - represent physical Analog IO pins on your hardware **Virtual Pins** - have no physical representation. They are used to transfer any data between Blynk App and your hardware. Read more about Virtual Pins [here](./#blynk-main-operations-virtual-pins). ### Data Mapping In case you want to map incoming values to specific range you may use mapping button: ![](.gitbook/assets/display_edit_mapping.png) Let's say your sensor sends values from 0 to 1023. But you want to display values in a range 0 to 100 in the app. When Data Mapping enabled, incoming value 1023 will be mapped to 100. ### SPLIT/MERGE Some of the Widgets can send more than one value. And with this switch you can control how to send them. * **SPLIT**: Each of the parameters is sent directly to the Pin on your hardware \(e.g D7\). You don't need to write any code. **NOTE:** In this mode you send multiple commands from one widget, which can reduce performance of your hardware. Example: If you have a Joystick Widget and it's set to D3 and D4, it will send 2 commands over the Internet: ```cpp digitalWrite(3, value); digitalWrite(4, value); ``` * **MERGE:** When MERGE mode is selected, you are sending just 1 message, consisting of array of values. But you'll need to parse it on the hardware. This mode can be used with Virtual Pins only. Example: Add a zeRGBa Widget and set it to MERGE mode. Choose Virtual Pin V1 ```cpp BLYNK_WRITE(V1) // There is a Widget that WRITEs data to V1 { int r = param[0].asInt(); // get a RED channel value int g = param[1].asInt(); // get a GREEN channel value int b = param[2].asInt(); // get a BLUE channel value } ``` ### Decimals Defines how many decimals you would like to see when moving a Slider. When "No Fraction" is chosen, slider will only send integer values with no decimals. "1 digit" means that values will look like 1.1, 1.2, ..., 2.0, etc. ### Send On Release This option allows you to optimize data traffic on your hardware. For example, when you move joystick widget, commands are streamed to the hardware, during a single joystick move you can send dozens of commands. There are use-cases where it's needed, however creating such a load may lead to hardware overload and reset. **Send On Release** is a recommended setting for majority of applications. This is also a default setting. ### Write interval Similar to "Send on Release" option. However, it allows you to stream values to your hardware within certain interval. For example, setting **write interval** to 100 ms means that while you move the slider, only 1 value will be sent to hardware within 100 ms period. This option is also used to optimize data traffic flow to your hardware. ### Color gradient When you choose gradient, it affects the color of widget elements based on invoming values. For example: You set Gauge Widget with Min and Max parameters of 0-100, and choose green-yellow-red gradient. When hardware sends: * `10`, Gauge will change it's color to green color * `50` will change Gauge to yellow color * `80` will change Gauge to red color There are 2 types of gradients you can choose from: * Warm: Green - Orange - Red; * Cold: Green - Blue - Violet; ## Controllers ### Button Works in push or switch modes. Allows to send ON and OFF \(LOW/HIGH\) values. Button sends 1 \(HIGH\) on press and sends 0 \(LOW\) on release. ![](.gitbook/assets/button.png) ![](.gitbook/assets/button_edit.png) **Sketch:** [BlynkBlink](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/BlynkBlink/BlynkBlink.ino) ### Slider Similar to potentiometer. Allows to send values between in a given MIN/MAX range. ![](.gitbook/assets/slider.png) ![](.gitbook/assets/slider_edit.png) **Sketch:** [BlynkBlink](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/BlynkBlink/BlynkBlink.ino) ### Timer Timer triggers actions at a specified time. Even if smartphone and app is offline. Start time sends 1 \(HIGH\). Stop time sends 0 \(LOW\). Recent Android version also has improved Timer within Eventor widget. With Eventor Time Event you can assign multiple timers on same pin, send any string/value, select days and timezone. It is recommended to use Eventor over Timer widget. However Timer widget is still suitable for simple timer events. ![](.gitbook/assets/timer.png) ![](.gitbook/assets/timer_edit.png) **NOTE:** The timer widget rely on the server time and not your phone time. Sometimes the phone time may not match the server time. **Sketch:** [Timer](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Timer/Timer.ino) ### Joystick Control servo movements in 4 directions #### Settings: * SPLIT/MERGE modes - read [here](./#widgets-common-widget-settings-splitmerge) * **Rotate on Tilt** When it's ON, Joystck will automatically rotate if you use your smartphone in landscape orientation * **Auto-Return** * When it's OFF, Joystick handle will not return back to center position. It will stay where you left it. ![](.gitbook/assets/joystick.png) ![](.gitbook/assets/joystick_edit.png) **Sketch:** [JoystickTwoAxis](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/JoystickTwoAxis/JoystickTwoAxis.ino) ### zeRGBa zeRGBa is a usual RGB color picker + brightness picker #### Settings: * **SPLIT**: Each of the parameters is sent directly to the Pin on your hardware \(e.g D7\). You don't need to write any code. **NOTE:** In this mode you send multiple commands from one widget, which can reduce performance of your hardware. Example: If you have a zeRGBa Widget and it's set to D1, D2, D3 it will send 3 commands over the Internet: ```cpp digitalWrite(1, r); digitalWrite(2, g); digitalWrite(3, b); ``` * **MERGE**: When MERGE mode is selected, you send 1 message with an array of values inside. You would need to parse the message on the hardware. This mode can be used with Virtual Pins only. Example: Add a zeRGBa Widget and set it to MERGE mode. Choose Virtual Pin V1. ```cpp BLYNK_WRITE(V1) // zeRGBa assigned to V1 { // get a RED channel value int r = param[0].asInt(); // get a GREEN channel value int g = param[1].asInt(); // get a BLUE channel value int b = param[2].asInt(); } ``` ### Step Control Step Control is used to set granular values with a given step 2 buttons are assigned to 1 pin. One button increments the value, another one decrements it. **Send Step** option allows you to send step value to hardware instead of actual value of step widget. **Loop value** option allows you to reset step widget to start value when maximum value is reached. **Sketch:** [Basic Sketch](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/BlynkBlink/BlynkBlink.ino) ## Displays ### Value Display Displays incoming data. ![](.gitbook/assets/display.png) ![](.gitbook/assets/display_edit.png) **Sketch:** [BlynkBlink](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/BlynkBlink/BlynkBlink.ino) ### Labeled Value Displays incoming data in a formatted wayt. It is a better version of 'Value Display' where you can add suffixes and prefixes on the app side, with no coding on the hardware. ![](.gitbook/assets/display.png) ![](.gitbook/assets/labeled_value_edit.png) **Sketch:** [BlynkBlink](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/BlynkBlink/BlynkBlink.ino) #### Formatting options For example: your sensor sends vaule of 12.6789 to Blynk application. Next formatting options are supported: `/pin/` - displays the value without formatting \(12.6789\) `/pin./` - displays the rounded value without decimal part \(13\) `/pin.#/` - displays the value with 1 decimal digit \(12.7\) `/pin.##/` - displays the value with two decimal places \(12.68\) ![](.gitbook/assets/labeled_value_format_edit.png) ### LED A simple LED for indication. You need to send 0 in order to turn LED off. And 255 in order to turn LED on. Or just use Blynk API as described below: ```cpp WidgetLED led1(V1); //register to virtual pin 1 led1.off(); led1.on(); ``` All values between 0 and 255 will change LED brightness: ```cpp WidgetLED led2(V2); led2.setValue(127); //set brightness of LED to 50%. ``` ![](.gitbook/assets/led.png) **Sketch:** [LED](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/LED/LED_Blink/LED_Blink.ino) ### Gauge Visual display of numeric values. ![](.gitbook/assets/gauge.png) ![](.gitbook/assets/gauge_edit.png) **Sketch:** [BlynkBlink](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/BlynkBlink/BlynkBlink.ino) #### Formatting options For example: your sensor sends vaule of 12.6789 to Blynk application. Next formatting options are supported: `/pin/` - displays the value without formatting \(12.6789\) `/pin./` - displays the rounded value without decimal part \(13\) `/pin.#/` - displays the value with 1 decimal digit \(12.7\) `/pin.##/` - displays the value with two decimal places \(12.68\) ### LCD This is a regular 16x2 LCD display made in our secret facility in China. #### SIMPLE / ADVANCED MODE #### Commands You need to use special commands with this widget: ```text lcd.print(x, y, "Your Message"); ``` Where x is a symbol position \(0-15\), y is a line id \(0 or 1\), ```text lcd.clear(); ``` ![](.gitbook/assets/lcd.png) ![](.gitbook/assets/lcd_edit.png) **Sketch:** [LCD Advanced Mode](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/LCD/LCD_AdvancedMode/LCD_AdvancedMode.ino) **Sketch:** [LCD Simple Mode Pushing](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/LCD/LCD_SimpleModePushing/LCD_SimpleModePushing.ino) **Sketch:** [LCD Simple Mode Reading](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/LCD/LCD_SimpleModeReading/LCD_SimpleModeReading.ino) #### Formatting options For example: your sensor sends vaule of 12.6789 to Blynk application. Next formatting options are supported: `/pin/` - displays the value without formatting \(12.6789\) `/pin./` - displays the rounded value without decimal part \(13\) `/pin.#/` - displays the value with 1 decimal digit \(12.7\) `/pin.##/` - displays the value with two decimal places \(12.68\) ![](.gitbook/assets/lcd_format_edit.png) ### SuperChart SuperChart is used to visualise live and historical data. You can use it for sensor data, for binary event logging and more. To use SuperChart widget you would need to push the data from the hardware with the desired interval by using timers. [Here is](https://examples.blynk.cc/?board=ESP8266&shield=ESP8266%20WiFi&example=GettingStarted%2FPushData) a basic example for data pushing. #### Interactions: * **Switch between time ranges and Live mode** </br>Tap time ranges at the bottom of the widget to change time ranges * **Tap Legend Elements** to show or hide datastreams </br> * **Tap'n'hold to view timestamp and corresponding values** ![](.gitbook/assets/tapnhold_charts.png) * **Quick swipe from left to right to reveal previous data** ![](.gitbook/assets/swipe_charts.png) Then you can then scroll data back and forward within the given time range. * **Full Screen Mode**</br> Press this button to open Full Screen view in landscape orientation: ![](.gitbook/assets/fullscreen_charts.png) Simply rotate the phone back to portrait mode. Chart should rotate automagically. In full screen view you will see X \(time\) and multiple Y scales. Full Screen Mode can be disabled from widget Settings. * **Menu Button**</br> Menu button will open additional functions: * Export to CSV * Erase Data on the server ![](.gitbook/assets/menu_charts.png) #### SuperChart Settings: * Chart Title * Title Font Size You have a choice of 3 font sizes * Title Alignment Choose chart title alignment. This setting also affects Title and Legend position on the Widget. * Show x-axis \(time\) Select it if you want to show the time label at the bottom of your chart. * Time ranges picker Allows you to select required periods \(`15m`, `30m`, `1h`, `3h`, ...\) and resolution for your chart. Resolution defines how precise your data is. Right now chart supports 2 types of resolution `standard` and `high`. Resolution also depends on the selected period. For example, `standard` resolution for `1d` means you'll get 24 points per day \(1 per hour\), with `high` resolution you'll get for `1d` 1440 points per day \(1 per minute\). * Datastreams - add datastreams \(read below how to configure datastreams\) #### Datastream Settings Widget supports up to 4 Datastreams. Press Datastream Settings Icon to open Datastream Settings. ![](.gitbook/assets/datastream_charts.png) **Design:** Choose available types of Chart: * Line * Area * Bar * Binary \(anchor LINK to binary\) **Color:** Choose solid colors or gradients **Source and input:** You can use 3 types of Data source: **1. Virtual Pin** Choose the desired Device and Virtual Pin to read the data from. **2. Tags** SuperChart can aggregate data from multiple devices using built-in aggregation functions. For example, if you have 10 Temperature sensors sending temperature with the given period, you can plot average value from 10 sensors on the widget. To use Tags: * [**Add Tag**](./#blynk-main-operations-control-of-multiple-devices-tags) to every device you want to aggregate data from. * **Push data to the same Virtual Pin** on every device. \(e.g. `Blynk.virtualWrite (V0, temperature);`\) * **Choose Tag as a source** in SuperChart Widget and use the pin where the data is coming to \(e.g V0\) **Functions available:** * **SUM**, will summarize all incoming values to the specified Virtual Pin across all devices tagged with the chosen tag * **AVG**, will plot average value * **MED**, will find a median value * **MIN**, will plot minimum value * **MAX** will plot maximum value **☝️ IMPORTANT: Tags are not working in Live Mode.** 1. [**Device Selector**](./#widgets-time-input-device-selector) If you add Device Selector Widget to your project, you can use it as a source for SuperChart. In this case, when you change the device in Device Selector, chart will be updated accordingly **Y-Axis Settings** There are 4 modes of how to scale data along the Y axis 1. _Auto_ Data will be auto-scaled based on min and max values of the given time period. This is nice option to start with. 2. **Values** When this mode is selected, Y scale will be set to the values you choose. For example, if your hardware sends data with values varying from -100 to 100, you can set the chart to this values and data will be rendered correctly. ![](.gitbook/assets/yScale_manual_charts.png) You may also want to visualize the data within some specific range. Let's say incoming data has values in the range of 0-55, but you would like to see only values in the range 30-50. You can set it up and if values are out of Y scale you configured, chart will be cropped 1. **% of Height** This option allows you to auto-scale incoming data on the widget and position it the way you want. In this mode, you set up the percentage of widget height on the screen, from 0% to 100%. ![](.gitbook/assets/yheight2_charts.png) If you set 0-100%, in fact it's a full auto-scale. No matter in which range the data is coming, it will be always scaled to the whole height of the widget. If you set it to 0-25%, then this chart will only be rendered on 1/4 of the widget height: ![](.gitbook/assets/yheight2_manual_charts.png) This setting is very valuable for **Binary Chart** or for visualizing a few datastreams on the same chart in a different way. ![](.gitbook/assets/binary_charts.png) 1. _Delta_ While data stays within the given Delta value, chart will be auto-scaled within this range. If delta exceeds the range, chart will be auto-scaled to min/max values of the given period. **Suffix:** Here you can specify a suffix that will be shown during the Tap'n'hold **Decimals** Defines the formatting of the graph value when you Tap'n'hold the graph. Possible options are: \#, \#.\#, \#.\#\#, etc. **Connect Missing Data Points** If this switch is ON, then SuperChart will connect all the dots even if there was no data ![](.gitbook/assets/datapoints1_charts.png) If it's set to OFF, then you will see gaps in case there was no data. ![](.gitbook/assets/datapoints2_charts.png) **Binary Chart Settings** This type of chart is useful to plot binary data, for example when unit was ON or OFF, or when motion was detected or when certain threshold was reached. You need to specify a **FLIP** point, which is the point where incoming data will be turned into TRUE or FALSE state. For example, you send the data in the range of `0 to 1023`. If you set `512` as a **FLIP** point, then everything above `512` \(excluding 512\) will be recorded as `TRUE`, any value below `512` \(including 512\) will be `FALSE`. Another example, if you send `0 and 1` and set `0` as a **FLIP** point, then `1` will be `TRUE`, `0` will be `FALSE` **State Labels:** Here you can specify how `TRUE/FALSE` should be shown in Tap'n'Hold mode. For example, you can set to `TRUE` to "Equipment ON" label, `FALSE` to "Equipment OFF". ![](.gitbook/assets/binarylabel_charts.png) Superchart supports currently 2 types of granularity: * Minute granularity - `1h`, `6h`, `1d`; * Hour granularity - `1w`, `1m`, `3m`; This means that minimum chart update interval is 1 minute for `1h`, `6h`, `1d` periods. 1 hour for `1w`, `1m` and `3m` periods. As Blynk Cloud is free to use we have a limit on how many data you can store. At the moment Blynk Cloud accepts 1 message per minute per pin. In case you send your data more frequently your values will be averaged. For example, in case you send value `10` at 12:12:05 and than again `12` at 12:12:45 as result in chart you'll see value `11` for 12:12. In order to see data in chart you need to use either widgets with "Frequency reading" interval \(in that case your app should be open and running\) or you can use `Blynk.virtualWrite` on hardware side. Every `Blynk.virtualWrite` command is stored on server automatically. In that case you don't need application to be up and running. ### Terminal Displays data from your hardware. Allows to send any string to your hardware. Terminal always stores last 25 messages your hardware had send to Blynk Cloud. This limit may be increased on Local Server with `terminal.strings.pool.size` property. You need to use special commands with this widget: ```cpp terminal.print(); // Print values, like Serial.print terminal.println(); // Print values, like Serial.println() terminal.write(); // Write a raw data buffer terminal.flush(); // Ensure that data was sent out of device terminal.clear(); // Erase all values in the terminal ``` ![](.gitbook/assets/terminal.png) ![](.gitbook/assets/terminal_edit.png) **Sketch:** [Terminal](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Terminal/Terminal.ino) ### Video Streaming Simple widget that allows you to display any live stream. Widget supports RTSP \(RP, SDP\), HTTP/S progressive streaming, HTTP/S live streaming. For more info please follow [official Android documentation](https://developer.android.com/guide/appendix/media-formats.html). At the moment Blynk doesn't provide streaming servers. So you can either stream directly from camera, use 3-d party services or host streaming server on own server \(on raspberry for example\). You can also change video url from hardware with: ```cpp Blynk.setProperty(V1, "url", "http://my_new_video_url"); ``` ### Level Display Level Display is very similar to progress bar, when you need to visualize a level betwen min/max value To update Level Display from hardware side with code: ```cpp Blynk.virtualWrite(V1, val); ``` Every message that hardware sends to server is stored automatically on server. PUSH mode doesn't require application to be online or opened. **Sketch:** [Push Example](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/PushData/PushData.ino) ## Notifications ### Twitter Twitter widget connects your Twitter account to Blynk and allows you to send Tweets from your hardware. ![](.gitbook/assets/TwitterON.png) Example code: ```cpp Blynk.tweet("Hey, Blynkers! My Arduino can tweet now!"); ``` Limitations: * you cant' send 2 tweets with same message \(it's Twitter policy\) * only 1 tweet per 5 seconds is allowed **Sketch:** [Twitter](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Twitter/Twitter.ino) ### Email Email widget allows you to send email from your hardware to any address. Example code: ```cpp Blynk.email("my_email@example.com", "Subject", "Your message goes here"); ``` It also contains `to` field. With this field you may define receiver of email in the app. You may skip `to` field when you want to send email to your Blynk app login email: ```cpp Blynk.email("Subject", "Your message goes here"); ``` You can send either `text/html` or `text/plain` \(some clients don't support `text/html`\) email. You can change this content type of email in the Mail widget settings. Additionally you may use `{DEVICE_NAME}`, `{DEVICE_OWNER_EMAIL}` and `{VENDOR_EMAIL}` \(for the local server\) placeholders in the mail for the `to`, `subject` and `body` fields: ```cpp Blynk.email("{DEVICE_OWNER_EMAIL}", "{DEVICE_NAME} : Alarm", "Your {DEVICE_NAME} has critical error!"); ``` ![](.gitbook/assets/mail.png) Limitations: * Maximum allowed email + subject + message length is 120 symbols. However you can increase this limit if necessary by adding `#define BLYNK_MAX_SENDBYTES XXX` to you sketch. Where `XXX` is desired max length of your email. For example for ESP you can set this to 1200 max length `#define BLYNK_MAX_SENDBYTES 1200`. The `#define BLYNK_MAX_SENDBYTES 1200` must be included before any of the Blynk includes. * Only 1 email per 5 seconds is allowed * In case you are using gmail on the Local Server you are limited with 500 mails per day \(by google\). Other providers may have similar limitations, so please be careful. * User is limited with 100 messages per day in the Blynk Cloud; **Sketch:** [Email](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Email/Email.ino) ### Push Notifications Push Notification widget allows you to send push notification from your hardware to your device. Currently it also contains 2 additional options: * **Notify when hardware offline** - you will get push notification in case your hardware went offline. * **Offline Ignore Period** - defines how long hardware could be offline \(after it went offline\) before sending notification. In case period is exceeded - "hardware offline" notification will be send. You will get no notification in case hardware was reconnected within specified period. * **Priority** high priority gives more chances that your message will be delivered without any delays. See detailed explanation [here](https://developers.google.com/cloud-messaging/concept-options#setting-the-priority-of-a-message). **WARNING**: high priority contributes more to battery drain compared to normal priority messages. ![](.gitbook/assets/push.png) Example code: ```cpp Blynk.notify("Hey, Blynkers! My hardware can push now!"); ``` You can also use placeholder for device name, that will be replaced on the server with your device name: ```cpp Blynk.notify("Hey, Blynkers! My {DEVICE_NAME} can push now!"); ``` Limitations: * Maximum allowed body length is 120 symbols; * Every device can send only 1 notification every 5 seconds; **Sketch:** [PushNotification](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/PushNotification/PushNotification_Button/PushNotification_Button.ino) ### Unicode in notify, email, push, ... The library handles all strings as UTF8 Unicode. If you're facing problems, try to print your message to the Serial and see if it works \(the terminal should be set to UTF-8 encoding\). If it doesn't work, probably you should read about unicode support of your compiler. If it works, but your message is truncated - you need to increase message length limit \(all Unicode symbols consume at least twice the size of Latin symbols\). ### Increasing message length limit You can increase maximum message length by putting on the top of your sketch \(before Blynk includes\): ```cpp #define BLYNK_MAX_SENDBYTES 256 // Default is 128 ``` ## Interface ### Tabs The only purpose of Tabs widget is to extend your project space. You can have up to 4 tabs. Also you can drag widgets between tabs. Just drag widget on the label of required tab of tabs widget. ![](.gitbook/assets/tabs_settings.png) ### Menu Menu widget allows you to send command to your hardware based on selection you made on UI. Menu sends index of element you selected and not label string. Sending index is starts from 1. It works same way as usual ComboBox element. You can also set Menu items [from hardware side](./#blynk-main-operations-change-widget-properties). ![](.gitbook/assets/menu_edit.png) Example code: ```text switch (param.asInt()) { case 1: { // Item 1 Serial.println("Item 1 selected"); break; } case 2: { // Item 2 Serial.println("Item 2 selected"); break; } } ``` **Sketch:** [Menu](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Menu/Menu.ino) ### Time Input Time input widget allows you to select start/stop time, day of week, timezone, sunrise/sunset formatted values and send them to your hardware. Supported formats for time now are `HH:MM` and `HH:MM AM/PM`. Hardware will get selected on UI time as seconds of day \(`3600 * hours + 60 * minutes`\) for start/stop time. Time that widget sends to hardware is user local time. Selected days indexes: ```text Monday - 1 Tuesday - 2 ... Saturday - 6 Sundays - 7 ``` You can also change state of widget on UI. See below sketches. **Sketch:** [Simple Time Input for start time](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/TimeInput/SimpleTimeInput/SimpleTimeInput.ino) **Sketch:** [Advanced Time Input](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/TimeInput/AdvancedTimeInput/AdvancedTimeInput.ino) **Sketch:** [Update Time Input State on UI](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/TimeInput/UpdateTimeInputState/UpdateTimeInputState.ino) ### Map Map widget allows you set points/pins on map from hardware side. This is very useful widget in case you have multiple devices and you want track their values on map. You can send a point to map with regular virtual wrtei command: ```cpp Blynk.virtualWrite(V1, pointIndex, lat, lon, "value"); ``` We also created wrapper for you to make suage of map simpler: You can change button labels from hardware with: ```cpp WidgetMap myMap(V1); ... int index = 1; float lat = 51.5074; float lon = 0.1278; myMap.location(index, lat, lon, "value"); ``` Using save `index` allows you to override existing point value. **Sketch:** [Basic Sketch](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Map/Map.ino) ### Table Table widget comes handy when you need to structure similar data within 1 graphical element. It works as a usual table. You can add a row to the table with: ```text Blynk.virtualWrite(V1, "add", id, "Name", "Value"); ``` You can update a row in the table with: ```text Blynk.virtualWrite(V1, "update", id, "UpdatedName", "UpdatedValue"); ``` To highlight any item in a table by using it's id in a table: ```text Blynk.virtualWrite(V1, "pick", 0); ``` To select/deselect \(make icon green/grey\) item in a table by using it's row id in a table: ```text Blynk.virtualWrite(V1, "select", 0); Blynk.virtualWrite(V1, "deselect", 0); ``` To clear the table at any time with: ```text Blynk.virtualWrite(V1, "clr"); ``` You can also handle other actions coming from table. For example, use row as a switch button. ```text BLYNK_WRITE(V1) { String cmd = param[0].asStr(); if (cmd == "select") { //row in table was selected. int rowId = param[1].asInt(); } if (cmd == "deselect") { //row in table was deselected. int rowId = param[1].asInt(); } if (cmd == "order") { //rows in table where reodered int oldRowIndex = param[1].asInt(); int newRowIndex = param[2].asInt(); } } ``` **Note:** Max number of rows in the table is 100. When you reach the limit, table will work as FIFO \(First In First Out\) list. This limit can be changed by configuring `table.rows.pool.size` property for Local Server. **Sketch:** [Simple Table usage](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Table/Table_Simple/Table_Simple.ino) **Sketch:** [Advanced Table usage](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Table/Table_Advanced/Table_Advanced.ino) ### Device Selector Device selector is a powerful widget which allows you to update widgets based on one active device. This widget is particlularly helpful when you have a fleet of devices with similar functionality. Imagine you have 4 devices and every device has a Temperature & Humidity sensor connected to it. To display the data for all 4 devices you would need to add 8 widgets. With Device Selector, you can use only 2 Widgets which will display Temperature and Humidity based on the active device chosen in Device Selector. All you have to do is: 1. Add Device Selector Widget to the project 2. Add 2 widgets \(for example Value Display Widget\) to show Temperature and Humidity 3. In Widgets Settings you will be able assign them to Device Selector \(Source or Target section\) 4. Exit settings, Run the project. Now you can change the active device in Device Selector and you will see that Temperature and Humidity values are reflecting the data updates for the device you just picked. **NOTE:** Webhook Widget will not work with Device Selector \(yet\). ### Device Tiles Device tiles is a powerful widget and very similar to the device selector widget, but with UI. It allows you to display 1 pin per device per tile. This widget is particularly helpful when you have a fleet of devices with similar functionality. So you can group similar devices within one layout \(template\). ## Sensors ### Accelerometer Accelerometer is kind of [motion sensors](https://developer.android.com/guide/topics/sensors/sensors_motion.html) that allows you to detect motion of your smartphone. Useful for monitoring device movement, such as tilt, shake, rotation, or swing. Conceptually, an acceleration sensor determines the acceleration that is applied to a device by measuring the forces that are applied to the sensor. Measured in `m/s^2` applied to `x`, `y`, `z` axis. In order to accept data from it you need to: ```cpp BLYNK_WRITE(V1) { //acceleration force applied to axis x int x = param[0].asFloat(); //acceleration force applied to axis y int y = param[1].asFloat(); //acceleration force applied to axis y int z = param[2].asFloat(); } ``` Accelerometer doesn't work in background. ### Barometer/pressure Barometer/pressure is kind of [environment sensors](https://developer.android.com/guide/topics/sensors/sensors_environment.html) that allows you to measure the ambient air pressure. Measured in in `hPa` or `mbar`. In oder to accept data from it you need to: ```cpp BLYNK_WRITE(V1) { //pressure in mbar int pressure = param[0].asInt(); } ``` Barometer doesn't work in background. ### Gravity Gravity is kind of [motion sensors](https://developer.android.com/guide/topics/sensors/sensors_motion.html) that allows you to detect motion of your smartphone. Useful for monitoring device movement, such as tilt, shake, rotation, or swing. The gravity sensor provides a three dimensional vector indicating the direction and magnitude of gravity. Measured in `m/s^2` of gravity force applied to `x`, `y`, `z` axis. In oder to accept data from it you need to: ```cpp BLYNK_WRITE(V1) { //force of gravity applied to axis x int x = param[0].asFloat(); //force of gravity applied to axis y int y = param[1].asFloat(); //force of gravity applied to axis y int z = param[2].asFloat(); } ``` Gravity doesn't work in background. ### Humidity Humidity is kind of [environment sensors](https://developer.android.com/guide/topics/sensors/sensors_environment.html) that allows you to measure ambient relative humidity. Measured in `%` - actual relative humidity in percent. In oder to accept data from it you need to: ```cpp BLYNK_WRITE(V1) { // humidity in % int humidity = param.asInt(); } ``` Humidity doesn't work in background. ### Light Light is kind of [environment sensors](https://developer.android.com/guide/topics/sensors/sensors_environment.html) that allows you to measure level of light \(measures the ambient light level \(illumination\) in lx\). In phones it is used to control screen brightness. In order to accept data from it you need to: ```cpp BLYNK_WRITE(V1) { //light value int lx = param.asInt(); } ``` Light doesn't work in background. ### Proximity Proximity is kind of [position sensors](https://developer.android.com/guide/topics/sensors/sensors_position.html) that allows you to determine how close the face of a smartphone is to an object. Measured in `cm` - distance from phone face to object. However most of this sensors returns only FAR / NEAR information. So return value will be `0/1`. Where 0/LOW is `FAR` and 1/HIGH is `NEAR`. In order to accept data from it you need to: ```cpp BLYNK_WRITE(V1) { // distance to object int proximity = param.asInt(); if (proximity) { //NEAR } else { //FAR } } ``` Proximity doesn't work in background. ### Temperature Temperature is kind of [environment sensors](https://developer.android.com/guide/topics/sensors/sensors_environment.html) that allows you to measure ambient air temperature. Measured in `°C` - celcius. In order to accept data from it you need to: ```cpp BLYNK_WRITE(V1) { // temperature in celcius int celcius = param.asInt(); } ``` Temperature doesn't work in background. ### GPS Trigger GPS trigger widget allows easily trigger events when you arrive to or leave from some destination. This widget will work in background and periodically will check your coordinates. In case your location is within/out required radius \(selected on widget map\) widget will send `HIGH`/`LOW` command to hardware. For example, let's assume you have GPS Trigger widget assigned to pin `V1` and option `Trigger When Enter`. In that case when you'll arrive to destination point widget will trigger `HIGH` event. ```cpp BLYNK_WRITE(V1) { int state = param.asInt(); if (state) { //You enter destination } else { //You leave destination } } ``` More details on how GPS widget works you can read [here](https://developer.android.com/guide/topics/location/strategies.html). GPS trigger widget works in background. ### GPS Streaming Useful for monitoring smartphone location data such as latitude, longitude, altitude and speed \(speed could be often 0 in case smartphone doesn't support it\). In order to accept data from this widget you need to: ```cpp BLYNK_WRITE(V1) { float latitude = param[0].asFloat(); float longitude = param[1].asFloat(); float altitude = param[2].asFloat(); float speed = param[3].asFloat(); } ``` or you can use prepared wrapper `GpsParam`: ```cpp BLYNK_WRITE(V1) { GpsParam gps(param); // Print 6 decimal places for Lat Serial.println(gps.getLat(), 7); Serial.println(gps.getLon(), 7); Serial.println(gps.getAltitude(), 2); Serial.println(gps.getSpeed(), 2); } ``` GPS Streaming works in background. **Sketch:** [GPS Stream](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/GPS_Stream/GPS_Stream.ino) ## Other ### Bridge Bridge can be used for Device-to-Device communication \(no app. involved\). You can send digital/analog/virtual write commands from one device to another, knowing it's auth token. At the moment Bridge widget is not required on application side \(it is mostly used for indication that we have such feature\). **You can use multiple bridges to control multiple devices.** ![](.gitbook/assets/bridge.png) Bridge widget takes a virtual pin, and turns it into a channel to control another device. It means you can control any virtual, digital or analog pins of the target device. Be careful not to use pins like `A0, A1, A2 ...` when communicating between different device types, as Arduino Core may refer to wrong pins in such cases. Example code for device A which will send values to device B: ```cpp WidgetBridge bridge1(V1); //Initiating Bridge Widget on V1 of Device A ... void setup() { Blynk.begin(...); while (Blynk.connect() == false) { // Wait until Blynk is connected } bridge1.digitalWrite(9, HIGH); // will trigger D9 HIGH on Device B. No code on Device B required bridge1.analogWrite(10, 123); bridge1.virtualWrite(V1, "hello"); // you need to write code on Device B in order to receive this value. See below bridge1.virtualWrite(V2, "value1", "value2", "value3"); } BLYNK_CONNECTED() { bridge1.setAuthToken("OtherAuthToken"); // Token of the hardware B } ``` **IMPORTANT:** when performing `virtualWrite()` with Bridge Widget, Device B would need to process the incoming data from Device A. For example, if you are sending value from Device A to Device B using `bridge.virtualWrite(V5)` you would need to use this handler on Device B: ```cpp BLYNK_WRITE(V5){ int pinData = param.asInt(); //pinData variable will store value that came via Bridge } ``` Keep in mind that `bridge.virtualWrite` doesn't send any value to mobile app. You need to call `Blynk.virtualWrite` for that. **Sketch:** [Bridge](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Bridge/Bridge.ino) ### Eventor Eventor widget allows you to create simple behaviour rules or **events**. Let's look at a typical use case: read temperature from DHT sensor and send push notification when the temperature is over a certain limit: ```cpp float t = dht.readTemperature(); if (isnan(t)) { return; } if (t > 40) { Blynk.notify(String("Temperature is too high: ") + t); } ``` With Eventor you don't need to write this code. All you need is to send the value from the sensor to the server: ```cpp float t = dht.readTemperature(); Blynk.virtualWrite(V0, t); ``` Don't forget that `virtualWrite` commands should be wrapped in the timer and can't be used in the main loop. Now configure new **Event** in Eventor widget: ![](.gitbook/assets/eventor_for_temp_example.png) **NOTE** Don't forget to add notification widget. Eventor comes handy when you need to change conditions on the fly without re-uploading new sketch on the hardware. You can create as many **events** as you need. Eventor also could be triggered from the application side. You just need to assign the widget to the same pin as your Event within Eventor. Eventor doesn't constantly sends events. Let's consider simple event as above `if (temperature > 40) send notification`. When temperature goes beyond 40 threshold - notification action is triggered. If temperature continues to stay above the 40 threshold no actions will be triggered. But if `temperature` goes below threshold and then passes it again - notification will be sent again \(there is no 5 sec limit on Eventor notifications\). Eventor also supports Timer events. For example, you can set a pin `V1` ON/HIGH at 21:00:00 every Friday. With Eventor Time Event you can assign multiple timers on same pin, send any string/number, select days and timezone. In order to remove created **event** please use swipe. You can also swipe out last element in the Event itself. **NOTE:** The timer widget rely on the server time and not your phone time. Sometimes the phone time may not match the server time. **NOTE:** Events are triggered only once when the condition is met. That's mean [chaining of events](https://community.blynk.cc/t/eventor-behavior-bug-feature/20962) is not possible \(however, could be enabled for commercials\). ![](.gitbook/assets/eventor_edit.png) **Sketch:** [Eventor](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Eventor/Eventor.ino) **NOTE:**: Events are triggered only once when the condition is met. Exception: Let's consider simple event as above `if (temperature > 40) send notification`. When temperature goes beyond 40 threshold - notification action is triggered. If temperature continues to stay above the 40 threshold no actions will be triggered. But if `temperature` goes below threshold and then passes it again - notification will be sent again \(there is no 5 sec limit on Eventor notifications\). ### RTC Real-time clock allows you to get time from server. You can preselect any timezone on UI to get time on hardware in required locale. No pin required for RTC widget. ![](.gitbook/assets/rtc_edit.png) **Sketch:** [RTC](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/RTC/RTC.ino) ### BLE Widget to enable Bluetooth Low Energy support. At the moment BLE widget requires internet connection in order to login and load your profile. However this will be fixed soon. Also some Blynk widgets are not supported within the BLE connection. Blynk currently supports a handful of different BLE modules. Please check sketches below. **Sketches:** [BLE](https://github.com/blynkkk/blynk-library/tree/master/examples/Boards_Bluetooth) ### Bluetooth Widget to enable Bluetooth support. At the moment Bluetooth widget is supported only on Android and requires internet connection to login and to load your profile. This will be fixed soon. Alsom some Blynk widgets do not work within the Bluetooth connection. Blynk currently supports bunch of different modules. Please check sketches below. **Sketches:** [Bluetooth](https://github.com/blynkkk/blynk-library/tree/master/examples/Boards_Bluetooth) ### Music Player Simple UI element with 3 buttons with common music player controls. Every button sends it's own command to hardware: `play`, `stop`, `prev`, `next`. You can change widget state within the app from hardware side with next commands: ```text Blynk.virtualWrite(Vx, “play”); Blynk.virtualWrite(Vx, “stop”); ``` You can also change widget play/stop state with next code \(equivalent to above commands\): `Blynk.setProperty(V1, "isOnPlay", "false");` **Sketch:** [Music Player](https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/Player/Player.ino) ### Webhook Webhook is a widget designed to communicate with 3rd party services. With Webhook widget you can send HTTP\(S\) requests to any 3rd party service or device that has HTTP\(S\) API \(e.g. Philips Hue bulb\). You can trigger 3-d party service with a single click of a button. Any `write` operation from hardware side will trigger Webhook Widget. You can also trigger webhook from Blynk app when a app widget is assigned to the same pin as Webhook. For example, when you need to send data from your hardware not only to Blynk, but also to Thingspeak, you would need to write a long http request code like this \(this is just an example, not a full sketch\): ```text WiFiClient client; if (client.connect("api.thingspeak.com", 80)) { client.print("POST /update HTTP/1.1\n"); client.print("Host: api.thingspeak.com\n"); client.print("Connection: close\n"); client.print("X-THINGSPEAKAPIKEY: " + apiKeyThingspeak1 + "\n"); client.print("Content-Type: application/x-www-form-urlencoded\n"); client.print("Content-Length: "); client.print(postStr.length()); client.print("\n\n"); client.print(postStr); } ``` Instead, with Webhook widget you would only need to fill in these fields: ![](.gitbook/assets/webhook_settings.png) And add this code on hardware side: ```text Blynk.virtualWrite(V0, value); ``` where `V0` is pin assigned to the Webhook widget. Use standard Blynk placeholders for Pin Value in the body or URL, for example: ```text https://api.thingspeak.com/update?api_key=xxxxxx&field1=/pin/ ``` or for the body ```text ["/pin/"] ``` When you need to send an array of values, you can refer to a specific index of the array value. Blynk Pin can hold an array of max 10 values: `/pin[0]/`,`/pin[1]/`, `/pin[2]/` You can also make GET requests from Blynk Server and get responses directly to your hardware. For example, to get current weather from a 3rd party Weather service that uses an URL similar to this: `http://api.sunrise-sunset.org/json?lat=33.3823&lng=35.1856&date=2016-10-01`, you would need to put this URL in Webhook widget and assign it to `V0` pin. To parse the response on the hardware side: ```text BLYNK_WRITE(V0){ String webhookdata = param.asStr(); Serial.println(webhookdata); } ``` Now, every time there is a "write" command to `V0` pin \(e.g. with `Blynk.virtualWrite(V0, 1)` from hardware or from app widget assigned to `V0`\), `BLYNK_WRITE(V0)` construction will be triggered and processed. **NOTE:** Usually, 3rd party servers return long responses. You have to increase the maximum allowed message size your hardware can process. Modify this line in your firmware code: `#define BLYNK_MAX_READBYTES 1024`. Where `1024` - is maximum allowed message size. **NOTE:** Blynk Cloud has limitation for Webhook Widget - you can only send 1 request per second. This can be changed on a Local Server by changing `webhooks.frequency.user.quota.limit`. Be careful with Webhooks, as many 3rd party services can't handle 1 req/sec, and you can be banned on some of them. For example, Thingspeak allows only 1 request per 15 seconds. **NOTE:** To avoid spamming, Blynk Webhook feature has another limitation - if your Webhook requests fail 10 times in a row, Webhook Widget will be stopped. To resume it, you would need to open Widget Settings and re-save it. Failed request is a request that doesn't return `200` or `302`. **NOTE:** Webhook widget may affect `Blynk.syncAll()` function when a returned response is large. ### Reports Widget Function of Reports is to configure and customize data reports in CSV format. You can choose between one-time or continuous scheduled reports. Also, within the Reports you can clear all the data collected by your devices. You need to configure initial inputs in Edit mode, and then, in Play mode you will be able to customize reports. #### Edit mode. Data inputs configuration In edit mode \(when your project is stopped\) you define the Datastreams you would like to later be included in reports. Reports widget is designed to work with the Device Tiles widget. If you don't use Device Tiles you can still select a single device or a group of devices as a source of data for reports. You have to choose either Device Tiles or single / group of the devices for the report. You can't combine these 2 options. #### Play mode. After you added source devices and their Datastreams click Play button and click on the Reports button. ### Customizing Reports. Every Report option supposes it's own settings: `Report name` - give your report a meaningful name. `Data source` - select the Datastreams you would like to be included in reports. `Report Frequency` - Defines how often reports will be sent. They can be one-time and scheduled. `one-time` - will instantly generate report and send it to the email addresses specified. Click on the right icon to send it. Scheduled reports can be sent `daily`/`weekly`/`monthly`. `At Time` will set up a time of the day the report will be sent. `Start`/`End` specifies start and end date the reports will continue to be sent. For Weekly Report you can select a day of the week when report should be sent. For Monthly report you can choose whether to send report on the first or last day of the month. `Recipients` - specify up to 5 email addresses. `Data resolution` defines granularity of your reports. Supported granularities are: `minute`, `hourly` and `daily`. For example, when you generate daily report with 1 minute granularity you'll get `24 * 60 * 60` points in your daily report for every selected Datastream. `Group data in reports by` - specify the output format of the CSV file\(s\). `Datastream` you will get 1 CSV file for each Datastream. `Device` you will get 1 CSV file per each device. Each file will contain all of the included Datastreams. `Report` you will get 1 CSV file for all your devices and all your Datastreams. `Timezone correction` - specify the time zone adjustment if you need to get report date and time adjusted to a specific time zone `Date and time format` - defines the format of the timestamp field of your data. You can select `2018-06-21 20:16:48`, `2018-06-21T20:16:48+03:00` or other supported formats. There is one specific `Timestamp` format - which reflects the difference between the current time and midnight, January 1, 1970 UTC measured in milliseconds. After the report is set up - click on "OK" button at the right upper corner. Your report is ready. Once you configured the report you will see when is the `Next` report scheduled and also a schedule for this report. After the report was sent at least once, you can see when the `Last` report was sent. `Last` label also contains the status regarding the report: * `OK`: the report was generated and sent to the Recipients successfully; * `No Data`: the report doesn't contain any data for the configured period; * `Error`: something went wrong. Please contact the Blynk Team support; Reports will be generated even if your project is not in active \(Play\) mode. However, inactive projects don't generate any data. **NOTE:** all reports are encoded in UTF-16. Please, make sure you selected UTF-16 as required "Character set" for your csv reader.