From aaf0ca210522303cbc9641c4de48a37ab393b198 Mon Sep 17 00:00:00 2001 From: jamespcole Date: Fri, 5 Jun 2015 22:51:29 +1000 Subject: [PATCH] Very simple IP Camera support --- homeassistant/components/camera/__init__.py | 263 ++ homeassistant/components/camera/generic.py | 174 ++ homeassistant/components/frontend/version.py | 2 +- .../frontend/www_static/frontend.html | 2668 +++++++++-------- .../polymer/dialogs/more-info-dialog.html | 26 +- .../polymer/more-infos/more-info-camera.html | 106 + .../polymer/more-infos/more-info-content.html | 2 + .../polymer/resources/home-assistant-js.html | 2 +- 8 files changed, 1985 insertions(+), 1258 deletions(-) create mode 100644 homeassistant/components/camera/__init__.py create mode 100644 homeassistant/components/camera/generic.py create mode 100644 homeassistant/components/frontend/www_static/polymer/more-infos/more-info-camera.html diff --git a/homeassistant/components/camera/__init__.py b/homeassistant/components/camera/__init__.py new file mode 100644 index 00000000000..b35b64a3c51 --- /dev/null +++ b/homeassistant/components/camera/__init__.py @@ -0,0 +1,263 @@ +# pylint: disable=too-many-lines +""" +homeassistant.components.camera +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Component to interface with various cameras. + +The following features are supported: +-Recording +-Snapshot +-Motion Detection Recording(for supported cameras) +-Automatic Configuration(for supported cameras) +-Creation of child entities for supported functions +-Collating motion event images passed via FTP into time based events +-Returning recorded camera images and streams +-Proxying image requests via HA for external access +-Converting a still image url into a live video stream +-A service for calling camera functions + +Upcoming features +-Camera movement(panning) +-Zoom +-Light/Nightvision toggling +-Support for more devices +-A demo entity +-Expanded documentation +""" +import requests +from requests.auth import HTTPBasicAuth +import logging +import time +import re +from homeassistant.helpers.entity import Entity +from homeassistant.const import ( + ATTR_ENTITY_PICTURE, + HTTP_NOT_FOUND, + ATTR_ENTITY_ID, + ) + +from homeassistant.helpers.entity_component import EntityComponent + + +DOMAIN = 'camera' +DEPENDENCIES = ['http'] +GROUP_NAME_ALL_CAMERAS = 'all_cameras' +SCAN_INTERVAL = 30 +ENTITY_ID_FORMAT = DOMAIN + '.{}' + +SWITCH_ACTION_RECORD = 'record' +SWITCH_ACTION_SNAPSHOT = 'snapshot' + +SERVICE_CAMERA = 'camera_service' + +STATE_RECORDING = 'recording' + +DEFAULT_RECORDING_SECONDS = 30 + +# Maps discovered services to their platforms +DISCOVERY_PLATFORMS = {} + +FILE_DATETIME_FORMAT = '%Y-%m-%d_%H-%M-%S-%f' +DIR_DATETIME_FORMAT = '%Y-%m-%d_%H-%M-%S' + +REC_DIR_PREFIX = 'recording-' +REC_IMG_PREFIX = 'recording_image-' + +STATE_STREAMING = 'streaming' +STATE_IDLE = 'idle' + + +# pylint: disable=too-many-branches +def setup(hass, config): + """ Track states and offer events for sensors. """ + + component = EntityComponent( + logging.getLogger(__name__), DOMAIN, hass, SCAN_INTERVAL, + DISCOVERY_PLATFORMS) + + component.setup(config) + + # ------------------------------------------------------------------------- + # CAMERA COMPONENT ENDPOINTS + # ------------------------------------------------------------------------- + # The following defines the endpoints for serving images from the camera + # via the HA http server. This is means that you can access images from + # your camera outside of your LAN without the need for port forwards etc. + + # Because the authentication header can't be added in image requests these + # endpoints are secured with session based security. + + # pylint: disable=unused-argument + def _proxy_camera_image(handler, path_match, data): + """ Proxies the camera image via the HA server. """ + entity_id = path_match.group(ATTR_ENTITY_ID) + + camera = None + if entity_id in component.entities.keys(): + camera = component.entities[entity_id] + + if camera: + response = camera.get_camera_image() + handler.wfile.write(response) + else: + handler.send_response(HTTP_NOT_FOUND) + + hass.http.register_path( + 'GET', + re.compile(r'/api/camera_proxy/(?P[a-zA-Z\._0-9]+)'), + _proxy_camera_image, + require_auth=True) + + # pylint: disable=unused-argument + def _proxy_camera_mjpeg_stream(handler, path_match, data): + """ Proxies the camera image as an mjpeg stream via the HA server. + This function takes still images from the IP camera and turns them + into an MJPEG stream. This means that HA can return a live video + stream even with only a still image URL available. + """ + entity_id = path_match.group(ATTR_ENTITY_ID) + + camera = None + if entity_id in component.entities.keys(): + camera = component.entities[entity_id] + + if camera: + + try: + camera.is_streaming = True + camera.update_ha_state() + + handler.request.sendall(bytes('HTTP/1.1 200 OK\r\n', 'utf-8')) + handler.request.sendall(bytes( + 'Content-type: multipart/x-mixed-replace; \ + boundary=--jpgboundary\r\n\r\n', 'utf-8')) + + handler.request.sendall(bytes('--jpgboundary\r\n', 'utf-8')) + + while True: + + if camera.username and camera.password: + response = requests.get( + camera.still_image_url, + auth=HTTPBasicAuth( + camera.username, + camera.password)) + else: + response = requests.get(camera.still_image_url) + + headers_str = '\r\n'.join(( + 'Content-length: {}'.format(len(response.content)), + 'Content-type: image/jpeg', + )) + '\r\n\r\n' + + handler.request.sendall( + bytes(headers_str, 'utf-8') + + response.content + + bytes('\r\n', 'utf-8')) + + handler.request.sendall( + bytes('--jpgboundary\r\n', 'utf-8')) + + except (requests.RequestException, IOError): + camera.is_streaming = False + camera.update_ha_state() + + else: + handler.send_response(HTTP_NOT_FOUND) + + camera.is_streaming = False + + hass.http.register_path( + 'GET', + re.compile( + r'/api/camera_proxy_stream/(?P[a-zA-Z\._0-9]+)'), + _proxy_camera_mjpeg_stream, + require_auth=True) + + +class Camera(Entity): + """ The base class for camera components """ + + @property + def is_recording(self): + """ Returns true if the device is recording """ + return False + + @property + def is_streaming(self): + """ Returns true if the device is streaming """ + return False + + @is_streaming.setter + def is_streaming(self, value): + """ Set this to true when streaming begins """ + pass + + @property + def brand(self): + """ Should return a string of the camera brand """ + return None + + @property + def model(self): + """ Returns string of camera model """ + return None + + @property + def base_url(self): + """ Return the configured base URL for the camera """ + return None + + @property + def image_url(self): + """ Return the still image segment of the URL """ + return None + + @property + def device_info(self): + """ Get the configuration object """ + return None + + @property + def username(self): + """ Get the configured username """ + return None + + @property + def password(self): + """ Get the configured password """ + return None + + @property + def still_image_url(self): + """ Get the URL of a camera still image """ + return None + + def get_camera_image(self): + """ Return bytes of camera image """ + raise NotImplementedError() + + @property + def state(self): + """ Returns the state of the entity. """ + if self.is_recording: + return STATE_RECORDING + elif self.is_streaming: + return STATE_STREAMING + else: + return STATE_IDLE + + @property + def state_attributes(self): + """ Returns optional state attributes. """ + attr = super().state_attributes + attr['model_name'] = self.device_info.get('model', 'generic') + attr['brand'] = self.device_info.get('brand', 'generic') + attr['still_image_url'] = '/api/camera_proxy/' + self.entity_id + attr[ATTR_ENTITY_PICTURE] = ( + '/api/camera_proxy/' + + self.entity_id + '?time=' + + str(time.time())) + attr['stream_url'] = '/api/camera_proxy_stream/' + self.entity_id + + return attr diff --git a/homeassistant/components/camera/generic.py b/homeassistant/components/camera/generic.py new file mode 100644 index 00000000000..8c7e3d72588 --- /dev/null +++ b/homeassistant/components/camera/generic.py @@ -0,0 +1,174 @@ +""" +Support for IP Cameras. + +This component provides basic support for IP camera models that do not have +a speicifc HA component. + +As part of the basic support the following features will be provided: +-MJPEG video streaming +-Saving a snapshot +-Recording(JPEG frame capture) + +NOTE: for the basic support to work you camera must support accessing a JPEG +snapshot via a URL and you will need to specify the "still_image_url" parameter +which should be the location of the JPEG snapshot relative to you specified +base_url. For example "snapshot.cgi" or "image.jpg". + +To use this component you will need to add something like the following to your +config/configuration.yaml + +camera: + platform: generic + base_url: http://YOUR_CAMERA_IP_AND_PORT/ + name: Door Camera + brand: dlink + family: DCS + model: DCS-930L + username: YOUR_USERNAME + password: YOUR_PASSWORD + still_image_url: image.jpg + + +VARIABLES: + +These are the variables for the device_data array: + +base_url +*Required +The base URL for accessing you camera +Example: http://192.168.1.21:2112/ + +name +*Optional +This parameter allows you to override the name of your camera in homeassistant + + +brand +*Optional +The manufacturer of your device, used to help load the specific camera +functionality. + +family +*Optional +The family of devices by the specified brand, useful when many models +support the same settings. This used when attempting load up specific +device functionality. + +model +*Optional +The specific model number of your device. + +still_image_url +*Optional +Useful if using an unsupported camera model. This should point to the location +of the still image on your particular camera and should be relative to your +specified base_url. +Example: cam/image.jpg + +username +*Required +THe username for acessing your camera + +password +*Required +the password for accessing your camera + + +""" +import logging +from homeassistant.const import CONF_USERNAME, CONF_PASSWORD +from homeassistant.helpers import validate_config +from homeassistant.components.camera import DOMAIN +from homeassistant.components.camera import Camera +import requests + +_LOGGER = logging.getLogger(__name__) + + +# pylint: disable=unused-argument +def setup_platform(hass, config, add_devices_callback, discovery_info=None): + """ Find and return Vera lights. """ + if not validate_config( + {DOMAIN: config}, + {DOMAIN: ['base_url', CONF_USERNAME, CONF_PASSWORD]}, + _LOGGER): + return None + + camera = GenericCamera(hass, config) + cameras = [camera] + + add_devices_callback(cameras) + + +# pylint: disable=too-many-instance-attributes +class GenericCamera(Camera): + """ + Base class for cameras. + This is quite a large class but the camera component encompasses a lot of + functionality. It should take care of most of the heavy lifting and + plumbing associated with adding support for additional models of camera. + If you are adding support for a new camera your entity class should inherit + from this. + """ + + def __init__(self, hass, device_info): + self.hass = hass + self._device_info = device_info + self._base_url = device_info.get('base_url') + if not self._base_url.endswith('/'): + self._base_url = self._base_url + '/' + self._username = device_info.get('username') + self._password = device_info.get('password') + self._is_streaming = False + self._still_image_url = device_info.get('still_image_url', 'image.jpg') + self._logger = logging.getLogger(__name__) + + def get_camera_image(self): + """ Return a still image reponse from the camera """ + response = requests.get( + self.still_image_url, + auth=(self._username, self._password)) + + return response.content + + @property + def device_info(self): + """ Return the config data for this device """ + return self._device_info + + @property + def name(self): + """ Return the name of this device """ + return self._device_info.get('name') or super().name + + @property + def state_attributes(self): + """ Returns optional state attributes. """ + attr = super().state_attributes + + return attr + + @property + def base_url(self): + return self._base_url + + @property + def username(self): + return self._username + + @property + def password(self): + return self._password + + @property + def is_streaming(self): + return self._is_streaming + + @is_streaming.setter + def is_streaming(self, value): + self._is_streaming = value + + @property + def still_image_url(self): + """ This should be implemented by different camera models. """ + return self.base_url + self._still_image_url diff --git a/homeassistant/components/frontend/version.py b/homeassistant/components/frontend/version.py index 4f30d388227..d47eb125209 100644 --- a/homeassistant/components/frontend/version.py +++ b/homeassistant/components/frontend/version.py @@ -1,2 +1,2 @@ """ DO NOT MODIFY. Auto-generated by build_frontend script """ -VERSION = "ed339673ca129a1a51dcc3975d0a492d" +VERSION = "24f15feebc48785ce908064dccbdb204" diff --git a/homeassistant/components/frontend/www_static/frontend.html b/homeassistant/components/frontend/www_static/frontend.html index 14bf41970f0..446985ade55 100644 --- a/homeassistant/components/frontend/www_static/frontend.html +++ b/homeassistant/components/frontend/www_static/frontend.html @@ -22,29 +22,32 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as part of the polymer project is also subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt ---> @@ -5872,115 +5885,114 @@ function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});va function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(/*! lodash */6),i=["ACTION_LOG_OUT","ACTION_VALIDATING_AUTH_TOKEN","ACTION_VALID_AUTH_TOKEN","ACTION_INVALID_AUTH_TOKEN","ACTION_FETCH_ALL","ACTION_NEW_CONFIG","ACTION_NEW_EVENTS","ACTION_NEW_SERVICES","ACTION_NEW_STATES","ACTION_NEW_STATE_HISTORY","ACTION_NEW_LOGBOOK","ACTION_NEW_NOTIFICATION","ACTION_SET_PREFERENCE","ACTION_EVENT_FIRED","ACTION_INITIAL_LOAD_DONE","ACTION_STREAM_START","ACTION_STREAM_STOP","ACTION_STREAM_ERROR","ACTION_REMOTE_EVENT_RECEIVED","ACTION_LISTENING_START","ACTION_LISTENING_TRANSMITTING","ACTION_LISTENING_DONE","ACTION_LISTENING_ERROR","ACTION_LISTENING_RESULT"];e["default"]=r.merge({REMOTE_EVENT_HOMEASSISTANT_START:"homeassistant_start",REMOTE_EVENT_HOMEASSISTANT_STOP:"homeassistant_stop",REMOTE_EVENT_STATE_CHANGED:"state_changed",REMOTE_EVENT_TIME_CHANGED:"time_changed",REMOTE_EVENT_CALL_SERVICE:"call_service",REMOTE_EVENT_SERVICE_EXECUTED:"service_executed",REMOTE_EVENT_PLATFORM_DISCOVERED:"platform_discovered",REMOTE_EVENT_SERVICE_REGISTERED:"service_registered",REMOTE_EVENT_COMPONENT_LOADED:"component_loaded",UNIT_TEMP_C:"°C",UNIT_TEMP_F:"°F"},r.zipObject(i,i)),t.exports=e["default"]},/*!*****************************!*\ !*** ./src/stores/store.js ***! \*****************************/ -function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},i=function(){function t(t,e){for(var n=0;ni;i++)r[i]=t[i+e];return r}function o(t){return void 0===t.size&&(t.size=t.__iterate(a)),t.size}function u(t,e){return e>=0?+e:o(t)+ +e}function a(){return!0}function s(t,e,n){return(0===t||void 0!==n&&-n>=t)&&(void 0===e||void 0!==n&&e>=n)}function c(t,e){return l(t,e,0)}function f(t,e){return l(t,e,e)}function l(t,e,n){return void 0===t?n:0>t?Math.max(0,e+t):void 0===e?t:Math.min(e,t)}function h(t){return d(t)?t:C(t)}function p(t){return y(t)?t:k(t)}function _(t){return g(t)?t:x(t)}function v(t){return d(t)&&!m(t)?t:M(t)}function d(t){return!(!t||!t[vn])}function y(t){return!(!t||!t[dn])}function g(t){return!(!t||!t[yn])}function m(t){return y(t)||g(t)}function w(t){return!(!t||!t[gn])}function b(t){this.next=t}function T(t,e,n,r){var i=0===t?e:1===t?n:[e,n];return r?r.value=i:r={value:i,done:!1},r}function E(){return{value:void 0,done:!0}}function O(t){return!!A(t)}function I(t){return t&&"function"==typeof t.next}function S(t){var e=A(t);return e&&e.call(t)}function A(t){var e=t&&(Tn&&t[Tn]||t[En]);return"function"==typeof e?e:void 0}function N(t){return t&&"number"==typeof t.length}function C(t){return null===t||void 0===t?P():d(t)?t.toSeq():W(t)}function k(t){return null===t||void 0===t?P().toKeyedSeq():d(t)?y(t)?t.toSeq():t.fromEntrySeq():q(t)}function x(t){return null===t||void 0===t?P():d(t)?y(t)?t.entrySeq():t.toIndexedSeq():U(t)}function M(t){return(null===t||void 0===t?P():d(t)?y(t)?t.entrySeq():t:U(t)).toSetSeq()}function D(t){this._array=t,this.size=t.length}function R(t){var e=Object.keys(t);this._object=t,this._keys=e,this.size=e.length}function j(t){this._iterable=t,this.size=t.length||t.size}function z(t){this._iterator=t,this._iteratorCache=[]}function L(t){return!(!t||!t[In])}function P(){return Sn||(Sn=new D([]))}function q(t){var e=Array.isArray(t)?new D(t).fromEntrySeq():I(t)?new z(t).fromEntrySeq():O(t)?new j(t).fromEntrySeq():"object"==typeof t?new R(t):void 0;if(!e)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+t);return e}function U(t){var e=G(t);if(!e)throw new TypeError("Expected Array or iterable object of values: "+t);return e}function W(t){var e=G(t)||"object"==typeof t&&new R(t);if(!e)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+t);return e}function G(t){return N(t)?new D(t):I(t)?new z(t):O(t)?new j(t):void 0}function V(t,e,n,r){var i=t._cache;if(i){for(var o=i.length-1,u=0;o>=u;u++){var a=i[n?o-u:u];if(e(a[1],r?a[0]:u,t)===!1)return u+1}return u}return t.__iterateUncached(e,n)}function K(t,e,n,r){var i=t._cache;if(i){var o=i.length-1,u=0;return new b(function(){var t=i[n?o-u:u];return u++>o?E():T(e,r?t[0]:u-1,t[1])})}return t.__iteratorUncached(e,n)}function $(){throw TypeError("Abstract")}function F(){}function H(){}function B(){}function J(t,e){if(t===e||t!==t&&e!==e)return!0;if(!t||!e)return!1;if("function"==typeof t.valueOf&&"function"==typeof e.valueOf){if(t=t.valueOf(),e=e.valueOf(),t===e||t!==t&&e!==e)return!0;if(!t||!e)return!1}return"function"==typeof t.equals&&"function"==typeof e.equals&&t.equals(e)?!0:!1}function Y(t,e){return e?X(e,t,"",{"":t}):Q(t)}function X(t,e,n,r){return Array.isArray(e)?t.call(r,n,x(e).map(function(n,r){return X(t,n,r,e)})):Z(e)?t.call(r,n,k(e).map(function(n,r){return X(t,n,r,e)})):e}function Q(t){return Array.isArray(t)?x(t).map(Q).toList():Z(t)?k(t).map(Q).toMap():t}function Z(t){return t&&(t.constructor===Object||void 0===t.constructor)}function tt(t){return t>>>1&1073741824|3221225471&t}function et(t){if(t===!1||null===t||void 0===t)return 0;if("function"==typeof t.valueOf&&(t=t.valueOf(),t===!1||null===t||void 0===t))return 0;if(t===!0)return 1;var e=typeof t;if("number"===e){var n=0|t;for(n!==t&&(n^=4294967295*t);t>4294967295;)t/=4294967295,n^=t;return tt(n)}return"string"===e?t.length>Rn?nt(t):rt(t):"function"==typeof t.hashCode?t.hashCode():it(t)}function nt(t){var e=Ln[t];return void 0===e&&(e=rt(t),zn===jn&&(zn=0,Ln={}),zn++,Ln[t]=e),e}function rt(t){for(var e=0,n=0;n0)switch(t.nodeType){case 1:return t.uniqueID;case 9:return t.documentElement&&t.documentElement.uniqueID}}function ut(t,e){if(!t)throw new Error(e)}function at(t){ut(t!==1/0,"Cannot perform this action with an infinite size.")}function st(t,e){this._iter=t,this._useKeys=e,this.size=t.size}function ct(t){this._iter=t,this.size=t.size}function ft(t){this._iter=t,this.size=t.size}function lt(t){this._iter=t,this.size=t.size}function ht(t){var e=Dt(t);return e._iter=t,e.size=t.size,e.flip=function(){return t},e.reverse=function(){var e=t.reverse.apply(this);return e.flip=function(){return t.reverse()},e},e.has=function(e){return t.includes(e)},e.includes=function(e){return t.has(e)},e.cacheResult=Rt,e.__iterateUncached=function(e,n){var r=this;return t.__iterate(function(t,n){return e(n,t,r)!==!1},n)},e.__iteratorUncached=function(e,n){if(e===bn){var r=t.__iterator(e,n);return new b(function(){var t=r.next();if(!t.done){var e=t.value[0];t.value[0]=t.value[1],t.value[1]=e}return t})}return t.__iterator(e===wn?mn:wn,n)},e}function pt(t,e,n){var r=Dt(t);return r.size=t.size,r.has=function(e){return t.has(e)},r.get=function(r,i){var o=t.get(r,hn);return o===hn?i:e.call(n,o,r,t)},r.__iterateUncached=function(r,i){var o=this;return t.__iterate(function(t,i,u){return r(e.call(n,t,i,u),i,o)!==!1},i)},r.__iteratorUncached=function(r,i){var o=t.__iterator(bn,i);return new b(function(){var i=o.next();if(i.done)return i;var u=i.value,a=u[0];return T(r,a,e.call(n,u[1],a,t),i)})},r}function _t(t,e){var n=Dt(t);return n._iter=t,n.size=t.size,n.reverse=function(){return t},t.flip&&(n.flip=function(){var e=ht(t);return e.reverse=function(){return t.flip()},e}),n.get=function(n,r){return t.get(e?n:-1-n,r)},n.has=function(n){return t.has(e?n:-1-n)},n.includes=function(e){return t.includes(e)},n.cacheResult=Rt,n.__iterate=function(e,n){var r=this;return t.__iterate(function(t,n){return e(t,n,r)},!n)},n.__iterator=function(e,n){return t.__iterator(e,!n)},n}function vt(t,e,n,r){var i=Dt(t);return r&&(i.has=function(r){var i=t.get(r,hn);return i!==hn&&!!e.call(n,i,r,t)},i.get=function(r,i){var o=t.get(r,hn);return o!==hn&&e.call(n,o,r,t)?o:i}),i.__iterateUncached=function(i,o){var u=this,a=0;return t.__iterate(function(t,o,s){return e.call(n,t,o,s)?(a++,i(t,r?o:a-1,u)):void 0},o),a},i.__iteratorUncached=function(i,o){var u=t.__iterator(bn,o),a=0;return new b(function(){for(;;){var o=u.next();if(o.done)return o;var s=o.value,c=s[0],f=s[1];if(e.call(n,f,c,t))return T(i,r?c:a++,f,o)}})},i}function dt(t,e,n){var r=Lt().asMutable();return t.__iterate(function(i,o){r.update(e.call(n,i,o,t),0,function(t){return t+1})}),r.asImmutable()}function yt(t,e,n){var r=y(t),i=(w(t)?Ee():Lt()).asMutable();t.__iterate(function(o,u){i.update(e.call(n,o,u,t),function(t){return t=t||[],t.push(r?[u,o]:o),t})});var o=Mt(t);return i.map(function(e){return Ct(t,o(e))})}function gt(t,e,n,r){var i=t.size;if(s(e,n,i))return t;var o=c(e,i),a=f(n,i);if(o!==o||a!==a)return gt(t.toSeq().cacheResult(),e,n,r);var l=a-o;0>l&&(l=0);var h=Dt(t);return h.size=0===l?l:t.size&&l||void 0,!r&&L(t)&&l>=0&&(h.get=function(e,n){return e=u(this,e),e>=0&&l>e?t.get(e+o,n):n}),h.__iterateUncached=function(e,n){var i=this;if(0===l)return 0;if(n)return this.cacheResult().__iterate(e,n);var u=0,a=!0,s=0;return t.__iterate(function(t,n){return a&&(a=u++l)return E();var t=i.next();return r||e===wn?t:e===mn?T(e,a-1,void 0,t):T(e,a-1,t.value[1],t)})},h}function mt(t,e,n){var r=Dt(t);return r.__iterateUncached=function(r,i){var o=this;if(i)return this.cacheResult().__iterate(r,i);var u=0;return t.__iterate(function(t,i,a){return e.call(n,t,i,a)&&++u&&r(t,i,o)}),u},r.__iteratorUncached=function(r,i){var o=this;if(i)return this.cacheResult().__iterator(r,i);var u=t.__iterator(bn,i),a=!0;return new b(function(){if(!a)return E();var t=u.next();if(t.done)return t;var i=t.value,s=i[0],c=i[1];return e.call(n,c,s,o)?r===bn?t:T(r,s,c,t):(a=!1,E())})},r}function wt(t,e,n,r){var i=Dt(t);return i.__iterateUncached=function(i,o){var u=this;if(o)return this.cacheResult().__iterate(i,o);var a=!0,s=0;return t.__iterate(function(t,o,c){return a&&(a=e.call(n,t,o,c))?void 0:(s++,i(t,r?o:s-1,u))}),s},i.__iteratorUncached=function(i,o){var u=this;if(o)return this.cacheResult().__iterator(i,o);var a=t.__iterator(bn,o),s=!0,c=0;return new b(function(){var t,o,f;do{if(t=a.next(),t.done)return r||i===wn?t:i===mn?T(i,c++,void 0,t):T(i,c++,t.value[1],t);var l=t.value;o=l[0],f=l[1],s&&(s=e.call(n,f,o,u))}while(s);return i===bn?t:T(i,o,f,t)})},i}function bt(t,e){var n=y(t),r=[t].concat(e).map(function(t){return d(t)?n&&(t=p(t)):t=n?q(t):U(Array.isArray(t)?t:[t]),t}).filter(function(t){return 0!==t.size});if(0===r.length)return t;if(1===r.length){var i=r[0];if(i===t||n&&y(i)||g(t)&&g(i))return i}var o=new D(r);return n?o=o.toKeyedSeq():g(t)||(o=o.toSetSeq()),o=o.flatten(!0),o.size=r.reduce(function(t,e){if(void 0!==t){var n=e.size;if(void 0!==n)return t+n}},0),o}function Tt(t,e,n){var r=Dt(t);return r.__iterateUncached=function(r,i){function o(t,s){var c=this;t.__iterate(function(t,i){return(!e||e>s)&&d(t)?o(t,s+1):r(t,n?i:u++,c)===!1&&(a=!0),!a},i)}var u=0,a=!1;return o(t,0),u},r.__iteratorUncached=function(r,i){var o=t.__iterator(r,i),u=[],a=0;return new b(function(){for(;o;){var t=o.next();if(t.done===!1){var s=t.value;if(r===bn&&(s=s[1]),e&&!(u.length0}function Nt(t,e,n){var r=Dt(t);return r.size=new D(n).map(function(t){return t.size}).min(),r.__iterate=function(t,e){for(var n,r=this.__iterator(wn,e),i=0;!(n=r.next()).done&&t(n.value,i++,this)!==!1;);return i},r.__iteratorUncached=function(t,r){var i=n.map(function(t){return t=h(t),S(r?t.reverse():t)}),o=0,u=!1;return new b(function(){var n;return u||(n=i.map(function(t){return t.next()}),u=n.some(function(t){return t.done})),u?E():T(t,o++,e.apply(null,n.map(function(t){return t.value})))})},r}function Ct(t,e){return L(t)?e:t.constructor(e)}function kt(t){if(t!==Object(t))throw new TypeError("Expected [K, V] tuple: "+t)}function xt(t){return at(t.size),o(t)}function Mt(t){return y(t)?p:g(t)?_:v}function Dt(t){return Object.create((y(t)?k:g(t)?x:M).prototype)}function Rt(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):C.prototype.cacheResult.call(this)}function jt(t,e){return t>e?1:e>t?-1:0}function zt(t){var e=S(t);if(!e){if(!N(t))throw new TypeError("Expected iterable or array-like: "+t);e=S(h(t))}return e}function Lt(t){return null===t||void 0===t?Bt():Pt(t)?t:Bt().withMutations(function(e){var n=p(t);at(n.size),n.forEach(function(t,n){return e.set(n,t)})})}function Pt(t){return!(!t||!t[Pn])}function qt(t,e){this.ownerID=t,this.entries=e}function Ut(t,e,n){this.ownerID=t,this.bitmap=e,this.nodes=n}function Wt(t,e,n){this.ownerID=t,this.count=e,this.nodes=n}function Gt(t,e,n){this.ownerID=t,this.keyHash=e,this.entries=n}function Vt(t,e,n){this.ownerID=t,this.keyHash=e,this.entry=n}function Kt(t,e,n){this._type=e,this._reverse=n,this._stack=t._root&&Ft(t._root)}function $t(t,e){return T(t,e[0],e[1])}function Ft(t,e){return{node:t,index:0,__prev:e}}function Ht(t,e,n,r){var i=Object.create(qn);return i.size=t,i._root=e,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function Bt(){return Un||(Un=Ht(0))}function Jt(t,n,r){var i,o;if(t._root){var u=e(pn),a=e(_n);if(i=Yt(t._root,t.__ownerID,0,void 0,n,r,u,a),!a.value)return t;o=t.size+(u.value?r===hn?-1:1:0)}else{if(r===hn)return t;o=1,i=new qt(t.__ownerID,[[n,r]])}return t.__ownerID?(t.size=o,t._root=i,t.__hash=void 0,t.__altered=!0,t):i?Ht(o,i):Bt()}function Yt(t,e,r,i,o,u,a,s){return t?t.update(e,r,i,o,u,a,s):u===hn?t:(n(s),n(a),new Vt(e,i,[o,u]))}function Xt(t){return t.constructor===Vt||t.constructor===Gt}function Qt(t,e,n,r,i){if(t.keyHash===r)return new Gt(e,r,[t.entry,i]);var o,u=(0===n?t.keyHash:t.keyHash>>>n)&ln,a=(0===n?r:r>>>n)&ln,s=u===a?[Qt(t,e,n+cn,r,i)]:(o=new Vt(e,r,i),a>u?[t,o]:[o,t]);return new Ut(e,1<a;a++,s<<=1){var f=e[a];void 0!==f&&a!==r&&(i|=s,u[o++]=f)}return new Ut(t,i,u)}function ee(t,e,n,r,i){for(var o=0,u=new Array(fn),a=0;0!==n;a++,n>>>=1)u[a]=1&n?e[o++]:void 0;return u[r]=i,new Wt(t,o+1,u)}function ne(t,e,n){for(var r=[],i=0;i>1&1431655765,t=(858993459&t)+(t>>2&858993459),t=t+(t>>4)&252645135,t+=t>>8,t+=t>>16,127&t}function ae(t,e,n,r){var o=r?t:i(t);return o[e]=n,o}function se(t,e,n,r){var i=t.length+1;if(r&&e+1===i)return t[e]=n,t;for(var o=new Array(i),u=0,a=0;i>a;a++)a===e?(o[a]=n,u=-1):o[a]=t[a+u];return o}function ce(t,e,n){var r=t.length-1;if(n&&e===r)return t.pop(),t;for(var i=new Array(r),o=0,u=0;r>u;u++)u===e&&(o=1),i[u]=t[u+o];return i}function fe(t){var e=ve();if(null===t||void 0===t)return e;if(le(t))return t;var n=_(t),r=n.size;return 0===r?e:(at(r),r>0&&fn>r?_e(0,r,cn,null,new he(n.toArray())):e.withMutations(function(t){t.setSize(r),n.forEach(function(e,n){return t.set(n,e)})}))}function le(t){return!(!t||!t[Kn])}function he(t,e){this.array=t,this.ownerID=e}function pe(t,e){function n(t,e,n){return 0===e?r(t,n):i(t,e,n)}function r(t,n){var r=n===a?s&&s.array:t&&t.array,i=n>o?0:o-n,c=u-n;return c>fn&&(c=fn),function(){if(i===c)return Hn;var t=e?--c:i++;return r&&r[t]}}function i(t,r,i){var a,s=t&&t.array,c=i>o?0:o-i>>r,f=(u-i>>r)+1;return f>fn&&(f=fn),function(){for(;;){if(a){var t=a();if(t!==Hn)return t;a=null}if(c===f)return Hn;var o=e?--f:c++;a=n(s&&s[o],r-cn,i+(o<=t.size||0>n)return t.withMutations(function(t){0>n?we(t,n).set(0,r):we(t,0,n+1).set(n,r)});n+=t._origin;var i=t._tail,o=t._root,a=e(_n);return n>=Te(t._capacity)?i=ye(i,t.__ownerID,0,n,r,a):o=ye(o,t.__ownerID,t._level,n,r,a),a.value?t.__ownerID?(t._root=o,t._tail=i,t.__hash=void 0,t.__altered=!0,t):_e(t._origin,t._capacity,t._level,o,i):t}function ye(t,e,r,i,o,u){var a=i>>>r&ln,s=t&&a0){var f=t&&t.array[a],l=ye(f,e,r-cn,i,o,u);return l===f?t:(c=ge(t,e),c.array[a]=l,c)}return s&&t.array[a]===o?t:(n(u),c=ge(t,e),void 0===o&&a===c.array.length-1?c.array.pop():c.array[a]=o,c)}function ge(t,e){return e&&t&&e===t.ownerID?t:new he(t?t.array.slice():[],e)}function me(t,e){if(e>=Te(t._capacity))return t._tail;if(e<1<0;)n=n.array[e>>>r&ln],r-=cn;return n}}function we(t,e,n){var i=t.__ownerID||new r,o=t._origin,u=t._capacity,a=o+e,s=void 0===n?u:0>n?u+n:o+n;if(a===o&&s===u)return t;if(a>=s)return t.clear();for(var c=t._level,f=t._root,l=0;0>a+l;)f=new he(f&&f.array.length?[void 0,f]:[],i),c+=cn,l+=1<=1<p?me(t,s-1):p>h?new he([],i):_;if(_&&p>h&&u>a&&_.array.length){f=ge(f,i);for(var d=f,y=c;y>cn;y-=cn){var g=h>>>y&ln;d=d.array[g]=ge(d.array[g],i)}d.array[h>>>cn&ln]=_}if(u>s&&(v=v&&v.removeAfter(i,0,s)),a>=p)a-=p,s-=p,c=cn,f=null,v=v&&v.removeBefore(i,0,a);else if(a>o||h>p){for(l=0;f;){var m=a>>>c&ln;if(m!==p>>>c&ln)break;m&&(l+=(1<o&&(f=f.removeBefore(i,c,a-l)),f&&h>p&&(f=f.removeAfter(i,c,p-l)),l&&(a-=l,s-=l)}return t.__ownerID?(t.size=s-a,t._origin=a,t._capacity=s,t._level=c,t._root=f,t._tail=v,t.__hash=void 0,t.__altered=!0,t):_e(a,s,c,f,v)}function be(t,e,n){for(var r=[],i=0,o=0;oi&&(i=a.size),d(u)||(a=a.map(function(t){return Y(t)})),r.push(a)}return i>t.size&&(t=t.setSize(i)),ie(t,e,r)}function Te(t){return fn>t?0:t-1>>>cn<=fn&&u.size>=2*o.size?(i=u.filter(function(t,e){return void 0!==t&&a!==e}),r=i.toKeyedSeq().map(function(t){return t[0]}).flip().toMap(),t.__ownerID&&(r.__ownerID=i.__ownerID=t.__ownerID)):(r=o.remove(e),i=a===u.size-1?u.pop():u.set(a,void 0))}else if(s){if(n===u.get(a)[1])return t;r=o,i=u.set(a,[e,n])}else r=o.set(e,u.size),i=u.set(u.size,[e,n]);return t.__ownerID?(t.size=r.size,t._map=r,t._list=i,t.__hash=void 0,t):Ie(r,i)}function Ne(t){return null===t||void 0===t?xe():Ce(t)?t:xe().unshiftAll(t)}function Ce(t){return!(!t||!t[Jn])}function ke(t,e,n,r){var i=Object.create(Yn);return i.size=t,i._head=e,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function xe(){return Xn||(Xn=ke(0))}function Me(t){return null===t||void 0===t?ze():De(t)?t:ze().withMutations(function(e){var n=v(t);at(n.size),n.forEach(function(t){return e.add(t)})})}function De(t){return!(!t||!t[Qn])}function Re(t,e){return t.__ownerID?(t.size=e.size,t._map=e,t):e===t._map?t:0===e.size?t.__empty():t.__make(e)}function je(t,e){var n=Object.create(Zn);return n.size=t?t.size:0,n._map=t,n.__ownerID=e,n}function ze(){return tr||(tr=je(Bt()))}function Le(t){return null===t||void 0===t?Ue():Pe(t)?t:Ue().withMutations(function(e){var n=v(t);at(n.size),n.forEach(function(t){return e.add(t)})})}function Pe(t){return De(t)&&w(t)}function qe(t,e){var n=Object.create(er);return n.size=t?t.size:0,n._map=t,n.__ownerID=e,n}function Ue(){return nr||(nr=qe(Se()))}function We(t,e){var n,r=function(o){if(o instanceof r)return o;if(!(this instanceof r))return new r(o);if(!n){n=!0;var u=Object.keys(t);Ke(i,u),i.size=u.length,i._name=e,i._keys=u,i._defaultValues=t}this._map=Lt(o)},i=r.prototype=Object.create(rr);return i.constructor=r,r}function Ge(t,e,n){var r=Object.create(Object.getPrototypeOf(t));return r._map=e,r.__ownerID=n,r}function Ve(t){return t._name||t.constructor.name||"Record"}function Ke(t,e){try{e.forEach($e.bind(void 0,t))}catch(n){}}function $e(t,e){Object.defineProperty(t,e,{get:function(){return this.get(e)},set:function(t){ut(this.__ownerID,"Cannot set on an immutable record."),this.set(e,t)}})}function Fe(t,e){if(t===e)return!0;if(!d(e)||void 0!==t.size&&void 0!==e.size&&t.size!==e.size||void 0!==t.__hash&&void 0!==e.__hash&&t.__hash!==e.__hash||y(t)!==y(e)||g(t)!==g(e)||w(t)!==w(e))return!1;if(0===t.size&&0===e.size)return!0;var n=!m(t);if(w(t)){var r=t.entries();return e.every(function(t,e){var i=r.next().value;return i&&J(i[1],t)&&(n||J(i[0],e))})&&r.next().done}var i=!1;if(void 0===t.size)if(void 0===e.size)"function"==typeof t.cacheResult&&t.cacheResult();else{i=!0;var o=t;t=e,e=o}var u=!0,a=e.__iterate(function(e,r){return(n?t.has(e):i?J(e,t.get(r,hn)):J(t.get(r,hn),e))?void 0:(u=!1,!1)});return u&&t.size===a}function He(t,e,n){if(!(this instanceof He))return new He(t,e,n);if(ut(0!==n,"Cannot step a Range by 0"),t=t||0,void 0===e&&(e=1/0),n=void 0===n?1:Math.abs(n),t>e&&(n=-n),this._start=t,this._end=e,this._step=n,this.size=Math.max(0,Math.ceil((e-t)/n-1)+1),0===this.size){if(ir)return ir;ir=this}}function Be(t,e){if(!(this instanceof Be))return new Be(t,e);if(this._value=t,this.size=void 0===e?1/0:Math.max(0,e),0===this.size){if(or)return or;or=this}}function Je(t,e){var n=function(n){t.prototype[n]=e[n]};return Object.keys(e).forEach(n),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(e).forEach(n),t}function Ye(t,e){return e}function Xe(t,e){return[e,t]}function Qe(t){return function(){return!t.apply(this,arguments)}}function Ze(t){return function(){return-t.apply(this,arguments)}}function tn(t){return"string"==typeof t?JSON.stringify(t):t}function en(){return i(arguments)}function nn(t,e){return e>t?1:t>e?-1:0}function rn(t){if(t.size===1/0)return 0;var e=w(t),n=y(t),r=e?1:0,i=t.__iterate(n?e?function(t,e){r=31*r+un(et(t),et(e))|0}:function(t,e){r=r+un(et(t),et(e))|0}:e?function(t){r=31*r+et(t)|0}:function(t){r=r+et(t)|0});return on(i,r)}function on(t,e){return e=Nn(e,3432918353),e=Nn(e<<15|e>>>-15,461845907),e=Nn(e<<13|e>>>-13,5),e=(e+3864292196|0)^t,e=Nn(e^e>>>16,2246822507),e=Nn(e^e>>>13,3266489909),e=tt(e^e>>>16)}function un(t,e){return t^e+2654435769+(t<<6)+(t>>2)|0}var an=Array.prototype.slice,sn="delete",cn=5,fn=1<=i;i++)if(t(n[e?r-i:i],i,this)===!1)return i+1;return i},D.prototype.__iterator=function(t,e){var n=this._array,r=n.length-1,i=0;return new b(function(){return i>r?E():T(t,i,n[e?r-i++:i++])})},t(R,k),R.prototype.get=function(t,e){return void 0===e||this.has(t)?this._object[t]:e},R.prototype.has=function(t){return this._object.hasOwnProperty(t)},R.prototype.__iterate=function(t,e){for(var n=this._object,r=this._keys,i=r.length-1,o=0;i>=o;o++){var u=r[e?i-o:o];if(t(n[u],u,this)===!1)return o+1}return o},R.prototype.__iterator=function(t,e){var n=this._object,r=this._keys,i=r.length-1,o=0;return new b(function(){var u=r[e?i-o:o];return o++>i?E():T(t,u,n[u])})},R.prototype[gn]=!0,t(j,x),j.prototype.__iterateUncached=function(t,e){if(e)return this.cacheResult().__iterate(t,e);var n=this._iterable,r=S(n),i=0;if(I(r))for(var o;!(o=r.next()).done&&t(o.value,i++,this)!==!1;);return i},j.prototype.__iteratorUncached=function(t,e){if(e)return this.cacheResult().__iterator(t,e);var n=this._iterable,r=S(n);if(!I(r))return new b(E);var i=0;return new b(function(){var e=r.next();return e.done?e:T(t,i++,e.value)})},t(z,x),z.prototype.__iterateUncached=function(t,e){if(e)return this.cacheResult().__iterate(t,e);for(var n=this._iterator,r=this._iteratorCache,i=0;i=r.length){var e=n.next();if(e.done)return e;r[i]=e.value}return T(t,i,r[i++])})};var Sn;t($,h),t(F,$),t(H,$),t(B,$),$.Keyed=F,$.Indexed=H,$.Set=B;var An,Nn="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(t,e){t=0|t,e=0|e;var n=65535&t,r=65535&e;return n*r+((t>>>16)*r+n*(e>>>16)<<16>>>0)|0},Cn=Object.isExtensible,kn=function(){try{return Object.defineProperty({},"@",{}),!0}catch(t){return!1}}(),xn="function"==typeof WeakMap;xn&&(An=new WeakMap);var Mn=0,Dn="__immutablehash__";"function"==typeof Symbol&&(Dn=Symbol(Dn));var Rn=16,jn=255,zn=0,Ln={};t(st,k),st.prototype.get=function(t,e){return this._iter.get(t,e)},st.prototype.has=function(t){return this._iter.has(t)},st.prototype.valueSeq=function(){return this._iter.valueSeq()},st.prototype.reverse=function(){var t=this,e=_t(this,!0);return this._useKeys||(e.valueSeq=function(){return t._iter.toSeq().reverse()}),e},st.prototype.map=function(t,e){var n=this,r=pt(this,t,e);return this._useKeys||(r.valueSeq=function(){return n._iter.toSeq().map(t,e)}),r},st.prototype.__iterate=function(t,e){var n,r=this;return this._iter.__iterate(this._useKeys?function(e,n){return t(e,n,r)}:(n=e?xt(this):0,function(i){return t(i,e?--n:n++,r)}),e)},st.prototype.__iterator=function(t,e){if(this._useKeys)return this._iter.__iterator(t,e);var n=this._iter.__iterator(wn,e),r=e?xt(this):0;return new b(function(){var i=n.next();return i.done?i:T(t,e?--r:r++,i.value,i)})},st.prototype[gn]=!0,t(ct,x),ct.prototype.includes=function(t){return this._iter.includes(t)},ct.prototype.__iterate=function(t,e){var n=this,r=0;return this._iter.__iterate(function(e){return t(e,r++,n)},e)},ct.prototype.__iterator=function(t,e){var n=this._iter.__iterator(wn,e),r=0;return new b(function(){var e=n.next();return e.done?e:T(t,r++,e.value,e)})},t(ft,M),ft.prototype.has=function(t){return this._iter.includes(t)},ft.prototype.__iterate=function(t,e){var n=this;return this._iter.__iterate(function(e){return t(e,e,n)},e)},ft.prototype.__iterator=function(t,e){var n=this._iter.__iterator(wn,e);return new b(function(){var e=n.next();return e.done?e:T(t,e.value,e.value,e)})},t(lt,k),lt.prototype.entrySeq=function(){return this._iter.toSeq()},lt.prototype.__iterate=function(t,e){var n=this;return this._iter.__iterate(function(e){if(e){kt(e);var r=d(e);return t(r?e.get(1):e[1],r?e.get(0):e[0],n)}},e)},lt.prototype.__iterator=function(t,e){var n=this._iter.__iterator(wn,e);return new b(function(){for(;;){var e=n.next();if(e.done)return e;var r=e.value;if(r){kt(r);var i=d(r);return T(t,i?r.get(0):r[0],i?r.get(1):r[1],e)}}})},ct.prototype.cacheResult=st.prototype.cacheResult=ft.prototype.cacheResult=lt.prototype.cacheResult=Rt,t(Lt,F),Lt.prototype.toString=function(){return this.__toString("Map {","}")},Lt.prototype.get=function(t,e){return this._root?this._root.get(0,void 0,t,e):e},Lt.prototype.set=function(t,e){return Jt(this,t,e)},Lt.prototype.setIn=function(t,e){return this.updateIn(t,hn,function(){return e})},Lt.prototype.remove=function(t){return Jt(this,t,hn)},Lt.prototype.deleteIn=function(t){return this.updateIn(t,function(){return hn})},Lt.prototype.update=function(t,e,n){return 1===arguments.length?t(this):this.updateIn([t],e,n)},Lt.prototype.updateIn=function(t,e,n){n||(n=e,e=void 0);var r=oe(this,zt(t),e,n);return r===hn?void 0:r},Lt.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):Bt()},Lt.prototype.merge=function(){return ne(this,void 0,arguments)},Lt.prototype.mergeWith=function(t){var e=an.call(arguments,1);return ne(this,t,e)},Lt.prototype.mergeIn=function(t){var e=an.call(arguments,1);return this.updateIn(t,Bt(),function(t){return t.merge.apply(t,e)})},Lt.prototype.mergeDeep=function(){return ne(this,re(void 0),arguments)},Lt.prototype.mergeDeepWith=function(t){var e=an.call(arguments,1);return ne(this,re(t),e)},Lt.prototype.mergeDeepIn=function(t){var e=an.call(arguments,1);return this.updateIn(t,Bt(),function(t){return t.mergeDeep.apply(t,e)})},Lt.prototype.sort=function(t){return Ee(It(this,t))},Lt.prototype.sortBy=function(t,e){return Ee(It(this,e,t))},Lt.prototype.withMutations=function(t){var e=this.asMutable();return t(e),e.wasAltered()?e.__ensureOwner(this.__ownerID):this},Lt.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new r)},Lt.prototype.asImmutable=function(){return this.__ensureOwner()},Lt.prototype.wasAltered=function(){return this.__altered},Lt.prototype.__iterator=function(t,e){return new Kt(this,t,e)},Lt.prototype.__iterate=function(t,e){var n=this,r=0;return this._root&&this._root.iterate(function(e){return r++,t(e[1],e[0],n)},e),r},Lt.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?Ht(this.size,this._root,t,this.__hash):(this.__ownerID=t,this.__altered=!1,this)},Lt.isMap=Pt; - -var Pn="@@__IMMUTABLE_MAP__@@",qn=Lt.prototype;qn[Pn]=!0,qn[sn]=qn.remove,qn.removeIn=qn.deleteIn,qt.prototype.get=function(t,e,n,r){for(var i=this.entries,o=0,u=i.length;u>o;o++)if(J(n,i[o][0]))return i[o][1];return r},qt.prototype.update=function(t,e,r,o,u,a,s){for(var c=u===hn,f=this.entries,l=0,h=f.length;h>l&&!J(o,f[l][0]);l++);var p=h>l;if(p?f[l][1]===u:c)return this;if(n(s),(c||!p)&&n(a),!c||1!==f.length){if(!p&&!c&&f.length>=Wn)return Zt(t,f,o,u);var _=t&&t===this.ownerID,v=_?f:i(f);return p?c?l===h-1?v.pop():v[l]=v.pop():v[l]=[o,u]:v.push([o,u]),_?(this.entries=v,this):new qt(t,v)}},Ut.prototype.get=function(t,e,n,r){void 0===e&&(e=et(n));var i=1<<((0===t?e:e>>>t)&ln),o=this.bitmap;return 0===(o&i)?r:this.nodes[ue(o&i-1)].get(t+cn,e,n,r)},Ut.prototype.update=function(t,e,n,r,i,o,u){void 0===n&&(n=et(r));var a=(0===e?n:n>>>e)&ln,s=1<=Gn)return ee(t,h,c,a,_);if(f&&!_&&2===h.length&&Xt(h[1^l]))return h[1^l];if(f&&_&&1===h.length&&Xt(_))return _;var v=t&&t===this.ownerID,d=f?_?c:c^s:c|s,y=f?_?ae(h,l,_,v):ce(h,l,v):se(h,l,_,v);return v?(this.bitmap=d,this.nodes=y,this):new Ut(t,d,y)},Wt.prototype.get=function(t,e,n,r){void 0===e&&(e=et(n));var i=(0===t?e:e>>>t)&ln,o=this.nodes[i];return o?o.get(t+cn,e,n,r):r},Wt.prototype.update=function(t,e,n,r,i,o,u){void 0===n&&(n=et(r));var a=(0===e?n:n>>>e)&ln,s=i===hn,c=this.nodes,f=c[a];if(s&&!f)return this;var l=Yt(f,t,e+cn,n,r,i,o,u);if(l===f)return this;var h=this.count;if(f){if(!l&&(h--,Vn>h))return te(t,c,h,a)}else h++;var p=t&&t===this.ownerID,_=ae(c,a,l,p);return p?(this.count=h,this.nodes=_,this):new Wt(t,h,_)},Gt.prototype.get=function(t,e,n,r){for(var i=this.entries,o=0,u=i.length;u>o;o++)if(J(n,i[o][0]))return i[o][1];return r},Gt.prototype.update=function(t,e,r,o,u,a,s){void 0===r&&(r=et(o));var c=u===hn;if(r!==this.keyHash)return c?this:(n(s),n(a),Qt(this,t,e,r,[o,u]));for(var f=this.entries,l=0,h=f.length;h>l&&!J(o,f[l][0]);l++);var p=h>l;if(p?f[l][1]===u:c)return this;if(n(s),(c||!p)&&n(a),c&&2===h)return new Vt(t,this.keyHash,f[1^l]);var _=t&&t===this.ownerID,v=_?f:i(f);return p?c?l===h-1?v.pop():v[l]=v.pop():v[l]=[o,u]:v.push([o,u]),_?(this.entries=v,this):new Gt(t,this.keyHash,v)},Vt.prototype.get=function(t,e,n,r){return J(n,this.entry[0])?this.entry[1]:r},Vt.prototype.update=function(t,e,r,i,o,u,a){var s=o===hn,c=J(i,this.entry[0]);return(c?o===this.entry[1]:s)?this:(n(a),s?void n(u):c?t&&t===this.ownerID?(this.entry[1]=o,this):new Vt(t,this.keyHash,[i,o]):(n(u),Qt(this,t,e,et(i),[i,o])))},qt.prototype.iterate=Gt.prototype.iterate=function(t,e){for(var n=this.entries,r=0,i=n.length-1;i>=r;r++)if(t(n[e?i-r:r])===!1)return!1},Ut.prototype.iterate=Wt.prototype.iterate=function(t,e){for(var n=this.nodes,r=0,i=n.length-1;i>=r;r++){var o=n[e?i-r:r];if(o&&o.iterate(t,e)===!1)return!1}},Vt.prototype.iterate=function(t,e){return t(this.entry)},t(Kt,b),Kt.prototype.next=function(){for(var t=this._type,e=this._stack;e;){var n,r=e.node,i=e.index++;if(r.entry){if(0===i)return $t(t,r.entry)}else if(r.entries){if(n=r.entries.length-1,n>=i)return $t(t,r.entries[this._reverse?n-i:i])}else if(n=r.nodes.length-1,n>=i){var o=r.nodes[this._reverse?n-i:i];if(o){if(o.entry)return $t(t,o.entry);e=this._stack=Ft(o,e)}continue}e=this._stack=this._stack.__prev}return E()};var Un,Wn=fn/4,Gn=fn/2,Vn=fn/4;t(fe,H),fe.of=function(){return this(arguments)},fe.prototype.toString=function(){return this.__toString("List [","]")},fe.prototype.get=function(t,e){if(t=u(this,t),0>t||t>=this.size)return e;t+=this._origin;var n=me(this,t);return n&&n.array[t&ln]},fe.prototype.set=function(t,e){return de(this,t,e)},fe.prototype.remove=function(t){return this.has(t)?0===t?this.shift():t===this.size-1?this.pop():this.splice(t,1):this},fe.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=cn,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):ve()},fe.prototype.push=function(){var t=arguments,e=this.size;return this.withMutations(function(n){we(n,0,e+t.length);for(var r=0;r>>e&ln;if(r>=this.array.length)return new he([],t);var i,o=0===r;if(e>0){var u=this.array[r];if(i=u&&u.removeBefore(t,e-cn,n),i===u&&o)return this}if(o&&!i)return this;var a=ge(this,t);if(!o)for(var s=0;r>s;s++)a.array[s]=void 0;return i&&(a.array[r]=i),a},he.prototype.removeAfter=function(t,e,n){if(n===e?1<>>e&ln;if(r>=this.array.length)return this;var i,o=r===this.array.length-1;if(e>0){var u=this.array[r];if(i=u&&u.removeAfter(t,e-cn,n),i===u&&o)return this}if(o&&!i)return this;var a=ge(this,t);return o||a.array.pop(),i&&(a.array[r]=i),a};var Fn,Hn={};t(Ee,Lt),Ee.of=function(){return this(arguments)},Ee.prototype.toString=function(){return this.__toString("OrderedMap {","}")},Ee.prototype.get=function(t,e){var n=this._map.get(t);return void 0!==n?this._list.get(n)[1]:e},Ee.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):Se()},Ee.prototype.set=function(t,e){return Ae(this,t,e)},Ee.prototype.remove=function(t){return Ae(this,t,hn)},Ee.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},Ee.prototype.__iterate=function(t,e){var n=this;return this._list.__iterate(function(e){return e&&t(e[1],e[0],n)},e)},Ee.prototype.__iterator=function(t,e){return this._list.fromEntrySeq().__iterator(t,e)},Ee.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t),n=this._list.__ensureOwner(t);return t?Ie(e,n,t,this.__hash):(this.__ownerID=t,this._map=e,this._list=n,this)},Ee.isOrderedMap=Oe,Ee.prototype[gn]=!0,Ee.prototype[sn]=Ee.prototype.remove;var Bn;t(Ne,H),Ne.of=function(){return this(arguments)},Ne.prototype.toString=function(){return this.__toString("Stack [","]")},Ne.prototype.get=function(t,e){var n=this._head;for(t=u(this,t);n&&t--;)n=n.next;return n?n.value:e},Ne.prototype.peek=function(){return this._head&&this._head.value},Ne.prototype.push=function(){if(0===arguments.length)return this;for(var t=this.size+arguments.length,e=this._head,n=arguments.length-1;n>=0;n--)e={value:arguments[n],next:e};return this.__ownerID?(this.size=t,this._head=e,this.__hash=void 0,this.__altered=!0,this):ke(t,e)},Ne.prototype.pushAll=function(t){if(t=_(t),0===t.size)return this;at(t.size);var e=this.size,n=this._head;return t.reverse().forEach(function(t){e++,n={value:t,next:n}}),this.__ownerID?(this.size=e,this._head=n,this.__hash=void 0,this.__altered=!0,this):ke(e,n)},Ne.prototype.pop=function(){return this.slice(1)},Ne.prototype.unshift=function(){return this.push.apply(this,arguments)},Ne.prototype.unshiftAll=function(t){return this.pushAll(t)},Ne.prototype.shift=function(){return this.pop.apply(this,arguments)},Ne.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):xe()},Ne.prototype.slice=function(t,e){if(s(t,e,this.size))return this;var n=c(t,this.size),r=f(e,this.size);if(r!==this.size)return H.prototype.slice.call(this,t,e);for(var i=this.size-n,o=this._head;n--;)o=o.next;return this.__ownerID?(this.size=i,this._head=o,this.__hash=void 0,this.__altered=!0,this):ke(i,o)},Ne.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?ke(this.size,this._head,t,this.__hash):(this.__ownerID=t,this.__altered=!1,this)},Ne.prototype.__iterate=function(t,e){if(e)return this.reverse().__iterate(t);for(var n=0,r=this._head;r&&t(r.value,n++,this)!==!1;)r=r.next;return n},Ne.prototype.__iterator=function(t,e){if(e)return this.reverse().__iterator(t);var n=0,r=this._head;return new b(function(){if(r){var e=r.value;return r=r.next,T(t,n++,e)}return E()})},Ne.isStack=Ce;var Jn="@@__IMMUTABLE_STACK__@@",Yn=Ne.prototype;Yn[Jn]=!0,Yn.withMutations=qn.withMutations,Yn.asMutable=qn.asMutable,Yn.asImmutable=qn.asImmutable,Yn.wasAltered=qn.wasAltered;var Xn;t(Me,B),Me.of=function(){return this(arguments)},Me.fromKeys=function(t){return this(p(t).keySeq())},Me.prototype.toString=function(){return this.__toString("Set {","}")},Me.prototype.has=function(t){return this._map.has(t)},Me.prototype.add=function(t){return Re(this,this._map.set(t,!0))},Me.prototype.remove=function(t){return Re(this,this._map.remove(t))},Me.prototype.clear=function(){return Re(this,this._map.clear())},Me.prototype.union=function(){var t=an.call(arguments,0);return t=t.filter(function(t){return 0!==t.size}),0===t.length?this:0!==this.size||this.__ownerID||1!==t.length?this.withMutations(function(e){for(var n=0;n1?" by "+this._step:"")+" ]"},He.prototype.get=function(t,e){return this.has(t)?this._start+u(this,t)*this._step:e},He.prototype.includes=function(t){var e=(t-this._start)/this._step;return e>=0&&e=e?new He(0,0):new He(this.get(t,this._end),this.get(e,this._end),this._step))},He.prototype.indexOf=function(t){var e=t-this._start;if(e%this._step===0){var n=e/this._step;if(n>=0&&n=o;o++){if(t(i,o,this)===!1)return o+1;i+=e?-r:r}return o},He.prototype.__iterator=function(t,e){var n=this.size-1,r=this._step,i=e?this._start+n*r:this._start,o=0;return new b(function(){var u=i;return i+=e?-r:r,o>n?E():T(t,o++,u)})},He.prototype.equals=function(t){return t instanceof He?this._start===t._start&&this._end===t._end&&this._step===t._step:Fe(this,t)};var ir;t(Be,x),Be.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},Be.prototype.get=function(t,e){return this.has(t)?this._value:e},Be.prototype.includes=function(t){return J(this._value,t)},Be.prototype.slice=function(t,e){var n=this.size;return s(t,e,n)?this:new Be(this._value,f(e,n)-c(t,n))},Be.prototype.reverse=function(){return this},Be.prototype.indexOf=function(t){return J(this._value,t)?0:-1},Be.prototype.lastIndexOf=function(t){return J(this._value,t)?this.size:-1},Be.prototype.__iterate=function(t,e){for(var n=0;nt||this.size===1/0||void 0!==this.size&&t>this.size?e:this.find(function(e,n){return n===t},void 0,e)},has:function(t){return t=u(this,t),t>=0&&(void 0!==this.size?this.size===1/0||ti;i++)r[i]=t[i+e];return r}function o(t){return void 0===t.size&&(t.size=t.__iterate(a)),t.size}function u(t,e){return e>=0?+e:o(t)+ +e}function a(){return!0}function s(t,e,n){return(0===t||void 0!==n&&-n>=t)&&(void 0===e||void 0!==n&&e>=n)}function c(t,e){return l(t,e,0)}function f(t,e){return l(t,e,e)}function l(t,e,n){return void 0===t?n:0>t?Math.max(0,e+t):void 0===e?t:Math.min(e,t)}function h(t){return d(t)?t:C(t)}function p(t){return y(t)?t:k(t)}function _(t){return g(t)?t:x(t)}function v(t){return d(t)&&!m(t)?t:M(t)}function d(t){return!(!t||!t[vn])}function y(t){return!(!t||!t[dn])}function g(t){return!(!t||!t[yn])}function m(t){return y(t)||g(t)}function w(t){return!(!t||!t[gn])}function b(t){this.next=t}function T(t,e,n,r){var i=0===t?e:1===t?n:[e,n];return r?r.value=i:r={value:i,done:!1},r}function E(){return{value:void 0,done:!0}}function O(t){return!!A(t)}function I(t){return t&&"function"==typeof t.next}function S(t){var e=A(t);return e&&e.call(t)}function A(t){var e=t&&(Tn&&t[Tn]||t[En]);return"function"==typeof e?e:void 0}function N(t){return t&&"number"==typeof t.length}function C(t){return null===t||void 0===t?P():d(t)?t.toSeq():W(t)}function k(t){return null===t||void 0===t?P().toKeyedSeq():d(t)?y(t)?t.toSeq():t.fromEntrySeq():q(t)}function x(t){return null===t||void 0===t?P():d(t)?y(t)?t.entrySeq():t.toIndexedSeq():U(t)}function M(t){return(null===t||void 0===t?P():d(t)?y(t)?t.entrySeq():t:U(t)).toSetSeq()}function D(t){this._array=t,this.size=t.length}function R(t){var e=Object.keys(t);this._object=t,this._keys=e,this.size=e.length}function j(t){this._iterable=t,this.size=t.length||t.size}function z(t){this._iterator=t,this._iteratorCache=[]}function L(t){return!(!t||!t[In])}function P(){return Sn||(Sn=new D([]))}function q(t){var e=Array.isArray(t)?new D(t).fromEntrySeq():I(t)?new z(t).fromEntrySeq():O(t)?new j(t).fromEntrySeq():"object"==typeof t?new R(t):void 0;if(!e)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+t);return e}function U(t){var e=G(t);if(!e)throw new TypeError("Expected Array or iterable object of values: "+t);return e}function W(t){var e=G(t)||"object"==typeof t&&new R(t);if(!e)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+t);return e}function G(t){return N(t)?new D(t):I(t)?new z(t):O(t)?new j(t):void 0}function V(t,e,n,r){var i=t._cache;if(i){for(var o=i.length-1,u=0;o>=u;u++){var a=i[n?o-u:u];if(e(a[1],r?a[0]:u,t)===!1)return u+1}return u}return t.__iterateUncached(e,n)}function K(t,e,n,r){var i=t._cache;if(i){var o=i.length-1,u=0;return new b(function(){var t=i[n?o-u:u];return u++>o?E():T(e,r?t[0]:u-1,t[1])})}return t.__iteratorUncached(e,n)}function $(){throw TypeError("Abstract")}function F(){}function H(){}function B(){}function J(t,e){if(t===e||t!==t&&e!==e)return!0;if(!t||!e)return!1;if("function"==typeof t.valueOf&&"function"==typeof e.valueOf){if(t=t.valueOf(),e=e.valueOf(),t===e||t!==t&&e!==e)return!0;if(!t||!e)return!1}return"function"==typeof t.equals&&"function"==typeof e.equals&&t.equals(e)?!0:!1}function Y(t,e){return e?X(e,t,"",{"":t}):Q(t)}function X(t,e,n,r){return Array.isArray(e)?t.call(r,n,x(e).map(function(n,r){return X(t,n,r,e)})):Z(e)?t.call(r,n,k(e).map(function(n,r){return X(t,n,r,e)})):e}function Q(t){return Array.isArray(t)?x(t).map(Q).toList():Z(t)?k(t).map(Q).toMap():t}function Z(t){return t&&(t.constructor===Object||void 0===t.constructor)}function tt(t){return t>>>1&1073741824|3221225471&t}function et(t){if(t===!1||null===t||void 0===t)return 0;if("function"==typeof t.valueOf&&(t=t.valueOf(),t===!1||null===t||void 0===t))return 0;if(t===!0)return 1;var e=typeof t;if("number"===e){var n=0|t;for(n!==t&&(n^=4294967295*t);t>4294967295;)t/=4294967295,n^=t;return tt(n)}return"string"===e?t.length>Rn?nt(t):rt(t):"function"==typeof t.hashCode?t.hashCode():it(t)}function nt(t){var e=Ln[t];return void 0===e&&(e=rt(t),zn===jn&&(zn=0,Ln={}),zn++,Ln[t]=e),e}function rt(t){for(var e=0,n=0;n0)switch(t.nodeType){case 1:return t.uniqueID;case 9:return t.documentElement&&t.documentElement.uniqueID}}function ut(t,e){if(!t)throw new Error(e)}function at(t){ut(t!==1/0,"Cannot perform this action with an infinite size.")}function st(t,e){this._iter=t,this._useKeys=e,this.size=t.size}function ct(t){this._iter=t,this.size=t.size}function ft(t){this._iter=t,this.size=t.size}function lt(t){this._iter=t,this.size=t.size}function ht(t){var e=Dt(t);return e._iter=t,e.size=t.size,e.flip=function(){return t},e.reverse=function(){var e=t.reverse.apply(this);return e.flip=function(){return t.reverse()},e},e.has=function(e){return t.includes(e)},e.includes=function(e){return t.has(e)},e.cacheResult=Rt,e.__iterateUncached=function(e,n){var r=this;return t.__iterate(function(t,n){return e(n,t,r)!==!1},n)},e.__iteratorUncached=function(e,n){if(e===bn){var r=t.__iterator(e,n);return new b(function(){var t=r.next();if(!t.done){var e=t.value[0];t.value[0]=t.value[1],t.value[1]=e}return t})}return t.__iterator(e===wn?mn:wn,n)},e}function pt(t,e,n){var r=Dt(t);return r.size=t.size,r.has=function(e){return t.has(e)},r.get=function(r,i){var o=t.get(r,hn);return o===hn?i:e.call(n,o,r,t)},r.__iterateUncached=function(r,i){var o=this;return t.__iterate(function(t,i,u){return r(e.call(n,t,i,u),i,o)!==!1},i)},r.__iteratorUncached=function(r,i){var o=t.__iterator(bn,i);return new b(function(){var i=o.next();if(i.done)return i;var u=i.value,a=u[0];return T(r,a,e.call(n,u[1],a,t),i)})},r}function _t(t,e){var n=Dt(t);return n._iter=t,n.size=t.size,n.reverse=function(){return t},t.flip&&(n.flip=function(){var e=ht(t);return e.reverse=function(){return t.flip()},e}),n.get=function(n,r){return t.get(e?n:-1-n,r)},n.has=function(n){return t.has(e?n:-1-n)},n.includes=function(e){return t.includes(e)},n.cacheResult=Rt,n.__iterate=function(e,n){var r=this;return t.__iterate(function(t,n){return e(t,n,r)},!n)},n.__iterator=function(e,n){return t.__iterator(e,!n)},n}function vt(t,e,n,r){var i=Dt(t);return r&&(i.has=function(r){var i=t.get(r,hn);return i!==hn&&!!e.call(n,i,r,t)},i.get=function(r,i){var o=t.get(r,hn);return o!==hn&&e.call(n,o,r,t)?o:i}),i.__iterateUncached=function(i,o){var u=this,a=0;return t.__iterate(function(t,o,s){return e.call(n,t,o,s)?(a++,i(t,r?o:a-1,u)):void 0},o),a},i.__iteratorUncached=function(i,o){var u=t.__iterator(bn,o),a=0;return new b(function(){for(;;){var o=u.next();if(o.done)return o;var s=o.value,c=s[0],f=s[1];if(e.call(n,f,c,t))return T(i,r?c:a++,f,o)}})},i}function dt(t,e,n){var r=Lt().asMutable();return t.__iterate(function(i,o){r.update(e.call(n,i,o,t),0,function(t){return t+1})}),r.asImmutable()}function yt(t,e,n){var r=y(t),i=(w(t)?Ee():Lt()).asMutable();t.__iterate(function(o,u){i.update(e.call(n,o,u,t),function(t){return t=t||[],t.push(r?[u,o]:o),t})});var o=Mt(t);return i.map(function(e){return Ct(t,o(e))})}function gt(t,e,n,r){var i=t.size;if(s(e,n,i))return t;var o=c(e,i),a=f(n,i);if(o!==o||a!==a)return gt(t.toSeq().cacheResult(),e,n,r);var l,h=a-o;h===h&&(l=0>h?0:h);var p=Dt(t);return p.size=l,!r&&L(t)&&l>=0&&(p.get=function(e,n){return e=u(this,e),e>=0&&l>e?t.get(e+o,n):n}),p.__iterateUncached=function(e,n){var i=this;if(0===l)return 0;if(n)return this.cacheResult().__iterate(e,n);var u=0,a=!0,s=0;return t.__iterate(function(t,n){return a&&(a=u++l)return E();var t=i.next();return r||e===wn?t:e===mn?T(e,a-1,void 0,t):T(e,a-1,t.value[1],t)})},p}function mt(t,e,n){var r=Dt(t);return r.__iterateUncached=function(r,i){var o=this;if(i)return this.cacheResult().__iterate(r,i);var u=0;return t.__iterate(function(t,i,a){return e.call(n,t,i,a)&&++u&&r(t,i,o)}),u},r.__iteratorUncached=function(r,i){var o=this;if(i)return this.cacheResult().__iterator(r,i);var u=t.__iterator(bn,i),a=!0;return new b(function(){if(!a)return E();var t=u.next();if(t.done)return t;var i=t.value,s=i[0],c=i[1];return e.call(n,c,s,o)?r===bn?t:T(r,s,c,t):(a=!1,E())})},r}function wt(t,e,n,r){var i=Dt(t);return i.__iterateUncached=function(i,o){var u=this;if(o)return this.cacheResult().__iterate(i,o);var a=!0,s=0;return t.__iterate(function(t,o,c){return a&&(a=e.call(n,t,o,c))?void 0:(s++,i(t,r?o:s-1,u))}),s},i.__iteratorUncached=function(i,o){var u=this;if(o)return this.cacheResult().__iterator(i,o);var a=t.__iterator(bn,o),s=!0,c=0;return new b(function(){var t,o,f;do{if(t=a.next(),t.done)return r||i===wn?t:i===mn?T(i,c++,void 0,t):T(i,c++,t.value[1],t);var l=t.value;o=l[0],f=l[1],s&&(s=e.call(n,f,o,u))}while(s);return i===bn?t:T(i,o,f,t)})},i}function bt(t,e){var n=y(t),r=[t].concat(e).map(function(t){return d(t)?n&&(t=p(t)):t=n?q(t):U(Array.isArray(t)?t:[t]),t}).filter(function(t){return 0!==t.size});if(0===r.length)return t;if(1===r.length){var i=r[0];if(i===t||n&&y(i)||g(t)&&g(i))return i}var o=new D(r);return n?o=o.toKeyedSeq():g(t)||(o=o.toSetSeq()),o=o.flatten(!0),o.size=r.reduce(function(t,e){if(void 0!==t){var n=e.size;if(void 0!==n)return t+n}},0),o}function Tt(t,e,n){var r=Dt(t);return r.__iterateUncached=function(r,i){function o(t,s){var c=this;t.__iterate(function(t,i){return(!e||e>s)&&d(t)?o(t,s+1):r(t,n?i:u++,c)===!1&&(a=!0),!a},i)}var u=0,a=!1;return o(t,0),u},r.__iteratorUncached=function(r,i){var o=t.__iterator(r,i),u=[],a=0;return new b(function(){for(;o;){var t=o.next();if(t.done===!1){var s=t.value;if(r===bn&&(s=s[1]),e&&!(u.length0}function Nt(t,e,n){var r=Dt(t);return r.size=new D(n).map(function(t){return t.size}).min(),r.__iterate=function(t,e){for(var n,r=this.__iterator(wn,e),i=0;!(n=r.next()).done&&t(n.value,i++,this)!==!1;);return i},r.__iteratorUncached=function(t,r){var i=n.map(function(t){return t=h(t),S(r?t.reverse():t)}),o=0,u=!1;return new b(function(){var n;return u||(n=i.map(function(t){return t.next()}),u=n.some(function(t){return t.done})),u?E():T(t,o++,e.apply(null,n.map(function(t){return t.value})))})},r}function Ct(t,e){return L(t)?e:t.constructor(e)}function kt(t){if(t!==Object(t))throw new TypeError("Expected [K, V] tuple: "+t)}function xt(t){return at(t.size),o(t)}function Mt(t){return y(t)?p:g(t)?_:v}function Dt(t){return Object.create((y(t)?k:g(t)?x:M).prototype)}function Rt(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):C.prototype.cacheResult.call(this)}function jt(t,e){return t>e?1:e>t?-1:0}function zt(t){var e=S(t);if(!e){if(!N(t))throw new TypeError("Expected iterable or array-like: "+t);e=S(h(t))}return e}function Lt(t){return null===t||void 0===t?Bt():Pt(t)?t:Bt().withMutations(function(e){var n=p(t);at(n.size),n.forEach(function(t,n){return e.set(n,t)})})}function Pt(t){return!(!t||!t[Pn])}function qt(t,e){this.ownerID=t,this.entries=e}function Ut(t,e,n){this.ownerID=t,this.bitmap=e,this.nodes=n}function Wt(t,e,n){this.ownerID=t,this.count=e,this.nodes=n}function Gt(t,e,n){this.ownerID=t,this.keyHash=e,this.entries=n}function Vt(t,e,n){this.ownerID=t,this.keyHash=e,this.entry=n}function Kt(t,e,n){this._type=e,this._reverse=n,this._stack=t._root&&Ft(t._root)}function $t(t,e){return T(t,e[0],e[1])}function Ft(t,e){return{node:t,index:0,__prev:e}}function Ht(t,e,n,r){var i=Object.create(qn);return i.size=t,i._root=e,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function Bt(){return Un||(Un=Ht(0))}function Jt(t,n,r){var i,o;if(t._root){var u=e(pn),a=e(_n);if(i=Yt(t._root,t.__ownerID,0,void 0,n,r,u,a),!a.value)return t;o=t.size+(u.value?r===hn?-1:1:0)}else{if(r===hn)return t;o=1,i=new qt(t.__ownerID,[[n,r]])}return t.__ownerID?(t.size=o,t._root=i,t.__hash=void 0,t.__altered=!0,t):i?Ht(o,i):Bt()}function Yt(t,e,r,i,o,u,a,s){return t?t.update(e,r,i,o,u,a,s):u===hn?t:(n(s),n(a),new Vt(e,i,[o,u]))}function Xt(t){return t.constructor===Vt||t.constructor===Gt}function Qt(t,e,n,r,i){if(t.keyHash===r)return new Gt(e,r,[t.entry,i]);var o,u=(0===n?t.keyHash:t.keyHash>>>n)&ln,a=(0===n?r:r>>>n)&ln,s=u===a?[Qt(t,e,n+cn,r,i)]:(o=new Vt(e,r,i),a>u?[t,o]:[o,t]);return new Ut(e,1<a;a++,s<<=1){var f=e[a];void 0!==f&&a!==r&&(i|=s,u[o++]=f)}return new Ut(t,i,u)}function ee(t,e,n,r,i){for(var o=0,u=new Array(fn),a=0;0!==n;a++,n>>>=1)u[a]=1&n?e[o++]:void 0;return u[r]=i,new Wt(t,o+1,u)}function ne(t,e,n){for(var r=[],i=0;i>1&1431655765,t=(858993459&t)+(t>>2&858993459),t=t+(t>>4)&252645135,t+=t>>8,t+=t>>16,127&t}function ae(t,e,n,r){var o=r?t:i(t);return o[e]=n,o}function se(t,e,n,r){var i=t.length+1;if(r&&e+1===i)return t[e]=n,t;for(var o=new Array(i),u=0,a=0;i>a;a++)a===e?(o[a]=n,u=-1):o[a]=t[a+u];return o}function ce(t,e,n){var r=t.length-1;if(n&&e===r)return t.pop(),t;for(var i=new Array(r),o=0,u=0;r>u;u++)u===e&&(o=1),i[u]=t[u+o];return i}function fe(t){var e=ve();if(null===t||void 0===t)return e;if(le(t))return t;var n=_(t),r=n.size;return 0===r?e:(at(r),r>0&&fn>r?_e(0,r,cn,null,new he(n.toArray())):e.withMutations(function(t){t.setSize(r),n.forEach(function(e,n){return t.set(n,e)})}))}function le(t){return!(!t||!t[Kn])}function he(t,e){this.array=t,this.ownerID=e}function pe(t,e){function n(t,e,n){return 0===e?r(t,n):i(t,e,n)}function r(t,n){var r=n===a?s&&s.array:t&&t.array,i=n>o?0:o-n,c=u-n;return c>fn&&(c=fn),function(){if(i===c)return Hn;var t=e?--c:i++;return r&&r[t]}}function i(t,r,i){var a,s=t&&t.array,c=i>o?0:o-i>>r,f=(u-i>>r)+1;return f>fn&&(f=fn),function(){for(;;){if(a){var t=a();if(t!==Hn)return t;a=null}if(c===f)return Hn;var o=e?--f:c++;a=n(s&&s[o],r-cn,i+(o<=t.size||0>n)return t.withMutations(function(t){0>n?we(t,n).set(0,r):we(t,0,n+1).set(n,r)});n+=t._origin;var i=t._tail,o=t._root,a=e(_n);return n>=Te(t._capacity)?i=ye(i,t.__ownerID,0,n,r,a):o=ye(o,t.__ownerID,t._level,n,r,a),a.value?t.__ownerID?(t._root=o,t._tail=i,t.__hash=void 0,t.__altered=!0,t):_e(t._origin,t._capacity,t._level,o,i):t}function ye(t,e,r,i,o,u){var a=i>>>r&ln,s=t&&a0){var f=t&&t.array[a],l=ye(f,e,r-cn,i,o,u);return l===f?t:(c=ge(t,e),c.array[a]=l,c)}return s&&t.array[a]===o?t:(n(u),c=ge(t,e),void 0===o&&a===c.array.length-1?c.array.pop():c.array[a]=o,c)}function ge(t,e){return e&&t&&e===t.ownerID?t:new he(t?t.array.slice():[],e)}function me(t,e){if(e>=Te(t._capacity))return t._tail;if(e<1<0;)n=n.array[e>>>r&ln],r-=cn;return n}}function we(t,e,n){var i=t.__ownerID||new r,o=t._origin,u=t._capacity,a=o+e,s=void 0===n?u:0>n?u+n:o+n;if(a===o&&s===u)return t;if(a>=s)return t.clear();for(var c=t._level,f=t._root,l=0;0>a+l;)f=new he(f&&f.array.length?[void 0,f]:[],i),c+=cn,l+=1<=1<p?me(t,s-1):p>h?new he([],i):_;if(_&&p>h&&u>a&&_.array.length){f=ge(f,i);for(var d=f,y=c;y>cn;y-=cn){var g=h>>>y&ln;d=d.array[g]=ge(d.array[g],i)}d.array[h>>>cn&ln]=_}if(u>s&&(v=v&&v.removeAfter(i,0,s)),a>=p)a-=p,s-=p,c=cn,f=null,v=v&&v.removeBefore(i,0,a);else if(a>o||h>p){for(l=0;f;){var m=a>>>c&ln;if(m!==p>>>c&ln)break;m&&(l+=(1<o&&(f=f.removeBefore(i,c,a-l)),f&&h>p&&(f=f.removeAfter(i,c,p-l)),l&&(a-=l,s-=l)}return t.__ownerID?(t.size=s-a,t._origin=a,t._capacity=s,t._level=c,t._root=f,t._tail=v,t.__hash=void 0,t.__altered=!0,t):_e(a,s,c,f,v)}function be(t,e,n){for(var r=[],i=0,o=0;oi&&(i=a.size),d(u)||(a=a.map(function(t){return Y(t)})),r.push(a)}return i>t.size&&(t=t.setSize(i)),ie(t,e,r)}function Te(t){return fn>t?0:t-1>>>cn<=fn&&u.size>=2*o.size?(i=u.filter(function(t,e){return void 0!==t&&a!==e}),r=i.toKeyedSeq().map(function(t){return t[0]}).flip().toMap(),t.__ownerID&&(r.__ownerID=i.__ownerID=t.__ownerID)):(r=o.remove(e),i=a===u.size-1?u.pop():u.set(a,void 0))}else if(s){if(n===u.get(a)[1])return t;r=o,i=u.set(a,[e,n])}else r=o.set(e,u.size),i=u.set(u.size,[e,n]);return t.__ownerID?(t.size=r.size,t._map=r,t._list=i,t.__hash=void 0,t):Ie(r,i)}function Ne(t){return null===t||void 0===t?xe():Ce(t)?t:xe().unshiftAll(t)}function Ce(t){return!(!t||!t[Jn])}function ke(t,e,n,r){var i=Object.create(Yn);return i.size=t,i._head=e,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function xe(){return Xn||(Xn=ke(0))}function Me(t){return null===t||void 0===t?ze():De(t)?t:ze().withMutations(function(e){var n=v(t);at(n.size),n.forEach(function(t){return e.add(t)})})}function De(t){return!(!t||!t[Qn])}function Re(t,e){return t.__ownerID?(t.size=e.size,t._map=e,t):e===t._map?t:0===e.size?t.__empty():t.__make(e)}function je(t,e){var n=Object.create(Zn);return n.size=t?t.size:0,n._map=t,n.__ownerID=e,n}function ze(){return tr||(tr=je(Bt()))}function Le(t){return null===t||void 0===t?Ue():Pe(t)?t:Ue().withMutations(function(e){var n=v(t);at(n.size),n.forEach(function(t){return e.add(t)})})}function Pe(t){return De(t)&&w(t)}function qe(t,e){var n=Object.create(er);return n.size=t?t.size:0,n._map=t,n.__ownerID=e,n}function Ue(){return nr||(nr=qe(Se()))}function We(t,e){var n,r=function(o){if(o instanceof r)return o;if(!(this instanceof r))return new r(o);if(!n){n=!0;var u=Object.keys(t);Ke(i,u),i.size=u.length,i._name=e,i._keys=u,i._defaultValues=t}this._map=Lt(o)},i=r.prototype=Object.create(rr);return i.constructor=r,r}function Ge(t,e,n){var r=Object.create(Object.getPrototypeOf(t));return r._map=e,r.__ownerID=n,r}function Ve(t){return t._name||t.constructor.name||"Record"}function Ke(t,e){try{e.forEach($e.bind(void 0,t))}catch(n){}}function $e(t,e){Object.defineProperty(t,e,{get:function(){return this.get(e)},set:function(t){ut(this.__ownerID,"Cannot set on an immutable record."),this.set(e,t)}})}function Fe(t,e){if(t===e)return!0;if(!d(e)||void 0!==t.size&&void 0!==e.size&&t.size!==e.size||void 0!==t.__hash&&void 0!==e.__hash&&t.__hash!==e.__hash||y(t)!==y(e)||g(t)!==g(e)||w(t)!==w(e))return!1;if(0===t.size&&0===e.size)return!0;var n=!m(t);if(w(t)){var r=t.entries();return e.every(function(t,e){var i=r.next().value;return i&&J(i[1],t)&&(n||J(i[0],e))})&&r.next().done}var i=!1;if(void 0===t.size)if(void 0===e.size)"function"==typeof t.cacheResult&&t.cacheResult();else{i=!0;var o=t;t=e,e=o}var u=!0,a=e.__iterate(function(e,r){return(n?t.has(e):i?J(e,t.get(r,hn)):J(t.get(r,hn),e))?void 0:(u=!1,!1)});return u&&t.size===a}function He(t,e,n){if(!(this instanceof He))return new He(t,e,n);if(ut(0!==n,"Cannot step a Range by 0"),t=t||0,void 0===e&&(e=1/0),n=void 0===n?1:Math.abs(n),t>e&&(n=-n),this._start=t,this._end=e,this._step=n,this.size=Math.max(0,Math.ceil((e-t)/n-1)+1),0===this.size){if(ir)return ir;ir=this}}function Be(t,e){if(!(this instanceof Be))return new Be(t,e);if(this._value=t,this.size=void 0===e?1/0:Math.max(0,e),0===this.size){if(or)return or;or=this}}function Je(t,e){var n=function(n){t.prototype[n]=e[n]};return Object.keys(e).forEach(n),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(e).forEach(n),t}function Ye(t,e){return e}function Xe(t,e){return[e,t]}function Qe(t){return function(){return!t.apply(this,arguments)}}function Ze(t){return function(){return-t.apply(this,arguments)}}function tn(t){return"string"==typeof t?JSON.stringify(t):t}function en(){return i(arguments)}function nn(t,e){return e>t?1:t>e?-1:0}function rn(t){if(t.size===1/0)return 0;var e=w(t),n=y(t),r=e?1:0,i=t.__iterate(n?e?function(t,e){r=31*r+un(et(t),et(e))|0}:function(t,e){r=r+un(et(t),et(e))|0}:e?function(t){r=31*r+et(t)|0}:function(t){r=r+et(t)|0});return on(i,r)}function on(t,e){return e=Nn(e,3432918353),e=Nn(e<<15|e>>>-15,461845907),e=Nn(e<<13|e>>>-13,5),e=(e+3864292196|0)^t,e=Nn(e^e>>>16,2246822507),e=Nn(e^e>>>13,3266489909),e=tt(e^e>>>16)}function un(t,e){return t^e+2654435769+(t<<6)+(t>>2)|0}var an=Array.prototype.slice,sn="delete",cn=5,fn=1<=i;i++)if(t(n[e?r-i:i],i,this)===!1)return i+1;return i},D.prototype.__iterator=function(t,e){var n=this._array,r=n.length-1,i=0;return new b(function(){return i>r?E():T(t,i,n[e?r-i++:i++])})},t(R,k),R.prototype.get=function(t,e){return void 0===e||this.has(t)?this._object[t]:e},R.prototype.has=function(t){return this._object.hasOwnProperty(t)},R.prototype.__iterate=function(t,e){for(var n=this._object,r=this._keys,i=r.length-1,o=0;i>=o;o++){var u=r[e?i-o:o];if(t(n[u],u,this)===!1)return o+1}return o},R.prototype.__iterator=function(t,e){var n=this._object,r=this._keys,i=r.length-1,o=0;return new b(function(){var u=r[e?i-o:o];return o++>i?E():T(t,u,n[u])})},R.prototype[gn]=!0,t(j,x),j.prototype.__iterateUncached=function(t,e){if(e)return this.cacheResult().__iterate(t,e);var n=this._iterable,r=S(n),i=0;if(I(r))for(var o;!(o=r.next()).done&&t(o.value,i++,this)!==!1;);return i},j.prototype.__iteratorUncached=function(t,e){if(e)return this.cacheResult().__iterator(t,e);var n=this._iterable,r=S(n);if(!I(r))return new b(E);var i=0;return new b(function(){var e=r.next();return e.done?e:T(t,i++,e.value)})},t(z,x),z.prototype.__iterateUncached=function(t,e){if(e)return this.cacheResult().__iterate(t,e);for(var n=this._iterator,r=this._iteratorCache,i=0;i=r.length){var e=n.next();if(e.done)return e;r[i]=e.value}return T(t,i,r[i++])})};var Sn;t($,h),t(F,$),t(H,$),t(B,$),$.Keyed=F,$.Indexed=H,$.Set=B;var An,Nn="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(t,e){t=0|t,e=0|e;var n=65535&t,r=65535&e;return n*r+((t>>>16)*r+n*(e>>>16)<<16>>>0)|0},Cn=Object.isExtensible,kn=function(){try{return Object.defineProperty({},"@",{}),!0}catch(t){return!1}}(),xn="function"==typeof WeakMap;xn&&(An=new WeakMap);var Mn=0,Dn="__immutablehash__";"function"==typeof Symbol&&(Dn=Symbol(Dn));var Rn=16,jn=255,zn=0,Ln={};t(st,k),st.prototype.get=function(t,e){return this._iter.get(t,e)},st.prototype.has=function(t){return this._iter.has(t)},st.prototype.valueSeq=function(){return this._iter.valueSeq()},st.prototype.reverse=function(){var t=this,e=_t(this,!0);return this._useKeys||(e.valueSeq=function(){return t._iter.toSeq().reverse()}),e},st.prototype.map=function(t,e){var n=this,r=pt(this,t,e);return this._useKeys||(r.valueSeq=function(){return n._iter.toSeq().map(t,e)}),r},st.prototype.__iterate=function(t,e){var n,r=this;return this._iter.__iterate(this._useKeys?function(e,n){return t(e,n,r)}:(n=e?xt(this):0,function(i){return t(i,e?--n:n++,r)}),e)},st.prototype.__iterator=function(t,e){if(this._useKeys)return this._iter.__iterator(t,e);var n=this._iter.__iterator(wn,e),r=e?xt(this):0;return new b(function(){var i=n.next();return i.done?i:T(t,e?--r:r++,i.value,i)})},st.prototype[gn]=!0,t(ct,x),ct.prototype.includes=function(t){return this._iter.includes(t)},ct.prototype.__iterate=function(t,e){var n=this,r=0;return this._iter.__iterate(function(e){return t(e,r++,n)},e)},ct.prototype.__iterator=function(t,e){var n=this._iter.__iterator(wn,e),r=0;return new b(function(){var e=n.next();return e.done?e:T(t,r++,e.value,e)})},t(ft,M),ft.prototype.has=function(t){return this._iter.includes(t)},ft.prototype.__iterate=function(t,e){var n=this;return this._iter.__iterate(function(e){return t(e,e,n)},e)},ft.prototype.__iterator=function(t,e){var n=this._iter.__iterator(wn,e);return new b(function(){var e=n.next();return e.done?e:T(t,e.value,e.value,e)})},t(lt,k),lt.prototype.entrySeq=function(){return this._iter.toSeq()},lt.prototype.__iterate=function(t,e){var n=this;return this._iter.__iterate(function(e){if(e){kt(e);var r=d(e);return t(r?e.get(1):e[1],r?e.get(0):e[0],n)}},e)},lt.prototype.__iterator=function(t,e){var n=this._iter.__iterator(wn,e);return new b(function(){for(;;){var e=n.next();if(e.done)return e;var r=e.value;if(r){kt(r);var i=d(r);return T(t,i?r.get(0):r[0],i?r.get(1):r[1],e)}}})},ct.prototype.cacheResult=st.prototype.cacheResult=ft.prototype.cacheResult=lt.prototype.cacheResult=Rt,t(Lt,F),Lt.prototype.toString=function(){return this.__toString("Map {","}")},Lt.prototype.get=function(t,e){return this._root?this._root.get(0,void 0,t,e):e},Lt.prototype.set=function(t,e){return Jt(this,t,e)},Lt.prototype.setIn=function(t,e){return this.updateIn(t,hn,function(){return e})},Lt.prototype.remove=function(t){return Jt(this,t,hn)},Lt.prototype.deleteIn=function(t){return this.updateIn(t,function(){return hn})},Lt.prototype.update=function(t,e,n){return 1===arguments.length?t(this):this.updateIn([t],e,n)},Lt.prototype.updateIn=function(t,e,n){n||(n=e,e=void 0);var r=oe(this,zt(t),e,n);return r===hn?void 0:r},Lt.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):Bt()},Lt.prototype.merge=function(){return ne(this,void 0,arguments)},Lt.prototype.mergeWith=function(t){var e=an.call(arguments,1);return ne(this,t,e)},Lt.prototype.mergeIn=function(t){var e=an.call(arguments,1);return this.updateIn(t,Bt(),function(t){return"function"==typeof t.merge?t.merge.apply(t,e):e[e.length-1]})},Lt.prototype.mergeDeep=function(){return ne(this,re(void 0),arguments)},Lt.prototype.mergeDeepWith=function(t){var e=an.call(arguments,1);return ne(this,re(t),e)},Lt.prototype.mergeDeepIn=function(t){var e=an.call(arguments,1);return this.updateIn(t,Bt(),function(t){return"function"==typeof t.mergeDeep?t.mergeDeep.apply(t,e):e[e.length-1]})},Lt.prototype.sort=function(t){return Ee(It(this,t))},Lt.prototype.sortBy=function(t,e){return Ee(It(this,e,t))},Lt.prototype.withMutations=function(t){var e=this.asMutable();return t(e),e.wasAltered()?e.__ensureOwner(this.__ownerID):this},Lt.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new r)},Lt.prototype.asImmutable=function(){return this.__ensureOwner()},Lt.prototype.wasAltered=function(){return this.__altered},Lt.prototype.__iterator=function(t,e){return new Kt(this,t,e)},Lt.prototype.__iterate=function(t,e){var n=this,r=0;return this._root&&this._root.iterate(function(e){return r++,t(e[1],e[0],n)},e),r},Lt.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?Ht(this.size,this._root,t,this.__hash):(this.__ownerID=t, +this.__altered=!1,this)},Lt.isMap=Pt;var Pn="@@__IMMUTABLE_MAP__@@",qn=Lt.prototype;qn[Pn]=!0,qn[sn]=qn.remove,qn.removeIn=qn.deleteIn,qt.prototype.get=function(t,e,n,r){for(var i=this.entries,o=0,u=i.length;u>o;o++)if(J(n,i[o][0]))return i[o][1];return r},qt.prototype.update=function(t,e,r,o,u,a,s){for(var c=u===hn,f=this.entries,l=0,h=f.length;h>l&&!J(o,f[l][0]);l++);var p=h>l;if(p?f[l][1]===u:c)return this;if(n(s),(c||!p)&&n(a),!c||1!==f.length){if(!p&&!c&&f.length>=Wn)return Zt(t,f,o,u);var _=t&&t===this.ownerID,v=_?f:i(f);return p?c?l===h-1?v.pop():v[l]=v.pop():v[l]=[o,u]:v.push([o,u]),_?(this.entries=v,this):new qt(t,v)}},Ut.prototype.get=function(t,e,n,r){void 0===e&&(e=et(n));var i=1<<((0===t?e:e>>>t)&ln),o=this.bitmap;return 0===(o&i)?r:this.nodes[ue(o&i-1)].get(t+cn,e,n,r)},Ut.prototype.update=function(t,e,n,r,i,o,u){void 0===n&&(n=et(r));var a=(0===e?n:n>>>e)&ln,s=1<=Gn)return ee(t,h,c,a,_);if(f&&!_&&2===h.length&&Xt(h[1^l]))return h[1^l];if(f&&_&&1===h.length&&Xt(_))return _;var v=t&&t===this.ownerID,d=f?_?c:c^s:c|s,y=f?_?ae(h,l,_,v):ce(h,l,v):se(h,l,_,v);return v?(this.bitmap=d,this.nodes=y,this):new Ut(t,d,y)},Wt.prototype.get=function(t,e,n,r){void 0===e&&(e=et(n));var i=(0===t?e:e>>>t)&ln,o=this.nodes[i];return o?o.get(t+cn,e,n,r):r},Wt.prototype.update=function(t,e,n,r,i,o,u){void 0===n&&(n=et(r));var a=(0===e?n:n>>>e)&ln,s=i===hn,c=this.nodes,f=c[a];if(s&&!f)return this;var l=Yt(f,t,e+cn,n,r,i,o,u);if(l===f)return this;var h=this.count;if(f){if(!l&&(h--,Vn>h))return te(t,c,h,a)}else h++;var p=t&&t===this.ownerID,_=ae(c,a,l,p);return p?(this.count=h,this.nodes=_,this):new Wt(t,h,_)},Gt.prototype.get=function(t,e,n,r){for(var i=this.entries,o=0,u=i.length;u>o;o++)if(J(n,i[o][0]))return i[o][1];return r},Gt.prototype.update=function(t,e,r,o,u,a,s){void 0===r&&(r=et(o));var c=u===hn;if(r!==this.keyHash)return c?this:(n(s),n(a),Qt(this,t,e,r,[o,u]));for(var f=this.entries,l=0,h=f.length;h>l&&!J(o,f[l][0]);l++);var p=h>l;if(p?f[l][1]===u:c)return this;if(n(s),(c||!p)&&n(a),c&&2===h)return new Vt(t,this.keyHash,f[1^l]);var _=t&&t===this.ownerID,v=_?f:i(f);return p?c?l===h-1?v.pop():v[l]=v.pop():v[l]=[o,u]:v.push([o,u]),_?(this.entries=v,this):new Gt(t,this.keyHash,v)},Vt.prototype.get=function(t,e,n,r){return J(n,this.entry[0])?this.entry[1]:r},Vt.prototype.update=function(t,e,r,i,o,u,a){var s=o===hn,c=J(i,this.entry[0]);return(c?o===this.entry[1]:s)?this:(n(a),s?void n(u):c?t&&t===this.ownerID?(this.entry[1]=o,this):new Vt(t,this.keyHash,[i,o]):(n(u),Qt(this,t,e,et(i),[i,o])))},qt.prototype.iterate=Gt.prototype.iterate=function(t,e){for(var n=this.entries,r=0,i=n.length-1;i>=r;r++)if(t(n[e?i-r:r])===!1)return!1},Ut.prototype.iterate=Wt.prototype.iterate=function(t,e){for(var n=this.nodes,r=0,i=n.length-1;i>=r;r++){var o=n[e?i-r:r];if(o&&o.iterate(t,e)===!1)return!1}},Vt.prototype.iterate=function(t,e){return t(this.entry)},t(Kt,b),Kt.prototype.next=function(){for(var t=this._type,e=this._stack;e;){var n,r=e.node,i=e.index++;if(r.entry){if(0===i)return $t(t,r.entry)}else if(r.entries){if(n=r.entries.length-1,n>=i)return $t(t,r.entries[this._reverse?n-i:i])}else if(n=r.nodes.length-1,n>=i){var o=r.nodes[this._reverse?n-i:i];if(o){if(o.entry)return $t(t,o.entry);e=this._stack=Ft(o,e)}continue}e=this._stack=this._stack.__prev}return E()};var Un,Wn=fn/4,Gn=fn/2,Vn=fn/4;t(fe,H),fe.of=function(){return this(arguments)},fe.prototype.toString=function(){return this.__toString("List [","]")},fe.prototype.get=function(t,e){if(t=u(this,t),0>t||t>=this.size)return e;t+=this._origin;var n=me(this,t);return n&&n.array[t&ln]},fe.prototype.set=function(t,e){return de(this,t,e)},fe.prototype.remove=function(t){return this.has(t)?0===t?this.shift():t===this.size-1?this.pop():this.splice(t,1):this},fe.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=cn,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):ve()},fe.prototype.push=function(){var t=arguments,e=this.size;return this.withMutations(function(n){we(n,0,e+t.length);for(var r=0;r>>e&ln;if(r>=this.array.length)return new he([],t);var i,o=0===r;if(e>0){var u=this.array[r];if(i=u&&u.removeBefore(t,e-cn,n),i===u&&o)return this}if(o&&!i)return this;var a=ge(this,t);if(!o)for(var s=0;r>s;s++)a.array[s]=void 0;return i&&(a.array[r]=i),a},he.prototype.removeAfter=function(t,e,n){if(n===e?1<>>e&ln;if(r>=this.array.length)return this;var i,o=r===this.array.length-1;if(e>0){var u=this.array[r];if(i=u&&u.removeAfter(t,e-cn,n),i===u&&o)return this}if(o&&!i)return this;var a=ge(this,t);return o||a.array.pop(),i&&(a.array[r]=i),a};var Fn,Hn={};t(Ee,Lt),Ee.of=function(){return this(arguments)},Ee.prototype.toString=function(){return this.__toString("OrderedMap {","}")},Ee.prototype.get=function(t,e){var n=this._map.get(t);return void 0!==n?this._list.get(n)[1]:e},Ee.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):Se()},Ee.prototype.set=function(t,e){return Ae(this,t,e)},Ee.prototype.remove=function(t){return Ae(this,t,hn)},Ee.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},Ee.prototype.__iterate=function(t,e){var n=this;return this._list.__iterate(function(e){return e&&t(e[1],e[0],n)},e)},Ee.prototype.__iterator=function(t,e){return this._list.fromEntrySeq().__iterator(t,e)},Ee.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t),n=this._list.__ensureOwner(t);return t?Ie(e,n,t,this.__hash):(this.__ownerID=t,this._map=e,this._list=n,this)},Ee.isOrderedMap=Oe,Ee.prototype[gn]=!0,Ee.prototype[sn]=Ee.prototype.remove;var Bn;t(Ne,H),Ne.of=function(){return this(arguments)},Ne.prototype.toString=function(){return this.__toString("Stack [","]")},Ne.prototype.get=function(t,e){var n=this._head;for(t=u(this,t);n&&t--;)n=n.next;return n?n.value:e},Ne.prototype.peek=function(){return this._head&&this._head.value},Ne.prototype.push=function(){if(0===arguments.length)return this;for(var t=this.size+arguments.length,e=this._head,n=arguments.length-1;n>=0;n--)e={value:arguments[n],next:e};return this.__ownerID?(this.size=t,this._head=e,this.__hash=void 0,this.__altered=!0,this):ke(t,e)},Ne.prototype.pushAll=function(t){if(t=_(t),0===t.size)return this;at(t.size);var e=this.size,n=this._head;return t.reverse().forEach(function(t){e++,n={value:t,next:n}}),this.__ownerID?(this.size=e,this._head=n,this.__hash=void 0,this.__altered=!0,this):ke(e,n)},Ne.prototype.pop=function(){return this.slice(1)},Ne.prototype.unshift=function(){return this.push.apply(this,arguments)},Ne.prototype.unshiftAll=function(t){return this.pushAll(t)},Ne.prototype.shift=function(){return this.pop.apply(this,arguments)},Ne.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):xe()},Ne.prototype.slice=function(t,e){if(s(t,e,this.size))return this;var n=c(t,this.size),r=f(e,this.size);if(r!==this.size)return H.prototype.slice.call(this,t,e);for(var i=this.size-n,o=this._head;n--;)o=o.next;return this.__ownerID?(this.size=i,this._head=o,this.__hash=void 0,this.__altered=!0,this):ke(i,o)},Ne.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?ke(this.size,this._head,t,this.__hash):(this.__ownerID=t,this.__altered=!1,this)},Ne.prototype.__iterate=function(t,e){if(e)return this.reverse().__iterate(t);for(var n=0,r=this._head;r&&t(r.value,n++,this)!==!1;)r=r.next;return n},Ne.prototype.__iterator=function(t,e){if(e)return this.reverse().__iterator(t);var n=0,r=this._head;return new b(function(){if(r){var e=r.value;return r=r.next,T(t,n++,e)}return E()})},Ne.isStack=Ce;var Jn="@@__IMMUTABLE_STACK__@@",Yn=Ne.prototype;Yn[Jn]=!0,Yn.withMutations=qn.withMutations,Yn.asMutable=qn.asMutable,Yn.asImmutable=qn.asImmutable,Yn.wasAltered=qn.wasAltered;var Xn;t(Me,B),Me.of=function(){return this(arguments)},Me.fromKeys=function(t){return this(p(t).keySeq())},Me.prototype.toString=function(){return this.__toString("Set {","}")},Me.prototype.has=function(t){return this._map.has(t)},Me.prototype.add=function(t){return Re(this,this._map.set(t,!0))},Me.prototype.remove=function(t){return Re(this,this._map.remove(t))},Me.prototype.clear=function(){return Re(this,this._map.clear())},Me.prototype.union=function(){var t=an.call(arguments,0);return t=t.filter(function(t){return 0!==t.size}),0===t.length?this:0!==this.size||this.__ownerID||1!==t.length?this.withMutations(function(e){for(var n=0;n1?" by "+this._step:"")+" ]"},He.prototype.get=function(t,e){return this.has(t)?this._start+u(this,t)*this._step:e},He.prototype.includes=function(t){var e=(t-this._start)/this._step;return e>=0&&e=e?new He(0,0):new He(this.get(t,this._end),this.get(e,this._end),this._step))},He.prototype.indexOf=function(t){var e=t-this._start;if(e%this._step===0){var n=e/this._step;if(n>=0&&n=o;o++){if(t(i,o,this)===!1)return o+1;i+=e?-r:r}return o},He.prototype.__iterator=function(t,e){var n=this.size-1,r=this._step,i=e?this._start+n*r:this._start,o=0;return new b(function(){var u=i;return i+=e?-r:r,o>n?E():T(t,o++,u)})},He.prototype.equals=function(t){return t instanceof He?this._start===t._start&&this._end===t._end&&this._step===t._step:Fe(this,t)};var ir;t(Be,x),Be.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},Be.prototype.get=function(t,e){return this.has(t)?this._value:e},Be.prototype.includes=function(t){return J(this._value,t)},Be.prototype.slice=function(t,e){var n=this.size;return s(t,e,n)?this:new Be(this._value,f(e,n)-c(t,n))},Be.prototype.reverse=function(){return this},Be.prototype.indexOf=function(t){return J(this._value,t)?0:-1},Be.prototype.lastIndexOf=function(t){return J(this._value,t)?this.size:-1},Be.prototype.__iterate=function(t,e){for(var n=0;nt||this.size===1/0||void 0!==this.size&&t>this.size?e:this.find(function(e,n){return n===t},void 0,e)},has:function(t){return t=u(this,t),t>=0&&(void 0!==this.size?this.size===1/0||t199&&o.status<300)e(JSON.parse(o.responseText));else try{r(JSON.parse(o.responseText))}catch(t){r({})}},o.onerror=function(){return r({})},n?o.send(JSON.stringify(n)):o.send()})};e["default"]=u,t.exports=e["default"]},/*!***************************!*\ +function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(/*! ./stores/auth */12),o=r(i),u=function(t,e){var n=void 0===arguments[2]?null:arguments[2],r=void 0===arguments[3]?{}:arguments[3],i=r.authToken||o["default"].authToken,u=o["default"].host+"/api/"+e;return new Promise(function(e,r){var o=new XMLHttpRequest;o.open(t,u,!0),o.setRequestHeader("X-HA-access",i),o.onload=function(){if(o.status>199&&o.status<300)e(JSON.parse(o.responseText));else try{r(JSON.parse(o.responseText))}catch(t){r({})}},o.onerror=function(){return r({})},n?o.send(JSON.stringify(n)):o.send()})};e["default"]=u,t.exports=e["default"]},/*!***************************!*\ !*** ./~/lodash/index.js ***! \***************************/ -function(t,e,n){var r;(function(t,i){(function(){function o(t,e){if(t!==e){var n=t===t,r=e===e;if(t>e||!n||t===A&&r)return 1;if(e>t||!r||e===A&&n)return-1}return 0}function u(t,e,n){for(var r=t.length,i=n?r:-1;n?i--:++i-1;);return n}function h(t,e){for(var n=t.length;n--&&e.indexOf(t.charAt(n))>-1;);return n}function p(t,e){return o(t.criteria,e.criteria)||t.index-e.index}function _(t,e,n){for(var r=-1,i=t.criteria,u=e.criteria,a=i.length,s=n.length;++r=s?c:c*(n[r]?1:-1)}return t.index-e.index}function v(t){return Ht[t]}function d(t){return Bt[t]}function y(t){return"\\"+Xt[t]}function g(t,e,n){for(var r=t.length,i=e+(n?0:-1);n?i--:++i=t&&t>=9&&13>=t||32==t||160==t||5760==t||6158==t||t>=8192&&(8202>=t||8232==t||8233==t||8239==t||8287==t||12288==t||65279==t)}function b(t,e){for(var n=-1,r=t.length,i=-1,o=[];++ne,r=qn(0,t.length,this.__views__),i=r.start,o=r.end,u=o-i,a=n?o:i-1,s=du(u,this.__takeCount__),c=this.__iteratees__,f=c?c.length:0,l=0,h=[];t:for(;u--&&s>l;){a+=e;for(var p=-1,_=t[a];++pv.index:a-1?v.count++>=g:!d(_)))continue t}}else{var m=d(_);if(y==K)_=m;else if(!m){if(y==V)continue t;break t}}}h[l++]=_}return h}function ot(){this.__data__={}}function Ht(t){return this.has(t)&&delete this.__data__[t]}function Bt(t){return"__proto__"==t?A:this.__data__[t]}function Jt(t){return"__proto__"!=t&&Vo.call(this.__data__,t)}function Yt(t,e){return"__proto__"!=t&&(this.__data__[t]=e),this}function Xt(t){var e=t?t.length:0;for(this.data={hash:hu(null),set:new iu};e--;)this.push(t[e])}function Qt(t,e){var n=t.data,r="string"==typeof e||Oi(e)?n.set.has(e):n.hash[e];return r?0:-1}function Zt(t){var e=this.data;"string"==typeof t||Oi(t)?e.set.add(t):e.hash[t]=!0}function te(t,e){var n=-1,r=t.length;for(e||(e=No(r));++nr&&(r=i)}return r}function ce(t){for(var e=-1,n=t.length,r=Tu;++ei&&(r=i)}return r}function fe(t,e,n,r){var i=-1,o=t.length;for(r&&o&&(n=t[++i]);++i=200?Pu(e):null,c=e.length;s&&(o=Qt,u=!1,e=s);t:for(;++in&&(n=-n>i?0:i+n),r=r===A||r>i?i:+r||0,0>r&&(r+=i),i=n>r?0:r>>>0,n>>>=0;i>n;)t[n++]=e;return t}function Ie(t,e){var n=[];return Du(t,function(t,r,i){e(t,r,i)&&n.push(t)}),n}function Se(t,e,n,r){var i;return n(t,function(t,n,o){return e(t,n,o)?(i=r?n:t,!1):void 0}),i}function Ae(t,e,n){for(var r=-1,i=t.length,o=-1,u=[];++re&&(e=-e>i?0:i+e),n=n===A||n>i?i:+n||0,0>n&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var o=No(i);++r=200,s=u?Pu():null,c=[];s?(r=Qt,o=!1):(u=!1,s=e?[]:c);t:for(;++n=i){for(;i>r;){var o=r+i>>>1,u=t[o];(n?e>=u:e>u)?r=o+1:i=o}return i}return nn(t,e,_o,n)}function nn(t,e,n,r){e=n(e);for(var i=0,o=t?t.length:0,u=e!==e,a=e===A;o>i;){var s=Qo((i+o)/2),c=n(t[s]),f=c===c;if(u)var l=f||r;else l=a?f&&(r||c!==A):r?e>=c:e>c;l?i=s+1:o=s}return du(o,Ou)}function rn(t,e,n){if("function"!=typeof t)return _o;if(e===A)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 3:return function(n,r,i){return t.call(e,n,r,i)};case 4:return function(n,r,i,o){return t.call(e,n,r,i,o)};case 5:return function(n,r,i,o,u){return t.call(e,n,r,i,o,u)}}return function(){return t.apply(e,arguments)}}function on(t){return Jo.call(t,0)}function un(t,e,n){for(var r=n.length,i=-1,o=vu(t.length-r,0),u=-1,a=e.length,s=No(o+a);++u2&&n[i-2],u=i>2&&n[2],a=i>1&&n[i-1];for("function"==typeof o?(o=rn(o,a,5),i-=2):(o="function"==typeof a?a:null,i-=o?1:0),u&&Fn(n[0],n[1],u)&&(o=3>i?null:o,i=1);++r-1?n[o]:A}return Se(n,r,t)}}function gn(t){return function(e,n,r){return e&&e.length?(n=Ln(n,r,3),u(e,n,t)):-1}}function mn(t){return function(e,n,r){return n=Ln(n,r,3),Se(e,n,t,!0)}}function wn(t){return function(){var e=arguments.length;if(!e)return function(){return arguments[0]};for(var n,i=t?e:-1,o=0,u=No(e);t?i--:++im){var I=a?te(a):null,S=vu(c-m,0),N=_?O:null,x=_?null:O,M=_?T:null,D=_?null:T;e|=_?R:j,e&=~(_?j:R),v||(e&=~(C|k));var z=[t,e,n,M,N,D,x,I,s,S],L=Nn.apply(A,z);return Bn(t)&&Vu(L,z),L.placeholder=E,L}}var P=h?n:this;p&&(t=P[g]),a&&(T=tr(T,a)),l&&s=e||!pu(e))return"";var i=e-r;return n=null==n?" ":n+"",ro(n,Yo(i/n.length)).slice(0,i)}function kn(t,e,n,r){function i(){for(var e=-1,a=arguments.length,s=-1,c=r.length,f=No(a+c);++ss))return!1;for(;f&&++as:s>i)||s===r&&s===o)&&(i=s,o=t)}),o}function Ln(t,n,r){var i=e.callback||ho;return i=i===ho?me:i,r?i(t,n,r):i}function Pn(t,n,r){var i=e.indexOf||yr;return i=i===yr?a:i,t?i(t,n,r):i}function qn(t,e,n){for(var r=-1,i=n?n.length:0;++r-1&&t%1==0&&e>t}function Fn(t,e,n){if(!Oi(n))return!1;var r=typeof e;if("number"==r?Kn(n)&&$n(e,n.length):"string"==r&&e in n){var i=n[e];return t===t?t===i:i!==i}return!1}function Hn(t,e){var n=typeof t;if("string"==n&&At.test(t)||"number"==n)return!0;if(Sa(t))return!1;var r=!St.test(t);return r||null!=e&&t in ir(e)}function Bn(t){var n=Uu(t);return!!n&&t===e[n]&&n in i.prototype}function Jn(t){return"number"==typeof t&&t>-1&&t%1==0&&Au>=t}function Yn(t){return t===t&&!Oi(t)}function Xn(t,e){var n=t[1],r=e[1],i=n|r,o=z>i,u=r==z&&n==M||r==z&&n==L&&t[7].length<=e[8]||r==(z|L)&&n==M;if(!o&&!u)return t;r&C&&(t[2]=e[2],i|=n&C?0:x);var a=e[3];if(a){var s=t[3];t[3]=s?un(s,a,e[4]):te(a),t[4]=s?b(t[3],F):te(e[4])}return a=e[5],a&&(s=t[5],t[5]=s?an(s,a,e[6]):te(a),t[6]=s?b(t[5],F):te(e[6])),a=e[7],a&&(t[7]=te(a)),r&z&&(t[8]=null==t[8]?e[8]:du(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=i,t}function Qn(t,e){t=ir(t);for(var n=-1,r=e.length,i={};++nr;)u[++o]=Fe(t,r,r+=e);return u}function sr(t){for(var e=-1,n=t?t.length:0,r=-1,i=[];++ee?0:e)):[]}function fr(t,e,n){var r=t?t.length:0;return r?((n?Fn(t,e,n):null==e)&&(e=1),e=r-(+e||0),Fe(t,0,0>e?0:e)):[]}function lr(t,e,n){return t&&t.length?Ze(t,Ln(e,n,3),!0,!0):[]}function hr(t,e,n){return t&&t.length?Ze(t,Ln(e,n,3),!0):[]}function pr(t,e,n,r){var i=t?t.length:0;return i?(n&&"number"!=typeof n&&Fn(t,e,n)&&(n=0,r=i),Oe(t,e,n,r)):[]}function _r(t){return t?t[0]:A}function vr(t,e,n){var r=t?t.length:0;return n&&Fn(t,e,n)&&(e=!1),r?Ae(t,e):[]}function dr(t){var e=t?t.length:0;return e?Ae(t,!0):[]}function yr(t,e,n){var r=t?t.length:0;if(!r)return-1;if("number"==typeof n)n=0>n?vu(r+n,0):n;else if(n){var i=en(t,e),o=t[i];return(e===e?e===o:o!==o)?i:-1}return a(t,e,n||0)}function gr(t){return fr(t,1)}function mr(){for(var t=[],e=-1,n=arguments.length,r=[],i=Pn(),o=i==a,u=[];++e=120?Pu(e&&s):null))}if(n=t.length,2>n)return u;var c=t[0],f=-1,l=c?c.length:0,h=r[0];t:for(;++fn?vu(r+n,0):du(n||0,r-1))+1;else if(n){i=en(t,e,!0)-1;var o=t[i];return(e===e?e===o:o!==o)?i:-1}if(e!==e)return g(t,i,!0);for(;i--;)if(t[i]===e)return i;return-1}function Tr(){var t=arguments,e=t[0];if(!e||!e.length)return e;for(var n=0,r=Pn(),i=t.length;++n-1;)uu.call(e,o,1);return e}function Er(t,e,n){var r=[];if(!t||!t.length)return r;var i=-1,o=[],u=t.length;for(e=Ln(e,n,3);++ie?0:e)):[]}function Ar(t,e,n){var r=t?t.length:0;return r?((n?Fn(t,e,n):null==e)&&(e=1),e=r-(+e||0),Fe(t,0>e?0:e)):[]}function Nr(t,e,n){return t&&t.length?Ze(t,Ln(e,n,3),!1,!0):[]}function Cr(t,e,n){return t&&t.length?Ze(t,Ln(e,n,3)):[]}function kr(t,e,n,r){var i=t?t.length:0;if(!i)return[];null!=e&&"boolean"!=typeof e&&(r=n,n=Fn(t,e,r)?null:e,e=!1);var o=Ln();return(o!==me||null!=n)&&(n=o(n,r,3)),e&&Pn()==a?T(t,n):Xe(t,n)}function xr(t){if(!t||!t.length)return[];var e=-1,n=0;t=ue(t,function(t){return Kn(t)?(n=vu(t.length,n),!0):void 0});for(var r=No(n);++en?vu(i+n,0):n||0,"string"==typeof t||!Sa(t)&&xi(t)?i>n&&t.indexOf(e,n)>-1:Pn(t,e,n)>-1):!1}function Br(t,e,n){var r=Sa(t)?ae:ze;return e=Ln(e,n,3),r(t,e)}function Jr(t,e){return Br(t,bo(e))}function Yr(t,e,n){var r=Sa(t)?ue:Ie;return e=Ln(e,n,3),r(t,function(t,n,r){return!e(t,n,r)})}function Xr(t,e,n){if(n?Fn(t,e,n):null==e){t=rr(t);var r=t.length;return r>0?t[Ke(0,r-1)]:A}var i=Qr(t);return i.length=du(0>e?0:+e||0,i.length),i}function Qr(t){t=rr(t);for(var e=-1,n=t.length,r=No(n);++e0&&(n=e.apply(this,arguments)),1>=t&&(e=null),n}}function ai(t,e,n){function r(){h&&Xo(h),s&&Xo(s),s=h=p=A}function i(){var n=e-(pa()-f);if(0>=n||n>e){s&&Xo(s);var r=p;s=h=p=A,r&&(_=pa(),c=t.apply(l,a),h||s||(a=l=null))}else h=ou(i,n)}function o(){h&&Xo(h),s=h=p=A,(d||v!==e)&&(_=pa(),c=t.apply(l,a),h||s||(a=l=null))}function u(){if(a=arguments,f=pa(),l=this,p=d&&(h||!y),v===!1)var n=y&&!h;else{s||y||(_=f);var r=v-(f-_),u=0>=r||r>v;u?(s&&(s=Xo(s)),_=f,c=t.apply(l,a)):s||(s=ou(o,r))}return u&&h?h=Xo(h):h||e===v||(h=ou(i,e)),n&&(u=!0,c=t.apply(l,a)),!u||h||s||(a=l=null),c}var a,s,c,f,l,h,p,_=0,v=!1,d=!0;if("function"!=typeof t)throw new Lo($);if(e=0>e?0:+e||0,n===!0){var y=!0;d=!1}else Oi(n)&&(y=n.leading,v="maxWait"in n&&vu(+n.maxWait||0,e),d="trailing"in n?n.trailing:d);return u.cancel=r,u}function si(t,e){if("function"!=typeof t||e&&"function"!=typeof e)throw new Lo($);var n=function(){var r=arguments,i=n.cache,o=e?e.apply(this,r):r[0];if(i.has(o))return i.get(o);var u=t.apply(this,r);return i.set(o,u),u};return n.cache=new si.Cache,n}function ci(t){if("function"!=typeof t)throw new Lo($);return function(){return!t.apply(this,arguments)}}function fi(t){return ui(2,t)}function li(t,e){if("function"!=typeof t)throw new Lo($);return e=vu(e===A?t.length-1:+e||0,0),function(){for(var n=arguments,r=-1,i=vu(n.length-e,0),o=No(i);++r-1}function bi(t){return null==t?!0:Kn(t)&&(Sa(t)||xi(t)||yi(t)||m(t)&&Na(t.splice))?!t.length:!Pa(t).length}function Ti(t,e,n,r){if(n="function"==typeof n&&rn(n,r,3),!n&&Yn(t)&&Yn(e))return t===e;var i=n?n(t,e):A;return i===A?De(t,e,n):!!i}function Ei(t){return m(t)&&"string"==typeof t.message&&$o.call(t)==X}function Oi(t){var e=typeof t;return"function"==e||!!t&&"object"==e}function Ii(t,e,n,r){var i=Pa(e),o=i.length;if(!o)return!0;if(null==t)return!1;if(n="function"==typeof n&&rn(n,r,3),t=ir(t),!n&&1==o){var u=i[0],a=e[u];if(Yn(a))return a===t[u]&&(a!==A||u in t)}for(var s=No(o),c=No(o);o--;)a=s[o]=e[i[o]],c[o]=Yn(a);return je(t,i,s,c,n)}function Si(t){return Ci(t)&&t!=+t}function Ai(t){return null==t?!1:$o.call(t)==Q?Ho.test(Go.call(t)):m(t)&&zt.test(t)}function Ni(t){return null===t}function Ci(t){return"number"==typeof t||m(t)&&$o.call(t)==tt}function ki(t){return m(t)&&$o.call(t)==nt}function xi(t){return"string"==typeof t||m(t)&&$o.call(t)==it}function Mi(t){return m(t)&&Jn(t.length)&&!!Kt[$o.call(t)]}function Di(t){return t===A}function Ri(t){var e=t?Wu(t):0;return Jn(e)?e?te(t):[]:Fi(t)}function ji(t){return ge(t,Wi(t))}function zi(t,e,n){var r=Mu(t);return n&&Fn(t,e,n)&&(e=null),e?xu(r,e):r}function Li(t){return xe(t,Wi(t))}function Pi(t,e,n){var r=null==t?A:Me(t,or(e),e+"");return r===A?n:r}function qi(t,e){if(null==t)return!1;var n=Vo.call(t,e);return n||Hn(e)||(e=or(e),t=1==e.length?t:Me(t,Fe(e,0,-1)),e=wr(e),n=null!=t&&Vo.call(t,e)),n}function Ui(t,e,n){n&&Fn(t,e,n)&&(e=null);for(var r=-1,i=Pa(t),o=i.length,u={};++r0;++r=du(e,n)&&tn?0:+n||0,r),n-=e.length,n>=0&&t.indexOf(e,n)==n}function Zi(t){return t=c(t),t&&Tt.test(t)?t.replace(wt,d):t}function to(t){return t=c(t),t&&kt.test(t)?t.replace(Ct,"\\$&"):t}function eo(t,e,n){t=c(t),e=+e;var r=t.length;if(r>=e||!pu(e))return t;var i=(e-r)/2,o=Qo(i),u=Yo(i);return n=Cn("",u,n), -n.slice(0,o)+t+n}function no(t,e,n){return n&&Fn(t,e,n)&&(e=0),mu(t,e)}function ro(t,e){var n="";if(t=c(t),e=+e,1>e||!t||!pu(e))return n;do e%2&&(n+=t),e=Qo(e/2),t+=t;while(e);return n}function io(t,e,n){return t=c(t),n=null==n?0:du(0>n?0:+n||0,t.length),t.lastIndexOf(e,n)==n}function oo(t,n,r){var i=e.templateSettings;r&&Fn(t,n,r)&&(n=r=null),t=c(t),n=de(xu({},r||n),i,ve);var o,u,a=de(xu({},n.imports),i.imports,ve),s=Pa(a),f=Qe(a,s),l=0,h=n.interpolate||Pt,p="__p += '",_=jo((n.escape||Pt).source+"|"+h.source+"|"+(h===It?Dt:Pt).source+"|"+(n.evaluate||Pt).source+"|$","g"),v="//# sourceURL="+("sourceURL"in n?n.sourceURL:"lodash.templateSources["+ ++Vt+"]")+"\n";t.replace(_,function(e,n,r,i,a,s){return r||(r=i),p+=t.slice(l,s).replace(qt,y),n&&(o=!0,p+="' +\n__e("+n+") +\n'"),a&&(u=!0,p+="';\n"+a+";\n__p += '"),r&&(p+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=s+e.length,e}),p+="';\n";var d=n.variable;d||(p="with (obj) {\n"+p+"\n}\n"),p=(u?p.replace(dt,""):p).replace(yt,"$1").replace(gt,"$1;"),p="function("+(d||"obj")+") {\n"+(d?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(u?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+p+"return __p\n}";var g=Ya(function(){return xo(s,v+"return "+p).apply(A,f)});if(g.source=p,Ei(g))throw g;return g}function uo(t,e,n){var r=t;return(t=c(t))?(n?Fn(r,e,n):null==e)?t.slice(E(t),O(t)+1):(e+="",t.slice(l(t,e),h(t,e)+1)):t}function ao(t,e,n){var r=t;return t=c(t),t?t.slice((n?Fn(r,e,n):null==e)?E(t):l(t,e+"")):t}function so(t,e,n){var r=t;return t=c(t),t?(n?Fn(r,e,n):null==e)?t.slice(0,O(t)+1):t.slice(0,h(t,e+"")+1):t}function co(t,e,n){n&&Fn(t,e,n)&&(e=null);var r=P,i=q;if(null!=e)if(Oi(e)){var o="separator"in e?e.separator:o;r="length"in e?+e.length||0:r,i="omission"in e?c(e.omission):i}else r=+e||0;if(t=c(t),r>=t.length)return t;var u=r-i.length;if(1>u)return i;var a=t.slice(0,u);if(null==o)return a+i;if(ki(o)){if(t.slice(u).search(o)){var s,f,l=t.slice(0,u);for(o.global||(o=jo(o.source,(Rt.exec(o)||"")+"g")),o.lastIndex=0;s=o.exec(l);)f=s.index;a=a.slice(0,null==f?u:f)}}else if(t.indexOf(o,u)!=u){var h=a.lastIndexOf(o);h>-1&&(a=a.slice(0,h))}return a+i}function fo(t){return t=c(t),t&&bt.test(t)?t.replace(mt,I):t}function lo(t,e,n){return n&&Fn(t,e,n)&&(e=null),t=c(t),t.match(e||Ut)||[]}function ho(t,e,n){return n&&Fn(t,e,n)&&(e=null),m(t)?vo(t):me(t,e)}function po(t){return function(){return t}}function _o(t){return t}function vo(t){return Le(we(t,!0))}function yo(t,e){return Pe(t,we(e,!0))}function go(t,e,n){if(null==n){var r=Oi(e),i=r&&Pa(e),o=i&&i.length&&xe(e,i);(o?o.length:r)||(o=!1,n=e,e=t,t=this)}o||(o=xe(e,Pa(e)));var u=!0,a=-1,s=Na(t),c=o.length;n===!1?u=!1:Oi(n)&&"chain"in n&&(u=n.chain);for(;++at||!pu(t))return[];var r=-1,i=No(du(t,Eu));for(e=rn(e,n,1);++rr?i[r]=e(r):e(r);return i}function Io(t){var e=++Ko;return c(t)+e}function So(t,e){return(+t||0)+(+e||0)}function Ao(t,e,n){n&&Fn(t,e,n)&&(e=null);var r=Ln(),i=null==e;return r===me&&i||(i=!1,e=r(e,n,3)),i?pe(Sa(t)?t:rr(t)):Ye(t,e)}t=t?ie.defaults(re.Object(),t,ie.pick(re,Gt)):re;var No=t.Array,Co=t.Date,ko=t.Error,xo=t.Function,Mo=t.Math,Do=t.Number,Ro=t.Object,jo=t.RegExp,zo=t.String,Lo=t.TypeError,Po=No.prototype,qo=Ro.prototype,Uo=zo.prototype,Wo=(Wo=t.window)&&Wo.document,Go=xo.prototype.toString,Vo=qo.hasOwnProperty,Ko=0,$o=qo.toString,Fo=t._,Ho=jo("^"+to($o).replace(/toString|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Bo=Ai(Bo=t.ArrayBuffer)&&Bo,Jo=Ai(Jo=Bo&&new Bo(0).slice)&&Jo,Yo=Mo.ceil,Xo=t.clearTimeout,Qo=Mo.floor,Zo=Ai(Zo=Ro.getOwnPropertySymbols)&&Zo,tu=Ai(tu=Ro.getPrototypeOf)&&tu,eu=Po.push,nu=Ai(nu=Ro.preventExtensions)&&nu,ru=qo.propertyIsEnumerable,iu=Ai(iu=t.Set)&&iu,ou=t.setTimeout,uu=Po.splice,au=Ai(au=t.Uint8Array)&&au,su=Ai(su=t.WeakMap)&&su,cu=function(){try{var e=Ai(e=t.Float64Array)&&e,n=new e(new Bo(10),0,1)&&e}catch(r){}return n}(),fu=function(){var t=nu&&Ai(t=Ro.assign)&&t;try{if(t){var e=nu({1:0});e[0]=1}}catch(n){try{t(e,"xo")}catch(n){}return!e[1]&&t}return!1}(),lu=Ai(lu=No.isArray)&&lu,hu=Ai(hu=Ro.create)&&hu,pu=t.isFinite,_u=Ai(_u=Ro.keys)&&_u,vu=Mo.max,du=Mo.min,yu=Ai(yu=Co.now)&&yu,gu=Ai(gu=Do.isFinite)&&gu,mu=t.parseInt,wu=Mo.random,bu=Do.NEGATIVE_INFINITY,Tu=Do.POSITIVE_INFINITY,Eu=Mo.pow(2,32)-1,Ou=Eu-1,Iu=Eu>>>1,Su=cu?cu.BYTES_PER_ELEMENT:0,Au=Mo.pow(2,53)-1,Nu=su&&new su,Cu={},ku=e.support={};!function(t){var e=function(){this.x=t},n=arguments,r=[];e.prototype={valueOf:t,y:t};for(var i in new e)r.push(i);ku.funcDecomp=/\bthis\b/.test(function(){return this}),ku.funcNames="string"==typeof xo.name;try{ku.dom=11===Wo.createDocumentFragment().nodeType}catch(o){ku.dom=!1}try{ku.nonEnumArgs=!ru.call(n,1)}catch(o){ku.nonEnumArgs=!0}}(1,0),e.templateSettings={escape:Et,evaluate:Ot,interpolate:It,variable:"",imports:{_:e}};var xu=fu||function(t,e){return null==e?t:ge(e,Gu(e),ge(e,Pa(e),t))},Mu=function(){function e(){}return function(n){if(Oi(n)){e.prototype=n;var r=new e;e.prototype=null}return r||t.Object()}}(),Du=fn(Ce),Ru=fn(ke,!0),ju=ln(),zu=ln(!0),Lu=Nu?function(t,e){return Nu.set(t,e),t}:_o;Jo||(on=Bo&&au?function(t){var e=t.byteLength,n=cu?Qo(e/Su):0,r=n*Su,i=new Bo(e);if(n){var o=new cu(i,0,n);o.set(new cu(t,0,n))}return e!=r&&(o=new au(i,r),o.set(new au(t,r))),i}:po(null));var Pu=hu&&iu?function(t){return new Xt(t)}:po(null),qu=Nu?function(t){return Nu.get(t)}:wo,Uu=function(){return ku.funcNames?"constant"==po.name?We("name"):function(t){for(var e=t.name,n=Cu[e],r=n?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==t)return i.name}return e}:po("")}(),Wu=We("length"),Gu=Zo?function(t){return Zo(ir(t))}:po([]),Vu=function(){var t=0,e=0;return function(n,r){var i=pa(),o=W-(i-e);if(e=i,o>0){if(++t>=U)return n}else t=0;return Lu(n,r)}}(),Ku=li(function(t,e){return Kn(t)?Te(t,Ae(e,!1,!0)):[]}),$u=gn(),Fu=gn(!0),Hu=li(function(t,e){e=Ae(e);var n=ye(t,e);return Ve(t,e.sort(o)),n}),Bu=xn(),Ju=xn(!0),Yu=li(function(t){return Xe(Ae(t,!1,!0))}),Xu=li(function(t,e){return Kn(t)?Te(t,e):[]}),Qu=li(xr),Zu=li(function(t){var e=t.length,n=t[e-2],r=t[e-1];return e>2&&"function"==typeof n?e-=2:(n=e>1&&"function"==typeof r?(--e,r):A,r=A),t.length=e,Mr(t,n,r)}),ta=li(function(t,e){return ye(t,Ae(e))}),ea=sn(function(t,e,n){Vo.call(t,n)?++t[n]:t[n]=1}),na=yn(Du),ra=yn(Ru,!0),ia=bn(ee,Du),oa=bn(ne,Ru),ua=sn(function(t,e,n){Vo.call(t,n)?t[n].push(e):t[n]=[e]}),aa=sn(function(t,e,n){t[n]=e}),sa=li(function(t,e,n){var r=-1,i="function"==typeof e,o=Hn(e),u=Kn(t)?No(t.length):[];return Du(t,function(t){var a=i?e:o&&null!=t&&t[e];u[++r]=a?a.apply(t,n):Vn(t,e,n)}),u}),ca=sn(function(t,e,n){t[n?0:1].push(e)},function(){return[[],[]]}),fa=An(fe,Du),la=An(le,Ru),ha=li(function(t,e){if(null==t)return[];var n=e[2];return n&&Fn(e[0],e[1],n)&&(e.length=1),Je(t,Ae(e),[])}),pa=yu||function(){return(new Co).getTime()},_a=li(function(t,e,n){var r=C;if(n.length){var i=b(n,_a.placeholder);r|=R}return Mn(t,r,e,n,i)}),va=li(function(t,e){e=e.length?Ae(e):Li(t);for(var n=-1,r=e.length;++nt?n=this.takeRight(-t):t&&(n=this.drop(t)),e!==A&&(e=+e||0,n=0>e?n.dropRight(-e):n.take(e-t)),n},i.prototype.toArray=function(){return this.drop(0)},Ce(i.prototype,function(t,n){var o=e[n];if(o){var u=/^(?:filter|map|reject)|While$/.test(n),a=/^(?:first|last)$/.test(n);e.prototype[n]=function(){var n=arguments,s=this.__chain__,c=this.__wrapped__,f=!!this.__actions__.length,l=c instanceof i,h=n[0],p=l||Sa(c);p&&u&&"function"==typeof h&&1!=h.length&&(l=p=!1);var _=l&&!f;if(a&&!s)return _?t.call(c):o.call(e,this.value());var v=function(t){var r=[t];return eu.apply(r,n),o.apply(e,r)};if(p){var d=_?c:new i(this),y=t.apply(d,n);if(!a&&(f||y.__actions__)){var g=y.__actions__||(y.__actions__=[]);g.push({func:Lr,args:[v],thisArg:e})}return new r(y,s)}return this.thru(v)}}}),ee(["concat","join","pop","push","replace","shift","sort","splice","split","unshift"],function(t){var n=(/^(?:replace|split)$/.test(t)?Uo:Po)[t],r=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",i=/^(?:join|pop|replace|shift)$/.test(t);e.prototype[t]=function(){var t=arguments;return i&&!this.__chain__?n.apply(this.value(),t):this[r](function(e){return n.apply(e,t)})}}),Ce(i.prototype,function(t,n){var r=e[n];if(r){var i=r.name,o=Cu[i]||(Cu[i]=[]);o.push({name:n,func:r})}}),Cu[Nn(null,k).name]=[{name:"wrapper",func:null}],i.prototype.clone=w,i.prototype.reverse=Z,i.prototype.value=rt,e.prototype.chain=Pr,e.prototype.commit=qr,e.prototype.plant=Ur,e.prototype.reverse=Wr,e.prototype.toString=Gr,e.prototype.run=e.prototype.toJSON=e.prototype.valueOf=e.prototype.value=Vr,e.prototype.collect=e.prototype.map,e.prototype.head=e.prototype.first,e.prototype.select=e.prototype.filter,e.prototype.tail=e.prototype.rest,e}var A,N="3.8.0",C=1,k=2,x=4,M=8,D=16,R=32,j=64,z=128,L=256,P=30,q="...",U=150,W=16,G=0,V=1,K=2,$="Expected a function",F="__lodash_placeholder__",H="[object Arguments]",B="[object Array]",J="[object Boolean]",Y="[object Date]",X="[object Error]",Q="[object Function]",Z="[object Map]",tt="[object Number]",et="[object Object]",nt="[object RegExp]",rt="[object Set]",it="[object String]",ot="[object WeakMap]",ut="[object ArrayBuffer]",at="[object Float32Array]",st="[object Float64Array]",ct="[object Int8Array]",ft="[object Int16Array]",lt="[object Int32Array]",ht="[object Uint8Array]",pt="[object Uint8ClampedArray]",_t="[object Uint16Array]",vt="[object Uint32Array]",dt=/\b__p \+= '';/g,yt=/\b(__p \+=) '' \+/g,gt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,mt=/&(?:amp|lt|gt|quot|#39|#96);/g,wt=/[&<>"'`]/g,bt=RegExp(mt.source),Tt=RegExp(wt.source),Et=/<%-([\s\S]+?)%>/g,Ot=/<%([\s\S]+?)%>/g,It=/<%=([\s\S]+?)%>/g,St=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/,At=/^\w*$/,Nt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g,Ct=/[.*+?^${}()|[\]\/\\]/g,kt=RegExp(Ct.source),xt=/[\u0300-\u036f\ufe20-\ufe23]/g,Mt=/\\(\\)?/g,Dt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Rt=/\w*$/,jt=/^0[xX]/,zt=/^\[object .+?Constructor\]$/,Lt=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,Pt=/($^)/,qt=/['\n\r\u2028\u2029\\]/g,Ut=function(){var t="[A-Z\\xc0-\\xd6\\xd8-\\xde]",e="[a-z\\xdf-\\xf6\\xf8-\\xff]+";return RegExp(t+"+(?="+t+e+")|"+t+"?"+e+"|"+t+"+|[0-9]+","g")}(),Wt=" \f \ufeff\n\r\u2028\u2029 ᠎              ",Gt=["Array","ArrayBuffer","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Math","Number","Object","RegExp","Set","String","_","clearTimeout","document","isFinite","parseInt","setTimeout","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","window"],Vt=-1,Kt={};Kt[at]=Kt[st]=Kt[ct]=Kt[ft]=Kt[lt]=Kt[ht]=Kt[pt]=Kt[_t]=Kt[vt]=!0,Kt[H]=Kt[B]=Kt[ut]=Kt[J]=Kt[Y]=Kt[X]=Kt[Q]=Kt[Z]=Kt[tt]=Kt[et]=Kt[nt]=Kt[rt]=Kt[it]=Kt[ot]=!1;var $t={};$t[H]=$t[B]=$t[ut]=$t[J]=$t[Y]=$t[at]=$t[st]=$t[ct]=$t[ft]=$t[lt]=$t[tt]=$t[et]=$t[nt]=$t[it]=$t[ht]=$t[pt]=$t[_t]=$t[vt]=!0,$t[X]=$t[Q]=$t[Z]=$t[rt]=$t[ot]=!1;var Ft={leading:!1,maxWait:0,trailing:!1},Ht={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss"},Bt={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},Jt={"&":"&","<":"<",">":">",""":'"',"'":"'","`":"`"},Yt={"function":!0,object:!0},Xt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Qt=Yt[typeof e]&&e&&!e.nodeType&&e,Zt=Yt[typeof t]&&t&&!t.nodeType&&t,te=Qt&&Zt&&"object"==typeof i&&i&&i.Object&&i,ee=Yt[typeof self]&&self&&self.Object&&self,ne=Yt[typeof window]&&window&&window.Object&&window,re=(Zt&&Zt.exports===Qt&&Qt,te||ne!==(this&&this.window)&&ne||ee||this),ie=S();re._=ie,r=function(){return ie}.call(e,n,e,t),!(r!==A&&(t.exports=r))}).call(this)}).call(e,n(/*! (webpack)/buildin/module.js */42)(t),function(){return this}())},/*!*************************************!*\ +function(t,e,n){var r;(function(t,i){(function(){function o(t,e){if(t!==e){var n=null===t,r=t===S,i=t===t,o=null===e,u=e===S,a=e===e;if(t>e&&!o||!i||n&&!u&&a||r&&a)return 1;if(e>t&&!n||!a||o&&!r&&i||u&&i)return-1}return 0}function u(t,e,n){for(var r=t.length,i=n?r:-1;n?i--:++i-1;);return n}function l(t,e){for(var n=t.length;n--&&e.indexOf(t.charAt(n))>-1;);return n}function h(t,e){return o(t.criteria,e.criteria)||t.index-e.index}function p(t,e,n){for(var r=-1,i=t.criteria,u=e.criteria,a=i.length,s=n.length;++r=s?c:c*(n[r]?1:-1)}return t.index-e.index}function _(t){return Ht[t]}function v(t){return Bt[t]}function d(t){return"\\"+Xt[t]}function y(t,e,n){for(var r=t.length,i=e+(n?0:-1);n?i--:++i=t&&t>=9&&13>=t||32==t||160==t||5760==t||6158==t||t>=8192&&(8202>=t||8232==t||8233==t||8239==t||8287==t||12288==t||65279==t)}function w(t,e){for(var n=-1,r=t.length,i=-1,o=[];++ne,r=Gn(0,t.length,this.__views__),i=r.start,o=r.end,u=o-i,a=n?o:i-1,s=mu(u,this.__takeCount__),c=this.__iteratees__,f=c?c.length:0,l=0,h=[];t:for(;u--&&s>l;){a+=e;for(var p=-1,_=t[a];++pv.index:a-1?v.count++>=g:!d(_)))continue t}}else{var m=d(_);if(y==V)_=m;else if(!m){if(y==G)continue t;break t}}}h[l++]=_}return h}function it(){this.__data__={}}function Ht(t){return this.has(t)&&delete this.__data__[t]}function Bt(t){return"__proto__"==t?S:this.__data__[t]}function Jt(t){return"__proto__"!=t&&Jo.call(this.__data__,t)}function Yt(t,e){return"__proto__"!=t&&(this.__data__[t]=e),this}function Xt(t){var e=t?t.length:0;for(this.data={hash:_u(null),set:new su};e--;)this.push(t[e])}function Qt(t,e){var n=t.data,r="string"==typeof e||Ni(e)?n.set.has(e):n.hash[e];return r?0:-1}function Zt(t){var e=this.data;"string"==typeof t||Ni(t)?e.set.add(t):e.hash[t]=!0}function te(t,e){var n=-1,r=t.length;for(e||(e=Ro(r));++n=200?Uu(e):null,c=e.length;s&&(o=Qt,u=!1,e=s);t:for(;++in&&(n=-n>i?0:i+n),r=r===S||r>i?i:+r||0,0>r&&(r+=i),i=n>r?0:r>>>0,n>>>=0;i>n;)t[n++]=e;return t}function Se(t,e){var n=[];return ju(t,function(t,r,i){e(t,r,i)&&n.push(t)}),n}function Ae(t,e,n,r){var i;return n(t,function(t,n,o){return e(t,n,o)?(i=r?n:t,!1):void 0}),i}function Ne(t,e,n){for(var r=-1,i=t.length,o=-1,u=[];++rr;)t=t[e[r++]];return r&&r==i?t:S}}function Re(t,e,n,r,i,o){return t===e?!0:null==t||null==e||!Ni(t)&&!g(e)?t!==t&&e!==e:je(t,e,Re,n,r,i,o)}function je(t,e,n,r,i,o,u){var a=Aa(t),s=Aa(e),c=H,f=H;a||(c=Xo.call(t),c==F?c=tt:c!=tt&&(a=zi(t))),s||(f=Xo.call(e),f==F?f=tt:f!=tt&&(s=zi(e)));var l=c==tt,h=f==tt,p=c==f;if(p&&!a&&!l)return jn(t,e,c);if(!i){var _=l&&Jo.call(t,"__wrapped__"),v=h&&Jo.call(e,"__wrapped__");if(_||v)return n(_?t.value():t,v?e.value():e,r,i,o,u)}if(!p)return!1;o||(o=[]),u||(u=[]);for(var d=o.length;d--;)if(o[d]==t)return u[d]==e;o.push(t),u.push(e);var y=(a?Rn:zn)(t,e,n,r,i,o,u);return o.pop(),u.pop(),y}function ze(t,e,n){var r=e.length,i=r,o=!n;if(null==t)return!i;for(t=ar(t);r--;){var u=e[r];if(o&&u[2]?u[1]!==t[u[0]]:!(u[0]in t))return!1}for(;++re&&(e=-e>i?0:i+e),n=n===S||n>i?i:+n||0,0>n&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var o=Ro(i);++r=200,s=u?Uu():null,c=[];s?(r=Qt,o=!1):(u=!1,s=e?[]:c);t:for(;++n=i){for(;i>r;){var o=r+i>>>1,u=t[o];(n?e>=u:e>u)&&null!==u?r=o+1:i=o}return i}return rn(t,e,bo,n)}function rn(t,e,n,r){e=n(e);for(var i=0,o=t?t.length:0,u=e!==e,a=null===e,s=e===S;o>i;){var c=iu((i+o)/2),f=n(t[c]),l=f!==S,h=f===f;if(u)var p=h||r;else p=a?h&&l&&(r||null!=f):s?h&&(r||l):null==f?!1:r?e>=f:e>f;p?i=c+1:o=c}return mu(o,Au)}function on(t,e,n){if("function"!=typeof t)return bo;if(e===S)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 3:return function(n,r,i){return t.call(e,n,r,i)};case 4:return function(n,r,i,o){return t.call(e,n,r,i,o)};case 5:return function(n,r,i,o,u){return t.call(e,n,r,i,o,u)}}return function(){return t.apply(e,arguments)}}function un(t){return eu.call(t,0)}function an(t,e,n){for(var r=n.length,i=-1,o=gu(t.length-r,0),u=-1,a=e.length,s=Ro(o+a);++u2?n[i-2]:S,u=i>2?n[2]:S,a=i>1?n[i-1]:S;for("function"==typeof o?(o=on(o,a,5),i-=2):(o="function"==typeof a?a:S,i-=o?1:0),u&&Jn(n[0],n[1],u)&&(o=3>i?S:o,i=1);++r-1?n[o]:S}return Ae(n,r,t)}}function mn(t){return function(e,n,r){return e&&e.length?(n=Ln(n,r,3),u(e,n,t)):-1}}function wn(t){return function(e,n,r){return n=Ln(n,r,3),Ae(e,n,t,!0)}}function bn(t){return function(){for(var e,n=arguments.length,i=t?n:-1,o=0,u=Ro(n);t?i--:++ig){var O=a?te(a):null,I=gu(c-g,0),A=_?E:null,k=_?null:E,x=_?b:null,M=_?null:b;e|=_?D:R,e&=~(_?R:D),v||(e&=~(N|C));var j=[t,e,n,x,A,M,k,O,s,I],z=Cn.apply(S,j);return Xn(t)&&Vu(z,j),z.placeholder=T,z}}var L=h?n:this,P=p?L[t]:t;return a&&(b=rr(b,a)),l&&s=e||!du(e))return"";var i=e-r;return n=null==n?" ":n+"",co(n,nu(i/n.length)).slice(0,i)}function xn(t,e,n,r){function i(){for(var e=-1,a=arguments.length,s=-1,c=r.length,f=Ro(a+c);++ss))return!1;for(;++a-1&&t%1==0&&e>t}function Jn(t,e,n){if(!Ni(n))return!1;var r=typeof e;if("number"==r?Hn(n)&&Bn(e,n.length):"string"==r&&e in n){var i=n[e];return t===t?t===i:i!==i}return!1}function Yn(t,e){var n=typeof t;if("string"==n&&St.test(t)||"number"==n)return!0;if(Aa(t))return!1;var r=!It.test(t);return r||null!=e&&t in ar(e)}function Xn(t){var n=Pn(t);if(!(n in i.prototype))return!1;var r=e[n];if(t===r)return!0;var o=Wu(r);return!!o&&t===o[0]}function Qn(t){return"number"==typeof t&&t>-1&&t%1==0&&ku>=t}function Zn(t){return t===t&&!Ni(t)}function tr(t,e){var n=t[1],r=e[1],i=n|r,o=j>i,u=r==j&&n==x||r==j&&n==z&&t[7].length<=e[8]||r==(j|z)&&n==x;if(!o&&!u)return t;r&N&&(t[2]=e[2],i|=n&N?0:k);var a=e[3];if(a){var s=t[3];t[3]=s?an(s,a,e[4]):te(a),t[4]=s?w(t[3],$):te(e[4])}return a=e[5],a&&(s=t[5],t[5]=s?sn(s,a,e[6]):te(a),t[6]=s?w(t[5],$):te(e[6])),a=e[7],a&&(t[7]=te(a)),r&j&&(t[8]=null==t[8]?e[8]:mu(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=i,t}function er(t,e){t=ar(t);for(var n=-1,r=e.length,i={};++nr;)u[++o]=He(t,r,r+=e);return u}function lr(t){for(var e=-1,n=t?t.length:0,r=-1,i=[];++ee?0:e)):[]}function pr(t,e,n){var r=t?t.length:0;return r?((n?Jn(t,e,n):null==e)&&(e=1),e=r-(+e||0),He(t,0,0>e?0:e)):[]}function _r(t,e,n){return t&&t.length?tn(t,Ln(e,n,3),!0,!0):[]}function vr(t,e,n){return t&&t.length?tn(t,Ln(e,n,3),!0):[]}function dr(t,e,n,r){var i=t?t.length:0;return i?(n&&"number"!=typeof n&&Jn(t,e,n)&&(n=0,r=i),Ie(t,e,n,r)):[]}function yr(t){return t?t[0]:S}function gr(t,e,n){var r=t?t.length:0;return n&&Jn(t,e,n)&&(e=!1),r?Ne(t,e):[]}function mr(t){var e=t?t.length:0;return e?Ne(t,!0):[]}function wr(t,e,n){var r=t?t.length:0;if(!r)return-1;if("number"==typeof n)n=0>n?gu(r+n,0):n;else if(n){var i=nn(t,e),o=t[i];return(e===e?e===o:o!==o)?i:-1}return a(t,e,n||0)}function br(t){return pr(t,1)}function Tr(t){var e=t?t.length:0;return e?t[e-1]:S}function Er(t,e,n){var r=t?t.length:0;if(!r)return-1;var i=r;if("number"==typeof n)i=(0>n?gu(r+n,0):mu(n||0,r-1))+1;else if(n){i=nn(t,e,!0)-1;var o=t[i];return(e===e?e===o:o!==o)?i:-1}if(e!==e)return y(t,i,!0);for(;i--;)if(t[i]===e)return i;return-1}function Or(){var t=arguments,e=t[0];if(!e||!e.length)return e;for(var n=0,r=qn(),i=t.length;++n-1;)fu.call(e,o,1);return e}function Ir(t,e,n){var r=[];if(!t||!t.length)return r;var i=-1,o=[],u=t.length;for(e=Ln(e,n,3);++ie?0:e)):[]}function Cr(t,e,n){var r=t?t.length:0;return r?((n?Jn(t,e,n):null==e)&&(e=1),e=r-(+e||0),He(t,0>e?0:e)):[]}function kr(t,e,n){return t&&t.length?tn(t,Ln(e,n,3),!1,!0):[]}function xr(t,e,n){return t&&t.length?tn(t,Ln(e,n,3)):[]}function Mr(t,e,n,r){var i=t?t.length:0;if(!i)return[];null!=e&&"boolean"!=typeof e&&(r=n,n=Jn(t,e,r)?null:e,e=!1);var o=Ln();return(null!=n||o!==me)&&(n=o(n,r,3)),e&&qn()==a?b(t,n):Qe(t,n)}function Dr(t){if(!t||!t.length)return[];var e=-1,n=0;t=ae(t,function(t){return Hn(t)?(n=gu(t.length,n),!0):void 0});for(var r=Ro(n);++en?gu(i+n,0):n||0,"string"==typeof t||!Aa(t)&&ji(t)?i>n&&t.indexOf(e,n)>-1:qn(t,e,n)>-1):!1}function Yr(t,e,n){var r=Aa(t)?se:Le;return e=Ln(e,n,3),r(t,e)}function Xr(t,e){return Yr(t,Ao(e))}function Qr(t,e,n){var r=Aa(t)?ae:Se;return e=Ln(e,n,3),r(t,function(t,n,r){return!e(t,n,r)})}function Zr(t,e,n){if(n?Jn(t,e,n):null==e){t=ur(t);var r=t.length;return r>0?t[$e(0,r-1)]:S}var i=-1,o=Ui(t),r=o.length,u=r-1;for(e=mu(0>e?0:+e||0,r);++i0&&(n=e.apply(this,arguments)),1>=t&&(e=null),n}}function ci(t,e,n){function r(){h&&ru(h),s&&ru(s),s=h=p=S}function i(){var n=e-(_a()-f);if(0>=n||n>e){s&&ru(s);var r=p;s=h=p=S,r&&(_=_a(),c=t.apply(l,a),h||s||(a=l=null))}else h=cu(i,n)}function o(){h&&ru(h),s=h=p=S,(d||v!==e)&&(_=_a(),c=t.apply(l,a),h||s||(a=l=null))}function u(){if(a=arguments,f=_a(),l=this,p=d&&(h||!y),v===!1)var n=y&&!h;else{s||y||(_=f);var r=v-(f-_),u=0>=r||r>v;u?(s&&(s=ru(s)),_=f,c=t.apply(l,a)):s||(s=cu(o,r))}return u&&h?h=ru(h):h||e===v||(h=cu(i,e)),n&&(u=!0,c=t.apply(l,a)),!u||h||s||(a=l=null),c}var a,s,c,f,l,h,p,_=0,v=!1,d=!0;if("function"!=typeof t)throw new Vo(K);if(e=0>e?0:+e||0,n===!0){var y=!0;d=!1}else Ni(n)&&(y=n.leading,v="maxWait"in n&&gu(+n.maxWait||0,e),d="trailing"in n?n.trailing:d);return u.cancel=r,u}function fi(t,e){if("function"!=typeof t||e&&"function"!=typeof e)throw new Vo(K);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var u=t.apply(this,r);return n.cache=o.set(i,u),u};return n.cache=new fi.Cache,n}function li(t){if("function"!=typeof t)throw new Vo(K);return function(){return!t.apply(this,arguments)}}function hi(t){return si(2,t)}function pi(t,e){if("function"!=typeof t)throw new Vo(K);return e=gu(e===S?t.length-1:+e||0,0),function(){for(var n=arguments,r=-1,i=gu(n.length-e,0),o=Ro(i);++re}function wi(t,e){return t>=e}function bi(t){return g(t)&&Hn(t)&&Xo.call(t)==F}function Ti(t){return t===!0||t===!1||g(t)&&Xo.call(t)==B}function Ei(t){return g(t)&&Xo.call(t)==J}function Oi(t){return!!t&&1===t.nodeType&&g(t)&&Xo.call(t).indexOf("Element")>-1}function Ii(t){return null==t?!0:Hn(t)&&(Aa(t)||ji(t)||bi(t)||g(t)&&Ca(t.splice))?!t.length:!qa(t).length}function Si(t,e,n,r){n="function"==typeof n?on(n,r,3):S;var i=n?n(t,e):S;return i===S?Re(t,e,n):!!i}function Ai(t){return g(t)&&"string"==typeof t.message&&Xo.call(t)==Y}function Ni(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function Ci(t,e,n,r){return n="function"==typeof n?on(n,r,3):S,ze(t,Un(e),n)}function ki(t){return Di(t)&&t!=+t}function xi(t){return null==t?!1:Xo.call(t)==X?Zo.test(Bo.call(t)):g(t)&&jt.test(t)}function Mi(t){return null===t}function Di(t){return"number"==typeof t||g(t)&&Xo.call(t)==Z}function Ri(t){return g(t)&&Xo.call(t)==et}function ji(t){return"string"==typeof t||g(t)&&Xo.call(t)==rt}function zi(t){return g(t)&&Qn(t.length)&&!!Kt[Xo.call(t)]}function Li(t){return t===S}function Pi(t,e){return e>t}function qi(t,e){return e>=t}function Ui(t){var e=t?Gu(t):0;return Qn(e)?e?te(t):[]:Qi(t)}function Wi(t){return ge(t,Hi(t))}function Gi(t,e,n){var r=Ru(t);return n&&Jn(t,e,n)&&(e=null),e?de(r,e):r}function Vi(t){return Me(t,Hi(t))}function Ki(t,e,n){var r=null==t?S:De(t,sr(e),e+"");return r===S?n:r}function $i(t,e){if(null==t)return!1;var n=Jo.call(t,e);if(!n&&!Yn(e)){if(e=sr(e),t=1==e.length?t:De(t,He(e,0,-1)),null==t)return!1;e=Tr(e),n=Jo.call(t,e)}return n||Qn(t.length)&&Bn(e,t.length)&&(Aa(t)||bi(t))}function Fi(t,e,n){n&&Jn(t,e,n)&&(e=null);for(var r=-1,i=qa(t),o=i.length,u={};++r0;++r=mu(e,n)&&tn?0:+n||0,r),n-=e.length,n>=0&&t.indexOf(e,n)==n}function oo(t){return t=c(t),t&&bt.test(t)?t.replace(mt,v):t}function uo(t){return t=c(t),t&&Ct.test(t)?t.replace(Nt,"\\$&"):t}function ao(t,e,n){t=c(t),e=+e;var r=t.length;if(r>=e||!du(e))return t;var i=(e-r)/2,o=iu(i),u=nu(i);return n=kn("",u,n),n.slice(0,o)+t+n}function so(t,e,n){return n&&Jn(t,e,n)&&(e=0), +Tu(t,e)}function co(t,e){var n="";if(t=c(t),e=+e,1>e||!t||!du(e))return n;do e%2&&(n+=t),e=iu(e/2),t+=t;while(e);return n}function fo(t,e,n){return t=c(t),n=null==n?0:mu(0>n?0:+n||0,t.length),t.lastIndexOf(e,n)==n}function lo(t,n,r){var i=e.templateSettings;r&&Jn(t,n,r)&&(n=r=null),t=c(t),n=ve(de({},r||n),i,_e);var o,u,a=ve(de({},n.imports),i.imports,_e),s=qa(a),f=Ze(a,s),l=0,h=n.interpolate||Pt,p="__p += '",_=Wo((n.escape||Pt).source+"|"+h.source+"|"+(h===Ot?Mt:Pt).source+"|"+(n.evaluate||Pt).source+"|$","g"),v="//# sourceURL="+("sourceURL"in n?n.sourceURL:"lodash.templateSources["+ ++Vt+"]")+"\n";t.replace(_,function(e,n,r,i,a,s){return r||(r=i),p+=t.slice(l,s).replace(qt,d),n&&(o=!0,p+="' +\n__e("+n+") +\n'"),a&&(u=!0,p+="';\n"+a+";\n__p += '"),r&&(p+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=s+e.length,e}),p+="';\n";var y=n.variable;y||(p="with (obj) {\n"+p+"\n}\n"),p=(u?p.replace(vt,""):p).replace(dt,"$1").replace(yt,"$1;"),p="function("+(y||"obj")+") {\n"+(y?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(u?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+p+"return __p\n}";var g=Xa(function(){return Lo(s,v+"return "+p).apply(S,f)});if(g.source=p,Ai(g))throw g;return g}function ho(t,e,n){var r=t;return(t=c(t))?(n?Jn(r,e,n):null==e)?t.slice(T(t),E(t)+1):(e+="",t.slice(f(t,e),l(t,e)+1)):t}function po(t,e,n){var r=t;return t=c(t),t?(n?Jn(r,e,n):null==e)?t.slice(T(t)):t.slice(f(t,e+"")):t}function _o(t,e,n){var r=t;return t=c(t),t?(n?Jn(r,e,n):null==e)?t.slice(0,E(t)+1):t.slice(0,l(t,e+"")+1):t}function vo(t,e,n){n&&Jn(t,e,n)&&(e=null);var r=L,i=P;if(null!=e)if(Ni(e)){var o="separator"in e?e.separator:o;r="length"in e?+e.length||0:r,i="omission"in e?c(e.omission):i}else r=+e||0;if(t=c(t),r>=t.length)return t;var u=r-i.length;if(1>u)return i;var a=t.slice(0,u);if(null==o)return a+i;if(Ri(o)){if(t.slice(u).search(o)){var s,f,l=t.slice(0,u);for(o.global||(o=Wo(o.source,(Dt.exec(o)||"")+"g")),o.lastIndex=0;s=o.exec(l);)f=s.index;a=a.slice(0,null==f?u:f)}}else if(t.indexOf(o,u)!=u){var h=a.lastIndexOf(o);h>-1&&(a=a.slice(0,h))}return a+i}function yo(t){return t=c(t),t&&wt.test(t)?t.replace(gt,O):t}function go(t,e,n){return n&&Jn(t,e,n)&&(e=null),t=c(t),t.match(e||Ut)||[]}function mo(t,e,n){return n&&Jn(t,e,n)&&(e=null),g(t)?To(t):me(t,e)}function wo(t){return function(){return t}}function bo(t){return t}function To(t){return Pe(we(t,!0))}function Eo(t,e){return qe(t,we(e,!0))}function Oo(t,e,n){if(null==n){var r=Ni(e),i=r?qa(e):null,o=i&&i.length?Me(e,i):null;(o?o.length:r)||(o=!1,n=e,e=t,t=this)}o||(o=Me(e,qa(e)));var u=!0,a=-1,s=Ca(t),c=o.length;n===!1?u=!1:Ni(n)&&"chain"in n&&(u=n.chain);for(;++at||!du(t))return[];var r=-1,i=Ro(mu(t,Su));for(e=on(e,n,1);++rr?i[r]=e(r):e(r);return i}function xo(t){var e=++Yo;return c(t)+e}function Mo(t,e){return(+t||0)+(+e||0)}function Do(t,e,n){n&&Jn(t,e,n)&&(e=null);var r=Ln(),i=null==e;return i&&r===me||(i=!1,e=r(e,n,3)),i?he(Aa(t)?t:ur(t)):Xe(t,e)}t=t?ie.defaults(re.Object(),t,ie.pick(re,Gt)):re;var Ro=t.Array,jo=t.Date,zo=t.Error,Lo=t.Function,Po=t.Math,qo=t.Number,Uo=t.Object,Wo=t.RegExp,Go=t.String,Vo=t.TypeError,Ko=Ro.prototype,$o=Uo.prototype,Fo=Go.prototype,Ho=(Ho=t.window)?Ho.document:null,Bo=Lo.prototype.toString,Jo=$o.hasOwnProperty,Yo=0,Xo=$o.toString,Qo=t._,Zo=Wo("^"+uo(Bo.call(Jo)).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),tu=Wn(t,"ArrayBuffer"),eu=Wn(tu&&new tu(0),"slice"),nu=Po.ceil,ru=t.clearTimeout,iu=Po.floor,ou=Wn(Uo,"getPrototypeOf"),uu=t.parseFloat,au=Ko.push,su=Wn(t,"Set"),cu=t.setTimeout,fu=Ko.splice,lu=Wn(t,"Uint8Array"),hu=Wn(t,"WeakMap"),pu=function(){try{var e=Wn(t,"Float64Array"),n=new e(new tu(10),0,1)&&e}catch(r){}return n||null}(),_u=Wn(Uo,"create"),vu=Wn(Ro,"isArray"),du=t.isFinite,yu=Wn(Uo,"keys"),gu=Po.max,mu=Po.min,wu=Wn(jo,"now"),bu=Wn(qo,"isFinite"),Tu=t.parseInt,Eu=Po.random,Ou=qo.NEGATIVE_INFINITY,Iu=qo.POSITIVE_INFINITY,Su=4294967295,Au=Su-1,Nu=Su>>>1,Cu=pu?pu.BYTES_PER_ELEMENT:0,ku=9007199254740991,xu=hu&&new hu,Mu={},Du=e.support={};!function(t){var e=function(){this.x=t},n=[];e.prototype={valueOf:t,y:t};for(var r in new e)n.push(r);try{Du.dom=11===Ho.createDocumentFragment().nodeType}catch(i){Du.dom=!1}}(1,0),e.templateSettings={escape:Tt,evaluate:Et,interpolate:Ot,variable:"",imports:{_:e}};var Ru=function(){function t(){}return function(e){if(Ni(e)){t.prototype=e;var n=new t;t.prototype=null}return n||{}}}(),ju=ln(ke),zu=ln(xe,!0),Lu=hn(),Pu=hn(!0),qu=xu?function(t,e){return xu.set(t,e),t}:bo;eu||(un=tu&&lu?function(t){var e=t.byteLength,n=pu?iu(e/Cu):0,r=n*Cu,i=new tu(e);if(n){var o=new pu(i,0,n);o.set(new pu(t,0,n))}return e!=r&&(o=new lu(i,r),o.set(new lu(t,r))),i}:wo(null));var Uu=_u&&su?function(t){return new Xt(t)}:wo(null),Wu=xu?function(t){return xu.get(t)}:So,Gu=Ge("length"),Vu=function(){var t=0,e=0;return function(n,r){var i=_a(),o=U-(i-e);if(e=i,o>0){if(++t>=q)return n}else t=0;return qu(n,r)}}(),Ku=pi(function(t,e){return Hn(t)?Te(t,Ne(e,!1,!0)):[]}),$u=mn(),Fu=mn(!0),Hu=pi(function(t){for(var e=t.length,n=e,r=Ro(l),i=qn(),o=i==a,u=[];n--;){var s=t[n]=Hn(s=t[n])?s:[];r[n]=o&&s.length>=120?Uu(n&&s):null}var c=t[0],f=-1,l=c?c.length:0,h=r[0];t:for(;++f2?t[e-2]:S,r=e>1?t[e-1]:S;return e>2&&"function"==typeof n?e-=2:(n=e>1&&"function"==typeof r?(--e,r):S,r=S),t.length=e,Rr(t,n,r)}),ea=pi(function(t,e){return ye(t,Ne(e))}),na=cn(function(t,e,n){Jo.call(t,n)?++t[n]:t[n]=1}),ra=gn(ju),ia=gn(zu,!0),oa=Tn(ee,ju),ua=Tn(ne,zu),aa=cn(function(t,e,n){Jo.call(t,n)?t[n].push(e):t[n]=[e]}),sa=cn(function(t,e,n){t[n]=e}),ca=pi(function(t,e,n){var r=-1,i="function"==typeof e,o=Yn(e),u=Hn(t)?Ro(t.length):[];return ju(t,function(t){var a=i?e:o&&null!=t?t[e]:null;u[++r]=a?a.apply(t,n):Fn(t,e,n)}),u}),fa=cn(function(t,e,n){t[n?0:1].push(e)},function(){return[[],[]]}),la=Nn(ce,ju),ha=Nn(fe,zu),pa=pi(function(t,e){if(null==t)return[];var n=e[2];return n&&Jn(e[0],e[1],n)&&(e.length=1),Ye(t,Ne(e),[])}),_a=wu||function(){return(new jo).getTime()},va=pi(function(t,e,n){var r=N;if(n.length){var i=w(n,va.placeholder);r|=D}return Dn(t,r,e,n,i)}),da=pi(function(t,e){e=e.length?Ne(e):Vi(t);for(var n=-1,r=e.length;++nt?n=this.takeRight(-t):t&&(n=this.drop(t)),e!==S&&(e=+e||0,n=0>e?n.dropRight(-e):n.take(e-t)),n},i.prototype.toArray=function(){return this.drop(0)},ke(i.prototype,function(t,n){var o=e[n];if(o){var u=/^(?:filter|map|reject)|While$/.test(n),a=/^(?:first|last)$/.test(n);e.prototype[n]=function(){var n=arguments,s=this.__chain__,c=this.__wrapped__,f=!!this.__actions__.length,l=c instanceof i,h=n[0],p=l||Aa(c);p&&u&&"function"==typeof h&&1!=h.length&&(l=p=!1);var _=l&&!f;if(a&&!s)return _?t.call(c):o.call(e,this.value());var v=function(t){var r=[t];return au.apply(r,n),o.apply(e,r)};if(p){var d=_?c:new i(this),y=t.apply(d,n);if(!a&&(f||y.__actions__)){var g=y.__actions__||(y.__actions__=[]);g.push({func:qr,args:[v],thisArg:e})}return new r(y,s)}return this.thru(v)}}}),ee(["concat","join","pop","push","replace","shift","sort","splice","split","unshift"],function(t){var n=(/^(?:replace|split)$/.test(t)?Fo:Ko)[t],r=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",i=/^(?:join|pop|replace|shift)$/.test(t);e.prototype[t]=function(){var t=arguments;return i&&!this.__chain__?n.apply(this.value(),t):this[r](function(e){return n.apply(e,t)})}}),ke(i.prototype,function(t,n){var r=e[n];if(r){var i=r.name,o=Mu[i]||(Mu[i]=[]);o.push({name:n,func:r})}}),Mu[Cn(null,C).name]=[{name:"wrapper",func:null}],i.prototype.clone=m,i.prototype.reverse=Q,i.prototype.value=nt,e.prototype.chain=Ur,e.prototype.commit=Wr,e.prototype.plant=Gr,e.prototype.reverse=Vr,e.prototype.toString=Kr,e.prototype.run=e.prototype.toJSON=e.prototype.valueOf=e.prototype.value=$r,e.prototype.collect=e.prototype.map,e.prototype.head=e.prototype.first,e.prototype.select=e.prototype.filter,e.prototype.tail=e.prototype.rest,e}var S,A="3.9.3",N=1,C=2,k=4,x=8,M=16,D=32,R=64,j=128,z=256,L=30,P="...",q=150,U=16,W=0,G=1,V=2,K="Expected a function",$="__lodash_placeholder__",F="[object Arguments]",H="[object Array]",B="[object Boolean]",J="[object Date]",Y="[object Error]",X="[object Function]",Q="[object Map]",Z="[object Number]",tt="[object Object]",et="[object RegExp]",nt="[object Set]",rt="[object String]",it="[object WeakMap]",ot="[object ArrayBuffer]",ut="[object Float32Array]",at="[object Float64Array]",st="[object Int8Array]",ct="[object Int16Array]",ft="[object Int32Array]",lt="[object Uint8Array]",ht="[object Uint8ClampedArray]",pt="[object Uint16Array]",_t="[object Uint32Array]",vt=/\b__p \+= '';/g,dt=/\b(__p \+=) '' \+/g,yt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,gt=/&(?:amp|lt|gt|quot|#39|#96);/g,mt=/[&<>"'`]/g,wt=RegExp(gt.source),bt=RegExp(mt.source),Tt=/<%-([\s\S]+?)%>/g,Et=/<%([\s\S]+?)%>/g,Ot=/<%=([\s\S]+?)%>/g,It=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/,St=/^\w*$/,At=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g,Nt=/[.*+?^${}()|[\]\/\\]/g,Ct=RegExp(Nt.source),kt=/[\u0300-\u036f\ufe20-\ufe23]/g,xt=/\\(\\)?/g,Mt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Dt=/\w*$/,Rt=/^0[xX]/,jt=/^\[object .+?Constructor\]$/,zt=/^\d+$/,Lt=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,Pt=/($^)/,qt=/['\n\r\u2028\u2029\\]/g,Ut=function(){var t="[A-Z\\xc0-\\xd6\\xd8-\\xde]",e="[a-z\\xdf-\\xf6\\xf8-\\xff]+";return RegExp(t+"+(?="+t+e+")|"+t+"?"+e+"|"+t+"+|[0-9]+","g")}(),Wt=" \f \ufeff\n\r\u2028\u2029 ᠎              ",Gt=["Array","ArrayBuffer","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Math","Number","Object","RegExp","Set","String","_","clearTimeout","document","isFinite","parseFloat","parseInt","setTimeout","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","window"],Vt=-1,Kt={};Kt[ut]=Kt[at]=Kt[st]=Kt[ct]=Kt[ft]=Kt[lt]=Kt[ht]=Kt[pt]=Kt[_t]=!0,Kt[F]=Kt[H]=Kt[ot]=Kt[B]=Kt[J]=Kt[Y]=Kt[X]=Kt[Q]=Kt[Z]=Kt[tt]=Kt[et]=Kt[nt]=Kt[rt]=Kt[it]=!1;var $t={};$t[F]=$t[H]=$t[ot]=$t[B]=$t[J]=$t[ut]=$t[at]=$t[st]=$t[ct]=$t[ft]=$t[Z]=$t[tt]=$t[et]=$t[rt]=$t[lt]=$t[ht]=$t[pt]=$t[_t]=!0,$t[Y]=$t[X]=$t[Q]=$t[nt]=$t[it]=!1;var Ft={leading:!1,maxWait:0,trailing:!1},Ht={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss"},Bt={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},Jt={"&":"&","<":"<",">":">",""":'"',"'":"'","`":"`"},Yt={"function":!0,object:!0},Xt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Qt=Yt[typeof e]&&e&&!e.nodeType&&e,Zt=Yt[typeof t]&&t&&!t.nodeType&&t,te=Qt&&Zt&&"object"==typeof i&&i&&i.Object&&i,ee=Yt[typeof self]&&self&&self.Object&&self,ne=Yt[typeof window]&&window&&window.Object&&window,re=(Zt&&Zt.exports===Qt&&Qt,te||ne!==(this&&this.window)&&ne||ee||this),ie=I();re._=ie,r=function(){return ie}.call(e,n,e,t),!(r!==S&&(t.exports=r))}).call(this)}).call(e,n(/*! (webpack)/buildin/module.js */43)(t),function(){return this}())},/*!*************************************!*\ !*** ./src/actions/notification.js ***! \*************************************/ function(t,e,n){"use strict";function r(t){i.dispatch({actionType:u,message:t})}Object.defineProperty(e,"__esModule",{value:!0}),e.notify=r;var i=n(/*! ../app_dispatcher */1),o=n(/*! ../constants */2),u=o.ACTION_NEW_NOTIFICATION},/*!********************************!*\ !*** ./src/actions/service.js ***! \********************************/ -function(t,e,n){"use strict";function r(t){t.length>0&&h["default"].dispatch({actionType:_["default"].ACTION_NEW_SERVICES,services:t})}function i(t){return u("homeassistant","turn_on",{entity_id:t})}function o(t){return u("homeassistant","turn_off",{entity_id:t})}function u(t,e){var n=void 0===arguments[2]?{}:arguments[2];return f["default"]("POST","services/"+t+"/"+e,n).then(function(r){v.notify("turn_on"==e&&n.entity_id?"Turned on "+n.entity_id+".":"turn_off"==e&&n.entity_id?"Turned off "+n.entity_id+".":"Service "+t+"/"+e+" called."),d.newStates(r)})}function a(){return f["default"]("GET","services").then(r)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){return t&&t.__esModule?t:{"default":t}};e.newServices=r,e.callTurnOn=i,e.callTurnOff=o,e.callService=u,e.fetchAll=a;var c=n(/*! ../call_api */5),f=s(c),l=n(/*! ../app_dispatcher */1),h=s(l),p=n(/*! ../constants */2),_=s(p),v=n(/*! ./notification */7),d=n(/*! ./state */9)},/*!******************************!*\ +function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t){t.length>0&&h["default"].dispatch({actionType:_["default"].ACTION_NEW_SERVICES,services:t})}function o(t){return a("homeassistant","turn_on",{entity_id:t})}function u(t){return a("homeassistant","turn_off",{entity_id:t})}function a(t,e){var n=void 0===arguments[2]?{}:arguments[2];return f["default"]("POST","services/"+t+"/"+e,n).then(function(r){"turn_on"==e&&n.entity_id?v.notify("Turned on "+n.entity_id+"."):"turn_off"==e&&n.entity_id?v.notify("Turned off "+n.entity_id+"."):v.notify("Service "+t+"/"+e+" called."),d.newStates(r)})}function s(){return f["default"]("GET","services").then(i)}Object.defineProperty(e,"__esModule",{value:!0}),e.newServices=i,e.callTurnOn=o,e.callTurnOff=u,e.callService=a,e.fetchAll=s;var c=n(/*! ../call_api */5),f=r(c),l=n(/*! ../app_dispatcher */1),h=r(l),p=n(/*! ../constants */2),_=r(p),v=n(/*! ./notification */7),d=n(/*! ./state */9)},/*!******************************!*\ !*** ./src/actions/state.js ***! \******************************/ -function(t,e,n){"use strict";function r(t,e){(t.length>0||e)&&l["default"].dispatch({actionType:h.ACTION_NEW_STATES,states:t,replace:!!e})}function i(t,e){var n=void 0===arguments[2]?!1:arguments[2],i={state:e};n&&(i.attributes=n),c["default"]("POST","states/"+t,i).then(function(n){p.notify("State of "+t+" set to "+e+"."),r([n])})}function o(t){c["default"]("GET","states/"+t).then(function(t){r([t])})}function u(){c["default"]("GET","states").then(function(t){r(t,!0)})}Object.defineProperty(e,"__esModule",{value:!0});var a=function(t){return t&&t.__esModule?t:{"default":t}};e.newStates=r,e.set=i,e.fetch=o,e.fetchAll=u;var s=n(/*! ../call_api */5),c=a(s),f=n(/*! ../app_dispatcher */1),l=a(f),h=n(/*! ../constants */2),p=n(/*! ./notification */7)},/*!*****************************!*\ +function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){(t.length>0||e)&&l["default"].dispatch({actionType:h.ACTION_NEW_STATES,states:t,replace:!!e})}function o(t,e){var n=void 0===arguments[2]?!1:arguments[2],r={state:e};n&&(r.attributes=n),c["default"]("POST","states/"+t,r).then(function(n){p.notify("State of "+t+" set to "+e+"."),i([n])})}function u(t){c["default"]("GET","states/"+t).then(function(t){i([t])})}function a(){c["default"]("GET","states").then(function(t){i(t,!0)})}Object.defineProperty(e,"__esModule",{value:!0}),e.newStates=i,e.set=o,e.fetch=u,e.fetchAll=a;var s=n(/*! ../call_api */5),c=r(s),f=n(/*! ../app_dispatcher */1),l=r(f),h=n(/*! ../constants */2),p=n(/*! ./notification */7)},/*!*****************************!*\ !*** ./src/actions/sync.js ***! \*****************************/ -function(t,e,n){"use strict";function r(){f["default"].dispatch({actionType:h["default"].ACTION_FETCH_ALL}),p.fetch(),v&&d()}function i(){v=!0,r()}function o(){v=!1,d.cancel()}Object.defineProperty(e,"__esModule",{value:!0});var u=function(t){return t&&t.__esModule?t:{"default":t}};e.fetchAll=r,e.start=i,e.stop=o;var a=n(/*! lodash */6),s=u(a),c=n(/*! ../app_dispatcher */1),f=u(c),l=n(/*! ../constants */2),h=u(l),p=n(/*! ./bootstrap */16),_=3e4,v=!1,d=s["default"].debounce(r,_)},/*!*****************************!*\ +function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(){f["default"].dispatch({actionType:h["default"].ACTION_FETCH_ALL}),p.fetch(),v&&d()}function o(){v=!0,i()}function u(){v=!1,d.cancel()}Object.defineProperty(e,"__esModule",{value:!0}),e.fetchAll=i,e.start=o,e.stop=u;var a=n(/*! lodash */6),s=r(a),c=n(/*! ../app_dispatcher */1),f=r(c),l=n(/*! ../constants */2),h=r(l),p=n(/*! ./bootstrap */16),_=3e4,v=!1,d=s["default"].debounce(i,_)},/*!*****************************!*\ !*** ./src/models/state.js ***! \*****************************/ -function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(t){return t&&t.__esModule?t:{"default":t}},i=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t)){var n=[],r=!0,i=!1,o=void 0;try{for(var u,a=t[Symbol.iterator]();!(r=(u=a.next()).done)&&(n.push(u.value),!e||n.length!==e);r=!0);}catch(s){i=!0,o=s}finally{try{!r&&a["return"]&&a["return"]()}finally{if(i)throw o}}return n}throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},u=function(){function t(t,e){for(var n=0;nd}},{key:"all",get:function(){return g}}]),e}(p["default"]),w=new m;w.dispatchToken=c["default"].register(function(t){switch(t.actionType){case l["default"].ACTION_NEW_LOGBOOK:g=new a.List(t.logbookEntries.map(function(t){return v["default"].fromJSON(t)})),y=new Date,w.emitChange();break;case l["default"].ACTION_LOG_OUT:y=null,g=new a.List,w.emitChange()}}),e["default"]=w,t.exports=e["default"]},/*!************************************!*\ +function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var u=function(){function t(t,e){for(var n=0;nd}},{key:"all",get:function(){return g}}]),e}(p["default"]),w=new m;w.dispatchToken=c["default"].register(function(t){switch(t.actionType){case l["default"].ACTION_NEW_LOGBOOK:g=new a.List(t.logbookEntries.map(function(t){return v["default"].fromJSON(t)})),y=new Date,w.emitChange();break;case l["default"].ACTION_LOG_OUT:y=null,g=new a.List,w.emitChange()}}),e["default"]=w,t.exports=e["default"]},/*!************************************!*\ !*** ./src/stores/notification.js ***! \************************************/ -function(t,e,n){"use strict";function r(){return y.size}Object.defineProperty(e,"__esModule",{value:!0});var i=function(t){return t&&t.__esModule?t:{"default":t}},o=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},u=function(){function t(t,e){for(var n=0;nv}},{key:"get",value:function(t){return g[t]||null}},{key:"all",get:function(){return s["default"].sortBy(s["default"].values(g),function(t){return t[0].entityId})}}]),e}(_["default"]),w=new m;w.dispatchToken=f["default"].register(function(t){switch(t.actionType){case h["default"].ACTION_NEW_STATE_HISTORY:s["default"].forEach(t.stateHistory,function(t){if(0!==t.length){var e=t[0].entityId;g[e]=t,y[e]=new Date}}),t.isFetchAll&&(d=new Date),w.emitChange();break;case h["default"].ACTION_LOG_OUT:d=null,y={},g={},w.emitChange()}}),e["default"]=w,t.exports=e["default"]},/*!****************************!*\ +function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var u=function(){function t(t,e){for(var n=0;nv}},{key:"get",value:function(t){return g[t]||null}},{key:"all",get:function(){return s["default"].sortBy(s["default"].values(g),function(t){return t[0].entityId})}}]),e}(_["default"]),w=new m;w.dispatchToken=f["default"].register(function(t){switch(t.actionType){case h["default"].ACTION_NEW_STATE_HISTORY:s["default"].forEach(t.stateHistory,function(t){if(0!==t.length){var e=t[0].entityId;g[e]=t,y[e]=new Date}}),t.isFetchAll&&(d=new Date),w.emitChange();break;case h["default"].ACTION_LOG_OUT:d=null,y={},g={},w.emitChange()}}),e["default"]=w,t.exports=e["default"]},/*!****************************!*\ !*** ./src/stores/sync.js ***! \****************************/ -function(t,e,n){"use strict";function r(t){return-1!==y.indexOf(t)}function i(){return y.length===v}Object.defineProperty(e,"__esModule",{value:!0});var o=function(t){return t&&t.__esModule?t:{"default":t}},u=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},a=function(){function t(t,e){for(var n=0;n0)&&f["default"].dispatch({actionType:h["default"].ACTION_NEW_STATE_HISTORY,stateHistory:e.map(function(t){return t.map(_["default"].fromJSON)}),isFetchAll:t})}function i(){s["default"]("GET","history/period").then(function(t){return r(!0,t)})}function o(t){s["default"]("GET","history/period?filter_entity_id="+t).then(function(t){return r(!1,t)})}Object.defineProperty(e,"__esModule",{value:!0});var u=function(t){return t&&t.__esModule?t:{"default":t}};e.fetchAll=i,e.fetch=o;var a=n(/*! ../call_api */5),s=u(a),c=n(/*! ../app_dispatcher */1),f=u(c),l=n(/*! ../constants */2),h=u(l),p=n(/*! ../models/state */11),_=u(p)},/*!******************************!*\ +function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){(t||e.length>0)&&f["default"].dispatch({actionType:h["default"].ACTION_NEW_STATE_HISTORY,stateHistory:e.map(function(t){return t.map(_["default"].fromJSON)}),isFetchAll:t})}function o(){s["default"]("GET","history/period").then(function(t){return i(!0,t)})}function u(t){s["default"]("GET","history/period?filter_entity_id="+t).then(function(t){return i(!1,t)})}Object.defineProperty(e,"__esModule",{value:!0}),e.fetchAll=o,e.fetch=u;var a=n(/*! ../call_api */5),s=r(a),c=n(/*! ../app_dispatcher */1),f=r(c),l=n(/*! ../constants */2),h=r(l),p=n(/*! ../models/state */11),_=r(p)},/*!******************************!*\ !*** ./src/actions/voice.js ***! \******************************/ -function(t,e,n){"use strict";function r(){return"webkitSpeechRecognition"in window}function i(){var t=g||y;l["default"].dispatch({actionType:p["default"].ACTION_LISTENING_TRANSMITTING,finalTranscript:t}),_.callService("conversation","process",{text:t}).then(function(){l["default"].dispatch({actionType:p["default"].ACTION_LISTENING_DONE,finalTranscript:t})},function(){l["default"].dispatch({actionType:p["default"].ACTION_LISTENING_ERROR})})}function o(){null!==d&&(d.onstart=null,d.onresult=null,d.onerror=null,d.onend=null,d.stop(),d=null,i()),y="",g=""}function u(){o(),window.r=d=new webkitSpeechRecognition,d.interimResults=!0,d.onstart=function(){l["default"].dispatch({actionType:p["default"].ACTION_LISTENING_START})},d.onresult=function(t){y="";for(var e=t.resultIndex;et||isNaN(t))throw TypeError("n must be a positive number");return this._maxListeners=t,this},r.prototype.emit=function(t){var e,n,r,o,s,c;if(this._events||(this._events={}),"error"===t&&(!this._events.error||u(this._events.error)&&!this._events.error.length)){if(e=arguments[1],e instanceof Error)throw e;throw TypeError('Uncaught, unspecified "error" event.')}if(n=this._events[t],a(n))return!1;if(i(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:for(r=arguments.length,o=new Array(r-1),s=1;r>s;s++)o[s-1]=arguments[s];n.apply(this,o)}else if(u(n)){for(r=arguments.length,o=new Array(r-1),s=1;r>s;s++)o[s-1]=arguments[s];for(c=n.slice(),r=c.length,s=0;r>s;s++)c[s].apply(this,o)}return!0},r.prototype.addListener=function(t,e){var n;if(!i(e))throw TypeError("listener must be a function");if(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",t,i(e.listener)?e.listener:e),this._events[t]?u(this._events[t])?this._events[t].push(e):this._events[t]=[this._events[t],e]:this._events[t]=e,u(this._events[t])&&!this._events[t].warned){var n;n=a(this._maxListeners)?r.defaultMaxListeners:this._maxListeners,n&&n>0&&this._events[t].length>n&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace())}return this},r.prototype.on=r.prototype.addListener,r.prototype.once=function(t,e){function n(){this.removeListener(t,n),r||(r=!0,e.apply(this,arguments))}if(!i(e))throw TypeError("listener must be a function");var r=!1;return n.listener=e,this.on(t,n),this},r.prototype.removeListener=function(t,e){var n,r,o,a;if(!i(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(n=this._events[t],o=n.length,r=-1,n===e||i(n.listener)&&n.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(u(n)){for(a=o;a-->0;)if(n[a]===e||n[a].listener&&n[a].listener===e){r=a;break}if(0>r)return this;1===n.length?(n.length=0,delete this._events[t]):n.splice(r,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},r.prototype.removeAllListeners=function(t){var e,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[t],i(n))this.removeListener(t,n);else for(;n.length;)this.removeListener(t,n[n.length-1]);return delete this._events[t],this},r.prototype.listeners=function(t){var e;return e=this._events&&this._events[t]?i(this._events[t])?[this._events[t]]:this._events[t].slice():[]},r.listenerCount=function(t,e){var n;return n=t._events&&t._events[e]?i(t._events[e])?1:t._events[e].length:0}},/*!***********************************!*\ !*** (webpack)/buildin/module.js ***! \***********************************/ -function(t,e,n){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children=[],t.webpackPolyfill=1),t}},/*!********************************************************!*\ - !*** (webpack)/~/node-libs-browser/~/events/events.js ***! - \********************************************************/ -function(t,e,n){function r(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function i(t){return"function"==typeof t}function o(t){return"number"==typeof t}function u(t){return"object"==typeof t&&null!==t}function a(t){return void 0===t}t.exports=r,r.EventEmitter=r,r.prototype._events=void 0,r.prototype._maxListeners=void 0,r.defaultMaxListeners=10,r.prototype.setMaxListeners=function(t){if(!o(t)||0>t||isNaN(t))throw TypeError("n must be a positive number");return this._maxListeners=t,this},r.prototype.emit=function(t){var e,n,r,o,s,c;if(this._events||(this._events={}),"error"===t&&(!this._events.error||u(this._events.error)&&!this._events.error.length)){if(e=arguments[1],e instanceof Error)throw e;throw TypeError('Uncaught, unspecified "error" event.')}if(n=this._events[t],a(n))return!1;if(i(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:for(r=arguments.length,o=new Array(r-1),s=1;r>s;s++)o[s-1]=arguments[s];n.apply(this,o)}else if(u(n)){for(r=arguments.length,o=new Array(r-1),s=1;r>s;s++)o[s-1]=arguments[s];for(c=n.slice(),r=c.length,s=0;r>s;s++)c[s].apply(this,o)}return!0},r.prototype.addListener=function(t,e){var n;if(!i(e))throw TypeError("listener must be a function");if(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",t,i(e.listener)?e.listener:e),this._events[t]?u(this._events[t])?this._events[t].push(e):this._events[t]=[this._events[t],e]:this._events[t]=e,u(this._events[t])&&!this._events[t].warned){var n;n=a(this._maxListeners)?r.defaultMaxListeners:this._maxListeners,n&&n>0&&this._events[t].length>n&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace())}return this},r.prototype.on=r.prototype.addListener,r.prototype.once=function(t,e){function n(){this.removeListener(t,n),r||(r=!0,e.apply(this,arguments))}if(!i(e))throw TypeError("listener must be a function");var r=!1;return n.listener=e,this.on(t,n),this},r.prototype.removeListener=function(t,e){var n,r,o,a;if(!i(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(n=this._events[t],o=n.length,r=-1,n===e||i(n.listener)&&n.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(u(n)){for(a=o;a-->0;)if(n[a]===e||n[a].listener&&n[a].listener===e){r=a;break}if(0>r)return this;1===n.length?(n.length=0,delete this._events[t]):n.splice(r,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},r.prototype.removeAllListeners=function(t){var e,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[t],i(n))this.removeListener(t,n);else for(;n.length;)this.removeListener(t,n[n.length-1]);return delete this._events[t],this},r.prototype.listeners=function(t){var e;return e=this._events&&this._events[t]?i(this._events[t])?[this._events[t]]:this._events[t].slice():[]},r.listenerCount=function(t,e){var n;return n=t._events&&t._events[e]?i(t._events[e])?1:t._events[e].length:0}}]); +function(t,e,n){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children=[],t.webpackPolyfill=1),t}}]); //# sourceMappingURL=homeassistant.min.js.map - - + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/homeassistant/components/frontend/www_static/polymer/more-infos/more-info-content.html b/homeassistant/components/frontend/www_static/polymer/more-infos/more-info-content.html index dbdfbcfe74b..0d982bba66d 100644 --- a/homeassistant/components/frontend/www_static/polymer/more-infos/more-info-content.html +++ b/homeassistant/components/frontend/www_static/polymer/more-infos/more-info-content.html @@ -8,6 +8,7 @@ +