text
stringlengths
3
1.05M
const { GraphQLString, GraphQLList, GraphQLNonNull, GraphQLInputObjectType, } = require('graphql'); /** * @name exports * @summary MedicinalProductIndicationotherTherapy Input Schema */ module.exports = new GraphQLInputObjectType({ name: 'MedicinalProductIndicationotherTherapy_Input', description: '', fields: () => ({ _id: { type: require('./element.input.js'), description: 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', }, id: { type: GraphQLString, description: 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', }, extension: { type: new GraphQLList(require('./extension.input.js')), description: 'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.', }, modifierExtension: { type: new GraphQLList(require('./extension.input.js')), description: "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", }, therapyRelationshipType: { type: new GraphQLNonNull(require('./codeableconcept.input.js')), description: 'The type of relationship between the medicinal product indication or contraindication and another therapy.', }, medicationCodeableConcept: { type: new GraphQLNonNull(require('./codeableconcept.input.js')), description: 'Reference to a specific medication (active substance, medicinal product or class of products) as part of an indication or contraindication.', }, medicationReference: { type: new GraphQLNonNull(GraphQLString), description: 'Reference to a specific medication (active substance, medicinal product or class of products) as part of an indication or contraindication.', }, }), });
# -*- coding: utf-8 -*- __author__ = 'Ricardo M. Vilchis' __email__ = 'ajkaanbal@gmail.com' __version__ = '0.1.0'
import { makeStyles } from '@material-ui/core'; import { cvMakerFooter, form } from '../styles'; const styles = makeStyles(() => ({ ...cvMakerFooter, ...form, root: { background: '#f9f9f9', }, container: { background: '#fff', padding: '20px 32px 40px', }, alignCenter: { alignItems: 'center', }, avatarContain: { width: 97, height: 97, margin: '20px auto 70px', '& p': { marginTop: 10, fontSize: 14, textAlign: 'center', }, }, })); export default styles;
/** * Copyright 2015 Telerik AD * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ !function(e,define){define([],e)}(function(){return function(e){var t=e.kendo||(e.kendo={cultures:{}});t.cultures["sr-Cyrl-BA"]={name:"sr-Cyrl-BA",numberFormat:{pattern:["-n"],decimals:2,",":".",".":",",groupSize:[3],percent:{pattern:["-n%","n%"],decimals:2,",":".",".":",",groupSize:[3],symbol:"%"},currency:{pattern:["-n $","n $"],decimals:2,",":".",".":",",groupSize:[3],symbol:"КМ"}},calendars:{standard:{days:{names:["недјеља","понедјељак","уторак","сриједа","четвртак","петак","субота"],namesAbbr:["нед","пон","уто","сри","чет","пет","суб"],namesShort:["н","п","у","с","ч","п","с"]},months:{names:["јануар","фебруар","март","април","мај","јуни","јули","август","септембар","октобар","новембар","децембар"],namesAbbr:["јан","феб","мар","апр","мај","јун","јул","авг","сеп","окт","нов","дец"]},AM:[""],PM:[""],patterns:{d:"d.M.yyyy.",D:"d. MMMM yyyy",F:"d. MMMM yyyy H:mm:ss",g:"d.M.yyyy. H:mm",G:"d.M.yyyy. H:mm:ss",m:"d. MMMM",M:"d. MMMM",s:"yyyy'-'MM'-'dd'T'HH':'mm':'ss",t:"H:mm",T:"H:mm:ss",u:"yyyy'-'MM'-'dd HH':'mm':'ss'Z'",y:"MMMM, yyyy",Y:"MMMM, yyyy"},"/":".",":":":",firstDay:1}}}}(this),window.kendo},"function"==typeof define&&define.amd?define:function(e,t){t()});
!function(e){function r(r){for(var n,a,i=r[0],c=r[1],f=r[2],p=0,s=[];p<i.length;p++)a=i[p],Object.prototype.hasOwnProperty.call(o,a)&&o[a]&&s.push(o[a][0]),o[a]=0;for(n in c)Object.prototype.hasOwnProperty.call(c,n)&&(e[n]=c[n]);for(l&&l(r);s.length;)s.shift()();return u.push.apply(u,f||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,i=1;i<t.length;i++)0!==o[t[i]]&&(n=!1);n&&(u.splice(r--,1),e=a(a.s=t[0]))}return e}var n={},o={0:0},u=[];function a(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,a),t.l=!0,t.exports}a.e=function(e){var r=[],t=o[e];if(0!==t)if(t)r.push(t[2]);else{var n=new Promise((function(r,n){t=o[e]=[r,n]}));r.push(t[2]=n);var u,i=document.createElement("script");i.charset="utf-8",i.timeout=120,a.nc&&i.setAttribute("nonce",a.nc),i.src=function(e){return a.p+""+({}[e]||e)+"-es2015."+{1:"1c168f5fe15b79d92727",6:"4e29476d09a3116a05c0",7:"deee683238a90101ea3b",8:"da0c2fba07783e48c4e1"}[e]+".js"}(e);var c=new Error;u=function(r){i.onerror=i.onload=null,clearTimeout(f);var t=o[e];if(0!==t){if(t){var n=r&&("load"===r.type?"missing":r.type),u=r&&r.target&&r.target.src;c.message="Loading chunk "+e+" failed.\n("+n+": "+u+")",c.name="ChunkLoadError",c.type=n,c.request=u,t[1](c)}o[e]=void 0}};var f=setTimeout((function(){u({type:"timeout",target:i})}),12e4);i.onerror=i.onload=u,document.head.appendChild(i)}return Promise.all(r)},a.m=e,a.c=n,a.d=function(e,r,t){a.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,r){if(1&r&&(e=a(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(a.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)a.d(t,n,(function(r){return e[r]}).bind(null,n));return t},a.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(r,"a",r),r},a.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},a.p="",a.oe=function(e){throw console.error(e),e};var i=window.webpackJsonp=window.webpackJsonp||[],c=i.push.bind(i);i.push=r,i=i.slice();for(var f=0;f<i.length;f++)r(i[f]);var l=c;t()}([]);
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from . import outputs from ._enums import * from ._inputs import * __all__ = ['Server'] class Server(pulumi.CustomResource): def __init__(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions] = None, administrator_login: Optional[pulumi.Input[str]] = None, administrator_login_password: Optional[pulumi.Input[str]] = None, availability_zone: Optional[pulumi.Input[str]] = None, create_mode: Optional[pulumi.Input[Union[str, 'CreateMode']]] = None, delegated_subnet_arguments: Optional[pulumi.Input[pulumi.InputType['DelegatedSubnetArgumentsArgs']]] = None, ha_enabled: Optional[pulumi.Input[Union[str, 'HaEnabledEnum']]] = None, identity: Optional[pulumi.Input[pulumi.InputType['IdentityArgs']]] = None, infrastructure_encryption: Optional[pulumi.Input[Union[str, 'InfrastructureEncryptionEnum']]] = None, location: Optional[pulumi.Input[str]] = None, maintenance_window: Optional[pulumi.Input[pulumi.InputType['MaintenanceWindowArgs']]] = None, replication_role: Optional[pulumi.Input[str]] = None, resource_group_name: Optional[pulumi.Input[str]] = None, restore_point_in_time: Optional[pulumi.Input[str]] = None, server_name: Optional[pulumi.Input[str]] = None, sku: Optional[pulumi.Input[pulumi.InputType['SkuArgs']]] = None, source_server_id: Optional[pulumi.Input[str]] = None, ssl_enforcement: Optional[pulumi.Input[Union[str, 'SslEnforcementEnum']]] = None, storage_profile: Optional[pulumi.Input[pulumi.InputType['StorageProfileArgs']]] = None, tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, version: Optional[pulumi.Input[Union[str, 'ServerVersion']]] = None, __props__=None, __name__=None, __opts__=None): """ Represents a server. :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[str] administrator_login: The administrator's login name of a server. Can only be specified when the server is being created (and is required for creation). :param pulumi.Input[str] administrator_login_password: The password of the administrator login (required for server creation). :param pulumi.Input[str] availability_zone: availability Zone information of the server. :param pulumi.Input[Union[str, 'CreateMode']] create_mode: The mode to create a new MySQL server. :param pulumi.Input[pulumi.InputType['DelegatedSubnetArgumentsArgs']] delegated_subnet_arguments: Delegated subnet arguments. :param pulumi.Input[Union[str, 'HaEnabledEnum']] ha_enabled: Enable HA or not for a server. :param pulumi.Input[pulumi.InputType['IdentityArgs']] identity: The Azure Active Directory identity of the server. :param pulumi.Input[Union[str, 'InfrastructureEncryptionEnum']] infrastructure_encryption: Status showing whether the server enabled infrastructure encryption. :param pulumi.Input[str] location: The geo-location where the resource lives :param pulumi.Input[pulumi.InputType['MaintenanceWindowArgs']] maintenance_window: Maintenance window of a server. :param pulumi.Input[str] replication_role: The replication role. :param pulumi.Input[str] resource_group_name: The name of the resource group. The name is case insensitive. :param pulumi.Input[str] restore_point_in_time: Restore point creation time (ISO8601 format), specifying the time to restore from. :param pulumi.Input[str] server_name: The name of the server. :param pulumi.Input[pulumi.InputType['SkuArgs']] sku: The SKU (pricing tier) of the server. :param pulumi.Input[str] source_server_id: The source MySQL server id. :param pulumi.Input[Union[str, 'SslEnforcementEnum']] ssl_enforcement: Enable ssl enforcement or not when connect to server. :param pulumi.Input[pulumi.InputType['StorageProfileArgs']] storage_profile: Storage profile of a server. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: Resource tags. :param pulumi.Input[Union[str, 'ServerVersion']] version: Server version. """ if __name__ is not None: warnings.warn("explicit use of __name__ is deprecated", DeprecationWarning) resource_name = __name__ if __opts__ is not None: warnings.warn("explicit use of __opts__ is deprecated, use 'opts' instead", DeprecationWarning) opts = __opts__ if opts is None: opts = pulumi.ResourceOptions() if not isinstance(opts, pulumi.ResourceOptions): raise TypeError('Expected resource options to be a ResourceOptions instance') if opts.version is None: opts.version = _utilities.get_version() if opts.id is None: if __props__ is not None: raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = dict() __props__['administrator_login'] = administrator_login __props__['administrator_login_password'] = administrator_login_password __props__['availability_zone'] = availability_zone __props__['create_mode'] = create_mode __props__['delegated_subnet_arguments'] = delegated_subnet_arguments __props__['ha_enabled'] = ha_enabled __props__['identity'] = identity __props__['infrastructure_encryption'] = infrastructure_encryption __props__['location'] = location __props__['maintenance_window'] = maintenance_window __props__['replication_role'] = replication_role if resource_group_name is None and not opts.urn: raise TypeError("Missing required property 'resource_group_name'") __props__['resource_group_name'] = resource_group_name __props__['restore_point_in_time'] = restore_point_in_time __props__['server_name'] = server_name __props__['sku'] = sku __props__['source_server_id'] = source_server_id __props__['ssl_enforcement'] = ssl_enforcement __props__['storage_profile'] = storage_profile __props__['tags'] = tags __props__['version'] = version __props__['byok_enforcement'] = None __props__['earliest_restore_date'] = None __props__['fully_qualified_domain_name'] = None __props__['ha_state'] = None __props__['name'] = None __props__['public_network_access'] = None __props__['replica_capacity'] = None __props__['standby_availability_zone'] = None __props__['state'] = None __props__['type'] = None alias_opts = pulumi.ResourceOptions(aliases=[pulumi.Alias(type_="azure-nextgen:dbformysql/v20200701privatepreview:Server"), pulumi.Alias(type_="azure-native:dbformysql/v20200701preview:Server"), pulumi.Alias(type_="azure-nextgen:dbformysql/v20200701preview:Server")]) opts = pulumi.ResourceOptions.merge(opts, alias_opts) super(Server, __self__).__init__( 'azure-native:dbformysql/v20200701privatepreview:Server', resource_name, __props__, opts) @staticmethod def get(resource_name: str, id: pulumi.Input[str], opts: Optional[pulumi.ResourceOptions] = None) -> 'Server': """ Get an existing Server resource's state with the given name, id, and optional extra properties used to qualify the lookup. :param str resource_name: The unique name of the resulting resource. :param pulumi.Input[str] id: The unique provider ID of the resource to lookup. :param pulumi.ResourceOptions opts: Options for the resource. """ opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id)) __props__ = dict() __props__["administrator_login"] = None __props__["administrator_login_password"] = None __props__["availability_zone"] = None __props__["byok_enforcement"] = None __props__["create_mode"] = None __props__["delegated_subnet_arguments"] = None __props__["earliest_restore_date"] = None __props__["fully_qualified_domain_name"] = None __props__["ha_enabled"] = None __props__["ha_state"] = None __props__["identity"] = None __props__["infrastructure_encryption"] = None __props__["location"] = None __props__["maintenance_window"] = None __props__["name"] = None __props__["public_network_access"] = None __props__["replica_capacity"] = None __props__["replication_role"] = None __props__["restore_point_in_time"] = None __props__["sku"] = None __props__["source_server_id"] = None __props__["ssl_enforcement"] = None __props__["standby_availability_zone"] = None __props__["state"] = None __props__["storage_profile"] = None __props__["tags"] = None __props__["type"] = None __props__["version"] = None return Server(resource_name, opts=opts, __props__=__props__) @property @pulumi.getter(name="administratorLogin") def administrator_login(self) -> pulumi.Output[Optional[str]]: """ The administrator's login name of a server. Can only be specified when the server is being created (and is required for creation). """ return pulumi.get(self, "administrator_login") @property @pulumi.getter(name="administratorLoginPassword") def administrator_login_password(self) -> pulumi.Output[Optional[str]]: """ The password of the administrator login (required for server creation). """ return pulumi.get(self, "administrator_login_password") @property @pulumi.getter(name="availabilityZone") def availability_zone(self) -> pulumi.Output[Optional[str]]: """ availability Zone information of the server. """ return pulumi.get(self, "availability_zone") @property @pulumi.getter(name="byokEnforcement") def byok_enforcement(self) -> pulumi.Output[str]: """ Status showing whether the data encryption is enabled with customer-managed keys. """ return pulumi.get(self, "byok_enforcement") @property @pulumi.getter(name="createMode") def create_mode(self) -> pulumi.Output[Optional[str]]: """ The mode to create a new MySQL server. """ return pulumi.get(self, "create_mode") @property @pulumi.getter(name="delegatedSubnetArguments") def delegated_subnet_arguments(self) -> pulumi.Output[Optional['outputs.DelegatedSubnetArgumentsResponse']]: """ Delegated subnet arguments. """ return pulumi.get(self, "delegated_subnet_arguments") @property @pulumi.getter(name="earliestRestoreDate") def earliest_restore_date(self) -> pulumi.Output[str]: """ Earliest restore point creation time (ISO8601 format) """ return pulumi.get(self, "earliest_restore_date") @property @pulumi.getter(name="fullyQualifiedDomainName") def fully_qualified_domain_name(self) -> pulumi.Output[str]: """ The fully qualified domain name of a server. """ return pulumi.get(self, "fully_qualified_domain_name") @property @pulumi.getter(name="haEnabled") def ha_enabled(self) -> pulumi.Output[Optional[str]]: """ Enable HA or not for a server. """ return pulumi.get(self, "ha_enabled") @property @pulumi.getter(name="haState") def ha_state(self) -> pulumi.Output[str]: """ The state of a HA server. """ return pulumi.get(self, "ha_state") @property @pulumi.getter def identity(self) -> pulumi.Output[Optional['outputs.IdentityResponse']]: """ The Azure Active Directory identity of the server. """ return pulumi.get(self, "identity") @property @pulumi.getter(name="infrastructureEncryption") def infrastructure_encryption(self) -> pulumi.Output[Optional[str]]: """ Status showing whether the server enabled infrastructure encryption. """ return pulumi.get(self, "infrastructure_encryption") @property @pulumi.getter def location(self) -> pulumi.Output[str]: """ The geo-location where the resource lives """ return pulumi.get(self, "location") @property @pulumi.getter(name="maintenanceWindow") def maintenance_window(self) -> pulumi.Output[Optional['outputs.MaintenanceWindowResponse']]: """ Maintenance window of a server. """ return pulumi.get(self, "maintenance_window") @property @pulumi.getter def name(self) -> pulumi.Output[str]: """ The name of the resource """ return pulumi.get(self, "name") @property @pulumi.getter(name="publicNetworkAccess") def public_network_access(self) -> pulumi.Output[str]: """ Whether or not public network access is allowed for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled' """ return pulumi.get(self, "public_network_access") @property @pulumi.getter(name="replicaCapacity") def replica_capacity(self) -> pulumi.Output[int]: """ The maximum number of replicas that a primary server can have. """ return pulumi.get(self, "replica_capacity") @property @pulumi.getter(name="replicationRole") def replication_role(self) -> pulumi.Output[Optional[str]]: """ The replication role. """ return pulumi.get(self, "replication_role") @property @pulumi.getter(name="restorePointInTime") def restore_point_in_time(self) -> pulumi.Output[Optional[str]]: """ Restore point creation time (ISO8601 format), specifying the time to restore from. """ return pulumi.get(self, "restore_point_in_time") @property @pulumi.getter def sku(self) -> pulumi.Output[Optional['outputs.SkuResponse']]: """ The SKU (pricing tier) of the server. """ return pulumi.get(self, "sku") @property @pulumi.getter(name="sourceServerId") def source_server_id(self) -> pulumi.Output[Optional[str]]: """ The source MySQL server id. """ return pulumi.get(self, "source_server_id") @property @pulumi.getter(name="sslEnforcement") def ssl_enforcement(self) -> pulumi.Output[Optional[str]]: """ Enable ssl enforcement or not when connect to server. """ return pulumi.get(self, "ssl_enforcement") @property @pulumi.getter(name="standbyAvailabilityZone") def standby_availability_zone(self) -> pulumi.Output[str]: """ availability Zone information of the server. """ return pulumi.get(self, "standby_availability_zone") @property @pulumi.getter def state(self) -> pulumi.Output[str]: """ The state of a server. """ return pulumi.get(self, "state") @property @pulumi.getter(name="storageProfile") def storage_profile(self) -> pulumi.Output[Optional['outputs.StorageProfileResponse']]: """ Storage profile of a server. """ return pulumi.get(self, "storage_profile") @property @pulumi.getter def tags(self) -> pulumi.Output[Optional[Mapping[str, str]]]: """ Resource tags. """ return pulumi.get(self, "tags") @property @pulumi.getter def type(self) -> pulumi.Output[str]: """ The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" """ return pulumi.get(self, "type") @property @pulumi.getter def version(self) -> pulumi.Output[Optional[str]]: """ Server version. """ return pulumi.get(self, "version") def translate_output_property(self, prop): return _tables.CAMEL_TO_SNAKE_CASE_TABLE.get(prop) or prop def translate_input_property(self, prop): return _tables.SNAKE_TO_CAMEL_CASE_TABLE.get(prop) or prop
'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); var heyListen = require('hey-listen'); var prevTime = 0; var onNextFrame = typeof window !== 'undefined' && window.requestAnimationFrame !== undefined ? function (callback) { return window.requestAnimationFrame(callback); } : function (callback) { var timestamp = Date.now(); var timeToCall = Math.max(0, 16.7 - (timestamp - prevTime)); prevTime = timestamp + timeToCall; setTimeout(function () { return callback(prevTime); }, timeToCall); }; var createStep = (function (setRunNextFrame) { var processToRun = []; var processToRunNextFrame = []; var numThisFrame = 0; var isProcessing = false; var i = 0; var cancelled = new WeakSet(); var toKeepAlive = new WeakSet(); var renderStep = { cancel: function (process) { var indexOfCallback = processToRunNextFrame.indexOf(process); cancelled.add(process); if (indexOfCallback !== -1) { processToRunNextFrame.splice(indexOfCallback, 1); } }, process: function (frame) { var _a; isProcessing = true; _a = [ processToRunNextFrame, processToRun ], processToRun = _a[0], processToRunNextFrame = _a[1]; processToRunNextFrame.length = 0; numThisFrame = processToRun.length; if (numThisFrame) { var process_1; for (i = 0; i < numThisFrame; i++) { process_1 = processToRun[i]; process_1(frame); if (toKeepAlive.has(process_1) === true && !cancelled.has(process_1)) { renderStep.schedule(process_1); setRunNextFrame(true); } } } isProcessing = false; }, schedule: function (process, keepAlive, immediate) { heyListen.invariant(typeof process === 'function', 'Argument must be a function'); var addToCurrentBuffer = immediate && isProcessing; var buffer = addToCurrentBuffer ? processToRun : processToRunNextFrame; if (keepAlive) toKeepAlive.add(process); if (buffer.indexOf(process) === -1) { buffer.push(process); if (addToCurrentBuffer) numThisFrame = processToRun.length; } } }; return renderStep; }); var StepId; (function (StepId) { StepId["Read"] = "read"; StepId["Update"] = "update"; StepId["Render"] = "render"; StepId["PostRender"] = "postRender"; StepId["FixedUpdate"] = "fixedUpdate"; })(StepId || (StepId = {})); var maxElapsed = 40; var defaultElapsed = (1 / 60) * 1000; var useDefaultElapsed = true; var willRunNextFrame = false; var isProcessing = false; var frame = { delta: 0, timestamp: 0 }; var stepsOrder = [ StepId.Read, StepId.Update, StepId.Render, StepId.PostRender ]; var setWillRunNextFrame = function (willRun) { return (willRunNextFrame = willRun); }; var _a = stepsOrder.reduce(function (acc, key) { var step = createStep(setWillRunNextFrame); acc.sync[key] = function (process, keepAlive, immediate) { if (keepAlive === void 0) { keepAlive = false; } if (immediate === void 0) { immediate = false; } if (!willRunNextFrame) startLoop(); step.schedule(process, keepAlive, immediate); return process; }; acc.cancelSync[key] = function (process) { return step.cancel(process); }; acc.steps[key] = step; return acc; }, { steps: {}, sync: {}, cancelSync: {} }), steps = _a.steps, sync = _a.sync, cancelSync = _a.cancelSync; var processStep = function (stepId) { return steps[stepId].process(frame); }; var processFrame = function (timestamp) { willRunNextFrame = false; frame.delta = useDefaultElapsed ? defaultElapsed : Math.max(Math.min(timestamp - frame.timestamp, maxElapsed), 1); if (!useDefaultElapsed) defaultElapsed = frame.delta; frame.timestamp = timestamp; isProcessing = true; stepsOrder.forEach(processStep); isProcessing = false; if (willRunNextFrame) { useDefaultElapsed = false; onNextFrame(processFrame); } }; var startLoop = function () { willRunNextFrame = true; useDefaultElapsed = true; if (!isProcessing) onNextFrame(processFrame); }; var getFrameData = function () { return frame; }; exports.default = sync; exports.cancelSync = cancelSync; exports.getFrameData = getFrameData;
import React from 'react'; const Inventory = () => { return ( <h1>This is inventory page</h1> ) } export default Inventory;
exports.handler = async (event) => { return { statusCode: 200, body: JSON.stringify( { message: 'Go Serverless v1.0! Your function executed successfully!', input: event, }, null, 2 ), }; // Use this code if you don't use the http event with the LAMBDA-PROXY integration // return { message: 'Go Serverless v1.0! Your function executed successfully!', event }; };
// Ajax request to print table in the homepage function load_table() { $("#products").empty(); let html = ``; $.ajax({ url: "/products/categories", type: 'GET', cache: false, success: (options) => { for (const [key, value] of Object.entries(options)) { html += `<div class="container"> <div class="row mt-4"> <h2>`; html += value; html += `</h2> </div> <div class="row"> `; $.ajax({ async: false, url: "/products", type: 'GET', cache: false, data: { category: value }, success: (products) => { for (const [productKey, product] of Object.entries(products)) { html += ` <div class="col-lg-2 col-md-3 col-sm-4 mt-2"> <img src="`; html += product.image; html += `" alt="" width="150" height="150" /> <div class="row" style="min-height: 150px;"> <div class="col-md-12 mt-3"> <h6>`; html += product.title; html += `</h6> </div> <div class="col-md-12"> <p><b>Price:</b> €`; html += product.price; html += `</p> </div> </div> <div class="row"> <div class="col-md-12 align-bottom"> <button type="button" class="btn btn-warning" data-bs-toggle="modal" data-bs-target="#editModal" data-id="`; html += product._id; html += `">Edit</button> <button type="button" class="btn btn-danger" style="margin-left:10px;" onclick="deleteProduct('`; html += product._id; html += `')">Delete</button> </div> </div> </div> `; } } }); html += ` </div> </div> `; } $("#products").append(html); } }); }; // Ajax request to populate the selects with the product categories function populate_selects () { $.ajax({ url: "/products/categories", type: 'GET', cache: false, success: (options) => { var $cs = $("#createModalSelect"); var $es = $("#editModalSelect"); for (const [key, value] of Object.entries(options)) { $cs.append($("<option></option>").attr("value", value).text(value)); $es.append($("<option></option>").attr("value", value).text(value)); } } }); }; function validateForm (form, e) { // prevent form submit if form is not valid if (!form.checkValidity()) { e.preventDefault(); e.stopPropagation(); } form.classList.add('was-validated') } // Ajax request to delete products function deleteProduct(id){ $.ajax({ url: "/products/"+id, type: 'DELETE', cache: false, success: () => { $('.success').toast('show'); load_table(); }, error: () => { $('.error').toast('show'); }, }); }; // show toast after an request based on a get parameter function showToast () { // show toast in case there is a get parameter let searchParams = new URLSearchParams(window.location.search) if (searchParams.has('sucess')) { const parameter = searchParams.get('sucess'); if (parameter == 'ok') { $('.success').toast('show'); } else { $('.error').toast('show'); } } } // Load table when the page loads. $(document).ready(function () { load_table(); populate_selects(); showToast(); })
const User = require('../models/user'); const Role = require('../models/role'); const jwt = require('jsonwebtoken'); const keys = require('../config/keys'); const storage = require('../utils/cloud_storage'); module.exports = { async getAll(req, res, next) { try { const users = await User.getAll(); console.log(`Usuarios: ${users}`); return res.status(201).json({ success: true, message: null, data: users }); } catch (error) { console.log(`Error: ${error}`); return res.status(200).json({ success: false, data : null, message: 'Error al obtener los usuarios', error: error }); } }, async register(req, res, next) { try { const user = req.body; const data = await User.create(user); await Role.create(data.id, 1); // Role by default -> client return res.status(201).json({ success: true, message: 'El registro se ha realizado correctamente. Por favor, ahora inicia sesión.', data: data.id }); } catch (error) { console.log(`Error: ${error}`); return res.status(501).json({ success: false, data : null, message: 'Hubo un error al registrar el usuario. Intenta nuevamente.', error: error }); } }, async registerWithImage(req, res, next) { try { const user = JSON.parse(req.body.user); console.log(`Datos enviados del usuario: ${user}`); const files = request.files; if(files.length > 0){ const pathImage = `image_${Date.now()}`; //Nombre del archivo const url = await storage(files[0], pathImage); if(url != undefined && url != null){ user.image = url; } } const data = await User.create(user); await Role.create(data.id, 1); // Role by default -> client return res.status(201).json({ success: true, message: 'El registro se ha realizado correctamente. Por favor, ahora inicia sesión.', data: data.id }); } catch (error) { console.log(`Error: ${error}`); return res.status(501).json({ success: false, data : null, message: 'Hubo un error al registrar el usuario. Intenta nuevamente.', error: error }); } }, async login(req, res, next) { try { const email = req.body.email; const password = req.body.password; const userResult = await User.findByEmail(email); if(!userResult) { return res.status(401).json({ success: false, message: 'El correo electrónico no fue encontrado. Verifica tus datos.', data: null }); } if(User.isPasswordMatched(password, userResult.password, userResult.salt)) { const token = jwt.sign( { id: userResult.id, email: userResult.email, }, keys.secretOrKey, { //expiresIn: (60*60*24) // 1 hora } ); const data = { id: userResult.id, name: userResult.name, lastname: userResult.lastname, email: userResult.email, phone: userResult.phone, image: userResult.image, session_token: `JWT ${token}`, roles: userResult.roles } console.log(`USUARIO: ${data}`); return res.status(200).json({ success: true, message: `¡Bienvenido ${userResult.name} ${userResult.lastname}!`, data: data }); } else{ return res.status(401).json({ success: false, message: 'La contraseña y/o el correo electrónico son incorrectos. Verifica tus datos.', data: null }); } } catch (error) { console.log(`Error: ${error}`); return res.status(501).json({ success: false, data : null, message: 'Error al momento de autenticar al usuario. Intenta nuevamente.', error: error }); } } };
const AssertionError = require('assertion-error'); const Reporter = require('../reporter'); const Context = require('./context.js'); const TestHooks = require('./hooks.js'); const TestCase = require('./testcase.js'); const Runnable = require('./runnable.js'); const NightwatchAssertError = require('../assertion').AssertionError; const SuiteRetries = require('./retries.js'); const NightwatchClient = require('../core/client.js'); const Concurrency = require('../runner/concurrency'); const ElementGlobal = require('../api/_loaders/element-global.js'); const {Logger, Screenshots, alwaysDisplayError, isString, isFunction} = require('../utils'); const {By, Key} = require('selenium-webdriver'); class TestSuite { constructor({modulePath, modules, settings, argv, usingMocha = false, addtOpts = {}}) { this.settings = settings; this.argv = argv; this.modulePath = modulePath; this.allModulePaths = modules; this.testcase = null; this.currentRunnable = null; this.usingMocha = usingMocha; this.globalHooks = addtOpts.globalHooks || {}; this.__reportPrefix = ''; } get api() { return this.client.api; } get commandQueue() { if (!this.client) { return null; } return this.client.queue; } get reportPrefix() { return this.__reportPrefix; } get transport() { return this.client.transport; } get skipTestcasesOnFail() { let localDefinedValue = this.context.getSkipTestcasesOnFail(); if (localDefinedValue !== undefined) { return localDefinedValue; } let settingsValueUndefined = this.settings.skip_testcases_on_fail === undefined; if (settingsValueUndefined && this.context.unitTestingMode) { // false by default when running unit tests return false; } // true by default when not running unit tests return settingsValueUndefined || this.settings.skip_testcases_on_fail; } get endSessionOnFail() { let definedValue = this.context.getEndSessionOnFail(); return definedValue === undefined ? this.settings.end_session_on_fail : definedValue; } get isES6Async() { return this.client && (this.client.isES6AsyncTestcase || this.client.isES6AsyncTestHook); } get failFastMode() { return this.argv['fail-fast'] || this.settings.enable_fail_fast; } shouldSkipTestsOnFail() { return this.skipTestcasesOnFail && !this.context.unitTestingMode || this.failFastMode; } async initCommon(opts = {}) { if (!this.settings.unit_testing_mode) { this.addPropertiesToGlobalScope(); } this.initClient(opts); if (this.argv.preview) { this.context = { getDesiredCapabilities() {}, isDisabled() { return false; } }; this.reporter = { registerTestError(err) { Logger.error(err); } }; } else { await this.createContext(opts); } this.setSuiteName(); this.setRetries(); } async init(opts = {}) { await this.initCommon(opts); this.updateClient(); this.setupHooks(); return this; } setModulePath(file) { this.modulePath = file; this.context.modulePath = file; } initClient({initialize = true} = {}) { const settings = Object.assign({}, this.settings); this.client = NightwatchClient.create(settings, this.argv); if (initialize) { this.client.initialize(); } } updateClient() { // this is necessary because mocha as a different suite setup flow if (!this.settings.disable_global_apis) { Object.defineProperty(global, 'browser', { configurable: true, get: function() { return this.client.api; }.bind(this) }); } if (this.settings.sync_test_names) { this.client.mergeCapabilities({ name: this.suiteName }); } if (this.context.getDesiredCapabilities()) { this.client.mergeCapabilities(this.context.getDesiredCapabilities()); } this.client.createTransport(); if (!this.argv.preview) { this.createReporter(); this.client .setReporter(this.reporter) .setCurrentTest(); } return this; } async retrySuite() { this.suiteRetries.incrementSuiteRetriesCount(); await this.terminate('RETRY_SUITE'); await this.createContext({reloadModuleCache: this.context.usingBddDescribe}); this.createClient(); this.setupHooks(); return this.run(); } createReporter() { if (!this.context) { throw new Error('Context must be created before creating the reporter.'); } const {suiteRetries, suiteName} = this; const {tests, moduleKey, modulePath, groupName} = this.context; this.reporter = new Reporter({ settings: this.client.settings, tests, suiteRetries, addOpts: { reporter: this.argv.reporter, suiteName, moduleKey, modulePath, reportPrefix: '', groupName } }); } createClient(client = null) { if (client) { this.client = client; return this; } this.initClient(); this.updateClient(); return this; } async createContext({context = null, reloadModuleCache = false, suiteTitle = null, attributes = {}} = {}) { if (context) { this.context = context; return this; } const {modulePath, settings, argv, client} = this; this.context = new Context({modulePath, settings, argv, attributes}); if (settings.tag_filter && settings.tag_filter.length > 0) { reloadModuleCache = true; } this.context.setReloadModuleCache(reloadModuleCache); await this.context.init({usingMocha: this.usingMocha, suiteTitle, client}); this.context.setReportKey(this.allModulePaths); return this; } addPropertiesToGlobalScope() { if (this.settings.disable_global_apis) { return null; } Object.defineProperty(global, 'by', { configurable: true, get: function() { return By; } }); Object.defineProperty(global, 'Keys', { configurable: true, get: function() { return Key; } }); Object.defineProperty(global, 'element', { configurable: true, value: function(locator, options = {}) { return ElementGlobal.element({locator, testSuite: this, options}); }.bind(this), writable: false }); if (this.settings.disable_global_expect) { return null; } const globalExpect = function(...args) { return global.browser.expect(...args); }; Object.defineProperty(globalExpect, 'element', { value: function(...args) { return global.browser.expect.element(...args); }, writable: false }); Object.defineProperty(globalExpect, 'elements', { value: function(...args) { return global.browser.expect.elements(...args); }, writable: false }); Object.defineProperty(globalExpect, 'component', { value: function(...args) { return global.browser.expect.component(...args); }, writable: false }); Object.defineProperty(globalExpect, 'title', { value: function(...args) { return global.browser.expect.title(...args); }, writable: false }); Object.defineProperty(globalExpect, 'cookie', { value: function(...args) { return this.expect.cookie(...args); }, writable: false }); Object.defineProperty(globalExpect, 'url', { value: function(...args) { return this.expect.url(...args); }, writable: false }); Object.freeze(globalExpect); Object.defineProperty(global, 'expect', { configurable: true, get: function() { return globalExpect; } }); } setUncaughtError(err) { this.uncaughtError = err; } setReportPrefix(data) { this.settings.report_prefix = this.__reportPrefix = ''; if (!data) { return this; } let capabilities = data.capabilities || {}; let browserName = (capabilities.browserName && capabilities.browserName.toUpperCase()) || ''; let browserVersion = capabilities.version || capabilities.browserVersion || ''; let platformVersion = capabilities.platform || capabilities.platformVersion || ''; if (!this.context.unitTestingMode) { this.settings.report_prefix = this.__reportPrefix = `${browserName}_${browserVersion}_${platformVersion}_`.replace(/ /g, '_'); } this.reporter.setFileNamePrefix(this.reportPrefix); return this; } setRetries() { if (this.argv.preview) { return this; } this.suiteRetries = new SuiteRetries({ retries: this.context.retries.testcase || this.argv.retries, suiteRetries: this.context.retries.suite || this.argv.suiteRetries }); return this; } setSuiteName() { if (this.argv.preview) { this.suiteName = 'Preview'; } else { this.suiteName = this.context.getSuiteName(); } return this; } /** * Instantiates the test hooks * * @return {TestSuite} */ setupHooks() { this.hooks = new TestHooks(this.context, { asyncHookTimeout: this.settings.globals.asyncHookTimeout }); return this; } runHook(hookName) { Logger.log(`${Logger.colors.green('→')} Running [${hookName}]:`); return this.handleRunnable(hookName, () => { return this.hooks[hookName].run(this.client); }).then(result => { Logger.log(`${Logger.colors.green('→')} Completed [${hookName}].`); return result; }); } runGlobalHook(hookName) { if (!this.globalHooks[hookName]) { return Promise.resolve(); } return this.handleRunnable(hookName, () => { return this.globalHooks[hookName].run(this.client); }); } createSession() { if (this.client.sessionId || this.context.unitTestingMode) { return Promise.resolve(); } const {argv} = this; const {moduleKey} = this.context; return this.client.createSession({argv, moduleKey}).catch(err => { err.sessionCreate = true; this.reporter.registerTestError(err); throw err; }); } startTestSuite() { if (!this.client) { this.createClient().setupHooks(); } return this.createSession() .then(data => { this.setReportPrefix(data); return this.runGlobalHook('beforeEach'); }); } /** * Runs the test suite, including all hooks */ runTestSuite() { if (this.argv.preview) { return this.createSession() .then(_ => { const runnable = new Runnable('preview', _ => { const url = isString(this.argv.preview) ? this.argv.preview : this.api.launchUrl; this.api.url(url).pause(); }); return runnable.run(this.commandQueue); }) .then(_ => this.stopSession()); } return this.startTestSuite() .then(() => this.runHook('before')) .then(result => { if (result instanceof Error) { Logger.error(result); } return this.runNextTestCase(); }) .catch(err => { if (err.sessionCreate) { throw err; } if (!this.isAssertionError(err) && !this.context.unitTestingMode && !this.failFastMode) { Logger.error(err); err.displayed = true; } // testcase failed - this catch ensures that the after hook is being called return err; }) .then(possibleError => { this.reporter.resetCurrentTestName(); return this.runHook('after') .catch(err => { // exceptions from after hook if (!possibleError) { possibleError = err; } return err; }) .then(result => { if ((possibleError instanceof Error) && this.failFastMode) { throw possibleError; } return result; }); }) .catch(err => { // testsuite failed - this catch ensures that the global afterEach will always run return this.terminate('FAILED', err); }) .then((errorOrFailures) => this.onTestSuiteFinished(errorOrFailures)); } onTestSuiteFinished(errorOrFailures = false) { return this.runGlobalHook('afterEach') .then(result => { if (!(errorOrFailures instanceof Error)) { return result; } if ((errorOrFailures.sessionCreate && this.failFastMode)) { //throw errorOrFailures; } if (this.failFastMode) { throw errorOrFailures; } }) .catch(err => { if (err.sessionCreate || this.failFastMode) { throw err; } if (!err.displayed) { Logger.error(err); } // catching errors thrown inside the global afterEach return err; }) .then(failedResult => { if (this.shouldRetrySuite(errorOrFailures)) { return this.retrySuite(); } let failures = errorOrFailures || failedResult || !this.reporter.allTestsPassed; return this.stopSession(failures); }); } async stopSession(failures) { try { await this.terminate(failures ? 'FAILED' : ''); } catch (err) { Logger.error(`Could not stop session in ${this.suiteName}:`); Logger.error(err); } return this.testSuiteFinished(failures); } async testSuiteFinished(failures) { this.reporter.testSuiteFinished(); this.currentRunnable = null; if (Concurrency.isChildProcess() && typeof process.send == 'function') { process.send(JSON.stringify({ type: 'testsuite_finished', itemKey: process.env.__NIGHTWATCH_ENV_LABEL, results: this.reporter.exportResults() })); } try { let lastError = failures; if (lastError === true) { lastError = this.reporter.testResults.lastError; } await this.transport.testSuiteFinished(lastError); } catch (err) { Logger.error(`Unable to stop the test suite gracefully because of: [${err.name}]: ${err.message}`); } return failures; } async terminate(reason = 'SIGINT', potentialError = null) { this.resetQueue(); if (!this.client.sessionId || this.context.unitTestingMode) { try { await this.transport.sessionFinished(reason); } catch (err) { return err; } return potentialError; } if (!this.endSessionOnFail && reason === 'FAILED') { return potentialError; } const runnable = new Runnable('terminate', _ => { if (this.api && isFunction(this.api.end)) { this.api.end(); } }, { isES6Async: this.isES6Async }); return runnable .run(this.commandQueue) .then(async result => { try { await this.transport.sessionFinished(reason); } catch (err) { return err; } return result; }) .then(result => { if ((potentialError instanceof Error) && (potentialError.sessionCreate || this.failFastMode)) { return potentialError; } return result; }); } setReporterCurrentTest() { this.reporter.setCurrentTest(this.testcase, this.context); this.client.setCurrentTest(); return this; } /** * Sets the next testcase and starts running it, if there is one * * @return {Promise} */ runNextTestCase() { const nextTestCase = this.context.getNextKey(); if (nextTestCase) { return this.runCurrentTest(nextTestCase); } return Promise.resolve(); } /** * Runs the current testcase, including retries * * @param testName * @return {Promise} */ runCurrentTest(testName) { const {reporter, context, settings} = this; this.testcase = new TestCase(testName, { context, settings, reporter, addtOpts: { retriesCount: this.suiteRetries.testRetriesCount[testName], maxRetries: this.suiteRetries.testMaxRetries } }); this.setReporterCurrentTest().emptyQueue(); return this.createSession() .then(() => this.runHook('beforeEach')) .then(_ => { return this.handleRunnable(this.testcase.testName, () => this.testcase.run(this.client)); }) .catch(err => { return err; }) .then(possibleError => { // if there was an error in the testcase and skip_testcases_on_fail, we must send it forward, but after we run afterEach and after hooks return this.runHook('afterEach') .then(() => this.testCaseFinished()) .then(() => possibleError); }) .then(possibleError => { if (this.shouldRetryTestCase()) { return this.retryCurrentTestCase(); } if ((possibleError instanceof Error) && this.shouldSkipTestsOnFail()) { throw possibleError; } return this.runNextTestCase(); }); } testCaseFinished() { this.reporter.setElapsedTime(); if (!this.testcase) { return Promise.resolve(); } return this.reporter.printTestResult(); } shouldRetryTestCase() { return !this.reporter.currentTestCasePassed && this.suiteRetries.shouldRetryTest(this.testcase.testName); } retryCurrentTestCase() { let currentTestName = this.testcase.testName; this.suiteRetries.incrementTestRetriesCount(currentTestName); this.reporter.resetCurrentTestPassedCount(); this.commandQueue.clearScheduled(); return this.runCurrentTest(currentTestName); } isScreenshotEnabled() { return this.settings.screenshots.enabled; } shouldTakeScreenshotOnError() { return this.isScreenshotEnabled() && this.settings.screenshots.on_error; } shouldTakeScreenshotOnFailure() { return this.isScreenshotEnabled() && this.settings.screenshots.on_failure; } getScreenshotFilenamePath() { return Screenshots.getFileName({ testSuite: this.api.currentTest.module, testCase: this.api.currentTest.name }, this.settings.screenshots); } takeScreenshot() { const fileNamePath = this.getScreenshotFilenamePath(); const runnable = new Runnable('screenshot', _ => { return new Promise((resolve) => { this.api.saveScreenshot(fileNamePath, (result, err) => { if (!err && this.transport.isResultSuccess(result)) { const assertions = this.api.currentTest.results.assertions || []; if (assertions.length > 0) { const currentAssertion = assertions[assertions.length-1]; if (currentAssertion) { currentAssertion.screenshots = currentAssertion.screenshots || []; currentAssertion.screenshots.push(fileNamePath); } } } else { Logger.warn('Error saving screenshot...', err || result); } resolve(); }); }); }); return runnable.run(this.commandQueue); } shouldRetrySuite(failures = false) { if ((failures instanceof Error) && alwaysDisplayError(failures)) { return false; } return (failures || !this.reporter.allTestsPassed) && this.suiteRetries.shouldRetrySuite(); } createRunnable(name, fn) { this.currentRunnable = new Runnable(name, fn, { isES6Async: this.isES6Async }); this.context.setCurrentRunnable(this.currentRunnable); return this.currentRunnable.run(this.commandQueue); } async handleRunnable(name, fn) { try { const result = await this.createRunnable(name, fn); return result; } catch (err) { // if some other error was thrown, jump to the next catch err.name = err.name || ''; if (!this.isAssertionError(err) && err.name !== 'TypeError') { // registering non-assert errors this.reporter.registerTestError(err); if (this.shouldTakeScreenshotOnError()) { await this.takeScreenshot(); } throw err; } // if the assertion error was thrown by another assertion library if (!(err instanceof NightwatchAssertError)) { const failureMessage = `expected "${err.expected}" but got: "${err.actual}"`; if (err.actual !== undefined && err.expected !== undefined) { err.message += ` - ${failureMessage}`; } this.reporter.logFailedAssertion(err); this.reporter.registerFailed(err); this.reporter.logAssertResult({ message: err.message, stackTrace: err.stack, fullMsg: err.message, failure: failureMessage }); } if (this.shouldTakeScreenshotOnFailure()) { await this.takeScreenshot(); } // clearing the queue here to avoid continuing with the rest of the testcase, // unless abortOnFailure is set to false if (!this.isAssertionError(err) || err.abortOnFailure) { this.emptyQueue(); } // set to true inside before/beforeEach hooks if (err.skipTestCases) { throw err; } return err; } } print() { if (this.argv.preview) { Logger.info('Previewing...'); return this; } if (this.settings.output) { let testSuiteDisplay; let retriesCount = this.suiteRetries.suiteRetriesCount; if (this.context.unitTestingMode) { testSuiteDisplay = this.context.moduleName || this.context.moduleKey; } else { testSuiteDisplay = `[${this.suiteName}] Test Suite`; } if (this.settings.test_workers && !this.settings.live_output || this.context.unitTestingMode) { // eslint-disable-next-line no-console console.log(''); } if (retriesCount > 0) { // eslint-disable-next-line no-console console.log('\nRetrying: ', Logger.colors.red(testSuiteDisplay), `(${retriesCount}/${this.suiteRetries.suiteMaxRetries}): `); } else if (this.context.unitTestingMode) { // eslint-disable-next-line no-console (this.context.isDisabled() ? Logger.info : console.log)(Logger.colors.cyan('[' + this.context.moduleKey + ']')); } else { Logger[this.context.isDisabled() ? 'info': 'logDetailedMessage'](`\n${Logger.colors.cyan(testSuiteDisplay)}`); } if (!this.context.unitTestingMode) { Logger[this.context.isDisabled() ? 'info': 'logDetailedMessage'](Logger.colors.purple(new Array(Math.min(testSuiteDisplay.length*2 + 1, 80)).join('─'))); } } return this; } resetQueue() { if (!this.commandQueue) { return this; } this.commandQueue.reset().removeAllListeners(); return this; } emptyQueue() { this.resetQueue(); if (this.commandQueue) { this.commandQueue.empty(); } return this; } /** * * @return {*} */ run() { this.print(); if (this.context.isDisabled()) { // eslint-disable-next-line no-console console.log(Logger.colors.green(`Testsuite "${this.context.moduleName}" is disabled, skipping...`)); return Promise.resolve(); } return this.runTestSuite(); } isAssertionError(err) { return (err instanceof AssertionError) || err.name.startsWith('AssertionError'); } } module.exports = TestSuite; module.exports.Context = Context;
import React from 'react'; import { StyleSheet, Text, View } from 'react-native'; import MainNav from './Navigation/Navigation' import {Provider} from 'react-redux' import { NavigationContainer } from '@react-navigation/native'; import Store from './Store/configureStore' export default function App() { return ( <Provider store={Store}> <NavigationContainer> <MainNav /> </NavigationContainer> </Provider> ); }
import Icon from 'vue-awesome/components/Icon' Icon.register({ restaurant_menu: { paths: [ { d: 'M8.1 13.34l2.83-2.83L3.91 3.5a4.008 4.008 0 000 5.66l4.19 4.18zm6.78-1.81c1.53.71 3.68.21 5.27-1.38 1.91-1.91 2.28-4.65.81-6.12-1.46-1.46-4.2-1.1-6.12.81-1.59 1.59-2.09 3.74-1.38 5.27L3.7 19.87l1.41 1.41L12 14.41l6.88 6.88 1.41-1.41L13.41 13l1.47-1.47z' } ], width: '24', height: '24' } })
import clr clr.AddReference('RevitAPI') from Autodesk.Revit.DB import * clr.AddReference("RevitNodes") import Revit clr.ImportExtensions(Revit.Elements) clr.AddReference("RevitServices") import RevitServices from RevitServices.Persistence import DocumentManager doc = DocumentManager.Instance.CurrentDBDocument faminsts = UnwrapElement(IN[0]) elementlist = list() for item in faminsts: try: elementlist.append(doc.GetElement(item.LevelId).ToDSType(True)) except: try: elementlist.append(item.Level.ToDSType(True)) except: try: elementlist.append(item.GenLevel.ToDSType(True)) except: elementlist.append(list()) OUT = elementlist
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.parse = exports.stringify = exports.isJSON = exports.reviver = exports.replacer = void 0; var _isRegex = _interopRequireDefault(require("is-regex")); var _isFunction = _interopRequireDefault(require("is-function")); var _isSymbol = _interopRequireDefault(require("is-symbol")); var _isobject = _interopRequireDefault(require("isobject")); var _get = _interopRequireDefault(require("lodash/get")); var _memoizerific = _interopRequireDefault(require("memoizerific")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); } function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } function _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) { return; } var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } var isObject = _isobject["default"]; var removeCodeComments = function removeCodeComments(code) { var inQuoteChar = null; var inBlockComment = false; var inLineComment = false; var inRegexLiteral = false; var newCode = ''; if (code.indexOf('//') >= 0 || code.indexOf('/*') >= 0) { for (var i = 0; i < code.length; i += 1) { if (!inQuoteChar && !inBlockComment && !inLineComment && !inRegexLiteral) { if (code[i] === '"' || code[i] === "'" || code[i] === '`') { inQuoteChar = code[i]; } else if (code[i] === '/' && code[i + 1] === '*') { inBlockComment = true; } else if (code[i] === '/' && code[i + 1] === '/') { inLineComment = true; } else if (code[i] === '/' && code[i + 1] !== '/') { inRegexLiteral = true; } } else { if (inQuoteChar && (code[i] === inQuoteChar && code[i - 1] !== '\\' || code[i] === '\n' && inQuoteChar !== '`')) { inQuoteChar = null; } if (inRegexLiteral && (code[i] === '/' && code[i - 1] !== '\\' || code[i] === '\n')) { inRegexLiteral = false; } if (inBlockComment && code[i - 1] === '/' && code[i - 2] === '*') { inBlockComment = false; } if (inLineComment && code[i] === '\n') { inLineComment = false; } } if (!inBlockComment && !inLineComment) { newCode += code[i]; } } } else { newCode = code; } return newCode; }; var cleanCode = (0, _memoizerific["default"])(10000)(function (code) { return removeCodeComments(code).replace(/\n\s*/g, '') // remove indents & newlines .trim(); }); var convertShorthandMethods = function convertShorthandMethods(key, stringified) { var fnHead = stringified.slice(0, stringified.indexOf('{')); var fnBody = stringified.slice(stringified.indexOf('{')); if (fnHead.includes('=>')) { // This is an arrow function return stringified; } if (fnHead.includes('function')) { // This is an anonymous function return stringified; } var modifiedHead = fnHead; modifiedHead = modifiedHead.replace(key, 'function'); return modifiedHead + fnBody; }; var dateFormat = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{3})?Z$/; var replacer = function replacer(options) { var objects; var stack; var keys; return function replace(key, value) { try { // very first iteration if (key === '') { keys = ['root']; objects = [{ keys: 'root', value: value }]; stack = []; return value; } // From the JSON.stringify's doc: // "The object in which the key was found is provided as the replacer's this parameter." thus one can control the depth while (stack.length && this !== stack[0]) { stack.shift(); keys.pop(); } if ((0, _isRegex["default"])(value)) { if (!options.allowRegExp) { return undefined; } return "_regexp_".concat(value.flags, "|").concat(value.source); } if ((0, _isFunction["default"])(value)) { if (!options.allowFunction) { return undefined; } var name = value.name; var stringified = value.toString(); if (!stringified.match(/(\[native code\]|WEBPACK_IMPORTED_MODULE|__webpack_exports__|__webpack_require__)/)) { return "_function_".concat(name, "|").concat(cleanCode(convertShorthandMethods(key, stringified))); } return "_function_".concat(name, "|").concat(function () {}.toString()); } if ((0, _isSymbol["default"])(value)) { if (!options.allowSymbol) { return undefined; } return "_symbol_".concat(value.toString().slice(7, -1)); } if (typeof value === 'string' && dateFormat.test(value)) { if (!options.allowDate) { return undefined; } return "_date_".concat(value); } if (value === undefined) { if (!options.allowUndefined) { return undefined; } return '_undefined_'; } if (typeof value === 'number') { if (value === -Infinity) { return '_-Infinity_'; } if (value === Infinity) { return '_Infinity_'; } if (Number.isNaN(value)) { return '_NaN_'; } return value; } if (typeof value === 'string') { return value; } if (typeof value === 'boolean') { return value; } if (stack.length >= options.maxDepth) { if (Array.isArray(value)) { return "[Array(".concat(value.length, ")]"); } return '[Object]'; } var found = objects.find(function (o) { return o.value === value; }); if (!found) { if (value && isObject(value) && value.constructor && value.constructor.name && value.constructor.name !== 'Object') { if (!options.allowClass) { return undefined; } try { Object.assign(value, { '_constructor-name_': value.constructor.name }); } catch (e) {// immutable objects can't be written to and throw // we could make a deep copy but if the user values the correct instance name, // the user should make the deep copy themselves. } } keys.push(key); stack.unshift(value); objects.push({ keys: keys.join('.'), value: value }); return value; } // actually, here's the only place where the keys keeping is useful return "_duplicate_".concat(found.keys); } catch (e) { return undefined; } }; }; exports.replacer = replacer; var reviver = function reviver(options) { var refs = []; var root; return function revive(key, value) { // last iteration = root if (key === '') { root = value; // restore cyclic refs refs.forEach(function (_ref) { var target = _ref.target, container = _ref.container, replacement = _ref.replacement; if (replacement === 'root') { // eslint-disable-next-line no-param-reassign container[target] = root; } else { // eslint-disable-next-line no-param-reassign container[target] = (0, _get["default"])(root, replacement.replace('root.', '')); } }); } if (key === '_constructor-name_') { return value; } // deal with instance names if (isObject(value) && value['_constructor-name_']) { var name = value['_constructor-name_']; if (name !== 'Object') { // eslint-disable-next-line no-new-func var Fn = new Function("return function ".concat(name, "(){}"))(); Object.setPrototypeOf(value, new Fn()); } // eslint-disable-next-line no-param-reassign delete value['_constructor-name_']; return value; } if (typeof value === 'string' && value.startsWith('_function_')) { var _ref2 = value.match(/_function_([^|]*)\|(.*)/) || [], _ref3 = _slicedToArray(_ref2, 3), _name = _ref3[1], source = _ref3[2]; if (!options.lazyEval) { // eslint-disable-next-line no-eval return eval("(".concat(source, ")")); } // lazy eval of the function var result = function result() { // eslint-disable-next-line no-eval var f = eval("(".concat(source, ")")); return f.apply(void 0, arguments); }; Object.defineProperty(result, 'toString', { value: function value() { return source; } }); Object.defineProperty(result, 'name', { value: _name }); return result; } if (typeof value === 'string' && value.startsWith('_regexp_')) { // this split isn't working correctly var _ref4 = value.match(/_regexp_([^|]*)\|(.*)/) || [], _ref5 = _slicedToArray(_ref4, 3), flags = _ref5[1], _source = _ref5[2]; return new RegExp(_source, flags); } if (typeof value === 'string' && value.startsWith('_date_')) { return new Date(value.replace('_date_', '')); } if (typeof value === 'string' && value.startsWith('_duplicate_')) { refs.push({ target: key, container: this, replacement: value.replace('_duplicate_', '') }); return null; } if (typeof value === 'string' && value.startsWith('_symbol_')) { return Symbol(value.replace('_symbol_', '')); } if (typeof value === 'string' && value === '_-Infinity_') { return -Infinity; } if (typeof value === 'string' && value === '_Infinity_') { return Infinity; } if (typeof value === 'string' && value === '_NaN_') { return NaN; } return value; }; }; // eslint-disable-next-line no-useless-escape exports.reviver = reviver; var isJSON = function isJSON(input) { return input.match(/^[\[\{\"\}].*[\]\}\"]$/); }; exports.isJSON = isJSON; var defaultOptions = { maxDepth: 10, space: undefined, allowFunction: true, allowRegExp: true, allowDate: true, allowClass: true, allowUndefined: true, allowSymbol: true, lazyEval: true }; var stringify = function stringify(data) { var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; var mergedOptions = _objectSpread({}, defaultOptions, {}, options); return JSON.stringify(data, replacer(mergedOptions), options.space); }; exports.stringify = stringify; var mutator = function mutator() { var mutated = []; return function mutateUndefined(value) { // JSON.parse will not output keys with value of undefined // we map over a deeply nester object, if we find any value with `_undefined_`, we mutate it to be undefined if (isObject(value)) { Object.entries(value).forEach(function (_ref6) { var _ref7 = _slicedToArray(_ref6, 2), k = _ref7[0], v = _ref7[1]; if (v === '_undefined_') { // eslint-disable-next-line no-param-reassign value[k] = undefined; } else if (!mutated.includes(v)) { mutated.push(v); mutateUndefined(v); } }); } if (Array.isArray(value)) { value.forEach(function (v) { mutated.push(v); mutateUndefined(v); }); } }; }; var parse = function parse(data) { var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; var mergedOptions = _objectSpread({}, defaultOptions, {}, options); var result = JSON.parse(data, reviver(mergedOptions)); mutator()(result); return result; }; exports.parse = parse;
'use strict'; if (process.env.ADAPTER === 'websql') { describe('test.node-websql.js', function () { it('should run websql when we are actually testing websql', function () { var db = new PouchDB('testdb'); db.adapter.should.equal('websql'); return db.destroy(); }); }); }
import React from 'react'; import PropTypes from 'prop-types'; import fetchPonyfill from 'fetch-ponyfill'; import debounce from 'lodash.debounce'; import { Badge } from './badge-examples'; import resolveUrl from '../lib/resolve-url'; export default class SuggestionAndSearch extends React.Component { static propTypes = { queryChanged: PropTypes.func.isRequired, onBadgeClick: PropTypes.func.isRequired, baseUri: PropTypes.string.isRequired, longCache: PropTypes.bool.isRequired, }; constructor(props) { super(props); this.queryChangedDebounced = debounce(props.queryChanged, 50, { leading: true }); } state = { isUrl: false, inProgress: false, projectUrl: null, suggestions: [], }; queryChanged(query) { const isUri = query.startsWith('https://') || query.startsWith('http://'); this.setState({ isUri, projectUri: isUri ? query : null, }); this.queryChangedDebounced(query); } getSuggestions() { this.setState({ inProgress: true }, () => { const { baseUri } = this.props; const { projectUri } = this.state; const url = resolveUrl('/$suggest/v1', baseUri, { url: projectUri }); const fetch = window.fetch || fetchPonyfill; fetch(url) .then(res => res.json()) .then(json => { this.setState({ inProgress: false, suggestions: json.badges }); }) .catch(() => { this.setState({ inProgress: false, suggestions: [] }); }); }); } renderSuggestions() { const { baseUri, longCache } = this.props; const { suggestions } = this.state; if (suggestions.length === 0) { return null; } return ( <table className="badge"><tbody> { suggestions.map(({ name, link, badge }, i) => ( // TODO We need to deal with `link`. <Badge key={i} title={name} previewUri={badge} onClick={() => this.props.onBadgeClick({ title: name, previewUri: badge, link, })} baseUri={baseUri} longCache={longCache} /> ))} </tbody></table> ); } render() { return ( <section> <form action="javascript:void 0" autoComplete="off"> <input onChange={event => this.queryChanged(event.target.value)} autofill="off" autoFocus placeholder="search / project URL" /> <br /> <button onClick={event => this.getSuggestions(event.target.value)} disabled={this.state.inProgress} hidden={! this.state.isUri}> Suggest badges </button> </form> { this.renderSuggestions() } </section> ); } }
const cols = { xs: 24, s: 24, m: 24, l: 24, xl: 12, xxl: 8, }; export default cols;
import React from "react"; import { Container, Top, BottomContent, BottomHeader, Bottom, Title, Text, Anchor, AnchorDiv, Icon, } from "./styles/summary"; const Summary = ({ children, ...restProps }) => { return <Container {...restProps}>{children}</Container>; }; Summary.Top = ({ children, ...restProps }) => { return <Top {...restProps}>{children}</Top>; }; Summary.BottomContent = ({ children, ...restProps }) => { return <BottomContent {...restProps}>{children}</BottomContent>; }; Summary.BottomHeader = ({ children, ...restProps }) => { return <BottomHeader {...restProps}>{children}</BottomHeader>; }; Summary.Bottom = ({ children, ...restProps }) => { return <Bottom {...restProps}>{children}</Bottom>; }; Summary.Title = ({ children, ...restProps }) => { return <Title {...restProps}>{children}</Title>; }; Summary.Text = ({ children, ...restProps }) => { return <Text {...restProps}>{children}</Text>; }; Summary.Anchor = ({ children, to, bg, ...restProps }) => { return ( <Anchor to={to} bg={bg} {...restProps}> {children} </Anchor> ); }; Summary.AnchorDiv = ({ children, ...restProps }) => { return <AnchorDiv {...restProps}>{children}</AnchorDiv>; }; Summary.Icon = ({ name, ...restProps }) => { return <Icon className={name} {...restProps} />; }; export default Summary;
import React, { Component } from "react"; import { Link } from "react-router-dom"; import { Container, Row, Col } from "reactstrap"; //Import Icons import FeatherIcon from "feather-icons-react"; // import images import services from "../../assets/images/illustrator/services.svg"; // Modal Video import ModalVideo from "react-modal-video"; import "../../../node_modules/react-modal-video/scss/modal-video.scss"; class Section extends Component { constructor(props) { super(props); this.state = { isOpen: false, }; this.openModal = this.openModal.bind(this); } openModal() { this.setState({ isOpen: true }); } render() { return ( <React.Fragment> <section className="bg-half-170 d-table w-100" id="home"> <Container> <Row className="align-items-center"> <Col lg={7} md={7}> <div className="title-heading mt-4"> <h1 className="heading mb-3"> Build Anything <br /> For Your Project </h1> <p className="para-desc text-muted"> Launch your campaign and benefit from our expertise on designing and managing conversion centered bootstrap v5 html page. </p> <div className="mt-4 pt-2"> <Link to="page-services" className="btn btn-primary m-1" > Our Services </Link> <Link onClick={this.openModal} to="#" className="btn btn-icon btn-pills btn-primary m-1 lightbox" > <FeatherIcon icon="video" className="icons" /> </Link> <span className="fw-bold text-uppercase small align-middle ms-2">Watch Now</span> <ModalVideo channel="vimeo" isOpen={this.state.isOpen} videoId="99025203" onClose={() => this.setState({ isOpen: false })} /> </div> </div> </Col> <Col lg={5} md={5} className="mt-4 pt-2 mt-sm-0 pt-sm-0"> <img src={services} alt="" /> </Col> </Row> </Container> </section> </React.Fragment> ); } } export default Section;
""" WSGI config for forever project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.7/howto/deployment/wsgi/ """ import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "forever.settings") from django.core.wsgi import get_wsgi_application application = get_wsgi_application()
import time from sklearn.datasets import make_classification from sklearn.decomposition import PCA from sklearn.grid_search import GridSearchCV from sklearn.pipeline import Pipeline from sklearn.svm import SVC from pipeline_grid_search import PipelineGridSearchCV pipe = Pipeline([ ("pca", PCA()), ("svm", SVC()), ]) cv_params = dict([ ('pca__n_components', [100,200,300]), ('svm__C', [1,10,100,1000]), ]) X, y = make_classification(n_samples=1000, n_features=1000) n_folds = 5 n_jobs = 4 verbose = 1 start = time.time() model = PipelineGridSearchCV(pipe, cv_params, cv=n_folds, verbose=verbose, n_jobs=n_jobs) model.fit(X,y) # This will run much faster than ordinary GridSearchCV elapsed_pipeline_grid_search = time.time() - start start = time.time() model = GridSearchCV(pipe, cv_params, cv=n_folds, verbose=verbose, n_jobs=n_jobs) model.fit(X,y) elapsed_grid_search = time.time() - start print("-----------------------------------") print("Elapsed time for doing grid search:") print("PipelineGridSearchCV: {} secs".format(elapsed_pipeline_grid_search)) print("GridSearchCV: {} secs".format(elapsed_grid_search))
// CLASS AsyncQueue // Classes.AsyncQueue = Classes.Base.subclass({ __idPrefix: "AsyncQueue", _eventManager: null, _queues: null, // This class batches the processing based on entries count, not based on elapsed // time. Using elapsed time would give us a more accurate balancing of the processing // time regardless of the cost of processing each entry. We might decide to switch // to that later, but for now we're using this only for tiles rendering, and that // cost is kind of well known, and not an issue. _batchSize: 50, // The _runQueue() can release control to other code before resuming processing // other entries in the queue, so we need an explicit flag tracking whether or // not it's active _running: null, _discarded: null, _init: function() { const logHead = "AsyncQueue::_init(): "; // Overriding the parent class' _init(), but calling that original function first Classes.Base._init.call(this); this.debug(); //this._log.trace(logHead + stackTrace()); // Do we need this? this._eventManager = Classes.EventManager.create(); this._eventManager.attachRegistrationFunctions(this); this._initQueues(); this._running = false; this._discarded = false; }, _isRunning: function() { return this._running; }, _isDiscarded: function() { return this._discarded; }, _initQueues: function() { this._queues = {} this._queues[Classes.AsyncQueue.priority.HIGH] = { name: Classes.AsyncQueue.priority.HIGH, delay: 0, // in ms queue: [], }; this._queues[Classes.AsyncQueue.priority.NORMAL] = { name: Classes.AsyncQueue.priority.NORMAL, delay: 0, // in ms queue: [], }; this._queues[Classes.AsyncQueue.priority.LOW] = { name: Classes.AsyncQueue.priority.LOW, delay: 200, // in ms queue: [], }; }, _getQueue: function(priority) { return this._queues[priority]; }, _getQueueToProcess: function() { const logHead = "AsyncQueue::_getQueueToProcess(): "; let priorities = [ Classes.AsyncQueue.priority.HIGH, Classes.AsyncQueue.priority.NORMAL, Classes.AsyncQueue.priority.LOW ]; // We're using a strict prority strategy, nothing gets served from the lower priority // queue if the higher priority queue has work pending. for(priority of priorities) { if(this._queues[priority].queue.length != 0) { this._log(logHead + "queue of priority \"" + priority + "\" has pending work: " + this._queues[priority].queue.length); return this._queues[priority]; } } this._log(logHead + "all queues are empty"); return null; }, _getAllQueueLengths: function() { let retVal = []; for(const [ priority, queue ] of Object.entries(this._queues)) { retVal.push(priority + ": " + queue.queue.length); } return retVal; }, // "processFn" cannot be async, and it's mandatory. // "resumeFn" cannot be async, and it's optional. It's expected to return "true" if we // can continue processing, or "false" if there's a need to interrupt processing and exit. // "cleanupFn" must be async, and it's optional. // // This function returns "true" if we're in an active state, and "false" if the AsyncQueue // was discarded while we were waiting for the next event cycle during our processing. _processQueue: async function(perfLabel, processFn, resumeFn, cleanupFn) { const logHead = "AsyncQueue::_processQueue(): "; // We want to immediately check if we can't resume (that is, this AsyncQueue // has been discarded). The reason is that _processQueue() is called in a // while() loop, and the caller gets interrupted between each iteration // (due to the "await" in the caller), so anything can happen during that // interruption, where "anything" is: // 1. More stuff has been enqueued (that's covered by the loop outside _processQueue() // 2. This AsyncQueue has been discarded (covered here by checking immediately // for that specific condition. // As a side effect of this sequence of "starting as if a batch had just ended", // we'll also call "delay(0)" immediately, and that will slow down the starting // of the processing by one full event cycle. Good or bad? If bad, we can always // use the same "firstRound" correction (see below) to capture "no delay(0) in // the first round" too. let processedCnt = this._batchSize; // In order for the perfProf data to be accurate, we want to enter the loop // with a "BatchStart" mark, not with a "BatchEnd" mark. Given the explanation // above, we're starting as if we were ending an iteration, but we want to // correct that for the purposes of perfProf. let firstRound = true; let queue = null; // To avoid completely starving the lower priority queues, we try to fill a full // _batchSize cycle with queue entries from lower priority queues if the higher // priority queue empties (before we go to the next event cycle, and maybe in // the meantime more high priority items are added) while((queue = this._getQueueToProcess()) != null) { while(queue.queue.length > 0) { if(processedCnt >= this._batchSize) { if(!firstRound) { perfProf.mark(perfLabel + "AsyncQueueBatchEnd" + this._id); // By putting the "delay(0)" here, we avoid it getting called // during the first iteration of _processQueue(), making it // a bit more responsive... except that this way it won't have // had time to get much enqueued, and it will do very little // the first time. await delay(queue.delay); } else { firstRound = false; } // this._log(logHead + "pausing, queue length = " + queue.queue.length); // Wait for the next event cycle to resume processing //await delay(queue.delay); // this._log(logHead + "resuming, queue length = " + queue.queue.length); processedCnt = 0; // Since we waited for the next event cycle, anything might have happened // while we were waiting, did this AsyncQueue get discarded? if(resumeFn != null && !resumeFn()) { // We got discarded, so we've decided we need to stop iterating if(cleanupFn != null) { await cleanupFn(); } // Signal the caller that we don't want to be called back again from // the outer loop (in case cleanupFn() did not empty the queue...) return false; } perfProf.mark(perfLabel + "AsyncQueueBatchStart" + this._id); } let entry = queue.queue.shift(); // We assume the function being called doesn't need to be synchronized // (it's either synchronous, or, if async, can complete later). We don't // want to add an "await" here, because returning from "await" needs to // wait for the next event cycle, and that would make this processing // extremely slow. processFn(entry); processedCnt++; } } perfProf.mark(perfLabel + "AsyncQueueBatchEnd" + this._id); return true; }, _discardProcessFn: function(entry) { if(entry.discardFn != null) { entry.discardFn(); // Note that the entry.resolveFn/rejectFn won't be called when we're discarding entries } }, _runResumeFn: function() { return !this._isDiscarded(); }, _runProcessFn: function(entry) { let retVal = entry.fn(); entry.resolveFn(retVal); }, _runCleanupFn: async function() { const logHead = "AsyncQueue::_runCleanupFn(): "; this._log(logHead + "entering, queue lengths = ", this._getAllQueueLengths()); await this._processQueue("discard", this._discardProcessFn.bind(this)); }, _runQueue: async function() { const logHead = "AsyncQueue::_runQueue(): "; if(this._isRunning()) { // If there's already an active _runQueue(), nothing to do return; } this._log(logHead + "entering"); this._running = true; perfProf.mark("runAsyncQueueStart" + this._id); let normalState = true; // Try at all costs to avoid this outer _runQueue() from leaving // without resetting _running back to "false"... if it goes out of // sync, it will remain "true" forever, and no more processing will // be done (it will be "stuck"). try { // See the comment inside _processQueue() for the reasons for this // while loop. _processQueue() can decide that there's nothing left // to do and return, but the "await" here will cause this function // to get back control only one event cycle later, not immediately. // During that event cycle, anything can happen, so we can't rely on // the decision of _processQueue() to come back in "normalState", we // must revalidate if the queue is empty or not. // _processQueue() at least once more while(this._getQueueToProcess() != null && normalState) { normalState = await this._processQueue("run", this._runProcessFn.bind(this), this._runResumeFn.bind(this), this._runCleanupFn.bind(this)); } } catch(e) { this._err(logHead, e); } perfProf.mark("runAsyncQueueEnd" + this._id); // No more work, make sure to unset the _running flag this._running = false; }, _enqueueInner: function(queueEntry, priority) { this._getQueue(priority).queue.push(queueEntry); this._runQueue(); }, // "fnSignature" is for debugging enqueue: function(fn, fnSignature, priority) { // const logHead = "AsyncQueue::enqueue(" + fnSignature + "): "; priority = optionalWithDefault(priority, Classes.AsyncQueue.priority.NORMAL); return new Promise( function(resolveFn, rejectFn) { // this._log(logHead + "enqueueing"); let queueEntry = { // For now we assume "fn" is not async (Promise-based) on its own. If it's async, // we need to take some other actions that are not currently captured in the code // (mostly, call it with "await"). fn: safeFnWrapper(fn, fnSignature, rejectFn), resolveFn: resolveFn, rejectFn: rejectFn, // When discard() is called on this class, discardFn() is called on all the entries // of the queue (if they have one). discardFn: null, }; this._enqueueInner(queueEntry, priority); }.bind(this) ); }, // Discard anything that might still be in the queue. "discard()" moves the AsyncQueue to an // unusable terminal state. discard: async function() { const logHead = "AsyncQueue::discard(): "; //this._log.trace(logHead + stackTrace()); this._discarded = true; gcChecker.add(this); if(!this._isRunning()) { // Unlikely there's anything to cleanup if it's not running... this._assert(this._getQueueToProcess() == null); // But anyway, just in case, perform the cleanup if(this._getQueueToProcess() != null) { await this._runCleanupFn(); } } } }); // Classes.AsyncQueue Classes.Base.roDef(Classes.AsyncQueue, "priority", {} ); Classes.Base.roDef(Classes.AsyncQueue.priority, "HIGH", "high" ); Classes.Base.roDef(Classes.AsyncQueue.priority, "NORMAL", "normal" ); Classes.Base.roDef(Classes.AsyncQueue.priority, "LOW", "low" );
let defaultState = false; let removingPolygonPointsState = false; let addingPolygonPointsState = false; let movableObjectsState = true; let continuousDrawingState = true; let lastDrawingModeState = null; let readyToDrawShapeState = false; let hasDrawnShapeState = false; let cancelledReadyToDrawState = null; let removingPointsAfterCancelDrawState = null; let labelsVisibilityState = true; let editingLabelId = null; let lastPolygonActionWasMoveState = false; let newShapeSelectedViaLabelListState = false; let currentZoomState = 1; let doubleScrollCanvasState = false; let settingsPopupOpenState = false; let exportDatasetsPopupOpenState = false; let changingMLGeneratedLabelNamesState = false; let currentImageId = false; let labellerModalDisplayed = false; let uploadDatasetsModalDisplayedState = false; let machineLearningModalDisplayedState = false; let boundingBoxScalingState = false; let shapeMovingState = false; let polygonDrawingInProgressState = false; let boundingBoxDrawingInProgressState = false; let removeImageModalDisplayedState = false; let welcomeModalDisplayedState = false; function getDefaultState() { return defaultState; } function getAlteringPolygonPointsState() { return removingPolygonPointsState || addingPolygonPointsState; } function getRemovingPolygonPointsState() { return removingPolygonPointsState; } function getAddingPolygonPointsState() { return addingPolygonPointsState; } function getMovableObjectsState() { return movableObjectsState; } function getContinuousDrawingState() { return continuousDrawingState; } function getLastDrawingModeState() { return lastDrawingModeState; } function getReadyToDrawShapeState() { return readyToDrawShapeState; } function getHasDrawnShapeState() { return hasDrawnShapeState; } function getCancelledReadyToDrawState() { return cancelledReadyToDrawState; } function getRemovingPointsAfterCancelDrawState() { return removingPointsAfterCancelDrawState; } function getLabelsVisibilityState() { return labelsVisibilityState; } function getEditingLabelId() { return editingLabelId; } function getLastPolygonActionWasMoveState() { return lastPolygonActionWasMoveState; } function getNewShapeSelectedViaLabelListState() { return newShapeSelectedViaLabelListState; } function getCurrentZoomState() { return currentZoomState; } function getDoubleScrollCanvasState() { return doubleScrollCanvasState; } function getSettingsPopupOpenState() { return settingsPopupOpenState; } function getExportDatasetsPopupOpenState() { return exportDatasetsPopupOpenState; } function getCurrentImageId() { return currentImageId; } function getChangingMLGeneratedLabelNamesState() { return changingMLGeneratedLabelNamesState; } function getLabellerModalDisplayedState() { return labellerModalDisplayed; } function getBoundingBoxScalingState() { return boundingBoxScalingState; } function getShapeMovingState() { return shapeMovingState; } function getPolygonDrawingInProgressState() { return polygonDrawingInProgressState; } function getBoundingBoxDrawingInProgressState() { return boundingBoxDrawingInProgressState; } function getUploadDatasetsModalDisplayedState() { return uploadDatasetsModalDisplayedState; } function getMachineLearningModalDisplayedState() { return machineLearningModalDisplayedState; } function getRemoveImageModalDisplayedState() { return removeImageModalDisplayedState; } function getWelcomeModalDisplayedState() { return welcomeModalDisplayedState; } function setDefaultState(state) { defaultState = state; } function setAlteringPolygonPointsState(state) { removingPolygonPointsState = state; addingPolygonPointsState = state; } function setRemovingPolygonPointsState(state) { removingPolygonPointsState = state; } function setAddingPolygonPointsState(state) { addingPolygonPointsState = state; } function setMovableObjectsState(state) { movableObjectsState = state; } function setContinuousDrawingState(state) { continuousDrawingState = state; } function setLastDrawingModeState(state) { lastDrawingModeState = state; } function setReadyToDrawShapeState(state) { readyToDrawShapeState = state; } function setHasDrawnShapeState(state) { hasDrawnShapeState = state; } function setCancelledReadyToDrawState(state) { cancelledReadyToDrawState = state; } function setRemovingPointsAfterCancelDrawState(state) { removingPointsAfterCancelDrawState = state; } function setLabelsVisibilityState(state) { labelsVisibilityState = state; } function setEditingLabelId(state) { editingLabelId = state; } function setLastPolygonActionWasMoveState(state) { lastPolygonActionWasMoveState = state; } function setNewShapeSelectedViaLabelListState(state) { newShapeSelectedViaLabelListState = state; } function setCurrentZoomState(state) { currentZoomState = state; } function setDoubleScrollCanvasState(state) { doubleScrollCanvasState = state; } function setSettingsPopupOpenState(state) { settingsPopupOpenState = state; } function setExportDatasetsPopupOpenState(state) { exportDatasetsPopupOpenState = state; } function setCurrentImageId(id) { currentImageId = id; } function setChangingMLGeneratedLabelNamesState(state) { changingMLGeneratedLabelNamesState = state; } function setLabellerModalDisplayedState(state) { labellerModalDisplayed = state; } function setBoundingBoxScalingState(state) { boundingBoxScalingState = state; } function setShapeMovingState(state) { shapeMovingState = state; } function setPolygonDrawingInProgressState(state) { polygonDrawingInProgressState = state; } function setBoundingBoxDrawingInProgressState(state) { boundingBoxDrawingInProgressState = state; } function setUploadDatasetsModalDisplayedState(state) { uploadDatasetsModalDisplayedState = state; } function setMachineLearningModalDisplayedState(state) { machineLearningModalDisplayedState = state; } function setRemoveImageModalDisplayedState(state) { removeImageModalDisplayedState = state; } function setWelcomeModalDisplayedState(state) { welcomeModalDisplayedState = state; } export { getDefaultState, setDefaultState, getCurrentImageId, setCurrentImageId, getEditingLabelId, setEditingLabelId, getShapeMovingState, setShapeMovingState, getCurrentZoomState, setCurrentZoomState, getHasDrawnShapeState, setHasDrawnShapeState, getMovableObjectsState, setMovableObjectsState, getLastDrawingModeState, setLastDrawingModeState, getReadyToDrawShapeState, setReadyToDrawShapeState, getLabelsVisibilityState, setLabelsVisibilityState, getSettingsPopupOpenState, setSettingsPopupOpenState, getContinuousDrawingState, setContinuousDrawingState, getBoundingBoxScalingState, setBoundingBoxScalingState, getDoubleScrollCanvasState, setDoubleScrollCanvasState, getAddingPolygonPointsState, setAddingPolygonPointsState, getCancelledReadyToDrawState, setCancelledReadyToDrawState, getWelcomeModalDisplayedState, setWelcomeModalDisplayedState, getAlteringPolygonPointsState, setAlteringPolygonPointsState, getRemovingPolygonPointsState, setRemovingPolygonPointsState, getLabellerModalDisplayedState, setLabellerModalDisplayedState, getExportDatasetsPopupOpenState, setExportDatasetsPopupOpenState, getLastPolygonActionWasMoveState, setLastPolygonActionWasMoveState, getPolygonDrawingInProgressState, setPolygonDrawingInProgressState, getRemoveImageModalDisplayedState, setRemoveImageModalDisplayedState, getUploadDatasetsModalDisplayedState, setUploadDatasetsModalDisplayedState, getNewShapeSelectedViaLabelListState, setNewShapeSelectedViaLabelListState, getBoundingBoxDrawingInProgressState, setBoundingBoxDrawingInProgressState, getMachineLearningModalDisplayedState, setMachineLearningModalDisplayedState, getRemovingPointsAfterCancelDrawState, setRemovingPointsAfterCancelDrawState, getChangingMLGeneratedLabelNamesState, setChangingMLGeneratedLabelNamesState, };
//Codigo de lcuadrado console.group("Cuadrados"); // const ladoCuadrado = 5; // console.log("Los lados del cuadrado miden: " + ladoCuadrado + "cm"); function perimetroCuadrado (lado){ return lado * 4; } // console.log("El perimetro del cuadrado es : " + perimetroCuadrado + "cm"); function areacuadrado(lado){ return lado * lado; } // console.log("El area del cuadrado es : " + areaCuadrado + "cm^2"); // console.groupEnd(); //Codigo de triangulo // console.group("Triangulo"); // const ladoTriangulo1 = 6; // const ladoTriangulo2 = 6; // const baseTriangulo = 4; // console.log( // "Los lados del triangulo miden: " // + ladoTriangulo1 // + "cm " // + ladoTriangulo2 // + "cm " // + baseTriangulo // + "cm"); // const alturaTriangulo = 5.5; // console.log("la altura del triangulo mide: " + alturaTriangulo + "cm "); function perimetrotriangulo(lado1,lado2,base){ return (lado1+lado2+base); } // console.log ("El perimetro del triangulo es: " + perimetroTriangulo + "cm") // const areaTriangulo = (baseTriangulo * alturaTriangulo) / 2; function areaTriangulo(base,altura){ return (base * altura) / 2; } // console.log ("El area del triangulo es: " + areaTriangulo + "cm^2"); console.groupEnd(); //Codigo de circulo console.group("Circulo"); //Radio // const radioCirculo = 4; // console.log("El radio del circulo es: " + radioCirculo + "cm "); // //Diamtro // const diametroCirculo = radioCirculo * 2; // console.log("el diametro del circulo: " + diametroCirculo + "cm "); function diametroCirculo(radio){ return radio * 2; } //PI const PI = Math.PI; console.log("PI vale: " + PI) //Circunferencia // const perimetroCirculo = diametroCirculo * PI; // console.log("El perimetro del circulo es: " + perimetroCirculo + "cm") function perimetroCirculo(radio){ const diametro = diametroCirculo(radio);{ return diametro * PI; } } //Area // const areaCirculo = (radioCirculo * radioCirculo) * PI; // console.log("El area del circulo es: " + areaCirculo + "cm ") function areaCirculo(radio){ return (radio * radio) * PI; } console.groupEnd(); //Funciones de html function calcularPerimetroCuadrado(){ const input = document.getElementById ("InputCuadrado"); const value = input.value; const perimetro = perimetroCuadrado(value); alert(perimetro); } function calcularAreaCuadrado (){ const input = document.getElementById ("InputCuadrado"); const value = input.value; const area = areacuadrado(value); alert(area); } ///////////////// //Calcular Catetos function calcCateto () { var a = (document.getElementById("H").value); var b = (document.getElementById("C1").value); var resultado = (Math.sqrt((a * a) - (b*b))); alert(resultado); } //Calcular hipotenusa function calcHipotenusa(){ var b = (document.getElementById("C1").value); var c = (document.getElementById("C2").value); var resultado = (Math.sqrt((b * b) + (c * c))); alert(resultado) } //Triangulo en HTML // function calculoCateto(){ // var Cateto1 = parseInt(document.getElementById('C1').value); ////var resultado = calcCateto(Hipotenusa,Cateto1) //console.log(Hipotenusa,Cateto1) // console.log(Hipotenusa_C); // }
""" Code is generated by ucloud-model, DO NOT EDIT IT. """ from ucloud.core.typesystem import schema, fields class PHostCPUSetSchema(schema.ResponseSchema): """ PHostCPUSet - DescribePHost """ fields = { "CoreCount": fields.Int(required=False, load_from="CoreCount"), "Count": fields.Int(required=False, load_from="Count"), "Frequence": fields.Float(required=False, load_from="Frequence"), "Model": fields.Str(required=False, load_from="Model"), } class PHostDiskSetSchema(schema.ResponseSchema): """ PHostDiskSet - GetPHostTypeInfo """ fields = { "Count": fields.Int(required=False, load_from="Count"), "IOCap": fields.Int(required=False, load_from="IOCap"), "Name": fields.Str(required=False, load_from="Name"), "Space": fields.Int(required=False, load_from="Space"), "Type": fields.Str(required=False, load_from="Type"), } class PHostIPSetSchema(schema.ResponseSchema): """ PHostIPSet - DescribePHost """ fields = { "Bandwidth": fields.Int(required=False, load_from="Bandwidth"), "IPAddr": fields.Str(required=False, load_from="IPAddr"), "IPId": fields.Str(required=False, load_from="IPId"), "MACAddr": fields.Str(required=False, load_from="MACAddr"), "OperatorName": fields.Str(required=False, load_from="OperatorName"), "SubnetId": fields.Str(required=False, load_from="SubnetId"), "VPCId": fields.Str(required=False, load_from="VPCId"), } class PHostSetSchema(schema.ResponseSchema): """ PHostSet - DescribePHost """ fields = { "AutoRenew": fields.Str(required=False, load_from="AutoRenew"), "CPUSet": fields.List(PHostCPUSetSchema()), "ChargeType": fields.Str(required=False, load_from="ChargeType"), "Cluster": fields.Str(required=False, load_from="Cluster"), "Components": fields.Str(required=False, load_from="Components"), "CreateTime": fields.Int(required=False, load_from="CreateTime"), "DiskSet": fields.List(PHostDiskSetSchema()), "ExpireTime": fields.Int(required=False, load_from="ExpireTime"), "IPSet": fields.List(PHostIPSetSchema()), "ImageName": fields.Str(required=False, load_from="ImageName"), "IsSupportKVM": fields.Str(required=False, load_from="IsSupportKVM"), "Memory": fields.Int(required=False, load_from="Memory"), "Name": fields.Str(required=False, load_from="Name"), "OSType": fields.Str(required=False, load_from="OSType"), "OSname": fields.Str(required=False, load_from="OSname"), "PHostId": fields.Str(required=False, load_from="PHostId"), "PHostType": fields.Str(required=False, load_from="PHostType"), "PMStatus": fields.Str(required=False, load_from="PMStatus"), "PowerState": fields.Str(required=False, load_from="PowerState"), "RaidSupported": fields.Str(required=False, load_from="RaidSupported"), "Remark": fields.Str(required=False, load_from="Remark"), "SN": fields.Str(required=False, load_from="SN"), "Tag": fields.Str(required=False, load_from="Tag"), "Zone": fields.Str(required=False, load_from="Zone"), } class PHostImageSetSchema(schema.ResponseSchema): """ PHostImageSet - DescribePHostImage """ fields = { "ImageId": fields.Str(required=False, load_from="ImageId"), "ImageName": fields.Str(required=False, load_from="ImageName"), "OsName": fields.Str(required=False, load_from="OsName"), "OsType": fields.Str(required=False, load_from="OsType"), } class PHostTagSetSchema(schema.ResponseSchema): """ PHostTagSet - DescribePHostTags """ fields = { "Tag": fields.Str(required=False, load_from="Tag"), "TotalCount": fields.Int(required=False, load_from="TotalCount"), } class PHostPriceSetSchema(schema.ResponseSchema): """ PHostPriceSet - GetPHostPrice """ fields = { "ChargeType": fields.Str(required=False, load_from="ChargeType"), "Price": fields.Float(required=False, load_from="Price"), }
//~ name a304 alert(a304); //~ component a305.js
/** * TextAreaExpander plugin for jQuery * v1.0 * Expands or contracts a textarea height depending on the * quatity of content entered by the user in the box. * * By Craig Buckler, Optimalworks.net * * As featured on SitePoint.com: * http://www.sitepoint.com/blogs/2009/07/29/build-auto-expanding-textarea-1/ * * Please use as you wish at your own risk. */ /** * Usage: * * From JavaScript, use: * $(<node>).TextAreaExpander(<minHeight>, <maxHeight>); * where: * <node> is the DOM node selector, e.g. "textarea" * <minHeight> is the minimum textarea height in pixels (optional) * <maxHeight> is the maximum textarea height in pixels (optional) * * Alternatively, in you HTML: * Assign a class of "expand" to any <textarea> tag. * e.g. <textarea name="textarea1" rows="3" cols="40" class="expand"></textarea> * * Or assign a class of "expandMIN-MAX" to set the <textarea> minimum and maximum height. * e.g. <textarea name="textarea1" rows="3" cols="40" class="expand50-200"></textarea> * The textarea will use an appropriate height between 50 and 200 pixels. */ (function($) { // jQuery plugin definition $.fn.TextAreaExpander = function(minHeight, maxHeight) { var hCheck = !($.browser.msie || $.browser.opera); // resize a textarea function ResizeTextarea(e) { // event or initialize element? e = e.target || e; // find content length and box width var vlen = e.value.length, ewidth = e.offsetWidth; if (vlen != e.valLength || ewidth != e.boxWidth) { var prevHeight = e.style.height; var wasAtBottom = false; if (bitpop && bitpop.chat) wasAtBottom = bitpop.chat.atBottom(); if (hCheck && (vlen < e.valLength || ewidth != e.boxWidth)) e.style.height = "0px"; var h = Math.max(e.expandMin, Math.min(e.scrollHeight, e.expandMax)); e.style.overflow = "hidden" /*(e.scrollHeight > h ? "auto" : "hidden")*/; e.style.height = h + "px"; e.valLength = vlen; e.boxWidth = ewidth; if (e.style.height != prevHeight) { $('.box, .box .antiscroll-inner').height(287 + 30 - $('#msgForm').height()); if ($('.box-wrap').data('antiscroll')) { $('.box-wrap').data('antiscroll').rebuild(); } if (bitpop && bitpop.chat && wasAtBottom) bitpop.chat.scrollToBottom(); } } return true; }; // initialize this.each(function() { // is a textarea? if (this.nodeName.toLowerCase() != "textarea") return; // set height restrictions var p = this.className.match(/expand(\d+)\-*(\d+)*/i); this.expandMin = minHeight || (p ? parseInt('0'+p[1], 10) : 0); this.expandMax = maxHeight || (p ? parseInt('0'+p[2], 10) : 99999); // initial resize ResizeTextarea(this); // zero vertical padding and add events if (!this.Initialized) { this.Initialized = true; $(this).css("padding-top", 0).css("padding-bottom", 0); $(this).bind("keyup", ResizeTextarea).bind("change", ResizeTextarea).bind("focus", ResizeTextarea); } }); return this; }; })(jQuery); // initialize all expanding textareas jQuery(document).ready(function() { jQuery("textarea[class*=expand]").TextAreaExpander(); });
import {ArtifactoryDao} from '../../artifactory_dao'; export function ArtifactLicensesDao(RESOURCE, ArtifactoryDaoFactory) { return ArtifactoryDaoFactory() .setPath(RESOURCE.GENERAL_TAB_LICENSES + '/:action') .setCustomActions({ 'getLicenses': { method: 'GET', isArray: true }, setLicenses: { method: 'PUT', isArray: false, path: RESOURCE.GENERAL_TAB_LICENSES + '/setLicensesOnPath', notifications: true }, scanArtifact: { method: 'GET', isArray: true, path: RESOURCE.GENERAL_TAB_LICENSES + '/scanArtifact', notifications: true }, queryCodeCenter: { method: 'POST', params: { repoKey: '@repoKey', path: '@path' }, path: RESOURCE.GENERAL_TAB_LICENSES + '/queryCodeCenter', notifications: true }, getArchiveLicenseFile: { method: 'GET', path: RESOURCE.GENERAL_TAB_LICENSES + '/getArchiveLicenseFile', transformResponse:(data)=>{ return {data: data} } } }) .getInstance(); }
from boa3.builtin import public @public def main(a: int, b: int) -> bool: if a == b: return True return False
def getSpeakerGender(): import requests import os import re import pickle try: import ssl ssl._create_default_https_context = ssl._create_unverified_context except: pass path = '/Users/Guest/PycharmProjects/aud.io/data/audio/wav/accents' accents = os.listdir(path) # get list of all accent names for accent in accents: try: count = 1 # initialize genders = [] url = 'https://accent.gmu.edu/browse_language.php?function=find&language='+accent # this is the url for info for speakers response = requests.get(url) html = response.content.decode("utf-8") # html content as string I = [m.start() for m in re.finditer(accent, html)] # indices of all occurences of accent on page of speaker info for idx in I: genders.append(html[idx+len(accent)+len(str(count))+6]) # first letter of listed gender (yes it's ugly, just trust) count += 1 with open(path + '/' + accent + '/genders', "w") as outfile: outfile.write("\n".join(genders)) # dump genders into text file print('Successfully added info for ' + accent + ' speakers!') print(genders) except: print('Error retrieving speaker info for: ' + accent) continue return None # Downloads accent audio files from database def getAudioFiles(): from bs4 import BeautifulSoup import urllib.request as urllib2 import requests url = 'http://accent.gmu.edu/soundtracks/' # this is the url for the accent database html_page = urllib2.urlopen(url) # read HTML of database (containing all audio files) soup = BeautifulSoup(html_page, features="html.parser") # instantiate soup object for link in soup.findAll('a'): # iterate through each attribute in soup object myfile = requests.get(url + '/' + link.get('href')) # get the mp3 file name and get file url try: open('accents/' + link.get('href'), 'wb').write(myfile.content) # download file into accents print("Successfully downloaded " + link.get('href')) # print dl success except: print("Could not download " + link.get('href')) # print dl failure # Clean-up data and group into accents def cleanupAudioFiles(): import os filenames = sorted(os.listdir('accents/.')) # get all file names accentName = filenames[1][:-5] # get name of first accent (idx==1 to ignore .DS_store) for file in filenames: try: if file[0:len(accentName)] != accentName: # if file is not the current accent name, you have reached a new accent file count = 1 # initialize at 1 accentName = file[:-5] # all except 'n.mp3' os.mkdir('accents/' + accentName) # create folder for this new accent os.rename('accents/' + file, 'accents/' + accentName + '/' + file) # put first in there else: # if it's not the first of this accent we've seen... os.rename('accents/' + file, 'accents/' + accentName + '/' + accentName + str(count) + '.mp3') # put current file into its accent category count += 1 # add to counter (appended to file name within a folder) except: print('Could not move file ' + file) sendSMS('Your code has finished running!') # send SMS to indicate completion def sendSMS(msg): from twilio.rest import Client import config client = Client(config.accountSID_twilio, config.authToken_twilio) client.messages.create(from_=config.sendNum, to=config.myNum, body=msg)
/******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) { /******/ return installedModules[moduleId].exports; /******/ } /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ i: moduleId, /******/ l: false, /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ /******/ // Flag the module as loaded /******/ module.l = true; /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /******/ /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ /******/ // define getter function for harmony exports /******/ __webpack_require__.d = function(exports, name, getter) { /******/ if(!__webpack_require__.o(exports, name)) { /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); /******/ } /******/ }; /******/ /******/ // define __esModule on exports /******/ __webpack_require__.r = function(exports) { /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); /******/ } /******/ Object.defineProperty(exports, '__esModule', { value: true }); /******/ }; /******/ /******/ // create a fake namespace object /******/ // mode & 1: value is a module id, require it /******/ // mode & 2: merge all properties of value into the ns /******/ // mode & 4: return value when already ns object /******/ // mode & 8|1: behave like require /******/ __webpack_require__.t = function(value, mode) { /******/ if(mode & 1) value = __webpack_require__(value); /******/ if(mode & 8) return value; /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; /******/ var ns = Object.create(null); /******/ __webpack_require__.r(ns); /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); /******/ return ns; /******/ }; /******/ /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = function(module) { /******/ var getter = module && module.__esModule ? /******/ function getDefault() { return module['default']; } : /******/ function getModuleExports() { return module; }; /******/ __webpack_require__.d(getter, 'a', getter); /******/ return getter; /******/ }; /******/ /******/ // Object.prototype.hasOwnProperty.call /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; /******/ /******/ // __webpack_public_path__ /******/ __webpack_require__.p = "/"; /******/ /******/ /******/ // Load entry module and return exports /******/ return __webpack_require__(__webpack_require__.s = 2); /******/ }) /************************************************************************/ /******/ ({ /***/ "./resources/js/chat.js": /*!******************************!*\ !*** ./resources/js/chat.js ***! \******************************/ /*! no static exports found */ /***/ (function(module, exports) { $(document).ready(function () { window.chatLoader = function () { return '<div class="chat-loader"><div class="lds-ring"><div></div><div></div><div></div><div></div></div></div>'; }; window.perfectScrollInit = function (element) { return new PerfectScrollbar(element, { wheelSpeed: 1, wheelPropagation: false, minScrollbarLength: 20 }); }; /* open sub conversation */ window.active_sub_chat = 0; window.active_sub_chat_refresh_timer = 1000; window.active_sub_chat_handler; window.activeSubConversation = document.querySelector('#active-sub-conversation-replies'); /* load conversations */ window.conversationsContainer = document.querySelector('#conversations-container'); window.conversations_container_handler; window.loadConversations = function () { if (window.userID > 0) { $("#conversations-rows").html(window.chatLoader()); axios.get('/chat/conversations').then(function (response) { //console.log(JSON.stringify(response.data)); if (response.data.conversations != '') { $("#conversations-rows").html(response.data.conversations); openConversation(); } else { $("#conversations-rows").html('<div class="no-conversations-found">لا يوجد محادثات</div>'); } if (window.conversations_container_handler) { window.conversations_container_handler.update(); } else { window.conversations_container_handler = perfectScrollInit(window.conversationsContainer); window.conversationsContainer.addEventListener('ps-y-reach-end', function () { window.loadMoreConversations(); }); } window.checkForNewConversations(); }); /* /axios */ } }; window.loadConversations(); // load more conversations window.loadMoreConversationsInProgress = 0; window.loadMoreConversations = function () { if (window.loadMoreConversationsInProgress == 0) { window.loadMoreConversationsInProgress = 1; var last_conversation = $("#conversations-rows .conversation-row:last-of-type"); axios.get('/chat/conversations/', { params: { last_conversation_id: last_conversation.attr('data-conversation-id'), last_conversation_row_id: last_conversation.attr("data-conversation-row-id") } }).then(function (response) { //console.log(JSON.stringify(response.data.conversations)); var currentScroll = window.activeConversation.scrollHeight; if (response.data.conversations != '') { window.loadMoreConversationsInProgress = 0; $("#conversations-rows").append(response.data.conversations); openConversation(); } else { $("#conversations-rows").append("<p class='no-previous-conversations'>إنتهت المحادثات</p>"); } window.conversations_container_handler.update(); }); /* /axios */ } }; /* /loadMoreConversations() */ window.checkForNewConversationsHandler; window.checkForNewConversations = function () { var top_conversation = $("#conversations-rows .conversation-row:first-of-type"); axios.get('/chat/conversations', { params: { top_conversation_id: top_conversation.attr('data-conversation-id'), top_conversation_row_id: top_conversation.attr("data-conversation-row-id") } }).then(function (response) { $("#toggleChat-counter").text(response.data.countUnread); $("#notifications-counter > div").text(response.data.countNotifications); console.log(response.data.conversations_ids_array); if (response.data.conversations != '') { response.data.conversations_ids_array.forEach(function (conversation_row) { $('.conversation-row[data-conversation-id="' + conversation_row + '"]').remove(); }); $("#conversations-rows").prepend(response.data.conversations); openConversation(); if (loadMoreConversationsInProgress == 0) { loadMoreConversationsInProgress = 1; window.conversations_container_handler.update(); loadMoreConversationsInProgress = 0; } else { window.conversations_container_handler.update(); } } })["catch"](function (error) {}).then(function () { // always executed checkForNewConversationsHandler = setTimeout(checkForNewConversations, 5000); }); /* /axios */ }; /* /checkForNewConversations() */ /* open conversation */ window.active_chat = 0; window.active_chat_refresh_timer = 1000; window.active_chat_handler; window.activeConversation = document.querySelector('#active-conversation'); window.openConversation = function () { $(".conversation-row").off('click'); $(".conversation-row").click(function () { // ///////////////////// var partner_id = $(this).attr('data-partner-id'); var conversation_id = $(this).attr('data-conversation-id'); $("#active-conversation-container .chat-header-label .chat-header-label-text").html($(this).find('.conversation-row-partner-name').text()); if (conversation_id == $('#active-conversation').attr('data-active-conversation-id')) { window.active_chat = conversation_id; $("#active-conversation-container").addClass('visible'); } else { $("#active-conversation-container").addClass('visible'); $("#active-conversation-replies").html(chatLoader()); window.loadConversation(conversation_id, partner_id, 'widget'); } }); }; /* /openConversation() */ window.loadingConversationInPRogress = 0; window.loadConversation = function (conversation_id, partner_id, source, adminLocation) { adminLocation = typeof adminLocation !== 'undefined' ? adminLocation : true; if (window.loadingConversationInPRogress == 0) { window.active_chat = 0; window.loadingConversationInPRogress = 1; if (source == 'view') { if (adminLocation) { $("#chat-widget").addClass('admin-view'); } $(".blur-content").addClass('show-blur-content'); } else if (source = 'widget') { $("#chat-widget").removeClass('admin-view'); $(".blur-content").addClass('show-blur-content'); } axios.get('/chat/conversations/' + conversation_id + '/partner/' + partner_id).then(function (response) { if (window.active_chat_handler) { window.active_chat_handler.update(); } else { window.active_chat_handler = perfectScrollInit(window.activeConversation); } $("#active-conversation-replies").html(response.data.replies); $("#active-conversation").attr('data-active-conversation-id', response.data.conversation_id); window.active_chat = response.data.conversation_id; window.activeConversation.scrollTop = window.activeConversation.scrollHeight; $("#chat_reply_form textarea").focus(); $('.conversation-row[data-conversation-id="' + response.data.conversation_id + '"] .conversation-row-notseen-messages-count span').text('0'); window.activeConversation.addEventListener('ps-y-reach-start', window.loadMoreChatReplies); window.activeConversation.addEventListener('ps-scroll-down', function () { if (window.activeConversation.scrollTop > window.activeConversation.scrollHeight - $("#active-conversation").height() - 200) { $("#scroll-down-go-down").removeClass('visible'); } else { $("#scroll-down-go-down").addClass('visible'); } }); window.activeConversation.addEventListener('ps-scroll-up', function () { $("#scroll-down-go-down").removeClass('visible'); }); window.loadingConversationInPRogress = 0; }); /* /axios */ } }; window.loadMoreRepliesInProgress = 0; window.loadMoreChatReplies = function () { if (window.loadMoreRepliesInProgress == 0) { window.loadMoreRepliesInProgress = 1; var top_reply = $("#active-conversation-replies .conversation_reply_row:first-of-type"); axios.get('/chat/conversations/previous_replies/' + window.active_chat + '/' + top_reply.attr('data-reply-id')).then(function (response) { //console.log( JSON.stringify(response.data) ); if (response.data.replies) { $("#active-conversation-replies").prepend(response.data.replies); window.active_chat_handler.update(); var previous_height = 0; top_reply.prevAll().each(function () { previous_height += $(this).outerHeight(); }); if (previous_height > $("#active-conversation").height()) { var newPosition = previous_height + $("#active-conversation").height() + 14; } else { var newPosition = previous_height; } window.activeConversation.scrollTop = newPosition; setTimeout(function () { $("#scroll-down-go-down").removeClass('visible'); }, 10); } else { $("#active-conversation-replies").prepend("<p class='no-previous-replies'>إنتهت المحادثة</p>"); window.active_chat_handler.update(); } window.loadMoreRepliesInProgress = 0; }); /* /axios */ } }; /* /loadMoreChatReplies() */ window.loadMoreSubRepliesInProgress = 0; window.loadMoreSubChatReplies = function () { if (window.loadMoreSubRepliesInProgress == 0) { window.loadMoreSubRepliesInProgress = 1; var topReply = $("#active-sub-conversation-replies .conversation_reply_row:first-of-type"); axios.get('/chat/conversations/' + window.active_sub_chat + '/previous_replies/', { params: { top_reply: topReply.attr('data-reply-id') } }).then(function (response) { console.log(JSON.stringify(response.data)); //return; if (response.data.replies) { window.loadMoreSubRepliesInProgress = 0; $("#active-sub-conversation-replies").prepend(response.data.replies); window.activeSubConversation.scrollTop = topReply.offset().top - $("#active-sub-conversation").height() - topReply.height() + 0; setTimeout(function () { $("#sub_conversation_scroll-down-go-down").removeClass('visible'); }, 10); } else { $("#active-sub-conversation-replies").prepend("<p class='no-previous-replies'>إنتهت المحادثة</p>"); } //window.active_sub_chat_handler.update(); }); /* /axios */ } }; /* load partner new replies */ window.loadPartnerNewReplies = function () { if (window.active_chat != 0) { console.log(window.active_chat); } else { console.log(0); } if (window.active_chat != 0) { var partnerReplies = document.querySelectorAll(".partner_user_reply"); if (partnerReplies.length > 0) { var lastPartnerReply = partnerReplies[partnerReplies.length - 1].getAttribute("data-reply-id"); } else { var lastPartnerReply = 0; } axios.get('/chat/conversations/new_replies/' + window.active_chat + '/' + lastPartnerReply).then(function (response) { if (response.data.replies) { if (window.activeConversation.scrollTop == window.activeConversation.scrollHeight - $("#active-conversation").height()) { $("#active-conversation-replies").append(response.data.replies); window.activeConversation.scrollTop = window.activeConversation.scrollHeight; } else { $("#active-conversation-replies").append(response.data.replies); $("#new-partner-replies-go-down").addClass('visible'); setTimeout(function () { $("#new-partner-replies-go-down").removeClass('visible'); }, 3000); } } })["catch"](function (error) {}).then(function () { // always executed setTimeout(window.loadPartnerNewReplies, window.active_chat_refresh_timer); }); /* /axios */ } else { setTimeout(window.loadPartnerNewReplies, window.active_chat_refresh_timer); } }; loadPartnerNewReplies(); // if there is new partner replies go down by clicking the new replies icon $("#new-partner-replies-go-down, #scroll-down-go-down").click(function () { $("#new-partner-replies-go-down").removeClass('visible'); window.activeConversation.scroll({ top: window.activeConversation.scrollHeight, left: 0, behavior: "smooth" }); }); // add new conversation reply $("#chat-reply-input textarea").keypress(function (e) { if (e.which == 13 && !e.shiftKey) { $(this).closest("form").submit(); e.preventDefault(); } }); $("#chat_reply_form").on('submit', function (e) { e.preventDefault(); var conversation_reply = $("#chat_reply_form textarea").val(); var conversation_id = $("#active-conversation").attr('data-active-conversation-id'); $("#chat_reply_form textarea").val(null); axios.post('/chat/conversations/' + conversation_id, { conversation_reply: conversation_reply }).then(function (response) { if (response.data.error == 1) {} else { $("#active-conversation-replies").append(response.data.reply); window.activeConversation.scrollTop = window.activeConversation.scrollHeight; $("#chat_reply_form textarea").focus(); clearTimeout(window.checkForNewConversationsHandler); window.checkForNewConversationsHandler = window.checkForNewConversations(); } //console.log( JSON.stringify(response.data) ); }); /* /axios */ }); // go back to conversation from active conversation layer $("#back-to-conversations").click(function () { window.active_chat = 0; window.loadMoreRepliesInProgress = 0; $("#active-conversation-container").removeClass('visible'); $("#chat-widget-controls").removeClass('visible'); }); $("#controls-sub-conversation").click(function () { $("#sub-conversation-container").addClass('d-flex'); $('.sub-conversation-user-chat, #controls-sub-conversation').removeClass('active-sub-conversation-tab-active'); $(this).addClass('active-sub-conversation-tab-active'); }); $("#sub_conversation_back-to-conversations").click(function () { window.active_sub_chat = 0; window.loadMoreSubRepliesInProgress = 0; $("#sub-conversation-container").removeClass('d-flex'); $("#chat-widget-controls").removeClass('visible'); }); $("#toggleChat").click(function () { $("#toggleChat").addClass('hidden'); $("#chat-widget").addClass('visible-chat'); $(".blur-content").addClass('show-blur-content'); }); $(".chat-close").click(function () { $("#toggleChat").removeClass('hidden'); $("#chat-widget").removeClass('visible-chat'); $(".blur-content").removeClass('show-blur-content'); }); $("#sub_conversation_scroll-down-go-down").click(function () { window.activeSubConversation.scroll({ top: window.activeSubConversation.scrollHeight, left: 0, behavior: "smooth" }); }); $("#chat-add-image-btn").click(function () { window.Swal.fire({ title: "قم بإختيار صورة", showCancelButton: true, confirmButtonText: "إرسال", cancelButtonText: "إلغاء", customClass: { confirmButton: 'btn btn-lg btn-success mx-2', cancelButton: 'btn btn-lg btn-danger mx-2' }, buttonsStyling: false, showLoaderOnConfirm: true, html: "\n <div id=\"chat_image_modal\">\n\n <input type=\"file\" class=\"form-control\" id=\"chat_image_inp\" style=\"margin:10px auto;padding: 3px 5px !important;height: 40px;line-height: 26px !important;\" />\n <div class=\"progress\" style=\"display:none;\">\n <div class=\"progress-bar progress-bar-striped\" role=\"progressbar\" style=\"width:0%\"></div>\n </div>\n </div>\n ", preConfirm: function preConfirm() { if (!$("#chat_image_inp").val()) { Swal.showValidationMessage('قم بإختيار صورة'); } else { $("#uploadingImage").fadeIn(); $("#chat-upload-progress .progress-bar").css({ width: '0%' }); var form = new FormData(); form.append('image', $('#chat_image_inp').prop('files')[0]); form.append('conversation_id', $("#active-conversation").attr('data-active-conversation-id')); return axios.post('/chat/conversations/' + window.active_chat + '/add_image', form, { headers: { 'Content-Type': 'multipart/form-data' }, onUploadProgress: function onUploadProgress(progressEvent) { if (progressEvent.lengthComputable) { //console.log(progressEvent.loaded + ' ' + progressEvent.total); var progress = progressEvent.loaded / progressEvent.total * 100 + '%'; $("#chat-upload-progress .progress-bar").css({ width: progress }); } } }).then(function (response) { if (response.data.error == 1) { throw new Error(response.data.message); } return response.data; })["catch"](function (error) { Swal.showValidationMessage("".concat(error)); }); } }, allowOutsideClick: function allowOutsideClick() { return !Swal.isLoading(); } }).then(function (result) { if (result.value) { if (result.value.error == 1) { window.Toast.fire({ icon: 'error', title: result.value.message }); } else { $("#uploadingImage").fadeOut(); $("#active-conversation-replies").append(result.value.reply); window.activeConversation.scrollTop = window.activeConversation.scrollHeight; $("#chat_reply_form textarea").focus(); clearTimeout(window.checkForNewConversationsHandler); window.checkForNewConversationsHandler = window.checkForNewConversations(); } } }); }); $('.offer-user-chat').on('click', function () { $("#toggleChat").addClass('hidden'); $("#chat-widget").addClass('visible-chat'); $(".blur-content").addClass('show-blur-content'); if (window.userID > 0) { var partner_id = $(this).attr('data-partner'); var conversation_id = 0; $("#active-conversation-container .chat-header-label .chat-header-label-text").html($(this).attr('data-partner-name')); $("#active-conversation-container").addClass('visible'); $("#active-conversation-replies").html(chatLoader()); window.loadConversation(conversation_id, partner_id, 'view', false); } }); $('.offer-user-chat-false').on('click', function () { window.Toast.fire({ icon: 'error', title: "لا يمكنك التواصل مع نفسك" }); }); }); /* /ready() */ /***/ }), /***/ 2: /*!************************************!*\ !*** multi ./resources/js/chat.js ***! \************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { module.exports = __webpack_require__(/*! /home/mostafa/Downloads/project mostaql/resources/js/chat.js */"./resources/js/chat.js"); /***/ }) /******/ });
import Vue from 'vue'; import App from './App.vue'; import router from './router'; import store from './store'; // import ELEMENT from 'element-ui'; import mavonEditor from 'mavon-editor'; import 'mavon-editor/dist/css/index.css'; // Vue.use(ELEMENT); Vue.use(mavonEditor); Vue.prototype.$store = store; // Vue.prototype.$message = Message; Vue.config.productionTip = false; new Vue({ router, store, render: h => h(App) }).$mount('#app');
const ruleModule = require('./../../../src/rules/require-version'); const {lint, ruleType} = ruleModule; describe('require-version Unit Tests', () => { describe('a rule type value should be exported', () => { test('it should equal "standard"', () => { expect(ruleType).toStrictEqual('standard'); }); }); describe('when package.json has node', () => { test('true should be returned', () => { const packageJsonData = { version: 'version' }; const response = lint(packageJsonData, 'error'); expect(response).toBeTruthy(); }); }); describe('when package.json does not have node', () => { test('LintIssue object should be returned', () => { const packageJsonData = {}; const response = lint(packageJsonData, 'error'); expect(response.lintId).toStrictEqual('require-version'); expect(response.severity).toStrictEqual('error'); expect(response.node).toStrictEqual('version'); expect(response.lintMessage).toStrictEqual('version is required'); }); }); });
(function() { $(document).ready(function() { // The pattern to replace in image paths; this allows image paths in the live // code editors (e.g. "images/fish.jpg" to be rewritten to point to the correct // URL on the server (e.g. "assets/images/fish.jpg") var imagePathPattern = /(images\/(?:\w+)\.(jpg|png|svg))/gi; // Initialize FastClick to eliminate the dreaded 300ms tap delay FastClick.attach(document.body); // Add jQuery method which adds a "Try in Sandbox" $.fn.addSandboxTryButton = function () { this.prepend('<button class="try-in-sandbox edge-button">Try in Sandbox</button>'); }; // Reset context all attached data for the given canvas $.fn.resetCanvases = function () { this.each(function (canvas) { var $canvas = $(this); $canvas.removeLayers(); $canvas.clearCanvas(); $canvas.detectPixelRatio(); }); }; // Spawn a new sandbox with the given sandbox state $.spawnNewSandbox = function (sandboxState) { // Retrieve the sandbox state of the current page var originalSandboxState = sessionStorage.getItem('jcanvas-sandbox'); // Temporarily overwrite the current page's sandbox state with the new sandbox // code so that it gets copied into the sandbox state for the spawned page sessionStorage.setItem('jcanvas-sandbox', JSON.stringify(sandboxState)); // window.open copies the session data for the current page into the session // storage for the spawned page window.open('/jcanvas/sandbox/'); // Restore the original sandbox state for the current page (this should not // affect the sandbox state of the spawned page) if (originalSandboxState !== null) { sessionStorage.setItem('jcanvas-sandbox', originalSandboxState); } else { sessionStorage.removeItem('jcanvas-sandbox'); } }; // Modify any image paths to point to the real images directory $.jCanvasCorrectImagePaths = function (code) { return code.replace(imagePathPattern, '/jcanvas/assets/$1'); }; // Allow user to test any example in Sandbox $('main').on('click', '.try-in-sandbox', function () { // Retrieve code for this example from neighboring <pre> var code = $(this).next().text(); // Open code in a new sandbox instance $.spawnNewSandbox({ code: code }); }); }); }());
var searchData= [ ['errorconnectiontext_27',['errorConnectionText',['../classplayer_1_1_player_creation_frame.html#a9bed7bc7a62ac2536ba6f34204b9fd36',1,'player::PlayerCreationFrame']]], ['exitbutton_28',['exitButton',['../classgui_1_1_start_game_frame.html#a7fbd43aa7f5939b3b1f909b46dadbaf3',1,'gui::StartGameFrame']]] ];
import { createStore, applyMiddleware, compose } from "redux"; import thunk from "redux-thunk"; import rootReducer from "./reducers"; const initialState = {}; const middleware = [thunk]; const composeEnhancers = (typeof window !== "undefined" && window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__) || compose; const enhancer = composeEnhancers(applyMiddleware(...middleware)); // Setup Redux store const store = createStore(rootReducer, initialState, enhancer); export default store;
import os import json from django.conf import settings from django.shortcuts import render from django.http import HttpResponse, HttpResponseBadRequest from .utils.ss_calculator import get_retire_data from .utils.ss_utilities import get_retirement_age from dateutil import parser import datetime from retirement_api.models import Step, AgeChoice, Page, Tooltip, Question from django.utils.translation import ugettext as _ from django.utils.translation import activate, deactivate_all BASEDIR = os.path.dirname(__file__) standalone = getattr(settings, 'STANDALONE', False) if standalone: base_template = "retirement_api/standalone/base_update.html" else: # pragma: no cover base_template = "front/base_update.html" def claiming(request, es=False): if es is True: activate('es') else: deactivate_all() ages = {} for age in AgeChoice.objects.all(): ages[age.age] = _(age.aside) page = Page.objects.get(title='Before You Claim') tips = {} for tooltip in Tooltip.objects.all(): tips[tooltip.title] = tooltip.text questions = {} for q in Question.objects.all(): questions[q.slug] = q final_steps = {} for step in Step.objects.filter(title__contains='final_'): final_steps[step.title] = step cdict = { 'tstamp': datetime.datetime.now(), 'final_steps': final_steps, 'questions': questions, 'tips': tips, 'ages': ages, 'page': page, 'base_template': base_template, 'available_languages': ['en', 'es'], 'es': es, 'about_view_name': 'retirement_api:' + ('about_es' if es else 'about'), } return render(request, 'retirement_api/claiming.html', cdict) def param_check(request, param): if param in request.GET and request.GET[param]: return request.GET[param] else: return None def income_check(param): cleaned = param.replace('$', '').replace(',', '').partition('.')[0] try: clean_income = int(cleaned) except: return None else: return clean_income def estimator(request, dob=None, income=None, language='en'): ssa_params = { 'dobmon': 0, 'dobday': 0, 'yob': 0, 'earnings': 0, 'lastYearEarn': '', # not using 'lastEarn': '', # not using 'retiremonth': '', # only using for past-FRA users 'retireyear': '', # only using for past-FRA users 'dollars': 1, # benefits to be calculated in current-year dollars 'prgf': 2 } if dob is None: dob = param_check(request, 'dob') if not dob: return HttpResponseBadRequest("invalid date of birth") if income is None: income_raw = param_check(request, 'income') if not income_raw: return HttpResponseBadRequest("invalid income") else: income = income_check(income_raw) if income is None: return HttpResponseBadRequest("invalid income") else: income = income_check(income) if income is None: return HttpResponseBadRequest("invalid income") try: dob_parsed = parser.parse(dob) except: return HttpResponseBadRequest("invalid date of birth") else: DOB = dob_parsed.date() ssa_params['dobmon'] = DOB.month ssa_params['dobday'] = DOB.day ssa_params['yob'] = DOB.year ssa_params['earnings'] = income data = get_retire_data(ssa_params, language) return HttpResponse(json.dumps(data), content_type='application/json') def get_full_retirement_age(request, birth_year): data_tuple = get_retirement_age(birth_year) if not data_tuple: return HttpResponseBadRequest("bad birth year (%s)" % birth_year) else: data = json.dumps(data_tuple) return HttpResponse(data, content_type='application/json') def about(request, language='en'): """Return our 'about' calculation-explainer page in Engish or Spanish""" if language == 'es': activate('es') es = True else: deactivate_all() es = False cdict = { 'base_template': base_template, 'available_languages': ['en', 'es'], 'es': es } return render(request, 'retirement_api/about.html', cdict)
import { PageModuleDescriptor } from '@/modules-arch/page-module-descriptor' import { BalanceExplorerModule } from '@modules/assets/balance-explorer/module' export class BalancesPageModule extends PageModuleDescriptor { constructor (opts = {}) { super({ ...opts, importComponentFn: _ => import('@/vue/pages/Balances'), allowedSubmodules: [ BalanceExplorerModule, ], }) } }
num = int(input("Informe um número: ")) u = num // 1 % 10 d = num // 10 % 10 c = num // 100 % 10 m = num // 1000 % 10 print("Analisando o número {}".format(num)) print("Unidade {}".format(u)) print("Dezena {}".format(d)) print("Centena {}".format(c)) print("Milhar {}".format(m))
export default { members: 'Membres', role: 'Rôle', updateRole: 'Mettre à jour le rôle', addMember: 'Ajouter un membre', userSearchAPIs: "Rechercher des utilisateurs (avec l'IPA)", userSearchPrompt: 'Commencez à taper pour rechercher', removeMember: 'Supprimer un membre', removePrompt: 'Êtes-vous sûr de vouloir supprimer ces membres ?', roles: { projectAdmin: "L'administrateur du projet", annotator: 'Étiqueteuse', annotationApprover: "Approbateur d'étiquettes", undefined: 'Aucun rôle défini' } }
import React from 'react'; import PropTypes from 'prop-types'; import classNames from 'classnames'; const PageLink = props => { const { children, className, tag: Tag, ...attributes } = props; const classes = classNames('page-link', className); return ( <Tag data-test='page-link' {...attributes} className={classes}> {children} </Tag> ); }; PageLink.propTypes = { tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), className: PropTypes.string, children: PropTypes.node }; PageLink.defaultProps = { tag: 'a' }; export default PageLink; export { PageLink as MDBPageNav };
import curses import curses.textpad import sys from SDWLE.agents import registry from SDWLE.cards.heroes import hero_for_class from SDWLE.constants import CHARACTER_CLASS from SDWLE.engine import Game, Deck, card_lookup from SDWLE.ui.game_printer import GameRender from SDWLE.cards import * def load_deck(filename): cards = [] character_class = CHARACTER_CLASS.MAGE with open(filename, "r") as deck_file: contents = deck_file.read() items = contents.splitlines() for line in items[0:]: parts = line.split(" ", 1) count = int(parts[0]) for i in range(0, count): card = card_lookup(parts[1]) if card.character_class != CHARACTER_CLASS.ALL: character_class = card.character_class cards.append(card) if len(cards) > 30: pass return Deck(cards, hero_for_class(character_class)) def print_usage(): usage = """usage: python text_runner.py deck1 deck2 deck1 and deck2 are the decks to be used by the players deck1 is for the human player deck2 is for the computer The decks are a comma separated list of cards, preceded by the character class associated with the deck """ print(usage) def render_game(stdscr): class TextAgent: def __init__(self, game_window, prompt_window, text_window): self.window = prompt_window self.game_window = game_window self.text_window = text_window curses.init_pair(5, curses.COLOR_WHITE, curses.COLOR_CYAN) curses.init_pair(6, curses.COLOR_BLACK, curses.COLOR_GREEN) def do_turn(self, player): renderer.draw_game() index = 0 action = self.choose_action() while not (action == "quit" or action == "end"): if action == "play": card = self.choose_card(player) if card is not None: player.game.play_card(card) elif action == "attack": #SDW rule attacker = self.choose_attacker(player) if attacker is not None: #SDW rule card = attacker.card if card.is_facedown(): #raise GameException('card is facedown') card._placeholder = attacker card.use(card.player, game) #card.facedown = False #attacker.attack() elif action == "power": if player.hero.power.can_use(): player.hero.power.use() index += 1 renderer.draw_game() action = self.choose_action() if action == "quit": sys.exit(0) def choose_action(self): self.window.addstr(0, 0, "Choose action") actions = ["attack", "play", "power", "end", "quit"] index = 0 selected = 0 for action in actions: if index == selected: color = curses.color_pair(4) else: color = curses.color_pair(3) self.text_window.addstr(0, index * 10, "{0:^9}".format(action), color) index += 1 self.window.refresh() self.text_window.refresh() ch = 0 while ch != 10 and ch != 27: ch = self.game_window.getch() if ch == curses.KEY_LEFT: selected -= 1 if selected < 0: selected = len(actions) - 1 if ch == curses.KEY_RIGHT: selected += 1 if selected == len(actions): selected = 0 index = 0 for action in actions: if index == selected: color = curses.color_pair(4) else: color = curses.color_pair(3) self.text_window.addstr(0, index * 10, "{0:^9}".format(action), color) index += 1 self.window.refresh() self.text_window.refresh() if ch == 27: sys.exit(0) #return None return actions[selected] def choose_support_card(self, player): filtered_cards = [card for card in filter(lambda card: card.can_use(player, player.game), player.hand)] if len(filtered_cards) is 0: return None renderer.targets = filtered_cards renderer.selected_target = renderer.targets[0] renderer.draw_game() self.window.addstr(0, 0, "Choose Card") self.window.refresh() ch = 0 index = 0 while ch != 10 and ch != 27: ch = self.game_window.getch() if ch == curses.KEY_LEFT: index -= 1 if index < 0: index = len(renderer.targets) - 1 if ch == curses.KEY_RIGHT: index += 1 if index == len(renderer.targets): index = 0 renderer.selected_target = renderer.targets[index] renderer.draw_game() self.window.addstr(0, 0, "Choose Card") self.window.refresh() renderer.targets = None if ch == 27: return None return renderer.selected_target def choose_card(self, player): filtered_cards = [card for card in filter(lambda card: card.can_use(player, player.game), player.hand)] if len(filtered_cards) is 0: return None renderer.targets = filtered_cards renderer.selected_target = renderer.targets[0] renderer.draw_game() self.window.addstr(0, 0, "Choose Card") self.window.refresh() ch = 0 index = 0 while ch != 10 and ch != 27: ch = self.game_window.getch() if ch == curses.KEY_LEFT: index -= 1 if index < 0: index = len(renderer.targets) - 1 if ch == curses.KEY_RIGHT: index += 1 if index == len(renderer.targets): index = 0 renderer.selected_target = renderer.targets[index] renderer.draw_game() self.window.addstr(0, 0, "Choose Card") self.window.refresh() renderer.targets = None if ch == 27: return None return renderer.selected_target def choose_attacker(self, player): #SDW rule #TODO bug fix why can't filter minions #filtered_attackers = [minion for minion in filter(lambda minion: minion.can_attack(), player.minions)] filtered_attackers = player.minions #if player.hero.can_attack(): # filtered_attackers.append(player.hero) if len(filtered_attackers) is 0: return None renderer.targets = filtered_attackers renderer.selected_target = renderer.targets[0] renderer.draw_game() self.window.addstr(0, 0, "Choose attacker") self.window.refresh() ch = 0 index = 0 while ch != 10 and ch != 27: ch = self.game_window.getch() self.window.addstr(0, 0, "{0}".format(ch)) self.window.refresh() if ch == curses.KEY_LEFT: index -= 1 if index < 0: index = len(renderer.targets) - 1 if ch == curses.KEY_RIGHT: index += 1 if index == len(renderer.targets): index = 0 renderer.selected_target = renderer.targets[index] renderer.draw_game() #fix self.window.addstr(0, 0, "Choose attacker") self.window.refresh() renderer.targets = None if ch == 27: return None return renderer.selected_target def do_card_check(self, cards): self.game_window.clear() #fix #self.window.addstr(0, 0, "Select cards to keep (space selects/deselects a card)") self.game_window.addstr(10, 0, "Select cards to keep (space selects/deselects a card). esc to 离开") keeping = [True, True, True, True, True] if len(cards) > 3: keeping.append(True) index = 0 selected = 0 for card in cards: if keeping[index]: if index == selected: color = curses.color_pair(6) else: color = curses.color_pair(5) else: if index == selected: color = curses.color_pair(4) else: color = curses.color_pair(0) #self.text_window.addstr(0, index * 20, "{0:^19}".format(card.name[:19]), color) self.game_window.addstr(11, index * 15, "{0:^14}".format(card.name[:14]), color) index += 1 self.window.refresh() #self.text_window.refresh() ch = 0 while ch != 10 and ch != 27: ch = self.game_window.getch() if ch == curses.KEY_LEFT: selected -= 1 if selected < 0: selected = len(cards) - 1 if ch == curses.KEY_RIGHT: selected += 1 if selected == len(cards): selected = 0 if ch == 32: keeping[selected] = not keeping[selected] index = 0 for card in cards: if keeping[index]: if index == selected: color = curses.color_pair(6) else: color = curses.color_pair(5) else: if index == selected: color = curses.color_pair(4) else: color = curses.color_pair(0) #self.text_window.addstr(0, index * 20, "{0:^19}".format(card.name[:19]), color) self.game_window.addstr(11, index * 15, "{0:^14}".format(card.name[:14]), color) index += 1 self.game_window.refresh() #self.text_window.refresh() if ch == 27: #return None sys.exit(0) return keeping def choose_target(self, targets): if len(targets) is 0: return None renderer.targets = targets renderer.selected_target = renderer.targets[0] renderer.draw_game() self.window.addstr(0, 0, "Choose target") self.window.refresh() ch = 0 index = 0 while ch != 10 and ch != 27: ch = self.game_window.getch() if ch == curses.KEY_LEFT: index -= 1 if index < 0: index = len(renderer.targets) - 1 if ch == curses.KEY_RIGHT: index += 1 if index == len(renderer.targets): index = 0 renderer.selected_target = renderer.targets[index] renderer.draw_game() #fix self.window.addstr(0, 0, "Choose target") self.window.refresh() renderer.targets = None if ch == 27: return None return renderer.selected_target def choose_index(self, card, player): renderer.selection_index = 0 renderer.draw_game() self.window.addstr(0, 0, "Choose placement location") self.window.refresh() ch = 0 while ch != 10 and ch != 27: ch = self.game_window.getch() if ch == curses.KEY_LEFT: renderer.selection_index -= 1 if renderer.selection_index < 0: renderer.selection_index = len(player.minions) if ch == curses.KEY_RIGHT: renderer.selection_index += 1 if renderer.selection_index > len(player.minions): renderer.selection_index = 0 renderer.draw_game() self.window.refresh() index = renderer.selection_index renderer.selection_index = -1 if ch == 27: return -1 return index def choose_option(self, options, player): self.window.addstr(0, 0, "Choose option") index = 0 selected = 0 for option in options: if index == selected: color = curses.color_pair(4) else: color = curses.color_pair(3) if isinstance(option, Card): self.text_window.addstr(0, index * 20, "{0:^19}".format(option.name[:19]), color) else: self.text_window.addstr(0, index * 20, "{0:^19}".format(option.card.name[:19]), color) index += 1 self.window.refresh() self.text_window.refresh() ch = 0 while ch != 10 and ch != 27: ch = self.game_window.getch() if ch == curses.KEY_LEFT: starting_selected = selected selected -= 1 if selected < 0: selected = len(options) - 1 while not options[selected].can_choose(player) and selected != starting_selected: selected -= 1 if selected < 0: selected = len(options) - 1 if ch == curses.KEY_RIGHT: starting_selected = selected selected += 1 if selected == len(options): selected = 0 while not options[selected].can_choose(player) and selected != starting_selected: selected += 1 if selected == len(options): selected = 0 index = 0 for option in options: if index == selected: color = curses.color_pair(4) else: color = curses.color_pair(3) if isinstance(option, Card): self.text_window.addstr(0, index * 20, "{0:^19}".format(option.name[:19]), color) else: self.text_window.addstr(0, index * 20, "{0:^19}".format(option.card.name[:19]), color) index += 1 self.window.refresh() self.text_window.refresh() if ch == 27: return None return options[selected] def choose_agent(window): agents = registry.get_names() curses.init_pair(3, curses.COLOR_WHITE, curses.COLOR_BLUE) window.addstr(10, 34, "Choose agent---SEER DIMENSIONS WAR") ch = 0 selected = 0 while ch != 10 and ch != 27: index = 0 for agent in agents: if index == selected: color = curses.color_pair(3) else: color = curses.color_pair(0) window.addstr(index + 11, 25, "{:^30}".format(agent), color) index += 1 window.refresh() ch = window.getch() if ch == curses.KEY_UP: selected -= 1 if selected < 0: selected = len(agents) - 1 if ch == curses.KEY_DOWN: selected += 1 if selected == len(agents): selected = 0 window.clear() if ch == 27: sys.exit(0) else: return registry.create_agent(agents[selected]) #render_game stdscr.clear() #prompt_window = stdscr.derwin(1, 80, 23, 0) #text_window = stdscr.derwin(1, 80, 24, 0) game_window = stdscr prompt_window = stdscr.derwin(1, 80, 23, 0) text_window = stdscr.derwin(1, 80, 24, 0) #prompt_window = curses.newwin(1, 80, 21, 0) #text_window = curses.newwin(1, 80, 22, 0) agent = choose_agent(stdscr) #deck1 = load_deck(sys.argv[1]) #deck2 = load_deck(sys.argv[2]) deck1 = load_deck('example.hsdeck') deck2 = load_deck('example.hsdeck') #game = Game([deck1, deck2], [TextAgent(stdscr, prompt_window, text_window), agent]) game = Game([deck1, deck2], [TextAgent(game_window, prompt_window, text_window), agent]) if game.first_player == 0: renderer = GameRender(stdscr, game, game.players[0]) else: renderer = GameRender(stdscr, game, game.players[1]) game.start() #render game end if __name__ == "__main__": #if len(sys.argv) < 3: # print_usage() # sys.exit() curses.wrapper(render_game)
import React from "react"; import { BrowserRouter as Router, Route, Switch } from "react-router-dom"; import Navbar from "./components/Navbar" import Footer from "./components/Footer" import Home from "./components/Home" import Disturbing from "./components/Disturbing" import Great from "./components/Great" import Bad from "./components/Bad" import Faces from "./components/Faces" import Slasher from "./components/Slasher" import Black from "./components/Black" import Century from "./components/Century" import "./App.css"; function App() { return ( <div className="App"> <Router> <Navbar /> <Switch> <Route exact path={["/", "/home"]}> <Home /> </Route> <Route path="/disturbing"> <Disturbing /> </Route> <Route path="/greathorror"> <Great /> </Route> <Route path="/badhorror"> <Bad /> </Route> <Route path="/facesofdeath"> <Faces /> </Route> <Route path="/slashers"> <Slasher /> </Route> <Route path="/blackcomedies"> <Black /> </Route> <Route path="/21sthorror"> <Century /> </Route> </Switch> <Footer /> </Router> </div> ); } export default App;
function tickets(input, criteria) { let result = []; class Ticket { constructor(destination, price, status) { this.destination = destination; this.price = price; this.status = status; } } for (let line of input) { let [destination, price, status] = line.split("|"); price = +price; result.push(new Ticket(destination, price, status)); } return result.sort((a, b) => sortingByCriteria(a, b)); function sortingByCriteria(a, b) { let first = a[criteria]; let second = b[criteria]; if (criteria !== "price") { return first.localeCompare(second); } return first - second; } } console.log(tickets(['Philadelphia|94.20|available', 'New York City|95.99|available', 'New York City|95.99|sold', 'Boston|126.20|departed'], 'status' ));
const baseAPI = Cypress.env('REACT_APP_API_URL'); describe('superadmin should be assigned all roles by default', () => { before(() => { cy.server(); cy.route('GET', `${baseAPI}/user/roles/10948?&page=1`, 'fixture:roles/superAdminUsers'); cy.route('PUT', `${baseAPI}/user/role/update`, 'fixture:roles/addSuperadmin'); cy.authenticateUser(); cy.visit('/settings/roles/10948').wait(2000); }); after(() => { cy.server(); cy.route('GET', `${baseAPI}/user/roles/10948?&page=1`, 'fixture:roles/updatedSuperAdminUsers'); cy.authenticateUser(); cy.visit('/settings/roles/10948'); }); it('should assign superadmin all centers', () => { cy.get('.action-btn') .should('be.visible') .click({force:true}); cy.get('.modal--add-user').should('be.visible'); cy.get('[style="padding-top: 14px;"] > .form-input > [style="position: relative;"] > .value > .occupationInput').type('Bolton.Opondo@andela.com'); cy.get('#submit').click(); cy.get('.toast-message') .contains('User has been added as a\n' + ' super administrator'); }); }); describe('Added superadmin should have all five centers', () => { it('should show a list of added users', () => { cy.get('.bb-md-0').contains('Name'); cy.get('.role-user__name').contains('Bolton Otieno'); cy.get('.pl-sm-100d').contains('Center'); cy.get('.pl-sm-120').contains('5'); }); });
import React from 'react'; import config from '../../config'; import { twitterPageURL } from '../../util/urlHelpers'; import { StaticPage, TopbarContainer } from '../../containers'; import { LayoutSingleColumn, LayoutWrapperTopbar, LayoutWrapperMain, LayoutWrapperFooter, Footer, ExternalLink, } from '../../components'; import css from './AboutPage.css'; import image from './about-us-1056.jpg'; const AboutPage = () => { const { siteTwitterHandle, siteFacebookPage } = config; const siteTwitterPage = twitterPageURL(siteTwitterHandle); // prettier-ignore return ( <StaticPage title="About Us" schema={{ '@context': 'http://schema.org', '@type': 'AboutPage', description: 'About EqpMe Marketplace', name: 'About page', }} > <LayoutSingleColumn> <LayoutWrapperTopbar> <TopbarContainer /> </LayoutWrapperTopbar> <LayoutWrapperMain className={css.staticPageWrapper}> <h1 className={css.pageTitle}>Experience a new way to rent machinery.</h1> <img className={css.coverImage} src={image} alt="My first ice cream." /> <div className={css.contentWrapper}> <div className={css.contentSide}> <p>Did you know the average EpqMe customer save 20% when using our marketplace instead of traditinal rental companies!</p> </div> <div className={css.contentMain}> <h2> Most of the Finnish saunas are located at the homes of individuals - indeed, most people in Finland live in an apartment with sauna in it. In addition, lots of people have lakeside summer cottages, which also typically come with a separate sauna building near the waterfront. </h2> <p> To truly experience a Finnish sauna, you need to look beyond the public saunas, and instead visit a real home or cottage sauna. Saunatime makes this possible for everyone. All our saunas are owned by individuals willing to let tourists and other curious visitors to enter their sacred spaces. </p> <h3 className={css.subtitle}>Are you a sauna owner?</h3> <p> Saunatime offers you a good way to earn some extra cash! If you're not using your sauna every evening, why not rent it to other people while it's free. And even if you are using your sauna every evening (we understand, it's so good), why not invite other people to join you when the sauna is already warm! A shared sauna experience is often a more fulfilling one. </p> <h3 id="contact" className={css.subtitle}> Create your own marketplace like Saunatime </h3> <p> Saunatime is brought to you by the good folks at{' '} <ExternalLink href="http://sharetribe.com">Sharetribe</ExternalLink>. Would you like to create your own marketplace platform a bit like Saunatime? Or perhaps a mobile app? With Sharetribe it's really easy. If you have a marketplace idea in mind, do get in touch! </p> <p> You can also checkout our{' '} <ExternalLink href={siteFacebookPage}>Facebook</ExternalLink> and{' '} <ExternalLink href={siteTwitterPage}>Twitter</ExternalLink>. </p> </div> </div> </LayoutWrapperMain> <LayoutWrapperFooter> <Footer /> </LayoutWrapperFooter> </LayoutSingleColumn> </StaticPage> ); }; export default AboutPage;
module.exports = { rules: { // enforce line breaks after opening and before closing array brackets // https://eslint.org/docs/rules/array-bracket-newline // TODO: enable? semver-major 'array-bracket-newline': ['off', 'consistent'], // object option alternative: { multiline: true, minItems: 3 } // enforce line breaks between array elements // https://eslint.org/docs/rules/array-element-newline // TODO: enable? semver-major 'array-element-newline': ['off', { multiline: true, minItems: 3 }], // enforce spacing inside array brackets 'array-bracket-spacing': ['error', 'never'], // enforce spacing inside single-line blocks // https://eslint.org/docs/rules/block-spacing 'block-spacing': ['error', 'always'], // enforce one true brace style 'brace-style': ['error', '1tbs', { allowSingleLine: true }], // require camel case names camelcase: ['error', { properties: 'never', ignoreDestructuring: false }], // enforce or disallow capitalization of the first letter of a comment // https://eslint.org/docs/rules/capitalized-comments 'capitalized-comments': ['off', 'never', { line: { ignorePattern: '.*', ignoreInlineComments: true, ignoreConsecutiveComments: true, }, block: { ignorePattern: '.*', ignoreInlineComments: true, ignoreConsecutiveComments: true, }, }], // require trailing commas in multiline object literals 'comma-dangle': ['error', { arrays: 'never', objects: 'never', imports: 'never', exports: 'never', functions: 'never', }], // enforce spacing before and after comma 'comma-spacing': ['error', { before: false, after: true }], // enforce one true comma style 'comma-style': ['error', 'last', { exceptions: { ArrayExpression: false, ArrayPattern: false, ArrowFunctionExpression: false, CallExpression: false, FunctionDeclaration: false, FunctionExpression: false, ImportDeclaration: false, ObjectExpression: false, ObjectPattern: false, VariableDeclaration: false, NewExpression: false, } }], // disallow padding inside computed properties 'computed-property-spacing': ['error', 'never'], // enforces consistent naming when capturing the current execution context 'consistent-this': 'off', // enforce newline at the end of file, with no multiple empty lines 'eol-last': ['error', 'always'], // https://eslint.org/docs/rules/function-call-argument-newline // TODO: enable, semver-minor, once eslint v6.2 is required (which is a major) 'function-call-argument-newline': ['off', 'consistent'], // enforce spacing between functions and their invocations // https://eslint.org/docs/rules/func-call-spacing 'func-call-spacing': ['error', 'never'], // requires function names to match the name of the variable or property to which they are // assigned // https://eslint.org/docs/rules/func-name-matching 'func-name-matching': ['off', 'always', { includeCommonJSModuleExports: false, considerPropertyDescriptor: true, }], // require function expressions to have a name // https://eslint.org/docs/rules/func-names 'func-names': 'warn', // enforces use of function declarations or expressions // https://eslint.org/docs/rules/func-style // TODO: enable 'func-style': ['off', 'expression'], // enforce consistent line breaks inside function parentheses // https://eslint.org/docs/rules/function-paren-newline 'function-paren-newline': ['error', 'consistent'], // Blacklist certain identifiers to prevent them being used // https://eslint.org/docs/rules/id-blacklist // TODO: semver-major, remove once eslint v7.4+ is required 'id-blacklist': 'off', // disallow specified identifiers // https://eslint.org/docs/rules/id-denylist 'id-denylist': 'off', // this option enforces minimum and maximum identifier lengths // (variable names, property names etc.) 'id-length': 'off', // require identifiers to match the provided regular expression 'id-match': 'off', // Enforce the location of arrow function bodies with implicit returns // https://eslint.org/docs/rules/implicit-arrow-linebreak 'implicit-arrow-linebreak': ['error', 'beside'], // this option sets a specific tab width for your code // https://eslint.org/docs/rules/indent indent: ['error', 2, { SwitchCase: 1, VariableDeclarator: 1, outerIIFEBody: 1, // MemberExpression: null, FunctionDeclaration: { parameters: 1, body: 1 }, FunctionExpression: { parameters: 1, body: 1 }, CallExpression: { arguments: 1 }, ArrayExpression: 1, ObjectExpression: 1, ImportDeclaration: 1, flatTernaryExpressions: false, // list derived from https://github.com/benjamn/ast-types/blob/HEAD/def/jsx.js ignoredNodes: ['JSXElement', 'JSXElement > *', 'JSXAttribute', 'JSXIdentifier', 'JSXNamespacedName', 'JSXMemberExpression', 'JSXSpreadAttribute', 'JSXExpressionContainer', 'JSXOpeningElement', 'JSXClosingElement', 'JSXFragment', 'JSXOpeningFragment', 'JSXClosingFragment', 'JSXText', 'JSXEmptyExpression', 'JSXSpreadChild'], ignoreComments: false }], // specify whether double or single quotes should be used in JSX attributes // https://eslint.org/docs/rules/jsx-quotes 'jsx-quotes': ['off', 'prefer-double'], // enforces spacing between keys and values in object literal properties 'key-spacing': ['error', { beforeColon: false, afterColon: true }], // require a space before & after certain keywords 'keyword-spacing': ['error', { before: true, after: true, overrides: { return: { after: true }, throw: { after: true }, case: { after: true } } }], // enforce position of line comments // https://eslint.org/docs/rules/line-comment-position // TODO: enable? 'line-comment-position': ['off', { position: 'above', ignorePattern: '', applyDefaultPatterns: true, }], // disallow mixed 'LF' and 'CRLF' as linebreaks // https://eslint.org/docs/rules/linebreak-style 'linebreak-style': ['error', 'unix'], // require or disallow an empty line between class members // https://eslint.org/docs/rules/lines-between-class-members 'lines-between-class-members': ['error', 'always', { exceptAfterSingleLine: false }], // enforces empty lines around comments 'lines-around-comment': 'off', // require or disallow newlines around directives // https://eslint.org/docs/rules/lines-around-directive 'lines-around-directive': ['error', { before: 'always', after: 'always', }], // specify the maximum depth that blocks can be nested 'max-depth': ['off', 4], // specify the maximum length of a line in your program // https://eslint.org/docs/rules/max-len 'max-len': ['error', 100, 2, { ignoreUrls: true, ignoreComments: false, ignoreRegExpLiterals: true, ignoreStrings: true, ignoreTemplateLiterals: true, }], // specify the max number of lines in a file // https://eslint.org/docs/rules/max-lines 'max-lines': ['error', { max: 300, skipBlankLines: true, skipComments: true }], // enforce a maximum function length // https://eslint.org/docs/rules/max-lines-per-function 'max-lines-per-function': ['error', { max: 50, skipBlankLines: true, skipComments: true, IIFEs: true, }], // specify the maximum depth callbacks can be nested 'max-nested-callbacks': ['error', 4], // limits the number of parameters that can be used in the function declaration. 'max-params': ['off', 3], // specify the maximum number of statement allowed in a function 'max-statements': ['off', 10], // restrict the number of statements per line // https://eslint.org/docs/rules/max-statements-per-line 'max-statements-per-line': ['error', { max: 1 }], // enforce a particular style for multiline comments // https://eslint.org/docs/rules/multiline-comment-style 'multiline-comment-style': ['off', 'starred-block'], // require multiline ternary // https://eslint.org/docs/rules/multiline-ternary // TODO: enable? 'multiline-ternary': ['off', 'never'], // require a capital letter for constructors 'new-cap': ['error', { newIsCap: true, newIsCapExceptions: [], capIsNew: false, capIsNewExceptions: ['Immutable.Map', 'Immutable.Set', 'Immutable.List'], }], // disallow the omission of parentheses when invoking a constructor with no arguments // https://eslint.org/docs/rules/new-parens 'new-parens': 'error', // allow/disallow an empty newline after var statement 'newline-after-var': 'off', // https://eslint.org/docs/rules/newline-before-return 'newline-before-return': 'off', // enforces new line after each method call in the chain to make it // more readable and easy to maintain // https://eslint.org/docs/rules/newline-per-chained-call 'newline-per-chained-call': ['error', { ignoreChainWithDepth: 4 }], // disallow use of the Array constructor 'no-array-constructor': 'error', // disallow use of bitwise operators // https://eslint.org/docs/rules/no-bitwise 'no-bitwise': 'error', // disallow use of the continue statement // https://eslint.org/docs/rules/no-continue 'no-continue': 'error', // disallow comments inline after code 'no-inline-comments': 'off', // disallow if as the only statement in an else block // https://eslint.org/docs/rules/no-lonely-if 'no-lonely-if': 'error', // disallow un-paren'd mixes of different operators // https://eslint.org/docs/rules/no-mixed-operators 'no-mixed-operators': ['error', { // the list of arithmetic groups disallows mixing `%` and `**` // with other arithmetic operators. groups: [ ['%', '**'], ['%', '+'], ['%', '-'], ['%', '*'], ['%', '/'], ['/', '*'], ['&', '|', '<<', '>>', '>>>'], ['==', '!=', '===', '!=='], ['&&', '||'], ], allowSamePrecedence: false }], // disallow mixed spaces and tabs for indentation 'no-mixed-spaces-and-tabs': 'error', // disallow use of chained assignment expressions // https://eslint.org/docs/rules/no-multi-assign 'no-multi-assign': ['error'], // disallow multiple empty lines, only one newline at the end, and no new lines at the beginning // https://eslint.org/docs/rules/no-multiple-empty-lines 'no-multiple-empty-lines': ['error', { max: 1, maxBOF: 0, maxEOF: 0 }], // disallow negated conditions // https://eslint.org/docs/rules/no-negated-condition 'no-negated-condition': 'off', // disallow nested ternary expressions 'no-nested-ternary': 'error', // disallow use of the Object constructor 'no-new-object': 'error', // disallow use of unary operators, ++ and -- // https://eslint.org/docs/rules/no-plusplus 'no-plusplus': 'error', // disallow certain syntax forms // https://eslint.org/docs/rules/no-restricted-syntax 'no-restricted-syntax': [ 'error', { selector: 'ForInStatement', message: 'for..in loops iterate over the entire prototype chain, which is virtually never what you want. Use Object.{keys,values,entries}, and iterate over the resulting array.', }, { selector: 'ForOfStatement', message: 'iterators/generators require regenerator-runtime, which is too heavyweight for this guide to allow them. Separately, loops should be avoided in favor of array iterations.', }, { selector: 'LabeledStatement', message: 'Labels are a form of GOTO; using them makes code confusing and hard to maintain and understand.', }, { selector: 'WithStatement', message: '`with` is disallowed in strict mode because it makes code impossible to predict and optimize.', }, ], // disallow space between function identifier and application 'no-spaced-func': 'error', // disallow tab characters entirely 'no-tabs': 'error', // disallow the use of ternary operators 'no-ternary': 'off', // disallow trailing whitespace at the end of lines 'no-trailing-spaces': ['error', { skipBlankLines: false, ignoreComments: false, }], // disallow dangling underscores in identifiers // https://eslint.org/docs/rules/no-underscore-dangle 'no-underscore-dangle': ['error', { allow: [], allowAfterThis: false, allowAfterSuper: false, enforceInMethodNames: true, }], // disallow the use of Boolean literals in conditional expressions // also, prefer `a || b` over `a ? a : b` // https://eslint.org/docs/rules/no-unneeded-ternary 'no-unneeded-ternary': ['error', { defaultAssignment: false }], // disallow whitespace before properties // https://eslint.org/docs/rules/no-whitespace-before-property 'no-whitespace-before-property': 'error', // enforce the location of single-line statements // https://eslint.org/docs/rules/nonblock-statement-body-position 'nonblock-statement-body-position': ['error', 'beside', { overrides: {} }], // require padding inside curly braces 'object-curly-spacing': ['error', 'always'], // enforce line breaks between braces // https://eslint.org/docs/rules/object-curly-newline 'object-curly-newline': ['error', { ObjectExpression: { minProperties: 4, multiline: true, consistent: true }, ObjectPattern: { minProperties: 4, multiline: true, consistent: true }, ImportDeclaration: { minProperties: 4, multiline: true, consistent: true }, ExportDeclaration: { minProperties: 4, multiline: true, consistent: true }, }], // enforce "same line" or "multiple line" on object properties. // https://eslint.org/docs/rules/object-property-newline 'object-property-newline': ['error', { allowAllPropertiesOnSameLine: true, }], // allow just one var statement per function 'one-var': ['error', 'never'], // require a newline around variable declaration // https://eslint.org/docs/rules/one-var-declaration-per-line 'one-var-declaration-per-line': ['error', 'always'], // require assignment operator shorthand where possible or prohibit it entirely // https://eslint.org/docs/rules/operator-assignment 'operator-assignment': ['error', 'always'], // Requires operator at the beginning of the line in multiline statements // https://eslint.org/docs/rules/operator-linebreak 'operator-linebreak': ['error', 'before', { overrides: { '=': 'none' } }], // disallow padding within blocks 'padded-blocks': ['error', { blocks: 'never', classes: 'never', switches: 'never', }, { allowSingleLineBlocks: true, }], // Require or disallow padding lines between statements // https://eslint.org/docs/rules/padding-line-between-statements 'padding-line-between-statements': 'off', // Disallow the use of Math.pow in favor of the ** operator // https://eslint.org/docs/rules/prefer-exponentiation-operator // TODO: enable, semver-major when eslint 5 is dropped 'prefer-exponentiation-operator': 'off', // Prefer use of an object spread over Object.assign // https://eslint.org/docs/rules/prefer-object-spread 'prefer-object-spread': 'error', // require quotes around object literal property names // https://eslint.org/docs/rules/quote-props.html 'quote-props': ['error', 'as-needed', { keywords: false, unnecessary: true, numbers: false }], // specify whether double or single quotes should be used quotes: ['error', 'single', { avoidEscape: true }], // do not require jsdoc // https://eslint.org/docs/rules/require-jsdoc 'require-jsdoc': 'off', // require or disallow use of semicolons instead of ASI semi: ['error', 'never'], // enforce spacing before and after semicolons 'semi-spacing': ['error', { before: false, after: true }], // Enforce location of semicolons // https://eslint.org/docs/rules/semi-style 'semi-style': ['error', 'last'], // requires object keys to be sorted 'sort-keys': ['off', 'asc', { caseSensitive: false, natural: true }], // sort variables within the same declaration block 'sort-vars': 'off', // require or disallow space before blocks 'space-before-blocks': 'error', // require or disallow space before function opening parenthesis // https://eslint.org/docs/rules/space-before-function-paren 'space-before-function-paren': ['error', { anonymous: 'always', named: 'never', asyncArrow: 'always' }], // require or disallow spaces inside parentheses 'space-in-parens': ['error', 'never'], // require spaces around operators 'space-infix-ops': 'error', // Require or disallow spaces before/after unary operators // https://eslint.org/docs/rules/space-unary-ops 'space-unary-ops': ['error', { words: true, nonwords: false, overrides: { }, }], // require or disallow a space immediately following the // or /* in a comment // https://eslint.org/docs/rules/spaced-comment 'spaced-comment': ['error', 'always', { line: { exceptions: ['-', '+'], markers: ['=', '!', '/'], // space here to support sprockets directives, slash for TS /// comments }, block: { exceptions: ['-', '+'], markers: ['=', '!', ':', '::'], // space here to support sprockets directives and flow comment types balanced: true, } }], // Enforce spacing around colons of switch statements // https://eslint.org/docs/rules/switch-colon-spacing 'switch-colon-spacing': ['error', { after: true, before: false }], // Require or disallow spacing between template tags and their literals // https://eslint.org/docs/rules/template-tag-spacing 'template-tag-spacing': ['error', 'never'], // require or disallow the Unicode Byte Order Mark // https://eslint.org/docs/rules/unicode-bom 'unicode-bom': ['error', 'never'], // require regex literals to be wrapped in parentheses 'wrap-regex': 'off' } };
const webpack = require('webpack'); const CleanWebpackPlugin = require('clean-webpack-plugin'); const ChunkHashReplacePlugin = require('chunkhash-replace-webpack-plugin'); const CopyWebpackPlugin = require('copy-webpack-plugin'); exports.devServer = function (options) { return { devServer: { watchOptions: { // Delay the rebuild after the first change” aggregateTimeout: 300, poll: 1000 }, // Enable history API fallback so HTML5 History API based // routing works. This is a good default that will come // in handy in more complicated setups. historyApiFallback: true, // Unlike the cli flag, this doesn't set // HotModuleReplacementPlugin! hot: true, inline: true, // Display only errors to reduce the amount of output. stats: 'errors-only', // Parse host and port from env to allow customization. // // If you use Vagrant or Cloud9, set // host: options.host || '0.0.0.0'; // // 0.0.0.0 is available to all network devices // unlike default `localhost`. host: options.host, // Defaults to `localhost` port: options.port // Defaults to 8080 }, plugins: [ // Enable multi-pass compilation for enhanced performance // in larger projects. Good default. new webpack.HotModuleReplacementPlugin({ multiStep: true }) ] }; } exports.loadImages = function (paths) { return { module: { rules: [ { test: /\.(jpe?g|png|gif|svg)/i, use: ['file-loader'], include: paths } ] } } }; exports.loadFonts = function() { return { module: { rules: [ { test: /\.woff(2)?(\?v=[0-9]\.[0-9]\.[0-9])?$/, use: 'url-loader', query: { limit: 100000, mimetype: 'application/font-woff' } }, { test: /\.(ttf|eot|svg)(\?v=[0-9]\.[0-9]\.[0-9])?$/, use: 'file-loader' } ] } } } exports.loadCSS = function (paths) { return { module: { rules: [ { test: /\.css$/, use: [ 'style-loader', 'css-loader' ] } ] } }; } exports.loadSass = function () { return { module: { rules: [ { test: /\.scss$/, use: [ { loader: 'style-loader', options: {sourceMap: true} }, { loader: 'css-loader', options: {sourceMap: true} }, { loader: 'sass-loader', options: {sourceMap: true} } ] } ] } }; } exports.extractBundle = function(options) { const entry = {}; entry[options.name] = options.entries; return { // Define an entry point needed for splitting. entry: entry, plugins: [ // Extract bundle and manifest files. Manifest is // needed for reliable caching. new webpack.optimize.CommonsChunkPlugin({ names: [options.name, 'manifest'] }) ] }; } exports.clean = function(path) { return { plugins: [ new CleanWebpackPlugin([path], { // Without `root` CleanWebpackPlugin won't point to our // project and will fail to work. root: process.cwd(), exclude: ['firebaseui.css', 'style.css', 'w3.css'] }) ] }; } exports.chunkHashReplace = function(src, dest) { return { plugins: [ new ChunkHashReplacePlugin({ src: src, dest: dest, }) ] } }; exports.deployStaticFiles = function(src, dest) { return { plugins: [ new CopyWebpackPlugin([ {from: src, to: dest} ]) ] }; } exports.loadTypescript = function() { return { module: { rules: [ { test: /\.ts(x?)$/, exclude: 'node_modules', use: ['ts-loader'] }, { // All output '.js' files will have any sourcemaps re-processed by 'source-map-loader'. test: /\.js$/, enforce: 'pre', loader: 'source-map-loader' } ] } }; };
import React, { Component } from 'react'; import { connect } from 'react-redux'; import { getLots } from '../actions'; import LotItem from '../widgetsUI/lot_item'; class HomeContainer extends Component { componentWillMount(){ this.props.dispatch(getLots(1,0,'desc')) } renderItems = (lots) => ( lots.list ? lots.list.map( item => ( <LotItem {...item} key={item._id}/> )) :null ) loadmore = () => { let count = this.props.lots.list.length; this.props.dispatch(getLots(1,count,'desc',this.props.lots.list)) } render() { return ( <div> {this.renderItems(this.props.lots)} <div className="loadmore" onClick={this.loadmore} >Load More</div> </div> ); } } function mapStateToProps(state){ return { lots:state.lots } } export default connect(mapStateToProps)(HomeContainer)
#!/usr/bin/env python3 # Copyright (c) 2014-2019 The aRIA Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Linux network utilities. Roughly based on http://voorloopnul.com/blog/a-python-netstat-in-less-than-100-lines-of-code/ by Ricardo Pascal """ import sys import socket import struct import array import os from binascii import unhexlify # STATE_ESTABLISHED = '01' # STATE_SYN_SENT = '02' # STATE_SYN_RECV = '03' # STATE_FIN_WAIT1 = '04' # STATE_FIN_WAIT2 = '05' # STATE_TIME_WAIT = '06' # STATE_CLOSE = '07' # STATE_CLOSE_WAIT = '08' # STATE_LAST_ACK = '09' STATE_LISTEN = '0A' # STATE_CLOSING = '0B' def get_socket_inodes(pid): ''' Get list of socket inodes for process pid. ''' base = '/proc/%i/fd' % pid inodes = [] for item in os.listdir(base): target = os.readlink(os.path.join(base, item)) if target.startswith('socket:'): inodes.append(int(target[8:-1])) return inodes def _remove_empty(array): return [x for x in array if x !=''] def _convert_ip_port(array): host,port = array.split(':') # convert host from mangled-per-four-bytes form as used by kernel host = unhexlify(host) host_out = '' for x in range(0, len(host) // 4): (val,) = struct.unpack('=I', host[x*4:(x+1)*4]) host_out += '%08x' % val return host_out,int(port,16) def netstat(typ='tcp'): ''' Function to return a list with status of tcp connections at linux systems To get pid of all network process running on system, you must run this script as superuser ''' with open('/proc/net/'+typ,'r',encoding='utf8') as f: content = f.readlines() content.pop(0) result = [] for line in content: line_array = _remove_empty(line.split(' ')) # Split lines and remove empty spaces. tcp_id = line_array[0] l_addr = _convert_ip_port(line_array[1]) r_addr = _convert_ip_port(line_array[2]) state = line_array[3] inode = int(line_array[9]) # Need the inode to match with process pid. nline = [tcp_id, l_addr, r_addr, state, inode] result.append(nline) return result def get_bind_addrs(pid): ''' Get bind addresses as (host,port) tuples for process pid. ''' inodes = get_socket_inodes(pid) bind_addrs = [] for conn in netstat('tcp') + netstat('tcp6'): if conn[3] == STATE_LISTEN and conn[4] in inodes: bind_addrs.append(conn[1]) return bind_addrs # from: http://code.activestate.com/recipes/439093/ def all_interfaces(): ''' Return all interfaces that are up ''' import fcntl # Linux only, so only import when required is_64bits = sys.maxsize > 2**32 struct_size = 40 if is_64bits else 32 s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) max_possible = 8 # initial value while True: bytes = max_possible * struct_size names = array.array('B', b'\0' * bytes) outbytes = struct.unpack('iL', fcntl.ioctl( s.fileno(), 0x8912, # SIOCGIFCONF struct.pack('iL', bytes, names.buffer_info()[0]) ))[0] if outbytes == bytes: max_possible *= 2 else: break namestr = names.tobytes() return [(namestr[i:i+16].split(b'\0', 1)[0], socket.inet_ntoa(namestr[i+20:i+24])) for i in range(0, outbytes, struct_size)] def addr_to_hex(addr): ''' Convert string IPv4 or IPv6 address to binary address as returned by get_bind_addrs. Very naive implementation that certainly doesn't work for all IPv6 variants. ''' if '.' in addr: # IPv4 addr = [int(x) for x in addr.split('.')] elif ':' in addr: # IPv6 sub = [[], []] # prefix, suffix x = 0 addr = addr.split(':') for i,comp in enumerate(addr): if comp == '': if i == 0 or i == (len(addr)-1): # skip empty component at beginning or end continue x += 1 # :: skips to suffix assert x < 2 else: # two bytes per component val = int(comp, 16) sub[x].append(val >> 8) sub[x].append(val & 0xff) nullbytes = 16 - len(sub[0]) - len(sub[1]) assert (x == 0 and nullbytes == 0) or (x == 1 and nullbytes > 0) addr = sub[0] + ([0] * nullbytes) + sub[1] else: raise ValueError('Could not parse address %s' % addr) return bytearray(addr).hex() def test_ipv6_local(): ''' Check for (local) IPv6 support. ''' import socket # By using SOCK_DGRAM this will not actually make a connection, but it will # fail if there is no route to IPv6 localhost. have_ipv6 = True try: s = socket.socket(socket.AF_INET6, socket.SOCK_DGRAM) s.connect(('::1', 0)) except socket.error: have_ipv6 = False return have_ipv6
export const dataFormat = (name, arr) => { return { user: name, LT3words: arr.filter(message => { return message.text.split(' ').length <= 3 }).length, LT3wordsColor: 'hsl(165, 70%, 50%)', noTone: arr.filter(message => { return message.text.split(' ').length > 3 && !message.score }).length, noToneColor: 'hsl(263, 70%, 50%)', sad: arr.filter(message => { return ( message.text.split(' ').length > 3 && message.score && message.tone_id === 'sad' ) }).length, sadColor: 'hsl(230, 70%, 50%)', frustrated: arr.filter(message => { return ( message.text.split(' ').length > 3 && message.score && message.tone_id === 'frustrated' ) }).length, frustratedColor: 'hsl(334, 70%, 50%)', satisfied: arr.filter(message => { return ( message.text.split(' ').length > 3 && message.score && message.tone_id === 'satisfied' ) }).length, satisfiedColor: 'hsl(116, 70%, 50%)', excited: arr.filter(message => { return ( message.text.split(' ').length > 3 && message.score && message.tone_id === 'excited' ) }).length, excitedColor: 'hsl(301, 70%, 50%)', polite: arr.filter(message => { return ( message.text.split(' ').length > 3 && message.score && message.tone_id === 'polite' ) }).length, impolite: arr.filter(message => { return ( message.text.split(' ').length > 3 && message.score && message.tone_id === 'impolite' ) }).length, impoliteColor: 'hsl(1, 70%, 50%)', sympathetic: arr.filter(message => { return ( message.text.split(' ').length > 3 && message.score && message.tone_id === 'sympathetic' ) }).length, sympatheticColor: 'hsl(60, 70%, 50%)' } } export function compare(a, b) { // Use toUpperCase() to ignore character casing const totalA = a.LT3words + a.noTone + a.excited + a.frustrated + a.impolite + a.polite + a.sad + a.satisfied + a.sympathetic const totalB = b.LT3words + b.noTone + b.excited + b.frustrated + b.impolite + b.polite + b.sad + b.satisfied + b.sympathetic let comparison = 0 if (totalA > totalB) { comparison = -1 } else if (totalA < totalB) { comparison = 1 } return comparison }
/** * @license Apache-2.0 * * Copyright (c) 2018 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ 'use strict'; // MODULES // var isString = require( '@stdlib/assert/is-string' ).isPrimitive; var isNonNegativeInteger = require( '@stdlib/assert/is-nonnegative-integer' ).isPrimitive; var prevGraphemeClusterBreak = require( '@stdlib/string/prev-grapheme-cluster-break' ); // MAIN // /** * Removes the last character(s) of a string. * * @param {string} str - input string * @param {NonNegativeInteger} [n=1] - number of character to remove * @throws {TypeError} must provide a string primitive * @throws {TypeError} second argument must be a nonnegative integer * @returns {string} updated string * * @example * var out = removeLast( 'last man standing' ); * // returns 'last man standin' * * @example * var out = removeLast( 'presidential election' ); * // returns 'presidential electio' * * @example * var out = removeLast( 'javaScript' ); * // returns 'javaScrip' * * @example * var out = removeLast( 'Hidden Treasures' ); * // returns 'Hidden Treasure' * * @example * var out = removeLast( 'leader', 2 ); * // returns 'lead' */ function removeLast( str, n ) { var i; if ( !isString( str ) ) { throw new TypeError( 'invalid argument. First argument must be a string primitive. Value: `' + str + '`.' ); } if ( str === '' ) { return ''; } if ( arguments.length > 1 ) { if ( !isNonNegativeInteger( n ) ) { throw new TypeError( 'invalid argument. Second argument must be a nonnegative integer. Value: `' + n + '`.' ); } if ( n === 0 ) { return str; } i = str.length - 1; while ( n > 0 ) { i = prevGraphemeClusterBreak( str, i ); n -= 1; } return str.substring( 0, i + 1 ); } return str.substring( 0, prevGraphemeClusterBreak( str, str.length-1 ) + 1 ); // eslint-disable-line max-len } // EXPORTS // module.exports = removeLast;
import logging from collections import OrderedDict from typing import Dict, List import tornado.gen import tornado.ioloop import tornado.options from cachetools import TTLCache, cached from aqua_monitor import chat, clients tornado.options.define('history-days', default=7, type=int, help='Number of days of history to save') logger = logging.getLogger('tornado.general') class Supervisor: def __init__(self, interval: float): """init Parameters ---------- interval Update interval in seconds """ super().__init__() self.interval = interval self.jetri = clients.Jetri() self.live_monitors: Dict[str, Monitor] = OrderedDict() self.groupers = chat.Grouper.load() tornado.options.options.archives_dir.mkdir(exist_ok=True) async def update(self, current_ioloop: tornado.ioloop.IOLoop = None): """Periodic update of overall app state Checks for new lives, prunes old ones and adds them to the archives, and refreshes groupers Parameters ---------- current_ioloop The IOLoop to use for this process and when spawning monitor processes """ if current_ioloop is None: current_ioloop = tornado.ioloop.IOLoop.current() logger.info('[Begin supervisor update]') # Refresh groupers new_groupers = chat.Grouper.load() if new_groupers != self.groupers: for monitor in self.live_monitors.values(): monitor.report.set_groupers(new_groupers) self.groupers = new_groupers # Clean up terminated monitors (including those that terminated with an error) to_delete = [] for video_id, monitor in self.live_monitors.items(): if not monitor.is_running: to_delete.append(video_id) logger.info(f'Removing {len(to_delete)} stopped monitors') for video_id in to_delete: del self.live_monitors[video_id] # Refresh currently live list and find lives to start and terminate await self.jetri.update() currently_live = set(self.jetri.currently_live) currently_monitored = set(self.live_monitors.keys()) new_lives = currently_live - currently_monitored stopped_lives = currently_monitored - currently_live # Start new lives for video_id in new_lives: info = self.jetri.get_live_info(video_id) report = chat.LiveReport(info) report.set_groupers(self.groupers) monitor = clients.Monitor(info, report) monitor.start(current_ioloop) self.live_monitors[video_id] = monitor logger.info(f'Started {len(new_lives)} new monitors') # Send terminate signal to finished lives and move reports to archives for video_id in stopped_lives: monitor = self.live_monitors[video_id] monitor.terminate() logger.info(f'Terminated {len(stopped_lives)} monitors') logger.info('[End supervisor update]') @cached(TTLCache(1, 5)) def live_json(self) -> dict: """JSON object containing reports of all currently live streams""" return {'reports': [monitor.report.json() for monitor in self.live_monitors.values() if monitor.is_running]} def start(self, current_ioloop: tornado.ioloop.IOLoop): """Begin update loop""" async def update_loop(): while True: try: await self.update(current_ioloop) except Exception as e: error_name = type(e).__name__ logger.exception(f'Exception in supervisor update ({error_name})') await tornado.gen.sleep(self.interval) current_ioloop.add_callback(update_loop)
const { singleQuery } = require('../../baseQueries'); const getUserWatchList = async ({ userId }) => { const queryText = ` SELECT issues.id, issues.modified_date AS "modifiedDate", issues.name, issues.funded_amount AS "fundedAmount" FROM watching JOIN issues ON watching.issue_id = issues.id WHERE watching.user_id = $1 AND issues.is_deleted = false `; const { rows } = await singleQuery({ queryText, values: [userId] }); return rows; }; module.exports = getUserWatchList;
/* * /MathJax/localization/ru/MathML.js * * Copyright (c) 2009-2016 The MathJax Consortium * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ MathJax.Localization.addTranslation("ru","MathML",{version:"2.7.0",isLoaded:true,strings:{BadMglyph:"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 mglyph\u02D0 %1",BadMglyphFont:"\u041F\u043B\u043E\u0445\u043E\u0439 \u0448\u0440\u0438\u0444\u0442: %1",MathPlayer:"MathJax \u043D\u0435\u00A0\u0441\u043C\u043E\u0433 \u043D\u0430\u0441\u0442\u0440\u043E\u0438\u0442\u044C MathPlayer.\n\n\u0415\u0441\u043B\u0438\u00A0MathPlayer \u043D\u0435\u00A0\u0443\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D, \u0443\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u0435. \u0415\u0441\u043B\u0438\u00A0\u0443\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D, \u0432\u0435\u0440\u043E\u044F\u0442\u043D\u043E, \u0412\u0430\u0448\u0438 \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438 \u0431\u0435\u0437\u043E\u043F\u0430\u0441\u043D\u043E\u0441\u0442\u0438 \u043D\u0435\u00A0\u043F\u043E\u0437\u0432\u043E\u043B\u044F\u044E\u0442 \u0437\u0430\u043F\u0443\u0441\u043A ActiveX. \u0412\u00A0\u043C\u0435\u043D\u044E \u0418\u043D\u0441\u0442\u0440\u0443\u043C\u0435\u043D\u0442\u044B|\u0421\u0432\u043E\u0439\u0441\u0442\u0432\u0430 \u043E\u0431\u043E\u0437\u0440\u0435\u0432\u0430\u0442\u0435\u043B\u044F \u0432\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0432\u043A\u043B\u0430\u0434\u043A\u0443 \u00AB\u0411\u0435\u0437\u043E\u043F\u0430\u0441\u043D\u043E\u0441\u0442\u044C\u00BB, \u043D\u0430\u0436\u043C\u0438\u0442\u0435 \u043A\u043D\u043E\u043F\u043A\u0443 \u00AB\u0414\u0440\u0443\u0433\u043E\u0439\u2026\u00BB \u0438\u00A0\u0443\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044C, \u0447\u0442\u043E\u00A0\u0438\u043D\u0441\u0442\u0440\u0443\u043C\u0435\u043D\u0442\u044B ActiveX \u0438\u00A0\u043F\u043E\u0432\u0435\u0434\u0435\u043D\u0438\u0435 \u0434\u0432\u043E\u0438\u0447\u043D\u043E\u0433\u043E \u043A\u043E\u0434\u0430 \u0438\u00A0\u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0435\u0432 \u0432\u043A\u043B\u044E\u0447\u0435\u043D\u044B.\n\n\u0421\u0435\u0439\u0447\u0430\u0441 \u0412\u044B \u0434\u043E\u043B\u0436\u043D\u044B \u0432\u0438\u0434\u0435\u0442\u044C \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u044F \u043E\u0431\u00A0\u043E\u0448\u0438\u0431\u043A\u0430\u0445, \u0430\u00A0\u043D\u0435\u00A0\u0444\u043E\u0440\u043C\u0443\u043B\u044B.",CantCreateXMLParser:"MathJax \u043D\u0435\u00A0\u0441\u043C\u043E\u0433 \u0441\u043E\u0437\u0434\u0430\u0442\u044C \u043F\u0430\u0440\u0441\u0435\u0440 XML \u0434\u043B\u044F\u00A0MathML. \u0423\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044C, \u0447\u0442\u043E\u00A0\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B ActiveX, \u043E\u0442\u043C\u0435\u0447\u0435\u043D\u043D\u044B\u0435 \u043A\u0430\u043A\u00A0\u0431\u0435\u0437\u043E\u043F\u0430\u0441\u043D\u044B\u0435 \u0434\u043B\u044F\u00A0\u0441\u043A\u0440\u0438\u043F\u0442\u043E\u0432, \u0432\u043A\u043B\u044E\u0447\u0435\u043D\u044B (\u0412\u00A0\u043C\u0435\u043D\u044E \u0418\u043D\u0441\u0442\u0440\u0443\u043C\u0435\u043D\u0442\u044B|\u0421\u0432\u043E\u0439\u0441\u0442\u0432\u0430 \u043E\u0431\u043E\u0437\u0440\u0435\u0432\u0430\u0442\u0435\u043B\u044F \u0432\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0432\u043A\u043B\u0430\u0434\u043A\u0443 \u00AB\u0411\u0435\u0437\u043E\u043F\u0430\u0441\u043D\u043E\u0441\u0442\u044C\u00BB, \u043D\u0430\u0436\u043C\u0438\u0442\u0435 \u043A\u043D\u043E\u043F\u043A\u0443 \u00AB\u0414\u0440\u0443\u0433\u043E\u0439\u2026\u00BB).\n\nMathJax \u043D\u0435\u00A0\u0441\u043C\u043E\u0436\u0435\u0442 \u0432\u044B\u0432\u0435\u0441\u0442\u0438 \u0444\u043E\u0440\u043C\u0443\u043B\u044B MathML.",UnknownNodeType:"\u041D\u0435\u0438\u0437\u043C\u0435\u0441\u0442\u043D\u044B\u0439 \u0442\u044D\u0433 %1",UnexpectedTextNode:"\u0422\u0435\u043A\u0441\u0442\u043E\u0432\u044B\u0439 \u0443\u0437\u0435\u043B %1 \u0432\u00A0\u044D\u0442\u043E\u043C \u043C\u0435\u0441\u0442\u0435 \u043D\u0435\u00A0\u043E\u0436\u0438\u0434\u0430\u0435\u0442\u0441\u044F",ErrorParsingMathML:"\u041E\u0448\u0438\u0431\u043A\u0430 \u0440\u0430\u0437\u0431\u043E\u0440\u0430 MathML",ParsingError:"\u041E\u0448\u0438\u0431\u043A\u0430 \u0440\u0430\u0437\u0431\u043E\u0440\u0430 MathML: %1",MathMLSingleElement:"MathML \u0434\u043E\u043B\u0436\u0435\u043D \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C \u0442\u043E\u043B\u044C\u043A\u043E \u043E\u0434\u0438\u043D \u0442\u044D\u0433 \u003Cmath\u003E",MathMLRootElement:"\u041A\u043E\u0440\u043D\u0435\u0432\u044B\u043C \u0443\u0437\u043B\u043E\u043C MathML \u0434\u043E\u043B\u0436\u0435\u043D \u0431\u044B\u0442\u044C \u003Cmath\u003E, \u043D\u0435\u00A0%1"}});MathJax.Ajax.loadComplete("[MathJax]/localization/ru/MathML.js");
var EventHandlers = { // Event handler for previous and next changeSlide: function (options, e) { // console.log('changeSlide'); var indexOffset, slideOffset, unevenOffset; unevenOffset = (this.state.slideCount % this.props.slidesToScroll !== 0); indexOffset = unevenOffset ? 0 : (this.state.slideCount - this.state.currentSlide) % this.props.slidesToScroll; if (options.message === 'previous') { slideOffset = (indexOffset === 0) ? this.props.slidesToScroll : this.props.slidesToShow - indexOffset; if (this.state.slideCount > this.props.slidesToShow) { this.slideHandler(this.state.currentSlide - slideOffset, false); } } else if (options.message === 'next') { slideOffset = (indexOffset === 0) ? this.props.slidesToScroll : indexOffset; if (this.state.slideCount > this.props.slidesToShow) { this.slideHandler(this.state.currentSlide + slideOffset, false); } } else if (options.message === 'index') { // Click on dots var targetSlide = options.index*this.props.slidesToScroll; if (targetSlide !== this.state.currentSlide) { this.slideHandler(targetSlide); } } }, // Accessiblity handler for previous and next keyHandler: function (e) { }, // Focus on selecting a slide (click handler on track) selectHandler: function (e) { }, swipeStart: function (e) { var touches, posX, posY; if ((this.props.swipe === false) || ('ontouchend' in document && this.props.swipe === false)) { return; } else if (this.props.draggable === false && e.type.indexOf('mouse') !== -1) { return; } posX = (e.touches !== undefined) ? e.touches[0].pageX : e.clientX; posY = (e.touches !== undefined) ? e.touches[0].pageY : e.clientY; this.setState({ dragging: true, touchObject: { startX: posX, startY: posY, curX: posX, curY: posY } }); e.preventDefault(); }, swipeMove: function (e) { if (!this.state.dragging) { return; } if (this.state.animating) { return; } var swipeLeft; var curLeft, positionOffset; var touchObject = this.state.touchObject; curLeft = this.getLeft(this.state.currentSlide); touchObject.curX = (e.touches )? e.touches[0].pageX : e.clientX; touchObject.curY = (e.touches )? e.touches[0].pageY : e.clientY; touchObject.swipeLength = Math.round(Math.sqrt(Math.pow(touchObject.curX - touchObject.startX, 2))); positionOffset = (this.props.rtl === false ? 1 : -1) * (touchObject.curX > touchObject.startX ? 1 : -1); swipeLeft = curLeft + touchObject.swipeLength * positionOffset; this.setState({ touchObject: touchObject, swipeLeft: swipeLeft, trackStyle: this.getCSS(swipeLeft), }); e.preventDefault(); }, swipeEnd: function (e) { e.preventDefault(); if (!this.state.dragging) { return; } var touchObject = this.state.touchObject; var minSwipe = this.state.listWidth/this.props.touchThreshold; var swipeDirection = this.swipeDirection(touchObject); this.setState({ dragging: false, swipeLeft: null, touchObject: {} }); // Fix for #13 if (!touchObject.swipeLength) { return; } if (touchObject.swipeLength > minSwipe) { if (swipeDirection === 'left') { this.slideHandler(this.state.currentSlide + this.props.slidesToScroll); } else if (swipeDirection === 'right') { this.slideHandler(this.state.currentSlide - this.props.slidesToScroll); } else { this.slideHandler(this.state.currentSlide, null, true); } } else { this.slideHandler(this.state.currentSlide, null, true); } }, }; module.exports = EventHandlers;
import React from "react"; import Header from "./Header"; import Home from './Home'; import Footer from "./Footer"; import '../App.css'; function MainContent() { return ( <div className="bgImage"> <Header/> <Home/> <Footer/> </div> ) } export default MainContent;
import React, { useState, useEffect } from "react"; import { Tab } from "@headlessui/react"; import Layout from "../../../../components/layout/layout"; import { useRouter } from "next/router"; import MenMeasuementForm from "../../../../components/clients/ClientForm/men/men.form.component"; import WomenMeasuementForm from "../../../../components/clients/ClientForm/women/women.form.component"; import { SetNewClient } from "../../../../services/actions/setNewClient"; import { useUser } from "../../../../services/context/userContext"; import { GetSingleClient } from "../../../../services/actions/getSingleClient"; import ClientEditDetails from "../../../../components/clients/AllClients/clients.edit.details.component"; const EditClientDetails = (props) => { // const { clientFile } = data; // console.log(props); const { id } = props?.params; const { user, allDocs } = useUser(); const [clientDoc, setClientDoc] = useState({}); const router = useRouter(); // console.log(allDocs); useEffect(() => { if (!user) { router.push("/"); } }, [user]); useEffect(async () => { if (allDocs) { const clientDetail = allDocs.filter((val) => { if (val.id.includes(id)) { return val; } }); setClientDoc(clientDetail); } }, [allDocs, id]); // console.log(clientDoc); return ( <Layout name="Edit Client Details" desc="This will provide a form to edit cleints details and measurements" > {clientDoc ? ( <ClientEditDetails clientDoc={clientDoc} /> ) : ( <div>Loading...</div> )} </Layout> ); }; export default EditClientDetails; export const getServerSideProps = ({ params }) => { // const { id, tailorID } = params; // console.log(params); // const clientFile = await GetSingleClient(id, tailorID); // if (!clientFile) { // return { notFound: true }; // } return { props: { params } }; };
window.DependencyLoader.push('Base', function() { /** * BaseCollection * * @extends Base */ window.BaseCollection = Base.extend({ /** * _accessors * * @access protected * @var Array (default: []) */ _accessors: [], /** * _model * * @access protected * @var Model (default: null) */ _model: null, /** * _string * * @access protected * @var String (default: 'BaseCollection') */ _string: 'BaseCollection', /** * init * * @access public * @return void */ init: function() { this._super(); this._accessors = []; }, /** * add * * @access public * @param Array accessors * @return void */ add: function(accessors) { var index, accessor; for (index in accessors) { accessor = accessors[index]; this._accessors.unshift(accessor); accessor.within(this); } }, /** * all * * @access public * @return Array */ all: function() { var accessors = this._accessors; return accessors; }, /** * each * * @access public * @param Function iterator * @param undefined|Array exceptions (default: []) * @return void */ each: function(iterator, exceptions) { exceptions = DataUtils.getDefaultValue(exceptions, []); jQuery.each(this._accessors, function(index, accessor) { if (ArrayUtils.contains(exceptions, accessor) === false) { iterator(index, accessor); } }); }, /** * find * * @access public * @param String key * @param String value * @return null|Accessor */ find: function(key, value) { var index, accessor; for (index in this._accessors) { accessor = this._accessors[index]; if (accessor.get(key) === value) { return accessor; } } return null; }, /** * first * * @access public * @return Accessor */ first: function() { var first = this.nth(0); return first; }, /** * length * * @access public * @return Number */ length: function() { return this._accessors.length; }, /** * map * * @access public * @param Array objects * @return Array */ map: function(objects) { var index, obj, accessor, accessors = [], model = this._model; for (index in objects) { obj = objects[index]; accessor = model.setAccessor(obj); accessors.unshift(accessor); } this.add(accessors); return accessors; }, /** * merge * * @access public * @param Collection collection * @return void */ merge: function(collection) { var objects = collection.objects(); this.map(objects); }, /** * nth * * @access public * @param Number index * @return Accessor */ nth: function(index) { var nth = this._accessors[index]; return nth; }, /** * objects * * @access public * @return Array */ objects: function() { var objects = [], data; for (index in this._accessors) { data = this._accessors[index].data(); objects.push(data); } return objects; }, /** * random * * @access public * @return Accessor */ random: function() { var accessors = this._accessors, accessor = ArrayUtils.random(accessors); return accessor; }, /** * reduce * * @access public * @param Function iterator * @return void */ reduce: function(iterator) { var index, accessor; for (index in this._accessors) { accessor = this._accessors[index]; if (iterator(accessor) === true) { delete this._accessors[index]; } } this._accessors = ArrayUtils.clean(this._accessors); }, /** * remove * * @access public * @param Array accessors * @return void */ remove: function(accessors) { return this.reduce(function(accessor) { return ArrayUtils.contains(accessors, accessor) === true; }); }, /** * reverse * * @access public * @return void */ reverse: function() { this._accessors = this._accessors.reverse(); }, /** * trim * * @access public * @param Number max * @return void */ trim: function(max) { this._accessors.length = max; } }); });
let books; const initialized = () => { console.warn("Database Books is ready") books = db.addCollection('books'); }; const path = require('path'); const loki = require('lokijs'); const db = new loki(path.join(__dirname, '../../data/books.db'), { autoload: true, autoloadCallback: initialized, autosave: true, autosaveInterval: 4000 }); exports.BooksService = class { constructor(app) { console.log("Starting Book services") app.post('/books', this.addBook); app.get('/books', this.getBooks); app.get('/books/isbn/:isbn', this.getBookByIsbn); } addBook(req, res) { books.insert(req.body); res.sendStatus(200); } getBooks(req, res) { res.send(books.data); } getBookByIsbn(req, res) { const book = books.data .filter((book) => book.industryIdentifiers .some(industry => industry.identifier === req.params.isbn) ); if (book.length > 0) { res.send(book[0]); } else { res.sendStatus(204); } } }
var browsersync = require('browser-sync'), gulp = require('gulp'), autoprefixer = require('gulp-autoprefixer'), jshint = require('gulp-jshint'), plumber = require('gulp-plumber'), postcss = require('gulp-postcss'), sass = require('gulp-sass'), stylus = require('gulp-stylus'), sourcemaps = require('gulp-sourcemaps'), uglify = require('gulp-uglify'), gutil = require('gulp-util'), lost = require('lost'); // BrowserSync // gulp.task('browser-sync', function() { // browsersync({ // server: { // baseDir: "./" // }, // notify: false // }); // }); // BrowserSync gulp.task('browser-sync', function() { browsersync.init({ proxy: "127.0.0.1:2368" }); }); // Stylus gulp.task('stylus', function() { // return gulp.src('src/css/**/*.styl') return gulp.src('stylus/**/*.styl') .pipe(plumber({ errorHandler: function (err) { gutil.beep(); console.log(err); } })) .pipe(sourcemaps.init()) .pipe(stylus()) .pipe(postcss([ lost() ])) .pipe(autoprefixer()) .pipe(sourcemaps.write('./')) .pipe(gulp.dest('ghost/content/themes/ghostworks-eliot/assets/css/')) .pipe(browsersync.reload({ stream: true })); }); // Sass gulp.task('sass', function() { return gulp.src('sass/**/*.*') .pipe(plumber({ errorHandler: function (err) { gutil.beep(); console.log(err); } })) .pipe(sourcemaps.init()) .pipe(sass()) .pipe(postcss([ lost() ])) .pipe(autoprefixer()) .pipe(sourcemaps.write('./')) .pipe(gulp.dest('ghost/content/themes/ghostworks-eliot/assets/css/')) .pipe(browsersync.reload({ stream: true })); }); // JSHint gulp.task('jshint', function() { // return gulp.src('src/js/**/*.js') return gulp.src('js/**/*.js') .pipe(sourcemaps.init()) .pipe(jshint()) .pipe(jshint.reporter('default')) .pipe(uglify()) .pipe(sourcemaps.write('./')) // .pipe(gulp.dest('dist/js/')) .pipe(gulp.dest('ghost/content/themes/ghostworks-eliot/assets/js/')) }); gulp.watch('stylus/**/*.*', ['stylus', 'jshint']); gulp.task('default', ['stylus', 'jshint', 'browser-sync']);
if (typeof firebase === 'undefined') throw new Error('hosting/init-error: Firebase SDK not detected. You must include it before /__/firebase/init.js'); firebase.initializeApp({ apiKey: "<API_KEY>", authDomain: "<PROJECT_ID>.firebaseapp.com", databaseURL: "https://<DATABASE_NAME>.firebaseio.com", projectId: "<PROJECT_ID>", storageBucket: "<BUCKET>.appspot.com", messagingSenderId: "<SENDER_ID>", });
// !! IMPORTANT README: // You may add additional external JS and CSS as needed to complete the project, however the current external resource MUST remain in place for the tests to work. BABEL must also be left in place. // When the user scrolls the page, execute myFunction /*********** INSTRUCTIONS: - Select the project you would like to complete from the dropdown menu. - Click the "RUN TESTS" button to run the tests against the blank pen. - Click the "TESTS" button to see the individual test cases. (should all be failing at first) - Start coding! As you fulfill each test case, you will see them go from red to green. - As you start to build out your project, when tests are failing, you should get helpful errors along the way! ************/ // PLEASE NOTE: Adding global style rules using the * selector, or by adding rules to body {..} or html {..}, or to all elements within body or html, i.e. h1 {..}, has the potential to pollute the test suite's CSS. Try adding: * { color: red }, for a quick example! // Once you have read the above messages, you can delete all comments. "use strict";
(window.webpackJsonp=window.webpackJsonp||[]).push([[1],[function(e,t,n){"use strict";e.exports=n(348)},function(e,t,n){var r=n(4),o=n(21),i=n(14),a=n(15),u=n(22),l=function(e,t,n){var c,s,f,p,d=e&l.F,h=e&l.G,v=e&l.S,y=e&l.P,m=e&l.B,g=h?r:v?r[t]||(r[t]={}):(r[t]||{}).prototype,b=h?o:o[t]||(o[t]={}),w=b.prototype||(b.prototype={});for(c in h&&(n=t),n)f=((s=!d&&g&&void 0!==g[c])?g:n)[c],p=m&&s?u(f,r):y&&"function"==typeof f?u(Function.call,f):f,g&&a(g,c,f,e&l.U),b[c]!=f&&i(b,c,p),y&&w[c]!=f&&(w[c]=f)};r.core=o,l.F=1,l.G=2,l.S=4,l.P=8,l.B=16,l.W=32,l.U=64,l.R=128,e.exports=l},function(e,t,n){e.exports=n(352)()},function(e,t,n){var r=n(6);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){var r=n(52)("wks"),o=n(38),i=n(4).Symbol,a="function"==typeof i;(e.exports=function(e){return r[e]||(r[e]=a&&i[e]||(a?i:o)("Symbol."+e))}).store=r},function(e,t,n){var r=n(24),o=Math.min;e.exports=function(e){return e>0?o(r(e),9007199254740991):0}},function(e,t,n){e.exports=!n(5)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(e,t,n){var r=n(3),o=n(104),i=n(27),a=Object.defineProperty;t.f=n(9)?Object.defineProperty:function(e,t,n){if(r(e),t=i(t,!0),r(n),o)try{return a(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){var r=n(28);e.exports=function(e){return Object(r(e))}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t,n){"use strict";var r=function(){};e.exports=r},function(e,t,n){var r=n(10),o=n(37);e.exports=n(9)?function(e,t,n){return r.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){var r=n(4),o=n(14),i=n(17),a=n(38)("src"),u=n(148),l=(""+u).split("toString");n(21).inspectSource=function(e){return u.call(e)},(e.exports=function(e,t,n,u){var c="function"==typeof n;c&&(i(n,"name")||o(n,"name",t)),e[t]!==n&&(c&&(i(n,a)||o(n,a,e[t]?""+e[t]:l.join(String(t)))),e===r?e[t]=n:u?e[t]?e[t]=n:o(e,t,n):(delete e[t],o(e,t,n)))})(Function.prototype,"toString",(function(){return"function"==typeof this&&this[a]||u.call(this)}))},function(e,t,n){var r=n(1),o=n(5),i=n(28),a=/"/g,u=function(e,t,n,r){var o=String(i(e)),u="<"+t;return""!==n&&(u+=" "+n+'="'+String(r).replace(a,"&quot;")+'"'),u+">"+o+"</"+t+">"};e.exports=function(e,t){var n={};n[e]=t(u),r(r.P+r.F*o((function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3})),"String",n)}},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){var r=n(53),o=n(28);e.exports=function(e){return r(o(e))}},function(e,t,n){var r=n(54),o=n(37),i=n(18),a=n(27),u=n(17),l=n(104),c=Object.getOwnPropertyDescriptor;t.f=n(9)?c:function(e,t){if(e=i(e),t=a(t,!0),l)try{return c(e,t)}catch(e){}if(u(e,t))return o(!r.f.call(e,t),e[t])}},function(e,t,n){var r=n(17),o=n(11),i=n(77)("IE_PROTO"),a=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=o(e),r(e,i)?e[i]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?a:null}},function(e,t){var n=e.exports={version:"2.6.11"};"number"==typeof __e&&(__e=n)},function(e,t,n){var r=n(12);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,o){return e.call(t,n,r,o)}}return function(){return e.apply(t,arguments)}}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},function(e,t,n){"use strict";var r=n(5);e.exports=function(e,t){return!!e&&r((function(){t?e.call(null,(function(){}),1):e.call(null)}))}},function(e,t,n){"use strict";e.exports=function(e,t,n,r,o,i,a,u){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,o,i,a,u],s=0;(l=new Error(t.replace(/%s/g,(function(){return c[s++]})))).name="Invariant Violation"}throw l.framesToPop=1,l}}},function(e,t,n){var r=n(6);e.exports=function(e,t){if(!r(e))return e;var n,o;if(t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;if("function"==typeof(n=e.valueOf)&&!r(o=n.call(e)))return o;if(!t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;throw TypeError("Can't convert object to primitive value")}},function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){var r=n(1),o=n(21),i=n(5);e.exports=function(e,t){var n=(o.Object||{})[e]||Object[e],a={};a[e]=t(n),r(r.S+r.F*i((function(){n(1)})),"Object",a)}},function(e,t,n){var r=n(22),o=n(53),i=n(11),a=n(8),u=n(93);e.exports=function(e,t){var n=1==e,l=2==e,c=3==e,s=4==e,f=6==e,p=5==e||f,d=t||u;return function(t,u,h){for(var v,y,m=i(t),g=o(m),b=r(u,h,3),w=a(g.length),x=0,E=n?d(t,w):l?d(t,0):void 0;w>x;x++)if((p||x in g)&&(y=b(v=g[x],x,m),e))if(n)E[x]=y;else if(y)switch(e){case 3:return!0;case 5:return v;case 6:return x;case 2:E.push(v)}else if(s)return!1;return f?-1:c||s?s:E}}},function(e,t,n){"use strict";if(n(9)){var r=n(33),o=n(4),i=n(5),a=n(1),u=n(67),l=n(101),c=n(22),s=n(44),f=n(37),p=n(14),d=n(46),h=n(24),v=n(8),y=n(132),m=n(40),g=n(27),b=n(17),w=n(49),x=n(6),E=n(11),S=n(90),k=n(41),T=n(20),_=n(42).f,P=n(92),O=n(38),C=n(7),N=n(30),R=n(57),M=n(56),A=n(95),F=n(51),j=n(62),I=n(43),L=n(94),D=n(121),z=n(10),U=n(19),W=z.f,B=U.f,V=o.RangeError,$=o.TypeError,H=o.Uint8Array,q=Array.prototype,Q=l.ArrayBuffer,G=l.DataView,K=N(0),Y=N(2),X=N(3),J=N(4),Z=N(5),ee=N(6),te=R(!0),ne=R(!1),re=A.values,oe=A.keys,ie=A.entries,ae=q.lastIndexOf,ue=q.reduce,le=q.reduceRight,ce=q.join,se=q.sort,fe=q.slice,pe=q.toString,de=q.toLocaleString,he=C("iterator"),ve=C("toStringTag"),ye=O("typed_constructor"),me=O("def_constructor"),ge=u.CONSTR,be=u.TYPED,we=u.VIEW,xe=N(1,(function(e,t){return _e(M(e,e[me]),t)})),Ee=i((function(){return 1===new H(new Uint16Array([1]).buffer)[0]})),Se=!!H&&!!H.prototype.set&&i((function(){new H(1).set({})})),ke=function(e,t){var n=h(e);if(n<0||n%t)throw V("Wrong offset!");return n},Te=function(e){if(x(e)&&be in e)return e;throw $(e+" is not a typed array!")},_e=function(e,t){if(!x(e)||!(ye in e))throw $("It is not a typed array constructor!");return new e(t)},Pe=function(e,t){return Oe(M(e,e[me]),t)},Oe=function(e,t){for(var n=0,r=t.length,o=_e(e,r);r>n;)o[n]=t[n++];return o},Ce=function(e,t,n){W(e,t,{get:function(){return this._d[n]}})},Ne=function(e){var t,n,r,o,i,a,u=E(e),l=arguments.length,s=l>1?arguments[1]:void 0,f=void 0!==s,p=P(u);if(null!=p&&!S(p)){for(a=p.call(u),r=[],t=0;!(i=a.next()).done;t++)r.push(i.value);u=r}for(f&&l>2&&(s=c(s,arguments[2],2)),t=0,n=v(u.length),o=_e(this,n);n>t;t++)o[t]=f?s(u[t],t):u[t];return o},Re=function(){for(var e=0,t=arguments.length,n=_e(this,t);t>e;)n[e]=arguments[e++];return n},Me=!!H&&i((function(){de.call(new H(1))})),Ae=function(){return de.apply(Me?fe.call(Te(this)):Te(this),arguments)},Fe={copyWithin:function(e,t){return D.call(Te(this),e,t,arguments.length>2?arguments[2]:void 0)},every:function(e){return J(Te(this),e,arguments.length>1?arguments[1]:void 0)},fill:function(e){return L.apply(Te(this),arguments)},filter:function(e){return Pe(this,Y(Te(this),e,arguments.length>1?arguments[1]:void 0))},find:function(e){return Z(Te(this),e,arguments.length>1?arguments[1]:void 0)},findIndex:function(e){return ee(Te(this),e,arguments.length>1?arguments[1]:void 0)},forEach:function(e){K(Te(this),e,arguments.length>1?arguments[1]:void 0)},indexOf:function(e){return ne(Te(this),e,arguments.length>1?arguments[1]:void 0)},includes:function(e){return te(Te(this),e,arguments.length>1?arguments[1]:void 0)},join:function(e){return ce.apply(Te(this),arguments)},lastIndexOf:function(e){return ae.apply(Te(this),arguments)},map:function(e){return xe(Te(this),e,arguments.length>1?arguments[1]:void 0)},reduce:function(e){return ue.apply(Te(this),arguments)},reduceRight:function(e){return le.apply(Te(this),arguments)},reverse:function(){for(var e,t=Te(this).length,n=Math.floor(t/2),r=0;r<n;)e=this[r],this[r++]=this[--t],this[t]=e;return this},some:function(e){return X(Te(this),e,arguments.length>1?arguments[1]:void 0)},sort:function(e){return se.call(Te(this),e)},subarray:function(e,t){var n=Te(this),r=n.length,o=m(e,r);return new(M(n,n[me]))(n.buffer,n.byteOffset+o*n.BYTES_PER_ELEMENT,v((void 0===t?r:m(t,r))-o))}},je=function(e,t){return Pe(this,fe.call(Te(this),e,t))},Ie=function(e){Te(this);var t=ke(arguments[1],1),n=this.length,r=E(e),o=v(r.length),i=0;if(o+t>n)throw V("Wrong length!");for(;i<o;)this[t+i]=r[i++]},Le={entries:function(){return ie.call(Te(this))},keys:function(){return oe.call(Te(this))},values:function(){return re.call(Te(this))}},De=function(e,t){return x(e)&&e[be]&&"symbol"!=typeof t&&t in e&&String(+t)==String(t)},ze=function(e,t){return De(e,t=g(t,!0))?f(2,e[t]):B(e,t)},Ue=function(e,t,n){return!(De(e,t=g(t,!0))&&x(n)&&b(n,"value"))||b(n,"get")||b(n,"set")||n.configurable||b(n,"writable")&&!n.writable||b(n,"enumerable")&&!n.enumerable?W(e,t,n):(e[t]=n.value,e)};ge||(U.f=ze,z.f=Ue),a(a.S+a.F*!ge,"Object",{getOwnPropertyDescriptor:ze,defineProperty:Ue}),i((function(){pe.call({})}))&&(pe=de=function(){return ce.call(this)});var We=d({},Fe);d(We,Le),p(We,he,Le.values),d(We,{slice:je,set:Ie,constructor:function(){},toString:pe,toLocaleString:Ae}),Ce(We,"buffer","b"),Ce(We,"byteOffset","o"),Ce(We,"byteLength","l"),Ce(We,"length","e"),W(We,ve,{get:function(){return this[be]}}),e.exports=function(e,t,n,l){var c=e+((l=!!l)?"Clamped":"")+"Array",f="get"+e,d="set"+e,h=o[c],m=h||{},g=h&&T(h),b=!h||!u.ABV,E={},S=h&&h.prototype,P=function(e,n){W(e,n,{get:function(){return function(e,n){var r=e._d;return r.v[f](n*t+r.o,Ee)}(this,n)},set:function(e){return function(e,n,r){var o=e._d;l&&(r=(r=Math.round(r))<0?0:r>255?255:255&r),o.v[d](n*t+o.o,r,Ee)}(this,n,e)},enumerable:!0})};b?(h=n((function(e,n,r,o){s(e,h,c,"_d");var i,a,u,l,f=0,d=0;if(x(n)){if(!(n instanceof Q||"ArrayBuffer"==(l=w(n))||"SharedArrayBuffer"==l))return be in n?Oe(h,n):Ne.call(h,n);i=n,d=ke(r,t);var m=n.byteLength;if(void 0===o){if(m%t)throw V("Wrong length!");if((a=m-d)<0)throw V("Wrong length!")}else if((a=v(o)*t)+d>m)throw V("Wrong length!");u=a/t}else u=y(n),i=new Q(a=u*t);for(p(e,"_d",{b:i,o:d,l:a,e:u,v:new G(i)});f<u;)P(e,f++)})),S=h.prototype=k(We),p(S,"constructor",h)):i((function(){h(1)}))&&i((function(){new h(-1)}))&&j((function(e){new h,new h(null),new h(1.5),new h(e)}),!0)||(h=n((function(e,n,r,o){var i;return s(e,h,c),x(n)?n instanceof Q||"ArrayBuffer"==(i=w(n))||"SharedArrayBuffer"==i?void 0!==o?new m(n,ke(r,t),o):void 0!==r?new m(n,ke(r,t)):new m(n):be in n?Oe(h,n):Ne.call(h,n):new m(y(n))})),K(g!==Function.prototype?_(m).concat(_(g)):_(m),(function(e){e in h||p(h,e,m[e])})),h.prototype=S,r||(S.constructor=h));var O=S[he],C=!!O&&("values"==O.name||null==O.name),N=Le.values;p(h,ye,!0),p(S,be,c),p(S,we,!0),p(S,me,h),(l?new h(1)[ve]==c:ve in S)||W(S,ve,{get:function(){return c}}),E[c]=h,a(a.G+a.W+a.F*(h!=m),E),a(a.S,c,{BYTES_PER_ELEMENT:t}),a(a.S+a.F*i((function(){m.of.call(h,1)})),c,{from:Ne,of:Re}),"BYTES_PER_ELEMENT"in S||p(S,"BYTES_PER_ELEMENT",t),a(a.P,c,Fe),I(c),a(a.P+a.F*Se,c,{set:Ie}),a(a.P+a.F*!C,c,Le),r||S.toString==pe||(S.toString=pe),a(a.P+a.F*i((function(){new h(1).slice()})),c,{slice:je}),a(a.P+a.F*(i((function(){return[1,2].toLocaleString()!=new h([1,2]).toLocaleString()}))||!i((function(){S.toLocaleString.call([1,2])}))),c,{toLocaleString:Ae}),F[c]=C?O:N,r||C||p(S,he,N)}}else e.exports=function(){}},function(e,t,n){var r=n(127),o=n(1),i=n(52)("metadata"),a=i.store||(i.store=new(n(130))),u=function(e,t,n){var o=a.get(e);if(!o){if(!n)return;a.set(e,o=new r)}var i=o.get(t);if(!i){if(!n)return;o.set(t,i=new r)}return i};e.exports={store:a,map:u,has:function(e,t,n){var r=u(t,n,!1);return void 0!==r&&r.has(e)},get:function(e,t,n){var r=u(t,n,!1);return void 0===r?void 0:r.get(e)},set:function(e,t,n,r){u(n,r,!0).set(e,t)},keys:function(e,t){var n=u(e,t,!1),r=[];return n&&n.forEach((function(e,t){r.push(t)})),r},key:function(e){return void 0===e||"symbol"==typeof e?e:String(e)},exp:function(e){o(o.S,"Reflect",e)}}},function(e,t){e.exports=!1},function(e,t,n){var r=n(38)("meta"),o=n(6),i=n(17),a=n(10).f,u=0,l=Object.isExtensible||function(){return!0},c=!n(5)((function(){return l(Object.preventExtensions({}))})),s=function(e){a(e,r,{value:{i:"O"+ ++u,w:{}}})},f=e.exports={KEY:r,NEED:!1,fastKey:function(e,t){if(!o(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!i(e,r)){if(!l(e))return"F";if(!t)return"E";s(e)}return e[r].i},getWeak:function(e,t){if(!i(e,r)){if(!l(e))return!0;if(!t)return!1;s(e)}return e[r].w},onFreeze:function(e){return c&&f.NEED&&l(e)&&!i(e,r)&&s(e),e}}},function(e,t,n){var r=n(7)("unscopables"),o=Array.prototype;null==o[r]&&n(14)(o,r,{}),e.exports=function(e){o[r][e]=!0}},function(e,t,n){"use strict";function r(){return(r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function o(e){return"/"===e.charAt(0)}function i(e,t){for(var n=t,r=n+1,o=e.length;r<o;n+=1,r+=1)e[n]=e[r];e.pop()}n.d(t,"a",(function(){return k})),n.d(t,"b",(function(){return v})),n.d(t,"c",(function(){return y}));var a=function(e,t){void 0===t&&(t="");var n,r=e&&e.split("/")||[],a=t&&t.split("/")||[],u=e&&o(e),l=t&&o(t),c=u||l;if(e&&o(e)?a=r:r.length&&(a.pop(),a=a.concat(r)),!a.length)return"/";if(a.length){var s=a[a.length-1];n="."===s||".."===s||""===s}else n=!1;for(var f=0,p=a.length;p>=0;p--){var d=a[p];"."===d?i(a,p):".."===d?(i(a,p),f++):f&&(i(a,p),f--)}if(!c)for(;f--;f)a.unshift("..");!c||""===a[0]||a[0]&&o(a[0])||a.unshift("");var h=a.join("/");return n&&"/"!==h.substr(-1)&&(h+="/"),h};function u(e){return e.valueOf?e.valueOf():Object.prototype.valueOf.call(e)}var l=function e(t,n){if(t===n)return!0;if(null==t||null==n)return!1;if(Array.isArray(t))return Array.isArray(n)&&t.length===n.length&&t.every((function(t,r){return e(t,n[r])}));if("object"==typeof t||"object"==typeof n){var r=u(t),o=u(n);return r!==t||o!==n?e(r,o):Object.keys(Object.assign({},t,n)).every((function(r){return e(t[r],n[r])}))}return!1};var c=function(e,t){if(!e)throw new Error("Invariant failed")};function s(e){return"/"===e.charAt(0)?e:"/"+e}function f(e){return"/"===e.charAt(0)?e.substr(1):e}function p(e,t){return function(e,t){return 0===e.toLowerCase().indexOf(t.toLowerCase())&&-1!=="/?#".indexOf(e.charAt(t.length))}(e,t)?e.substr(t.length):e}function d(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}function h(e){var t=e.pathname,n=e.search,r=e.hash,o=t||"/";return n&&"?"!==n&&(o+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(o+="#"===r.charAt(0)?r:"#"+r),o}function v(e,t,n,o){var i;"string"==typeof e?(i=function(e){var t=e||"/",n="",r="",o=t.indexOf("#");-1!==o&&(r=t.substr(o),t=t.substr(0,o));var i=t.indexOf("?");return-1!==i&&(n=t.substr(i),t=t.substr(0,i)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}}(e)).state=t:(void 0===(i=r({},e)).pathname&&(i.pathname=""),i.search?"?"!==i.search.charAt(0)&&(i.search="?"+i.search):i.search="",i.hash?"#"!==i.hash.charAt(0)&&(i.hash="#"+i.hash):i.hash="",void 0!==t&&void 0===i.state&&(i.state=t));try{i.pathname=decodeURI(i.pathname)}catch(e){throw e instanceof URIError?new URIError('Pathname "'+i.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):e}return n&&(i.key=n),o?i.pathname?"/"!==i.pathname.charAt(0)&&(i.pathname=a(i.pathname,o.pathname)):i.pathname=o.pathname:i.pathname||(i.pathname="/"),i}function y(e,t){return e.pathname===t.pathname&&e.search===t.search&&e.hash===t.hash&&e.key===t.key&&l(e.state,t.state)}function m(){var e=null;var t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,r,o){if(null!=e){var i="function"==typeof e?e(t,n):e;"string"==typeof i?"function"==typeof r?r(i,o):o(!0):o(!1!==i)}else o(!0)},appendListener:function(e){var n=!0;function r(){n&&e.apply(void 0,arguments)}return t.push(r),function(){n=!1,t=t.filter((function(e){return e!==r}))}},notifyListeners:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];t.forEach((function(e){return e.apply(void 0,n)}))}}}var g=!("undefined"==typeof window||!window.document||!window.document.createElement);function b(e,t){t(window.confirm(e))}var w={hashbang:{encodePath:function(e){return"!"===e.charAt(0)?e:"!/"+f(e)},decodePath:function(e){return"!"===e.charAt(0)?e.substr(1):e}},noslash:{encodePath:f,decodePath:s},slash:{encodePath:s,decodePath:s}};function x(e){var t=e.indexOf("#");return-1===t?e:e.slice(0,t)}function E(){var e=window.location.href,t=e.indexOf("#");return-1===t?"":e.substring(t+1)}function S(e){window.location.replace(x(window.location.href)+"#"+e)}function k(e){void 0===e&&(e={}),g||c(!1);var t=window.history,n=(window.navigator.userAgent.indexOf("Firefox"),e),o=n.getUserConfirmation,i=void 0===o?b:o,a=n.hashType,u=void 0===a?"slash":a,l=e.basename?d(s(e.basename)):"",f=w[u],y=f.encodePath,k=f.decodePath;function T(){var e=k(E());return l&&(e=p(e,l)),v(e)}var _=m();function P(e){r(z,e),z.length=t.length,_.notifyListeners(z.location,z.action)}var O=!1,C=null;function N(){var e,t,n=E(),r=y(n);if(n!==r)S(r);else{var o=T(),a=z.location;if(!O&&(t=o,(e=a).pathname===t.pathname&&e.search===t.search&&e.hash===t.hash))return;if(C===h(o))return;C=null,function(e){if(O)O=!1,P();else{_.confirmTransitionTo(e,"POP",i,(function(t){t?P({action:"POP",location:e}):function(e){var t=z.location,n=F.lastIndexOf(h(t));-1===n&&(n=0);var r=F.lastIndexOf(h(e));-1===r&&(r=0);var o=n-r;o&&(O=!0,j(o))}(e)}))}}(o)}}var R=E(),M=y(R);R!==M&&S(M);var A=T(),F=[h(A)];function j(e){t.go(e)}var I=0;function L(e){1===(I+=e)&&1===e?window.addEventListener("hashchange",N):0===I&&window.removeEventListener("hashchange",N)}var D=!1;var z={length:t.length,action:"POP",location:A,createHref:function(e){var t=document.querySelector("base"),n="";return t&&t.getAttribute("href")&&(n=x(window.location.href)),n+"#"+y(l+h(e))},push:function(e,t){var n=v(e,void 0,void 0,z.location);_.confirmTransitionTo(n,"PUSH",i,(function(e){if(e){var t=h(n),r=y(l+t);if(E()!==r){C=t,function(e){window.location.hash=e}(r);var o=F.lastIndexOf(h(z.location)),i=F.slice(0,o+1);i.push(t),F=i,P({action:"PUSH",location:n})}else P()}}))},replace:function(e,t){var n=v(e,void 0,void 0,z.location);_.confirmTransitionTo(n,"REPLACE",i,(function(e){if(e){var t=h(n),r=y(l+t);E()!==r&&(C=t,S(r));var o=F.indexOf(h(z.location));-1!==o&&(F[o]=t),P({action:"REPLACE",location:n})}}))},go:j,goBack:function(){j(-1)},goForward:function(){j(1)},block:function(e){void 0===e&&(e=!1);var t=_.setPrompt(e);return D||(L(1),D=!0),function(){return D&&(D=!1,L(-1)),t()}},listen:function(e){var t=_.appendListener(e);return L(1),function(){L(-1),t()}}};return z}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},function(e,t,n){var r=n(106),o=n(78);e.exports=Object.keys||function(e){return r(e,o)}},function(e,t,n){var r=n(24),o=Math.max,i=Math.min;e.exports=function(e,t){return(e=r(e))<0?o(e+t,0):i(e,t)}},function(e,t,n){var r=n(3),o=n(107),i=n(78),a=n(77)("IE_PROTO"),u=function(){},l=function(){var e,t=n(75)("iframe"),r=i.length;for(t.style.display="none",n(79).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),l=e.F;r--;)delete l.prototype[i[r]];return l()};e.exports=Object.create||function(e,t){var n;return null!==e?(u.prototype=r(e),n=new u,u.prototype=null,n[a]=e):n=l(),void 0===t?n:o(n,t)}},function(e,t,n){var r=n(106),o=n(78).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,o)}},function(e,t,n){"use strict";var r=n(4),o=n(10),i=n(9),a=n(7)("species");e.exports=function(e){var t=r[e];i&&t&&!t[a]&&o.f(t,a,{configurable:!0,get:function(){return this}})}},function(e,t){e.exports=function(e,t,n,r){if(!(e instanceof t)||void 0!==r&&r in e)throw TypeError(n+": incorrect invocation!");return e}},function(e,t,n){var r=n(22),o=n(119),i=n(90),a=n(3),u=n(8),l=n(92),c={},s={};(t=e.exports=function(e,t,n,f,p){var d,h,v,y,m=p?function(){return e}:l(e),g=r(n,f,t?2:1),b=0;if("function"!=typeof m)throw TypeError(e+" is not iterable!");if(i(m)){for(d=u(e.length);d>b;b++)if((y=t?g(a(h=e[b])[0],h[1]):g(e[b]))===c||y===s)return y}else for(v=m.call(e);!(h=v.next()).done;)if((y=o(v,g,h.value,t))===c||y===s)return y}).BREAK=c,t.RETURN=s},function(e,t,n){var r=n(15);e.exports=function(e,t,n){for(var o in t)r(e,o,t[o],n);return e}},function(e,t,n){var r=n(6);e.exports=function(e,t){if(!r(e)||e._t!==t)throw TypeError("Incompatible receiver, "+t+" required!");return e}},function(e,t,n){var r=n(10).f,o=n(17),i=n(7)("toStringTag");e.exports=function(e,t,n){e&&!o(e=n?e:e.prototype,i)&&r(e,i,{configurable:!0,value:t})}},function(e,t,n){var r=n(23),o=n(7)("toStringTag"),i="Arguments"==r(function(){return arguments}());e.exports=function(e){var t,n,a;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),o))?n:i?r(t):"Object"==(a=r(t))&&"function"==typeof t.callee?"Arguments":a}},function(e,t,n){var r=n(1),o=n(28),i=n(5),a=n(81),u="["+a+"]",l=RegExp("^"+u+u+"*"),c=RegExp(u+u+"*$"),s=function(e,t,n){var o={},u=i((function(){return!!a[e]()||"​…"!="​…"[e]()})),l=o[e]=u?t(f):a[e];n&&(o[n]=l),r(r.P+r.F*u,"String",o)},f=s.trim=function(e,t){return e=String(o(e)),1&t&&(e=e.replace(l,"")),2&t&&(e=e.replace(c,"")),e};e.exports=s},function(e,t){e.exports={}},function(e,t,n){var r=n(21),o=n(4),i=o["__core-js_shared__"]||(o["__core-js_shared__"]={});(e.exports=function(e,t){return i[e]||(i[e]=void 0!==t?t:{})})("versions",[]).push({version:r.version,mode:n(33)?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},function(e,t,n){var r=n(23);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},function(e,t){t.f={}.propertyIsEnumerable},function(e,t,n){"use strict";var r=n(3);e.exports=function(){var e=r(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},function(e,t,n){var r=n(3),o=n(12),i=n(7)("species");e.exports=function(e,t){var n,a=r(e).constructor;return void 0===a||null==(n=r(a)[i])?t:o(n)}},function(e,t,n){var r=n(18),o=n(8),i=n(40);e.exports=function(e){return function(t,n,a){var u,l=r(t),c=o(l.length),s=i(a,c);if(e&&n!=n){for(;c>s;)if((u=l[s++])!=u)return!0}else for(;c>s;s++)if((e||s in l)&&l[s]===n)return e||s||0;return!e&&-1}}},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,n){var r=n(23);e.exports=Array.isArray||function(e){return"Array"==r(e)}},function(e,t,n){var r=n(24),o=n(28);e.exports=function(e){return function(t,n){var i,a,u=String(o(t)),l=r(n),c=u.length;return l<0||l>=c?e?"":void 0:(i=u.charCodeAt(l))<55296||i>56319||l+1===c||(a=u.charCodeAt(l+1))<56320||a>57343?e?u.charAt(l):i:e?u.slice(l,l+2):a-56320+(i-55296<<10)+65536}}},function(e,t,n){var r=n(6),o=n(23),i=n(7)("match");e.exports=function(e){var t;return r(e)&&(void 0!==(t=e[i])?!!t:"RegExp"==o(e))}},function(e,t,n){var r=n(7)("iterator"),o=!1;try{var i=[7][r]();i.return=function(){o=!0},Array.from(i,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!o)return!1;var n=!1;try{var i=[7],a=i[r]();a.next=function(){return{done:n=!0}},i[r]=function(){return a},e(i)}catch(e){}return n}},function(e,t,n){"use strict";var r=n(49),o=RegExp.prototype.exec;e.exports=function(e,t){var n=e.exec;if("function"==typeof n){var i=n.call(e,t);if("object"!=typeof i)throw new TypeError("RegExp exec method returned something other than an Object or null");return i}if("RegExp"!==r(e))throw new TypeError("RegExp#exec called on incompatible receiver");return o.call(e,t)}},function(e,t,n){"use strict";n(123);var r=n(15),o=n(14),i=n(5),a=n(28),u=n(7),l=n(96),c=u("species"),s=!i((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")})),f=function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2===n.length&&"a"===n[0]&&"b"===n[1]}();e.exports=function(e,t,n){var p=u(e),d=!i((function(){var t={};return t[p]=function(){return 7},7!=""[e](t)})),h=d?!i((function(){var t=!1,n=/a/;return n.exec=function(){return t=!0,null},"split"===e&&(n.constructor={},n.constructor[c]=function(){return n}),n[p](""),!t})):void 0;if(!d||!h||"replace"===e&&!s||"split"===e&&!f){var v=/./[p],y=n(a,p,""[e],(function(e,t,n,r,o){return t.exec===l?d&&!o?{done:!0,value:v.call(t,n,r)}:{done:!0,value:e.call(n,t,r)}:{done:!1}})),m=y[0],g=y[1];r(String.prototype,e,m),o(RegExp.prototype,p,2==t?function(e,t){return g.call(e,this,t)}:function(e){return g.call(e,this)})}}},function(e,t,n){var r=n(4).navigator;e.exports=r&&r.userAgent||""},function(e,t,n){"use strict";var r=n(4),o=n(1),i=n(15),a=n(46),u=n(34),l=n(45),c=n(44),s=n(6),f=n(5),p=n(62),d=n(48),h=n(82);e.exports=function(e,t,n,v,y,m){var g=r[e],b=g,w=y?"set":"add",x=b&&b.prototype,E={},S=function(e){var t=x[e];i(x,e,"delete"==e||"has"==e?function(e){return!(m&&!s(e))&&t.call(this,0===e?0:e)}:"get"==e?function(e){return m&&!s(e)?void 0:t.call(this,0===e?0:e)}:"add"==e?function(e){return t.call(this,0===e?0:e),this}:function(e,n){return t.call(this,0===e?0:e,n),this})};if("function"==typeof b&&(m||x.forEach&&!f((function(){(new b).entries().next()})))){var k=new b,T=k[w](m?{}:-0,1)!=k,_=f((function(){k.has(1)})),P=p((function(e){new b(e)})),O=!m&&f((function(){for(var e=new b,t=5;t--;)e[w](t,t);return!e.has(-0)}));P||((b=t((function(t,n){c(t,b,e);var r=h(new g,t,b);return null!=n&&l(n,y,r[w],r),r}))).prototype=x,x.constructor=b),(_||O)&&(S("delete"),S("has"),y&&S("get")),(O||T)&&S(w),m&&x.clear&&delete x.clear}else b=v.getConstructor(t,e,y,w),a(b.prototype,n),u.NEED=!0;return d(b,e),E[e]=b,o(o.G+o.W+o.F*(b!=g),E),m||v.setStrong(b,e,y),b}},function(e,t,n){for(var r,o=n(4),i=n(14),a=n(38),u=a("typed_array"),l=a("view"),c=!(!o.ArrayBuffer||!o.DataView),s=c,f=0,p="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");f<9;)(r=o[p[f++]])?(i(r.prototype,u,!0),i(r.prototype,l,!0)):s=!1;e.exports={ABV:c,CONSTR:s,TYPED:u,VIEW:l}},function(e,t,n){"use strict";e.exports=n(33)||!n(5)((function(){var e=Math.random();__defineSetter__.call(null,e,(function(){})),delete n(4)[e]}))},function(e,t,n){"use strict";var r=n(1);e.exports=function(e){r(r.S,e,{of:function(){for(var e=arguments.length,t=new Array(e);e--;)t[e]=arguments[e];return new this(t)}})}},function(e,t,n){"use strict";var r=n(1),o=n(12),i=n(22),a=n(45);e.exports=function(e){r(r.S,e,{from:function(e){var t,n,r,u,l=arguments[1];return o(this),(t=void 0!==l)&&o(l),null==e?new this:(n=[],t?(r=0,u=i(l,arguments[2],2),a(e,!1,(function(e){n.push(u(e,r++))}))):a(e,!1,n.push,n),new this(n))}})}},function(e,t,n){"use strict";var r=n(13),o=n.n(r),i=n(26),a=n.n(i),u=n(0),l=n.n(u),c=n(2),s=n.n(c),f=n(72),p=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var v=function(e){return 0===l.a.Children.count(e)},y=function(e){function t(){var n,r;d(this,t);for(var o=arguments.length,i=Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=r=h(this,e.call.apply(e,[this].concat(i))),r.state={match:r.computeMatch(r.props,r.context.router)},h(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.getChildContext=function(){return{router:p({},this.context.router,{route:{location:this.props.location||this.context.router.route.location,match:this.state.match}})}},t.prototype.computeMatch=function(e,t){var n=e.computedMatch,r=e.location,o=e.path,i=e.strict,u=e.exact,l=e.sensitive;if(n)return n;a()(t,"You should not use <Route> or withRouter() outside a <Router>");var c=t.route,s=(r||c.location).pathname;return Object(f.a)(s,{path:o,strict:i,exact:u,sensitive:l},c.match)},t.prototype.componentWillMount=function(){o()(!(this.props.component&&this.props.render),"You should not use <Route component> and <Route render> in the same route; <Route render> will be ignored"),o()(!(this.props.component&&this.props.children&&!v(this.props.children)),"You should not use <Route component> and <Route children> in the same route; <Route children> will be ignored"),o()(!(this.props.render&&this.props.children&&!v(this.props.children)),"You should not use <Route render> and <Route children> in the same route; <Route children> will be ignored")},t.prototype.componentWillReceiveProps=function(e,t){o()(!(e.location&&!this.props.location),'<Route> elements should not change from uncontrolled to controlled (or vice versa). You initially used no "location" prop and then provided one on a subsequent render.'),o()(!(!e.location&&this.props.location),'<Route> elements should not change from controlled to uncontrolled (or vice versa). You provided a "location" prop initially but omitted it on a subsequent render.'),this.setState({match:this.computeMatch(e,t.router)})},t.prototype.render=function(){var e=this.state.match,t=this.props,n=t.children,r=t.component,o=t.render,i=this.context.router,a=i.history,u=i.route,c=i.staticContext,s={match:e,location:this.props.location||u.location,history:a,staticContext:c};return r?e?l.a.createElement(r,s):null:o?e?o(s):null:"function"==typeof n?n(s):n&&!v(n)?l.a.Children.only(n):null},t}(l.a.Component);y.propTypes={computedMatch:s.a.object,path:s.a.string,exact:s.a.bool,strict:s.a.bool,sensitive:s.a.bool,component:s.a.func,render:s.a.func,children:s.a.oneOfType([s.a.func,s.a.node]),location:s.a.object},y.contextTypes={router:s.a.shape({history:s.a.object.isRequired,route:s.a.object.isRequired,staticContext:s.a.object})},y.childContextTypes={router:s.a.object.isRequired},t.a=y},function(e,t,n){"use strict";var r=n(73),o=n.n(r),i={},a=0,u=function(e,t){var n=""+t.end+t.strict+t.sensitive,r=i[n]||(i[n]={});if(r[e])return r[e];var u=[],l={re:o()(e,u,t),keys:u};return a<1e4&&(r[e]=l,a++),l};t.a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments[2];"string"==typeof t&&(t={path:t});var r=t,o=r.path,i=r.exact,a=void 0!==i&&i,l=r.strict,c=void 0!==l&&l,s=r.sensitive,f=void 0!==s&&s;if(null==o)return n;var p=u(o,{end:a,strict:c,sensitive:f}),d=p.re,h=p.keys,v=d.exec(e);if(!v)return null;var y=v[0],m=v.slice(1),g=e===y;return a&&!g?null:{path:o,url:"/"===o&&""===y?"/":y,isExact:g,params:h.reduce((function(e,t,n){return e[t.name]=m[n],e}),{})}}},function(e,t,n){var r=n(354);e.exports=d,e.exports.parse=i,e.exports.compile=function(e,t){return u(i(e,t),t)},e.exports.tokensToFunction=u,e.exports.tokensToRegExp=p;var o=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function i(e,t){for(var n,r=[],i=0,a=0,u="",s=t&&t.delimiter||"/";null!=(n=o.exec(e));){var f=n[0],p=n[1],d=n.index;if(u+=e.slice(a,d),a=d+f.length,p)u+=p[1];else{var h=e[a],v=n[2],y=n[3],m=n[4],g=n[5],b=n[6],w=n[7];u&&(r.push(u),u="");var x=null!=v&&null!=h&&h!==v,E="+"===b||"*"===b,S="?"===b||"*"===b,k=n[2]||s,T=m||g;r.push({name:y||i++,prefix:v||"",delimiter:k,optional:S,repeat:E,partial:x,asterisk:!!w,pattern:T?c(T):w?".*":"[^"+l(k)+"]+?"})}}return a<e.length&&(u+=e.substr(a)),u&&r.push(u),r}function a(e){return encodeURI(e).replace(/[\/?#]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))}function u(e,t){for(var n=new Array(e.length),o=0;o<e.length;o++)"object"==typeof e[o]&&(n[o]=new RegExp("^(?:"+e[o].pattern+")$",f(t)));return function(t,o){for(var i="",u=t||{},l=(o||{}).pretty?a:encodeURIComponent,c=0;c<e.length;c++){var s=e[c];if("string"!=typeof s){var f,p=u[s.name];if(null==p){if(s.optional){s.partial&&(i+=s.prefix);continue}throw new TypeError('Expected "'+s.name+'" to be defined')}if(r(p)){if(!s.repeat)throw new TypeError('Expected "'+s.name+'" to not repeat, but received `'+JSON.stringify(p)+"`");if(0===p.length){if(s.optional)continue;throw new TypeError('Expected "'+s.name+'" to not be empty')}for(var d=0;d<p.length;d++){if(f=l(p[d]),!n[c].test(f))throw new TypeError('Expected all "'+s.name+'" to match "'+s.pattern+'", but received `'+JSON.stringify(f)+"`");i+=(0===d?s.prefix:s.delimiter)+f}}else{if(f=s.asterisk?encodeURI(p).replace(/[?#]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})):l(p),!n[c].test(f))throw new TypeError('Expected "'+s.name+'" to match "'+s.pattern+'", but received "'+f+'"');i+=s.prefix+f}}else i+=s}return i}}function l(e){return e.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}function c(e){return e.replace(/([=!:$\/()])/g,"\\$1")}function s(e,t){return e.keys=t,e}function f(e){return e&&e.sensitive?"":"i"}function p(e,t,n){r(t)||(n=t||n,t=[]);for(var o=(n=n||{}).strict,i=!1!==n.end,a="",u=0;u<e.length;u++){var c=e[u];if("string"==typeof c)a+=l(c);else{var p=l(c.prefix),d="(?:"+c.pattern+")";t.push(c),c.repeat&&(d+="(?:"+p+d+")*"),a+=d=c.optional?c.partial?p+"("+d+")?":"(?:"+p+"("+d+"))?":p+"("+d+")"}}var h=l(n.delimiter||"/"),v=a.slice(-h.length)===h;return o||(a=(v?a.slice(0,-h.length):a)+"(?:"+h+"(?=$))?"),a+=i?"$":o&&v?"":"(?="+h+"|$)",s(new RegExp("^"+a,f(n)),t)}function d(e,t,n){return r(t)||(n=t||n,t=[]),n=n||{},e instanceof RegExp?function(e,t){var n=e.source.match(/\((?!\?)/g);if(n)for(var r=0;r<n.length;r++)t.push({name:r,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,asterisk:!1,pattern:null});return s(e,t)}(e,t):r(e)?function(e,t,n){for(var r=[],o=0;o<e.length;o++)r.push(d(e[o],t,n).source);return s(new RegExp("(?:"+r.join("|")+")",f(n)),t)}(e,t,n):function(e,t,n){return p(i(e,n),t,n)}(e,t,n)}},,function(e,t,n){var r=n(6),o=n(4).document,i=r(o)&&r(o.createElement);e.exports=function(e){return i?o.createElement(e):{}}},function(e,t,n){var r=n(4),o=n(21),i=n(33),a=n(105),u=n(10).f;e.exports=function(e){var t=o.Symbol||(o.Symbol=i?{}:r.Symbol||{});"_"==e.charAt(0)||e in t||u(t,e,{value:a.f(e)})}},function(e,t,n){var r=n(52)("keys"),o=n(38);e.exports=function(e){return r[e]||(r[e]=o(e))}},function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t,n){var r=n(4).document;e.exports=r&&r.documentElement},function(e,t,n){var r=n(6),o=n(3),i=function(e,t){if(o(e),!r(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,r){try{(r=n(22)(Function.call,n(19).f(Object.prototype,"__proto__").set,2))(e,[]),t=!(e instanceof Array)}catch(e){t=!0}return function(e,n){return i(e,n),t?e.__proto__=n:r(e,n),e}}({},!1):void 0),check:i}},function(e,t){e.exports="\t\n\v\f\r   ᠎              \u2028\u2029\ufeff"},function(e,t,n){var r=n(6),o=n(80).set;e.exports=function(e,t,n){var i,a=t.constructor;return a!==n&&"function"==typeof a&&(i=a.prototype)!==n.prototype&&r(i)&&o&&o(e,i),e}},function(e,t,n){"use strict";var r=n(24),o=n(28);e.exports=function(e){var t=String(o(this)),n="",i=r(e);if(i<0||i==1/0)throw RangeError("Count can't be negative");for(;i>0;(i>>>=1)&&(t+=t))1&i&&(n+=t);return n}},function(e,t){e.exports=Math.sign||function(e){return 0==(e=+e)||e!=e?e:e<0?-1:1}},function(e,t){var n=Math.expm1;e.exports=!n||n(10)>22025.465794806718||n(10)<22025.465794806718||-2e-17!=n(-2e-17)?function(e){return 0==(e=+e)?e:e>-1e-6&&e<1e-6?e+e*e/2:Math.exp(e)-1}:n},function(e,t,n){"use strict";var r=n(33),o=n(1),i=n(15),a=n(14),u=n(51),l=n(87),c=n(48),s=n(20),f=n(7)("iterator"),p=!([].keys&&"next"in[].keys()),d=function(){return this};e.exports=function(e,t,n,h,v,y,m){l(n,t,h);var g,b,w,x=function(e){if(!p&&e in T)return T[e];switch(e){case"keys":case"values":return function(){return new n(this,e)}}return function(){return new n(this,e)}},E=t+" Iterator",S="values"==v,k=!1,T=e.prototype,_=T[f]||T["@@iterator"]||v&&T[v],P=_||x(v),O=v?S?x("entries"):P:void 0,C="Array"==t&&T.entries||_;if(C&&(w=s(C.call(new e)))!==Object.prototype&&w.next&&(c(w,E,!0),r||"function"==typeof w[f]||a(w,f,d)),S&&_&&"values"!==_.name&&(k=!0,P=function(){return _.call(this)}),r&&!m||!p&&!k&&T[f]||a(T,f,P),u[t]=P,u[E]=d,v)if(g={values:S?P:x("values"),keys:y?P:x("keys"),entries:O},m)for(b in g)b in T||i(T,b,g[b]);else o(o.P+o.F*(p||k),t,g);return g}},function(e,t,n){"use strict";var r=n(41),o=n(37),i=n(48),a={};n(14)(a,n(7)("iterator"),(function(){return this})),e.exports=function(e,t,n){e.prototype=r(a,{next:o(1,n)}),i(e,t+" Iterator")}},function(e,t,n){var r=n(61),o=n(28);e.exports=function(e,t,n){if(r(t))throw TypeError("String#"+n+" doesn't accept regex!");return String(o(e))}},function(e,t,n){var r=n(7)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[r]=!1,!"/./"[e](t)}catch(e){}}return!0}},function(e,t,n){var r=n(51),o=n(7)("iterator"),i=Array.prototype;e.exports=function(e){return void 0!==e&&(r.Array===e||i[o]===e)}},function(e,t,n){"use strict";var r=n(10),o=n(37);e.exports=function(e,t,n){t in e?r.f(e,t,o(0,n)):e[t]=n}},function(e,t,n){var r=n(49),o=n(7)("iterator"),i=n(51);e.exports=n(21).getIteratorMethod=function(e){if(null!=e)return e[o]||e["@@iterator"]||i[r(e)]}},function(e,t,n){var r=n(237);e.exports=function(e,t){return new(r(e))(t)}},function(e,t,n){"use strict";var r=n(11),o=n(40),i=n(8);e.exports=function(e){for(var t=r(this),n=i(t.length),a=arguments.length,u=o(a>1?arguments[1]:void 0,n),l=a>2?arguments[2]:void 0,c=void 0===l?n:o(l,n);c>u;)t[u++]=e;return t}},function(e,t,n){"use strict";var r=n(35),o=n(122),i=n(51),a=n(18);e.exports=n(86)(Array,"Array",(function(e,t){this._t=a(e),this._i=0,this._k=t}),(function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,o(1)):o(0,"keys"==t?n:"values"==t?e[n]:[n,e[n]])}),"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},function(e,t,n){"use strict";var r,o,i=n(55),a=RegExp.prototype.exec,u=String.prototype.replace,l=a,c=(r=/a/,o=/b*/g,a.call(r,"a"),a.call(o,"a"),0!==r.lastIndex||0!==o.lastIndex),s=void 0!==/()??/.exec("")[1];(c||s)&&(l=function(e){var t,n,r,o,l=this;return s&&(n=new RegExp("^"+l.source+"$(?!\\s)",i.call(l))),c&&(t=l.lastIndex),r=a.call(l,e),c&&r&&(l.lastIndex=l.global?r.index+r[0].length:t),s&&r&&r.length>1&&u.call(r[0],n,(function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(r[o]=void 0)})),r}),e.exports=l},function(e,t,n){"use strict";var r=n(60)(!0);e.exports=function(e,t,n){return t+(n?r(e,t).length:1)}},function(e,t,n){var r,o,i,a=n(22),u=n(112),l=n(79),c=n(75),s=n(4),f=s.process,p=s.setImmediate,d=s.clearImmediate,h=s.MessageChannel,v=s.Dispatch,y=0,m={},g=function(){var e=+this;if(m.hasOwnProperty(e)){var t=m[e];delete m[e],t()}},b=function(e){g.call(e.data)};p&&d||(p=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return m[++y]=function(){u("function"==typeof e?e:Function(e),t)},r(y),y},d=function(e){delete m[e]},"process"==n(23)(f)?r=function(e){f.nextTick(a(g,e,1))}:v&&v.now?r=function(e){v.now(a(g,e,1))}:h?(i=(o=new h).port2,o.port1.onmessage=b,r=a(i.postMessage,i,1)):s.addEventListener&&"function"==typeof postMessage&&!s.importScripts?(r=function(e){s.postMessage(e+"","*")},s.addEventListener("message",b,!1)):r="onreadystatechange"in c("script")?function(e){l.appendChild(c("script")).onreadystatechange=function(){l.removeChild(this),g.call(e)}}:function(e){setTimeout(a(g,e,1),0)}),e.exports={set:p,clear:d}},function(e,t,n){var r=n(4),o=n(98).set,i=r.MutationObserver||r.WebKitMutationObserver,a=r.process,u=r.Promise,l="process"==n(23)(a);e.exports=function(){var e,t,n,c=function(){var r,o;for(l&&(r=a.domain)&&r.exit();e;){o=e.fn,e=e.next;try{o()}catch(r){throw e?n():t=void 0,r}}t=void 0,r&&r.enter()};if(l)n=function(){a.nextTick(c)};else if(!i||r.navigator&&r.navigator.standalone)if(u&&u.resolve){var s=u.resolve(void 0);n=function(){s.then(c)}}else n=function(){o.call(r,c)};else{var f=!0,p=document.createTextNode("");new i(c).observe(p,{characterData:!0}),n=function(){p.data=f=!f}}return function(r){var o={fn:r,next:void 0};t&&(t.next=o),e||(e=o,n()),t=o}}},function(e,t,n){"use strict";var r=n(12);function o(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=r})),this.resolve=r(t),this.reject=r(n)}e.exports.f=function(e){return new o(e)}},function(e,t,n){"use strict";var r=n(4),o=n(9),i=n(33),a=n(67),u=n(14),l=n(46),c=n(5),s=n(44),f=n(24),p=n(8),d=n(132),h=n(42).f,v=n(10).f,y=n(94),m=n(48),g=r.ArrayBuffer,b=r.DataView,w=r.Math,x=r.RangeError,E=r.Infinity,S=g,k=w.abs,T=w.pow,_=w.floor,P=w.log,O=w.LN2,C=o?"_b":"buffer",N=o?"_l":"byteLength",R=o?"_o":"byteOffset";function M(e,t,n){var r,o,i,a=new Array(n),u=8*n-t-1,l=(1<<u)-1,c=l>>1,s=23===t?T(2,-24)-T(2,-77):0,f=0,p=e<0||0===e&&1/e<0?1:0;for((e=k(e))!=e||e===E?(o=e!=e?1:0,r=l):(r=_(P(e)/O),e*(i=T(2,-r))<1&&(r--,i*=2),(e+=r+c>=1?s/i:s*T(2,1-c))*i>=2&&(r++,i/=2),r+c>=l?(o=0,r=l):r+c>=1?(o=(e*i-1)*T(2,t),r+=c):(o=e*T(2,c-1)*T(2,t),r=0));t>=8;a[f++]=255&o,o/=256,t-=8);for(r=r<<t|o,u+=t;u>0;a[f++]=255&r,r/=256,u-=8);return a[--f]|=128*p,a}function A(e,t,n){var r,o=8*n-t-1,i=(1<<o)-1,a=i>>1,u=o-7,l=n-1,c=e[l--],s=127&c;for(c>>=7;u>0;s=256*s+e[l],l--,u-=8);for(r=s&(1<<-u)-1,s>>=-u,u+=t;u>0;r=256*r+e[l],l--,u-=8);if(0===s)s=1-a;else{if(s===i)return r?NaN:c?-E:E;r+=T(2,t),s-=a}return(c?-1:1)*r*T(2,s-t)}function F(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]}function j(e){return[255&e]}function I(e){return[255&e,e>>8&255]}function L(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]}function D(e){return M(e,52,8)}function z(e){return M(e,23,4)}function U(e,t,n){v(e.prototype,t,{get:function(){return this[n]}})}function W(e,t,n,r){var o=d(+n);if(o+t>e[N])throw x("Wrong index!");var i=e[C]._b,a=o+e[R],u=i.slice(a,a+t);return r?u:u.reverse()}function B(e,t,n,r,o,i){var a=d(+n);if(a+t>e[N])throw x("Wrong index!");for(var u=e[C]._b,l=a+e[R],c=r(+o),s=0;s<t;s++)u[l+s]=c[i?s:t-s-1]}if(a.ABV){if(!c((function(){g(1)}))||!c((function(){new g(-1)}))||c((function(){return new g,new g(1.5),new g(NaN),"ArrayBuffer"!=g.name}))){for(var V,$=(g=function(e){return s(this,g),new S(d(e))}).prototype=S.prototype,H=h(S),q=0;H.length>q;)(V=H[q++])in g||u(g,V,S[V]);i||($.constructor=g)}var Q=new b(new g(2)),G=b.prototype.setInt8;Q.setInt8(0,2147483648),Q.setInt8(1,2147483649),!Q.getInt8(0)&&Q.getInt8(1)||l(b.prototype,{setInt8:function(e,t){G.call(this,e,t<<24>>24)},setUint8:function(e,t){G.call(this,e,t<<24>>24)}},!0)}else g=function(e){s(this,g,"ArrayBuffer");var t=d(e);this._b=y.call(new Array(t),0),this[N]=t},b=function(e,t,n){s(this,b,"DataView"),s(e,g,"DataView");var r=e[N],o=f(t);if(o<0||o>r)throw x("Wrong offset!");if(o+(n=void 0===n?r-o:p(n))>r)throw x("Wrong length!");this[C]=e,this[R]=o,this[N]=n},o&&(U(g,"byteLength","_l"),U(b,"buffer","_b"),U(b,"byteLength","_l"),U(b,"byteOffset","_o")),l(b.prototype,{getInt8:function(e){return W(this,1,e)[0]<<24>>24},getUint8:function(e){return W(this,1,e)[0]},getInt16:function(e){var t=W(this,2,e,arguments[1]);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=W(this,2,e,arguments[1]);return t[1]<<8|t[0]},getInt32:function(e){return F(W(this,4,e,arguments[1]))},getUint32:function(e){return F(W(this,4,e,arguments[1]))>>>0},getFloat32:function(e){return A(W(this,4,e,arguments[1]),23,4)},getFloat64:function(e){return A(W(this,8,e,arguments[1]),52,8)},setInt8:function(e,t){B(this,1,e,j,t)},setUint8:function(e,t){B(this,1,e,j,t)},setInt16:function(e,t){B(this,2,e,I,t,arguments[2])},setUint16:function(e,t){B(this,2,e,I,t,arguments[2])},setInt32:function(e,t){B(this,4,e,L,t,arguments[2])},setUint32:function(e,t){B(this,4,e,L,t,arguments[2])},setFloat32:function(e,t){B(this,4,e,z,t,arguments[2])},setFloat64:function(e,t){B(this,8,e,D,t,arguments[2])}});m(g,"ArrayBuffer"),m(b,"DataView"),u(b.prototype,a.VIEW,!0),t.ArrayBuffer=g,t.DataView=b},function(e,t,n){"use strict";var r=n(0),o=n.n(r),i=n(2),a=n.n(i),u=n(26),l=n.n(u),c=n(36),s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var d=function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)},h=function(e){function t(){var n,r;f(this,t);for(var o=arguments.length,i=Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=r=p(this,e.call.apply(e,[this].concat(i))),r.handleClick=function(e){if(r.props.onClick&&r.props.onClick(e),!e.defaultPrevented&&0===e.button&&!r.props.target&&!d(e)){e.preventDefault();var t=r.context.router.history,n=r.props,o=n.replace,i=n.to;o?t.replace(i):t.push(i)}},p(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.render=function(){var e=this.props,t=(e.replace,e.to),n=e.innerRef,r=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["replace","to","innerRef"]);l()(this.context.router,"You should not use <Link> outside a <Router>"),l()(void 0!==t,'You must specify the "to" property');var i=this.context.router.history,a="string"==typeof t?Object(c.b)(t,null,null,i.location):t,u=i.createHref(a);return o.a.createElement("a",s({},r,{onClick:this.handleClick,href:u,ref:n}))},t}(o.a.Component);h.propTypes={onClick:a.a.func,target:a.a.string,replace:a.a.bool,to:a.a.oneOfType([a.a.string,a.a.object]).isRequired,innerRef:a.a.oneOfType([a.a.string,a.a.func])},h.defaultProps={replace:!1},h.contextTypes={router:a.a.shape({history:a.a.shape({push:a.a.func.isRequired,replace:a.a.func.isRequired,createHref:a.a.func.isRequired}).isRequired}).isRequired},t.a=h},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){e.exports=!n(9)&&!n(5)((function(){return 7!=Object.defineProperty(n(75)("div"),"a",{get:function(){return 7}}).a}))},function(e,t,n){t.f=n(7)},function(e,t,n){var r=n(17),o=n(18),i=n(57)(!1),a=n(77)("IE_PROTO");e.exports=function(e,t){var n,u=o(e),l=0,c=[];for(n in u)n!=a&&r(u,n)&&c.push(n);for(;t.length>l;)r(u,n=t[l++])&&(~i(c,n)||c.push(n));return c}},function(e,t,n){var r=n(10),o=n(3),i=n(39);e.exports=n(9)?Object.defineProperties:function(e,t){o(e);for(var n,a=i(t),u=a.length,l=0;u>l;)r.f(e,n=a[l++],t[n]);return e}},function(e,t,n){var r=n(18),o=n(42).f,i={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return a&&"[object Window]"==i.call(e)?function(e){try{return o(e)}catch(e){return a.slice()}}(e):o(r(e))}},function(e,t,n){"use strict";var r=n(9),o=n(39),i=n(58),a=n(54),u=n(11),l=n(53),c=Object.assign;e.exports=!c||n(5)((function(){var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach((function(e){t[e]=e})),7!=c({},e)[n]||Object.keys(c({},t)).join("")!=r}))?function(e,t){for(var n=u(e),c=arguments.length,s=1,f=i.f,p=a.f;c>s;)for(var d,h=l(arguments[s++]),v=f?o(h).concat(f(h)):o(h),y=v.length,m=0;y>m;)d=v[m++],r&&!p.call(h,d)||(n[d]=h[d]);return n}:c},function(e,t){e.exports=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}},function(e,t,n){"use strict";var r=n(12),o=n(6),i=n(112),a=[].slice,u={},l=function(e,t,n){if(!(t in u)){for(var r=[],o=0;o<t;o++)r[o]="a["+o+"]";u[t]=Function("F,a","return new F("+r.join(",")+")")}return u[t](e,n)};e.exports=Function.bind||function(e){var t=r(this),n=a.call(arguments,1),u=function(){var r=n.concat(a.call(arguments));return this instanceof u?l(t,r.length,r):i(t,r,e)};return o(t.prototype)&&(u.prototype=t.prototype),u}},function(e,t){e.exports=function(e,t,n){var r=void 0===n;switch(t.length){case 0:return r?e():e.call(n);case 1:return r?e(t[0]):e.call(n,t[0]);case 2:return r?e(t[0],t[1]):e.call(n,t[0],t[1]);case 3:return r?e(t[0],t[1],t[2]):e.call(n,t[0],t[1],t[2]);case 4:return r?e(t[0],t[1],t[2],t[3]):e.call(n,t[0],t[1],t[2],t[3])}return e.apply(n,t)}},function(e,t,n){var r=n(4).parseInt,o=n(50).trim,i=n(81),a=/^[-+]?0[xX]/;e.exports=8!==r(i+"08")||22!==r(i+"0x16")?function(e,t){var n=o(String(e),3);return r(n,t>>>0||(a.test(n)?16:10))}:r},function(e,t,n){var r=n(4).parseFloat,o=n(50).trim;e.exports=1/r(n(81)+"-0")!=-1/0?function(e){var t=o(String(e),3),n=r(t);return 0===n&&"-"==t.charAt(0)?-0:n}:r},function(e,t,n){var r=n(23);e.exports=function(e,t){if("number"!=typeof e&&"Number"!=r(e))throw TypeError(t);return+e}},function(e,t,n){var r=n(6),o=Math.floor;e.exports=function(e){return!r(e)&&isFinite(e)&&o(e)===e}},function(e,t){e.exports=Math.log1p||function(e){return(e=+e)>-1e-8&&e<1e-8?e-e*e/2:Math.log(1+e)}},function(e,t,n){var r=n(84),o=Math.pow,i=o(2,-52),a=o(2,-23),u=o(2,127)*(2-a),l=o(2,-126);e.exports=Math.fround||function(e){var t,n,o=Math.abs(e),c=r(e);return o<l?c*(o/l/a+1/i-1/i)*l*a:(n=(t=(1+a/i)*o)-(t-o))>u||n!=n?c*(1/0):c*n}},function(e,t,n){var r=n(3);e.exports=function(e,t,n,o){try{return o?t(r(n)[0],n[1]):t(n)}catch(t){var i=e.return;throw void 0!==i&&r(i.call(e)),t}}},function(e,t,n){var r=n(12),o=n(11),i=n(53),a=n(8);e.exports=function(e,t,n,u,l){r(t);var c=o(e),s=i(c),f=a(c.length),p=l?f-1:0,d=l?-1:1;if(n<2)for(;;){if(p in s){u=s[p],p+=d;break}if(p+=d,l?p<0:f<=p)throw TypeError("Reduce of empty array with no initial value")}for(;l?p>=0:f>p;p+=d)p in s&&(u=t(u,s[p],p,c));return u}},function(e,t,n){"use strict";var r=n(11),o=n(40),i=n(8);e.exports=[].copyWithin||function(e,t){var n=r(this),a=i(n.length),u=o(e,a),l=o(t,a),c=arguments.length>2?arguments[2]:void 0,s=Math.min((void 0===c?a:o(c,a))-l,a-u),f=1;for(l<u&&u<l+s&&(f=-1,l+=s-1,u+=s-1);s-- >0;)l in n?n[u]=n[l]:delete n[u],u+=f,l+=f;return n}},function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,n){"use strict";var r=n(96);n(1)({target:"RegExp",proto:!0,forced:r!==/./.exec},{exec:r})},function(e,t,n){n(9)&&"g"!=/./g.flags&&n(10).f(RegExp.prototype,"flags",{configurable:!0,get:n(55)})},function(e,t){e.exports=function(e){try{return{e:!1,v:e()}}catch(e){return{e:!0,v:e}}}},function(e,t,n){var r=n(3),o=n(6),i=n(100);e.exports=function(e,t){if(r(e),o(t)&&t.constructor===e)return t;var n=i.f(e);return(0,n.resolve)(t),n.promise}},function(e,t,n){"use strict";var r=n(128),o=n(47);e.exports=n(66)("Map",(function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}}),{get:function(e){var t=r.getEntry(o(this,"Map"),e);return t&&t.v},set:function(e,t){return r.def(o(this,"Map"),0===e?0:e,t)}},r,!0)},function(e,t,n){"use strict";var r=n(10).f,o=n(41),i=n(46),a=n(22),u=n(44),l=n(45),c=n(86),s=n(122),f=n(43),p=n(9),d=n(34).fastKey,h=n(47),v=p?"_s":"size",y=function(e,t){var n,r=d(t);if("F"!==r)return e._i[r];for(n=e._f;n;n=n.n)if(n.k==t)return n};e.exports={getConstructor:function(e,t,n,c){var s=e((function(e,r){u(e,s,t,"_i"),e._t=t,e._i=o(null),e._f=void 0,e._l=void 0,e[v]=0,null!=r&&l(r,n,e[c],e)}));return i(s.prototype,{clear:function(){for(var e=h(this,t),n=e._i,r=e._f;r;r=r.n)r.r=!0,r.p&&(r.p=r.p.n=void 0),delete n[r.i];e._f=e._l=void 0,e[v]=0},delete:function(e){var n=h(this,t),r=y(n,e);if(r){var o=r.n,i=r.p;delete n._i[r.i],r.r=!0,i&&(i.n=o),o&&(o.p=i),n._f==r&&(n._f=o),n._l==r&&(n._l=i),n[v]--}return!!r},forEach:function(e){h(this,t);for(var n,r=a(e,arguments.length>1?arguments[1]:void 0,3);n=n?n.n:this._f;)for(r(n.v,n.k,this);n&&n.r;)n=n.p},has:function(e){return!!y(h(this,t),e)}}),p&&r(s.prototype,"size",{get:function(){return h(this,t)[v]}}),s},def:function(e,t,n){var r,o,i=y(e,t);return i?i.v=n:(e._l=i={i:o=d(t,!0),k:t,v:n,p:r=e._l,n:void 0,r:!1},e._f||(e._f=i),r&&(r.n=i),e[v]++,"F"!==o&&(e._i[o]=i)),e},getEntry:y,setStrong:function(e,t,n){c(e,t,(function(e,n){this._t=h(e,t),this._k=n,this._l=void 0}),(function(){for(var e=this._k,t=this._l;t&&t.r;)t=t.p;return this._t&&(this._l=t=t?t.n:this._t._f)?s(0,"keys"==e?t.k:"values"==e?t.v:[t.k,t.v]):(this._t=void 0,s(1))}),n?"entries":"values",!n,!0),f(t)}}},function(e,t,n){"use strict";var r=n(128),o=n(47);e.exports=n(66)("Set",(function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}}),{add:function(e){return r.def(o(this,"Set"),e=0===e?0:e,e)}},r)},function(e,t,n){"use strict";var r,o=n(4),i=n(30)(0),a=n(15),u=n(34),l=n(109),c=n(131),s=n(6),f=n(47),p=n(47),d=!o.ActiveXObject&&"ActiveXObject"in o,h=u.getWeak,v=Object.isExtensible,y=c.ufstore,m=function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},g={get:function(e){if(s(e)){var t=h(e);return!0===t?y(f(this,"WeakMap")).get(e):t?t[this._i]:void 0}},set:function(e,t){return c.def(f(this,"WeakMap"),e,t)}},b=e.exports=n(66)("WeakMap",m,g,c,!0,!0);p&&d&&(l((r=c.getConstructor(m,"WeakMap")).prototype,g),u.NEED=!0,i(["delete","has","get","set"],(function(e){var t=b.prototype,n=t[e];a(t,e,(function(t,o){if(s(t)&&!v(t)){this._f||(this._f=new r);var i=this._f[e](t,o);return"set"==e?this:i}return n.call(this,t,o)}))})))},function(e,t,n){"use strict";var r=n(46),o=n(34).getWeak,i=n(3),a=n(6),u=n(44),l=n(45),c=n(30),s=n(17),f=n(47),p=c(5),d=c(6),h=0,v=function(e){return e._l||(e._l=new y)},y=function(){this.a=[]},m=function(e,t){return p(e.a,(function(e){return e[0]===t}))};y.prototype={get:function(e){var t=m(this,e);if(t)return t[1]},has:function(e){return!!m(this,e)},set:function(e,t){var n=m(this,e);n?n[1]=t:this.a.push([e,t])},delete:function(e){var t=d(this.a,(function(t){return t[0]===e}));return~t&&this.a.splice(t,1),!!~t}},e.exports={getConstructor:function(e,t,n,i){var c=e((function(e,r){u(e,c,t,"_i"),e._t=t,e._i=h++,e._l=void 0,null!=r&&l(r,n,e[i],e)}));return r(c.prototype,{delete:function(e){if(!a(e))return!1;var n=o(e);return!0===n?v(f(this,t)).delete(e):n&&s(n,this._i)&&delete n[this._i]},has:function(e){if(!a(e))return!1;var n=o(e);return!0===n?v(f(this,t)).has(e):n&&s(n,this._i)}}),c},def:function(e,t,n){var r=o(i(t),!0);return!0===r?v(e).set(t,n):r[e._i]=n,e},ufstore:v}},function(e,t,n){var r=n(24),o=n(8);e.exports=function(e){if(void 0===e)return 0;var t=r(e),n=o(t);if(t!==n)throw RangeError("Wrong length!");return n}},function(e,t,n){var r=n(42),o=n(58),i=n(3),a=n(4).Reflect;e.exports=a&&a.ownKeys||function(e){var t=r.f(i(e)),n=o.f;return n?t.concat(n(e)):t}},function(e,t,n){"use strict";var r=n(59),o=n(6),i=n(8),a=n(22),u=n(7)("isConcatSpreadable");e.exports=function e(t,n,l,c,s,f,p,d){for(var h,v,y=s,m=0,g=!!p&&a(p,d,3);m<c;){if(m in l){if(h=g?g(l[m],m,n):l[m],v=!1,o(h)&&(v=void 0!==(v=h[u])?!!v:r(h)),v&&f>0)y=e(t,n,h,i(h.length),y,f-1)-1;else{if(y>=9007199254740991)throw TypeError();t[y]=h}y++}m++}return y}},function(e,t,n){var r=n(8),o=n(83),i=n(28);e.exports=function(e,t,n,a){var u=String(i(e)),l=u.length,c=void 0===n?" ":String(n),s=r(t);if(s<=l||""==c)return u;var f=s-l,p=o.call(c,Math.ceil(f/c.length));return p.length>f&&(p=p.slice(0,f)),a?p+u:u+p}},function(e,t,n){var r=n(9),o=n(39),i=n(18),a=n(54).f;e.exports=function(e){return function(t){for(var n,u=i(t),l=o(u),c=l.length,s=0,f=[];c>s;)n=l[s++],r&&!a.call(u,n)||f.push(e?[n,u[n]]:u[n]);return f}}},function(e,t,n){var r=n(49),o=n(138);e.exports=function(e){return function(){if(r(this)!=e)throw TypeError(e+"#toJSON isn't generic");return o(this)}}},function(e,t,n){var r=n(45);e.exports=function(e,t){var n=[];return r(e,!1,n.push,n,t),n}},function(e,t){e.exports=Math.scale||function(e,t,n,r,o){return 0===arguments.length||e!=e||t!=t||n!=n||r!=r||o!=o?NaN:e===1/0||e===-1/0?e:(e-t)*(o-r)/(n-t)+r}},function(e,t,n){"use strict"; /* object-assign (c) Sindre Sorhus @license MIT */var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function a(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,u,l=a(e),c=1;c<arguments.length;c++){for(var s in n=Object(arguments[c]))o.call(n,s)&&(l[s]=n[s]);if(r){u=r(n);for(var f=0;f<u.length;f++)i.call(n,u[f])&&(l[u[f]]=n[u[f]])}}return l}},function(e,t,n){"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE){0;try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}}(),e.exports=n(349)},function(e,t,n){"use strict";var r={childContextTypes:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},i=Object.defineProperty,a=Object.getOwnPropertyNames,u=Object.getOwnPropertySymbols,l=Object.getOwnPropertyDescriptor,c=Object.getPrototypeOf,s=c&&c(Object);e.exports=function e(t,n,f){if("string"!=typeof n){if(s){var p=c(n);p&&p!==s&&e(t,p,f)}var d=a(n);u&&(d=d.concat(u(n)));for(var h=0;h<d.length;++h){var v=d[h];if(!(r[v]||o[v]||f&&f[v])){var y=l(n,v);try{i(t,v,y)}catch(e){}}}return t}return t}},function(e,t,n){"use strict";var r=n(71);t.a=r.a},,function(e,t,n){"use strict";(function(e){if(n(146),n(343),n(344),e._babelPolyfill)throw new Error("only one instance of babel-polyfill is allowed");e._babelPolyfill=!0;function t(e,t,n){e[t]||Object.defineProperty(e,t,{writable:!0,configurable:!0,value:n})}t(String.prototype,"padLeft","".padStart),t(String.prototype,"padRight","".padEnd),"pop,reverse,shift,keys,values,entries,indexOf,every,some,forEach,map,filter,find,findIndex,includes,join,slice,concat,push,splice,unshift,sort,lastIndexOf,reduce,reduceRight,copyWithin,fill".split(",").forEach((function(e){[][e]&&t(Array,e,Function.call.bind([][e]))}))}).call(this,n(103))},function(e,t,n){n(147),n(150),n(151),n(152),n(153),n(154),n(155),n(156),n(157),n(158),n(159),n(160),n(161),n(162),n(163),n(164),n(165),n(166),n(167),n(168),n(169),n(170),n(171),n(172),n(173),n(174),n(175),n(176),n(177),n(178),n(179),n(180),n(181),n(182),n(183),n(184),n(185),n(186),n(187),n(188),n(189),n(190),n(191),n(192),n(193),n(194),n(195),n(196),n(197),n(198),n(199),n(200),n(201),n(202),n(203),n(204),n(205),n(206),n(207),n(208),n(209),n(210),n(211),n(212),n(213),n(214),n(215),n(216),n(217),n(218),n(219),n(220),n(221),n(222),n(223),n(224),n(225),n(227),n(228),n(230),n(231),n(232),n(233),n(234),n(235),n(236),n(238),n(239),n(240),n(241),n(242),n(243),n(244),n(245),n(246),n(247),n(248),n(249),n(250),n(95),n(251),n(123),n(252),n(124),n(253),n(254),n(255),n(256),n(257),n(127),n(129),n(130),n(258),n(259),n(260),n(261),n(262),n(263),n(264),n(265),n(266),n(267),n(268),n(269),n(270),n(271),n(272),n(273),n(274),n(275),n(276),n(277),n(278),n(279),n(280),n(281),n(282),n(283),n(284),n(285),n(286),n(287),n(288),n(289),n(290),n(291),n(292),n(293),n(294),n(295),n(296),n(297),n(298),n(299),n(300),n(301),n(302),n(303),n(304),n(305),n(306),n(307),n(308),n(309),n(310),n(311),n(312),n(313),n(314),n(315),n(316),n(317),n(318),n(319),n(320),n(321),n(322),n(323),n(324),n(325),n(326),n(327),n(328),n(329),n(330),n(331),n(332),n(333),n(334),n(335),n(336),n(337),n(338),n(339),n(340),n(341),n(342),e.exports=n(21)},function(e,t,n){"use strict";var r=n(4),o=n(17),i=n(9),a=n(1),u=n(15),l=n(34).KEY,c=n(5),s=n(52),f=n(48),p=n(38),d=n(7),h=n(105),v=n(76),y=n(149),m=n(59),g=n(3),b=n(6),w=n(11),x=n(18),E=n(27),S=n(37),k=n(41),T=n(108),_=n(19),P=n(58),O=n(10),C=n(39),N=_.f,R=O.f,M=T.f,A=r.Symbol,F=r.JSON,j=F&&F.stringify,I=d("_hidden"),L=d("toPrimitive"),D={}.propertyIsEnumerable,z=s("symbol-registry"),U=s("symbols"),W=s("op-symbols"),B=Object.prototype,V="function"==typeof A&&!!P.f,$=r.QObject,H=!$||!$.prototype||!$.prototype.findChild,q=i&&c((function(){return 7!=k(R({},"a",{get:function(){return R(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=N(B,t);r&&delete B[t],R(e,t,n),r&&e!==B&&R(B,t,r)}:R,Q=function(e){var t=U[e]=k(A.prototype);return t._k=e,t},G=V&&"symbol"==typeof A.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof A},K=function(e,t,n){return e===B&&K(W,t,n),g(e),t=E(t,!0),g(n),o(U,t)?(n.enumerable?(o(e,I)&&e[I][t]&&(e[I][t]=!1),n=k(n,{enumerable:S(0,!1)})):(o(e,I)||R(e,I,S(1,{})),e[I][t]=!0),q(e,t,n)):R(e,t,n)},Y=function(e,t){g(e);for(var n,r=y(t=x(t)),o=0,i=r.length;i>o;)K(e,n=r[o++],t[n]);return e},X=function(e){var t=D.call(this,e=E(e,!0));return!(this===B&&o(U,e)&&!o(W,e))&&(!(t||!o(this,e)||!o(U,e)||o(this,I)&&this[I][e])||t)},J=function(e,t){if(e=x(e),t=E(t,!0),e!==B||!o(U,t)||o(W,t)){var n=N(e,t);return!n||!o(U,t)||o(e,I)&&e[I][t]||(n.enumerable=!0),n}},Z=function(e){for(var t,n=M(x(e)),r=[],i=0;n.length>i;)o(U,t=n[i++])||t==I||t==l||r.push(t);return r},ee=function(e){for(var t,n=e===B,r=M(n?W:x(e)),i=[],a=0;r.length>a;)!o(U,t=r[a++])||n&&!o(B,t)||i.push(U[t]);return i};V||(u((A=function(){if(this instanceof A)throw TypeError("Symbol is not a constructor!");var e=p(arguments.length>0?arguments[0]:void 0),t=function(n){this===B&&t.call(W,n),o(this,I)&&o(this[I],e)&&(this[I][e]=!1),q(this,e,S(1,n))};return i&&H&&q(B,e,{configurable:!0,set:t}),Q(e)}).prototype,"toString",(function(){return this._k})),_.f=J,O.f=K,n(42).f=T.f=Z,n(54).f=X,P.f=ee,i&&!n(33)&&u(B,"propertyIsEnumerable",X,!0),h.f=function(e){return Q(d(e))}),a(a.G+a.W+a.F*!V,{Symbol:A});for(var te="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),ne=0;te.length>ne;)d(te[ne++]);for(var re=C(d.store),oe=0;re.length>oe;)v(re[oe++]);a(a.S+a.F*!V,"Symbol",{for:function(e){return o(z,e+="")?z[e]:z[e]=A(e)},keyFor:function(e){if(!G(e))throw TypeError(e+" is not a symbol!");for(var t in z)if(z[t]===e)return t},useSetter:function(){H=!0},useSimple:function(){H=!1}}),a(a.S+a.F*!V,"Object",{create:function(e,t){return void 0===t?k(e):Y(k(e),t)},defineProperty:K,defineProperties:Y,getOwnPropertyDescriptor:J,getOwnPropertyNames:Z,getOwnPropertySymbols:ee});var ie=c((function(){P.f(1)}));a(a.S+a.F*ie,"Object",{getOwnPropertySymbols:function(e){return P.f(w(e))}}),F&&a(a.S+a.F*(!V||c((function(){var e=A();return"[null]"!=j([e])||"{}"!=j({a:e})||"{}"!=j(Object(e))}))),"JSON",{stringify:function(e){for(var t,n,r=[e],o=1;arguments.length>o;)r.push(arguments[o++]);if(n=t=r[1],(b(t)||void 0!==e)&&!G(e))return m(t)||(t=function(e,t){if("function"==typeof n&&(t=n.call(this,e,t)),!G(t))return t}),r[1]=t,j.apply(F,r)}}),A.prototype[L]||n(14)(A.prototype,L,A.prototype.valueOf),f(A,"Symbol"),f(Math,"Math",!0),f(r.JSON,"JSON",!0)},function(e,t,n){e.exports=n(52)("native-function-to-string",Function.toString)},function(e,t,n){var r=n(39),o=n(58),i=n(54);e.exports=function(e){var t=r(e),n=o.f;if(n)for(var a,u=n(e),l=i.f,c=0;u.length>c;)l.call(e,a=u[c++])&&t.push(a);return t}},function(e,t,n){var r=n(1);r(r.S,"Object",{create:n(41)})},function(e,t,n){var r=n(1);r(r.S+r.F*!n(9),"Object",{defineProperty:n(10).f})},function(e,t,n){var r=n(1);r(r.S+r.F*!n(9),"Object",{defineProperties:n(107)})},function(e,t,n){var r=n(18),o=n(19).f;n(29)("getOwnPropertyDescriptor",(function(){return function(e,t){return o(r(e),t)}}))},function(e,t,n){var r=n(11),o=n(20);n(29)("getPrototypeOf",(function(){return function(e){return o(r(e))}}))},function(e,t,n){var r=n(11),o=n(39);n(29)("keys",(function(){return function(e){return o(r(e))}}))},function(e,t,n){n(29)("getOwnPropertyNames",(function(){return n(108).f}))},function(e,t,n){var r=n(6),o=n(34).onFreeze;n(29)("freeze",(function(e){return function(t){return e&&r(t)?e(o(t)):t}}))},function(e,t,n){var r=n(6),o=n(34).onFreeze;n(29)("seal",(function(e){return function(t){return e&&r(t)?e(o(t)):t}}))},function(e,t,n){var r=n(6),o=n(34).onFreeze;n(29)("preventExtensions",(function(e){return function(t){return e&&r(t)?e(o(t)):t}}))},function(e,t,n){var r=n(6);n(29)("isFrozen",(function(e){return function(t){return!r(t)||!!e&&e(t)}}))},function(e,t,n){var r=n(6);n(29)("isSealed",(function(e){return function(t){return!r(t)||!!e&&e(t)}}))},function(e,t,n){var r=n(6);n(29)("isExtensible",(function(e){return function(t){return!!r(t)&&(!e||e(t))}}))},function(e,t,n){var r=n(1);r(r.S+r.F,"Object",{assign:n(109)})},function(e,t,n){var r=n(1);r(r.S,"Object",{is:n(110)})},function(e,t,n){var r=n(1);r(r.S,"Object",{setPrototypeOf:n(80).set})},function(e,t,n){"use strict";var r=n(49),o={};o[n(7)("toStringTag")]="z",o+""!="[object z]"&&n(15)(Object.prototype,"toString",(function(){return"[object "+r(this)+"]"}),!0)},function(e,t,n){var r=n(1);r(r.P,"Function",{bind:n(111)})},function(e,t,n){var r=n(10).f,o=Function.prototype,i=/^\s*function ([^ (]*)/;"name"in o||n(9)&&r(o,"name",{configurable:!0,get:function(){try{return(""+this).match(i)[1]}catch(e){return""}}})},function(e,t,n){"use strict";var r=n(6),o=n(20),i=n(7)("hasInstance"),a=Function.prototype;i in a||n(10).f(a,i,{value:function(e){if("function"!=typeof this||!r(e))return!1;if(!r(this.prototype))return e instanceof this;for(;e=o(e);)if(this.prototype===e)return!0;return!1}})},function(e,t,n){var r=n(1),o=n(113);r(r.G+r.F*(parseInt!=o),{parseInt:o})},function(e,t,n){var r=n(1),o=n(114);r(r.G+r.F*(parseFloat!=o),{parseFloat:o})},function(e,t,n){"use strict";var r=n(4),o=n(17),i=n(23),a=n(82),u=n(27),l=n(5),c=n(42).f,s=n(19).f,f=n(10).f,p=n(50).trim,d=r.Number,h=d,v=d.prototype,y="Number"==i(n(41)(v)),m="trim"in String.prototype,g=function(e){var t=u(e,!1);if("string"==typeof t&&t.length>2){var n,r,o,i=(t=m?t.trim():p(t,3)).charCodeAt(0);if(43===i||45===i){if(88===(n=t.charCodeAt(2))||120===n)return NaN}else if(48===i){switch(t.charCodeAt(1)){case 66:case 98:r=2,o=49;break;case 79:case 111:r=8,o=55;break;default:return+t}for(var a,l=t.slice(2),c=0,s=l.length;c<s;c++)if((a=l.charCodeAt(c))<48||a>o)return NaN;return parseInt(l,r)}}return+t};if(!d(" 0o1")||!d("0b1")||d("+0x1")){d=function(e){var t=arguments.length<1?0:e,n=this;return n instanceof d&&(y?l((function(){v.valueOf.call(n)})):"Number"!=i(n))?a(new h(g(t)),n,d):g(t)};for(var b,w=n(9)?c(h):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),x=0;w.length>x;x++)o(h,b=w[x])&&!o(d,b)&&f(d,b,s(h,b));d.prototype=v,v.constructor=d,n(15)(r,"Number",d)}},function(e,t,n){"use strict";var r=n(1),o=n(24),i=n(115),a=n(83),u=1..toFixed,l=Math.floor,c=[0,0,0,0,0,0],s="Number.toFixed: incorrect invocation!",f=function(e,t){for(var n=-1,r=t;++n<6;)r+=e*c[n],c[n]=r%1e7,r=l(r/1e7)},p=function(e){for(var t=6,n=0;--t>=0;)n+=c[t],c[t]=l(n/e),n=n%e*1e7},d=function(){for(var e=6,t="";--e>=0;)if(""!==t||0===e||0!==c[e]){var n=String(c[e]);t=""===t?n:t+a.call("0",7-n.length)+n}return t},h=function(e,t,n){return 0===t?n:t%2==1?h(e,t-1,n*e):h(e*e,t/2,n)};r(r.P+r.F*(!!u&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!n(5)((function(){u.call({})}))),"Number",{toFixed:function(e){var t,n,r,u,l=i(this,s),c=o(e),v="",y="0";if(c<0||c>20)throw RangeError(s);if(l!=l)return"NaN";if(l<=-1e21||l>=1e21)return String(l);if(l<0&&(v="-",l=-l),l>1e-21)if(n=(t=function(e){for(var t=0,n=e;n>=4096;)t+=12,n/=4096;for(;n>=2;)t+=1,n/=2;return t}(l*h(2,69,1))-69)<0?l*h(2,-t,1):l/h(2,t,1),n*=4503599627370496,(t=52-t)>0){for(f(0,n),r=c;r>=7;)f(1e7,0),r-=7;for(f(h(10,r,1),0),r=t-1;r>=23;)p(1<<23),r-=23;p(1<<r),f(1,1),p(2),y=d()}else f(0,n),f(1<<-t,0),y=d()+a.call("0",c);return y=c>0?v+((u=y.length)<=c?"0."+a.call("0",c-u)+y:y.slice(0,u-c)+"."+y.slice(u-c)):v+y}})},function(e,t,n){"use strict";var r=n(1),o=n(5),i=n(115),a=1..toPrecision;r(r.P+r.F*(o((function(){return"1"!==a.call(1,void 0)}))||!o((function(){a.call({})}))),"Number",{toPrecision:function(e){var t=i(this,"Number#toPrecision: incorrect invocation!");return void 0===e?a.call(t):a.call(t,e)}})},function(e,t,n){var r=n(1);r(r.S,"Number",{EPSILON:Math.pow(2,-52)})},function(e,t,n){var r=n(1),o=n(4).isFinite;r(r.S,"Number",{isFinite:function(e){return"number"==typeof e&&o(e)}})},function(e,t,n){var r=n(1);r(r.S,"Number",{isInteger:n(116)})},function(e,t,n){var r=n(1);r(r.S,"Number",{isNaN:function(e){return e!=e}})},function(e,t,n){var r=n(1),o=n(116),i=Math.abs;r(r.S,"Number",{isSafeInteger:function(e){return o(e)&&i(e)<=9007199254740991}})},function(e,t,n){var r=n(1);r(r.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},function(e,t,n){var r=n(1);r(r.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},function(e,t,n){var r=n(1),o=n(114);r(r.S+r.F*(Number.parseFloat!=o),"Number",{parseFloat:o})},function(e,t,n){var r=n(1),o=n(113);r(r.S+r.F*(Number.parseInt!=o),"Number",{parseInt:o})},function(e,t,n){var r=n(1),o=n(117),i=Math.sqrt,a=Math.acosh;r(r.S+r.F*!(a&&710==Math.floor(a(Number.MAX_VALUE))&&a(1/0)==1/0),"Math",{acosh:function(e){return(e=+e)<1?NaN:e>94906265.62425156?Math.log(e)+Math.LN2:o(e-1+i(e-1)*i(e+1))}})},function(e,t,n){var r=n(1),o=Math.asinh;r(r.S+r.F*!(o&&1/o(0)>0),"Math",{asinh:function e(t){return isFinite(t=+t)&&0!=t?t<0?-e(-t):Math.log(t+Math.sqrt(t*t+1)):t}})},function(e,t,n){var r=n(1),o=Math.atanh;r(r.S+r.F*!(o&&1/o(-0)<0),"Math",{atanh:function(e){return 0==(e=+e)?e:Math.log((1+e)/(1-e))/2}})},function(e,t,n){var r=n(1),o=n(84);r(r.S,"Math",{cbrt:function(e){return o(e=+e)*Math.pow(Math.abs(e),1/3)}})},function(e,t,n){var r=n(1);r(r.S,"Math",{clz32:function(e){return(e>>>=0)?31-Math.floor(Math.log(e+.5)*Math.LOG2E):32}})},function(e,t,n){var r=n(1),o=Math.exp;r(r.S,"Math",{cosh:function(e){return(o(e=+e)+o(-e))/2}})},function(e,t,n){var r=n(1),o=n(85);r(r.S+r.F*(o!=Math.expm1),"Math",{expm1:o})},function(e,t,n){var r=n(1);r(r.S,"Math",{fround:n(118)})},function(e,t,n){var r=n(1),o=Math.abs;r(r.S,"Math",{hypot:function(e,t){for(var n,r,i=0,a=0,u=arguments.length,l=0;a<u;)l<(n=o(arguments[a++]))?(i=i*(r=l/n)*r+1,l=n):i+=n>0?(r=n/l)*r:n;return l===1/0?1/0:l*Math.sqrt(i)}})},function(e,t,n){var r=n(1),o=Math.imul;r(r.S+r.F*n(5)((function(){return-5!=o(4294967295,5)||2!=o.length})),"Math",{imul:function(e,t){var n=+e,r=+t,o=65535&n,i=65535&r;return 0|o*i+((65535&n>>>16)*i+o*(65535&r>>>16)<<16>>>0)}})},function(e,t,n){var r=n(1);r(r.S,"Math",{log10:function(e){return Math.log(e)*Math.LOG10E}})},function(e,t,n){var r=n(1);r(r.S,"Math",{log1p:n(117)})},function(e,t,n){var r=n(1);r(r.S,"Math",{log2:function(e){return Math.log(e)/Math.LN2}})},function(e,t,n){var r=n(1);r(r.S,"Math",{sign:n(84)})},function(e,t,n){var r=n(1),o=n(85),i=Math.exp;r(r.S+r.F*n(5)((function(){return-2e-17!=!Math.sinh(-2e-17)})),"Math",{sinh:function(e){return Math.abs(e=+e)<1?(o(e)-o(-e))/2:(i(e-1)-i(-e-1))*(Math.E/2)}})},function(e,t,n){var r=n(1),o=n(85),i=Math.exp;r(r.S,"Math",{tanh:function(e){var t=o(e=+e),n=o(-e);return t==1/0?1:n==1/0?-1:(t-n)/(i(e)+i(-e))}})},function(e,t,n){var r=n(1);r(r.S,"Math",{trunc:function(e){return(e>0?Math.floor:Math.ceil)(e)}})},function(e,t,n){var r=n(1),o=n(40),i=String.fromCharCode,a=String.fromCodePoint;r(r.S+r.F*(!!a&&1!=a.length),"String",{fromCodePoint:function(e){for(var t,n=[],r=arguments.length,a=0;r>a;){if(t=+arguments[a++],o(t,1114111)!==t)throw RangeError(t+" is not a valid code point");n.push(t<65536?i(t):i(55296+((t-=65536)>>10),t%1024+56320))}return n.join("")}})},function(e,t,n){var r=n(1),o=n(18),i=n(8);r(r.S,"String",{raw:function(e){for(var t=o(e.raw),n=i(t.length),r=arguments.length,a=[],u=0;n>u;)a.push(String(t[u++])),u<r&&a.push(String(arguments[u]));return a.join("")}})},function(e,t,n){"use strict";n(50)("trim",(function(e){return function(){return e(this,3)}}))},function(e,t,n){"use strict";var r=n(60)(!0);n(86)(String,"String",(function(e){this._t=String(e),this._i=0}),(function(){var e,t=this._t,n=this._i;return n>=t.length?{value:void 0,done:!0}:(e=r(t,n),this._i+=e.length,{value:e,done:!1})}))},function(e,t,n){"use strict";var r=n(1),o=n(60)(!1);r(r.P,"String",{codePointAt:function(e){return o(this,e)}})},function(e,t,n){"use strict";var r=n(1),o=n(8),i=n(88),a="".endsWith;r(r.P+r.F*n(89)("endsWith"),"String",{endsWith:function(e){var t=i(this,e,"endsWith"),n=arguments.length>1?arguments[1]:void 0,r=o(t.length),u=void 0===n?r:Math.min(o(n),r),l=String(e);return a?a.call(t,l,u):t.slice(u-l.length,u)===l}})},function(e,t,n){"use strict";var r=n(1),o=n(88);r(r.P+r.F*n(89)("includes"),"String",{includes:function(e){return!!~o(this,e,"includes").indexOf(e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){var r=n(1);r(r.P,"String",{repeat:n(83)})},function(e,t,n){"use strict";var r=n(1),o=n(8),i=n(88),a="".startsWith;r(r.P+r.F*n(89)("startsWith"),"String",{startsWith:function(e){var t=i(this,e,"startsWith"),n=o(Math.min(arguments.length>1?arguments[1]:void 0,t.length)),r=String(e);return a?a.call(t,r,n):t.slice(n,n+r.length)===r}})},function(e,t,n){"use strict";n(16)("anchor",(function(e){return function(t){return e(this,"a","name",t)}}))},function(e,t,n){"use strict";n(16)("big",(function(e){return function(){return e(this,"big","","")}}))},function(e,t,n){"use strict";n(16)("blink",(function(e){return function(){return e(this,"blink","","")}}))},function(e,t,n){"use strict";n(16)("bold",(function(e){return function(){return e(this,"b","","")}}))},function(e,t,n){"use strict";n(16)("fixed",(function(e){return function(){return e(this,"tt","","")}}))},function(e,t,n){"use strict";n(16)("fontcolor",(function(e){return function(t){return e(this,"font","color",t)}}))},function(e,t,n){"use strict";n(16)("fontsize",(function(e){return function(t){return e(this,"font","size",t)}}))},function(e,t,n){"use strict";n(16)("italics",(function(e){return function(){return e(this,"i","","")}}))},function(e,t,n){"use strict";n(16)("link",(function(e){return function(t){return e(this,"a","href",t)}}))},function(e,t,n){"use strict";n(16)("small",(function(e){return function(){return e(this,"small","","")}}))},function(e,t,n){"use strict";n(16)("strike",(function(e){return function(){return e(this,"strike","","")}}))},function(e,t,n){"use strict";n(16)("sub",(function(e){return function(){return e(this,"sub","","")}}))},function(e,t,n){"use strict";n(16)("sup",(function(e){return function(){return e(this,"sup","","")}}))},function(e,t,n){var r=n(1);r(r.S,"Date",{now:function(){return(new Date).getTime()}})},function(e,t,n){"use strict";var r=n(1),o=n(11),i=n(27);r(r.P+r.F*n(5)((function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})})),"Date",{toJSON:function(e){var t=o(this),n=i(t);return"number"!=typeof n||isFinite(n)?t.toISOString():null}})},function(e,t,n){var r=n(1),o=n(226);r(r.P+r.F*(Date.prototype.toISOString!==o),"Date",{toISOString:o})},function(e,t,n){"use strict";var r=n(5),o=Date.prototype.getTime,i=Date.prototype.toISOString,a=function(e){return e>9?e:"0"+e};e.exports=r((function(){return"0385-07-25T07:06:39.999Z"!=i.call(new Date(-50000000000001))}))||!r((function(){i.call(new Date(NaN))}))?function(){if(!isFinite(o.call(this)))throw RangeError("Invalid time value");var e=this,t=e.getUTCFullYear(),n=e.getUTCMilliseconds(),r=t<0?"-":t>9999?"+":"";return r+("00000"+Math.abs(t)).slice(r?-6:-4)+"-"+a(e.getUTCMonth()+1)+"-"+a(e.getUTCDate())+"T"+a(e.getUTCHours())+":"+a(e.getUTCMinutes())+":"+a(e.getUTCSeconds())+"."+(n>99?n:"0"+a(n))+"Z"}:i},function(e,t,n){var r=Date.prototype,o=r.toString,i=r.getTime;new Date(NaN)+""!="Invalid Date"&&n(15)(r,"toString",(function(){var e=i.call(this);return e==e?o.call(this):"Invalid Date"}))},function(e,t,n){var r=n(7)("toPrimitive"),o=Date.prototype;r in o||n(14)(o,r,n(229))},function(e,t,n){"use strict";var r=n(3),o=n(27);e.exports=function(e){if("string"!==e&&"number"!==e&&"default"!==e)throw TypeError("Incorrect hint");return o(r(this),"number"!=e)}},function(e,t,n){var r=n(1);r(r.S,"Array",{isArray:n(59)})},function(e,t,n){"use strict";var r=n(22),o=n(1),i=n(11),a=n(119),u=n(90),l=n(8),c=n(91),s=n(92);o(o.S+o.F*!n(62)((function(e){Array.from(e)})),"Array",{from:function(e){var t,n,o,f,p=i(e),d="function"==typeof this?this:Array,h=arguments.length,v=h>1?arguments[1]:void 0,y=void 0!==v,m=0,g=s(p);if(y&&(v=r(v,h>2?arguments[2]:void 0,2)),null==g||d==Array&&u(g))for(n=new d(t=l(p.length));t>m;m++)c(n,m,y?v(p[m],m):p[m]);else for(f=g.call(p),n=new d;!(o=f.next()).done;m++)c(n,m,y?a(f,v,[o.value,m],!0):o.value);return n.length=m,n}})},function(e,t,n){"use strict";var r=n(1),o=n(91);r(r.S+r.F*n(5)((function(){function e(){}return!(Array.of.call(e)instanceof e)})),"Array",{of:function(){for(var e=0,t=arguments.length,n=new("function"==typeof this?this:Array)(t);t>e;)o(n,e,arguments[e++]);return n.length=t,n}})},function(e,t,n){"use strict";var r=n(1),o=n(18),i=[].join;r(r.P+r.F*(n(53)!=Object||!n(25)(i)),"Array",{join:function(e){return i.call(o(this),void 0===e?",":e)}})},function(e,t,n){"use strict";var r=n(1),o=n(79),i=n(23),a=n(40),u=n(8),l=[].slice;r(r.P+r.F*n(5)((function(){o&&l.call(o)})),"Array",{slice:function(e,t){var n=u(this.length),r=i(this);if(t=void 0===t?n:t,"Array"==r)return l.call(this,e,t);for(var o=a(e,n),c=a(t,n),s=u(c-o),f=new Array(s),p=0;p<s;p++)f[p]="String"==r?this.charAt(o+p):this[o+p];return f}})},function(e,t,n){"use strict";var r=n(1),o=n(12),i=n(11),a=n(5),u=[].sort,l=[1,2,3];r(r.P+r.F*(a((function(){l.sort(void 0)}))||!a((function(){l.sort(null)}))||!n(25)(u)),"Array",{sort:function(e){return void 0===e?u.call(i(this)):u.call(i(this),o(e))}})},function(e,t,n){"use strict";var r=n(1),o=n(30)(0),i=n(25)([].forEach,!0);r(r.P+r.F*!i,"Array",{forEach:function(e){return o(this,e,arguments[1])}})},function(e,t,n){var r=n(6),o=n(59),i=n(7)("species");e.exports=function(e){var t;return o(e)&&("function"!=typeof(t=e.constructor)||t!==Array&&!o(t.prototype)||(t=void 0),r(t)&&null===(t=t[i])&&(t=void 0)),void 0===t?Array:t}},function(e,t,n){"use strict";var r=n(1),o=n(30)(1);r(r.P+r.F*!n(25)([].map,!0),"Array",{map:function(e){return o(this,e,arguments[1])}})},function(e,t,n){"use strict";var r=n(1),o=n(30)(2);r(r.P+r.F*!n(25)([].filter,!0),"Array",{filter:function(e){return o(this,e,arguments[1])}})},function(e,t,n){"use strict";var r=n(1),o=n(30)(3);r(r.P+r.F*!n(25)([].some,!0),"Array",{some:function(e){return o(this,e,arguments[1])}})},function(e,t,n){"use strict";var r=n(1),o=n(30)(4);r(r.P+r.F*!n(25)([].every,!0),"Array",{every:function(e){return o(this,e,arguments[1])}})},function(e,t,n){"use strict";var r=n(1),o=n(120);r(r.P+r.F*!n(25)([].reduce,!0),"Array",{reduce:function(e){return o(this,e,arguments.length,arguments[1],!1)}})},function(e,t,n){"use strict";var r=n(1),o=n(120);r(r.P+r.F*!n(25)([].reduceRight,!0),"Array",{reduceRight:function(e){return o(this,e,arguments.length,arguments[1],!0)}})},function(e,t,n){"use strict";var r=n(1),o=n(57)(!1),i=[].indexOf,a=!!i&&1/[1].indexOf(1,-0)<0;r(r.P+r.F*(a||!n(25)(i)),"Array",{indexOf:function(e){return a?i.apply(this,arguments)||0:o(this,e,arguments[1])}})},function(e,t,n){"use strict";var r=n(1),o=n(18),i=n(24),a=n(8),u=[].lastIndexOf,l=!!u&&1/[1].lastIndexOf(1,-0)<0;r(r.P+r.F*(l||!n(25)(u)),"Array",{lastIndexOf:function(e){if(l)return u.apply(this,arguments)||0;var t=o(this),n=a(t.length),r=n-1;for(arguments.length>1&&(r=Math.min(r,i(arguments[1]))),r<0&&(r=n+r);r>=0;r--)if(r in t&&t[r]===e)return r||0;return-1}})},function(e,t,n){var r=n(1);r(r.P,"Array",{copyWithin:n(121)}),n(35)("copyWithin")},function(e,t,n){var r=n(1);r(r.P,"Array",{fill:n(94)}),n(35)("fill")},function(e,t,n){"use strict";var r=n(1),o=n(30)(5),i=!0;"find"in[]&&Array(1).find((function(){i=!1})),r(r.P+r.F*i,"Array",{find:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}}),n(35)("find")},function(e,t,n){"use strict";var r=n(1),o=n(30)(6),i="findIndex",a=!0;i in[]&&Array(1)[i]((function(){a=!1})),r(r.P+r.F*a,"Array",{findIndex:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}}),n(35)(i)},function(e,t,n){n(43)("Array")},function(e,t,n){var r=n(4),o=n(82),i=n(10).f,a=n(42).f,u=n(61),l=n(55),c=r.RegExp,s=c,f=c.prototype,p=/a/g,d=/a/g,h=new c(p)!==p;if(n(9)&&(!h||n(5)((function(){return d[n(7)("match")]=!1,c(p)!=p||c(d)==d||"/a/i"!=c(p,"i")})))){c=function(e,t){var n=this instanceof c,r=u(e),i=void 0===t;return!n&&r&&e.constructor===c&&i?e:o(h?new s(r&&!i?e.source:e,t):s((r=e instanceof c)?e.source:e,r&&i?l.call(e):t),n?this:f,c)};for(var v=function(e){e in c||i(c,e,{configurable:!0,get:function(){return s[e]},set:function(t){s[e]=t}})},y=a(s),m=0;y.length>m;)v(y[m++]);f.constructor=c,c.prototype=f,n(15)(r,"RegExp",c)}n(43)("RegExp")},function(e,t,n){"use strict";n(124);var r=n(3),o=n(55),i=n(9),a=/./.toString,u=function(e){n(15)(RegExp.prototype,"toString",e,!0)};n(5)((function(){return"/a/b"!=a.call({source:"a",flags:"b"})}))?u((function(){var e=r(this);return"/".concat(e.source,"/","flags"in e?e.flags:!i&&e instanceof RegExp?o.call(e):void 0)})):"toString"!=a.name&&u((function(){return a.call(this)}))},function(e,t,n){"use strict";var r=n(3),o=n(8),i=n(97),a=n(63);n(64)("match",1,(function(e,t,n,u){return[function(n){var r=e(this),o=null==n?void 0:n[t];return void 0!==o?o.call(n,r):new RegExp(n)[t](String(r))},function(e){var t=u(n,e,this);if(t.done)return t.value;var l=r(e),c=String(this);if(!l.global)return a(l,c);var s=l.unicode;l.lastIndex=0;for(var f,p=[],d=0;null!==(f=a(l,c));){var h=String(f[0]);p[d]=h,""===h&&(l.lastIndex=i(c,o(l.lastIndex),s)),d++}return 0===d?null:p}]}))},function(e,t,n){"use strict";var r=n(3),o=n(11),i=n(8),a=n(24),u=n(97),l=n(63),c=Math.max,s=Math.min,f=Math.floor,p=/\$([$&`']|\d\d?|<[^>]*>)/g,d=/\$([$&`']|\d\d?)/g;n(64)("replace",2,(function(e,t,n,h){return[function(r,o){var i=e(this),a=null==r?void 0:r[t];return void 0!==a?a.call(r,i,o):n.call(String(i),r,o)},function(e,t){var o=h(n,e,this,t);if(o.done)return o.value;var f=r(e),p=String(this),d="function"==typeof t;d||(t=String(t));var y=f.global;if(y){var m=f.unicode;f.lastIndex=0}for(var g=[];;){var b=l(f,p);if(null===b)break;if(g.push(b),!y)break;""===String(b[0])&&(f.lastIndex=u(p,i(f.lastIndex),m))}for(var w,x="",E=0,S=0;S<g.length;S++){b=g[S];for(var k=String(b[0]),T=c(s(a(b.index),p.length),0),_=[],P=1;P<b.length;P++)_.push(void 0===(w=b[P])?w:String(w));var O=b.groups;if(d){var C=[k].concat(_,T,p);void 0!==O&&C.push(O);var N=String(t.apply(void 0,C))}else N=v(k,p,T,_,O,t);T>=E&&(x+=p.slice(E,T)+N,E=T+k.length)}return x+p.slice(E)}];function v(e,t,r,i,a,u){var l=r+e.length,c=i.length,s=d;return void 0!==a&&(a=o(a),s=p),n.call(u,s,(function(n,o){var u;switch(o.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,r);case"'":return t.slice(l);case"<":u=a[o.slice(1,-1)];break;default:var s=+o;if(0===s)return n;if(s>c){var p=f(s/10);return 0===p?n:p<=c?void 0===i[p-1]?o.charAt(1):i[p-1]+o.charAt(1):n}u=i[s-1]}return void 0===u?"":u}))}}))},function(e,t,n){"use strict";var r=n(3),o=n(110),i=n(63);n(64)("search",1,(function(e,t,n,a){return[function(n){var r=e(this),o=null==n?void 0:n[t];return void 0!==o?o.call(n,r):new RegExp(n)[t](String(r))},function(e){var t=a(n,e,this);if(t.done)return t.value;var u=r(e),l=String(this),c=u.lastIndex;o(c,0)||(u.lastIndex=0);var s=i(u,l);return o(u.lastIndex,c)||(u.lastIndex=c),null===s?-1:s.index}]}))},function(e,t,n){"use strict";var r=n(61),o=n(3),i=n(56),a=n(97),u=n(8),l=n(63),c=n(96),s=n(5),f=Math.min,p=[].push,d="length",h=!s((function(){RegExp(4294967295,"y")}));n(64)("split",2,(function(e,t,n,s){var v;return v="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1)[d]||2!="ab".split(/(?:ab)*/)[d]||4!=".".split(/(.?)(.?)/)[d]||".".split(/()()/)[d]>1||"".split(/.?/)[d]?function(e,t){var o=String(this);if(void 0===e&&0===t)return[];if(!r(e))return n.call(o,e,t);for(var i,a,u,l=[],s=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),f=0,h=void 0===t?4294967295:t>>>0,v=new RegExp(e.source,s+"g");(i=c.call(v,o))&&!((a=v.lastIndex)>f&&(l.push(o.slice(f,i.index)),i[d]>1&&i.index<o[d]&&p.apply(l,i.slice(1)),u=i[0][d],f=a,l[d]>=h));)v.lastIndex===i.index&&v.lastIndex++;return f===o[d]?!u&&v.test("")||l.push(""):l.push(o.slice(f)),l[d]>h?l.slice(0,h):l}:"0".split(void 0,0)[d]?function(e,t){return void 0===e&&0===t?[]:n.call(this,e,t)}:n,[function(n,r){var o=e(this),i=null==n?void 0:n[t];return void 0!==i?i.call(n,o,r):v.call(String(o),n,r)},function(e,t){var r=s(v,e,this,t,v!==n);if(r.done)return r.value;var c=o(e),p=String(this),d=i(c,RegExp),y=c.unicode,m=(c.ignoreCase?"i":"")+(c.multiline?"m":"")+(c.unicode?"u":"")+(h?"y":"g"),g=new d(h?c:"^(?:"+c.source+")",m),b=void 0===t?4294967295:t>>>0;if(0===b)return[];if(0===p.length)return null===l(g,p)?[p]:[];for(var w=0,x=0,E=[];x<p.length;){g.lastIndex=h?x:0;var S,k=l(g,h?p:p.slice(x));if(null===k||(S=f(u(g.lastIndex+(h?0:x)),p.length))===w)x=a(p,x,y);else{if(E.push(p.slice(w,x)),E.length===b)return E;for(var T=1;T<=k.length-1;T++)if(E.push(k[T]),E.length===b)return E;x=w=S}}return E.push(p.slice(w)),E}]}))},function(e,t,n){"use strict";var r,o,i,a,u=n(33),l=n(4),c=n(22),s=n(49),f=n(1),p=n(6),d=n(12),h=n(44),v=n(45),y=n(56),m=n(98).set,g=n(99)(),b=n(100),w=n(125),x=n(65),E=n(126),S=l.TypeError,k=l.process,T=k&&k.versions,_=T&&T.v8||"",P=l.Promise,O="process"==s(k),C=function(){},N=o=b.f,R=!!function(){try{var e=P.resolve(1),t=(e.constructor={})[n(7)("species")]=function(e){e(C,C)};return(O||"function"==typeof PromiseRejectionEvent)&&e.then(C)instanceof t&&0!==_.indexOf("6.6")&&-1===x.indexOf("Chrome/66")}catch(e){}}(),M=function(e){var t;return!(!p(e)||"function"!=typeof(t=e.then))&&t},A=function(e,t){if(!e._n){e._n=!0;var n=e._c;g((function(){for(var r=e._v,o=1==e._s,i=0,a=function(t){var n,i,a,u=o?t.ok:t.fail,l=t.resolve,c=t.reject,s=t.domain;try{u?(o||(2==e._h&&I(e),e._h=1),!0===u?n=r:(s&&s.enter(),n=u(r),s&&(s.exit(),a=!0)),n===t.promise?c(S("Promise-chain cycle")):(i=M(n))?i.call(n,l,c):l(n)):c(r)}catch(e){s&&!a&&s.exit(),c(e)}};n.length>i;)a(n[i++]);e._c=[],e._n=!1,t&&!e._h&&F(e)}))}},F=function(e){m.call(l,(function(){var t,n,r,o=e._v,i=j(e);if(i&&(t=w((function(){O?k.emit("unhandledRejection",o,e):(n=l.onunhandledrejection)?n({promise:e,reason:o}):(r=l.console)&&r.error&&r.error("Unhandled promise rejection",o)})),e._h=O||j(e)?2:1),e._a=void 0,i&&t.e)throw t.v}))},j=function(e){return 1!==e._h&&0===(e._a||e._c).length},I=function(e){m.call(l,(function(){var t;O?k.emit("rejectionHandled",e):(t=l.onrejectionhandled)&&t({promise:e,reason:e._v})}))},L=function(e){var t=this;t._d||(t._d=!0,(t=t._w||t)._v=e,t._s=2,t._a||(t._a=t._c.slice()),A(t,!0))},D=function(e){var t,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===e)throw S("Promise can't be resolved itself");(t=M(e))?g((function(){var r={_w:n,_d:!1};try{t.call(e,c(D,r,1),c(L,r,1))}catch(e){L.call(r,e)}})):(n._v=e,n._s=1,A(n,!1))}catch(e){L.call({_w:n,_d:!1},e)}}};R||(P=function(e){h(this,P,"Promise","_h"),d(e),r.call(this);try{e(c(D,this,1),c(L,this,1))}catch(e){L.call(this,e)}},(r=function(e){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=n(46)(P.prototype,{then:function(e,t){var n=N(y(this,P));return n.ok="function"!=typeof e||e,n.fail="function"==typeof t&&t,n.domain=O?k.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&A(this,!1),n.promise},catch:function(e){return this.then(void 0,e)}}),i=function(){var e=new r;this.promise=e,this.resolve=c(D,e,1),this.reject=c(L,e,1)},b.f=N=function(e){return e===P||e===a?new i(e):o(e)}),f(f.G+f.W+f.F*!R,{Promise:P}),n(48)(P,"Promise"),n(43)("Promise"),a=n(21).Promise,f(f.S+f.F*!R,"Promise",{reject:function(e){var t=N(this);return(0,t.reject)(e),t.promise}}),f(f.S+f.F*(u||!R),"Promise",{resolve:function(e){return E(u&&this===a?P:this,e)}}),f(f.S+f.F*!(R&&n(62)((function(e){P.all(e).catch(C)}))),"Promise",{all:function(e){var t=this,n=N(t),r=n.resolve,o=n.reject,i=w((function(){var n=[],i=0,a=1;v(e,!1,(function(e){var u=i++,l=!1;n.push(void 0),a++,t.resolve(e).then((function(e){l||(l=!0,n[u]=e,--a||r(n))}),o)})),--a||r(n)}));return i.e&&o(i.v),n.promise},race:function(e){var t=this,n=N(t),r=n.reject,o=w((function(){v(e,!1,(function(e){t.resolve(e).then(n.resolve,r)}))}));return o.e&&r(o.v),n.promise}})},function(e,t,n){"use strict";var r=n(131),o=n(47);n(66)("WeakSet",(function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}}),{add:function(e){return r.def(o(this,"WeakSet"),e,!0)}},r,!1,!0)},function(e,t,n){"use strict";var r=n(1),o=n(67),i=n(101),a=n(3),u=n(40),l=n(8),c=n(6),s=n(4).ArrayBuffer,f=n(56),p=i.ArrayBuffer,d=i.DataView,h=o.ABV&&s.isView,v=p.prototype.slice,y=o.VIEW;r(r.G+r.W+r.F*(s!==p),{ArrayBuffer:p}),r(r.S+r.F*!o.CONSTR,"ArrayBuffer",{isView:function(e){return h&&h(e)||c(e)&&y in e}}),r(r.P+r.U+r.F*n(5)((function(){return!new p(2).slice(1,void 0).byteLength})),"ArrayBuffer",{slice:function(e,t){if(void 0!==v&&void 0===t)return v.call(a(this),e);for(var n=a(this).byteLength,r=u(e,n),o=u(void 0===t?n:t,n),i=new(f(this,p))(l(o-r)),c=new d(this),s=new d(i),h=0;r<o;)s.setUint8(h++,c.getUint8(r++));return i}}),n(43)("ArrayBuffer")},function(e,t,n){var r=n(1);r(r.G+r.W+r.F*!n(67).ABV,{DataView:n(101).DataView})},function(e,t,n){n(31)("Int8",1,(function(e){return function(t,n,r){return e(this,t,n,r)}}))},function(e,t,n){n(31)("Uint8",1,(function(e){return function(t,n,r){return e(this,t,n,r)}}))},function(e,t,n){n(31)("Uint8",1,(function(e){return function(t,n,r){return e(this,t,n,r)}}),!0)},function(e,t,n){n(31)("Int16",2,(function(e){return function(t,n,r){return e(this,t,n,r)}}))},function(e,t,n){n(31)("Uint16",2,(function(e){return function(t,n,r){return e(this,t,n,r)}}))},function(e,t,n){n(31)("Int32",4,(function(e){return function(t,n,r){return e(this,t,n,r)}}))},function(e,t,n){n(31)("Uint32",4,(function(e){return function(t,n,r){return e(this,t,n,r)}}))},function(e,t,n){n(31)("Float32",4,(function(e){return function(t,n,r){return e(this,t,n,r)}}))},function(e,t,n){n(31)("Float64",8,(function(e){return function(t,n,r){return e(this,t,n,r)}}))},function(e,t,n){var r=n(1),o=n(12),i=n(3),a=(n(4).Reflect||{}).apply,u=Function.apply;r(r.S+r.F*!n(5)((function(){a((function(){}))})),"Reflect",{apply:function(e,t,n){var r=o(e),l=i(n);return a?a(r,t,l):u.call(r,t,l)}})},function(e,t,n){var r=n(1),o=n(41),i=n(12),a=n(3),u=n(6),l=n(5),c=n(111),s=(n(4).Reflect||{}).construct,f=l((function(){function e(){}return!(s((function(){}),[],e)instanceof e)})),p=!l((function(){s((function(){}))}));r(r.S+r.F*(f||p),"Reflect",{construct:function(e,t){i(e),a(t);var n=arguments.length<3?e:i(arguments[2]);if(p&&!f)return s(e,t,n);if(e==n){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var r=[null];return r.push.apply(r,t),new(c.apply(e,r))}var l=n.prototype,d=o(u(l)?l:Object.prototype),h=Function.apply.call(e,d,t);return u(h)?h:d}})},function(e,t,n){var r=n(10),o=n(1),i=n(3),a=n(27);o(o.S+o.F*n(5)((function(){Reflect.defineProperty(r.f({},1,{value:1}),1,{value:2})})),"Reflect",{defineProperty:function(e,t,n){i(e),t=a(t,!0),i(n);try{return r.f(e,t,n),!0}catch(e){return!1}}})},function(e,t,n){var r=n(1),o=n(19).f,i=n(3);r(r.S,"Reflect",{deleteProperty:function(e,t){var n=o(i(e),t);return!(n&&!n.configurable)&&delete e[t]}})},function(e,t,n){"use strict";var r=n(1),o=n(3),i=function(e){this._t=o(e),this._i=0;var t,n=this._k=[];for(t in e)n.push(t)};n(87)(i,"Object",(function(){var e,t=this._k;do{if(this._i>=t.length)return{value:void 0,done:!0}}while(!((e=t[this._i++])in this._t));return{value:e,done:!1}})),r(r.S,"Reflect",{enumerate:function(e){return new i(e)}})},function(e,t,n){var r=n(19),o=n(20),i=n(17),a=n(1),u=n(6),l=n(3);a(a.S,"Reflect",{get:function e(t,n){var a,c,s=arguments.length<3?t:arguments[2];return l(t)===s?t[n]:(a=r.f(t,n))?i(a,"value")?a.value:void 0!==a.get?a.get.call(s):void 0:u(c=o(t))?e(c,n,s):void 0}})},function(e,t,n){var r=n(19),o=n(1),i=n(3);o(o.S,"Reflect",{getOwnPropertyDescriptor:function(e,t){return r.f(i(e),t)}})},function(e,t,n){var r=n(1),o=n(20),i=n(3);r(r.S,"Reflect",{getPrototypeOf:function(e){return o(i(e))}})},function(e,t,n){var r=n(1);r(r.S,"Reflect",{has:function(e,t){return t in e}})},function(e,t,n){var r=n(1),o=n(3),i=Object.isExtensible;r(r.S,"Reflect",{isExtensible:function(e){return o(e),!i||i(e)}})},function(e,t,n){var r=n(1);r(r.S,"Reflect",{ownKeys:n(133)})},function(e,t,n){var r=n(1),o=n(3),i=Object.preventExtensions;r(r.S,"Reflect",{preventExtensions:function(e){o(e);try{return i&&i(e),!0}catch(e){return!1}}})},function(e,t,n){var r=n(10),o=n(19),i=n(20),a=n(17),u=n(1),l=n(37),c=n(3),s=n(6);u(u.S,"Reflect",{set:function e(t,n,u){var f,p,d=arguments.length<4?t:arguments[3],h=o.f(c(t),n);if(!h){if(s(p=i(t)))return e(p,n,u,d);h=l(0)}if(a(h,"value")){if(!1===h.writable||!s(d))return!1;if(f=o.f(d,n)){if(f.get||f.set||!1===f.writable)return!1;f.value=u,r.f(d,n,f)}else r.f(d,n,l(0,u));return!0}return void 0!==h.set&&(h.set.call(d,u),!0)}})},function(e,t,n){var r=n(1),o=n(80);o&&r(r.S,"Reflect",{setPrototypeOf:function(e,t){o.check(e,t);try{return o.set(e,t),!0}catch(e){return!1}}})},function(e,t,n){"use strict";var r=n(1),o=n(57)(!0);r(r.P,"Array",{includes:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}}),n(35)("includes")},function(e,t,n){"use strict";var r=n(1),o=n(134),i=n(11),a=n(8),u=n(12),l=n(93);r(r.P,"Array",{flatMap:function(e){var t,n,r=i(this);return u(e),t=a(r.length),n=l(r,0),o(n,r,r,t,0,1,e,arguments[1]),n}}),n(35)("flatMap")},function(e,t,n){"use strict";var r=n(1),o=n(134),i=n(11),a=n(8),u=n(24),l=n(93);r(r.P,"Array",{flatten:function(){var e=arguments[0],t=i(this),n=a(t.length),r=l(t,0);return o(r,t,t,n,0,void 0===e?1:u(e)),r}}),n(35)("flatten")},function(e,t,n){"use strict";var r=n(1),o=n(60)(!0);r(r.P,"String",{at:function(e){return o(this,e)}})},function(e,t,n){"use strict";var r=n(1),o=n(135),i=n(65),a=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(i);r(r.P+r.F*a,"String",{padStart:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0,!0)}})},function(e,t,n){"use strict";var r=n(1),o=n(135),i=n(65),a=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(i);r(r.P+r.F*a,"String",{padEnd:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0,!1)}})},function(e,t,n){"use strict";n(50)("trimLeft",(function(e){return function(){return e(this,1)}}),"trimStart")},function(e,t,n){"use strict";n(50)("trimRight",(function(e){return function(){return e(this,2)}}),"trimEnd")},function(e,t,n){"use strict";var r=n(1),o=n(28),i=n(8),a=n(61),u=n(55),l=RegExp.prototype,c=function(e,t){this._r=e,this._s=t};n(87)(c,"RegExp String",(function(){var e=this._r.exec(this._s);return{value:e,done:null===e}})),r(r.P,"String",{matchAll:function(e){if(o(this),!a(e))throw TypeError(e+" is not a regexp!");var t=String(this),n="flags"in l?String(e.flags):u.call(e),r=new RegExp(e.source,~n.indexOf("g")?n:"g"+n);return r.lastIndex=i(e.lastIndex),new c(r,t)}})},function(e,t,n){n(76)("asyncIterator")},function(e,t,n){n(76)("observable")},function(e,t,n){var r=n(1),o=n(133),i=n(18),a=n(19),u=n(91);r(r.S,"Object",{getOwnPropertyDescriptors:function(e){for(var t,n,r=i(e),l=a.f,c=o(r),s={},f=0;c.length>f;)void 0!==(n=l(r,t=c[f++]))&&u(s,t,n);return s}})},function(e,t,n){var r=n(1),o=n(136)(!1);r(r.S,"Object",{values:function(e){return o(e)}})},function(e,t,n){var r=n(1),o=n(136)(!0);r(r.S,"Object",{entries:function(e){return o(e)}})},function(e,t,n){"use strict";var r=n(1),o=n(11),i=n(12),a=n(10);n(9)&&r(r.P+n(68),"Object",{__defineGetter__:function(e,t){a.f(o(this),e,{get:i(t),enumerable:!0,configurable:!0})}})},function(e,t,n){"use strict";var r=n(1),o=n(11),i=n(12),a=n(10);n(9)&&r(r.P+n(68),"Object",{__defineSetter__:function(e,t){a.f(o(this),e,{set:i(t),enumerable:!0,configurable:!0})}})},function(e,t,n){"use strict";var r=n(1),o=n(11),i=n(27),a=n(20),u=n(19).f;n(9)&&r(r.P+n(68),"Object",{__lookupGetter__:function(e){var t,n=o(this),r=i(e,!0);do{if(t=u(n,r))return t.get}while(n=a(n))}})},function(e,t,n){"use strict";var r=n(1),o=n(11),i=n(27),a=n(20),u=n(19).f;n(9)&&r(r.P+n(68),"Object",{__lookupSetter__:function(e){var t,n=o(this),r=i(e,!0);do{if(t=u(n,r))return t.set}while(n=a(n))}})},function(e,t,n){var r=n(1);r(r.P+r.R,"Map",{toJSON:n(137)("Map")})},function(e,t,n){var r=n(1);r(r.P+r.R,"Set",{toJSON:n(137)("Set")})},function(e,t,n){n(69)("Map")},function(e,t,n){n(69)("Set")},function(e,t,n){n(69)("WeakMap")},function(e,t,n){n(69)("WeakSet")},function(e,t,n){n(70)("Map")},function(e,t,n){n(70)("Set")},function(e,t,n){n(70)("WeakMap")},function(e,t,n){n(70)("WeakSet")},function(e,t,n){var r=n(1);r(r.G,{global:n(4)})},function(e,t,n){var r=n(1);r(r.S,"System",{global:n(4)})},function(e,t,n){var r=n(1),o=n(23);r(r.S,"Error",{isError:function(e){return"Error"===o(e)}})},function(e,t,n){var r=n(1);r(r.S,"Math",{clamp:function(e,t,n){return Math.min(n,Math.max(t,e))}})},function(e,t,n){var r=n(1);r(r.S,"Math",{DEG_PER_RAD:Math.PI/180})},function(e,t,n){var r=n(1),o=180/Math.PI;r(r.S,"Math",{degrees:function(e){return e*o}})},function(e,t,n){var r=n(1),o=n(139),i=n(118);r(r.S,"Math",{fscale:function(e,t,n,r,a){return i(o(e,t,n,r,a))}})},function(e,t,n){var r=n(1);r(r.S,"Math",{iaddh:function(e,t,n,r){var o=e>>>0,i=n>>>0;return(t>>>0)+(r>>>0)+((o&i|(o|i)&~(o+i>>>0))>>>31)|0}})},function(e,t,n){var r=n(1);r(r.S,"Math",{isubh:function(e,t,n,r){var o=e>>>0,i=n>>>0;return(t>>>0)-(r>>>0)-((~o&i|~(o^i)&o-i>>>0)>>>31)|0}})},function(e,t,n){var r=n(1);r(r.S,"Math",{imulh:function(e,t){var n=+e,r=+t,o=65535&n,i=65535&r,a=n>>16,u=r>>16,l=(a*i>>>0)+(o*i>>>16);return a*u+(l>>16)+((o*u>>>0)+(65535&l)>>16)}})},function(e,t,n){var r=n(1);r(r.S,"Math",{RAD_PER_DEG:180/Math.PI})},function(e,t,n){var r=n(1),o=Math.PI/180;r(r.S,"Math",{radians:function(e){return e*o}})},function(e,t,n){var r=n(1);r(r.S,"Math",{scale:n(139)})},function(e,t,n){var r=n(1);r(r.S,"Math",{umulh:function(e,t){var n=+e,r=+t,o=65535&n,i=65535&r,a=n>>>16,u=r>>>16,l=(a*i>>>0)+(o*i>>>16);return a*u+(l>>>16)+((o*u>>>0)+(65535&l)>>>16)}})},function(e,t,n){var r=n(1);r(r.S,"Math",{signbit:function(e){return(e=+e)!=e?e:0==e?1/e==1/0:e>0}})},function(e,t,n){"use strict";var r=n(1),o=n(21),i=n(4),a=n(56),u=n(126);r(r.P+r.R,"Promise",{finally:function(e){var t=a(this,o.Promise||i.Promise),n="function"==typeof e;return this.then(n?function(n){return u(t,e()).then((function(){return n}))}:e,n?function(n){return u(t,e()).then((function(){throw n}))}:e)}})},function(e,t,n){"use strict";var r=n(1),o=n(100),i=n(125);r(r.S,"Promise",{try:function(e){var t=o.f(this),n=i(e);return(n.e?t.reject:t.resolve)(n.v),t.promise}})},function(e,t,n){var r=n(32),o=n(3),i=r.key,a=r.set;r.exp({defineMetadata:function(e,t,n,r){a(e,t,o(n),i(r))}})},function(e,t,n){var r=n(32),o=n(3),i=r.key,a=r.map,u=r.store;r.exp({deleteMetadata:function(e,t){var n=arguments.length<3?void 0:i(arguments[2]),r=a(o(t),n,!1);if(void 0===r||!r.delete(e))return!1;if(r.size)return!0;var l=u.get(t);return l.delete(n),!!l.size||u.delete(t)}})},function(e,t,n){var r=n(32),o=n(3),i=n(20),a=r.has,u=r.get,l=r.key,c=function(e,t,n){if(a(e,t,n))return u(e,t,n);var r=i(t);return null!==r?c(e,r,n):void 0};r.exp({getMetadata:function(e,t){return c(e,o(t),arguments.length<3?void 0:l(arguments[2]))}})},function(e,t,n){var r=n(129),o=n(138),i=n(32),a=n(3),u=n(20),l=i.keys,c=i.key,s=function(e,t){var n=l(e,t),i=u(e);if(null===i)return n;var a=s(i,t);return a.length?n.length?o(new r(n.concat(a))):a:n};i.exp({getMetadataKeys:function(e){return s(a(e),arguments.length<2?void 0:c(arguments[1]))}})},function(e,t,n){var r=n(32),o=n(3),i=r.get,a=r.key;r.exp({getOwnMetadata:function(e,t){return i(e,o(t),arguments.length<3?void 0:a(arguments[2]))}})},function(e,t,n){var r=n(32),o=n(3),i=r.keys,a=r.key;r.exp({getOwnMetadataKeys:function(e){return i(o(e),arguments.length<2?void 0:a(arguments[1]))}})},function(e,t,n){var r=n(32),o=n(3),i=n(20),a=r.has,u=r.key,l=function(e,t,n){if(a(e,t,n))return!0;var r=i(t);return null!==r&&l(e,r,n)};r.exp({hasMetadata:function(e,t){return l(e,o(t),arguments.length<3?void 0:u(arguments[2]))}})},function(e,t,n){var r=n(32),o=n(3),i=r.has,a=r.key;r.exp({hasOwnMetadata:function(e,t){return i(e,o(t),arguments.length<3?void 0:a(arguments[2]))}})},function(e,t,n){var r=n(32),o=n(3),i=n(12),a=r.key,u=r.set;r.exp({metadata:function(e,t){return function(n,r){u(e,t,(void 0!==r?o:i)(n),a(r))}}})},function(e,t,n){var r=n(1),o=n(99)(),i=n(4).process,a="process"==n(23)(i);r(r.G,{asap:function(e){var t=a&&i.domain;o(t?t.bind(e):e)}})},function(e,t,n){"use strict";var r=n(1),o=n(4),i=n(21),a=n(99)(),u=n(7)("observable"),l=n(12),c=n(3),s=n(44),f=n(46),p=n(14),d=n(45),h=d.RETURN,v=function(e){return null==e?void 0:l(e)},y=function(e){var t=e._c;t&&(e._c=void 0,t())},m=function(e){return void 0===e._o},g=function(e){m(e)||(e._o=void 0,y(e))},b=function(e,t){c(e),this._c=void 0,this._o=e,e=new w(this);try{var n=t(e),r=n;null!=n&&("function"==typeof n.unsubscribe?n=function(){r.unsubscribe()}:l(n),this._c=n)}catch(t){return void e.error(t)}m(this)&&y(this)};b.prototype=f({},{unsubscribe:function(){g(this)}});var w=function(e){this._s=e};w.prototype=f({},{next:function(e){var t=this._s;if(!m(t)){var n=t._o;try{var r=v(n.next);if(r)return r.call(n,e)}catch(e){try{g(t)}finally{throw e}}}},error:function(e){var t=this._s;if(m(t))throw e;var n=t._o;t._o=void 0;try{var r=v(n.error);if(!r)throw e;e=r.call(n,e)}catch(e){try{y(t)}finally{throw e}}return y(t),e},complete:function(e){var t=this._s;if(!m(t)){var n=t._o;t._o=void 0;try{var r=v(n.complete);e=r?r.call(n,e):void 0}catch(e){try{y(t)}finally{throw e}}return y(t),e}}});var x=function(e){s(this,x,"Observable","_f")._f=l(e)};f(x.prototype,{subscribe:function(e){return new b(e,this._f)},forEach:function(e){var t=this;return new(i.Promise||o.Promise)((function(n,r){l(e);var o=t.subscribe({next:function(t){try{return e(t)}catch(e){r(e),o.unsubscribe()}},error:r,complete:n})}))}}),f(x,{from:function(e){var t="function"==typeof this?this:x,n=v(c(e)[u]);if(n){var r=c(n.call(e));return r.constructor===t?r:new t((function(e){return r.subscribe(e)}))}return new t((function(t){var n=!1;return a((function(){if(!n){try{if(d(e,!1,(function(e){if(t.next(e),n)return h}))===h)return}catch(e){if(n)throw e;return void t.error(e)}t.complete()}})),function(){n=!0}}))},of:function(){for(var e=0,t=arguments.length,n=new Array(t);e<t;)n[e]=arguments[e++];return new("function"==typeof this?this:x)((function(e){var t=!1;return a((function(){if(!t){for(var r=0;r<n.length;++r)if(e.next(n[r]),t)return;e.complete()}})),function(){t=!0}}))}}),p(x.prototype,u,(function(){return this})),r(r.G,{Observable:x}),n(43)("Observable")},function(e,t,n){var r=n(4),o=n(1),i=n(65),a=[].slice,u=/MSIE .\./.test(i),l=function(e){return function(t,n){var r=arguments.length>2,o=!!r&&a.call(arguments,2);return e(r?function(){("function"==typeof t?t:Function(t)).apply(this,o)}:t,n)}};o(o.G+o.B+o.F*u,{setTimeout:l(r.setTimeout),setInterval:l(r.setInterval)})},function(e,t,n){var r=n(1),o=n(98);r(r.G+r.B,{setImmediate:o.set,clearImmediate:o.clear})},function(e,t,n){for(var r=n(95),o=n(39),i=n(15),a=n(4),u=n(14),l=n(51),c=n(7),s=c("iterator"),f=c("toStringTag"),p=l.Array,d={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},h=o(d),v=0;v<h.length;v++){var y,m=h[v],g=d[m],b=a[m],w=b&&b.prototype;if(w&&(w[s]||u(w,s,p),w[f]||u(w,f,m),l[m]=p,g))for(y in r)w[y]||i(w,y,r[y],!0)}},function(e,t,n){(function(t){!function(t){"use strict";var n=Object.prototype,r=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag",l="object"==typeof e,c=t.regeneratorRuntime;if(c)l&&(e.exports=c);else{(c=t.regeneratorRuntime=l?e.exports:{}).wrap=v;var s={},f={};f[i]=function(){return this};var p=Object.getPrototypeOf,d=p&&p(p(_([])));d&&d!==n&&r.call(d,i)&&(f=d);var h=b.prototype=m.prototype=Object.create(f);g.prototype=h.constructor=b,b.constructor=g,b[u]=g.displayName="GeneratorFunction",c.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},c.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,u in e||(e[u]="GeneratorFunction")),e.prototype=Object.create(h),e},c.awrap=function(e){return{__await:e}},w(x.prototype),x.prototype[a]=function(){return this},c.AsyncIterator=x,c.async=function(e,t,n,r){var o=new x(v(e,t,n,r));return c.isGeneratorFunction(t)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},w(h),h[u]="Generator",h[i]=function(){return this},h.toString=function(){return"[object Generator]"},c.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},c.values=_,T.prototype={constructor:T,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(k),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),l=r.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,s):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),s},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),k(n),s}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;k(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:_(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),s}}}function v(e,t,n,r){var o=t&&t.prototype instanceof m?t:m,i=Object.create(o.prototype),a=new T(r||[]);return i._invoke=function(e,t,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return P()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var u=E(a,n);if(u){if(u===s)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=y(e,t,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===s)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}(e,n,a),i}function y(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}function m(){}function g(){}function b(){}function w(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function x(e){function n(t,o,i,a){var u=y(e[t],e,o);if("throw"!==u.type){var l=u.arg,c=l.value;return c&&"object"==typeof c&&r.call(c,"__await")?Promise.resolve(c.__await).then((function(e){n("next",e,i,a)}),(function(e){n("throw",e,i,a)})):Promise.resolve(c).then((function(e){l.value=e,i(l)}),a)}a(u.arg)}var o;"object"==typeof t.process&&t.process.domain&&(n=t.process.domain.bind(n)),this._invoke=function(e,t){function r(){return new Promise((function(r,o){n(e,t,r,o)}))}return o=o?o.then(r,r):r()}}function E(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,E(e,t),"throw"===t.method))return s;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return s}var r=y(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,s;var o=r.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,s):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,s)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function k(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function _(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:P}}function P(){return{value:void 0,done:!0}}}("object"==typeof t?t:"object"==typeof window?window:"object"==typeof self?self:this)}).call(this,n(103))},function(e,t,n){n(345),e.exports=n(21).RegExp.escape},function(e,t,n){var r=n(1),o=n(346)(/[\\^$*+?.()|[\]{}]/g,"\\$&");r(r.S,"RegExp",{escape:function(e){return o(e)}})},function(e,t){e.exports=function(e,t){var n=t===Object(t)?function(e){return t[e]}:t;return function(t){return String(t).replace(e,n)}}},function(e,t,n){"use strict";var r="URLSearchParams"in self,o="Symbol"in self&&"iterator"in Symbol,i="FileReader"in self&&"Blob"in self&&function(){try{return new Blob,!0}catch(e){return!1}}(),a="FormData"in self,u="ArrayBuffer"in self;if(u)var l=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],c=ArrayBuffer.isView||function(e){return e&&l.indexOf(Object.prototype.toString.call(e))>-1};function s(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function f(e){return"string"!=typeof e&&(e=String(e)),e}function p(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return o&&(t[Symbol.iterator]=function(){return t}),t}function d(e){this.map={},e instanceof d?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function h(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function v(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function y(e){var t=new FileReader,n=v(t);return t.readAsArrayBuffer(e),n}function m(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function g(){return this.bodyUsed=!1,this._initBody=function(e){var t;this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:i&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:a&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:r&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():u&&i&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=m(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):u&&(ArrayBuffer.prototype.isPrototypeOf(e)||c(e))?this._bodyArrayBuffer=m(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):r&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},i&&(this.blob=function(){var e=h(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?h(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(y)}),this.text=function(){var e,t,n,r=h(this);if(r)return r;if(this._bodyBlob)return e=this._bodyBlob,t=new FileReader,n=v(t),t.readAsText(e),n;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r<t.length;r++)n[r]=String.fromCharCode(t[r]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},a&&(this.formData=function(){return this.text().then(x)}),this.json=function(){return this.text().then(JSON.parse)},this}d.prototype.append=function(e,t){e=s(e),t=f(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},d.prototype.delete=function(e){delete this.map[s(e)]},d.prototype.get=function(e){return e=s(e),this.has(e)?this.map[e]:null},d.prototype.has=function(e){return this.map.hasOwnProperty(s(e))},d.prototype.set=function(e,t){this.map[s(e)]=f(t)},d.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},d.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),p(e)},d.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),p(e)},d.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),p(e)},o&&(d.prototype[Symbol.iterator]=d.prototype.entries);var b=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function w(e,t){var n,r,o=(t=t||{}).body;if(e instanceof w){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new d(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,o||null==e._bodyInit||(o=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new d(t.headers)),this.method=(n=t.method||this.method||"GET",r=n.toUpperCase(),b.indexOf(r)>-1?r:n),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&o)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(o)}function x(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),o=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(o))}})),t}function E(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new d(t.headers),this.url=t.url||"",this._initBody(e)}w.prototype.clone=function(){return new w(this,{body:this._bodyInit})},g.call(w.prototype),g.call(E.prototype),E.prototype.clone=function(){return new E(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new d(this.headers),url:this.url})},E.error=function(){var e=new E(null,{status:0,statusText:""});return e.type="error",e};var S=[301,302,303,307,308];E.redirect=function(e,t){if(-1===S.indexOf(t))throw new RangeError("Invalid status code");return new E(null,{status:t,headers:{location:e}})};var k=self.DOMException;try{new k}catch(e){(k=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack}).prototype=Object.create(Error.prototype),k.prototype.constructor=k}function T(e,t){return new Promise((function(n,r){var o=new w(e,t);if(o.signal&&o.signal.aborted)return r(new k("Aborted","AbortError"));var a=new XMLHttpRequest;function u(){a.abort()}a.onload=function(){var e,t,r={status:a.status,statusText:a.statusText,headers:(e=a.getAllResponseHeaders()||"",t=new d,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(e){var n=e.split(":"),r=n.shift().trim();if(r){var o=n.join(":").trim();t.append(r,o)}})),t)};r.url="responseURL"in a?a.responseURL:r.headers.get("X-Request-URL");var o="response"in a?a.response:a.responseText;n(new E(o,r))},a.onerror=function(){r(new TypeError("Network request failed"))},a.ontimeout=function(){r(new TypeError("Network request failed"))},a.onabort=function(){r(new k("Aborted","AbortError"))},a.open(o.method,o.url,!0),"include"===o.credentials?a.withCredentials=!0:"omit"===o.credentials&&(a.withCredentials=!1),"responseType"in a&&i&&(a.responseType="blob"),o.headers.forEach((function(e,t){a.setRequestHeader(t,e)})),o.signal&&(o.signal.addEventListener("abort",u),a.onreadystatechange=function(){4===a.readyState&&o.signal.removeEventListener("abort",u)}),a.send(void 0===o._bodyInit?null:o._bodyInit)}))}T.polyfill=!0,self.fetch||(self.fetch=T,self.Headers=d,self.Request=w,self.Response=E)},function(e,t,n){"use strict"; /** @license React v16.13.1 * react.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var r=n(140),o="function"==typeof Symbol&&Symbol.for,i=o?Symbol.for("react.element"):60103,a=o?Symbol.for("react.portal"):60106,u=o?Symbol.for("react.fragment"):60107,l=o?Symbol.for("react.strict_mode"):60108,c=o?Symbol.for("react.profiler"):60114,s=o?Symbol.for("react.provider"):60109,f=o?Symbol.for("react.context"):60110,p=o?Symbol.for("react.forward_ref"):60112,d=o?Symbol.for("react.suspense"):60113,h=o?Symbol.for("react.memo"):60115,v=o?Symbol.for("react.lazy"):60116,y="function"==typeof Symbol&&Symbol.iterator;function m(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b={};function w(e,t,n){this.props=e,this.context=t,this.refs=b,this.updater=n||g}function x(){}function E(e,t,n){this.props=e,this.context=t,this.refs=b,this.updater=n||g}w.prototype.isReactComponent={},w.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error(m(85));this.updater.enqueueSetState(this,e,t,"setState")},w.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},x.prototype=w.prototype;var S=E.prototype=new x;S.constructor=E,r(S,w.prototype),S.isPureReactComponent=!0;var k={current:null},T=Object.prototype.hasOwnProperty,_={key:!0,ref:!0,__self:!0,__source:!0};function P(e,t,n){var r,o={},a=null,u=null;if(null!=t)for(r in void 0!==t.ref&&(u=t.ref),void 0!==t.key&&(a=""+t.key),t)T.call(t,r)&&!_.hasOwnProperty(r)&&(o[r]=t[r]);var l=arguments.length-2;if(1===l)o.children=n;else if(1<l){for(var c=Array(l),s=0;s<l;s++)c[s]=arguments[s+2];o.children=c}if(e&&e.defaultProps)for(r in l=e.defaultProps)void 0===o[r]&&(o[r]=l[r]);return{$$typeof:i,type:e,key:a,ref:u,props:o,_owner:k.current}}function O(e){return"object"==typeof e&&null!==e&&e.$$typeof===i}var C=/\/+/g,N=[];function R(e,t,n,r){if(N.length){var o=N.pop();return o.result=e,o.keyPrefix=t,o.func=n,o.context=r,o.count=0,o}return{result:e,keyPrefix:t,func:n,context:r,count:0}}function M(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,10>N.length&&N.push(e)}function A(e,t,n){return null==e?0:function e(t,n,r,o){var u=typeof t;"undefined"!==u&&"boolean"!==u||(t=null);var l=!1;if(null===t)l=!0;else switch(u){case"string":case"number":l=!0;break;case"object":switch(t.$$typeof){case i:case a:l=!0}}if(l)return r(o,t,""===n?"."+F(t,0):n),1;if(l=0,n=""===n?".":n+":",Array.isArray(t))for(var c=0;c<t.length;c++){var s=n+F(u=t[c],c);l+=e(u,s,r,o)}else if(null===t||"object"!=typeof t?s=null:s="function"==typeof(s=y&&t[y]||t["@@iterator"])?s:null,"function"==typeof s)for(t=s.call(t),c=0;!(u=t.next()).done;)l+=e(u=u.value,s=n+F(u,c++),r,o);else if("object"===u)throw r=""+t,Error(m(31,"[object Object]"===r?"object with keys {"+Object.keys(t).join(", ")+"}":r,""));return l}(e,"",t,n)}function F(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+(""+e).replace(/[=:]/g,(function(e){return t[e]}))}(e.key):t.toString(36)}function j(e,t){e.func.call(e.context,t,e.count++)}function I(e,t,n){var r=e.result,o=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?L(e,r,n,(function(e){return e})):null!=e&&(O(e)&&(e=function(e,t){return{$$typeof:i,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(e,o+(!e.key||t&&t.key===e.key?"":(""+e.key).replace(C,"$&/")+"/")+n)),r.push(e))}function L(e,t,n,r,o){var i="";null!=n&&(i=(""+n).replace(C,"$&/")+"/"),A(e,I,t=R(t,i,r,o)),M(t)}var D={current:null};function z(){var e=D.current;if(null===e)throw Error(m(321));return e}var U={ReactCurrentDispatcher:D,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:k,IsSomeRendererActing:{current:!1},assign:r};t.Children={map:function(e,t,n){if(null==e)return e;var r=[];return L(e,r,null,t,n),r},forEach:function(e,t,n){if(null==e)return e;A(e,j,t=R(null,null,t,n)),M(t)},count:function(e){return A(e,(function(){return null}),null)},toArray:function(e){var t=[];return L(e,t,null,(function(e){return e})),t},only:function(e){if(!O(e))throw Error(m(143));return e}},t.Component=w,t.Fragment=u,t.Profiler=c,t.PureComponent=E,t.StrictMode=l,t.Suspense=d,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=U,t.cloneElement=function(e,t,n){if(null==e)throw Error(m(267,e));var o=r({},e.props),a=e.key,u=e.ref,l=e._owner;if(null!=t){if(void 0!==t.ref&&(u=t.ref,l=k.current),void 0!==t.key&&(a=""+t.key),e.type&&e.type.defaultProps)var c=e.type.defaultProps;for(s in t)T.call(t,s)&&!_.hasOwnProperty(s)&&(o[s]=void 0===t[s]&&void 0!==c?c[s]:t[s])}var s=arguments.length-2;if(1===s)o.children=n;else if(1<s){c=Array(s);for(var f=0;f<s;f++)c[f]=arguments[f+2];o.children=c}return{$$typeof:i,type:e.type,key:a,ref:u,props:o,_owner:l}},t.createContext=function(e,t){return void 0===t&&(t=null),(e={$$typeof:f,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:s,_context:e},e.Consumer=e},t.createElement=P,t.createFactory=function(e){var t=P.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:p,render:e}},t.isValidElement=O,t.lazy=function(e){return{$$typeof:v,_ctor:e,_status:-1,_result:null}},t.memo=function(e,t){return{$$typeof:h,type:e,compare:void 0===t?null:t}},t.useCallback=function(e,t){return z().useCallback(e,t)},t.useContext=function(e,t){return z().useContext(e,t)},t.useDebugValue=function(){},t.useEffect=function(e,t){return z().useEffect(e,t)},t.useImperativeHandle=function(e,t,n){return z().useImperativeHandle(e,t,n)},t.useLayoutEffect=function(e,t){return z().useLayoutEffect(e,t)},t.useMemo=function(e,t){return z().useMemo(e,t)},t.useReducer=function(e,t,n){return z().useReducer(e,t,n)},t.useRef=function(e){return z().useRef(e)},t.useState=function(e){return z().useState(e)},t.version="16.13.1"},function(e,t,n){"use strict"; /** @license React v16.13.1 * react-dom.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var r=n(0),o=n(140),i=n(350);function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!r)throw Error(a(227));function u(e,t,n,r,o,i,a,u,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(e){this.onError(e)}}var l=!1,c=null,s=!1,f=null,p={onError:function(e){l=!0,c=e}};function d(e,t,n,r,o,i,a,s,f){l=!1,c=null,u.apply(p,arguments)}var h=null,v=null,y=null;function m(e,t,n){var r=e.type||"unknown-event";e.currentTarget=y(n),function(e,t,n,r,o,i,u,p,h){if(d.apply(this,arguments),l){if(!l)throw Error(a(198));var v=c;l=!1,c=null,s||(s=!0,f=v)}}(r,t,void 0,e),e.currentTarget=null}var g=null,b={};function w(){if(g)for(var e in b){var t=b[e],n=g.indexOf(e);if(!(-1<n))throw Error(a(96,e));if(!E[n]){if(!t.extractEvents)throw Error(a(97,e));for(var r in E[n]=t,n=t.eventTypes){var o=void 0,i=n[r],u=t,l=r;if(S.hasOwnProperty(l))throw Error(a(99,l));S[l]=i;var c=i.phasedRegistrationNames;if(c){for(o in c)c.hasOwnProperty(o)&&x(c[o],u,l);o=!0}else i.registrationName?(x(i.registrationName,u,l),o=!0):o=!1;if(!o)throw Error(a(98,r,e))}}}}function x(e,t,n){if(k[e])throw Error(a(100,e));k[e]=t,T[e]=t.eventTypes[n].dependencies}var E=[],S={},k={},T={};function _(e){var t,n=!1;for(t in e)if(e.hasOwnProperty(t)){var r=e[t];if(!b.hasOwnProperty(t)||b[t]!==r){if(b[t])throw Error(a(102,t));b[t]=r,n=!0}}n&&w()}var P=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),O=null,C=null,N=null;function R(e){if(e=v(e)){if("function"!=typeof O)throw Error(a(280));var t=e.stateNode;t&&(t=h(t),O(e.stateNode,e.type,t))}}function M(e){C?N?N.push(e):N=[e]:C=e}function A(){if(C){var e=C,t=N;if(N=C=null,R(e),t)for(e=0;e<t.length;e++)R(t[e])}}function F(e,t){return e(t)}function j(e,t,n,r,o){return e(t,n,r,o)}function I(){}var L=F,D=!1,z=!1;function U(){null===C&&null===N||(I(),A())}function W(e,t,n){if(z)return e(t,n);z=!0;try{return L(e,t,n)}finally{z=!1,U()}}var B=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,V=Object.prototype.hasOwnProperty,$={},H={};function q(e,t,n,r,o,i){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i}var Q={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){Q[e]=new q(e,0,!1,e,null,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];Q[t]=new q(t,1,!1,e[1],null,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){Q[e]=new q(e,2,!1,e.toLowerCase(),null,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){Q[e]=new q(e,2,!1,e,null,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){Q[e]=new q(e,3,!1,e.toLowerCase(),null,!1)})),["checked","multiple","muted","selected"].forEach((function(e){Q[e]=new q(e,3,!0,e,null,!1)})),["capture","download"].forEach((function(e){Q[e]=new q(e,4,!1,e,null,!1)})),["cols","rows","size","span"].forEach((function(e){Q[e]=new q(e,6,!1,e,null,!1)})),["rowSpan","start"].forEach((function(e){Q[e]=new q(e,5,!1,e.toLowerCase(),null,!1)}));var G=/[\-:]([a-z])/g;function K(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(G,K);Q[t]=new q(t,1,!1,e,null,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(G,K);Q[t]=new q(t,1,!1,e,"http://www.w3.org/1999/xlink",!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(G,K);Q[t]=new q(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1)})),["tabIndex","crossOrigin"].forEach((function(e){Q[e]=new q(e,1,!1,e.toLowerCase(),null,!1)})),Q.xlinkHref=new q("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0),["src","href","action","formAction"].forEach((function(e){Q[e]=new q(e,1,!1,e.toLowerCase(),null,!0)}));var Y=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function X(e,t,n,r){var o=Q.hasOwnProperty(t)?Q[t]:null;(null!==o?0===o.type:!r&&(2<t.length&&("o"===t[0]||"O"===t[0])&&("n"===t[1]||"N"===t[1])))||(function(e,t,n,r){if(null==t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,o,r)&&(n=null),r||null===o?function(e){return!!V.call(H,e)||!V.call($,e)&&(B.test(e)?H[e]=!0:($[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=null===n?3!==o.type&&"":n:(t=o.attributeName,r=o.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(o=o.type)||4===o&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}Y.hasOwnProperty("ReactCurrentDispatcher")||(Y.ReactCurrentDispatcher={current:null}),Y.hasOwnProperty("ReactCurrentBatchConfig")||(Y.ReactCurrentBatchConfig={suspense:null});var J=/^(.*)[\\\/]/,Z="function"==typeof Symbol&&Symbol.for,ee=Z?Symbol.for("react.element"):60103,te=Z?Symbol.for("react.portal"):60106,ne=Z?Symbol.for("react.fragment"):60107,re=Z?Symbol.for("react.strict_mode"):60108,oe=Z?Symbol.for("react.profiler"):60114,ie=Z?Symbol.for("react.provider"):60109,ae=Z?Symbol.for("react.context"):60110,ue=Z?Symbol.for("react.concurrent_mode"):60111,le=Z?Symbol.for("react.forward_ref"):60112,ce=Z?Symbol.for("react.suspense"):60113,se=Z?Symbol.for("react.suspense_list"):60120,fe=Z?Symbol.for("react.memo"):60115,pe=Z?Symbol.for("react.lazy"):60116,de=Z?Symbol.for("react.block"):60121,he="function"==typeof Symbol&&Symbol.iterator;function ve(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=he&&e[he]||e["@@iterator"])?e:null}function ye(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case ne:return"Fragment";case te:return"Portal";case oe:return"Profiler";case re:return"StrictMode";case ce:return"Suspense";case se:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case ae:return"Context.Consumer";case ie:return"Context.Provider";case le:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case fe:return ye(e.type);case de:return ye(e.render);case pe:if(e=1===e._status?e._result:null)return ye(e)}return null}function me(e){var t="";do{e:switch(e.tag){case 3:case 4:case 6:case 7:case 10:case 9:var n="";break e;default:var r=e._debugOwner,o=e._debugSource,i=ye(e.type);n=null,r&&(n=ye(r.type)),r=i,i="",o?i=" (at "+o.fileName.replace(J,"")+":"+o.lineNumber+")":n&&(i=" (created by "+n+")"),n="\n in "+(r||"Unknown")+i}t+=n,e=e.return}while(e);return t}function ge(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function be(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function we(e){e._valueTracker||(e._valueTracker=function(e){var t=be(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(e){r=""+e,i.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function xe(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=be(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function Ee(e,t){var n=t.checked;return o({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function Se(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=ge(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function ke(e,t){null!=(t=t.checked)&&X(e,"checked",t,!1)}function Te(e,t){ke(e,t);var n=ge(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?Pe(e,t.type,n):t.hasOwnProperty("defaultValue")&&Pe(e,t.type,ge(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function _e(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function Pe(e,t,n){"number"===t&&e.ownerDocument.activeElement===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function Oe(e,t){return e=o({children:void 0},t),(t=function(e){var t="";return r.Children.forEach(e,(function(e){null!=e&&(t+=e)})),t}(t.children))&&(e.children=t),e}function Ce(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+ge(n),t=null,o=0;o<e.length;o++){if(e[o].value===n)return e[o].selected=!0,void(r&&(e[o].defaultSelected=!0));null!==t||e[o].disabled||(t=e[o])}null!==t&&(t.selected=!0)}}function Ne(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(a(91));return o({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Re(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(a(92));if(Array.isArray(n)){if(!(1>=n.length))throw Error(a(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:ge(n)}}function Me(e,t){var n=ge(t.value),r=ge(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function Ae(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}var Fe="http://www.w3.org/1999/xhtml",je="http://www.w3.org/2000/svg";function Ie(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Le(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?Ie(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var De,ze=function(e){return"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction((function(){return e(t,n)}))}:e}((function(e,t){if(e.namespaceURI!==je||"innerHTML"in e)e.innerHTML=t;else{for((De=De||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=De.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}}));function Ue(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}function We(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Be={animationend:We("Animation","AnimationEnd"),animationiteration:We("Animation","AnimationIteration"),animationstart:We("Animation","AnimationStart"),transitionend:We("Transition","TransitionEnd")},Ve={},$e={};function He(e){if(Ve[e])return Ve[e];if(!Be[e])return e;var t,n=Be[e];for(t in n)if(n.hasOwnProperty(t)&&t in $e)return Ve[e]=n[t];return e}P&&($e=document.createElement("div").style,"AnimationEvent"in window||(delete Be.animationend.animation,delete Be.animationiteration.animation,delete Be.animationstart.animation),"TransitionEvent"in window||delete Be.transitionend.transition);var qe=He("animationend"),Qe=He("animationiteration"),Ge=He("animationstart"),Ke=He("transitionend"),Ye="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Xe=new("function"==typeof WeakMap?WeakMap:Map);function Je(e){var t=Xe.get(e);return void 0===t&&(t=new Map,Xe.set(e,t)),t}function Ze(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!=(1026&(t=e).effectTag)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function et(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function tt(e){if(Ze(e)!==e)throw Error(a(188))}function nt(e){if(!(e=function(e){var t=e.alternate;if(!t){if(null===(t=Ze(e)))throw Error(a(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(null===o)break;var i=o.alternate;if(null===i){if(null!==(r=o.return)){n=r;continue}break}if(o.child===i.child){for(i=o.child;i;){if(i===n)return tt(o),e;if(i===r)return tt(o),t;i=i.sibling}throw Error(a(188))}if(n.return!==r.return)n=o,r=i;else{for(var u=!1,l=o.child;l;){if(l===n){u=!0,n=o,r=i;break}if(l===r){u=!0,r=o,n=i;break}l=l.sibling}if(!u){for(l=i.child;l;){if(l===n){u=!0,n=i,r=o;break}if(l===r){u=!0,r=i,n=o;break}l=l.sibling}if(!u)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(3!==n.tag)throw Error(a(188));return n.stateNode.current===n?e:t}(e)))return null;for(var t=e;;){if(5===t.tag||6===t.tag)return t;if(t.child)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}function rt(e,t){if(null==t)throw Error(a(30));return null==e?t:Array.isArray(e)?Array.isArray(t)?(e.push.apply(e,t),e):(e.push(t),e):Array.isArray(t)?[e].concat(t):[e,t]}function ot(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)}var it=null;function at(e){if(e){var t=e._dispatchListeners,n=e._dispatchInstances;if(Array.isArray(t))for(var r=0;r<t.length&&!e.isPropagationStopped();r++)m(e,t[r],n[r]);else t&&m(e,t,n);e._dispatchListeners=null,e._dispatchInstances=null,e.isPersistent()||e.constructor.release(e)}}function ut(e){if(null!==e&&(it=rt(it,e)),e=it,it=null,e){if(ot(e,at),it)throw Error(a(95));if(s)throw e=f,s=!1,f=null,e}}function lt(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}function ct(e){if(!P)return!1;var t=(e="on"+e)in document;return t||((t=document.createElement("div")).setAttribute(e,"return;"),t="function"==typeof t[e]),t}var st=[];function ft(e){e.topLevelType=null,e.nativeEvent=null,e.targetInst=null,e.ancestors.length=0,10>st.length&&st.push(e)}function pt(e,t,n,r){if(st.length){var o=st.pop();return o.topLevelType=e,o.eventSystemFlags=r,o.nativeEvent=t,o.targetInst=n,o}return{topLevelType:e,eventSystemFlags:r,nativeEvent:t,targetInst:n,ancestors:[]}}function dt(e){var t=e.targetInst,n=t;do{if(!n){e.ancestors.push(n);break}var r=n;if(3===r.tag)r=r.stateNode.containerInfo;else{for(;r.return;)r=r.return;r=3!==r.tag?null:r.stateNode.containerInfo}if(!r)break;5!==(t=n.tag)&&6!==t||e.ancestors.push(n),n=Pn(r)}while(n);for(n=0;n<e.ancestors.length;n++){t=e.ancestors[n];var o=lt(e.nativeEvent);r=e.topLevelType;var i=e.nativeEvent,a=e.eventSystemFlags;0===n&&(a|=64);for(var u=null,l=0;l<E.length;l++){var c=E[l];c&&(c=c.extractEvents(r,t,i,o,a))&&(u=rt(u,c))}ut(u)}}function ht(e,t,n){if(!n.has(e)){switch(e){case"scroll":Gt(t,"scroll",!0);break;case"focus":case"blur":Gt(t,"focus",!0),Gt(t,"blur",!0),n.set("blur",null),n.set("focus",null);break;case"cancel":case"close":ct(e)&&Gt(t,e,!0);break;case"invalid":case"submit":case"reset":break;default:-1===Ye.indexOf(e)&&Qt(e,t)}n.set(e,null)}}var vt,yt,mt,gt=!1,bt=[],wt=null,xt=null,Et=null,St=new Map,kt=new Map,Tt=[],_t="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput close cancel copy cut paste click change contextmenu reset submit".split(" "),Pt="focus blur dragenter dragleave mouseover mouseout pointerover pointerout gotpointercapture lostpointercapture".split(" ");function Ot(e,t,n,r,o){return{blockedOn:e,topLevelType:t,eventSystemFlags:32|n,nativeEvent:o,container:r}}function Ct(e,t){switch(e){case"focus":case"blur":wt=null;break;case"dragenter":case"dragleave":xt=null;break;case"mouseover":case"mouseout":Et=null;break;case"pointerover":case"pointerout":St.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":kt.delete(t.pointerId)}}function Nt(e,t,n,r,o,i){return null===e||e.nativeEvent!==i?(e=Ot(t,n,r,o,i),null!==t&&(null!==(t=On(t))&&yt(t)),e):(e.eventSystemFlags|=r,e)}function Rt(e){var t=Pn(e.target);if(null!==t){var n=Ze(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=et(n)))return e.blockedOn=t,void i.unstable_runWithPriority(e.priority,(function(){mt(n)}))}else if(3===t&&n.stateNode.hydrate)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function Mt(e){if(null!==e.blockedOn)return!1;var t=Jt(e.topLevelType,e.eventSystemFlags,e.container,e.nativeEvent);if(null!==t){var n=On(t);return null!==n&&yt(n),e.blockedOn=t,!1}return!0}function At(e,t,n){Mt(e)&&n.delete(t)}function Ft(){for(gt=!1;0<bt.length;){var e=bt[0];if(null!==e.blockedOn){null!==(e=On(e.blockedOn))&&vt(e);break}var t=Jt(e.topLevelType,e.eventSystemFlags,e.container,e.nativeEvent);null!==t?e.blockedOn=t:bt.shift()}null!==wt&&Mt(wt)&&(wt=null),null!==xt&&Mt(xt)&&(xt=null),null!==Et&&Mt(Et)&&(Et=null),St.forEach(At),kt.forEach(At)}function jt(e,t){e.blockedOn===t&&(e.blockedOn=null,gt||(gt=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,Ft)))}function It(e){function t(t){return jt(t,e)}if(0<bt.length){jt(bt[0],e);for(var n=1;n<bt.length;n++){var r=bt[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==wt&&jt(wt,e),null!==xt&&jt(xt,e),null!==Et&&jt(Et,e),St.forEach(t),kt.forEach(t),n=0;n<Tt.length;n++)(r=Tt[n]).blockedOn===e&&(r.blockedOn=null);for(;0<Tt.length&&null===(n=Tt[0]).blockedOn;)Rt(n),null===n.blockedOn&&Tt.shift()}var Lt={},Dt=new Map,zt=new Map,Ut=["abort","abort",qe,"animationEnd",Qe,"animationIteration",Ge,"animationStart","canplay","canPlay","canplaythrough","canPlayThrough","durationchange","durationChange","emptied","emptied","encrypted","encrypted","ended","ended","error","error","gotpointercapture","gotPointerCapture","load","load","loadeddata","loadedData","loadedmetadata","loadedMetadata","loadstart","loadStart","lostpointercapture","lostPointerCapture","playing","playing","progress","progress","seeking","seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",Ke,"transitionEnd","waiting","waiting"];function Wt(e,t){for(var n=0;n<e.length;n+=2){var r=e[n],o=e[n+1],i="on"+(o[0].toUpperCase()+o.slice(1));i={phasedRegistrationNames:{bubbled:i,captured:i+"Capture"},dependencies:[r],eventPriority:t},zt.set(r,t),Dt.set(r,i),Lt[o]=i}}Wt("blur blur cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focus focus input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),0),Wt("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1),Wt(Ut,2);for(var Bt="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),Vt=0;Vt<Bt.length;Vt++)zt.set(Bt[Vt],0);var $t=i.unstable_UserBlockingPriority,Ht=i.unstable_runWithPriority,qt=!0;function Qt(e,t){Gt(t,e,!1)}function Gt(e,t,n){var r=zt.get(t);switch(void 0===r?2:r){case 0:r=Kt.bind(null,t,1,e);break;case 1:r=Yt.bind(null,t,1,e);break;default:r=Xt.bind(null,t,1,e)}n?e.addEventListener(t,r,!0):e.addEventListener(t,r,!1)}function Kt(e,t,n,r){D||I();var o=Xt,i=D;D=!0;try{j(o,e,t,n,r)}finally{(D=i)||U()}}function Yt(e,t,n,r){Ht($t,Xt.bind(null,e,t,n,r))}function Xt(e,t,n,r){if(qt)if(0<bt.length&&-1<_t.indexOf(e))e=Ot(null,e,t,n,r),bt.push(e);else{var o=Jt(e,t,n,r);if(null===o)Ct(e,r);else if(-1<_t.indexOf(e))e=Ot(o,e,t,n,r),bt.push(e);else if(!function(e,t,n,r,o){switch(t){case"focus":return wt=Nt(wt,e,t,n,r,o),!0;case"dragenter":return xt=Nt(xt,e,t,n,r,o),!0;case"mouseover":return Et=Nt(Et,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return St.set(i,Nt(St.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,kt.set(i,Nt(kt.get(i)||null,e,t,n,r,o)),!0}return!1}(o,e,t,n,r)){Ct(e,r),e=pt(e,r,null,t);try{W(dt,e)}finally{ft(e)}}}}function Jt(e,t,n,r){if(null!==(n=Pn(n=lt(r)))){var o=Ze(n);if(null===o)n=null;else{var i=o.tag;if(13===i){if(null!==(n=et(o)))return n;n=null}else if(3===i){if(o.stateNode.hydrate)return 3===o.tag?o.stateNode.containerInfo:null;n=null}else o!==n&&(n=null)}}e=pt(e,r,n,t);try{W(dt,e)}finally{ft(e)}return null}var Zt={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},en=["Webkit","ms","Moz","O"];function tn(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||Zt.hasOwnProperty(e)&&Zt[e]?(""+t).trim():t+"px"}function nn(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),o=tn(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}Object.keys(Zt).forEach((function(e){en.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Zt[t]=Zt[e]}))}));var rn=o({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function on(e,t){if(t){if(rn[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(a(137,e,""));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(a(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(a(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(a(62,""))}}function an(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var un=Fe;function ln(e,t){var n=Je(e=9===e.nodeType||11===e.nodeType?e:e.ownerDocument);t=T[t];for(var r=0;r<t.length;r++)ht(t[r],e,n)}function cn(){}function sn(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function fn(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function pn(e,t){var n,r=fn(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=fn(r)}}function dn(){for(var e=window,t=sn();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(!n)break;t=sn((e=t.contentWindow).document)}return t}function hn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var vn=null,yn=null;function mn(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function gn(e,t){return"textarea"===e||"option"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var bn="function"==typeof setTimeout?setTimeout:void 0,wn="function"==typeof clearTimeout?clearTimeout:void 0;function xn(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break}return e}function En(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var Sn=Math.random().toString(36).slice(2),kn="__reactInternalInstance$"+Sn,Tn="__reactEventHandlers$"+Sn,_n="__reactContainere$"+Sn;function Pn(e){var t=e[kn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[_n]||n[kn]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=En(e);null!==e;){if(n=e[kn])return n;e=En(e)}return t}n=(e=n).parentNode}return null}function On(e){return!(e=e[kn]||e[_n])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function Cn(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(a(33))}function Nn(e){return e[Tn]||null}function Rn(e){do{e=e.return}while(e&&5!==e.tag);return e||null}function Mn(e,t){var n=e.stateNode;if(!n)return null;var r=h(n);if(!r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(a(231,t,typeof n));return n}function An(e,t,n){(t=Mn(e,n.dispatchConfig.phasedRegistrationNames[t]))&&(n._dispatchListeners=rt(n._dispatchListeners,t),n._dispatchInstances=rt(n._dispatchInstances,e))}function Fn(e){if(e&&e.dispatchConfig.phasedRegistrationNames){for(var t=e._targetInst,n=[];t;)n.push(t),t=Rn(t);for(t=n.length;0<t--;)An(n[t],"captured",e);for(t=0;t<n.length;t++)An(n[t],"bubbled",e)}}function jn(e,t,n){e&&n&&n.dispatchConfig.registrationName&&(t=Mn(e,n.dispatchConfig.registrationName))&&(n._dispatchListeners=rt(n._dispatchListeners,t),n._dispatchInstances=rt(n._dispatchInstances,e))}function In(e){e&&e.dispatchConfig.registrationName&&jn(e._targetInst,null,e)}function Ln(e){ot(e,Fn)}var Dn=null,zn=null,Un=null;function Wn(){if(Un)return Un;var e,t,n=zn,r=n.length,o="value"in Dn?Dn.value:Dn.textContent,i=o.length;for(e=0;e<r&&n[e]===o[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===o[i-t];t++);return Un=o.slice(e,1<t?1-t:void 0)}function Bn(){return!0}function Vn(){return!1}function $n(e,t,n,r){for(var o in this.dispatchConfig=e,this._targetInst=t,this.nativeEvent=n,e=this.constructor.Interface)e.hasOwnProperty(o)&&((t=e[o])?this[o]=t(n):"target"===o?this.target=r:this[o]=n[o]);return this.isDefaultPrevented=(null!=n.defaultPrevented?n.defaultPrevented:!1===n.returnValue)?Bn:Vn,this.isPropagationStopped=Vn,this}function Hn(e,t,n,r){if(this.eventPool.length){var o=this.eventPool.pop();return this.call(o,e,t,n,r),o}return new this(e,t,n,r)}function qn(e){if(!(e instanceof this))throw Error(a(279));e.destructor(),10>this.eventPool.length&&this.eventPool.push(e)}function Qn(e){e.eventPool=[],e.getPooled=Hn,e.release=qn}o($n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=Bn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=Bn)},persist:function(){this.isPersistent=Bn},isPersistent:Vn,destructor:function(){var e,t=this.constructor.Interface;for(e in t)this[e]=null;this.nativeEvent=this._targetInst=this.dispatchConfig=null,this.isPropagationStopped=this.isDefaultPrevented=Vn,this._dispatchInstances=this._dispatchListeners=null}}),$n.Interface={type:null,target:null,currentTarget:function(){return null},eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null},$n.extend=function(e){function t(){}function n(){return r.apply(this,arguments)}var r=this;t.prototype=r.prototype;var i=new t;return o(i,n.prototype),n.prototype=i,n.prototype.constructor=n,n.Interface=o({},r.Interface,e),n.extend=r.extend,Qn(n),n},Qn($n);var Gn=$n.extend({data:null}),Kn=$n.extend({data:null}),Yn=[9,13,27,32],Xn=P&&"CompositionEvent"in window,Jn=null;P&&"documentMode"in document&&(Jn=document.documentMode);var Zn=P&&"TextEvent"in window&&!Jn,er=P&&(!Xn||Jn&&8<Jn&&11>=Jn),tr=String.fromCharCode(32),nr={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},rr=!1;function or(e,t){switch(e){case"keyup":return-1!==Yn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"blur":return!0;default:return!1}}function ir(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var ar=!1;var ur={eventTypes:nr,extractEvents:function(e,t,n,r){var o;if(Xn)e:{switch(e){case"compositionstart":var i=nr.compositionStart;break e;case"compositionend":i=nr.compositionEnd;break e;case"compositionupdate":i=nr.compositionUpdate;break e}i=void 0}else ar?or(e,n)&&(i=nr.compositionEnd):"keydown"===e&&229===n.keyCode&&(i=nr.compositionStart);return i?(er&&"ko"!==n.locale&&(ar||i!==nr.compositionStart?i===nr.compositionEnd&&ar&&(o=Wn()):(zn="value"in(Dn=r)?Dn.value:Dn.textContent,ar=!0)),i=Gn.getPooled(i,t,n,r),o?i.data=o:null!==(o=ir(n))&&(i.data=o),Ln(i),o=i):o=null,(e=Zn?function(e,t){switch(e){case"compositionend":return ir(t);case"keypress":return 32!==t.which?null:(rr=!0,tr);case"textInput":return(e=t.data)===tr&&rr?null:e;default:return null}}(e,n):function(e,t){if(ar)return"compositionend"===e||!Xn&&or(e,t)?(e=Wn(),Un=zn=Dn=null,ar=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return er&&"ko"!==t.locale?null:t.data;default:return null}}(e,n))?((t=Kn.getPooled(nr.beforeInput,t,n,r)).data=e,Ln(t)):t=null,null===o?t:null===t?o:[o,t]}},lr={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function cr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!lr[e.type]:"textarea"===t}var sr={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:"blur change click focus input keydown keyup selectionchange".split(" ")}};function fr(e,t,n){return(e=$n.getPooled(sr.change,e,t,n)).type="change",M(n),Ln(e),e}var pr=null,dr=null;function hr(e){ut(e)}function vr(e){if(xe(Cn(e)))return e}function yr(e,t){if("change"===e)return t}var mr=!1;function gr(){pr&&(pr.detachEvent("onpropertychange",br),dr=pr=null)}function br(e){if("value"===e.propertyName&&vr(dr))if(e=fr(dr,e,lt(e)),D)ut(e);else{D=!0;try{F(hr,e)}finally{D=!1,U()}}}function wr(e,t,n){"focus"===e?(gr(),dr=n,(pr=t).attachEvent("onpropertychange",br)):"blur"===e&&gr()}function xr(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return vr(dr)}function Er(e,t){if("click"===e)return vr(t)}function Sr(e,t){if("input"===e||"change"===e)return vr(t)}P&&(mr=ct("input")&&(!document.documentMode||9<document.documentMode));var kr={eventTypes:sr,_isInputEventSupported:mr,extractEvents:function(e,t,n,r){var o=t?Cn(t):window,i=o.nodeName&&o.nodeName.toLowerCase();if("select"===i||"input"===i&&"file"===o.type)var a=yr;else if(cr(o))if(mr)a=Sr;else{a=xr;var u=wr}else(i=o.nodeName)&&"input"===i.toLowerCase()&&("checkbox"===o.type||"radio"===o.type)&&(a=Er);if(a&&(a=a(e,t)))return fr(a,n,r);u&&u(e,o,t),"blur"===e&&(e=o._wrapperState)&&e.controlled&&"number"===o.type&&Pe(o,"number",o.value)}},Tr=$n.extend({view:null,detail:null}),_r={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Pr(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=_r[e])&&!!t[e]}function Or(){return Pr}var Cr=0,Nr=0,Rr=!1,Mr=!1,Ar=Tr.extend({screenX:null,screenY:null,clientX:null,clientY:null,pageX:null,pageY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:Or,button:null,buttons:null,relatedTarget:function(e){return e.relatedTarget||(e.fromElement===e.srcElement?e.toElement:e.fromElement)},movementX:function(e){if("movementX"in e)return e.movementX;var t=Cr;return Cr=e.screenX,Rr?"mousemove"===e.type?e.screenX-t:0:(Rr=!0,0)},movementY:function(e){if("movementY"in e)return e.movementY;var t=Nr;return Nr=e.screenY,Mr?"mousemove"===e.type?e.screenY-t:0:(Mr=!0,0)}}),Fr=Ar.extend({pointerId:null,width:null,height:null,pressure:null,tangentialPressure:null,tiltX:null,tiltY:null,twist:null,pointerType:null,isPrimary:null}),jr={mouseEnter:{registrationName:"onMouseEnter",dependencies:["mouseout","mouseover"]},mouseLeave:{registrationName:"onMouseLeave",dependencies:["mouseout","mouseover"]},pointerEnter:{registrationName:"onPointerEnter",dependencies:["pointerout","pointerover"]},pointerLeave:{registrationName:"onPointerLeave",dependencies:["pointerout","pointerover"]}},Ir={eventTypes:jr,extractEvents:function(e,t,n,r,o){var i="mouseover"===e||"pointerover"===e,a="mouseout"===e||"pointerout"===e;if(i&&0==(32&o)&&(n.relatedTarget||n.fromElement)||!a&&!i)return null;(i=r.window===r?r:(i=r.ownerDocument)?i.defaultView||i.parentWindow:window,a)?(a=t,null!==(t=(t=n.relatedTarget||n.toElement)?Pn(t):null)&&(t!==Ze(t)||5!==t.tag&&6!==t.tag)&&(t=null)):a=null;if(a===t)return null;if("mouseout"===e||"mouseover"===e)var u=Ar,l=jr.mouseLeave,c=jr.mouseEnter,s="mouse";else"pointerout"!==e&&"pointerover"!==e||(u=Fr,l=jr.pointerLeave,c=jr.pointerEnter,s="pointer");if(e=null==a?i:Cn(a),i=null==t?i:Cn(t),(l=u.getPooled(l,a,n,r)).type=s+"leave",l.target=e,l.relatedTarget=i,(n=u.getPooled(c,t,n,r)).type=s+"enter",n.target=i,n.relatedTarget=e,s=t,(r=a)&&s)e:{for(c=s,a=0,e=u=r;e;e=Rn(e))a++;for(e=0,t=c;t;t=Rn(t))e++;for(;0<a-e;)u=Rn(u),a--;for(;0<e-a;)c=Rn(c),e--;for(;a--;){if(u===c||u===c.alternate)break e;u=Rn(u),c=Rn(c)}u=null}else u=null;for(c=u,u=[];r&&r!==c&&(null===(a=r.alternate)||a!==c);)u.push(r),r=Rn(r);for(r=[];s&&s!==c&&(null===(a=s.alternate)||a!==c);)r.push(s),s=Rn(s);for(s=0;s<u.length;s++)jn(u[s],"bubbled",l);for(s=r.length;0<s--;)jn(r[s],"captured",n);return 0==(64&o)?[l]:[l,n]}};var Lr="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},Dr=Object.prototype.hasOwnProperty;function zr(e,t){if(Lr(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++)if(!Dr.call(t,n[r])||!Lr(e[n[r]],t[n[r]]))return!1;return!0}var Ur=P&&"documentMode"in document&&11>=document.documentMode,Wr={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"blur contextmenu dragend focus keydown keyup mousedown mouseup selectionchange".split(" ")}},Br=null,Vr=null,$r=null,Hr=!1;function qr(e,t){var n=t.window===t?t.document:9===t.nodeType?t:t.ownerDocument;return Hr||null==Br||Br!==sn(n)?null:("selectionStart"in(n=Br)&&hn(n)?n={start:n.selectionStart,end:n.selectionEnd}:n={anchorNode:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset},$r&&zr($r,n)?null:($r=n,(e=$n.getPooled(Wr.select,Vr,e,t)).type="select",e.target=Br,Ln(e),e))}var Qr={eventTypes:Wr,extractEvents:function(e,t,n,r,o,i){if(!(i=!(o=i||(r.window===r?r.document:9===r.nodeType?r:r.ownerDocument)))){e:{o=Je(o),i=T.onSelect;for(var a=0;a<i.length;a++)if(!o.has(i[a])){o=!1;break e}o=!0}i=!o}if(i)return null;switch(o=t?Cn(t):window,e){case"focus":(cr(o)||"true"===o.contentEditable)&&(Br=o,Vr=t,$r=null);break;case"blur":$r=Vr=Br=null;break;case"mousedown":Hr=!0;break;case"contextmenu":case"mouseup":case"dragend":return Hr=!1,qr(n,r);case"selectionchange":if(Ur)break;case"keydown":case"keyup":return qr(n,r)}return null}},Gr=$n.extend({animationName:null,elapsedTime:null,pseudoElement:null}),Kr=$n.extend({clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Yr=Tr.extend({relatedTarget:null});function Xr(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}var Jr={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Zr={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},eo=Tr.extend({key:function(e){if(e.key){var t=Jr[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=Xr(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?Zr[e.keyCode]||"Unidentified":""},location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:Or,charCode:function(e){return"keypress"===e.type?Xr(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?Xr(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),to=Ar.extend({dataTransfer:null}),no=Tr.extend({touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:Or}),ro=$n.extend({propertyName:null,elapsedTime:null,pseudoElement:null}),oo=Ar.extend({deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:null,deltaMode:null}),io={eventTypes:Lt,extractEvents:function(e,t,n,r){var o=Dt.get(e);if(!o)return null;switch(e){case"keypress":if(0===Xr(n))return null;case"keydown":case"keyup":e=eo;break;case"blur":case"focus":e=Yr;break;case"click":if(2===n.button)return null;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":e=Ar;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":e=to;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":e=no;break;case qe:case Qe:case Ge:e=Gr;break;case Ke:e=ro;break;case"scroll":e=Tr;break;case"wheel":e=oo;break;case"copy":case"cut":case"paste":e=Kr;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":e=Fr;break;default:e=$n}return Ln(t=e.getPooled(o,t,n,r)),t}};if(g)throw Error(a(101));g=Array.prototype.slice.call("ResponderEventPlugin SimpleEventPlugin EnterLeaveEventPlugin ChangeEventPlugin SelectEventPlugin BeforeInputEventPlugin".split(" ")),w(),h=Nn,v=On,y=Cn,_({SimpleEventPlugin:io,EnterLeaveEventPlugin:Ir,ChangeEventPlugin:kr,SelectEventPlugin:Qr,BeforeInputEventPlugin:ur});var ao=[],uo=-1;function lo(e){0>uo||(e.current=ao[uo],ao[uo]=null,uo--)}function co(e,t){uo++,ao[uo]=e.current,e.current=t}var so={},fo={current:so},po={current:!1},ho=so;function vo(e,t){var n=e.type.contextTypes;if(!n)return so;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o,i={};for(o in n)i[o]=t[o];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function yo(e){return null!=(e=e.childContextTypes)}function mo(){lo(po),lo(fo)}function go(e,t,n){if(fo.current!==so)throw Error(a(168));co(fo,t),co(po,n)}function bo(e,t,n){var r=e.stateNode;if(e=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var i in r=r.getChildContext())if(!(i in e))throw Error(a(108,ye(t)||"Unknown",i));return o({},n,{},r)}function wo(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||so,ho=fo.current,co(fo,e),co(po,po.current),!0}function xo(e,t,n){var r=e.stateNode;if(!r)throw Error(a(169));n?(e=bo(e,t,ho),r.__reactInternalMemoizedMergedChildContext=e,lo(po),lo(fo),co(fo,e)):lo(po),co(po,n)}var Eo=i.unstable_runWithPriority,So=i.unstable_scheduleCallback,ko=i.unstable_cancelCallback,To=i.unstable_requestPaint,_o=i.unstable_now,Po=i.unstable_getCurrentPriorityLevel,Oo=i.unstable_ImmediatePriority,Co=i.unstable_UserBlockingPriority,No=i.unstable_NormalPriority,Ro=i.unstable_LowPriority,Mo=i.unstable_IdlePriority,Ao={},Fo=i.unstable_shouldYield,jo=void 0!==To?To:function(){},Io=null,Lo=null,Do=!1,zo=_o(),Uo=1e4>zo?_o:function(){return _o()-zo};function Wo(){switch(Po()){case Oo:return 99;case Co:return 98;case No:return 97;case Ro:return 96;case Mo:return 95;default:throw Error(a(332))}}function Bo(e){switch(e){case 99:return Oo;case 98:return Co;case 97:return No;case 96:return Ro;case 95:return Mo;default:throw Error(a(332))}}function Vo(e,t){return e=Bo(e),Eo(e,t)}function $o(e,t,n){return e=Bo(e),So(e,t,n)}function Ho(e){return null===Io?(Io=[e],Lo=So(Oo,Qo)):Io.push(e),Ao}function qo(){if(null!==Lo){var e=Lo;Lo=null,ko(e)}Qo()}function Qo(){if(!Do&&null!==Io){Do=!0;var e=0;try{var t=Io;Vo(99,(function(){for(;e<t.length;e++){var n=t[e];do{n=n(!0)}while(null!==n)}})),Io=null}catch(t){throw null!==Io&&(Io=Io.slice(e+1)),So(Oo,qo),t}finally{Do=!1}}}function Go(e,t,n){return 1073741821-(1+((1073741821-e+t/10)/(n/=10)|0))*n}function Ko(e,t){if(e&&e.defaultProps)for(var n in t=o({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}var Yo={current:null},Xo=null,Jo=null,Zo=null;function ei(){Zo=Jo=Xo=null}function ti(e){var t=Yo.current;lo(Yo),e.type._context._currentValue=t}function ni(e,t){for(;null!==e;){var n=e.alternate;if(e.childExpirationTime<t)e.childExpirationTime=t,null!==n&&n.childExpirationTime<t&&(n.childExpirationTime=t);else{if(!(null!==n&&n.childExpirationTime<t))break;n.childExpirationTime=t}e=e.return}}function ri(e,t){Xo=e,Zo=Jo=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(e.expirationTime>=t&&(Na=!0),e.firstContext=null)}function oi(e,t){if(Zo!==e&&!1!==t&&0!==t)if("number"==typeof t&&1073741823!==t||(Zo=e,t=1073741823),t={context:e,observedBits:t,next:null},null===Jo){if(null===Xo)throw Error(a(308));Jo=t,Xo.dependencies={expirationTime:0,firstContext:t,responders:null}}else Jo=Jo.next=t;return e._currentValue}var ii=!1;function ai(e){e.updateQueue={baseState:e.memoizedState,baseQueue:null,shared:{pending:null},effects:null}}function ui(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,baseQueue:e.baseQueue,shared:e.shared,effects:e.effects})}function li(e,t){return(e={expirationTime:e,suspenseConfig:t,tag:0,payload:null,callback:null,next:null}).next=e}function ci(e,t){if(null!==(e=e.updateQueue)){var n=(e=e.shared).pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}}function si(e,t){var n=e.alternate;null!==n&&ui(n,e),null===(n=(e=e.updateQueue).baseQueue)?(e.baseQueue=t.next=t,t.next=t):(t.next=n.next,n.next=t)}function fi(e,t,n,r){var i=e.updateQueue;ii=!1;var a=i.baseQueue,u=i.shared.pending;if(null!==u){if(null!==a){var l=a.next;a.next=u.next,u.next=l}a=u,i.shared.pending=null,null!==(l=e.alternate)&&(null!==(l=l.updateQueue)&&(l.baseQueue=u))}if(null!==a){l=a.next;var c=i.baseState,s=0,f=null,p=null,d=null;if(null!==l)for(var h=l;;){if((u=h.expirationTime)<r){var v={expirationTime:h.expirationTime,suspenseConfig:h.suspenseConfig,tag:h.tag,payload:h.payload,callback:h.callback,next:null};null===d?(p=d=v,f=c):d=d.next=v,u>s&&(s=u)}else{null!==d&&(d=d.next={expirationTime:1073741823,suspenseConfig:h.suspenseConfig,tag:h.tag,payload:h.payload,callback:h.callback,next:null}),il(u,h.suspenseConfig);e:{var y=e,m=h;switch(u=t,v=n,m.tag){case 1:if("function"==typeof(y=m.payload)){c=y.call(v,c,u);break e}c=y;break e;case 3:y.effectTag=-4097&y.effectTag|64;case 0:if(null==(u="function"==typeof(y=m.payload)?y.call(v,c,u):y))break e;c=o({},c,u);break e;case 2:ii=!0}}null!==h.callback&&(e.effectTag|=32,null===(u=i.effects)?i.effects=[h]:u.push(h))}if(null===(h=h.next)||h===l){if(null===(u=i.shared.pending))break;h=a.next=u.next,u.next=l,i.baseQueue=a=u,i.shared.pending=null}}null===d?f=c:d.next=p,i.baseState=f,i.baseQueue=d,al(s),e.expirationTime=s,e.memoizedState=c}}function pi(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(null!==o){if(r.callback=null,r=o,o=n,"function"!=typeof r)throw Error(a(191,r));r.call(o)}}}var di=Y.ReactCurrentBatchConfig,hi=(new r.Component).refs;function vi(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:o({},t,n),e.memoizedState=n,0===e.expirationTime&&(e.updateQueue.baseState=n)}var yi={isMounted:function(e){return!!(e=e._reactInternalFiber)&&Ze(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternalFiber;var r=qu(),o=di.suspense;(o=li(r=Qu(r,e,o),o)).payload=t,null!=n&&(o.callback=n),ci(e,o),Gu(e,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternalFiber;var r=qu(),o=di.suspense;(o=li(r=Qu(r,e,o),o)).tag=1,o.payload=t,null!=n&&(o.callback=n),ci(e,o),Gu(e,r)},enqueueForceUpdate:function(e,t){e=e._reactInternalFiber;var n=qu(),r=di.suspense;(r=li(n=Qu(n,e,r),r)).tag=2,null!=t&&(r.callback=t),ci(e,r),Gu(e,n)}};function mi(e,t,n,r,o,i,a){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,i,a):!t.prototype||!t.prototype.isPureReactComponent||(!zr(n,r)||!zr(o,i))}function gi(e,t,n){var r=!1,o=so,i=t.contextType;return"object"==typeof i&&null!==i?i=oi(i):(o=yo(t)?ho:fo.current,i=(r=null!=(r=t.contextTypes))?vo(e,o):so),t=new t(n,i),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=yi,e.stateNode=t,t._reactInternalFiber=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function bi(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&yi.enqueueReplaceState(t,t.state,null)}function wi(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs=hi,ai(e);var i=t.contextType;"object"==typeof i&&null!==i?o.context=oi(i):(i=yo(t)?ho:fo.current,o.context=vo(e,i)),fi(e,n,o,r),o.state=e.memoizedState,"function"==typeof(i=t.getDerivedStateFromProps)&&(vi(e,t,i,n),o.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof o.getSnapshotBeforeUpdate||"function"!=typeof o.UNSAFE_componentWillMount&&"function"!=typeof o.componentWillMount||(t=o.state,"function"==typeof o.componentWillMount&&o.componentWillMount(),"function"==typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount(),t!==o.state&&yi.enqueueReplaceState(o,o.state,null),fi(e,n,o,r),o.state=e.memoizedState),"function"==typeof o.componentDidMount&&(e.effectTag|=4)}var xi=Array.isArray;function Ei(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(a(309));var r=n.stateNode}if(!r)throw Error(a(147,e));var o=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===o?t.ref:((t=function(e){var t=r.refs;t===hi&&(t=r.refs={}),null===e?delete t[o]:t[o]=e})._stringRef=o,t)}if("string"!=typeof e)throw Error(a(284));if(!n._owner)throw Error(a(290,e))}return e}function Si(e,t){if("textarea"!==e.type)throw Error(a(31,"[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t,""))}function ki(e){function t(t,n){if(e){var r=t.lastEffect;null!==r?(r.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n,n.nextEffect=null,n.effectTag=8}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function o(e,t){return(e=_l(e,t)).index=0,e.sibling=null,e}function i(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.effectTag=2,n):r:(t.effectTag=2,n):n}function u(t){return e&&null===t.alternate&&(t.effectTag=2),t}function l(e,t,n,r){return null===t||6!==t.tag?((t=Cl(n,e.mode,r)).return=e,t):((t=o(t,n)).return=e,t)}function c(e,t,n,r){return null!==t&&t.elementType===n.type?((r=o(t,n.props)).ref=Ei(e,t,n),r.return=e,r):((r=Pl(n.type,n.key,n.props,null,e.mode,r)).ref=Ei(e,t,n),r.return=e,r)}function s(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Nl(n,e.mode,r)).return=e,t):((t=o(t,n.children||[])).return=e,t)}function f(e,t,n,r,i){return null===t||7!==t.tag?((t=Ol(n,e.mode,r,i)).return=e,t):((t=o(t,n)).return=e,t)}function p(e,t,n){if("string"==typeof t||"number"==typeof t)return(t=Cl(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case ee:return(n=Pl(t.type,t.key,t.props,null,e.mode,n)).ref=Ei(e,null,t),n.return=e,n;case te:return(t=Nl(t,e.mode,n)).return=e,t}if(xi(t)||ve(t))return(t=Ol(t,e.mode,n,null)).return=e,t;Si(e,t)}return null}function d(e,t,n,r){var o=null!==t?t.key:null;if("string"==typeof n||"number"==typeof n)return null!==o?null:l(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case ee:return n.key===o?n.type===ne?f(e,t,n.props.children,r,o):c(e,t,n,r):null;case te:return n.key===o?s(e,t,n,r):null}if(xi(n)||ve(n))return null!==o?null:f(e,t,n,r,null);Si(e,n)}return null}function h(e,t,n,r,o){if("string"==typeof r||"number"==typeof r)return l(t,e=e.get(n)||null,""+r,o);if("object"==typeof r&&null!==r){switch(r.$$typeof){case ee:return e=e.get(null===r.key?n:r.key)||null,r.type===ne?f(t,e,r.props.children,o,r.key):c(t,e,r,o);case te:return s(t,e=e.get(null===r.key?n:r.key)||null,r,o)}if(xi(r)||ve(r))return f(t,e=e.get(n)||null,r,o,null);Si(t,r)}return null}function v(o,a,u,l){for(var c=null,s=null,f=a,v=a=0,y=null;null!==f&&v<u.length;v++){f.index>v?(y=f,f=null):y=f.sibling;var m=d(o,f,u[v],l);if(null===m){null===f&&(f=y);break}e&&f&&null===m.alternate&&t(o,f),a=i(m,a,v),null===s?c=m:s.sibling=m,s=m,f=y}if(v===u.length)return n(o,f),c;if(null===f){for(;v<u.length;v++)null!==(f=p(o,u[v],l))&&(a=i(f,a,v),null===s?c=f:s.sibling=f,s=f);return c}for(f=r(o,f);v<u.length;v++)null!==(y=h(f,o,v,u[v],l))&&(e&&null!==y.alternate&&f.delete(null===y.key?v:y.key),a=i(y,a,v),null===s?c=y:s.sibling=y,s=y);return e&&f.forEach((function(e){return t(o,e)})),c}function y(o,u,l,c){var s=ve(l);if("function"!=typeof s)throw Error(a(150));if(null==(l=s.call(l)))throw Error(a(151));for(var f=s=null,v=u,y=u=0,m=null,g=l.next();null!==v&&!g.done;y++,g=l.next()){v.index>y?(m=v,v=null):m=v.sibling;var b=d(o,v,g.value,c);if(null===b){null===v&&(v=m);break}e&&v&&null===b.alternate&&t(o,v),u=i(b,u,y),null===f?s=b:f.sibling=b,f=b,v=m}if(g.done)return n(o,v),s;if(null===v){for(;!g.done;y++,g=l.next())null!==(g=p(o,g.value,c))&&(u=i(g,u,y),null===f?s=g:f.sibling=g,f=g);return s}for(v=r(o,v);!g.done;y++,g=l.next())null!==(g=h(v,o,y,g.value,c))&&(e&&null!==g.alternate&&v.delete(null===g.key?y:g.key),u=i(g,u,y),null===f?s=g:f.sibling=g,f=g);return e&&v.forEach((function(e){return t(o,e)})),s}return function(e,r,i,l){var c="object"==typeof i&&null!==i&&i.type===ne&&null===i.key;c&&(i=i.props.children);var s="object"==typeof i&&null!==i;if(s)switch(i.$$typeof){case ee:e:{for(s=i.key,c=r;null!==c;){if(c.key===s){switch(c.tag){case 7:if(i.type===ne){n(e,c.sibling),(r=o(c,i.props.children)).return=e,e=r;break e}break;default:if(c.elementType===i.type){n(e,c.sibling),(r=o(c,i.props)).ref=Ei(e,c,i),r.return=e,e=r;break e}}n(e,c);break}t(e,c),c=c.sibling}i.type===ne?((r=Ol(i.props.children,e.mode,l,i.key)).return=e,e=r):((l=Pl(i.type,i.key,i.props,null,e.mode,l)).ref=Ei(e,r,i),l.return=e,e=l)}return u(e);case te:e:{for(c=i.key;null!==r;){if(r.key===c){if(4===r.tag&&r.stateNode.containerInfo===i.containerInfo&&r.stateNode.implementation===i.implementation){n(e,r.sibling),(r=o(r,i.children||[])).return=e,e=r;break e}n(e,r);break}t(e,r),r=r.sibling}(r=Nl(i,e.mode,l)).return=e,e=r}return u(e)}if("string"==typeof i||"number"==typeof i)return i=""+i,null!==r&&6===r.tag?(n(e,r.sibling),(r=o(r,i)).return=e,e=r):(n(e,r),(r=Cl(i,e.mode,l)).return=e,e=r),u(e);if(xi(i))return v(e,r,i,l);if(ve(i))return y(e,r,i,l);if(s&&Si(e,i),void 0===i&&!c)switch(e.tag){case 1:case 0:throw e=e.type,Error(a(152,e.displayName||e.name||"Component"))}return n(e,r)}}var Ti=ki(!0),_i=ki(!1),Pi={},Oi={current:Pi},Ci={current:Pi},Ni={current:Pi};function Ri(e){if(e===Pi)throw Error(a(174));return e}function Mi(e,t){switch(co(Ni,t),co(Ci,e),co(Oi,Pi),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Le(null,"");break;default:t=Le(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}lo(Oi),co(Oi,t)}function Ai(){lo(Oi),lo(Ci),lo(Ni)}function Fi(e){Ri(Ni.current);var t=Ri(Oi.current),n=Le(t,e.type);t!==n&&(co(Ci,e),co(Oi,n))}function ji(e){Ci.current===e&&(lo(Oi),lo(Ci))}var Ii={current:0};function Li(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!=(64&t.effectTag))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}function Di(e,t){return{responder:e,props:t}}var zi=Y.ReactCurrentDispatcher,Ui=Y.ReactCurrentBatchConfig,Wi=0,Bi=null,Vi=null,$i=null,Hi=!1;function qi(){throw Error(a(321))}function Qi(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Lr(e[n],t[n]))return!1;return!0}function Gi(e,t,n,r,o,i){if(Wi=i,Bi=t,t.memoizedState=null,t.updateQueue=null,t.expirationTime=0,zi.current=null===e||null===e.memoizedState?ma:ga,e=n(r,o),t.expirationTime===Wi){i=0;do{if(t.expirationTime=0,!(25>i))throw Error(a(301));i+=1,$i=Vi=null,t.updateQueue=null,zi.current=ba,e=n(r,o)}while(t.expirationTime===Wi)}if(zi.current=ya,t=null!==Vi&&null!==Vi.next,Wi=0,$i=Vi=Bi=null,Hi=!1,t)throw Error(a(300));return e}function Ki(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===$i?Bi.memoizedState=$i=e:$i=$i.next=e,$i}function Yi(){if(null===Vi){var e=Bi.alternate;e=null!==e?e.memoizedState:null}else e=Vi.next;var t=null===$i?Bi.memoizedState:$i.next;if(null!==t)$i=t,Vi=e;else{if(null===e)throw Error(a(310));e={memoizedState:(Vi=e).memoizedState,baseState:Vi.baseState,baseQueue:Vi.baseQueue,queue:Vi.queue,next:null},null===$i?Bi.memoizedState=$i=e:$i=$i.next=e}return $i}function Xi(e,t){return"function"==typeof t?t(e):t}function Ji(e){var t=Yi(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=Vi,o=r.baseQueue,i=n.pending;if(null!==i){if(null!==o){var u=o.next;o.next=i.next,i.next=u}r.baseQueue=o=i,n.pending=null}if(null!==o){o=o.next,r=r.baseState;var l=u=i=null,c=o;do{var s=c.expirationTime;if(s<Wi){var f={expirationTime:c.expirationTime,suspenseConfig:c.suspenseConfig,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null};null===l?(u=l=f,i=r):l=l.next=f,s>Bi.expirationTime&&(Bi.expirationTime=s,al(s))}else null!==l&&(l=l.next={expirationTime:1073741823,suspenseConfig:c.suspenseConfig,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null}),il(s,c.suspenseConfig),r=c.eagerReducer===e?c.eagerState:e(r,c.action);c=c.next}while(null!==c&&c!==o);null===l?i=r:l.next=u,Lr(r,t.memoizedState)||(Na=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=l,n.lastRenderedState=r}return[t.memoizedState,n.dispatch]}function Zi(e){var t=Yi(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,i=t.memoizedState;if(null!==o){n.pending=null;var u=o=o.next;do{i=e(i,u.action),u=u.next}while(u!==o);Lr(i,t.memoizedState)||(Na=!0),t.memoizedState=i,null===t.baseQueue&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function ea(e){var t=Ki();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e=(e=t.queue={pending:null,dispatch:null,lastRenderedReducer:Xi,lastRenderedState:e}).dispatch=va.bind(null,Bi,e),[t.memoizedState,e]}function ta(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=Bi.updateQueue)?(t={lastEffect:null},Bi.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function na(){return Yi().memoizedState}function ra(e,t,n,r){var o=Ki();Bi.effectTag|=e,o.memoizedState=ta(1|t,n,void 0,void 0===r?null:r)}function oa(e,t,n,r){var o=Yi();r=void 0===r?null:r;var i=void 0;if(null!==Vi){var a=Vi.memoizedState;if(i=a.destroy,null!==r&&Qi(r,a.deps))return void ta(t,n,i,r)}Bi.effectTag|=e,o.memoizedState=ta(1|t,n,i,r)}function ia(e,t){return ra(516,4,e,t)}function aa(e,t){return oa(516,4,e,t)}function ua(e,t){return oa(4,2,e,t)}function la(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function ca(e,t,n){return n=null!=n?n.concat([e]):null,oa(4,2,la.bind(null,t,e),n)}function sa(){}function fa(e,t){return Ki().memoizedState=[e,void 0===t?null:t],e}function pa(e,t){var n=Yi();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&Qi(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function da(e,t){var n=Yi();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&Qi(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function ha(e,t,n){var r=Wo();Vo(98>r?98:r,(function(){e(!0)})),Vo(97<r?97:r,(function(){var r=Ui.suspense;Ui.suspense=void 0===t?null:t;try{e(!1),n()}finally{Ui.suspense=r}}))}function va(e,t,n){var r=qu(),o=di.suspense;o={expirationTime:r=Qu(r,e,o),suspenseConfig:o,action:n,eagerReducer:null,eagerState:null,next:null};var i=t.pending;if(null===i?o.next=o:(o.next=i.next,i.next=o),t.pending=o,i=e.alternate,e===Bi||null!==i&&i===Bi)Hi=!0,o.expirationTime=Wi,Bi.expirationTime=Wi;else{if(0===e.expirationTime&&(null===i||0===i.expirationTime)&&null!==(i=t.lastRenderedReducer))try{var a=t.lastRenderedState,u=i(a,n);if(o.eagerReducer=i,o.eagerState=u,Lr(u,a))return}catch(e){}Gu(e,r)}}var ya={readContext:oi,useCallback:qi,useContext:qi,useEffect:qi,useImperativeHandle:qi,useLayoutEffect:qi,useMemo:qi,useReducer:qi,useRef:qi,useState:qi,useDebugValue:qi,useResponder:qi,useDeferredValue:qi,useTransition:qi},ma={readContext:oi,useCallback:fa,useContext:oi,useEffect:ia,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,ra(4,2,la.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ra(4,2,e,t)},useMemo:function(e,t){var n=Ki();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Ki();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e=(e=r.queue={pending:null,dispatch:null,lastRenderedReducer:e,lastRenderedState:t}).dispatch=va.bind(null,Bi,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},Ki().memoizedState=e},useState:ea,useDebugValue:sa,useResponder:Di,useDeferredValue:function(e,t){var n=ea(e),r=n[0],o=n[1];return ia((function(){var n=Ui.suspense;Ui.suspense=void 0===t?null:t;try{o(e)}finally{Ui.suspense=n}}),[e,t]),r},useTransition:function(e){var t=ea(!1),n=t[0];return t=t[1],[fa(ha.bind(null,t,e),[t,e]),n]}},ga={readContext:oi,useCallback:pa,useContext:oi,useEffect:aa,useImperativeHandle:ca,useLayoutEffect:ua,useMemo:da,useReducer:Ji,useRef:na,useState:function(){return Ji(Xi)},useDebugValue:sa,useResponder:Di,useDeferredValue:function(e,t){var n=Ji(Xi),r=n[0],o=n[1];return aa((function(){var n=Ui.suspense;Ui.suspense=void 0===t?null:t;try{o(e)}finally{Ui.suspense=n}}),[e,t]),r},useTransition:function(e){var t=Ji(Xi),n=t[0];return t=t[1],[pa(ha.bind(null,t,e),[t,e]),n]}},ba={readContext:oi,useCallback:pa,useContext:oi,useEffect:aa,useImperativeHandle:ca,useLayoutEffect:ua,useMemo:da,useReducer:Zi,useRef:na,useState:function(){return Zi(Xi)},useDebugValue:sa,useResponder:Di,useDeferredValue:function(e,t){var n=Zi(Xi),r=n[0],o=n[1];return aa((function(){var n=Ui.suspense;Ui.suspense=void 0===t?null:t;try{o(e)}finally{Ui.suspense=n}}),[e,t]),r},useTransition:function(e){var t=Zi(Xi),n=t[0];return t=t[1],[pa(ha.bind(null,t,e),[t,e]),n]}},wa=null,xa=null,Ea=!1;function Sa(e,t){var n=kl(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=t,n.return=e,n.effectTag=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function ka(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,!0);case 13:default:return!1}}function Ta(e){if(Ea){var t=xa;if(t){var n=t;if(!ka(e,t)){if(!(t=xn(n.nextSibling))||!ka(e,t))return e.effectTag=-1025&e.effectTag|2,Ea=!1,void(wa=e);Sa(wa,n)}wa=e,xa=xn(t.firstChild)}else e.effectTag=-1025&e.effectTag|2,Ea=!1,wa=e}}function _a(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;wa=e}function Pa(e){if(e!==wa)return!1;if(!Ea)return _a(e),Ea=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!gn(t,e.memoizedProps))for(t=xa;t;)Sa(e,t),t=xn(t.nextSibling);if(_a(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(a(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){xa=xn(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}xa=null}}else xa=wa?xn(e.stateNode.nextSibling):null;return!0}function Oa(){xa=wa=null,Ea=!1}var Ca=Y.ReactCurrentOwner,Na=!1;function Ra(e,t,n,r){t.child=null===e?_i(t,null,n,r):Ti(t,e.child,n,r)}function Ma(e,t,n,r,o){n=n.render;var i=t.ref;return ri(t,o),r=Gi(e,t,n,r,i,o),null===e||Na?(t.effectTag|=1,Ra(e,t,r,o),t.child):(t.updateQueue=e.updateQueue,t.effectTag&=-517,e.expirationTime<=o&&(e.expirationTime=0),Ga(e,t,o))}function Aa(e,t,n,r,o,i){if(null===e){var a=n.type;return"function"!=typeof a||Tl(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Pl(n.type,null,r,null,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,Fa(e,t,a,r,o,i))}return a=e.child,o<i&&(o=a.memoizedProps,(n=null!==(n=n.compare)?n:zr)(o,r)&&e.ref===t.ref)?Ga(e,t,i):(t.effectTag|=1,(e=_l(a,r)).ref=t.ref,e.return=t,t.child=e)}function Fa(e,t,n,r,o,i){return null!==e&&zr(e.memoizedProps,r)&&e.ref===t.ref&&(Na=!1,o<i)?(t.expirationTime=e.expirationTime,Ga(e,t,i)):Ia(e,t,n,r,i)}function ja(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.effectTag|=128)}function Ia(e,t,n,r,o){var i=yo(n)?ho:fo.current;return i=vo(t,i),ri(t,o),n=Gi(e,t,n,r,i,o),null===e||Na?(t.effectTag|=1,Ra(e,t,n,o),t.child):(t.updateQueue=e.updateQueue,t.effectTag&=-517,e.expirationTime<=o&&(e.expirationTime=0),Ga(e,t,o))}function La(e,t,n,r,o){if(yo(n)){var i=!0;wo(t)}else i=!1;if(ri(t,o),null===t.stateNode)null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),gi(t,n,r),wi(t,n,r,o),r=!0;else if(null===e){var a=t.stateNode,u=t.memoizedProps;a.props=u;var l=a.context,c=n.contextType;"object"==typeof c&&null!==c?c=oi(c):c=vo(t,c=yo(n)?ho:fo.current);var s=n.getDerivedStateFromProps,f="function"==typeof s||"function"==typeof a.getSnapshotBeforeUpdate;f||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(u!==r||l!==c)&&bi(t,a,r,c),ii=!1;var p=t.memoizedState;a.state=p,fi(t,r,a,o),l=t.memoizedState,u!==r||p!==l||po.current||ii?("function"==typeof s&&(vi(t,n,s,r),l=t.memoizedState),(u=ii||mi(t,n,u,r,p,l,c))?(f||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||("function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"==typeof a.componentDidMount&&(t.effectTag|=4)):("function"==typeof a.componentDidMount&&(t.effectTag|=4),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=c,r=u):("function"==typeof a.componentDidMount&&(t.effectTag|=4),r=!1)}else a=t.stateNode,ui(e,t),u=t.memoizedProps,a.props=t.type===t.elementType?u:Ko(t.type,u),l=a.context,"object"==typeof(c=n.contextType)&&null!==c?c=oi(c):c=vo(t,c=yo(n)?ho:fo.current),(f="function"==typeof(s=n.getDerivedStateFromProps)||"function"==typeof a.getSnapshotBeforeUpdate)||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(u!==r||l!==c)&&bi(t,a,r,c),ii=!1,l=t.memoizedState,a.state=l,fi(t,r,a,o),p=t.memoizedState,u!==r||l!==p||po.current||ii?("function"==typeof s&&(vi(t,n,s,r),p=t.memoizedState),(s=ii||mi(t,n,u,r,l,p,c))?(f||"function"!=typeof a.UNSAFE_componentWillUpdate&&"function"!=typeof a.componentWillUpdate||("function"==typeof a.componentWillUpdate&&a.componentWillUpdate(r,p,c),"function"==typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,p,c)),"function"==typeof a.componentDidUpdate&&(t.effectTag|=4),"function"==typeof a.getSnapshotBeforeUpdate&&(t.effectTag|=256)):("function"!=typeof a.componentDidUpdate||u===e.memoizedProps&&l===e.memoizedState||(t.effectTag|=4),"function"!=typeof a.getSnapshotBeforeUpdate||u===e.memoizedProps&&l===e.memoizedState||(t.effectTag|=256),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=s):("function"!=typeof a.componentDidUpdate||u===e.memoizedProps&&l===e.memoizedState||(t.effectTag|=4),"function"!=typeof a.getSnapshotBeforeUpdate||u===e.memoizedProps&&l===e.memoizedState||(t.effectTag|=256),r=!1);return Da(e,t,n,r,i,o)}function Da(e,t,n,r,o,i){ja(e,t);var a=0!=(64&t.effectTag);if(!r&&!a)return o&&xo(t,n,!1),Ga(e,t,i);r=t.stateNode,Ca.current=t;var u=a&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.effectTag|=1,null!==e&&a?(t.child=Ti(t,e.child,null,i),t.child=Ti(t,null,u,i)):Ra(e,t,u,i),t.memoizedState=r.state,o&&xo(t,n,!0),t.child}function za(e){var t=e.stateNode;t.pendingContext?go(0,t.pendingContext,t.pendingContext!==t.context):t.context&&go(0,t.context,!1),Mi(e,t.containerInfo)}var Ua,Wa,Ba,Va={dehydrated:null,retryTime:0};function $a(e,t,n){var r,o=t.mode,i=t.pendingProps,a=Ii.current,u=!1;if((r=0!=(64&t.effectTag))||(r=0!=(2&a)&&(null===e||null!==e.memoizedState)),r?(u=!0,t.effectTag&=-65):null!==e&&null===e.memoizedState||void 0===i.fallback||!0===i.unstable_avoidThisFallback||(a|=1),co(Ii,1&a),null===e){if(void 0!==i.fallback&&Ta(t),u){if(u=i.fallback,(i=Ol(null,o,0,null)).return=t,0==(2&t.mode))for(e=null!==t.memoizedState?t.child.child:t.child,i.child=e;null!==e;)e.return=i,e=e.sibling;return(n=Ol(u,o,n,null)).return=t,i.sibling=n,t.memoizedState=Va,t.child=i,n}return o=i.children,t.memoizedState=null,t.child=_i(t,null,o,n)}if(null!==e.memoizedState){if(o=(e=e.child).sibling,u){if(i=i.fallback,(n=_l(e,e.pendingProps)).return=t,0==(2&t.mode)&&(u=null!==t.memoizedState?t.child.child:t.child)!==e.child)for(n.child=u;null!==u;)u.return=n,u=u.sibling;return(o=_l(o,i)).return=t,n.sibling=o,n.childExpirationTime=0,t.memoizedState=Va,t.child=n,o}return n=Ti(t,e.child,i.children,n),t.memoizedState=null,t.child=n}if(e=e.child,u){if(u=i.fallback,(i=Ol(null,o,0,null)).return=t,i.child=e,null!==e&&(e.return=i),0==(2&t.mode))for(e=null!==t.memoizedState?t.child.child:t.child,i.child=e;null!==e;)e.return=i,e=e.sibling;return(n=Ol(u,o,n,null)).return=t,i.sibling=n,n.effectTag|=2,i.childExpirationTime=0,t.memoizedState=Va,t.child=i,n}return t.memoizedState=null,t.child=Ti(t,e,i.children,n)}function Ha(e,t){e.expirationTime<t&&(e.expirationTime=t);var n=e.alternate;null!==n&&n.expirationTime<t&&(n.expirationTime=t),ni(e.return,t)}function qa(e,t,n,r,o,i){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailExpiration:0,tailMode:o,lastEffect:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailExpiration=0,a.tailMode=o,a.lastEffect=i)}function Qa(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(Ra(e,t,r.children,n),0!=(2&(r=Ii.current)))r=1&r|2,t.effectTag|=64;else{if(null!==e&&0!=(64&e.effectTag))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&Ha(e,n);else if(19===e.tag)Ha(e,n);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(co(Ii,r),0==(2&t.mode))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;null!==n;)null!==(e=n.alternate)&&null===Li(e)&&(o=n),n=n.sibling;null===(n=o)?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),qa(t,!1,o,n,i,t.lastEffect);break;case"backwards":for(n=null,o=t.child,t.child=null;null!==o;){if(null!==(e=o.alternate)&&null===Li(e)){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}qa(t,!0,n,null,i,t.lastEffect);break;case"together":qa(t,!1,null,null,void 0,t.lastEffect);break;default:t.memoizedState=null}return t.child}function Ga(e,t,n){null!==e&&(t.dependencies=e.dependencies);var r=t.expirationTime;if(0!==r&&al(r),t.childExpirationTime<n)return null;if(null!==e&&t.child!==e.child)throw Error(a(153));if(null!==t.child){for(n=_l(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=_l(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function Ka(e,t){switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Ya(e,t,n){var r=t.pendingProps;switch(t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:return yo(t.type)&&mo(),null;case 3:return Ai(),lo(po),lo(fo),(n=t.stateNode).pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),null!==e&&null!==e.child||!Pa(t)||(t.effectTag|=4),null;case 5:ji(t),n=Ri(Ni.current);var i=t.type;if(null!==e&&null!=t.stateNode)Wa(e,t,i,r,n),e.ref!==t.ref&&(t.effectTag|=128);else{if(!r){if(null===t.stateNode)throw Error(a(166));return null}if(e=Ri(Oi.current),Pa(t)){r=t.stateNode,i=t.type;var u=t.memoizedProps;switch(r[kn]=t,r[Tn]=u,i){case"iframe":case"object":case"embed":Qt("load",r);break;case"video":case"audio":for(e=0;e<Ye.length;e++)Qt(Ye[e],r);break;case"source":Qt("error",r);break;case"img":case"image":case"link":Qt("error",r),Qt("load",r);break;case"form":Qt("reset",r),Qt("submit",r);break;case"details":Qt("toggle",r);break;case"input":Se(r,u),Qt("invalid",r),ln(n,"onChange");break;case"select":r._wrapperState={wasMultiple:!!u.multiple},Qt("invalid",r),ln(n,"onChange");break;case"textarea":Re(r,u),Qt("invalid",r),ln(n,"onChange")}for(var l in on(i,u),e=null,u)if(u.hasOwnProperty(l)){var c=u[l];"children"===l?"string"==typeof c?r.textContent!==c&&(e=["children",c]):"number"==typeof c&&r.textContent!==""+c&&(e=["children",""+c]):k.hasOwnProperty(l)&&null!=c&&ln(n,l)}switch(i){case"input":we(r),_e(r,u,!0);break;case"textarea":we(r),Ae(r);break;case"select":case"option":break;default:"function"==typeof u.onClick&&(r.onclick=cn)}n=e,t.updateQueue=n,null!==n&&(t.effectTag|=4)}else{switch(l=9===n.nodeType?n:n.ownerDocument,e===un&&(e=Ie(i)),e===un?"script"===i?((e=l.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof r.is?e=l.createElement(i,{is:r.is}):(e=l.createElement(i),"select"===i&&(l=e,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):e=l.createElementNS(e,i),e[kn]=t,e[Tn]=r,Ua(e,t),t.stateNode=e,l=an(i,r),i){case"iframe":case"object":case"embed":Qt("load",e),c=r;break;case"video":case"audio":for(c=0;c<Ye.length;c++)Qt(Ye[c],e);c=r;break;case"source":Qt("error",e),c=r;break;case"img":case"image":case"link":Qt("error",e),Qt("load",e),c=r;break;case"form":Qt("reset",e),Qt("submit",e),c=r;break;case"details":Qt("toggle",e),c=r;break;case"input":Se(e,r),c=Ee(e,r),Qt("invalid",e),ln(n,"onChange");break;case"option":c=Oe(e,r);break;case"select":e._wrapperState={wasMultiple:!!r.multiple},c=o({},r,{value:void 0}),Qt("invalid",e),ln(n,"onChange");break;case"textarea":Re(e,r),c=Ne(e,r),Qt("invalid",e),ln(n,"onChange");break;default:c=r}on(i,c);var s=c;for(u in s)if(s.hasOwnProperty(u)){var f=s[u];"style"===u?nn(e,f):"dangerouslySetInnerHTML"===u?null!=(f=f?f.__html:void 0)&&ze(e,f):"children"===u?"string"==typeof f?("textarea"!==i||""!==f)&&Ue(e,f):"number"==typeof f&&Ue(e,""+f):"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&"autoFocus"!==u&&(k.hasOwnProperty(u)?null!=f&&ln(n,u):null!=f&&X(e,u,f,l))}switch(i){case"input":we(e),_e(e,r,!1);break;case"textarea":we(e),Ae(e);break;case"option":null!=r.value&&e.setAttribute("value",""+ge(r.value));break;case"select":e.multiple=!!r.multiple,null!=(n=r.value)?Ce(e,!!r.multiple,n,!1):null!=r.defaultValue&&Ce(e,!!r.multiple,r.defaultValue,!0);break;default:"function"==typeof c.onClick&&(e.onclick=cn)}mn(i,r)&&(t.effectTag|=4)}null!==t.ref&&(t.effectTag|=128)}return null;case 6:if(e&&null!=t.stateNode)Ba(0,t,e.memoizedProps,r);else{if("string"!=typeof r&&null===t.stateNode)throw Error(a(166));n=Ri(Ni.current),Ri(Oi.current),Pa(t)?(n=t.stateNode,r=t.memoizedProps,n[kn]=t,n.nodeValue!==r&&(t.effectTag|=4)):((n=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[kn]=t,t.stateNode=n)}return null;case 13:return lo(Ii),r=t.memoizedState,0!=(64&t.effectTag)?(t.expirationTime=n,t):(n=null!==r,r=!1,null===e?void 0!==t.memoizedProps.fallback&&Pa(t):(r=null!==(i=e.memoizedState),n||null===i||null!==(i=e.child.sibling)&&(null!==(u=t.firstEffect)?(t.firstEffect=i,i.nextEffect=u):(t.firstEffect=t.lastEffect=i,i.nextEffect=null),i.effectTag=8)),n&&!r&&0!=(2&t.mode)&&(null===e&&!0!==t.memoizedProps.unstable_avoidThisFallback||0!=(1&Ii.current)?Pu===wu&&(Pu=xu):(Pu!==wu&&Pu!==xu||(Pu=Eu),0!==Mu&&null!==ku&&(Al(ku,_u),Fl(ku,Mu)))),(n||r)&&(t.effectTag|=4),null);case 4:return Ai(),null;case 10:return ti(t),null;case 17:return yo(t.type)&&mo(),null;case 19:if(lo(Ii),null===(r=t.memoizedState))return null;if(i=0!=(64&t.effectTag),null===(u=r.rendering)){if(i)Ka(r,!1);else if(Pu!==wu||null!==e&&0!=(64&e.effectTag))for(u=t.child;null!==u;){if(null!==(e=Li(u))){for(t.effectTag|=64,Ka(r,!1),null!==(i=e.updateQueue)&&(t.updateQueue=i,t.effectTag|=4),null===r.lastEffect&&(t.firstEffect=null),t.lastEffect=r.lastEffect,r=t.child;null!==r;)u=n,(i=r).effectTag&=2,i.nextEffect=null,i.firstEffect=null,i.lastEffect=null,null===(e=i.alternate)?(i.childExpirationTime=0,i.expirationTime=u,i.child=null,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null):(i.childExpirationTime=e.childExpirationTime,i.expirationTime=e.expirationTime,i.child=e.child,i.memoizedProps=e.memoizedProps,i.memoizedState=e.memoizedState,i.updateQueue=e.updateQueue,u=e.dependencies,i.dependencies=null===u?null:{expirationTime:u.expirationTime,firstContext:u.firstContext,responders:u.responders}),r=r.sibling;return co(Ii,1&Ii.current|2),t.child}u=u.sibling}}else{if(!i)if(null!==(e=Li(u))){if(t.effectTag|=64,i=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.effectTag|=4),Ka(r,!0),null===r.tail&&"hidden"===r.tailMode&&!u.alternate)return null!==(t=t.lastEffect=r.lastEffect)&&(t.nextEffect=null),null}else 2*Uo()-r.renderingStartTime>r.tailExpiration&&1<n&&(t.effectTag|=64,i=!0,Ka(r,!1),t.expirationTime=t.childExpirationTime=n-1);r.isBackwards?(u.sibling=t.child,t.child=u):(null!==(n=r.last)?n.sibling=u:t.child=u,r.last=u)}return null!==r.tail?(0===r.tailExpiration&&(r.tailExpiration=Uo()+500),n=r.tail,r.rendering=n,r.tail=n.sibling,r.lastEffect=t.lastEffect,r.renderingStartTime=Uo(),n.sibling=null,t=Ii.current,co(Ii,i?1&t|2:1&t),n):null}throw Error(a(156,t.tag))}function Xa(e){switch(e.tag){case 1:yo(e.type)&&mo();var t=e.effectTag;return 4096&t?(e.effectTag=-4097&t|64,e):null;case 3:if(Ai(),lo(po),lo(fo),0!=(64&(t=e.effectTag)))throw Error(a(285));return e.effectTag=-4097&t|64,e;case 5:return ji(e),null;case 13:return lo(Ii),4096&(t=e.effectTag)?(e.effectTag=-4097&t|64,e):null;case 19:return lo(Ii),null;case 4:return Ai(),null;case 10:return ti(e),null;default:return null}}function Ja(e,t){return{value:e,source:t,stack:me(t)}}Ua=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Wa=function(e,t,n,r,i){var a=e.memoizedProps;if(a!==r){var u,l,c=t.stateNode;switch(Ri(Oi.current),e=null,n){case"input":a=Ee(c,a),r=Ee(c,r),e=[];break;case"option":a=Oe(c,a),r=Oe(c,r),e=[];break;case"select":a=o({},a,{value:void 0}),r=o({},r,{value:void 0}),e=[];break;case"textarea":a=Ne(c,a),r=Ne(c,r),e=[];break;default:"function"!=typeof a.onClick&&"function"==typeof r.onClick&&(c.onclick=cn)}for(u in on(n,r),n=null,a)if(!r.hasOwnProperty(u)&&a.hasOwnProperty(u)&&null!=a[u])if("style"===u)for(l in c=a[u])c.hasOwnProperty(l)&&(n||(n={}),n[l]="");else"dangerouslySetInnerHTML"!==u&&"children"!==u&&"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&"autoFocus"!==u&&(k.hasOwnProperty(u)?e||(e=[]):(e=e||[]).push(u,null));for(u in r){var s=r[u];if(c=null!=a?a[u]:void 0,r.hasOwnProperty(u)&&s!==c&&(null!=s||null!=c))if("style"===u)if(c){for(l in c)!c.hasOwnProperty(l)||s&&s.hasOwnProperty(l)||(n||(n={}),n[l]="");for(l in s)s.hasOwnProperty(l)&&c[l]!==s[l]&&(n||(n={}),n[l]=s[l])}else n||(e||(e=[]),e.push(u,n)),n=s;else"dangerouslySetInnerHTML"===u?(s=s?s.__html:void 0,c=c?c.__html:void 0,null!=s&&c!==s&&(e=e||[]).push(u,s)):"children"===u?c===s||"string"!=typeof s&&"number"!=typeof s||(e=e||[]).push(u,""+s):"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&(k.hasOwnProperty(u)?(null!=s&&ln(i,u),e||c===s||(e=[])):(e=e||[]).push(u,s))}n&&(e=e||[]).push("style",n),i=e,(t.updateQueue=i)&&(t.effectTag|=4)}},Ba=function(e,t,n,r){n!==r&&(t.effectTag|=4)};var Za="function"==typeof WeakSet?WeakSet:Set;function eu(e,t){var n=t.source,r=t.stack;null===r&&null!==n&&(r=me(n)),null!==n&&ye(n.type),t=t.value,null!==e&&1===e.tag&&ye(e.type);try{console.error(t)}catch(e){setTimeout((function(){throw e}))}}function tu(e){var t=e.ref;if(null!==t)if("function"==typeof t)try{t(null)}catch(t){gl(e,t)}else t.current=null}function nu(e,t){switch(t.tag){case 0:case 11:case 15:case 22:return;case 1:if(256&t.effectTag&&null!==e){var n=e.memoizedProps,r=e.memoizedState;t=(e=t.stateNode).getSnapshotBeforeUpdate(t.elementType===t.type?n:Ko(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:case 5:case 6:case 4:case 17:return}throw Error(a(163))}function ru(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.destroy;n.destroy=void 0,void 0!==r&&r()}n=n.next}while(n!==t)}}function ou(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function iu(e,t,n){switch(n.tag){case 0:case 11:case 15:case 22:return void ou(3,n);case 1:if(e=n.stateNode,4&n.effectTag)if(null===t)e.componentDidMount();else{var r=n.elementType===n.type?t.memoizedProps:Ko(n.type,t.memoizedProps);e.componentDidUpdate(r,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate)}return void(null!==(t=n.updateQueue)&&pi(n,t,e));case 3:if(null!==(t=n.updateQueue)){if(e=null,null!==n.child)switch(n.child.tag){case 5:e=n.child.stateNode;break;case 1:e=n.child.stateNode}pi(n,t,e)}return;case 5:return e=n.stateNode,void(null===t&&4&n.effectTag&&mn(n.type,n.memoizedProps)&&e.focus());case 6:case 4:case 12:return;case 13:return void(null===n.memoizedState&&(n=n.alternate,null!==n&&(n=n.memoizedState,null!==n&&(n=n.dehydrated,null!==n&&It(n)))));case 19:case 17:case 20:case 21:return}throw Error(a(163))}function au(e,t,n){switch("function"==typeof El&&El(t),t.tag){case 0:case 11:case 14:case 15:case 22:if(null!==(e=t.updateQueue)&&null!==(e=e.lastEffect)){var r=e.next;Vo(97<n?97:n,(function(){var e=r;do{var n=e.destroy;if(void 0!==n){var o=t;try{n()}catch(e){gl(o,e)}}e=e.next}while(e!==r)}))}break;case 1:tu(t),"function"==typeof(n=t.stateNode).componentWillUnmount&&function(e,t){try{t.props=e.memoizedProps,t.state=e.memoizedState,t.componentWillUnmount()}catch(t){gl(e,t)}}(t,n);break;case 5:tu(t);break;case 4:su(e,t,n)}}function uu(e){var t=e.alternate;e.return=null,e.child=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.alternate=null,e.firstEffect=null,e.lastEffect=null,e.pendingProps=null,e.memoizedProps=null,e.stateNode=null,null!==t&&uu(t)}function lu(e){return 5===e.tag||3===e.tag||4===e.tag}function cu(e){e:{for(var t=e.return;null!==t;){if(lu(t)){var n=t;break e}t=t.return}throw Error(a(160))}switch(t=n.stateNode,n.tag){case 5:var r=!1;break;case 3:case 4:t=t.containerInfo,r=!0;break;default:throw Error(a(161))}16&n.effectTag&&(Ue(t,""),n.effectTag&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||lu(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag&&18!==n.tag;){if(2&n.effectTag)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.effectTag)){n=n.stateNode;break e}}r?function e(t,n,r){var o=t.tag,i=5===o||6===o;if(i)t=i?t.stateNode:t.stateNode.instance,n?8===r.nodeType?r.parentNode.insertBefore(t,n):r.insertBefore(t,n):(8===r.nodeType?(n=r.parentNode).insertBefore(t,r):(n=r).appendChild(t),null!==(r=r._reactRootContainer)&&void 0!==r||null!==n.onclick||(n.onclick=cn));else if(4!==o&&null!==(t=t.child))for(e(t,n,r),t=t.sibling;null!==t;)e(t,n,r),t=t.sibling}(e,n,t):function e(t,n,r){var o=t.tag,i=5===o||6===o;if(i)t=i?t.stateNode:t.stateNode.instance,n?r.insertBefore(t,n):r.appendChild(t);else if(4!==o&&null!==(t=t.child))for(e(t,n,r),t=t.sibling;null!==t;)e(t,n,r),t=t.sibling}(e,n,t)}function su(e,t,n){for(var r,o,i=t,u=!1;;){if(!u){u=i.return;e:for(;;){if(null===u)throw Error(a(160));switch(r=u.stateNode,u.tag){case 5:o=!1;break e;case 3:case 4:r=r.containerInfo,o=!0;break e}u=u.return}u=!0}if(5===i.tag||6===i.tag){e:for(var l=e,c=i,s=n,f=c;;)if(au(l,f,s),null!==f.child&&4!==f.tag)f.child.return=f,f=f.child;else{if(f===c)break e;for(;null===f.sibling;){if(null===f.return||f.return===c)break e;f=f.return}f.sibling.return=f.return,f=f.sibling}o?(l=r,c=i.stateNode,8===l.nodeType?l.parentNode.removeChild(c):l.removeChild(c)):r.removeChild(i.stateNode)}else if(4===i.tag){if(null!==i.child){r=i.stateNode.containerInfo,o=!0,i.child.return=i,i=i.child;continue}}else if(au(e,i,n),null!==i.child){i.child.return=i,i=i.child;continue}if(i===t)break;for(;null===i.sibling;){if(null===i.return||i.return===t)return;4===(i=i.return).tag&&(u=!1)}i.sibling.return=i.return,i=i.sibling}}function fu(e,t){switch(t.tag){case 0:case 11:case 14:case 15:case 22:return void ru(3,t);case 1:return;case 5:var n=t.stateNode;if(null!=n){var r=t.memoizedProps,o=null!==e?e.memoizedProps:r;e=t.type;var i=t.updateQueue;if(t.updateQueue=null,null!==i){for(n[Tn]=r,"input"===e&&"radio"===r.type&&null!=r.name&&ke(n,r),an(e,o),t=an(e,r),o=0;o<i.length;o+=2){var u=i[o],l=i[o+1];"style"===u?nn(n,l):"dangerouslySetInnerHTML"===u?ze(n,l):"children"===u?Ue(n,l):X(n,u,l,t)}switch(e){case"input":Te(n,r);break;case"textarea":Me(n,r);break;case"select":t=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!r.multiple,null!=(e=r.value)?Ce(n,!!r.multiple,e,!1):t!==!!r.multiple&&(null!=r.defaultValue?Ce(n,!!r.multiple,r.defaultValue,!0):Ce(n,!!r.multiple,r.multiple?[]:"",!1))}}}return;case 6:if(null===t.stateNode)throw Error(a(162));return void(t.stateNode.nodeValue=t.memoizedProps);case 3:return void((t=t.stateNode).hydrate&&(t.hydrate=!1,It(t.containerInfo)));case 12:return;case 13:if(n=t,null===t.memoizedState?r=!1:(r=!0,n=t.child,Fu=Uo()),null!==n)e:for(e=n;;){if(5===e.tag)i=e.stateNode,r?"function"==typeof(i=i.style).setProperty?i.setProperty("display","none","important"):i.display="none":(i=e.stateNode,o=null!=(o=e.memoizedProps.style)&&o.hasOwnProperty("display")?o.display:null,i.style.display=tn("display",o));else if(6===e.tag)e.stateNode.nodeValue=r?"":e.memoizedProps;else{if(13===e.tag&&null!==e.memoizedState&&null===e.memoizedState.dehydrated){(i=e.child.sibling).return=e,e=i;continue}if(null!==e.child){e.child.return=e,e=e.child;continue}}if(e===n)break;for(;null===e.sibling;){if(null===e.return||e.return===n)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}return void pu(t);case 19:return void pu(t);case 17:return}throw Error(a(163))}function pu(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new Za),t.forEach((function(t){var r=wl.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}var du="function"==typeof WeakMap?WeakMap:Map;function hu(e,t,n){(n=li(n,null)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Iu||(Iu=!0,Lu=r),eu(e,t)},n}function vu(e,t,n){(n=li(n,null)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var o=t.value;n.payload=function(){return eu(e,t),r(o)}}var i=e.stateNode;return null!==i&&"function"==typeof i.componentDidCatch&&(n.callback=function(){"function"!=typeof r&&(null===Du?Du=new Set([this]):Du.add(this),eu(e,t));var n=t.stack;this.componentDidCatch(t.value,{componentStack:null!==n?n:""})}),n}var yu,mu=Math.ceil,gu=Y.ReactCurrentDispatcher,bu=Y.ReactCurrentOwner,wu=0,xu=3,Eu=4,Su=0,ku=null,Tu=null,_u=0,Pu=wu,Ou=null,Cu=1073741823,Nu=1073741823,Ru=null,Mu=0,Au=!1,Fu=0,ju=null,Iu=!1,Lu=null,Du=null,zu=!1,Uu=null,Wu=90,Bu=null,Vu=0,$u=null,Hu=0;function qu(){return 0!=(48&Su)?1073741821-(Uo()/10|0):0!==Hu?Hu:Hu=1073741821-(Uo()/10|0)}function Qu(e,t,n){if(0==(2&(t=t.mode)))return 1073741823;var r=Wo();if(0==(4&t))return 99===r?1073741823:1073741822;if(0!=(16&Su))return _u;if(null!==n)e=Go(e,0|n.timeoutMs||5e3,250);else switch(r){case 99:e=1073741823;break;case 98:e=Go(e,150,100);break;case 97:case 96:e=Go(e,5e3,250);break;case 95:e=2;break;default:throw Error(a(326))}return null!==ku&&e===_u&&--e,e}function Gu(e,t){if(50<Vu)throw Vu=0,$u=null,Error(a(185));if(null!==(e=Ku(e,t))){var n=Wo();1073741823===t?0!=(8&Su)&&0==(48&Su)?Zu(e):(Xu(e),0===Su&&qo()):Xu(e),0==(4&Su)||98!==n&&99!==n||(null===Bu?Bu=new Map([[e,t]]):(void 0===(n=Bu.get(e))||n>t)&&Bu.set(e,t))}}function Ku(e,t){e.expirationTime<t&&(e.expirationTime=t);var n=e.alternate;null!==n&&n.expirationTime<t&&(n.expirationTime=t);var r=e.return,o=null;if(null===r&&3===e.tag)o=e.stateNode;else for(;null!==r;){if(n=r.alternate,r.childExpirationTime<t&&(r.childExpirationTime=t),null!==n&&n.childExpirationTime<t&&(n.childExpirationTime=t),null===r.return&&3===r.tag){o=r.stateNode;break}r=r.return}return null!==o&&(ku===o&&(al(t),Pu===Eu&&Al(o,_u)),Fl(o,t)),o}function Yu(e){var t=e.lastExpiredTime;if(0!==t)return t;if(!Ml(e,t=e.firstPendingTime))return t;var n=e.lastPingedTime;return 2>=(e=n>(e=e.nextKnownPendingLevel)?n:e)&&t!==e?0:e}function Xu(e){if(0!==e.lastExpiredTime)e.callbackExpirationTime=1073741823,e.callbackPriority=99,e.callbackNode=Ho(Zu.bind(null,e));else{var t=Yu(e),n=e.callbackNode;if(0===t)null!==n&&(e.callbackNode=null,e.callbackExpirationTime=0,e.callbackPriority=90);else{var r=qu();if(1073741823===t?r=99:1===t||2===t?r=95:r=0>=(r=10*(1073741821-t)-10*(1073741821-r))?99:250>=r?98:5250>=r?97:95,null!==n){var o=e.callbackPriority;if(e.callbackExpirationTime===t&&o>=r)return;n!==Ao&&ko(n)}e.callbackExpirationTime=t,e.callbackPriority=r,t=1073741823===t?Ho(Zu.bind(null,e)):$o(r,Ju.bind(null,e),{timeout:10*(1073741821-t)-Uo()}),e.callbackNode=t}}}function Ju(e,t){if(Hu=0,t)return jl(e,t=qu()),Xu(e),null;var n=Yu(e);if(0!==n){if(t=e.callbackNode,0!=(48&Su))throw Error(a(327));if(vl(),e===ku&&n===_u||nl(e,n),null!==Tu){var r=Su;Su|=16;for(var o=ol();;)try{ll();break}catch(t){rl(e,t)}if(ei(),Su=r,gu.current=o,1===Pu)throw t=Ou,nl(e,n),Al(e,n),Xu(e),t;if(null===Tu)switch(o=e.finishedWork=e.current.alternate,e.finishedExpirationTime=n,r=Pu,ku=null,r){case wu:case 1:throw Error(a(345));case 2:jl(e,2<n?2:n);break;case xu:if(Al(e,n),n===(r=e.lastSuspendedTime)&&(e.nextKnownPendingLevel=fl(o)),1073741823===Cu&&10<(o=Fu+500-Uo())){if(Au){var i=e.lastPingedTime;if(0===i||i>=n){e.lastPingedTime=n,nl(e,n);break}}if(0!==(i=Yu(e))&&i!==n)break;if(0!==r&&r!==n){e.lastPingedTime=r;break}e.timeoutHandle=bn(pl.bind(null,e),o);break}pl(e);break;case Eu:if(Al(e,n),n===(r=e.lastSuspendedTime)&&(e.nextKnownPendingLevel=fl(o)),Au&&(0===(o=e.lastPingedTime)||o>=n)){e.lastPingedTime=n,nl(e,n);break}if(0!==(o=Yu(e))&&o!==n)break;if(0!==r&&r!==n){e.lastPingedTime=r;break}if(1073741823!==Nu?r=10*(1073741821-Nu)-Uo():1073741823===Cu?r=0:(r=10*(1073741821-Cu)-5e3,0>(r=(o=Uo())-r)&&(r=0),(n=10*(1073741821-n)-o)<(r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*mu(r/1960))-r)&&(r=n)),10<r){e.timeoutHandle=bn(pl.bind(null,e),r);break}pl(e);break;case 5:if(1073741823!==Cu&&null!==Ru){i=Cu;var u=Ru;if(0>=(r=0|u.busyMinDurationMs)?r=0:(o=0|u.busyDelayMs,r=(i=Uo()-(10*(1073741821-i)-(0|u.timeoutMs||5e3)))<=o?0:o+r-i),10<r){Al(e,n),e.timeoutHandle=bn(pl.bind(null,e),r);break}}pl(e);break;default:throw Error(a(329))}if(Xu(e),e.callbackNode===t)return Ju.bind(null,e)}}return null}function Zu(e){var t=e.lastExpiredTime;if(t=0!==t?t:1073741823,0!=(48&Su))throw Error(a(327));if(vl(),e===ku&&t===_u||nl(e,t),null!==Tu){var n=Su;Su|=16;for(var r=ol();;)try{ul();break}catch(t){rl(e,t)}if(ei(),Su=n,gu.current=r,1===Pu)throw n=Ou,nl(e,t),Al(e,t),Xu(e),n;if(null!==Tu)throw Error(a(261));e.finishedWork=e.current.alternate,e.finishedExpirationTime=t,ku=null,pl(e),Xu(e)}return null}function el(e,t){var n=Su;Su|=1;try{return e(t)}finally{0===(Su=n)&&qo()}}function tl(e,t){var n=Su;Su&=-2,Su|=8;try{return e(t)}finally{0===(Su=n)&&qo()}}function nl(e,t){e.finishedWork=null,e.finishedExpirationTime=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,wn(n)),null!==Tu)for(n=Tu.return;null!==n;){var r=n;switch(r.tag){case 1:null!=(r=r.type.childContextTypes)&&mo();break;case 3:Ai(),lo(po),lo(fo);break;case 5:ji(r);break;case 4:Ai();break;case 13:case 19:lo(Ii);break;case 10:ti(r)}n=n.return}ku=e,Tu=_l(e.current,null),_u=t,Pu=wu,Ou=null,Nu=Cu=1073741823,Ru=null,Mu=0,Au=!1}function rl(e,t){for(;;){try{if(ei(),zi.current=ya,Hi)for(var n=Bi.memoizedState;null!==n;){var r=n.queue;null!==r&&(r.pending=null),n=n.next}if(Wi=0,$i=Vi=Bi=null,Hi=!1,null===Tu||null===Tu.return)return Pu=1,Ou=t,Tu=null;e:{var o=e,i=Tu.return,a=Tu,u=t;if(t=_u,a.effectTag|=2048,a.firstEffect=a.lastEffect=null,null!==u&&"object"==typeof u&&"function"==typeof u.then){var l=u;if(0==(2&a.mode)){var c=a.alternate;c?(a.updateQueue=c.updateQueue,a.memoizedState=c.memoizedState,a.expirationTime=c.expirationTime):(a.updateQueue=null,a.memoizedState=null)}var s=0!=(1&Ii.current),f=i;do{var p;if(p=13===f.tag){var d=f.memoizedState;if(null!==d)p=null!==d.dehydrated;else{var h=f.memoizedProps;p=void 0!==h.fallback&&(!0!==h.unstable_avoidThisFallback||!s)}}if(p){var v=f.updateQueue;if(null===v){var y=new Set;y.add(l),f.updateQueue=y}else v.add(l);if(0==(2&f.mode)){if(f.effectTag|=64,a.effectTag&=-2981,1===a.tag)if(null===a.alternate)a.tag=17;else{var m=li(1073741823,null);m.tag=2,ci(a,m)}a.expirationTime=1073741823;break e}u=void 0,a=t;var g=o.pingCache;if(null===g?(g=o.pingCache=new du,u=new Set,g.set(l,u)):void 0===(u=g.get(l))&&(u=new Set,g.set(l,u)),!u.has(a)){u.add(a);var b=bl.bind(null,o,l,a);l.then(b,b)}f.effectTag|=4096,f.expirationTime=t;break e}f=f.return}while(null!==f);u=Error((ye(a.type)||"A React component")+" suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display."+me(a))}5!==Pu&&(Pu=2),u=Ja(u,a),f=i;do{switch(f.tag){case 3:l=u,f.effectTag|=4096,f.expirationTime=t,si(f,hu(f,l,t));break e;case 1:l=u;var w=f.type,x=f.stateNode;if(0==(64&f.effectTag)&&("function"==typeof w.getDerivedStateFromError||null!==x&&"function"==typeof x.componentDidCatch&&(null===Du||!Du.has(x)))){f.effectTag|=4096,f.expirationTime=t,si(f,vu(f,l,t));break e}}f=f.return}while(null!==f)}Tu=sl(Tu)}catch(e){t=e;continue}break}}function ol(){var e=gu.current;return gu.current=ya,null===e?ya:e}function il(e,t){e<Cu&&2<e&&(Cu=e),null!==t&&e<Nu&&2<e&&(Nu=e,Ru=t)}function al(e){e>Mu&&(Mu=e)}function ul(){for(;null!==Tu;)Tu=cl(Tu)}function ll(){for(;null!==Tu&&!Fo();)Tu=cl(Tu)}function cl(e){var t=yu(e.alternate,e,_u);return e.memoizedProps=e.pendingProps,null===t&&(t=sl(e)),bu.current=null,t}function sl(e){Tu=e;do{var t=Tu.alternate;if(e=Tu.return,0==(2048&Tu.effectTag)){if(t=Ya(t,Tu,_u),1===_u||1!==Tu.childExpirationTime){for(var n=0,r=Tu.child;null!==r;){var o=r.expirationTime,i=r.childExpirationTime;o>n&&(n=o),i>n&&(n=i),r=r.sibling}Tu.childExpirationTime=n}if(null!==t)return t;null!==e&&0==(2048&e.effectTag)&&(null===e.firstEffect&&(e.firstEffect=Tu.firstEffect),null!==Tu.lastEffect&&(null!==e.lastEffect&&(e.lastEffect.nextEffect=Tu.firstEffect),e.lastEffect=Tu.lastEffect),1<Tu.effectTag&&(null!==e.lastEffect?e.lastEffect.nextEffect=Tu:e.firstEffect=Tu,e.lastEffect=Tu))}else{if(null!==(t=Xa(Tu)))return t.effectTag&=2047,t;null!==e&&(e.firstEffect=e.lastEffect=null,e.effectTag|=2048)}if(null!==(t=Tu.sibling))return t;Tu=e}while(null!==Tu);return Pu===wu&&(Pu=5),null}function fl(e){var t=e.expirationTime;return t>(e=e.childExpirationTime)?t:e}function pl(e){var t=Wo();return Vo(99,dl.bind(null,e,t)),null}function dl(e,t){do{vl()}while(null!==Uu);if(0!=(48&Su))throw Error(a(327));var n=e.finishedWork,r=e.finishedExpirationTime;if(null===n)return null;if(e.finishedWork=null,e.finishedExpirationTime=0,n===e.current)throw Error(a(177));e.callbackNode=null,e.callbackExpirationTime=0,e.callbackPriority=90,e.nextKnownPendingLevel=0;var o=fl(n);if(e.firstPendingTime=o,r<=e.lastSuspendedTime?e.firstSuspendedTime=e.lastSuspendedTime=e.nextKnownPendingLevel=0:r<=e.firstSuspendedTime&&(e.firstSuspendedTime=r-1),r<=e.lastPingedTime&&(e.lastPingedTime=0),r<=e.lastExpiredTime&&(e.lastExpiredTime=0),e===ku&&(Tu=ku=null,_u=0),1<n.effectTag?null!==n.lastEffect?(n.lastEffect.nextEffect=n,o=n.firstEffect):o=n:o=n.firstEffect,null!==o){var i=Su;Su|=32,bu.current=null,vn=qt;var u=dn();if(hn(u)){if("selectionStart"in u)var l={start:u.selectionStart,end:u.selectionEnd};else e:{var c=(l=(l=u.ownerDocument)&&l.defaultView||window).getSelection&&l.getSelection();if(c&&0!==c.rangeCount){l=c.anchorNode;var s=c.anchorOffset,f=c.focusNode;c=c.focusOffset;try{l.nodeType,f.nodeType}catch(e){l=null;break e}var p=0,d=-1,h=-1,v=0,y=0,m=u,g=null;t:for(;;){for(var b;m!==l||0!==s&&3!==m.nodeType||(d=p+s),m!==f||0!==c&&3!==m.nodeType||(h=p+c),3===m.nodeType&&(p+=m.nodeValue.length),null!==(b=m.firstChild);)g=m,m=b;for(;;){if(m===u)break t;if(g===l&&++v===s&&(d=p),g===f&&++y===c&&(h=p),null!==(b=m.nextSibling))break;g=(m=g).parentNode}m=b}l=-1===d||-1===h?null:{start:d,end:h}}else l=null}l=l||{start:0,end:0}}else l=null;yn={activeElementDetached:null,focusedElem:u,selectionRange:l},qt=!1,ju=o;do{try{hl()}catch(e){if(null===ju)throw Error(a(330));gl(ju,e),ju=ju.nextEffect}}while(null!==ju);ju=o;do{try{for(u=e,l=t;null!==ju;){var w=ju.effectTag;if(16&w&&Ue(ju.stateNode,""),128&w){var x=ju.alternate;if(null!==x){var E=x.ref;null!==E&&("function"==typeof E?E(null):E.current=null)}}switch(1038&w){case 2:cu(ju),ju.effectTag&=-3;break;case 6:cu(ju),ju.effectTag&=-3,fu(ju.alternate,ju);break;case 1024:ju.effectTag&=-1025;break;case 1028:ju.effectTag&=-1025,fu(ju.alternate,ju);break;case 4:fu(ju.alternate,ju);break;case 8:su(u,s=ju,l),uu(s)}ju=ju.nextEffect}}catch(e){if(null===ju)throw Error(a(330));gl(ju,e),ju=ju.nextEffect}}while(null!==ju);if(E=yn,x=dn(),w=E.focusedElem,l=E.selectionRange,x!==w&&w&&w.ownerDocument&&function e(t,n){return!(!t||!n)&&(t===n||(!t||3!==t.nodeType)&&(n&&3===n.nodeType?e(t,n.parentNode):"contains"in t?t.contains(n):!!t.compareDocumentPosition&&!!(16&t.compareDocumentPosition(n))))}(w.ownerDocument.documentElement,w)){null!==l&&hn(w)&&(x=l.start,void 0===(E=l.end)&&(E=x),"selectionStart"in w?(w.selectionStart=x,w.selectionEnd=Math.min(E,w.value.length)):(E=(x=w.ownerDocument||document)&&x.defaultView||window).getSelection&&(E=E.getSelection(),s=w.textContent.length,u=Math.min(l.start,s),l=void 0===l.end?u:Math.min(l.end,s),!E.extend&&u>l&&(s=l,l=u,u=s),s=pn(w,u),f=pn(w,l),s&&f&&(1!==E.rangeCount||E.anchorNode!==s.node||E.anchorOffset!==s.offset||E.focusNode!==f.node||E.focusOffset!==f.offset)&&((x=x.createRange()).setStart(s.node,s.offset),E.removeAllRanges(),u>l?(E.addRange(x),E.extend(f.node,f.offset)):(x.setEnd(f.node,f.offset),E.addRange(x))))),x=[];for(E=w;E=E.parentNode;)1===E.nodeType&&x.push({element:E,left:E.scrollLeft,top:E.scrollTop});for("function"==typeof w.focus&&w.focus(),w=0;w<x.length;w++)(E=x[w]).element.scrollLeft=E.left,E.element.scrollTop=E.top}qt=!!vn,yn=vn=null,e.current=n,ju=o;do{try{for(w=e;null!==ju;){var S=ju.effectTag;if(36&S&&iu(w,ju.alternate,ju),128&S){x=void 0;var k=ju.ref;if(null!==k){var T=ju.stateNode;switch(ju.tag){case 5:x=T;break;default:x=T}"function"==typeof k?k(x):k.current=x}}ju=ju.nextEffect}}catch(e){if(null===ju)throw Error(a(330));gl(ju,e),ju=ju.nextEffect}}while(null!==ju);ju=null,jo(),Su=i}else e.current=n;if(zu)zu=!1,Uu=e,Wu=t;else for(ju=o;null!==ju;)t=ju.nextEffect,ju.nextEffect=null,ju=t;if(0===(t=e.firstPendingTime)&&(Du=null),1073741823===t?e===$u?Vu++:(Vu=0,$u=e):Vu=0,"function"==typeof xl&&xl(n.stateNode,r),Xu(e),Iu)throw Iu=!1,e=Lu,Lu=null,e;return 0!=(8&Su)||qo(),null}function hl(){for(;null!==ju;){var e=ju.effectTag;0!=(256&e)&&nu(ju.alternate,ju),0==(512&e)||zu||(zu=!0,$o(97,(function(){return vl(),null}))),ju=ju.nextEffect}}function vl(){if(90!==Wu){var e=97<Wu?97:Wu;return Wu=90,Vo(e,yl)}}function yl(){if(null===Uu)return!1;var e=Uu;if(Uu=null,0!=(48&Su))throw Error(a(331));var t=Su;for(Su|=32,e=e.current.firstEffect;null!==e;){try{var n=e;if(0!=(512&n.effectTag))switch(n.tag){case 0:case 11:case 15:case 22:ru(5,n),ou(5,n)}}catch(t){if(null===e)throw Error(a(330));gl(e,t)}n=e.nextEffect,e.nextEffect=null,e=n}return Su=t,qo(),!0}function ml(e,t,n){ci(e,t=hu(e,t=Ja(n,t),1073741823)),null!==(e=Ku(e,1073741823))&&Xu(e)}function gl(e,t){if(3===e.tag)ml(e,e,t);else for(var n=e.return;null!==n;){if(3===n.tag){ml(n,e,t);break}if(1===n.tag){var r=n.stateNode;if("function"==typeof n.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===Du||!Du.has(r))){ci(n,e=vu(n,e=Ja(t,e),1073741823)),null!==(n=Ku(n,1073741823))&&Xu(n);break}}n=n.return}}function bl(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),ku===e&&_u===n?Pu===Eu||Pu===xu&&1073741823===Cu&&Uo()-Fu<500?nl(e,_u):Au=!0:Ml(e,n)&&(0!==(t=e.lastPingedTime)&&t<n||(e.lastPingedTime=n,Xu(e)))}function wl(e,t){var n=e.stateNode;null!==n&&n.delete(t),0===(t=0)&&(t=Qu(t=qu(),e,null)),null!==(e=Ku(e,t))&&Xu(e)}yu=function(e,t,n){var r=t.expirationTime;if(null!==e){var o=t.pendingProps;if(e.memoizedProps!==o||po.current)Na=!0;else{if(r<n){switch(Na=!1,t.tag){case 3:za(t),Oa();break;case 5:if(Fi(t),4&t.mode&&1!==n&&o.hidden)return t.expirationTime=t.childExpirationTime=1,null;break;case 1:yo(t.type)&&wo(t);break;case 4:Mi(t,t.stateNode.containerInfo);break;case 10:r=t.memoizedProps.value,o=t.type._context,co(Yo,o._currentValue),o._currentValue=r;break;case 13:if(null!==t.memoizedState)return 0!==(r=t.child.childExpirationTime)&&r>=n?$a(e,t,n):(co(Ii,1&Ii.current),null!==(t=Ga(e,t,n))?t.sibling:null);co(Ii,1&Ii.current);break;case 19:if(r=t.childExpirationTime>=n,0!=(64&e.effectTag)){if(r)return Qa(e,t,n);t.effectTag|=64}if(null!==(o=t.memoizedState)&&(o.rendering=null,o.tail=null),co(Ii,Ii.current),!r)return null}return Ga(e,t,n)}Na=!1}}else Na=!1;switch(t.expirationTime=0,t.tag){case 2:if(r=t.type,null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),e=t.pendingProps,o=vo(t,fo.current),ri(t,n),o=Gi(null,t,r,e,o,n),t.effectTag|=1,"object"==typeof o&&null!==o&&"function"==typeof o.render&&void 0===o.$$typeof){if(t.tag=1,t.memoizedState=null,t.updateQueue=null,yo(r)){var i=!0;wo(t)}else i=!1;t.memoizedState=null!==o.state&&void 0!==o.state?o.state:null,ai(t);var u=r.getDerivedStateFromProps;"function"==typeof u&&vi(t,r,u,e),o.updater=yi,t.stateNode=o,o._reactInternalFiber=t,wi(t,r,e,n),t=Da(null,t,r,!0,i,n)}else t.tag=0,Ra(null,t,o,n),t=t.child;return t;case 16:e:{if(o=t.elementType,null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),e=t.pendingProps,function(e){if(-1===e._status){e._status=0;var t=e._ctor;t=t(),e._result=t,t.then((function(t){0===e._status&&(t=t.default,e._status=1,e._result=t)}),(function(t){0===e._status&&(e._status=2,e._result=t)}))}}(o),1!==o._status)throw o._result;switch(o=o._result,t.type=o,i=t.tag=function(e){if("function"==typeof e)return Tl(e)?1:0;if(null!=e){if((e=e.$$typeof)===le)return 11;if(e===fe)return 14}return 2}(o),e=Ko(o,e),i){case 0:t=Ia(null,t,o,e,n);break e;case 1:t=La(null,t,o,e,n);break e;case 11:t=Ma(null,t,o,e,n);break e;case 14:t=Aa(null,t,o,Ko(o.type,e),r,n);break e}throw Error(a(306,o,""))}return t;case 0:return r=t.type,o=t.pendingProps,Ia(e,t,r,o=t.elementType===r?o:Ko(r,o),n);case 1:return r=t.type,o=t.pendingProps,La(e,t,r,o=t.elementType===r?o:Ko(r,o),n);case 3:if(za(t),r=t.updateQueue,null===e||null===r)throw Error(a(282));if(r=t.pendingProps,o=null!==(o=t.memoizedState)?o.element:null,ui(e,t),fi(t,r,null,n),(r=t.memoizedState.element)===o)Oa(),t=Ga(e,t,n);else{if((o=t.stateNode.hydrate)&&(xa=xn(t.stateNode.containerInfo.firstChild),wa=t,o=Ea=!0),o)for(n=_i(t,null,r,n),t.child=n;n;)n.effectTag=-3&n.effectTag|1024,n=n.sibling;else Ra(e,t,r,n),Oa();t=t.child}return t;case 5:return Fi(t),null===e&&Ta(t),r=t.type,o=t.pendingProps,i=null!==e?e.memoizedProps:null,u=o.children,gn(r,o)?u=null:null!==i&&gn(r,i)&&(t.effectTag|=16),ja(e,t),4&t.mode&&1!==n&&o.hidden?(t.expirationTime=t.childExpirationTime=1,t=null):(Ra(e,t,u,n),t=t.child),t;case 6:return null===e&&Ta(t),null;case 13:return $a(e,t,n);case 4:return Mi(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=Ti(t,null,r,n):Ra(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,Ma(e,t,r,o=t.elementType===r?o:Ko(r,o),n);case 7:return Ra(e,t,t.pendingProps,n),t.child;case 8:case 12:return Ra(e,t,t.pendingProps.children,n),t.child;case 10:e:{r=t.type._context,o=t.pendingProps,u=t.memoizedProps,i=o.value;var l=t.type._context;if(co(Yo,l._currentValue),l._currentValue=i,null!==u)if(l=u.value,0===(i=Lr(l,i)?0:0|("function"==typeof r._calculateChangedBits?r._calculateChangedBits(l,i):1073741823))){if(u.children===o.children&&!po.current){t=Ga(e,t,n);break e}}else for(null!==(l=t.child)&&(l.return=t);null!==l;){var c=l.dependencies;if(null!==c){u=l.child;for(var s=c.firstContext;null!==s;){if(s.context===r&&0!=(s.observedBits&i)){1===l.tag&&((s=li(n,null)).tag=2,ci(l,s)),l.expirationTime<n&&(l.expirationTime=n),null!==(s=l.alternate)&&s.expirationTime<n&&(s.expirationTime=n),ni(l.return,n),c.expirationTime<n&&(c.expirationTime=n);break}s=s.next}}else u=10===l.tag&&l.type===t.type?null:l.child;if(null!==u)u.return=l;else for(u=l;null!==u;){if(u===t){u=null;break}if(null!==(l=u.sibling)){l.return=u.return,u=l;break}u=u.return}l=u}Ra(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=(i=t.pendingProps).children,ri(t,n),r=r(o=oi(o,i.unstable_observedBits)),t.effectTag|=1,Ra(e,t,r,n),t.child;case 14:return i=Ko(o=t.type,t.pendingProps),Aa(e,t,o,i=Ko(o.type,i),r,n);case 15:return Fa(e,t,t.type,t.pendingProps,r,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Ko(r,o),null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),t.tag=1,yo(r)?(e=!0,wo(t)):e=!1,ri(t,n),gi(t,r,o),wi(t,r,o,n),Da(null,t,r,!0,e,n);case 19:return Qa(e,t,n)}throw Error(a(156,t.tag))};var xl=null,El=null;function Sl(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.effectTag=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childExpirationTime=this.expirationTime=0,this.alternate=null}function kl(e,t,n,r){return new Sl(e,t,n,r)}function Tl(e){return!(!(e=e.prototype)||!e.isReactComponent)}function _l(e,t){var n=e.alternate;return null===n?((n=kl(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.effectTag=0,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null),n.childExpirationTime=e.childExpirationTime,n.expirationTime=e.expirationTime,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{expirationTime:t.expirationTime,firstContext:t.firstContext,responders:t.responders},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Pl(e,t,n,r,o,i){var u=2;if(r=e,"function"==typeof e)Tl(e)&&(u=1);else if("string"==typeof e)u=5;else e:switch(e){case ne:return Ol(n.children,o,i,t);case ue:u=8,o|=7;break;case re:u=8,o|=1;break;case oe:return(e=kl(12,n,t,8|o)).elementType=oe,e.type=oe,e.expirationTime=i,e;case ce:return(e=kl(13,n,t,o)).type=ce,e.elementType=ce,e.expirationTime=i,e;case se:return(e=kl(19,n,t,o)).elementType=se,e.expirationTime=i,e;default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case ie:u=10;break e;case ae:u=9;break e;case le:u=11;break e;case fe:u=14;break e;case pe:u=16,r=null;break e;case de:u=22;break e}throw Error(a(130,null==e?e:typeof e,""))}return(t=kl(u,n,t,o)).elementType=e,t.type=r,t.expirationTime=i,t}function Ol(e,t,n,r){return(e=kl(7,e,r,t)).expirationTime=n,e}function Cl(e,t,n){return(e=kl(6,e,null,t)).expirationTime=n,e}function Nl(e,t,n){return(t=kl(4,null!==e.children?e.children:[],e.key,t)).expirationTime=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Rl(e,t,n){this.tag=t,this.current=null,this.containerInfo=e,this.pingCache=this.pendingChildren=null,this.finishedExpirationTime=0,this.finishedWork=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=n,this.callbackNode=null,this.callbackPriority=90,this.lastExpiredTime=this.lastPingedTime=this.nextKnownPendingLevel=this.lastSuspendedTime=this.firstSuspendedTime=this.firstPendingTime=0}function Ml(e,t){var n=e.firstSuspendedTime;return e=e.lastSuspendedTime,0!==n&&n>=t&&e<=t}function Al(e,t){var n=e.firstSuspendedTime,r=e.lastSuspendedTime;n<t&&(e.firstSuspendedTime=t),(r>t||0===n)&&(e.lastSuspendedTime=t),t<=e.lastPingedTime&&(e.lastPingedTime=0),t<=e.lastExpiredTime&&(e.lastExpiredTime=0)}function Fl(e,t){t>e.firstPendingTime&&(e.firstPendingTime=t);var n=e.firstSuspendedTime;0!==n&&(t>=n?e.firstSuspendedTime=e.lastSuspendedTime=e.nextKnownPendingLevel=0:t>=e.lastSuspendedTime&&(e.lastSuspendedTime=t+1),t>e.nextKnownPendingLevel&&(e.nextKnownPendingLevel=t))}function jl(e,t){var n=e.lastExpiredTime;(0===n||n>t)&&(e.lastExpiredTime=t)}function Il(e,t,n,r){var o=t.current,i=qu(),u=di.suspense;i=Qu(i,o,u);e:if(n){t:{if(Ze(n=n._reactInternalFiber)!==n||1!==n.tag)throw Error(a(170));var l=n;do{switch(l.tag){case 3:l=l.stateNode.context;break t;case 1:if(yo(l.type)){l=l.stateNode.__reactInternalMemoizedMergedChildContext;break t}}l=l.return}while(null!==l);throw Error(a(171))}if(1===n.tag){var c=n.type;if(yo(c)){n=bo(n,c,l);break e}}n=l}else n=so;return null===t.context?t.context=n:t.pendingContext=n,(t=li(i,u)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),ci(o,t),Gu(o,i),i}function Ll(e){if(!(e=e.current).child)return null;switch(e.child.tag){case 5:default:return e.child.stateNode}}function Dl(e,t){null!==(e=e.memoizedState)&&null!==e.dehydrated&&e.retryTime<t&&(e.retryTime=t)}function zl(e,t){Dl(e,t),(e=e.alternate)&&Dl(e,t)}function Ul(e,t,n){var r=new Rl(e,t,n=null!=n&&!0===n.hydrate),o=kl(3,null,null,2===t?7:1===t?3:0);r.current=o,o.stateNode=r,ai(o),e[_n]=r.current,n&&0!==t&&function(e,t){var n=Je(t);_t.forEach((function(e){ht(e,t,n)})),Pt.forEach((function(e){ht(e,t,n)}))}(0,9===e.nodeType?e:e.ownerDocument),this._internalRoot=r}function Wl(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Bl(e,t,n,r,o){var i=n._reactRootContainer;if(i){var a=i._internalRoot;if("function"==typeof o){var u=o;o=function(){var e=Ll(a);u.call(e)}}Il(t,a,e,o)}else{if(i=n._reactRootContainer=function(e,t){if(t||(t=!(!(t=e?9===e.nodeType?e.documentElement:e.firstChild:null)||1!==t.nodeType||!t.hasAttribute("data-reactroot"))),!t)for(var n;n=e.lastChild;)e.removeChild(n);return new Ul(e,0,t?{hydrate:!0}:void 0)}(n,r),a=i._internalRoot,"function"==typeof o){var l=o;o=function(){var e=Ll(a);l.call(e)}}tl((function(){Il(t,a,e,o)}))}return Ll(a)}function Vl(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:te,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}function $l(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Wl(t))throw Error(a(200));return Vl(e,t,null,n)}Ul.prototype.render=function(e){Il(e,this._internalRoot,null,null)},Ul.prototype.unmount=function(){var e=this._internalRoot,t=e.containerInfo;Il(null,e,null,(function(){t[_n]=null}))},vt=function(e){if(13===e.tag){var t=Go(qu(),150,100);Gu(e,t),zl(e,t)}},yt=function(e){13===e.tag&&(Gu(e,3),zl(e,3))},mt=function(e){if(13===e.tag){var t=qu();Gu(e,t=Qu(t,e,null)),zl(e,t)}},O=function(e,t,n){switch(t){case"input":if(Te(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=Nn(r);if(!o)throw Error(a(90));xe(r),Te(r,o)}}}break;case"textarea":Me(e,n);break;case"select":null!=(t=n.value)&&Ce(e,!!n.multiple,t,!1)}},F=el,j=function(e,t,n,r,o){var i=Su;Su|=4;try{return Vo(98,e.bind(null,t,n,r,o))}finally{0===(Su=i)&&qo()}},I=function(){0==(49&Su)&&(function(){if(null!==Bu){var e=Bu;Bu=null,e.forEach((function(e,t){jl(t,e),Xu(t)})),qo()}}(),vl())},L=function(e,t){var n=Su;Su|=2;try{return e(t)}finally{0===(Su=n)&&qo()}};var Hl,ql,Ql={Events:[On,Cn,Nn,_,S,Ln,function(e){ot(e,In)},M,A,Xt,ut,vl,{current:!1}]};ql=(Hl={findFiberByHostInstance:Pn,bundleType:0,version:"16.13.1",rendererPackageName:"react-dom"}).findFiberByHostInstance,function(e){if("undefined"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t.isDisabled||!t.supportsFiber)return!0;try{var n=t.inject(e);xl=function(e){try{t.onCommitFiberRoot(n,e,void 0,64==(64&e.current.effectTag))}catch(e){}},El=function(e){try{t.onCommitFiberUnmount(n,e)}catch(e){}}}catch(e){}}(o({},Hl,{overrideHookState:null,overrideProps:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Y.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=nt(e))?null:e.stateNode},findFiberByHostInstance:function(e){return ql?ql(e):null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null})),t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Ql,t.createPortal=$l,t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternalFiber;if(void 0===t){if("function"==typeof e.render)throw Error(a(188));throw Error(a(268,Object.keys(e)))}return e=null===(e=nt(t))?null:e.stateNode},t.flushSync=function(e,t){if(0!=(48&Su))throw Error(a(187));var n=Su;Su|=1;try{return Vo(99,e.bind(null,t))}finally{Su=n,qo()}},t.hydrate=function(e,t,n){if(!Wl(t))throw Error(a(200));return Bl(null,e,t,!0,n)},t.render=function(e,t,n){if(!Wl(t))throw Error(a(200));return Bl(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!Wl(e))throw Error(a(40));return!!e._reactRootContainer&&(tl((function(){Bl(null,null,e,!1,(function(){e._reactRootContainer=null,e[_n]=null}))})),!0)},t.unstable_batchedUpdates=el,t.unstable_createPortal=function(e,t){return $l(e,t,2<arguments.length&&void 0!==arguments[2]?arguments[2]:null)},t.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Wl(n))throw Error(a(200));if(null==e||void 0===e._reactInternalFiber)throw Error(a(38));return Bl(e,t,n,!1,r)},t.version="16.13.1"},function(e,t,n){"use strict";e.exports=n(351)},function(e,t,n){"use strict"; /** @license React v0.19.1 * scheduler.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var r,o,i,a,u;if("undefined"==typeof window||"function"!=typeof MessageChannel){var l=null,c=null,s=function(){if(null!==l)try{var e=t.unstable_now();l(!0,e),l=null}catch(e){throw setTimeout(s,0),e}},f=Date.now();t.unstable_now=function(){return Date.now()-f},r=function(e){null!==l?setTimeout(r,0,e):(l=e,setTimeout(s,0))},o=function(e,t){c=setTimeout(e,t)},i=function(){clearTimeout(c)},a=function(){return!1},u=t.unstable_forceFrameRate=function(){}}else{var p=window.performance,d=window.Date,h=window.setTimeout,v=window.clearTimeout;if("undefined"!=typeof console){var y=window.cancelAnimationFrame;"function"!=typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),"function"!=typeof y&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")}if("object"==typeof p&&"function"==typeof p.now)t.unstable_now=function(){return p.now()};else{var m=d.now();t.unstable_now=function(){return d.now()-m}}var g=!1,b=null,w=-1,x=5,E=0;a=function(){return t.unstable_now()>=E},u=function(){},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing framerates higher than 125 fps is not unsupported"):x=0<e?Math.floor(1e3/e):5};var S=new MessageChannel,k=S.port2;S.port1.onmessage=function(){if(null!==b){var e=t.unstable_now();E=e+x;try{b(!0,e)?k.postMessage(null):(g=!1,b=null)}catch(e){throw k.postMessage(null),e}}else g=!1},r=function(e){b=e,g||(g=!0,k.postMessage(null))},o=function(e,n){w=h((function(){e(t.unstable_now())}),n)},i=function(){v(w),w=-1}}function T(e,t){var n=e.length;e.push(t);e:for(;;){var r=n-1>>>1,o=e[r];if(!(void 0!==o&&0<O(o,t)))break e;e[r]=t,e[n]=o,n=r}}function _(e){return void 0===(e=e[0])?null:e}function P(e){var t=e[0];if(void 0!==t){var n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,o=e.length;r<o;){var i=2*(r+1)-1,a=e[i],u=i+1,l=e[u];if(void 0!==a&&0>O(a,n))void 0!==l&&0>O(l,a)?(e[r]=l,e[u]=n,r=u):(e[r]=a,e[i]=n,r=i);else{if(!(void 0!==l&&0>O(l,n)))break e;e[r]=l,e[u]=n,r=u}}}return t}return null}function O(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var C=[],N=[],R=1,M=null,A=3,F=!1,j=!1,I=!1;function L(e){for(var t=_(N);null!==t;){if(null===t.callback)P(N);else{if(!(t.startTime<=e))break;P(N),t.sortIndex=t.expirationTime,T(C,t)}t=_(N)}}function D(e){if(I=!1,L(e),!j)if(null!==_(C))j=!0,r(z);else{var t=_(N);null!==t&&o(D,t.startTime-e)}}function z(e,n){j=!1,I&&(I=!1,i()),F=!0;var r=A;try{for(L(n),M=_(C);null!==M&&(!(M.expirationTime>n)||e&&!a());){var u=M.callback;if(null!==u){M.callback=null,A=M.priorityLevel;var l=u(M.expirationTime<=n);n=t.unstable_now(),"function"==typeof l?M.callback=l:M===_(C)&&P(C),L(n)}else P(C);M=_(C)}if(null!==M)var c=!0;else{var s=_(N);null!==s&&o(D,s.startTime-n),c=!1}return c}finally{M=null,A=r,F=!1}}function U(e){switch(e){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1e4;default:return 5e3}}var W=u;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){j||F||(j=!0,r(z))},t.unstable_getCurrentPriorityLevel=function(){return A},t.unstable_getFirstCallbackNode=function(){return _(C)},t.unstable_next=function(e){switch(A){case 1:case 2:case 3:var t=3;break;default:t=A}var n=A;A=t;try{return e()}finally{A=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=W,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=A;A=e;try{return t()}finally{A=n}},t.unstable_scheduleCallback=function(e,n,a){var u=t.unstable_now();if("object"==typeof a&&null!==a){var l=a.delay;l="number"==typeof l&&0<l?u+l:u,a="number"==typeof a.timeout?a.timeout:U(e)}else a=U(e),l=u;return e={id:R++,callback:n,priorityLevel:e,startTime:l,expirationTime:a=l+a,sortIndex:-1},l>u?(e.sortIndex=l,T(N,e),null===_(C)&&e===_(N)&&(I?i():I=!0,o(D,l-u))):(e.sortIndex=a,T(C,e),j||F||(j=!0,r(z))),e},t.unstable_shouldYield=function(){var e=t.unstable_now();L(e);var n=_(C);return n!==M&&null!==M&&null!==n&&null!==n.callback&&n.startTime<=e&&n.expirationTime<M.expirationTime||a()},t.unstable_wrapCallback=function(e){var t=A;return function(){var n=A;A=t;try{return e.apply(this,arguments)}finally{A=n}}}},function(e,t,n){"use strict";var r=n(353);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,a){if(a!==r){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t){e.exports=Array.isArray||function(e){return"[object Array]"==Object.prototype.toString.call(e)}},,,function(e,t,n){"use strict";var r=n(0),o=n.n(r),i=n(2),a=n.n(i),u=n(143),l=n(102),c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};var f=function(e){var t=e.to,n=e.exact,r=e.strict,i=e.location,a=e.activeClassName,f=e.className,p=e.activeStyle,d=e.style,h=e.isActive,v=e["aria-current"],y=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["to","exact","strict","location","activeClassName","className","activeStyle","style","isActive","aria-current"]),m="object"===(void 0===t?"undefined":s(t))?t.pathname:t,g=m&&m.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1");return o.a.createElement(u.a,{path:g,exact:n,strict:r,location:i,children:function(e){var n=e.location,r=e.match,i=!!(h?h(r,n):r);return o.a.createElement(l.a,c({to:t,className:i?[f,a].filter((function(e){return e})).join(" "):f,style:i?c({},d,p):d,"aria-current":i&&v||null},y))}})};f.propTypes={to:l.a.propTypes.to,exact:a.a.bool,strict:a.a.bool,location:a.a.object,activeClassName:a.a.string,className:a.a.string,activeStyle:a.a.object,style:a.a.object,isActive:a.a.func,"aria-current":a.a.oneOf(["page","step","location","date","time","true"])},f.defaultProps={activeClassName:"active","aria-current":"page"},t.a=f},function(e,t,n){"use strict";var r=n(0),o=n.n(r),i=n(2),a=n.n(i),u=n(13),l=n.n(u),c=n(26),s=n.n(c),f=n(36),p=n(73),d=n.n(p),h={},v=0,y=function(e){var t=e,n=h[t]||(h[t]={});if(n[e])return n[e];var r=d.a.compile(e);return v<1e4&&(n[e]=r,v++),r},m=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("/"===e)return e;var n=y(e);return n(t,{pretty:!0})},g=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function b(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function w(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var x=function(e){function t(){return b(this,t),w(this,e.apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.isStatic=function(){return this.context.router&&this.context.router.staticContext},t.prototype.componentWillMount=function(){s()(this.context.router,"You should not use <Redirect> outside a <Router>"),this.isStatic()&&this.perform()},t.prototype.componentDidMount=function(){this.isStatic()||this.perform()},t.prototype.componentDidUpdate=function(e){var t=Object(f.b)(e.to),n=Object(f.b)(this.props.to);Object(f.c)(t,n)?l()(!1,"You tried to redirect to the same route you're currently on: \""+n.pathname+n.search+'"'):this.perform()},t.prototype.computeTo=function(e){var t=e.computedMatch,n=e.to;return t?"string"==typeof n?m(n,t.params):g({},n,{pathname:m(n.pathname,t.params)}):n},t.prototype.perform=function(){var e=this.context.router.history,t=this.props.push,n=this.computeTo(this.props);t?e.push(n):e.replace(n)},t.prototype.render=function(){return null},t}(o.a.Component);x.propTypes={computedMatch:a.a.object,push:a.a.bool,from:a.a.string,to:a.a.oneOfType([a.a.string,a.a.object]).isRequired},x.defaultProps={push:!1},x.contextTypes={router:a.a.shape({history:a.a.shape({push:a.a.func.isRequired,replace:a.a.func.isRequired}).isRequired,staticContext:a.a.object}).isRequired};var E=x;t.a=E},function(e,t,n){"use strict";var r=n(13),o=n.n(r),i=n(0),a=n.n(i),u=n(2),l=n.n(u),c=n(36),s=n(26),f=n.n(s),p=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var v=function(e){function t(){var n,r;d(this,t);for(var o=arguments.length,i=Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=r=h(this,e.call.apply(e,[this].concat(i))),r.state={match:r.computeMatch(r.props.history.location.pathname)},h(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.getChildContext=function(){return{router:p({},this.context.router,{history:this.props.history,route:{location:this.props.history.location,match:this.state.match}})}},t.prototype.computeMatch=function(e){return{path:"/",url:"/",params:{},isExact:"/"===e}},t.prototype.componentWillMount=function(){var e=this,t=this.props,n=t.children,r=t.history;f()(null==n||1===a.a.Children.count(n),"A <Router> may have only one child element"),this.unlisten=r.listen((function(){e.setState({match:e.computeMatch(r.location.pathname)})}))},t.prototype.componentWillReceiveProps=function(e){o()(this.props.history===e.history,"You cannot change <Router history>")},t.prototype.componentWillUnmount=function(){this.unlisten()},t.prototype.render=function(){var e=this.props.children;return e?a.a.Children.only(e):null},t}(a.a.Component);v.propTypes={history:l.a.object.isRequired,children:l.a.node},v.contextTypes={router:l.a.object},v.childContextTypes={router:l.a.object.isRequired};var y=v;function m(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function g(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var b=function(e){function t(){var n,r;m(this,t);for(var o=arguments.length,i=Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=r=g(this,e.call.apply(e,[this].concat(i))),r.history=Object(c.a)(r.props),g(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.componentWillMount=function(){o()(!this.props.history,"<HashRouter> ignores the history prop. To use a custom history, use `import { Router }` instead of `import { HashRouter as Router }`.")},t.prototype.render=function(){return a.a.createElement(y,{history:this.history,children:this.props.children})},t}(a.a.Component);b.propTypes={basename:l.a.string,getUserConfirmation:l.a.func,hashType:l.a.oneOf(["hashbang","noslash","slash"]),children:l.a.node};t.a=b},function(e,t,n){"use strict";var r=n(0),o=n.n(r),i=n(2),a=n.n(i),u=n(142),l=n.n(u),c=n(71),s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};var f=function(e){var t=function(t){var n=t.wrappedComponentRef,r=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(t,["wrappedComponentRef"]);return o.a.createElement(c.a,{children:function(t){return o.a.createElement(e,s({},r,t,{ref:n}))}})};return t.displayName="withRouter("+(e.displayName||e.name)+")",t.WrappedComponent=e,t.propTypes={wrappedComponentRef:a.a.func},l()(t,e)};t.a=f},function(e,t,n){"use strict";var r=n(0),o=n.n(r),i=n(2),a=n.n(i),u=n(13),l=n.n(u),c=n(26),s=n.n(c),f=n(72);function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var h=function(e){function t(){return p(this,t),d(this,e.apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.componentWillMount=function(){s()(this.context.router,"You should not use <Switch> outside a <Router>")},t.prototype.componentWillReceiveProps=function(e){l()(!(e.location&&!this.props.location),'<Switch> elements should not change from uncontrolled to controlled (or vice versa). You initially used no "location" prop and then provided one on a subsequent render.'),l()(!(!e.location&&this.props.location),'<Switch> elements should not change from controlled to uncontrolled (or vice versa). You provided a "location" prop initially but omitted it on a subsequent render.')},t.prototype.render=function(){var e=this.context.router.route,t=this.props.children,n=this.props.location||e.location,r=void 0,i=void 0;return o.a.Children.forEach(t,(function(t){if(null==r&&o.a.isValidElement(t)){var a=t.props,u=a.path,l=a.exact,c=a.strict,s=a.sensitive,p=a.from,d=u||p;i=t,r=Object(f.a)(n.pathname,{path:d,exact:l,strict:c,sensitive:s},e.match)}})),r?o.a.cloneElement(i,{location:n,computedMatch:r}):null},t}(o.a.Component);h.contextTypes={router:a.a.shape({route:a.a.object.isRequired}).isRequired},h.propTypes={children:a.a.node,location:a.a.object};var v=h;t.a=v}]]);
const rootDir = '<rootDir>/setup'; module.exports = { moduleFileExtensions: ['ts', 'tsx', 'js'], moduleNameMapper: { '.s?css$': 'jest-css-modules', }, setupFiles: [`${rootDir}/test-shim.js`, `${rootDir}/test-setup.js`], testMatch: ['**/*.test.(ts|tsx)'], transform: { '.tsx?$': 'ts-jest', }, verbose: true, };
const yo = require('yo-yo') const co = require('co') const {DownloadsList} = require('builtin-pages-lib') import renderBuiltinPagesNav from '../com/builtin-pages-nav' import {render as renderDownloadsList} from '../com/downloads-list' // globals // = var downloadsList // main // = co(function * () { // fetch downloads downloadsList = new DownloadsList() yield downloadsList.setup() downloadsList.on('changed', render) // render render() }) // rendering // = function renderHeader () { return yo` <div class="builtin-header fixed"> ${renderBuiltinPagesNav('Downloads')} </div>` } function render () { yo.update(document.querySelector('.downloads-wrapper'), yo` <div class="downloads-wrapper builtin-wrapper"> ${renderHeader()} <div class="builtin-main"> ${renderDownloadsList(downloadsList)} </div> </div> </div>`) }
(function(e,t){function y(e){for(var t=1,n;n=arguments[t];t++)for(var r in n)e[r]=n[r];return e}function b(e){return Array.prototype.slice.call(e)}function E(e,t){for(var n=0,r;r=e[n];n++)if(t==r)return n;return-1}function S(){var e=b(arguments),t=[];for(var n=0,r=e.length;n<r;n++)e[n].length>0&&t.push(e[n].replace(/\/$/,""));return t.join("/")}function x(e,t,n){var r=t.split("/"),i=e;while(r.length>1){var s=r.shift();i=i[s]=i[s]||{}}i[r[0]]=n}function T(){}function N(e,t){this.id=this.path=e,this.force=!!t}function C(e,t){this.id=e,this.body=t,typeof t=="undefined"&&(this.path=this.resolvePath(e))}function k(e,t){this.deps=e,this.collectResults=t,this.deps.length==0&&this.complete()}function L(e,t){this.deps=e,this.collectResults=t}function A(){for(var e in r)if(r[e].readyState=="interactive")return c[r[e].id]}function O(e,t){var r;return!e&&n&&(r=l||A()),r?(delete c[r.scriptId],r.body=t,r.execute()):(f=r=new C(e,t),a[r.id]=r),r}function M(){var e=b(arguments),t,n;return typeof e[0]=="string"&&(t=e.shift()),n=e.shift(),O(t,n)}function _(e,t){var n=t.id||"",r=n.split("/");r.pop();var i=r.join("/");return e.replace(/^\./,i)}function D(e,t){function r(e){return C.exports[_(e,t)]}var n=[];for(var i=0,s=e.length;i<s;i++){if(e[i]=="require"){n.push(r);continue}if(e[i]=="exports"){t.exports=t.exports||{},n.push(t.exports);continue}n.push(r(e[i]))}return n}function P(){var e=b(arguments),t=[],n,r;return typeof e[0]=="string"&&(n=e.shift()),w(e[0])&&(t=e.shift()),r=e.shift(),O(n,function(e){function s(){var i=D(b(t),n),s;typeof r=="function"?s=r.apply(n,i):s=r,typeof s=="undefined"&&(s=n.exports),e(s)}var n=this,i=[];for(var o=0,u=t.length;o<u;o++){var a=t[o];E(["require","exports"],a)==-1&&i.push(_(a,n))}i.length>0?H.apply(this,i.concat(s)):s()})}function H(){var e=b(arguments),t,n;typeof e[e.length-1]=="function"&&(t=e.pop()),typeof e[e.length-1]=="boolean"&&(n=e.pop());var r=new k(B(e,n),n);return t&&r.then(t),r}function B(e,t){var n=[];for(var r=0,i;i=e[r];r++)typeof i=="string"&&(i=j(i)),w(i)&&(i=new L(B(i,t),t)),n.push(i);return n}function j(e){var t,n;for(var r=0,i;i=H.matchers[r];r++){var s=i[0],o=i[1];if(t=e.match(s))return o(e)}throw new Error(e+" was not recognised by loader")}function I(){return e.using=h,e.provide=p,e.define=d,e.loadrunner=v,F}function q(e){for(var t=0;t<H.bundles.length;t++)for(var n in H.bundles[t])if(n!=e&&E(H.bundles[t][n],e)>-1)return n}var n=e.attachEvent&&!e.opera,r=t.getElementsByTagName("script"),i=0,s,o=t.createElement("script"),u={},a={},f,l,c={},h=e.using,p=e.provide,d=e.define,v=e.loadrunner;for(var m=0,g;g=r[m];m++)if(g.src.match(/loadrunner\.js(\?|#|$)/)){s=g;break}var w=Array.isArray||function(e){return e.constructor==Array};T.prototype.then=function(t){var n=this;return this.started||(this.started=!0,this.start()),this.completed?t.apply(e,this.results):(this.callbacks=this.callbacks||[],this.callbacks.push(t)),this},T.prototype.start=function(){},T.prototype.complete=function(){if(!this.completed){this.results=b(arguments),this.completed=!0;if(this.callbacks)for(var t=0,n;n=this.callbacks[t];t++)n.apply(e,this.results)}},N.loaded=[],N.prototype=new T,N.prototype.start=function(){var e=this,t,n,r;return(r=a[this.id])?(r.then(function(){e.complete()}),this):((t=u[this.id])?t.then(function(){e.loaded()}):!this.force&&E(N.loaded,this.id)>-1?this.loaded():(n=q(this.id))?H(n,function(){e.loaded()}):this.load(),this)},N.prototype.load=function(){var t=this;u[this.id]=t;var n=o.cloneNode(!1);this.scriptId=n.id="LR"+ ++i,n.type="text/javascript",n.async=!0,n.onerror=function(){throw new Error(t.path+" not loaded")},n.onreadystatechange=n.onload=function(n){n=e.event||n;if(n.type=="load"||E(["loaded","complete"],this.readyState)>-1)this.onreadystatechange=null,t.loaded()},n.src=this.path,l=this,r[0].parentNode.insertBefore(n,r[0]),l=null,c[n.id]=this},N.prototype.loaded=function(){this.complete()},N.prototype.complete=function(){E(N.loaded,this.id)==-1&&N.loaded.push(this.id),delete u[this.id],T.prototype.complete.apply(this,arguments)},C.exports={},C.prototype=new N,C.prototype.resolvePath=function(e){return S(H.path,e+".js")},C.prototype.start=function(){var e,t,n=this,r;this.body?this.execute():(e=C.exports[this.id])?this.exp(e):(t=a[this.id])?t.then(function(e){n.exp(e)}):(bundle=q(this.id))?H(bundle,function(){n.start()}):(a[this.id]=this,this.load())},C.prototype.loaded=function(){var e,t,r=this;n?(t=C.exports[this.id])?this.exp(t):(e=a[this.id])&&e.then(function(e){r.exp(e)}):(e=f,f=null,e.id=e.id||this.id,e.then(function(e){r.exp(e)}))},C.prototype.complete=function(){delete a[this.id],N.prototype.complete.apply(this,arguments)},C.prototype.execute=function(){var e=this;typeof this.body=="object"?this.exp(this.body):typeof this.body=="function"&&this.body.apply(window,[function(t){e.exp(t)}])},C.prototype.exp=function(e){this.complete(this.exports=C.exports[this.id]=e||{})},k.prototype=new T,k.prototype.start=function(){function t(){var t=[];e.collectResults&&(t[0]={});for(var n=0,r;r=e.deps[n];n++){if(!r.completed)return;r.results.length>0&&(e.collectResults?r instanceof L?y(t[0],r.results[0]):x(t[0],r.id,r.results[0]):t=t.concat(r.results))}e.complete.apply(e,t)}var e=this;for(var n=0,r;r=this.deps[n];n++)r.then(t);return this},L.prototype=new T,L.prototype.start=function(){var e=this,t=0,n=[];return e.collectResults&&(n[0]={}),function r(){var i=e.deps[t++];i?i.then(function(t){i.results.length>0&&(e.collectResults?i instanceof L?y(n[0],i.results[0]):x(n[0],i.id,i.results[0]):n.push(i.results[0])),r()}):e.complete.apply(e,n)}(),this},P.amd={};var F=function(e){return e(H,M,F,define)};F.Script=N,F.Module=C,F.Collection=k,F.Sequence=L,F.Dependency=T,F.noConflict=I,e.loadrunner=F,e.using=H,e.provide=M,e.define=P,H.path="",H.matchers=[],H.matchers.add=function(e,t){this.unshift([e,t])},H.matchers.add(/(^script!|\.js$)/,function(e){var t=new N(e.replace(/^\$/,H.path.replace(/\/$/,"")+"/").replace(/^script!/,""),!1);return t.id=e,t}),H.matchers.add(/^[a-zA-Z0-9_\-\/]+$/,function(e){return new C(e)}),H.bundles=[],s&&(H.path=window.__twttrLoadRunnerPath||s.getAttribute("data-path")||s.src.split(/loadrunner\.js/)[0]||"",(main=s.getAttribute("data-main"))&&H.apply(e,main.split(/\s*,\s*/)).then(function(){}))})(this,document);window.__twttrlr = loadrunner.noConflict();__twttrlr(function(using, provide, loadrunner, define) {provide("util/util",function(e){function t(e){return e&&String(e).toLowerCase().indexOf("[native code]")>-1}function n(e){return o(arguments,function(t){s(t,function(t,n){e[t]=n})}),e}function r(e){return s(e,function(t,n){v(n)&&(r(n),m(n)&&delete e[t]),(n===undefined||n===null||n==="")&&delete e[t]}),e}function s(e,t){for(var n in e)(!e.hasOwnProperty||e.hasOwnProperty(n))&&t(n,e[n]);return e}function c(e){return{}.toString.call(e).match(/\s([a-zA-Z]+)/)[1].toLowerCase()}function h(e,t){return e==c(t)}function p(e,t,n){return n=n||[],function(){var r=a(arguments,function(e){return e});return e.apply(t,n.concat(r))}}function v(e){return e===Object(e)}function m(e){if(!v(e))return!1;if(Object.keys)return!Object.keys(e).length;for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}function g(e,t){window.setTimeout(function(){e.call(t||null)},0)}function y(e){return Array.prototype.slice.call(e)}var i=function(){var e=Array.prototype.indexOf;return t(e)?function(t,n){return t?e.apply(t,[n]):-1}:function(e,t){if(!e)return-1;for(var n=0,r=e.length;n<r;n++)if(t==e[n])return n;return-1}}(),o=function(){var e=Array.prototype.forEach;return t(e)?function(t,n){if(!t)return;if(!n)return;e.apply(t,[n])}:function(e,t){if(!e)return;if(!t)return;for(var n=0,r=e.length;n<r;n++)t(e[n],n)}}(),u=function(){var e=Array.prototype.filter;return t(e)?function(t,n){return t?n?e.apply(t,[n]):t:null}:function(e,t){if(!e)return null;if(!t)return e;var n=[],r=0,i=e.length;for(;r<i;r++)t(e[r])&&n.push(e[r]);return n}}(),a=function(){var e=Array.prototype.map;return t(e)?function(t,n){return t?n?e.apply(t,[n]):t:null}:function(e,t){if(!e)return null;if(!t)return e;var n=[],r=0,i=e.length;for(;r<i;r++)n.push(t(e[r]));return n}}(),f=function(){var e=Array.prototype.reduce;return t(e)?function(t,n,r){return t?n?e.apply(t,[n,r]):r:null}:function(e,t,n){if(!e)return null;if(!t)return n;var r=n,i=0,s=e.length;for(;i<s;i++)r=t(r,e[i],i,e);return r}}(),l=function(){var e=String.prototype.trim;return t(e)?function(t){return t&&e.apply(t)}:function(e){return e&&e.replace(/(^\s+|\s+$)/g,"")}}(),d=t(Object.create)?Object.create:function(e){function t(){}return t.prototype=e,new t};e({aug:n,async:g,compact:r,forIn:s,forEach:o,filter:u,map:a,reduce:f,trim:l,indexOf:i,isNative:t,isObject:v,isEmptyObject:m,createObject:d,bind:p,toType:c,isType:h,toRealArray:y})}); provide("util/events",function(e){using("util/util",function(t){var n={bind:function(e,t){return this._handlers=this._handlers||{},this._handlers[e]=this._handlers[e]||[],this._handlers[e].push(t)},unbind:function(e,n){if(!this._handlers[e])return;if(n){var r=t.indexOf(this._handlers[e],n);r>=0&&this._handlers[e].splice(r,1)}else this._handlers[e]=[]},trigger:function(e,n){var r=this._handlers&&this._handlers[e];n.type=e,t.forEach(r,function(e){t.async(t.bind(e,this,[n]))})}};e({Emitter:n})})}); provide("$xd/json2.js", function(exports) {window.JSON||(window.JSON={}),function(){function f(e){return e<10?"0"+e:e}function quote(e){return escapable.lastIndex=0,escapable.test(e)?'"'+e.replace(escapable,function(e){var t=meta[e];return typeof t=="string"?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'}function str(e,t){var n,r,i,s,o=gap,u,a=t[e];a&&typeof a=="object"&&typeof a.toJSON=="function"&&(a=a.toJSON(e)),typeof rep=="function"&&(a=rep.call(t,e,a));switch(typeof a){case"string":return quote(a);case"number":return isFinite(a)?String(a):"null";case"boolean":case"null":return String(a);case"object":if(!a)return"null";gap+=indent,u=[];if(Object.prototype.toString.apply(a)==="[object Array]"){s=a.length;for(n=0;n<s;n+=1)u[n]=str(n,a)||"null";return i=u.length===0?"[]":gap?"[\n"+gap+u.join(",\n"+gap)+"\n"+o+"]":"["+u.join(",")+"]",gap=o,i}if(rep&&typeof rep=="object"){s=rep.length;for(n=0;n<s;n+=1)r=rep[n],typeof r=="string"&&(i=str(r,a),i&&u.push(quote(r)+(gap?": ":":")+i))}else for(r in a)Object.hasOwnProperty.call(a,r)&&(i=str(r,a),i&&u.push(quote(r)+(gap?": ":":")+i));return i=u.length===0?"{}":gap?"{\n"+gap+u.join(",\n"+gap)+"\n"+o+"}":"{"+u.join(",")+"}",gap=o,i}}typeof Date.prototype.toJSON!="function"&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()});var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;typeof JSON.stringify!="function"&&(JSON.stringify=function(e,t,n){var r;gap="",indent="";if(typeof n=="number")for(r=0;r<n;r+=1)indent+=" ";else typeof n=="string"&&(indent=n);rep=t;if(!t||typeof t=="function"||typeof t=="object"&&typeof t.length=="number")return str("",{"":e});throw new Error("JSON.stringify")}),typeof JSON.parse!="function"&&(JSON.parse=function(text,reviver){function walk(e,t){var n,r,i=e[t];if(i&&typeof i=="object")for(n in i)Object.hasOwnProperty.call(i,n)&&(r=walk(i,n),r!==undefined?i[n]=r:delete i[n]);return reviver.call(e,t,i)}var j;cx.lastIndex=0,cx.test(text)&&(text=text.replace(cx,function(e){return"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)}));if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return j=eval("("+text+")"),typeof reviver=="function"?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})}();exports();loadrunner.Script.loaded.push("$xd/json2.js")}); provide("util/querystring",function(e){function t(e){return encodeURIComponent(e).replace(/\+/g,"%2B").replace(/'/g,"%27")}function n(e){return decodeURIComponent(e)}function r(e){var n=[],r;for(r in e)e[r]!==null&&typeof e[r]!="undefined"&&n.push(t(r)+"="+t(e[r]));return n.sort().join("&")}function i(e){var t={},r,i,s,o;if(e){r=e.split("&");for(o=0;s=r[o];o++)i=s.split("="),i.length==2&&(t[n(i[0])]=n(i[1]))}return t}function s(e,t){var n=r(t);return n.length>0?e.indexOf("?")>=0?e+"&"+r(t):e+"?"+r(t):e}function o(e){var t=e&&e.split("?");return t.length==2?i(t[1]):{}}e({url:s,decodeURL:o,decode:i,encode:r,encodePart:t,decodePart:n})}); provide("util/twitter",function(e){using("util/querystring",function(t){function u(e){return typeof e=="string"&&n.test(e)&&RegExp.$1.length<=20}function a(e){if(u(e))return RegExp.$1}function f(e,n){var r=t.decodeURL(e);n=n||!1,r.screen_name=a(e);if(r.screen_name)return t.url("https://twitter.com/intent/"+(n?"follow":"user"),r)}function l(e){return f(e,!0)}function c(e){return typeof e=="string"&&o.test(e)}function h(e,t){t=t===undefined?!0:t;if(c(e))return(t?"#":"")+RegExp.$1}function p(e){return typeof e=="string"&&r.test(e)}function d(e){return p(e)&&RegExp.$1}function v(e){return i.test(e)}function m(e){return s.test(e)}var n=/(?:^|(?:https?\:)?\/\/(?:www\.)?twitter\.com(?:\:\d+)?(?:\/intent\/(?:follow|user)\/?\?screen_name=|(?:\/#!)?\/))@?([\w]+)(?:\?|&|$)/i,r=/(?:^|(?:https?\:)?\/\/(?:www\.)?twitter\.com(?:\:\d+)?\/(?:#!\/)?[\w_]+\/status(?:es)?\/)(\d+)/i,i=/^http(s?):\/\/(\w+\.)*twitter\.com([\:\/]|$)/i,s=/^http(s?):\/\/pbs\.twimg\.com\//,o=/^#?([^.,<>!\s\/#\-\(\)\'\"]+)$/;e({isHashTag:c,hashTag:h,isScreenName:u,screenName:a,isStatus:p,status:d,intentForProfileURL:f,intentForFollowURL:l,isTwitterURL:v,isTwimgURL:m,regexen:{profile:n}})})}); provide("util/uri",function(e){using("util/querystring","util/util","util/twitter",function(t,n,r){function i(e,t){var n,r;return t=t||location,/^https?:\/\//.test(e)?e:/^\/\//.test(e)?t.protocol+e:(n=t.host+(t.port.length?":"+t.port:""),e.indexOf("/")!==0&&(r=t.pathname.split("/"),r.pop(),r.push(e),e="/"+r.join("/")),[t.protocol,"//",n,e].join(""))}function s(){var e=document.getElementsByTagName("link"),t=0,n;for(;n=e[t];t++)if(n.rel=="canonical")return i(n.href)}function o(){var e=document.getElementsByTagName("a"),t=document.getElementsByTagName("link"),n=[e,t],i,s,o=0,u=0,a=/\bme\b/,f;for(;i=n[o];o++)for(u=0;s=i[u];u++)if(a.test(s.rel)&&(f=r.screenName(s.href)))return f}e({absolutize:i,getCanonicalURL:s,getScreenNameFromPage:o})})}); provide("util/typevalidator",function(e){using("util/util",function(t){function n(e){return e!==undefined&&e!==null&&e!==""}function r(e){return s(e)&&e%1===0}function i(e){return s(e)&&!r(e)}function s(e){return n(e)&&!isNaN(e)}function o(e){return n(e)&&t.toType(e)=="array"}function u(e){if(!n(e))return!1;switch(e){case"on":case"ON":case"true":case"TRUE":return!0;case"off":case"OFF":case"false":case"FALSE":return!1;default:return!!e}}function a(e){if(s(e))return e}function f(e){if(i(e))return e}function l(e){if(r(e))return e}e({hasValue:n,isInt:r,isFloat:i,isNumber:s,isArray:o,asInt:l,asFloat:f,asNumber:a,asBoolean:u})})}); provide("tfw/util/globals",function(e){using("util/typevalidator",function(t){function r(){var e=document.getElementsByTagName("meta"),t,r,i=0;n={};for(;t=e[i];i++){if(!/^twitter:/.test(t.name))continue;r=t.name.replace(/^twitter:/,""),n[r]=t.content}}function i(e){return n[e]}function s(e){return t.asBoolean(e)&&(n.dnt=!0),t.asBoolean(n.dnt)}var n;r(),e({init:r,val:i,dnt:s})})}); provide("dom/delegate",function(e){function r(e){var t=e.getAttribute("data-twitter-event-id");return t?t:(e.setAttribute("data-twitter-event-id",++n),n)}function i(e,t,n){var r=0,i=e&&e.length||0;for(r=0;r<i;r++)e[r].call(t,n)}function s(e,t,n){var r=n||e.target||e.srcElement,o=r.className.split(" "),u=0,a=o.length;for(;u<a;u++)i(t["."+o[u]],r,e);i(t[r.tagName],r,e);if(e.cease)return;r!==this&&s.call(this,e,t,r.parentElement||r.parentNode)}function o(e,t,n){if(e.addEventListener){e.addEventListener(t,function(r){s.call(e,r,n[t])},!1);return}e.attachEvent&&e.attachEvent("on"+t,function(){s.call(e,e.ownerDocument.parentWindow.event,n[t])})}function u(e,n,i,s){var u=r(e);t[u]=t[u]||{},t[u][n]||(t[u][n]={},o(e,n,t[u])),t[u][n][i]=t[u][n][i]||[],t[u][n][i].push(s)}function a(e,t,n){e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent("on"+t,function(){n(window.event)})}function f(e,n,i){var o=r(n),u=t[o]&&t[o];s.call(n,{target:i},u[e])}function l(e){return h(e),c(e),!1}function c(e){e&&e.preventDefault?e.preventDefault():e.returnValue=!1}function h(e){e&&(e.cease=!0)&&e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}var t={},n=-1;e({stop:l,stopPropagation:h,preventDefault:c,delegate:u,on:a,simulate:f})}); provide("tfw/util/article",function(e){using("dom/delegate","tfw/util/globals","util/uri","$xd/json2.js",function(t,n,r){function o(){i=r.getCanonicalURL()||""+document.location;if(!window.top.postMessage)return;if(window==window.top){t.on(window,"message",function(e){var t;if(e.data&&e.data[0]!="{")return;try{t=JSON.parse(e.data)}catch(r){}t&&t.name=="twttr:private:requestArticleUrl"&&e.source.postMessage(JSON.stringify({name:"twttr:private:provideArticleUrl",data:{url:i,dnt:n.dnt()}}),"*")});return}t.on(window,"message",function(e){var t;if(e.data&&e.data[0]!="{")return;try{t=JSON.parse(e.data)}catch(r){}t&&t.name=="twttr:private:provideArticleUrl"&&(i=t.data&&t.data.url,n.dnt(t.data.dnt),s=document.location.href)}),window.top.postMessage(JSON.stringify({name:"twttr:private:requestArticleUrl"}),"*")}var i,s="";o(),e({url:function(){return i},frameUrl:function(){return s}})})}); provide("dom/get",function(e){using("util/util",function(t){function r(e,t,r){return n(e,t,r,1)[0]}function i(e,n,r){var s=n&&n.parentNode,o;if(!s||s===r)return;return s.tagName==e?s:(o=s.className.split(" "),0===e.indexOf(".")&&~t.indexOf(o,e.slice(1))?s:i(e,s,r))}var n=function(){var e=document.getElementsByClassName;return t.isNative(e)?function(n,r,i,s){var o=r?r.getElementsByClassName(n):e.call(document,n),u=t.filter(o,function(e){return!i||e.tagName.toLowerCase()==i.toLowerCase()});return[].slice.call(u,0,s||u.length)}:function(e,n,r,i){var s,o,u=[],a,f,l,c,h,p;n=n||document,a=e.split(" "),c=a.length,s=n.getElementsByTagName(r||"*"),p=s.length;for(l=0;l<c&&p>0;l++){u=[],f=a[l];for(h=0;h<p;h++){o=s[h],~t.indexOf(o.className.split(" "),f)&&u.push(o);if(l+1==c&&u.length===i)break}s=u,p=s.length}return u}}();e({all:n,one:r,ancestor:i})})}); provide("dom/classname",function(e){function t(e){return new RegExp("\\b"+e+"\\b","g")}function n(e,n){if(e.classList){e.classList.add(n);return}t(n).test(e.className)||(e.className+=" "+n)}function r(e,n){if(e.classList){e.classList.remove(n);return}e.className=e.className.replace(t(n)," ")}function i(e,t,i){return i===undefined&&e.classList&&e.classList.toggle?e.classList.toggle(t,i):(i?n(e,t):r(e,t),i)}function s(e,i,s){if(e.classList&&o(e,i)){r(e,i),n(e,s);return}e.className=e.className.replace(t(i),s)}function o(e,n){return e.classList?e.classList.contains(n):t(n).test(e.className)}e({add:n,remove:r,replace:s,toggle:i,present:o})}); provide("util/throttle",function(e){function t(e,t,n){function o(){var n=+(new Date);window.clearTimeout(s);if(n-i>t){i=n,e.call(r);return}s=window.setTimeout(o,t)}var r=n||this,i=0,s;return o}e(t)}); provide("util/logger",function(e){using("util/util",function(t){function s(){c("info",t.toRealArray(arguments))}function o(){c("warn",t.toRealArray(arguments))}function u(){c("error",t.toRealArray(arguments))}function a(e){if(!i)return;r[e]=l()}function f(e){var t;if(!i)return;r[e]?(t=l(),s("_twitter",e,t-r[e])):u("timeEnd() called before time() for id: ",e)}function l(){return window.performance&&+window.performance.now()||+(new Date)}function c(e,t){if(!window[n]||!window[n][e])return;switch(t.length){case 1:window[n][e](t[0]);break;case 2:window[n][e](t[0],t[1]);break;case 3:window[n][e](t[0],t[1],t[2]);break;case 4:window[n][e](t[0],t[1],t[2],t[3]);break;case 5:window[n][e](t[0],t[1],t[2],t[3],t[4]);break;default:t.length!==0&&window[n].warn&&window[n].warn("too many params passed to logger."+e)}}var n=["con","sole"].join(""),r={},i=!!~location.href.indexOf("tw_debug=true");e({info:s,warn:o,error:u,time:a,timeEnd:f})})}); provide("util/domready",function(e){function c(){t=1;for(var e=0,r=n.length;e<r;e++)n[e]()}var t=0,n=[],r,i,s=!1,o=document.createElement("a"),u="DOMContentLoaded",a="addEventListener",f="onreadystatechange",l;/^loade|c/.test(document.readyState)&&(t=1),document[a]&&document[a](u,i=function(){document.removeEventListener(u,i,s),c()},s),o.doScroll&&document.attachEvent(f,r=function(){/^c/.test(document.readyState)&&(document.detachEvent(f,r),c())}),l=o.doScroll?function(e){window.self!=window.top?t?e():n.push(e):!function(){try{o.doScroll("left")}catch(t){return setTimeout(function(){l(e)},50)}e()}()}:function(e){t?e():n.push(e)},e(l)}); provide("util/env",function(e){using("util/domready","util/typevalidator","util/logger","tfw/util/globals",function(t,n,r,i){function f(e){return e=e||window,e.devicePixelRatio?e.devicePixelRatio>=1.5:e.matchMedia?e.matchMedia("only screen and (min-resolution: 144dpi)").matches:!1}function l(e){return e=e||s,/(Trident|MSIE \d)/.test(e)}function c(e){return e=e||s,/MSIE 6/.test(e)}function h(e){return e=e||s,/MSIE 7/.test(e)}function p(e){return e=e||s,/MSIE 9/.test(e)}function d(e){return e=e||s,/(iPad|iPhone|iPod)/.test(e)}function v(e){return e=e||s,/^Mozilla\/5\.0 \(Linux; (U; )?Android/.test(e)}function m(){return o}function g(e,t){return e=e||window,t=t||s,e.postMessage&&(!l(t)||!e.opener)}function y(e){e=e||navigator;try{return!!e.plugins["Shockwave Flash"]||!!(new ActiveXObject("ShockwaveFlash.ShockwaveFlash"))}catch(t){return!1}}function b(e,t,n){return e=e||window,t=t||navigator,n=n||s,"ontouchstart"in e||/Opera Mini/.test(n)||t.msMaxTouchPoints>0}function w(){var e=document.body.style;return e.transition!==undefined||e.webkitTransition!==undefined||e.mozTransition!==undefined||e.oTransition!==undefined||e.msTransition!==undefined}var s=window.navigator.userAgent,o=!1,u=!1,a="twitter-csp-test";window.twttr=window.twttr||{},twttr.verifyCSP=function(e){var t=document.getElementById(a);u=!0,o=!!e,t&&t.parentNode.removeChild(t)},t(function(){var e;if(c()||h())return o=!1;if(n.asBoolean(i.val("widgets:csp")))return o=!0;e=document.createElement("script"),e.id=a,e.text="twttr.verifyCSP(false);",document.body.appendChild(e),window.setTimeout(function(){if(u)return;r.warn('TWITTER: Content Security Policy restrictions may be applied to your site. Add <meta name="twitter:widgets:csp" content="on"> to supress this warning.'),r.warn("TWITTER: Please note: Not all embedded timeline and embedded Tweet functionality is supported when CSP is applied.")},5e3)}),e({retina:f,anyIE:l,ie6:c,ie7:h,ie9:p,ios:d,android:v,cspEnabled:m,flashEnabled:y,canPostMessage:g,touch:b,cssTransitions:w})})}); provide("util/css",function(e){using("util/util",function(t){e({sanitize:function(e,n,r){var i=/^[\w ,%\/"'\-_#]+$/,s=e&&t.map(e.split(";"),function(e){return t.map(e.split(":").slice(0,2),function(e){return t.trim(e)})}),o=0,u,a=[],f=r?"!important":"";n=n||/^(font|text\-|letter\-|color|line\-)[\w\-]*$/;for(;s&&(u=s[o]);o++)u[0].match(n)&&u[1].match(i)&&a.push(u.join(":")+f);return a.join(";")}})})}); provide("tfw/util/params",function(e){using("util/querystring","util/twitter",function(t,n){e(function(e,r){return function(i){var s,o="data-tw-params",u;if(!i)return;if(!n.isTwitterURL(i.href))return;if(i.getAttribute(o))return;i.setAttribute(o,!0);if(typeof r=="function"){s=r.call(this,i);for(u in s)s.hasOwnProperty(u)&&(e[u]=s[u])}i.href=t.url(i.href,e)}})})}); provide("util/iframe",function(e){using("util/util",function(t){e(function(e,n,r){var i;r=r||document,e=e||{},n=n||{};if(e.name){try{i=r.createElement('<iframe name="'+e.name+'"></iframe>')}catch(s){i=r.createElement("iframe"),i.name=e.name}delete e.name}else i=r.createElement("iframe");return e.id&&(i.id=e.id,delete e.id),i.allowtransparency="true",i.scrolling="no",i.setAttribute("frameBorder",0),i.setAttribute("allowTransparency",!0),t.forIn(e,function(e,t){i.setAttribute(e,t)}),t.forIn(n,function(e,t){i.style[e]=t}),i})})}); provide("util/params",function(e){using("util/querystring",function(t){var n,r,i;n=function(e){var n=e.search.substr(1);return t.decode(n)},r=function(e){var n=e.href,r=n.indexOf("#"),i=r<0?"":n.substring(r+1);return t.decode(i)},i=function(e){var t={},i=n(e),s=r(e),o;for(o in i)i.hasOwnProperty(o)&&(t[o]=i[o]);for(o in s)s.hasOwnProperty(o)&&(t[o]=s[o]);return t},e({combined:i,fromQuery:n,fromFragment:r})})}); provide("tfw/util/env",function(e){using("util/params",function(t){function r(){var e=36e5,r=t.combined(document.location)._;return n!==undefined?n:(n=!1,r&&/^\d+$/.test(r)&&(n=+(new Date)-parseInt(r)<e),n)}var n;e({isDynamicWidget:r})})}); provide("util/promise",function(e){using("util/util",function(t){var n=function(e){try{var t=e.then;if(typeof t=="function")return!0}catch(n){}return!1},r=function(e){Error.call(this,e)};r.prototype=t.createObject(Error.prototype);var i=function(){var e=[];return e.pump=function(n){t.async(function(){var t=e.length,r=0;while(r<t)r++,e.shift()(n)})},e},s=function(e,r,i,s,o,u){var a=!1,f=this,l=function(e){t.async(function(){u("fulfilled"),s(e),r.pump(e)})},c=function(e){t.async(function(){u("rejected"),o(e),i.pump(e)})},h=function(e){if(n(e)){e.then(h,c);return}l(e)},p=function(e){return function(t){a||(a=!0,e(t))}};this.resolve=p(h,"resolve"),this.fulfill=p(l,"fulfill"),this.reject=p(c,"reject"),this.cancel=function(){f.reject(new Error("Cancel"))},this.timeout=function(){f.reject(new Error("Timeout"))},u("pending")},o=function(e){var t=new i,n=new i,r,o,u="pending";this._addAcceptCallback=function(e){t.push(e),u=="fulfilled"&&t.pump(r)},this._addRejectCallback=function(e){n.push(e),u=="rejected"&&n.pump(o)};var a=new s(this,t,n,function(e){r=e},function(e){o=e},function(e){u=e});try{e&&e(a)}catch(f){a.reject(f)}},u=function(e){return typeof e=="function"},a=function(e,n,r){return u(e)?function(){try{var t=e.apply(null,arguments);n.resolve(t)}catch(r){n.reject(r)}}:t.bind(n[r],n)},f=function(e,t,n){return u(e)&&n._addAcceptCallback(e),u(t)&&n._addRejectCallback(t),n};t.aug(o.prototype,{then:function(e,t){var n=this;return new o(function(r){f(a(e,r,"resolve"),a(t,r,"reject"),n)})},"catch":function(e){var t=this;return new o(function(n){f(null,a(e,n,"reject"),t)})}}),o.isThenable=n;var l=function(e){return t.map(e,o.resolve)};o.any=function(){var e=l(arguments);return new o(function(n){if(!e.length)n.reject("No futures passed to Promise.any()");else{var r=!1,i=function(e){if(r)return;r=!0,n.resolve(e)},s=function(e){if(r)return;r=!0,n.reject(e)};t.forEach(e,function(e){e.then(i,s)})}})},o.every=function(){var e=l(arguments);return new o(function(n){if(!e.length)n.reject("No futures passed to Promise.every()");else{var r=new Array(e.length),i=0,s=function(t,s){i++,r[t]=s,i==e.length&&n.resolve(r)};t.forEach(e,function(e,r){e.then(t.bind(s,null,[r]),n.reject)})}})},o.some=function(){var e=l(arguments);return new o(function(n){if(!e.length)n.reject("No futures passed to Promise.some()");else{var r=0,i=function(){r++,r==e.length&&n.reject()};t.forEach(e,function(e){e.then(n.resolve,i)})}})},o.fulfill=function(e){return new o(function(t){t.fulfill(e)})},o.resolve=function(e){return new o(function(t){t.resolve(e)})},o.reject=function(e){return new o(function(t){t.reject(e)})},e(o)})}); provide("util/donottrack",function(e){using("tfw/util/globals",function(t){e(function(e,n){var r=/\.(gov|mil)(:\d+)?$/i,i=/https?:\/\/([^\/]+).*/i;return e=e||document.referrer,e=i.test(e)&&RegExp.$1,n=n||document.location.host,t.dnt()?!0:r.test(n)?!0:e&&r.test(e)?!0:document.navigator?document.navigator["doNotTrack"]==1:navigator?navigator["doNotTrack"]==1||navigator["msDoNotTrack"]==1:!1})})}); provide("sandbox/baseframe",function(e){using("util/domready","util/env","util/iframe","util/promise","util/util",function(t,n,r,i,s){function u(e,t,n,o){var u;this.readyPromise=new i(s.bind(function(e){this.resolver=e},this)),this.attrs=e||{},this.styles=t||{},this.appender=n||function(e){document.body.appendChild(e)},this.layout=o||function(e){return new i(function(t){return t.fulfill(e())})},this.frame=u=r(this.attrs,this.styles),u.onreadystatechange=u.onload=this.getCallback(this.onLoad),this.layout(s.bind(function(){this.appender(u)},this))}var o=0;window.twttr=window.twttr||{},window.twttr.sandbox=window.twttr.sandbox||{},u.prototype.getCallback=function(e){var t=this,n=!1;return function(){n||(n=!0,e.call(t))}},u.prototype.registerCallback=function(e){var t="cb"+o++;return window.twttr.sandbox[t]=e,t},u.prototype.onLoad=function(){try{this.document=this.frame.contentWindow.document}catch(e){this.setDocDomain();return}this.writeStandardsDoc(),this.resolver.fulfill(this)},u.prototype.ready=function(){return this.readyPromise},u.prototype.setDocDomain=function(){var e=r(this.attrs,this.styles),t=this.registerCallback(this.getCallback(this.onLoad));e.src=["javascript:",'document.write("");',"try { window.parent.document; }","catch (e) {",'document.domain="'+document.domain+'";',"}",'window.parent.twttr.sandbox["'+t+'"]();'].join(""),this.layout(s.bind(function(){this.frame.parentNode.removeChild(this.frame),this.frame=null,this.appender?this.appender(e):document.body.appendChild(e),this.frame=e},this))},u.prototype.writeStandardsDoc=function(){if(!n.anyIE()||n.cspEnabled())return;var e=["<!DOCTYPE html>","<html>","<head>","<scr","ipt>","try { window.parent.document; }",'catch (e) {document.domain="'+document.domain+'";}',"</scr","ipt>","</head>","<body></body>","</html>"].join("");this.document.write(e),this.document.close()},e(u)})}); provide("sandbox/minimal",function(e){using("sandbox/baseframe","util/env","util/promise","util/util",function(t,n,r,i){function s(e,t){if(!e)return;this._frame=e,this._win=e.contentWindow,this._doc=this._win.document,this._body=this._doc.body,this._head=this._body.parentNode.children[0],this.layout=t}i.aug(s.prototype,{createElement:function(e){return this._doc.createElement(e)},createDocumentFragment:function(){return this._doc.createDocumentFragment()},appendChild:function(e){return this.layout(i.bind(function(){return this._body.appendChild(e)},this))},setBaseTarget:function(e){var t=this._doc.createElement("base");return t.target=e,this.layout(i.bind(function(){return this._head.appendChild(t)},this))},setTitle:function(e){if(!e)return;this._frame.title=e},element:function(){return this._frame},document:function(){return this._doc}}),s.createSandbox=function(e,n,r,i){var o=new t(e,n,r,i);return o.ready().then(function(e){return new s(e.frame,e.layout)})},e(s)})}); provide("dom/cookie",function(e){using("util/util",function(t){e(function(e,n,r){var i=t.aug({},r),s,o,u,a;if(arguments.length>1&&String(n)!=="[object Object]"){if(n===null||n===undefined)i.expires=-1;return typeof i.expires=="number"&&(s=i.expires,o=new Date((new Date).getTime()+s*60*1e3),i.expires=o),n=String(n),document.cookie=[encodeURIComponent(e),"=",i.raw?n:encodeURIComponent(n),i.expires?"; expires="+i.expires.toUTCString():"",i.path?"; path="+i.path:"",i.domain?"; domain="+i.domain:"",i.secure?"; secure":""].join("")}return i=n||{},a=i.raw?function(e){return e}:decodeURIComponent,(u=(new RegExp("(?:^|; )"+encodeURIComponent(e)+"=([^;]*)")).exec(document.cookie))?a(u[1]):null})})}); provide("tfw/util/tracking",function(e){using("dom/cookie","dom/delegate","sandbox/minimal","util/donottrack","util/promise","util/querystring","tfw/util/env","util/iframe","util/util","$xd/json2.js",function(t,n,r,i,s,o,u,a,f){function E(){return y?y:y=r.createSandbox({id:"rufous-sandbox"},{display:"none"}).then(f.bind(function(e){g=e,p=_(),d=D();while(v[0])k.apply(this,v.shift());return m?L():[p,d]},this))}function S(e,t,n,r){var i=!f.isObject(e),s=t?!f.isObject(t):!1,o,u;if(i||s)return;o=O(e),u=M(t,!!n,!!r),C(o,u,!0)}function x(e,t,n,r,i){var s=T(e.target||e.srcElement);s.action=i||"click",S(s,t,n,r)}function T(e,t){var n;return t=t||{},!e||e.nodeType!==1?t:((n=e.getAttribute("data-scribe"))&&f.forEach(n.split(" "),function(e){var n=f.trim(e).split(":"),r=n[0],i=n[1];r&&i&&!t[r]&&(t[r]=i)}),T(e.parentNode,t))}function N(e,t,n){var r=l+t;if(!e)return;return e[r]=n,e}function C(e,t,n){var r,i,s,u,a;if(!f.isObject(e)||!f.isObject(t))return;s=f.aug({},t,{event_namespace:e}),n?(u={l:B(s)},s.dnt&&(u.dnt=1),P(o.url(b,u))):(r=p.firstChild,r.value=+(+r.value||s.dnt||0),a=B(s),i=g.createElement("input"),i.type="hidden",i.name="l",i.value=a,p.appendChild(i))}function k(e,t,n,r){var i=!f.isObject(e),s=t?!f.isObject(t):!1,o,u;if(i||s)return;if(!g||!p){v.push([e,t,n,r]);return}o=O(e),u=M(t,!!n,!!r),C(o,u)}function L(){if(!p)return m=!0,y||s.reject();if(p.children.length<=2)return s.reject();var e=s.every(g.appendChild(p),g.appendChild(d)).then(function(e){var t=e[0],r=e[1];return n.on(r,"load",function(){window.setTimeout(A(t,r),0)}),t.submit(),e});return p=_(),d=D(),e}function A(e,t){return function(){var n=e.parentNode;if(!n)return;n.removeChild(e),n.removeChild(t)}}function O(e){return f.aug({client:"tfw"},e||{})}function M(e,t,n){var r={_category_:"tfw_client_event"},s,o;t=!!t,n=!!n,s=f.aug(r,e||{}),o=s.widget_origin||document.referrer,s.format_version=1,s.triggered_on=s.triggered_on||+(new Date),t||(s.widget_origin=o);if(n||i(o))s.dnt=!0,H(s);return s}function _(){var e=g.createElement("form"),t=g.createElement("input"),n=g.createElement("input");return h++,e.action=b,e.method="POST",e.target="rufous-frame-"+h,e.id="rufous-form-"+h,t.type="hidden",t.name="dnt",t.value=0,n.type="hidden",n.name="tfw_redirect",n.value=w,e.appendChild(t),e.appendChild(n),e}function D(){var e="rufous-frame-"+h;return a({id:e,name:e,width:0,height:0,border:0},{display:"none"},g.document())}function P(e){var t=new Image;t.src=e}function H(e){f.forIn(e,function(t){~f.indexOf(c,t)&&delete e[t]})}function B(e){var t=Array.prototype.toJSON,n;return delete Array.prototype.toJSON,n=JSON.stringify(e),t&&(Array.prototype.toJSON=t),n}var l="twttr_",c=["hask","li","logged_in","pid","user_id","guest_id",l+"hask",l+"li",l+"pid"],h=0,p,d,v=[],m,g,y,b="https://syndication.twitter.com/i/jot/syndication",w="https://platform.twitter.com/jot.html";twttr.widgets&&twttr.widgets.endpoints&&twttr.widgets.endpoints.rufous&&(b=twttr.widgets.endpoints.rufous),e({enqueue:k,flush:L,initPostLogging:E,scribeInteraction:x,extractTermsFromDOM:T,addPixel:S,addVar:N})})}); provide("tfw/util/media",function(e){using("dom/delegate","dom/get","util/util","util/env","util/twitter",function(t,n,r,i,s){function f(e,t){return e==2||e==3&&+t===0}function l(e){var t=e.split(" ");this.url=decodeURIComponent(r.trim(t[0])),this.width=+r.trim(t[1].replace(/w$/,""))}function c(e,t,n){var i,s,o,u;e=window.devicePixelRatio?e*window.devicePixelRatio:e,s=r.map(t.split(","),function(e){return new l(e)});if(n)for(u=0;u<s.length;u++)s[u].url===n&&(i=s[u]);return o=r.reduce(s,function(t,n){return n.width<t.width&&n.width>=e?n:t},s[0]),i&&i.width>o.width?i:o}function h(e,t){var n=e.getAttribute("data-srcset"),r=e.src,i;n&&(i=c(t,n,r),e.src=i.url)}function p(e,t){t=t||i.retina();if(!t)return;r.forEach(e.getElementsByTagName("IMG"),function(e){var t=e.getAttribute("data-src-2x");t&&(e.src=t)})}function d(e,t,i,s){var l=0,c=i?600:375,p=n.one("multi-photo",e,"DIV"),d=p&&+p.getAttribute("data-photo-count");if(!e)return;return r.forEach(n.all("autosized-media",e),function(e){var n=v(e.getAttribute("data-width"),e.getAttribute("data-height"),t,c);s(function(){h(e,t),e.width=n.width,e.height=n.height,m(e,n)}),l=n.height>l?n.height:l}),r.forEach(n.all("cropped-media",e,"IMG"),function(e){var n=t-12,r=e.parentNode,i=e.getAttribute("data-crop-x")||0,p=e.getAttribute("data-crop-y")||0,m,g,y=f(d,e.getAttribute("data-image-index")),b=Math.floor(n/2-o),w=Math.floor(b/(y?u:a)),E;y||(w-=o/2),E=v(e.getAttribute("data-width"),e.getAttribute("data-height"),b,c,b,w),m=E.width-b-i,g=E.height-w-p,m<0&&Math.max(0,i+=m),g<0&&Math.max(0,p+=g),s(function(){h(e,b),e.width=E.width,e.height=E.height,r.style.width=b-1+"px",r.style.height=w+"px",i&&(e.style.marginLeft="-"+Math.floor(E.width*i/100)+"px"),p&&(e.style.marginTop="-"+Math.floor(E.height*p/100)+"px")}),l=E.height*(y?2:1)>l?E.height:l}),l}function v(e,t,n,r,i,s){return n=n||e,r=r||t,i=i||0,s=s||0,e>n&&(t*=n/e,e=n),t>r&&(e*=r/t,t=r),e<i&&(t*=i/e,e=i),t<s&&(e*=s/t,t=s),{width:Math.floor(e),height:Math.floor(t)}}function m(e,n){function l(){var e={name:"tfw:resize",dimensions:n};o.postMessage(e,"*")}var r,o,u,a,f;if(!e)return;o=e.contentWindow,r=e.ownerDocument&&e.ownerDocument.defaultView,u=i.ios()||i.android(),a=s.isTwitterURL(e.src),f=o&&i.canPostMessage(o),u&&a&&f&&(l(),r&&t.on(r,"message",function(e){e.data==="tfw:requestsize"&&l()}))}var o=6,u=8/9,a=16/9;e({scaleDimensions:v,retinize:p,constrainMedia:d,__setSrcFromSet:h})})}); provide("tfw/util/data",function(e){using("util/logger","util/util","util/querystring",function(t,n,r){function c(e){return function(n){n.error?e.error&&e.error(n):n.headers&&n.headers.status!=200?(e.error&&e.error(n),t.warn(n.headers.message)):e.success&&e.success(n),e.complete&&e.complete(n),h(e)}}function h(e){var t=e.script;t&&(t.onload=t.onreadystatechange=null,t.parentNode&&t.parentNode.removeChild(t),e.script=undefined,t=undefined),e.callbackName&&twttr.tfw.callbacks[e.callbackName]&&delete twttr.tfw.callbacks[e.callbackName]}function p(e){var t={};return e.success&&n.isType("function",e.success)&&(t.success=e.success),e.error&&n.isType("function",e.error)&&(t.error=e.error),e.complete&&n.isType("function",e.complete)&&(t.complete=e.complete),t}window.twttr=window.twttr||{},twttr.tfw=twttr.tfw||{},twttr.tfw.callbacks=twttr.tfw.callbacks||{};var i="twttr.tfw.callbacks",s=twttr.tfw.callbacks,o="cb",u=0,a=!1,f={},l={tweets:"https://syndication.twitter.com/tweets.json",timeline:"https://cdn.syndication.twimg.com/widgets/timelines/",timelinePoll:"https://syndication.twitter.com/widgets/timelines/paged/",timelinePreview:"https://syndication.twitter.com/widgets/timelines/preview/"};twttr.widgets&&twttr.widgets.endpoints&&n.aug(l,twttr.widgets.endpoints),f.jsonp=function(e,t,n){var f=n||o+u,l=i+"."+f,h=document.createElement("script"),p={callback:l,suppress_response_codes:!0};s[f]=c(t);if(a||!/^https?\:$/.test(window.location.protocol))e=e.replace(/^\/\//,"https://");h.src=r.url(e,p),h.async="async",document.body.appendChild(h),t.script=h,t.callbackName=f,n||u++},f.config=function(e){if(e.forceSSL===!0||e.forceSSL===!1)a=e.forceSSL},f.tweets=function(e){var t=arguments[0],n=p(t),i={ids:e.ids.join(","),lang:e.lang},s=r.url(l.tweets,i);this.jsonp(s,n)},f.timeline=function(e){var t=arguments[0],i=p(t),s,o=9e5,u=Math.floor(+(new Date)/o),a={lang:e.lang,t:u,domain:window.location.host,dnt:e.dnt,override_type:e.overrideType,override_id:e.overrideId,override_name:e.overrideName,override_owner_id:e.overrideOwnerId,override_owner_name:e.overrideOwnerName,with_replies:e.withReplies};n.compact(a),s=r.url(l.timeline+e.id,a),this.jsonp(s,i,"tl_"+e.id+"_"+e.instanceId)},f.timelinePoll=function(e){var t=arguments[0],i=p(t),s={lang:e.lang,since_id:e.sinceId,max_id:e.maxId,min_position:e.minPosition,max_position:e.maxPosition,domain:window.location.host,dnt:e.dnt,override_type:e.overrideType,override_id:e.overrideId,override_name:e.overrideName,override_owner_id:e.overrideOwnerId,override_owner_name:e.overrideOwnerName,with_replies:e.withReplies},o;n.compact(s),o=r.url(l.timelinePoll+e.id,s),this.jsonp(o,i,"tlPoll_"+e.id+"_"+e.instanceId+"_"+(e.sinceId||e.maxId||e.maxPosition||e.minPosition))},f.timelinePreview=function(e){var t=arguments[0],n=p(t),i=e.params,s=r.url(l.timelinePreview,i);this.jsonp(s,n)},e(f)})}); provide("anim/transition",function(e){function t(e,t){var n;return t=t||window,n=t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.msRequestAnimationFrame||t.oRequestAnimationFrame||function(){t.setTimeout(function(){e(+(new Date))},1e3/60)},n(e)}function n(e,t){return Math.sin(Math.PI/2*t)*e}function r(e,n,r,i,s){function u(){var a=+(new Date),f=a-o,l=Math.min(f/r,1),c=i?i(n,l):n*l;e(c);if(l==1)return;t(u,s)}var o=+(new Date);t(u)}e({animate:r,requestAnimationFrame:t,easeOut:n})}); provide("util/datetime",function(e){using("util/util",function(t){function h(e){return e<10?"0"+e:e}function p(e){function i(e,n){return t&&t[e]&&(e=t[e]),e.replace(/%\{([\w_]+)\}/g,function(e,t){return n[t]!==undefined?n[t]:e})}var t=e&&e.phrases,n=e&&e.months||s,r=e&&e.formats||o;this.timeAgo=function(e){var t=p.parseDate(e),s=+(new Date),o=s-t,h;return t?isNaN(o)||o<u*2?i("now"):o<a?(h=Math.floor(o/u),i(r.abbr,{number:h,symbol:i(c,{abbr:i("s"),expanded:h>1?i("seconds"):i("second")})})):o<f?(h=Math.floor(o/a),i(r.abbr,{number:h,symbol:i(c,{abbr:i("m"),expanded:h>1?i("minutes"):i("minute")})})):o<l?(h=Math.floor(o/f),i(r.abbr,{number:h,symbol:i(c,{abbr:i("h"),expanded:h>1?i("hours"):i("hour")})})):o<l*365?i(r.shortdate,{day:t.getDate(),month:i(n[t.getMonth()])}):i(r.longdate,{day:t.getDate(),month:i(n[t.getMonth()]),year:t.getFullYear().toString().slice(2)}):""},this.localTimeStamp=function(e){var t=p.parseDate(e),s=t&&t.getHours();return t?i(r.full,{day:t.getDate(),month:i(n[t.getMonth()]),year:t.getFullYear(),hours24:h(s),hours12:s<13?s?s:"12":s-12,minutes:h(t.getMinutes()),seconds:h(t.getSeconds()),amPm:s<12?i("AM"):i("PM")}):""}}var n=/(\d{4})-?(\d{2})-?(\d{2})T(\d{2}):?(\d{2}):?(\d{2})(Z|[\+\-]\d{2}:?\d{2})/,r=/[a-z]{3,4} ([a-z]{3}) (\d{1,2}) (\d{1,2}):(\d{2}):(\d{2}) ([\+\-]\d{2}:?\d{2}) (\d{4})/i,i=/^\d+$/,s=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],o={abbr:"%{number}%{symbol}",shortdate:"%{day} %{month}",longdate:"%{day} %{month} %{year}",full:"%{hours12}:%{minutes} %{amPm} - %{day} %{month} %{year}"},u=1e3,a=u*60,f=a*60,l=f*24,c='<abbr title="%{expanded}">%{abbr}</abbr>';p.parseDate=function(e){var o=e||"",u=o.toString(),a,f;return a=function(){var e;if(i.test(u))return parseInt(u,10);if(e=u.match(r))return Date.UTC(e[7],t.indexOf(s,e[1]),e[2],e[3],e[4],e[5]);if(e=u.match(n))return Date.UTC(e[1],e[2]-1,e[3],e[4],e[5],e[6])}(),a?(f=new Date(a),!isNaN(f.getTime())&&f):!1},e(p)})}); provide("sandbox/frame",function(e){using("sandbox/baseframe","sandbox/minimal","util/env","util/promise","util/util",function(t,n,r,i,s){function h(){var e,t;a={};if(f)return;e=document.body.offsetHeight,t=document.body.offsetWidth;if(e==c&&t==l)return;s.forEach(u,function(e){e.dispatchFrameResize(l,c)}),c=e,l=t}function p(e){var t;return e.id?e.id:(t=e.getAttribute("data-twttr-id"))?t:(t="twttr-sandbox-"+o++,e.setAttribute("data-twttr-id",t),t)}function d(e,t){n.apply(this,[e,t]),this._resizeHandlers=[],u.push(this),this._win.addEventListener?this._win.addEventListener("resize",s.bind(function(){this.dispatchFrameResize()},this),!0):this._win.attachEvent("onresize",s.bind(function(){this.dispatchFrameResize(this._win.event)},this))}var o=0,u=[],a={},f,l=0,c=0;window.addEventListener?window.addEventListener("resize",h,!0):document.body.attachEvent("onresize",function(){h(window.event)}),d.prototype=new n,s.aug(d.prototype,{dispatchFrameResize:function(){var e=this._frame.parentNode,t=p(e),n=a[t];f=!0;if(!this._resizeHandlers.length)return;n||(n=a[t]={w:this._frame.offsetWidth,h:this._frame.offsetHeight});if(this._frameWidth==n.w&&this._frameHeight==n.h)return;this._frameWidth=n.w,this._frameHeight=n.h,s.forEach(this._resizeHandlers,function(e){e(n.w,n.h)}),window.setTimeout(function(){a={}},50)},appendStyleSheet:function(e){var t=this._doc.createElement("link");return t.type="text/css",t.rel="stylesheet",t.href=e,this.layout(s.bind(function(){return this._head.appendChild(t)},this))},appendCss:function(e){var t;return r.cspEnabled()?i.reject("CSP enabled; cannot embed inline styles."):(t=this._doc.createElement("style"),t.type="text/css",t.styleSheet?t.styleSheet.cssText=e:t.appendChild(this._doc.createTextNode(e)),this.layout(s.bind(function(){return this._head.appendChild(t)},this)))},style:function(e){return this.layout(s.bind(function(){s.forIn(e,s.bind(function(e,t){this._frame.style[e]=t},this))},this))},onresize:function(e){this._resizeHandlers.push(e)},width:function(e){return e!==undefined&&(this._frame.style.width=e+"px"),r.ios()?Math.min(this._frame.parentNode.offsetWidth,this._frame.offsetWidth):this._frame.offsetWidth},height:function(e){return e!==undefined&&(this._frame.height=e),this._frame.offsetHeight}}),d.createSandbox=function(e,n,r,i){var s=new t(e,n,r,i);return s.ready().then(function(e){return new d(e.frame,e.layout)})},e(d)})}); provide("dom/size",function(e){function t(e){return!e||e.nodeType!==1?0:e.offsetWidth||t(e.parentNode)}e({effectiveWidth:t})}); provide("tfw/util/assets",function(e){using("util/env",function(t){function r(e,r){var i=n[e],s;return t.retina()?s="2x":t.ie6()||t.ie7()?s="gif":s="default",r&&(s+=".rtl"),i[s]}var n={"embed/timeline.css":{"default":"embed/timeline.295a00bf5122128e332d25515711dbbd.default.css","2x":"embed/timeline.295a00bf5122128e332d25515711dbbd.2x.css",gif:"embed/timeline.295a00bf5122128e332d25515711dbbd.gif.css","default.rtl":"embed/timeline.295a00bf5122128e332d25515711dbbd.default.rtl.css","2x.rtl":"embed/timeline.295a00bf5122128e332d25515711dbbd.2x.rtl.css","gif.rtl":"embed/timeline.295a00bf5122128e332d25515711dbbd.gif.rtl.css"}};e(r)})}); provide("util/layout",function(e){using("util/promise",function(t){function i(){}var n=[],r;i.prototype.enqueue=function(e,r){return new t(function(t){n.push({action:e,resolver:t,note:r})})},i.prototype.exec=function(){var e=n,t;if(!e.length)return;n=[];while(e.length)t=e.shift(),t&&t.action?t.resolver.fulfill(t.action()):t.resolver.reject()},i.prototype.delayedExec=function(){r&&window.clearTimeout(r),r=window.setTimeout(this.exec,100)},e(i)})}); provide("tfw/widget/base",function(e){using("dom/get","util/domready","util/iframe","util/layout","util/promise","util/querystring","util/typevalidator","util/util","tfw/util/globals","util/logger",function(t,n,r,i,s,o,u,a,f,l){function y(e){var t;if(!e)return;e.ownerDocument?(this.srcEl=e,this.classAttr=e.className.split(" ")):(this.srcOb=e,this.classAttr=[]),t=this.params(),this.id=this.generateId(),this.setLanguage(),this.related=t.related||this.dataAttr("related"),this.partner=t.partner||this.dataAttr("partner")||f.val("partner"),this.dnt=t.dnt||this.dataAttr("dnt")||f.dnt()||"",this.styleAttr=[],this.targetEl=e.targetEl,this.completePromise=new s(a.bind(function(e){this.completeResolver=e},this)),this.completed().then(function(e){if(!e||e==document.body)return;twttr.events.trigger("rendered",{target:e})})}function b(){a.forEach(d,function(e){e()}),y.doLayout()}function w(e){if(!e)return;return e.lang?e.lang:w(e.parentNode)}var c=0,h,p={list:[],byId:{}},d=[],v=new i,m="data-twttr-rendered",g={ar:{"%{followers_count} followers":"عدد المتابعين %{followers_count}","100K+":"+100 ألف","10k unit":"10 آلاف وحدة",Follow:"تابِع","Follow %{screen_name}":"تابِع %{screen_name}",K:"ألف",M:"م",Tweet:"غرِّد","Tweet %{hashtag}":"غرِّد %{hashtag}","Tweet to %{name}":"غرِّد لـ %{name}"},bn:{"Follow %{screen_name}":"%{screen_name}-কে অনুসরণ করুন"},cs:{"Follow %{screen_name}":"Sledovat uživatele %{screen_name}"},da:{"%{followers_count} followers":"%{followers_count} følgere","10k unit":"10k enhed",Follow:"Følg","Follow %{screen_name}":"Følg %{screen_name}","Tweet to %{name}":"Tweet til %{name}"},de:{"%{followers_count} followers":"%{followers_count} Follower","100K+":"100Tsd+","10k unit":"10tsd-Einheit",Follow:"Folgen","Follow %{screen_name}":"%{screen_name} folgen",K:"Tsd",Tweet:"Twittern","Tweet to %{name}":"Tweet an %{name}"},es:{"%{followers_count} followers":"%{followers_count} seguidores","10k unit":"unidad de 10 mil",Follow:"Seguir","Follow %{screen_name}":"Seguir a %{screen_name}",Tweet:"Twittear","Tweet %{hashtag}":"Twittear %{hashtag}","Tweet to %{name}":"Twittear a %{name}"},fa:{"%{followers_count} followers":"%{followers_count} دنبال‌کننده","100K+":">۱۰۰هزار","10k unit":"۱۰هزار واحد",Follow:"دنبال کردن","Follow %{screen_name}":"دنبال کردن %{screen_name}",K:"هزار",M:"میلیون",Tweet:"توییت","Tweet %{hashtag}":"توییت کردن %{hashtag}","Tweet to %{name}":"به %{name} توییت کنید"},fi:{"%{followers_count} followers":"%{followers_count} seuraajaa","100K+":"100 000+","10k unit":"10 000 yksikköä",Follow:"Seuraa","Follow %{screen_name}":"Seuraa käyttäjää %{screen_name}",K:"tuhatta",M:"milj.",Tweet:"Twiittaa","Tweet %{hashtag}":"Twiittaa %{hashtag}","Tweet to %{name}":"Twiittaa käyttäjälle %{name}"},fil:{"%{followers_count} followers":"%{followers_count} mga tagasunod","10k unit":"10k yunit",Follow:"Sundan","Follow %{screen_name}":"Sundan si %{screen_name}",Tweet:"I-tweet","Tweet %{hashtag}":"I-tweet ang %{hashtag}","Tweet to %{name}":"Mag-Tweet kay %{name}"},fr:{"%{followers_count} followers":"%{followers_count} abonnés","10k unit":"unité de 10k",Follow:"Suivre","Follow %{screen_name}":"Suivre %{screen_name}",Tweet:"Tweeter","Tweet %{hashtag}":"Tweeter %{hashtag}","Tweet to %{name}":"Tweeter à %{name}"},he:{"%{followers_count} followers":"%{followers_count} עוקבים","100K+":"מאות אלפים","10k unit":"עשרות אלפים",Follow:"מעקב","Follow %{screen_name}":"לעקוב אחר %{screen_name}",K:"אלף",M:"מיליון",Tweet:"ציוץ","Tweet %{hashtag}":"צייצו %{hashtag}","Tweet to %{name}":"ציוץ אל %{name}"},hi:{"%{followers_count} followers":"%{followers_count} फ़ॉलोअर्स","100K+":"1 लाख से अधिक","10k unit":"10 हजार इकाईयां",Follow:"फ़ॉलो","Follow %{screen_name}":"%{screen_name} को फ़ॉलो करें",K:"हजार",M:"मिलियन",Tweet:"ट्वीट","Tweet %{hashtag}":"ट्वीट %{hashtag}","Tweet to %{name}":"%{name} के प्रति ट्वीट करें"},hu:{"%{followers_count} followers":"%{followers_count} követő","100K+":"100E+","10k unit":"10E+",Follow:"Követés","Follow %{screen_name}":"%{screen_name} követése",K:"E","Tweet %{hashtag}":"%{hashtag} tweetelése","Tweet to %{name}":"Tweet küldése neki: %{name}"},id:{"%{followers_count} followers":"%{followers_count} pengikut","100K+":"100 ribu+","10k unit":"10 ribu unit",Follow:"Ikuti","Follow %{screen_name}":"Ikuti %{screen_name}",K:"&nbsp;ribu",M:"&nbsp;juta","Tweet to %{name}":"Tweet ke %{name}"},it:{"%{followers_count} followers":"%{followers_count} follower","10k unit":"10k unità",Follow:"Segui","Follow %{screen_name}":"Segui %{screen_name}","Tweet %{hashtag}":"Twitta %{hashtag}","Tweet to %{name}":"Twitta a %{name}"},ja:{"%{followers_count} followers":"%{followers_count}人のフォロワー","100K+":"100K以上","10k unit":"万",Follow:"フォローする","Follow %{screen_name}":"%{screen_name}さんをフォロー",Tweet:"ツイート","Tweet %{hashtag}":"%{hashtag} をツイートする","Tweet to %{name}":"%{name}さんへツイートする"},ko:{"%{followers_count} followers":"%{followers_count}명의 팔로워","100K+":"100만 이상","10k unit":"만 단위",Follow:"팔로우","Follow %{screen_name}":"%{screen_name} 님 팔로우하기",K:"천",M:"백만",Tweet:"트윗","Tweet %{hashtag}":"%{hashtag} 관련 트윗하기","Tweet to %{name}":"%{name} 님에게 트윗하기"},msa:{"%{followers_count} followers":"%{followers_count} pengikut","100K+":"100 ribu+","10k unit":"10 ribu unit",Follow:"Ikut","Follow %{screen_name}":"Ikut %{screen_name}",K:"ribu",M:"juta","Tweet to %{name}":"Tweet kepada %{name}"},nl:{"%{followers_count} followers":"%{followers_count} volgers","100K+":"100k+","10k unit":"10k-eenheid",Follow:"Volgen","Follow %{screen_name}":"%{screen_name} volgen",K:"k",M:" mln.",Tweet:"Tweeten","Tweet %{hashtag}":"%{hashtag} tweeten","Tweet to %{name}":"Tweeten naar %{name}"},no:{"%{followers_count} followers":"%{followers_count} følgere","100K+":"100 K+","10k unit":"10-K-enhet",Follow:"Følg","Follow %{screen_name}":"Følg %{screen_name}","Tweet to %{name}":"Send en tweet til %{name}"},pl:{"%{followers_count} followers":"%{followers_count} obserwujących","100K+":"100 tys.+","10k unit":"10 tys.",Follow:"Obserwuj","Follow %{screen_name}":"Obserwuj %{screen_name}",K:"tys.",M:"mln",Tweet:"Tweetnij","Tweet %{hashtag}":"Tweetnij %{hashtag}","Tweet to %{name}":"Tweetnij do %{name}"},pt:{"%{followers_count} followers":"%{followers_count} seguidores","100K+":"+100 mil","10k unit":"10 mil unidades",Follow:"Seguir","Follow %{screen_name}":"Seguir %{screen_name}",K:"Mil",Tweet:"Tweetar","Tweet %{hashtag}":"Tweetar %{hashtag}","Tweet to %{name}":"Tweetar para %{name}"},ro:{"Follow %{screen_name}":"Urmăreşte pe %{screen_name}"},ru:{"%{followers_count} followers":"Читатели: %{followers_count} ","100K+":"100 тыс.+","10k unit":"блок 10k",Follow:"Читать","Follow %{screen_name}":"Читать %{screen_name}",K:"тыс.",M:"млн.",Tweet:"Твитнуть","Tweet %{hashtag}":"Твитнуть %{hashtag}","Tweet to %{name}":"Твитнуть %{name}"},sv:{"%{followers_count} followers":"%{followers_count} följare","10k unit":"10k",Follow:"Följ","Follow %{screen_name}":"Följ %{screen_name}",Tweet:"Tweeta","Tweet %{hashtag}":"Tweeta %{hashtag}","Tweet to %{name}":"Tweeta till %{name}"},th:{"%{followers_count} followers":"%{followers_count} ผู้ติดตาม","100K+":"100พัน+","10k unit":"หน่วย 10พัน",Follow:"ติดตาม","Follow %{screen_name}":"ติดตาม %{screen_name}",M:"ล้าน",Tweet:"ทวีต","Tweet %{hashtag}":"ทวีต %{hashtag}","Tweet to %{name}":"ทวีตถึง %{name}"},tr:{"%{followers_count} followers":"%{followers_count} takipçi","100K+":"+100 bin","10k unit":"10 bin birim",Follow:"Takip et","Follow %{screen_name}":"Takip et: %{screen_name}",K:"bin",M:"milyon",Tweet:"Tweetle","Tweet %{hashtag}":"Tweetle: %{hashtag}","Tweet to %{name}":"Tweetle: %{name}"},uk:{"Follow %{screen_name}":"Читати %{screen_name}"},ur:{"%{followers_count} followers":"%{followers_count} فالورز","100K+":"ایک لاکھ سے زیادہ","10k unit":"دس ہزار یونٹ",Follow:"فالو کریں","Follow %{screen_name}":"%{screen_name} کو فالو کریں",K:"ہزار",M:"ملین",Tweet:"ٹویٹ کریں","Tweet %{hashtag}":"%{hashtag} ٹویٹ کریں","Tweet to %{name}":"%{name} کو ٹویٹ کریں"},vi:{"Follow %{screen_name}":"Theo dõi %{screen_name}"},"zh-cn":{"%{followers_count} followers":"%{followers_count} 关注者","100K+":"10万+","10k unit":"1万单元",Follow:"关注","Follow %{screen_name}":"关注 %{screen_name}",K:"千",M:"百万",Tweet:"发推","Tweet %{hashtag}":"以 %{hashtag} 发推","Tweet to %{name}":"发推给 %{name}"},"zh-tw":{"%{followers_count} followers":"%{followers_count} 位跟隨者","100K+":"超過十萬","10k unit":"1萬 單位",Follow:"跟隨","Follow %{screen_name}":"跟隨 %{screen_name}",K:"千",M:"百萬",Tweet:"推文","Tweet %{hashtag}":"推文%{hashtag}","Tweet to %{name}":"推文給%{name}"}};a.aug(y.prototype,{setLanguage:function(e){var t;e||(e=this.params().lang||this.dataAttr("lang")||w(this.srcEl)),e=e&&e.toLowerCase();if(!e)return this.lang="en";if(g[e])return this.lang=e;t=e.replace(/[\-_].*/,"");if(g[t])return this.lang=t;this.lang="en"},_:function(e,t){var n=this.lang;t=t||{};if(!n||!g.hasOwnProperty(n))n=this.lang="en";return e=g[n]&&g[n][e]||e,this.ringo(e,t,/%\{([\w_]+)\}/g)},ringo:function(e,t,n){return n=n||/\{\{([\w_]+)\}\}/g,e.replace(n,function(e,n){return t[n]!==undefined?t[n]:e})},add:function(e){p.list.push(this),p.byId[this.id]=e},create:function(e,t,n){var i=this,o;return n[m]=!0,o=r(a.aug({id:this.id,src:e,"class":this.classAttr.join(" ")},n),t,this.targetEl&&this.targetEl.ownerDocument),this.srcEl?this.layout(function(){return i.srcEl.parentNode.replaceChild(o,i.srcEl),i.completeResolver.fulfill(o),o}):this.targetEl?this.layout(function(){return i.targetEl.appendChild(o),i.completeResolver.fulfill(o),o}):s.reject("Did not append widget")},params:function(){var e,t;return this.srcOb?t=this.srcOb:(e=this.srcEl&&this.srcEl.href&&this.srcEl.href.split("?")[1],t=e?o.decode(e):{}),this.params=function(){return t},t},dataAttr:function(e){return this.srcEl&&this.srcEl.getAttribute("data-"+e)},attr:function(e){return this.srcEl&&this.srcEl.getAttribute(e)},layout:function(e){return v.enqueue(e)},styles:{base:[["font","normal normal normal 11px/18px 'Helvetica Neue', Arial, sans-serif"],["margin","0"],["padding","0"],["whiteSpace","nowrap"]],button:[["fontWeight","bold"],["textShadow","0 1px 0 rgba(255,255,255,.5)"]],large:[["fontSize","13px"],["lineHeight","26px"]],vbubble:[["fontSize","16px"]]},width:function(){throw new Error(name+" not implemented")},height:function(){return this.size=="m"?20:28},minWidth:function(){},maxWidth:function(){},minHeight:function(){},maxHeight:function(){},dimensions:function(){function e(e){switch(typeof e){case"string":return e;case"undefined":return;default:return e+"px"}}var t={width:this.width(),height:this.height()};return this.minWidth()&&(t["min-width"]=this.minWidth()),this.maxWidth()&&(t["max-width"]=this.maxWidth()),this.minHeight()&&(t["min-height"]=this.minHeight()),this.maxHeight()&&(t["max-height"]=this.maxHeight()),a.forIn(t,function(n,r){t[n]=e(r)}),t},generateId:function(){return this.srcEl&&this.srcEl.id||"twitter-widget-"+c++},completed:function(){return this.completePromise}}),y.afterLoad=function(e){d.push(e)},y.doLayout=function(){v.exec()},y.doLayoutAsync=function(){v.delayedExec()},y.init=function(e){h=e},y.find=function(e){return e&&p.byId[e]?p.byId[e].element:null},y.embed=function(e){var n=h.widgets,r=[],i=[],o=[];u.isArray(e)||(e=[e||document]),l.time("sandboxes"),a.forEach(e,function(e){a.forIn(n,function(n,i){var s,u;n.match(/\./)?(s=n.split("."),u=t.all(s[1],e,s[0])):u=e.getElementsByTagName(n),a.forEach(u,function(e){var t;if(e.getAttribute(m))return;e.setAttribute(m,"true"),t=new i(e),r.push(t),o.push(t.sandboxCreated)})})}),s.every.apply(null,o).then(function(){l.timeEnd("sandboxes")}),y.doLayout(),a.forEach(r,function(e){p.byId[e.id]=e,p.list.push(e),i.push(e.completed()),e.render(h)}),s.every.apply(null,i).then(function(e){e=a.filter(e,function(t){return t});if(!e.length)return;twttr.events.trigger("loaded",{widgets:e}),l.timeEnd("load")}),y.doLayoutAsync(),b()},window.setInterval(function(){y.doLayout()},500),e(y)})}); provide("tfw/widget/intent",function(e){using("tfw/widget/base","util/util","util/querystring","util/uri","util/promise",function(t,n,r,i,s){function p(e){var t=Math.round(c/2-a/2),n=0;l>f&&(n=Math.round(l/2-f/2)),window.open(e,undefined,[u,"width="+a,"height="+f,"left="+t,"top="+n].join(","))}function d(e,t){using("tfw/hub/client",function(n){n.openIntent(e,t)})}function v(e){var t=~location.host.indexOf("poptip.com")?"https://poptip.com":location.href,n="original_referer="+t;return[e,n].join(e.indexOf("?")==-1?"?":"&")}function m(e){var t,r,i;e=e||window.event,t=e.target||e.srcElement;if(e.altKey||e.metaKey||e.shiftKey)return;while(t){if(~n.indexOf(["A","AREA"],t.nodeName))break;t=t.parentNode}t&&t.href&&(r=t.href.match(o),r&&(i=v(t.href),i=i.replace(/^http[:]/,"https:"),i=i.replace(/^\/\//,"https://"),g(i,t),e.returnValue=!1,e.preventDefault&&e.preventDefault()))}function g(e,t){if(twttr.events.hub&&t){var n=new y(h.generateId(),t);h.add(n),d(e,t),twttr.events.trigger("click",{target:t,region:"intent",type:"click",data:{}})}else p(e)}function y(e,t){this.id=e,this.element=this.srcEl=t}function b(e){this.srcEl=[],this.element=e}var o=/twitter\.com(\:\d{2,4})?\/intent\/(\w+)/,u="scrollbars=yes,resizable=yes,toolbar=no,location=yes",a=550,f=520,l=screen.height,c=screen.width,h;b.prototype=new t,n.aug(b.prototype,{render:function(){return h=this,window.__twitterIntentHandler||(document.addEventListener?document.addEventListener("click",m,!1):document.attachEvent&&document.attachEvent("onclick",m),window.__twitterIntentHandler=!0),s.fulfill(document.body)}}),b.open=g,e(b)})}); provide("tfw/widget/syndicatedbase",function(e){using("tfw/widget/base","tfw/widget/intent","tfw/util/assets","tfw/util/globals","tfw/util/media","tfw/util/tracking","dom/classname","dom/get","dom/delegate","dom/size","sandbox/frame","util/env","util/promise","util/twitter","util/typevalidator","util/util",function(t,n,r,i,s,o,u,a,f,l,c,h,p,d,v,m){function N(){E=C.VALID_COLOR.test(i.val("widgets:link-color"))&&RegExp.$1,x=C.VALID_COLOR.test(i.val("widgets:border-color"))&&RegExp.$1,S=i.val("widgets:theme")}function C(e){if(!e)return;var n;this.readyPromise=new p(m.bind(function(e){this.readyResolver=e},this)),this.renderedPromise=new p(m.bind(function(e){this.renderResolver=e},this)),t.apply(this,[e]),n=this.params(),this.targetEl=this.srcEl&&this.srcEl.parentNode||n.targetEl||document.body,this.predefinedWidth=C.VALID_UNIT.test(n.width||this.attr("width"))&&RegExp.$1,this.layout(m.bind(function(){return this.containerWidth=l.effectiveWidth(this.targetEl)},this)).then(m.bind(function(e){var t=this.predefinedWidth||e||this.dimensions.DEFAULT_WIDTH;this.height=C.VALID_UNIT.test(n.height||this.attr("height"))&&RegExp.$1,this.width=Math.max(this.dimensions.MIN_WIDTH,Math.min(t,this.dimensions.DEFAULT_WIDTH))},this)),C.VALID_COLOR.test(n.linkColor||this.dataAttr("link-color"))?this.linkColor=RegExp.$1:this.linkColor=E,C.VALID_COLOR.test(n.borderColor||this.dataAttr("border-color"))?this.borderColor=RegExp.$1:this.borderColor=x,this.theme=n.theme||this.attr("data-theme")||S,this.theme=/(dark|light)/.test(this.theme)?this.theme:"",this.classAttr.push(h.touch()?"is-touch":"not-touch"),h.ie9()&&this.classAttr.push("ie9"),this.sandboxCreated=c.createSandbox({"class":this.renderedClassNames,id:this.id},{width:"1px",height:"0px",border:"none",position:"absolute",visibility:"hidden"},m.bind(function(e){this.srcEl?this.targetEl.insertBefore(e,this.srcEl):this.targetEl.appendChild(e)},this),this.layout).then(m.bind(function(e){this.setupSandbox(e)},this))}function k(e,t){return e+t}var g=[".customisable",".customisable:link",".customisable:visited",".customisable:hover",".customisable:focus",".customisable:active",".customisable-highlight:hover",".customisable-highlight:focus","a:hover .customisable-highlight","a:focus .customisable-highlight"],y=["a:hover .ic-mask","a:focus .ic-mask"],b=[".customisable-border"],w=[".timeline-header h1.summary",".timeline-header h1.summary a:link",".timeline-header h1.summary a:visited"],E,S,x,T={TWEET:0,RETWEET:10};C.prototype=new t,m.aug(C.prototype,{setupSandbox:function(e){this.sandbox=e,p.some(e.appendCss("body{display:none}"),e.setBaseTarget("_blank"),e.appendStyleSheet(twttr.widgets.config.assetUrl()+"/"+r("embed/timeline.css"))).then(m.bind(function(){this.readyResolver.fulfill(e)},this))},ready:function(){return this.readyPromise},rendered:function(){return this.renderedPromise},contentWidth:function(e){var t=this.dimensions,n=this.fullBleedPhoto?0:this.chromeless&&this.narrow?t.NARROW_MEDIA_PADDING_CL:this.chromeless?t.WIDE_MEDIA_PADDING_CL:this.narrow?t.NARROW_MEDIA_PADDING:t.WIDE_MEDIA_PADDING;return(e||this.width)-n},addSiteStyles:function(){var e=m.bind(function(e){return(this.theme=="dark"?".thm-dark ":"")+e},this),t=[];this.headingStyle&&t.push(m.map(w,e).join(",")+"{"+this.headingStyle+"}"),this.linkColor&&(t.push(m.map(g,e).join(",")+"{color:"+this.linkColor+"}"),t.push(m.map(y,e).join(",")+"{background-color:"+this.linkColor+"}")),this.borderColor&&t.push(m.map(b,e).concat(this.theme=="dark"?[".thm-dark.customisable-border"]:[]).join(",")+"{border-color:"+this.borderColor+"}");if(!t.length)return;return this.sandbox.appendCss(t.join(""))},setNarrow:function(){var e=this.narrow;return this.narrow=this.width<this.dimensions.NARROW_WIDTH,e!=this.narrow?this.layout(m.bind(function(){return u.toggle(this.element,"var-narrow",this.narrow)},this)):p.fulfill(this.narrow)},bindIntentHandlers:function(){function r(n){var r=a.ancestor(".tweet",this,t),i=m.aug({},e.baseScribeData(),{item_ids:[],item_details:e.extractTweetScribeDetails(r)});m.forIn(i.item_details,function(e){i.item_ids.push(e)}),o.scribeInteraction(n,i,!0,e.dnt)}var e=this,t=this.element;f.delegate(t,"click","A",r),f.delegate(t,"click","BUTTON",r),f.delegate(t,"click",".profile",function(){e.addUrlParams(this)}),f.delegate(t,"click",".follow-button",function(t){var r;if(t.altKey||t.metaKey||t.shiftKey)return;if(h.ios()||h.android())return;if(v.asBoolean(this.getAttribute("data-age-gate")))return;r=d.intentForFollowURL(this.href,!0),r&&(n.open(r,e.sandbox.element()),f.preventDefault(t))}),f.delegate(t,"click",".web-intent",function(t){e.addUrlParams(this);if(t.altKey||t.metaKey||t.shiftKey)return;n.open(this.href,e.sandbox.element()),f.preventDefault(t)})},baseScribeData:function(){return{}},extractTweetScribeDetails:function(e){var t,n,r={};return e?(t=e.getAttribute("data-tweet-id"),n=e.getAttribute("data-rendered-tweet-id")||t,n==t?r[n]={item_type:T.TWEET}:t&&(r[n]={item_type:T.RETWEET,target_type:T.TWEET,target_id:t}),r):r},constrainMedia:function(e,t){return s.constrainMedia(e||this.element,t||this.contentWidth(),this.fullBleedPhoto,this.layout)},collapseRegions:function(){m.forEach(a.all("collapsible-container",this.element),m.bind(function(e){var t=e.children,n=t.length&&e.offsetWidth,r=t.length&&m.map(t,function(e){return e.offsetWidth}),i=t.length,s,o;if(!t.length)return;while(i>0){i--,s=m.reduce(r,k,0);if(!n||!s)return;if(s<n)return;o=t[i].getAttribute("data-collapsed-class");if(!o)continue;u.add(this.element,o),r[i]=t[i].offsetWidth}},this))}}),C.VALID_UNIT=/^([0-9]+)( ?px)?$/,C.VALID_COLOR=/^(#(?:[0-9a-f]{3}|[0-9a-f]{6}))$/i,N(),e(C)})}); provide("tfw/widget/timeline",function(e){using("tfw/widget/base","tfw/widget/syndicatedbase","util/datetime","util/promise","anim/transition","tfw/util/article","tfw/util/data","tfw/util/media","tfw/util/tracking","tfw/util/params","util/css","util/env","util/throttle","util/twitter","util/querystring","util/typevalidator","util/util","dom/delegate","dom/classname","dom/get",function(t,n,r,i,s,o,u,a,f,l,c,h,p,d,v,m,g,y,b,w){function q(e){if(!e)return;var t,r,i,s,o,u,a,f;n.apply(this,[e]),t=this.params(),r=(t.chrome||this.dataAttr("chrome")||"").split(" "),this.preview=t.previewParams,this.widgetId=t.widgetId||this.dataAttr("widget-id"),this.instanceId=++I,this.cursors={maxPosition:0,minPosition:0},(s=t.screenName||this.dataAttr("screen-name"))||(o=t.userId||this.dataAttr("user-id"))?this.override={overrideType:"user",overrideId:o,overrideName:s,withReplies:m.asBoolean(t.showReplies||this.dataAttr("show-replies"))?"true":"false"}:(s=t.favoritesScreenName||this.dataAttr("favorites-screen-name"))||(o=t.favoritesUserId||this.dataAttr("favorites-user-id"))?this.override={overrideType:"favorites",overrideId:o,overrideName:s}:((s=t.listOwnerScreenName||this.dataAttr("list-owner-screen-name"))||(o=t.listOwnerId||this.dataAttr("list-owner-id")))&&((u=t.listId||this.dataAttr("list-id"))||(a=t.listSlug||this.dataAttr("list-slug")))?this.override={overrideType:"list",overrideOwnerId:o,overrideOwnerName:s,overrideId:u,overrideName:a}:(f=t.customTimelineId||this.dataAttr("custom-timeline-id"))?this.override={overrideType:"custom",overrideId:f}:this.override={},this.tweetLimit=m.asInt(t.tweetLimit||this.dataAttr("tweet-limit")),this.staticTimeline=this.tweetLimit>0,r.length&&(i=~g.indexOf(r,"none"),this.chromeless=i||~g.indexOf(r,"transparent"),this.headerless=i||~g.indexOf(r,"noheader"),this.footerless=i||~g.indexOf(r,"nofooter"),this.borderless=i||~g.indexOf(r,"noborders"),this.noscrollbar=~g.indexOf(r,"noscrollbar")),this.headingStyle=c.sanitize(t.headingStyle||this.dataAttr("heading-style"),undefined,!0),this.classAttr.push("twitter-timeline-rendered"),this.ariaPolite=t.ariaPolite||this.dataAttr("aria-polite")}var E="1.0",S={CLIENT_SIDE_USER:0,CLIENT_SIDE_APP:2},x="timeline",T="new-tweets-bar",N="timeline-header",C="timeline-footer",k="stream",L="h-feed",A="tweet",O="expanded",M="detail-expander",_="expand",D="permalink",P="twitter-follow-button",H="no-more-pane",B="pending-scroll-in",j="pending-new-tweet",F="pending-new-tweet-display",I=0;q.prototype=new n,g.aug(q.prototype,{renderedClassNames:"twitter-timeline twitter-timeline-rendered",dimensions:{DEFAULT_HEIGHT:"600",DEFAULT_WIDTH:"520",NARROW_WIDTH:"320",MIN_WIDTH:"180",MIN_HEIGHT:"200",WIDE_MEDIA_PADDING:81,NARROW_MEDIA_PADDING:16,WIDE_MEDIA_PADDING_CL:60,NARROW_MEDIA_PADDING_CL:12},create:function(e){var n=this.sandbox.createElement("div"),r,s,o,u=[],l;n.innerHTML=e.body,r=n.children[0]||!1;if(!r)return;return this.reconfigure(e.config),this.discardStaticOverflow(r),this.sandbox.setTitle(r.getAttribute("data-iframe-title")||"Timeline"),a.retinize(r),this.constrainMedia(r),this.searchQuery=r.getAttribute("data-search-query"),this.profileId=r.getAttribute("data-profile-id"),this.timelineType=r.getAttribute("data-timeline-type"),l=this.getTweetDetails(w.one(L,n)),g.forIn(l,function(e){u.push(e)}),o=this.baseScribeData(),o.item_ids=u,o.item_details=l,this.timelineType&&f.enqueue({page:this.timelineType+"_timeline",component:"timeline",element:"initial",action:u.length?"results":"no_results"},o,!0,this.dnt),f.enqueue({page:"timeline",component:"timeline",element:"initial",action:u.length?"results":"no_results"},o,!0,this.dnt),f.flush(),this.ariaPolite=="assertive"&&(s=w.one(T,r,"DIV"),s.setAttribute("aria-polite","assertive")),r.id=this.id,r.className+=" "+this.classAttr.join(" "),r.lang=this.lang,this.augmentWidgets(r),this.ready().then(g.bind(function(e){e.appendChild(r).then(g.bind(function(){this.renderResolver.fulfill(this.sandbox)},this)),e.style({cssText:"",border:"none",maxWidth:"100%",minWidth:this.dimensions.MIN_WIDTH+"px"}),this.layout(g.bind(function(){this.srcEl&&this.srcEl.parentNode&&this.srcEl.parentNode.removeChild(this.srcEl),this.predefinedWidth=this.width,this.predefinedHeight=this.height,this.width=e.width(this.width),this.height=e.height(this.height)},this)).then(g.bind(function(){var n=[];this.width<this.predefinedWidth&&n.push(this.layout(g.bind(function(){this.width=e.width(this.predefinedWidth)},this))),this.height<this.predefinedHeight&&n.push(this.layout(g.bind(function(){this.height=e.height(this.predefinedHeight),this.recalculateStreamHeight()},this))),n.length&&t.doLayoutAsync(),n.push(i.fulfill()),i.every.apply(null,n).then(g.bind(function(){this.setNarrow(),this.sandbox.onresize(g.bind(this.handleResize,this)),this.completeResolver.fulfill(this.sandbox.element())},this))},this))},this)),r},render:function(e,n){return!this.preview&&!this.widgetId?(this.completeResolver.reject(400),this.completed()):(this.staticTimeline?this.rendered().then(g.bind(function(e){this.layout(g.bind(function(){e.height(this.height=this.element.offsetHeight)},this)),t.doLayoutAsync()},this)):this.rendered().then(g.bind(function(){this.recalculateStreamHeight(),t.doLayoutAsync()},this)),this.preview?this.getPreviewTimeline():this.getTimeline(),n&&this.completed().then(n),this.completed())},getPreviewTimeline:function(){u.timelinePreview({success:g.bind(function(e){this.ready().then(g.bind(function(){this.element=this.create(e),this.readTranslations(),this.bindInteractions(),this.updateCursors(e.headers,{initial:!0}),t.doLayoutAsync()},this))},this),error:g.bind(function(e){if(!e||!e.headers){this.completeResolver.fulfill(this.srcEl);return}this.completeResolver.reject(e.headers.status)},this),params:this.preview})},getTimeline:function(){f.initPostLogging(),u.timeline(g.aug({id:this.widgetId,instanceId:this.instanceId,dnt:this.dnt,lang:this.lang,success:g.bind(function(e){this.ready().then(g.bind(function(){this.element=this.create(e),this.readTranslations(),this.bindInteractions(),this.updateTimeStamps(),this.updateCursors(e.headers,{initial:!0}),e.headers.xPolling&&/\d/.test(e.headers.xPolling)&&(this.pollInterval=e.headers.xPolling*1e3),this.staticTimeline||this.schedulePolling(),t.doLayoutAsync()},this))},this),error:g.bind(function(e){if(!e||!e.headers){this.completeResolver.fulfill(this.srcEl);return}this.completeResolver.reject(e.headers.status)},this)},this.override))},reconfigure:function(e){this.lang=e.lang,this.theme||(this.theme=e.theme),this.theme=="dark"&&this.classAttr.push("thm-dark"),this.chromeless&&this.classAttr.push("var-chromeless"),this.borderless&&this.classAttr.push("var-borderless"),this.headerless&&this.classAttr.push("var-headerless"),this.footerless&&this.classAttr.push("var-footerless"),this.staticTimeline&&this.classAttr.push("var-static"),!this.linkColor&&e.linkColor&&n.VALID_COLOR.test(e.linkColor)&&(this.linkColor=RegExp.$1),!this.height&&n.VALID_UNIT.test(e.height)&&(this.height=RegExp.$1),this.height=Math.max(this.dimensions.MIN_HEIGHT,this.height?this.height:this.dimensions.DEFAULT_HEIGHT),this.preview&&this.classAttr.push("var-preview"),this.narrow=this.width<=this.dimensions.NARROW_WIDTH,this.narrow&&this.classAttr.push("var-narrow"),this.addSiteStyles()},getTweetDetails:function(e){var t,n={};return t=e&&e.children||[],g.forEach(t,g.bind(function(e){g.aug(n,this.extractTweetScribeDetails(e))},this)),n},baseScribeData:function(){return{widget_id:this.widgetId,widget_origin:o.url(),client_version:E,message:this.partner,query:this.searchQuery,profile_id:this.profileId}},bindInteractions:function(){var e=this,t=this.element,n=!0;this.bindIntentHandlers(),y.delegate(t,"click",".load-tweets",function(t){n&&(n=!1,e.forceLoad(),y.stop(t))}),y.delegate(t,"click",".display-sensitive-image",function(n){e.showNSFW(w.ancestor("."+A,this,t)),y.stop(n)}),y.delegate(t,"mouseover","."+x,function(){e.mouseOver=!0}),y.delegate(t,"mouseout","."+x,function(){e.mouseOver=!1}),y.delegate(t,"mouseover","."+T,function(){e.mouseOverNotifier=!0}),y.delegate(t,"mouseout","."+T,function(){e.mouseOverNotifier=!1,window.setTimeout(function(){e.hideNewTweetNotifier()},3e3)});if(this.staticTimeline)return;y.delegate(t,"click","."+_,function(n){if(n.altKey||n.metaKey||n.shiftKey)return;e.toggleExpando(w.ancestor("."+A,this,t)),y.stop(n)}),y.delegate(t,"click","A",function(e){y.stopPropagation(e)}),y.delegate(t,"click",".with-expansion",function(t){e.toggleExpando(this),y.stop(t)}),y.delegate(t,"click",".load-more",function(){e.loadMore()}),y.delegate(t,"click","."+T,function(){e.scrollToTop(),e.hideNewTweetNotifier(!0)})},scrollToTop:function(){var e=w.one(k,this.element,"DIV");e.scrollTop=0,e.focus()},update:function(){var e=this,t=w.one(L,this.element),n=t&&t.children[0],r=n&&n.getAttribute("data-tweet-id");this.updateTimeStamps(),this.requestTweets(r,!0,function(t){t.childNodes.length>0&&e.insertNewTweets(t)})},loadMore:function(){var e=this,t=w.all(A,this.element,"LI").pop(),n=t&&t.getAttribute("data-tweet-id");this.requestTweets(n,!1,function(t){var r=w.one(H,e.element,"P"),i=t.childNodes[0];r.style.cssText="",i&&i.getAttribute("data-tweet-id")==n&&t.removeChild(i);if(t.childNodes.length>0){e.appendTweets(t);return}b.add(e.element,"no-more"),r.focus()})},forceLoad:function(){var e=this,t=!!w.all(L,this.element,"OL").length;this.requestTweets(1,!0,function(n){n.childNodes.length&&(e[t?"insertNewTweets":"appendTweets"](n),b.add(e.element,"has-tweets"))})},schedulePolling:function(e){var t=this;if(this.pollInterval===null)return;e=twttr.widgets.poll||e||this.pollInterval||1e4,e>-1&&window.setTimeout(function(){this.isUpdating||t.update(),t.schedulePolling()},e)},updateCursors:function(e,t){(t||{}).initial?(this.cursors.maxPosition=e.maxPosition,this.cursors.minPosition=e.minPosition):(t||{}).newer?this.cursors.maxPosition=e.maxPosition||this.cursors.maxPosition:this.cursors.minPosition=e.minPosition||this.cursors.minPosition},requestTweets:function(e,t,n){var r=this,i={id:this.widgetId,instanceId:this.instanceId,screenName:this.widgetScreenName,userId:this.widgetUserId,withReplies:this.widgetShowReplies,dnt:this.dnt,lang:this.lang};t&&this.cursors.maxPosition?i.minPosition=this.cursors.maxPosition:!t&&this.cursors.minPosition?i.maxPosition=this.cursors.minPosition:t?i.sinceId=e:i.maxId=e,i.complete=function(){this.isUpdating=!1},i.error=function(e){if(e&&e.headers){if(e.headers.status=="404"){r.pollInterval=null;return}if(e.headers.status=="503"){r.pollInterval*=1.5;return}}},i.success=function(e){var i=r.sandbox.createDocumentFragment(),s=r.sandbox.createElement("ol"),o,u=[],l;r.updateCursors(e.headers,{newer:t}),e&&e.headers&&e.headers.xPolling&&/\d+/.test(e.headers.xPolling)&&(r.pollInterval=e.headers.xPolling*1e3);if(e&&e.body!==undefined){s.innerHTML=e.body;if(s.children[0]&&s.children[0].tagName!="LI")return;l=r.getTweetDetails(s),g.forIn(l,function(e){u.push(e)}),u.length&&(o=r.baseScribeData(),o.item_ids=u,o.item_details=l,o.event_initiator=t?S.CLIENT_SIDE_APP:S.CLIENT_SIDE_USER,this.timelineType&&f.enqueue({page:this.timelineType+"_timeline",component:"timeline",element:"initial",action:u.length?"results":"no_results"},o,!0,this.dnt),f.enqueue({page:"timeline",component:"timeline",element:t?"newer":"older",action:"results"},o,!0,r.dnt),f.flush()),a.retinize(s),r.constrainMedia(s);while(s.children[0])i.appendChild(s.children[0]);n(i)}},u.timelinePoll(g.aug(i,this.override))},insertNewTweets:function(e){var t=this,n=w.one(k,this.element,"DIV"),r=w.one(L,n,"OL"),i=r.offsetHeight,o;r.insertBefore(e,r.firstChild),o=r.offsetHeight-i,twttr.events.trigger("timelineUpdated",{target:this.sandbox.element(),region:"newer"});if(n.scrollTop>40||this.mouseIsOver()){n.scrollTop=n.scrollTop+o,this.updateTimeStamps(),this.showNewTweetNotifier();return}b.remove(this.element,B),r.style.cssText="margin-top: -"+o+"px",window.setTimeout(function(){n.scrollTop=0,b.add(t.element,B),h.cssTransitions()?r.style.cssText="":s.animate(function(e){e<o?r.style.cssText="margin-top: -"+(o-e)+"px":r.style.cssText=""},o,500,s.easeOut)},500),this.updateTimeStamps(),this.timelineType!="custom"&&this.gcTweets(50)},appendTweets:function(e){var t=w.one(k,this.element,"DIV"),n=w.one(L,t,"OL");n.appendChild(e),this.updateTimeStamps(),twttr.events.trigger("timelineUpdated",{target:this.sandbox.element(),region:"older"})},gcTweets:function(e){var t=w.one(L,this.element,"OL"),n=t.children.length,r;e=e||50;for(;n>e&&(r=t.children[n-1]);n--)t.removeChild(r)},showNewTweetNotifier:function(){var e=this,t=w.one(T,this.element,"DIV"),n=t.children[0];t.style.cssText="",t.removeChild(n),t.appendChild(n),b.add(this.element,F),window.setTimeout(function(){b.add(e.element,j)},10),this.newNoticeDisplayTime=+(new Date),window.setTimeout(function(){e.hideNewTweetNotifier()},5e3)},hideNewTweetNotifier:function(e){var t=this;if(!e&&this.mouseOverNotifier)return;b.remove(this.element,j),window.setTimeout(function(){b.remove(t.element,F)},500)},augmentWidgets:function(e){var t=w.one(P,e,"A");if(!t)return;t.setAttribute("data-related",this.related),t.setAttribute("data-partner",this.partner),t.setAttribute("data-dnt",this.dnt),t.setAttribute("data-search-query",this.searchQuery),t.setAttribute("data-profile-id",this.profileId),this.width<250&&t.setAttribute("data-show-screen-name","false"),twttr.widgets.load(t.parentNode)},discardStaticOverflow:function(e){var t=w.one(L,e,"OL"),n;if(this.staticTimeline){this.height=0;while(n=t.children[this.tweetLimit])t.removeChild(n)}},hideStreamScrollBar:function(){var e=w.one(k,this.element,"DIV"),t=w.one(L,this.element,"OL"),n;e.style.width="",n=this.element.offsetWidth-t.offsetWidth,n>0&&(e.style.width=this.element.offsetWidth+n+"px")},readTranslations:function(){var e=this.element,t="data-dt-";this.datetime=new r(g.compact({phrases:{now:e.getAttribute(t+"now"),s:e.getAttribute(t+"s"),m:e.getAttribute(t+"m"),h:e.getAttribute(t+"h"),second:e.getAttribute(t+"second"),seconds:e.getAttribute(t+"seconds"),minute:e.getAttribute(t+"minute"),minutes:e.getAttribute(t+"minutes"),hour:e.getAttribute(t+"hour"),hours:e.getAttribute(t+"hours")},months:e.getAttribute(t+"months").split("|"),formats:{abbr:e.getAttribute(t+"abbr"),shortdate:e.getAttribute(t+"short"),longdate:e.getAttribute(t+"long")}}))},updateTimeStamps:function(){var e=w.all(D,this.element,"A"),t,n,r=0,i,s;for(;t=e[r];r++){i=t.getAttribute("data-datetime"),s=i&&this.datetime.timeAgo(i,this.i18n),n=t.getElementsByTagName("TIME")[0];if(!s)continue;if(n&&n.innerHTML){n.innerHTML=s;continue}t.innerHTML=s}},mouseIsOver:function(){return this.mouseOver},addUrlParams:function(e){var t=this,n={tw_w:this.widgetId,related:this.related,partner:this.partner,query:this.searchQuery,profile_id:this.profileId,original_referer:o.url(),tw_p:"embeddedtimeline"};return this.addUrlParams=l(n,function(e){var n=w.ancestor("."+A,e,t.element);return n&&{tw_i:n.getAttribute("data-tweet-id")}}),this.addUrlParams(e)},showNSFW:function(e){var t=w.one("nsfw",e,"DIV"),n,r,i=0,s,o,u,f;if(!t)return;r=a.scaleDimensions(t.getAttribute("data-width"),t.getAttribute("data-height"),this.contentWidth(),t.getAttribute("data-height")),n=!!(o=t.getAttribute("data-player")),n?u=this.sandbox.createElement("iframe"):(u=this.sandbox.createElement("img"),o=t.getAttribute(h.retina()?"data-image-2x":"data-image"),u.alt=t.getAttribute("data-alt"),f=this.sandbox.createElement("a"),f.href=t.getAttribute("data-href"),f.appendChild(u)),u.title=t.getAttribute("data-title"),u.src=o,u.width=r.width,u.height=r.height,s=w.ancestor("."+M,t,e),i=r.height-t.offsetHeight,t.parentNode.replaceChild(n?u:f,t),s.style.cssText="height:"+(s.offsetHeight+i)+"px"},toggleExpando:function(e){var n=w.one(M,e,"DIV"),r=n&&n.children[0],i=r&&r.getAttribute("data-expanded-media"),s,o=0,u=w.one(_,e,"A"),f=u&&u.getElementsByTagName("B")[0],l=f&&(f.innerText||f.textContent),c;if(!f)return;this.layout(function(){f.innerHTML=u.getAttribute("data-toggled-text"),u.setAttribute("data-toggled-text",l)});if(b.present(e,O)){this.layout(function(){b.remove(e,O)});if(!n){t.doLayout();return}this.layout(function(){n.style.cssText="",r.innerHTML=""}),t.doLayout();return}i&&(s=this.sandbox.createElement("DIV"),s.innerHTML=i,a.retinize(s),o=this.constrainMedia(s),this.layout(function(){r.appendChild(s)})),n&&this.layout(function(){c=Math.max(r.offsetHeight,o),n.style.cssText="height:"+c+"px"}),this.layout(function(){b.add(e,O)}),t.doLayout()},recalculateStreamHeight:function(e){var t=w.one(N,this.element,"DIV"),n=w.one(C,this.element,"DIV"),r=w.one(k,this.element,"DIV");this.layout(g.bind(function(){var i=t.offsetHeight+(n?n.offsetHeight:0),s=e||this.sandbox.height();r.style.cssText="height:"+(s-i-2)+"px",this.noscrollbar&&this.hideStreamScrollBar()},this))},handleResize:function(e,n){var r=Math.min(this.dimensions.DEFAULT_WIDTH,Math.max(this.dimensions.MIN_WIDTH,Math.min(this.predefinedWidth||this.dimensions.DEFAULT_WIDTH,e)));if(r==this.width&&n==this.height)return;this.width=r,this.height=n,this.setNarrow(),this.constrainMedia(this.element,this.contentWidth(r)),this.staticTimeline?this.layout(g.bind(function(){this.height=this.element.offsetHeight,this.sandbox.height(this.height),twttr.events.trigger("resize",{target:this.sandbox.element()})},this)):(this.recalculateStreamHeight(n),twttr.events.trigger("resize",{target:this.sandbox.element()})),t.doLayoutAsync()}}),e(q)})}); provide("tfw/widget/embed",function(e){using("tfw/widget/base","tfw/widget/syndicatedbase","util/datetime","tfw/util/params","dom/classname","dom/get","util/env","util/promise","util/util","util/throttle","util/twitter","tfw/util/article","tfw/util/data","tfw/util/tracking","tfw/util/media",function(t,n,r,i,s,o,u,a,f,l,c,h,p,d,v){function E(e,t,n,r){var i=o.one("subject",e,"BLOCKQUOTE"),s=o.one("reply",e,"BLOCKQUOTE"),u=i&&i.getAttribute("data-tweet-id"),a=s&&s.getAttribute("data-tweet-id"),l={},c={};if(!u)return;l[u]={item_type:0},d.enqueue({page:"tweet",section:"subject",component:"tweet",action:"results"},f.aug({},t,{item_ids:[u],item_details:l}),!0,r);if(!a)return;c[a]={item_type:0},d.enqueue({page:"tweet",section:"conversation",component:"tweet",action:"results"},f.aug({},t,{item_ids:[a],item_details:c,associations:{4:{association_id:u,association_type:4}}}),!0,r)}function S(e,t,n){var r={};if(!e)return;r[e]={item_type:0},d.enqueue({page:"tweet",section:"subject",component:"rawembedcode",action:"no_results"},{client_version:m,widget_origin:h.url(),widget_frame:h.frameUrl(),message:t,item_ids:[e],item_details:r},!0,n)}function x(e,t,n,r){y[e]=y[e]||[],y[e].push({s:n,f:r,lang:t})}function T(){w.length&&twttr.widgets.load(w)}function N(e){if(!e)return;var t,r,i;n.apply(this,[e]),t=this.params(),r=this.srcEl&&this.srcEl.getElementsByTagName("A"),i=r&&r[r.length-1],this.hideThread=(t.conversation||this.dataAttr("conversation"))=="none"||~f.indexOf(this.classAttr,"tw-hide-thread"),this.hideCard=(t.cards||this.dataAttr("cards"))=="hidden"||~f.indexOf(this.classAttr,"tw-hide-media");if((t.align||this.attr("align"))=="left"||~f.indexOf(this.classAttr,"tw-align-left"))this.align="left";else if((t.align||this.attr("align"))=="right"||~f.indexOf(this.classAttr,"tw-align-right"))this.align="right";else if((t.align||this.attr("align"))=="center"||~f.indexOf(this.classAttr,"tw-align-center"))this.align="center",this.containerWidth>this.dimensions.MIN_WIDTH*(1/.7)&&this.width>this.containerWidth*.7&&(this.width=this.containerWidth*.7);this.narrow=t.narrow||this.width<=this.dimensions.NARROW_WIDTH,this.narrow&&this.classAttr.push("var-narrow"),this.tweetId=t.tweetId||i&&c.status(i.href)}var m="2.0",g="tweetembed",y={},b=[],w=[];N.prototype=new n,f.aug(N.prototype,{renderedClassNames:"twitter-tweet twitter-tweet-rendered",dimensions:{DEFAULT_HEIGHT:"0",DEFAULT_WIDTH:"500",NARROW_WIDTH:"350",MIN_WIDTH:"220",MIN_HEIGHT:"0",WIDE_MEDIA_PADDING:32,NARROW_MEDIA_PADDING:32},create:function(e){var t=this.sandbox.createElement("div"),n,r;t.innerHTML=e,n=t.children[0]||!1;if(!n)return;return this.theme=="dark"&&this.classAttr.push("thm-dark"),this.linkColor&&this.addSiteStyles(),s.present(n,"media-forward")&&(this.fullBleedPhoto=!0),this.augmentWidgets(n),v.retinize(n),n.id=this.id,n.className+=" "+this.classAttr.join(" "),n.lang=this.lang,this.sandbox.setTitle(n.getAttribute("data-iframe-title")||"Tweet"),this.sandbox.appendChild(n).then(f.bind(function(){this.renderResolver.fulfill(this.sandbox)},this)),this.sandbox.style({cssText:"",display:"block",maxWidth:"99%",minWidth:this.dimensions.MIN_WIDTH+"px",padding:"0",borderRadius:"5px",margin:"10px 0",border:"#ddd 1px solid",borderTopColor:"#eee",borderBottomColor:"#bbb",boxShadow:"0 1px 3px rgba(0,0,0,0.15)",position:"absolute",visibility:"hidden"}),r=this.layout(f.bind(function(){this.predefinedWidth=this.width,this.width=this.sandbox.width(this.width),this.collapseRegions()},this),"Insert Sandbox"),r.then(f.bind(function(){this.constrainMedia(n,this.contentWidth(this.width)),this.setNarrow().then(f.bind(function(){this.layout(f.bind(function(){this.completeResolver.fulfill(this.sandbox.element())},this))},this))},this)),E(n,this.baseScribeData(),this.partner,this.dnt),n},render:function(e,n){var r="",i=this.tweetId;return i?(this.hideCard&&(r+="c"),this.hideThread&&(r+="t"),r&&(i+="-"+r),this.rendered().then(f.bind(function(e){this.srcEl&&this.srcEl.parentNode&&this.layout(f.bind(function(){this.srcEl&&this.srcEl.parentNode&&this.srcEl.parentNode.removeChild(this.srcEl)},this),"Remove Embed Code"),this.align=="center"?e.style({margin:"7px auto",cssFloat:"none"}):this.align&&(this.width==this.dimensions.DEFAULT_WIDTH&&(this.predefinedWidth=this.width=this.dimensions.NARROW_WIDTH),e.style({cssFloat:this.align})),this.layout(f.bind(function(){this.height=this.sandbox.height(this.element.offsetHeight)},this)).then(f.bind(function(){return t.doLayoutAsync(),this.layout(f.bind(function(){this.height=this.sandbox.height(this.element.offsetHeight)},this))},this)).then(f.bind(function(){e.onresize(f.bind(this.handleResize,this))},this)),e.style({position:"static",visibility:"visible"}),t.doLayoutAsync()},this)),x(i,this.lang,f.bind(function(n){this.ready().then(f.bind(function(){this.element=this.create(n),this.readTimestampTranslations(),this.updateTimeStamps(),this.bindIntentHandlers(),t.doLayoutAsync()},this))},this),f.bind(function(){S(this.tweetId,this.partner,this.dnt),this.completeResolver.fulfill(this.srcEl)},this)),b.push(this.rendered()),n&&this.completed().then(n),this.completed()):(this.completeResolver.fulfill(this.srcEl),this.completed())},augmentWidgets:function(e){var t=o.one("twitter-follow-button",e,"A");if(!t)return;t.setAttribute("data-related",this.related),t.setAttribute("data-partner",this.partner),t.setAttribute("data-dnt",this.dnt),t.setAttribute("data-show-screen-name","false"),w.push(t.parentNode)},addUrlParams:function(e){var t=this,n={related:this.related,partner:this.partner,original_referer:h.url(),tw_p:g};return this.addUrlParams=i(n,function(e){var n=o.ancestor(".tweet",e,t.element);return{tw_i:n.getAttribute("data-tweet-id")}}),this.addUrlParams(e)},baseScribeData:function(){return{client_version:m,widget_origin:h.url(),widget_frame:h.frameUrl(),message:this.partner}},handleResize:function(e){if(e==this.width)return;this.width=e,this.setNarrow(),this.constrainMedia(this.element,this.contentWidth(e)),this.collapseRegions(),this.layout(f.bind(function(){this.height=this.sandbox.height(this.element.offsetHeight),twttr.events.trigger("resize",{target:this.sandbox.element()})},this)),t.doLayoutAsync()},readTimestampTranslations:function(){var e=this.element,t="data-dt-",n=e.getAttribute(t+"months")||"";this.datetime=new r(f.compact({phrases:{AM:e.getAttribute(t+"am"),PM:e.getAttribute(t+"pm")},months:n.split("|"),formats:{full:e.getAttribute(t+"full")}}))},updateTimeStamps:function(){var e=o.one("long-permalink",this.element,"A"),n=e.getAttribute("data-datetime"),r=n&&this.datetime.localTimeStamp(n),i=e.getElementsByTagName("TIME")[0];if(!r)return;this.layout(function(){if(i&&i.innerHTML){i.innerHTML=r;return}e.innerHTML=r},"Update Timestamp"),t.doLayoutAsync()}}),N.fetchAndRender=function(){var e=y,n=[],r,i;y={};if(e.keys)n=e.keys();else for(r in e)e.hasOwnProperty(r)&&n.push(r);if(!n.length)return;d.initPostLogging(),i=e[n[0]][0].lang,p.tweets({ids:n.sort(),lang:i,complete:function(n){f.forIn(n,function(t,n){var r=e[t];f.forEach(r,function(e){e.s&&e.s.call(this,n)}),delete e[t]}),t.doLayout(),f.forIn(e,function(e,t){f.forEach(t,function(t){t.f&&t.f.call(this,e)})}),t.doLayout()}}),a.every.apply(null,b).then(function(){T(),d.flush()})},t.afterLoad(N.fetchAndRender),e(N)})}); provide("dom/textsize",function(e){function n(e,t,n){var r=[],i=0,s;for(;s=n[i];i++)r.push(s[0]),r.push(s[1]);return e+t+r.join(":")}function r(e){var t=e||"";return t.replace(/([A-Z])/g,function(e){return"-"+e.toLowerCase()})}var t={};e(function(e,i,s){var o=document.createElement("span"),u={},a="",f,l=0,c=0,h=[];s=s||[],i=i||"",a=n(e,i,s);if(t[a])return t[a];o.className=i+" twitter-measurement";try{for(;f=s[l];l++)o.style[f[0]]=f[1]}catch(p){for(;f=s[c];c++)h.push(r(f[0])+":"+f[1]);o.setAttribute("style",h.join(";")+";")}return o.innerHTML=e,document.body.appendChild(o),u.width=o.clientWidth||o.offsetWidth,u.height=o.clientHeight||o.offsetHeight,document.body.removeChild(o),o=null,t[a]=u})}); provide("tfw/widget/follow",function(e){using("util/util","tfw/widget/base","util/querystring","util/uri","util/twitter","util/promise","dom/textsize",function(t,n,r,i,s,o,u){function a(e){if(!e)return;var t,r,i,o;n.apply(this,[e]),t=this.params(),r=t.size||this.dataAttr("size"),i=t.showScreenName||this.dataAttr("show-screen-name"),o=t.count||this.dataAttr("count"),this.classAttr.push("twitter-follow-button"),this.showScreenName=i!="false",this.showCount=t.showCount!==!1&&this.dataAttr("show-count")!="false",o=="none"&&(this.showCount=!1),this.explicitWidth=t.width||this.dataAttr("width")||"",this.screenName=t.screen_name||t.screenName||s.screenName(this.attr("href")),this.preview=t.preview||this.dataAttr("preview")||"",this.align=t.align||this.dataAttr("align")||"",this.size=r=="large"?"l":"m"}a.prototype=new n,t.aug(a.prototype,{parameters:function(){var e={screen_name:this.screenName,lang:this.lang,show_count:this.showCount,show_screen_name:this.showScreenName,align:this.align,id:this.id,preview:this.preview,size:this.size,partner:this.partner,dnt:this.dnt,_:+(new Date)};return t.compact(e),r.encode(e)},width:function(){if(this.calculatedWidth)return this.calculatedWidth;if(this.explicitWidth)return this.explicitWidth;var e={cnt:13,btn:24,xlcnt:22,xlbtn:38},n=this.showScreenName?"Follow %{screen_name}":"Follow",r=this._(n,{screen_name:"@"+this.screenName}),i=~t.indexOf(["ja","ko"],this.lang)?this._("10k unit"):this._("M"),s=this._("%{followers_count} followers",{followers_count:"88888"+i}),o=0,a=0,f,l,c=this.styles.base;return this.size=="l"?(c=c.concat(this.styles.large),f=e.xlbtn,l=e.xlcnt):(f=e.btn,l=e.cnt),this.showCount&&(a=u(s,"",c).width+l),o=u(r,"",c.concat(this.styles.button)).width+f,this.calculatedWidth=o+a},render:function(e,n){if(!this.screenName)return o.reject("Missing Screen Name").then(n);var r=twttr.widgets.config.assetUrl()+"/widgets/follow_button.1409790579.html#"+this.parameters(),i=this.create(r,this.dimensions(),{title:this._("Twitter Follow Button")}).then(t.bind(function(e){return this.element=e},this));return n&&i.then(n),i}}),e(a)})}); provide("tfw/widget/tweetbutton",function(e){using("tfw/widget/base","tfw/util/globals","util/util","util/querystring","util/uri","util/twitter","util/typevalidator","dom/textsize",function(t,n,r,i,s,o,u,a){function p(e){t.apply(this,[e]);var i=this.params(),u=i.count||this.dataAttr("count"),a=i.size||this.dataAttr("size"),p=s.getScreenNameFromPage(),d=""+(i.shareWithRetweet||this.dataAttr("share-with-retweet")||n.val("share-with-retweet"));this.classAttr.push("twitter-tweet-button"),i.type=="hashtag"||~r.indexOf(this.classAttr,"twitter-hashtag-button")?(this.type="hashtag",this.classAttr.push("twitter-hashtag-button")):i.type=="mention"||~r.indexOf(this.classAttr,"twitter-mention-button")?(this.type="mention",this.classAttr.push("twitter-mention-button")):this.classAttr.push("twitter-share-button"),this.text=i.text||this.dataAttr("text"),this.text&&/\+/.test(this.text)&&!/ /.test(this.text)&&(this.text=this.text.replace(/\+/g," ")),this.counturl=i.counturl||this.dataAttr("counturl"),this.searchlink=i.searchlink||this.dataAttr("searchlink"),this.button_hashtag=o.hashTag(i.button_hashtag||i.hashtag||this.dataAttr("button-hashtag"),!1),this.size=a=="large"?"l":"m",this.align=i.align||this.dataAttr("align")||"",this.via=i.via||this.dataAttr("via"),this.hashtags=i.hashtags||this.dataAttr("hashtags"),this.screen_name=o.screenName(i.screen_name||i.screenName||this.dataAttr("button-screen-name")),this.url=i.url||this.dataAttr("url"),this.type?(this.count="none",this.shareWithRetweet="never",p&&(this.related=this.related?p+","+this.related:p)):(this.text=this.text||f,this.url=this.url||s.getCanonicalURL()||l,this.count=~r.indexOf(c,u)?u:"horizontal",this.count=this.count=="vertical"&&this.size=="l"?"none":this.count,this.via=this.via||p,d&&~r.indexOf(h,d)&&(this.shareWithRetweet=d.replace("-","_")))}var f=document.title,l=encodeURI(location.href),c=["vertical","horizontal","none"],h=[,"never","publisher-first","publisher-only","author-first","author-only"];p.prototype=new t,r.aug(p.prototype,{widgetUrlParams:function(){return r.compact({text:this.text,url:this.url,via:this.via,related:this.related,count:this.count,lang:this.lang,counturl:this.counturl,searchlink:this.searchlink,placeid:this.placeid,original_referer:location.href,id:this.id,size:this.size,type:this.type,screen_name:this.screen_name,share_with_retweet:this.shareWithRetweet,button_hashtag:this.button_hashtag,hashtags:this.hashtags,align:this.align,partner:this.partner,dnt:this.dnt,_:+(new Date)})},parameters:function(){return i.encode(this.widgetUrlParams())},height:function(){return this.count=="vertical"?62:this.size=="m"?20:28},width:function(){var e={ver:8,cnt:14,btn:24,xlcnt:18,xlbtn:38},t=this.count=="vertical",n=this.type=="hashtag"&&this.button_hashtag?"Tweet %{hashtag}":this.type=="mention"&&this.screen_name?"Tweet to %{name}":"Tweet",i=this._(n,{name:"@"+this.screen_name,hashtag:"#"+this.button_hashtag}),s=this._("K"),o=this._("100K+"),u=(t?"8888":"88888")+s,f=0,l=0,c=0,h=0,p=this.styles.base,d=p;return~r.indexOf(["ja","ko"],this.lang)?u+=this._("10k unit"):u=u.length>o.length?u:o,t?(d=p.concat(this.styles.vbubble),h=e.ver,c=e.btn):this.size=="l"?(p=d=p.concat(this.styles.large),c=e.xlbtn,h=e.xlcnt):(c=e.btn,h=e.cnt),this.count!="none"&&(l=a(u,"",d).width+h),f=a(i,"",p.concat(this.styles.button)).width+c,t?f>l?f:l:this.calculatedWidth=f+l},render:function(e,t){var n=twttr.widgets.config.assetUrl()+"/widgets/tweet_button.1409790579.html#"+this.parameters(),i;return this.count&&this.classAttr.push("twitter-count-"+this.count),i=this.create(n,this.dimensions(),{title:this._("Twitter Tweet Button")}).then(r.bind(function(e){return this.element=e},this)),t&&i.then(t),i}}),e(p)})}); provide("tfw/factories",function(e){using("util/util","util/promise","util/twitter","tfw/widget/base","tfw/widget/tweetbutton","tfw/widget/follow","tfw/widget/embed","tfw/widget/timeline",function(t,n,r,i,s,o,u,a){function f(e,r,s,o){return e=e||[],s=s||{},function(){var u,a,f,l=Array.prototype.slice.apply(arguments,[0,e.length]),c=Array.prototype.slice.apply(arguments,[e.length]),h;return t.forEach(c,function(e){if(!e)return;if(e.nodeType===1){f=e;return}if(t.isType("function",e)){u=e;return}t.isType("object",e)&&(a=e)}),l.length!=e.length||c.length===0?(u&&t.async(function(){u(!1)}),n.reject("Not enough parameters")):f?(a=t.aug(a||{},s),a.targetEl=f,t.forEach(e,function(e){a[e]=l.shift()}),h=new r(a),i.doLayout(),h.render(twttr.widgets.config),o&&o(),u&&h.completed().then(u,function(){u(!1)}),h.completed()):(u&&t.async(function(){u(!1)}),n.reject("No target specified"))}}function l(e){var n;e.linkColor=e.linkColor||e.previewParams.link_color,e.theme=e.theme||e.previewParams.theme,e.height=e.height||e.previewParams.height,n=new a(e),this.render=t.bind(n.render,n),this.completed=t.bind(n.completed,n)}var c=f(["url"],s,{type:"share"}),h=f(["hashtag"],s,{type:"hashtag"}),p=f(["screenName"],s,{type:"mention"}),d=f(["screenName"],o),v=f(["tweetId"],u,{},u.fetchAndRender),m=f(["widgetId"],a),g=f(["previewParams"],l),y={createShareButton:c,createMentionButton:p,createHashtagButton:h,createFollowButton:d,createTweet:v,createTweetEmbed:v,createTimeline:m};r.isTwitterURL(window.location.href)&&(y.createTimelinePreview=g),e(y)})}); !function(){window.twttr=window.twttr||{},twttr.host=twttr.host||"platform.twitter.com",using("util/domready","util/env","util/logger",function(e,t,n){function r(e){return(e||!/^http\:$/.test(window.location.protocol))&&!twttr.ignoreSSL?"https":"http"}if(t.ie6())return;if(twttr.widgets&&twttr.widgets.loaded)return twttr.widgets.load(),!1;if(twttr.init)return!1;twttr.init=!0,twttr._e=twttr._e||[],twttr.ready=twttr.ready||function(e){twttr.widgets&&twttr.widgets.loaded?e(twttr):twttr._e.push(e)},using.path.length||(using.path=r()+"://"+twttr.host+"/js"),twttr.ignoreSSL=twttr.ignoreSSL||!1;var i=[];twttr.events={bind:function(e,t){return i.push([e,t])}},e(function(){using("tfw/widget/base","tfw/widget/follow","tfw/widget/tweetbutton","tfw/widget/embed","tfw/widget/timeline","tfw/widget/intent","tfw/factories","tfw/util/article","util/events","util/util",function(e,t,s,o,u,a,f,l,c,h){function m(e){var t=twttr.host;return r(e)=="https"&&twttr.secureHost&&(t=twttr.secureHost),r(e)+"://"+t}function g(){using("tfw/hub/client",function(e){twttr.events.hub=e.init(p),e.init(p,!0)})}var p={widgets:{"a.twitter-share-button":s,"a.twitter-mention-button":s,"a.twitter-hashtag-button":s,"a.twitter-follow-button":t,"blockquote.twitter-tweet":o,"a.twitter-timeline":u,"div.twitter-timeline":u,body:a}},d=twttr.events&&twttr.events.hub?twttr.events:{},v;p.assetUrl=m,twttr.widgets=twttr.widgets||{},h.aug(twttr.widgets,f,{config:{assetUrl:m},load:function(t){n.time("load"),e.init(p),e.embed(t),twttr.widgets.loaded=!0}}),h.aug(twttr.events,d,c.Emitter),v=twttr.events.bind,twttr.events.bind=function(e,t){g(),this.bind=v,this.bind(e,t)},h.forEach(i,function(e){twttr.events.bind(e[0],e[1])}),h.forEach(twttr._e,function(e){h.async(function(){e(twttr)})}),twttr.ready=function(e){h.async(function(){e(twttr)})},twttr.widgets.load()})})})}()});
(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[8313],{11965:function(Te,G,k){"use strict";k.d(G,{Z:function(){return H}});var v=k(82961);function H(p,E){var l=typeof Symbol!="undefined"&&p[Symbol.iterator]||p["@@iterator"];if(!l){if(Array.isArray(p)||(l=(0,v.Z)(p))||E&&p&&typeof p.length=="number"){l&&(p=l);var U=0,w=function(){};return{s:w,n:function(){return U>=p.length?{done:!0}:{done:!1,value:p[U++]}},e:function(N){throw N},f:w}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var T=!0,_=!1,$;return{s:function(){l=l.call(p)},n:function(){var N=l.next();return T=N.done,N},e:function(N){_=!0,$=N},f:function(){try{!T&&l.return!=null&&l.return()}finally{if(_)throw $}}}}},97435:function(Te,G){"use strict";function k(v,H){for(var p=Object.assign({},v),E=0;E<H.length;E+=1){var l=H[E];delete p[l]}return p}G.Z=k},29405:function(Te,G,k){"use strict";k.d(G,{J$:function(){return lt},ZP:function(){return vt},kY:function(){return Pe}});var v=k(67294);/*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */function H(e,i,t,a){function n(r){return r instanceof t?r:new t(function(f){f(r)})}return new(t||(t=Promise))(function(r,f){function c(s){try{u(a.next(s))}catch(h){f(h)}}function m(s){try{u(a.throw(s))}catch(h){f(h)}}function u(s){s.done?r(s.value):n(s.value).then(c,m)}u((a=a.apply(e,i||[])).next())})}function p(e,i){var t={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},a,n,r,f;return f={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(f[Symbol.iterator]=function(){return this}),f;function c(u){return function(s){return m([u,s])}}function m(u){if(a)throw new TypeError("Generator is already executing.");for(;t;)try{if(a=1,n&&(r=u[0]&2?n.return:u[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,u[1])).done)return r;switch(n=0,r&&(u=[u[0]&2,r.value]),u[0]){case 0:case 1:r=u;break;case 4:return t.label++,{value:u[1],done:!1};case 5:t.label++,n=u[1],u=[0];continue;case 7:u=t.ops.pop(),t.trys.pop();continue;default:if(r=t.trys,!(r=r.length>0&&r[r.length-1])&&(u[0]===6||u[0]===2)){t=0;continue}if(u[0]===3&&(!r||u[1]>r[0]&&u[1]<r[3])){t.label=u[1];break}if(u[0]===6&&t.label<r[1]){t.label=r[1],r=u;break}if(r&&t.label<r[2]){t.label=r[2],t.ops.push(u);break}r[2]&&t.ops.pop(),t.trys.pop();continue}u=i.call(e,t)}catch(s){u=[6,s],n=0}finally{a=r=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}var E=function(){},l=E(),U=Object,w=function(e){return e===l},T=function(e){return typeof e=="function"},_=function(e,i){return U.assign({},e,i)},$="undefined",I=function(){return typeof window!=$},N=function(){return typeof document!=$},Ze=function(){return I()&&typeof window.requestAnimationFrame!=$},ue=new WeakMap,$e=0,Y=function(e){var i=typeof e,t=e&&e.constructor,a=t==Date,n,r;if(U(e)===e&&!a&&t!=RegExp){if(n=ue.get(e),n)return n;if(n=++$e+"~",ue.set(e,n),t==Array){for(n="@",r=0;r<e.length;r++)n+=Y(e[r])+",";ue.set(e,n)}if(t==U){n="#";for(var f=U.keys(e).sort();!w(r=f.pop());)w(e[r])||(n+=r+":"+Y(e[r])+",");ue.set(e,n)}}else n=a?e.toJSON():i=="symbol"?e.toString():i=="string"?JSON.stringify(e):""+e;return n},le=!0,ze=function(){return le},Oe=I(),ve=N(),de=Oe&&window.addEventListener?window.addEventListener.bind(window):E,Be=ve?document.addEventListener.bind(document):E,he=Oe&&window.removeEventListener?window.removeEventListener.bind(window):E,Ge=ve?document.removeEventListener.bind(document):E,Ye=function(){var e=ve&&document.visibilityState;return w(e)||e!=="hidden"},Qe=function(e){return Be("visibilitychange",e),de("focus",e),function(){Ge("visibilitychange",e),he("focus",e)}},Xe=function(e){var i=function(){le=!0,e()},t=function(){le=!1};return de("online",i),de("offline",t),function(){he("online",i),he("offline",t)}},et={isOnline:ze,isVisible:Ye},tt={initFocus:Qe,initReconnect:Xe},oe=!I()||"Deno"in window,rt=function(e){return Ze()?window.requestAnimationFrame(e):setTimeout(e,1)},Q=oe?v.useEffect:v.useLayoutEffect,me=typeof navigator!="undefined"&&navigator.connection,De=!oe&&me&&(["slow-2g","2g"].includes(me.effectiveType)||me.saveData),be=function(e){if(T(e))try{e=e()}catch(a){e=""}var i=[].concat(e);e=typeof e=="string"?e:(Array.isArray(e)?e.length:e)?Y(e):"";var t=e?"$swr$"+e:"";return[e,i,t]},j=new WeakMap,Ie=0,Ae=1,Ve=2,X=function(e,i,t,a,n,r,f){f===void 0&&(f=!0);var c=j.get(e),m=c[0],u=c[1],s=c[3],h=m[i],d=u[i];if(f&&d)for(var x=0;x<d.length;++x)d[x](t,a,n);return r&&(delete s[i],h&&h[0])?h[0](Ve).then(function(){return e.get(i)}):e.get(i)},nt=0,we=function(){return++nt},We=function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];return H(void 0,void 0,void 0,function(){var t,a,n,r,f,c,m,u,s,h,d,x,fe,g,b,o,ee,K,M,A,q;return p(this,function(L){switch(L.label){case 0:if(t=e[0],a=e[1],n=e[2],r=e[3],f=typeof r=="boolean"?{revalidate:r}:r||{},c=w(f.populateCache)?!0:f.populateCache,m=f.revalidate!==!1,u=f.rollbackOnError!==!1,s=f.optimisticData,h=be(a),d=h[0],x=h[2],!d)return[2];if(fe=j.get(t),g=fe[2],e.length<3)return[2,X(t,d,t.get(d),l,l,m,!0)];if(b=n,ee=we(),g[d]=[ee,0],K=!w(s),M=t.get(d),K&&(A=T(s)?s(M):s,t.set(d,A),X(t,d,A)),T(b))try{b=b(t.get(d))}catch(J){o=J}return b&&T(b.then)?[4,b.catch(function(J){o=J})]:[3,2];case 1:if(b=L.sent(),ee!==g[d][0]){if(o)throw o;return[2,b]}else o&&K&&u&&(c=!0,b=M,t.set(d,M));L.label=2;case 2:return c&&(o||(T(c)&&(b=c(b,M)),t.set(d,b)),t.set(x,_(t.get(x),{error:o}))),g[d][1]=we(),[4,X(t,d,b,o,l,m,!!c)];case 3:if(q=L.sent(),o)throw o;return[2,c?q:b]}})})},xe=function(e,i){for(var t in e)e[t][0]&&e[t][0](i)},Me=function(e,i){if(!j.has(e)){var t=_(tt,i),a={},n=We.bind(l,e),r=E;if(j.set(e,[a,{},{},{},n]),!oe){var f=t.initFocus(setTimeout.bind(l,xe.bind(l,a,Ie))),c=t.initReconnect(setTimeout.bind(l,xe.bind(l,a,Ae)));r=function(){f&&f(),c&&c(),j.delete(e)}}return[e,n,r]}return[e,j.get(e)[4]]},at=function(e,i,t,a,n){var r=t.errorRetryCount,f=n.retryCount,c=~~((Math.random()+.5)*(1<<(f<8?f:8)))*t.errorRetryInterval;!w(r)&&f>r||setTimeout(a,c,n)},Fe=Me(new Map),Ue=Fe[0],it=Fe[1],Ne=_({onLoadingSlow:E,onSuccess:E,onError:E,onErrorRetry:at,onDiscarded:E,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:De?1e4:5e3,focusThrottleInterval:5*1e3,dedupingInterval:2*1e3,loadingTimeout:De?5e3:3e3,compare:function(e,i){return Y(e)==Y(i)},isPaused:function(){return!1},cache:Ue,mutate:it,fallback:{}},et),Le=function(e,i){var t=_(e,i);if(i){var a=e.use,n=e.fallback,r=i.use,f=i.fallback;a&&r&&(t.use=a.concat(r)),n&&f&&(t.fallback=_(n,f))}return t},pe=(0,v.createContext)({}),ut=function(e){var i=e.value,t=Le((0,v.useContext)(pe),i),a=i&&i.provider,n=(0,v.useState)(function(){return a?Me(a(t.cache||Ue),i):l})[0];return n&&(t.cache=n[0],t.mutate=n[1]),Q(function(){return n?n[2]:l},[]),(0,v.createElement)(pe.Provider,_(e,{value:t}))},ot=function(e,i){var t=(0,v.useState)({})[1],a=(0,v.useRef)(e),n=(0,v.useRef)({data:!1,error:!1,isValidating:!1}),r=(0,v.useCallback)(function(f){var c=!1,m=a.current;for(var u in f){var s=u;m[s]!==f[s]&&(m[s]=f[s],n.current[s]&&(c=!0))}c&&!i.current&&t({})},[]);return Q(function(){a.current=e}),[a,n.current,r]},ft=function(e){return T(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(e[1]===null?e[2]:e[1])||{}]},Pe=function(){return _(Ne,(0,v.useContext)(pe))},st=function(e){return function(){for(var t=[],a=0;a<arguments.length;a++)t[a]=arguments[a];var n=Pe(),r=ft(t),f=r[0],c=r[1],m=r[2],u=Le(n,m),s=e,h=u.use;if(h)for(var d=h.length;d-- >0;)s=h[d](s);return s(f,c||u.fetcher,u)}},ke=function(e,i,t){var a=i[e]||(i[e]=[]);return a.push(t),function(){var n=a.indexOf(t);n>=0&&(a[n]=a[a.length-1],a.pop())}},Ee={dedupe:!0},ct=function(e,i,t){var a=t.cache,n=t.compare,r=t.fallbackData,f=t.suspense,c=t.revalidateOnMount,m=t.refreshInterval,u=t.refreshWhenHidden,s=t.refreshWhenOffline,h=j.get(a),d=h[0],x=h[1],fe=h[2],g=h[3],b=be(e),o=b[0],ee=b[1],K=b[2],M=(0,v.useRef)(!1),A=(0,v.useRef)(!1),q=(0,v.useRef)(o),L=(0,v.useRef)(i),J=(0,v.useRef)(t),y=function(){return J.current},ye=function(){return y().isVisible()&&y().isOnline()},se=function(O){return a.set(K,_(a.get(K),O))},He=a.get(o),dt=w(r)?t.fallback[o]:r,F=w(He)?dt:He,je=a.get(K)||{},te=je.error,Ke=!M.current,qe=function(){return Ke&&!w(c)?c:y().isPaused()?!1:f?w(F)?!1:t.revalidateIfStale:w(F)||t.revalidateIfStale},ht=function(){return!o||!i?!1:je.isValidating?!0:Ke&&qe()},Re=ht(),_e=ot({data:F,error:te,isValidating:Re},A),z=_e[0],ge=_e[1],ce=_e[2],Z=(0,v.useCallback)(function(O){return H(void 0,void 0,void 0,function(){var C,S,D,re,ne,V,R,P,W,Ce,ae,B,Se;return p(this,function(ie){switch(ie.label){case 0:if(C=L.current,!o||!C||A.current||y().isPaused())return[2,!1];re=!0,ne=O||{},V=!g[o]||!ne.dedupe,R=function(){return!A.current&&o===q.current&&M.current},P=function(){var Je=g[o];Je&&Je[1]===D&&delete g[o]},W={isValidating:!1},Ce=function(){se({isValidating:!1}),R()&&ce(W)},se({isValidating:!0}),ce({isValidating:!0}),ie.label=1;case 1:return ie.trys.push([1,3,,4]),V&&(X(a,o,z.current.data,z.current.error,!0),t.loadingTimeout&&!a.get(o)&&setTimeout(function(){re&&R()&&y().onLoadingSlow(o,t)},t.loadingTimeout),g[o]=[C.apply(void 0,ee),we()]),Se=g[o],S=Se[0],D=Se[1],[4,S];case 2:return S=ie.sent(),V&&setTimeout(P,t.dedupingInterval),!g[o]||g[o][1]!==D?(V&&R()&&y().onDiscarded(o),[2,!1]):(se({error:l}),W.error=l,ae=fe[o],!w(ae)&&(D<=ae[0]||D<=ae[1]||ae[1]===0)?(Ce(),V&&R()&&y().onDiscarded(o),[2,!1]):(n(z.current.data,S)?W.data=z.current.data:W.data=S,n(a.get(o),S)||a.set(o,S),V&&R()&&y().onSuccess(S,o,t),[3,4]));case 3:return B=ie.sent(),P(),y().isPaused()||(se({error:B}),W.error=B,V&&R()&&(y().onError(B,o,t),(typeof t.shouldRetryOnError=="boolean"&&t.shouldRetryOnError||T(t.shouldRetryOnError)&&t.shouldRetryOnError(B))&&ye()&&y().onErrorRetry(B,o,t,Z,{retryCount:(ne.retryCount||0)+1,dedupe:!0}))),[3,4];case 4:return re=!1,Ce(),R()&&V&&X(a,o,W.data,W.error,!1),[2,!0]}})})},[o]),mt=(0,v.useCallback)(We.bind(l,a,function(){return q.current}),[]);if(Q(function(){L.current=i,J.current=t}),Q(function(){if(!!o){var O=o!==q.current,C=Z.bind(l,Ee),S=function(R,P,W){ce(_({error:P,isValidating:W},n(z.current.data,R)?l:{data:R}))},D=0,re=function(R){if(R==Ie){var P=Date.now();y().revalidateOnFocus&&P>D&&ye()&&(D=P+y().focusThrottleInterval,C())}else if(R==Ae)y().revalidateOnReconnect&&ye()&&C();else if(R==Ve)return Z()},ne=ke(o,x,S),V=ke(o,d,re);return A.current=!1,q.current=o,M.current=!0,O&&ce({data:F,error:te,isValidating:Re}),qe()&&(w(F)||oe?C():rt(C)),function(){A.current=!0,ne(),V()}}},[o,Z]),Q(function(){var O;function C(){var D=T(m)?m(F):m;D&&O!==-1&&(O=setTimeout(S,D))}function S(){!z.current.error&&(u||y().isVisible())&&(s||y().isOnline())?Z(Ee).then(C):C()}return C(),function(){O&&(clearTimeout(O),O=-1)}},[m,u,s,Z]),(0,v.useDebugValue)(F),f&&w(F)&&o)throw L.current=i,J.current=t,A.current=!1,w(te)?Z(Ee):te;return{mutate:mt,get data(){return ge.data=!0,F},get error(){return ge.error=!0,te},get isValidating(){return ge.isValidating=!0,Re}}},lt=U.defineProperty(ut,"default",{value:Ne}),bt=function(e){return be(e)[0]},vt=st(ct)}}]);
"""SCons.Tool.applelink Tool-specific initialization for the Apple gnu-like linker. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. """ # # Copyright (c) 2001 - 2016 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY # KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE # WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # __revision__ = "src/engine/SCons/Tool/applelink.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import SCons.Util # Even though the Mac is based on the GNU toolchain, it doesn't understand # the -rpath option, so we use the "link" tool instead of "gnulink". import link def generate(env): """Add Builders and construction variables for applelink to an Environment.""" link.generate(env) env['FRAMEWORKPATHPREFIX'] = '-F' env['_FRAMEWORKPATH'] = '${_concat(FRAMEWORKPATHPREFIX, FRAMEWORKPATH, "", __env__, RDirs)}' env['_FRAMEWORKS'] = '${_concat("-framework ", FRAMEWORKS, "", __env__)}' env['LINKCOM'] = env['LINKCOM'] + ' $_FRAMEWORKPATH $_FRAMEWORKS $FRAMEWORKSFLAGS' env['SHLINKFLAGS'] = SCons.Util.CLVar('$LINKFLAGS -dynamiclib') env['SHLINKCOM'] = env['SHLINKCOM'] + ' $_FRAMEWORKPATH $_FRAMEWORKS $FRAMEWORKSFLAGS' # override the default for loadable modules, which are different # on OS X than dynamic shared libs. echoing what XCode does for # pre/suffixes: env['LDMODULEPREFIX'] = '' env['LDMODULESUFFIX'] = '' env['LDMODULEFLAGS'] = SCons.Util.CLVar('$LINKFLAGS -bundle') env['LDMODULECOM'] = '$LDMODULE -o ${TARGET} $LDMODULEFLAGS $SOURCES $_LIBDIRFLAGS $_LIBFLAGS $_FRAMEWORKPATH $_FRAMEWORKS $FRAMEWORKSFLAGS' def exists(env): return env['PLATFORM'] == 'darwin' # Local Variables: # tab-width:4 # indent-tabs-mode:nil # End: # vim: set expandtab tabstop=4 shiftwidth=4:
import { expect } from 'chai'; import wrapWord from './../src/wrapWord'; describe('wrapWord', () => { it('wraps a string at a nearest whitespace', () => { expect(wrapWord('aaa bbb', 5)).to.deep.equal(['aaa', 'bbb']); expect(wrapWord('a a a bbb', 5)).to.deep.equal(['a a a', 'bbb']); }); context('a single word is longer than chunk size', () => { it('cuts the word', () => { expect(wrapWord('aaaaa', 2)).to.deep.equal(['aa', 'aa', 'a']); }); }); context('a long word with a special character', () => { it('cuts the word at the special character', () => { expect(wrapWord('aaa\\bbb', 5)).to.deep.equal(['aaa\\', 'bbb']); expect(wrapWord('aaa/bbb', 5)).to.deep.equal(['aaa/', 'bbb']); expect(wrapWord('aaa_bbb', 5)).to.deep.equal(['aaa_', 'bbb']); expect(wrapWord('aaa-bbb', 5)).to.deep.equal(['aaa-', 'bbb']); expect(wrapWord('aaa.bbb', 5)).to.deep.equal(['aaa.', 'bbb']); expect(wrapWord('aaa,bbb', 5)).to.deep.equal(['aaa,', 'bbb']); expect(wrapWord('aaa;bbb', 5)).to.deep.equal(['aaa;', 'bbb']); }); }); context('a special character after the length of a container', () => { it('does not include special character', () => { expect(wrapWord('aa-bbbbb-cccc', 5)).to.deep.equal(['aa-', 'bbbbb', '-cccc']); }); }); });
webpackJsonp([3],{544:function(e,t,n){n(579);var i=n(8)(n(562),n(591),"data-v-3dc80bf4",null);e.exports=i.exports},556:function(e,t,n){"use strict";function i(){var e=c()({},l.b,{platform:"h5",uin:0,needNewCode:1});return n.i(A.a)("https://c.y.qq.com/musichall/fcgi-bin/fcg_yqqhomepagerecommend.fcg",e,l.c)}function o(){var e=c()({},l.b,{platform:"yqq",hostUin:0,sin:0,ein:29,sortId:5,needNewCode:0,categoryId:1e7,rnd:Math.random(),format:"json"});return f.a.get("/api/getDiscList",{params:e}).then(function(e){return d.a.resolve(e.data)})}function r(e){var t=c()({},l.b,{disstid:e,type:1,json:1,utf8:1,onlysong:0,platform:"yqq",hostUin:0,needNewCode:0});return n.i(A.a)("https://c.y.qq.com/qzone/fcg-bin/fcg_ucc_getcdinfo_byids_cp.fcg",t,l.c)}t.b=i,t.c=o,t.a=r;var s=n(83),d=n.n(s),a=n(82),c=n.n(a),A=n(185),l=n(62),m=n(188),f=n.n(m)},559:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(122),o=n(191),r=n.n(o);t.default={name:"slider",props:{loop:{type:Boolean,default:!0},autoPlay:{type:Boolean,default:!0},interval:{type:Number,default:4e3}},data:function(){return{dots:[],currentPageIndex:0}},mounted:function(){var e=this;setTimeout(function(){e._setSliderWidth(),e._initDots(),e._initSlider(),e.autoPlay&&e._play()},20),window.addEventListener("resize",function(){e.slider&&(e._setSliderWidth(!0),e.slider.refresh())})},activated:function(){this.autoPlay&&this._play()},deactivated:function(){clearTimeout(this.timer)},beforeDestroy:function(){clearTimeout(this.timer)},methods:{_setSliderWidth:function(e){this.children=this.$refs.sliderGroup.children;for(var t=0,o=this.$refs.slider.clientWidth,r=0;r<this.children.length;r++){var s=this.children[r];n.i(i.c)(s,"slider-item"),s.style.width=o+"px",t+=o}this.loop&&!e&&(t+=2*o),this.$refs.sliderGroup.style.width=t+"px"},_initSlider:function(){var e=this;this.slider=new r.a(this.$refs.slider,{scrollX:!0,scrollY:!1,momentum:!1,snap:!0,snapLoop:this.loop,snapThreshold:.3,snapSpeed:400}),this.slider.on("scrollEnd",function(){var t=e.slider.getCurrentPage().pageX;e.loop&&(t-=1),e.currentPageIndex=t,e.autoPlay&&e._play()}),this.slider.on("beforeScrollStart",function(){e.autoPlay&&clearTimeout(e.timer)})},_initDots:function(){this.dots=new Array(this.children.length)},_play:function(){var e=this,t=this.currentPageIndex+1;this.loop&&(t+=1),this.timer=setTimeout(function(){e.slider.goToPage(t,0,400)},this.interval)}}}},562:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(54),o=n.n(i),r=n(589),s=n.n(r),d=n(186),a=n.n(d),c=n(63),A=n.n(c),l=n(556),m=n(81),f=n(62),p=n(45);t.default={mixins:[m.c],data:function(){return{recommends:[],discList:[]}},created:function(){this._getRecommend(),this._getDiscList()},methods:o()({handlePlaylist:function(e){var t=e.length>0?"60px":"";this.$refs.recommend.style.bottom=t,this.$refs.scroll.refresh()},loadImage:function(){this.checkloaded||(this.checkloaded=!0,this.$refs.scroll.refresh())},selectItem:function(e){this.$router.push({path:"/recommend/"+e.dissid}),this.setDisc(e)},_getRecommend:function(){var e=this;n.i(l.b)().then(function(t){t.code===f.a&&(e.recommends=t.data.slider)})},_getDiscList:function(){var e=this;n.i(l.c)().then(function(t){t.code===f.a&&(e.discList=t.data.list)})}},n.i(p.b)({setDisc:"SET_DISC"})),components:{Slider:s.a,Loading:a.a,Scroll:A.a}}},569:function(e,t,n){t=e.exports=n(540)(!0),t.push([e.i,".recommend[data-v-3dc80bf4]{position:fixed;width:100%;top:88px;bottom:0}.recommend .recommend-content[data-v-3dc80bf4]{height:100%;overflow:hidden}.recommend .recommend-content .slider-wrapper[data-v-3dc80bf4]{position:relative;width:100%;overflow:hidden}.recommend .recommend-content .recommend-list .list-title[data-v-3dc80bf4]{height:65px;line-height:65px;text-align:center;font-size:14px;color:#ffcd32}.recommend .recommend-content .recommend-list .item[data-v-3dc80bf4]{display:-webkit-box;display:-ms-flexbox;display:flex;box-sizing:border-box;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:0 20px 20px}.recommend .recommend-content .recommend-list .item .icon[data-v-3dc80bf4]{-webkit-box-flex:0;-ms-flex:0 0 60px;flex:0 0 60px;width:60px;padding-right:20px}.recommend .recommend-content .recommend-list .item .text[data-v-3dc80bf4]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-flex:1;-ms-flex:1;flex:1;line-height:20px;overflow:hidden;font-size:14px}.recommend .recommend-content .recommend-list .item .text .name[data-v-3dc80bf4]{margin-bottom:10px;color:#fff}.recommend .recommend-content .recommend-list .item .text .desc[data-v-3dc80bf4]{color:hsla(0,0%,100%,.3)}.recommend .recommend-content .loading-container[data-v-3dc80bf4]{position:absolute;width:100%;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}","",{version:3,sources:["/Users/Macx/Desktop/项目源码/src/components/recommend/recommend.vue"],names:[],mappings:"AACA,4BACE,eAAgB,AAChB,WAAY,AACZ,SAAU,AACV,QAAU,CACX,AACD,+CACE,YAAa,AACb,eAAiB,CAClB,AACD,+DACE,kBAAmB,AACnB,WAAY,AACZ,eAAiB,CAClB,AACD,2EACE,YAAa,AACb,iBAAkB,AAClB,kBAAmB,AACnB,eAAgB,AAChB,aAAe,CAChB,AACD,qEACE,oBAAqB,AACrB,oBAAqB,AACrB,aAAc,AACd,sBAAuB,AACvB,yBAA0B,AACtB,sBAAuB,AACnB,mBAAoB,AAC5B,mBAA0B,CAC3B,AACD,2EACE,mBAAoB,AAChB,kBAAmB,AACf,cAAe,AACvB,WAAY,AACZ,kBAAoB,CACrB,AACD,2EACE,oBAAqB,AACrB,oBAAqB,AACrB,aAAc,AACd,4BAA6B,AAC7B,6BAA8B,AAC1B,0BAA2B,AACvB,sBAAuB,AAC/B,wBAAyB,AACrB,qBAAsB,AAClB,uBAAwB,AAChC,mBAAoB,AAChB,WAAY,AACR,OAAQ,AAChB,iBAAkB,AAClB,gBAAiB,AACjB,cAAgB,CACjB,AACD,iFACE,mBAAoB,AACpB,UAAY,CACb,AACD,iFACE,wBAA6B,CAC9B,AACD,kEACE,kBAAmB,AACnB,WAAY,AACZ,QAAS,AACT,mCAAoC,AAC5B,0BAA4B,CACrC",file:"recommend.vue",sourcesContent:["\n.recommend[data-v-3dc80bf4] {\n position: fixed;\n width: 100%;\n top: 88px;\n bottom: 0;\n}\n.recommend .recommend-content[data-v-3dc80bf4] {\n height: 100%;\n overflow: hidden;\n}\n.recommend .recommend-content .slider-wrapper[data-v-3dc80bf4] {\n position: relative;\n width: 100%;\n overflow: hidden;\n}\n.recommend .recommend-content .recommend-list .list-title[data-v-3dc80bf4] {\n height: 65px;\n line-height: 65px;\n text-align: center;\n font-size: 14px;\n color: #ffcd32;\n}\n.recommend .recommend-content .recommend-list .item[data-v-3dc80bf4] {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n box-sizing: border-box;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n padding: 0 20px 20px 20px;\n}\n.recommend .recommend-content .recommend-list .item .icon[data-v-3dc80bf4] {\n -webkit-box-flex: 0;\n -ms-flex: 0 0 60px;\n flex: 0 0 60px;\n width: 60px;\n padding-right: 20px;\n}\n.recommend .recommend-content .recommend-list .item .text[data-v-3dc80bf4] {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n -webkit-box-flex: 1;\n -ms-flex: 1;\n flex: 1;\n line-height: 20px;\n overflow: hidden;\n font-size: 14px;\n}\n.recommend .recommend-content .recommend-list .item .text .name[data-v-3dc80bf4] {\n margin-bottom: 10px;\n color: #fff;\n}\n.recommend .recommend-content .recommend-list .item .text .desc[data-v-3dc80bf4] {\n color: rgba(255,255,255,0.3);\n}\n.recommend .recommend-content .loading-container[data-v-3dc80bf4] {\n position: absolute;\n width: 100%;\n top: 50%;\n -webkit-transform: translateY(-50%);\n transform: translateY(-50%);\n}"],sourceRoot:""}])},576:function(e,t,n){t=e.exports=n(540)(!0),t.push([e.i,".slider[data-v-bb5cf232]{min-height:1px}.slider .slider-group[data-v-bb5cf232]{position:relative;overflow:hidden;white-space:nowrap}.slider .slider-group .slider-item[data-v-bb5cf232]{float:left;box-sizing:border-box;overflow:hidden;text-align:center}.slider .slider-group .slider-item a[data-v-bb5cf232]{display:block;width:100%;overflow:hidden;text-decoration:none}.slider .slider-group .slider-item img[data-v-bb5cf232]{display:block;width:100%}.slider .dots[data-v-bb5cf232]{position:absolute;right:0;left:0;bottom:12px;text-align:center;font-size:0}.slider .dots .dot[data-v-bb5cf232]{display:inline-block;margin:0 4px;width:8px;height:8px;border-radius:50%;background:hsla(0,0%,100%,.5)}.slider .dots .dot.active[data-v-bb5cf232]{width:20px;border-radius:5px;background:hsla(0,0%,100%,.8)}","",{version:3,sources:["/Users/Macx/Desktop/项目源码/src/base/slider/slider.vue"],names:[],mappings:"AACA,yBACE,cAAgB,CACjB,AACD,uCACE,kBAAmB,AACnB,gBAAiB,AACjB,kBAAoB,CACrB,AACD,oDACE,WAAY,AACZ,sBAAuB,AACvB,gBAAiB,AACjB,iBAAmB,CACpB,AACD,sDACE,cAAe,AACf,WAAY,AACZ,gBAAiB,AACjB,oBAAsB,CACvB,AACD,wDACE,cAAe,AACf,UAAY,CACb,AACD,+BACE,kBAAmB,AACnB,QAAS,AACT,OAAQ,AACR,YAAa,AACb,kBAAmB,AACnB,WAAa,CACd,AACD,oCACE,qBAAsB,AACtB,aAAc,AACd,UAAW,AACX,WAAY,AACZ,kBAAmB,AACnB,6BAAkC,CACnC,AACD,2CACE,WAAY,AACZ,kBAAmB,AACnB,6BAAkC,CACnC",file:"slider.vue",sourcesContent:["\n.slider[data-v-bb5cf232] {\n min-height: 1px;\n}\n.slider .slider-group[data-v-bb5cf232] {\n position: relative;\n overflow: hidden;\n white-space: nowrap;\n}\n.slider .slider-group .slider-item[data-v-bb5cf232] {\n float: left;\n box-sizing: border-box;\n overflow: hidden;\n text-align: center;\n}\n.slider .slider-group .slider-item a[data-v-bb5cf232] {\n display: block;\n width: 100%;\n overflow: hidden;\n text-decoration: none;\n}\n.slider .slider-group .slider-item img[data-v-bb5cf232] {\n display: block;\n width: 100%;\n}\n.slider .dots[data-v-bb5cf232] {\n position: absolute;\n right: 0;\n left: 0;\n bottom: 12px;\n text-align: center;\n font-size: 0;\n}\n.slider .dots .dot[data-v-bb5cf232] {\n display: inline-block;\n margin: 0 4px;\n width: 8px;\n height: 8px;\n border-radius: 50%;\n background: rgba(255,255,255,0.5);\n}\n.slider .dots .dot.active[data-v-bb5cf232] {\n width: 20px;\n border-radius: 5px;\n background: rgba(255,255,255,0.8);\n}"],sourceRoot:""}])},579:function(e,t,n){var i=n(569);"string"==typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);n(541)("1cb00258",i,!0)},586:function(e,t,n){var i=n(576);"string"==typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);n(541)("ec80f894",i,!0)},589:function(e,t,n){n(586);var i=n(8)(n(559),n(598),"data-v-bb5cf232",null);e.exports=i.exports},591:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{ref:"recommend",staticClass:"recommend"},[n("scroll",{ref:"scroll",staticClass:"recommend-content",attrs:{data:e.discList}},[n("div",[e.recommends.length?n("div",{ref:"sliderWrapper",staticClass:"slider-wrapper"},[n("slider",e._l(e.recommends,function(t){return n("div",[n("a",{attrs:{href:t.linkUrl}},[n("img",{staticClass:"needsclick",attrs:{src:t.picUrl},on:{load:e.loadImage}})])])}))],1):e._e(),e._v(" "),n("div",{staticClass:"recommend-list"},[n("h1",{staticClass:"list-title"},[e._v("热门歌单推荐")]),e._v(" "),n("ul",e._l(e.discList,function(t){return n("li",{staticClass:"item",on:{click:function(n){e.selectItem(t)}}},[n("div",{staticClass:"icon"},[n("img",{directives:[{name:"lazy",rawName:"v-lazy",value:t.imgurl,expression:"item.imgurl"}],attrs:{width:"60",height:"60"}})]),e._v(" "),n("div",{staticClass:"text"},[n("h2",{staticClass:"name",domProps:{innerHTML:e._s(t.creator.name)}}),e._v(" "),n("p",{staticClass:"desc",domProps:{innerHTML:e._s(t.dissname)}})])])}))])]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:!e.discList.length,expression:"!discList.length"}],staticClass:"loading-container"},[n("loading")],1)]),e._v(" "),n("router-view")],1)},staticRenderFns:[]}},598:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{ref:"slider",staticClass:"slider"},[n("div",{ref:"sliderGroup",staticClass:"slider-group"},[e._t("default")],2),e._v(" "),n("div",{staticClass:"dots"},e._l(e.dots,function(t,i){return n("span",{staticClass:"dot",class:{active:e.currentPageIndex===i}})}))])},staticRenderFns:[]}}}); //# sourceMappingURL=3.cb4675bc0e7ca4003299.js.map
(function() {var implementors = {}; implementors["vec2dim"] = [{text:"impl&lt;T&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> for <a class=\"struct\" href=\"vec2dim/struct.Vec2d.html\" title=\"struct vec2dim::Vec2d\">Vec2d</a>&lt;T&gt; <span class=\"where fmt-newline\">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a>,&nbsp;</span>",synthetic:true,types:["vec2dim::Vec2d"]},]; if (window.register_implementors) { window.register_implementors(implementors); } else { window.pending_implementors = implementors; } })()
export { default } from "./WeightPage";
import requests s = requests.session() s.auth = ("yzz","123456") s.get("https://www.baidu.com/") print(s.headers)
var msg1Titulo, mesActual = new Date(), meses = ['Enero', 'Febrero', 'Marzo', 'Abril', 'Mayo', 'Junio', 'Julio', 'Agosto', 'Septiembre', 'Octubre', 'Noviembre', 'Diciembre'], mesesCortos = ['Ene','Feb','Mar','Abr', 'May','Jun','Jul','Ago','Sep', 'Oct','Nov','Dic']; $(document).on('ready', function(){ if(location.hash.length){ var qtpem = ['#interbank','#tengo_una_nueva_linea', '#no_pague_a_tiempo', '#me_cobraron_mas', '#pague_menos', '#me_robaron_mi_celular', '#sali_de_viaje']; if(qtpem.indexOf(location.hash)>-1) { $('.listadoStandard, .quetepasoestemes__item, .banco__item').removeClass('act'); $('.acordeon').removeClass('primero act'); $(location.hash).addClass('act'); $('.quetepasoestemes__item a[href="'+location.hash+'"]').parent().addClass('act'); } var qtpem = ['#bcp', '#interbank', '#bbva', '#scotiabank', '#banco-de-la-nacion']; if(qtpem.indexOf(location.hash)>-1) { $('.banco__item').removeClass('act'); $('.acordeon').removeClass('primero act'); $(location.hash).addClass('primero act'); $('.banco__item a[href="'+location.hash+'"]').parent().addClass('act'); } } var swiper2 = new Swiper('.sliderClaroFacturacion', { slidesPerView: 1, spaceBetween: 0, loop: false, navigation: { nextEl: '.sliderClaroFacturacion__flecha--right', prevEl: '.sliderClaroFacturacion__flecha--left' } }); var swiper3 = new Swiper('.slideGlosario', { slidesPerView: 14, spaceBetween: 0, navigation: { nextEl: '.glosario__right', prevEl: '.glosario__left' }, breakpoints: { 730: { slidesPerView: 12 }, 620: { slidesPerView: 10 }, 520: { slidesPerView: 8 }, 420: { slidesPerView: 6 } } }); var menuBoton = true; $('#menuBoton').on('click', function(){ menuBoton ? ( $('#menuContenedor').fadeIn(350), menuBoton=false, $(this).addClass('act') ) : ( $('#menuContenedor').fadeOut(200), menuBoton=true, $(this).removeClass('act') ) ; }); $('.acordeon__boton').on('click', function(){ var t = $(this).parent(), acordeon__contenido = t.find('.acordeon__contenido'), alto = t.find('.acordeon__contenido__detalle').outerHeight(), acordeon__contenido__activo = t.parent().find('.acordeon__contenido.act'); console.log(acordeon__contenido__activo.data('target')); if($(this).hasClass('act')){ $(this).removeClass('act'); acordeon__contenido.animate({ height:0 },500); acordeon__contenido.removeClass('act'); } else { $('.acordeon__boton').removeClass('act'); $(this).addClass('act'); acordeon__contenido__activo.animate({ height:0 },500); acordeon__contenido__activo.removeClass('act'); acordeon__contenido.animate({ height:alto },500, function(){ acordeon__contenido.css('height','auto'); }); acordeon__contenido.addClass('act'); } }); var quetepasoestemesMobile = true, block1 = true; $('.quetepasoestemes__item a').on('click', function(event){ event.preventDefault(); if(block1) { block1=false; var t = $($(this).attr('href') ), tMobile = $($(this).attr('href')+'-mobile' ), listadoStandardActivo =$('.listadoStandard.act'), acordeonMobileActivo = $('.acordeon--mobile.act'); if($(this).parent().hasClass('act') && $(window).outerWidth()<=700 ) { quetepasoestemesMobile ? ( $('.quetepasoestemes__lista').animate({height:421},400), quetepasoestemesMobile = false ) : ( $('.quetepasoestemes__lista').animate({height:71},350), quetepasoestemesMobile = true ) ; block1 = true; } else { $('.quetepasoestemes__item').removeClass('act'); $(this).parent().addClass('act'); listadoStandardActivo.fadeOut(150, function() { listadoStandardActivo.removeClass('act'); t.fadeIn(450); t.addClass('act'); setTimeout(function(){ block1 = true; },500) }); acordeonMobileActivo.fadeOut(150, function() { acordeonMobileActivo.removeClass('act'); tMobile.fadeIn(450); tMobile.addClass('act'); setTimeout(function(){ block1 = true; },500) if( $(window).outerWidth()<=700 ) { $('.quetepasoestemes__lista').animate({height:71},350); quetepasoestemesMobile = true; } }); } } }); var bancoMobile=true, block2=true; $('.banco__item a').on('click', function(event){ event.preventDefault(); if(block2){ block2=false; var t = $($(this).attr('href') ), acordeonMobileActivo = $('.acordeon--estilo2.act'); if($(this).parent().hasClass('act') && $(window).outerWidth()<=700 ) { bancoMobile ? ( $('.banco__lista').animate({height:421},400), bancoMobile = false ) : ( $('.banco__lista').animate({height:71},350), bancoMobile = true ) ; block2=true; } else { $('.banco__item').removeClass('act'); $(this).parent().addClass('act'); acordeonMobileActivo.removeClass('opacity'); setTimeout(function(){ acordeonMobileActivo.removeClass('height'); acordeonMobileActivo.removeClass('act primero'); },510); setTimeout(function(){ t.addClass('height'); },510); setTimeout(function(){ t.addClass('opacity'); t.addClass('act'); if( $(window).outerWidth()<=700 ) { $('.banco__lista').animate({height:71},350); bancoMobile = true; } },510); setTimeout(function(){ block2 = true; },550) ; } } }); $('.glosario__item a').on('click', function(event){ event.preventDefault(); var t = $($(this).attr('href') ), listadoStandardActivo =$('.listadoStandard.act'); $('.glosario__item a').removeClass('act'); $(this).addClass('act'); $(listadoStandardActivo).fadeOut(150, function() { listadoStandardActivo.removeClass('act'); t.fadeIn(450); t.addClass('act'); }); }); setInterval(function(){ footer(); },100); $(window).on('resize scroll', function(){ footer(); $(window).outerWidth()<=700 && $('.quetepasoestemes__lista').removeAttr('style') && ( quetepasoestemesMobile = true ); }); $( "#datepicker" ).datepicker({ monthNames: meses, monthNamesShort: mesesCortos, dayNamesMin: ['Dom','Lun','Mar','Mie','Jue','Vie','Sáb'], dateFormat: 'dd/mm/yy', defaultDate: new Date(mesActual.getFullYear(),(mesActual.getMonth() +1)-1,1), onSelect: function(date) { var datos = date.split('/'), dia = Math.round(datos[0]), mes = Math.round(datos[1]-1), year = datos[2]; $('.hasDatepicker').addClass('act'); simulacion(dia, mes, year); } }); $('.ciclodefacturacion__boton').on('click', function(event){ event.preventDefault(); $('.ciclodefacturacion').fadeOut(250, function(){ $('.ciclodefacturacion__resultado').fadeIn(350); }); }); $('.ciclodefacturacion__otro').on('click', function(event){ event.preventDefault(); $('.ciclodefacturacion__resultado').fadeOut(250, function(){ $('.ciclodefacturacion').fadeIn(350); }); }); $('.verFactura').on('click', function(event){ event.preventDefault(); $('.box').fadeIn(300); }); $('.box__cerrar').on('click', function(event){ event.preventDefault(); $('.box').fadeOut(200); }); var dominaBotonCerrar, dominaBotonAbrir, dominaContenido, dominaBlock=false; $('.dominaturecibo__recibo__puntos--abrir, .dominaturecibo__recibo__puntos--cerrar') .on('click', function(event){ event.preventDefault(); if($(window).outerWidth()>=950){ var t = $(this).parent(), contenido = t.find('article'), cerrar = t.find('.dominaturecibo__recibo__puntos--cerrar'), abrir = t.find('.dominaturecibo__recibo__puntos--abrir'); if(dominaBlock){ dominaBotonCerrar.removeClass('act'); dominaBotonAbrir.addClass('act'); dominaContenido.fadeOut(150); } if(!t.hasClass('act')){ t.parent().find('.dominaturecibo__recibo__puntos.act').removeClass('act'); t.addClass('act'); cerrar.addClass('act'); abrir.removeClass('act'); contenido.fadeIn(300); dominaBlock=true; dominaBotonCerrar = cerrar, dominaBotonAbrir = abrir, dominaContenido = contenido; } else { cerrar.removeClass('act'); abrir.addClass('act'); contenido.fadeOut(150, function(){ t.removeClass('act'); }); dominaBlock=false; } } }); $('.dominaturecibo__opciones a').on('click', function(event){ event.preventDefault(); var t = $(this).attr('href'), t = t.toString().replace('#','.'); $('.dominaturecibo__opciones a').removeClass('act'); $(this).addClass('act'); $('.hoja.act').fadeOut(250, function(){ $('.hoja.act').removeClass('act'); $(t).addClass('act'); $(t).fadeIn(350); }); }); $('.videoClickFull').on('click', function(){ $('.boxVideoDomina').fadeIn(250, function(){ $('#boxVideoDominaID').attr('src','https://www.youtube.com/embed/xDw0N8bOmdk?rel=0&amp;showinfo=0&amp;autoplay=1'); }); }); $('.boxVideoDomina__cerrar').on('click', function(){ $('.boxVideoDomina').fadeOut(250, function(){ $('#boxVideoDominaID').attr('src',''); }); }); }) function simulacion(dia, mes, year){ ultimoDia(dia, mes, year); } function ultimoDia(dia, mes, year) { var opc1 = [1], opc2 = [2], opc3 = [4,5,6,8,9,11,12,14,16,18,19,20,22,24,25,26,28]; switch (true) { case (opc1.indexOf(dia)!=-1) : var ultimoDia = new Date(2018,(mes)+1,0).getDate(), texto = ultimoDia+'-'+mesesCortos[mes]+'-'+year; $('#final').html(texto); msg1Titulo = texto; primerDia(dia, mes, year); msgs(dia); $('.ciclodefacturacion__boton').fadeIn(350); break; case (opc2.indexOf(dia)!=-1) : year = mes>10 ? parseInt(year)+1 : year ; mes = mes>10 ? 0 : mes ; var texto = dia+'-'+mesesCortos[mes+1]+'-'+year; $('#final').html(texto); msg1Titulo = texto; dia = dia+1; primerDia(dia, mes, year); msgs(dia); $('.ciclodefacturacion__boton').fadeIn(350); break; case (opc3.indexOf(dia)!=-1) : year = mes>10 ? parseInt(year)+1 : year ; mes = mes>10 ? 0 : mes ; var texto = dia-1+'-'+mesesCortos[mes+1]+'-'+year; $('#final').html(texto); msg1Titulo = texto; primerDia(dia, mes, year); msgs(dia); $('.ciclodefacturacion__boton').fadeIn(350); break; default: primerDia(dia, mes, year); $('#final').html('- - - -'); $('.ciclodefacturacion__boton').fadeOut(200); break; } } function primerDia(dia, mes, year){ var texto = dia+'-'+mesesCortos[mes]+'-'+year; $('#inicio').html(texto); msg1Titulo = texto+' al '+msg1Titulo; } function msgs(dia){ var pago, msg1 = 'Cada '+dia+' del mes recibes los megas, minutos y SMS correspondientes a tu plan contratado para utilizarlos hasta que finalice tu ciclo.', msg2 = 'Tu recibo se emite el '+dia+' de cada mes.', msg3 = 'Las fechas límites de pago para tu recibo van '; switch(dia) { case 1,3: pago = 'entre el 18 y 22 de cada mes'; break; case 4,5: pago = 'entre el 19 y 23 de cada mes'; break; case 6: pago = 'entre el 20 y 24 de cada mes'; break; case 8: pago = 'entre el 22 y 26 de cada mes'; break; case 9: pago = 'entre el 24 y 28 de cada mes'; break; case 11: pago = 'entre el 29 y 03 de cada mes'; break; case 12: pago = 'entre el 01 y 05 de cada mes'; break; case 14: pago = 'entre el 02 y 06 de cada mes'; break; case 16: pago = 'entre el 03 y 07 de cada mes'; break; case 18: pago = 'entre el 04 y 08 de cada mes'; break; case 19: pago = 'entre el 06 y 10 de cada mes'; break; case 20: pago = 'entre el 07 y 11 de cada mes'; break; case 22: pago = 'entre el 09 y 13 de cada mes'; break; case 24: pago = 'entre el 11 y 15 de cada mes'; break; case 25: pago = 'entre el 12 y 16 de cada mes'; break; case 26: pago = 'entre el 13 y 17 de cada mes'; break; case 28: pago = 'entre el 15 y 19 de cada mes'; break; } $('#msg1 p').html(msg1); $('#msg1 strong span').html(msg1Titulo); $('#msg2 p').html(msg2); $('#msg3 p').html(msg3+' '+pago); } function footer(){ var puntoFooter = $('.puntoFooter').offset().top, footerbottom = $(window).outerHeight() - $('.footer').outerHeight(); puntoFooter>=footerbottom ? $('.footer').removeClass('footer--bottom') : $('.footer').addClass('footer--bottom') ; }
from django.test import TestCase from accounts.forms import SignUpForm class SignUpFormTest(TestCase): def test_form_has_fields(self): form = SignUpForm() expected = ["username", "email", "password1", "password2"] actual = list(form.fields) self.assertSequenceEqual(expected, actual)
(function(){(function(a){a.CarCrashSingletonClass.prototype.api=function(d){var b,c;c=this;b=Q.defer();$.ajax({type:d.method,url:d.action,data:d.data,dataType:"json",cache:false,success:function(e){var f;if(typeof e.success!=="undefined"&&e.success){b.resolve(e)}else{f=c.composeApiError(e);b.reject(f)}},error:function(g,h,f){var e;e=new Error("Network request failed.");e.textStatus=h;e.errorThrown=f;b.reject(e)}})};a.CarCrashSingletonClass.prototype.composeApiError=function(g){var f,c,e,b,d;if(typeof g.errors!=="undefined"&&g.errors){f="API errors occurred: <br>";d=g.errors;for(e=0,b=d.length;e<b;e++){c=d[e];f+=c.code+": "+c.message+"<br>"}}else{f="General API error occurred."}return f}})(window)}).call(this);
import smart_imports smart_imports.all() data_protector_client = accounts_tt_services.data_protector class TTAPiTests(utils_testcase.TestCase): def setUp(self): super().setUp() game_logic.create_test_map() data_protector_client.cmd_debug_clear_service() self.account = self.accounts_factory.create_account() def test_request_report(self): report_id = data_protector_client.cmd_request_report(ids=[('the_tale', self.account.id), ('tt_personal_messages', self.account.id), ('tt_discord', self.account.id)]) self.assertTrue(isinstance(report_id, uuid.UUID)) def test_get_report__no_report(self): report = data_protector_client.cmd_get_report(id=uuid.uuid4()) self.assertEqual(report, data_protector.Report(data=[], state=data_protector.REPORT_STATE.NOT_EXISTS, completed_at=datetime.datetime(1970, 1, 1, 0, 0), expire_at=datetime.datetime(1970, 1, 1, 0, 0))) def test_get_report__report_not_ready(self): report_id = data_protector_client.cmd_request_report(ids=[('the_tale', self.account.id), ('tt_personal_messages', self.account.id), ('tt_discord', self.account.id)]) report = data_protector_client.cmd_get_report(id=report_id) self.assertEqual(report, data_protector.Report(data=[], state=data_protector.REPORT_STATE.PROCESSING, completed_at=datetime.datetime(1970, 1, 1, 0, 0), expire_at=datetime.datetime(1970, 1, 1, 0, 0))) def test_get_report__report_ready(self): completed_at = datetime.datetime.now() expire_at = completed_at + datetime.timedelta(days=30) state = data_protector.REPORT_STATE.READY.value data = accounts_data_protection.collect_full_data(self.account.id) data = [['the_tale', *record] for record in data] report = tt_protocol_data_protector_pb2.Report(data=s11n.to_json(data), state=state, completed_at=utils_logic.to_timestamp(completed_at), expire_at=utils_logic.to_timestamp(expire_at)) answer = tt_protocol_data_protector_pb2.GetReportResponse(report=report) with mock.patch('the_tale.common.tt_api.operations.sync_request', mock.Mock(return_value=answer)): report = data_protector_client.cmd_get_report(id=uuid.uuid4()) self.assertEqual(report, data_protector.Report(data=data, state=data_protector.REPORT_STATE.READY, completed_at=completed_at, expire_at=expire_at))
#!/usr/bin/python ######################################################################################################################## # # Copyright (c) 2014, Regents of the University of California # All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, are permitted provided that the # following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following # disclaimer. # 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the # following disclaimer in the documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, # INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # ######################################################################################################################## """ The GridObject module and class implements a object that contains grid information for placement and route. It also provides useful functions for coordinate conversion between physical and abstract grids. """ __author__ = "Jaeduk Han" __maintainer__ = "Jaeduk Han" __email__ = "jdhan@eecs.berkeley.edu" __status__ = "Prototype" import numpy as np class GridObject(): """Layout abstract grid class""" type="native" """str: type of grid. can be 'native', 'route', 'placement'""" name=None """str: name of grid""" libname=None """str: library name of grid""" xy = np.array([0, 0]) # Coordinate """np.array([float, float]): size of grid""" xgrid=np.array([]) """np.array([float, float, ...]): x coordinates of grid""" ygrid=np.array([]) """np.array([float, float, ...]): y coordinates of grid""" max_resolution=10 """int: maximum resolution to handle floating point numbers""" @property def height(self): """float: height of grid""" return abs(self.xy[0][1]-self.xy[1][1]) @property def width(self): """float: width of grid""" return abs(self.xy[0][0]-self.xy[1][0]) def __init__(self, name, libname, xy, _xgrid=np.array([0]), _ygrid=np.array([0])): """ Constructor """ self.name = name self.libname=libname self.xy=xy self.xgrid=_xgrid self.ygrid=_ygrid def display(self): """ Display grid information """ print(" " + self.name + " width:" + str(np.around(self.width, decimals=self.max_resolution)) + " height:" + str(np.around(self.height, decimals=self.max_resolution))) def export_dict(self): """ Export object information in dict format Returns ------- dict grid information in dict format """ export_dict={'type':self.type, 'xy0':np.around(self.xy[0,:], decimals=self.max_resolution).tolist(), 'xy1':np.around(self.xy[1,:], decimals=self.max_resolution).tolist()} if not self.xgrid.tolist()==[]: export_dict['xgrid']=np.around(self.xgrid, decimals=self.max_resolution).tolist() if not self.ygrid.tolist()==[]: export_dict['ygrid']=np.around(self.ygrid, decimals=self.max_resolution).tolist() return export_dict def _add_grid(self, grid, v): """ add a grid coordinate Parameters ---------- grid : np.array grid array v : float value Returns ------- np.array updated grid array """ grid.append(v) grid.sort() return grid def add_xgrid(self, x): """ add a coordinate value to grid in x direction Parameters ---------- x : float value to be added """ self.xgrid=self._add_grid(self.xgrid, x) def add_ygrid(self, y): """ add a coordinate value to grid in y direction Parameters ---------- y : float value to be added """ self.ygrid=self._add_grid(self.ygrid, y) def get_xgrid(self): """use laygo.GridObject.GridObject.xgrid instead""" return self.xgrid def get_ygrid(self): """use laygo.GridObject.GridObject.ygrid instead""" return self.ygrid #abstract to physical conversion functions def _get_absgrid_coord(self, v, grid, size, method='ceil'): """ Convert physical value to abstract value on grid. Since physical values are continuous and grid values are discrete, boundary conditions are need to be defined for the conversion. Default (and only supported in the current version) converting method is ceil, which is described as follows: # physical grid: 0----grid0----grid1----grid2----...----gridN---size # abstracted grid: 0 0 0 1 1 2 2 N N N+1 The ceiling method works well with stacked grids. For example, in the example, phyical values ranging from (larger than) GridN to (equal to) gridN+1 (grid0 of the second stack) will be converted to N+1. Parameters ---------- v : float grid value grid : np.array grid array size : float grid size method : str, optional converting method Returns ------- int abstract grid value """ quo=np.floor(np.divide(v, size)) mod=v-quo*size #mod=np.mod(v, size) not working well mod_ongrid=np.searchsorted(grid+1e-10, mod) #add 1e-10 to handle floating point precision errors #print('physical:' + str(v.tolist()) + ' size:'+ str(size) + # ' quo:' + str(quo.tolist()) + ' mod:' + str(mod) + # ' abs:' + str(np.add(np.multiply(quo,grid.shape[0]), mod_ongrid).tolist())) return np.add(np.multiply(quo,grid.shape[0]), mod_ongrid) def get_absgrid_coord_x(self, x): return self.get_absgrid_x(x) def get_absgrid_x(self, x): """ Convert a physical x coordinate to a corresponding value in abstract grid Parameters ---------- x : float value Returns ------- int converted value """ return self._get_absgrid_coord(x, self.xgrid, self.width).astype(int) def get_absgrid_coord_y(self, y): return self.get_absgrid_y(y) def get_absgrid_y(self, y): """ Convert a physical y coordinate to a corresponding value in abstract grid Parameters ---------- y : float value Returns ------- int converted value """ return self._get_absgrid_coord(y, self.ygrid, self.height).astype(int) def get_absgrid_coord_xy(self, xy): return self.get_absgrid_xy(xy) def get_absgrid_xy(self, xy): """ Convert a physical xy coordinate to a corresponding vector in abstract grid Parameters ---------- xy : np.array([float, float]) Returns ------- np.array([int, int]) """ _xy=np.vstack((self.get_absgrid_x(xy.T[0]), self.get_absgrid_y(xy.T[1]))).T if _xy.shape[0]==1: return _xy[0] else: return _xy def get_absgrid_coord_region(self, xy0, xy1): return self.get_absgrid_region(xy0, xy1) def get_absgrid_region(self, xy0, xy1): """ Convert a physical regin to a corresponding region in abstract grid Parameters ---------- xy0 : np.array([float, float]) first coordinate xy1 : np.array([float, float]) second coordinate Returns ------- np.array([[int, int], [int, int]]) converted coordinate """ _xy0 = np.vstack((self.get_absgrid_coord_x(xy0.T[0]), self.get_absgrid_coord_y(xy0.T[1]))).T _xy1 = np.vstack((self.get_absgrid_coord_x(xy1.T[0]), self.get_absgrid_coord_y(xy1.T[1]))).T if _xy0.shape[0] == 1: _xy0 = _xy0[0] if _xy1.shape[0] == 1: _xy1 = _xy1[0] #upper right boundary adjust #check by re-converting to physical grid and see if the points are within original [xy0, xy1] #xy0_check = self.get_phygrid_coord_xy(_xy0)[0] #xy1_check = self.get_phygrid_coord_xy(_xy1)[0] xy0_check = self.get_phygrid_xy(_xy0) xy1_check = self.get_phygrid_xy(_xy1) xy0_check = np.around(xy0_check, decimals=self.max_resolution) xy1_check = np.around(xy1_check, decimals=self.max_resolution) xy0 = np.around(xy0, decimals=self.max_resolution) xy1 = np.around(xy1, decimals=self.max_resolution) #print("phy:" + str(xy0) + " " + str(xy1) + " abs:" + str(_xy0) + " " + str(_xy1) + " chk:" + str(xy0_check) + " " + str(xy1_check)) if xy0_check[0] > xy0[0] and xy0_check[0] > xy1[0]: _xy0[0] -= 1 if xy1_check[0] > xy0[0] and xy1_check[0] > xy1[0]: _xy1[0] -= 1 if xy0_check[1] > xy0[1] and xy0_check[1] > xy1[1]: _xy0[1] -= 1 if xy1_check[1] > xy0[1] and xy1_check[1] > xy1[1]: _xy1[1] -= 1 #if _xy1[1]==7: # print("phy:"+str(xy0)+" "+str(xy1)+" abs:"+str(_xy0)+" "+str(_xy1)+" chk:"+str(xy0_check)+" "+str(xy1_check)) #print(xy1) return(np.vstack((_xy0, _xy1))) # physical to abstract conversion functions def _get_phygrid_coord(self, v, grid, size): """ Internal function for abstract to physical coordinate conversions Parameters ---------- v : int value in abstract coordinate grid : np.array grid array size : float grid size Returns ------- float value in physical coordinate """ quo = np.floor(np.divide(v, grid.shape[0])) mod = np.mod(v, grid.shape[0]) # mod = v - quo * grid.shape[0] return np.add(np.multiply(quo, size), np.take(grid, mod)) def get_phygrid_coord_x(self, x): return self.get_phygrid_x(x) def get_phygrid_x(self, x): """ Get the physical value of a abstract x coordinate Parameters ---------- x : int abstract coordinate value Returns ------- float physical coordinate value """ return self._get_phygrid_coord(x, self.xgrid, self.width) def get_phygrid_coord_y(self, y): return self.get_phygrid_y(y) def get_phygrid_y(self, y): """ Get the physical value of a abstract y coordinate Parameters ---------- y : int abstract coordinate value Returns ------- float physical coordinate value """ return self._get_phygrid_coord(y, self.ygrid, self.height) def get_phygrid_coord_xy(self, xy): return self.get_phygrid_xy(xy) def get_phygrid_xy(self, xy): """ Get the physical value of a abstract vector Parameters ---------- xy : np.array([int, int]) abstract coordinate vector Returns ------- np.array([float, float]) physical coordinate vector """ if xy.ndim==1: #single coordinate return np.vstack((self.get_phygrid_coord_x(xy.T[0]), self.get_phygrid_coord_y(xy.T[1]))).T[0] else: return np.vstack((self.get_phygrid_coord_x(xy.T[0]), self.get_phygrid_coord_y(xy.T[1]))).T class PlacementGrid(GridObject): """ Placement grid class """ type = 'placement' class RouteGrid(GridObject): """ Routing grid class """ type = 'route' """str: type of grid. can be 'native', 'route', 'placement'""" xwidth = np.array([]) """np.array: width of xgrid""" ywidth = np.array([]) """np.array: width of ygrid""" viamap = dict() """dict: via map information""" xlayer = None """list: layer of xgrid""" ylayer = None """list: layer of ygrid""" def __init__(self, name, libname, xy, xgrid, ygrid, xwidth, ywidth, xlayer=None, ylayer=None, viamap=None): """ Constructor """ self.name = name self.libname = libname self.xy = xy self.xgrid = xgrid self.ygrid = ygrid self.xwidth = xwidth self.ywidth = ywidth self.xlayer = xlayer self.ylayer = ylayer self.viamap = viamap def _get_route_width(self, v, _width): """ Get metal width Parameters ---------- v : int value _width : np.array width vector Returns ------- float route width """ #quo=np.floor(np.divide(v, self._width.shape[0])) mod=np.mod(v, _width.shape[0]) #if not isinstance(mod, int): # print(v, _width, mod) return _width[int(np.round(mod))] def _get_route_layer(self, v, _layer): """ Get metal layer Parameters ---------- v : int index value _layer : list layer list Returns ------- [str, str] route layer """ mod=np.mod(v, len(_layer)) return _layer[mod] #def get_xwidth(self): return self.xwidth #def get_ywidth(self): return self.ywidth #def get_viamap(self): return self.viamap def get_route_width_xy(self, xy): """ Get metal width vector Parameters ---------- xy : np.array([int, int]) coordinate Returns ------- np.array([float, float]) route width vector ([xgrid, ygrid]) """ return np.array([self._get_route_width(xy[0], self.xwidth), self._get_route_width(xy[1], self.ywidth)]) def get_route_xlayer_xy(self, xy): """ Get route layer in xgrid direction (vertical) Parameters ---------- xy : np.array([int, int]) coordinate Returns ------- [str, str] route layer information """ return self._get_route_layer(xy[0], self.xlayer) def get_route_ylayer_xy(self, xy): """ Get route layer in ygrid direction (horizontal) Parameters ---------- xy : np.array([int, int]) coordinate Returns ------- [str, str] route layer information """ return self._get_route_layer(xy[1], self.ylayer) def get_vianame(self, xy): """ Get the name of via on xy Parameters ---------- xy : np.array([int, int]) coordinate Returns ------- str cellname of via """ mod = np.array([np.mod(xy[0], self.xgrid.shape[0]), np.mod(xy[1], self.ygrid.shape[0])]) for vianame, viacoord in self.viamap.items(): if viacoord.ndim==1: if np.array_equal(mod, viacoord): return vianame else: for v in viacoord: if np.array_equal(mod,v): return vianame def display(self): """ Display RouteGrid information """ display_str=" " + self.name + " width:" + str(np.around(self.width, decimals=self.max_resolution))\ + " height:" + str(np.around(self.height, decimals=self.max_resolution))\ + " xgrid:" + str(np.around(self.xgrid, decimals=self.max_resolution))\ + " ygrid:" + str(np.around(self.ygrid, decimals=self.max_resolution))\ + " xwidth:" + str(np.around(self.xwidth, decimals=self.max_resolution))\ + " ywidth:" + str(np.around(self.ywidth, decimals=self.max_resolution))\ + " xlayer:" + str(self.xlayer)\ + " ylayer:" + str(self.ylayer)\ + " viamap:{" for vm_name, vm in self.viamap.items(): display_str+=vm_name + ": " + str(vm.tolist()) + " " display_str+="}" print(display_str) def export_dict(self): """ Export grid information in dict format Returns ------- dict Grid information """ export_dict=GridObject.export_dict(self) export_dict['xwidth'] = np.around(self.xwidth, decimals=self.max_resolution).tolist() export_dict['ywidth'] = np.around(self.ywidth, decimals=self.max_resolution).tolist() export_dict['xlayer'] = self.xlayer export_dict['ylayer'] = self.ylayer export_dict['viamap'] = dict() for vn, v in self.viamap.items(): export_dict['viamap'][vn]=[] for _v in v: export_dict['viamap'][vn].append(_v.tolist()) return export_dict def update_viamap(self, viamap): """use laygo.GridObject.RouteGrid.viamap instead""" self.viamap=viamap if __name__ == '__main__': lgrid=GridObject() print('LayoutGrid test') lgrid.xgrid = np.array([0.2, 0.4, 0.6]) lgrid.ygrid = np.array([0, 0.4, 0.9, 1.2, 2, 3]) lgrid.width = 1.2 lgrid.height = 3.2 phycoord = np.array([[-0.2, -0.2], [0, 2], [4,2.2], [0.5, 1.5], [1.3, 3.6], [8,2.3]]) print(" xgrid:" + str(lgrid.xgrid) + " width:" + str(lgrid.width)) print(" ygrid:" + str(lgrid.ygrid) + " height:" + str(lgrid.height)) print('physical grid to abstract grid') print(" input:"+str(phycoord.tolist())) abscoord=lgrid.get_absgrid_coord_xy(phycoord) print(" output:"+str(abscoord.tolist())) print('abstract grid to physical grid') phycoord=lgrid.get_phygrid_xy(abscoord).tolist() print(" output:"+str(phycoord))
import logging from django.core.exceptions import ObjectDoesNotExist from teams.models import Team from utils.email import add_outgoing_email logger = logging.getLogger("bornhack.%s" % __name__) def add_new_speaker_proposal_email(speaker_proposal): formatdict = {"proposal": speaker_proposal} try: content_team = Team.objects.get(camp=speaker_proposal.camp, name="Content") except ObjectDoesNotExist as e: logger.info("There is no team with name Content: {}".format(e)) return False return add_outgoing_email( responsible_team=content_team, text_template="emails/new_speaker_proposal.txt", html_template="emails/new_speaker_proposal.html", to_recipients=content_team.mailing_list, formatdict=formatdict, subject="New speaker proposal '%s' was just submitted" % speaker_proposal.name, hold=False, ) def add_new_event_proposal_email(event_proposal): formatdict = {"proposal": event_proposal} try: content_team = Team.objects.get(camp=event_proposal.camp, name="Content") except ObjectDoesNotExist as e: logger.info("There is no team with name Content: {}".format(e)) return False return add_outgoing_email( responsible_team=content_team, text_template="emails/new_event_proposal.txt", html_template="emails/new_event_proposal.html", to_recipients=content_team.mailing_list, formatdict=formatdict, subject="New event proposal '%s' was just submitted" % event_proposal.title, hold=False, ) def add_speaker_proposal_updated_email(speaker_proposal): formatdict = {"proposal": speaker_proposal} try: content_team = Team.objects.get(camp=speaker_proposal.camp, name="Content") except ObjectDoesNotExist as e: logger.info("There is no team with name Content: {}".format(e)) return False return add_outgoing_email( responsible_team=content_team, text_template="emails/update_speaker_proposal.txt", html_template="emails/update_speaker_proposal.html", to_recipients=content_team.mailing_list, formatdict=formatdict, subject="Speaker proposal '%s' was just updated" % speaker_proposal.name, hold=False, ) def add_event_proposal_updated_email(event_proposal): formatdict = {"proposal": event_proposal} try: content_team = Team.objects.get(camp=event_proposal.camp, name="Content") except ObjectDoesNotExist as e: logger.info("There is no team with name Content: {}".format(e)) return False return add_outgoing_email( responsible_team=content_team, text_template="emails/update_event_proposal.txt", html_template="emails/update_event_proposal.html", to_recipients=content_team.mailing_list, formatdict=formatdict, subject="Event proposal '%s' was just updated" % event_proposal.title, hold=False, ) def add_speaker_proposal_rejected_email(speaker_proposal): formatdict = {"proposal": speaker_proposal} try: content_team = Team.objects.get(camp=speaker_proposal.camp, name="Content") except ObjectDoesNotExist as e: logger.info("There is no team with name Content: {}".format(e)) return False return add_outgoing_email( responsible_team=content_team, text_template="emails/speaker_proposal_rejected.txt", html_template="emails/speaker_proposal_rejected.html", to_recipients=speaker_proposal.user.email, formatdict=formatdict, subject=f"Your {speaker_proposal.camp.title} speaker proposal '{speaker_proposal.name}' was rejected", hold=True, ) def add_speaker_proposal_accepted_email(speaker_proposal): formatdict = {"proposal": speaker_proposal} try: content_team = Team.objects.get(camp=speaker_proposal.camp, name="Content") except ObjectDoesNotExist as e: logger.info("There is no team with name Content: {}".format(e)) return False return add_outgoing_email( responsible_team=content_team, text_template="emails/speaker_proposal_accepted.txt", html_template="emails/speaker_proposal_accepted.html", to_recipients=speaker_proposal.user.email, formatdict=formatdict, subject=f"Your {speaker_proposal.camp.title} speaker proposal '{speaker_proposal.name}' was accepted", hold=True, ) def add_event_proposal_rejected_email(event_proposal): formatdict = {"proposal": event_proposal} try: content_team = Team.objects.get(camp=event_proposal.camp, name="Content") except ObjectDoesNotExist as e: logger.info("There is no team with name Content: {}".format(e)) return False return add_outgoing_email( responsible_team=content_team, text_template="emails/event_proposal_rejected.txt", html_template="emails/event_proposal_rejected.html", to_recipients=event_proposal.user.email, formatdict=formatdict, subject=f"Your {event_proposal.camp.title} event proposal '{event_proposal.title}' was rejected", hold=True, ) def add_event_proposal_accepted_email(event_proposal): formatdict = {"proposal": event_proposal} try: content_team = Team.objects.get(camp=event_proposal.camp, name="Content") except ObjectDoesNotExist as e: logger.info("There is no team with name Content: {}".format(e)) return False return add_outgoing_email( responsible_team=content_team, text_template="emails/event_proposal_accepted.txt", html_template="emails/event_proposal_accepted.html", to_recipients=event_proposal.user.email, formatdict=formatdict, subject=f"Your {event_proposal.camp.title} event proposal '{event_proposal.title}' was accepted!", hold=True, ) def add_event_scheduled_email(slot): formatdict = {"slot": slot} # add all speaker emails recipients = [speaker.email for speaker in slot.event.speakers.all()] # also add the submitting users email recipients.append(slot.event.proposal.user.email) try: content_team = Team.objects.get(camp=slot.camp, name="Content") except ObjectDoesNotExist as e: logger.info("There is no team with name Content: {}".format(e)) return False # loop over unique recipients and send an email to each for rcpt in set(recipients): add_outgoing_email( responsible_team=content_team, text_template="emails/event_scheduled.txt", html_template="emails/event_scheduled.html", to_recipients=rcpt, formatdict=formatdict, subject=f"Your {slot.camp.title} event '{slot.event.title}' has been scheduled!", hold=True, )
import matplotlib.pyplot as plt def plot_learning_curve(): pass # plot_loss_change(learn.sched, sma=20) def plot_training_loss(train_losses): plt.plot(range(len(train_losses)), train_losses, 'b-') plt.xlabel('train_step') plt.ylabel('training_loss') plt.show() # https://towardsdatascience.com/estimating-optimal-learning-rate-for-a-deep-neural-network-ce32f2556ce0 def plot_smooth_training_loss_change(train_losses, learning_rates, sma=1, n_skip=20, y_lim=(-0.01,0.01)): """ Plots rate of change of the loss function. Parameters: train_losses - losses learning_rates - learning rate wrt to loss sma - number of batches for simple moving average to smooth out the curve. n_skip - number of batches to skip on the left. y_lim - limits for the y axis. """ derivatives = [0] * (sma + 1) for i in range(1 + sma, len(learning_rates)): derivative = (train_losses[i] - train_losses[i - sma]) / sma derivatives.append(derivative) plt.ylabel("d/loss") plt.xlabel("learning rate (log scale)") plt.plot(learning_rates[n_skip:], derivatives[n_skip:]) plt.xscale('log') plt.ylim(y_lim) def plot_validation_learning_curve(test_err): plt.plot(range(len(test_err)), test_err, 'r-') plt.xlabel('epoch') plt.ylabel('test_error_rate') plt.show() def plot_heatmap(heatmap): plt.imshow(heatmap) plt.show() def scatterplot(data, name): plt.scatter(data[:,0], data[:,1]) plt.title(name) # plt.legend(loc='best') plt.savefig(name + '.png') plt.clf() # plt.show()
// jingle bell time is a swell time var level = 1; //This is a % var levInt = 1; //This is level as an integer which is used for tab name var levSafe = 0.8; //To avoid seeing the background between the joins function update() { level = level + 0.05;//update it first if(level > 100) { level = 100; // Max out } levInt = Math.floor(level); // Update the int levSafe = level - 0.2; //Update the safevar document.getElementById('snowlow').style.height = level + "vh"; document.getElementById('snowupper').style.bottom = levSafe + "vh"; if (level == 100) { document.title = "Looks like you're snowed in!"; } else { document.title = levInt + "% snow"; } } // Tell it to exec every 30 ms. REALLY FAST. setInterval(update, 30);
import React from "react"; import Display from "./Display"; import ButtonPanel from "./ButtonPanel"; import calculate from "../logic/calculate"; import keyReference from "../logic/keyReference"; import "./App.css"; class App extends React.Component { constructor(props) { super(props); this.state = { total: null, next: null, operation: null, lastKey: "", history: [], }; } componentDidMount() { document.addEventListener("keydown", this.handleKeyDown); } makeCalculation = buttonName => { const calculation = calculate(this.state, buttonName); let history = this.state.history; if (!history.length && this.state.total && calculation.operation) { history.push(this.state.total); } if (!["AC", "=", "+/-", "+", "-", "x", "÷", "%"].includes(buttonName)) { history.push(buttonName); } if ( ["+", "-", "x", "÷"].includes(buttonName) && this.state.lastKey !== calculation.operation ) { history.push(buttonName); } if (buttonName === "%" && this.state.next) { history.push(buttonName); } if (buttonName === "+/-") { if (history.length && this.state.next) { history.splice( history.length - this.state.next.length, this.state.next.length, ); history = [...history, ...calculation.next.split("")]; } else { history.pop(); history.push(calculation.total); } } if (buttonName === "=" && calculation.next) { history = [...history]; } if (buttonName === "AC" || (buttonName === "=" && !calculation.next)) { history = []; } this.setState({ lastKey: buttonName, ...calculation, history, }); }; handleClick = buttonName => { this.makeCalculation(buttonName); }; handleUndo = () => { if (!this.state.operation && !this.state.next && this.state.total) return false; const history = this.state.history; const next = this.state.next; if (history.length) { const updatedHistory = history.slice(0, history.length - 1); const newNext = next !== null ? next.slice(0, -1) : null; const operation = !next && this.state.operation ? null : this.state.operation; this.setState({ next: newNext, history: updatedHistory, operation, }); } }; handleKeyDown = keyName => { const buttonName = keyReference(keyName); if (!buttonName) return false; if (buttonName === "Back") { this.handleUndo(); return; } this.makeCalculation(buttonName); }; render() { return ( <div className="component-app"> <Display state={this.state} handleUndo={this.handleUndo} /> <ButtonPanel clickHandler={this.handleClick} lastKey={this.state.lastKey} resetLastKey={this.resetLastKey} /> </div> ); } } export default App;
#!/usr/bin/env node /* eslint-disable func-names */ import Benchmark from "benchmark"; import seedrandom from "seedrandom"; import pkg from 'sprintf'; import { Graph, algorithms } from '../index.js'; const { sprintf } = pkg; const seed = process.env.SEED; seedrandom(seed, { global: true }); if (seed) { console.log("SEED: %s (%d)", seed, Math.random()); } const NODE_SIZES = [100]; const EDGE_DENSITY = 0.2; const KEY_SIZE = 10; function runBenchmark(name, fn) { const options = {}; options.onComplete = function(bench) { const {target} = bench; const {hz} = target; const {stats} = target; const {rme} = stats; const samples = stats.sample.length; const msg = sprintf(" %25s: %13s ops/sec \xb1 %s%% (%3d run(s) sampled)", target.name, Benchmark.formatNumber(hz.toFixed(2)), rme.toFixed(2), samples); console.log(msg); }; options.onError = (bench) => { console.error(`${bench.target.error}`); }; options.setup = function() { this.count = Math.random() * 1000; this.nextInt = function(range) { return Math.floor(this.count++ % range ); }; }; new Benchmark(name, fn, options).run(); } function keys(count) { const ks = []; let k; for (let i = 0; i < count; ++i) { k = ""; for (let j = 0; j < KEY_SIZE; ++j) { k += String.fromCharCode(97 + Math.floor(Math.random() * 26)); } ks.push(k); } return ks; } function buildGraph(numNodes, edgeDensity) { const g = new Graph(); const numEdges = numNodes * numNodes * edgeDensity; const ks = keys(numNodes); ks.forEach((k) => { g.setNode(k); }); for (let i = 0; i < numEdges; ++i) { let v; let w; do { v = ks[Math.floor(Math.random() * ks.length)]; w = ks[Math.floor(Math.random() * ks.length)]; } while (g.hasEdge(v, w)); g.setEdge(v, w); } return g; } NODE_SIZES.forEach((size) => { const g = buildGraph(size, EDGE_DENSITY); const nodes = g.nodes(); const edges = g.edges(); const nameSuffix = `(${size},${EDGE_DENSITY})`; runBenchmark(`nodes${ nameSuffix}`, () => { g.nodes(); }); runBenchmark(`sources${ nameSuffix}`, () => { g.sources(); }); runBenchmark(`sinks${ nameSuffix}`, () => { g.sinks(); }); runBenchmark(`filterNodes all${ nameSuffix}`, () => { g.filterNodes(() => true); }); runBenchmark(`filterNodes none${ nameSuffix}`, () => { g.filterNodes(() => false); }); runBenchmark(`setNode${ nameSuffix}`, () => { g.setNode("key", "label"); }); runBenchmark(`node${nameSuffix}`, function() { g.node(nodes[this.nextInt(nodes.length)]); }); runBenchmark(`set + removeNode${nameSuffix}`, () => { g.setNode("key"); g.removeNode("key"); }); runBenchmark(`predecessors${ nameSuffix}`, function() { g.predecessors(nodes[this.nextInt(nodes.length)]); }); runBenchmark(`successors${ nameSuffix}`, function() { g.successors(nodes[this.nextInt(nodes.length)]); }); runBenchmark(`neighbors${ nameSuffix}`, function() { g.neighbors(nodes[this.nextInt(nodes.length)]); }); runBenchmark(`edges${ nameSuffix}`, () => { g.edges(); }); runBenchmark(`setPath${ nameSuffix}`, () => { g.setPath(["a", "b", "c", "d", "e"]); }); runBenchmark(`setEdge${ nameSuffix}`, () => { g.setEdge("from", "to", "label"); }); runBenchmark(`edge${ nameSuffix}`, function() { const edge = edges[this.nextInt(edges.length)]; g.edge(edge); }); runBenchmark(`set + removeEdge${ nameSuffix}`, () => { g.setEdge("from", "to"); g.removeEdge("from", "to"); }); runBenchmark(`inEdges${ nameSuffix}`, function() { g.inEdges(nodes[this.nextInt(nodes.length)]); }); runBenchmark(`outEdges${ nameSuffix}`, function() { g.outEdges(nodes[this.nextInt(nodes.length)]); }); runBenchmark(`nodeEdges${ nameSuffix}`, function() { g.nodeEdges(nodes[this.nextInt(nodes.length)]); }); runBenchmark(`components${ nameSuffix}`, () => { algorithms.components(g); }); runBenchmark(`dijkstraAll${ nameSuffix}`, () => { algorithms.dijkstraAll(g); }); });
'use strict'; var defaults = require('../core/core.defaults'); var elements = require('../elements/index'); var helpers = require('../helpers/index'); defaults._set('bubble', { hover: { mode: 'single' }, scales: { xAxes: [{ type: 'linear', // bubble should probably use a linear scale by default position: 'bottom', id: 'x-axis-0' // need an ID so datasets can reference the scale }], yAxes: [{ type: 'linear', position: 'left', id: 'y-axis-0' }] }, tooltips: { callbacks: { title: function() { // Title doesn't make sense for scatter since we format the data as a point return ''; }, label: function(item, data) { var datasetLabel = data.datasets[item.datasetIndex].label || ''; var dataPoint = data.datasets[item.datasetIndex].data[item.index]; return datasetLabel + ': (' + item.xLabel + ', ' + item.yLabel + ', ' + dataPoint.r + ')'; } } } }); module.exports = function(Chart) { Chart.controllers.bubble = Chart.DatasetController.extend({ dataElementType: elements.Point, update: function(reset) { var me = this; var meta = me.getMeta(); var points = meta.data; // Update Points helpers.each(points, function(point, index) { me.updateElement(point, index, reset); }); }, updateElement: function(point, index, reset) { var me = this; var meta = me.getMeta(); var xScale = me.getScaleForId(meta.xAxisID); var yScale = me.getScaleForId(meta.yAxisID); var custom = point.custom || {}; var dataset = me.getDataset(); var data = dataset.data[index]; var pointElementOptions = me.chart.options.elements.point; var dsIndex = me.index; helpers.extend(point, { // Utility _xScale: xScale, _yScale: yScale, _datasetIndex: dsIndex, _index: index, // Desired view properties _model: { x: reset ? xScale.getPixelForDecimal(0.5) : xScale.getPixelForValue(typeof data === 'object' ? data : NaN, index, dsIndex), y: reset ? yScale.getBasePixel() : yScale.getPixelForValue(data, index, dsIndex), // Appearance radius: reset ? 0 : custom.radius ? custom.radius : me.getRadius(data), // Tooltip hitRadius: custom.hitRadius ? custom.hitRadius : helpers.valueAtIndexOrDefault(dataset.hitRadius, index, pointElementOptions.hitRadius) } }); // Trick to reset the styles of the point Chart.DatasetController.prototype.removeHoverStyle.call(me, point, pointElementOptions); var model = point._model; model.skip = custom.skip ? custom.skip : (isNaN(model.x) || isNaN(model.y)); point.pivot(); }, getRadius: function(value) { return value.r || this.chart.options.elements.point.radius; }, setHoverStyle: function(point) { var me = this; Chart.DatasetController.prototype.setHoverStyle.call(me, point); // Radius var dataset = me.chart.data.datasets[point._datasetIndex]; var index = point._index; var custom = point.custom || {}; var model = point._model; model.radius = custom.hoverRadius ? custom.hoverRadius : (helpers.valueAtIndexOrDefault(dataset.hoverRadius, index, me.chart.options.elements.point.hoverRadius)) + me.getRadius(dataset.data[index]); }, removeHoverStyle: function(point) { var me = this; Chart.DatasetController.prototype.removeHoverStyle.call(me, point, me.chart.options.elements.point); var dataVal = me.chart.data.datasets[point._datasetIndex].data[point._index]; var custom = point.custom || {}; var model = point._model; model.radius = custom.radius ? custom.radius : me.getRadius(dataVal); } }); };
const restify = require('restify'); const errs = require('restify-errors'); const { v4: uuidv4 } = require('uuid'); const debug = require('debug')('engine-server'); const verbose = require('debug')('engine-server-verbose'); const Session = require('./session.js'); const EventStream = require('./event_stream.js'); const { SessionStateStore } = require('./session_state.js'); const { PlayheadStateStore } = require('./playhead_state.js'); const { filterQueryParser, toHHMMSS } = require('./util.js'); const { version } = require('../package.json'); const sessions = {}; // Should be a persistent store... const eventStreams = {}; class ChannelEngine { constructor(assetMgr, options) { this.options = options; if (options && options.adCopyMgrUri) { this.adCopyMgrUri = options.adCopyMgrUri; } if (options && options.adXchangeUri) { this.adXchangeUri = options.adXchangeUri; } this.useDemuxedAudio = false; if (options && options.useDemuxedAudio === true) { this.useDemuxedAudio = true; } if (options && options.defaultSlateUri) { this.defaultSlateUri = options.defaultSlateUri; this.slateRepetitions = options.slateRepetitions || 10; this.slateDuration = options.slateDuration || 4000; } this.assetMgr = assetMgr; this.monitorTimer = {}; this.server = restify.createServer(); this.server.use(restify.plugins.queryParser()); this.serverStartTime = Date.now(); this.instanceId = uuidv4(); this.sessionStore = { sessionStateStore: new SessionStateStore({ redisUrl: options.redisUrl, memcachedUrl: options.memcachedUrl, cacheTTL: options.sharedStoreCacheTTL, }), playheadStateStore: new PlayheadStateStore({ redisUrl: options.redisUrl, memcachedUrl: options.memcachedUrl, cacheTTL: options.sharedStoreCacheTTL, }), instanceId: this.instanceId, }; if (options && options.staticDirectory) { this.server.get('/', restify.plugins.serveStatic({ directory: options.staticDirectory, default: 'index.html' })); } this.streamerOpts = {}; if (options && options.averageSegmentDuration) { this.streamerOpts.defaultAverageSegmentDuration = options.averageSegmentDuration; } if (options && options.cacheTTL) { this.streamerOpts.cacheTTL = options.cacheTTL; } this.logCloudWatchMetrics = false; if (options && options.cloudWatchMetrics) { this.logCloudWatchMetrics = true; } if (options && options.playheadDiffThreshold) { this.streamerOpts.defaultPlayheadDiffThreshold = options.playheadDiffThreshold; } if (options && options.maxTickInterval) { this.streamerOpts.defaultMaxTickInterval = options.maxTickInterval; } if (options && options.targetDurationPadding) { this.streamerOpts.targetDurationPadding = options.targetDurationPadding; } if (options && options.forceTargetDuration) { this.streamerOpts.forceTargetDuration = options.forceTargetDuration; } const handleMasterRoute = async (req, res, next) => { debug(req.params); let m; if (req.params.file.match(/master.m3u8/)) { await this._handleMasterManifest(req, res, next); } else if (m = req.params.file.match(/master(\d+).m3u8;session=(.*)$/)) { req.params[0] = m[1]; req.params[1] = m[2]; await this._handleMediaManifest(req, res, next); } else if (m = req.params.file.match(/master-(\S+)_(\S+).m3u8;session=(.*)$/)) { req.params[0] = m[1]; req.params[1] = m[2]; req.params[2] = m[3]; await this._handleAudioManifest(req, res, next); } }; this.server.get('/live/:file', async (req, res, next) => { await handleMasterRoute(req, res, next); }); this.server.get('/channels/:channelId/:file', async (req, res, next) => { req.query['channel'] = req.params.channelId; await handleMasterRoute(req, res, next); }); this.server.get('/eventstream/:sessionId', this._handleEventStream.bind(this)); this.server.get('/status/:sessionId', this._handleStatus.bind(this)); this.server.get('/health', this._handleAggregatedSessionHealth.bind(this)); this.server.get('/health/:sessionId', this._handleSessionHealth.bind(this)); this.server.get('/reset', this._handleSessionReset.bind(this)); this.server.on('NotFound', (req, res, err, next) => { res.header("X-Instance-Id", this.instanceId + `<${version}>`); return next(); }); this.server.on('InternalServer', (req, res, err, next) => { res.header("X-Instance-Id", this.instanceId + `<${version}>`); return next(); }); if (options && options.heartbeat) { this.server.get(options.heartbeat, this._handleHeartbeat.bind(this)); } if (options && options.channelManager) { const t = setInterval(async () => { await this.updateChannelsAsync(options.channelManager, options) }, 60 * 1000); } const ping = setInterval(async () => { await this.sessionStore.sessionStateStore.ping(this.instanceId); }, 3000); } async updateChannelsAsync(channelMgr, options) { debug(`Do we have any new channels?`); const newChannels = channelMgr.getChannels().filter(channel => !sessions[channel.id]); const addAsync = async (channel) => { debug(`Adding channel with ID ${channel.id}`); sessions[channel.id] = new Session(this.assetMgr, { sessionId: channel.id, averageSegmentDuration: channel.options && channel.options.averageSegmentDuration ? channel.options.averageSegmentDuration : this.streamerOpts.defaultAverageSegmentDuration, useDemuxedAudio: options.useDemuxedAudio, playheadDiffThreshold: channel.options && channel.options.playheadDiffThreshold ? channel.options.playheadDiffThreshold : this.streamerOpts.defaultPlayheadDiffThreshold, maxTickInterval: channel.options && channel.options.maxTickInterval ? channel.options.maxTickInterval : this.streamerOpts.defaultMaxTickInterval, targetDurationPadding: channel.options && channel.options.targetDurationPadding ? channel.options.targetDurationPadding : this.streamerOpts.targetDurationPadding, forceTargetDuration: channel.options && channel.options.forceTargetDuration ? channel.options.forceTargetDuration : this.streamerOpts.forceTargetDuration, profile: channel.profile, audioTracks: channel.audioTracks, closedCaptions: channel.closedCaptions, slateUri: channel.slate && channel.slate.uri ? channel.slate.uri : this.defaultSlateUri, slateRepetitions: channel.slate && channel.slate.repetitions ? channel.slate.repetitions : this.slateRepetitions, slateDuration: channel.slate && channel.slate.duration ? channel.slate.duration : this.slateDuration, cloudWatchMetrics: this.logCloudWatchMetrics, }, this.sessionStore); await sessions[channel.id].initAsync(); if (!this.monitorTimer[channel.id]) { this.monitorTimer[channel.id] = setInterval(async () => { await this._monitorAsync(sessions[channel.id]) }, 5000); } await sessions[channel.id].startPlayheadAsync(); }; await Promise.all(newChannels.map(channel => addAsync(channel))); debug(`Have any channels been removed?`); const removedChannels = Object.keys(sessions).filter(channelId => !channelMgr.getChannels().find(ch => ch.id == channelId)); const removeAsync = async (channelId) => { debug(`Removing channel with ID ${channelId}`); clearInterval(this.monitorTimer[channelId]); await sessions[channelId].stopPlayheadAsync(); delete sessions[channelId]; }; await Promise.all(removedChannels.map(channelId => removeAsync(channelId))); } start() { const startAsync = async (channelId) => { const session = sessions[channelId]; if (!this.monitorTimer[channelId]) { this.monitorTimer[channelId] = setInterval(async () => { await this._monitorAsync(session) }, 5000); } await session.startPlayheadAsync(); }; (async () => { debug("Starting engine"); await this.updateChannelsAsync(this.options.channelManager, this.options); await Promise.all(Object.keys(sessions).map(channelId => startAsync(channelId))); })(); } listen(port) { this.server.listen(port, () => { debug('%s listening at %s', this.server.name, this.server.url); }); } async getStatusForSessionAsync(sessionId) { return await sessions[sessionId].getStatusAsync(); } getSessionCount() { return Object.keys(sessions).length; } getPlayheadCount() { return Object.keys(sessions).filter(sessionId => sessions[sessionId].hasPlayhead()).length; } async _monitorAsync(session) { const status = await session.getStatusAsync(); debug(`MONITOR (${new Date().toISOString()}) [${status.sessionId}]: playhead: ${status.playhead.state}`); if (status.playhead.state === 'crashed') { debug(`[${status.sessionId}]: Playhead crashed, restarting`); await session.restartPlayheadAsync(); } else if (status.playhead.state === 'idle') { debug(`[${status.sessionId}]: Starting playhead`); await session.startPlayheadAsync(); } } _handleHeartbeat(req, res, next) { debug('req.url=' + req.url); res.send(200); next(); } async _handleMasterManifest(req, res, next) { debug('req.url=' + req.url); debug(req.query); let session; let options = {}; if (req.query['playlist']) { // Backward compatibility options.category = req.query['playlist']; } if (req.query['category']) { options.category = req.query['category']; } if (req.query['channel'] && sessions[req.query['channel']]) { session = sessions[req.query['channel']]; } else if (req.query['session'] && sessions[req.query['session']]) { session = sessions[req.query['session']]; } else { options.adCopyMgrUri = this.adCopyMgrUri; options.adXchangeUri = this.adXchangeUri; options.averageSegmentDuration = this.streamerOpts.defaultAverageSegmentDuration; options.useDemuxedAudio = this.useDemuxedAudio; options.playheadDiffThreshold = this.streamerOpts.defaultPlayheadDiffThreshold; options.maxTickInterval = this.streamerOpts.defaultMaxTickInterval; options.targetDurationPadding = this.streamerOpts.targetDurationPadding; options.forceTargetDuration = this.streamerOpts.forceTargetDuration; // if we are initiating a master manifest // outside of specific Channel context, // if slate options are set at the ChannelEngine level, then set these here if (this.defaultSlateUri) { options.slateUri = this.defaultSlateUri; } if (this.slateRepetitions) { options.slateRepetitions = this.slateRepetitions; } if (this.slateDuration) { options.slateDuration = this.slateDuration; } options.disabledPlayhead = true; // disable playhead for personalized streams session = new Session(this.assetMgr, options, this.sessionStore); await session.initAsync(); sessions[session.sessionId] = session; } if (req.query['startWithId']) { options.startWithId = req.query['startWithId']; debug(`New session to start with assetId=${options.startWithId}`); } if (session) { const eventStream = new EventStream(session); eventStreams[session.sessionId] = eventStream; let filter; if (req.query['filter']) { debug(`Applying filter on master manifest ${req.query['filter']}`); filter = filterQueryParser(req.query['filter']); } try { const body = await session.getMasterManifestAsync(filter); res.sendRaw(200, Buffer.from(body, 'utf8'), { "Content-Type": "application/x-mpegURL;charset=UTF-8", "Access-Control-Allow-Origin": "*", "Access-Control-Allow-Headers": "X-Session-Id", "Access-Control-Expose-Headers": "X-Session-Id", "Cache-Control": "no-cache", "X-Session-Id": session.sessionId, "X-Instance-Id": this.instanceId + `<${version}>`, }); next(); } catch (err) { next(this._errorHandler(err)); } } else { next(this._gracefulErrorHandler("Could not find a valid session")); } } async _handleAudioManifest(req, res, next) { debug(`req.url=${req.url}`); const session = sessions[req.params[2]]; if (session) { try { const body = await session.getCurrentAudioManifestAsync( req.params[0], req.params[1], req.headers["x-playback-session-id"] ); res.sendRaw(200, Buffer.from(body, 'utf8'), { "Content-Type": "application/x-mpegURL;charset=UTF-8", "Access-Control-Allow-Origin": "*", "Cache-Control": `max-age=${this.streamerOpts.cacheTTL || '4'}`, "X-Instance-Id": this.instanceId + `<${version}>`, }); next(); } catch (err) { next(this._gracefulErrorHandler(err)); } } else { const err = new errs.NotFoundError('Invalid session'); next(err); } } async _handleMediaManifest(req, res, next) { debug(`${req.headers["x-playback-session-id"]} req.url=${req.url}`); debug(req.params); const session = sessions[req.params[1]]; if (session) { try { const body = await session.getCurrentMediaManifestAsync(req.params[0], req.headers["x-playback-session-id"]); //verbose(`[${session.sessionId}] body=`); //verbose(body); res.sendRaw(200, Buffer.from(body, 'utf8'), { "Content-Type": "application/x-mpegURL;charset=UTF-8", "Access-Control-Allow-Origin": "*", "Cache-Control": `max-age=${this.streamerOpts.cacheTTL || '4'}`, "X-Instance-Id": this.instanceId + `<${version}>`, }); next(); } catch (err) { next(this._gracefulErrorHandler(err)); } } else { const err = new errs.NotFoundError('Invalid session'); next(err); } } _handleEventStream(req, res, next) { debug(`req.url=${req.url}`); const eventStream = eventStreams[req.params.sessionId]; if (eventStream) { eventStream.poll().then(body => { res.sendRaw(200, body, { "Content-Type": "application/json", "Access-Control-Allow-Origin": "*", "Cache-Control": "max-age=4", }); next(); }).catch(err => { next(this._errorHandler(err)); }); } else { // Silent error debug(`No event stream found for session=${req.params.sessionId}`); res.sendRaw(200, '{}', { "Content-Type": "application/json", "Access-Control-Allow-Origin": "*", "Cache-Control": "max-age=4", }); next(); } } async _handleStatus(req, res, next) { debug(`req.url=${req.url}`); const session = sessions[req.params.sessionId]; if (session) { const body = await session.getStatusAsync(); res.sendRaw(200, JSON.stringify(body), { "Content-Type": "application/json", "Access-Control-Allow-Origin": "*", "Cache-Control": "no-cache", }); next(); } else { const err = new errs.NotFoundError('Invalid session'); next(err); } } async _handleAggregatedSessionHealth(req, res, next) { debug(`req.url=${req.url}`); let failingSessions = []; let endpoints = []; for (const sessionId of Object.keys(sessions)) { const session = sessions[sessionId]; if (session && session.hasPlayhead()) { const status = await session.getStatusAsync(); if (status.playhead && status.playhead.state !== "running") { failingSessions.push(status); } endpoints.push({ health: '/health/' + sessionId, status: '/status/' + sessionId, playback: '/live/master.m3u8?channel=' + sessionId, }); } } const engineStatus = { startTime: new Date(this.serverStartTime).toISOString(), uptime: toHHMMSS((Date.now() - this.serverStartTime) / 1000), version: version, instanceId: this.instanceId, }; if (failingSessions.length === 0) { res.sendRaw(200, JSON.stringify({ "health": "ok", "engine": engineStatus, "count": endpoints.length, "sessionEndpoints": endpoints }), { "Content-Type": "application/json", "Access-Control-Allow-Origin": "*", "Cache-Control": "no-cache", }); } else { res.sendRaw(503, JSON.stringify({ "health": "unhealthy", "engine": engineStatus, "failed": failingSessions }), { "Content-Type": "application/json", "Access-Control-Allow-Origin": "*", "Cache-Control": "no-cache", }); } } async _handleSessionHealth(req, res, next) { debug(`req.url=${req.url}`); const session = sessions[req.params.sessionId]; if (session) { const status = await session.getStatusAsync(); if (status.playhead && status.playhead.state === "running") { res.sendRaw(200, JSON.stringify({ "health": "ok", "tick": status.playhead.tickMs, "mediaSeq": status.playhead.mediaSeq }), { "Content-Type": "application/json", "Access-Control-Allow-Origin": "*", "Cache-Control": "no-cache", }); } else { res.sendRaw(503, JSON.stringify({ "health": "unhealthy" }), { "Content-Type": "application/json", "Access-Control-Allow-Origin": "*", "Cache-Control": "no-cache", }); } } else { const err = new errs.NotFoundError('Invalid session'); next(err); } } async _handleSessionReset(req, res, next) { debug(`req.url=${req.url}`); let sessionResets = []; for (const sessionId of Object.keys(sessions)) { const session = sessions[sessionId]; if (session) { await session.resetAsync(); sessionResets.push(sessionId); } else { const err = new errs.NotFoundError('Invalid session'); next(err); } } res.sendRaw(200, JSON.stringify({ "status": "ok", "instanceId": this.instanceId, "resets": sessionResets }), { "Content-Type": "application/json", "Access-Control-Allow-Origin": "*", "Cache-Control": "no-cache", }); } _gracefulErrorHandler(errMsg) { console.error(errMsg); const err = new errs.NotFoundError(errMsg); return err; } _errorHandler(errMsg) { console.error(errMsg); const err = new errs.InternalServerError(errMsg); return err; } } module.exports = ChannelEngine;
import React from 'react' import ReactDOM from 'react-dom' import ProgressButton, {STATE} from '../../lib/index' import createReactClass from 'create-react-class' const App = createReactClass({ getInitialState () { return { button1State: STATE.NOTHING, button2State: STATE.NOTHING, button3State: STATE.DISABLED } }, render () { return ( <div> <div id='button-success'> <ProgressButton state={this.state.button1State} onClick={this.handleClick1}> Go! </ProgressButton> </div> <div id='button-error'> <ProgressButton state={this.state.button2State} onClick={this.handleClick2}> Go! </ProgressButton> </div> <div id='button-disabled'> <ProgressButton state={this.state.button3State}> Don't Go! </ProgressButton> </div> </div> ) }, handleClick1 () { this.setState({button1State: STATE.LOADING}) // make asynchronous call setTimeout(() => { this.setState({button1State: STATE.SUCCESS}) }, 3000) }, handleClick2 () { this.setState({button2State: STATE.LOADING}) // make asynchronous call setTimeout(() => { this.setState({button2State: STATE.ERROR}) }, 3000) } }) ReactDOM.render(<App />, document.getElementById('app'))
# -*- coding: utf-8 -*- from layers.dynamic_rnn import DynamicLSTM import numpy as np import math import torch import torch.nn as nn import torch.nn.functional as F class PositionProximity(nn.Module): def __init__(self, opt): self.opt = opt super(PositionProximity, self).__init__() def forward(self, x, aspect_double_idx, text_len, aspect_len): batch_size, seq_len = x.shape[0], x.shape[1] weight = self.weight_matrix(aspect_double_idx, text_len, aspect_len, batch_size, seq_len).to(self.opt.device) x = weight.unsqueeze(2)*x return x def weight_matrix(self, aspect_double_idx, text_len, aspect_len, batch_size, seq_len): aspect_double_idx = aspect_double_idx.cpu().numpy() text_len = text_len.cpu().numpy() aspect_len = aspect_len.cpu().numpy() weight = [[] for i in range(batch_size)] for i in range(batch_size): context_len = text_len[i] - aspect_len[i] for j in range(aspect_double_idx[i,0]): weight[i].append(1-(aspect_double_idx[i,0]-j)/context_len) for j in range(aspect_double_idx[i,0], aspect_double_idx[i,1]+1): weight[i].append(0) for j in range(aspect_double_idx[i,1]+1, text_len[i]): weight[i].append(1-(j-aspect_double_idx[i,1])/context_len) for j in range(text_len[i], seq_len): weight[i].append(0) return torch.tensor(weight) class PWCN_POS(nn.Module): def __init__(self, embedding_matrix, opt): super(PWCN_POS, self).__init__() self.opt = opt self.embed = nn.Embedding.from_pretrained(torch.tensor(embedding_matrix, dtype=torch.float)) self.embed_dropout = nn.Dropout(0.3) self.txt_lstm = DynamicLSTM(opt.embed_dim, opt.hidden_dim, num_layers=1, batch_first=True, bidirectional=True) self.proximity = PositionProximity(opt) self.convs3 = nn.Conv1d(2*opt.hidden_dim, 2*opt.hidden_dim, 3, padding=1) self.fc = nn.Linear(2*opt.hidden_dim, opt.polarities_dim) def forward(self, inputs): text_indices, aspect_indices, left_indices = inputs txt_len = torch.sum(text_indices != 0, dim=1) asp_len = torch.sum(aspect_indices != 0, dim=1) left_len = torch.sum(left_indices != 0, dim=-1) aspect_double_idx = torch.cat([left_len.unsqueeze(-1), (left_len+asp_len-1).unsqueeze(-1)], dim=-1) txt_out = self.embed_dropout(self.embed(text_indices)) txt_out, (_, _) = self.txt_lstm(txt_out, txt_len) z = F.relu(self.convs3( self.proximity(txt_out, aspect_double_idx, txt_len, asp_len).transpose(1, 2))) # [(N,Co,L), ...]*len(Ks) z = F.max_pool1d(z, z.size(2)).squeeze(2) out = self.fc(z) return out
import React from 'react'; import PropTypes from 'prop-types'; import { Button } from '@material-ui/core'; import { noop } from 'lodash'; import { useStyles } from './delete-button.styles'; const DeleteButton = ({ children, onClickHandler, ...props }) => { const styles = useStyles(); return ( <div className={styles.button}> <Button variant='outlined' onClick={onClickHandler} {...props}> {children} </Button> </div> ); }; DeleteButton.propTypes = { children: PropTypes.node.isRequired, onClickHandler: PropTypes.func, size: PropTypes.string }; DeleteButton.defaultProps = { size: 'medium', onClickHandler: noop }; export default DeleteButton;
import pytest from aoc2021 import day05 @pytest.mark.parametrize( ("name", "expected"), [("sample", 5), ("full", 5690)], ) def test_day05_part1(name: str, expected: int): data_path = f"data/day05-{name}.txt" assert day05.part1(data_path) == expected @pytest.mark.parametrize( ("name", "expected"), [("sample", 12), ("full", 17741)], ) def test_day05_part2(name: str, expected: int): data_path = f"data/day05-{name}.txt" assert day05.part2(data_path) == expected
""" The MIT License (MIT) Copyright (c) 2021-present VincentRPS Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. """ from __future__ import annotations from typing import List, Optional, TypedDict from .snowflake import Snowflake class WelcomeScreen(TypedDict): description: str welcome_channels: List[WelcomeScreenChannel] class WelcomeScreenChannel(TypedDict): channel_id: Snowflake description: str emoji_id: Optional[Snowflake] emoji_name: Optional[str]
import numpy as np import numpy.linalg as npla def qr_iteration(A, tol): # Your implementation goes here for i in range(A.shape[1] - 1, 0, -1): while npla.norm(A[i - 1, :i - 1], ord=2) > tol: sigma = A[i, i] Q, R = npla.qr(A - sigma * np.diag(np.diag(np.ones(A.shape)))) A = np.dot(R, Q) + sigma * np.diag(np.diag(np.ones(A.shape))) return np.diag(A) def main(): tol = 10 ** (-16) A_1 = np.array([[2, 3, 2], [10, 3, 4], [3, 6, 1]]) eigenvalues_1 = qr_iteration(A_1.copy(), tol) print("Matrix:\n", A_1) print("\n") print ("Computed eigenvalues: ", eigenvalues_1) print ("Actual eigenvalues: ", np.linalg.eigvals(A_1)) print("\n\n") tol = 10 ** (-16) A_2 = np.array([[6, 2, 1], [2, 3, 1], [1, 1, 1]]) eigenvalues_2 = qr_iteration(A_2.copy(), tol) print("Matrix:\n", A_2) print("\n") print ("Computed eigenvalues: ", eigenvalues_2) print ("Actual eigenvalues: ", np.linalg.eigvals(A_2)) if __name__ == '__main__': main()
#coding=utf-8 ''' @author: dengdan ''' import cv2 import numpy as np import logging import math from . import event import util IMREAD_GRAY = 0 IMREAD_COLOR = 1 IMREAD_UNCHANGED = -1 COLOR_WHITE =(255, 255, 255) COLOR_BLACK = (0, 0, 0) COLOR_GREEN = (0, 255, 0) COLOR_RGB_RED = (255, 0, 0) COLOR_BGR_RED = (0, 0, 255) COLOR_RGB_BLUE = (0, 0, 255) COLOR_BGR_BLUE = (255, 0, 0) COLOR_RGB_YELLOW = (255, 255, 0) COLOR_BGR_YELLOW = (0, 255, 255) COLOR_RGB_GRAY = (47, 79, 79) COLOR_RGB_PINK = (255, 192, 203) def imread(path, rgb = False, mode = cv2.IMREAD_COLOR): path = util.io.get_absolute_path(path) img = cv2.imread(path, mode) if img is None: raise IOError('File not found:%s'%(path)) if rgb: img = bgr2rgb(img) return img def imshow(winname, img, block = True, position = None, maximized = False, rgb = False): if isinstance(img, str): img = imread(path = img) cv2.namedWindow(winname, cv2.WINDOW_NORMAL) if rgb: img = rgb2bgr(img) cv2.imshow(winname, img) if position is not None: # cv2.moveWindow(winname, position[0], position[1]) move_win(winname, position) if maximized: maximize_win(winname) if block: # cv2.waitKey(0) event.wait_key(" ") cv2.destroyAllWindows() def imwrite(path, img, rgb = False): if rgb: img = rgb2bgr(img) path = util.io.get_absolute_path(path) util.io.make_parent_dir(path) cv2.imwrite(path, img) def move_win(winname, position = (0, 0)): """ move pyplot window """ cv2.moveWindow(winname, position[0], position[1]) def maximize_win(winname): cv2.setWindowProperty(winname, cv2.WND_PROP_FULLSCREEN, True); def eq_color(target, color): for i, c in enumerate(color): if target[i] != color[i]: return False return True def is_white(color): for c in color: if c < 255: return False return True def black(shape): if len(np.shape(shape)) >= 2: shape = get_shape(shape) shape = [int(v) for v in shape] return np.zeros(shape, np.uint8) def white(shape, value = 255): if len(np.shape(shape)) >= 2: shape = get_shape(shape) return np.ones(shape, np.uint8) * np.uint8(value) def bgr2rgb(img): return cv2.cvtColor(img, cv2.COLOR_BGR2RGB) def rgb2bgr(img): return cv2.cvtColor(img, cv2.COLOR_RGB2BGR) def rgb2gray(img): return cv2.cvtColor(img, cv2.COLOR_RGB2GRAY) def bgr2gray(img): return cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) def ds_size(image_size, kernel_size, stride): """calculate the size of downsampling result""" image_x, image_y = image_size kernel_x, kernel_y = kernel_size stride_x, stride_y = stride def f(iw, kw, sw): return int(np.floor((iw - kw) / sw) + 1) output_size = (f(image_x, kernel_x, stride_x), f(image_y, kernel_y, stride_y)) return output_size def get_roi(img, p1, p2): """ extract region of interest from an image. p1, p2: two tuples standing for two opposite corners of the rectangle bounding the roi. Their order is arbitrary. """ x1, y1 = p1 x2, y2 = p2 x_min = min([x1, x2]) y_min = min([y1, y2]) x_max = max([x1, x2]) + 1 y_max = max([y1, y2]) + 1 return img[y_min: y_max, x_min: x_max] def rectangle(img, left_up, right_bottom, color, border_width = 1): left_up = (int(left_up[0]), int(left_up[1])) right_bottom = (int(right_bottom[0]), int(right_bottom[1])) cv2.rectangle(img, left_up, right_bottom, color, border_width) def circle(img, center, r, color, border_width = 1): center = (int(center[0]), int(center[1])) cv2.circle(img, center, r, color, border_width) def render_points(img, points, color): for p in points: x, y = p img[y][x] = color def draw_contours(img, contours, idx = -1, color = 1, border_width = 1): # img = img.copy() cv2.drawContours(img, contours, idx, color, border_width) return img def get_contour_rect_box(contour): x,y,w,h = cv2.boundingRect(contour) return x, y, w, h def get_contour_region_in_rect(img, contour): x, y, w, h = get_contour_rect_box(contour) lu, rb = (x, y), (x + w, y + h) return get_roi(img, lu, rb) def get_contour_min_area_box(contour): rect = cv2.minAreaRect(contour) box = cv2.cv.BoxPoints(rect) box = np.int0(box) return box def get_contour_region_in_min_area_rect(img, cnt): # find the min area rect of contour rect = cv2.minAreaRect(cnt) angle = rect[-1] box = cv2.cv.BoxPoints(rect) box_cnt = points_to_contour(box) # find the rectangle containing box_cnt, and set it as ROI outer_rect = get_contour_rect_box(box_cnt) x, y, w, h = outer_rect img = get_roi(img, (x, y), (x + w, y + h)) box = [(ox - x, oy - y) for (ox, oy) in box] # rotate ROI and corner points rows, cols = get_shape(img) M = cv2.getRotationMatrix2D((cols/2,rows/2), angle, scale = 1) dst = cv2.warpAffine(img,M,(cols,rows)) bar_xy = np.hstack((box, np.ones((4, 1)))) new_corners = np.dot(M, np.transpose(bar_xy)) new_corners = util.dtype.int(np.transpose(new_corners)) # cnt = points_to_contour(new_corners) xs = new_corners[:, 0] ys = new_corners[:, 1] lu = (min(xs), min(ys)) rb = (max(xs), max(ys)) return get_roi(dst, lu, rb) def contour_to_points(contour): return np.asarray([c[0] for c in contour]) def points_to_contour(points): contours = [[list(p)]for p in points] return np.asarray(contours, dtype = np.int32) def points_to_contours(points): return np.asarray([points_to_contour(points)]) def get_contour_region_iou(I, cnt1, cnt2): """ calculate the iou of two contours """ mask1 = util.img.black(I) draw_contours(mask1, [cnt1], color = 1, border_width = -1) mask2 = util.img.black(I) draw_contours(mask2, [cnt2], color = 1, border_width = -1) union_mask = ((mask1 + mask2) >=1) * 1 intersect_mask = (mask1 * mask2 >= 1) * 1 return np.sum(intersect_mask) * 1.0 / np.sum(union_mask) def fill_bbox(img, box, color = 1): """ filling a bounding box with color. box: a list of 4 points, in clockwise order, as the four vertice of a bounding box """ util.test.assert_equal(np.shape(box), (4, 2)) cnt = to_contours(box) draw_contours(img, cnt, color = color, border_width = -1) def get_rect_points(left_up, right_bottom): """ given the left up and right bottom points of a rectangle, return its four points """ right_bottom, left_up = np.asarray(right_bottom), np.asarray(left_up) w, h = right_bottom - left_up x, y = left_up points = [(x, y), (x + w, y), (x + w, y + h), (x, y + h)] return points def rect_perimeter(left_up, right_bottom): """ calculate the perimeter of the rectangle described by its left-up and right-bottom point. """ return sum(np.asarray(right_bottom) - np.asarray(left_up)) * 2 def rect_area(left_up, right_bottom): wh = np.asarray(right_bottom) - np.asarray(left_up) + 1 return np.prod(wh) def apply_mask(img, mask): """ the img will be masked in place. """ c = np.shape(img)[-1] for i in range(c): img[:, :, i] = img[:, :, i] * mask return img def get_shape(img): """ return the height and width of an image """ return np.shape(img)[0:2] def get_wh(img): return np.shape(img)[0:2][::-1] def get_value(img, x, y = None): if y == None: y = x[1] x = x[0] return img[y][x] def set_value(img, xy, val): x, y = xy img[y][x] = val def filter2D(img, kernel): dst = cv2.filter2D(img, -1, kernel) return dst def average_blur(img, shape = (5, 5)): return cv2.blur(img, shape) def gaussian_blur(img, shape = (5, 5), sigma = 0): # sigma --> sigmaX, sigmaY blur = cv2.GaussianBlur(img,shape, sigma) return blur def bilateral_blur(img, d = 9, sigmaColor = 75, sigmaSpace = 75): dst = cv2.bilateralFilter(img, d, sigmaColor, sigmaSpace) return dst BLUR_AVERAGE = 'average' BLUR_GAUSSIAN = 'gaussian' BLUR_BILATERAL = 'bilateral' _blur_dict = { BLUR_AVERAGE: average_blur, BLUR_GAUSSIAN: gaussian_blur, BLUR_BILATERAL: bilateral_blur } def blur(img, blur_type): fn = _blur_dict[blur_type] return fn(img) def put_text(img, text, pos, scale = 1, color = COLOR_WHITE, thickness = 1): pos = np.int32(pos) font = cv2.FONT_HERSHEY_SIMPLEX cv2.putText(img = img, text = text, org = tuple(pos), fontFace = font, fontScale = scale, color = color, thickness = thickness) def resize(img, f = None, fx = None, fy = None, size = None, interpolation = cv2.INTER_LINEAR): """ size: (w, h) """ h, w = get_shape(img) if fx != None and fy != None: return cv2.resize(img, None, fx = fx, fy = fy, interpolation = interpolation) if size != None: size = util.dtype.int(size) # size = (size[1], size[0]) size = tuple(size) return cv2.resize(img, size, interpolation = interpolation) return cv2.resize(img, None, fx = f, fy = f, interpolation = interpolation) def translate(img, delta_x, delta_y, size = None): M = np.float32([[1,0, delta_x],[0,1, delta_y]]) if size == None: size = get_wh(img) dst = cv2.warpAffine(img,M, size) return dst def rotate_about_center(src, angle, scale=1.): """https://www.oschina.net/translate/opencv-rotation""" w = src.shape[1] h = src.shape[0] rangle = np.deg2rad(angle) # angle in radians # now calculate new image width and height nw = (abs(np.sin(rangle)*h) + abs(np.cos(rangle)*w))*scale nh = (abs(np.cos(rangle)*h) + abs(np.sin(rangle)*w))*scale # ask OpenCV for the rotation matrix rot_mat = cv2.getRotationMatrix2D((nw*0.5, nh*0.5), angle, scale) # calculate the move from the old center to the new center combined # with the rotation rot_move = np.dot(rot_mat, np.array([(nw-w)*0.5, (nh-h)*0.5,0])) # the move only affects the translation, so update the translation # part of the transform rot_mat[0,2] += rot_move[0] rot_mat[1,2] += rot_move[1] return cv2.warpAffine(src, rot_mat, (int(math.ceil(nw)), int(math.ceil(nh))), flags=cv2.INTER_LANCZOS4), rot_mat def get_rect_iou(rects1, rects2): """ calculate the iou between rects1 and rects2 each rect consists of four points:[min_x, min_y, max_x, max_y] return: a iou matrix, len(rects1) * len(rects2) """ rects1, rects2 = np.asarray(rects1), np.asarray(rects2) def _to_matrix(p, ps): p = np.ones((len(ps), 1)) * p ps = np.reshape(ps, (len(ps), 1)) temp =np.hstack([p, ps]) return temp def _get_max(p, ps): return np.max(_to_matrix(p, ps), axis = 1) def _get_min(p, ps): return np.min(_to_matrix(p, ps), axis = 1) def _get_area(rect): w, h = rect[:, 2] - rect[:, 0] + 1.0 , rect[:, 3] - rect[:, 1] + 1.0 return w * h def _get_inter(rect1, rects2): x1 = _get_max(rect1[0], rects2[:, 0]) y1 = _get_max(rect1[1], rects2[:, 1]) x2 = _get_min(rect1[2], rects2[:, 2]) y2 = _get_min(rect1[3], rects2[:, 3]) w,h = x2-x1 +1, y2 - y1 + 1 areas = w * h areas[np.where(w < 0)] = 0 areas[np.where(h < 0)] = 0 return areas area2 = _get_area(rects2) area1 = _get_area(rects1) iou = np.zeros((len(rects1), len(rects2))) for ri in range(len(rects1)): inter = _get_inter(rects1[ri, :], rects2) union = area1[ri] + area2 - inter iou[ri, :] = np.transpose( inter / union) return iou def find_contours(mask): mask = np.asarray(mask, dtype = np.uint8) mask = mask.copy() contours, _ = cv2.findContours(mask, mode = cv2.RETR_CCOMP, method = cv2.CHAIN_APPROX_SIMPLE) return contours def find_two_level_contours(mask): mask = mask.copy() contours, tree = cv2.findContours(mask, mode = cv2.RETR_CCOMP, method = cv2.CHAIN_APPROX_SIMPLE) return contours, tree def is_in_contour(point, cnt): """tell whether a point is in contour or not. In-contour here includes both the 'in contour' and 'on contour' cases. point:(x, y) cnt: a cv2 contour """ # doc of pointPolygonTest: http://docs.opencv.org/2.4/modules/imgproc/doc/structural_analysis_and_shape_descriptors.html?highlight=pointpolygontest#cv.PointPolygonTest # the last argument means only tell if in or not, without calculating the shortest distance in_cnt = cv2.pointPolygonTest(cnt, point, False) return in_cnt >= 0; def convex_hull(contour): hull = cv2.convexHull(contour, returnPoints=1) return hull def random_color_3(): c = util.rand.randint(low = 0, high = 255, shape = (3, )) # c = np.uint8(c) return c def get_contour_area(cnt): return cv2.contourArea(cnt) def is_valid_jpg(jpg_file): with open(jpg_file, 'rb') as f: f.seek(-2, 2) return f.read() == '\xff\xd9' def rotate_point_by_90(x, y, k, w = 1.0, h = 1.0): """ Rotate a point xy on an image by k * 90 degrees. Params: x, y: a point, (x, y). If not normalized within 0 and 1, the width and height of the image should be specified clearly. w, h: the width and height of image k: k * 90 degrees will be rotated """ k = k % 4 if k == 0: return x, y elif k == 1: return y, w - x elif k == 2: return w - x, h - y elif k == 3: return h - y, x def min_area_rect(xs, ys): """ Args: xs: numpy ndarray with shape=(N,4). N is the number of oriented bboxes. 4 contains [x1, x2, x3, x4] ys: numpy ndarray with shape=(N,4), [y1, y2, y3, y4] Note that [(x1, y1), (x2, y2), (x3, y3), (x4, y4)] can represent an oriented bbox. Return: the oriented rects sorrounding the box, in the format:[cx, cy, w, h, theta]. """ xs = np.asarray(xs, dtype = np.float32) ys = np.asarray(ys, dtype = np.float32) num_rects = xs.shape[0] box = np.empty((num_rects, 5))#cx, cy, w, h, theta for idx in xrange(num_rects): points = zip(xs[idx, :], ys[idx, :]) cnt = points_to_contour(points) rect = cv2.minAreaRect(cnt) cx, cy = rect[0] w, h = rect[1] theta = rect[2] box[idx, :] = [cx, cy, w, h, theta] box = np.asarray(box, dtype = xs.dtype) return box
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties"; import _extends from "@babel/runtime/helpers/esm/extends"; import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; import * as React from 'react'; import PropTypes from 'prop-types'; import clsx from 'clsx'; import { unstable_composeClasses as composeClasses } from '@mui/base'; import styled from '../styles/styled'; import useThemeProps from '../styles/useThemeProps'; import ButtonBase from '../ButtonBase'; import StepLabel from '../StepLabel'; import isMuiElement from '../utils/isMuiElement'; import StepperContext from '../Stepper/StepperContext'; import StepContext from '../Step/StepContext'; import stepButtonClasses, { getStepButtonUtilityClass } from './stepButtonClasses'; import { jsx as _jsx } from "react/jsx-runtime"; var useUtilityClasses = function useUtilityClasses(ownerState) { var classes = ownerState.classes, orientation = ownerState.orientation; var slots = { root: ['root', orientation], touchRipple: ['touchRipple'] }; return composeClasses(slots, getStepButtonUtilityClass, classes); }; var StepButtonRoot = styled(ButtonBase, { name: 'MuiStepButton', slot: 'Root', overridesResolver: function overridesResolver(props, styles) { var ownerState = props.ownerState; return [_defineProperty({}, "& .".concat(stepButtonClasses.touchRipple), styles.touchRipple), styles.root, styles[ownerState.orientation]]; } })(function (_ref2) { var ownerState = _ref2.ownerState; return _extends({ width: '100%', padding: '24px 16px', margin: '-24px -16px', boxSizing: 'content-box' }, ownerState.orientation === 'vertical' && { justifyContent: 'flex-start', padding: '8px', margin: '-8px' }, _defineProperty({}, "& .".concat(stepButtonClasses.touchRipple), { color: 'rgba(0, 0, 0, 0.3)' })); }); var StepButton = /*#__PURE__*/React.forwardRef(function StepButton(inProps, ref) { var props = useThemeProps({ props: inProps, name: 'MuiStepButton' }); var children = props.children, className = props.className, icon = props.icon, optional = props.optional, other = _objectWithoutProperties(props, ["children", "className", "icon", "optional"]); var _React$useContext = React.useContext(StepContext), disabled = _React$useContext.disabled; var _React$useContext2 = React.useContext(StepperContext), orientation = _React$useContext2.orientation; var ownerState = _extends({}, props, { orientation: orientation }); var classes = useUtilityClasses(ownerState); var childProps = { icon: icon, optional: optional }; var child = isMuiElement(children, ['StepLabel']) ? /*#__PURE__*/React.cloneElement(children, childProps) : /*#__PURE__*/_jsx(StepLabel, _extends({}, childProps, { children: children })); return /*#__PURE__*/_jsx(StepButtonRoot, _extends({ focusRipple: true, disabled: disabled, TouchRippleProps: { className: classes.touchRipple }, className: clsx(classes.root, className), ref: ref, ownerState: ownerState }, other, { children: child })); }); process.env.NODE_ENV !== "production" ? StepButton.propTypes /* remove-proptypes */ = { // ----------------------------- Warning -------------------------------- // | These PropTypes are generated from the TypeScript type definitions | // | To update them edit the d.ts file and run "yarn proptypes" | // ---------------------------------------------------------------------- /** * Can be a `StepLabel` or a node to place inside `StepLabel` as children. */ children: PropTypes.node, /** * Override or extend the styles applied to the component. */ classes: PropTypes.object, /** * @ignore */ className: PropTypes.string, /** * The icon displayed by the step label. */ icon: PropTypes.node, /** * The optional node to display. */ optional: PropTypes.node, /** * The system prop that allows defining system overrides as well as additional CSS styles. */ sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object])), PropTypes.func, PropTypes.object]) } : void 0; export default StepButton;
const nav = document.querySelector('.nav') window.addEventListener('scroll', fixNav) function fixNav() { if (window.scrollY > nav.offsetHeight + 150) { nav.classList.add('active') } else { nav.classList.remove('active') } }
from itertools import product import numpy as np from scipy.sparse import (bsr_matrix, coo_matrix, csc_matrix, csr_matrix, dok_matrix, lil_matrix, issparse) import pytest from sklearn import metrics from sklearn import neighbors, datasets from sklearn.exceptions import DataConversionWarning from sklearn.metrics.pairwise import pairwise_distances from sklearn.model_selection import cross_val_score from sklearn.model_selection import train_test_split from sklearn.neighbors.base import VALID_METRICS_SPARSE, VALID_METRICS from sklearn.utils.testing import assert_array_almost_equal from sklearn.utils.testing import assert_array_equal from sklearn.utils.testing import assert_equal from sklearn.utils.testing import assert_false from sklearn.utils.testing import assert_greater from sklearn.utils.testing import assert_in from sklearn.utils.testing import assert_raises from sklearn.utils.testing import assert_raises_regex from sklearn.utils.testing import assert_true from sklearn.utils.testing import assert_warns from sklearn.utils.testing import assert_warns_message from sklearn.utils.testing import ignore_warnings from sklearn.utils.validation import check_random_state from sklearn.externals.joblib import parallel_backend rng = np.random.RandomState(0) # load and shuffle iris dataset iris = datasets.load_iris() perm = rng.permutation(iris.target.size) iris.data = iris.data[perm] iris.target = iris.target[perm] # load and shuffle digits digits = datasets.load_digits() perm = rng.permutation(digits.target.size) digits.data = digits.data[perm] digits.target = digits.target[perm] SPARSE_TYPES = (bsr_matrix, coo_matrix, csc_matrix, csr_matrix, dok_matrix, lil_matrix) SPARSE_OR_DENSE = SPARSE_TYPES + (np.asarray,) ALGORITHMS = ('ball_tree', 'brute', 'kd_tree', 'auto') P = (1, 2, 3, 4, np.inf) # Filter deprecation warnings. neighbors.kneighbors_graph = ignore_warnings(neighbors.kneighbors_graph) neighbors.radius_neighbors_graph = ignore_warnings( neighbors.radius_neighbors_graph) def _weight_func(dist): """ Weight function to replace lambda d: d ** -2. The lambda function is not valid because: if d==0 then 0^-2 is not valid. """ # Dist could be multidimensional, flatten it so all values # can be looped with np.errstate(divide='ignore'): retval = 1. / dist return retval ** 2 def test_unsupervised_kneighbors(n_samples=20, n_features=5, n_query_pts=2, n_neighbors=5): # Test unsupervised neighbors methods X = rng.rand(n_samples, n_features) test = rng.rand(n_query_pts, n_features) for p in P: results_nodist = [] results = [] for algorithm in ALGORITHMS: neigh = neighbors.NearestNeighbors(n_neighbors=n_neighbors, algorithm=algorithm, p=p) neigh.fit(X) results_nodist.append(neigh.kneighbors(test, return_distance=False)) results.append(neigh.kneighbors(test, return_distance=True)) for i in range(len(results) - 1): assert_array_almost_equal(results_nodist[i], results[i][1]) assert_array_almost_equal(results[i][0], results[i + 1][0]) assert_array_almost_equal(results[i][1], results[i + 1][1]) def test_unsupervised_inputs(): # test the types of valid input into NearestNeighbors X = rng.random_sample((10, 3)) nbrs_fid = neighbors.NearestNeighbors(n_neighbors=1) nbrs_fid.fit(X) dist1, ind1 = nbrs_fid.kneighbors(X) nbrs = neighbors.NearestNeighbors(n_neighbors=1) for input in (nbrs_fid, neighbors.BallTree(X), neighbors.KDTree(X)): nbrs.fit(input) dist2, ind2 = nbrs.kneighbors(X) assert_array_almost_equal(dist1, dist2) assert_array_almost_equal(ind1, ind2) def test_n_neighbors_datatype(): # Test to check whether n_neighbors is integer X = [[1, 1], [1, 1], [1, 1]] expected_msg = "n_neighbors does not take .*float.* " \ "value, enter integer value" msg = "Expected n_neighbors > 0. Got -3" neighbors_ = neighbors.NearestNeighbors(n_neighbors=3.) assert_raises_regex(TypeError, expected_msg, neighbors_.fit, X) assert_raises_regex(ValueError, msg, neighbors_.kneighbors, X=X, n_neighbors=-3) assert_raises_regex(TypeError, expected_msg, neighbors_.kneighbors, X=X, n_neighbors=3.) def test_precomputed(random_state=42): """Tests unsupervised NearestNeighbors with a distance matrix.""" # Note: smaller samples may result in spurious test success rng = np.random.RandomState(random_state) X = rng.random_sample((10, 4)) Y = rng.random_sample((3, 4)) DXX = metrics.pairwise_distances(X, metric='euclidean') DYX = metrics.pairwise_distances(Y, X, metric='euclidean') for method in ['kneighbors']: # TODO: also test radius_neighbors, but requires different assertion # As a feature matrix (n_samples by n_features) nbrs_X = neighbors.NearestNeighbors(n_neighbors=3) nbrs_X.fit(X) dist_X, ind_X = getattr(nbrs_X, method)(Y) # As a dense distance matrix (n_samples by n_samples) nbrs_D = neighbors.NearestNeighbors(n_neighbors=3, algorithm='brute', metric='precomputed') nbrs_D.fit(DXX) dist_D, ind_D = getattr(nbrs_D, method)(DYX) assert_array_almost_equal(dist_X, dist_D) assert_array_almost_equal(ind_X, ind_D) # Check auto works too nbrs_D = neighbors.NearestNeighbors(n_neighbors=3, algorithm='auto', metric='precomputed') nbrs_D.fit(DXX) dist_D, ind_D = getattr(nbrs_D, method)(DYX) assert_array_almost_equal(dist_X, dist_D) assert_array_almost_equal(ind_X, ind_D) # Check X=None in prediction dist_X, ind_X = getattr(nbrs_X, method)(None) dist_D, ind_D = getattr(nbrs_D, method)(None) assert_array_almost_equal(dist_X, dist_D) assert_array_almost_equal(ind_X, ind_D) # Must raise a ValueError if the matrix is not of correct shape assert_raises(ValueError, getattr(nbrs_D, method), X) target = np.arange(X.shape[0]) for Est in (neighbors.KNeighborsClassifier, neighbors.RadiusNeighborsClassifier, neighbors.KNeighborsRegressor, neighbors.RadiusNeighborsRegressor): print(Est) est = Est(metric='euclidean') est.radius = est.n_neighbors = 1 pred_X = est.fit(X, target).predict(Y) est.metric = 'precomputed' pred_D = est.fit(DXX, target).predict(DYX) assert_array_almost_equal(pred_X, pred_D) @pytest.mark.filterwarnings('ignore: You should specify a value') # 0.22 def test_precomputed_cross_validation(): # Ensure array is split correctly rng = np.random.RandomState(0) X = rng.rand(20, 2) D = pairwise_distances(X, metric='euclidean') y = rng.randint(3, size=20) for Est in (neighbors.KNeighborsClassifier, neighbors.RadiusNeighborsClassifier, neighbors.KNeighborsRegressor, neighbors.RadiusNeighborsRegressor): metric_score = cross_val_score(Est(), X, y) precomp_score = cross_val_score(Est(metric='precomputed'), D, y) assert_array_equal(metric_score, precomp_score) def test_unsupervised_radius_neighbors(n_samples=20, n_features=5, n_query_pts=2, radius=0.5, random_state=0): # Test unsupervised radius-based query rng = np.random.RandomState(random_state) X = rng.rand(n_samples, n_features) test = rng.rand(n_query_pts, n_features) for p in P: results = [] for algorithm in ALGORITHMS: neigh = neighbors.NearestNeighbors(radius=radius, algorithm=algorithm, p=p) neigh.fit(X) ind1 = neigh.radius_neighbors(test, return_distance=False) # sort the results: this is not done automatically for # radius searches dist, ind = neigh.radius_neighbors(test, return_distance=True) for (d, i, i1) in zip(dist, ind, ind1): j = d.argsort() d[:] = d[j] i[:] = i[j] i1[:] = i1[j] results.append((dist, ind)) assert_array_almost_equal(np.concatenate(list(ind)), np.concatenate(list(ind1))) for i in range(len(results) - 1): assert_array_almost_equal(np.concatenate(list(results[i][0])), np.concatenate(list(results[i + 1][0]))), assert_array_almost_equal(np.concatenate(list(results[i][1])), np.concatenate(list(results[i + 1][1]))) def test_kneighbors_classifier(n_samples=40, n_features=5, n_test_pts=10, n_neighbors=5, random_state=0): # Test k-neighbors classification rng = np.random.RandomState(random_state) X = 2 * rng.rand(n_samples, n_features) - 1 y = ((X ** 2).sum(axis=1) < .5).astype(np.int) y_str = y.astype(str) weight_func = _weight_func for algorithm in ALGORITHMS: for weights in ['uniform', 'distance', weight_func]: knn = neighbors.KNeighborsClassifier(n_neighbors=n_neighbors, weights=weights, algorithm=algorithm) knn.fit(X, y) epsilon = 1e-5 * (2 * rng.rand(1, n_features) - 1) y_pred = knn.predict(X[:n_test_pts] + epsilon) assert_array_equal(y_pred, y[:n_test_pts]) # Test prediction with y_str knn.fit(X, y_str) y_pred = knn.predict(X[:n_test_pts] + epsilon) assert_array_equal(y_pred, y_str[:n_test_pts]) def test_kneighbors_classifier_float_labels(n_samples=40, n_features=5, n_test_pts=10, n_neighbors=5, random_state=0): # Test k-neighbors classification rng = np.random.RandomState(random_state) X = 2 * rng.rand(n_samples, n_features) - 1 y = ((X ** 2).sum(axis=1) < .5).astype(np.int) knn = neighbors.KNeighborsClassifier(n_neighbors=n_neighbors) knn.fit(X, y.astype(np.float)) epsilon = 1e-5 * (2 * rng.rand(1, n_features) - 1) y_pred = knn.predict(X[:n_test_pts] + epsilon) assert_array_equal(y_pred, y[:n_test_pts]) def test_kneighbors_classifier_predict_proba(): # Test KNeighborsClassifier.predict_proba() method X = np.array([[0, 2, 0], [0, 2, 1], [2, 0, 0], [2, 2, 0], [0, 0, 2], [0, 0, 1]]) y = np.array([4, 4, 5, 5, 1, 1]) cls = neighbors.KNeighborsClassifier(n_neighbors=3, p=1) # cityblock dist cls.fit(X, y) y_prob = cls.predict_proba(X) real_prob = np.array([[0, 2. / 3, 1. / 3], [1. / 3, 2. / 3, 0], [1. / 3, 0, 2. / 3], [0, 1. / 3, 2. / 3], [2. / 3, 1. / 3, 0], [2. / 3, 1. / 3, 0]]) assert_array_equal(real_prob, y_prob) # Check that it also works with non integer labels cls.fit(X, y.astype(str)) y_prob = cls.predict_proba(X) assert_array_equal(real_prob, y_prob) # Check that it works with weights='distance' cls = neighbors.KNeighborsClassifier( n_neighbors=2, p=1, weights='distance') cls.fit(X, y) y_prob = cls.predict_proba(np.array([[0, 2, 0], [2, 2, 2]])) real_prob = np.array([[0, 1, 0], [0, 0.4, 0.6]]) assert_array_almost_equal(real_prob, y_prob) def test_radius_neighbors_classifier(n_samples=40, n_features=5, n_test_pts=10, radius=0.5, random_state=0): # Test radius-based classification rng = np.random.RandomState(random_state) X = 2 * rng.rand(n_samples, n_features) - 1 y = ((X ** 2).sum(axis=1) < .5).astype(np.int) y_str = y.astype(str) weight_func = _weight_func for algorithm in ALGORITHMS: for weights in ['uniform', 'distance', weight_func]: neigh = neighbors.RadiusNeighborsClassifier(radius=radius, weights=weights, algorithm=algorithm) neigh.fit(X, y) epsilon = 1e-5 * (2 * rng.rand(1, n_features) - 1) y_pred = neigh.predict(X[:n_test_pts] + epsilon) assert_array_equal(y_pred, y[:n_test_pts]) neigh.fit(X, y_str) y_pred = neigh.predict(X[:n_test_pts] + epsilon) assert_array_equal(y_pred, y_str[:n_test_pts]) def test_radius_neighbors_classifier_when_no_neighbors(): # Test radius-based classifier when no neighbors found. # In this case it should rise an informative exception X = np.array([[1.0, 1.0], [2.0, 2.0]]) y = np.array([1, 2]) radius = 0.1 z1 = np.array([[1.01, 1.01], [2.01, 2.01]]) # no outliers z2 = np.array([[1.01, 1.01], [1.4, 1.4]]) # one outlier weight_func = _weight_func for outlier_label in [0, -1, None]: for algorithm in ALGORITHMS: for weights in ['uniform', 'distance', weight_func]: rnc = neighbors.RadiusNeighborsClassifier clf = rnc(radius=radius, weights=weights, algorithm=algorithm, outlier_label=outlier_label) clf.fit(X, y) assert_array_equal(np.array([1, 2]), clf.predict(z1)) if outlier_label is None: assert_raises(ValueError, clf.predict, z2) def test_radius_neighbors_classifier_outlier_labeling(): # Test radius-based classifier when no neighbors found and outliers # are labeled. X = np.array([[1.0, 1.0], [2.0, 2.0], [0.99, 0.99], [0.98, 0.98], [2.01, 2.01]]) y = np.array([1, 2, 1, 1, 2]) radius = 0.1 z1 = np.array([[1.01, 1.01], [2.01, 2.01]]) # no outliers z2 = np.array([[1.4, 1.4], [1.01, 1.01], [2.01, 2.01]]) # one outlier correct_labels1 = np.array([1, 2]) correct_labels2 = np.array([-1, 1, 2]) weight_func = _weight_func for algorithm in ALGORITHMS: for weights in ['uniform', 'distance', weight_func]: clf = neighbors.RadiusNeighborsClassifier(radius=radius, weights=weights, algorithm=algorithm, outlier_label=-1) clf.fit(X, y) assert_array_equal(correct_labels1, clf.predict(z1)) assert_array_equal(correct_labels2, clf.predict(z2)) def test_radius_neighbors_classifier_zero_distance(): # Test radius-based classifier, when distance to a sample is zero. X = np.array([[1.0, 1.0], [2.0, 2.0]]) y = np.array([1, 2]) radius = 0.1 z1 = np.array([[1.01, 1.01], [2.0, 2.0]]) correct_labels1 = np.array([1, 2]) weight_func = _weight_func for algorithm in ALGORITHMS: for weights in ['uniform', 'distance', weight_func]: clf = neighbors.RadiusNeighborsClassifier(radius=radius, weights=weights, algorithm=algorithm) clf.fit(X, y) assert_array_equal(correct_labels1, clf.predict(z1)) def test_neighbors_regressors_zero_distance(): # Test radius-based regressor, when distance to a sample is zero. X = np.array([[1.0, 1.0], [1.0, 1.0], [2.0, 2.0], [2.5, 2.5]]) y = np.array([1.0, 1.5, 2.0, 0.0]) radius = 0.2 z = np.array([[1.1, 1.1], [2.0, 2.0]]) rnn_correct_labels = np.array([1.25, 2.0]) knn_correct_unif = np.array([1.25, 1.0]) knn_correct_dist = np.array([1.25, 2.0]) for algorithm in ALGORITHMS: # we don't test for weights=_weight_func since user will be expected # to handle zero distances themselves in the function. for weights in ['uniform', 'distance']: rnn = neighbors.RadiusNeighborsRegressor(radius=radius, weights=weights, algorithm=algorithm) rnn.fit(X, y) assert_array_almost_equal(rnn_correct_labels, rnn.predict(z)) for weights, corr_labels in zip(['uniform', 'distance'], [knn_correct_unif, knn_correct_dist]): knn = neighbors.KNeighborsRegressor(n_neighbors=2, weights=weights, algorithm=algorithm) knn.fit(X, y) assert_array_almost_equal(corr_labels, knn.predict(z)) def test_radius_neighbors_boundary_handling(): """Test whether points lying on boundary are handled consistently Also ensures that even with only one query point, an object array is returned rather than a 2d array. """ X = np.array([[1.5], [3.0], [3.01]]) radius = 3.0 for algorithm in ALGORITHMS: nbrs = neighbors.NearestNeighbors(radius=radius, algorithm=algorithm).fit(X) results = nbrs.radius_neighbors([[0.0]], return_distance=False) assert_equal(results.shape, (1,)) assert_equal(results.dtype, object) assert_array_equal(results[0], [0, 1]) def test_RadiusNeighborsClassifier_multioutput(): # Test k-NN classifier on multioutput data rng = check_random_state(0) n_features = 2 n_samples = 40 n_output = 3 X = rng.rand(n_samples, n_features) y = rng.randint(0, 3, (n_samples, n_output)) X_train, X_test, y_train, y_test = train_test_split(X, y, random_state=0) weights = [None, 'uniform', 'distance', _weight_func] for algorithm, weights in product(ALGORITHMS, weights): # Stack single output prediction y_pred_so = [] for o in range(n_output): rnn = neighbors.RadiusNeighborsClassifier(weights=weights, algorithm=algorithm) rnn.fit(X_train, y_train[:, o]) y_pred_so.append(rnn.predict(X_test)) y_pred_so = np.vstack(y_pred_so).T assert_equal(y_pred_so.shape, y_test.shape) # Multioutput prediction rnn_mo = neighbors.RadiusNeighborsClassifier(weights=weights, algorithm=algorithm) rnn_mo.fit(X_train, y_train) y_pred_mo = rnn_mo.predict(X_test) assert_equal(y_pred_mo.shape, y_test.shape) assert_array_almost_equal(y_pred_mo, y_pred_so) def test_kneighbors_classifier_sparse(n_samples=40, n_features=5, n_test_pts=10, n_neighbors=5, random_state=0): # Test k-NN classifier on sparse matrices # Like the above, but with various types of sparse matrices rng = np.random.RandomState(random_state) X = 2 * rng.rand(n_samples, n_features) - 1 X *= X > .2 y = ((X ** 2).sum(axis=1) < .5).astype(np.int) for sparsemat in SPARSE_TYPES: knn = neighbors.KNeighborsClassifier(n_neighbors=n_neighbors, algorithm='auto') knn.fit(sparsemat(X), y) epsilon = 1e-5 * (2 * rng.rand(1, n_features) - 1) for sparsev in SPARSE_TYPES + (np.asarray,): X_eps = sparsev(X[:n_test_pts] + epsilon) y_pred = knn.predict(X_eps) assert_array_equal(y_pred, y[:n_test_pts]) def test_KNeighborsClassifier_multioutput(): # Test k-NN classifier on multioutput data rng = check_random_state(0) n_features = 5 n_samples = 50 n_output = 3 X = rng.rand(n_samples, n_features) y = rng.randint(0, 3, (n_samples, n_output)) X_train, X_test, y_train, y_test = train_test_split(X, y, random_state=0) weights = [None, 'uniform', 'distance', _weight_func] for algorithm, weights in product(ALGORITHMS, weights): # Stack single output prediction y_pred_so = [] y_pred_proba_so = [] for o in range(n_output): knn = neighbors.KNeighborsClassifier(weights=weights, algorithm=algorithm) knn.fit(X_train, y_train[:, o]) y_pred_so.append(knn.predict(X_test)) y_pred_proba_so.append(knn.predict_proba(X_test)) y_pred_so = np.vstack(y_pred_so).T assert_equal(y_pred_so.shape, y_test.shape) assert_equal(len(y_pred_proba_so), n_output) # Multioutput prediction knn_mo = neighbors.KNeighborsClassifier(weights=weights, algorithm=algorithm) knn_mo.fit(X_train, y_train) y_pred_mo = knn_mo.predict(X_test) assert_equal(y_pred_mo.shape, y_test.shape) assert_array_almost_equal(y_pred_mo, y_pred_so) # Check proba y_pred_proba_mo = knn_mo.predict_proba(X_test) assert_equal(len(y_pred_proba_mo), n_output) for proba_mo, proba_so in zip(y_pred_proba_mo, y_pred_proba_so): assert_array_almost_equal(proba_mo, proba_so) def test_kneighbors_regressor(n_samples=40, n_features=5, n_test_pts=10, n_neighbors=3, random_state=0): # Test k-neighbors regression rng = np.random.RandomState(random_state) X = 2 * rng.rand(n_samples, n_features) - 1 y = np.sqrt((X ** 2).sum(1)) y /= y.max() y_target = y[:n_test_pts] weight_func = _weight_func for algorithm in ALGORITHMS: for weights in ['uniform', 'distance', weight_func]: knn = neighbors.KNeighborsRegressor(n_neighbors=n_neighbors, weights=weights, algorithm=algorithm) knn.fit(X, y) epsilon = 1E-5 * (2 * rng.rand(1, n_features) - 1) y_pred = knn.predict(X[:n_test_pts] + epsilon) assert_true(np.all(abs(y_pred - y_target) < 0.3)) def test_KNeighborsRegressor_multioutput_uniform_weight(): # Test k-neighbors in multi-output regression with uniform weight rng = check_random_state(0) n_features = 5 n_samples = 40 n_output = 4 X = rng.rand(n_samples, n_features) y = rng.rand(n_samples, n_output) X_train, X_test, y_train, y_test = train_test_split(X, y, random_state=0) for algorithm, weights in product(ALGORITHMS, [None, 'uniform']): knn = neighbors.KNeighborsRegressor(weights=weights, algorithm=algorithm) knn.fit(X_train, y_train) neigh_idx = knn.kneighbors(X_test, return_distance=False) y_pred_idx = np.array([np.mean(y_train[idx], axis=0) for idx in neigh_idx]) y_pred = knn.predict(X_test) assert_equal(y_pred.shape, y_test.shape) assert_equal(y_pred_idx.shape, y_test.shape) assert_array_almost_equal(y_pred, y_pred_idx) def test_kneighbors_regressor_multioutput(n_samples=40, n_features=5, n_test_pts=10, n_neighbors=3, random_state=0): # Test k-neighbors in multi-output regression rng = np.random.RandomState(random_state) X = 2 * rng.rand(n_samples, n_features) - 1 y = np.sqrt((X ** 2).sum(1)) y /= y.max() y = np.vstack([y, y]).T y_target = y[:n_test_pts] weights = ['uniform', 'distance', _weight_func] for algorithm, weights in product(ALGORITHMS, weights): knn = neighbors.KNeighborsRegressor(n_neighbors=n_neighbors, weights=weights, algorithm=algorithm) knn.fit(X, y) epsilon = 1E-5 * (2 * rng.rand(1, n_features) - 1) y_pred = knn.predict(X[:n_test_pts] + epsilon) assert_equal(y_pred.shape, y_target.shape) assert_true(np.all(np.abs(y_pred - y_target) < 0.3)) def test_radius_neighbors_regressor(n_samples=40, n_features=3, n_test_pts=10, radius=0.5, random_state=0): # Test radius-based neighbors regression rng = np.random.RandomState(random_state) X = 2 * rng.rand(n_samples, n_features) - 1 y = np.sqrt((X ** 2).sum(1)) y /= y.max() y_target = y[:n_test_pts] weight_func = _weight_func for algorithm in ALGORITHMS: for weights in ['uniform', 'distance', weight_func]: neigh = neighbors.RadiusNeighborsRegressor(radius=radius, weights=weights, algorithm=algorithm) neigh.fit(X, y) epsilon = 1E-5 * (2 * rng.rand(1, n_features) - 1) y_pred = neigh.predict(X[:n_test_pts] + epsilon) assert_true(np.all(abs(y_pred - y_target) < radius / 2)) # test that nan is returned when no nearby observations for weights in ['uniform', 'distance']: neigh = neighbors.RadiusNeighborsRegressor(radius=radius, weights=weights, algorithm='auto') neigh.fit(X, y) X_test_nan = np.full((1, n_features), -1.) empty_warning_msg = ("One or more samples have no neighbors " "within specified radius; predicting NaN.") pred = assert_warns_message(UserWarning, empty_warning_msg, neigh.predict, X_test_nan) assert_true(np.all(np.isnan(pred))) def test_RadiusNeighborsRegressor_multioutput_with_uniform_weight(): # Test radius neighbors in multi-output regression (uniform weight) rng = check_random_state(0) n_features = 5 n_samples = 40 n_output = 4 X = rng.rand(n_samples, n_features) y = rng.rand(n_samples, n_output) X_train, X_test, y_train, y_test = train_test_split(X, y, random_state=0) for algorithm, weights in product(ALGORITHMS, [None, 'uniform']): rnn = neighbors. RadiusNeighborsRegressor(weights=weights, algorithm=algorithm) rnn.fit(X_train, y_train) neigh_idx = rnn.radius_neighbors(X_test, return_distance=False) y_pred_idx = np.array([np.mean(y_train[idx], axis=0) for idx in neigh_idx]) y_pred_idx = np.array(y_pred_idx) y_pred = rnn.predict(X_test) assert_equal(y_pred_idx.shape, y_test.shape) assert_equal(y_pred.shape, y_test.shape) assert_array_almost_equal(y_pred, y_pred_idx) def test_RadiusNeighborsRegressor_multioutput(n_samples=40, n_features=5, n_test_pts=10, n_neighbors=3, random_state=0): # Test k-neighbors in multi-output regression with various weight rng = np.random.RandomState(random_state) X = 2 * rng.rand(n_samples, n_features) - 1 y = np.sqrt((X ** 2).sum(1)) y /= y.max() y = np.vstack([y, y]).T y_target = y[:n_test_pts] weights = ['uniform', 'distance', _weight_func] for algorithm, weights in product(ALGORITHMS, weights): rnn = neighbors.RadiusNeighborsRegressor(n_neighbors=n_neighbors, weights=weights, algorithm=algorithm) rnn.fit(X, y) epsilon = 1E-5 * (2 * rng.rand(1, n_features) - 1) y_pred = rnn.predict(X[:n_test_pts] + epsilon) assert_equal(y_pred.shape, y_target.shape) assert_true(np.all(np.abs(y_pred - y_target) < 0.3)) def test_kneighbors_regressor_sparse(n_samples=40, n_features=5, n_test_pts=10, n_neighbors=5, random_state=0): # Test radius-based regression on sparse matrices # Like the above, but with various types of sparse matrices rng = np.random.RandomState(random_state) X = 2 * rng.rand(n_samples, n_features) - 1 y = ((X ** 2).sum(axis=1) < .25).astype(np.int) for sparsemat in SPARSE_TYPES: knn = neighbors.KNeighborsRegressor(n_neighbors=n_neighbors, algorithm='auto') knn.fit(sparsemat(X), y) knn_pre = neighbors.KNeighborsRegressor(n_neighbors=n_neighbors, metric='precomputed') knn_pre.fit(pairwise_distances(X, metric='euclidean'), y) for sparsev in SPARSE_OR_DENSE: X2 = sparsev(X) assert_true(np.mean(knn.predict(X2).round() == y) > 0.95) X2_pre = sparsev(pairwise_distances(X, metric='euclidean')) if issparse(sparsev(X2_pre)): assert_raises(ValueError, knn_pre.predict, X2_pre) else: assert_true( np.mean(knn_pre.predict(X2_pre).round() == y) > 0.95) def test_neighbors_iris(): # Sanity checks on the iris dataset # Puts three points of each label in the plane and performs a # nearest neighbor query on points near the decision boundary. for algorithm in ALGORITHMS: clf = neighbors.KNeighborsClassifier(n_neighbors=1, algorithm=algorithm) clf.fit(iris.data, iris.target) assert_array_equal(clf.predict(iris.data), iris.target) clf.set_params(n_neighbors=9, algorithm=algorithm) clf.fit(iris.data, iris.target) assert_true(np.mean(clf.predict(iris.data) == iris.target) > 0.95) rgs = neighbors.KNeighborsRegressor(n_neighbors=5, algorithm=algorithm) rgs.fit(iris.data, iris.target) assert_greater(np.mean(rgs.predict(iris.data).round() == iris.target), 0.95) def test_neighbors_digits(): # Sanity check on the digits dataset # the 'brute' algorithm has been observed to fail if the input # dtype is uint8 due to overflow in distance calculations. X = digits.data.astype('uint8') Y = digits.target (n_samples, n_features) = X.shape train_test_boundary = int(n_samples * 0.8) train = np.arange(0, train_test_boundary) test = np.arange(train_test_boundary, n_samples) (X_train, Y_train, X_test, Y_test) = X[train], Y[train], X[test], Y[test] clf = neighbors.KNeighborsClassifier(n_neighbors=1, algorithm='brute') score_uint8 = clf.fit(X_train, Y_train).score(X_test, Y_test) score_float = clf.fit(X_train.astype(float), Y_train).score( X_test.astype(float), Y_test) assert_equal(score_uint8, score_float) def test_kneighbors_graph(): # Test kneighbors_graph to build the k-Nearest Neighbor graph. X = np.array([[0, 1], [1.01, 1.], [2, 0]]) # n_neighbors = 1 A = neighbors.kneighbors_graph(X, 1, mode='connectivity', include_self=True) assert_array_equal(A.toarray(), np.eye(A.shape[0])) A = neighbors.kneighbors_graph(X, 1, mode='distance') assert_array_almost_equal( A.toarray(), [[0.00, 1.01, 0.], [1.01, 0., 0.], [0.00, 1.40716026, 0.]]) # n_neighbors = 2 A = neighbors.kneighbors_graph(X, 2, mode='connectivity', include_self=True) assert_array_equal( A.toarray(), [[1., 1., 0.], [1., 1., 0.], [0., 1., 1.]]) A = neighbors.kneighbors_graph(X, 2, mode='distance') assert_array_almost_equal( A.toarray(), [[0., 1.01, 2.23606798], [1.01, 0., 1.40716026], [2.23606798, 1.40716026, 0.]]) # n_neighbors = 3 A = neighbors.kneighbors_graph(X, 3, mode='connectivity', include_self=True) assert_array_almost_equal( A.toarray(), [[1, 1, 1], [1, 1, 1], [1, 1, 1]]) def test_kneighbors_graph_sparse(seed=36): # Test kneighbors_graph to build the k-Nearest Neighbor graph # for sparse input. rng = np.random.RandomState(seed) X = rng.randn(10, 10) Xcsr = csr_matrix(X) for n_neighbors in [1, 2, 3]: for mode in ["connectivity", "distance"]: assert_array_almost_equal( neighbors.kneighbors_graph(X, n_neighbors, mode=mode).toarray(), neighbors.kneighbors_graph(Xcsr, n_neighbors, mode=mode).toarray()) def test_radius_neighbors_graph(): # Test radius_neighbors_graph to build the Nearest Neighbor graph. X = np.array([[0, 1], [1.01, 1.], [2, 0]]) A = neighbors.radius_neighbors_graph(X, 1.5, mode='connectivity', include_self=True) assert_array_equal( A.toarray(), [[1., 1., 0.], [1., 1., 1.], [0., 1., 1.]]) A = neighbors.radius_neighbors_graph(X, 1.5, mode='distance') assert_array_almost_equal( A.toarray(), [[0., 1.01, 0.], [1.01, 0., 1.40716026], [0., 1.40716026, 0.]]) def test_radius_neighbors_graph_sparse(seed=36): # Test radius_neighbors_graph to build the Nearest Neighbor graph # for sparse input. rng = np.random.RandomState(seed) X = rng.randn(10, 10) Xcsr = csr_matrix(X) for n_neighbors in [1, 2, 3]: for mode in ["connectivity", "distance"]: assert_array_almost_equal( neighbors.radius_neighbors_graph(X, n_neighbors, mode=mode).toarray(), neighbors.radius_neighbors_graph(Xcsr, n_neighbors, mode=mode).toarray()) def test_neighbors_badargs(): # Test bad argument values: these should all raise ValueErrors assert_raises(ValueError, neighbors.NearestNeighbors, algorithm='blah') X = rng.random_sample((10, 2)) Xsparse = csr_matrix(X) y = np.ones(10) for cls in (neighbors.KNeighborsClassifier, neighbors.RadiusNeighborsClassifier, neighbors.KNeighborsRegressor, neighbors.RadiusNeighborsRegressor): assert_raises(ValueError, cls, weights='blah') assert_raises(ValueError, cls, p=-1) assert_raises(ValueError, cls, algorithm='blah') nbrs = cls(algorithm='ball_tree', metric='haversine') assert_raises(ValueError, nbrs.predict, X) assert_raises(ValueError, ignore_warnings(nbrs.fit), Xsparse, y) nbrs = cls() assert_raises(ValueError, nbrs.fit, np.ones((0, 2)), np.ones(0)) assert_raises(ValueError, nbrs.fit, X[:, :, None], y) nbrs.fit(X, y) assert_raises(ValueError, nbrs.predict, [[]]) if (isinstance(cls, neighbors.KNeighborsClassifier) or isinstance(cls, neighbors.KNeighborsRegressor)): nbrs = cls(n_neighbors=-1) assert_raises(ValueError, nbrs.fit, X, y) nbrs = neighbors.NearestNeighbors().fit(X) assert_raises(ValueError, nbrs.kneighbors_graph, X, mode='blah') assert_raises(ValueError, nbrs.radius_neighbors_graph, X, mode='blah') def test_neighbors_metrics(n_samples=20, n_features=3, n_query_pts=2, n_neighbors=5): # Test computing the neighbors for various metrics # create a symmetric matrix V = rng.rand(n_features, n_features) VI = np.dot(V, V.T) metrics = [('euclidean', {}), ('manhattan', {}), ('minkowski', dict(p=1)), ('minkowski', dict(p=2)), ('minkowski', dict(p=3)), ('minkowski', dict(p=np.inf)), ('chebyshev', {}), ('seuclidean', dict(V=rng.rand(n_features))), ('wminkowski', dict(p=3, w=rng.rand(n_features))), ('mahalanobis', dict(VI=VI))] algorithms = ['brute', 'ball_tree', 'kd_tree'] X = rng.rand(n_samples, n_features) test = rng.rand(n_query_pts, n_features) for metric, metric_params in metrics: results = {} p = metric_params.pop('p', 2) for algorithm in algorithms: # KD tree doesn't support all metrics if (algorithm == 'kd_tree' and metric not in neighbors.KDTree.valid_metrics): assert_raises(ValueError, neighbors.NearestNeighbors, algorithm=algorithm, metric=metric, metric_params=metric_params) continue neigh = neighbors.NearestNeighbors(n_neighbors=n_neighbors, algorithm=algorithm, metric=metric, p=p, metric_params=metric_params) neigh.fit(X) results[algorithm] = neigh.kneighbors(test, return_distance=True) assert_array_almost_equal(results['brute'][0], results['ball_tree'][0]) assert_array_almost_equal(results['brute'][1], results['ball_tree'][1]) if 'kd_tree' in results: assert_array_almost_equal(results['brute'][0], results['kd_tree'][0]) assert_array_almost_equal(results['brute'][1], results['kd_tree'][1]) def test_callable_metric(): def custom_metric(x1, x2): return np.sqrt(np.sum(x1 ** 2 + x2 ** 2)) X = np.random.RandomState(42).rand(20, 2) nbrs1 = neighbors.NearestNeighbors(3, algorithm='auto', metric=custom_metric) nbrs2 = neighbors.NearestNeighbors(3, algorithm='brute', metric=custom_metric) nbrs1.fit(X) nbrs2.fit(X) dist1, ind1 = nbrs1.kneighbors(X) dist2, ind2 = nbrs2.kneighbors(X) assert_array_almost_equal(dist1, dist2) def test_valid_brute_metric_for_auto_algorithm(): X = rng.rand(12, 12) Xcsr = csr_matrix(X) # check that there is a metric that is valid for brute # but not ball_tree (so we actually test something) assert_in("cosine", VALID_METRICS['brute']) assert_false("cosine" in VALID_METRICS['ball_tree']) # Metric which don't required any additional parameter require_params = ['mahalanobis', 'wminkowski', 'seuclidean'] for metric in VALID_METRICS['brute']: if metric != 'precomputed' and metric not in require_params: nn = neighbors.NearestNeighbors(n_neighbors=3, algorithm='auto', metric=metric).fit(X) nn.kneighbors(X) elif metric == 'precomputed': X_precomputed = rng.random_sample((10, 4)) Y_precomputed = rng.random_sample((3, 4)) DXX = metrics.pairwise_distances(X_precomputed, metric='euclidean') DYX = metrics.pairwise_distances(Y_precomputed, X_precomputed, metric='euclidean') nb_p = neighbors.NearestNeighbors(n_neighbors=3) nb_p.fit(DXX) nb_p.kneighbors(DYX) for metric in VALID_METRICS_SPARSE['brute']: if metric != 'precomputed' and metric not in require_params: nn = neighbors.NearestNeighbors(n_neighbors=3, algorithm='auto', metric=metric).fit(Xcsr) nn.kneighbors(Xcsr) # Metric with parameter VI = np.dot(X, X.T) list_metrics = [('seuclidean', dict(V=rng.rand(12))), ('wminkowski', dict(w=rng.rand(12))), ('mahalanobis', dict(VI=VI))] for metric, params in list_metrics: nn = neighbors.NearestNeighbors(n_neighbors=3, algorithm='auto', metric=metric, metric_params=params).fit(X) nn.kneighbors(X) def test_metric_params_interface(): assert_warns(SyntaxWarning, neighbors.KNeighborsClassifier, metric_params={'p': 3}) def test_predict_sparse_ball_kd_tree(): rng = np.random.RandomState(0) X = rng.rand(5, 5) y = rng.randint(0, 2, 5) nbrs1 = neighbors.KNeighborsClassifier(1, algorithm='kd_tree') nbrs2 = neighbors.KNeighborsRegressor(1, algorithm='ball_tree') for model in [nbrs1, nbrs2]: model.fit(X, y) assert_raises(ValueError, model.predict, csr_matrix(X)) def test_non_euclidean_kneighbors(): rng = np.random.RandomState(0) X = rng.rand(5, 5) # Find a reasonable radius. dist_array = pairwise_distances(X).flatten() np.sort(dist_array) radius = dist_array[15] # Test kneighbors_graph for metric in ['manhattan', 'chebyshev']: nbrs_graph = neighbors.kneighbors_graph( X, 3, metric=metric, mode='connectivity', include_self=True).toarray() nbrs1 = neighbors.NearestNeighbors(3, metric=metric).fit(X) assert_array_equal(nbrs_graph, nbrs1.kneighbors_graph(X).toarray()) # Test radiusneighbors_graph for metric in ['manhattan', 'chebyshev']: nbrs_graph = neighbors.radius_neighbors_graph( X, radius, metric=metric, mode='connectivity', include_self=True).toarray() nbrs1 = neighbors.NearestNeighbors(metric=metric, radius=radius).fit(X) assert_array_equal(nbrs_graph, nbrs1.radius_neighbors_graph(X).A) # Raise error when wrong parameters are supplied, X_nbrs = neighbors.NearestNeighbors(3, metric='manhattan') X_nbrs.fit(X) assert_raises(ValueError, neighbors.kneighbors_graph, X_nbrs, 3, metric='euclidean') X_nbrs = neighbors.NearestNeighbors(radius=radius, metric='manhattan') X_nbrs.fit(X) assert_raises(ValueError, neighbors.radius_neighbors_graph, X_nbrs, radius, metric='euclidean') def check_object_arrays(nparray, list_check): for ind, ele in enumerate(nparray): assert_array_equal(ele, list_check[ind]) def test_k_and_radius_neighbors_train_is_not_query(): # Test kneighbors et.al when query is not training data for algorithm in ALGORITHMS: nn = neighbors.NearestNeighbors(n_neighbors=1, algorithm=algorithm) X = [[0], [1]] nn.fit(X) test_data = [[2], [1]] # Test neighbors. dist, ind = nn.kneighbors(test_data) assert_array_equal(dist, [[1], [0]]) assert_array_equal(ind, [[1], [1]]) dist, ind = nn.radius_neighbors([[2], [1]], radius=1.5) check_object_arrays(dist, [[1], [1, 0]]) check_object_arrays(ind, [[1], [0, 1]]) # Test the graph variants. assert_array_equal( nn.kneighbors_graph(test_data).A, [[0., 1.], [0., 1.]]) assert_array_equal( nn.kneighbors_graph([[2], [1]], mode='distance').A, np.array([[0., 1.], [0., 0.]])) rng = nn.radius_neighbors_graph([[2], [1]], radius=1.5) assert_array_equal(rng.A, [[0, 1], [1, 1]]) def test_k_and_radius_neighbors_X_None(): # Test kneighbors et.al when query is None for algorithm in ALGORITHMS: nn = neighbors.NearestNeighbors(n_neighbors=1, algorithm=algorithm) X = [[0], [1]] nn.fit(X) dist, ind = nn.kneighbors() assert_array_equal(dist, [[1], [1]]) assert_array_equal(ind, [[1], [0]]) dist, ind = nn.radius_neighbors(None, radius=1.5) check_object_arrays(dist, [[1], [1]]) check_object_arrays(ind, [[1], [0]]) # Test the graph variants. rng = nn.radius_neighbors_graph(None, radius=1.5) kng = nn.kneighbors_graph(None) for graph in [rng, kng]: assert_array_equal(rng.A, [[0, 1], [1, 0]]) assert_array_equal(rng.data, [1, 1]) assert_array_equal(rng.indices, [1, 0]) X = [[0, 1], [0, 1], [1, 1]] nn = neighbors.NearestNeighbors(n_neighbors=2, algorithm=algorithm) nn.fit(X) assert_array_equal( nn.kneighbors_graph().A, np.array([[0., 1., 1.], [1., 0., 1.], [1., 1., 0]])) def test_k_and_radius_neighbors_duplicates(): # Test behavior of kneighbors when duplicates are present in query for algorithm in ALGORITHMS: nn = neighbors.NearestNeighbors(n_neighbors=1, algorithm=algorithm) nn.fit([[0], [1]]) # Do not do anything special to duplicates. kng = nn.kneighbors_graph([[0], [1]], mode='distance') assert_array_equal( kng.A, np.array([[0., 0.], [0., 0.]])) assert_array_equal(kng.data, [0., 0.]) assert_array_equal(kng.indices, [0, 1]) dist, ind = nn.radius_neighbors([[0], [1]], radius=1.5) check_object_arrays(dist, [[0, 1], [1, 0]]) check_object_arrays(ind, [[0, 1], [0, 1]]) rng = nn.radius_neighbors_graph([[0], [1]], radius=1.5) assert_array_equal(rng.A, np.ones((2, 2))) rng = nn.radius_neighbors_graph([[0], [1]], radius=1.5, mode='distance') assert_array_equal(rng.A, [[0, 1], [1, 0]]) assert_array_equal(rng.indices, [0, 1, 0, 1]) assert_array_equal(rng.data, [0, 1, 1, 0]) # Mask the first duplicates when n_duplicates > n_neighbors. X = np.ones((3, 1)) nn = neighbors.NearestNeighbors(n_neighbors=1) nn.fit(X) dist, ind = nn.kneighbors() assert_array_equal(dist, np.zeros((3, 1))) assert_array_equal(ind, [[1], [0], [1]]) # Test that zeros are explicitly marked in kneighbors_graph. kng = nn.kneighbors_graph(mode='distance') assert_array_equal( kng.A, np.zeros((3, 3))) assert_array_equal(kng.data, np.zeros(3)) assert_array_equal(kng.indices, [1., 0., 1.]) assert_array_equal( nn.kneighbors_graph().A, np.array([[0., 1., 0.], [1., 0., 0.], [0., 1., 0.]])) def test_include_self_neighbors_graph(): # Test include_self parameter in neighbors_graph X = [[2, 3], [4, 5]] kng = neighbors.kneighbors_graph(X, 1, include_self=True).A kng_not_self = neighbors.kneighbors_graph(X, 1, include_self=False).A assert_array_equal(kng, [[1., 0.], [0., 1.]]) assert_array_equal(kng_not_self, [[0., 1.], [1., 0.]]) rng = neighbors.radius_neighbors_graph(X, 5.0, include_self=True).A rng_not_self = neighbors.radius_neighbors_graph( X, 5.0, include_self=False).A assert_array_equal(rng, [[1., 1.], [1., 1.]]) assert_array_equal(rng_not_self, [[0., 1.], [1., 0.]]) @pytest.mark.parametrize('algorithm', ALGORITHMS) def test_same_knn_parallel(algorithm): X, y = datasets.make_classification(n_samples=30, n_features=5, n_redundant=0, random_state=0) X_train, X_test, y_train, y_test = train_test_split(X, y) clf = neighbors.KNeighborsClassifier(n_neighbors=3, algorithm=algorithm) clf.fit(X_train, y_train) y = clf.predict(X_test) dist, ind = clf.kneighbors(X_test) graph = clf.kneighbors_graph(X_test, mode='distance').toarray() clf.set_params(n_jobs=3) clf.fit(X_train, y_train) y_parallel = clf.predict(X_test) dist_parallel, ind_parallel = clf.kneighbors(X_test) graph_parallel = \ clf.kneighbors_graph(X_test, mode='distance').toarray() assert_array_equal(y, y_parallel) assert_array_almost_equal(dist, dist_parallel) assert_array_equal(ind, ind_parallel) assert_array_almost_equal(graph, graph_parallel) @pytest.mark.parametrize('algorithm', ALGORITHMS) def test_same_radius_neighbors_parallel(algorithm): X, y = datasets.make_classification(n_samples=30, n_features=5, n_redundant=0, random_state=0) X_train, X_test, y_train, y_test = train_test_split(X, y) clf = neighbors.RadiusNeighborsClassifier(radius=10, algorithm=algorithm) clf.fit(X_train, y_train) y = clf.predict(X_test) dist, ind = clf.radius_neighbors(X_test) graph = clf.radius_neighbors_graph(X_test, mode='distance').toarray() clf.set_params(n_jobs=3) clf.fit(X_train, y_train) y_parallel = clf.predict(X_test) dist_parallel, ind_parallel = clf.radius_neighbors(X_test) graph_parallel = \ clf.radius_neighbors_graph(X_test, mode='distance').toarray() assert_array_equal(y, y_parallel) for i in range(len(dist)): assert_array_almost_equal(dist[i], dist_parallel[i]) assert_array_equal(ind[i], ind_parallel[i]) assert_array_almost_equal(graph, graph_parallel) @pytest.mark.parametrize('backend', ['loky', 'multiprocessing', 'threading']) @pytest.mark.parametrize('algorithm', ALGORITHMS) def test_knn_forcing_backend(backend, algorithm): # Non-regression test which ensure the knn methods are properly working # even when forcing the global joblib backend. with parallel_backend(backend): X, y = datasets.make_classification(n_samples=30, n_features=5, n_redundant=0, random_state=0) X_train, X_test, y_train, y_test = train_test_split(X, y) clf = neighbors.KNeighborsClassifier(n_neighbors=3, algorithm=algorithm, n_jobs=3) clf.fit(X_train, y_train) clf.predict(X_test) clf.kneighbors(X_test) clf.kneighbors_graph(X_test, mode='distance').toarray() def test_dtype_convert(): classifier = neighbors.KNeighborsClassifier(n_neighbors=1) CLASSES = 15 X = np.eye(CLASSES) y = [ch for ch in 'ABCDEFGHIJKLMNOPQRSTU'[:CLASSES]] result = classifier.fit(X, y).predict(X) assert_array_equal(result, y) def test_sparse_metric_callable(): def sparse_metric(x, y): # Metric accepting sparse matrix input (only) assert_true(issparse(x) and issparse(y)) return x.dot(y.T).A.item() X = csr_matrix([ # Population matrix [1, 1, 1, 1, 1], [1, 0, 1, 0, 1], [0, 0, 1, 0, 0] ]) Y = csr_matrix([ # Query matrix [1, 1, 0, 1, 1], [1, 0, 0, 0, 1] ]) nn = neighbors.NearestNeighbors(algorithm='brute', n_neighbors=2, metric=sparse_metric).fit(X) N = nn.kneighbors(Y, return_distance=False) # GS indices of nearest neighbours in `X` for `sparse_metric` gold_standard_nn = np.array([ [2, 1], [2, 1] ]) assert_array_equal(N, gold_standard_nn) # ignore conversion to boolean in pairwise_distances @ignore_warnings(category=DataConversionWarning) def test_pairwise_boolean_distance(): # Non-regression test for #4523 # 'brute': uses scipy.spatial.distance through pairwise_distances # 'ball_tree': uses sklearn.neighbors.dist_metrics rng = np.random.RandomState(0) X = rng.uniform(size=(6, 5)) NN = neighbors.NearestNeighbors nn1 = NN(metric="jaccard", algorithm='brute').fit(X) nn2 = NN(metric="jaccard", algorithm='ball_tree').fit(X) assert_array_equal(nn1.kneighbors(X)[0], nn2.kneighbors(X)[0])
function VideoGame(display, url) { Game.call(this, display); this.transparent = false; this.video = document.createElement('video'); this.video.src = url; this.video.setAttribute('loop', true); this.video.play(); this.background = document.createElement('canvas').getContext('2d'); this.background.canvas.width = Display.WIDTH; this.background.canvas.height = Display.HEIGHT; } VideoGame.prototype = Object.create(Game.prototype); VideoGame.prototype.constructor = VideoGame; VideoGame.prototype.step = function() { var width = Display.WIDTH, height = Display.HEIGHT; this.background.drawImage(this.video, 0, 0, width, height); var data = this.background.getImageData(0, 0, width, height).data; for(var i = 0; i < data.length; i += 4) { var r = data[i], g = data[i+1], b = data[i+2]; var brightness = (3 * r + 4 * g + b) >>> 3; var point = Point((i / 4) % width, ~~((i / 4) / width)); var color = ~~((brightness / 255) * 4); if (color > 0 || !this.transparent) { this.display.set(point, color); } } };
import pytest from dumbpm.prio.parse import parse_input def test_parse_input_not_found() -> None: with pytest.raises(FileNotFoundError): parse_input("tests/prio/csvs/mamma.csv") def test_parse_input_negative() -> None: with pytest.raises(ValueError): parse_input("tests/prio/csvs/negative.csv") def test_parse_missing_projects() -> None: with pytest.raises(ValueError): parse_input("tests/prio/csvs/no_proj.csv") def test_parse_duplicate_projects() -> None: with pytest.raises(ValueError): parse_input("tests/prio/csvs/duplicate_proj.csv") def test_parse_missing_value() -> None: with pytest.raises(ValueError): parse_input("tests/prio/csvs/no_value.csv") def test_parse_missing_cost() -> None: with pytest.raises(ValueError): parse_input("tests/prio/csvs/no_cost.csv") def test_parse_missing_one_project() -> None: with pytest.raises(ValueError): parse_input("tests/prio/csvs/missing_one_proj.csv") def test_parse_missing_one_value() -> None: with pytest.raises(ValueError): parse_input("tests/prio/csvs/missing_one_value.csv") def test_parse_missing_one_cost() -> None: with pytest.raises(ValueError): parse_input("tests/prio/csvs/missing_one_cost.csv") def test_parse_no_duration() -> None: csv = parse_input("tests/prio/csvs/no_dur.csv") assert not csv.isnull().values.any() assert set(csv.columns) == { "project", "value", "cost", "duration", "risk", "rigging", "alternative", } assert list(csv["duration"].values) == [0, 0, 0, 0] def test_parse_missing_one_duration() -> None: with pytest.raises(ValueError): parse_input("tests/prio/csvs/missing_one_dur.csv") def test_parse_no_risk() -> None: csv = parse_input("tests/prio/csvs/no_risk.csv") assert not csv.isnull().values.any() assert set(csv.columns) == { "project", "value", "cost", "duration", "risk", "rigging", "alternative", } assert list(csv["risk"].values) == [0, 0, 0, 0] def test_parse_missing_one_risk() -> None: with pytest.raises(ValueError): parse_input("tests/prio/csvs/missing_one_risk.csv") def test_parse_no_rigging() -> None: csv = parse_input("tests/prio/csvs/no_rig.csv") assert not csv.isnull().values.any() assert set(csv.columns) == { "project", "value", "cost", "duration", "risk", "rigging", "alternative", } assert list(csv["rigging"].values) == [0, 0, 0, 0] def test_parse_missing_one_rigging() -> None: csv = parse_input("tests/prio/csvs/missing_one_rig.csv") assert not csv.isnull().values.any() assert set(csv.columns) == { "project", "value", "cost", "duration", "risk", "rigging", "alternative", } assert list(csv["rigging"].values) == [0.0, 3.0] def test_parse_no_alternatives() -> None: csv = parse_input("tests/prio/csvs/no_alt.csv") assert not csv.isnull().values.any() assert set(csv.columns) == { "project", "value", "cost", "duration", "risk", "rigging", "alternative", } assert list(csv["alternative"].values) == [(), (), (), ()] def test_parse_missing_one_alternative() -> None: csv = parse_input("tests/prio/csvs/missing_one_alt.csv") assert not csv.isnull().values.any() assert set(csv.columns) == { "project", "value", "cost", "duration", "risk", "rigging", "alternative", } assert list(csv["alternative"].values) == [("B",), ("A",), ()] def test_parse_wrong_alternatives() -> None: with pytest.raises(ValueError): parse_input("tests/prio/csvs/wrong_alt.csv") def test_parse_asymmetrical_alternatives() -> None: with pytest.raises(ValueError): parse_input("tests/prio/csvs/asym_alt.csv") def test_parse_input() -> None: csv = parse_input("tests/prio/csvs/prio.csv") assert not csv.isnull().values.any() assert set(csv.columns) == { "project", "value", "cost", "duration", "risk", "rigging", "alternative", } assert list(csv["project"].values) == ["Project A", "Project B", "C", "D"] assert list(csv["value"].values) == [0.0, 1.0, 5.0, 0.0] assert list(csv["cost"].values) == [4.0, 0.0, 2.0, 2.0] assert list(csv["duration"].values) == [2.0, 1.0, 4.0, 6.0] assert list(csv["risk"].values) == [5.0, 1.0, 1.0, 1.0] assert list(csv["rigging"].values) == [9.0, 0.0, 0.0, 5.0] assert list(csv["alternative"].values) == [ ("Project B",), ("Project A", "C"), ("Project B",), (), ]