text
stringlengths 3
1.05M
|
---|
var db = require("../models");
module.exports = function(app) {
app.post("/api/story", function(req, res) {
db.Story.create(req.body).then(function(dbStory) { //success
res.json(dbStory);
})
})
app.delete("/api/story/:id", function(req, res){ //success
db.Story.destroy({
where: {
id: req.params.id
}
}).then(function(dbStory) {
res.json(dbStory);
})
})
app.put("/api/story/:id", function(req, res) { //success
db.Story.update(req.body,{
where: {
id: req.params.id
}
}).then(function(dbStory) {
res.json(dbStory);
})
})
app.get("/api/story/:id", function(req, res) { //success
db.Story.findOne({
where: {
Id:req.params.id
},
include: [{all: true}]
//include : [db.Fragment,db.User]
}).then(function(dbStory) {
res.json(dbStory)
})
})
app.get("/api/stories", function(req, res) { //success
db.Story.findAll({include: [db.Category]
}).then(function(dbStory) {
res.json(dbStory)
})
})
app.get("/myStories", function(req, res) { //fail
db.Story.findAll({
where: {
userId: req.params.userId
},
include: [{all:true}]
}).then(function(dbStory) {
res.json(dbStory)
})
})
app.get("/api/top10stories", function(req, res) {
db.Story.findAll({
order: [['id', 'DESC']],
limit: 10,
include: [{all:true}]
}).then(function(dbStory) {
res.json(dbStory)
})
})
} |
"""
ASGI config for paper_planes project.
It exposes the ASGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.2/howto/deployment/asgi/
"""
import os
from django.core.asgi import get_asgi_application
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'paper_planes.settings')
application = get_asgi_application()
|
from pathlib import Path
from test.python.inspectors import JAVA_DATA_FOLDER, PMD_DATA_FOLDER
from typing import List
import pytest
from hyperstyle.src.python.review.inspectors.inspector_type import InspectorType
from hyperstyle.src.python.review.inspectors.issue import CodeIssue, IssueDifficulty, IssueType
from hyperstyle.src.python.review.inspectors.pmd.pmd import PMDInspector
from .conftest import use_file_metadata
FILE_NAME_AND_ISSUES = [
('empty_file.csv', []),
('project_without_issues.csv', []),
(
'single_file_project.csv',
[
CodeIssue(
origin_class='AvoidDuplicateLiterals', type=IssueType.BEST_PRACTICES,
description="The String literal 'Howdy' appears 4 times in this file; "
"the first occurrence is on line 6",
file_path=Path('/home/user/Desktop/some_project/main.java'),
line_no=6, column_no=1, inspector_type=InspectorType.PMD,
difficulty=IssueDifficulty.MEDIUM,
),
CodeIssue(
origin_class='UncommentedEmptyMethodBody', type=IssueType.BEST_PRACTICES,
description='Document empty method body',
file_path=Path('/home/user/Desktop/some_project/main.java'),
line_no=12, column_no=1, inspector_type=InspectorType.PMD,
difficulty=IssueDifficulty.MEDIUM,
),
CodeIssue(
origin_class='UnusedLocalVariable', type=IssueType.BEST_PRACTICES,
description="Avoid unused local variables such as 'result'.",
file_path=Path('/home/user/Desktop/some_project/main.java'),
line_no=31, column_no=1, inspector_type=InspectorType.PMD,
difficulty=IssueDifficulty.MEDIUM,
),
CodeIssue(
origin_class='UnusedPrivateMethod', type=IssueType.BEST_PRACTICES,
description="Avoid unused private methods such as 'emptyLoop()'.",
file_path=Path('/home/user/Desktop/some_project/main.java'),
line_no=61, column_no=1, inspector_type=InspectorType.PMD,
difficulty=IssueDifficulty.MEDIUM,
),
],
),
(
'multi_file_project.csv',
[
CodeIssue(
origin_class='CompareObjectsWithEquals', type=IssueType.ERROR_PRONE,
description='Use equals() to compare object references.',
file_path=Path('/home/user/Desktop/some_project/main1.java'),
line_no=37, column_no=1, inspector_type=InspectorType.PMD,
difficulty=IssueDifficulty.HARD,
),
CodeIssue(
origin_class='SuspiciousEqualsMethodName', type=IssueType.ERROR_PRONE,
description='The method name and parameter number are suspiciously close to equals(Object)',
file_path=Path('/home/user/Desktop/some_project/main1.java'),
line_no=68, column_no=1, inspector_type=InspectorType.PMD,
difficulty=IssueDifficulty.HARD,
),
CodeIssue(
origin_class='UselessParentheses', type=IssueType.CODE_STYLE,
description='Useless parentheses.',
file_path=Path('/home/user/Desktop/some_project/main2.java'),
line_no=113, column_no=1, inspector_type=InspectorType.PMD,
difficulty=IssueDifficulty.EASY,
),
CodeIssue(
origin_class='EmptyIfStmt', type=IssueType.BEST_PRACTICES,
description='Avoid empty if statements',
file_path=Path('/home/user/Desktop/some_project/main2.java'),
line_no=131, column_no=1, inspector_type=InspectorType.PMD,
difficulty=IssueDifficulty.MEDIUM,
),
],
),
]
@pytest.mark.parametrize(('file_name', 'expected_issues'), FILE_NAME_AND_ISSUES)
def test_output_parsing(file_name: str, expected_issues: List[CodeIssue]):
path_to_file = PMD_DATA_FOLDER / file_name
issues = PMDInspector().parse_output(path_to_file)
assert issues == expected_issues
FILE_NAMES_AND_N_ISSUES = [
('test_algorithm_with_scanner.java', 0),
('test_simple_valid_program.java', 0),
('test_boolean_expr.java', 1),
('test_class_with_booleans.java', 3),
('test_closing_streams.java', 1),
('test_code_with_comments.java', 0),
('test_comparing_strings.java', 4),
('test_constants.java', 4),
('test_covariant_equals.java', 1),
('test_curly_braces.java', 0),
('test_double_checked_locking.java', 2),
('test_for_loop.java', 2),
('test_implementation_types.java', 0),
('test_manual_array_copy.java', 1),
('test_method_params.java', 2),
('test_missing_default.java', 2),
('test_multi_statements.java', 1),
('test_reassigning_example.java', 2),
('test_simple_valid_program.java', 0),
('test_switch_statement.java', 5),
('test_thread_run.java', 1),
('test_unused_imports.java', 4),
('test_valid_algorithm_1.java', 0),
('test_valid_curly_braces.java', 0),
('test_when_only_equals_overridden.java', 1),
('test_valid_spaces.java', 0),
('test_multiple_literals.java', 1),
]
@pytest.mark.parametrize(('file_name', 'n_issues'), FILE_NAMES_AND_N_ISSUES)
def test_file_with_issues(file_name: str, n_issues: int):
inspector = PMDInspector()
path_to_file = JAVA_DATA_FOLDER / file_name
with use_file_metadata(path_to_file) as file_metadata:
issues = inspector.inspect(file_metadata.path, {'n_cpu': 1})
assert len(issues) == n_issues
|
var xnm=xnm||{};xnm.aio=xnm.aio||{};xnm.aio.ez=xnm.aio.ez||{};xnm.aio.ez.Util={clearHttpOptionForLog:function(b){try{var a=JSON.parse(JSON.stringify(b));a.auth&&(a.auth="xxxxxx:xxxxxx");if(a.headers)for(var c in headers)if(c&&"authorization"==c.toLocaleLowerCase()){var d=headers[c];if(d){var f=d.indexOf(" ");headers[c]=-1==f?"xxxxxx":d.substr(0,f)+" xxxxxx"}}return a}catch(e){return b}}};
xnm.aio.ez.XS1=function(){var b=function(a,c,d){this._logger=require("x.logger.js").getLogger("xnm.aio.ez.XS1");this.ip=a;this.port=80;c&&(c=parseInt(c),0<c&&(this.port=c));this.username="admin";this.password=d?d:null;this._getDevicesCBs=[];this._deviceBuffer=null};b.prototype._doRequest=function(a,c,d){a={host:this.ip,port:this.port,path:"/control?callback=data&cmd="+a,method:"GET",headers:{Connection:"close"}};if(c)for(var b in c)c.hasOwnProperty(b)&&(a.path+="&"+b+"="+encodeURI(c[b]));this.username&&
this.password&&(a.headers.Authorization="Basic "+(new Buffer(this.username+":"+this.password)).toString("base64"));this._logger.log("trace","send http request:"+JSON.stringify(xnm.aio.ez.Util.clearHttpOptionForLog(a)));var e=d,g=this,l=require("http").request(a,function(a){var c="";a.setEncoding("utf-8");a.on("data",function(a){c+=a});a.on("end",function(){g._logger.log("trace","http response code:"+a.statusCode+" body:"+c);if(200==a.statusCode)if(c=c.trim(),6>c.length||"data("!=c.substr(0,5))e&&
e(Error("response fomart error:"+c)),e=null;else{for(var d=c.substr(5),b=d.length-1;0<=b&&")"!=d.charAt(b);)--b;if(0>b)e&&e(Error("response fomart error:"+c)),e=null;else{d=d.substr(0,b);try{d=JSON.parse(d),e&&e(null,d),e=null}catch(m){e&&e(Error("response fomart error:"+c)),e=null}}}else e&&e(Error("http response code:"+a.statusCode+" "+c)),e=null})});l.setTimeout(2E3,function(){g._logger.log("trace","http request timeout");l.abort();e&&e(Error("http request timeout"));e=null});l.on("error",function(a){g._logger.log("trace",
"http request error:"+a.message);e&&e(a);e=null});l.end()};b.prototype.getDevices=function(a){a||(a=function(){});var c=this._getDevicesCBs.length;-1==this._getDevicesCBs.indexOf(a)&&this._getDevicesCBs.push(a);if(0==c){var d=this;this.getActuators(function(a,c){if(a){c=d._getDevicesCBs;d._getDevicesCBs=[];for(var b=0;b<c.length;b++)c[b]&&c[b](a)}else{var f=[];c&&(f=f.concat(c));d.getSensors(function(a,c){var b=d._getDevicesCBs;d._getDevicesCBs=[];if(a)for(c=0;c<b.length;c++)b[c]&&b[c](a);else for(c&&
(f=f.concat(c)),c=0;c<b.length;c++)b[c]&&b[c](null,f)})}})}};b.prototype.getState=function(a){var c=function(a){var c={actuator:{},sensor:{}};if(a)for(var d=0;d<a.length;d++){var b=a[d];b.address&&("actuator"==b.type?c.actuator[b.address]=b.value:"sensor"==b.type&&(c.sensor[b.address]=b.value))}return c};if(this._deviceBuffer){var d=c(this._deviceBuffer);a&&a(null,d);a=null}this.getDevices(function(b,d){b?a&&a(b):(b=c(d),a&&a(null,b),a=null)})};b.prototype.executeCommand=function(a,c,b){a.address?
c?this._doRequest("set_state_actuator",{number:a.address,"function":c},function(a){b&&b(a)}):b&&b(Error("command invalid")):b&&b(Error("address invalid"))};b.prototype.executeCommandCreator=function(a,c,b){c&&c.value&&"func"==c.value&&c.ext?this.executeCommand(a,c.ext,function(a){b&&b(a)}):b&&b(Error("command invalid"))};b.prototype.getStatesCreator=function(a,c,b){this.getState(function(a,d){if(a)b&&b(a);else{a=[];for(var f=0;f<c.length;f++){var e=c[f];if(e&&e.id&&e.device){var h=e.device;if(h.type&&
h.address){var k;"actuator"==h.type?k=d.actuator[h.address]:"sensor"==h.type&&(k=d.sensor[h.address]);"undefined"!=typeof k&&null!=k&&a.push({id:e.id,status:k})}}}b&&b(null,a)}})};b.prototype.getActuators=function(a){this._doRequest("GET_LIST_ACTUATORS",null,function(c,b){if(c)a&&a(c);else{c=[];if(b&&b.actuator)for(var d=0;d<b.actuator.length;d++)"disabled"!=b.actuator[d].type&&c.push({sys:"xs1",type:"actuator",name:b.actuator[d].name,address:b.actuator[d].id,data:b.actuator[d].type,value:b.actuator[d].value,
unit:b.actuator[d].unit,"function":b.actuator[d]["function"]});a&&a(null,c)}})};b.prototype.getSensors=function(a){this._doRequest("GET_LIST_SENSORS",null,function(b,d){if(b)a&&a(b);else{b=[];if(d&&d.sensor)for(var c=0;c<d.sensor.length;c++)"disabled"!=d.sensor[c].type&&b.push({sys:"xs1",type:"sensor",name:d.sensor[c].name,address:d.sensor[c].id,data:d.sensor[c].type,value:d.sensor[c].value,unit:d.sensor[c].unit});a&&a(null,b)}})};b.prototype.toJSON=function(){return{sys:"xs1",ip:this.ip,port:this.port,
password:this.password}};b.prototype.equalsTo=function(a){return a&&a instanceof b?this.ip==a.ip&&this.port==a.port&&this.password==a.password:!1};return b}();xnm.aio.ez.DMError=function(b,a){this.code=b;this.message=a;this.stack=Error().stack};xnm.aio.ez.prototype=Error();xnm.aio.ez.prototype.name="EZDMError";xnm.aio.ez.prototype.code=0;xnm.aio.ez.ERROR_CODE={DEFAULT:0,INDEX_EXISTS:1,ID_EXISTS:2,INVALID:3,UNKNOW:4,NOT_FOUND:5,IP_EXISTS:6};
xnm.aio.ez.DM={XS1_SYS:"xs1",getGatewayType:function(){return[{sys:this.XS1_SYS,name:"EZcontrol XS1"}]},getGatewayDeviceType:function(b){switch(b.sys){case this.XS1_SYS:return[{type:"actuator",name:"Actuator"},{type:"sensor",name:"Sensor"}];default:return null}},createGateway:function(b,a,c){a=xnm.aio.ez.DM.DMError;var d=xnm.aio.ez.DM.ERROR_CODE;b?b.ip?(b.port||(b.port=80),c(null,b)):c(new a(d.INVALID,"ip is invalid")):c(new a(d.INVALID,"info is invalid"))},updateGateway:function(b,a,c,d){b=xnm.aio.ez.DM.DMError;
c=xnm.aio.ez.DM.ERROR_CODE;a?a.ip?(a.port||(a.port=80),d(null,a)):d(new b(c.INVALID,"ip is invalid")):d(new b(c.INVALID,"update is invalid"))},deleteGateway:function(b,a,c){c()},createDevice:function(b,a,c){a=xnm.aio.ez.DMError;var d=xnm.aio.ez.DM.ERROR_CODE;b?b.type?b.address?c(null,b):c(new a(d.INVALID,"address is invalid")):c(new a(d.INVALID,"type is invalid")):c(new a(d.INVALID,"info is invalid"))},updateDevice:function(b,a,c){a=xnm.aio.ez.DMError;var d=xnm.aio.ez.DM.ERROR_CODE;b?b.type?b.address?
c(null,b):c(new a(d.INVALID,"address is invalid")):c(new a(d.INVALID,"type is invalid")):c(new a(d.INVALID,"info is invalid"))},deleteDevice:function(b,a,c){c()},getCommandStatusMap:function(b){if(!b.sys||!b.type)return null;var a={command:[],status:[{type:"float",name:"status",ref:{value:"state",ext:"%f"}}]};switch(b.sys){case this.XS1_SYS:if(b["function"])for(var c=0;c<b["function"].length;c++){var d=b["function"][c];d&&d.type&&"disabled"!=d.type&&a.command.push({type:"enum",name:d.dsc,ref:{value:"func",
ext:c+1}})}return a;default:return null}},applyUIFilter:function(b,a){var c=function(a,b){if("*"==a)return!0;for(var c=!1,d=0;d<a.length;d++)if(a[d]==b){c=!0;break}return c},d=function(a,b,d){var e=[];switch(d.catagory){case "command":a.command&&a.command.forEach(function(a){c(d.elems,a.type)&&(a=JSON.parse(JSON.stringify(a)),e.push(a))});break;case "status":a.status&&a.status.forEach(function(a){c(d.elems,a.type)&&(a=JSON.parse(JSON.stringify(a)),e.push(a))})}return e},f=function(a,b){var c=[],e=
xnm.aio.ez.DM.getCommandStatusMap(a);e&&(a=d(e,a,b),c=c.concat(a));return c};if(!b.sys)return null;var e=JSON.parse(JSON.stringify(b)),g=null;switch(a.catagory){case "command":g=f(b,a);e.command=g;break;case "status":g=f(b,a);e.status=g;break;default:return null}return g&&0!=g.length?e:null}};
xnm.aio.ez.Handler=function(){var b=function(){};b.prototype.devicemanager=xnm.aio.ez.DM;b.prototype.XS1=xnm.aio.ez.XS1;b.prototype.registModule=function(a){a.register(this.devicemanager.XS1_SYS,"ez")};b.prototype.resolveGateway=function(a){if(!a||!a.sys||!a.ip)return null;switch(a.sys){case this.devicemanager.XS1_SYS:return new xnm.aio.ez.XS1(a.ip,a.port,a.password);default:return null}};b.prototype.getDeviceCommands=function(a,b){a=(a=this.devicemanager.applyUIFilter(a,{catagory:"command",elems:"*"}))?
a.command:[];b&&b(null,a)};b.prototype.getDeviceStatus=function(a,b){a=(a=this.devicemanager.applyUIFilter(a,{catagory:"status",elems:"*"}))?a.status:[];b&&b(null,a)};b.prototype.doCommand=function(a,b,d,f){(a=this.resolveGateway(a))?a.executeCommandCreator(b,d,f):f&&f(Error("gateway json format invalid"))};b.prototype.doStatus=function(a,b,d,f,e){(b=this.resolveGateway(b))?b.getStatesCreator(null,[{id:a,device:d,status:f}],function(a,b){a?e&&e(a):e&&e(null,b[0])}):e&&e(Error("gateway json format invalid"))};
b.prototype.getDeviceList=function(a,b){(a=this.resolveGateway(a))?a.getDevices(function(a,c){b&&b(a,c)}):b&&b(Error("gateway json format invalid"))};return b}();"undefined"!=typeof exports&&"undefined"!=typeof module&&module.exports&&(exports=module.exports=new xnm.aio.ez.Handler);
|
"""Production settings."""
import os
from .base import * # NOQA
# Base
SECRET_KEY = os.getenv('DJANGO_SECRET_KEY')
ALLOWED_HOSTS = os.getenv('DJANGO_ALLOWED_HOSTS', default=['*'])
# Databases
DATABASES['default'] = os.getenv('DATABASE_URL') # NOQA
DATABASES['default']['ATOMIC_REQUESTS'] = True # NOQA
DATABASES['default']['CONN_MAX_AGE'] = os.getenv('CONN_MAX_AGE', default=60) # NOQA
# Cache
CACHES = {
'default': {
'BACKEND': 'django_redis.cache.RedisCache',
'LOCATION': os.getenv('REDIS_URL'),
'OPTIONS': {
'CLIENT_CLASS': 'django_redis.client.DefaultClient',
'IGNORE_EXCEPTIONS': True,
}
}
}
# Security
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
SECURE_SSL_REDIRECT = os.getenv('DJANGO_SECURE_SSL_REDIRECT', default=True)
SESSION_COOKIE_SECURE = True
CSRF_COOKIE_SECURE = True
SECURE_HSTS_SECONDS = 60
SECURE_HSTS_INCLUDE_SUBDOMAINS = os.getenv('DJANGO_SECURE_HSTS_INCLUDE_SUBDOMAINS', default=True)
SECURE_HSTS_PRELOAD = os.getenv('DJANGO_SECURE_HSTS_PRELOAD', default=True)
SECURE_CONTENT_TYPE_NOSNIFF = os.getenv('DJANGO_SECURE_CONTENT_TYPE_NOSNIFF', default=True)
# Storages
INSTALLED_APPS += ['storages'] # noqa F405
AWS_STORAGE_BUCKET_NAME = os.getenv('DJANGO_AWS_STORAGE_BUCKET_NAME')
AWS_QUERYSTRING_AUTH = False
_AWS_EXPIRY = 60 * 60 * 24 * 7
AWS_S3_OBJECT_PARAMETERS = {
'CacheControl': f'max-age={_AWS_EXPIRY}, s-maxage={_AWS_EXPIRY}, must-revalidate',
}
# Static files
STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage'
# Media
DEFAULT_FILE_STORAGE = 'storages.backends.s3boto3.S3Boto3Storage'
MEDIA_URL = f'https://{AWS_STORAGE_BUCKET_NAME}.s3.amazonaws.com/'
# Templates
TEMPLATES[0]['OPTIONS']['loaders'] = [ # noqa F405
(
'django.template.loaders.cached.Loader',
[
'django.template.loaders.filesystem.Loader',
'django.template.loaders.app_directories.Loader',
]
),
]
# Gunicorn
INSTALLED_APPS += ['gunicorn'] # noqa F405
# WhiteNoise
MIDDLEWARE.insert(1, 'whitenoise.middleware.WhiteNoiseMiddleware') # noqa F405
# Logging
# A sample logging configuration. The only tangible logging
# performed by this configuration is to send an email to
# the site admins on every HTTP 500 error when DEBUG=False.
# See https://docs.djangoproject.com/en/dev/topics/logging for
# more details on how to customize your logging configuration.
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'formatters': {
'verbose': {
'format': '{levelname} {asctime} {module} {process:d} {thread:d} {message}',
'style': '{',
},
'simple': {
'format': '{levelname} {message}',
'style': '{',
},
},
'filters': {
'special': {
'()': 'project.logging.SpecialFilter',
'foo': 'bar',
},
'require_debug_true': {
'()': 'django.utils.log.RequireDebugTrue',
},
},
'handlers': {
'console': {
'level': 'INFO',
'filters': ['require_debug_true'],
'class': 'logging.StreamHandler',
'formatter': 'simple'
},
'mail_admins': {
'level': 'ERROR',
'class': 'django.utils.log.AdminEmailHandler',
'filters': ['special']
}
},
'loggers': {
'django': {
'handlers': ['console'],
'propagate': True,
},
'django.request': {
'handlers': ['mail_admins'],
'level': 'ERROR',
'propagate': False,
},
'myproject.custom': {
'handlers': ['console', 'mail_admins'],
'level': 'INFO',
'filters': ['special']
}
}
}
|
$(document).ready(function(){
load();
});
function load(){
var options = {
country: "Mexico",
year: 1950
};
renderGraph();
$("#year").change( function(){
selected = $(this).find('option:selected').val();
options.year = selected;
renderGraph();
});
$("#country").change( function(){
selected = $(this).find('option:selected').val();
options.country = selected;
renderGraph();
});
function renderGraph(){
clearGraph();
$.ajax({
method: "GET",
url: "http://api.population.io:80/1.0/population/"+ options.year +"/"+ options.country,
}).done( function (data){
InitChart( data );
});
}
function InitChart( data ) {
var barData = [];
$.each(data, function(i, val){
//console.log(val);
if(i%2 === 0){
barData.push( {'age':val.age,'total':val.total});
}
});
var vis = d3.select('#visualisation'),
WIDTH = 1200,
HEIGHT = 500,
MARGINS = {
top: 20,
right: 20,
bottom: 20,
left: 100
},
xRange = d3.scale.ordinal().rangeRoundBands([MARGINS.left, WIDTH - MARGINS.right], 0.1).domain(barData.map(function (d) {
return d.age;
})),
yRange = d3.scale.linear().range([HEIGHT - MARGINS.top, MARGINS.bottom]).domain([0,
d3.max(barData, function (d) {
return d.total;
})
]),
xAxis = d3.svg.axis()
.scale(xRange)
.tickSize(3)
.tickSubdivide(true),
yAxis = d3.svg.axis()
.scale(yRange)
.tickSize(3)
.orient("left")
.tickSubdivide(true);
vis.append('svg:g')
.attr('class', 'x axis')
.attr('transform', 'translate(0,' + (HEIGHT - MARGINS.bottom) + ')')
.call(xAxis);
vis.append('svg:g')
.attr('class', 'y axis')
.attr('transform', 'translate(' + (MARGINS.left) + ',0)')
.call(yAxis);
vis.selectAll('rect')
.data(barData)
.enter()
.append('rect')
.attr('x', function (d) {
return xRange(d.age);
})
.attr('y', function (d) {
return yRange(d.total);
})
.attr('width', xRange.rangeBand())
.attr('height', function (d) {
return ((HEIGHT - MARGINS.bottom) - yRange(d.total));
})
.attr('fill', '#17ABBE');
}
function clearGraph(){
var svg = d3.select("svg");
svg.selectAll("*").remove();
}
}
|
/**
* @file Helper of the `okam-core` framework
* @author [email protected]
*/
'use strict';
const FRAMEWORK_PATH_BASE = 'okam-core/src/';
const FRAMEWORK_POLYFILL_BASE = FRAMEWORK_PATH_BASE + 'polyfill/';
/**
* The okam framework builtin extension definition
*
* @const
* @type {Object}
*/
const FRAMEWORK_EXTEND_PATH = {
data: {
'swan': 'extend/data/observable/swan/index',
'ant': 'extend/data/observable/ant/index',
'wx': 'extend/data/observable/wx/index',
'tt': 'extend/data/observable/tt/index',
'quick': 'extend/data/observable/quick/index',
'default': 'extend/data/observable/index'
},
watch: {
'default': 'extend/data/watch/index',
'quick': 'extend/data/watch/quick/index'
},
broadcast: {
'default': 'extend/broadcast/index',
'quick': 'extend/broadcast/quick/index'
},
behavior: {
'ant': {
base: 'extend/behavior/ant/index',
creator: 'extend/behavior/ant/Behavior'
},
'quick': {
base: 'extend/behavior/quick/index',
creator: 'extend/behavior/quick/Behavior'
},
'default': {
base: 'extend/behavior/index',
creator: 'extend/behavior/Behavior'
}
},
redux: 'extend/data/redux/index',
vuex: 'extend/data/vuex/index',
model: 'extend/data/model',
ref: {
'default': 'extend/ref/index',
'ant': 'extend/ref/ant/index',
'quick': 'extend/ref/quick/index'
},
vhtml: {
'default': true
},
filter: {
wx: true,
tt: true,
swan: true,
ant: true,
quick: 'extend/filter/quick/index'
}
};
/**
* The internal behavior id prefix
*
* @const
* @type {Object}
*/
const INTERNAL_BEHAVIOR_PREFIX = {
swan: 'swan://',
wx: 'wx://'
};
/**
* The builtin polyfill type
*
* @const
* @type {Object}
*/
const POLYFILL_TYPE = {
promise: {
desc: 'Promise API',
deps: ['promise-polyfill'],
path: `${FRAMEWORK_POLYFILL_BASE}promise`,
exports: 'Promise'
},
async: {
desc: 'Async/Await syntax',
deps: ['regenerator-runtime'],
path: `${FRAMEWORK_POLYFILL_BASE}async`,
exports: 'regeneratorRuntime'
}
};
/**
* Get polyfill info
*
* @param {string} type the polyfill type
* @return {Object}
*/
exports.getPolyfillInfo = function (type) {
let info = POLYFILL_TYPE[type];
if (!info) {
throw new Error(
`unknow polyfill ${type} validated polyfill only support`
+ Object.keys(POLYFILL_TYPE)
);
}
info.type = type;
return info;
};
/**
* Normalize internal behavior id
*
* @param {string} appType the app type to build
* @param {string} behaviorId the behavior id to normalize
* @return {string}
*/
exports.normalizeInternalBehavior = function (appType, behaviorId) {
let prefix = INTERNAL_BEHAVIOR_PREFIX[appType];
if (!prefix) {
return behaviorId;
}
if (behaviorId.indexOf(prefix) === -1) {
return prefix + behaviorId;
}
return behaviorId;
};
/**
* Get okam-core framework required module base id
*
* @param {string} appType the app type, validated values: wx/ant,
* other values will return default base id
* @param {string} baseName the base name to required
* @return {string}
*/
exports.getBaseId = function (appType, baseName) {
return FRAMEWORK_PATH_BASE + appType + '/' + baseName;
};
/**
* Get okam-core framework extend module id
*
* @param {string} appType the app type: swan/wx/ant
* @param {string} extendName the extension name
* @param {boolean=} getConstructor get the extension constructor
* @return {string|boolean}
*/
exports.getFrameworkExtendId = function (appType, extendName, getConstructor = false) {
let value = FRAMEWORK_EXTEND_PATH[extendName];
if (value && typeof value === 'object') {
value = value[appType] || value.default;
}
if (value == null) {
throw new Error(`unknown ${appType} framework extension: ${extendName}`);
}
if (typeof value === 'boolean') {
return;
}
if (typeof value === 'object') {
value = getConstructor ? value.creator : value.base;
}
return value ? FRAMEWORK_PATH_BASE + value : false;
};
|
/* global fetch */
import { parse, format } from 'url'
import { EventEmitter } from 'events'
import evalScript from '../eval-script'
import shallowEquals from '../shallow-equals'
import PQueue from '../p-queue'
import { loadGetInitialProps, getLocationOrigin } from '../utils'
import { _notifyBuildIdMismatch } from './'
// Add "fetch" polyfill for older browsers
if (typeof window !== 'undefined') {
require('whatwg-fetch')
}
export default class Router extends EventEmitter {
constructor (pathname, query, { Component, ErrorComponent, err } = {}) {
super()
// represents the current component key
this.route = toRoute(pathname)
// set up the component cache (by route keys)
this.components = { [this.route]: { Component, err } }
// contain a map of promise of fetch routes
this.fetchingRoutes = {}
this.prefetchQueue = new PQueue({ concurrency: 2 })
this.ErrorComponent = ErrorComponent
this.pathname = pathname
this.query = query
this.subscriptions = new Set()
this.componentLoadCancel = null
this.onPopState = this.onPopState.bind(this)
if (typeof window !== 'undefined') {
// in order for `e.state` to work on the `onpopstate` event
// we have to register the initial route upon initialization
this.changeState('replaceState', format({ pathname, query }), getURL())
window.addEventListener('popstate', this.onPopState)
}
}
async onPopState (e) {
if (!e.state) {
// We get state as undefined for two reasons.
// 1. With older safari (< 8) and older chrome (< 34)
// 2. When the URL changed with #
//
// In the both cases, we don't need to proceed and change the route.
// (as it's already changed)
// But we can simply replace the state with the new changes.
// Actually, for (1) we don't need to nothing. But it's hard to detect that event.
// So, doing the following for (1) does no harm.
const { pathname, query } = this
this.replace(format({ pathname, query }), getURL())
return
}
this.abortComponentLoad()
const { url, as } = e.state
const { pathname, query } = parse(url, true)
if (!this.urlIsNew(pathname, query)) {
this.emit('routeChangeStart', as)
this.emit('routeChangeComplete', as)
return
}
const route = toRoute(pathname)
this.emit('routeChangeStart', as)
const {
data,
props,
error
} = await this.getRouteInfo(route, pathname, query, as)
if (error && error.cancelled) {
this.emit('routeChangeError', error, as)
return
}
this.route = route
this.set(pathname, query, { ...data, props })
if (error) {
this.emit('routeChangeError', error, as)
} else {
this.emit('routeChangeComplete', as)
}
}
update (route, Component) {
const data = this.components[route] || {}
const newData = { ...data, Component }
this.components[route] = newData
if (route === this.route) {
this.notify(newData)
}
}
async reload (route) {
delete this.components[route]
delete this.fetchingRoutes[route]
if (route !== this.route) return
const url = window.location.href
const { pathname, query } = parse(url, true)
this.emit('routeChangeStart', url)
const {
data,
props,
error
} = await this.getRouteInfo(route, pathname, query, url)
if (error && error.cancelled) {
this.emit('routeChangeError', error, url)
return
}
this.notify({ ...data, props })
if (error) {
this.emit('routeChangeError', error, url)
throw error
}
this.emit('routeChangeComplete', url)
}
back () {
window.history.back()
}
push (url, as = url) {
return this.change('pushState', url, as)
}
replace (url, as = url) {
return this.change('replaceState', url, as)
}
async change (method, url, as) {
this.abortComponentLoad()
const { pathname, query } = parse(url, true)
// If asked to change the current URL we should reload the current page
// (not location.reload() but reload getInitalProps and other Next.js stuffs)
// We also need to set the method = replaceState always
// as this should not go into the history (That's how browsers work)
if (!this.urlIsNew(pathname, query)) {
method = 'replaceState'
}
const route = toRoute(pathname)
this.emit('routeChangeStart', as)
const {
data, props, error
} = await this.getRouteInfo(route, pathname, query, as)
if (error && error.cancelled) {
this.emit('routeChangeError', error, as)
return false
}
this.changeState(method, url, as)
this.route = route
this.set(pathname, query, { ...data, props })
if (error) {
this.emit('routeChangeError', error, as)
throw error
}
this.emit('routeChangeComplete', as)
return true
}
changeState (method, url, as) {
if (method !== 'pushState' || getURL() !== as) {
window.history[method]({ url, as }, null, as)
}
}
async getRouteInfo (route, pathname, query, as) {
const routeInfo = {}
try {
routeInfo.data = await this.fetchComponent(route, as)
if (!routeInfo.data) {
return null
}
const { Component, err, jsonPageRes } = routeInfo.data
const ctx = { err, pathname, query, jsonPageRes }
routeInfo.props = await this.getInitialProps(Component, ctx)
} catch (err) {
if (err.cancelled) {
return { error: err }
}
const Component = this.ErrorComponent
routeInfo.data = { Component, err }
const ctx = { err, pathname, query }
routeInfo.props = await this.getInitialProps(Component, ctx)
routeInfo.error = err
console.error(err)
}
return routeInfo
}
set (pathname, query, data) {
this.pathname = pathname
this.query = query
this.notify(data)
}
urlIsNew (pathname, query) {
return this.pathname !== pathname || !shallowEquals(query, this.query)
}
async prefetch (url) {
const { pathname } = parse(url)
const route = toRoute(pathname)
return this.prefetchQueue.add(() => this.fetchRoute(route))
}
async fetchComponent (route, as) {
let data = this.components[route]
if (data) return data
let cancelled = false
const cancel = this.componentLoadCancel = function () {
cancelled = true
}
const jsonPageRes = await this.fetchRoute(route)
const jsonData = await jsonPageRes.json()
if (jsonData.buildIdMismatch) {
_notifyBuildIdMismatch(as)
const error = Error('Abort due to BUILD_ID mismatch')
error.cancelled = true
throw error
}
const newData = {
...loadComponent(jsonData),
jsonPageRes
}
if (cancelled) {
const error = new Error(`Abort fetching component for route: "${route}"`)
error.cancelled = true
throw error
}
if (cancel === this.componentLoadCancel) {
this.componentLoadCancel = null
}
this.components[route] = newData
return newData
}
async getInitialProps (Component, ctx) {
let cancelled = false
const cancel = () => { cancelled = true }
this.componentLoadCancel = cancel
const props = await loadGetInitialProps(Component, ctx)
if (cancel === this.componentLoadCancel) {
this.componentLoadCancel = null
}
if (cancelled) {
const err = new Error('Loading initial props cancelled')
err.cancelled = true
throw err
}
return props
}
async fetchRoute (route) {
let promise = this.fetchingRoutes[route]
if (!promise) {
promise = this.fetchingRoutes[route] = this.doFetchRoute(route)
}
const res = await promise
// We need to clone this to prevent reading the body twice
// Becuase it's possible only once to read res.json() or a similar method.
return res.clone()
}
doFetchRoute (route) {
const { buildId } = window.__NEXT_DATA__
const url = `/_next/${encodeURIComponent(buildId)}/pages${route}`
return fetch(url, {
method: 'GET',
headers: { 'Accept': 'application/json' }
})
}
abortComponentLoad () {
if (this.componentLoadCancel) {
this.componentLoadCancel()
this.componentLoadCancel = null
}
}
notify (data) {
this.subscriptions.forEach((fn) => fn(data))
}
subscribe (fn) {
this.subscriptions.add(fn)
return () => this.subscriptions.delete(fn)
}
}
function getURL () {
const { href } = window.location
const origin = getLocationOrigin()
return href.substring(origin.length)
}
function toRoute (path) {
return path.replace(/\/$/, '') || '/'
}
function loadComponent (jsonData) {
const module = evalScript(jsonData.component)
const Component = module.default || module
return { Component, err: jsonData.err }
}
|
const request = require('supertest')
const nock = require('nock')
const app = require('../../server')
describe('POST /events', () => {
jest.setTimeout(60 * 1000)
let csrfToken = ''
let agent
beforeEach(async () => {
process.env.AIRTABLE_API_KEY = '$AIRTABLE_API_KEY$'
process.env.AIRTABLE_BASE_KEY = '$AIRTABLE_BASE_KEY$'
process.env.HYDRO_SECRET = '$HYDRO_SECRET$'
process.env.HYDRO_ENDPOINT = 'http://example.com/hydro'
agent = request.agent(app)
const csrfRes = await agent.get('/csrf')
csrfToken = csrfRes.body.token
nock('http://example.com')
.post('/hydro')
.reply(200, {})
})
afterEach(() => {
delete process.env.AIRTABLE_API_KEY
delete process.env.AIRTABLE_BASE_KEY
delete process.env.HYDRO_SECRET
delete process.env.HYDRO_ENDPOINT
csrfToken = ''
})
async function checkEvent (data, code) {
return agent
.post('/events')
.send(data)
.set('Accept', 'application/json')
.set('csrf-token', csrfToken)
.expect(code)
}
const baseExample = {
context: {
// Primitives
event_id: 'a35d7f88-3f48-4f36-ad89-5e3c8ebc3df7',
user: '703d32a8-ed0f-45f9-8d78-a913d4dc6f19',
version: '1.0.0',
created: '2020-10-02T17:12:18.620Z',
// Content information
path: '/github/docs/issues',
referrer: 'https://github.com/github/docs',
search: '?q=is%3Aissue+is%3Aopen+example+',
href: 'https://github.com/github/docs/issues?q=is%3Aissue+is%3Aopen+example+',
site_language: 'en',
// Device information
os: 'linux',
os_version: '18.04',
browser: 'chrome',
browser_version: '85.0.4183.121',
viewport_width: 1418,
viewport_height: 501,
// Location information
timezone: -7,
user_language: 'en-US'
}
}
describe('page', () => {
const pageExample = { ...baseExample, type: 'page' }
it('should record a page event', () =>
checkEvent(pageExample, 201)
)
it('should require a type', () =>
checkEvent(baseExample, 400)
)
it('should require an event_id in uuid', () =>
checkEvent({
...pageExample,
context: {
...pageExample.context,
event_id: 'asdfghjkl'
}
}, 400)
)
it('should require a user in uuid', () =>
checkEvent({
...pageExample,
context: {
...pageExample.context,
user: 'asdfghjkl'
}
}, 400)
)
it('should require a version', () =>
checkEvent({
...pageExample,
context: {
...pageExample.context,
version: undefined
}
}, 400)
)
it('should require created timestamp', () =>
checkEvent({
...pageExample,
context: {
...pageExample.context,
timestamp: 1234
}
}, 400)
)
it('should not allow a honeypot token', () =>
checkEvent({
...pageExample,
context: {
...pageExample.context,
token: 'zxcv'
}
}, 400)
)
it('should path be uri-reference', () =>
checkEvent({
...pageExample,
context: {
...pageExample.context,
path: ' '
}
}, 400)
)
it('should referrer be uri-reference', () =>
checkEvent({
...pageExample,
context: {
...pageExample.context,
referrer: ' '
}
}, 400)
)
it('should search a string', () =>
checkEvent({
...pageExample,
context: {
...pageExample.context,
search: 1234
}
}, 400)
)
it('should href be uri', () =>
checkEvent({
...pageExample,
context: {
...pageExample.context,
href: '/example'
}
}, 400)
)
it('should site_language is a valid option', () =>
checkEvent({
...pageExample,
context: {
...pageExample.context,
site_language: 'nl'
}
}, 400)
)
it('should a valid os option', () =>
checkEvent({
...pageExample,
context: {
...pageExample.context,
os: 'ubuntu'
}
}, 400)
)
it('should os_version a string', () =>
checkEvent({
...pageExample,
context: {
...pageExample.context,
os_version: 25
}
}, 400)
)
it('should browser a valid option', () =>
checkEvent({
...pageExample,
context: {
...pageExample.context,
browser: 'opera'
}
}, 400)
)
it('should browser_version a string', () =>
checkEvent({
...pageExample,
context: {
...pageExample.context,
browser_version: 25
}
}, 400)
)
it('should viewport_width a number', () =>
checkEvent({
...pageExample,
context: {
...pageExample.context,
viewport_width: -500
}
}, 400)
)
it('should viewport_height a number', () =>
checkEvent({
...pageExample,
context: {
...pageExample.context,
viewport_height: '53px'
}
}, 400)
)
it('should timezone in number', () =>
checkEvent({
...pageExample,
context: {
...pageExample.context,
timezone: 'GMT-0700'
}
}, 400)
)
it('should user_language is a string', () =>
checkEvent({
...pageExample,
context: {
...pageExample.context,
user_language: true
}
}, 400)
)
it('should page_render_duration is a positive number', () =>
checkEvent({
...pageExample,
page_render_duration: -0.5
}, 400)
)
})
describe('exit', () => {
const exitExample = {
...baseExample,
type: 'exit',
exit_page_id: 'c93c2d16-8e07-43d5-bc3c-eacc999c184d',
exit_first_paint: 0.1,
exit_dom_interactive: 0.2,
exit_dom_complete: 0.3,
exit_visit_duration: 5,
exit_scroll_length: 0.5
}
it('should record an exit event', () =>
checkEvent(exitExample, 201)
)
it('should require exit_page_id', () =>
checkEvent({ ...exitExample, exit_page_id: undefined }, 400)
)
it('should require exit_page_id is a uuid', () =>
checkEvent({ ...exitExample, exit_page_id: 'afjdskalj' }, 400)
)
it('exit_first_paint is a number', () =>
checkEvent({ ...exitExample, exit_first_paint: 'afjdkl' }, 400)
)
it('exit_dom_interactive is a number', () =>
checkEvent({ ...exitExample, exit_dom_interactive: '202' }, 400)
)
it('exit_visit_duration is a number', () =>
checkEvent({ ...exitExample, exit_visit_duration: '75' }, 400)
)
it('exit_scroll_length is a number between 0 and 1', () =>
checkEvent({ ...exitExample, exit_scroll_length: 1.1 }, 400)
)
})
describe('link', () => {
const linkExample = {
...baseExample,
type: 'link',
link_url: 'https://example.com'
}
it('should send a link event', () =>
checkEvent(linkExample, 201)
)
it('link_url is a required uri formatted string', () =>
checkEvent({ ...linkExample, link_url: 'foo' }, 400)
)
})
describe('search', () => {
const searchExample = {
...baseExample,
type: 'search',
search_query: 'github private instances',
search_context: 'private'
}
it('should record a search event', () =>
checkEvent(searchExample, 201)
)
it('search_query is required string', () =>
checkEvent({ ...searchExample, search_query: undefined }, 400)
)
it('search_context is optional string', () =>
checkEvent({ ...searchExample, search_context: undefined }, 201)
)
})
describe('navigate', () => {
const navigateExample = {
...baseExample,
type: 'navigate',
navigate_label: 'drop down'
}
it('should record a navigate event', () =>
checkEvent(navigateExample, 201)
)
it('navigate_label is optional string', () =>
checkEvent({ ...navigateExample, navigate_label: undefined }, 201)
)
})
describe('survey', () => {
const surveyExample = {
...baseExample,
type: 'survey',
survey_vote: true,
survey_comment: 'I love this site.',
survey_email: '[email protected]'
}
it('should record a survey event', () =>
checkEvent(surveyExample, 201)
)
it('survey_vote is boolean', () =>
checkEvent({ ...surveyExample, survey_vote: undefined }, 400)
)
it('survey_comment is string', () => {
checkEvent({ ...surveyExample, survey_comment: 1234 }, 400)
})
it('survey_email is email', () => {
checkEvent({ ...surveyExample, survey_email: 'daisy' }, 400)
})
})
describe('experiment', () => {
const experimentExample = {
...baseExample,
type: 'experiment',
experiment_name: 'change-button-copy',
experiment_variation: 'treatment',
experiment_success: true
}
it('should record an experiment event', () =>
checkEvent(experimentExample, 201)
)
it('experiment_name is required string', () =>
checkEvent({ ...experimentExample, experiment_name: undefined }, 400)
)
it('experiment_variation is required string', () =>
checkEvent({ ...experimentExample, experiment_variation: undefined }, 400)
)
it('experiment_success is optional boolean', () =>
checkEvent({ ...experimentExample, experiment_success: undefined }, 201)
)
})
describe('redirect', () => {
const redirectExample = {
...baseExample,
type: 'redirect',
redirect_from: 'http://example.com/a',
redirect_to: 'http://example.com/b'
}
it('should record an redirect event', () =>
checkEvent(redirectExample, 201)
)
it('redirect_from is required url', () =>
checkEvent({ ...redirectExample, redirect_from: ' ' }, 400)
)
it('redirect_to is required url', () =>
checkEvent({ ...redirectExample, redirect_to: undefined }, 400)
)
})
describe('clipboard', () => {
const clipboardExample = {
...baseExample,
type: 'clipboard',
clipboard_operation: 'copy'
}
it('should record an clipboard event', () =>
checkEvent(clipboardExample, 201)
)
it('clipboard_operation is required copy, paste, cut', () =>
checkEvent({ ...clipboardExample, clipboard_operation: 'destroy' }, 400)
)
})
describe('print', () => {
const printExample = {
...baseExample,
type: 'print'
}
it('should record a print event', () =>
checkEvent(printExample, 201)
)
})
})
|
load("0d8683db8b3792521a65ad1edba9cf82.js");
load("dada5190587903f93a3604016a6099ce.js");
load("1237a76a3b369a9ccbdf1d1e9d4812e4.js");
load("d62a4edf18371a367cc2cb7304d8815a.js");
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (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.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Mozilla Communicator client code, released
* March 31, 1998.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
gTestfile = 'proto_10.js';
/**
File Name: proto_10.js
Section:
Description: Determining Instance Relationships
This tests Object Hierarchy and Inheritance, as described in the document
Object Hierarchy and Inheritance in JavaScript, last modified on 12/18/97
15:19:34 on http://devedge.netscape.com/. Current URL:
http://devedge.netscape.com/docs/manuals/communicator/jsobj/contents.htm
This tests the syntax ObjectName.prototype = new PrototypeObject using the
Employee example in the document referenced above.
Author: [email protected]
Date: 12 november 1997
*/
var SECTION = "proto_10";
var VERSION = "JS1_3";
var TITLE = "Determining Instance Relationships";
startTest();
writeHeaderToLog( SECTION + " "+ TITLE);
function InstanceOf( object, constructor ) {
return object instanceof constructor;
}
function Employee ( name, dept ) {
this.name = name || "";
this.dept = dept || "general";
}
function Manager () {
this.reports = [];
}
Manager.prototype = new Employee();
function WorkerBee ( name, dept, projs ) {
this.base = Employee;
this.base( name, dept)
this.projects = projs || new Array();
}
WorkerBee.prototype = new Employee();
function SalesPerson () {
this.dept = "sales";
this.quota = 100;
}
SalesPerson.prototype = new WorkerBee();
function Engineer ( name, projs, machine ) {
this.base = WorkerBee;
this.base( name, "engineering", projs )
this.machine = machine || "";
}
Engineer.prototype = new WorkerBee();
var pat = new Engineer();
new TestCase( SECTION,
"InstanceOf( pat, Engineer )",
true,
InstanceOf( pat, Engineer ) );
new TestCase( SECTION,
"InstanceOf( pat, WorkerBee )",
true,
InstanceOf( pat, WorkerBee ) );
new TestCase( SECTION,
"InstanceOf( pat, Employee )",
true,
InstanceOf( pat, Employee ) );
new TestCase( SECTION,
"InstanceOf( pat, Object )",
true,
InstanceOf( pat, Object ) );
new TestCase( SECTION,
"InstanceOf( pat, SalesPerson )",
false,
InstanceOf ( pat, SalesPerson ) );
test();
|
import React from 'react';
import { css } from '@emotion/core';
import { Link } from 'gatsby';
import Image from 'gatsby-image';
import ReadLink from '../components/read-link';
const PostPreview = ({ post }) => (
<article
css={css`
border-bottom: 1px solid #ddd;
display: flex;
margin-top: 0;
padding-bottom: 1rem;
:first-of-type {
margin-top: 1rem;
}
`}
>
<Link
to={post.slug}
css={css`
margin: 1rem 1rem 0 0;
min-width: 100px;
`}
>
<Image
css={css`
* {
margin-top: 0;
}
`}
fluid={post.image.sharp.fluid}
alt={post.title}
/>
</Link>
<div>
<h3>
<Link to={post.slug}>{post.title}</Link>
</h3>
<p>{post.excerpt}</p>
<ReadLink to={post.slug}>read this post →</ReadLink>
</div>
</article>
);
export default PostPreview;
|
var classarm__compute_1_1_n_e_edge_trace_kernel =
[
[ "NEEdgeTraceKernel", "classarm__compute_1_1_n_e_edge_trace_kernel.xhtml#a612c2d90812d66a7ce4c2f588b5845c4", null ],
[ "NEEdgeTraceKernel", "classarm__compute_1_1_n_e_edge_trace_kernel.xhtml#ac9756d4d8d467a0d67a845d31df49c9d", null ],
[ "NEEdgeTraceKernel", "classarm__compute_1_1_n_e_edge_trace_kernel.xhtml#afef98c788326dbd5e66b085b5f9dd621", null ],
[ "~NEEdgeTraceKernel", "classarm__compute_1_1_n_e_edge_trace_kernel.xhtml#a63a533746b32a68c6ab1610c3a4823e6", null ],
[ "border_size", "classarm__compute_1_1_n_e_edge_trace_kernel.xhtml#a423f9a45a52983b4de5e2b347f4369c7", null ],
[ "configure", "classarm__compute_1_1_n_e_edge_trace_kernel.xhtml#a9daf8026e68559806afe7d0aa12693d6", null ],
[ "is_parallelisable", "classarm__compute_1_1_n_e_edge_trace_kernel.xhtml#a4370ae5fda7bd455a171fc8ed4d3f283", null ],
[ "operator=", "classarm__compute_1_1_n_e_edge_trace_kernel.xhtml#a4c827d25ce4451de792fa939a61402b5", null ],
[ "operator=", "classarm__compute_1_1_n_e_edge_trace_kernel.xhtml#a2ef3350848cbf1f21b6eaba6dca4ec1b", null ],
[ "run", "classarm__compute_1_1_n_e_edge_trace_kernel.xhtml#a8fd12b95bdde3f93db96bc9b1598db69", null ]
]; |
(function(d){d['ug']=Object.assign(d['ug']||{},{a:"چىقىرىشقا بولمايدىغان ھۆججەت :",b:"Image toolbar",c:"Table toolbar",d:"Edit block",e:"توم",f:"يانتۇ",g:"قىسمەن قوللىنىش",h:"Insert image or file",i:"تېما تاللاش",j:"تېما",k:"رەسىمچىك",l:"ئەسلى چوڭلۇقتىكى رەسىم",m:"يان رەسىم",n:"سولغا توغۇرلانغان رەسىم",o:"ئوتتۇردىكى رەسىم",p:"ئوڭغا توغۇرلانغان رەسىم",q:"رەسىم قىستۇرۇش",r:"Increase indent",s:"Decrease indent",t:"نومۇر جەدىۋېلى",u:"بەلگە جەدىۋېلى",v:"Insert table",w:"Header column",x:"Insert column left",y:"Insert column right",z:"Delete column",aa:"Column",ab:"Header row",ac:"Insert row below",ad:"Insert row above",ae:"Delete row",af:"Row",ag:"Merge cell up",ah:"Merge cell right",ai:"Merge cell down",aj:"Merge cell left",ak:"Split cell vertically",al:"Split cell horizontally",am:"Merge cells",an:"رەسىمنىڭ تېمىسىنى كىرگۈزۈڭ",ao:"چىقىرىش مەغلۇپ بولدى",ap:"media widget",aq:"Insert media",ar:"The URL must not be empty.",as:"This media URL is not supported.",at:"Upload in progress",au:"ئۇلاش",av:"Widget toolbar",aw:"Editor toolbar",ax:"Show more items",ay:"Could not obtain resized image URL.",az:"Selecting resized image failed",ba:"Could not insert image at the current position.",bb:"Inserting image failed",bc:"رەسىملىك تېكىست تاللىغۇچنى ئۆزگەرتىش",bd:"تېكىست تەھرىرلىگۈچ، 0%",be:"ئۈزۈش",bf:"Edit link",bg:"Open link in new tab",bh:"This link has no URL",bi:"Open in a new tab",bj:"Downloadable",bk:"قالدۇرۇش",bl:"قايتا قىلىش",bm:"ساقلاش",bn:"قالدۇرۇش",bo:"ئۇلاش ئادىرسى",bp:"%0 of %1",bq:"Previous",br:"Next",bs:"Dropdown toolbar",bt:"تېكىست ئاملاشتۇرۇش",bu:"Paste the media URL in the input.",bv:"Tip: Paste the URL into the content to embed faster.",bw:"Media URL",bx:"بۆلەك",by:"تېما 1",bz:"تېما 2",ca:"تېما 3",cb:"Heading 4",cc:"Heading 5",cd:"Heading 6"})})(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={})); |
// Load runtime modules.
require('./verify_cwd')
require('./promise')
|
import * as React from 'react';
import wrapIcon from '../utils/wrapIcon';
const rawSvg = (iconProps) => {
const { className, primaryFill } = iconProps;
return React.createElement("svg", { width: 48, height: 48, viewBox: "0 0 48 48", xmlns: "http://www.w3.org/2000/svg", className: className },
React.createElement("path", { d: "M31.66 12.24a1.25 1.25 0 000 2.5c1.27 0 2.74 1.24 2.9 2.96a1.25 1.25 0 002.48-.23c-.26-2.88-2.7-5.23-5.38-5.23z", fill: primaryFill }),
React.createElement("path", { d: "M21.27 8.23a8.2 8.2 0 00-7.58-1.95c-2.4.53-4.57 1.89-5.87 3.27-1.6 1.69-3.1 3.86-3.23 7-.05 1.54.15 3.82 1.38 5.52l.13.19c1.24 1.7 1.97 2.72 2.33 3.73V26c.42 1.14.43 2.26.44 3.87v.43c.03 2.22.66 5.78 2.36 8.38a7.19 7.19 0 003.45 2.94l.06.02.06.01c1.2.32 2.33.25 3.25-.43a4.44 4.44 0 001.51-2.54c.25-.94.36-2.04.46-3.13l.07-.96c.07-.8.13-1.62.23-2.44.07-.61.16-1.2.28-1.78a9.28 9.28 0 011.14-3.22c.34-.5.69-.73 1.07-.87 1.14-.29 1.86-.14 2.34.14.53.3.98.85 1.36 1.71.78 1.78 1 4.29 1.18 6.56.2 2.25.67 4.3 1.56 5.63a3.4 3.4 0 001.98 1.5c.9.22 1.79-.03 2.57-.53 2.88-1.85 4.53-5.8 4.98-10.81.2-2.13.44-3.26.84-4.25.31-.8.72-1.52 1.35-2.62l.64-1.13c.64-1.15 1.68-3.21 1.8-5.62.12-2.5-.76-5.25-3.73-7.63-2.83-2.3-5.46-3.13-7.8-3a9.22 9.22 0 00-5.53 2.33l-.03.02-.03.03c-1.3 1.28-1.92 1.53-2.33 1.5-.46-.01-1.19-.37-2.65-1.85l-.02-.01-.02-.02zM9.64 11.26a9.45 9.45 0 014.58-2.53 5.7 5.7 0 015.33 1.31c1.42 1.43 2.77 2.5 4.3 2.58 1.58.07 2.9-.95 4.16-2.2a6.71 6.71 0 014-1.7c1.6-.08 3.64.46 6.1 2.45 2.33 1.87 2.88 3.85 2.8 5.57a10.52 10.52 0 01-1.48 4.51l-.58 1.02c-.65 1.14-1.17 2.06-1.56 3.04-.52 1.3-.8 2.7-1 4.94-.42 4.76-1.95 7.72-3.84 8.93-.4.26-.58.23-.63.22-.07-.02-.25-.1-.5-.47-.52-.78-.95-2.3-1.13-4.45l-.01-.1c-.18-2.13-.41-5.05-1.38-7.25a5.92 5.92 0 00-2.41-2.89 5.55 5.55 0 00-4.26-.37l-.04.02-.04.01c-.9.3-1.7.85-2.38 1.86-.65.95-1.13 2.28-1.51 4.1-.14.66-.24 1.33-.32 2-.1.87-.18 1.76-.24 2.58l-.07.9c-.1 1.09-.2 2-.39 2.71-.19.73-.41 1.04-.58 1.16-.1.08-.35.22-1.06.04a4.76 4.76 0 01-2.17-1.93c-1.36-2.08-1.93-5.12-1.95-7.05v-.48a13.42 13.42 0 00-.6-4.64c-.48-1.36-1.42-2.66-2.52-4.18-.1-.12-.18-.25-.27-.37-.73-1-.95-2.58-.9-3.96.1-2.28 1.15-3.9 2.55-5.38zM22.8 26.28l-.04.01.08-.02-.04.01z", fill: primaryFill }));
};
const Dentist48Regular = wrapIcon(rawSvg({}), 'Dentist48Regular');
export default Dentist48Regular;
|
var $ = require('jquery');
var t = require('../utils/translate');
var ChangeFormTabsUpdater = function($changeform) {
this.$changeform = $changeform;
};
ChangeFormTabsUpdater.prototype = {
findTabs: function($modules, $inlines) {
var tabs = [];
$modules.each(function(i) {
var $module = $(this);
var $header = $module.find('> h2').first();
var title = $header.length != 0 ? $header.html() : t('General');
var className = 'module_' + i;
$module.addClass(className);
$header.remove();
tabs.push({
className: className,
title: title
});
});
$inlines.each(function(i) {
var $inline = $(this);
var $header = $inline.find('> h2, > fieldset.module > h2, .tabular.inline-related > .module > h2').first();
var title = $header.length != 0 ? $header.html() : t('General');
var className = 'inline_' + i;
$inline.addClass(className);
$header.remove();
tabs.push({
className: className,
title: title
});
});
return tabs;
},
createTabs: function($contentWrappers, tabs) {
if (tabs.length < 2) {
return;
}
var $tabs = $('<ul>').addClass('changeform-tabs');
$.each(tabs, function() {
var tab = this;
var $item = $('<li>')
.addClass('changeform-tabs-item');
var $link = $('<a>')
.addClass('changeform-tabs-item-link')
.html(tab.title)
.attr('href', '#/tab/' + tab.className + '/');
$link.appendTo($item);
$item.appendTo($tabs);
});
$tabs.insertBefore($contentWrappers.first());
},
run: function() {
var $container = this.$changeform.find('#content-main > form > div');
var $modules = $container.find('> .module');
var $inlines = $container.find('> .inline-group');
var $contentWrappers = $().add($modules).add($inlines);
try {
var tabs = this.findTabs($modules, $inlines);
this.createTabs($contentWrappers, tabs);
} catch (e) {
console.error(e, e.stack);
}
$contentWrappers.addClass('initialized');
}
};
$(document).ready(function() {
$('.change-form').each(function() {
new ChangeFormTabsUpdater($(this)).run();
});
});
|
import React from "react";
export default function Footer() {
return (
<div className="pt-6 pb-14">
<p className="text-gray-300 ">© 2021 Axel Coudair</p>
</div>
);
}
|
import React from "react"
import Markdown from "react-markdown"
import statusBadges from "./badges.md"
const Badges = () => <Markdown source={statusBadges} escapeHtml={false} />
export default Badges
|
const path = require('path');
const {merge} = require('webpack-merge');
const config = require('./webpack.config');
module.exports = merge(config, {
mode: 'production',
output: {
path: path.join(__dirname, 'public')
},
}) |
import { tracksData } from './spotifyDataReq.js'
import { trackComponents } from './trackComponents.js'
(async function spotifyTracksData() {
const fetchedData = await tracksData();
const tracksArray = fetchedData.map((tracks => {
return tracks
}));
trackComponents(tracksArray);
/*=========================== DOM Manipulation =========================================================*/
function trackDataLogic(num) {
const trackContainer = document.querySelectorAll('.trackContainer')
const trackContainerNum = document.querySelector(`.container-${num}`)
const audioElement = document.querySelector(`.audio-${num} `);
const seekBarInput = document.querySelector(`.seekbar-${num}`);
const volumeInput = document.querySelector(`.volume-input-${num}`);
const playBtn = document.querySelector(`.btn-${num}`);
const audio = document.querySelector(`.audio-${num}`);
const trackDuration = document.querySelector(`.track-duration-${num}`);
const albumCover = document.querySelector(`.album-cover-${num}`);
const trackInformation = document.querySelector(`.trackInfo-${num}`);
const musicBttns = document.querySelectorAll('.music-genre');
const edmBtn = document.querySelector('.edm');
const latinBtn = document.querySelector('.latin');
const altBtn = document.querySelector('.alternative');
const instBtn = document.querySelector('.instrumental');
const popBtn = document.querySelector('.pop');
const allBtn = document.querySelector('.all');
const desktopMedia = window.matchMedia('(min-width: 1366px)');
const desktopMediav2 = window.matchMedia('(min-width: 1504px)');
const trackControls = document.querySelectorAll('.track-controls');
const volumeControls = document.querySelectorAll('.volume-control');
/* Audio Seek bar & Volume controls set up */
const audioElementLogic = () => {
audioElement.addEventListener('timeupdate', () => {
let seconds = parseInt(audioElement.currentTime % 60);
let minutes = parseInt((audioElement.currentTime / 60) % 60);
trackDuration.innerHTML = minutes + ':' + seconds;
}, false)
audioElement.addEventListener('ended', () => {
playBtn.children[0].classList.add('fa-play');
playBtn.children[0].classList.remove('fa-pause');
albumCover.classList.remove('spinning-cover');
albumCover.classList.add('paused-album-cover');
trackContainerNum.classList.remove('playingMediaHeight');
trackContainerNum.classList.add('pausedMediaHeight')
audioElement.currentTime = 0;
trackInformation.classList.remove('deskViewTrackInfo');
})
audioElement.addEventListener('timeupdate', () => {
seekBarInput.value = audioElement.currentTime
});
audioElement.addEventListener('durationchange', () => {
seekBarInput.min = 0;
seekBarInput.max = audioElement.duration;
seekBarInput.value = 0;
});
};
const seekBarLogic = () => {
seekBarInput.addEventListener('input', () => {
audioElement.currentTime = seekBarInput.value;
});
};
const volumeControlLogic = () => {
volumeInput.addEventListener('change', () => {
audioElement.volume = volumeInput.value / 100;
});
};
/* Media animations */
function trackGenresLogic(btn, gen) {
btn.addEventListener('click', () => {
trackContainer.forEach(genre => {
if (genre.classList[2] !== gen) {
genre.classList.add('hideGenres');
albumCoverHide()
} else {
genre.classList.remove('hideGenres')
}
});
});
};
const btnLogic = () => {
playBtn.addEventListener('click', () => {
playBtn.children[0].classList.toggle('fa-play');
playBtn.children[0].classList.toggle('fa-pause');
if (audio.paused) {
audio.play();
trackContainerNum.classList.add('playingMediaHeight');
trackContainerNum.classList.remove('pausedMediaHeight');
albumCover.classList.add('spinning-cover');
albumCover.classList.remove('paused-album-cover');
if (desktopMedia.matches) {
trackInformation.classList.add('deskViewTrackInfo');
trackControls.forEach(control => control.style.bottom = '37%');
volumeControls.forEach(volume => volume.style.top = '10px');
}
if (desktopMediav2.matches) {
trackControls.forEach(control => control.style.bottom = '26%');
}
} else {
audio.pause();
trackContainerNum.classList.remove('playingMediaHeight');
trackContainerNum.classList.add('pausedMediaHeight')
albumCover.classList.remove('spinning-cover');
albumCover.classList.add('paused-album-cover');
if (desktopMedia.matches) {
trackInformation.classList.remove('deskViewTrackInfo');
trackControls.forEach(control => control.style.bottom = '31%');
}
if (desktopMediav2.matches) {
trackInformation.classList.remove('deskViewTrackInfo');
trackControls.forEach(control => control.style.bottom = '22%');
}
};
});
};
const albumCoverHide = () => {
trackContainerNum.classList.remove('openMediaHeight');
trackContainerNum.classList.remove('playingMediaHeight')
trackInformation.classList.remove('animation-start');
trackContainerNum.classList.remove('pausedMediaHeight');
albumCover.classList.remove('spinning-cover');
albumCover.classList.remove('paused-album-cover');
playBtn.children[0].classList.remove('fa-pause');
playBtn.children[0].classList.add('fa-play');
audioElement.pause();
audioElement.currentTime = 0;
if (desktopMedia.matches) {
trackInformation.classList.remove('deskViewTrackInfo');
}
}
document.body.addEventListener('click', (ev) => {
if (ev.target.classList[1] !== `album-cover-${num}`) {
if (ev.target.classList.value !== `track-controls`
&& ev.target.classList.value !== `track-info`
&& ev.target.classList[0] !== `track-information`
&& ev.target.classList[1] !== `fa-play`
&& ev.target.classList[1] !== `fa-pause`
&& ev.target.classList[0] !== `play-btn`
&& ev.target.classList[0] !== `seekbar-${num}`
&& ev.target.classList[0] !== `volume-input-${num}`
&& ev.target.classList[0] !== `album-container`
) {
albumCoverHide()
}
} else if (ev.target.classList[1] == `album-cover-${num}`) {
trackContainerNum.classList.remove('playingMediaHeight');
trackContainerNum.classList.remove('pausedMediaHeight');
trackContainerNum.classList.toggle('openMediaHeight');
trackInformation.classList.toggle('animation-start');
albumCover.classList.remove('spinning-cover');
albumCover.classList.remove('paused-album-cover');
playBtn.children[0].classList.remove('fa-pause');
playBtn.children[0].classList.add('fa-play');
audioElement.pause();
audioElement.currentTime = 0;
if (desktopMedia.matches) {
trackInformation.classList.remove('deskViewTrackInfo');
}
}
});
allBtn.addEventListener('click', () => {
trackContainer.forEach(genre => {
if (genre.classList[3] === 'hideGenres') {
genre.classList.remove('hideGenres');
}
});
});
musicBttns.forEach(btn => {
window.requestAnimationFrame(() => {
btn.classList.add('clickBttns')
});
});
musicBttns.forEach(btn => {
btn.addEventListener('click', () => {
btn.classList.remove('clickBttns');
window.requestAnimationFrame(() => {
btn.classList.add('clickBttns')
})
});
});
btnLogic();
audioElementLogic();
seekBarLogic();
volumeControlLogic();
trackGenresLogic(latinBtn, 'latin');
trackGenresLogic(altBtn, 'alternative');
trackGenresLogic(instBtn, 'instrumental');
trackGenresLogic(popBtn, 'pop');
trackGenresLogic(edmBtn, 'edm');
}
trackDataLogic(0)
trackDataLogic(1)
trackDataLogic(2)
trackDataLogic(3)
trackDataLogic(4)
trackDataLogic(5)
trackDataLogic(6)
trackDataLogic(7)
trackDataLogic(8)
trackDataLogic(9)
trackDataLogic(10)
trackDataLogic(11)
trackDataLogic(12)
trackDataLogic(13)
trackDataLogic(14)
trackDataLogic(15)
trackDataLogic(16)
trackDataLogic(17)
trackDataLogic(18)
trackDataLogic(19)
trackDataLogic(20)
trackDataLogic(21)
trackDataLogic(22)
trackDataLogic(23)
trackDataLogic(24)
trackDataLogic(25)
trackDataLogic(26)
trackDataLogic(27)
trackDataLogic(28)
trackDataLogic(29)
trackDataLogic(30)
trackDataLogic(31)
trackDataLogic(32)
trackDataLogic(33)
trackDataLogic(34)
trackDataLogic(35)
trackDataLogic(36)
trackDataLogic(37)
trackDataLogic(38)
trackDataLogic(39)
trackDataLogic(40)
trackDataLogic(41)
trackDataLogic(42)
trackDataLogic(43)
trackDataLogic(44)
trackDataLogic(45)
trackDataLogic(46)
trackDataLogic(47)
trackDataLogic(48)
trackDataLogic(49)
})()
|
import * as React from "react";
import { Spinner, SpinnerType } from "office-ui-fabric-react";
/* global Spinner */
import styled from "styled-components";
const FlexSection = styled.section`
display: flex
justify-content: center;
align-items: center:
flex-direction: column;
text-align: center;
`;
export default class Progress extends React.Component {
render() {
const { logo, message, title } = this.props;
return (
<FlexSection>
<img width="90" height="90" src={logo} alt={title} title={title} />
<h1 className="ms-fontSize-su ms-fontWeight-light ms-fontColor-neutralPrimary">{title}</h1>
<Spinner type={SpinnerType.large} label={message} />
</FlexSection>
);
}
}
|
/**
* Configure your Gatsby site with this file.
*
* See: https://www.gatsbyjs.com/docs/gatsby-config/
*/
module.exports = {
/* Your site config here */
plugins: [
"gatsby-transformer-remark",
"gatsby-plugin-image",
"gatsby-plugin-sharp",
"gatsby-transformer-sharp",
{
resolve: `gatsby-source-filesystem`,
options: {
name: `projects`,
path: `${__dirname}/src/projects`,
},
},
{
resolve: `gatsby-source-filesystem`,
options: {
name: `projects`,
path: `${__dirname}/src/images`,
},
},
],
siteMetadata: {
title: "ScatterBlue",
description: "Web Dev Portfolio",
copyright: "Copyright 2021 Web Warrior",
contact: "[email protected]",
},
}
|
import asyncio
import logging
import uuid
import warnings
from asyncio import TimeoutError
from collections import defaultdict, deque
from tornado.ioloop import PeriodicCallback
import dask
from dask.utils import parse_timedelta
from distributed.metrics import time
from distributed.utils import SyncMethodMixin, log_errors
from distributed.utils_comm import retry_operation
from distributed.worker import get_client, get_worker
logger = logging.getLogger(__name__)
class _Watch:
def __init__(self, duration=None):
self.duration = duration
self.started_at = None
def start(self):
self.started_at = time()
def elapsed(self):
return time() - self.started_at
def leftover(self):
if self.duration is None:
return None
else:
return max(0, self.duration - self.elapsed())
class SemaphoreExtension:
"""An extension for the scheduler to manage Semaphores
This adds the following routes to the scheduler
* semaphore_acquire
* semaphore_release
* semaphore_close
* semaphore_refresh_leases
* semaphore_register
"""
def __init__(self, scheduler):
self.scheduler = scheduler
# {semaphore_name: asyncio.Event}
self.events = defaultdict(asyncio.Event)
# {semaphore_name: max_leases}
self.max_leases = dict()
# {semaphore_name: {lease_id: lease_last_seen_timestamp}}
self.leases = defaultdict(dict)
self.scheduler.handlers.update(
{
"semaphore_register": self.create,
"semaphore_acquire": self.acquire,
"semaphore_release": self.release,
"semaphore_close": self.close,
"semaphore_refresh_leases": self.refresh_leases,
"semaphore_value": self.get_value,
}
)
# {metric_name: {semaphore_name: metric}}
self.metrics = {
"acquire_total": defaultdict(int), # counter
"release_total": defaultdict(int), # counter
"average_pending_lease_time": defaultdict(float), # gauge
"pending": defaultdict(int), # gauge
}
validation_callback_time = parse_timedelta(
dask.config.get("distributed.scheduler.locks.lease-validation-interval"),
default="s",
)
self._pc_lease_timeout = PeriodicCallback(
self._check_lease_timeout, validation_callback_time * 1000
)
self._pc_lease_timeout.start()
self.lease_timeout = parse_timedelta(
dask.config.get("distributed.scheduler.locks.lease-timeout"), default="s"
)
async def get_value(self, name=None):
return len(self.leases[name])
# `comm` here is required by the handler interface
def create(self, name=None, max_leases=None):
# We use `self.max_leases` as the point of truth to find out if a semaphore with a specific
# `name` has been created.
if name not in self.max_leases:
assert isinstance(max_leases, int), max_leases
self.max_leases[name] = max_leases
else:
if max_leases != self.max_leases[name]:
raise ValueError(
"Inconsistent max leases: %s, expected: %s"
% (max_leases, self.max_leases[name])
)
def refresh_leases(self, name=None, lease_ids=None):
with log_errors():
now = time()
logger.debug(
"Refresh leases for %s with ids %s at %s", name, lease_ids, now
)
for id_ in lease_ids:
if id_ not in self.leases[name]:
logger.critical(
f"Refreshing an unknown lease ID {id_} for {name}. This might be due to leases "
f"timing out and may cause overbooking of the semaphore!"
f"This is often caused by long-running GIL-holding in the task which acquired the lease."
)
self.leases[name][id_] = now
def _get_lease(self, name, lease_id):
result = True
if (
# This allows request idempotency
lease_id in self.leases[name]
or len(self.leases[name]) < self.max_leases[name]
):
now = time()
logger.debug("Acquire lease %s for %s at %s", lease_id, name, now)
self.leases[name][lease_id] = now
self.metrics["acquire_total"][name] += 1
else:
result = False
return result
def _semaphore_exists(self, name):
if name not in self.max_leases:
return False
return True
async def acquire(self, name=None, timeout=None, lease_id=None):
with log_errors():
if not self._semaphore_exists(name):
raise RuntimeError(f"Semaphore `{name}` not known or already closed.")
if isinstance(name, list):
name = tuple(name)
w = _Watch(timeout)
w.start()
self.metrics["pending"][name] += 1
while True:
logger.debug(
"Trying to acquire %s for %s with %s seconds left.",
lease_id,
name,
w.leftover(),
)
# Reset the event and try to get a release. The event will be set if the state
# is changed and helps to identify when it is worth to retry an acquire
self.events[name].clear()
result = self._get_lease(name, lease_id)
# If acquiring fails, we wait for the event to be set, i.e. something has
# been released and we can try to acquire again (continue loop)
if not result:
future = asyncio.wait_for(
self.events[name].wait(), timeout=w.leftover()
)
try:
await future
continue
except TimeoutError:
result = False
logger.debug(
"Acquisition of lease %s for %s is %s after waiting for %ss.",
lease_id,
name,
result,
w.elapsed(),
)
# We're about to return, so the lease is no longer "pending"
self.metrics["average_pending_lease_time"][name] = (
self.metrics["average_pending_lease_time"][name] + w.elapsed()
) / 2
self.metrics["pending"][name] -= 1
return result
def release(self, name=None, lease_id=None):
with log_errors():
if not self._semaphore_exists(name):
logger.warning(
f"Tried to release semaphore `{name}` but it is not known or already closed."
)
return
if isinstance(name, list):
name = tuple(name)
if name in self.leases and lease_id in self.leases[name]:
self._release_value(name, lease_id)
else:
logger.warning(
"Tried to release semaphore but it was already released: "
f"{name=}, {lease_id=}. "
"This can happen if the semaphore timed out before."
)
def _release_value(self, name, lease_id):
logger.debug("Releasing %s for %s", lease_id, name)
# Everything needs to be atomic here.
del self.leases[name][lease_id]
self.events[name].set()
self.metrics["release_total"][name] += 1
def _check_lease_timeout(self):
now = time()
semaphore_names = list(self.leases.keys())
for name in semaphore_names:
ids = list(self.leases[name])
logger.debug(
"Validating leases for %s at time %s. Currently known %s",
name,
now,
self.leases[name],
)
for _id in ids:
time_since_refresh = now - self.leases[name][_id]
if time_since_refresh > self.lease_timeout:
logger.debug(
"Lease %s for %s timed out after %ss.",
_id,
name,
time_since_refresh,
)
self._release_value(name=name, lease_id=_id)
def close(self, name=None):
"""Hard close the semaphore without warning clients which still hold a lease."""
with log_errors():
if not self._semaphore_exists(name):
return
del self.max_leases[name]
if name in self.events:
del self.events[name]
if name in self.leases:
if self.leases[name]:
warnings.warn(
f"Closing semaphore {name} but there remain unreleased leases {sorted(self.leases[name])}",
RuntimeWarning,
)
del self.leases[name]
if name in self.metrics["pending"]:
if self.metrics["pending"][name]:
warnings.warn(
f"Closing semaphore {name} but there remain pending leases",
RuntimeWarning,
)
# Clean-up state of semaphore metrics
for _, metric_dict in self.metrics.items():
if name in metric_dict:
del metric_dict[name]
class Semaphore(SyncMethodMixin):
"""Semaphore
This `semaphore <https://en.wikipedia.org/wiki/Semaphore_(programming)>`_
will track leases on the scheduler which can be acquired and
released by an instance of this class. If the maximum amount of leases are
already acquired, it is not possible to acquire more and the caller waits
until another lease has been released.
The lifetime or leases are controlled using a timeout. This timeout is
refreshed in regular intervals by the ``Client`` of this instance and
provides protection from deadlocks or resource starvation in case of worker
failure.
The timeout can be controlled using the configuration option
``distributed.scheduler.locks.lease-timeout`` and the interval in which the
scheduler verifies the timeout is set using the option
``distributed.scheduler.locks.lease-validation-interval``.
A noticeable difference to the Semaphore of the python standard library is
that this implementation does not allow to release more often than it was
acquired. If this happens, a warning is emitted but the internal state is
not modified.
.. warning::
This implementation is still in an experimental state and subtle
changes in behavior may occur without any change in the major version
of this library.
.. warning::
This implementation is susceptible to lease overbooking in case of
lease timeouts. It is advised to monitor log information and adjust
above configuration options to suitable values for the user application.
Parameters
----------
max_leases: int (optional)
The maximum amount of leases that may be granted at the same time. This
effectively sets an upper limit to the amount of parallel access to a specific resource.
Defaults to 1.
name: string (optional)
Name of the semaphore to acquire. Choosing the same name allows two
disconnected processes to coordinate. If not given, a random
name will be generated.
register: bool
If True, register the semaphore with the scheduler. This needs to be
done before any leases can be acquired. If not done during
initialization, this can also be done by calling the register method of
this class.
When registering, this needs to be awaited.
scheduler_rpc: ConnectionPool
The ConnectionPool to connect to the scheduler. If None is provided, it
uses the worker or client pool. This paramter is mostly used for
testing.
loop: IOLoop
The event loop this instance is using. If None is provided, reuse the
loop of the active worker or client.
Examples
--------
>>> from distributed import Semaphore
... sem = Semaphore(max_leases=2, name='my_database')
...
... def access_resource(s, sem):
... # This automatically acquires a lease from the semaphore (if available) which will be
... # released when leaving the context manager.
... with sem:
... pass
...
... futures = client.map(access_resource, range(10), sem=sem)
... client.gather(futures)
... # Once done, close the semaphore to clean up the state on scheduler side.
... sem.close()
Notes
-----
If a client attempts to release the semaphore but doesn't have a lease acquired, this will raise an exception.
When a semaphore is closed, if, for that closed semaphore, a client attempts to:
- Acquire a lease: an exception will be raised.
- Release: a warning will be logged.
- Close: nothing will happen.
dask executes functions by default assuming they are pure, when using semaphore acquire/releases inside
such a function, it must be noted that there *are* in fact side-effects, thus, the function can no longer be
considered pure. If this is not taken into account, this may lead to unexpected behavior.
"""
def __init__(
self,
max_leases=1,
name=None,
register=True,
scheduler_rpc=None,
loop=None,
):
try:
worker = get_worker()
self.scheduler = scheduler_rpc or worker.scheduler
self.loop = loop or worker.loop
except ValueError:
client = get_client()
self.scheduler = scheduler_rpc or client.scheduler
self.loop = loop or client.io_loop
self.name = name or "semaphore-" + uuid.uuid4().hex
self.max_leases = max_leases
self.id = uuid.uuid4().hex
self._leases = deque()
self.refresh_leases = True
self._registered = None
if register:
self._registered = self.register()
# this should give ample time to refresh without introducing another
# config parameter since this *must* be smaller than the timeout anyhow
refresh_leases_interval = (
parse_timedelta(
dask.config.get("distributed.scheduler.locks.lease-timeout"),
default="s",
)
/ 5
)
pc = PeriodicCallback(
self._refresh_leases, callback_time=refresh_leases_interval * 1000
)
self.refresh_callback = pc
# Need to start the callback using IOLoop.add_callback to ensure that the
# PC uses the correct event loop.
self.loop.add_callback(pc.start)
async def _register(self):
await retry_operation(
self.scheduler.semaphore_register,
name=self.name,
max_leases=self.max_leases,
operation=f"semaphore register id={self.id} name={self.name}",
)
def register(self, **kwargs):
return self.sync(self._register)
def __await__(self):
async def create_semaphore():
if self._registered:
await self._registered
return self
return create_semaphore().__await__()
async def _refresh_leases(self):
if self.refresh_leases and self._leases:
logger.debug(
"%s refreshing leases for %s with IDs %s",
self.id,
self.name,
self._leases,
)
await retry_operation(
self.scheduler.semaphore_refresh_leases,
lease_ids=list(self._leases),
name=self.name,
operation="semaphore refresh leases: id=%s, lease_ids=%s, name=%s"
% (self.id, list(self._leases), self.name),
)
async def _acquire(self, timeout=None):
lease_id = uuid.uuid4().hex
logger.debug(
"%s requests lease for %s with ID %s", self.id, self.name, lease_id
)
# Using a unique lease id generated here allows us to retry since the
# server handle is idempotent
result = await retry_operation(
self.scheduler.semaphore_acquire,
name=self.name,
timeout=timeout,
lease_id=lease_id,
operation="semaphore acquire: id=%s, lease_id=%s, name=%s"
% (self.id, lease_id, self.name),
)
if result:
self._leases.append(lease_id)
return result
def acquire(self, timeout=None):
"""
Acquire a semaphore.
If the internal counter is greater than zero, decrement it by one and return True immediately.
If it is zero, wait until a release() is called and return True.
Parameters
----------
timeout : number or string or timedelta, optional
Seconds to wait on acquiring the semaphore. This does not
include local coroutine time, network transfer time, etc..
Instead of number of seconds, it is also possible to specify
a timedelta in string format, e.g. "200ms".
"""
timeout = parse_timedelta(timeout)
return self.sync(self._acquire, timeout=timeout)
async def _release(self, lease_id):
try:
await retry_operation(
self.scheduler.semaphore_release,
name=self.name,
lease_id=lease_id,
operation="semaphore release: id=%s, lease_id=%s, name=%s"
% (self.id, lease_id, self.name),
)
return True
except Exception: # Release fails for whatever reason
logger.error(
"Release failed for id=%s, lease_id=%s, name=%s. Cluster network might be unstable?"
% (self.id, lease_id, self.name),
exc_info=True,
)
return False
def release(self):
"""
Release the semaphore.
Returns
-------
bool
This value indicates whether a lease was released immediately or not. Note that a user should *not* retry
this operation. Under certain circumstances (e.g. scheduler overload) the lease may not be released
immediately, but it will always be automatically released after a specific interval configured using
"distributed.scheduler.locks.lease-validation-interval" and "distributed.scheduler.locks.lease-timeout".
"""
if not self._leases:
raise RuntimeError("Released too often")
# popleft to release the oldest lease first
lease_id = self._leases.popleft()
logger.debug("%s releases %s for %s", self.id, lease_id, self.name)
return self.sync(self._release, lease_id=lease_id)
def get_value(self):
"""
Return the number of currently registered leases.
"""
return self.sync(self.scheduler.semaphore_value, name=self.name)
def __enter__(self):
self.acquire()
return self
def __exit__(self, *args, **kwargs):
self.release()
async def __aenter__(self):
await self.acquire()
return self
async def __aexit__(self, *args, **kwargs):
await self.release()
def __getstate__(self):
# Do not serialize the address since workers may have different
# addresses for the scheduler (e.g. if a proxy is between them)
return (self.name, self.max_leases)
def __setstate__(self, state):
name, max_leases = state
self.__init__(
name=name,
max_leases=max_leases,
register=False,
)
def close(self):
return self.sync(self.scheduler.semaphore_close, name=self.name)
def __del__(self):
self.refresh_callback.stop()
|
# Copyright 2015, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following disclaimer
# in the documentation and/or other materials provided with the
# distribution.
# * Neither the name of Google Inc. nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
"""State and behavior for operation termination."""
import enum
from grpc.framework.base import interfaces
from grpc.framework.base.packets import _constants
from grpc.framework.base.packets import _interfaces
from grpc.framework.base.packets import packets
from grpc.framework.foundation import callable_util
_CALLBACK_EXCEPTION_LOG_MESSAGE = 'Exception calling termination callback!'
_KINDS_TO_OUTCOMES = {
packets.Kind.COMPLETION: interfaces.Outcome.COMPLETED,
packets.Kind.CANCELLATION: interfaces.Outcome.CANCELLED,
packets.Kind.EXPIRATION: interfaces.Outcome.EXPIRED,
packets.Kind.RECEPTION_FAILURE: interfaces.Outcome.RECEPTION_FAILURE,
packets.Kind.TRANSMISSION_FAILURE: interfaces.Outcome.TRANSMISSION_FAILURE,
packets.Kind.SERVICER_FAILURE: interfaces.Outcome.SERVICER_FAILURE,
packets.Kind.SERVICED_FAILURE: interfaces.Outcome.SERVICED_FAILURE,
}
@enum.unique
class _Requirement(enum.Enum):
"""Symbols indicating events required for termination."""
EMISSION = 'emission'
TRANSMISSION = 'transmission'
INGESTION = 'ingestion'
_FRONT_NOT_LISTENING_REQUIREMENTS = (_Requirement.TRANSMISSION,)
_BACK_NOT_LISTENING_REQUIREMENTS = (
_Requirement.EMISSION, _Requirement.INGESTION,)
_LISTENING_REQUIREMENTS = (
_Requirement.TRANSMISSION, _Requirement.INGESTION,)
class _TerminationManager(_interfaces.TerminationManager):
"""An implementation of _interfaces.TerminationManager."""
def __init__(
self, work_pool, utility_pool, action, requirements, local_failure):
"""Constructor.
Args:
work_pool: A thread pool in which customer work will be done.
utility_pool: A thread pool in which work utility work will be done.
action: An action to call on operation termination.
requirements: A combination of _Requirement values identifying what
must finish for the operation to be considered completed.
local_failure: A packets.Kind specifying what constitutes local failure of
customer work.
"""
self._work_pool = work_pool
self._utility_pool = utility_pool
self._action = action
self._local_failure = local_failure
self._has_locally_failed = False
self._expiration_manager = None
self._outstanding_requirements = set(requirements)
self._kind = None
self._callbacks = []
def set_expiration_manager(self, expiration_manager):
self._expiration_manager = expiration_manager
def _terminate(self, kind):
"""Terminates the operation.
Args:
kind: One of packets.Kind.COMPLETION, packets.Kind.CANCELLATION,
packets.Kind.EXPIRATION, packets.Kind.RECEPTION_FAILURE,
packets.Kind.TRANSMISSION_FAILURE, packets.Kind.SERVICER_FAILURE, or
packets.Kind.SERVICED_FAILURE.
"""
self._expiration_manager.abort()
self._outstanding_requirements = None
callbacks = list(self._callbacks)
self._callbacks = None
self._kind = kind
outcome = _KINDS_TO_OUTCOMES[kind]
act = callable_util.with_exceptions_logged(
self._action, _constants.INTERNAL_ERROR_LOG_MESSAGE)
if self._has_locally_failed:
self._utility_pool.submit(act, outcome)
else:
def call_callbacks_and_act(callbacks, outcome):
for callback in callbacks:
callback_outcome = callable_util.call_logging_exceptions(
callback, _CALLBACK_EXCEPTION_LOG_MESSAGE, outcome)
if callback_outcome.exception is not None:
outcome = _KINDS_TO_OUTCOMES[self._local_failure]
break
self._utility_pool.submit(act, outcome)
self._work_pool.submit(callable_util.with_exceptions_logged(
call_callbacks_and_act,
_constants.INTERNAL_ERROR_LOG_MESSAGE),
callbacks, outcome)
def is_active(self):
"""See _interfaces.TerminationManager.is_active for specification."""
return self._outstanding_requirements is not None
def add_callback(self, callback):
"""See _interfaces.TerminationManager.add_callback for specification."""
if not self._has_locally_failed:
if self._outstanding_requirements is None:
self._work_pool.submit(
callable_util.with_exceptions_logged(
callback, _CALLBACK_EXCEPTION_LOG_MESSAGE),
_KINDS_TO_OUTCOMES[self._kind])
else:
self._callbacks.append(callback)
def emission_complete(self):
"""See superclass method for specification."""
if self._outstanding_requirements is not None:
self._outstanding_requirements.discard(_Requirement.EMISSION)
if not self._outstanding_requirements:
self._terminate(packets.Kind.COMPLETION)
def transmission_complete(self):
"""See superclass method for specification."""
if self._outstanding_requirements is not None:
self._outstanding_requirements.discard(_Requirement.TRANSMISSION)
if not self._outstanding_requirements:
self._terminate(packets.Kind.COMPLETION)
def ingestion_complete(self):
"""See superclass method for specification."""
if self._outstanding_requirements is not None:
self._outstanding_requirements.discard(_Requirement.INGESTION)
if not self._outstanding_requirements:
self._terminate(packets.Kind.COMPLETION)
def abort(self, kind):
"""See _interfaces.TerminationManager.abort for specification."""
if kind == self._local_failure:
self._has_failed_locally = True
if self._outstanding_requirements is not None:
self._terminate(kind)
def front_termination_manager(
work_pool, utility_pool, action, subscription_kind):
"""Creates a TerminationManager appropriate for front-side use.
Args:
work_pool: A thread pool in which customer work will be done.
utility_pool: A thread pool in which work utility work will be done.
action: An action to call on operation termination.
subscription_kind: An interfaces.ServicedSubscription.Kind value.
Returns:
A TerminationManager appropriate for front-side use.
"""
if subscription_kind is interfaces.ServicedSubscription.Kind.NONE:
requirements = _FRONT_NOT_LISTENING_REQUIREMENTS
else:
requirements = _LISTENING_REQUIREMENTS
return _TerminationManager(
work_pool, utility_pool, action, requirements,
packets.Kind.SERVICED_FAILURE)
def back_termination_manager(work_pool, utility_pool, action, subscription_kind):
"""Creates a TerminationManager appropriate for back-side use.
Args:
work_pool: A thread pool in which customer work will be done.
utility_pool: A thread pool in which work utility work will be done.
action: An action to call on operation termination.
subscription_kind: An interfaces.ServicedSubscription.Kind value.
Returns:
A TerminationManager appropriate for back-side use.
"""
if subscription_kind is interfaces.ServicedSubscription.Kind.NONE:
requirements = _BACK_NOT_LISTENING_REQUIREMENTS
else:
requirements = _LISTENING_REQUIREMENTS
return _TerminationManager(
work_pool, utility_pool, action, requirements,
packets.Kind.SERVICER_FAILURE)
|
import styled from "@emotion/styled"
export const NavWrapper = styled.nav`
background-color: var(--primary);
`
export const NavContent = styled.div`
display: flex;
align-items: center;
justify-content: space-between;
height: calc(var(--xl) * 2);
max-width: 1440px;
width: calc(100% - (var(--xl) * 2));
margin: 0 auto;
@media (max-width: 480px) {
flex-flow: column;
height: auto;
padding: var(--md) 0;
}
`
export const NavLogo = styled.h1`
font-size: var(--md);
margin: 0;
a {
color: white;
text-decoration: none;
span {
color: var(--light);
font-weight: 300;
}
}
`
export const NavMenu = styled.ul`
display: flex;
margin: 0;
@media (max-width: 480px) {
margin-top: var(--xxs);
}
`
export const NavMenuItem = styled.li`
font-size: var(--xs);
:not(:last-of-type) {
margin-right: var(--sm);
}
a {
color: white;
text-decoration: none;
padding-bottom: 2px;
position: relative;
::after {
content: "";
position: absolute;
height: 1px;
width: 100%;
left: 0;
bottom: 0;
opacity: 0;
transform: translateY(var(--xxs));
background-color: var(--light);
transition: opacity 0.15s ease, transform 0.15s ease;
}
:hover::after {
opacity: 1;
transform: translateY(0);
}
}
`
|
(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["polyfills-es5"],{
/***/ "+5Eg":
/*!***************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.object.seal.js ***!
\***************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var isObject = __webpack_require__(/*! ../internals/is-object */ "6XUM");
var onFreeze = __webpack_require__(/*! ../internals/internal-metadata */ "M7Xk").onFreeze;
var FREEZING = __webpack_require__(/*! ../internals/freezing */ "cZY6");
var fails = __webpack_require__(/*! ../internals/fails */ "rG8t");
var nativeSeal = Object.seal;
var FAILS_ON_PRIMITIVES = fails(function () { nativeSeal(1); });
// `Object.seal` method
// https://tc39.github.io/ecma262/#sec-object.seal
$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES, sham: !FREEZING }, {
seal: function seal(it) {
return nativeSeal && isObject(it) ? nativeSeal(onFreeze(it)) : it;
}
});
/***/ }),
/***/ "+IJR":
/*!*****************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.number.is-nan.js ***!
\*****************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
// `Number.isNaN` method
// https://tc39.github.io/ecma262/#sec-number.isnan
$({ target: 'Number', stat: true }, {
isNaN: function isNaN(number) {
// eslint-disable-next-line no-self-compare
return number != number;
}
});
/***/ }),
/***/ "+MnM":
/*!******************************************************************!*\
!*** ./node_modules/core-js/modules/es.reflect.to-string-tag.js ***!
\******************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var global = __webpack_require__(/*! ../internals/global */ "2oRo");
var setToStringTag = __webpack_require__(/*! ../internals/set-to-string-tag */ "1E5z");
$({ global: true }, { Reflect: {} });
// Reflect[@@toStringTag] property
// https://tc39.es/ecma262/#sec-reflect-@@tostringtag
setToStringTag(global.Reflect, 'Reflect', true);
/***/ }),
/***/ "/AsP":
/*!*************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/shared-key.js ***!
\*************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var shared = __webpack_require__(/*! ../internals/shared */ "yIiL");
var uid = __webpack_require__(/*! ../internals/uid */ "SDMg");
var keys = shared('keys');
module.exports = function (key) {
return keys[key] || (keys[key] = uid(key));
};
/***/ }),
/***/ "/GqU":
/*!*************************************************************!*\
!*** ./node_modules/core-js/internals/to-indexed-object.js ***!
\*************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// toObject with fallback for non-array-like ES3 strings
var IndexedObject = __webpack_require__(/*! ../internals/indexed-object */ "RK3t");
var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ "HYAF");
module.exports = function (it) {
return IndexedObject(requireObjectCoercible(it));
};
/***/ }),
/***/ "/Ybd":
/*!*************************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/object-define-property.js ***!
\*************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "T69T");
var IE8_DOM_DEFINE = __webpack_require__(/*! ../internals/ie8-dom-define */ "XdSI");
var anObject = __webpack_require__(/*! ../internals/an-object */ "F26l");
var toPrimitive = __webpack_require__(/*! ../internals/to-primitive */ "LdO1");
var nativeDefineProperty = Object.defineProperty;
// `Object.defineProperty` method
// https://tc39.github.io/ecma262/#sec-object.defineproperty
exports.f = DESCRIPTORS ? nativeDefineProperty : function defineProperty(O, P, Attributes) {
anObject(O);
P = toPrimitive(P, true);
anObject(Attributes);
if (IE8_DOM_DEFINE) try {
return nativeDefineProperty(O, P, Attributes);
} catch (error) { /* empty */ }
if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');
if ('value' in Attributes) O[P] = Attributes.value;
return O;
};
/***/ }),
/***/ "/b8u":
/*!*************************************************************!*\
!*** ./node_modules/core-js/internals/use-symbol-as-uid.js ***!
\*************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var NATIVE_SYMBOL = __webpack_require__(/*! ../internals/native-symbol */ "STAE");
module.exports = NATIVE_SYMBOL
// eslint-disable-next-line no-undef
&& !Symbol.sham
// eslint-disable-next-line no-undef
&& typeof Symbol.iterator == 'symbol';
/***/ }),
/***/ "0BK2":
/*!*******************************************************!*\
!*** ./node_modules/core-js/internals/hidden-keys.js ***!
\*******************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = {};
/***/ }),
/***/ "0Dky":
/*!*************************************************!*\
!*** ./node_modules/core-js/internals/fails.js ***!
\*************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = function (exec) {
try {
return !!exec();
} catch (error) {
return true;
}
};
/***/ }),
/***/ "0Ds2":
/*!**************************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/correct-is-regexp-logic.js ***!
\**************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "m41k");
var MATCH = wellKnownSymbol('match');
module.exports = function (METHOD_NAME) {
var regexp = /./;
try {
'/./'[METHOD_NAME](regexp);
} catch (e) {
try {
regexp[MATCH] = false;
return '/./'[METHOD_NAME](regexp);
} catch (f) { /* empty */ }
} return false;
};
/***/ }),
/***/ "0GbY":
/*!********************************************************!*\
!*** ./node_modules/core-js/internals/get-built-in.js ***!
\********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var path = __webpack_require__(/*! ../internals/path */ "Qo9l");
var global = __webpack_require__(/*! ../internals/global */ "2oRo");
var aFunction = function (variable) {
return typeof variable == 'function' ? variable : undefined;
};
module.exports = function (namespace, method) {
return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(global[namespace])
: path[namespace] && path[namespace][method] || global[namespace] && global[namespace][method];
};
/***/ }),
/***/ "0TWp":
/*!*******************************************!*\
!*** ./node_modules/zone.js/dist/zone.js ***!
\*******************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
* @license Angular v11.0.0-next.6+162.sha-170af07
* (c) 2010-2020 Google LLC. https://angular.io/
* License: MIT
*/
(function (factory) {
true ? !(__WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
(__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) :
__WEBPACK_AMD_DEFINE_FACTORY__),
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)) : undefined;
})(function () {
'use strict';
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
var Zone$1 = function (global) {
var performance = global['performance'];
function mark(name) {
performance && performance['mark'] && performance['mark'](name);
}
function performanceMeasure(name, label) {
performance && performance['measure'] && performance['measure'](name, label);
}
mark('Zone'); // Initialize before it's accessed below.
// __Zone_symbol_prefix global can be used to override the default zone
// symbol prefix with a custom one if needed.
var symbolPrefix = global['__Zone_symbol_prefix'] || '__zone_symbol__';
function __symbol__(name) {
return symbolPrefix + name;
}
var checkDuplicate = global[__symbol__('forceDuplicateZoneCheck')] === true;
if (global['Zone']) {
// if global['Zone'] already exists (maybe zone.js was already loaded or
// some other lib also registered a global object named Zone), we may need
// to throw an error, but sometimes user may not want this error.
// For example,
// we have two web pages, page1 includes zone.js, page2 doesn't.
// and the 1st time user load page1 and page2, everything work fine,
// but when user load page2 again, error occurs because global['Zone'] already exists.
// so we add a flag to let user choose whether to throw this error or not.
// By default, if existing Zone is from zone.js, we will not throw the error.
if (checkDuplicate || typeof global['Zone'].__symbol__ !== 'function') {
throw new Error('Zone already loaded.');
} else {
return global['Zone'];
}
}
var Zone =
/** @class */
function () {
function Zone(parent, zoneSpec) {
this._parent = parent;
this._name = zoneSpec ? zoneSpec.name || 'unnamed' : '<root>';
this._properties = zoneSpec && zoneSpec.properties || {};
this._zoneDelegate = new ZoneDelegate(this, this._parent && this._parent._zoneDelegate, zoneSpec);
}
Zone.assertZonePatched = function () {
if (global['Promise'] !== patches['ZoneAwarePromise']) {
throw new Error('Zone.js has detected that ZoneAwarePromise `(window|global).Promise` ' + 'has been overwritten.\n' + 'Most likely cause is that a Promise polyfill has been loaded ' + 'after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. ' + 'If you must load one, do so before loading zone.js.)');
}
};
Object.defineProperty(Zone, "root", {
get: function get() {
var zone = Zone.current;
while (zone.parent) {
zone = zone.parent;
}
return zone;
},
enumerable: false,
configurable: true
});
Object.defineProperty(Zone, "current", {
get: function get() {
return _currentZoneFrame.zone;
},
enumerable: false,
configurable: true
});
Object.defineProperty(Zone, "currentTask", {
get: function get() {
return _currentTask;
},
enumerable: false,
configurable: true
}); // tslint:disable-next-line:require-internal-with-underscore
Zone.__load_patch = function (name, fn) {
if (patches.hasOwnProperty(name)) {
if (checkDuplicate) {
throw Error('Already loaded patch: ' + name);
}
} else if (!global['__Zone_disable_' + name]) {
var perfName = 'Zone:' + name;
mark(perfName);
patches[name] = fn(global, Zone, _api);
performanceMeasure(perfName, perfName);
}
};
Object.defineProperty(Zone.prototype, "parent", {
get: function get() {
return this._parent;
},
enumerable: false,
configurable: true
});
Object.defineProperty(Zone.prototype, "name", {
get: function get() {
return this._name;
},
enumerable: false,
configurable: true
});
Zone.prototype.get = function (key) {
var zone = this.getZoneWith(key);
if (zone) return zone._properties[key];
};
Zone.prototype.getZoneWith = function (key) {
var current = this;
while (current) {
if (current._properties.hasOwnProperty(key)) {
return current;
}
current = current._parent;
}
return null;
};
Zone.prototype.fork = function (zoneSpec) {
if (!zoneSpec) throw new Error('ZoneSpec required!');
return this._zoneDelegate.fork(this, zoneSpec);
};
Zone.prototype.wrap = function (callback, source) {
if (typeof callback !== 'function') {
throw new Error('Expecting function got: ' + callback);
}
var _callback = this._zoneDelegate.intercept(this, callback, source);
var zone = this;
return function () {
return zone.runGuarded(_callback, this, arguments, source);
};
};
Zone.prototype.run = function (callback, applyThis, applyArgs, source) {
_currentZoneFrame = {
parent: _currentZoneFrame,
zone: this
};
try {
return this._zoneDelegate.invoke(this, callback, applyThis, applyArgs, source);
} finally {
_currentZoneFrame = _currentZoneFrame.parent;
}
};
Zone.prototype.runGuarded = function (callback, applyThis, applyArgs, source) {
if (applyThis === void 0) {
applyThis = null;
}
_currentZoneFrame = {
parent: _currentZoneFrame,
zone: this
};
try {
try {
return this._zoneDelegate.invoke(this, callback, applyThis, applyArgs, source);
} catch (error) {
if (this._zoneDelegate.handleError(this, error)) {
throw error;
}
}
} finally {
_currentZoneFrame = _currentZoneFrame.parent;
}
};
Zone.prototype.runTask = function (task, applyThis, applyArgs) {
if (task.zone != this) {
throw new Error('A task can only be run in the zone of creation! (Creation: ' + (task.zone || NO_ZONE).name + '; Execution: ' + this.name + ')');
} // https://github.com/angular/zone.js/issues/778, sometimes eventTask
// will run in notScheduled(canceled) state, we should not try to
// run such kind of task but just return
if (task.state === notScheduled && (task.type === eventTask || task.type === macroTask)) {
return;
}
var reEntryGuard = task.state != running;
reEntryGuard && task._transitionTo(running, scheduled);
task.runCount++;
var previousTask = _currentTask;
_currentTask = task;
_currentZoneFrame = {
parent: _currentZoneFrame,
zone: this
};
try {
if (task.type == macroTask && task.data && !task.data.isPeriodic) {
task.cancelFn = undefined;
}
try {
return this._zoneDelegate.invokeTask(this, task, applyThis, applyArgs);
} catch (error) {
if (this._zoneDelegate.handleError(this, error)) {
throw error;
}
}
} finally {
// if the task's state is notScheduled or unknown, then it has already been cancelled
// we should not reset the state to scheduled
if (task.state !== notScheduled && task.state !== unknown) {
if (task.type == eventTask || task.data && task.data.isPeriodic) {
reEntryGuard && task._transitionTo(scheduled, running);
} else {
task.runCount = 0;
this._updateTaskCount(task, -1);
reEntryGuard && task._transitionTo(notScheduled, running, notScheduled);
}
}
_currentZoneFrame = _currentZoneFrame.parent;
_currentTask = previousTask;
}
};
Zone.prototype.scheduleTask = function (task) {
if (task.zone && task.zone !== this) {
// check if the task was rescheduled, the newZone
// should not be the children of the original zone
var newZone = this;
while (newZone) {
if (newZone === task.zone) {
throw Error("can not reschedule task to " + this.name + " which is descendants of the original zone " + task.zone.name);
}
newZone = newZone.parent;
}
}
task._transitionTo(scheduling, notScheduled);
var zoneDelegates = [];
task._zoneDelegates = zoneDelegates;
task._zone = this;
try {
task = this._zoneDelegate.scheduleTask(this, task);
} catch (err) {
// should set task's state to unknown when scheduleTask throw error
// because the err may from reschedule, so the fromState maybe notScheduled
task._transitionTo(unknown, scheduling, notScheduled); // TODO: @JiaLiPassion, should we check the result from handleError?
this._zoneDelegate.handleError(this, err);
throw err;
}
if (task._zoneDelegates === zoneDelegates) {
// we have to check because internally the delegate can reschedule the task.
this._updateTaskCount(task, 1);
}
if (task.state == scheduling) {
task._transitionTo(scheduled, scheduling);
}
return task;
};
Zone.prototype.scheduleMicroTask = function (source, callback, data, customSchedule) {
return this.scheduleTask(new ZoneTask(microTask, source, callback, data, customSchedule, undefined));
};
Zone.prototype.scheduleMacroTask = function (source, callback, data, customSchedule, customCancel) {
return this.scheduleTask(new ZoneTask(macroTask, source, callback, data, customSchedule, customCancel));
};
Zone.prototype.scheduleEventTask = function (source, callback, data, customSchedule, customCancel) {
return this.scheduleTask(new ZoneTask(eventTask, source, callback, data, customSchedule, customCancel));
};
Zone.prototype.cancelTask = function (task) {
if (task.zone != this) throw new Error('A task can only be cancelled in the zone of creation! (Creation: ' + (task.zone || NO_ZONE).name + '; Execution: ' + this.name + ')');
task._transitionTo(canceling, scheduled, running);
try {
this._zoneDelegate.cancelTask(this, task);
} catch (err) {
// if error occurs when cancelTask, transit the state to unknown
task._transitionTo(unknown, canceling);
this._zoneDelegate.handleError(this, err);
throw err;
}
this._updateTaskCount(task, -1);
task._transitionTo(notScheduled, canceling);
task.runCount = 0;
return task;
};
Zone.prototype._updateTaskCount = function (task, count) {
var zoneDelegates = task._zoneDelegates;
if (count == -1) {
task._zoneDelegates = null;
}
for (var i = 0; i < zoneDelegates.length; i++) {
zoneDelegates[i]._updateTaskCount(task.type, count);
}
};
return Zone;
}(); // tslint:disable-next-line:require-internal-with-underscore
Zone.__symbol__ = __symbol__;
var DELEGATE_ZS = {
name: '',
onHasTask: function onHasTask(delegate, _, target, hasTaskState) {
return delegate.hasTask(target, hasTaskState);
},
onScheduleTask: function onScheduleTask(delegate, _, target, task) {
return delegate.scheduleTask(target, task);
},
onInvokeTask: function onInvokeTask(delegate, _, target, task, applyThis, applyArgs) {
return delegate.invokeTask(target, task, applyThis, applyArgs);
},
onCancelTask: function onCancelTask(delegate, _, target, task) {
return delegate.cancelTask(target, task);
}
};
var ZoneDelegate =
/** @class */
function () {
function ZoneDelegate(zone, parentDelegate, zoneSpec) {
this._taskCounts = {
'microTask': 0,
'macroTask': 0,
'eventTask': 0
};
this.zone = zone;
this._parentDelegate = parentDelegate;
this._forkZS = zoneSpec && (zoneSpec && zoneSpec.onFork ? zoneSpec : parentDelegate._forkZS);
this._forkDlgt = zoneSpec && (zoneSpec.onFork ? parentDelegate : parentDelegate._forkDlgt);
this._forkCurrZone = zoneSpec && (zoneSpec.onFork ? this.zone : parentDelegate._forkCurrZone);
this._interceptZS = zoneSpec && (zoneSpec.onIntercept ? zoneSpec : parentDelegate._interceptZS);
this._interceptDlgt = zoneSpec && (zoneSpec.onIntercept ? parentDelegate : parentDelegate._interceptDlgt);
this._interceptCurrZone = zoneSpec && (zoneSpec.onIntercept ? this.zone : parentDelegate._interceptCurrZone);
this._invokeZS = zoneSpec && (zoneSpec.onInvoke ? zoneSpec : parentDelegate._invokeZS);
this._invokeDlgt = zoneSpec && (zoneSpec.onInvoke ? parentDelegate : parentDelegate._invokeDlgt);
this._invokeCurrZone = zoneSpec && (zoneSpec.onInvoke ? this.zone : parentDelegate._invokeCurrZone);
this._handleErrorZS = zoneSpec && (zoneSpec.onHandleError ? zoneSpec : parentDelegate._handleErrorZS);
this._handleErrorDlgt = zoneSpec && (zoneSpec.onHandleError ? parentDelegate : parentDelegate._handleErrorDlgt);
this._handleErrorCurrZone = zoneSpec && (zoneSpec.onHandleError ? this.zone : parentDelegate._handleErrorCurrZone);
this._scheduleTaskZS = zoneSpec && (zoneSpec.onScheduleTask ? zoneSpec : parentDelegate._scheduleTaskZS);
this._scheduleTaskDlgt = zoneSpec && (zoneSpec.onScheduleTask ? parentDelegate : parentDelegate._scheduleTaskDlgt);
this._scheduleTaskCurrZone = zoneSpec && (zoneSpec.onScheduleTask ? this.zone : parentDelegate._scheduleTaskCurrZone);
this._invokeTaskZS = zoneSpec && (zoneSpec.onInvokeTask ? zoneSpec : parentDelegate._invokeTaskZS);
this._invokeTaskDlgt = zoneSpec && (zoneSpec.onInvokeTask ? parentDelegate : parentDelegate._invokeTaskDlgt);
this._invokeTaskCurrZone = zoneSpec && (zoneSpec.onInvokeTask ? this.zone : parentDelegate._invokeTaskCurrZone);
this._cancelTaskZS = zoneSpec && (zoneSpec.onCancelTask ? zoneSpec : parentDelegate._cancelTaskZS);
this._cancelTaskDlgt = zoneSpec && (zoneSpec.onCancelTask ? parentDelegate : parentDelegate._cancelTaskDlgt);
this._cancelTaskCurrZone = zoneSpec && (zoneSpec.onCancelTask ? this.zone : parentDelegate._cancelTaskCurrZone);
this._hasTaskZS = null;
this._hasTaskDlgt = null;
this._hasTaskDlgtOwner = null;
this._hasTaskCurrZone = null;
var zoneSpecHasTask = zoneSpec && zoneSpec.onHasTask;
var parentHasTask = parentDelegate && parentDelegate._hasTaskZS;
if (zoneSpecHasTask || parentHasTask) {
// If we need to report hasTask, than this ZS needs to do ref counting on tasks. In such
// a case all task related interceptors must go through this ZD. We can't short circuit it.
this._hasTaskZS = zoneSpecHasTask ? zoneSpec : DELEGATE_ZS;
this._hasTaskDlgt = parentDelegate;
this._hasTaskDlgtOwner = this;
this._hasTaskCurrZone = zone;
if (!zoneSpec.onScheduleTask) {
this._scheduleTaskZS = DELEGATE_ZS;
this._scheduleTaskDlgt = parentDelegate;
this._scheduleTaskCurrZone = this.zone;
}
if (!zoneSpec.onInvokeTask) {
this._invokeTaskZS = DELEGATE_ZS;
this._invokeTaskDlgt = parentDelegate;
this._invokeTaskCurrZone = this.zone;
}
if (!zoneSpec.onCancelTask) {
this._cancelTaskZS = DELEGATE_ZS;
this._cancelTaskDlgt = parentDelegate;
this._cancelTaskCurrZone = this.zone;
}
}
}
ZoneDelegate.prototype.fork = function (targetZone, zoneSpec) {
return this._forkZS ? this._forkZS.onFork(this._forkDlgt, this.zone, targetZone, zoneSpec) : new Zone(targetZone, zoneSpec);
};
ZoneDelegate.prototype.intercept = function (targetZone, callback, source) {
return this._interceptZS ? this._interceptZS.onIntercept(this._interceptDlgt, this._interceptCurrZone, targetZone, callback, source) : callback;
};
ZoneDelegate.prototype.invoke = function (targetZone, callback, applyThis, applyArgs, source) {
return this._invokeZS ? this._invokeZS.onInvoke(this._invokeDlgt, this._invokeCurrZone, targetZone, callback, applyThis, applyArgs, source) : callback.apply(applyThis, applyArgs);
};
ZoneDelegate.prototype.handleError = function (targetZone, error) {
return this._handleErrorZS ? this._handleErrorZS.onHandleError(this._handleErrorDlgt, this._handleErrorCurrZone, targetZone, error) : true;
};
ZoneDelegate.prototype.scheduleTask = function (targetZone, task) {
var returnTask = task;
if (this._scheduleTaskZS) {
if (this._hasTaskZS) {
returnTask._zoneDelegates.push(this._hasTaskDlgtOwner);
} // clang-format off
returnTask = this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt, this._scheduleTaskCurrZone, targetZone, task); // clang-format on
if (!returnTask) returnTask = task;
} else {
if (task.scheduleFn) {
task.scheduleFn(task);
} else if (task.type == microTask) {
scheduleMicroTask(task);
} else {
throw new Error('Task is missing scheduleFn.');
}
}
return returnTask;
};
ZoneDelegate.prototype.invokeTask = function (targetZone, task, applyThis, applyArgs) {
return this._invokeTaskZS ? this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt, this._invokeTaskCurrZone, targetZone, task, applyThis, applyArgs) : task.callback.apply(applyThis, applyArgs);
};
ZoneDelegate.prototype.cancelTask = function (targetZone, task) {
var value;
if (this._cancelTaskZS) {
value = this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt, this._cancelTaskCurrZone, targetZone, task);
} else {
if (!task.cancelFn) {
throw Error('Task is not cancelable');
}
value = task.cancelFn(task);
}
return value;
};
ZoneDelegate.prototype.hasTask = function (targetZone, isEmpty) {
// hasTask should not throw error so other ZoneDelegate
// can still trigger hasTask callback
try {
this._hasTaskZS && this._hasTaskZS.onHasTask(this._hasTaskDlgt, this._hasTaskCurrZone, targetZone, isEmpty);
} catch (err) {
this.handleError(targetZone, err);
}
}; // tslint:disable-next-line:require-internal-with-underscore
ZoneDelegate.prototype._updateTaskCount = function (type, count) {
var counts = this._taskCounts;
var prev = counts[type];
var next = counts[type] = prev + count;
if (next < 0) {
throw new Error('More tasks executed then were scheduled.');
}
if (prev == 0 || next == 0) {
var isEmpty = {
microTask: counts['microTask'] > 0,
macroTask: counts['macroTask'] > 0,
eventTask: counts['eventTask'] > 0,
change: type
};
this.hasTask(this.zone, isEmpty);
}
};
return ZoneDelegate;
}();
var ZoneTask =
/** @class */
function () {
function ZoneTask(type, source, callback, options, scheduleFn, cancelFn) {
// tslint:disable-next-line:require-internal-with-underscore
this._zone = null;
this.runCount = 0; // tslint:disable-next-line:require-internal-with-underscore
this._zoneDelegates = null; // tslint:disable-next-line:require-internal-with-underscore
this._state = 'notScheduled';
this.type = type;
this.source = source;
this.data = options;
this.scheduleFn = scheduleFn;
this.cancelFn = cancelFn;
if (!callback) {
throw new Error('callback is not defined');
}
this.callback = callback;
var self = this; // TODO: @JiaLiPassion options should have interface
if (type === eventTask && options && options.useG) {
this.invoke = ZoneTask.invokeTask;
} else {
this.invoke = function () {
return ZoneTask.invokeTask.call(global, self, this, arguments);
};
}
}
ZoneTask.invokeTask = function (task, target, args) {
if (!task) {
task = this;
}
_numberOfNestedTaskFrames++;
try {
task.runCount++;
return task.zone.runTask(task, target, args);
} finally {
if (_numberOfNestedTaskFrames == 1) {
drainMicroTaskQueue();
}
_numberOfNestedTaskFrames--;
}
};
Object.defineProperty(ZoneTask.prototype, "zone", {
get: function get() {
return this._zone;
},
enumerable: false,
configurable: true
});
Object.defineProperty(ZoneTask.prototype, "state", {
get: function get() {
return this._state;
},
enumerable: false,
configurable: true
});
ZoneTask.prototype.cancelScheduleRequest = function () {
this._transitionTo(notScheduled, scheduling);
}; // tslint:disable-next-line:require-internal-with-underscore
ZoneTask.prototype._transitionTo = function (toState, fromState1, fromState2) {
if (this._state === fromState1 || this._state === fromState2) {
this._state = toState;
if (toState == notScheduled) {
this._zoneDelegates = null;
}
} else {
throw new Error(this.type + " '" + this.source + "': can not transition to '" + toState + "', expecting state '" + fromState1 + "'" + (fromState2 ? ' or \'' + fromState2 + '\'' : '') + ", was '" + this._state + "'.");
}
};
ZoneTask.prototype.toString = function () {
if (this.data && typeof this.data.handleId !== 'undefined') {
return this.data.handleId.toString();
} else {
return Object.prototype.toString.call(this);
}
}; // add toJSON method to prevent cyclic error when
// call JSON.stringify(zoneTask)
ZoneTask.prototype.toJSON = function () {
return {
type: this.type,
state: this.state,
source: this.source,
zone: this.zone.name,
runCount: this.runCount
};
};
return ZoneTask;
}(); //////////////////////////////////////////////////////
//////////////////////////////////////////////////////
/// MICROTASK QUEUE
//////////////////////////////////////////////////////
//////////////////////////////////////////////////////
var symbolSetTimeout = __symbol__('setTimeout');
var symbolPromise = __symbol__('Promise');
var symbolThen = __symbol__('then');
var _microTaskQueue = [];
var _isDrainingMicrotaskQueue = false;
var nativeMicroTaskQueuePromise;
function scheduleMicroTask(task) {
// if we are not running in any task, and there has not been anything scheduled
// we must bootstrap the initial task creation by manually scheduling the drain
if (_numberOfNestedTaskFrames === 0 && _microTaskQueue.length === 0) {
// We are not running in Task, so we need to kickstart the microtask queue.
if (!nativeMicroTaskQueuePromise) {
if (global[symbolPromise]) {
nativeMicroTaskQueuePromise = global[symbolPromise].resolve(0);
}
}
if (nativeMicroTaskQueuePromise) {
var nativeThen = nativeMicroTaskQueuePromise[symbolThen];
if (!nativeThen) {
// native Promise is not patchable, we need to use `then` directly
// issue 1078
nativeThen = nativeMicroTaskQueuePromise['then'];
}
nativeThen.call(nativeMicroTaskQueuePromise, drainMicroTaskQueue);
} else {
global[symbolSetTimeout](drainMicroTaskQueue, 0);
}
}
task && _microTaskQueue.push(task);
}
function drainMicroTaskQueue() {
if (!_isDrainingMicrotaskQueue) {
_isDrainingMicrotaskQueue = true;
while (_microTaskQueue.length) {
var queue = _microTaskQueue;
_microTaskQueue = [];
for (var i = 0; i < queue.length; i++) {
var task = queue[i];
try {
task.zone.runTask(task, null, null);
} catch (error) {
_api.onUnhandledError(error);
}
}
}
_api.microtaskDrainDone();
_isDrainingMicrotaskQueue = false;
}
} //////////////////////////////////////////////////////
//////////////////////////////////////////////////////
/// BOOTSTRAP
//////////////////////////////////////////////////////
//////////////////////////////////////////////////////
var NO_ZONE = {
name: 'NO ZONE'
};
var notScheduled = 'notScheduled',
scheduling = 'scheduling',
scheduled = 'scheduled',
running = 'running',
canceling = 'canceling',
unknown = 'unknown';
var microTask = 'microTask',
macroTask = 'macroTask',
eventTask = 'eventTask';
var patches = {};
var _api = {
symbol: __symbol__,
currentZoneFrame: function currentZoneFrame() {
return _currentZoneFrame;
},
onUnhandledError: noop,
microtaskDrainDone: noop,
scheduleMicroTask: scheduleMicroTask,
showUncaughtError: function showUncaughtError() {
return !Zone[__symbol__('ignoreConsoleErrorUncaughtError')];
},
patchEventTarget: function patchEventTarget() {
return [];
},
patchOnProperties: noop,
patchMethod: function patchMethod() {
return noop;
},
bindArguments: function bindArguments() {
return [];
},
patchThen: function patchThen() {
return noop;
},
patchMacroTask: function patchMacroTask() {
return noop;
},
patchEventPrototype: function patchEventPrototype() {
return noop;
},
isIEOrEdge: function isIEOrEdge() {
return false;
},
getGlobalObjects: function getGlobalObjects() {
return undefined;
},
ObjectDefineProperty: function ObjectDefineProperty() {
return noop;
},
ObjectGetOwnPropertyDescriptor: function ObjectGetOwnPropertyDescriptor() {
return undefined;
},
ObjectCreate: function ObjectCreate() {
return undefined;
},
ArraySlice: function ArraySlice() {
return [];
},
patchClass: function patchClass() {
return noop;
},
wrapWithCurrentZone: function wrapWithCurrentZone() {
return noop;
},
filterProperties: function filterProperties() {
return [];
},
attachOriginToPatched: function attachOriginToPatched() {
return noop;
},
_redefineProperty: function _redefineProperty() {
return noop;
},
patchCallbacks: function patchCallbacks() {
return noop;
}
};
var _currentZoneFrame = {
parent: null,
zone: new Zone(null, null)
};
var _currentTask = null;
var _numberOfNestedTaskFrames = 0;
function noop() {}
performanceMeasure('Zone', 'Zone');
return global['Zone'] = Zone;
}(typeof window !== 'undefined' && window || typeof self !== 'undefined' && self || global);
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* Suppress closure compiler errors about unknown 'Zone' variable
* @fileoverview
* @suppress {undefinedVars,globalThis,missingRequire}
*/
/// <reference types="node"/>
// issue #989, to reduce bundle size, use short name
/** Object.getOwnPropertyDescriptor */
var ObjectGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
/** Object.defineProperty */
var ObjectDefineProperty = Object.defineProperty;
/** Object.getPrototypeOf */
var ObjectGetPrototypeOf = Object.getPrototypeOf;
/** Object.create */
var ObjectCreate = Object.create;
/** Array.prototype.slice */
var ArraySlice = Array.prototype.slice;
/** addEventListener string const */
var ADD_EVENT_LISTENER_STR = 'addEventListener';
/** removeEventListener string const */
var REMOVE_EVENT_LISTENER_STR = 'removeEventListener';
/** zoneSymbol addEventListener */
var ZONE_SYMBOL_ADD_EVENT_LISTENER = Zone.__symbol__(ADD_EVENT_LISTENER_STR);
/** zoneSymbol removeEventListener */
var ZONE_SYMBOL_REMOVE_EVENT_LISTENER = Zone.__symbol__(REMOVE_EVENT_LISTENER_STR);
/** true string const */
var TRUE_STR = 'true';
/** false string const */
var FALSE_STR = 'false';
/** Zone symbol prefix string const. */
var ZONE_SYMBOL_PREFIX = Zone.__symbol__('');
function wrapWithCurrentZone(callback, source) {
return Zone.current.wrap(callback, source);
}
function scheduleMacroTaskWithCurrentZone(source, callback, data, customSchedule, customCancel) {
return Zone.current.scheduleMacroTask(source, callback, data, customSchedule, customCancel);
}
var zoneSymbol = Zone.__symbol__;
var isWindowExists = typeof window !== 'undefined';
var internalWindow = isWindowExists ? window : undefined;
var _global = isWindowExists && internalWindow || typeof self === 'object' && self || global;
var REMOVE_ATTRIBUTE = 'removeAttribute';
var NULL_ON_PROP_VALUE = [null];
function bindArguments(args, source) {
for (var i = args.length - 1; i >= 0; i--) {
if (typeof args[i] === 'function') {
args[i] = wrapWithCurrentZone(args[i], source + '_' + i);
}
}
return args;
}
function patchPrototype(prototype, fnNames) {
var source = prototype.constructor['name'];
var _loop_1 = function _loop_1(i) {
var name_1 = fnNames[i];
var delegate = prototype[name_1];
if (delegate) {
var prototypeDesc = ObjectGetOwnPropertyDescriptor(prototype, name_1);
if (!isPropertyWritable(prototypeDesc)) {
return "continue";
}
prototype[name_1] = function (delegate) {
var patched = function patched() {
return delegate.apply(this, bindArguments(arguments, source + '.' + name_1));
};
attachOriginToPatched(patched, delegate);
return patched;
}(delegate);
}
};
for (var i = 0; i < fnNames.length; i++) {
_loop_1(i);
}
}
function isPropertyWritable(propertyDesc) {
if (!propertyDesc) {
return true;
}
if (propertyDesc.writable === false) {
return false;
}
return !(typeof propertyDesc.get === 'function' && typeof propertyDesc.set === 'undefined');
}
var isWebWorker = typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope; // Make sure to access `process` through `_global` so that WebPack does not accidentally browserify
// this code.
var isNode = !('nw' in _global) && typeof _global.process !== 'undefined' && {}.toString.call(_global.process) === '[object process]';
var isBrowser = !isNode && !isWebWorker && !!(isWindowExists && internalWindow['HTMLElement']); // we are in electron of nw, so we are both browser and nodejs
// Make sure to access `process` through `_global` so that WebPack does not accidentally browserify
// this code.
var isMix = typeof _global.process !== 'undefined' && {}.toString.call(_global.process) === '[object process]' && !isWebWorker && !!(isWindowExists && internalWindow['HTMLElement']);
var zoneSymbolEventNames = {};
var wrapFn = function wrapFn(event) {
// https://github.com/angular/zone.js/issues/911, in IE, sometimes
// event will be undefined, so we need to use window.event
event = event || _global.event;
if (!event) {
return;
}
var eventNameSymbol = zoneSymbolEventNames[event.type];
if (!eventNameSymbol) {
eventNameSymbol = zoneSymbolEventNames[event.type] = zoneSymbol('ON_PROPERTY' + event.type);
}
var target = this || event.target || _global;
var listener = target[eventNameSymbol];
var result;
if (isBrowser && target === internalWindow && event.type === 'error') {
// window.onerror have different signiture
// https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onerror#window.onerror
// and onerror callback will prevent default when callback return true
var errorEvent = event;
result = listener && listener.call(this, errorEvent.message, errorEvent.filename, errorEvent.lineno, errorEvent.colno, errorEvent.error);
if (result === true) {
event.preventDefault();
}
} else {
result = listener && listener.apply(this, arguments);
if (result != undefined && !result) {
event.preventDefault();
}
}
return result;
};
function patchProperty(obj, prop, prototype) {
var desc = ObjectGetOwnPropertyDescriptor(obj, prop);
if (!desc && prototype) {
// when patch window object, use prototype to check prop exist or not
var prototypeDesc = ObjectGetOwnPropertyDescriptor(prototype, prop);
if (prototypeDesc) {
desc = {
enumerable: true,
configurable: true
};
}
} // if the descriptor not exists or is not configurable
// just return
if (!desc || !desc.configurable) {
return;
}
var onPropPatchedSymbol = zoneSymbol('on' + prop + 'patched');
if (obj.hasOwnProperty(onPropPatchedSymbol) && obj[onPropPatchedSymbol]) {
return;
} // A property descriptor cannot have getter/setter and be writable
// deleting the writable and value properties avoids this error:
//
// TypeError: property descriptors must not specify a value or be writable when a
// getter or setter has been specified
delete desc.writable;
delete desc.value;
var originalDescGet = desc.get;
var originalDescSet = desc.set; // substr(2) cuz 'onclick' -> 'click', etc
var eventName = prop.substr(2);
var eventNameSymbol = zoneSymbolEventNames[eventName];
if (!eventNameSymbol) {
eventNameSymbol = zoneSymbolEventNames[eventName] = zoneSymbol('ON_PROPERTY' + eventName);
}
desc.set = function (newValue) {
// in some of windows's onproperty callback, this is undefined
// so we need to check it
var target = this;
if (!target && obj === _global) {
target = _global;
}
if (!target) {
return;
}
var previousValue = target[eventNameSymbol];
if (previousValue) {
target.removeEventListener(eventName, wrapFn);
} // issue #978, when onload handler was added before loading zone.js
// we should remove it with originalDescSet
if (originalDescSet) {
originalDescSet.apply(target, NULL_ON_PROP_VALUE);
}
if (typeof newValue === 'function') {
target[eventNameSymbol] = newValue;
target.addEventListener(eventName, wrapFn, false);
} else {
target[eventNameSymbol] = null;
}
}; // The getter would return undefined for unassigned properties but the default value of an
// unassigned property is null
desc.get = function () {
// in some of windows's onproperty callback, this is undefined
// so we need to check it
var target = this;
if (!target && obj === _global) {
target = _global;
}
if (!target) {
return null;
}
var listener = target[eventNameSymbol];
if (listener) {
return listener;
} else if (originalDescGet) {
// result will be null when use inline event attribute,
// such as <button onclick="func();">OK</button>
// because the onclick function is internal raw uncompiled handler
// the onclick will be evaluated when first time event was triggered or
// the property is accessed, https://github.com/angular/zone.js/issues/525
// so we should use original native get to retrieve the handler
var value = originalDescGet && originalDescGet.call(this);
if (value) {
desc.set.call(this, value);
if (typeof target[REMOVE_ATTRIBUTE] === 'function') {
target.removeAttribute(prop);
}
return value;
}
}
return null;
};
ObjectDefineProperty(obj, prop, desc);
obj[onPropPatchedSymbol] = true;
}
function patchOnProperties(obj, properties, prototype) {
if (properties) {
for (var i = 0; i < properties.length; i++) {
patchProperty(obj, 'on' + properties[i], prototype);
}
} else {
var onProperties = [];
for (var prop in obj) {
if (prop.substr(0, 2) == 'on') {
onProperties.push(prop);
}
}
for (var j = 0; j < onProperties.length; j++) {
patchProperty(obj, onProperties[j], prototype);
}
}
}
var originalInstanceKey = zoneSymbol('originalInstance'); // wrap some native API on `window`
function patchClass(className) {
var OriginalClass = _global[className];
if (!OriginalClass) return; // keep original class in global
_global[zoneSymbol(className)] = OriginalClass;
_global[className] = function () {
var a = bindArguments(arguments, className);
switch (a.length) {
case 0:
this[originalInstanceKey] = new OriginalClass();
break;
case 1:
this[originalInstanceKey] = new OriginalClass(a[0]);
break;
case 2:
this[originalInstanceKey] = new OriginalClass(a[0], a[1]);
break;
case 3:
this[originalInstanceKey] = new OriginalClass(a[0], a[1], a[2]);
break;
case 4:
this[originalInstanceKey] = new OriginalClass(a[0], a[1], a[2], a[3]);
break;
default:
throw new Error('Arg list too long.');
}
}; // attach original delegate to patched function
attachOriginToPatched(_global[className], OriginalClass);
var instance = new OriginalClass(function () {});
var prop;
for (prop in instance) {
// https://bugs.webkit.org/show_bug.cgi?id=44721
if (className === 'XMLHttpRequest' && prop === 'responseBlob') continue;
(function (prop) {
if (typeof instance[prop] === 'function') {
_global[className].prototype[prop] = function () {
return this[originalInstanceKey][prop].apply(this[originalInstanceKey], arguments);
};
} else {
ObjectDefineProperty(_global[className].prototype, prop, {
set: function set(fn) {
if (typeof fn === 'function') {
this[originalInstanceKey][prop] = wrapWithCurrentZone(fn, className + '.' + prop); // keep callback in wrapped function so we can
// use it in Function.prototype.toString to return
// the native one.
attachOriginToPatched(this[originalInstanceKey][prop], fn);
} else {
this[originalInstanceKey][prop] = fn;
}
},
get: function get() {
return this[originalInstanceKey][prop];
}
});
}
})(prop);
}
for (prop in OriginalClass) {
if (prop !== 'prototype' && OriginalClass.hasOwnProperty(prop)) {
_global[className][prop] = OriginalClass[prop];
}
}
}
function patchMethod(target, name, patchFn) {
var proto = target;
while (proto && !proto.hasOwnProperty(name)) {
proto = ObjectGetPrototypeOf(proto);
}
if (!proto && target[name]) {
// somehow we did not find it, but we can see it. This happens on IE for Window properties.
proto = target;
}
var delegateName = zoneSymbol(name);
var delegate = null;
if (proto && !(delegate = proto[delegateName])) {
delegate = proto[delegateName] = proto[name]; // check whether proto[name] is writable
// some property is readonly in safari, such as HtmlCanvasElement.prototype.toBlob
var desc = proto && ObjectGetOwnPropertyDescriptor(proto, name);
if (isPropertyWritable(desc)) {
var patchDelegate_1 = patchFn(delegate, delegateName, name);
proto[name] = function () {
return patchDelegate_1(this, arguments);
};
attachOriginToPatched(proto[name], delegate);
}
}
return delegate;
} // TODO: @JiaLiPassion, support cancel task later if necessary
function patchMacroTask(obj, funcName, metaCreator) {
var setNative = null;
function scheduleTask(task) {
var data = task.data;
data.args[data.cbIdx] = function () {
task.invoke.apply(this, arguments);
};
setNative.apply(data.target, data.args);
return task;
}
setNative = patchMethod(obj, funcName, function (delegate) {
return function (self, args) {
var meta = metaCreator(self, args);
if (meta.cbIdx >= 0 && typeof args[meta.cbIdx] === 'function') {
return scheduleMacroTaskWithCurrentZone(meta.name, args[meta.cbIdx], meta, scheduleTask);
} else {
// cause an error by calling it directly.
return delegate.apply(self, args);
}
};
});
}
function attachOriginToPatched(patched, original) {
patched[zoneSymbol('OriginalDelegate')] = original;
}
var isDetectedIEOrEdge = false;
var ieOrEdge = false;
function isIE() {
try {
var ua = internalWindow.navigator.userAgent;
if (ua.indexOf('MSIE ') !== -1 || ua.indexOf('Trident/') !== -1) {
return true;
}
} catch (error) {}
return false;
}
function isIEOrEdge() {
if (isDetectedIEOrEdge) {
return ieOrEdge;
}
isDetectedIEOrEdge = true;
try {
var ua = internalWindow.navigator.userAgent;
if (ua.indexOf('MSIE ') !== -1 || ua.indexOf('Trident/') !== -1 || ua.indexOf('Edge/') !== -1) {
ieOrEdge = true;
}
} catch (error) {}
return ieOrEdge;
}
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
Zone.__load_patch('ZoneAwarePromise', function (global, Zone, api) {
var ObjectGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
var ObjectDefineProperty = Object.defineProperty;
function readableObjectToString(obj) {
if (obj && obj.toString === Object.prototype.toString) {
var className = obj.constructor && obj.constructor.name;
return (className ? className : '') + ': ' + JSON.stringify(obj);
}
return obj ? obj.toString() : Object.prototype.toString.call(obj);
}
var __symbol__ = api.symbol;
var _uncaughtPromiseErrors = [];
var isDisableWrappingUncaughtPromiseRejection = global[__symbol__('DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION')] === true;
var symbolPromise = __symbol__('Promise');
var symbolThen = __symbol__('then');
var creationTrace = '__creationTrace__';
api.onUnhandledError = function (e) {
if (api.showUncaughtError()) {
var rejection = e && e.rejection;
if (rejection) {
console.error('Unhandled Promise rejection:', rejection instanceof Error ? rejection.message : rejection, '; Zone:', e.zone.name, '; Task:', e.task && e.task.source, '; Value:', rejection, rejection instanceof Error ? rejection.stack : undefined);
} else {
console.error(e);
}
}
};
api.microtaskDrainDone = function () {
var _loop_2 = function _loop_2() {
var uncaughtPromiseError = _uncaughtPromiseErrors.shift();
try {
uncaughtPromiseError.zone.runGuarded(function () {
if (uncaughtPromiseError.throwOriginal) {
throw uncaughtPromiseError.rejection;
}
throw uncaughtPromiseError;
});
} catch (error) {
handleUnhandledRejection(error);
}
};
while (_uncaughtPromiseErrors.length) {
_loop_2();
}
};
var UNHANDLED_PROMISE_REJECTION_HANDLER_SYMBOL = __symbol__('unhandledPromiseRejectionHandler');
function handleUnhandledRejection(e) {
api.onUnhandledError(e);
try {
var handler = Zone[UNHANDLED_PROMISE_REJECTION_HANDLER_SYMBOL];
if (typeof handler === 'function') {
handler.call(this, e);
}
} catch (err) {}
}
function isThenable(value) {
return value && value.then;
}
function forwardResolution(value) {
return value;
}
function forwardRejection(rejection) {
return ZoneAwarePromise.reject(rejection);
}
var symbolState = __symbol__('state');
var symbolValue = __symbol__('value');
var symbolFinally = __symbol__('finally');
var symbolParentPromiseValue = __symbol__('parentPromiseValue');
var symbolParentPromiseState = __symbol__('parentPromiseState');
var source = 'Promise.then';
var UNRESOLVED = null;
var RESOLVED = true;
var REJECTED = false;
var REJECTED_NO_CATCH = 0;
function makeResolver(promise, state) {
return function (v) {
try {
resolvePromise(promise, state, v);
} catch (err) {
resolvePromise(promise, false, err);
} // Do not return value or you will break the Promise spec.
};
}
var once = function once() {
var wasCalled = false;
return function wrapper(wrappedFunction) {
return function () {
if (wasCalled) {
return;
}
wasCalled = true;
wrappedFunction.apply(null, arguments);
};
};
};
var TYPE_ERROR = 'Promise resolved with itself';
var CURRENT_TASK_TRACE_SYMBOL = __symbol__('currentTaskTrace'); // Promise Resolution
function resolvePromise(promise, state, value) {
var onceWrapper = once();
if (promise === value) {
throw new TypeError(TYPE_ERROR);
}
if (promise[symbolState] === UNRESOLVED) {
// should only get value.then once based on promise spec.
var then = null;
try {
if (typeof value === 'object' || typeof value === 'function') {
then = value && value.then;
}
} catch (err) {
onceWrapper(function () {
resolvePromise(promise, false, err);
})();
return promise;
} // if (value instanceof ZoneAwarePromise) {
if (state !== REJECTED && value instanceof ZoneAwarePromise && value.hasOwnProperty(symbolState) && value.hasOwnProperty(symbolValue) && value[symbolState] !== UNRESOLVED) {
clearRejectedNoCatch(value);
resolvePromise(promise, value[symbolState], value[symbolValue]);
} else if (state !== REJECTED && typeof then === 'function') {
try {
then.call(value, onceWrapper(makeResolver(promise, state)), onceWrapper(makeResolver(promise, false)));
} catch (err) {
onceWrapper(function () {
resolvePromise(promise, false, err);
})();
}
} else {
promise[symbolState] = state;
var queue = promise[symbolValue];
promise[symbolValue] = value;
if (promise[symbolFinally] === symbolFinally) {
// the promise is generated by Promise.prototype.finally
if (state === RESOLVED) {
// the state is resolved, should ignore the value
// and use parent promise value
promise[symbolState] = promise[symbolParentPromiseState];
promise[symbolValue] = promise[symbolParentPromiseValue];
}
} // record task information in value when error occurs, so we can
// do some additional work such as render longStackTrace
if (state === REJECTED && value instanceof Error) {
// check if longStackTraceZone is here
var trace = Zone.currentTask && Zone.currentTask.data && Zone.currentTask.data[creationTrace];
if (trace) {
// only keep the long stack trace into error when in longStackTraceZone
ObjectDefineProperty(value, CURRENT_TASK_TRACE_SYMBOL, {
configurable: true,
enumerable: false,
writable: true,
value: trace
});
}
}
for (var i = 0; i < queue.length;) {
scheduleResolveOrReject(promise, queue[i++], queue[i++], queue[i++], queue[i++]);
}
if (queue.length == 0 && state == REJECTED) {
promise[symbolState] = REJECTED_NO_CATCH;
var uncaughtPromiseError = value;
try {
// Here we throws a new Error to print more readable error log
// and if the value is not an error, zone.js builds an `Error`
// Object here to attach the stack information.
throw new Error('Uncaught (in promise): ' + readableObjectToString(value) + (value && value.stack ? '\n' + value.stack : ''));
} catch (err) {
uncaughtPromiseError = err;
}
if (isDisableWrappingUncaughtPromiseRejection) {
// If disable wrapping uncaught promise reject
// use the value instead of wrapping it.
uncaughtPromiseError.throwOriginal = true;
}
uncaughtPromiseError.rejection = value;
uncaughtPromiseError.promise = promise;
uncaughtPromiseError.zone = Zone.current;
uncaughtPromiseError.task = Zone.currentTask;
_uncaughtPromiseErrors.push(uncaughtPromiseError);
api.scheduleMicroTask(); // to make sure that it is running
}
}
} // Resolving an already resolved promise is a noop.
return promise;
}
var REJECTION_HANDLED_HANDLER = __symbol__('rejectionHandledHandler');
function clearRejectedNoCatch(promise) {
if (promise[symbolState] === REJECTED_NO_CATCH) {
// if the promise is rejected no catch status
// and queue.length > 0, means there is a error handler
// here to handle the rejected promise, we should trigger
// windows.rejectionhandled eventHandler or nodejs rejectionHandled
// eventHandler
try {
var handler = Zone[REJECTION_HANDLED_HANDLER];
if (handler && typeof handler === 'function') {
handler.call(this, {
rejection: promise[symbolValue],
promise: promise
});
}
} catch (err) {}
promise[symbolState] = REJECTED;
for (var i = 0; i < _uncaughtPromiseErrors.length; i++) {
if (promise === _uncaughtPromiseErrors[i].promise) {
_uncaughtPromiseErrors.splice(i, 1);
}
}
}
}
function scheduleResolveOrReject(promise, zone, chainPromise, onFulfilled, onRejected) {
clearRejectedNoCatch(promise);
var promiseState = promise[symbolState];
var delegate = promiseState ? typeof onFulfilled === 'function' ? onFulfilled : forwardResolution : typeof onRejected === 'function' ? onRejected : forwardRejection;
zone.scheduleMicroTask(source, function () {
try {
var parentPromiseValue = promise[symbolValue];
var isFinallyPromise = !!chainPromise && symbolFinally === chainPromise[symbolFinally];
if (isFinallyPromise) {
// if the promise is generated from finally call, keep parent promise's state and value
chainPromise[symbolParentPromiseValue] = parentPromiseValue;
chainPromise[symbolParentPromiseState] = promiseState;
} // should not pass value to finally callback
var value = zone.run(delegate, undefined, isFinallyPromise && delegate !== forwardRejection && delegate !== forwardResolution ? [] : [parentPromiseValue]);
resolvePromise(chainPromise, true, value);
} catch (error) {
// if error occurs, should always return this error
resolvePromise(chainPromise, false, error);
}
}, chainPromise);
}
var ZONE_AWARE_PROMISE_TO_STRING = 'function ZoneAwarePromise() { [native code] }';
var noop = function noop() {};
var ZoneAwarePromise =
/** @class */
function () {
function ZoneAwarePromise(executor) {
var promise = this;
if (!(promise instanceof ZoneAwarePromise)) {
throw new Error('Must be an instanceof Promise.');
}
promise[symbolState] = UNRESOLVED;
promise[symbolValue] = []; // queue;
try {
executor && executor(makeResolver(promise, RESOLVED), makeResolver(promise, REJECTED));
} catch (error) {
resolvePromise(promise, false, error);
}
}
ZoneAwarePromise.toString = function () {
return ZONE_AWARE_PROMISE_TO_STRING;
};
ZoneAwarePromise.resolve = function (value) {
return resolvePromise(new this(null), RESOLVED, value);
};
ZoneAwarePromise.reject = function (error) {
return resolvePromise(new this(null), REJECTED, error);
};
ZoneAwarePromise.race = function (values) {
var resolve;
var reject;
var promise = new this(function (res, rej) {
resolve = res;
reject = rej;
});
function onResolve(value) {
resolve(value);
}
function onReject(error) {
reject(error);
}
for (var _i = 0, values_1 = values; _i < values_1.length; _i++) {
var value = values_1[_i];
if (!isThenable(value)) {
value = this.resolve(value);
}
value.then(onResolve, onReject);
}
return promise;
};
ZoneAwarePromise.all = function (values) {
return ZoneAwarePromise.allWithCallback(values);
};
ZoneAwarePromise.allSettled = function (values) {
var P = this && this.prototype instanceof ZoneAwarePromise ? this : ZoneAwarePromise;
return P.allWithCallback(values, {
thenCallback: function thenCallback(value) {
return {
status: 'fulfilled',
value: value
};
},
errorCallback: function errorCallback(err) {
return {
status: 'rejected',
reason: err
};
}
});
};
ZoneAwarePromise.allWithCallback = function (values, callback) {
var resolve;
var reject;
var promise = new this(function (res, rej) {
resolve = res;
reject = rej;
}); // Start at 2 to prevent prematurely resolving if .then is called immediately.
var unresolvedCount = 2;
var valueIndex = 0;
var resolvedValues = [];
var _loop_3 = function _loop_3(value) {
if (!isThenable(value)) {
value = this_1.resolve(value);
}
var curValueIndex = valueIndex;
try {
value.then(function (value) {
resolvedValues[curValueIndex] = callback ? callback.thenCallback(value) : value;
unresolvedCount--;
if (unresolvedCount === 0) {
resolve(resolvedValues);
}
}, function (err) {
if (!callback) {
reject(err);
} else {
resolvedValues[curValueIndex] = callback.errorCallback(err);
unresolvedCount--;
if (unresolvedCount === 0) {
resolve(resolvedValues);
}
}
});
} catch (thenErr) {
reject(thenErr);
}
unresolvedCount++;
valueIndex++;
};
var this_1 = this;
for (var _i = 0, values_2 = values; _i < values_2.length; _i++) {
var value = values_2[_i];
_loop_3(value);
} // Make the unresolvedCount zero-based again.
unresolvedCount -= 2;
if (unresolvedCount === 0) {
resolve(resolvedValues);
}
return promise;
};
Object.defineProperty(ZoneAwarePromise.prototype, Symbol.toStringTag, {
get: function get() {
return 'Promise';
},
enumerable: false,
configurable: true
});
Object.defineProperty(ZoneAwarePromise.prototype, Symbol.species, {
get: function get() {
return ZoneAwarePromise;
},
enumerable: false,
configurable: true
});
ZoneAwarePromise.prototype.then = function (onFulfilled, onRejected) {
var C = this.constructor[Symbol.species];
if (!C || typeof C !== 'function') {
C = this.constructor || ZoneAwarePromise;
}
var chainPromise = new C(noop);
var zone = Zone.current;
if (this[symbolState] == UNRESOLVED) {
this[symbolValue].push(zone, chainPromise, onFulfilled, onRejected);
} else {
scheduleResolveOrReject(this, zone, chainPromise, onFulfilled, onRejected);
}
return chainPromise;
};
ZoneAwarePromise.prototype.catch = function (onRejected) {
return this.then(null, onRejected);
};
ZoneAwarePromise.prototype.finally = function (onFinally) {
var C = this.constructor[Symbol.species];
if (!C || typeof C !== 'function') {
C = ZoneAwarePromise;
}
var chainPromise = new C(noop);
chainPromise[symbolFinally] = symbolFinally;
var zone = Zone.current;
if (this[symbolState] == UNRESOLVED) {
this[symbolValue].push(zone, chainPromise, onFinally, onFinally);
} else {
scheduleResolveOrReject(this, zone, chainPromise, onFinally, onFinally);
}
return chainPromise;
};
return ZoneAwarePromise;
}(); // Protect against aggressive optimizers dropping seemingly unused properties.
// E.g. Closure Compiler in advanced mode.
ZoneAwarePromise['resolve'] = ZoneAwarePromise.resolve;
ZoneAwarePromise['reject'] = ZoneAwarePromise.reject;
ZoneAwarePromise['race'] = ZoneAwarePromise.race;
ZoneAwarePromise['all'] = ZoneAwarePromise.all;
var NativePromise = global[symbolPromise] = global['Promise'];
global['Promise'] = ZoneAwarePromise;
var symbolThenPatched = __symbol__('thenPatched');
function patchThen(Ctor) {
var proto = Ctor.prototype;
var prop = ObjectGetOwnPropertyDescriptor(proto, 'then');
if (prop && (prop.writable === false || !prop.configurable)) {
// check Ctor.prototype.then propertyDescriptor is writable or not
// in meteor env, writable is false, we should ignore such case
return;
}
var originalThen = proto.then; // Keep a reference to the original method.
proto[symbolThen] = originalThen;
Ctor.prototype.then = function (onResolve, onReject) {
var _this = this;
var wrapped = new ZoneAwarePromise(function (resolve, reject) {
originalThen.call(_this, resolve, reject);
});
return wrapped.then(onResolve, onReject);
};
Ctor[symbolThenPatched] = true;
}
api.patchThen = patchThen;
function zoneify(fn) {
return function (self, args) {
var resultPromise = fn.apply(self, args);
if (resultPromise instanceof ZoneAwarePromise) {
return resultPromise;
}
var ctor = resultPromise.constructor;
if (!ctor[symbolThenPatched]) {
patchThen(ctor);
}
return resultPromise;
};
}
if (NativePromise) {
patchThen(NativePromise);
patchMethod(global, 'fetch', function (delegate) {
return zoneify(delegate);
});
} // This is not part of public API, but it is useful for tests, so we expose it.
Promise[Zone.__symbol__('uncaughtPromiseErrors')] = _uncaughtPromiseErrors;
return ZoneAwarePromise;
});
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
// override Function.prototype.toString to make zone.js patched function
// look like native function
Zone.__load_patch('toString', function (global) {
// patch Func.prototype.toString to let them look like native
var originalFunctionToString = Function.prototype.toString;
var ORIGINAL_DELEGATE_SYMBOL = zoneSymbol('OriginalDelegate');
var PROMISE_SYMBOL = zoneSymbol('Promise');
var ERROR_SYMBOL = zoneSymbol('Error');
var newFunctionToString = function toString() {
if (typeof this === 'function') {
var originalDelegate = this[ORIGINAL_DELEGATE_SYMBOL];
if (originalDelegate) {
if (typeof originalDelegate === 'function') {
return originalFunctionToString.call(originalDelegate);
} else {
return Object.prototype.toString.call(originalDelegate);
}
}
if (this === Promise) {
var nativePromise = global[PROMISE_SYMBOL];
if (nativePromise) {
return originalFunctionToString.call(nativePromise);
}
}
if (this === Error) {
var nativeError = global[ERROR_SYMBOL];
if (nativeError) {
return originalFunctionToString.call(nativeError);
}
}
}
return originalFunctionToString.call(this);
};
newFunctionToString[ORIGINAL_DELEGATE_SYMBOL] = originalFunctionToString;
Function.prototype.toString = newFunctionToString; // patch Object.prototype.toString to let them look like native
var originalObjectToString = Object.prototype.toString;
var PROMISE_OBJECT_TO_STRING = '[object Promise]';
Object.prototype.toString = function () {
if (typeof Promise === 'function' && this instanceof Promise) {
return PROMISE_OBJECT_TO_STRING;
}
return originalObjectToString.call(this);
};
});
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
var passiveSupported = false;
if (typeof window !== 'undefined') {
try {
var options = Object.defineProperty({}, 'passive', {
get: function get() {
passiveSupported = true;
}
});
window.addEventListener('test', options, options);
window.removeEventListener('test', options, options);
} catch (err) {
passiveSupported = false;
}
} // an identifier to tell ZoneTask do not create a new invoke closure
var OPTIMIZED_ZONE_EVENT_TASK_DATA = {
useG: true
};
var zoneSymbolEventNames$1 = {};
var globalSources = {};
var EVENT_NAME_SYMBOL_REGX = new RegExp('^' + ZONE_SYMBOL_PREFIX + '(\\w+)(true|false)$');
var IMMEDIATE_PROPAGATION_SYMBOL = zoneSymbol('propagationStopped');
function prepareEventNames(eventName, eventNameToString) {
var falseEventName = (eventNameToString ? eventNameToString(eventName) : eventName) + FALSE_STR;
var trueEventName = (eventNameToString ? eventNameToString(eventName) : eventName) + TRUE_STR;
var symbol = ZONE_SYMBOL_PREFIX + falseEventName;
var symbolCapture = ZONE_SYMBOL_PREFIX + trueEventName;
zoneSymbolEventNames$1[eventName] = {};
zoneSymbolEventNames$1[eventName][FALSE_STR] = symbol;
zoneSymbolEventNames$1[eventName][TRUE_STR] = symbolCapture;
}
function patchEventTarget(_global, apis, patchOptions) {
var ADD_EVENT_LISTENER = patchOptions && patchOptions.add || ADD_EVENT_LISTENER_STR;
var REMOVE_EVENT_LISTENER = patchOptions && patchOptions.rm || REMOVE_EVENT_LISTENER_STR;
var LISTENERS_EVENT_LISTENER = patchOptions && patchOptions.listeners || 'eventListeners';
var REMOVE_ALL_LISTENERS_EVENT_LISTENER = patchOptions && patchOptions.rmAll || 'removeAllListeners';
var zoneSymbolAddEventListener = zoneSymbol(ADD_EVENT_LISTENER);
var ADD_EVENT_LISTENER_SOURCE = '.' + ADD_EVENT_LISTENER + ':';
var PREPEND_EVENT_LISTENER = 'prependListener';
var PREPEND_EVENT_LISTENER_SOURCE = '.' + PREPEND_EVENT_LISTENER + ':';
var invokeTask = function invokeTask(task, target, event) {
// for better performance, check isRemoved which is set
// by removeEventListener
if (task.isRemoved) {
return;
}
var delegate = task.callback;
if (typeof delegate === 'object' && delegate.handleEvent) {
// create the bind version of handleEvent when invoke
task.callback = function (event) {
return delegate.handleEvent(event);
};
task.originalDelegate = delegate;
} // invoke static task.invoke
task.invoke(task, target, [event]);
var options = task.options;
if (options && typeof options === 'object' && options.once) {
// if options.once is true, after invoke once remove listener here
// only browser need to do this, nodejs eventEmitter will cal removeListener
// inside EventEmitter.once
var delegate_1 = task.originalDelegate ? task.originalDelegate : task.callback;
target[REMOVE_EVENT_LISTENER].call(target, event.type, delegate_1, options);
}
}; // global shared zoneAwareCallback to handle all event callback with capture = false
var globalZoneAwareCallback = function globalZoneAwareCallback(event) {
// https://github.com/angular/zone.js/issues/911, in IE, sometimes
// event will be undefined, so we need to use window.event
event = event || _global.event;
if (!event) {
return;
} // event.target is needed for Samsung TV and SourceBuffer
// || global is needed https://github.com/angular/zone.js/issues/190
var target = this || event.target || _global;
var tasks = target[zoneSymbolEventNames$1[event.type][FALSE_STR]];
if (tasks) {
// invoke all tasks which attached to current target with given event.type and capture = false
// for performance concern, if task.length === 1, just invoke
if (tasks.length === 1) {
invokeTask(tasks[0], target, event);
} else {
// https://github.com/angular/zone.js/issues/836
// copy the tasks array before invoke, to avoid
// the callback will remove itself or other listener
var copyTasks = tasks.slice();
for (var i = 0; i < copyTasks.length; i++) {
if (event && event[IMMEDIATE_PROPAGATION_SYMBOL] === true) {
break;
}
invokeTask(copyTasks[i], target, event);
}
}
}
}; // global shared zoneAwareCallback to handle all event callback with capture = true
var globalZoneAwareCaptureCallback = function globalZoneAwareCaptureCallback(event) {
// https://github.com/angular/zone.js/issues/911, in IE, sometimes
// event will be undefined, so we need to use window.event
event = event || _global.event;
if (!event) {
return;
} // event.target is needed for Samsung TV and SourceBuffer
// || global is needed https://github.com/angular/zone.js/issues/190
var target = this || event.target || _global;
var tasks = target[zoneSymbolEventNames$1[event.type][TRUE_STR]];
if (tasks) {
// invoke all tasks which attached to current target with given event.type and capture = false
// for performance concern, if task.length === 1, just invoke
if (tasks.length === 1) {
invokeTask(tasks[0], target, event);
} else {
// https://github.com/angular/zone.js/issues/836
// copy the tasks array before invoke, to avoid
// the callback will remove itself or other listener
var copyTasks = tasks.slice();
for (var i = 0; i < copyTasks.length; i++) {
if (event && event[IMMEDIATE_PROPAGATION_SYMBOL] === true) {
break;
}
invokeTask(copyTasks[i], target, event);
}
}
}
};
function patchEventTargetMethods(obj, patchOptions) {
if (!obj) {
return false;
}
var useGlobalCallback = true;
if (patchOptions && patchOptions.useG !== undefined) {
useGlobalCallback = patchOptions.useG;
}
var validateHandler = patchOptions && patchOptions.vh;
var checkDuplicate = true;
if (patchOptions && patchOptions.chkDup !== undefined) {
checkDuplicate = patchOptions.chkDup;
}
var returnTarget = false;
if (patchOptions && patchOptions.rt !== undefined) {
returnTarget = patchOptions.rt;
}
var proto = obj;
while (proto && !proto.hasOwnProperty(ADD_EVENT_LISTENER)) {
proto = ObjectGetPrototypeOf(proto);
}
if (!proto && obj[ADD_EVENT_LISTENER]) {
// somehow we did not find it, but we can see it. This happens on IE for Window properties.
proto = obj;
}
if (!proto) {
return false;
}
if (proto[zoneSymbolAddEventListener]) {
return false;
}
var eventNameToString = patchOptions && patchOptions.eventNameToString; // a shared global taskData to pass data for scheduleEventTask
// so we do not need to create a new object just for pass some data
var taskData = {};
var nativeAddEventListener = proto[zoneSymbolAddEventListener] = proto[ADD_EVENT_LISTENER];
var nativeRemoveEventListener = proto[zoneSymbol(REMOVE_EVENT_LISTENER)] = proto[REMOVE_EVENT_LISTENER];
var nativeListeners = proto[zoneSymbol(LISTENERS_EVENT_LISTENER)] = proto[LISTENERS_EVENT_LISTENER];
var nativeRemoveAllListeners = proto[zoneSymbol(REMOVE_ALL_LISTENERS_EVENT_LISTENER)] = proto[REMOVE_ALL_LISTENERS_EVENT_LISTENER];
var nativePrependEventListener;
if (patchOptions && patchOptions.prepend) {
nativePrependEventListener = proto[zoneSymbol(patchOptions.prepend)] = proto[patchOptions.prepend];
}
/**
* This util function will build an option object with passive option
* to handle all possible input from the user.
*/
function buildEventListenerOptions(options, passive) {
if (!passiveSupported && typeof options === 'object' && options) {
// doesn't support passive but user want to pass an object as options.
// this will not work on some old browser, so we just pass a boolean
// as useCapture parameter
return !!options.capture;
}
if (!passiveSupported || !passive) {
return options;
}
if (typeof options === 'boolean') {
return {
capture: options,
passive: true
};
}
if (!options) {
return {
passive: true
};
}
if (typeof options === 'object' && options.passive !== false) {
return Object.assign(Object.assign({}, options), {
passive: true
});
}
return options;
}
var customScheduleGlobal = function customScheduleGlobal(task) {
// if there is already a task for the eventName + capture,
// just return, because we use the shared globalZoneAwareCallback here.
if (taskData.isExisting) {
return;
}
return nativeAddEventListener.call(taskData.target, taskData.eventName, taskData.capture ? globalZoneAwareCaptureCallback : globalZoneAwareCallback, taskData.options);
};
var customCancelGlobal = function customCancelGlobal(task) {
// if task is not marked as isRemoved, this call is directly
// from Zone.prototype.cancelTask, we should remove the task
// from tasksList of target first
if (!task.isRemoved) {
var symbolEventNames = zoneSymbolEventNames$1[task.eventName];
var symbolEventName = void 0;
if (symbolEventNames) {
symbolEventName = symbolEventNames[task.capture ? TRUE_STR : FALSE_STR];
}
var existingTasks = symbolEventName && task.target[symbolEventName];
if (existingTasks) {
for (var i = 0; i < existingTasks.length; i++) {
var existingTask = existingTasks[i];
if (existingTask === task) {
existingTasks.splice(i, 1); // set isRemoved to data for faster invokeTask check
task.isRemoved = true;
if (existingTasks.length === 0) {
// all tasks for the eventName + capture have gone,
// remove globalZoneAwareCallback and remove the task cache from target
task.allRemoved = true;
task.target[symbolEventName] = null;
}
break;
}
}
}
} // if all tasks for the eventName + capture have gone,
// we will really remove the global event callback,
// if not, return
if (!task.allRemoved) {
return;
}
return nativeRemoveEventListener.call(task.target, task.eventName, task.capture ? globalZoneAwareCaptureCallback : globalZoneAwareCallback, task.options);
};
var customScheduleNonGlobal = function customScheduleNonGlobal(task) {
return nativeAddEventListener.call(taskData.target, taskData.eventName, task.invoke, taskData.options);
};
var customSchedulePrepend = function customSchedulePrepend(task) {
return nativePrependEventListener.call(taskData.target, taskData.eventName, task.invoke, taskData.options);
};
var customCancelNonGlobal = function customCancelNonGlobal(task) {
return nativeRemoveEventListener.call(task.target, task.eventName, task.invoke, task.options);
};
var customSchedule = useGlobalCallback ? customScheduleGlobal : customScheduleNonGlobal;
var customCancel = useGlobalCallback ? customCancelGlobal : customCancelNonGlobal;
var compareTaskCallbackVsDelegate = function compareTaskCallbackVsDelegate(task, delegate) {
var typeOfDelegate = typeof delegate;
return typeOfDelegate === 'function' && task.callback === delegate || typeOfDelegate === 'object' && task.originalDelegate === delegate;
};
var compare = patchOptions && patchOptions.diff ? patchOptions.diff : compareTaskCallbackVsDelegate;
var unpatchedEvents = Zone[zoneSymbol('UNPATCHED_EVENTS')];
var passiveEvents = _global[zoneSymbol('PASSIVE_EVENTS')];
var makeAddListener = function makeAddListener(nativeListener, addSource, customScheduleFn, customCancelFn, returnTarget, prepend) {
if (returnTarget === void 0) {
returnTarget = false;
}
if (prepend === void 0) {
prepend = false;
}
return function () {
var target = this || _global;
var eventName = arguments[0];
if (patchOptions && patchOptions.transferEventName) {
eventName = patchOptions.transferEventName(eventName);
}
var delegate = arguments[1];
if (!delegate) {
return nativeListener.apply(this, arguments);
}
if (isNode && eventName === 'uncaughtException') {
// don't patch uncaughtException of nodejs to prevent endless loop
return nativeListener.apply(this, arguments);
} // don't create the bind delegate function for handleEvent
// case here to improve addEventListener performance
// we will create the bind delegate when invoke
var isHandleEvent = false;
if (typeof delegate !== 'function') {
if (!delegate.handleEvent) {
return nativeListener.apply(this, arguments);
}
isHandleEvent = true;
}
if (validateHandler && !validateHandler(nativeListener, delegate, target, arguments)) {
return;
}
var passive = passiveSupported && !!passiveEvents && passiveEvents.indexOf(eventName) !== -1;
var options = buildEventListenerOptions(arguments[2], passive);
if (unpatchedEvents) {
// check upatched list
for (var i = 0; i < unpatchedEvents.length; i++) {
if (eventName === unpatchedEvents[i]) {
if (passive) {
return nativeListener.call(target, eventName, delegate, options);
} else {
return nativeListener.apply(this, arguments);
}
}
}
}
var capture = !options ? false : typeof options === 'boolean' ? true : options.capture;
var once = options && typeof options === 'object' ? options.once : false;
var zone = Zone.current;
var symbolEventNames = zoneSymbolEventNames$1[eventName];
if (!symbolEventNames) {
prepareEventNames(eventName, eventNameToString);
symbolEventNames = zoneSymbolEventNames$1[eventName];
}
var symbolEventName = symbolEventNames[capture ? TRUE_STR : FALSE_STR];
var existingTasks = target[symbolEventName];
var isExisting = false;
if (existingTasks) {
// already have task registered
isExisting = true;
if (checkDuplicate) {
for (var i = 0; i < existingTasks.length; i++) {
if (compare(existingTasks[i], delegate)) {
// same callback, same capture, same event name, just return
return;
}
}
}
} else {
existingTasks = target[symbolEventName] = [];
}
var source;
var constructorName = target.constructor['name'];
var targetSource = globalSources[constructorName];
if (targetSource) {
source = targetSource[eventName];
}
if (!source) {
source = constructorName + addSource + (eventNameToString ? eventNameToString(eventName) : eventName);
} // do not create a new object as task.data to pass those things
// just use the global shared one
taskData.options = options;
if (once) {
// if addEventListener with once options, we don't pass it to
// native addEventListener, instead we keep the once setting
// and handle ourselves.
taskData.options.once = false;
}
taskData.target = target;
taskData.capture = capture;
taskData.eventName = eventName;
taskData.isExisting = isExisting;
var data = useGlobalCallback ? OPTIMIZED_ZONE_EVENT_TASK_DATA : undefined; // keep taskData into data to allow onScheduleEventTask to access the task information
if (data) {
data.taskData = taskData;
}
var task = zone.scheduleEventTask(source, delegate, data, customScheduleFn, customCancelFn); // should clear taskData.target to avoid memory leak
// issue, https://github.com/angular/angular/issues/20442
taskData.target = null; // need to clear up taskData because it is a global object
if (data) {
data.taskData = null;
} // have to save those information to task in case
// application may call task.zone.cancelTask() directly
if (once) {
options.once = true;
}
if (!(!passiveSupported && typeof task.options === 'boolean')) {
// if not support passive, and we pass an option object
// to addEventListener, we should save the options to task
task.options = options;
}
task.target = target;
task.capture = capture;
task.eventName = eventName;
if (isHandleEvent) {
// save original delegate for compare to check duplicate
task.originalDelegate = delegate;
}
if (!prepend) {
existingTasks.push(task);
} else {
existingTasks.unshift(task);
}
if (returnTarget) {
return target;
}
};
};
proto[ADD_EVENT_LISTENER] = makeAddListener(nativeAddEventListener, ADD_EVENT_LISTENER_SOURCE, customSchedule, customCancel, returnTarget);
if (nativePrependEventListener) {
proto[PREPEND_EVENT_LISTENER] = makeAddListener(nativePrependEventListener, PREPEND_EVENT_LISTENER_SOURCE, customSchedulePrepend, customCancel, returnTarget, true);
}
proto[REMOVE_EVENT_LISTENER] = function () {
var target = this || _global;
var eventName = arguments[0];
if (patchOptions && patchOptions.transferEventName) {
eventName = patchOptions.transferEventName(eventName);
}
var options = arguments[2];
var capture = !options ? false : typeof options === 'boolean' ? true : options.capture;
var delegate = arguments[1];
if (!delegate) {
return nativeRemoveEventListener.apply(this, arguments);
}
if (validateHandler && !validateHandler(nativeRemoveEventListener, delegate, target, arguments)) {
return;
}
var symbolEventNames = zoneSymbolEventNames$1[eventName];
var symbolEventName;
if (symbolEventNames) {
symbolEventName = symbolEventNames[capture ? TRUE_STR : FALSE_STR];
}
var existingTasks = symbolEventName && target[symbolEventName];
if (existingTasks) {
for (var i = 0; i < existingTasks.length; i++) {
var existingTask = existingTasks[i];
if (compare(existingTask, delegate)) {
existingTasks.splice(i, 1); // set isRemoved to data for faster invokeTask check
existingTask.isRemoved = true;
if (existingTasks.length === 0) {
// all tasks for the eventName + capture have gone,
// remove globalZoneAwareCallback and remove the task cache from target
existingTask.allRemoved = true;
target[symbolEventName] = null; // in the target, we have an event listener which is added by on_property
// such as target.onclick = function() {}, so we need to clear this internal
// property too if all delegates all removed
if (typeof eventName === 'string') {
var onPropertySymbol = ZONE_SYMBOL_PREFIX + 'ON_PROPERTY' + eventName;
target[onPropertySymbol] = null;
}
}
existingTask.zone.cancelTask(existingTask);
if (returnTarget) {
return target;
}
return;
}
}
} // issue 930, didn't find the event name or callback
// from zone kept existingTasks, the callback maybe
// added outside of zone, we need to call native removeEventListener
// to try to remove it.
return nativeRemoveEventListener.apply(this, arguments);
};
proto[LISTENERS_EVENT_LISTENER] = function () {
var target = this || _global;
var eventName = arguments[0];
if (patchOptions && patchOptions.transferEventName) {
eventName = patchOptions.transferEventName(eventName);
}
var listeners = [];
var tasks = findEventTasks(target, eventNameToString ? eventNameToString(eventName) : eventName);
for (var i = 0; i < tasks.length; i++) {
var task = tasks[i];
var delegate = task.originalDelegate ? task.originalDelegate : task.callback;
listeners.push(delegate);
}
return listeners;
};
proto[REMOVE_ALL_LISTENERS_EVENT_LISTENER] = function () {
var target = this || _global;
var eventName = arguments[0];
if (!eventName) {
var keys = Object.keys(target);
for (var i = 0; i < keys.length; i++) {
var prop = keys[i];
var match = EVENT_NAME_SYMBOL_REGX.exec(prop);
var evtName = match && match[1]; // in nodejs EventEmitter, removeListener event is
// used for monitoring the removeListener call,
// so just keep removeListener eventListener until
// all other eventListeners are removed
if (evtName && evtName !== 'removeListener') {
this[REMOVE_ALL_LISTENERS_EVENT_LISTENER].call(this, evtName);
}
} // remove removeListener listener finally
this[REMOVE_ALL_LISTENERS_EVENT_LISTENER].call(this, 'removeListener');
} else {
if (patchOptions && patchOptions.transferEventName) {
eventName = patchOptions.transferEventName(eventName);
}
var symbolEventNames = zoneSymbolEventNames$1[eventName];
if (symbolEventNames) {
var symbolEventName = symbolEventNames[FALSE_STR];
var symbolCaptureEventName = symbolEventNames[TRUE_STR];
var tasks = target[symbolEventName];
var captureTasks = target[symbolCaptureEventName];
if (tasks) {
var removeTasks = tasks.slice();
for (var i = 0; i < removeTasks.length; i++) {
var task = removeTasks[i];
var delegate = task.originalDelegate ? task.originalDelegate : task.callback;
this[REMOVE_EVENT_LISTENER].call(this, eventName, delegate, task.options);
}
}
if (captureTasks) {
var removeTasks = captureTasks.slice();
for (var i = 0; i < removeTasks.length; i++) {
var task = removeTasks[i];
var delegate = task.originalDelegate ? task.originalDelegate : task.callback;
this[REMOVE_EVENT_LISTENER].call(this, eventName, delegate, task.options);
}
}
}
}
if (returnTarget) {
return this;
}
}; // for native toString patch
attachOriginToPatched(proto[ADD_EVENT_LISTENER], nativeAddEventListener);
attachOriginToPatched(proto[REMOVE_EVENT_LISTENER], nativeRemoveEventListener);
if (nativeRemoveAllListeners) {
attachOriginToPatched(proto[REMOVE_ALL_LISTENERS_EVENT_LISTENER], nativeRemoveAllListeners);
}
if (nativeListeners) {
attachOriginToPatched(proto[LISTENERS_EVENT_LISTENER], nativeListeners);
}
return true;
}
var results = [];
for (var i = 0; i < apis.length; i++) {
results[i] = patchEventTargetMethods(apis[i], patchOptions);
}
return results;
}
function findEventTasks(target, eventName) {
if (!eventName) {
var foundTasks = [];
for (var prop in target) {
var match = EVENT_NAME_SYMBOL_REGX.exec(prop);
var evtName = match && match[1];
if (evtName && (!eventName || evtName === eventName)) {
var tasks = target[prop];
if (tasks) {
for (var i = 0; i < tasks.length; i++) {
foundTasks.push(tasks[i]);
}
}
}
}
return foundTasks;
}
var symbolEventName = zoneSymbolEventNames$1[eventName];
if (!symbolEventName) {
prepareEventNames(eventName);
symbolEventName = zoneSymbolEventNames$1[eventName];
}
var captureFalseTasks = target[symbolEventName[FALSE_STR]];
var captureTrueTasks = target[symbolEventName[TRUE_STR]];
if (!captureFalseTasks) {
return captureTrueTasks ? captureTrueTasks.slice() : [];
} else {
return captureTrueTasks ? captureFalseTasks.concat(captureTrueTasks) : captureFalseTasks.slice();
}
}
function patchEventPrototype(global, api) {
var Event = global['Event'];
if (Event && Event.prototype) {
api.patchMethod(Event.prototype, 'stopImmediatePropagation', function (delegate) {
return function (self, args) {
self[IMMEDIATE_PROPAGATION_SYMBOL] = true; // we need to call the native stopImmediatePropagation
// in case in some hybrid application, some part of
// application will be controlled by zone, some are not
delegate && delegate.apply(self, args);
};
});
}
}
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
function patchCallbacks(api, target, targetName, method, callbacks) {
var symbol = Zone.__symbol__(method);
if (target[symbol]) {
return;
}
var nativeDelegate = target[symbol] = target[method];
target[method] = function (name, opts, options) {
if (opts && opts.prototype) {
callbacks.forEach(function (callback) {
var source = targetName + "." + method + "::" + callback;
var prototype = opts.prototype;
if (prototype.hasOwnProperty(callback)) {
var descriptor = api.ObjectGetOwnPropertyDescriptor(prototype, callback);
if (descriptor && descriptor.value) {
descriptor.value = api.wrapWithCurrentZone(descriptor.value, source);
api._redefineProperty(opts.prototype, callback, descriptor);
} else if (prototype[callback]) {
prototype[callback] = api.wrapWithCurrentZone(prototype[callback], source);
}
} else if (prototype[callback]) {
prototype[callback] = api.wrapWithCurrentZone(prototype[callback], source);
}
});
}
return nativeDelegate.call(target, name, opts, options);
};
api.attachOriginToPatched(target[method], nativeDelegate);
}
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
var globalEventHandlersEventNames = ['abort', 'animationcancel', 'animationend', 'animationiteration', 'auxclick', 'beforeinput', 'blur', 'cancel', 'canplay', 'canplaythrough', 'change', 'compositionstart', 'compositionupdate', 'compositionend', 'cuechange', 'click', 'close', 'contextmenu', 'curechange', 'dblclick', 'drag', 'dragend', 'dragenter', 'dragexit', 'dragleave', 'dragover', 'drop', 'durationchange', 'emptied', 'ended', 'error', 'focus', 'focusin', 'focusout', 'gotpointercapture', 'input', 'invalid', 'keydown', 'keypress', 'keyup', 'load', 'loadstart', 'loadeddata', 'loadedmetadata', 'lostpointercapture', 'mousedown', 'mouseenter', 'mouseleave', 'mousemove', 'mouseout', 'mouseover', 'mouseup', 'mousewheel', 'orientationchange', 'pause', 'play', 'playing', 'pointercancel', 'pointerdown', 'pointerenter', 'pointerleave', 'pointerlockchange', 'mozpointerlockchange', 'webkitpointerlockerchange', 'pointerlockerror', 'mozpointerlockerror', 'webkitpointerlockerror', 'pointermove', 'pointout', 'pointerover', 'pointerup', 'progress', 'ratechange', 'reset', 'resize', 'scroll', 'seeked', 'seeking', 'select', 'selectionchange', 'selectstart', 'show', 'sort', 'stalled', 'submit', 'suspend', 'timeupdate', 'volumechange', 'touchcancel', 'touchmove', 'touchstart', 'touchend', 'transitioncancel', 'transitionend', 'waiting', 'wheel'];
var documentEventNames = ['afterscriptexecute', 'beforescriptexecute', 'DOMContentLoaded', 'freeze', 'fullscreenchange', 'mozfullscreenchange', 'webkitfullscreenchange', 'msfullscreenchange', 'fullscreenerror', 'mozfullscreenerror', 'webkitfullscreenerror', 'msfullscreenerror', 'readystatechange', 'visibilitychange', 'resume'];
var windowEventNames = ['absolutedeviceorientation', 'afterinput', 'afterprint', 'appinstalled', 'beforeinstallprompt', 'beforeprint', 'beforeunload', 'devicelight', 'devicemotion', 'deviceorientation', 'deviceorientationabsolute', 'deviceproximity', 'hashchange', 'languagechange', 'message', 'mozbeforepaint', 'offline', 'online', 'paint', 'pageshow', 'pagehide', 'popstate', 'rejectionhandled', 'storage', 'unhandledrejection', 'unload', 'userproximity', 'vrdisplayconnected', 'vrdisplaydisconnected', 'vrdisplaypresentchange'];
var htmlElementEventNames = ['beforecopy', 'beforecut', 'beforepaste', 'copy', 'cut', 'paste', 'dragstart', 'loadend', 'animationstart', 'search', 'transitionrun', 'transitionstart', 'webkitanimationend', 'webkitanimationiteration', 'webkitanimationstart', 'webkittransitionend'];
var mediaElementEventNames = ['encrypted', 'waitingforkey', 'msneedkey', 'mozinterruptbegin', 'mozinterruptend'];
var ieElementEventNames = ['activate', 'afterupdate', 'ariarequest', 'beforeactivate', 'beforedeactivate', 'beforeeditfocus', 'beforeupdate', 'cellchange', 'controlselect', 'dataavailable', 'datasetchanged', 'datasetcomplete', 'errorupdate', 'filterchange', 'layoutcomplete', 'losecapture', 'move', 'moveend', 'movestart', 'propertychange', 'resizeend', 'resizestart', 'rowenter', 'rowexit', 'rowsdelete', 'rowsinserted', 'command', 'compassneedscalibration', 'deactivate', 'help', 'mscontentzoom', 'msmanipulationstatechanged', 'msgesturechange', 'msgesturedoubletap', 'msgestureend', 'msgesturehold', 'msgesturestart', 'msgesturetap', 'msgotpointercapture', 'msinertiastart', 'mslostpointercapture', 'mspointercancel', 'mspointerdown', 'mspointerenter', 'mspointerhover', 'mspointerleave', 'mspointermove', 'mspointerout', 'mspointerover', 'mspointerup', 'pointerout', 'mssitemodejumplistitemremoved', 'msthumbnailclick', 'stop', 'storagecommit'];
var webglEventNames = ['webglcontextrestored', 'webglcontextlost', 'webglcontextcreationerror'];
var formEventNames = ['autocomplete', 'autocompleteerror'];
var detailEventNames = ['toggle'];
var frameEventNames = ['load'];
var frameSetEventNames = ['blur', 'error', 'focus', 'load', 'resize', 'scroll', 'messageerror'];
var marqueeEventNames = ['bounce', 'finish', 'start'];
var XMLHttpRequestEventNames = ['loadstart', 'progress', 'abort', 'error', 'load', 'progress', 'timeout', 'loadend', 'readystatechange'];
var IDBIndexEventNames = ['upgradeneeded', 'complete', 'abort', 'success', 'error', 'blocked', 'versionchange', 'close'];
var websocketEventNames = ['close', 'error', 'open', 'message'];
var workerEventNames = ['error', 'message'];
var eventNames = globalEventHandlersEventNames.concat(webglEventNames, formEventNames, detailEventNames, documentEventNames, windowEventNames, htmlElementEventNames, ieElementEventNames);
function filterProperties(target, onProperties, ignoreProperties) {
if (!ignoreProperties || ignoreProperties.length === 0) {
return onProperties;
}
var tip = ignoreProperties.filter(function (ip) {
return ip.target === target;
});
if (!tip || tip.length === 0) {
return onProperties;
}
var targetIgnoreProperties = tip[0].ignoreProperties;
return onProperties.filter(function (op) {
return targetIgnoreProperties.indexOf(op) === -1;
});
}
function patchFilteredProperties(target, onProperties, ignoreProperties, prototype) {
// check whether target is available, sometimes target will be undefined
// because different browser or some 3rd party plugin.
if (!target) {
return;
}
var filteredProperties = filterProperties(target, onProperties, ignoreProperties);
patchOnProperties(target, filteredProperties, prototype);
}
function propertyDescriptorPatch(api, _global) {
if (isNode && !isMix) {
return;
}
if (Zone[api.symbol('patchEvents')]) {
// events are already been patched by legacy patch.
return;
}
var supportsWebSocket = typeof WebSocket !== 'undefined';
var ignoreProperties = _global['__Zone_ignore_on_properties']; // for browsers that we can patch the descriptor: Chrome & Firefox
if (isBrowser) {
var internalWindow_1 = window;
var ignoreErrorProperties = isIE() ? [{
target: internalWindow_1,
ignoreProperties: ['error']
}] : []; // in IE/Edge, onProp not exist in window object, but in WindowPrototype
// so we need to pass WindowPrototype to check onProp exist or not
patchFilteredProperties(internalWindow_1, eventNames.concat(['messageerror']), ignoreProperties ? ignoreProperties.concat(ignoreErrorProperties) : ignoreProperties, ObjectGetPrototypeOf(internalWindow_1));
patchFilteredProperties(Document.prototype, eventNames, ignoreProperties);
if (typeof internalWindow_1['SVGElement'] !== 'undefined') {
patchFilteredProperties(internalWindow_1['SVGElement'].prototype, eventNames, ignoreProperties);
}
patchFilteredProperties(Element.prototype, eventNames, ignoreProperties);
patchFilteredProperties(HTMLElement.prototype, eventNames, ignoreProperties);
patchFilteredProperties(HTMLMediaElement.prototype, mediaElementEventNames, ignoreProperties);
patchFilteredProperties(HTMLFrameSetElement.prototype, windowEventNames.concat(frameSetEventNames), ignoreProperties);
patchFilteredProperties(HTMLBodyElement.prototype, windowEventNames.concat(frameSetEventNames), ignoreProperties);
patchFilteredProperties(HTMLFrameElement.prototype, frameEventNames, ignoreProperties);
patchFilteredProperties(HTMLIFrameElement.prototype, frameEventNames, ignoreProperties);
var HTMLMarqueeElement_1 = internalWindow_1['HTMLMarqueeElement'];
if (HTMLMarqueeElement_1) {
patchFilteredProperties(HTMLMarqueeElement_1.prototype, marqueeEventNames, ignoreProperties);
}
var Worker_1 = internalWindow_1['Worker'];
if (Worker_1) {
patchFilteredProperties(Worker_1.prototype, workerEventNames, ignoreProperties);
}
}
var XMLHttpRequest = _global['XMLHttpRequest'];
if (XMLHttpRequest) {
// XMLHttpRequest is not available in ServiceWorker, so we need to check here
patchFilteredProperties(XMLHttpRequest.prototype, XMLHttpRequestEventNames, ignoreProperties);
}
var XMLHttpRequestEventTarget = _global['XMLHttpRequestEventTarget'];
if (XMLHttpRequestEventTarget) {
patchFilteredProperties(XMLHttpRequestEventTarget && XMLHttpRequestEventTarget.prototype, XMLHttpRequestEventNames, ignoreProperties);
}
if (typeof IDBIndex !== 'undefined') {
patchFilteredProperties(IDBIndex.prototype, IDBIndexEventNames, ignoreProperties);
patchFilteredProperties(IDBRequest.prototype, IDBIndexEventNames, ignoreProperties);
patchFilteredProperties(IDBOpenDBRequest.prototype, IDBIndexEventNames, ignoreProperties);
patchFilteredProperties(IDBDatabase.prototype, IDBIndexEventNames, ignoreProperties);
patchFilteredProperties(IDBTransaction.prototype, IDBIndexEventNames, ignoreProperties);
patchFilteredProperties(IDBCursor.prototype, IDBIndexEventNames, ignoreProperties);
}
if (supportsWebSocket) {
patchFilteredProperties(WebSocket.prototype, websocketEventNames, ignoreProperties);
}
}
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
Zone.__load_patch('util', function (global, Zone, api) {
api.patchOnProperties = patchOnProperties;
api.patchMethod = patchMethod;
api.bindArguments = bindArguments;
api.patchMacroTask = patchMacroTask; // In earlier version of zone.js (<0.9.0), we use env name `__zone_symbol__BLACK_LISTED_EVENTS` to
// define which events will not be patched by `Zone.js`.
// In newer version (>=0.9.0), we change the env name to `__zone_symbol__UNPATCHED_EVENTS` to keep
// the name consistent with angular repo.
// The `__zone_symbol__BLACK_LISTED_EVENTS` is deprecated, but it is still be supported for
// backwards compatibility.
var SYMBOL_BLACK_LISTED_EVENTS = Zone.__symbol__('BLACK_LISTED_EVENTS');
var SYMBOL_UNPATCHED_EVENTS = Zone.__symbol__('UNPATCHED_EVENTS');
if (global[SYMBOL_UNPATCHED_EVENTS]) {
global[SYMBOL_BLACK_LISTED_EVENTS] = global[SYMBOL_UNPATCHED_EVENTS];
}
if (global[SYMBOL_BLACK_LISTED_EVENTS]) {
Zone[SYMBOL_BLACK_LISTED_EVENTS] = Zone[SYMBOL_UNPATCHED_EVENTS] = global[SYMBOL_BLACK_LISTED_EVENTS];
}
api.patchEventPrototype = patchEventPrototype;
api.patchEventTarget = patchEventTarget;
api.isIEOrEdge = isIEOrEdge;
api.ObjectDefineProperty = ObjectDefineProperty;
api.ObjectGetOwnPropertyDescriptor = ObjectGetOwnPropertyDescriptor;
api.ObjectCreate = ObjectCreate;
api.ArraySlice = ArraySlice;
api.patchClass = patchClass;
api.wrapWithCurrentZone = wrapWithCurrentZone;
api.filterProperties = filterProperties;
api.attachOriginToPatched = attachOriginToPatched;
api._redefineProperty = Object.defineProperty;
api.patchCallbacks = patchCallbacks;
api.getGlobalObjects = function () {
return {
globalSources: globalSources,
zoneSymbolEventNames: zoneSymbolEventNames$1,
eventNames: eventNames,
isBrowser: isBrowser,
isMix: isMix,
isNode: isNode,
TRUE_STR: TRUE_STR,
FALSE_STR: FALSE_STR,
ZONE_SYMBOL_PREFIX: ZONE_SYMBOL_PREFIX,
ADD_EVENT_LISTENER_STR: ADD_EVENT_LISTENER_STR,
REMOVE_EVENT_LISTENER_STR: REMOVE_EVENT_LISTENER_STR
};
};
});
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/*
* This is necessary for Chrome and Chrome mobile, to enable
* things like redefining `createdCallback` on an element.
*/
var zoneSymbol$1;
var _defineProperty;
var _getOwnPropertyDescriptor;
var _create;
var unconfigurablesKey;
function propertyPatch() {
zoneSymbol$1 = Zone.__symbol__;
_defineProperty = Object[zoneSymbol$1('defineProperty')] = Object.defineProperty;
_getOwnPropertyDescriptor = Object[zoneSymbol$1('getOwnPropertyDescriptor')] = Object.getOwnPropertyDescriptor;
_create = Object.create;
unconfigurablesKey = zoneSymbol$1('unconfigurables');
Object.defineProperty = function (obj, prop, desc) {
if (isUnconfigurable(obj, prop)) {
throw new TypeError('Cannot assign to read only property \'' + prop + '\' of ' + obj);
}
var originalConfigurableFlag = desc.configurable;
if (prop !== 'prototype') {
desc = rewriteDescriptor(obj, prop, desc);
}
return _tryDefineProperty(obj, prop, desc, originalConfigurableFlag);
};
Object.defineProperties = function (obj, props) {
Object.keys(props).forEach(function (prop) {
Object.defineProperty(obj, prop, props[prop]);
});
return obj;
};
Object.create = function (obj, proto) {
if (typeof proto === 'object' && !Object.isFrozen(proto)) {
Object.keys(proto).forEach(function (prop) {
proto[prop] = rewriteDescriptor(obj, prop, proto[prop]);
});
}
return _create(obj, proto);
};
Object.getOwnPropertyDescriptor = function (obj, prop) {
var desc = _getOwnPropertyDescriptor(obj, prop);
if (desc && isUnconfigurable(obj, prop)) {
desc.configurable = false;
}
return desc;
};
}
function _redefineProperty(obj, prop, desc) {
var originalConfigurableFlag = desc.configurable;
desc = rewriteDescriptor(obj, prop, desc);
return _tryDefineProperty(obj, prop, desc, originalConfigurableFlag);
}
function isUnconfigurable(obj, prop) {
return obj && obj[unconfigurablesKey] && obj[unconfigurablesKey][prop];
}
function rewriteDescriptor(obj, prop, desc) {
// issue-927, if the desc is frozen, don't try to change the desc
if (!Object.isFrozen(desc)) {
desc.configurable = true;
}
if (!desc.configurable) {
// issue-927, if the obj is frozen, don't try to set the desc to obj
if (!obj[unconfigurablesKey] && !Object.isFrozen(obj)) {
_defineProperty(obj, unconfigurablesKey, {
writable: true,
value: {}
});
}
if (obj[unconfigurablesKey]) {
obj[unconfigurablesKey][prop] = true;
}
}
return desc;
}
function _tryDefineProperty(obj, prop, desc, originalConfigurableFlag) {
try {
return _defineProperty(obj, prop, desc);
} catch (error) {
if (desc.configurable) {
// In case of errors, when the configurable flag was likely set by rewriteDescriptor(), let's
// retry with the original flag value
if (typeof originalConfigurableFlag == 'undefined') {
delete desc.configurable;
} else {
desc.configurable = originalConfigurableFlag;
}
try {
return _defineProperty(obj, prop, desc);
} catch (error) {
var swallowError = false;
if (prop === 'createdCallback' || prop === 'attachedCallback' || prop === 'detachedCallback' || prop === 'attributeChangedCallback') {
// We only swallow the error in registerElement patch
// this is the work around since some applications
// fail if we throw the error
swallowError = true;
}
if (!swallowError) {
throw error;
} // TODO: @JiaLiPassion, Some application such as `registerElement` patch
// still need to swallow the error, in the future after these applications
// are updated, the following logic can be removed.
var descJson = null;
try {
descJson = JSON.stringify(desc);
} catch (error) {
descJson = desc.toString();
}
console.log("Attempting to configure '" + prop + "' with descriptor '" + descJson + "' on object '" + obj + "' and got error, giving up: " + error);
}
} else {
throw error;
}
}
}
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
function eventTargetLegacyPatch(_global, api) {
var _a = api.getGlobalObjects(),
eventNames = _a.eventNames,
globalSources = _a.globalSources,
zoneSymbolEventNames = _a.zoneSymbolEventNames,
TRUE_STR = _a.TRUE_STR,
FALSE_STR = _a.FALSE_STR,
ZONE_SYMBOL_PREFIX = _a.ZONE_SYMBOL_PREFIX;
var WTF_ISSUE_555 = 'Anchor,Area,Audio,BR,Base,BaseFont,Body,Button,Canvas,Content,DList,Directory,Div,Embed,FieldSet,Font,Form,Frame,FrameSet,HR,Head,Heading,Html,IFrame,Image,Input,Keygen,LI,Label,Legend,Link,Map,Marquee,Media,Menu,Meta,Meter,Mod,OList,Object,OptGroup,Option,Output,Paragraph,Pre,Progress,Quote,Script,Select,Source,Span,Style,TableCaption,TableCell,TableCol,Table,TableRow,TableSection,TextArea,Title,Track,UList,Unknown,Video';
var NO_EVENT_TARGET = 'ApplicationCache,EventSource,FileReader,InputMethodContext,MediaController,MessagePort,Node,Performance,SVGElementInstance,SharedWorker,TextTrack,TextTrackCue,TextTrackList,WebKitNamedFlow,Window,Worker,WorkerGlobalScope,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload,IDBRequest,IDBOpenDBRequest,IDBDatabase,IDBTransaction,IDBCursor,DBIndex,WebSocket'.split(',');
var EVENT_TARGET = 'EventTarget';
var apis = [];
var isWtf = _global['wtf'];
var WTF_ISSUE_555_ARRAY = WTF_ISSUE_555.split(',');
if (isWtf) {
// Workaround for: https://github.com/google/tracing-framework/issues/555
apis = WTF_ISSUE_555_ARRAY.map(function (v) {
return 'HTML' + v + 'Element';
}).concat(NO_EVENT_TARGET);
} else if (_global[EVENT_TARGET]) {
apis.push(EVENT_TARGET);
} else {
// Note: EventTarget is not available in all browsers,
// if it's not available, we instead patch the APIs in the IDL that inherit from EventTarget
apis = NO_EVENT_TARGET;
}
var isDisableIECheck = _global['__Zone_disable_IE_check'] || false;
var isEnableCrossContextCheck = _global['__Zone_enable_cross_context_check'] || false;
var ieOrEdge = api.isIEOrEdge();
var ADD_EVENT_LISTENER_SOURCE = '.addEventListener:';
var FUNCTION_WRAPPER = '[object FunctionWrapper]';
var BROWSER_TOOLS = 'function __BROWSERTOOLS_CONSOLE_SAFEFUNC() { [native code] }';
var pointerEventsMap = {
'MSPointerCancel': 'pointercancel',
'MSPointerDown': 'pointerdown',
'MSPointerEnter': 'pointerenter',
'MSPointerHover': 'pointerhover',
'MSPointerLeave': 'pointerleave',
'MSPointerMove': 'pointermove',
'MSPointerOut': 'pointerout',
'MSPointerOver': 'pointerover',
'MSPointerUp': 'pointerup'
}; // predefine all __zone_symbol__ + eventName + true/false string
for (var i = 0; i < eventNames.length; i++) {
var eventName = eventNames[i];
var falseEventName = eventName + FALSE_STR;
var trueEventName = eventName + TRUE_STR;
var symbol = ZONE_SYMBOL_PREFIX + falseEventName;
var symbolCapture = ZONE_SYMBOL_PREFIX + trueEventName;
zoneSymbolEventNames[eventName] = {};
zoneSymbolEventNames[eventName][FALSE_STR] = symbol;
zoneSymbolEventNames[eventName][TRUE_STR] = symbolCapture;
} // predefine all task.source string
for (var i = 0; i < WTF_ISSUE_555_ARRAY.length; i++) {
var target = WTF_ISSUE_555_ARRAY[i];
var targets = globalSources[target] = {};
for (var j = 0; j < eventNames.length; j++) {
var eventName = eventNames[j];
targets[eventName] = target + ADD_EVENT_LISTENER_SOURCE + eventName;
}
}
var checkIEAndCrossContext = function checkIEAndCrossContext(nativeDelegate, delegate, target, args) {
if (!isDisableIECheck && ieOrEdge) {
if (isEnableCrossContextCheck) {
try {
var testString = delegate.toString();
if (testString === FUNCTION_WRAPPER || testString == BROWSER_TOOLS) {
nativeDelegate.apply(target, args);
return false;
}
} catch (error) {
nativeDelegate.apply(target, args);
return false;
}
} else {
var testString = delegate.toString();
if (testString === FUNCTION_WRAPPER || testString == BROWSER_TOOLS) {
nativeDelegate.apply(target, args);
return false;
}
}
} else if (isEnableCrossContextCheck) {
try {
delegate.toString();
} catch (error) {
nativeDelegate.apply(target, args);
return false;
}
}
return true;
};
var apiTypes = [];
for (var i = 0; i < apis.length; i++) {
var type = _global[apis[i]];
apiTypes.push(type && type.prototype);
} // vh is validateHandler to check event handler
// is valid or not(for security check)
api.patchEventTarget(_global, apiTypes, {
vh: checkIEAndCrossContext,
transferEventName: function transferEventName(eventName) {
var pointerEventName = pointerEventsMap[eventName];
return pointerEventName || eventName;
}
});
Zone[api.symbol('patchEventTarget')] = !!_global[EVENT_TARGET];
return true;
}
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
// we have to patch the instance since the proto is non-configurable
function apply(api, _global) {
var _a = api.getGlobalObjects(),
ADD_EVENT_LISTENER_STR = _a.ADD_EVENT_LISTENER_STR,
REMOVE_EVENT_LISTENER_STR = _a.REMOVE_EVENT_LISTENER_STR;
var WS = _global.WebSocket; // On Safari window.EventTarget doesn't exist so need to patch WS add/removeEventListener
// On older Chrome, no need since EventTarget was already patched
if (!_global.EventTarget) {
api.patchEventTarget(_global, [WS.prototype]);
}
_global.WebSocket = function (x, y) {
var socket = arguments.length > 1 ? new WS(x, y) : new WS(x);
var proxySocket;
var proxySocketProto; // Safari 7.0 has non-configurable own 'onmessage' and friends properties on the socket instance
var onmessageDesc = api.ObjectGetOwnPropertyDescriptor(socket, 'onmessage');
if (onmessageDesc && onmessageDesc.configurable === false) {
proxySocket = api.ObjectCreate(socket); // socket have own property descriptor 'onopen', 'onmessage', 'onclose', 'onerror'
// but proxySocket not, so we will keep socket as prototype and pass it to
// patchOnProperties method
proxySocketProto = socket;
[ADD_EVENT_LISTENER_STR, REMOVE_EVENT_LISTENER_STR, 'send', 'close'].forEach(function (propName) {
proxySocket[propName] = function () {
var args = api.ArraySlice.call(arguments);
if (propName === ADD_EVENT_LISTENER_STR || propName === REMOVE_EVENT_LISTENER_STR) {
var eventName = args.length > 0 ? args[0] : undefined;
if (eventName) {
var propertySymbol = Zone.__symbol__('ON_PROPERTY' + eventName);
socket[propertySymbol] = proxySocket[propertySymbol];
}
}
return socket[propName].apply(socket, args);
};
});
} else {
// we can patch the real socket
proxySocket = socket;
}
api.patchOnProperties(proxySocket, ['close', 'error', 'message', 'open'], proxySocketProto);
return proxySocket;
};
var globalWebSocket = _global['WebSocket'];
for (var prop in WS) {
globalWebSocket[prop] = WS[prop];
}
}
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
function propertyDescriptorLegacyPatch(api, _global) {
var _a = api.getGlobalObjects(),
isNode = _a.isNode,
isMix = _a.isMix;
if (isNode && !isMix) {
return;
}
if (!canPatchViaPropertyDescriptor(api, _global)) {
var supportsWebSocket = typeof WebSocket !== 'undefined'; // Safari, Android browsers (Jelly Bean)
patchViaCapturingAllTheEvents(api);
api.patchClass('XMLHttpRequest');
if (supportsWebSocket) {
apply(api, _global);
}
Zone[api.symbol('patchEvents')] = true;
}
}
function canPatchViaPropertyDescriptor(api, _global) {
var _a = api.getGlobalObjects(),
isBrowser = _a.isBrowser,
isMix = _a.isMix;
if ((isBrowser || isMix) && !api.ObjectGetOwnPropertyDescriptor(HTMLElement.prototype, 'onclick') && typeof Element !== 'undefined') {
// WebKit https://bugs.webkit.org/show_bug.cgi?id=134364
// IDL interface attributes are not configurable
var desc = api.ObjectGetOwnPropertyDescriptor(Element.prototype, 'onclick');
if (desc && !desc.configurable) return false; // try to use onclick to detect whether we can patch via propertyDescriptor
// because XMLHttpRequest is not available in service worker
if (desc) {
api.ObjectDefineProperty(Element.prototype, 'onclick', {
enumerable: true,
configurable: true,
get: function get() {
return true;
}
});
var div = document.createElement('div');
var result = !!div.onclick;
api.ObjectDefineProperty(Element.prototype, 'onclick', desc);
return result;
}
}
var XMLHttpRequest = _global['XMLHttpRequest'];
if (!XMLHttpRequest) {
// XMLHttpRequest is not available in service worker
return false;
}
var ON_READY_STATE_CHANGE = 'onreadystatechange';
var XMLHttpRequestPrototype = XMLHttpRequest.prototype;
var xhrDesc = api.ObjectGetOwnPropertyDescriptor(XMLHttpRequestPrototype, ON_READY_STATE_CHANGE); // add enumerable and configurable here because in opera
// by default XMLHttpRequest.prototype.onreadystatechange is undefined
// without adding enumerable and configurable will cause onreadystatechange
// non-configurable
// and if XMLHttpRequest.prototype.onreadystatechange is undefined,
// we should set a real desc instead a fake one
if (xhrDesc) {
api.ObjectDefineProperty(XMLHttpRequestPrototype, ON_READY_STATE_CHANGE, {
enumerable: true,
configurable: true,
get: function get() {
return true;
}
});
var req = new XMLHttpRequest();
var result = !!req.onreadystatechange; // restore original desc
api.ObjectDefineProperty(XMLHttpRequestPrototype, ON_READY_STATE_CHANGE, xhrDesc || {});
return result;
} else {
var SYMBOL_FAKE_ONREADYSTATECHANGE_1 = api.symbol('fake');
api.ObjectDefineProperty(XMLHttpRequestPrototype, ON_READY_STATE_CHANGE, {
enumerable: true,
configurable: true,
get: function get() {
return this[SYMBOL_FAKE_ONREADYSTATECHANGE_1];
},
set: function set(value) {
this[SYMBOL_FAKE_ONREADYSTATECHANGE_1] = value;
}
});
var req = new XMLHttpRequest();
var detectFunc = function detectFunc() {};
req.onreadystatechange = detectFunc;
var result = req[SYMBOL_FAKE_ONREADYSTATECHANGE_1] === detectFunc;
req.onreadystatechange = null;
return result;
}
} // Whenever any eventListener fires, we check the eventListener target and all parents
// for `onwhatever` properties and replace them with zone-bound functions
// - Chrome (for now)
function patchViaCapturingAllTheEvents(api) {
var eventNames = api.getGlobalObjects().eventNames;
var unboundKey = api.symbol('unbound');
var _loop_4 = function _loop_4(i) {
var property = eventNames[i];
var onproperty = 'on' + property;
self.addEventListener(property, function (event) {
var elt = event.target,
bound,
source;
if (elt) {
source = elt.constructor['name'] + '.' + onproperty;
} else {
source = 'unknown.' + onproperty;
}
while (elt) {
if (elt[onproperty] && !elt[onproperty][unboundKey]) {
bound = api.wrapWithCurrentZone(elt[onproperty], source);
bound[unboundKey] = elt[onproperty];
elt[onproperty] = bound;
}
elt = elt.parentElement;
}
}, true);
};
for (var i = 0; i < eventNames.length; i++) {
_loop_4(i);
}
}
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
function registerElementPatch(_global, api) {
var _a = api.getGlobalObjects(),
isBrowser = _a.isBrowser,
isMix = _a.isMix;
if (!isBrowser && !isMix || !('registerElement' in _global.document)) {
return;
}
var callbacks = ['createdCallback', 'attachedCallback', 'detachedCallback', 'attributeChangedCallback'];
api.patchCallbacks(api, document, 'Document', 'registerElement', callbacks);
}
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
(function (_global) {
var symbolPrefix = _global['__Zone_symbol_prefix'] || '__zone_symbol__';
function __symbol__(name) {
return symbolPrefix + name;
}
_global[__symbol__('legacyPatch')] = function () {
var Zone = _global['Zone'];
Zone.__load_patch('defineProperty', function (global, Zone, api) {
api._redefineProperty = _redefineProperty;
propertyPatch();
});
Zone.__load_patch('registerElement', function (global, Zone, api) {
registerElementPatch(global, api);
});
Zone.__load_patch('EventTargetLegacy', function (global, Zone, api) {
eventTargetLegacyPatch(global, api);
propertyDescriptorLegacyPatch(api, global);
});
};
})(typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {});
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
var taskSymbol = zoneSymbol('zoneTask');
function patchTimer(window, setName, cancelName, nameSuffix) {
var setNative = null;
var clearNative = null;
setName += nameSuffix;
cancelName += nameSuffix;
var tasksByHandleId = {};
function scheduleTask(task) {
var data = task.data;
function timer() {
try {
task.invoke.apply(this, arguments);
} finally {
// issue-934, task will be cancelled
// even it is a periodic task such as
// setInterval
if (!(task.data && task.data.isPeriodic)) {
if (typeof data.handleId === 'number') {
// in non-nodejs env, we remove timerId
// from local cache
delete tasksByHandleId[data.handleId];
} else if (data.handleId) {
// Node returns complex objects as handleIds
// we remove task reference from timer object
data.handleId[taskSymbol] = null;
}
}
}
}
data.args[0] = timer;
data.handleId = setNative.apply(window, data.args);
return task;
}
function clearTask(task) {
return clearNative.call(window, task.data.handleId);
}
setNative = patchMethod(window, setName, function (delegate) {
return function (self, args) {
if (typeof args[0] === 'function') {
var options = {
isPeriodic: nameSuffix === 'Interval',
delay: nameSuffix === 'Timeout' || nameSuffix === 'Interval' ? args[1] || 0 : undefined,
args: args
};
var task = scheduleMacroTaskWithCurrentZone(setName, args[0], options, scheduleTask, clearTask);
if (!task) {
return task;
} // Node.js must additionally support the ref and unref functions.
var handle = task.data.handleId;
if (typeof handle === 'number') {
// for non nodejs env, we save handleId: task
// mapping in local cache for clearTimeout
tasksByHandleId[handle] = task;
} else if (handle) {
// for nodejs env, we save task
// reference in timerId Object for clearTimeout
handle[taskSymbol] = task;
} // check whether handle is null, because some polyfill or browser
// may return undefined from setTimeout/setInterval/setImmediate/requestAnimationFrame
if (handle && handle.ref && handle.unref && typeof handle.ref === 'function' && typeof handle.unref === 'function') {
task.ref = handle.ref.bind(handle);
task.unref = handle.unref.bind(handle);
}
if (typeof handle === 'number' || handle) {
return handle;
}
return task;
} else {
// cause an error by calling it directly.
return delegate.apply(window, args);
}
};
});
clearNative = patchMethod(window, cancelName, function (delegate) {
return function (self, args) {
var id = args[0];
var task;
if (typeof id === 'number') {
// non nodejs env.
task = tasksByHandleId[id];
} else {
// nodejs env.
task = id && id[taskSymbol]; // other environments.
if (!task) {
task = id;
}
}
if (task && typeof task.type === 'string') {
if (task.state !== 'notScheduled' && (task.cancelFn && task.data.isPeriodic || task.runCount === 0)) {
if (typeof id === 'number') {
delete tasksByHandleId[id];
} else if (id) {
id[taskSymbol] = null;
} // Do not cancel already canceled functions
task.zone.cancelTask(task);
}
} else {
// cause an error by calling it directly.
delegate.apply(window, args);
}
};
});
}
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
function patchCustomElements(_global, api) {
var _a = api.getGlobalObjects(),
isBrowser = _a.isBrowser,
isMix = _a.isMix;
if (!isBrowser && !isMix || !_global['customElements'] || !('customElements' in _global)) {
return;
}
var callbacks = ['connectedCallback', 'disconnectedCallback', 'adoptedCallback', 'attributeChangedCallback'];
api.patchCallbacks(api, _global.customElements, 'customElements', 'define', callbacks);
}
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
function eventTargetPatch(_global, api) {
if (Zone[api.symbol('patchEventTarget')]) {
// EventTarget is already patched.
return;
}
var _a = api.getGlobalObjects(),
eventNames = _a.eventNames,
zoneSymbolEventNames = _a.zoneSymbolEventNames,
TRUE_STR = _a.TRUE_STR,
FALSE_STR = _a.FALSE_STR,
ZONE_SYMBOL_PREFIX = _a.ZONE_SYMBOL_PREFIX; // predefine all __zone_symbol__ + eventName + true/false string
for (var i = 0; i < eventNames.length; i++) {
var eventName = eventNames[i];
var falseEventName = eventName + FALSE_STR;
var trueEventName = eventName + TRUE_STR;
var symbol = ZONE_SYMBOL_PREFIX + falseEventName;
var symbolCapture = ZONE_SYMBOL_PREFIX + trueEventName;
zoneSymbolEventNames[eventName] = {};
zoneSymbolEventNames[eventName][FALSE_STR] = symbol;
zoneSymbolEventNames[eventName][TRUE_STR] = symbolCapture;
}
var EVENT_TARGET = _global['EventTarget'];
if (!EVENT_TARGET || !EVENT_TARGET.prototype) {
return;
}
api.patchEventTarget(_global, [EVENT_TARGET && EVENT_TARGET.prototype]);
return true;
}
function patchEvent(global, api) {
api.patchEventPrototype(global, api);
}
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
Zone.__load_patch('legacy', function (global) {
var legacyPatch = global[Zone.__symbol__('legacyPatch')];
if (legacyPatch) {
legacyPatch();
}
});
Zone.__load_patch('timers', function (global) {
var set = 'set';
var clear = 'clear';
patchTimer(global, set, clear, 'Timeout');
patchTimer(global, set, clear, 'Interval');
patchTimer(global, set, clear, 'Immediate');
});
Zone.__load_patch('requestAnimationFrame', function (global) {
patchTimer(global, 'request', 'cancel', 'AnimationFrame');
patchTimer(global, 'mozRequest', 'mozCancel', 'AnimationFrame');
patchTimer(global, 'webkitRequest', 'webkitCancel', 'AnimationFrame');
});
Zone.__load_patch('blocking', function (global, Zone) {
var blockingMethods = ['alert', 'prompt', 'confirm'];
for (var i = 0; i < blockingMethods.length; i++) {
var name_2 = blockingMethods[i];
patchMethod(global, name_2, function (delegate, symbol, name) {
return function (s, args) {
return Zone.current.run(delegate, global, args, name);
};
});
}
});
Zone.__load_patch('EventTarget', function (global, Zone, api) {
patchEvent(global, api);
eventTargetPatch(global, api); // patch XMLHttpRequestEventTarget's addEventListener/removeEventListener
var XMLHttpRequestEventTarget = global['XMLHttpRequestEventTarget'];
if (XMLHttpRequestEventTarget && XMLHttpRequestEventTarget.prototype) {
api.patchEventTarget(global, [XMLHttpRequestEventTarget.prototype]);
}
});
Zone.__load_patch('MutationObserver', function (global, Zone, api) {
patchClass('MutationObserver');
patchClass('WebKitMutationObserver');
});
Zone.__load_patch('IntersectionObserver', function (global, Zone, api) {
patchClass('IntersectionObserver');
});
Zone.__load_patch('FileReader', function (global, Zone, api) {
patchClass('FileReader');
});
Zone.__load_patch('on_property', function (global, Zone, api) {
propertyDescriptorPatch(api, global);
});
Zone.__load_patch('customElements', function (global, Zone, api) {
patchCustomElements(global, api);
});
Zone.__load_patch('XHR', function (global, Zone) {
// Treat XMLHttpRequest as a macrotask.
patchXHR(global);
var XHR_TASK = zoneSymbol('xhrTask');
var XHR_SYNC = zoneSymbol('xhrSync');
var XHR_LISTENER = zoneSymbol('xhrListener');
var XHR_SCHEDULED = zoneSymbol('xhrScheduled');
var XHR_URL = zoneSymbol('xhrURL');
var XHR_ERROR_BEFORE_SCHEDULED = zoneSymbol('xhrErrorBeforeScheduled');
function patchXHR(window) {
var XMLHttpRequest = window['XMLHttpRequest'];
if (!XMLHttpRequest) {
// XMLHttpRequest is not available in service worker
return;
}
var XMLHttpRequestPrototype = XMLHttpRequest.prototype;
function findPendingTask(target) {
return target[XHR_TASK];
}
var oriAddListener = XMLHttpRequestPrototype[ZONE_SYMBOL_ADD_EVENT_LISTENER];
var oriRemoveListener = XMLHttpRequestPrototype[ZONE_SYMBOL_REMOVE_EVENT_LISTENER];
if (!oriAddListener) {
var XMLHttpRequestEventTarget_1 = window['XMLHttpRequestEventTarget'];
if (XMLHttpRequestEventTarget_1) {
var XMLHttpRequestEventTargetPrototype = XMLHttpRequestEventTarget_1.prototype;
oriAddListener = XMLHttpRequestEventTargetPrototype[ZONE_SYMBOL_ADD_EVENT_LISTENER];
oriRemoveListener = XMLHttpRequestEventTargetPrototype[ZONE_SYMBOL_REMOVE_EVENT_LISTENER];
}
}
var READY_STATE_CHANGE = 'readystatechange';
var SCHEDULED = 'scheduled';
function scheduleTask(task) {
var data = task.data;
var target = data.target;
target[XHR_SCHEDULED] = false;
target[XHR_ERROR_BEFORE_SCHEDULED] = false; // remove existing event listener
var listener = target[XHR_LISTENER];
if (!oriAddListener) {
oriAddListener = target[ZONE_SYMBOL_ADD_EVENT_LISTENER];
oriRemoveListener = target[ZONE_SYMBOL_REMOVE_EVENT_LISTENER];
}
if (listener) {
oriRemoveListener.call(target, READY_STATE_CHANGE, listener);
}
var newListener = target[XHR_LISTENER] = function () {
if (target.readyState === target.DONE) {
// sometimes on some browsers XMLHttpRequest will fire onreadystatechange with
// readyState=4 multiple times, so we need to check task state here
if (!data.aborted && target[XHR_SCHEDULED] && task.state === SCHEDULED) {
// check whether the xhr has registered onload listener
// if that is the case, the task should invoke after all
// onload listeners finish.
// Also if the request failed without response (status = 0), the load event handler
// will not be triggered, in that case, we should also invoke the placeholder callback
// to close the XMLHttpRequest::send macroTask.
// https://github.com/angular/angular/issues/38795
var loadTasks = target[Zone.__symbol__('loadfalse')];
if (target.status !== 0 && loadTasks && loadTasks.length > 0) {
var oriInvoke_1 = task.invoke;
task.invoke = function () {
// need to load the tasks again, because in other
// load listener, they may remove themselves
var loadTasks = target[Zone.__symbol__('loadfalse')];
for (var i = 0; i < loadTasks.length; i++) {
if (loadTasks[i] === task) {
loadTasks.splice(i, 1);
}
}
if (!data.aborted && task.state === SCHEDULED) {
oriInvoke_1.call(task);
}
};
loadTasks.push(task);
} else {
task.invoke();
}
} else if (!data.aborted && target[XHR_SCHEDULED] === false) {
// error occurs when xhr.send()
target[XHR_ERROR_BEFORE_SCHEDULED] = true;
}
}
};
oriAddListener.call(target, READY_STATE_CHANGE, newListener);
var storedTask = target[XHR_TASK];
if (!storedTask) {
target[XHR_TASK] = task;
}
sendNative.apply(target, data.args);
target[XHR_SCHEDULED] = true;
return task;
}
function placeholderCallback() {}
function clearTask(task) {
var data = task.data; // Note - ideally, we would call data.target.removeEventListener here, but it's too late
// to prevent it from firing. So instead, we store info for the event listener.
data.aborted = true;
return abortNative.apply(data.target, data.args);
}
var openNative = patchMethod(XMLHttpRequestPrototype, 'open', function () {
return function (self, args) {
self[XHR_SYNC] = args[2] == false;
self[XHR_URL] = args[1];
return openNative.apply(self, args);
};
});
var XMLHTTPREQUEST_SOURCE = 'XMLHttpRequest.send';
var fetchTaskAborting = zoneSymbol('fetchTaskAborting');
var fetchTaskScheduling = zoneSymbol('fetchTaskScheduling');
var sendNative = patchMethod(XMLHttpRequestPrototype, 'send', function () {
return function (self, args) {
if (Zone.current[fetchTaskScheduling] === true) {
// a fetch is scheduling, so we are using xhr to polyfill fetch
// and because we already schedule macroTask for fetch, we should
// not schedule a macroTask for xhr again
return sendNative.apply(self, args);
}
if (self[XHR_SYNC]) {
// if the XHR is sync there is no task to schedule, just execute the code.
return sendNative.apply(self, args);
} else {
var options = {
target: self,
url: self[XHR_URL],
isPeriodic: false,
args: args,
aborted: false
};
var task = scheduleMacroTaskWithCurrentZone(XMLHTTPREQUEST_SOURCE, placeholderCallback, options, scheduleTask, clearTask);
if (self && self[XHR_ERROR_BEFORE_SCHEDULED] === true && !options.aborted && task.state === SCHEDULED) {
// xhr request throw error when send
// we should invoke task instead of leaving a scheduled
// pending macroTask
task.invoke();
}
}
};
});
var abortNative = patchMethod(XMLHttpRequestPrototype, 'abort', function () {
return function (self, args) {
var task = findPendingTask(self);
if (task && typeof task.type == 'string') {
// If the XHR has already completed, do nothing.
// If the XHR has already been aborted, do nothing.
// Fix #569, call abort multiple times before done will cause
// macroTask task count be negative number
if (task.cancelFn == null || task.data && task.data.aborted) {
return;
}
task.zone.cancelTask(task);
} else if (Zone.current[fetchTaskAborting] === true) {
// the abort is called from fetch polyfill, we need to call native abort of XHR.
return abortNative.apply(self, args);
} // Otherwise, we are trying to abort an XHR which has not yet been sent, so there is no
// task
// to cancel. Do nothing.
};
});
}
});
Zone.__load_patch('geolocation', function (global) {
/// GEO_LOCATION
if (global['navigator'] && global['navigator'].geolocation) {
patchPrototype(global['navigator'].geolocation, ['getCurrentPosition', 'watchPosition']);
}
});
Zone.__load_patch('PromiseRejectionEvent', function (global, Zone) {
// handle unhandled promise rejection
function findPromiseRejectionHandler(evtName) {
return function (e) {
var eventTasks = findEventTasks(global, evtName);
eventTasks.forEach(function (eventTask) {
// windows has added unhandledrejection event listener
// trigger the event listener
var PromiseRejectionEvent = global['PromiseRejectionEvent'];
if (PromiseRejectionEvent) {
var evt = new PromiseRejectionEvent(evtName, {
promise: e.promise,
reason: e.rejection
});
eventTask.invoke(evt);
}
});
};
}
if (global['PromiseRejectionEvent']) {
Zone[zoneSymbol('unhandledPromiseRejectionHandler')] = findPromiseRejectionHandler('unhandledrejection');
Zone[zoneSymbol('rejectionHandledHandler')] = findPromiseRejectionHandler('rejectionhandled');
}
});
});
/***/ }),
/***/ "0eef":
/*!*************************************************************************!*\
!*** ./node_modules/core-js/internals/object-property-is-enumerable.js ***!
\*************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var nativePropertyIsEnumerable = {}.propertyIsEnumerable;
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
// Nashorn ~ JDK8 bug
var NASHORN_BUG = getOwnPropertyDescriptor && !nativePropertyIsEnumerable.call({ 1: 2 }, 1);
// `Object.prototype.propertyIsEnumerable` method implementation
// https://tc39.github.io/ecma262/#sec-object.prototype.propertyisenumerable
exports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
var descriptor = getOwnPropertyDescriptor(this, V);
return !!descriptor && descriptor.enumerable;
} : nativePropertyIsEnumerable;
/***/ }),
/***/ "0luR":
/*!**********************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.symbol.description.js ***!
\**********************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// `Symbol.prototype.description` getter
// https://tc39.github.io/ecma262/#sec-symbol.prototype.description
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "T69T");
var global = __webpack_require__(/*! ../internals/global */ "ocAm");
var has = __webpack_require__(/*! ../internals/has */ "OG5q");
var isObject = __webpack_require__(/*! ../internals/is-object */ "6XUM");
var defineProperty = __webpack_require__(/*! ../internals/object-define-property */ "/Ybd").f;
var copyConstructorProperties = __webpack_require__(/*! ../internals/copy-constructor-properties */ "NIlc");
var NativeSymbol = global.Symbol;
if (DESCRIPTORS && typeof NativeSymbol == 'function' && (!('description' in NativeSymbol.prototype) ||
// Safari 12 bug
NativeSymbol().description !== undefined
)) {
var EmptyStringDescriptionStore = {};
// wrap Symbol constructor for correct work with undefined description
var SymbolWrapper = function Symbol() {
var description = arguments.length < 1 || arguments[0] === undefined ? undefined : String(arguments[0]);
var result = this instanceof SymbolWrapper
? new NativeSymbol(description)
// in Edge 13, String(Symbol(undefined)) === 'Symbol(undefined)'
: description === undefined ? NativeSymbol() : NativeSymbol(description);
if (description === '') EmptyStringDescriptionStore[result] = true;
return result;
};
copyConstructorProperties(SymbolWrapper, NativeSymbol);
var symbolPrototype = SymbolWrapper.prototype = NativeSymbol.prototype;
symbolPrototype.constructor = SymbolWrapper;
var symbolToString = symbolPrototype.toString;
var native = String(NativeSymbol('test')) == 'Symbol(test)';
var regexp = /^Symbol\((.*)\)[^)]+$/;
defineProperty(symbolPrototype, 'description', {
configurable: true,
get: function description() {
var symbol = isObject(this) ? this.valueOf() : this;
var string = symbolToString.call(symbol);
if (has(EmptyStringDescriptionStore, symbol)) return '';
var desc = native ? string.slice(7, -1) : string.replace(regexp, '$1');
return desc === '' ? undefined : desc;
}
});
$({ global: true, forced: true }, {
Symbol: SymbolWrapper
});
}
/***/ }),
/***/ "0rvr":
/*!*******************************************************************!*\
!*** ./node_modules/core-js/internals/object-set-prototype-of.js ***!
\*******************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk");
var aPossiblePrototype = __webpack_require__(/*! ../internals/a-possible-prototype */ "O741");
// `Object.setPrototypeOf` method
// https://tc39.github.io/ecma262/#sec-object.setprototypeof
// Works with __proto__ only. Old v8 can't work with null proto objects.
/* eslint-disable no-proto */
module.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () {
var CORRECT_SETTER = false;
var test = {};
var setter;
try {
setter = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set;
setter.call(test, []);
CORRECT_SETTER = test instanceof Array;
} catch (error) { /* empty */ }
return function setPrototypeOf(O, proto) {
anObject(O);
aPossiblePrototype(proto);
if (CORRECT_SETTER) setter.call(O, proto);
else O.__proto__ = proto;
return O;
};
}() : undefined);
/***/ }),
/***/ 1:
/*!****************************************************************************************************************************************************************************************!*\
!*** multi ./node_modules/@angular-devkit/build-angular/src/webpack/es5-polyfills.js ./node_modules/@angular-devkit/build-angular/src/webpack/es5-jit-polyfills.js ./src/polyfills.ts ***!
\****************************************************************************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__(/*! D:\zizoe\Documents\ionic\github\restaurant_dashboard-main\node_modules\@angular-devkit\build-angular\src\webpack\es5-polyfills.js */"voQr");
__webpack_require__(/*! D:\zizoe\Documents\ionic\github\restaurant_dashboard-main\node_modules\@angular-devkit\build-angular\src\webpack\es5-jit-polyfills.js */"aYjs");
module.exports = __webpack_require__(/*! D:\zizoe\Documents\ionic\github\restaurant_dashboard-main\src\polyfills.ts */"hN/g");
/***/ }),
/***/ "149L":
/*!*******************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/html.js ***!
\*******************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "Ew/G");
module.exports = getBuiltIn('document', 'documentElement');
/***/ }),
/***/ "1E5z":
/*!*************************************************************!*\
!*** ./node_modules/core-js/internals/set-to-string-tag.js ***!
\*************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var defineProperty = __webpack_require__(/*! ../internals/object-define-property */ "m/L8").f;
var has = __webpack_require__(/*! ../internals/has */ "UTVS");
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "tiKp");
var TO_STRING_TAG = wellKnownSymbol('toStringTag');
module.exports = function (it, TAG, STATIC) {
if (it && !has(it = STATIC ? it : it.prototype, TO_STRING_TAG)) {
defineProperty(it, TO_STRING_TAG, { configurable: true, value: TAG });
}
};
/***/ }),
/***/ "1p6F":
/*!************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/is-regexp.js ***!
\************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var isObject = __webpack_require__(/*! ../internals/is-object */ "6XUM");
var classof = __webpack_require__(/*! ../internals/classof-raw */ "ezU2");
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "m41k");
var MATCH = wellKnownSymbol('match');
// `IsRegExp` abstract operation
// https://tc39.github.io/ecma262/#sec-isregexp
module.exports = function (it) {
var isRegExp;
return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : classof(it) == 'RegExp');
};
/***/ }),
/***/ "1t3B":
/*!***********************************************************************!*\
!*** ./node_modules/core-js/modules/es.reflect.prevent-extensions.js ***!
\***********************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "0GbY");
var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk");
var FREEZING = __webpack_require__(/*! ../internals/freezing */ "uy83");
// `Reflect.preventExtensions` method
// https://tc39.github.io/ecma262/#sec-reflect.preventextensions
$({ target: 'Reflect', stat: true, sham: !FREEZING }, {
preventExtensions: function preventExtensions(target) {
anObject(target);
try {
var objectPreventExtensions = getBuiltIn('Object', 'preventExtensions');
if (objectPreventExtensions) objectPreventExtensions(target);
return true;
} catch (error) {
return false;
}
}
});
/***/ }),
/***/ "25bX":
/*!******************************************************************!*\
!*** ./node_modules/core-js/modules/es.reflect.is-extensible.js ***!
\******************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk");
var objectIsExtensible = Object.isExtensible;
// `Reflect.isExtensible` method
// https://tc39.github.io/ecma262/#sec-reflect.isextensible
$({ target: 'Reflect', stat: true }, {
isExtensible: function isExtensible(target) {
anObject(target);
return objectIsExtensible ? objectIsExtensible(target) : true;
}
});
/***/ }),
/***/ "2MGJ":
/*!***********************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/redefine.js ***!
\***********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__(/*! ../internals/global */ "ocAm");
var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ "aJMj");
var has = __webpack_require__(/*! ../internals/has */ "OG5q");
var setGlobal = __webpack_require__(/*! ../internals/set-global */ "Fqhe");
var inspectSource = __webpack_require__(/*! ../internals/inspect-source */ "6urC");
var InternalStateModule = __webpack_require__(/*! ../internals/internal-state */ "XH/I");
var getInternalState = InternalStateModule.get;
var enforceInternalState = InternalStateModule.enforce;
var TEMPLATE = String(String).split('String');
(module.exports = function (O, key, value, options) {
var unsafe = options ? !!options.unsafe : false;
var simple = options ? !!options.enumerable : false;
var noTargetGet = options ? !!options.noTargetGet : false;
if (typeof value == 'function') {
if (typeof key == 'string' && !has(value, 'name')) createNonEnumerableProperty(value, 'name', key);
enforceInternalState(value).source = TEMPLATE.join(typeof key == 'string' ? key : '');
}
if (O === global) {
if (simple) O[key] = value;
else setGlobal(key, value);
return;
} else if (!unsafe) {
delete O[key];
} else if (!noTargetGet && O[key]) {
simple = true;
}
if (simple) O[key] = value;
else createNonEnumerableProperty(O, key, value);
// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
})(Function.prototype, 'toString', function toString() {
return typeof this == 'function' && getInternalState(this).source || inspectSource(this);
});
/***/ }),
/***/ "2RDa":
/*!****************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/object-create.js ***!
\****************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var anObject = __webpack_require__(/*! ../internals/an-object */ "F26l");
var defineProperties = __webpack_require__(/*! ../internals/object-define-properties */ "5y2d");
var enumBugKeys = __webpack_require__(/*! ../internals/enum-bug-keys */ "aAjO");
var hiddenKeys = __webpack_require__(/*! ../internals/hidden-keys */ "yQMY");
var html = __webpack_require__(/*! ../internals/html */ "149L");
var documentCreateElement = __webpack_require__(/*! ../internals/document-create-element */ "qx7X");
var sharedKey = __webpack_require__(/*! ../internals/shared-key */ "/AsP");
var GT = '>';
var LT = '<';
var PROTOTYPE = 'prototype';
var SCRIPT = 'script';
var IE_PROTO = sharedKey('IE_PROTO');
var EmptyConstructor = function () { /* empty */ };
var scriptTag = function (content) {
return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
};
// Create object with fake `null` prototype: use ActiveX Object with cleared prototype
var NullProtoObjectViaActiveX = function (activeXDocument) {
activeXDocument.write(scriptTag(''));
activeXDocument.close();
var temp = activeXDocument.parentWindow.Object;
activeXDocument = null; // avoid memory leak
return temp;
};
// Create object with fake `null` prototype: use iframe Object with cleared prototype
var NullProtoObjectViaIFrame = function () {
// Thrash, waste and sodomy: IE GC bug
var iframe = documentCreateElement('iframe');
var JS = 'java' + SCRIPT + ':';
var iframeDocument;
iframe.style.display = 'none';
html.appendChild(iframe);
// https://github.com/zloirock/core-js/issues/475
iframe.src = String(JS);
iframeDocument = iframe.contentWindow.document;
iframeDocument.open();
iframeDocument.write(scriptTag('document.F=Object'));
iframeDocument.close();
return iframeDocument.F;
};
// Check for document.domain and active x support
// No need to use active x approach when document.domain is not set
// see https://github.com/es-shims/es5-shim/issues/150
// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
// avoid IE GC bug
var activeXDocument;
var NullProtoObject = function () {
try {
/* global ActiveXObject */
activeXDocument = document.domain && new ActiveXObject('htmlfile');
} catch (error) { /* ignore */ }
NullProtoObject = activeXDocument ? NullProtoObjectViaActiveX(activeXDocument) : NullProtoObjectViaIFrame();
var length = enumBugKeys.length;
while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
return NullProtoObject();
};
hiddenKeys[IE_PROTO] = true;
// `Object.create` method
// https://tc39.github.io/ecma262/#sec-object.create
module.exports = Object.create || function create(O, Properties) {
var result;
if (O !== null) {
EmptyConstructor[PROTOTYPE] = anObject(O);
result = new EmptyConstructor();
EmptyConstructor[PROTOTYPE] = null;
// add "__proto__" for Object.getPrototypeOf polyfill
result[IE_PROTO] = O;
} else result = NullProtoObject();
return Properties === undefined ? result : defineProperties(result, Properties);
};
/***/ }),
/***/ "2oRo":
/*!**************************************************!*\
!*** ./node_modules/core-js/internals/global.js ***!
\**************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
var check = function (it) {
return it && it.Math == Math && it;
};
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
module.exports =
// eslint-disable-next-line no-undef
check(typeof globalThis == 'object' && globalThis) ||
check(typeof window == 'object' && window) ||
check(typeof self == 'object' && self) ||
check(typeof global == 'object' && global) ||
// eslint-disable-next-line no-new-func
(function () { return this; })() || Function('return this')();
/***/ }),
/***/ "33Wh":
/*!*******************************************************!*\
!*** ./node_modules/core-js/internals/object-keys.js ***!
\*******************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var internalObjectKeys = __webpack_require__(/*! ../internals/object-keys-internal */ "yoRg");
var enumBugKeys = __webpack_require__(/*! ../internals/enum-bug-keys */ "eDl+");
// `Object.keys` method
// https://tc39.github.io/ecma262/#sec-object.keys
module.exports = Object.keys || function keys(O) {
return internalObjectKeys(O, enumBugKeys);
};
/***/ }),
/***/ "3caY":
/*!**************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.math.asinh.js ***!
\**************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var nativeAsinh = Math.asinh;
var log = Math.log;
var sqrt = Math.sqrt;
function asinh(x) {
return !isFinite(x = +x) || x == 0 ? x : x < 0 ? -asinh(-x) : log(x + sqrt(x * x + 1));
}
// `Math.asinh` method
// https://tc39.github.io/ecma262/#sec-math.asinh
// Tor Browser bug: Math.asinh(0) -> -0
$({ target: 'Math', stat: true, forced: !(nativeAsinh && 1 / nativeAsinh(0) > 0) }, {
asinh: asinh
});
/***/ }),
/***/ "3vMK":
/*!*************************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.function.has-instance.js ***!
\*************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var isObject = __webpack_require__(/*! ../internals/is-object */ "6XUM");
var definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ "/Ybd");
var getPrototypeOf = __webpack_require__(/*! ../internals/object-get-prototype-of */ "wIVT");
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "m41k");
var HAS_INSTANCE = wellKnownSymbol('hasInstance');
var FunctionPrototype = Function.prototype;
// `Function.prototype[@@hasInstance]` method
// https://tc39.github.io/ecma262/#sec-function.prototype-@@hasinstance
if (!(HAS_INSTANCE in FunctionPrototype)) {
definePropertyModule.f(FunctionPrototype, HAS_INSTANCE, { value: function (O) {
if (typeof this != 'function' || !isObject(O)) return false;
if (!isObject(this.prototype)) return O instanceof this;
// for environment w/o native `@@hasInstance` logic enough `instanceof`, but add this:
while (O = getPrototypeOf(O)) if (this.prototype === O) return true;
return false;
} });
}
/***/ }),
/***/ "3xQm":
/*!************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/microtask.js ***!
\************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__(/*! ../internals/global */ "ocAm");
var getOwnPropertyDescriptor = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ "7gGY").f;
var classof = __webpack_require__(/*! ../internals/classof-raw */ "ezU2");
var macrotask = __webpack_require__(/*! ../internals/task */ "Ox9q").set;
var IS_IOS = __webpack_require__(/*! ../internals/engine-is-ios */ "tuHh");
var MutationObserver = global.MutationObserver || global.WebKitMutationObserver;
var process = global.process;
var Promise = global.Promise;
var IS_NODE = classof(process) == 'process';
// Node.js 11 shows ExperimentalWarning on getting `queueMicrotask`
var queueMicrotaskDescriptor = getOwnPropertyDescriptor(global, 'queueMicrotask');
var queueMicrotask = queueMicrotaskDescriptor && queueMicrotaskDescriptor.value;
var flush, head, last, notify, toggle, node, promise, then;
// modern engines have queueMicrotask method
if (!queueMicrotask) {
flush = function () {
var parent, fn;
if (IS_NODE && (parent = process.domain)) parent.exit();
while (head) {
fn = head.fn;
head = head.next;
try {
fn();
} catch (error) {
if (head) notify();
else last = undefined;
throw error;
}
} last = undefined;
if (parent) parent.enter();
};
// Node.js
if (IS_NODE) {
notify = function () {
process.nextTick(flush);
};
// browsers with MutationObserver, except iOS - https://github.com/zloirock/core-js/issues/339
} else if (MutationObserver && !IS_IOS) {
toggle = true;
node = document.createTextNode('');
new MutationObserver(flush).observe(node, { characterData: true });
notify = function () {
node.data = toggle = !toggle;
};
// environments with maybe non-completely correct, but existent Promise
} else if (Promise && Promise.resolve) {
// Promise.resolve without an argument throws an error in LG WebOS 2
promise = Promise.resolve(undefined);
then = promise.then;
notify = function () {
then.call(promise, flush);
};
// for other environments - macrotask based on:
// - setImmediate
// - MessageChannel
// - window.postMessag
// - onreadystatechange
// - setTimeout
} else {
notify = function () {
// strange IE + webpack dev server bug - use .call(global)
macrotask.call(global, flush);
};
}
}
module.exports = queueMicrotask || function (fn) {
var task = { fn: fn, next: undefined };
if (last) last.next = task;
if (!head) {
head = task;
notify();
} last = task;
};
/***/ }),
/***/ "48xZ":
/*!**************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/math-fround.js ***!
\**************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var sign = __webpack_require__(/*! ../internals/math-sign */ "n/2t");
var abs = Math.abs;
var pow = Math.pow;
var EPSILON = pow(2, -52);
var EPSILON32 = pow(2, -23);
var MAX32 = pow(2, 127) * (2 - EPSILON32);
var MIN32 = pow(2, -126);
var roundTiesToEven = function (n) {
return n + 1 / EPSILON - 1 / EPSILON;
};
// `Math.fround` method implementation
// https://tc39.github.io/ecma262/#sec-math.fround
module.exports = Math.fround || function fround(x) {
var $abs = abs(x);
var $sign = sign(x);
var a, result;
if ($abs < MIN32) return $sign * roundTiesToEven($abs / MIN32 / EPSILON32) * MIN32 * EPSILON32;
a = (1 + EPSILON32 / EPSILON) * $abs;
result = a - (a - $abs);
// eslint-disable-next-line no-self-compare
if (result > MAX32 || result != result) return $sign * Infinity;
return $sign * result;
};
/***/ }),
/***/ "4GtL":
/*!********************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/array-copy-within.js ***!
\********************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var toObject = __webpack_require__(/*! ../internals/to-object */ "VCQ8");
var toAbsoluteIndex = __webpack_require__(/*! ../internals/to-absolute-index */ "7Oj1");
var toLength = __webpack_require__(/*! ../internals/to-length */ "xpLY");
var min = Math.min;
// `Array.prototype.copyWithin` method implementation
// https://tc39.github.io/ecma262/#sec-array.prototype.copywithin
module.exports = [].copyWithin || function copyWithin(target /* = 0 */, start /* = 0, end = @length */) {
var O = toObject(this);
var len = toLength(O.length);
var to = toAbsoluteIndex(target, len);
var from = toAbsoluteIndex(start, len);
var end = arguments.length > 2 ? arguments[2] : undefined;
var count = min((end === undefined ? len : toAbsoluteIndex(end, len)) - from, len - to);
var inc = 1;
if (from < to && to < from + count) {
inc = -1;
from += count - 1;
to += count - 1;
}
while (count-- > 0) {
if (from in O) O[to] = O[from];
else delete O[to];
to += inc;
from += inc;
} return O;
};
/***/ }),
/***/ "4Kt7":
/*!**************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.string.sub.js ***!
\**************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var createHTML = __webpack_require__(/*! ../internals/create-html */ "uoca");
var forcedStringHTMLMethod = __webpack_require__(/*! ../internals/string-html-forced */ "d8Sw");
// `String.prototype.sub` method
// https://tc39.github.io/ecma262/#sec-string.prototype.sub
$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('sub') }, {
sub: function sub() {
return createHTML(this, 'sub', '', '');
}
});
/***/ }),
/***/ "4NCC":
/*!*******************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/number-parse-int.js ***!
\*******************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__(/*! ../internals/global */ "ocAm");
var trim = __webpack_require__(/*! ../internals/string-trim */ "jnLS").trim;
var whitespaces = __webpack_require__(/*! ../internals/whitespaces */ "xFZC");
var $parseInt = global.parseInt;
var hex = /^[+-]?0[Xx]/;
var FORCED = $parseInt(whitespaces + '08') !== 8 || $parseInt(whitespaces + '0x16') !== 22;
// `parseInt` method
// https://tc39.github.io/ecma262/#sec-parseint-string-radix
module.exports = FORCED ? function parseInt(string, radix) {
var S = trim(String(string));
return $parseInt(S, (radix >>> 0) || (hex.test(S) ? 16 : 10));
} : $parseInt;
/***/ }),
/***/ "4PyY":
/*!************************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/to-string-tag-support.js ***!
\************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "m41k");
var TO_STRING_TAG = wellKnownSymbol('toStringTag');
var test = {};
test[TO_STRING_TAG] = 'z';
module.exports = String(test) === '[object z]';
/***/ }),
/***/ "4WOD":
/*!*******************************************************************!*\
!*** ./node_modules/core-js/internals/object-get-prototype-of.js ***!
\*******************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var has = __webpack_require__(/*! ../internals/has */ "UTVS");
var toObject = __webpack_require__(/*! ../internals/to-object */ "ewvW");
var sharedKey = __webpack_require__(/*! ../internals/shared-key */ "93I0");
var CORRECT_PROTOTYPE_GETTER = __webpack_require__(/*! ../internals/correct-prototype-getter */ "4Xet");
var IE_PROTO = sharedKey('IE_PROTO');
var ObjectPrototype = Object.prototype;
// `Object.getPrototypeOf` method
// https://tc39.github.io/ecma262/#sec-object.getprototypeof
module.exports = CORRECT_PROTOTYPE_GETTER ? Object.getPrototypeOf : function (O) {
O = toObject(O);
if (has(O, IE_PROTO)) return O[IE_PROTO];
if (typeof O.constructor == 'function' && O instanceof O.constructor) {
return O.constructor.prototype;
} return O instanceof Object ? ObjectPrototype : null;
};
/***/ }),
/***/ "4Xet":
/*!********************************************************************!*\
!*** ./node_modules/core-js/internals/correct-prototype-getter.js ***!
\********************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var fails = __webpack_require__(/*! ../internals/fails */ "0Dky");
module.exports = !fails(function () {
function F() { /* empty */ }
F.prototype.constructor = null;
return Object.getPrototypeOf(new F()) !== F.prototype;
});
/***/ }),
/***/ "4axp":
/*!****************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.string.blink.js ***!
\****************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var createHTML = __webpack_require__(/*! ../internals/create-html */ "uoca");
var forcedStringHTMLMethod = __webpack_require__(/*! ../internals/string-html-forced */ "d8Sw");
// `String.prototype.blink` method
// https://tc39.github.io/ecma262/#sec-string.prototype.blink
$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('blink') }, {
blink: function blink() {
return createHTML(this, 'blink', '', '');
}
});
/***/ }),
/***/ "5MmU":
/*!***************************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/is-array-iterator-method.js ***!
\***************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "m41k");
var Iterators = __webpack_require__(/*! ../internals/iterators */ "pz+c");
var ITERATOR = wellKnownSymbol('iterator');
var ArrayPrototype = Array.prototype;
// check on default Array iterator
module.exports = function (it) {
return it !== undefined && (Iterators.Array === it || ArrayPrototype[ITERATOR] === it);
};
/***/ }),
/***/ "5eAq":
/*!**********************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.number.parse-float.js ***!
\**********************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var parseFloat = __webpack_require__(/*! ../internals/number-parse-float */ "vZCr");
// `Number.parseFloat` method
// https://tc39.github.io/ecma262/#sec-number.parseFloat
$({ target: 'Number', stat: true, forced: Number.parseFloat != parseFloat }, {
parseFloat: parseFloat
});
/***/ }),
/***/ "5y2d":
/*!***************************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/object-define-properties.js ***!
\***************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "T69T");
var definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ "/Ybd");
var anObject = __webpack_require__(/*! ../internals/an-object */ "F26l");
var objectKeys = __webpack_require__(/*! ../internals/object-keys */ "ZRqE");
// `Object.defineProperties` method
// https://tc39.github.io/ecma262/#sec-object.defineproperties
module.exports = DESCRIPTORS ? Object.defineProperties : function defineProperties(O, Properties) {
anObject(O);
var keys = objectKeys(Properties);
var length = keys.length;
var index = 0;
var key;
while (length > index) definePropertyModule.f(O, key = keys[index++], Properties[key]);
return O;
};
/***/ }),
/***/ "5yqK":
/*!************************************************!*\
!*** ./node_modules/classlist.js/classList.js ***!
\************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
/*
* classList.js: Cross-browser full element.classList implementation.
* 1.1.20150312
*
* By Eli Grey, http://eligrey.com
* License: Dedicated to the public domain.
* See https://github.com/eligrey/classList.js/blob/master/LICENSE.md
*/
/*global self, document, DOMException */
/*! @source http://purl.eligrey.com/github/classList.js/blob/master/classList.js */
if ("document" in self) {
// Full polyfill for browsers with no classList support
// Including IE < Edge missing SVGElement.classList
if (!("classList" in document.createElement("_")) || document.createElementNS && !("classList" in document.createElementNS("http://www.w3.org/2000/svg", "g"))) {
(function (view) {
"use strict";
if (!('Element' in view)) return;
var classListProp = "classList",
protoProp = "prototype",
elemCtrProto = view.Element[protoProp],
objCtr = Object,
strTrim = String[protoProp].trim || function () {
return this.replace(/^\s+|\s+$/g, "");
},
arrIndexOf = Array[protoProp].indexOf || function (item) {
var i = 0,
len = this.length;
for (; i < len; i++) {
if (i in this && this[i] === item) {
return i;
}
}
return -1;
} // Vendors: please allow content code to instantiate DOMExceptions
,
DOMEx = function DOMEx(type, message) {
this.name = type;
this.code = DOMException[type];
this.message = message;
},
checkTokenAndGetIndex = function checkTokenAndGetIndex(classList, token) {
if (token === "") {
throw new DOMEx("SYNTAX_ERR", "An invalid or illegal string was specified");
}
if (/\s/.test(token)) {
throw new DOMEx("INVALID_CHARACTER_ERR", "String contains an invalid character");
}
return arrIndexOf.call(classList, token);
},
ClassList = function ClassList(elem) {
var trimmedClasses = strTrim.call(elem.getAttribute("class") || ""),
classes = trimmedClasses ? trimmedClasses.split(/\s+/) : [],
i = 0,
len = classes.length;
for (; i < len; i++) {
this.push(classes[i]);
}
this._updateClassName = function () {
elem.setAttribute("class", this.toString());
};
},
classListProto = ClassList[protoProp] = [],
classListGetter = function classListGetter() {
return new ClassList(this);
}; // Most DOMException implementations don't allow calling DOMException's toString()
// on non-DOMExceptions. Error's toString() is sufficient here.
DOMEx[protoProp] = Error[protoProp];
classListProto.item = function (i) {
return this[i] || null;
};
classListProto.contains = function (token) {
token += "";
return checkTokenAndGetIndex(this, token) !== -1;
};
classListProto.add = function () {
var tokens = arguments,
i = 0,
l = tokens.length,
token,
updated = false;
do {
token = tokens[i] + "";
if (checkTokenAndGetIndex(this, token) === -1) {
this.push(token);
updated = true;
}
} while (++i < l);
if (updated) {
this._updateClassName();
}
};
classListProto.remove = function () {
var tokens = arguments,
i = 0,
l = tokens.length,
token,
updated = false,
index;
do {
token = tokens[i] + "";
index = checkTokenAndGetIndex(this, token);
while (index !== -1) {
this.splice(index, 1);
updated = true;
index = checkTokenAndGetIndex(this, token);
}
} while (++i < l);
if (updated) {
this._updateClassName();
}
};
classListProto.toggle = function (token, force) {
token += "";
var result = this.contains(token),
method = result ? force !== true && "remove" : force !== false && "add";
if (method) {
this[method](token);
}
if (force === true || force === false) {
return force;
} else {
return !result;
}
};
classListProto.toString = function () {
return this.join(" ");
};
if (objCtr.defineProperty) {
var classListPropDesc = {
get: classListGetter,
enumerable: true,
configurable: true
};
try {
objCtr.defineProperty(elemCtrProto, classListProp, classListPropDesc);
} catch (ex) {
// IE 8 doesn't support enumerable:true
if (ex.number === -0x7FF5EC54) {
classListPropDesc.enumerable = false;
objCtr.defineProperty(elemCtrProto, classListProp, classListPropDesc);
}
}
} else if (objCtr[protoProp].__defineGetter__) {
elemCtrProto.__defineGetter__(classListProp, classListGetter);
}
})(self);
} else {
// There is full or partial native classList support, so just check if we need
// to normalize the add/remove and toggle APIs.
(function () {
"use strict";
var testElement = document.createElement("_");
testElement.classList.add("c1", "c2"); // Polyfill for IE 10/11 and Firefox <26, where classList.add and
// classList.remove exist but support only one argument at a time.
if (!testElement.classList.contains("c2")) {
var createMethod = function createMethod(method) {
var original = DOMTokenList.prototype[method];
DOMTokenList.prototype[method] = function (token) {
var i,
len = arguments.length;
for (i = 0; i < len; i++) {
token = arguments[i];
original.call(this, token);
}
};
};
createMethod('add');
createMethod('remove');
}
testElement.classList.toggle("c3", false); // Polyfill for IE 10 and Firefox <24, where classList.toggle does not
// support the second argument.
if (testElement.classList.contains("c3")) {
var _toggle = DOMTokenList.prototype.toggle;
DOMTokenList.prototype.toggle = function (token, force) {
if (1 in arguments && !this.contains(token) === !force) {
return force;
} else {
return _toggle.call(this, token);
}
};
}
testElement = null;
})();
}
}
/***/ }),
/***/ "5zDw":
/*!********************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.number.parse-int.js ***!
\********************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var parseInt = __webpack_require__(/*! ../internals/number-parse-int */ "4NCC");
// `Number.parseInt` method
// https://tc39.github.io/ecma262/#sec-number.parseint
$({ target: 'Number', stat: true, forced: Number.parseInt != parseInt }, {
parseInt: parseInt
});
/***/ }),
/***/ "6CEi":
/*!**************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.array.find.js ***!
\**************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var $find = __webpack_require__(/*! ../internals/array-iteration */ "kk6e").find;
var addToUnscopables = __webpack_require__(/*! ../internals/add-to-unscopables */ "A1Hp");
var arrayMethodUsesToLength = __webpack_require__(/*! ../internals/array-method-uses-to-length */ "w2hq");
var FIND = 'find';
var SKIPS_HOLES = true;
var USES_TO_LENGTH = arrayMethodUsesToLength(FIND);
// Shouldn't skip holes
if (FIND in []) Array(1)[FIND](function () { SKIPS_HOLES = false; });
// `Array.prototype.find` method
// https://tc39.github.io/ecma262/#sec-array.prototype.find
$({ target: 'Array', proto: true, forced: SKIPS_HOLES || !USES_TO_LENGTH }, {
find: function find(callbackfn /* , that = undefined */) {
return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
}
});
// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
addToUnscopables(FIND);
/***/ }),
/***/ "6CJb":
/*!*************************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/array-method-is-strict.js ***!
\*************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var fails = __webpack_require__(/*! ../internals/fails */ "rG8t");
module.exports = function (METHOD_NAME, argument) {
var method = [][METHOD_NAME];
return !!method && fails(function () {
// eslint-disable-next-line no-useless-call,no-throw-literal
method.call(null, argument || function () { throw 1; }, 1);
});
};
/***/ }),
/***/ "6JNq":
/*!***********************************************************************!*\
!*** ./node_modules/core-js/internals/copy-constructor-properties.js ***!
\***********************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var has = __webpack_require__(/*! ../internals/has */ "UTVS");
var ownKeys = __webpack_require__(/*! ../internals/own-keys */ "Vu81");
var getOwnPropertyDescriptorModule = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ "Bs8V");
var definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ "m/L8");
module.exports = function (target, source) {
var keys = ownKeys(source);
var defineProperty = definePropertyModule.f;
var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
for (var i = 0; i < keys.length; i++) {
var key = keys[i];
if (!has(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));
}
};
/***/ }),
/***/ "6XUM":
/*!************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/is-object.js ***!
\************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = function (it) {
return typeof it === 'object' ? it !== null : typeof it === 'function';
};
/***/ }),
/***/ "6dTf":
/*!**************************************************************!*\
!*** ./node_modules/web-animations-js/web-animations.min.js ***!
\**************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
// Copyright 2014 Google Inc. All rights reserved.
//
// 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(){var a={},b={};!function(a,b){function c(a){if("number"==typeof a)return a;var b={};for(var c in a)b[c]=a[c];return b}function d(){this._delay=0,this._endDelay=0,this._fill="none",this._iterationStart=0,this._iterations=1,this._duration=0,this._playbackRate=1,this._direction="normal",this._easing="linear",this._easingFunction=x}function e(){return a.isDeprecated("Invalid timing inputs","2016-03-02","TypeError exceptions will be thrown instead.",!0)}function f(b,c,e){var f=new d;return c&&(f.fill="both",f.duration="auto"),"number"!=typeof b||isNaN(b)?void 0!==b&&Object.getOwnPropertyNames(b).forEach(function(c){if("auto"!=b[c]){if(("number"==typeof f[c]||"duration"==c)&&("number"!=typeof b[c]||isNaN(b[c])))return;if("fill"==c&&-1==v.indexOf(b[c]))return;if("direction"==c&&-1==w.indexOf(b[c]))return;if("playbackRate"==c&&1!==b[c]&&a.isDeprecated("AnimationEffectTiming.playbackRate","2014-11-28","Use Animation.playbackRate instead."))return;f[c]=b[c]}}):f.duration=b,f}function g(a){return"number"==typeof a&&(a=isNaN(a)?{duration:0}:{duration:a}),a}function h(b,c){return b=a.numericTimingToObject(b),f(b,c)}function i(a,b,c,d){return a<0||a>1||c<0||c>1?x:function(e){function f(a,b,c){return 3*a*(1-c)*(1-c)*c+3*b*(1-c)*c*c+c*c*c}if(e<=0){var g=0;return a>0?g=b/a:!b&&c>0&&(g=d/c),g*e}if(e>=1){var h=0;return c<1?h=(d-1)/(c-1):1==c&&a<1&&(h=(b-1)/(a-1)),1+h*(e-1)}for(var i=0,j=1;i<j;){var k=(i+j)/2,l=f(a,c,k);if(Math.abs(e-l)<1e-5)return f(b,d,k);l<e?i=k:j=k}return f(b,d,k)}}function j(a,b){return function(c){if(c>=1)return 1;var d=1/a;return(c+=b*d)-c%d}}function k(a){C||(C=document.createElement("div").style),C.animationTimingFunction="",C.animationTimingFunction=a;var b=C.animationTimingFunction;if(""==b&&e())throw new TypeError(a+" is not a valid value for easing");return b}function l(a){if("linear"==a)return x;var b=E.exec(a);if(b)return i.apply(this,b.slice(1).map(Number));var c=F.exec(a);if(c)return j(Number(c[1]),A);var d=G.exec(a);return d?j(Number(d[1]),{start:y,middle:z,end:A}[d[2]]):B[a]||x}function m(a){return Math.abs(n(a)/a.playbackRate)}function n(a){return 0===a.duration||0===a.iterations?0:a.duration*a.iterations}function o(a,b,c){if(null==b)return H;var d=c.delay+a+c.endDelay;return b<Math.min(c.delay,d)?I:b>=Math.min(c.delay+a,d)?J:K}function p(a,b,c,d,e){switch(d){case I:return"backwards"==b||"both"==b?0:null;case K:return c-e;case J:return"forwards"==b||"both"==b?a:null;case H:return null}}function q(a,b,c,d,e){var f=e;return 0===a?b!==I&&(f+=c):f+=d/a,f}function r(a,b,c,d,e,f){var g=a===1/0?b%1:a%1;return 0!==g||c!==J||0===d||0===e&&0!==f||(g=1),g}function s(a,b,c,d){return a===J&&b===1/0?1/0:1===c?Math.floor(d)-1:Math.floor(d)}function t(a,b,c){var d=a;if("normal"!==a&&"reverse"!==a){var e=b;"alternate-reverse"===a&&(e+=1),d="normal",e!==1/0&&e%2!=0&&(d="reverse")}return"normal"===d?c:1-c}function u(a,b,c){var d=o(a,b,c),e=p(a,c.fill,b,d,c.delay);if(null===e)return null;var f=q(c.duration,d,c.iterations,e,c.iterationStart),g=r(f,c.iterationStart,d,c.iterations,e,c.duration),h=s(d,c.iterations,g,f),i=t(c.direction,h,g);return c._easingFunction(i)}var v="backwards|forwards|both|none".split("|"),w="reverse|alternate|alternate-reverse".split("|"),x=function(a){return a};d.prototype={_setMember:function(b,c){this["_"+b]=c,this._effect&&(this._effect._timingInput[b]=c,this._effect._timing=a.normalizeTimingInput(this._effect._timingInput),this._effect.activeDuration=a.calculateActiveDuration(this._effect._timing),this._effect._animation&&this._effect._animation._rebuildUnderlyingAnimation())},get playbackRate(){return this._playbackRate},set delay(a){this._setMember("delay",a)},get delay(){return this._delay},set endDelay(a){this._setMember("endDelay",a)},get endDelay(){return this._endDelay},set fill(a){this._setMember("fill",a)},get fill(){return this._fill},set iterationStart(a){if((isNaN(a)||a<0)&&e())throw new TypeError("iterationStart must be a non-negative number, received: "+a);this._setMember("iterationStart",a)},get iterationStart(){return this._iterationStart},set duration(a){if("auto"!=a&&(isNaN(a)||a<0)&&e())throw new TypeError("duration must be non-negative or auto, received: "+a);this._setMember("duration",a)},get duration(){return this._duration},set direction(a){this._setMember("direction",a)},get direction(){return this._direction},set easing(a){this._easingFunction=l(k(a)),this._setMember("easing",a)},get easing(){return this._easing},set iterations(a){if((isNaN(a)||a<0)&&e())throw new TypeError("iterations must be non-negative, received: "+a);this._setMember("iterations",a)},get iterations(){return this._iterations}};var y=1,z=.5,A=0,B={ease:i(.25,.1,.25,1),"ease-in":i(.42,0,1,1),"ease-out":i(0,0,.58,1),"ease-in-out":i(.42,0,.58,1),"step-start":j(1,y),"step-middle":j(1,z),"step-end":j(1,A)},C=null,D="\\s*(-?\\d+\\.?\\d*|-?\\.\\d+)\\s*",E=new RegExp("cubic-bezier\\("+D+","+D+","+D+","+D+"\\)"),F=/steps\(\s*(\d+)\s*\)/,G=/steps\(\s*(\d+)\s*,\s*(start|middle|end)\s*\)/,H=0,I=1,J=2,K=3;a.cloneTimingInput=c,a.makeTiming=f,a.numericTimingToObject=g,a.normalizeTimingInput=h,a.calculateActiveDuration=m,a.calculateIterationProgress=u,a.calculatePhase=o,a.normalizeEasing=k,a.parseEasingFunction=l}(a),function(a,b){function c(a,b){return a in k?k[a][b]||b:b}function d(a){return"display"===a||0===a.lastIndexOf("animation",0)||0===a.lastIndexOf("transition",0)}function e(a,b,e){if(!d(a)){var f=h[a];if(f){i.style[a]=b;for(var g in f){var j=f[g],k=i.style[j];e[j]=c(j,k)}}else e[a]=c(a,b)}}function f(a){var b=[];for(var c in a)if(!(c in["easing","offset","composite"])){var d=a[c];Array.isArray(d)||(d=[d]);for(var e,f=d.length,g=0;g<f;g++)e={},e.offset="offset"in a?a.offset:1==f?1:g/(f-1),"easing"in a&&(e.easing=a.easing),"composite"in a&&(e.composite=a.composite),e[c]=d[g],b.push(e)}return b.sort(function(a,b){return a.offset-b.offset}),b}function g(b){function c(){var a=d.length;null==d[a-1].offset&&(d[a-1].offset=1),a>1&&null==d[0].offset&&(d[0].offset=0);for(var b=0,c=d[0].offset,e=1;e<a;e++){var f=d[e].offset;if(null!=f){for(var g=1;g<e-b;g++)d[b+g].offset=c+(f-c)*g/(e-b);b=e,c=f}}}if(null==b)return[];window.Symbol&&Symbol.iterator&&Array.prototype.from&&b[Symbol.iterator]&&(b=Array.from(b)),Array.isArray(b)||(b=f(b));for(var d=b.map(function(b){var c={};for(var d in b){var f=b[d];if("offset"==d){if(null!=f){if(f=Number(f),!isFinite(f))throw new TypeError("Keyframe offsets must be numbers.");if(f<0||f>1)throw new TypeError("Keyframe offsets must be between 0 and 1.")}}else if("composite"==d){if("add"==f||"accumulate"==f)throw{type:DOMException.NOT_SUPPORTED_ERR,name:"NotSupportedError",message:"add compositing is not supported"};if("replace"!=f)throw new TypeError("Invalid composite mode "+f+".")}else f="easing"==d?a.normalizeEasing(f):""+f;e(d,f,c)}return void 0==c.offset&&(c.offset=null),void 0==c.easing&&(c.easing="linear"),c}),g=!0,h=-1/0,i=0;i<d.length;i++){var j=d[i].offset;if(null!=j){if(j<h)throw new TypeError("Keyframes are not loosely sorted by offset. Sort or specify offsets.");h=j}else g=!1}return d=d.filter(function(a){return a.offset>=0&&a.offset<=1}),g||c(),d}var h={background:["backgroundImage","backgroundPosition","backgroundSize","backgroundRepeat","backgroundAttachment","backgroundOrigin","backgroundClip","backgroundColor"],border:["borderTopColor","borderTopStyle","borderTopWidth","borderRightColor","borderRightStyle","borderRightWidth","borderBottomColor","borderBottomStyle","borderBottomWidth","borderLeftColor","borderLeftStyle","borderLeftWidth"],borderBottom:["borderBottomWidth","borderBottomStyle","borderBottomColor"],borderColor:["borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"],borderLeft:["borderLeftWidth","borderLeftStyle","borderLeftColor"],borderRadius:["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"],borderRight:["borderRightWidth","borderRightStyle","borderRightColor"],borderTop:["borderTopWidth","borderTopStyle","borderTopColor"],borderWidth:["borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth"],flex:["flexGrow","flexShrink","flexBasis"],font:["fontFamily","fontSize","fontStyle","fontVariant","fontWeight","lineHeight"],margin:["marginTop","marginRight","marginBottom","marginLeft"],outline:["outlineColor","outlineStyle","outlineWidth"],padding:["paddingTop","paddingRight","paddingBottom","paddingLeft"]},i=document.createElementNS("http://www.w3.org/1999/xhtml","div"),j={thin:"1px",medium:"3px",thick:"5px"},k={borderBottomWidth:j,borderLeftWidth:j,borderRightWidth:j,borderTopWidth:j,fontSize:{"xx-small":"60%","x-small":"75%",small:"89%",medium:"100%",large:"120%","x-large":"150%","xx-large":"200%"},fontWeight:{normal:"400",bold:"700"},outlineWidth:j,textShadow:{none:"0px 0px 0px transparent"},boxShadow:{none:"0px 0px 0px 0px transparent"}};a.convertToArrayForm=f,a.normalizeKeyframes=g}(a),function(a){var b={};a.isDeprecated=function(a,c,d,e){var f=e?"are":"is",g=new Date,h=new Date(c);return h.setMonth(h.getMonth()+3),!(g<h&&(a in b||console.warn("Web Animations: "+a+" "+f+" deprecated and will stop working on "+h.toDateString()+". "+d),b[a]=!0,1))},a.deprecated=function(b,c,d,e){var f=e?"are":"is";if(a.isDeprecated(b,c,d,e))throw new Error(b+" "+f+" no longer supported. "+d)}}(a),function(){if(document.documentElement.animate){var c=document.documentElement.animate([],0),d=!0;if(c&&(d=!1,"play|currentTime|pause|reverse|playbackRate|cancel|finish|startTime|playState".split("|").forEach(function(a){void 0===c[a]&&(d=!0)})),!d)return}!function(a,b,c){function d(a){for(var b={},c=0;c<a.length;c++)for(var d in a[c])if("offset"!=d&&"easing"!=d&&"composite"!=d){var e={offset:a[c].offset,easing:a[c].easing,value:a[c][d]};b[d]=b[d]||[],b[d].push(e)}for(var f in b){var g=b[f];if(0!=g[0].offset||1!=g[g.length-1].offset)throw{type:DOMException.NOT_SUPPORTED_ERR,name:"NotSupportedError",message:"Partial keyframes are not supported"}}return b}function e(c){var d=[];for(var e in c)for(var f=c[e],g=0;g<f.length-1;g++){var h=g,i=g+1,j=f[h].offset,k=f[i].offset,l=j,m=k;0==g&&(l=-1/0,0==k&&(i=h)),g==f.length-2&&(m=1/0,1==j&&(h=i)),d.push({applyFrom:l,applyTo:m,startOffset:f[h].offset,endOffset:f[i].offset,easingFunction:a.parseEasingFunction(f[h].easing),property:e,interpolation:b.propertyInterpolation(e,f[h].value,f[i].value)})}return d.sort(function(a,b){return a.startOffset-b.startOffset}),d}b.convertEffectInput=function(c){var f=a.normalizeKeyframes(c),g=d(f),h=e(g);return function(a,c){if(null!=c)h.filter(function(a){return c>=a.applyFrom&&c<a.applyTo}).forEach(function(d){var e=c-d.startOffset,f=d.endOffset-d.startOffset,g=0==f?0:d.easingFunction(e/f);b.apply(a,d.property,d.interpolation(g))});else for(var d in g)"offset"!=d&&"easing"!=d&&"composite"!=d&&b.clear(a,d)}}}(a,b),function(a,b,c){function d(a){return a.replace(/-(.)/g,function(a,b){return b.toUpperCase()})}function e(a,b,c){h[c]=h[c]||[],h[c].push([a,b])}function f(a,b,c){for(var f=0;f<c.length;f++){e(a,b,d(c[f]))}}function g(c,e,f){var g=c;/-/.test(c)&&!a.isDeprecated("Hyphenated property names","2016-03-22","Use camelCase instead.",!0)&&(g=d(c)),"initial"!=e&&"initial"!=f||("initial"==e&&(e=i[g]),"initial"==f&&(f=i[g]));for(var j=e==f?[]:h[g],k=0;j&&k<j.length;k++){var l=j[k][0](e),m=j[k][0](f);if(void 0!==l&&void 0!==m){var n=j[k][1](l,m);if(n){var o=b.Interpolation.apply(null,n);return function(a){return 0==a?e:1==a?f:o(a)}}}}return b.Interpolation(!1,!0,function(a){return a?f:e})}var h={};b.addPropertiesHandler=f;var i={backgroundColor:"transparent",backgroundPosition:"0% 0%",borderBottomColor:"currentColor",borderBottomLeftRadius:"0px",borderBottomRightRadius:"0px",borderBottomWidth:"3px",borderLeftColor:"currentColor",borderLeftWidth:"3px",borderRightColor:"currentColor",borderRightWidth:"3px",borderSpacing:"2px",borderTopColor:"currentColor",borderTopLeftRadius:"0px",borderTopRightRadius:"0px",borderTopWidth:"3px",bottom:"auto",clip:"rect(0px, 0px, 0px, 0px)",color:"black",fontSize:"100%",fontWeight:"400",height:"auto",left:"auto",letterSpacing:"normal",lineHeight:"120%",marginBottom:"0px",marginLeft:"0px",marginRight:"0px",marginTop:"0px",maxHeight:"none",maxWidth:"none",minHeight:"0px",minWidth:"0px",opacity:"1.0",outlineColor:"invert",outlineOffset:"0px",outlineWidth:"3px",paddingBottom:"0px",paddingLeft:"0px",paddingRight:"0px",paddingTop:"0px",right:"auto",strokeDasharray:"none",strokeDashoffset:"0px",textIndent:"0px",textShadow:"0px 0px 0px transparent",top:"auto",transform:"",verticalAlign:"0px",visibility:"visible",width:"auto",wordSpacing:"normal",zIndex:"auto"};b.propertyInterpolation=g}(a,b),function(a,b,c){function d(b){var c=a.calculateActiveDuration(b),d=function(d){return a.calculateIterationProgress(c,d,b)};return d._totalDuration=b.delay+c+b.endDelay,d}b.KeyframeEffect=function(c,e,f,g){var h,i=d(a.normalizeTimingInput(f)),j=b.convertEffectInput(e),k=function(){j(c,h)};return k._update=function(a){return null!==(h=i(a))},k._clear=function(){j(c,null)},k._hasSameTarget=function(a){return c===a},k._target=c,k._totalDuration=i._totalDuration,k._id=g,k}}(a,b),function(a,b){function c(a,b){return!(!b.namespaceURI||-1==b.namespaceURI.indexOf("/svg"))&&(g in a||(a[g]=/Trident|MSIE|IEMobile|Edge|Android 4/i.test(a.navigator.userAgent)),a[g])}function d(a,b,c){c.enumerable=!0,c.configurable=!0,Object.defineProperty(a,b,c)}function e(a){this._element=a,this._surrogateStyle=document.createElementNS("http://www.w3.org/1999/xhtml","div").style,this._style=a.style,this._length=0,this._isAnimatedProperty={},this._updateSvgTransformAttr=c(window,a),this._savedTransformAttr=null;for(var b=0;b<this._style.length;b++){var d=this._style[b];this._surrogateStyle[d]=this._style[d]}this._updateIndices()}function f(a){if(!a._webAnimationsPatchedStyle){var b=new e(a);try{d(a,"style",{get:function(){return b}})}catch(b){a.style._set=function(b,c){a.style[b]=c},a.style._clear=function(b){a.style[b]=""}}a._webAnimationsPatchedStyle=a.style}}var g="_webAnimationsUpdateSvgTransformAttr",h={cssText:1,length:1,parentRule:1},i={getPropertyCSSValue:1,getPropertyPriority:1,getPropertyValue:1,item:1,removeProperty:1,setProperty:1},j={removeProperty:1,setProperty:1};e.prototype={get cssText(){return this._surrogateStyle.cssText},set cssText(a){for(var b={},c=0;c<this._surrogateStyle.length;c++)b[this._surrogateStyle[c]]=!0;this._surrogateStyle.cssText=a,this._updateIndices();for(var c=0;c<this._surrogateStyle.length;c++)b[this._surrogateStyle[c]]=!0;for(var d in b)this._isAnimatedProperty[d]||this._style.setProperty(d,this._surrogateStyle.getPropertyValue(d))},get length(){return this._surrogateStyle.length},get parentRule(){return this._style.parentRule},_updateIndices:function(){for(;this._length<this._surrogateStyle.length;)Object.defineProperty(this,this._length,{configurable:!0,enumerable:!1,get:function(a){return function(){return this._surrogateStyle[a]}}(this._length)}),this._length++;for(;this._length>this._surrogateStyle.length;)this._length--,Object.defineProperty(this,this._length,{configurable:!0,enumerable:!1,value:void 0})},_set:function(b,c){this._style[b]=c,this._isAnimatedProperty[b]=!0,this._updateSvgTransformAttr&&"transform"==a.unprefixedPropertyName(b)&&(null==this._savedTransformAttr&&(this._savedTransformAttr=this._element.getAttribute("transform")),this._element.setAttribute("transform",a.transformToSvgMatrix(c)))},_clear:function(b){this._style[b]=this._surrogateStyle[b],this._updateSvgTransformAttr&&"transform"==a.unprefixedPropertyName(b)&&(this._savedTransformAttr?this._element.setAttribute("transform",this._savedTransformAttr):this._element.removeAttribute("transform"),this._savedTransformAttr=null),delete this._isAnimatedProperty[b]}};for(var k in i)e.prototype[k]=function(a,b){return function(){var c=this._surrogateStyle[a].apply(this._surrogateStyle,arguments);return b&&(this._isAnimatedProperty[arguments[0]]||this._style[a].apply(this._style,arguments),this._updateIndices()),c}}(k,k in j);for(var l in document.documentElement.style)l in h||l in i||function(a){d(e.prototype,a,{get:function(){return this._surrogateStyle[a]},set:function(b){this._surrogateStyle[a]=b,this._updateIndices(),this._isAnimatedProperty[a]||(this._style[a]=b)}})}(l);a.apply=function(b,c,d){f(b),b.style._set(a.propertyName(c),d)},a.clear=function(b,c){b._webAnimationsPatchedStyle&&b.style._clear(a.propertyName(c))}}(b),function(a){window.Element.prototype.animate=function(b,c){var d="";return c&&c.id&&(d=c.id),a.timeline._play(a.KeyframeEffect(this,b,c,d))}}(b),function(a,b){function c(a,b,d){if("number"==typeof a&&"number"==typeof b)return a*(1-d)+b*d;if("boolean"==typeof a&&"boolean"==typeof b)return d<.5?a:b;if(a.length==b.length){for(var e=[],f=0;f<a.length;f++)e.push(c(a[f],b[f],d));return e}throw"Mismatched interpolation arguments "+a+":"+b}a.Interpolation=function(a,b,d){return function(e){return d(c(a,b,e))}}}(b),function(a,b){function c(a,b,c){return Math.max(Math.min(a,c),b)}function d(b,d,e){var f=a.dot(b,d);f=c(f,-1,1);var g=[];if(1===f)g=b;else for(var h=Math.acos(f),i=1*Math.sin(e*h)/Math.sqrt(1-f*f),j=0;j<4;j++)g.push(b[j]*(Math.cos(e*h)-f*i)+d[j]*i);return g}var e=function(){function a(a,b){for(var c=[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],d=0;d<4;d++)for(var e=0;e<4;e++)for(var f=0;f<4;f++)c[d][e]+=b[d][f]*a[f][e];return c}function b(a){return 0==a[0][2]&&0==a[0][3]&&0==a[1][2]&&0==a[1][3]&&0==a[2][0]&&0==a[2][1]&&1==a[2][2]&&0==a[2][3]&&0==a[3][2]&&1==a[3][3]}function c(c,d,e,f,g){for(var h=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]],i=0;i<4;i++)h[i][3]=g[i];for(var i=0;i<3;i++)for(var j=0;j<3;j++)h[3][i]+=c[j]*h[j][i];var k=f[0],l=f[1],m=f[2],n=f[3],o=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];o[0][0]=1-2*(l*l+m*m),o[0][1]=2*(k*l-m*n),o[0][2]=2*(k*m+l*n),o[1][0]=2*(k*l+m*n),o[1][1]=1-2*(k*k+m*m),o[1][2]=2*(l*m-k*n),o[2][0]=2*(k*m-l*n),o[2][1]=2*(l*m+k*n),o[2][2]=1-2*(k*k+l*l),h=a(h,o);var p=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];e[2]&&(p[2][1]=e[2],h=a(h,p)),e[1]&&(p[2][1]=0,p[2][0]=e[0],h=a(h,p)),e[0]&&(p[2][0]=0,p[1][0]=e[0],h=a(h,p));for(var i=0;i<3;i++)for(var j=0;j<3;j++)h[i][j]*=d[i];return b(h)?[h[0][0],h[0][1],h[1][0],h[1][1],h[3][0],h[3][1]]:h[0].concat(h[1],h[2],h[3])}return c}();a.composeMatrix=e,a.quat=d}(b),function(a,b,c){a.sequenceNumber=0;var d=function(a,b,c){this.target=a,this.currentTime=b,this.timelineTime=c,this.type="finish",this.bubbles=!1,this.cancelable=!1,this.currentTarget=a,this.defaultPrevented=!1,this.eventPhase=Event.AT_TARGET,this.timeStamp=Date.now()};b.Animation=function(b){this.id="",b&&b._id&&(this.id=b._id),this._sequenceNumber=a.sequenceNumber++,this._currentTime=0,this._startTime=null,this._paused=!1,this._playbackRate=1,this._inTimeline=!0,this._finishedFlag=!0,this.onfinish=null,this._finishHandlers=[],this._effect=b,this._inEffect=this._effect._update(0),this._idle=!0,this._currentTimePending=!1},b.Animation.prototype={_ensureAlive:function(){this.playbackRate<0&&0===this.currentTime?this._inEffect=this._effect._update(-1):this._inEffect=this._effect._update(this.currentTime),this._inTimeline||!this._inEffect&&this._finishedFlag||(this._inTimeline=!0,b.timeline._animations.push(this))},_tickCurrentTime:function(a,b){a!=this._currentTime&&(this._currentTime=a,this._isFinished&&!b&&(this._currentTime=this._playbackRate>0?this._totalDuration:0),this._ensureAlive())},get currentTime(){return this._idle||this._currentTimePending?null:this._currentTime},set currentTime(a){a=+a,isNaN(a)||(b.restart(),this._paused||null==this._startTime||(this._startTime=this._timeline.currentTime-a/this._playbackRate),this._currentTimePending=!1,this._currentTime!=a&&(this._idle&&(this._idle=!1,this._paused=!0),this._tickCurrentTime(a,!0),b.applyDirtiedAnimation(this)))},get startTime(){return this._startTime},set startTime(a){a=+a,isNaN(a)||this._paused||this._idle||(this._startTime=a,this._tickCurrentTime((this._timeline.currentTime-this._startTime)*this.playbackRate),b.applyDirtiedAnimation(this))},get playbackRate(){return this._playbackRate},set playbackRate(a){if(a!=this._playbackRate){var c=this.currentTime;this._playbackRate=a,this._startTime=null,"paused"!=this.playState&&"idle"!=this.playState&&(this._finishedFlag=!1,this._idle=!1,this._ensureAlive(),b.applyDirtiedAnimation(this)),null!=c&&(this.currentTime=c)}},get _isFinished(){return!this._idle&&(this._playbackRate>0&&this._currentTime>=this._totalDuration||this._playbackRate<0&&this._currentTime<=0)},get _totalDuration(){return this._effect._totalDuration},get playState(){return this._idle?"idle":null==this._startTime&&!this._paused&&0!=this.playbackRate||this._currentTimePending?"pending":this._paused?"paused":this._isFinished?"finished":"running"},_rewind:function(){if(this._playbackRate>=0)this._currentTime=0;else{if(!(this._totalDuration<1/0))throw new DOMException("Unable to rewind negative playback rate animation with infinite duration","InvalidStateError");this._currentTime=this._totalDuration}},play:function(){this._paused=!1,(this._isFinished||this._idle)&&(this._rewind(),this._startTime=null),this._finishedFlag=!1,this._idle=!1,this._ensureAlive(),b.applyDirtiedAnimation(this)},pause:function(){this._isFinished||this._paused||this._idle?this._idle&&(this._rewind(),this._idle=!1):this._currentTimePending=!0,this._startTime=null,this._paused=!0},finish:function(){this._idle||(this.currentTime=this._playbackRate>0?this._totalDuration:0,this._startTime=this._totalDuration-this.currentTime,this._currentTimePending=!1,b.applyDirtiedAnimation(this))},cancel:function(){this._inEffect&&(this._inEffect=!1,this._idle=!0,this._paused=!1,this._finishedFlag=!0,this._currentTime=0,this._startTime=null,this._effect._update(null),b.applyDirtiedAnimation(this))},reverse:function(){this.playbackRate*=-1,this.play()},addEventListener:function(a,b){"function"==typeof b&&"finish"==a&&this._finishHandlers.push(b)},removeEventListener:function(a,b){if("finish"==a){var c=this._finishHandlers.indexOf(b);c>=0&&this._finishHandlers.splice(c,1)}},_fireEvents:function(a){if(this._isFinished){if(!this._finishedFlag){var b=new d(this,this._currentTime,a),c=this._finishHandlers.concat(this.onfinish?[this.onfinish]:[]);setTimeout(function(){c.forEach(function(a){a.call(b.target,b)})},0),this._finishedFlag=!0}}else this._finishedFlag=!1},_tick:function(a,b){this._idle||this._paused||(null==this._startTime?b&&(this.startTime=a-this._currentTime/this.playbackRate):this._isFinished||this._tickCurrentTime((a-this._startTime)*this.playbackRate)),b&&(this._currentTimePending=!1,this._fireEvents(a))},get _needsTick(){return this.playState in{pending:1,running:1}||!this._finishedFlag},_targetAnimations:function(){var a=this._effect._target;return a._activeAnimations||(a._activeAnimations=[]),a._activeAnimations},_markTarget:function(){var a=this._targetAnimations();-1===a.indexOf(this)&&a.push(this)},_unmarkTarget:function(){var a=this._targetAnimations(),b=a.indexOf(this);-1!==b&&a.splice(b,1)}}}(a,b),function(a,b,c){function d(a){var b=j;j=[],a<q.currentTime&&(a=q.currentTime),q._animations.sort(e),q._animations=h(a,!0,q._animations)[0],b.forEach(function(b){b[1](a)}),g(),l=void 0}function e(a,b){return a._sequenceNumber-b._sequenceNumber}function f(){this._animations=[],this.currentTime=window.performance&&performance.now?performance.now():0}function g(){o.forEach(function(a){a()}),o.length=0}function h(a,c,d){p=!0,n=!1,b.timeline.currentTime=a,m=!1;var e=[],f=[],g=[],h=[];return d.forEach(function(b){b._tick(a,c),b._inEffect?(f.push(b._effect),b._markTarget()):(e.push(b._effect),b._unmarkTarget()),b._needsTick&&(m=!0);var d=b._inEffect||b._needsTick;b._inTimeline=d,d?g.push(b):h.push(b)}),o.push.apply(o,e),o.push.apply(o,f),m&&requestAnimationFrame(function(){}),p=!1,[g,h]}var i=window.requestAnimationFrame,j=[],k=0;window.requestAnimationFrame=function(a){var b=k++;return 0==j.length&&i(d),j.push([b,a]),b},window.cancelAnimationFrame=function(a){j.forEach(function(b){b[0]==a&&(b[1]=function(){})})},f.prototype={_play:function(c){c._timing=a.normalizeTimingInput(c.timing);var d=new b.Animation(c);return d._idle=!1,d._timeline=this,this._animations.push(d),b.restart(),b.applyDirtiedAnimation(d),d}};var l=void 0,m=!1,n=!1;b.restart=function(){return m||(m=!0,requestAnimationFrame(function(){}),n=!0),n},b.applyDirtiedAnimation=function(a){if(!p){a._markTarget();var c=a._targetAnimations();c.sort(e),h(b.timeline.currentTime,!1,c.slice())[1].forEach(function(a){var b=q._animations.indexOf(a);-1!==b&&q._animations.splice(b,1)}),g()}};var o=[],p=!1,q=new f;b.timeline=q}(a,b),function(a,b){function c(a,b){for(var c=0,d=0;d<a.length;d++)c+=a[d]*b[d];return c}function d(a,b){return[a[0]*b[0]+a[4]*b[1]+a[8]*b[2]+a[12]*b[3],a[1]*b[0]+a[5]*b[1]+a[9]*b[2]+a[13]*b[3],a[2]*b[0]+a[6]*b[1]+a[10]*b[2]+a[14]*b[3],a[3]*b[0]+a[7]*b[1]+a[11]*b[2]+a[15]*b[3],a[0]*b[4]+a[4]*b[5]+a[8]*b[6]+a[12]*b[7],a[1]*b[4]+a[5]*b[5]+a[9]*b[6]+a[13]*b[7],a[2]*b[4]+a[6]*b[5]+a[10]*b[6]+a[14]*b[7],a[3]*b[4]+a[7]*b[5]+a[11]*b[6]+a[15]*b[7],a[0]*b[8]+a[4]*b[9]+a[8]*b[10]+a[12]*b[11],a[1]*b[8]+a[5]*b[9]+a[9]*b[10]+a[13]*b[11],a[2]*b[8]+a[6]*b[9]+a[10]*b[10]+a[14]*b[11],a[3]*b[8]+a[7]*b[9]+a[11]*b[10]+a[15]*b[11],a[0]*b[12]+a[4]*b[13]+a[8]*b[14]+a[12]*b[15],a[1]*b[12]+a[5]*b[13]+a[9]*b[14]+a[13]*b[15],a[2]*b[12]+a[6]*b[13]+a[10]*b[14]+a[14]*b[15],a[3]*b[12]+a[7]*b[13]+a[11]*b[14]+a[15]*b[15]]}function e(a){var b=a.rad||0;return((a.deg||0)/360+(a.grad||0)/400+(a.turn||0))*(2*Math.PI)+b}function f(a){switch(a.t){case"rotatex":var b=e(a.d[0]);return[1,0,0,0,0,Math.cos(b),Math.sin(b),0,0,-Math.sin(b),Math.cos(b),0,0,0,0,1];case"rotatey":var b=e(a.d[0]);return[Math.cos(b),0,-Math.sin(b),0,0,1,0,0,Math.sin(b),0,Math.cos(b),0,0,0,0,1];case"rotate":case"rotatez":var b=e(a.d[0]);return[Math.cos(b),Math.sin(b),0,0,-Math.sin(b),Math.cos(b),0,0,0,0,1,0,0,0,0,1];case"rotate3d":var c=a.d[0],d=a.d[1],f=a.d[2],b=e(a.d[3]),g=c*c+d*d+f*f;if(0===g)c=1,d=0,f=0;else if(1!==g){var h=Math.sqrt(g);c/=h,d/=h,f/=h}var i=Math.sin(b/2),j=i*Math.cos(b/2),k=i*i;return[1-2*(d*d+f*f)*k,2*(c*d*k+f*j),2*(c*f*k-d*j),0,2*(c*d*k-f*j),1-2*(c*c+f*f)*k,2*(d*f*k+c*j),0,2*(c*f*k+d*j),2*(d*f*k-c*j),1-2*(c*c+d*d)*k,0,0,0,0,1];case"scale":return[a.d[0],0,0,0,0,a.d[1],0,0,0,0,1,0,0,0,0,1];case"scalex":return[a.d[0],0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"scaley":return[1,0,0,0,0,a.d[0],0,0,0,0,1,0,0,0,0,1];case"scalez":return[1,0,0,0,0,1,0,0,0,0,a.d[0],0,0,0,0,1];case"scale3d":return[a.d[0],0,0,0,0,a.d[1],0,0,0,0,a.d[2],0,0,0,0,1];case"skew":var l=e(a.d[0]),m=e(a.d[1]);return[1,Math.tan(m),0,0,Math.tan(l),1,0,0,0,0,1,0,0,0,0,1];case"skewx":var b=e(a.d[0]);return[1,0,0,0,Math.tan(b),1,0,0,0,0,1,0,0,0,0,1];case"skewy":var b=e(a.d[0]);return[1,Math.tan(b),0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"translate":var c=a.d[0].px||0,d=a.d[1].px||0;return[1,0,0,0,0,1,0,0,0,0,1,0,c,d,0,1];case"translatex":var c=a.d[0].px||0;return[1,0,0,0,0,1,0,0,0,0,1,0,c,0,0,1];case"translatey":var d=a.d[0].px||0;return[1,0,0,0,0,1,0,0,0,0,1,0,0,d,0,1];case"translatez":var f=a.d[0].px||0;return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,f,1];case"translate3d":var c=a.d[0].px||0,d=a.d[1].px||0,f=a.d[2].px||0;return[1,0,0,0,0,1,0,0,0,0,1,0,c,d,f,1];case"perspective":return[1,0,0,0,0,1,0,0,0,0,1,a.d[0].px?-1/a.d[0].px:0,0,0,0,1];case"matrix":return[a.d[0],a.d[1],0,0,a.d[2],a.d[3],0,0,0,0,1,0,a.d[4],a.d[5],0,1];case"matrix3d":return a.d}}function g(a){return 0===a.length?[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]:a.map(f).reduce(d)}function h(a){return[i(g(a))]}var i=function(){function a(a){return a[0][0]*a[1][1]*a[2][2]+a[1][0]*a[2][1]*a[0][2]+a[2][0]*a[0][1]*a[1][2]-a[0][2]*a[1][1]*a[2][0]-a[1][2]*a[2][1]*a[0][0]-a[2][2]*a[0][1]*a[1][0]}function b(b){for(var c=1/a(b),d=b[0][0],e=b[0][1],f=b[0][2],g=b[1][0],h=b[1][1],i=b[1][2],j=b[2][0],k=b[2][1],l=b[2][2],m=[[(h*l-i*k)*c,(f*k-e*l)*c,(e*i-f*h)*c,0],[(i*j-g*l)*c,(d*l-f*j)*c,(f*g-d*i)*c,0],[(g*k-h*j)*c,(j*e-d*k)*c,(d*h-e*g)*c,0]],n=[],o=0;o<3;o++){for(var p=0,q=0;q<3;q++)p+=b[3][q]*m[q][o];n.push(p)}return n.push(1),m.push(n),m}function d(a){return[[a[0][0],a[1][0],a[2][0],a[3][0]],[a[0][1],a[1][1],a[2][1],a[3][1]],[a[0][2],a[1][2],a[2][2],a[3][2]],[a[0][3],a[1][3],a[2][3],a[3][3]]]}function e(a,b){for(var c=[],d=0;d<4;d++){for(var e=0,f=0;f<4;f++)e+=a[f]*b[f][d];c.push(e)}return c}function f(a){var b=g(a);return[a[0]/b,a[1]/b,a[2]/b]}function g(a){return Math.sqrt(a[0]*a[0]+a[1]*a[1]+a[2]*a[2])}function h(a,b,c,d){return[c*a[0]+d*b[0],c*a[1]+d*b[1],c*a[2]+d*b[2]]}function i(a,b){return[a[1]*b[2]-a[2]*b[1],a[2]*b[0]-a[0]*b[2],a[0]*b[1]-a[1]*b[0]]}function j(j){var k=[j.slice(0,4),j.slice(4,8),j.slice(8,12),j.slice(12,16)];if(1!==k[3][3])return null;for(var l=[],m=0;m<4;m++)l.push(k[m].slice());for(var m=0;m<3;m++)l[m][3]=0;if(0===a(l))return null;var n,o=[];k[0][3]||k[1][3]||k[2][3]?(o.push(k[0][3]),o.push(k[1][3]),o.push(k[2][3]),o.push(k[3][3]),n=e(o,d(b(l)))):n=[0,0,0,1];var p=k[3].slice(0,3),q=[];q.push(k[0].slice(0,3));var r=[];r.push(g(q[0])),q[0]=f(q[0]);var s=[];q.push(k[1].slice(0,3)),s.push(c(q[0],q[1])),q[1]=h(q[1],q[0],1,-s[0]),r.push(g(q[1])),q[1]=f(q[1]),s[0]/=r[1],q.push(k[2].slice(0,3)),s.push(c(q[0],q[2])),q[2]=h(q[2],q[0],1,-s[1]),s.push(c(q[1],q[2])),q[2]=h(q[2],q[1],1,-s[2]),r.push(g(q[2])),q[2]=f(q[2]),s[1]/=r[2],s[2]/=r[2];var t=i(q[1],q[2]);if(c(q[0],t)<0)for(var m=0;m<3;m++)r[m]*=-1,q[m][0]*=-1,q[m][1]*=-1,q[m][2]*=-1;var u,v,w=q[0][0]+q[1][1]+q[2][2]+1;return w>1e-4?(u=.5/Math.sqrt(w),v=[(q[2][1]-q[1][2])*u,(q[0][2]-q[2][0])*u,(q[1][0]-q[0][1])*u,.25/u]):q[0][0]>q[1][1]&&q[0][0]>q[2][2]?(u=2*Math.sqrt(1+q[0][0]-q[1][1]-q[2][2]),v=[.25*u,(q[0][1]+q[1][0])/u,(q[0][2]+q[2][0])/u,(q[2][1]-q[1][2])/u]):q[1][1]>q[2][2]?(u=2*Math.sqrt(1+q[1][1]-q[0][0]-q[2][2]),v=[(q[0][1]+q[1][0])/u,.25*u,(q[1][2]+q[2][1])/u,(q[0][2]-q[2][0])/u]):(u=2*Math.sqrt(1+q[2][2]-q[0][0]-q[1][1]),v=[(q[0][2]+q[2][0])/u,(q[1][2]+q[2][1])/u,.25*u,(q[1][0]-q[0][1])/u]),[p,r,s,v,n]}return j}();a.dot=c,a.makeMatrixDecomposition=h,a.transformListToMatrix=g}(b),function(a){function b(a,b){var c=a.exec(b);if(c)return c=a.ignoreCase?c[0].toLowerCase():c[0],[c,b.substr(c.length)]}function c(a,b){b=b.replace(/^\s*/,"");var c=a(b);if(c)return[c[0],c[1].replace(/^\s*/,"")]}function d(a,d,e){a=c.bind(null,a);for(var f=[];;){var g=a(e);if(!g)return[f,e];if(f.push(g[0]),e=g[1],!(g=b(d,e))||""==g[1])return[f,e];e=g[1]}}function e(a,b){for(var c=0,d=0;d<b.length&&(!/\s|,/.test(b[d])||0!=c);d++)if("("==b[d])c++;else if(")"==b[d]&&(c--,0==c&&d++,c<=0))break;var e=a(b.substr(0,d));return void 0==e?void 0:[e,b.substr(d)]}function f(a,b){for(var c=a,d=b;c&&d;)c>d?c%=d:d%=c;return c=a*b/(c+d)}function g(a){return function(b){var c=a(b);return c&&(c[0]=void 0),c}}function h(a,b){return function(c){return a(c)||[b,c]}}function i(b,c){for(var d=[],e=0;e<b.length;e++){var f=a.consumeTrimmed(b[e],c);if(!f||""==f[0])return;void 0!==f[0]&&d.push(f[0]),c=f[1]}if(""==c)return d}function j(a,b,c,d,e){for(var g=[],h=[],i=[],j=f(d.length,e.length),k=0;k<j;k++){var l=b(d[k%d.length],e[k%e.length]);if(!l)return;g.push(l[0]),h.push(l[1]),i.push(l[2])}return[g,h,function(b){var d=b.map(function(a,b){return i[b](a)}).join(c);return a?a(d):d}]}function k(a,b,c){for(var d=[],e=[],f=[],g=0,h=0;h<c.length;h++)if("function"==typeof c[h]){var i=c[h](a[g],b[g++]);d.push(i[0]),e.push(i[1]),f.push(i[2])}else!function(a){d.push(!1),e.push(!1),f.push(function(){return c[a]})}(h);return[d,e,function(a){for(var b="",c=0;c<a.length;c++)b+=f[c](a[c]);return b}]}a.consumeToken=b,a.consumeTrimmed=c,a.consumeRepeated=d,a.consumeParenthesised=e,a.ignore=g,a.optional=h,a.consumeList=i,a.mergeNestedRepeated=j.bind(null,null),a.mergeWrappedNestedRepeated=j,a.mergeList=k}(b),function(a){function b(b){function c(b){var c=a.consumeToken(/^inset/i,b);return c?(d.inset=!0,c):(c=a.consumeLengthOrPercent(b))?(d.lengths.push(c[0]),c):(c=a.consumeColor(b),c?(d.color=c[0],c):void 0)}var d={inset:!1,lengths:[],color:null},e=a.consumeRepeated(c,/^/,b);if(e&&e[0].length)return[d,e[1]]}function c(c){var d=a.consumeRepeated(b,/^,/,c);if(d&&""==d[1])return d[0]}function d(b,c){for(;b.lengths.length<Math.max(b.lengths.length,c.lengths.length);)b.lengths.push({px:0});for(;c.lengths.length<Math.max(b.lengths.length,c.lengths.length);)c.lengths.push({px:0});if(b.inset==c.inset&&!!b.color==!!c.color){for(var d,e=[],f=[[],0],g=[[],0],h=0;h<b.lengths.length;h++){var i=a.mergeDimensions(b.lengths[h],c.lengths[h],2==h);f[0].push(i[0]),g[0].push(i[1]),e.push(i[2])}if(b.color&&c.color){var j=a.mergeColors(b.color,c.color);f[1]=j[0],g[1]=j[1],d=j[2]}return[f,g,function(a){for(var c=b.inset?"inset ":" ",f=0;f<e.length;f++)c+=e[f](a[0][f])+" ";return d&&(c+=d(a[1])),c}]}}function e(b,c,d,e){function f(a){return{inset:a,color:[0,0,0,0],lengths:[{px:0},{px:0},{px:0},{px:0}]}}for(var g=[],h=[],i=0;i<d.length||i<e.length;i++){var j=d[i]||f(e[i].inset),k=e[i]||f(d[i].inset);g.push(j),h.push(k)}return a.mergeNestedRepeated(b,c,g,h)}var f=e.bind(null,d,", ");a.addPropertiesHandler(c,f,["box-shadow","text-shadow"])}(b),function(a,b){function c(a){return a.toFixed(3).replace(/0+$/,"").replace(/\.$/,"")}function d(a,b,c){return Math.min(b,Math.max(a,c))}function e(a){if(/^\s*[-+]?(\d*\.)?\d+\s*$/.test(a))return Number(a)}function f(a,b){return[a,b,c]}function g(a,b){if(0!=a)return i(0,1/0)(a,b)}function h(a,b){return[a,b,function(a){return Math.round(d(1,1/0,a))}]}function i(a,b){return function(e,f){return[e,f,function(e){return c(d(a,b,e))}]}}function j(a){var b=a.trim().split(/\s*[\s,]\s*/);if(0!==b.length){for(var c=[],d=0;d<b.length;d++){var f=e(b[d]);if(void 0===f)return;c.push(f)}return c}}function k(a,b){if(a.length==b.length)return[a,b,function(a){return a.map(c).join(" ")}]}function l(a,b){return[a,b,Math.round]}a.clamp=d,a.addPropertiesHandler(j,k,["stroke-dasharray"]),a.addPropertiesHandler(e,i(0,1/0),["border-image-width","line-height"]),a.addPropertiesHandler(e,i(0,1),["opacity","shape-image-threshold"]),a.addPropertiesHandler(e,g,["flex-grow","flex-shrink"]),a.addPropertiesHandler(e,h,["orphans","widows"]),a.addPropertiesHandler(e,l,["z-index"]),a.parseNumber=e,a.parseNumberList=j,a.mergeNumbers=f,a.numberToString=c}(b),function(a,b){function c(a,b){if("visible"==a||"visible"==b)return[0,1,function(c){return c<=0?a:c>=1?b:"visible"}]}a.addPropertiesHandler(String,c,["visibility"])}(b),function(a,b){function c(a){a=a.trim(),f.fillStyle="#000",f.fillStyle=a;var b=f.fillStyle;if(f.fillStyle="#fff",f.fillStyle=a,b==f.fillStyle){f.fillRect(0,0,1,1);var c=f.getImageData(0,0,1,1).data;f.clearRect(0,0,1,1);var d=c[3]/255;return[c[0]*d,c[1]*d,c[2]*d,d]}}function d(b,c){return[b,c,function(b){function c(a){return Math.max(0,Math.min(255,a))}if(b[3])for(var d=0;d<3;d++)b[d]=Math.round(c(b[d]/b[3]));return b[3]=a.numberToString(a.clamp(0,1,b[3])),"rgba("+b.join(",")+")"}]}var e=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");e.width=e.height=1;var f=e.getContext("2d");a.addPropertiesHandler(c,d,["background-color","border-bottom-color","border-left-color","border-right-color","border-top-color","color","fill","flood-color","lighting-color","outline-color","stop-color","stroke","text-decoration-color"]),a.consumeColor=a.consumeParenthesised.bind(null,c),a.mergeColors=d}(b),function(a,b){function c(a){function b(){var b=h.exec(a);g=b?b[0]:void 0}function c(){var a=Number(g);return b(),a}function d(){if("("!==g)return c();b();var a=f();return")"!==g?NaN:(b(),a)}function e(){for(var a=d();"*"===g||"/"===g;){var c=g;b();var e=d();"*"===c?a*=e:a/=e}return a}function f(){for(var a=e();"+"===g||"-"===g;){var c=g;b();var d=e();"+"===c?a+=d:a-=d}return a}var g,h=/([\+\-\w\.]+|[\(\)\*\/])/g;return b(),f()}function d(a,b){if("0"==(b=b.trim().toLowerCase())&&"px".search(a)>=0)return{px:0};if(/^[^(]*$|^calc/.test(b)){b=b.replace(/calc\(/g,"(");var d={};b=b.replace(a,function(a){return d[a]=null,"U"+a});for(var e="U("+a.source+")",f=b.replace(/[-+]?(\d*\.)?\d+([Ee][-+]?\d+)?/g,"N").replace(new RegExp("N"+e,"g"),"D").replace(/\s[+-]\s/g,"O").replace(/\s/g,""),g=[/N\*(D)/g,/(N|D)[*\/]N/g,/(N|D)O\1/g,/\((N|D)\)/g],h=0;h<g.length;)g[h].test(f)?(f=f.replace(g[h],"$1"),h=0):h++;if("D"==f){for(var i in d){var j=c(b.replace(new RegExp("U"+i,"g"),"").replace(new RegExp(e,"g"),"*0"));if(!isFinite(j))return;d[i]=j}return d}}}function e(a,b){return f(a,b,!0)}function f(b,c,d){var e,f=[];for(e in b)f.push(e);for(e in c)f.indexOf(e)<0&&f.push(e);return b=f.map(function(a){return b[a]||0}),c=f.map(function(a){return c[a]||0}),[b,c,function(b){var c=b.map(function(c,e){return 1==b.length&&d&&(c=Math.max(c,0)),a.numberToString(c)+f[e]}).join(" + ");return b.length>1?"calc("+c+")":c}]}var g="px|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc",h=d.bind(null,new RegExp(g,"g")),i=d.bind(null,new RegExp(g+"|%","g")),j=d.bind(null,/deg|rad|grad|turn/g);a.parseLength=h,a.parseLengthOrPercent=i,a.consumeLengthOrPercent=a.consumeParenthesised.bind(null,i),a.parseAngle=j,a.mergeDimensions=f;var k=a.consumeParenthesised.bind(null,h),l=a.consumeRepeated.bind(void 0,k,/^/),m=a.consumeRepeated.bind(void 0,l,/^,/);a.consumeSizePairList=m;var n=function(a){var b=m(a);if(b&&""==b[1])return b[0]},o=a.mergeNestedRepeated.bind(void 0,e," "),p=a.mergeNestedRepeated.bind(void 0,o,",");a.mergeNonNegativeSizePair=o,a.addPropertiesHandler(n,p,["background-size"]),a.addPropertiesHandler(i,e,["border-bottom-width","border-image-width","border-left-width","border-right-width","border-top-width","flex-basis","font-size","height","line-height","max-height","max-width","outline-width","width"]),a.addPropertiesHandler(i,f,["border-bottom-left-radius","border-bottom-right-radius","border-top-left-radius","border-top-right-radius","bottom","left","letter-spacing","margin-bottom","margin-left","margin-right","margin-top","min-height","min-width","outline-offset","padding-bottom","padding-left","padding-right","padding-top","perspective","right","shape-margin","stroke-dashoffset","text-indent","top","vertical-align","word-spacing"])}(b),function(a,b){function c(b){return a.consumeLengthOrPercent(b)||a.consumeToken(/^auto/,b)}function d(b){var d=a.consumeList([a.ignore(a.consumeToken.bind(null,/^rect/)),a.ignore(a.consumeToken.bind(null,/^\(/)),a.consumeRepeated.bind(null,c,/^,/),a.ignore(a.consumeToken.bind(null,/^\)/))],b);if(d&&4==d[0].length)return d[0]}function e(b,c){return"auto"==b||"auto"==c?[!0,!1,function(d){var e=d?b:c;if("auto"==e)return"auto";var f=a.mergeDimensions(e,e);return f[2](f[0])}]:a.mergeDimensions(b,c)}function f(a){return"rect("+a+")"}var g=a.mergeWrappedNestedRepeated.bind(null,f,e,", ");a.parseBox=d,a.mergeBoxes=g,a.addPropertiesHandler(d,g,["clip"])}(b),function(a,b){function c(a){return function(b){var c=0;return a.map(function(a){return a===k?b[c++]:a})}}function d(a){return a}function e(b){if("none"==(b=b.toLowerCase().trim()))return[];for(var c,d=/\s*(\w+)\(([^)]*)\)/g,e=[],f=0;c=d.exec(b);){if(c.index!=f)return;f=c.index+c[0].length;var g=c[1],h=n[g];if(!h)return;var i=c[2].split(","),j=h[0];if(j.length<i.length)return;for(var k=[],o=0;o<j.length;o++){var p,q=i[o],r=j[o];if(void 0===(p=q?{A:function(b){return"0"==b.trim()?m:a.parseAngle(b)},N:a.parseNumber,T:a.parseLengthOrPercent,L:a.parseLength}[r.toUpperCase()](q):{a:m,n:k[0],t:l}[r]))return;k.push(p)}if(e.push({t:g,d:k}),d.lastIndex==b.length)return e}}function f(a){return a.toFixed(6).replace(".000000","")}function g(b,c){if(b.decompositionPair!==c){b.decompositionPair=c;var d=a.makeMatrixDecomposition(b)}if(c.decompositionPair!==b){c.decompositionPair=b;var e=a.makeMatrixDecomposition(c)}return null==d[0]||null==e[0]?[[!1],[!0],function(a){return a?c[0].d:b[0].d}]:(d[0].push(0),e[0].push(1),[d,e,function(b){var c=a.quat(d[0][3],e[0][3],b[5]);return a.composeMatrix(b[0],b[1],b[2],c,b[4]).map(f).join(",")}])}function h(a){return a.replace(/[xy]/,"")}function i(a){return a.replace(/(x|y|z|3d)?$/,"3d")}function j(b,c){var d=a.makeMatrixDecomposition&&!0,e=!1;if(!b.length||!c.length){b.length||(e=!0,b=c,c=[]);for(var f=0;f<b.length;f++){var j=b[f].t,k=b[f].d,l="scale"==j.substr(0,5)?1:0;c.push({t:j,d:k.map(function(a){if("number"==typeof a)return l;var b={};for(var c in a)b[c]=l;return b})})}}var m=function(a,b){return"perspective"==a&&"perspective"==b||("matrix"==a||"matrix3d"==a)&&("matrix"==b||"matrix3d"==b)},o=[],p=[],q=[];if(b.length!=c.length){if(!d)return;var r=g(b,c);o=[r[0]],p=[r[1]],q=[["matrix",[r[2]]]]}else for(var f=0;f<b.length;f++){var j,s=b[f].t,t=c[f].t,u=b[f].d,v=c[f].d,w=n[s],x=n[t];if(m(s,t)){if(!d)return;var r=g([b[f]],[c[f]]);o.push(r[0]),p.push(r[1]),q.push(["matrix",[r[2]]])}else{if(s==t)j=s;else if(w[2]&&x[2]&&h(s)==h(t))j=h(s),u=w[2](u),v=x[2](v);else{if(!w[1]||!x[1]||i(s)!=i(t)){if(!d)return;var r=g(b,c);o=[r[0]],p=[r[1]],q=[["matrix",[r[2]]]];break}j=i(s),u=w[1](u),v=x[1](v)}for(var y=[],z=[],A=[],B=0;B<u.length;B++){var C="number"==typeof u[B]?a.mergeNumbers:a.mergeDimensions,r=C(u[B],v[B]);y[B]=r[0],z[B]=r[1],A.push(r[2])}o.push(y),p.push(z),q.push([j,A])}}if(e){var D=o;o=p,p=D}return[o,p,function(a){return a.map(function(a,b){var c=a.map(function(a,c){return q[b][1][c](a)}).join(",");return"matrix"==q[b][0]&&16==c.split(",").length&&(q[b][0]="matrix3d"),q[b][0]+"("+c+")"}).join(" ")}]}var k=null,l={px:0},m={deg:0},n={matrix:["NNNNNN",[k,k,0,0,k,k,0,0,0,0,1,0,k,k,0,1],d],matrix3d:["NNNNNNNNNNNNNNNN",d],rotate:["A"],rotatex:["A"],rotatey:["A"],rotatez:["A"],rotate3d:["NNNA"],perspective:["L"],scale:["Nn",c([k,k,1]),d],scalex:["N",c([k,1,1]),c([k,1])],scaley:["N",c([1,k,1]),c([1,k])],scalez:["N",c([1,1,k])],scale3d:["NNN",d],skew:["Aa",null,d],skewx:["A",null,c([k,m])],skewy:["A",null,c([m,k])],translate:["Tt",c([k,k,l]),d],translatex:["T",c([k,l,l]),c([k,l])],translatey:["T",c([l,k,l]),c([l,k])],translatez:["L",c([l,l,k])],translate3d:["TTL",d]};a.addPropertiesHandler(e,j,["transform"]),a.transformToSvgMatrix=function(b){var c=a.transformListToMatrix(e(b));return"matrix("+f(c[0])+" "+f(c[1])+" "+f(c[4])+" "+f(c[5])+" "+f(c[12])+" "+f(c[13])+")"}}(b),function(a){function b(a){var b=Number(a);if(!(isNaN(b)||b<100||b>900||b%100!=0))return b}function c(b){return b=100*Math.round(b/100),b=a.clamp(100,900,b),400===b?"normal":700===b?"bold":String(b)}function d(a,b){return[a,b,c]}a.addPropertiesHandler(b,d,["font-weight"])}(b),function(a){function b(a){var b={};for(var c in a)b[c]=-a[c];return b}function c(b){return a.consumeToken(/^(left|center|right|top|bottom)\b/i,b)||a.consumeLengthOrPercent(b)}function d(b,d){var e=a.consumeRepeated(c,/^/,d);if(e&&""==e[1]){var f=e[0];if(f[0]=f[0]||"center",f[1]=f[1]||"center",3==b&&(f[2]=f[2]||{px:0}),f.length==b){if(/top|bottom/.test(f[0])||/left|right/.test(f[1])){var h=f[0];f[0]=f[1],f[1]=h}if(/left|right|center|Object/.test(f[0])&&/top|bottom|center|Object/.test(f[1]))return f.map(function(a){return"object"==typeof a?a:g[a]})}}}function e(d){var e=a.consumeRepeated(c,/^/,d);if(e){for(var f=e[0],h=[{"%":50},{"%":50}],i=0,j=!1,k=0;k<f.length;k++){var l=f[k];"string"==typeof l?(j=/bottom|right/.test(l),i={left:0,right:0,center:i,top:1,bottom:1}[l],h[i]=g[l],"center"==l&&i++):(j&&(l=b(l),l["%"]=(l["%"]||0)+100),h[i]=l,i++,j=!1)}return[h,e[1]]}}function f(b){var c=a.consumeRepeated(e,/^,/,b);if(c&&""==c[1])return c[0]}var g={left:{"%":0},center:{"%":50},right:{"%":100},top:{"%":0},bottom:{"%":100}},h=a.mergeNestedRepeated.bind(null,a.mergeDimensions," ");a.addPropertiesHandler(d.bind(null,3),h,["transform-origin"]),a.addPropertiesHandler(d.bind(null,2),h,["perspective-origin"]),a.consumePosition=e,a.mergeOffsetList=h;var i=a.mergeNestedRepeated.bind(null,h,", ");a.addPropertiesHandler(f,i,["background-position","object-position"])}(b),function(a){function b(b){var c=a.consumeToken(/^circle/,b);if(c&&c[0])return["circle"].concat(a.consumeList([a.ignore(a.consumeToken.bind(void 0,/^\(/)),d,a.ignore(a.consumeToken.bind(void 0,/^at/)),a.consumePosition,a.ignore(a.consumeToken.bind(void 0,/^\)/))],c[1]));var f=a.consumeToken(/^ellipse/,b);if(f&&f[0])return["ellipse"].concat(a.consumeList([a.ignore(a.consumeToken.bind(void 0,/^\(/)),e,a.ignore(a.consumeToken.bind(void 0,/^at/)),a.consumePosition,a.ignore(a.consumeToken.bind(void 0,/^\)/))],f[1]));var g=a.consumeToken(/^polygon/,b);return g&&g[0]?["polygon"].concat(a.consumeList([a.ignore(a.consumeToken.bind(void 0,/^\(/)),a.optional(a.consumeToken.bind(void 0,/^nonzero\s*,|^evenodd\s*,/),"nonzero,"),a.consumeSizePairList,a.ignore(a.consumeToken.bind(void 0,/^\)/))],g[1])):void 0}function c(b,c){if(b[0]===c[0])return"circle"==b[0]?a.mergeList(b.slice(1),c.slice(1),["circle(",a.mergeDimensions," at ",a.mergeOffsetList,")"]):"ellipse"==b[0]?a.mergeList(b.slice(1),c.slice(1),["ellipse(",a.mergeNonNegativeSizePair," at ",a.mergeOffsetList,")"]):"polygon"==b[0]&&b[1]==c[1]?a.mergeList(b.slice(2),c.slice(2),["polygon(",b[1],g,")"]):void 0}var d=a.consumeParenthesised.bind(null,a.parseLengthOrPercent),e=a.consumeRepeated.bind(void 0,d,/^/),f=a.mergeNestedRepeated.bind(void 0,a.mergeDimensions," "),g=a.mergeNestedRepeated.bind(void 0,f,",");a.addPropertiesHandler(b,c,["shape-outside"])}(b),function(a,b){function c(a,b){b.concat([a]).forEach(function(b){b in document.documentElement.style&&(d[a]=b),e[b]=a})}var d={},e={};c("transform",["webkitTransform","msTransform"]),c("transformOrigin",["webkitTransformOrigin"]),c("perspective",["webkitPerspective"]),c("perspectiveOrigin",["webkitPerspectiveOrigin"]),a.propertyName=function(a){return d[a]||a},a.unprefixedPropertyName=function(a){return e[a]||a}}(b)}(),function(){if(void 0===document.createElement("div").animate([]).oncancel){var a;if(window.performance&&performance.now)var a=function(){return performance.now()};else var a=function(){return Date.now()};var b=function(a,b,c){this.target=a,this.currentTime=b,this.timelineTime=c,this.type="cancel",this.bubbles=!1,this.cancelable=!1,this.currentTarget=a,this.defaultPrevented=!1,this.eventPhase=Event.AT_TARGET,this.timeStamp=Date.now()},c=window.Element.prototype.animate;window.Element.prototype.animate=function(d,e){var f=c.call(this,d,e);f._cancelHandlers=[],f.oncancel=null;var g=f.cancel;f.cancel=function(){g.call(this);var c=new b(this,null,a()),d=this._cancelHandlers.concat(this.oncancel?[this.oncancel]:[]);setTimeout(function(){d.forEach(function(a){a.call(c.target,c)})},0)};var h=f.addEventListener;f.addEventListener=function(a,b){"function"==typeof b&&"cancel"==a?this._cancelHandlers.push(b):h.call(this,a,b)};var i=f.removeEventListener;return f.removeEventListener=function(a,b){if("cancel"==a){var c=this._cancelHandlers.indexOf(b);c>=0&&this._cancelHandlers.splice(c,1)}else i.call(this,a,b)},f}}}(),function(a){var b=document.documentElement,c=null,d=!1;try{var e=getComputedStyle(b).getPropertyValue("opacity"),f="0"==e?"1":"0";c=b.animate({opacity:[f,f]},{duration:1}),c.currentTime=0,d=getComputedStyle(b).getPropertyValue("opacity")==f}catch(a){}finally{c&&c.cancel()}if(!d){var g=window.Element.prototype.animate;window.Element.prototype.animate=function(b,c){return window.Symbol&&Symbol.iterator&&Array.prototype.from&&b[Symbol.iterator]&&(b=Array.from(b)),Array.isArray(b)||null===b||(b=a.convertToArrayForm(b)),g.call(this,b,c)}}}(a)}();
//# sourceMappingURL=web-animations.min.js.map
/***/ }),
/***/ "6fhQ":
/*!**************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.array.sort.js ***!
\**************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var aFunction = __webpack_require__(/*! ../internals/a-function */ "Neub");
var toObject = __webpack_require__(/*! ../internals/to-object */ "VCQ8");
var fails = __webpack_require__(/*! ../internals/fails */ "rG8t");
var arrayMethodIsStrict = __webpack_require__(/*! ../internals/array-method-is-strict */ "6CJb");
var test = [];
var nativeSort = test.sort;
// IE8-
var FAILS_ON_UNDEFINED = fails(function () {
test.sort(undefined);
});
// V8 bug
var FAILS_ON_NULL = fails(function () {
test.sort(null);
});
// Old WebKit
var STRICT_METHOD = arrayMethodIsStrict('sort');
var FORCED = FAILS_ON_UNDEFINED || !FAILS_ON_NULL || !STRICT_METHOD;
// `Array.prototype.sort` method
// https://tc39.github.io/ecma262/#sec-array.prototype.sort
$({ target: 'Array', proto: true, forced: FORCED }, {
sort: function sort(comparefn) {
return comparefn === undefined
? nativeSort.call(toObject(this))
: nativeSort.call(toObject(this), aFunction(comparefn));
}
});
/***/ }),
/***/ "6lQQ":
/*!******************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.array.index-of.js ***!
\******************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var $indexOf = __webpack_require__(/*! ../internals/array-includes */ "OXtp").indexOf;
var arrayMethodIsStrict = __webpack_require__(/*! ../internals/array-method-is-strict */ "6CJb");
var arrayMethodUsesToLength = __webpack_require__(/*! ../internals/array-method-uses-to-length */ "w2hq");
var nativeIndexOf = [].indexOf;
var NEGATIVE_ZERO = !!nativeIndexOf && 1 / [1].indexOf(1, -0) < 0;
var STRICT_METHOD = arrayMethodIsStrict('indexOf');
var USES_TO_LENGTH = arrayMethodUsesToLength('indexOf', { ACCESSORS: true, 1: 0 });
// `Array.prototype.indexOf` method
// https://tc39.github.io/ecma262/#sec-array.prototype.indexof
$({ target: 'Array', proto: true, forced: NEGATIVE_ZERO || !STRICT_METHOD || !USES_TO_LENGTH }, {
indexOf: function indexOf(searchElement /* , fromIndex = 0 */) {
return NEGATIVE_ZERO
// convert -0 to +0
? nativeIndexOf.apply(this, arguments) || 0
: $indexOf(this, searchElement, arguments.length > 1 ? arguments[1] : undefined);
}
});
/***/ }),
/***/ "6oxo":
/*!*************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.math.log2.js ***!
\*************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var log = Math.log;
var LN2 = Math.LN2;
// `Math.log2` method
// https://tc39.github.io/ecma262/#sec-math.log2
$({ target: 'Math', stat: true }, {
log2: function log2(x) {
return log(x) / LN2;
}
});
/***/ }),
/***/ "6q6p":
/*!***************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.array.slice.js ***!
\***************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var isObject = __webpack_require__(/*! ../internals/is-object */ "6XUM");
var isArray = __webpack_require__(/*! ../internals/is-array */ "erNl");
var toAbsoluteIndex = __webpack_require__(/*! ../internals/to-absolute-index */ "7Oj1");
var toLength = __webpack_require__(/*! ../internals/to-length */ "xpLY");
var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ "EMtK");
var createProperty = __webpack_require__(/*! ../internals/create-property */ "DYg9");
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "m41k");
var arrayMethodHasSpeciesSupport = __webpack_require__(/*! ../internals/array-method-has-species-support */ "lRyB");
var arrayMethodUsesToLength = __webpack_require__(/*! ../internals/array-method-uses-to-length */ "w2hq");
var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('slice');
var USES_TO_LENGTH = arrayMethodUsesToLength('slice', { ACCESSORS: true, 0: 0, 1: 2 });
var SPECIES = wellKnownSymbol('species');
var nativeSlice = [].slice;
var max = Math.max;
// `Array.prototype.slice` method
// https://tc39.github.io/ecma262/#sec-array.prototype.slice
// fallback for not array-like ES3 strings and DOM objects
$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT || !USES_TO_LENGTH }, {
slice: function slice(start, end) {
var O = toIndexedObject(this);
var length = toLength(O.length);
var k = toAbsoluteIndex(start, length);
var fin = toAbsoluteIndex(end === undefined ? length : end, length);
// inline `ArraySpeciesCreate` for usage native `Array#slice` where it's possible
var Constructor, result, n;
if (isArray(O)) {
Constructor = O.constructor;
// cross-realm fallback
if (typeof Constructor == 'function' && (Constructor === Array || isArray(Constructor.prototype))) {
Constructor = undefined;
} else if (isObject(Constructor)) {
Constructor = Constructor[SPECIES];
if (Constructor === null) Constructor = undefined;
}
if (Constructor === Array || Constructor === undefined) {
return nativeSlice.call(O, k, fin);
}
}
result = new (Constructor === undefined ? Array : Constructor)(max(fin - k, 0));
for (n = 0; k < fin; k++, n++) if (k in O) createProperty(result, n, O[k]);
result.length = n;
return result;
}
});
/***/ }),
/***/ "6urC":
/*!*****************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/inspect-source.js ***!
\*****************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var store = __webpack_require__(/*! ../internals/shared-store */ "KBkW");
var functionToString = Function.toString;
// this helper broken in `3.4.1-3.4.4`, so we can't use `shared` helper
if (typeof store.inspectSource != 'function') {
store.inspectSource = function (it) {
return functionToString.call(it);
};
}
module.exports = store.inspectSource;
/***/ }),
/***/ "7/lX":
/*!**************************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/object-set-prototype-of.js ***!
\**************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var anObject = __webpack_require__(/*! ../internals/an-object */ "F26l");
var aPossiblePrototype = __webpack_require__(/*! ../internals/a-possible-prototype */ "JI1L");
// `Object.setPrototypeOf` method
// https://tc39.github.io/ecma262/#sec-object.setprototypeof
// Works with __proto__ only. Old v8 can't work with null proto objects.
/* eslint-disable no-proto */
module.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () {
var CORRECT_SETTER = false;
var test = {};
var setter;
try {
setter = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set;
setter.call(test, []);
CORRECT_SETTER = test instanceof Array;
} catch (error) { /* empty */ }
return function setPrototypeOf(O, proto) {
anObject(O);
aPossiblePrototype(proto);
if (CORRECT_SETTER) setter.call(O, proto);
else O.__proto__ = proto;
return O;
};
}() : undefined);
/***/ }),
/***/ "76gj":
/*!***********************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/own-keys.js ***!
\***********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "Ew/G");
var getOwnPropertyNamesModule = __webpack_require__(/*! ../internals/object-get-own-property-names */ "KkqW");
var getOwnPropertySymbolsModule = __webpack_require__(/*! ../internals/object-get-own-property-symbols */ "busr");
var anObject = __webpack_require__(/*! ../internals/an-object */ "F26l");
// all object keys, includes non-enumerable and symbols
module.exports = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
var keys = getOwnPropertyNamesModule.f(anObject(it));
var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys;
};
/***/ }),
/***/ "7Oj1":
/*!********************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/to-absolute-index.js ***!
\********************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var toInteger = __webpack_require__(/*! ../internals/to-integer */ "vDBE");
var max = Math.max;
var min = Math.min;
// Helper for a popular repeating case of the spec:
// Let integer be ? ToInteger(index).
// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
module.exports = function (index, length) {
var integer = toInteger(index);
return integer < 0 ? max(integer + length, 0) : min(integer, length);
};
/***/ }),
/***/ "7aOP":
/*!******************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/promise-resolve.js ***!
\******************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var anObject = __webpack_require__(/*! ../internals/an-object */ "F26l");
var isObject = __webpack_require__(/*! ../internals/is-object */ "6XUM");
var newPromiseCapability = __webpack_require__(/*! ../internals/new-promise-capability */ "oB0/");
module.exports = function (C, x) {
anObject(C);
if (isObject(x) && x.constructor === C) return x;
var promiseCapability = newPromiseCapability.f(C);
var resolve = promiseCapability.resolve;
resolve(x);
return promiseCapability.promise;
};
/***/ }),
/***/ "7gGY":
/*!*************************************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/object-get-own-property-descriptor.js ***!
\*************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "T69T");
var propertyIsEnumerableModule = __webpack_require__(/*! ../internals/object-property-is-enumerable */ "gn9T");
var createPropertyDescriptor = __webpack_require__(/*! ../internals/create-property-descriptor */ "uSMZ");
var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ "EMtK");
var toPrimitive = __webpack_require__(/*! ../internals/to-primitive */ "LdO1");
var has = __webpack_require__(/*! ../internals/has */ "OG5q");
var IE8_DOM_DEFINE = __webpack_require__(/*! ../internals/ie8-dom-define */ "XdSI");
var nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
// `Object.getOwnPropertyDescriptor` method
// https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptor
exports.f = DESCRIPTORS ? nativeGetOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
O = toIndexedObject(O);
P = toPrimitive(P, true);
if (IE8_DOM_DEFINE) try {
return nativeGetOwnPropertyDescriptor(O, P);
} catch (error) { /* empty */ }
if (has(O, P)) return createPropertyDescriptor(!propertyIsEnumerableModule.f.call(O, P), O[P]);
};
/***/ }),
/***/ "8+YH":
/*!*****************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.symbol.search.js ***!
\*****************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var defineWellKnownSymbol = __webpack_require__(/*! ../internals/define-well-known-symbol */ "94Vg");
// `Symbol.search` well-known symbol
// https://tc39.github.io/ecma262/#sec-symbol.search
defineWellKnownSymbol('search');
/***/ }),
/***/ "815a":
/*!**********************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.symbol.unscopables.js ***!
\**********************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var defineWellKnownSymbol = __webpack_require__(/*! ../internals/define-well-known-symbol */ "94Vg");
// `Symbol.unscopables` well-known symbol
// https://tc39.github.io/ecma262/#sec-symbol.unscopables
defineWellKnownSymbol('unscopables');
/***/ }),
/***/ "8B3Q":
/*!****************************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.reflect.set-prototype-of.js ***!
\****************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var anObject = __webpack_require__(/*! ../internals/an-object */ "F26l");
var aPossiblePrototype = __webpack_require__(/*! ../internals/a-possible-prototype */ "JI1L");
var objectSetPrototypeOf = __webpack_require__(/*! ../internals/object-set-prototype-of */ "7/lX");
// `Reflect.setPrototypeOf` method
// https://tc39.github.io/ecma262/#sec-reflect.setprototypeof
if (objectSetPrototypeOf) $({ target: 'Reflect', stat: true }, {
setPrototypeOf: function setPrototypeOf(target, proto) {
anObject(target);
aPossiblePrototype(proto);
try {
objectSetPrototypeOf(target, proto);
return true;
} catch (error) {
return false;
}
}
});
/***/ }),
/***/ "8CeQ":
/*!**********************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.json.to-string-tag.js ***!
\**********************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__(/*! ../internals/global */ "ocAm");
var setToStringTag = __webpack_require__(/*! ../internals/set-to-string-tag */ "shqn");
// JSON[@@toStringTag] property
// https://tc39.github.io/ecma262/#sec-json-@@tostringtag
setToStringTag(global.JSON, 'JSON', true);
/***/ }),
/***/ "8aNu":
/*!***************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/redefine-all.js ***!
\***************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var redefine = __webpack_require__(/*! ../internals/redefine */ "2MGJ");
module.exports = function (target, src, options) {
for (var key in src) redefine(target, key, src[key], options);
return target;
};
/***/ }),
/***/ "8iOR":
/*!**************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.math.atanh.js ***!
\**************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var nativeAtanh = Math.atanh;
var log = Math.log;
// `Math.atanh` method
// https://tc39.github.io/ecma262/#sec-math.atanh
// Tor Browser bug: Math.atanh(-0) -> 0
$({ target: 'Math', stat: true, forced: !(nativeAtanh && 1 / nativeAtanh(-0) < 0) }, {
atanh: function atanh(x) {
return (x = +x) == 0 ? x : log((1 + x) / (1 - x)) / 2;
}
});
/***/ }),
/***/ "8xKV":
/*!*******************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.number.to-fixed.js ***!
\*******************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var toInteger = __webpack_require__(/*! ../internals/to-integer */ "vDBE");
var thisNumberValue = __webpack_require__(/*! ../internals/this-number-value */ "hH+7");
var repeat = __webpack_require__(/*! ../internals/string-repeat */ "EMWV");
var fails = __webpack_require__(/*! ../internals/fails */ "rG8t");
var nativeToFixed = 1.0.toFixed;
var floor = Math.floor;
var pow = function (x, n, acc) {
return n === 0 ? acc : n % 2 === 1 ? pow(x, n - 1, acc * x) : pow(x * x, n / 2, acc);
};
var log = function (x) {
var n = 0;
var x2 = x;
while (x2 >= 4096) {
n += 12;
x2 /= 4096;
}
while (x2 >= 2) {
n += 1;
x2 /= 2;
} return n;
};
var FORCED = nativeToFixed && (
0.00008.toFixed(3) !== '0.000' ||
0.9.toFixed(0) !== '1' ||
1.255.toFixed(2) !== '1.25' ||
1000000000000000128.0.toFixed(0) !== '1000000000000000128'
) || !fails(function () {
// V8 ~ Android 4.3-
nativeToFixed.call({});
});
// `Number.prototype.toFixed` method
// https://tc39.github.io/ecma262/#sec-number.prototype.tofixed
$({ target: 'Number', proto: true, forced: FORCED }, {
// eslint-disable-next-line max-statements
toFixed: function toFixed(fractionDigits) {
var number = thisNumberValue(this);
var fractDigits = toInteger(fractionDigits);
var data = [0, 0, 0, 0, 0, 0];
var sign = '';
var result = '0';
var e, z, j, k;
var multiply = function (n, c) {
var index = -1;
var c2 = c;
while (++index < 6) {
c2 += n * data[index];
data[index] = c2 % 1e7;
c2 = floor(c2 / 1e7);
}
};
var divide = function (n) {
var index = 6;
var c = 0;
while (--index >= 0) {
c += data[index];
data[index] = floor(c / n);
c = (c % n) * 1e7;
}
};
var dataToString = function () {
var index = 6;
var s = '';
while (--index >= 0) {
if (s !== '' || index === 0 || data[index] !== 0) {
var t = String(data[index]);
s = s === '' ? t : s + repeat.call('0', 7 - t.length) + t;
}
} return s;
};
if (fractDigits < 0 || fractDigits > 20) throw RangeError('Incorrect fraction digits');
// eslint-disable-next-line no-self-compare
if (number != number) return 'NaN';
if (number <= -1e21 || number >= 1e21) return String(number);
if (number < 0) {
sign = '-';
number = -number;
}
if (number > 1e-21) {
e = log(number * pow(2, 69, 1)) - 69;
z = e < 0 ? number * pow(2, -e, 1) : number / pow(2, e, 1);
z *= 0x10000000000000;
e = 52 - e;
if (e > 0) {
multiply(0, z);
j = fractDigits;
while (j >= 7) {
multiply(1e7, 0);
j -= 7;
}
multiply(pow(10, j, 1), 0);
j = e - 1;
while (j >= 23) {
divide(1 << 23);
j -= 23;
}
divide(1 << j);
multiply(1, 1);
divide(2);
result = dataToString();
} else {
multiply(0, z);
multiply(1 << -e, 0);
result = dataToString() + repeat.call('0', fractDigits);
}
}
if (fractDigits > 0) {
k = result.length;
result = sign + (k <= fractDigits
? '0.' + repeat.call('0', fractDigits - k) + result
: result.slice(0, k - fractDigits) + '.' + result.slice(k - fractDigits));
} else {
result = sign + result;
} return result;
}
});
/***/ }),
/***/ "8ydS":
/*!************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.date.now.js ***!
\************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
// `Date.now` method
// https://tc39.github.io/ecma262/#sec-date.now
$({ target: 'Date', stat: true }, {
now: function now() {
return new Date().getTime();
}
});
/***/ }),
/***/ "93I0":
/*!******************************************************!*\
!*** ./node_modules/core-js/internals/shared-key.js ***!
\******************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var shared = __webpack_require__(/*! ../internals/shared */ "VpIT");
var uid = __webpack_require__(/*! ../internals/uid */ "kOOl");
var keys = shared('keys');
module.exports = function (key) {
return keys[key] || (keys[key] = uid(key));
};
/***/ }),
/***/ "94Vg":
/*!***************************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/define-well-known-symbol.js ***!
\***************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var path = __webpack_require__(/*! ../internals/path */ "E7aN");
var has = __webpack_require__(/*! ../internals/has */ "OG5q");
var wrappedWellKnownSymbolModule = __webpack_require__(/*! ../internals/well-known-symbol-wrapped */ "aGCb");
var defineProperty = __webpack_require__(/*! ../internals/object-define-property */ "/Ybd").f;
module.exports = function (NAME) {
var Symbol = path.Symbol || (path.Symbol = {});
if (!has(Symbol, NAME)) defineProperty(Symbol, NAME, {
value: wrappedWellKnownSymbolModule.f(NAME)
});
};
/***/ }),
/***/ "9kNm":
/*!***********************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.symbol.to-primitive.js ***!
\***********************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var defineWellKnownSymbol = __webpack_require__(/*! ../internals/define-well-known-symbol */ "94Vg");
// `Symbol.toPrimitive` well-known symbol
// https://tc39.github.io/ecma262/#sec-symbol.toprimitive
defineWellKnownSymbol('toPrimitive');
/***/ }),
/***/ "A1Hp":
/*!*********************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/add-to-unscopables.js ***!
\*********************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "m41k");
var create = __webpack_require__(/*! ../internals/object-create */ "2RDa");
var definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ "/Ybd");
var UNSCOPABLES = wellKnownSymbol('unscopables');
var ArrayPrototype = Array.prototype;
// Array.prototype[@@unscopables]
// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
if (ArrayPrototype[UNSCOPABLES] == undefined) {
definePropertyModule.f(ArrayPrototype, UNSCOPABLES, {
configurable: true,
value: create(null)
});
}
// add a key to Array.prototype[@@unscopables]
module.exports = function (key) {
ArrayPrototype[UNSCOPABLES][key] = true;
};
/***/ }),
/***/ "A7hN":
/*!***************************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.object.get-prototype-of.js ***!
\***************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var fails = __webpack_require__(/*! ../internals/fails */ "rG8t");
var toObject = __webpack_require__(/*! ../internals/to-object */ "VCQ8");
var nativeGetPrototypeOf = __webpack_require__(/*! ../internals/object-get-prototype-of */ "wIVT");
var CORRECT_PROTOTYPE_GETTER = __webpack_require__(/*! ../internals/correct-prototype-getter */ "cwa4");
var FAILS_ON_PRIMITIVES = fails(function () { nativeGetPrototypeOf(1); });
// `Object.getPrototypeOf` method
// https://tc39.github.io/ecma262/#sec-object.getprototypeof
$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES, sham: !CORRECT_PROTOTYPE_GETTER }, {
getPrototypeOf: function getPrototypeOf(it) {
return nativeGetPrototypeOf(toObject(it));
}
});
/***/ }),
/***/ "Ay+M":
/*!***************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.parse-float.js ***!
\***************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var parseFloatImplementation = __webpack_require__(/*! ../internals/number-parse-float */ "vZCr");
// `parseFloat` method
// https://tc39.github.io/ecma262/#sec-parsefloat-string
$({ global: true, forced: parseFloat != parseFloatImplementation }, {
parseFloat: parseFloatImplementation
});
/***/ }),
/***/ "BTho":
/*!*********************************************************!*\
!*** ./node_modules/core-js/internals/function-bind.js ***!
\*********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var aFunction = __webpack_require__(/*! ../internals/a-function */ "HAuM");
var isObject = __webpack_require__(/*! ../internals/is-object */ "hh1v");
var slice = [].slice;
var factories = {};
var construct = function (C, argsLength, args) {
if (!(argsLength in factories)) {
for (var list = [], i = 0; i < argsLength; i++) list[i] = 'a[' + i + ']';
// eslint-disable-next-line no-new-func
factories[argsLength] = Function('C,a', 'return new C(' + list.join(',') + ')');
} return factories[argsLength](C, args);
};
// `Function.prototype.bind` method implementation
// https://tc39.github.io/ecma262/#sec-function.prototype.bind
module.exports = Function.bind || function bind(that /* , ...args */) {
var fn = aFunction(this);
var partArgs = slice.call(arguments, 1);
var boundFunction = function bound(/* args... */) {
var args = partArgs.concat(slice.call(arguments));
return this instanceof boundFunction ? construct(fn, args.length, args) : fn.apply(that, args);
};
if (isObject(fn.prototype)) boundFunction.prototype = fn.prototype;
return boundFunction;
};
/***/ }),
/***/ "BaTD":
/*!*****************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.string.repeat.js ***!
\*****************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var repeat = __webpack_require__(/*! ../internals/string-repeat */ "EMWV");
// `String.prototype.repeat` method
// https://tc39.github.io/ecma262/#sec-string.prototype.repeat
$({ target: 'String', proto: true }, {
repeat: repeat
});
/***/ }),
/***/ "BcWx":
/*!************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.array.of.js ***!
\************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var fails = __webpack_require__(/*! ../internals/fails */ "rG8t");
var createProperty = __webpack_require__(/*! ../internals/create-property */ "DYg9");
var ISNT_GENERIC = fails(function () {
function F() { /* empty */ }
return !(Array.of.call(F) instanceof F);
});
// `Array.of` method
// https://tc39.github.io/ecma262/#sec-array.of
// WebKit Array.of isn't generic
$({ target: 'Array', stat: true, forced: ISNT_GENERIC }, {
of: function of(/* ...args */) {
var index = 0;
var argumentsLength = arguments.length;
var result = new (typeof this == 'function' ? this : Array)(argumentsLength);
while (argumentsLength > index) createProperty(result, index, arguments[index++]);
result.length = argumentsLength;
return result;
}
});
/***/ }),
/***/ "BlSG":
/*!*************************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.reflect.is-extensible.js ***!
\*************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var anObject = __webpack_require__(/*! ../internals/an-object */ "F26l");
var objectIsExtensible = Object.isExtensible;
// `Reflect.isExtensible` method
// https://tc39.github.io/ecma262/#sec-reflect.isextensible
$({ target: 'Reflect', stat: true }, {
isExtensible: function isExtensible(target) {
anObject(target);
return objectIsExtensible ? objectIsExtensible(target) : true;
}
});
/***/ }),
/***/ "BnCb":
/*!*************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.math.sign.js ***!
\*************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var sign = __webpack_require__(/*! ../internals/math-sign */ "n/2t");
// `Math.sign` method
// https://tc39.github.io/ecma262/#sec-math.sign
$({ target: 'Math', stat: true }, {
sign: sign
});
/***/ }),
/***/ "Bs8V":
/*!******************************************************************************!*\
!*** ./node_modules/core-js/internals/object-get-own-property-descriptor.js ***!
\******************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "g6v/");
var propertyIsEnumerableModule = __webpack_require__(/*! ../internals/object-property-is-enumerable */ "0eef");
var createPropertyDescriptor = __webpack_require__(/*! ../internals/create-property-descriptor */ "XGwC");
var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ "/GqU");
var toPrimitive = __webpack_require__(/*! ../internals/to-primitive */ "wE6v");
var has = __webpack_require__(/*! ../internals/has */ "UTVS");
var IE8_DOM_DEFINE = __webpack_require__(/*! ../internals/ie8-dom-define */ "DPsx");
var nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
// `Object.getOwnPropertyDescriptor` method
// https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptor
exports.f = DESCRIPTORS ? nativeGetOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
O = toIndexedObject(O);
P = toPrimitive(P, true);
if (IE8_DOM_DEFINE) try {
return nativeGetOwnPropertyDescriptor(O, P);
} catch (error) { /* empty */ }
if (has(O, P)) return createPropertyDescriptor(!propertyIsEnumerableModule.f.call(O, P), O[P]);
};
/***/ }),
/***/ "COcp":
/*!*********************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.number.is-integer.js ***!
\*********************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var isInteger = __webpack_require__(/*! ../internals/is-integer */ "Nvxz");
// `Number.isInteger` method
// https://tc39.github.io/ecma262/#sec-number.isinteger
$({ target: 'Number', stat: true }, {
isInteger: isInteger
});
/***/ }),
/***/ "CW9j":
/*!********************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/date-to-primitive.js ***!
\********************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var anObject = __webpack_require__(/*! ../internals/an-object */ "F26l");
var toPrimitive = __webpack_require__(/*! ../internals/to-primitive */ "LdO1");
module.exports = function (hint) {
if (hint !== 'string' && hint !== 'number' && hint !== 'default') {
throw TypeError('Incorrect hint');
} return toPrimitive(anObject(this), hint !== 'number');
};
/***/ }),
/***/ "Cme9":
/*!***************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.reflect.set.js ***!
\***************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var anObject = __webpack_require__(/*! ../internals/an-object */ "F26l");
var isObject = __webpack_require__(/*! ../internals/is-object */ "6XUM");
var has = __webpack_require__(/*! ../internals/has */ "OG5q");
var fails = __webpack_require__(/*! ../internals/fails */ "rG8t");
var definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ "/Ybd");
var getOwnPropertyDescriptorModule = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ "7gGY");
var getPrototypeOf = __webpack_require__(/*! ../internals/object-get-prototype-of */ "wIVT");
var createPropertyDescriptor = __webpack_require__(/*! ../internals/create-property-descriptor */ "uSMZ");
// `Reflect.set` method
// https://tc39.github.io/ecma262/#sec-reflect.set
function set(target, propertyKey, V /* , receiver */) {
var receiver = arguments.length < 4 ? target : arguments[3];
var ownDescriptor = getOwnPropertyDescriptorModule.f(anObject(target), propertyKey);
var existingDescriptor, prototype;
if (!ownDescriptor) {
if (isObject(prototype = getPrototypeOf(target))) {
return set(prototype, propertyKey, V, receiver);
}
ownDescriptor = createPropertyDescriptor(0);
}
if (has(ownDescriptor, 'value')) {
if (ownDescriptor.writable === false || !isObject(receiver)) return false;
if (existingDescriptor = getOwnPropertyDescriptorModule.f(receiver, propertyKey)) {
if (existingDescriptor.get || existingDescriptor.set || existingDescriptor.writable === false) return false;
existingDescriptor.value = V;
definePropertyModule.f(receiver, propertyKey, existingDescriptor);
} else definePropertyModule.f(receiver, propertyKey, createPropertyDescriptor(0, V));
return true;
}
return ownDescriptor.set === undefined ? false : (ownDescriptor.set.call(receiver, V), true);
}
// MS Edge 17-18 Reflect.set allows setting the property to object
// with non-writable property on the prototype
var MS_EDGE_BUG = fails(function () {
var object = definePropertyModule.f({}, 'a', { configurable: true });
// eslint-disable-next-line no-undef
return Reflect.set(getPrototypeOf(object), 'a', 1, object) !== false;
});
$({ target: 'Reflect', stat: true, forced: MS_EDGE_BUG }, {
set: set
});
/***/ }),
/***/ "CwIO":
/*!**************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.math.hypot.js ***!
\**************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var $hypot = Math.hypot;
var abs = Math.abs;
var sqrt = Math.sqrt;
// Chrome 77 bug
// https://bugs.chromium.org/p/v8/issues/detail?id=9546
var BUGGY = !!$hypot && $hypot(Infinity, NaN) !== Infinity;
// `Math.hypot` method
// https://tc39.github.io/ecma262/#sec-math.hypot
$({ target: 'Math', stat: true, forced: BUGGY }, {
hypot: function hypot(value1, value2) { // eslint-disable-line no-unused-vars
var sum = 0;
var i = 0;
var aLen = arguments.length;
var larg = 0;
var arg, div;
while (i < aLen) {
arg = abs(arguments[i++]);
if (larg < arg) {
div = larg / arg;
sum = sum * div * div + 1;
larg = arg;
} else if (arg > 0) {
div = arg / larg;
sum += div * div;
} else sum += arg;
}
return larg === Infinity ? Infinity : larg * sqrt(sum);
}
});
/***/ }),
/***/ "D+RQ":
/*!**********************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.number.constructor.js ***!
\**********************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "T69T");
var global = __webpack_require__(/*! ../internals/global */ "ocAm");
var isForced = __webpack_require__(/*! ../internals/is-forced */ "MkZA");
var redefine = __webpack_require__(/*! ../internals/redefine */ "2MGJ");
var has = __webpack_require__(/*! ../internals/has */ "OG5q");
var classof = __webpack_require__(/*! ../internals/classof-raw */ "ezU2");
var inheritIfRequired = __webpack_require__(/*! ../internals/inherit-if-required */ "K6ZX");
var toPrimitive = __webpack_require__(/*! ../internals/to-primitive */ "LdO1");
var fails = __webpack_require__(/*! ../internals/fails */ "rG8t");
var create = __webpack_require__(/*! ../internals/object-create */ "2RDa");
var getOwnPropertyNames = __webpack_require__(/*! ../internals/object-get-own-property-names */ "KkqW").f;
var getOwnPropertyDescriptor = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ "7gGY").f;
var defineProperty = __webpack_require__(/*! ../internals/object-define-property */ "/Ybd").f;
var trim = __webpack_require__(/*! ../internals/string-trim */ "jnLS").trim;
var NUMBER = 'Number';
var NativeNumber = global[NUMBER];
var NumberPrototype = NativeNumber.prototype;
// Opera ~12 has broken Object#toString
var BROKEN_CLASSOF = classof(create(NumberPrototype)) == NUMBER;
// `ToNumber` abstract operation
// https://tc39.github.io/ecma262/#sec-tonumber
var toNumber = function (argument) {
var it = toPrimitive(argument, false);
var first, third, radix, maxCode, digits, length, index, code;
if (typeof it == 'string' && it.length > 2) {
it = trim(it);
first = it.charCodeAt(0);
if (first === 43 || first === 45) {
third = it.charCodeAt(2);
if (third === 88 || third === 120) return NaN; // Number('+0x1') should be NaN, old V8 fix
} else if (first === 48) {
switch (it.charCodeAt(1)) {
case 66: case 98: radix = 2; maxCode = 49; break; // fast equal of /^0b[01]+$/i
case 79: case 111: radix = 8; maxCode = 55; break; // fast equal of /^0o[0-7]+$/i
default: return +it;
}
digits = it.slice(2);
length = digits.length;
for (index = 0; index < length; index++) {
code = digits.charCodeAt(index);
// parseInt parses a string to a first unavailable symbol
// but ToNumber should return NaN if a string contains unavailable symbols
if (code < 48 || code > maxCode) return NaN;
} return parseInt(digits, radix);
}
} return +it;
};
// `Number` constructor
// https://tc39.github.io/ecma262/#sec-number-constructor
if (isForced(NUMBER, !NativeNumber(' 0o1') || !NativeNumber('0b1') || NativeNumber('+0x1'))) {
var NumberWrapper = function Number(value) {
var it = arguments.length < 1 ? 0 : value;
var dummy = this;
return dummy instanceof NumberWrapper
// check on 1..constructor(foo) case
&& (BROKEN_CLASSOF ? fails(function () { NumberPrototype.valueOf.call(dummy); }) : classof(dummy) != NUMBER)
? inheritIfRequired(new NativeNumber(toNumber(it)), dummy, NumberWrapper) : toNumber(it);
};
for (var keys = DESCRIPTORS ? getOwnPropertyNames(NativeNumber) : (
// ES3:
'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' +
// ES2015 (in case, if modules with ES2015 Number statics required before):
'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' +
'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger'
).split(','), j = 0, key; keys.length > j; j++) {
if (has(NativeNumber, key = keys[j]) && !has(NumberWrapper, key)) {
defineProperty(NumberWrapper, key, getOwnPropertyDescriptor(NativeNumber, key));
}
}
NumberWrapper.prototype = NumberPrototype;
NumberPrototype.constructor = NumberWrapper;
redefine(global, NUMBER, NumberWrapper);
}
/***/ }),
/***/ "D3bo":
/*!********************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/engine-v8-version.js ***!
\********************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__(/*! ../internals/global */ "ocAm");
var userAgent = __webpack_require__(/*! ../internals/engine-user-agent */ "T/Kj");
var process = global.process;
var versions = process && process.versions;
var v8 = versions && versions.v8;
var match, version;
if (v8) {
match = v8.split('.');
version = match[0] + match[1];
} else if (userAgent) {
match = userAgent.match(/Edge\/(\d+)/);
if (!match || match[1] >= 74) {
match = userAgent.match(/Chrome\/(\d+)/);
if (match) version = match[1];
}
}
module.exports = version && +version;
/***/ }),
/***/ "D94X":
/*!*************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.math.cbrt.js ***!
\*************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var sign = __webpack_require__(/*! ../internals/math-sign */ "n/2t");
var abs = Math.abs;
var pow = Math.pow;
// `Math.cbrt` method
// https://tc39.github.io/ecma262/#sec-math.cbrt
$({ target: 'Math', stat: true }, {
cbrt: function cbrt(x) {
return sign(x = +x) * pow(abs(x), 1 / 3);
}
});
/***/ }),
/***/ "DAme":
/*!******************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/collection-weak.js ***!
\******************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var redefineAll = __webpack_require__(/*! ../internals/redefine-all */ "8aNu");
var getWeakData = __webpack_require__(/*! ../internals/internal-metadata */ "M7Xk").getWeakData;
var anObject = __webpack_require__(/*! ../internals/an-object */ "F26l");
var isObject = __webpack_require__(/*! ../internals/is-object */ "6XUM");
var anInstance = __webpack_require__(/*! ../internals/an-instance */ "SM6+");
var iterate = __webpack_require__(/*! ../internals/iterate */ "Rn6E");
var ArrayIterationModule = __webpack_require__(/*! ../internals/array-iteration */ "kk6e");
var $has = __webpack_require__(/*! ../internals/has */ "OG5q");
var InternalStateModule = __webpack_require__(/*! ../internals/internal-state */ "XH/I");
var setInternalState = InternalStateModule.set;
var internalStateGetterFor = InternalStateModule.getterFor;
var find = ArrayIterationModule.find;
var findIndex = ArrayIterationModule.findIndex;
var id = 0;
// fallback for uncaught frozen keys
var uncaughtFrozenStore = function (store) {
return store.frozen || (store.frozen = new UncaughtFrozenStore());
};
var UncaughtFrozenStore = function () {
this.entries = [];
};
var findUncaughtFrozen = function (store, key) {
return find(store.entries, function (it) {
return it[0] === key;
});
};
UncaughtFrozenStore.prototype = {
get: function (key) {
var entry = findUncaughtFrozen(this, key);
if (entry) return entry[1];
},
has: function (key) {
return !!findUncaughtFrozen(this, key);
},
set: function (key, value) {
var entry = findUncaughtFrozen(this, key);
if (entry) entry[1] = value;
else this.entries.push([key, value]);
},
'delete': function (key) {
var index = findIndex(this.entries, function (it) {
return it[0] === key;
});
if (~index) this.entries.splice(index, 1);
return !!~index;
}
};
module.exports = {
getConstructor: function (wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER) {
var C = wrapper(function (that, iterable) {
anInstance(that, C, CONSTRUCTOR_NAME);
setInternalState(that, {
type: CONSTRUCTOR_NAME,
id: id++,
frozen: undefined
});
if (iterable != undefined) iterate(iterable, that[ADDER], that, IS_MAP);
});
var getInternalState = internalStateGetterFor(CONSTRUCTOR_NAME);
var define = function (that, key, value) {
var state = getInternalState(that);
var data = getWeakData(anObject(key), true);
if (data === true) uncaughtFrozenStore(state).set(key, value);
else data[state.id] = value;
return that;
};
redefineAll(C.prototype, {
// 23.3.3.2 WeakMap.prototype.delete(key)
// 23.4.3.3 WeakSet.prototype.delete(value)
'delete': function (key) {
var state = getInternalState(this);
if (!isObject(key)) return false;
var data = getWeakData(key);
if (data === true) return uncaughtFrozenStore(state)['delete'](key);
return data && $has(data, state.id) && delete data[state.id];
},
// 23.3.3.4 WeakMap.prototype.has(key)
// 23.4.3.4 WeakSet.prototype.has(value)
has: function has(key) {
var state = getInternalState(this);
if (!isObject(key)) return false;
var data = getWeakData(key);
if (data === true) return uncaughtFrozenStore(state).has(key);
return data && $has(data, state.id);
}
});
redefineAll(C.prototype, IS_MAP ? {
// 23.3.3.3 WeakMap.prototype.get(key)
get: function get(key) {
var state = getInternalState(this);
if (isObject(key)) {
var data = getWeakData(key);
if (data === true) return uncaughtFrozenStore(state).get(key);
return data ? data[state.id] : undefined;
}
},
// 23.3.3.5 WeakMap.prototype.set(key, value)
set: function set(key, value) {
return define(this, key, value);
}
} : {
// 23.4.3.1 WeakSet.prototype.add(value)
add: function add(value) {
return define(this, value, true);
}
});
return C;
}
};
/***/ }),
/***/ "DGHb":
/*!****************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.date.to-json.js ***!
\****************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var fails = __webpack_require__(/*! ../internals/fails */ "rG8t");
var toObject = __webpack_require__(/*! ../internals/to-object */ "VCQ8");
var toPrimitive = __webpack_require__(/*! ../internals/to-primitive */ "LdO1");
var FORCED = fails(function () {
return new Date(NaN).toJSON() !== null
|| Date.prototype.toJSON.call({ toISOString: function () { return 1; } }) !== 1;
});
// `Date.prototype.toJSON` method
// https://tc39.github.io/ecma262/#sec-date.prototype.tojson
$({ target: 'Date', proto: true, forced: FORCED }, {
// eslint-disable-next-line no-unused-vars
toJSON: function toJSON(key) {
var O = toObject(this);
var pv = toPrimitive(O);
return typeof pv == 'number' && !isFinite(pv) ? null : O.toISOString();
}
});
/***/ }),
/***/ "DPsx":
/*!**********************************************************!*\
!*** ./node_modules/core-js/internals/ie8-dom-define.js ***!
\**********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "g6v/");
var fails = __webpack_require__(/*! ../internals/fails */ "0Dky");
var createElement = __webpack_require__(/*! ../internals/document-create-element */ "zBJ4");
// Thank's IE8 for his funny defineProperty
module.exports = !DESCRIPTORS && !fails(function () {
return Object.defineProperty(createElement('div'), 'a', {
get: function () { return 7; }
}).a != 7;
});
/***/ }),
/***/ "DYg9":
/*!******************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/create-property.js ***!
\******************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var toPrimitive = __webpack_require__(/*! ../internals/to-primitive */ "LdO1");
var definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ "/Ybd");
var createPropertyDescriptor = __webpack_require__(/*! ../internals/create-property-descriptor */ "uSMZ");
module.exports = function (object, key, value) {
var propertyKey = toPrimitive(key);
if (propertyKey in object) definePropertyModule.f(object, propertyKey, createPropertyDescriptor(0, value));
else object[propertyKey] = value;
};
/***/ }),
/***/ "Djps":
/*!**************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.math.log1p.js ***!
\**************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var log1p = __webpack_require__(/*! ../internals/math-log1p */ "O3xq");
// `Math.log1p` method
// https://tc39.github.io/ecma262/#sec-math.log1p
$({ target: 'Math', stat: true }, { log1p: log1p });
/***/ }),
/***/ "DscF":
/*!**************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.array.fill.js ***!
\**************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var fill = __webpack_require__(/*! ../internals/array-fill */ "w4Hq");
var addToUnscopables = __webpack_require__(/*! ../internals/add-to-unscopables */ "A1Hp");
// `Array.prototype.fill` method
// https://tc39.github.io/ecma262/#sec-array.prototype.fill
$({ target: 'Array', proto: true }, {
fill: fill
});
// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
addToUnscopables('fill');
/***/ }),
/***/ "E7aN":
/*!*******************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/path.js ***!
\*******************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__(/*! ../internals/global */ "ocAm");
module.exports = global;
/***/ }),
/***/ "E8Ab":
/*!****************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/function-bind.js ***!
\****************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var aFunction = __webpack_require__(/*! ../internals/a-function */ "Neub");
var isObject = __webpack_require__(/*! ../internals/is-object */ "6XUM");
var slice = [].slice;
var factories = {};
var construct = function (C, argsLength, args) {
if (!(argsLength in factories)) {
for (var list = [], i = 0; i < argsLength; i++) list[i] = 'a[' + i + ']';
// eslint-disable-next-line no-new-func
factories[argsLength] = Function('C,a', 'return new C(' + list.join(',') + ')');
} return factories[argsLength](C, args);
};
// `Function.prototype.bind` method implementation
// https://tc39.github.io/ecma262/#sec-function.prototype.bind
module.exports = Function.bind || function bind(that /* , ...args */) {
var fn = aFunction(this);
var partArgs = slice.call(arguments, 1);
var boundFunction = function bound(/* args... */) {
var args = partArgs.concat(slice.call(arguments));
return this instanceof boundFunction ? construct(fn, args.length, args) : fn.apply(that, args);
};
if (isObject(fn.prototype)) boundFunction.prototype = fn.prototype;
return boundFunction;
};
/***/ }),
/***/ "EIBq":
/*!*********************************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/check-correctness-of-iteration.js ***!
\*********************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "m41k");
var ITERATOR = wellKnownSymbol('iterator');
var SAFE_CLOSING = false;
try {
var called = 0;
var iteratorWithReturn = {
next: function () {
return { done: !!called++ };
},
'return': function () {
SAFE_CLOSING = true;
}
};
iteratorWithReturn[ITERATOR] = function () {
return this;
};
// eslint-disable-next-line no-throw-literal
Array.from(iteratorWithReturn, function () { throw 2; });
} catch (error) { /* empty */ }
module.exports = function (exec, SKIP_CLOSING) {
if (!SKIP_CLOSING && !SAFE_CLOSING) return false;
var ITERATION_SUPPORT = false;
try {
var object = {};
object[ITERATOR] = function () {
return {
next: function () {
return { done: ITERATION_SUPPORT = true };
}
};
};
exec(object);
} catch (error) { /* empty */ }
return ITERATION_SUPPORT;
};
/***/ }),
/***/ "EMWV":
/*!****************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/string-repeat.js ***!
\****************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var toInteger = __webpack_require__(/*! ../internals/to-integer */ "vDBE");
var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ "hmpk");
// `String.prototype.repeat` method implementation
// https://tc39.github.io/ecma262/#sec-string.prototype.repeat
module.exports = ''.repeat || function repeat(count) {
var str = String(requireObjectCoercible(this));
var result = '';
var n = toInteger(count);
if (n < 0 || n == Infinity) throw RangeError('Wrong number of repetitions');
for (;n > 0; (n >>>= 1) && (str += str)) if (n & 1) result += str;
return result;
};
/***/ }),
/***/ "EMtK":
/*!********************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/to-indexed-object.js ***!
\********************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// toObject with fallback for non-array-like ES3 strings
var IndexedObject = __webpack_require__(/*! ../internals/indexed-object */ "tUdv");
var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ "hmpk");
module.exports = function (it) {
return IndexedObject(requireObjectCoercible(it));
};
/***/ }),
/***/ "EQZg":
/*!*************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/same-value.js ***!
\*************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
// `SameValue` abstract operation
// https://tc39.github.io/ecma262/#sec-samevalue
module.exports = Object.is || function is(x, y) {
// eslint-disable-next-line no-self-compare
return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y;
};
/***/ }),
/***/ "ERXZ":
/*!****************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.symbol.match.js ***!
\****************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var defineWellKnownSymbol = __webpack_require__(/*! ../internals/define-well-known-symbol */ "94Vg");
// `Symbol.match` well-known symbol
// https://tc39.github.io/ecma262/#sec-symbol.match
defineWellKnownSymbol('match');
/***/ }),
/***/ "EiAZ":
/*!*********************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.reflect.construct.js ***!
\*********************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "Ew/G");
var aFunction = __webpack_require__(/*! ../internals/a-function */ "Neub");
var anObject = __webpack_require__(/*! ../internals/an-object */ "F26l");
var isObject = __webpack_require__(/*! ../internals/is-object */ "6XUM");
var create = __webpack_require__(/*! ../internals/object-create */ "2RDa");
var bind = __webpack_require__(/*! ../internals/function-bind */ "E8Ab");
var fails = __webpack_require__(/*! ../internals/fails */ "rG8t");
var nativeConstruct = getBuiltIn('Reflect', 'construct');
// `Reflect.construct` method
// https://tc39.github.io/ecma262/#sec-reflect.construct
// MS Edge supports only 2 arguments and argumentsList argument is optional
// FF Nightly sets third argument as `new.target`, but does not create `this` from it
var NEW_TARGET_BUG = fails(function () {
function F() { /* empty */ }
return !(nativeConstruct(function () { /* empty */ }, [], F) instanceof F);
});
var ARGS_BUG = !fails(function () {
nativeConstruct(function () { /* empty */ });
});
var FORCED = NEW_TARGET_BUG || ARGS_BUG;
$({ target: 'Reflect', stat: true, forced: FORCED, sham: FORCED }, {
construct: function construct(Target, args /* , newTarget */) {
aFunction(Target);
anObject(args);
var newTarget = arguments.length < 3 ? Target : aFunction(arguments[2]);
if (ARGS_BUG && !NEW_TARGET_BUG) return nativeConstruct(Target, args, newTarget);
if (Target == newTarget) {
// w/o altered newTarget, optimization for 0-4 arguments
switch (args.length) {
case 0: return new Target();
case 1: return new Target(args[0]);
case 2: return new Target(args[0], args[1]);
case 3: return new Target(args[0], args[1], args[2]);
case 4: return new Target(args[0], args[1], args[2], args[3]);
}
// w/o altered newTarget, lot of arguments case
var $args = [null];
$args.push.apply($args, args);
return new (bind.apply(Target, $args))();
}
// with altered newTarget, not support built-in constructors
var proto = newTarget.prototype;
var instance = create(isObject(proto) ? proto : Object.prototype);
var result = Function.apply.call(Target, instance, args);
return isObject(result) ? result : instance;
}
});
/***/ }),
/***/ "Ejw8":
/*!*****************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.reflect.apply.js ***!
\*****************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "Ew/G");
var aFunction = __webpack_require__(/*! ../internals/a-function */ "Neub");
var anObject = __webpack_require__(/*! ../internals/an-object */ "F26l");
var fails = __webpack_require__(/*! ../internals/fails */ "rG8t");
var nativeApply = getBuiltIn('Reflect', 'apply');
var functionApply = Function.apply;
// MS Edge argumentsList argument is optional
var OPTIONAL_ARGUMENTS_LIST = !fails(function () {
nativeApply(function () { /* empty */ });
});
// `Reflect.apply` method
// https://tc39.github.io/ecma262/#sec-reflect.apply
$({ target: 'Reflect', stat: true, forced: OPTIONAL_ARGUMENTS_LIST }, {
apply: function apply(target, thisArgument, argumentsList) {
aFunction(target);
anObject(argumentsList);
return nativeApply
? nativeApply(target, thisArgument, argumentsList)
: functionApply.call(target, thisArgument, argumentsList);
}
});
/***/ }),
/***/ "EntM":
/*!****************************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.object.define-properties.js ***!
\****************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "T69T");
var defineProperties = __webpack_require__(/*! ../internals/object-define-properties */ "5y2d");
// `Object.defineProperties` method
// https://tc39.github.io/ecma262/#sec-object.defineproperties
$({ target: 'Object', stat: true, forced: !DESCRIPTORS, sham: !DESCRIPTORS }, {
defineProperties: defineProperties
});
/***/ }),
/***/ "Ew/G":
/*!***************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/get-built-in.js ***!
\***************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var path = __webpack_require__(/*! ../internals/path */ "E7aN");
var global = __webpack_require__(/*! ../internals/global */ "ocAm");
var aFunction = function (variable) {
return typeof variable == 'function' ? variable : undefined;
};
module.exports = function (namespace, method) {
return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(global[namespace])
: path[namespace] && path[namespace][method] || global[namespace] && global[namespace][method];
};
/***/ }),
/***/ "F/TS":
/*!**********************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/get-iterator-method.js ***!
\**********************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var classof = __webpack_require__(/*! ../internals/classof */ "mN5b");
var Iterators = __webpack_require__(/*! ../internals/iterators */ "pz+c");
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "m41k");
var ITERATOR = wellKnownSymbol('iterator');
module.exports = function (it) {
if (it != undefined) return it[ITERATOR]
|| it['@@iterator']
|| Iterators[classof(it)];
};
/***/ }),
/***/ "F26l":
/*!************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/an-object.js ***!
\************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var isObject = __webpack_require__(/*! ../internals/is-object */ "6XUM");
module.exports = function (it) {
if (!isObject(it)) {
throw TypeError(String(it) + ' is not an object');
} return it;
};
/***/ }),
/***/ "F4rZ":
/*!****************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.array.concat.js ***!
\****************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var fails = __webpack_require__(/*! ../internals/fails */ "rG8t");
var isArray = __webpack_require__(/*! ../internals/is-array */ "erNl");
var isObject = __webpack_require__(/*! ../internals/is-object */ "6XUM");
var toObject = __webpack_require__(/*! ../internals/to-object */ "VCQ8");
var toLength = __webpack_require__(/*! ../internals/to-length */ "xpLY");
var createProperty = __webpack_require__(/*! ../internals/create-property */ "DYg9");
var arraySpeciesCreate = __webpack_require__(/*! ../internals/array-species-create */ "JafA");
var arrayMethodHasSpeciesSupport = __webpack_require__(/*! ../internals/array-method-has-species-support */ "lRyB");
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "m41k");
var V8_VERSION = __webpack_require__(/*! ../internals/engine-v8-version */ "D3bo");
var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');
var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;
var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded';
// We can't use this feature detection in V8 since it causes
// deoptimization and serious performance degradation
// https://github.com/zloirock/core-js/issues/679
var IS_CONCAT_SPREADABLE_SUPPORT = V8_VERSION >= 51 || !fails(function () {
var array = [];
array[IS_CONCAT_SPREADABLE] = false;
return array.concat()[0] !== array;
});
var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat');
var isConcatSpreadable = function (O) {
if (!isObject(O)) return false;
var spreadable = O[IS_CONCAT_SPREADABLE];
return spreadable !== undefined ? !!spreadable : isArray(O);
};
var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;
// `Array.prototype.concat` method
// https://tc39.github.io/ecma262/#sec-array.prototype.concat
// with adding support of @@isConcatSpreadable and @@species
$({ target: 'Array', proto: true, forced: FORCED }, {
concat: function concat(arg) { // eslint-disable-line no-unused-vars
var O = toObject(this);
var A = arraySpeciesCreate(O, 0);
var n = 0;
var i, k, length, len, E;
for (i = -1, length = arguments.length; i < length; i++) {
E = i === -1 ? O : arguments[i];
if (isConcatSpreadable(E)) {
len = toLength(E.length);
if (n + len > MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);
} else {
if (n >= MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
createProperty(A, n++, E);
}
}
A.length = n;
return A;
}
});
/***/ }),
/***/ "FU1i":
/*!*************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.array.map.js ***!
\*************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var $map = __webpack_require__(/*! ../internals/array-iteration */ "kk6e").map;
var arrayMethodHasSpeciesSupport = __webpack_require__(/*! ../internals/array-method-has-species-support */ "lRyB");
var arrayMethodUsesToLength = __webpack_require__(/*! ../internals/array-method-uses-to-length */ "w2hq");
var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('map');
// FF49- issue
var USES_TO_LENGTH = arrayMethodUsesToLength('map');
// `Array.prototype.map` method
// https://tc39.github.io/ecma262/#sec-array.prototype.map
// with adding support of @@species
$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT || !USES_TO_LENGTH }, {
map: function map(callbackfn /* , thisArg */) {
return $map(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
}
});
/***/ }),
/***/ "FeI/":
/*!***************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.array.every.js ***!
\***************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var $every = __webpack_require__(/*! ../internals/array-iteration */ "kk6e").every;
var arrayMethodIsStrict = __webpack_require__(/*! ../internals/array-method-is-strict */ "6CJb");
var arrayMethodUsesToLength = __webpack_require__(/*! ../internals/array-method-uses-to-length */ "w2hq");
var STRICT_METHOD = arrayMethodIsStrict('every');
var USES_TO_LENGTH = arrayMethodUsesToLength('every');
// `Array.prototype.every` method
// https://tc39.github.io/ecma262/#sec-array.prototype.every
$({ target: 'Array', proto: true, forced: !STRICT_METHOD || !USES_TO_LENGTH }, {
every: function every(callbackfn /* , thisArg */) {
return $every(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
}
});
/***/ }),
/***/ "Fqhe":
/*!*************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/set-global.js ***!
\*************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__(/*! ../internals/global */ "ocAm");
var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ "aJMj");
module.exports = function (key, value) {
try {
createNonEnumerableProperty(global, key, value);
} catch (error) {
global[key] = value;
} return value;
};
/***/ }),
/***/ "G+Rx":
/*!************************************************!*\
!*** ./node_modules/core-js/internals/html.js ***!
\************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "0GbY");
module.exports = getBuiltIn('document', 'documentElement');
/***/ }),
/***/ "G/JM":
/*!*************************************************************!*\
!*** ./node_modules/core-js/modules/es.reflect.own-keys.js ***!
\*************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var ownKeys = __webpack_require__(/*! ../internals/own-keys */ "Vu81");
// `Reflect.ownKeys` method
// https://tc39.github.io/ecma262/#sec-reflect.ownkeys
$({ target: 'Reflect', stat: true }, {
ownKeys: ownKeys
});
/***/ }),
/***/ "G1Vw":
/*!*****************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/iterators-core.js ***!
\*****************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var getPrototypeOf = __webpack_require__(/*! ../internals/object-get-prototype-of */ "wIVT");
var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ "aJMj");
var has = __webpack_require__(/*! ../internals/has */ "OG5q");
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "m41k");
var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "g9hI");
var ITERATOR = wellKnownSymbol('iterator');
var BUGGY_SAFARI_ITERATORS = false;
var returnThis = function () { return this; };
// `%IteratorPrototype%` object
// https://tc39.github.io/ecma262/#sec-%iteratorprototype%-object
var IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator;
if ([].keys) {
arrayIterator = [].keys();
// Safari 8 has buggy iterators w/o `next`
if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true;
else {
PrototypeOfArrayIteratorPrototype = getPrototypeOf(getPrototypeOf(arrayIterator));
if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype;
}
}
if (IteratorPrototype == undefined) IteratorPrototype = {};
// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
if (!IS_PURE && !has(IteratorPrototype, ITERATOR)) {
createNonEnumerableProperty(IteratorPrototype, ITERATOR, returnThis);
}
module.exports = {
IteratorPrototype: IteratorPrototype,
BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS
};
/***/ }),
/***/ "G7bs":
/*!*******************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/string-multibyte.js ***!
\*******************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var toInteger = __webpack_require__(/*! ../internals/to-integer */ "vDBE");
var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ "hmpk");
// `String.prototype.{ codePointAt, at }` methods implementation
var createMethod = function (CONVERT_TO_STRING) {
return function ($this, pos) {
var S = String(requireObjectCoercible($this));
var position = toInteger(pos);
var size = S.length;
var first, second;
if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
first = S.charCodeAt(position);
return first < 0xD800 || first > 0xDBFF || position + 1 === size
|| (second = S.charCodeAt(position + 1)) < 0xDC00 || second > 0xDFFF
? CONVERT_TO_STRING ? S.charAt(position) : first
: CONVERT_TO_STRING ? S.slice(position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
};
};
module.exports = {
// `String.prototype.codePointAt` method
// https://tc39.github.io/ecma262/#sec-string.prototype.codepointat
codeAt: createMethod(false),
// `String.prototype.at` method
// https://github.com/mathiasbynens/String.prototype.at
charAt: createMethod(true)
};
/***/ }),
/***/ "HAuM":
/*!******************************************************!*\
!*** ./node_modules/core-js/internals/a-function.js ***!
\******************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = function (it) {
if (typeof it != 'function') {
throw TypeError(String(it) + ' is not a function');
} return it;
};
/***/ }),
/***/ "HSQg":
/*!*************************************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/fix-regexp-well-known-symbol-logic.js ***!
\*************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// TODO: Remove from `core-js@4` since it's moved to entry points
__webpack_require__(/*! ../modules/es.regexp.exec */ "SC6u");
var redefine = __webpack_require__(/*! ../internals/redefine */ "2MGJ");
var fails = __webpack_require__(/*! ../internals/fails */ "rG8t");
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "m41k");
var regexpExec = __webpack_require__(/*! ../internals/regexp-exec */ "qjkP");
var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ "aJMj");
var SPECIES = wellKnownSymbol('species');
var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {
// #replace needs built-in support for named groups.
// #match works fine because it just return the exec results, even if it has
// a "grops" property.
var re = /./;
re.exec = function () {
var result = [];
result.groups = { a: '7' };
return result;
};
return ''.replace(re, '$<a>') !== '7';
});
// IE <= 11 replaces $0 with the whole match, as if it was $&
// https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0
var REPLACE_KEEPS_$0 = (function () {
return 'a'.replace(/./, '$0') === '$0';
})();
var REPLACE = wellKnownSymbol('replace');
// Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string
var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () {
if (/./[REPLACE]) {
return /./[REPLACE]('a', '$0') === '';
}
return false;
})();
// Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec
// Weex JS has frozen built-in prototypes, so use try / catch wrapper
var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () {
var re = /(?:)/;
var originalExec = re.exec;
re.exec = function () { return originalExec.apply(this, arguments); };
var result = 'ab'.split(re);
return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b';
});
module.exports = function (KEY, length, exec, sham) {
var SYMBOL = wellKnownSymbol(KEY);
var DELEGATES_TO_SYMBOL = !fails(function () {
// String methods call symbol-named RegEp methods
var O = {};
O[SYMBOL] = function () { return 7; };
return ''[KEY](O) != 7;
});
var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails(function () {
// Symbol-named RegExp methods call .exec
var execCalled = false;
var re = /a/;
if (KEY === 'split') {
// We can't use real regex here since it causes deoptimization
// and serious performance degradation in V8
// https://github.com/zloirock/core-js/issues/306
re = {};
// RegExp[@@split] doesn't call the regex's exec method, but first creates
// a new one. We need to return the patched regex when creating the new one.
re.constructor = {};
re.constructor[SPECIES] = function () { return re; };
re.flags = '';
re[SYMBOL] = /./[SYMBOL];
}
re.exec = function () { execCalled = true; return null; };
re[SYMBOL]('');
return !execCalled;
});
if (
!DELEGATES_TO_SYMBOL ||
!DELEGATES_TO_EXEC ||
(KEY === 'replace' && !(
REPLACE_SUPPORTS_NAMED_GROUPS &&
REPLACE_KEEPS_$0 &&
!REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE
)) ||
(KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC)
) {
var nativeRegExpMethod = /./[SYMBOL];
var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {
if (regexp.exec === regexpExec) {
if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
// The native String method already delegates to @@method (this
// polyfilled function), leasing to infinite recursion.
// We avoid it by directly calling the native @@method method.
return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) };
}
return { done: true, value: nativeMethod.call(str, regexp, arg2) };
}
return { done: false };
}, {
REPLACE_KEEPS_$0: REPLACE_KEEPS_$0,
REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE: REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE
});
var stringMethod = methods[0];
var regexMethod = methods[1];
redefine(String.prototype, KEY, stringMethod);
redefine(RegExp.prototype, SYMBOL, length == 2
// 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue)
// 21.2.5.11 RegExp.prototype[@@split](string, limit)
? function (string, arg) { return regexMethod.call(string, this, arg); }
// 21.2.5.6 RegExp.prototype[@@match](string)
// 21.2.5.9 RegExp.prototype[@@search](string)
: function (string) { return regexMethod.call(string, this); }
);
}
if (sham) createNonEnumerableProperty(RegExp.prototype[SYMBOL], 'sham', true);
};
/***/ }),
/***/ "HYAF":
/*!********************************************************************!*\
!*** ./node_modules/core-js/internals/require-object-coercible.js ***!
\********************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
// `RequireObjectCoercible` abstract operation
// https://tc39.github.io/ecma262/#sec-requireobjectcoercible
module.exports = function (it) {
if (it == undefined) throw TypeError("Can't call method on " + it);
return it;
};
/***/ }),
/***/ "I+eb":
/*!**************************************************!*\
!*** ./node_modules/core-js/internals/export.js ***!
\**************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__(/*! ../internals/global */ "2oRo");
var getOwnPropertyDescriptor = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ "Bs8V").f;
var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ "kRJp");
var redefine = __webpack_require__(/*! ../internals/redefine */ "busE");
var setGlobal = __webpack_require__(/*! ../internals/set-global */ "zk60");
var copyConstructorProperties = __webpack_require__(/*! ../internals/copy-constructor-properties */ "6JNq");
var isForced = __webpack_require__(/*! ../internals/is-forced */ "lMq5");
/*
options.target - name of the target object
options.global - target is the global object
options.stat - export as static methods of target
options.proto - export as prototype methods of target
options.real - real prototype method for the `pure` version
options.forced - export even if the native feature is available
options.bind - bind methods to the target, required for the `pure` version
options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
options.unsafe - use the simple assignment of property instead of delete + defineProperty
options.sham - add a flag to not completely full polyfills
options.enumerable - export as enumerable property
options.noTargetGet - prevent calling a getter on target
*/
module.exports = function (options, source) {
var TARGET = options.target;
var GLOBAL = options.global;
var STATIC = options.stat;
var FORCED, target, key, targetProperty, sourceProperty, descriptor;
if (GLOBAL) {
target = global;
} else if (STATIC) {
target = global[TARGET] || setGlobal(TARGET, {});
} else {
target = (global[TARGET] || {}).prototype;
}
if (target) for (key in source) {
sourceProperty = source[key];
if (options.noTargetGet) {
descriptor = getOwnPropertyDescriptor(target, key);
targetProperty = descriptor && descriptor.value;
} else targetProperty = target[key];
FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
// contained in target
if (!FORCED && targetProperty !== undefined) {
if (typeof sourceProperty === typeof targetProperty) continue;
copyConstructorProperties(sourceProperty, targetProperty);
}
// add a flag to not completely full polyfills
if (options.sham || (targetProperty && targetProperty.sham)) {
createNonEnumerableProperty(sourceProperty, 'sham', true);
}
// extend global
redefine(target, key, sourceProperty, options);
}
};
/***/ }),
/***/ "I8vh":
/*!*************************************************************!*\
!*** ./node_modules/core-js/internals/to-absolute-index.js ***!
\*************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var toInteger = __webpack_require__(/*! ../internals/to-integer */ "ppGB");
var max = Math.max;
var min = Math.min;
// Helper for a popular repeating case of the spec:
// Let integer be ? ToInteger(index).
// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
module.exports = function (index, length) {
var integer = toInteger(index);
return integer < 0 ? max(integer + length, 0) : min(integer, length);
};
/***/ }),
/***/ "IBH3":
/*!*************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/array-from.js ***!
\*************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var bind = __webpack_require__(/*! ../internals/function-bind-context */ "tcQx");
var toObject = __webpack_require__(/*! ../internals/to-object */ "VCQ8");
var callWithSafeIterationClosing = __webpack_require__(/*! ../internals/call-with-safe-iteration-closing */ "ipMl");
var isArrayIteratorMethod = __webpack_require__(/*! ../internals/is-array-iterator-method */ "5MmU");
var toLength = __webpack_require__(/*! ../internals/to-length */ "xpLY");
var createProperty = __webpack_require__(/*! ../internals/create-property */ "DYg9");
var getIteratorMethod = __webpack_require__(/*! ../internals/get-iterator-method */ "F/TS");
// `Array.from` method implementation
// https://tc39.github.io/ecma262/#sec-array.from
module.exports = function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) {
var O = toObject(arrayLike);
var C = typeof this == 'function' ? this : Array;
var argumentsLength = arguments.length;
var mapfn = argumentsLength > 1 ? arguments[1] : undefined;
var mapping = mapfn !== undefined;
var iteratorMethod = getIteratorMethod(O);
var index = 0;
var length, result, step, iterator, next, value;
if (mapping) mapfn = bind(mapfn, argumentsLength > 2 ? arguments[2] : undefined, 2);
// if the target is not iterable or it's an array with the default iterator - use a simple case
if (iteratorMethod != undefined && !(C == Array && isArrayIteratorMethod(iteratorMethod))) {
iterator = iteratorMethod.call(O);
next = iterator.next;
result = new C();
for (;!(step = next.call(iterator)).done; index++) {
value = mapping ? callWithSafeIterationClosing(iterator, mapfn, [step.value, index], true) : step.value;
createProperty(result, index, value);
}
} else {
length = toLength(O.length);
result = new C(length);
for (;length > index; index++) {
value = mapping ? mapfn(O[index], index) : O[index];
createProperty(result, index, value);
}
}
result.length = index;
return result;
};
/***/ }),
/***/ "IPby":
/*!**************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.string.raw.js ***!
\**************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ "EMtK");
var toLength = __webpack_require__(/*! ../internals/to-length */ "xpLY");
// `String.raw` method
// https://tc39.github.io/ecma262/#sec-string.raw
$({ target: 'String', stat: true }, {
raw: function raw(template) {
var rawTemplate = toIndexedObject(template.raw);
var literalSegments = toLength(rawTemplate.length);
var argumentsLength = arguments.length;
var elements = [];
var i = 0;
while (literalSegments > i) {
elements.push(String(rawTemplate[i++]));
if (i < argumentsLength) elements.push(String(arguments[i]));
} return elements.join('');
}
});
/***/ }),
/***/ "IQbc":
/*!**********************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.array.reduce-right.js ***!
\**********************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var $reduceRight = __webpack_require__(/*! ../internals/array-reduce */ "vyNX").right;
var arrayMethodIsStrict = __webpack_require__(/*! ../internals/array-method-is-strict */ "6CJb");
var arrayMethodUsesToLength = __webpack_require__(/*! ../internals/array-method-uses-to-length */ "w2hq");
var STRICT_METHOD = arrayMethodIsStrict('reduceRight');
// For preventing possible almost infinite loop in non-standard implementations, test the forward version of the method
var USES_TO_LENGTH = arrayMethodUsesToLength('reduce', { 1: 0 });
// `Array.prototype.reduceRight` method
// https://tc39.github.io/ecma262/#sec-array.prototype.reduceright
$({ target: 'Array', proto: true, forced: !STRICT_METHOD || !USES_TO_LENGTH }, {
reduceRight: function reduceRight(callbackfn /* , initialValue */) {
return $reduceRight(this, callbackfn, arguments.length, arguments.length > 1 ? arguments[1] : undefined);
}
});
/***/ }),
/***/ "IXlp":
/*!**************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.math.acosh.js ***!
\**************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var log1p = __webpack_require__(/*! ../internals/math-log1p */ "O3xq");
var nativeAcosh = Math.acosh;
var log = Math.log;
var sqrt = Math.sqrt;
var LN2 = Math.LN2;
var FORCED = !nativeAcosh
// V8 bug: https://code.google.com/p/v8/issues/detail?id=3509
|| Math.floor(nativeAcosh(Number.MAX_VALUE)) != 710
// Tor Browser bug: Math.acosh(Infinity) -> NaN
|| nativeAcosh(Infinity) != Infinity;
// `Math.acosh` method
// https://tc39.github.io/ecma262/#sec-math.acosh
$({ target: 'Math', stat: true, forced: FORCED }, {
acosh: function acosh(x) {
return (x = +x) < 1 ? NaN : x > 94906265.62425156
? log(x) + LN2
: log1p(x - 1 + sqrt(x - 1) * sqrt(x + 1));
}
});
/***/ }),
/***/ "IzYO":
/*!*****************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.object.freeze.js ***!
\*****************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var FREEZING = __webpack_require__(/*! ../internals/freezing */ "cZY6");
var fails = __webpack_require__(/*! ../internals/fails */ "rG8t");
var isObject = __webpack_require__(/*! ../internals/is-object */ "6XUM");
var onFreeze = __webpack_require__(/*! ../internals/internal-metadata */ "M7Xk").onFreeze;
var nativeFreeze = Object.freeze;
var FAILS_ON_PRIMITIVES = fails(function () { nativeFreeze(1); });
// `Object.freeze` method
// https://tc39.github.io/ecma262/#sec-object.freeze
$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES, sham: !FREEZING }, {
freeze: function freeze(it) {
return nativeFreeze && isObject(it) ? nativeFreeze(onFreeze(it)) : it;
}
});
/***/ }),
/***/ "J4zY":
/*!****************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.string.fixed.js ***!
\****************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var createHTML = __webpack_require__(/*! ../internals/create-html */ "uoca");
var forcedStringHTMLMethod = __webpack_require__(/*! ../internals/string-html-forced */ "d8Sw");
// `String.prototype.fixed` method
// https://tc39.github.io/ecma262/#sec-string.prototype.fixed
$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('fixed') }, {
fixed: function fixed() {
return createHTML(this, 'tt', '', '');
}
});
/***/ }),
/***/ "JBy8":
/*!*************************************************************************!*\
!*** ./node_modules/core-js/internals/object-get-own-property-names.js ***!
\*************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var internalObjectKeys = __webpack_require__(/*! ../internals/object-keys-internal */ "yoRg");
var enumBugKeys = __webpack_require__(/*! ../internals/enum-bug-keys */ "eDl+");
var hiddenKeys = enumBugKeys.concat('length', 'prototype');
// `Object.getOwnPropertyNames` method
// https://tc39.github.io/ecma262/#sec-object.getownpropertynames
exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
return internalObjectKeys(O, hiddenKeys);
};
/***/ }),
/***/ "JHhb":
/*!**************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/set-species.js ***!
\**************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "Ew/G");
var definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ "/Ybd");
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "m41k");
var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "T69T");
var SPECIES = wellKnownSymbol('species');
module.exports = function (CONSTRUCTOR_NAME) {
var Constructor = getBuiltIn(CONSTRUCTOR_NAME);
var defineProperty = definePropertyModule.f;
if (DESCRIPTORS && Constructor && !Constructor[SPECIES]) {
defineProperty(Constructor, SPECIES, {
configurable: true,
get: function () { return this; }
});
}
};
/***/ }),
/***/ "JI1L":
/*!***********************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/a-possible-prototype.js ***!
\***********************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var isObject = __webpack_require__(/*! ../internals/is-object */ "6XUM");
module.exports = function (it) {
if (!isObject(it) && it !== null) {
throw TypeError("Can't set " + String(it) + ' as a prototype');
} return it;
};
/***/ }),
/***/ "JafA":
/*!***********************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/array-species-create.js ***!
\***********************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var isObject = __webpack_require__(/*! ../internals/is-object */ "6XUM");
var isArray = __webpack_require__(/*! ../internals/is-array */ "erNl");
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "m41k");
var SPECIES = wellKnownSymbol('species');
// `ArraySpeciesCreate` abstract operation
// https://tc39.github.io/ecma262/#sec-arrayspeciescreate
module.exports = function (originalArray, length) {
var C;
if (isArray(originalArray)) {
C = originalArray.constructor;
// cross-realm fallback
if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;
else if (isObject(C)) {
C = C[SPECIES];
if (C === null) C = undefined;
}
} return new (C === undefined ? Array : C)(length === 0 ? 0 : length);
};
/***/ }),
/***/ "JhPs":
/*!**************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.math.expm1.js ***!
\**************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var expm1 = __webpack_require__(/*! ../internals/math-expm1 */ "pn4C");
// `Math.expm1` method
// https://tc39.github.io/ecma262/#sec-math.expm1
$({ target: 'Math', stat: true, forced: expm1 != Math.expm1 }, { expm1: expm1 });
/***/ }),
/***/ "JkSk":
/*!************************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/regexp-sticky-helpers.js ***!
\************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var fails = __webpack_require__(/*! ./fails */ "rG8t");
// babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError,
// so we use an intermediate function.
function RE(s, f) {
return RegExp(s, f);
}
exports.UNSUPPORTED_Y = fails(function () {
// babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
var re = RE('a', 'y');
re.lastIndex = 2;
return re.exec('abcd') != null;
});
exports.BROKEN_CARET = fails(function () {
// https://bugzilla.mozilla.org/show_bug.cgi?id=773687
var re = RE('^r', 'gy');
re.lastIndex = 2;
return re.exec('str') != null;
});
/***/ }),
/***/ "Jt/z":
/*!********************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.array.find-index.js ***!
\********************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var $findIndex = __webpack_require__(/*! ../internals/array-iteration */ "kk6e").findIndex;
var addToUnscopables = __webpack_require__(/*! ../internals/add-to-unscopables */ "A1Hp");
var arrayMethodUsesToLength = __webpack_require__(/*! ../internals/array-method-uses-to-length */ "w2hq");
var FIND_INDEX = 'findIndex';
var SKIPS_HOLES = true;
var USES_TO_LENGTH = arrayMethodUsesToLength(FIND_INDEX);
// Shouldn't skip holes
if (FIND_INDEX in []) Array(1)[FIND_INDEX](function () { SKIPS_HOLES = false; });
// `Array.prototype.findIndex` method
// https://tc39.github.io/ecma262/#sec-array.prototype.findindex
$({ target: 'Array', proto: true, forced: SKIPS_HOLES || !USES_TO_LENGTH }, {
findIndex: function findIndex(callbackfn /* , that = undefined */) {
return $findIndex(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
}
});
// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
addToUnscopables(FIND_INDEX);
/***/ }),
/***/ "K1Z7":
/*!****************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.string.match.js ***!
\****************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var fixRegExpWellKnownSymbolLogic = __webpack_require__(/*! ../internals/fix-regexp-well-known-symbol-logic */ "HSQg");
var anObject = __webpack_require__(/*! ../internals/an-object */ "F26l");
var toLength = __webpack_require__(/*! ../internals/to-length */ "xpLY");
var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ "hmpk");
var advanceStringIndex = __webpack_require__(/*! ../internals/advance-string-index */ "dPn5");
var regExpExec = __webpack_require__(/*! ../internals/regexp-exec-abstract */ "unYP");
// @@match logic
fixRegExpWellKnownSymbolLogic('match', 1, function (MATCH, nativeMatch, maybeCallNative) {
return [
// `String.prototype.match` method
// https://tc39.github.io/ecma262/#sec-string.prototype.match
function match(regexp) {
var O = requireObjectCoercible(this);
var matcher = regexp == undefined ? undefined : regexp[MATCH];
return matcher !== undefined ? matcher.call(regexp, O) : new RegExp(regexp)[MATCH](String(O));
},
// `RegExp.prototype[@@match]` method
// https://tc39.github.io/ecma262/#sec-regexp.prototype-@@match
function (regexp) {
var res = maybeCallNative(nativeMatch, regexp, this);
if (res.done) return res.value;
var rx = anObject(regexp);
var S = String(this);
if (!rx.global) return regExpExec(rx, S);
var fullUnicode = rx.unicode;
rx.lastIndex = 0;
var A = [];
var n = 0;
var result;
while ((result = regExpExec(rx, S)) !== null) {
var matchStr = String(result[0]);
A[n] = matchStr;
if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
n++;
}
return n === 0 ? null : A;
}
];
});
/***/ }),
/***/ "K1dl":
/*!*****************************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/native-promise-constructor.js ***!
\*****************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__(/*! ../internals/global */ "ocAm");
module.exports = global.Promise;
/***/ }),
/***/ "K6ZX":
/*!**********************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/inherit-if-required.js ***!
\**********************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var isObject = __webpack_require__(/*! ../internals/is-object */ "6XUM");
var setPrototypeOf = __webpack_require__(/*! ../internals/object-set-prototype-of */ "7/lX");
// makes subclassing work correct for wrapped built-ins
module.exports = function ($this, dummy, Wrapper) {
var NewTarget, NewTargetPrototype;
if (
// it can work only with native `setPrototypeOf`
setPrototypeOf &&
// we haven't completely correct pre-ES6 way for getting `new.target`, so use this
typeof (NewTarget = dummy.constructor) == 'function' &&
NewTarget !== Wrapper &&
isObject(NewTargetPrototype = NewTarget.prototype) &&
NewTargetPrototype !== Wrapper.prototype
) setPrototypeOf($this, NewTargetPrototype);
return $this;
};
/***/ }),
/***/ "KBkW":
/*!***************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/shared-store.js ***!
\***************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__(/*! ../internals/global */ "ocAm");
var setGlobal = __webpack_require__(/*! ../internals/set-global */ "Fqhe");
var SHARED = '__core-js_shared__';
var store = global[SHARED] || setGlobal(SHARED, {});
module.exports = store;
/***/ }),
/***/ "KMug":
/*!********************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.object.is-frozen.js ***!
\********************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var fails = __webpack_require__(/*! ../internals/fails */ "rG8t");
var isObject = __webpack_require__(/*! ../internals/is-object */ "6XUM");
var nativeIsFrozen = Object.isFrozen;
var FAILS_ON_PRIMITIVES = fails(function () { nativeIsFrozen(1); });
// `Object.isFrozen` method
// https://tc39.github.io/ecma262/#sec-object.isfrozen
$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, {
isFrozen: function isFrozen(it) {
return isObject(it) ? nativeIsFrozen ? nativeIsFrozen(it) : false : true;
}
});
/***/ }),
/***/ "KXK2":
/*!***************************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.reflect.delete-property.js ***!
\***************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var anObject = __webpack_require__(/*! ../internals/an-object */ "F26l");
var getOwnPropertyDescriptor = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ "7gGY").f;
// `Reflect.deleteProperty` method
// https://tc39.github.io/ecma262/#sec-reflect.deleteproperty
$({ target: 'Reflect', stat: true }, {
deleteProperty: function deleteProperty(target, propertyKey) {
var descriptor = getOwnPropertyDescriptor(anObject(target), propertyKey);
return descriptor && !descriptor.configurable ? false : delete target[propertyKey];
}
});
/***/ }),
/***/ "KkqW":
/*!********************************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/object-get-own-property-names.js ***!
\********************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var internalObjectKeys = __webpack_require__(/*! ../internals/object-keys-internal */ "vVmn");
var enumBugKeys = __webpack_require__(/*! ../internals/enum-bug-keys */ "aAjO");
var hiddenKeys = enumBugKeys.concat('length', 'prototype');
// `Object.getOwnPropertyNames` method
// https://tc39.github.io/ecma262/#sec-object.getownpropertynames
exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
return internalObjectKeys(O, hiddenKeys);
};
/***/ }),
/***/ "KlhL":
/*!****************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/object-assign.js ***!
\****************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "T69T");
var fails = __webpack_require__(/*! ../internals/fails */ "rG8t");
var objectKeys = __webpack_require__(/*! ../internals/object-keys */ "ZRqE");
var getOwnPropertySymbolsModule = __webpack_require__(/*! ../internals/object-get-own-property-symbols */ "busr");
var propertyIsEnumerableModule = __webpack_require__(/*! ../internals/object-property-is-enumerable */ "gn9T");
var toObject = __webpack_require__(/*! ../internals/to-object */ "VCQ8");
var IndexedObject = __webpack_require__(/*! ../internals/indexed-object */ "tUdv");
var nativeAssign = Object.assign;
var defineProperty = Object.defineProperty;
// `Object.assign` method
// https://tc39.github.io/ecma262/#sec-object.assign
module.exports = !nativeAssign || fails(function () {
// should have correct order of operations (Edge bug)
if (DESCRIPTORS && nativeAssign({ b: 1 }, nativeAssign(defineProperty({}, 'a', {
enumerable: true,
get: function () {
defineProperty(this, 'b', {
value: 3,
enumerable: false
});
}
}), { b: 2 })).b !== 1) return true;
// should work with symbols and should have deterministic property order (V8 bug)
var A = {};
var B = {};
// eslint-disable-next-line no-undef
var symbol = Symbol();
var alphabet = 'abcdefghijklmnopqrst';
A[symbol] = 7;
alphabet.split('').forEach(function (chr) { B[chr] = chr; });
return nativeAssign({}, A)[symbol] != 7 || objectKeys(nativeAssign({}, B)).join('') != alphabet;
}) ? function assign(target, source) { // eslint-disable-line no-unused-vars
var T = toObject(target);
var argumentsLength = arguments.length;
var index = 1;
var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
var propertyIsEnumerable = propertyIsEnumerableModule.f;
while (argumentsLength > index) {
var S = IndexedObject(arguments[index++]);
var keys = getOwnPropertySymbols ? objectKeys(S).concat(getOwnPropertySymbols(S)) : objectKeys(S);
var length = keys.length;
var j = 0;
var key;
while (length > j) {
key = keys[j++];
if (!DESCRIPTORS || propertyIsEnumerable.call(S, key)) T[key] = S[key];
}
} return T;
} : nativeAssign;
/***/ }),
/***/ "KsdI":
/*!*******************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.symbol.iterator.js ***!
\*******************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var defineWellKnownSymbol = __webpack_require__(/*! ../internals/define-well-known-symbol */ "94Vg");
// `Symbol.iterator` well-known symbol
// https://tc39.github.io/ecma262/#sec-symbol.iterator
defineWellKnownSymbol('iterator');
/***/ }),
/***/ "L4l2":
/*!*******************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.string.includes.js ***!
\*******************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var notARegExp = __webpack_require__(/*! ../internals/not-a-regexp */ "s8qp");
var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ "hmpk");
var correctIsRegExpLogic = __webpack_require__(/*! ../internals/correct-is-regexp-logic */ "0Ds2");
// `String.prototype.includes` method
// https://tc39.github.io/ecma262/#sec-string.prototype.includes
$({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }, {
includes: function includes(searchString /* , position = 0 */) {
return !!~String(requireObjectCoercible(this))
.indexOf(notARegExp(searchString), arguments.length > 1 ? arguments[1] : undefined);
}
});
/***/ }),
/***/ "LRWt":
/*!********************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/es/symbol/index.js ***!
\********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__(/*! ../../modules/es.array.concat */ "F4rZ");
__webpack_require__(/*! ../../modules/es.object.to-string */ "NX+v");
__webpack_require__(/*! ../../modules/es.symbol */ "SNUk");
__webpack_require__(/*! ../../modules/es.symbol.async-iterator */ "c/8x");
__webpack_require__(/*! ../../modules/es.symbol.description */ "0luR");
__webpack_require__(/*! ../../modules/es.symbol.has-instance */ "Pfbg");
__webpack_require__(/*! ../../modules/es.symbol.is-concat-spreadable */ "V+F/");
__webpack_require__(/*! ../../modules/es.symbol.iterator */ "KsdI");
__webpack_require__(/*! ../../modules/es.symbol.match */ "ERXZ");
__webpack_require__(/*! ../../modules/es.symbol.match-all */ "YOJ4");
__webpack_require__(/*! ../../modules/es.symbol.replace */ "S3W2");
__webpack_require__(/*! ../../modules/es.symbol.search */ "8+YH");
__webpack_require__(/*! ../../modules/es.symbol.species */ "uKyN");
__webpack_require__(/*! ../../modules/es.symbol.split */ "Vi1R");
__webpack_require__(/*! ../../modules/es.symbol.to-primitive */ "9kNm");
__webpack_require__(/*! ../../modules/es.symbol.to-string-tag */ "ZQqA");
__webpack_require__(/*! ../../modules/es.symbol.unscopables */ "815a");
__webpack_require__(/*! ../../modules/es.math.to-string-tag */ "OVXS");
__webpack_require__(/*! ../../modules/es.json.to-string-tag */ "8CeQ");
var path = __webpack_require__(/*! ../../internals/path */ "E7aN");
module.exports = path.Symbol;
/***/ }),
/***/ "LdO1":
/*!***************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/to-primitive.js ***!
\***************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var isObject = __webpack_require__(/*! ../internals/is-object */ "6XUM");
// `ToPrimitive` abstract operation
// https://tc39.github.io/ecma262/#sec-toprimitive
// instead of the ES6 spec version, we didn't implement @@toPrimitive case
// and the second argument - flag - preferred type is a string
module.exports = function (input, PREFERRED_STRING) {
if (!isObject(input)) return input;
var fn, val;
if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
if (typeof (fn = input.valueOf) == 'function' && !isObject(val = fn.call(input))) return val;
if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
throw TypeError("Can't convert object to primitive value");
};
/***/ }),
/***/ "M1AK":
/*!**************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.math.clz32.js ***!
\**************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var floor = Math.floor;
var log = Math.log;
var LOG2E = Math.LOG2E;
// `Math.clz32` method
// https://tc39.github.io/ecma262/#sec-math.clz32
$({ target: 'Math', stat: true }, {
clz32: function clz32(x) {
return (x >>>= 0) ? 31 - floor(log(x + 0.5) * LOG2E) : 32;
}
});
/***/ }),
/***/ "M7Xk":
/*!********************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/internal-metadata.js ***!
\********************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var hiddenKeys = __webpack_require__(/*! ../internals/hidden-keys */ "yQMY");
var isObject = __webpack_require__(/*! ../internals/is-object */ "6XUM");
var has = __webpack_require__(/*! ../internals/has */ "OG5q");
var defineProperty = __webpack_require__(/*! ../internals/object-define-property */ "/Ybd").f;
var uid = __webpack_require__(/*! ../internals/uid */ "SDMg");
var FREEZING = __webpack_require__(/*! ../internals/freezing */ "cZY6");
var METADATA = uid('meta');
var id = 0;
var isExtensible = Object.isExtensible || function () {
return true;
};
var setMetadata = function (it) {
defineProperty(it, METADATA, { value: {
objectID: 'O' + ++id, // object ID
weakData: {} // weak collections IDs
} });
};
var fastKey = function (it, create) {
// return a primitive with prefix
if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;
if (!has(it, METADATA)) {
// can't set metadata to uncaught frozen object
if (!isExtensible(it)) return 'F';
// not necessary to add metadata
if (!create) return 'E';
// add missing metadata
setMetadata(it);
// return object ID
} return it[METADATA].objectID;
};
var getWeakData = function (it, create) {
if (!has(it, METADATA)) {
// can't set metadata to uncaught frozen object
if (!isExtensible(it)) return true;
// not necessary to add metadata
if (!create) return false;
// add missing metadata
setMetadata(it);
// return the store of weak collections IDs
} return it[METADATA].weakData;
};
// add metadata on freeze-family methods calling
var onFreeze = function (it) {
if (FREEZING && meta.REQUIRED && isExtensible(it) && !has(it, METADATA)) setMetadata(it);
return it;
};
var meta = module.exports = {
REQUIRED: false,
fastKey: fastKey,
getWeakData: getWeakData,
onFreeze: onFreeze
};
hiddenKeys[METADATA] = true;
/***/ }),
/***/ "MjoC":
/*!*****************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.function.name.js ***!
\*****************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "T69T");
var defineProperty = __webpack_require__(/*! ../internals/object-define-property */ "/Ybd").f;
var FunctionPrototype = Function.prototype;
var FunctionPrototypeToString = FunctionPrototype.toString;
var nameRE = /^\s*function ([^ (]*)/;
var NAME = 'name';
// Function instances `.name` property
// https://tc39.github.io/ecma262/#sec-function-instances-name
if (DESCRIPTORS && !(NAME in FunctionPrototype)) {
defineProperty(FunctionPrototype, NAME, {
configurable: true,
get: function () {
try {
return FunctionPrototypeToString.call(this).match(nameRE)[1];
} catch (error) {
return '';
}
}
});
}
/***/ }),
/***/ "MkZA":
/*!************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/is-forced.js ***!
\************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var fails = __webpack_require__(/*! ../internals/fails */ "rG8t");
var replacement = /#|\.prototype\./;
var isForced = function (feature, detection) {
var value = data[normalize(feature)];
return value == POLYFILL ? true
: value == NATIVE ? false
: typeof detection == 'function' ? fails(detection)
: !!detection;
};
var normalize = isForced.normalize = function (string) {
return String(string).replace(replacement, '.').toLowerCase();
};
var data = isForced.data = {};
var NATIVE = isForced.NATIVE = 'N';
var POLYFILL = isForced.POLYFILL = 'P';
module.exports = isForced;
/***/ }),
/***/ "N+g0":
/*!********************************************************************!*\
!*** ./node_modules/core-js/internals/object-define-properties.js ***!
\********************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "g6v/");
var definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ "m/L8");
var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk");
var objectKeys = __webpack_require__(/*! ../internals/object-keys */ "33Wh");
// `Object.defineProperties` method
// https://tc39.github.io/ecma262/#sec-object.defineproperties
module.exports = DESCRIPTORS ? Object.defineProperties : function defineProperties(O, Properties) {
anObject(O);
var keys = objectKeys(Properties);
var length = keys.length;
var index = 0;
var key;
while (length > index) definePropertyModule.f(O, key = keys[index++], Properties[key]);
return O;
};
/***/ }),
/***/ "N/DB":
/*!*********************************************************!*\
!*** ./node_modules/@angular/localize/fesm2015/init.js ***!
\*********************************************************/
/*! exports provided: $localize */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "$localize", function() { return $localize; });
/**
* @license Angular v11.2.14
* (c) 2010-2021 Google LLC. https://angular.io/
* License: MIT
*/
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
var __globalThis = typeof globalThis !== 'undefined' && globalThis;
var __window = typeof window !== 'undefined' && window;
var __self = typeof self !== 'undefined' && typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope && self;
var __global = typeof global !== 'undefined' && global; // Always use __globalThis if available; this is the spec-defined global variable across all
// environments.
// Then fallback to __global first; in Node tests both __global and __window may be defined.
var _global = __globalThis || __global || __window || __self;
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* Tag a template literal string for localization.
*
* For example:
*
* ```ts
* $localize `some string to localize`
* ```
*
* **Providing meaning, description and id**
*
* You can optionally specify one or more of `meaning`, `description` and `id` for a localized
* string by pre-pending it with a colon delimited block of the form:
*
* ```ts
* $localize`:meaning|description@@id:source message text`;
*
* $localize`:meaning|:source message text`;
* $localize`:description:source message text`;
* $localize`:@@id:source message text`;
* ```
*
* This format is the same as that used for `i18n` markers in Angular templates. See the
* [Angular 18n guide](guide/i18n#mark-text-for-translations).
*
* **Naming placeholders**
*
* If the template literal string contains expressions, then the expressions will be automatically
* associated with placeholder names for you.
*
* For example:
*
* ```ts
* $localize `Hi ${name}! There are ${items.length} items.`;
* ```
*
* will generate a message-source of `Hi {$PH}! There are {$PH_1} items`.
*
* The recommended practice is to name the placeholder associated with each expression though.
*
* Do this by providing the placeholder name wrapped in `:` characters directly after the
* expression. These placeholder names are stripped out of the rendered localized string.
*
* For example, to name the `items.length` expression placeholder `itemCount` you write:
*
* ```ts
* $localize `There are ${items.length}:itemCount: items`;
* ```
*
* **Escaping colon markers**
*
* If you need to use a `:` character directly at the start of a tagged string that has no
* metadata block, or directly after a substitution expression that has no name you must escape
* the `:` by preceding it with a backslash:
*
* For example:
*
* ```ts
* // message has a metadata block so no need to escape colon
* $localize `:some description::this message starts with a colon (:)`;
* // no metadata block so the colon must be escaped
* $localize `\:this message starts with a colon (:)`;
* ```
*
* ```ts
* // named substitution so no need to escape colon
* $localize `${label}:label:: ${}`
* // anonymous substitution so colon must be escaped
* $localize `${label}\: ${}`
* ```
*
* **Processing localized strings:**
*
* There are three scenarios:
*
* * **compile-time inlining**: the `$localize` tag is transformed at compile time by a
* transpiler, removing the tag and replacing the template literal string with a translated
* literal string from a collection of translations provided to the transpilation tool.
*
* * **run-time evaluation**: the `$localize` tag is a run-time function that replaces and
* reorders the parts (static strings and expressions) of the template literal string with strings
* from a collection of translations loaded at run-time.
*
* * **pass-through evaluation**: the `$localize` tag is a run-time function that simply evaluates
* the original template literal string without applying any translations to the parts. This
* version is used during development or where there is no need to translate the localized
* template literals.
*
* @param messageParts a collection of the static parts of the template string.
* @param expressions a collection of the values of each placeholder in the template string.
* @returns the translated string, with the `messageParts` and `expressions` interleaved together.
*
* @globalApi
* @publicApi
*/
var $localize = function $localize(messageParts) {
for (var _len = arguments.length, expressions = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
expressions[_key - 1] = arguments[_key];
}
if ($localize.translate) {
// Don't use array expansion here to avoid the compiler adding `__read()` helper unnecessarily.
var translation = $localize.translate(messageParts, expressions);
messageParts = translation[0];
expressions = translation[1];
}
var message = stripBlock(messageParts[0], messageParts.raw[0]);
for (var i = 1; i < messageParts.length; i++) {
message += expressions[i - 1] + stripBlock(messageParts[i], messageParts.raw[i]);
}
return message;
};
var BLOCK_MARKER = ':';
/**
* Strip a delimited "block" from the start of the `messagePart`, if it is found.
*
* If a marker character (:) actually appears in the content at the start of a tagged string or
* after a substitution expression, where a block has not been provided the character must be
* escaped with a backslash, `\:`. This function checks for this by looking at the `raw`
* messagePart, which should still contain the backslash.
*
* @param messagePart The cooked message part to process.
* @param rawMessagePart The raw message part to check.
* @returns the message part with the placeholder name stripped, if found.
* @throws an error if the block is unterminated
*/
function stripBlock(messagePart, rawMessagePart) {
return rawMessagePart.charAt(0) === BLOCK_MARKER ? messagePart.substring(findEndOfBlock(messagePart, rawMessagePart) + 1) : messagePart;
}
/**
* Find the end of a "marked block" indicated by the first non-escaped colon.
*
* @param cooked The cooked string (where escaped chars have been processed)
* @param raw The raw string (where escape sequences are still in place)
*
* @returns the index of the end of block marker
* @throws an error if the block is unterminated
*/
function findEndOfBlock(cooked, raw) {
/***********************************************************************************************
* This function is repeated in `src/utils/messages.ts` and the two should be kept in sync.
* The reason is that this file is marked as having side-effects, and if we import `messages.ts`
* into it, the whole of `src/utils` will be included in this bundle and none of the functions
* will be tree shaken.
***********************************************************************************************/
for (var cookedIndex = 1, rawIndex = 1; cookedIndex < cooked.length; cookedIndex++, rawIndex++) {
if (raw[rawIndex] === '\\') {
rawIndex++;
} else if (cooked[cookedIndex] === BLOCK_MARKER) {
return cookedIndex;
}
}
throw new Error("Unterminated $localize metadata block in \"".concat(raw, "\"."));
}
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
// Attach $localize to the global context, as a side-effect of this module.
_global.$localize = $localize;
/***/ }),
/***/ "NIlc":
/*!******************************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/copy-constructor-properties.js ***!
\******************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var has = __webpack_require__(/*! ../internals/has */ "OG5q");
var ownKeys = __webpack_require__(/*! ../internals/own-keys */ "76gj");
var getOwnPropertyDescriptorModule = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ "7gGY");
var definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ "/Ybd");
module.exports = function (target, source) {
var keys = ownKeys(source);
var defineProperty = definePropertyModule.f;
var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
for (var i = 0; i < keys.length; i++) {
var key = keys[i];
if (!has(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));
}
};
/***/ }),
/***/ "NX+v":
/*!********************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.object.to-string.js ***!
\********************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var TO_STRING_TAG_SUPPORT = __webpack_require__(/*! ../internals/to-string-tag-support */ "4PyY");
var redefine = __webpack_require__(/*! ../internals/redefine */ "2MGJ");
var toString = __webpack_require__(/*! ../internals/object-to-string */ "azxr");
// `Object.prototype.toString` method
// https://tc39.github.io/ecma262/#sec-object.prototype.tostring
if (!TO_STRING_TAG_SUPPORT) {
redefine(Object.prototype, 'toString', toString, { unsafe: true });
}
/***/ }),
/***/ "Neub":
/*!*************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/a-function.js ***!
\*************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = function (it) {
if (typeof it != 'function') {
throw TypeError(String(it) + ' is not a function');
} return it;
};
/***/ }),
/***/ "Nvxz":
/*!*************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/is-integer.js ***!
\*************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var isObject = __webpack_require__(/*! ../internals/is-object */ "6XUM");
var floor = Math.floor;
// `Number.isInteger` method implementation
// https://tc39.github.io/ecma262/#sec-number.isinteger
module.exports = function isInteger(it) {
return !isObject(it) && isFinite(it) && floor(it) === it;
};
/***/ }),
/***/ "O3xq":
/*!*************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/math-log1p.js ***!
\*************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
var log = Math.log;
// `Math.log1p` method implementation
// https://tc39.github.io/ecma262/#sec-math.log1p
module.exports = Math.log1p || function log1p(x) {
return (x = +x) > -1e-8 && x < 1e-8 ? x - x * x / 2 : log(1 + x);
};
/***/ }),
/***/ "O741":
/*!****************************************************************!*\
!*** ./node_modules/core-js/internals/a-possible-prototype.js ***!
\****************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var isObject = __webpack_require__(/*! ../internals/is-object */ "hh1v");
module.exports = function (it) {
if (!isObject(it) && it !== null) {
throw TypeError("Can't set " + String(it) + ' as a prototype');
} return it;
};
/***/ }),
/***/ "OG5q":
/*!******************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/has.js ***!
\******************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
var hasOwnProperty = {}.hasOwnProperty;
module.exports = function (it, key) {
return hasOwnProperty.call(it, key);
};
/***/ }),
/***/ "OVXS":
/*!**********************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.math.to-string-tag.js ***!
\**********************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var setToStringTag = __webpack_require__(/*! ../internals/set-to-string-tag */ "shqn");
// Math[@@toStringTag] property
// https://tc39.github.io/ecma262/#sec-math-@@tostringtag
setToStringTag(Math, 'Math', true);
/***/ }),
/***/ "OXtp":
/*!*****************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/array-includes.js ***!
\*****************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ "EMtK");
var toLength = __webpack_require__(/*! ../internals/to-length */ "xpLY");
var toAbsoluteIndex = __webpack_require__(/*! ../internals/to-absolute-index */ "7Oj1");
// `Array.prototype.{ indexOf, includes }` methods implementation
var createMethod = function (IS_INCLUDES) {
return function ($this, el, fromIndex) {
var O = toIndexedObject($this);
var length = toLength(O.length);
var index = toAbsoluteIndex(fromIndex, length);
var value;
// Array#includes uses SameValueZero equality algorithm
// eslint-disable-next-line no-self-compare
if (IS_INCLUDES && el != el) while (length > index) {
value = O[index++];
// eslint-disable-next-line no-self-compare
if (value != value) return true;
// Array#indexOf ignores holes, Array#includes - not
} else for (;length > index; index++) {
if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
} return !IS_INCLUDES && -1;
};
};
module.exports = {
// `Array.prototype.includes` method
// https://tc39.github.io/ecma262/#sec-array.prototype.includes
includes: createMethod(true),
// `Array.prototype.indexOf` method
// https://tc39.github.io/ecma262/#sec-array.prototype.indexof
indexOf: createMethod(false)
};
/***/ }),
/***/ "OjQg":
/*!****************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/dom-iterables.js ***!
\****************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
// iterable DOM collections
// flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
module.exports = {
CSSRuleList: 0,
CSSStyleDeclaration: 0,
CSSValueList: 0,
ClientRectList: 0,
DOMRectList: 0,
DOMStringList: 0,
DOMTokenList: 1,
DataTransferItemList: 0,
FileList: 0,
HTMLAllCollection: 0,
HTMLCollection: 0,
HTMLFormElement: 0,
HTMLSelectElement: 0,
MediaList: 0,
MimeTypeArray: 0,
NamedNodeMap: 0,
NodeList: 1,
PaintRequestList: 0,
Plugin: 0,
PluginArray: 0,
SVGLengthList: 0,
SVGNumberList: 0,
SVGPathSegList: 0,
SVGPointList: 0,
SVGStringList: 0,
SVGTransformList: 0,
SourceBufferList: 0,
StyleSheetList: 0,
TextTrackCueList: 0,
TextTrackList: 0,
TouchList: 0
};
/***/ }),
/***/ "Ox9q":
/*!*******************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/task.js ***!
\*******************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__(/*! ../internals/global */ "ocAm");
var fails = __webpack_require__(/*! ../internals/fails */ "rG8t");
var classof = __webpack_require__(/*! ../internals/classof-raw */ "ezU2");
var bind = __webpack_require__(/*! ../internals/function-bind-context */ "tcQx");
var html = __webpack_require__(/*! ../internals/html */ "149L");
var createElement = __webpack_require__(/*! ../internals/document-create-element */ "qx7X");
var IS_IOS = __webpack_require__(/*! ../internals/engine-is-ios */ "tuHh");
var location = global.location;
var set = global.setImmediate;
var clear = global.clearImmediate;
var process = global.process;
var MessageChannel = global.MessageChannel;
var Dispatch = global.Dispatch;
var counter = 0;
var queue = {};
var ONREADYSTATECHANGE = 'onreadystatechange';
var defer, channel, port;
var run = function (id) {
// eslint-disable-next-line no-prototype-builtins
if (queue.hasOwnProperty(id)) {
var fn = queue[id];
delete queue[id];
fn();
}
};
var runner = function (id) {
return function () {
run(id);
};
};
var listener = function (event) {
run(event.data);
};
var post = function (id) {
// old engines have not location.origin
global.postMessage(id + '', location.protocol + '//' + location.host);
};
// Node.js 0.9+ & IE10+ has setImmediate, otherwise:
if (!set || !clear) {
set = function setImmediate(fn) {
var args = [];
var i = 1;
while (arguments.length > i) args.push(arguments[i++]);
queue[++counter] = function () {
// eslint-disable-next-line no-new-func
(typeof fn == 'function' ? fn : Function(fn)).apply(undefined, args);
};
defer(counter);
return counter;
};
clear = function clearImmediate(id) {
delete queue[id];
};
// Node.js 0.8-
if (classof(process) == 'process') {
defer = function (id) {
process.nextTick(runner(id));
};
// Sphere (JS game engine) Dispatch API
} else if (Dispatch && Dispatch.now) {
defer = function (id) {
Dispatch.now(runner(id));
};
// Browsers with MessageChannel, includes WebWorkers
// except iOS - https://github.com/zloirock/core-js/issues/624
} else if (MessageChannel && !IS_IOS) {
channel = new MessageChannel();
port = channel.port2;
channel.port1.onmessage = listener;
defer = bind(port.postMessage, port, 1);
// Browsers with postMessage, skip WebWorkers
// IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
} else if (
global.addEventListener &&
typeof postMessage == 'function' &&
!global.importScripts &&
!fails(post) &&
location.protocol !== 'file:'
) {
defer = post;
global.addEventListener('message', listener, false);
// IE8-
} else if (ONREADYSTATECHANGE in createElement('script')) {
defer = function (id) {
html.appendChild(createElement('script'))[ONREADYSTATECHANGE] = function () {
html.removeChild(this);
run(id);
};
};
// Rest old browsers
} else {
defer = function (id) {
setTimeout(runner(id), 0);
};
}
}
module.exports = {
set: set,
clear: clear
};
/***/ }),
/***/ "PbJR":
/*!*************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.parse-int.js ***!
\*************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var parseIntImplementation = __webpack_require__(/*! ../internals/number-parse-int */ "4NCC");
// `parseInt` method
// https://tc39.github.io/ecma262/#sec-parseint-string-radix
$({ global: true, forced: parseInt != parseIntImplementation }, {
parseInt: parseIntImplementation
});
/***/ }),
/***/ "Pf6x":
/*!***************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.math.fround.js ***!
\***************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var fround = __webpack_require__(/*! ../internals/math-fround */ "48xZ");
// `Math.fround` method
// https://tc39.github.io/ecma262/#sec-math.fround
$({ target: 'Math', stat: true }, { fround: fround });
/***/ }),
/***/ "Pfbg":
/*!***********************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.symbol.has-instance.js ***!
\***********************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var defineWellKnownSymbol = __webpack_require__(/*! ../internals/define-well-known-symbol */ "94Vg");
// `Symbol.hasInstance` well-known symbol
// https://tc39.github.io/ecma262/#sec-symbol.hasinstance
defineWellKnownSymbol('hasInstance');
/***/ }),
/***/ "PmIt":
/*!****************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.string.split.js ***!
\****************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var fixRegExpWellKnownSymbolLogic = __webpack_require__(/*! ../internals/fix-regexp-well-known-symbol-logic */ "HSQg");
var isRegExp = __webpack_require__(/*! ../internals/is-regexp */ "1p6F");
var anObject = __webpack_require__(/*! ../internals/an-object */ "F26l");
var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ "hmpk");
var speciesConstructor = __webpack_require__(/*! ../internals/species-constructor */ "p82S");
var advanceStringIndex = __webpack_require__(/*! ../internals/advance-string-index */ "dPn5");
var toLength = __webpack_require__(/*! ../internals/to-length */ "xpLY");
var callRegExpExec = __webpack_require__(/*! ../internals/regexp-exec-abstract */ "unYP");
var regexpExec = __webpack_require__(/*! ../internals/regexp-exec */ "qjkP");
var fails = __webpack_require__(/*! ../internals/fails */ "rG8t");
var arrayPush = [].push;
var min = Math.min;
var MAX_UINT32 = 0xFFFFFFFF;
// babel-minify transpiles RegExp('x', 'y') -> /x/y and it causes SyntaxError
var SUPPORTS_Y = !fails(function () { return !RegExp(MAX_UINT32, 'y'); });
// @@split logic
fixRegExpWellKnownSymbolLogic('split', 2, function (SPLIT, nativeSplit, maybeCallNative) {
var internalSplit;
if (
'abbc'.split(/(b)*/)[1] == 'c' ||
'test'.split(/(?:)/, -1).length != 4 ||
'ab'.split(/(?:ab)*/).length != 2 ||
'.'.split(/(.?)(.?)/).length != 4 ||
'.'.split(/()()/).length > 1 ||
''.split(/.?/).length
) {
// based on es5-shim implementation, need to rework it
internalSplit = function (separator, limit) {
var string = String(requireObjectCoercible(this));
var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;
if (lim === 0) return [];
if (separator === undefined) return [string];
// If `separator` is not a regex, use native split
if (!isRegExp(separator)) {
return nativeSplit.call(string, separator, lim);
}
var output = [];
var flags = (separator.ignoreCase ? 'i' : '') +
(separator.multiline ? 'm' : '') +
(separator.unicode ? 'u' : '') +
(separator.sticky ? 'y' : '');
var lastLastIndex = 0;
// Make `global` and avoid `lastIndex` issues by working with a copy
var separatorCopy = new RegExp(separator.source, flags + 'g');
var match, lastIndex, lastLength;
while (match = regexpExec.call(separatorCopy, string)) {
lastIndex = separatorCopy.lastIndex;
if (lastIndex > lastLastIndex) {
output.push(string.slice(lastLastIndex, match.index));
if (match.length > 1 && match.index < string.length) arrayPush.apply(output, match.slice(1));
lastLength = match[0].length;
lastLastIndex = lastIndex;
if (output.length >= lim) break;
}
if (separatorCopy.lastIndex === match.index) separatorCopy.lastIndex++; // Avoid an infinite loop
}
if (lastLastIndex === string.length) {
if (lastLength || !separatorCopy.test('')) output.push('');
} else output.push(string.slice(lastLastIndex));
return output.length > lim ? output.slice(0, lim) : output;
};
// Chakra, V8
} else if ('0'.split(undefined, 0).length) {
internalSplit = function (separator, limit) {
return separator === undefined && limit === 0 ? [] : nativeSplit.call(this, separator, limit);
};
} else internalSplit = nativeSplit;
return [
// `String.prototype.split` method
// https://tc39.github.io/ecma262/#sec-string.prototype.split
function split(separator, limit) {
var O = requireObjectCoercible(this);
var splitter = separator == undefined ? undefined : separator[SPLIT];
return splitter !== undefined
? splitter.call(separator, O, limit)
: internalSplit.call(String(O), separator, limit);
},
// `RegExp.prototype[@@split]` method
// https://tc39.github.io/ecma262/#sec-regexp.prototype-@@split
//
// NOTE: This cannot be properly polyfilled in engines that don't support
// the 'y' flag.
function (regexp, limit) {
var res = maybeCallNative(internalSplit, regexp, this, limit, internalSplit !== nativeSplit);
if (res.done) return res.value;
var rx = anObject(regexp);
var S = String(this);
var C = speciesConstructor(rx, RegExp);
var unicodeMatching = rx.unicode;
var flags = (rx.ignoreCase ? 'i' : '') +
(rx.multiline ? 'm' : '') +
(rx.unicode ? 'u' : '') +
(SUPPORTS_Y ? 'y' : 'g');
// ^(? + rx + ) is needed, in combination with some S slicing, to
// simulate the 'y' flag.
var splitter = new C(SUPPORTS_Y ? rx : '^(?:' + rx.source + ')', flags);
var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;
if (lim === 0) return [];
if (S.length === 0) return callRegExpExec(splitter, S) === null ? [S] : [];
var p = 0;
var q = 0;
var A = [];
while (q < S.length) {
splitter.lastIndex = SUPPORTS_Y ? q : 0;
var z = callRegExpExec(splitter, SUPPORTS_Y ? S : S.slice(q));
var e;
if (
z === null ||
(e = min(toLength(splitter.lastIndex + (SUPPORTS_Y ? 0 : q)), S.length)) === p
) {
q = advanceStringIndex(S, q, unicodeMatching);
} else {
A.push(S.slice(p, q));
if (A.length === lim) return A;
for (var i = 1; i <= z.length - 1; i++) {
A.push(z[i]);
if (A.length === lim) return A;
}
q = p = e;
}
}
A.push(S.slice(p));
return A;
}
];
}, !SUPPORTS_Y);
/***/ }),
/***/ "PzqY":
/*!********************************************************************!*\
!*** ./node_modules/core-js/modules/es.reflect.define-property.js ***!
\********************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "g6v/");
var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk");
var toPrimitive = __webpack_require__(/*! ../internals/to-primitive */ "wE6v");
var definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ "m/L8");
var fails = __webpack_require__(/*! ../internals/fails */ "0Dky");
// MS Edge has broken Reflect.defineProperty - throwing instead of returning false
var ERROR_INSTEAD_OF_FALSE = fails(function () {
// eslint-disable-next-line no-undef
Reflect.defineProperty(definePropertyModule.f({}, 1, { value: 1 }), 1, { value: 2 });
});
// `Reflect.defineProperty` method
// https://tc39.github.io/ecma262/#sec-reflect.defineproperty
$({ target: 'Reflect', stat: true, forced: ERROR_INSTEAD_OF_FALSE, sham: !DESCRIPTORS }, {
defineProperty: function defineProperty(target, propertyKey, attributes) {
anObject(target);
var key = toPrimitive(propertyKey, true);
anObject(attributes);
try {
definePropertyModule.f(target, key, attributes);
return true;
} catch (error) {
return false;
}
}
});
/***/ }),
/***/ "Q4jj":
/*!****************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.array.reduce.js ***!
\****************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var $reduce = __webpack_require__(/*! ../internals/array-reduce */ "vyNX").left;
var arrayMethodIsStrict = __webpack_require__(/*! ../internals/array-method-is-strict */ "6CJb");
var arrayMethodUsesToLength = __webpack_require__(/*! ../internals/array-method-uses-to-length */ "w2hq");
var STRICT_METHOD = arrayMethodIsStrict('reduce');
var USES_TO_LENGTH = arrayMethodUsesToLength('reduce', { 1: 0 });
// `Array.prototype.reduce` method
// https://tc39.github.io/ecma262/#sec-array.prototype.reduce
$({ target: 'Array', proto: true, forced: !STRICT_METHOD || !USES_TO_LENGTH }, {
reduce: function reduce(callbackfn /* , initialValue */) {
return $reduce(this, callbackfn, arguments.length, arguments.length > 1 ? arguments[1] : undefined);
}
});
/***/ }),
/***/ "QFgE":
/*!*************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.math.imul.js ***!
\*************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var fails = __webpack_require__(/*! ../internals/fails */ "rG8t");
var nativeImul = Math.imul;
var FORCED = fails(function () {
return nativeImul(0xFFFFFFFF, 5) != -5 || nativeImul.length != 2;
});
// `Math.imul` method
// https://tc39.github.io/ecma262/#sec-math.imul
// some WebKit versions fails with big numbers, some has wrong arity
$({ target: 'Math', stat: true, forced: FORCED }, {
imul: function imul(x, y) {
var UINT16 = 0xFFFF;
var xn = +x;
var yn = +y;
var xl = UINT16 & xn;
var yl = UINT16 & yn;
return 0 | xl * yl + ((UINT16 & xn >>> 16) * yl + xl * (UINT16 & yn >>> 16) << 16 >>> 0);
}
});
/***/ }),
/***/ "QPoQ":
/*!*********************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/es/reflect/index.js ***!
\*********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__(/*! ../../modules/es.reflect.apply */ "Ejw8");
__webpack_require__(/*! ../../modules/es.reflect.construct */ "EiAZ");
__webpack_require__(/*! ../../modules/es.reflect.define-property */ "yUZX");
__webpack_require__(/*! ../../modules/es.reflect.delete-property */ "KXK2");
__webpack_require__(/*! ../../modules/es.reflect.get */ "u7HS");
__webpack_require__(/*! ../../modules/es.reflect.get-own-property-descriptor */ "jGBA");
__webpack_require__(/*! ../../modules/es.reflect.get-prototype-of */ "fquo");
__webpack_require__(/*! ../../modules/es.reflect.has */ "jO7L");
__webpack_require__(/*! ../../modules/es.reflect.is-extensible */ "BlSG");
__webpack_require__(/*! ../../modules/es.reflect.own-keys */ "b1ja");
__webpack_require__(/*! ../../modules/es.reflect.prevent-extensions */ "YdMc");
__webpack_require__(/*! ../../modules/es.reflect.set */ "Cme9");
__webpack_require__(/*! ../../modules/es.reflect.set-prototype-of */ "8B3Q");
var path = __webpack_require__(/*! ../../internals/path */ "E7aN");
module.exports = path.Reflect;
/***/ }),
/***/ "QUoj":
/*!*****************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.string.anchor.js ***!
\*****************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var createHTML = __webpack_require__(/*! ../internals/create-html */ "uoca");
var forcedStringHTMLMethod = __webpack_require__(/*! ../internals/string-html-forced */ "d8Sw");
// `String.prototype.anchor` method
// https://tc39.github.io/ecma262/#sec-string.prototype.anchor
$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('anchor') }, {
anchor: function anchor(name) {
return createHTML(this, 'a', 'name', name);
}
});
/***/ }),
/***/ "QVG+":
/*!********************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.object.is-sealed.js ***!
\********************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var fails = __webpack_require__(/*! ../internals/fails */ "rG8t");
var isObject = __webpack_require__(/*! ../internals/is-object */ "6XUM");
var nativeIsSealed = Object.isSealed;
var FAILS_ON_PRIMITIVES = fails(function () { nativeIsSealed(1); });
// `Object.isSealed` method
// https://tc39.github.io/ecma262/#sec-object.issealed
$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, {
isSealed: function isSealed(it) {
return isObject(it) ? nativeIsSealed ? nativeIsSealed(it) : false : true;
}
});
/***/ }),
/***/ "QcXc":
/*!*************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/string-pad.js ***!
\*************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// https://github.com/tc39/proposal-string-pad-start-end
var toLength = __webpack_require__(/*! ../internals/to-length */ "xpLY");
var repeat = __webpack_require__(/*! ../internals/string-repeat */ "EMWV");
var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ "hmpk");
var ceil = Math.ceil;
// `String.prototype.{ padStart, padEnd }` methods implementation
var createMethod = function (IS_END) {
return function ($this, maxLength, fillString) {
var S = String(requireObjectCoercible($this));
var stringLength = S.length;
var fillStr = fillString === undefined ? ' ' : String(fillString);
var intMaxLength = toLength(maxLength);
var fillLen, stringFiller;
if (intMaxLength <= stringLength || fillStr == '') return S;
fillLen = intMaxLength - stringLength;
stringFiller = repeat.call(fillStr, ceil(fillLen / fillStr.length));
if (stringFiller.length > fillLen) stringFiller = stringFiller.slice(0, fillLen);
return IS_END ? S + stringFiller : stringFiller + S;
};
};
module.exports = {
// `String.prototype.padStart` method
// https://tc39.github.io/ecma262/#sec-string.prototype.padstart
start: createMethod(false),
// `String.prototype.padEnd` method
// https://tc39.github.io/ecma262/#sec-string.prototype.padend
end: createMethod(true)
};
/***/ }),
/***/ "Qo9l":
/*!************************************************!*\
!*** ./node_modules/core-js/internals/path.js ***!
\************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__(/*! ../internals/global */ "2oRo");
module.exports = global;
/***/ }),
/***/ "RCvO":
/*!*****************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.object.create.js ***!
\*****************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "T69T");
var create = __webpack_require__(/*! ../internals/object-create */ "2RDa");
// `Object.create` method
// https://tc39.github.io/ecma262/#sec-object.create
$({ target: 'Object', stat: true, sham: !DESCRIPTORS }, {
create: create
});
/***/ }),
/***/ "RK3t":
/*!**********************************************************!*\
!*** ./node_modules/core-js/internals/indexed-object.js ***!
\**********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var fails = __webpack_require__(/*! ../internals/fails */ "0Dky");
var classof = __webpack_require__(/*! ../internals/classof-raw */ "xrYK");
var split = ''.split;
// fallback for non-array-like ES3 and non-enumerable old V8 strings
module.exports = fails(function () {
// throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
// eslint-disable-next-line no-prototype-builtins
return !Object('z').propertyIsEnumerable(0);
}) ? function (it) {
return classof(it) == 'String' ? split.call(it, '') : Object(it);
} : Object;
/***/ }),
/***/ "Rj+b":
/*!********************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.regexp.to-string.js ***!
\********************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var redefine = __webpack_require__(/*! ../internals/redefine */ "2MGJ");
var anObject = __webpack_require__(/*! ../internals/an-object */ "F26l");
var fails = __webpack_require__(/*! ../internals/fails */ "rG8t");
var flags = __webpack_require__(/*! ../internals/regexp-flags */ "x0kV");
var TO_STRING = 'toString';
var RegExpPrototype = RegExp.prototype;
var nativeToString = RegExpPrototype[TO_STRING];
var NOT_GENERIC = fails(function () { return nativeToString.call({ source: 'a', flags: 'b' }) != '/a/b'; });
// FF44- RegExp#toString has a wrong name
var INCORRECT_NAME = nativeToString.name != TO_STRING;
// `RegExp.prototype.toString` method
// https://tc39.github.io/ecma262/#sec-regexp.prototype.tostring
if (NOT_GENERIC || INCORRECT_NAME) {
redefine(RegExp.prototype, TO_STRING, function toString() {
var R = anObject(this);
var p = String(R.source);
var rf = R.flags;
var f = String(rf === undefined && R instanceof RegExp && !('flags' in RegExpPrototype) ? flags.call(R) : rf);
return '/' + p + '/' + f;
}, { unsafe: true });
}
/***/ }),
/***/ "Rn6E":
/*!**********************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/iterate.js ***!
\**********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var anObject = __webpack_require__(/*! ../internals/an-object */ "F26l");
var isArrayIteratorMethod = __webpack_require__(/*! ../internals/is-array-iterator-method */ "5MmU");
var toLength = __webpack_require__(/*! ../internals/to-length */ "xpLY");
var bind = __webpack_require__(/*! ../internals/function-bind-context */ "tcQx");
var getIteratorMethod = __webpack_require__(/*! ../internals/get-iterator-method */ "F/TS");
var callWithSafeIterationClosing = __webpack_require__(/*! ../internals/call-with-safe-iteration-closing */ "ipMl");
var Result = function (stopped, result) {
this.stopped = stopped;
this.result = result;
};
var iterate = module.exports = function (iterable, fn, that, AS_ENTRIES, IS_ITERATOR) {
var boundFunction = bind(fn, that, AS_ENTRIES ? 2 : 1);
var iterator, iterFn, index, length, result, next, step;
if (IS_ITERATOR) {
iterator = iterable;
} else {
iterFn = getIteratorMethod(iterable);
if (typeof iterFn != 'function') throw TypeError('Target is not iterable');
// optimisation for array iterators
if (isArrayIteratorMethod(iterFn)) {
for (index = 0, length = toLength(iterable.length); length > index; index++) {
result = AS_ENTRIES
? boundFunction(anObject(step = iterable[index])[0], step[1])
: boundFunction(iterable[index]);
if (result && result instanceof Result) return result;
} return new Result(false);
}
iterator = iterFn.call(iterable);
}
next = iterator.next;
while (!(step = next.call(iterator)).done) {
result = callWithSafeIterationClosing(iterator, boundFunction, step.value, AS_ENTRIES);
if (typeof result == 'object' && result && result instanceof Result) return result;
} return new Result(false);
};
iterate.stop = function (result) {
return new Result(true, result);
};
/***/ }),
/***/ "S3W2":
/*!******************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.symbol.replace.js ***!
\******************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var defineWellKnownSymbol = __webpack_require__(/*! ../internals/define-well-known-symbol */ "94Vg");
// `Symbol.replace` well-known symbol
// https://tc39.github.io/ecma262/#sec-symbol.replace
defineWellKnownSymbol('replace');
/***/ }),
/***/ "S3Yw":
/*!******************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.string.replace.js ***!
\******************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var fixRegExpWellKnownSymbolLogic = __webpack_require__(/*! ../internals/fix-regexp-well-known-symbol-logic */ "HSQg");
var anObject = __webpack_require__(/*! ../internals/an-object */ "F26l");
var toObject = __webpack_require__(/*! ../internals/to-object */ "VCQ8");
var toLength = __webpack_require__(/*! ../internals/to-length */ "xpLY");
var toInteger = __webpack_require__(/*! ../internals/to-integer */ "vDBE");
var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ "hmpk");
var advanceStringIndex = __webpack_require__(/*! ../internals/advance-string-index */ "dPn5");
var regExpExec = __webpack_require__(/*! ../internals/regexp-exec-abstract */ "unYP");
var max = Math.max;
var min = Math.min;
var floor = Math.floor;
var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d\d?|<[^>]*>)/g;
var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d\d?)/g;
var maybeToString = function (it) {
return it === undefined ? it : String(it);
};
// @@replace logic
fixRegExpWellKnownSymbolLogic('replace', 2, function (REPLACE, nativeReplace, maybeCallNative, reason) {
var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = reason.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE;
var REPLACE_KEEPS_$0 = reason.REPLACE_KEEPS_$0;
var UNSAFE_SUBSTITUTE = REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE ? '$' : '$0';
return [
// `String.prototype.replace` method
// https://tc39.github.io/ecma262/#sec-string.prototype.replace
function replace(searchValue, replaceValue) {
var O = requireObjectCoercible(this);
var replacer = searchValue == undefined ? undefined : searchValue[REPLACE];
return replacer !== undefined
? replacer.call(searchValue, O, replaceValue)
: nativeReplace.call(String(O), searchValue, replaceValue);
},
// `RegExp.prototype[@@replace]` method
// https://tc39.github.io/ecma262/#sec-regexp.prototype-@@replace
function (regexp, replaceValue) {
if (
(!REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE && REPLACE_KEEPS_$0) ||
(typeof replaceValue === 'string' && replaceValue.indexOf(UNSAFE_SUBSTITUTE) === -1)
) {
var res = maybeCallNative(nativeReplace, regexp, this, replaceValue);
if (res.done) return res.value;
}
var rx = anObject(regexp);
var S = String(this);
var functionalReplace = typeof replaceValue === 'function';
if (!functionalReplace) replaceValue = String(replaceValue);
var global = rx.global;
if (global) {
var fullUnicode = rx.unicode;
rx.lastIndex = 0;
}
var results = [];
while (true) {
var result = regExpExec(rx, S);
if (result === null) break;
results.push(result);
if (!global) break;
var matchStr = String(result[0]);
if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
}
var accumulatedResult = '';
var nextSourcePosition = 0;
for (var i = 0; i < results.length; i++) {
result = results[i];
var matched = String(result[0]);
var position = max(min(toInteger(result.index), S.length), 0);
var captures = [];
// NOTE: This is equivalent to
// captures = result.slice(1).map(maybeToString)
// but for some reason `nativeSlice.call(result, 1, result.length)` (called in
// the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and
// causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.
for (var j = 1; j < result.length; j++) captures.push(maybeToString(result[j]));
var namedCaptures = result.groups;
if (functionalReplace) {
var replacerArgs = [matched].concat(captures, position, S);
if (namedCaptures !== undefined) replacerArgs.push(namedCaptures);
var replacement = String(replaceValue.apply(undefined, replacerArgs));
} else {
replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);
}
if (position >= nextSourcePosition) {
accumulatedResult += S.slice(nextSourcePosition, position) + replacement;
nextSourcePosition = position + matched.length;
}
}
return accumulatedResult + S.slice(nextSourcePosition);
}
];
// https://tc39.github.io/ecma262/#sec-getsubstitution
function getSubstitution(matched, str, position, captures, namedCaptures, replacement) {
var tailPos = position + matched.length;
var m = captures.length;
var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;
if (namedCaptures !== undefined) {
namedCaptures = toObject(namedCaptures);
symbols = SUBSTITUTION_SYMBOLS;
}
return nativeReplace.call(replacement, symbols, function (match, ch) {
var capture;
switch (ch.charAt(0)) {
case '$': return '$';
case '&': return matched;
case '`': return str.slice(0, position);
case "'": return str.slice(tailPos);
case '<':
capture = namedCaptures[ch.slice(1, -1)];
break;
default: // \d\d?
var n = +ch;
if (n === 0) return match;
if (n > m) {
var f = floor(n / 10);
if (f === 0) return match;
if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1);
return match;
}
capture = captures[n - 1];
}
return capture === undefined ? '' : capture;
});
}
});
/***/ }),
/***/ "S58s":
/*!*************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.math.cosh.js ***!
\*************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var expm1 = __webpack_require__(/*! ../internals/math-expm1 */ "pn4C");
var nativeCosh = Math.cosh;
var abs = Math.abs;
var E = Math.E;
// `Math.cosh` method
// https://tc39.github.io/ecma262/#sec-math.cosh
$({ target: 'Math', stat: true, forced: !nativeCosh || nativeCosh(710) === Infinity }, {
cosh: function cosh(x) {
var t = expm1(abs(x) - 1) + 1;
return (t + 1 / (t * E * E)) * (E / 2);
}
});
/***/ }),
/***/ "SC6u":
/*!***************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.regexp.exec.js ***!
\***************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var exec = __webpack_require__(/*! ../internals/regexp-exec */ "qjkP");
$({ target: 'RegExp', proto: true, forced: /./.exec !== exec }, {
exec: exec
});
/***/ }),
/***/ "SDMg":
/*!******************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/uid.js ***!
\******************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
var id = 0;
var postfix = Math.random();
module.exports = function (key) {
return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36);
};
/***/ }),
/***/ "SM6+":
/*!**************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/an-instance.js ***!
\**************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = function (it, Constructor, name) {
if (!(it instanceof Constructor)) {
throw TypeError('Incorrect ' + (name ? name + ' ' : '') + 'invocation');
} return it;
};
/***/ }),
/***/ "SNUk":
/*!**********************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.symbol.js ***!
\**********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var global = __webpack_require__(/*! ../internals/global */ "ocAm");
var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "Ew/G");
var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "g9hI");
var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "T69T");
var NATIVE_SYMBOL = __webpack_require__(/*! ../internals/native-symbol */ "U+kB");
var USE_SYMBOL_AS_UID = __webpack_require__(/*! ../internals/use-symbol-as-uid */ "i85Z");
var fails = __webpack_require__(/*! ../internals/fails */ "rG8t");
var has = __webpack_require__(/*! ../internals/has */ "OG5q");
var isArray = __webpack_require__(/*! ../internals/is-array */ "erNl");
var isObject = __webpack_require__(/*! ../internals/is-object */ "6XUM");
var anObject = __webpack_require__(/*! ../internals/an-object */ "F26l");
var toObject = __webpack_require__(/*! ../internals/to-object */ "VCQ8");
var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ "EMtK");
var toPrimitive = __webpack_require__(/*! ../internals/to-primitive */ "LdO1");
var createPropertyDescriptor = __webpack_require__(/*! ../internals/create-property-descriptor */ "uSMZ");
var nativeObjectCreate = __webpack_require__(/*! ../internals/object-create */ "2RDa");
var objectKeys = __webpack_require__(/*! ../internals/object-keys */ "ZRqE");
var getOwnPropertyNamesModule = __webpack_require__(/*! ../internals/object-get-own-property-names */ "KkqW");
var getOwnPropertyNamesExternal = __webpack_require__(/*! ../internals/object-get-own-property-names-external */ "TzEA");
var getOwnPropertySymbolsModule = __webpack_require__(/*! ../internals/object-get-own-property-symbols */ "busr");
var getOwnPropertyDescriptorModule = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ "7gGY");
var definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ "/Ybd");
var propertyIsEnumerableModule = __webpack_require__(/*! ../internals/object-property-is-enumerable */ "gn9T");
var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ "aJMj");
var redefine = __webpack_require__(/*! ../internals/redefine */ "2MGJ");
var shared = __webpack_require__(/*! ../internals/shared */ "yIiL");
var sharedKey = __webpack_require__(/*! ../internals/shared-key */ "/AsP");
var hiddenKeys = __webpack_require__(/*! ../internals/hidden-keys */ "yQMY");
var uid = __webpack_require__(/*! ../internals/uid */ "SDMg");
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "m41k");
var wrappedWellKnownSymbolModule = __webpack_require__(/*! ../internals/well-known-symbol-wrapped */ "aGCb");
var defineWellKnownSymbol = __webpack_require__(/*! ../internals/define-well-known-symbol */ "94Vg");
var setToStringTag = __webpack_require__(/*! ../internals/set-to-string-tag */ "shqn");
var InternalStateModule = __webpack_require__(/*! ../internals/internal-state */ "XH/I");
var $forEach = __webpack_require__(/*! ../internals/array-iteration */ "kk6e").forEach;
var HIDDEN = sharedKey('hidden');
var SYMBOL = 'Symbol';
var PROTOTYPE = 'prototype';
var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');
var setInternalState = InternalStateModule.set;
var getInternalState = InternalStateModule.getterFor(SYMBOL);
var ObjectPrototype = Object[PROTOTYPE];
var $Symbol = global.Symbol;
var $stringify = getBuiltIn('JSON', 'stringify');
var nativeGetOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
var nativeDefineProperty = definePropertyModule.f;
var nativeGetOwnPropertyNames = getOwnPropertyNamesExternal.f;
var nativePropertyIsEnumerable = propertyIsEnumerableModule.f;
var AllSymbols = shared('symbols');
var ObjectPrototypeSymbols = shared('op-symbols');
var StringToSymbolRegistry = shared('string-to-symbol-registry');
var SymbolToStringRegistry = shared('symbol-to-string-registry');
var WellKnownSymbolsStore = shared('wks');
var QObject = global.QObject;
// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173
var USE_SETTER = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;
// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687
var setSymbolDescriptor = DESCRIPTORS && fails(function () {
return nativeObjectCreate(nativeDefineProperty({}, 'a', {
get: function () { return nativeDefineProperty(this, 'a', { value: 7 }).a; }
})).a != 7;
}) ? function (O, P, Attributes) {
var ObjectPrototypeDescriptor = nativeGetOwnPropertyDescriptor(ObjectPrototype, P);
if (ObjectPrototypeDescriptor) delete ObjectPrototype[P];
nativeDefineProperty(O, P, Attributes);
if (ObjectPrototypeDescriptor && O !== ObjectPrototype) {
nativeDefineProperty(ObjectPrototype, P, ObjectPrototypeDescriptor);
}
} : nativeDefineProperty;
var wrap = function (tag, description) {
var symbol = AllSymbols[tag] = nativeObjectCreate($Symbol[PROTOTYPE]);
setInternalState(symbol, {
type: SYMBOL,
tag: tag,
description: description
});
if (!DESCRIPTORS) symbol.description = description;
return symbol;
};
var isSymbol = USE_SYMBOL_AS_UID ? function (it) {
return typeof it == 'symbol';
} : function (it) {
return Object(it) instanceof $Symbol;
};
var $defineProperty = function defineProperty(O, P, Attributes) {
if (O === ObjectPrototype) $defineProperty(ObjectPrototypeSymbols, P, Attributes);
anObject(O);
var key = toPrimitive(P, true);
anObject(Attributes);
if (has(AllSymbols, key)) {
if (!Attributes.enumerable) {
if (!has(O, HIDDEN)) nativeDefineProperty(O, HIDDEN, createPropertyDescriptor(1, {}));
O[HIDDEN][key] = true;
} else {
if (has(O, HIDDEN) && O[HIDDEN][key]) O[HIDDEN][key] = false;
Attributes = nativeObjectCreate(Attributes, { enumerable: createPropertyDescriptor(0, false) });
} return setSymbolDescriptor(O, key, Attributes);
} return nativeDefineProperty(O, key, Attributes);
};
var $defineProperties = function defineProperties(O, Properties) {
anObject(O);
var properties = toIndexedObject(Properties);
var keys = objectKeys(properties).concat($getOwnPropertySymbols(properties));
$forEach(keys, function (key) {
if (!DESCRIPTORS || $propertyIsEnumerable.call(properties, key)) $defineProperty(O, key, properties[key]);
});
return O;
};
var $create = function create(O, Properties) {
return Properties === undefined ? nativeObjectCreate(O) : $defineProperties(nativeObjectCreate(O), Properties);
};
var $propertyIsEnumerable = function propertyIsEnumerable(V) {
var P = toPrimitive(V, true);
var enumerable = nativePropertyIsEnumerable.call(this, P);
if (this === ObjectPrototype && has(AllSymbols, P) && !has(ObjectPrototypeSymbols, P)) return false;
return enumerable || !has(this, P) || !has(AllSymbols, P) || has(this, HIDDEN) && this[HIDDEN][P] ? enumerable : true;
};
var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(O, P) {
var it = toIndexedObject(O);
var key = toPrimitive(P, true);
if (it === ObjectPrototype && has(AllSymbols, key) && !has(ObjectPrototypeSymbols, key)) return;
var descriptor = nativeGetOwnPropertyDescriptor(it, key);
if (descriptor && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) {
descriptor.enumerable = true;
}
return descriptor;
};
var $getOwnPropertyNames = function getOwnPropertyNames(O) {
var names = nativeGetOwnPropertyNames(toIndexedObject(O));
var result = [];
$forEach(names, function (key) {
if (!has(AllSymbols, key) && !has(hiddenKeys, key)) result.push(key);
});
return result;
};
var $getOwnPropertySymbols = function getOwnPropertySymbols(O) {
var IS_OBJECT_PROTOTYPE = O === ObjectPrototype;
var names = nativeGetOwnPropertyNames(IS_OBJECT_PROTOTYPE ? ObjectPrototypeSymbols : toIndexedObject(O));
var result = [];
$forEach(names, function (key) {
if (has(AllSymbols, key) && (!IS_OBJECT_PROTOTYPE || has(ObjectPrototype, key))) {
result.push(AllSymbols[key]);
}
});
return result;
};
// `Symbol` constructor
// https://tc39.github.io/ecma262/#sec-symbol-constructor
if (!NATIVE_SYMBOL) {
$Symbol = function Symbol() {
if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor');
var description = !arguments.length || arguments[0] === undefined ? undefined : String(arguments[0]);
var tag = uid(description);
var setter = function (value) {
if (this === ObjectPrototype) setter.call(ObjectPrototypeSymbols, value);
if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false;
setSymbolDescriptor(this, tag, createPropertyDescriptor(1, value));
};
if (DESCRIPTORS && USE_SETTER) setSymbolDescriptor(ObjectPrototype, tag, { configurable: true, set: setter });
return wrap(tag, description);
};
redefine($Symbol[PROTOTYPE], 'toString', function toString() {
return getInternalState(this).tag;
});
redefine($Symbol, 'withoutSetter', function (description) {
return wrap(uid(description), description);
});
propertyIsEnumerableModule.f = $propertyIsEnumerable;
definePropertyModule.f = $defineProperty;
getOwnPropertyDescriptorModule.f = $getOwnPropertyDescriptor;
getOwnPropertyNamesModule.f = getOwnPropertyNamesExternal.f = $getOwnPropertyNames;
getOwnPropertySymbolsModule.f = $getOwnPropertySymbols;
wrappedWellKnownSymbolModule.f = function (name) {
return wrap(wellKnownSymbol(name), name);
};
if (DESCRIPTORS) {
// https://github.com/tc39/proposal-Symbol-description
nativeDefineProperty($Symbol[PROTOTYPE], 'description', {
configurable: true,
get: function description() {
return getInternalState(this).description;
}
});
if (!IS_PURE) {
redefine(ObjectPrototype, 'propertyIsEnumerable', $propertyIsEnumerable, { unsafe: true });
}
}
}
$({ global: true, wrap: true, forced: !NATIVE_SYMBOL, sham: !NATIVE_SYMBOL }, {
Symbol: $Symbol
});
$forEach(objectKeys(WellKnownSymbolsStore), function (name) {
defineWellKnownSymbol(name);
});
$({ target: SYMBOL, stat: true, forced: !NATIVE_SYMBOL }, {
// `Symbol.for` method
// https://tc39.github.io/ecma262/#sec-symbol.for
'for': function (key) {
var string = String(key);
if (has(StringToSymbolRegistry, string)) return StringToSymbolRegistry[string];
var symbol = $Symbol(string);
StringToSymbolRegistry[string] = symbol;
SymbolToStringRegistry[symbol] = string;
return symbol;
},
// `Symbol.keyFor` method
// https://tc39.github.io/ecma262/#sec-symbol.keyfor
keyFor: function keyFor(sym) {
if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol');
if (has(SymbolToStringRegistry, sym)) return SymbolToStringRegistry[sym];
},
useSetter: function () { USE_SETTER = true; },
useSimple: function () { USE_SETTER = false; }
});
$({ target: 'Object', stat: true, forced: !NATIVE_SYMBOL, sham: !DESCRIPTORS }, {
// `Object.create` method
// https://tc39.github.io/ecma262/#sec-object.create
create: $create,
// `Object.defineProperty` method
// https://tc39.github.io/ecma262/#sec-object.defineproperty
defineProperty: $defineProperty,
// `Object.defineProperties` method
// https://tc39.github.io/ecma262/#sec-object.defineproperties
defineProperties: $defineProperties,
// `Object.getOwnPropertyDescriptor` method
// https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptors
getOwnPropertyDescriptor: $getOwnPropertyDescriptor
});
$({ target: 'Object', stat: true, forced: !NATIVE_SYMBOL }, {
// `Object.getOwnPropertyNames` method
// https://tc39.github.io/ecma262/#sec-object.getownpropertynames
getOwnPropertyNames: $getOwnPropertyNames,
// `Object.getOwnPropertySymbols` method
// https://tc39.github.io/ecma262/#sec-object.getownpropertysymbols
getOwnPropertySymbols: $getOwnPropertySymbols
});
// Chrome 38 and 39 `Object.getOwnPropertySymbols` fails on primitives
// https://bugs.chromium.org/p/v8/issues/detail?id=3443
$({ target: 'Object', stat: true, forced: fails(function () { getOwnPropertySymbolsModule.f(1); }) }, {
getOwnPropertySymbols: function getOwnPropertySymbols(it) {
return getOwnPropertySymbolsModule.f(toObject(it));
}
});
// `JSON.stringify` method behavior with symbols
// https://tc39.github.io/ecma262/#sec-json.stringify
if ($stringify) {
var FORCED_JSON_STRINGIFY = !NATIVE_SYMBOL || fails(function () {
var symbol = $Symbol();
// MS Edge converts symbol values to JSON as {}
return $stringify([symbol]) != '[null]'
// WebKit converts symbol values to JSON as null
|| $stringify({ a: symbol }) != '{}'
// V8 throws on boxed symbols
|| $stringify(Object(symbol)) != '{}';
});
$({ target: 'JSON', stat: true, forced: FORCED_JSON_STRINGIFY }, {
// eslint-disable-next-line no-unused-vars
stringify: function stringify(it, replacer, space) {
var args = [it];
var index = 1;
var $replacer;
while (arguments.length > index) args.push(arguments[index++]);
$replacer = replacer;
if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined
if (!isArray(replacer)) replacer = function (key, value) {
if (typeof $replacer == 'function') value = $replacer.call(this, key, value);
if (!isSymbol(value)) return value;
};
args[1] = replacer;
return $stringify.apply(null, args);
}
});
}
// `Symbol.prototype[@@toPrimitive]` method
// https://tc39.github.io/ecma262/#sec-symbol.prototype-@@toprimitive
if (!$Symbol[PROTOTYPE][TO_PRIMITIVE]) {
createNonEnumerableProperty($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);
}
// `Symbol.prototype[@@toStringTag]` property
// https://tc39.github.io/ecma262/#sec-symbol.prototype-@@tostringtag
setToStringTag($Symbol, SYMBOL);
hiddenKeys[HIDDEN] = true;
/***/ }),
/***/ "STAE":
/*!*********************************************************!*\
!*** ./node_modules/core-js/internals/native-symbol.js ***!
\*********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var fails = __webpack_require__(/*! ../internals/fails */ "0Dky");
module.exports = !!Object.getOwnPropertySymbols && !fails(function () {
// Chrome 38 Symbol has incorrect toString conversion
// eslint-disable-next-line no-undef
return !String(Symbol());
});
/***/ }),
/***/ "SdaC":
/*!**************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.math.trunc.js ***!
\**************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var ceil = Math.ceil;
var floor = Math.floor;
// `Math.trunc` method
// https://tc39.github.io/ecma262/#sec-math.trunc
$({ target: 'Math', stat: true }, {
trunc: function trunc(it) {
return (it > 0 ? floor : ceil)(it);
}
});
/***/ }),
/***/ "SkA5":
/*!**************************************************!*\
!*** ./node_modules/core-js/es/reflect/index.js ***!
\**************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__(/*! ../../modules/es.reflect.apply */ "pv2x");
__webpack_require__(/*! ../../modules/es.reflect.construct */ "SuFq");
__webpack_require__(/*! ../../modules/es.reflect.define-property */ "PzqY");
__webpack_require__(/*! ../../modules/es.reflect.delete-property */ "rBZX");
__webpack_require__(/*! ../../modules/es.reflect.get */ "XUE8");
__webpack_require__(/*! ../../modules/es.reflect.get-own-property-descriptor */ "nkod");
__webpack_require__(/*! ../../modules/es.reflect.get-prototype-of */ "f3jH");
__webpack_require__(/*! ../../modules/es.reflect.has */ "x2An");
__webpack_require__(/*! ../../modules/es.reflect.is-extensible */ "25bX");
__webpack_require__(/*! ../../modules/es.reflect.own-keys */ "G/JM");
__webpack_require__(/*! ../../modules/es.reflect.prevent-extensions */ "1t3B");
__webpack_require__(/*! ../../modules/es.reflect.set */ "ftMj");
__webpack_require__(/*! ../../modules/es.reflect.set-prototype-of */ "i5pp");
__webpack_require__(/*! ../../modules/es.reflect.to-string-tag */ "+MnM");
var path = __webpack_require__(/*! ../../internals/path */ "Qo9l");
module.exports = path.Reflect;
/***/ }),
/***/ "SuFq":
/*!**************************************************************!*\
!*** ./node_modules/core-js/modules/es.reflect.construct.js ***!
\**************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "0GbY");
var aFunction = __webpack_require__(/*! ../internals/a-function */ "HAuM");
var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk");
var isObject = __webpack_require__(/*! ../internals/is-object */ "hh1v");
var create = __webpack_require__(/*! ../internals/object-create */ "fHMY");
var bind = __webpack_require__(/*! ../internals/function-bind */ "BTho");
var fails = __webpack_require__(/*! ../internals/fails */ "0Dky");
var nativeConstruct = getBuiltIn('Reflect', 'construct');
// `Reflect.construct` method
// https://tc39.github.io/ecma262/#sec-reflect.construct
// MS Edge supports only 2 arguments and argumentsList argument is optional
// FF Nightly sets third argument as `new.target`, but does not create `this` from it
var NEW_TARGET_BUG = fails(function () {
function F() { /* empty */ }
return !(nativeConstruct(function () { /* empty */ }, [], F) instanceof F);
});
var ARGS_BUG = !fails(function () {
nativeConstruct(function () { /* empty */ });
});
var FORCED = NEW_TARGET_BUG || ARGS_BUG;
$({ target: 'Reflect', stat: true, forced: FORCED, sham: FORCED }, {
construct: function construct(Target, args /* , newTarget */) {
aFunction(Target);
anObject(args);
var newTarget = arguments.length < 3 ? Target : aFunction(arguments[2]);
if (ARGS_BUG && !NEW_TARGET_BUG) return nativeConstruct(Target, args, newTarget);
if (Target == newTarget) {
// w/o altered newTarget, optimization for 0-4 arguments
switch (args.length) {
case 0: return new Target();
case 1: return new Target(args[0]);
case 2: return new Target(args[0], args[1]);
case 3: return new Target(args[0], args[1], args[2]);
case 4: return new Target(args[0], args[1], args[2], args[3]);
}
// w/o altered newTarget, lot of arguments case
var $args = [null];
$args.push.apply($args, args);
return new (bind.apply(Target, $args))();
}
// with altered newTarget, not support built-in constructors
var proto = newTarget.prototype;
var instance = create(isObject(proto) ? proto : Object.prototype);
var result = Function.apply.call(Target, instance, args);
return isObject(result) ? result : instance;
}
});
/***/ }),
/***/ "T/Kj":
/*!********************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/engine-user-agent.js ***!
\********************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "Ew/G");
module.exports = getBuiltIn('navigator', 'userAgent') || '';
/***/ }),
/***/ "T4tC":
/*!**********************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.regexp.constructor.js ***!
\**********************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "T69T");
var global = __webpack_require__(/*! ../internals/global */ "ocAm");
var isForced = __webpack_require__(/*! ../internals/is-forced */ "MkZA");
var inheritIfRequired = __webpack_require__(/*! ../internals/inherit-if-required */ "K6ZX");
var defineProperty = __webpack_require__(/*! ../internals/object-define-property */ "/Ybd").f;
var getOwnPropertyNames = __webpack_require__(/*! ../internals/object-get-own-property-names */ "KkqW").f;
var isRegExp = __webpack_require__(/*! ../internals/is-regexp */ "1p6F");
var getFlags = __webpack_require__(/*! ../internals/regexp-flags */ "x0kV");
var stickyHelpers = __webpack_require__(/*! ../internals/regexp-sticky-helpers */ "JkSk");
var redefine = __webpack_require__(/*! ../internals/redefine */ "2MGJ");
var fails = __webpack_require__(/*! ../internals/fails */ "rG8t");
var setInternalState = __webpack_require__(/*! ../internals/internal-state */ "XH/I").set;
var setSpecies = __webpack_require__(/*! ../internals/set-species */ "JHhb");
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "m41k");
var MATCH = wellKnownSymbol('match');
var NativeRegExp = global.RegExp;
var RegExpPrototype = NativeRegExp.prototype;
var re1 = /a/g;
var re2 = /a/g;
// "new" should create a new object, old webkit bug
var CORRECT_NEW = new NativeRegExp(re1) !== re1;
var UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y;
var FORCED = DESCRIPTORS && isForced('RegExp', (!CORRECT_NEW || UNSUPPORTED_Y || fails(function () {
re2[MATCH] = false;
// RegExp constructor can alter flags and IsRegExp works correct with @@match
return NativeRegExp(re1) != re1 || NativeRegExp(re2) == re2 || NativeRegExp(re1, 'i') != '/a/i';
})));
// `RegExp` constructor
// https://tc39.github.io/ecma262/#sec-regexp-constructor
if (FORCED) {
var RegExpWrapper = function RegExp(pattern, flags) {
var thisIsRegExp = this instanceof RegExpWrapper;
var patternIsRegExp = isRegExp(pattern);
var flagsAreUndefined = flags === undefined;
var sticky;
if (!thisIsRegExp && patternIsRegExp && pattern.constructor === RegExpWrapper && flagsAreUndefined) {
return pattern;
}
if (CORRECT_NEW) {
if (patternIsRegExp && !flagsAreUndefined) pattern = pattern.source;
} else if (pattern instanceof RegExpWrapper) {
if (flagsAreUndefined) flags = getFlags.call(pattern);
pattern = pattern.source;
}
if (UNSUPPORTED_Y) {
sticky = !!flags && flags.indexOf('y') > -1;
if (sticky) flags = flags.replace(/y/g, '');
}
var result = inheritIfRequired(
CORRECT_NEW ? new NativeRegExp(pattern, flags) : NativeRegExp(pattern, flags),
thisIsRegExp ? this : RegExpPrototype,
RegExpWrapper
);
if (UNSUPPORTED_Y && sticky) setInternalState(result, { sticky: sticky });
return result;
};
var proxy = function (key) {
key in RegExpWrapper || defineProperty(RegExpWrapper, key, {
configurable: true,
get: function () { return NativeRegExp[key]; },
set: function (it) { NativeRegExp[key] = it; }
});
};
var keys = getOwnPropertyNames(NativeRegExp);
var index = 0;
while (keys.length > index) proxy(keys[index++]);
RegExpPrototype.constructor = RegExpWrapper;
RegExpWrapper.prototype = RegExpPrototype;
redefine(global, 'RegExp', RegExpWrapper);
}
// https://tc39.github.io/ecma262/#sec-get-regexp-@@species
setSpecies('RegExp');
/***/ }),
/***/ "T69T":
/*!**************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/descriptors.js ***!
\**************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var fails = __webpack_require__(/*! ../internals/fails */ "rG8t");
// Thank's IE8 for his funny defineProperty
module.exports = !fails(function () {
return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
});
/***/ }),
/***/ "TWQb":
/*!**********************************************************!*\
!*** ./node_modules/core-js/internals/array-includes.js ***!
\**********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ "/GqU");
var toLength = __webpack_require__(/*! ../internals/to-length */ "UMSQ");
var toAbsoluteIndex = __webpack_require__(/*! ../internals/to-absolute-index */ "I8vh");
// `Array.prototype.{ indexOf, includes }` methods implementation
var createMethod = function (IS_INCLUDES) {
return function ($this, el, fromIndex) {
var O = toIndexedObject($this);
var length = toLength(O.length);
var index = toAbsoluteIndex(fromIndex, length);
var value;
// Array#includes uses SameValueZero equality algorithm
// eslint-disable-next-line no-self-compare
if (IS_INCLUDES && el != el) while (length > index) {
value = O[index++];
// eslint-disable-next-line no-self-compare
if (value != value) return true;
// Array#indexOf ignores holes, Array#includes - not
} else for (;length > index; index++) {
if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
} return !IS_INCLUDES && -1;
};
};
module.exports = {
// `Array.prototype.includes` method
// https://tc39.github.io/ecma262/#sec-array.prototype.includes
includes: createMethod(true),
// `Array.prototype.indexOf` method
// https://tc39.github.io/ecma262/#sec-array.prototype.indexof
indexOf: createMethod(false)
};
/***/ }),
/***/ "TzEA":
/*!*****************************************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/object-get-own-property-names-external.js ***!
\*****************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ "EMtK");
var nativeGetOwnPropertyNames = __webpack_require__(/*! ../internals/object-get-own-property-names */ "KkqW").f;
var toString = {}.toString;
var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames
? Object.getOwnPropertyNames(window) : [];
var getWindowNames = function (it) {
try {
return nativeGetOwnPropertyNames(it);
} catch (error) {
return windowNames.slice();
}
};
// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window
module.exports.f = function getOwnPropertyNames(it) {
return windowNames && toString.call(it) == '[object Window]'
? getWindowNames(it)
: nativeGetOwnPropertyNames(toIndexedObject(it));
};
/***/ }),
/***/ "U+kB":
/*!****************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/native-symbol.js ***!
\****************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var fails = __webpack_require__(/*! ../internals/fails */ "rG8t");
module.exports = !!Object.getOwnPropertySymbols && !fails(function () {
// Chrome 38 Symbol has incorrect toString conversion
// eslint-disable-next-line no-undef
return !String(Symbol());
});
/***/ }),
/***/ "UMSQ":
/*!*****************************************************!*\
!*** ./node_modules/core-js/internals/to-length.js ***!
\*****************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var toInteger = __webpack_require__(/*! ../internals/to-integer */ "ppGB");
var min = Math.min;
// `ToLength` abstract operation
// https://tc39.github.io/ecma262/#sec-tolength
module.exports = function (argument) {
return argument > 0 ? min(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
};
/***/ }),
/***/ "UTVS":
/*!***********************************************!*\
!*** ./node_modules/core-js/internals/has.js ***!
\***********************************************/
/*! no static exports found */
/***/ (function(module, exports) {
var hasOwnProperty = {}.hasOwnProperty;
module.exports = function (it, key) {
return hasOwnProperty.call(it, key);
};
/***/ }),
/***/ "V+F/":
/*!*******************************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.symbol.is-concat-spreadable.js ***!
\*******************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var defineWellKnownSymbol = __webpack_require__(/*! ../internals/define-well-known-symbol */ "94Vg");
// `Symbol.isConcatSpreadable` well-known symbol
// https://tc39.github.io/ecma262/#sec-symbol.isconcatspreadable
defineWellKnownSymbol('isConcatSpreadable');
/***/ }),
/***/ "VCQ8":
/*!************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/to-object.js ***!
\************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ "hmpk");
// `ToObject` abstract operation
// https://tc39.github.io/ecma262/#sec-toobject
module.exports = function (argument) {
return Object(requireObjectCoercible(argument));
};
/***/ }),
/***/ "Vi1R":
/*!****************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.symbol.split.js ***!
\****************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var defineWellKnownSymbol = __webpack_require__(/*! ../internals/define-well-known-symbol */ "94Vg");
// `Symbol.split` well-known symbol
// https://tc39.github.io/ecma262/#sec-symbol.split
defineWellKnownSymbol('split');
/***/ }),
/***/ "ViWx":
/*!*******************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.set.js ***!
\*******************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var collection = __webpack_require__(/*! ../internals/collection */ "wdMf");
var collectionStrong = __webpack_require__(/*! ../internals/collection-strong */ "nIH4");
// `Set` constructor
// https://tc39.github.io/ecma262/#sec-set-objects
module.exports = collection('Set', function (init) {
return function Set() { return init(this, arguments.length ? arguments[0] : undefined); };
}, collectionStrong);
/***/ }),
/***/ "VmbE":
/*!*****************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.string.strike.js ***!
\*****************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var createHTML = __webpack_require__(/*! ../internals/create-html */ "uoca");
var forcedStringHTMLMethod = __webpack_require__(/*! ../internals/string-html-forced */ "d8Sw");
// `String.prototype.strike` method
// https://tc39.github.io/ecma262/#sec-string.prototype.strike
$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('strike') }, {
strike: function strike() {
return createHTML(this, 'strike', '', '');
}
});
/***/ }),
/***/ "VpIT":
/*!**************************************************!*\
!*** ./node_modules/core-js/internals/shared.js ***!
\**************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "xDBR");
var store = __webpack_require__(/*! ../internals/shared-store */ "xs3f");
(module.exports = function (key, value) {
return store[key] || (store[key] = value !== undefined ? value : {});
})('versions', []).push({
version: '3.8.1',
mode: IS_PURE ? 'pure' : 'global',
copyright: '© 2020 Denis Pushkarev (zloirock.ru)'
});
/***/ }),
/***/ "Vu81":
/*!****************************************************!*\
!*** ./node_modules/core-js/internals/own-keys.js ***!
\****************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "0GbY");
var getOwnPropertyNamesModule = __webpack_require__(/*! ../internals/object-get-own-property-names */ "JBy8");
var getOwnPropertySymbolsModule = __webpack_require__(/*! ../internals/object-get-own-property-symbols */ "dBg+");
var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk");
// all object keys, includes non-enumerable and symbols
module.exports = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
var keys = getOwnPropertyNamesModule.f(anObject(it));
var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys;
};
/***/ }),
/***/ "W0ke":
/*!*******************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.string.fontsize.js ***!
\*******************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var createHTML = __webpack_require__(/*! ../internals/create-html */ "uoca");
var forcedStringHTMLMethod = __webpack_require__(/*! ../internals/string-html-forced */ "d8Sw");
// `String.prototype.fontsize` method
// https://tc39.github.io/ecma262/#sec-string.prototype.fontsize
$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('fontsize') }, {
fontsize: function fontsize(size) {
return createHTML(this, 'font', 'size', size);
}
});
/***/ }),
/***/ "WEX0":
/*!***************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.string.link.js ***!
\***************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var createHTML = __webpack_require__(/*! ../internals/create-html */ "uoca");
var forcedStringHTMLMethod = __webpack_require__(/*! ../internals/string-html-forced */ "d8Sw");
// `String.prototype.link` method
// https://tc39.github.io/ecma262/#sec-string.prototype.link
$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('link') }, {
link: function link(url) {
return createHTML(this, 'a', 'href', url);
}
});
/***/ }),
/***/ "WEpO":
/*!**************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.math.log10.js ***!
\**************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var log = Math.log;
var LOG10E = Math.LOG10E;
// `Math.log10` method
// https://tc39.github.io/ecma262/#sec-math.log10
$({ target: 'Math', stat: true }, {
log10: function log10(x) {
return log(x) * LOG10E;
}
});
/***/ }),
/***/ "WKvG":
/*!********************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.string.fontcolor.js ***!
\********************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var createHTML = __webpack_require__(/*! ../internals/create-html */ "uoca");
var forcedStringHTMLMethod = __webpack_require__(/*! ../internals/string-html-forced */ "d8Sw");
// `String.prototype.fontcolor` method
// https://tc39.github.io/ecma262/#sec-string.prototype.fontcolor
$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('fontcolor') }, {
fontcolor: function fontcolor(color) {
return createHTML(this, 'font', 'color', color);
}
});
/***/ }),
/***/ "WLa2":
/*!*****************************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.object.prevent-extensions.js ***!
\*****************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var isObject = __webpack_require__(/*! ../internals/is-object */ "6XUM");
var onFreeze = __webpack_require__(/*! ../internals/internal-metadata */ "M7Xk").onFreeze;
var FREEZING = __webpack_require__(/*! ../internals/freezing */ "cZY6");
var fails = __webpack_require__(/*! ../internals/fails */ "rG8t");
var nativePreventExtensions = Object.preventExtensions;
var FAILS_ON_PRIMITIVES = fails(function () { nativePreventExtensions(1); });
// `Object.preventExtensions` method
// https://tc39.github.io/ecma262/#sec-object.preventextensions
$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES, sham: !FREEZING }, {
preventExtensions: function preventExtensions(it) {
return nativePreventExtensions && isObject(it) ? nativePreventExtensions(onFreeze(it)) : it;
}
});
/***/ }),
/***/ "WijE":
/*!******************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/define-iterator.js ***!
\******************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var createIteratorConstructor = __webpack_require__(/*! ../internals/create-iterator-constructor */ "ZJLg");
var getPrototypeOf = __webpack_require__(/*! ../internals/object-get-prototype-of */ "wIVT");
var setPrototypeOf = __webpack_require__(/*! ../internals/object-set-prototype-of */ "7/lX");
var setToStringTag = __webpack_require__(/*! ../internals/set-to-string-tag */ "shqn");
var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ "aJMj");
var redefine = __webpack_require__(/*! ../internals/redefine */ "2MGJ");
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "m41k");
var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "g9hI");
var Iterators = __webpack_require__(/*! ../internals/iterators */ "pz+c");
var IteratorsCore = __webpack_require__(/*! ../internals/iterators-core */ "G1Vw");
var IteratorPrototype = IteratorsCore.IteratorPrototype;
var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;
var ITERATOR = wellKnownSymbol('iterator');
var KEYS = 'keys';
var VALUES = 'values';
var ENTRIES = 'entries';
var returnThis = function () { return this; };
module.exports = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {
createIteratorConstructor(IteratorConstructor, NAME, next);
var getIterationMethod = function (KIND) {
if (KIND === DEFAULT && defaultIterator) return defaultIterator;
if (!BUGGY_SAFARI_ITERATORS && KIND in IterablePrototype) return IterablePrototype[KIND];
switch (KIND) {
case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };
case VALUES: return function values() { return new IteratorConstructor(this, KIND); };
case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };
} return function () { return new IteratorConstructor(this); };
};
var TO_STRING_TAG = NAME + ' Iterator';
var INCORRECT_VALUES_NAME = false;
var IterablePrototype = Iterable.prototype;
var nativeIterator = IterablePrototype[ITERATOR]
|| IterablePrototype['@@iterator']
|| DEFAULT && IterablePrototype[DEFAULT];
var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);
var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;
var CurrentIteratorPrototype, methods, KEY;
// fix native
if (anyNativeIterator) {
CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));
if (IteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {
if (!IS_PURE && getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {
if (setPrototypeOf) {
setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);
} else if (typeof CurrentIteratorPrototype[ITERATOR] != 'function') {
createNonEnumerableProperty(CurrentIteratorPrototype, ITERATOR, returnThis);
}
}
// Set @@toStringTag to native iterators
setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true, true);
if (IS_PURE) Iterators[TO_STRING_TAG] = returnThis;
}
}
// fix Array#{values, @@iterator}.name in V8 / FF
if (DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {
INCORRECT_VALUES_NAME = true;
defaultIterator = function values() { return nativeIterator.call(this); };
}
// define iterator
if ((!IS_PURE || FORCED) && IterablePrototype[ITERATOR] !== defaultIterator) {
createNonEnumerableProperty(IterablePrototype, ITERATOR, defaultIterator);
}
Iterators[NAME] = defaultIterator;
// export additional methods
if (DEFAULT) {
methods = {
values: getIterationMethod(VALUES),
keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),
entries: getIterationMethod(ENTRIES)
};
if (FORCED) for (KEY in methods) {
if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
redefine(IterablePrototype, KEY, methods[KEY]);
}
} else $({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
}
return methods;
};
/***/ }),
/***/ "WnNu":
/*!***************************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.object.set-prototype-of.js ***!
\***************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var setPrototypeOf = __webpack_require__(/*! ../internals/object-set-prototype-of */ "7/lX");
// `Object.setPrototypeOf` method
// https://tc39.github.io/ecma262/#sec-object.setprototypeof
$({ target: 'Object', stat: true }, {
setPrototypeOf: setPrototypeOf
});
/***/ }),
/***/ "XEin":
/*!**************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.array.some.js ***!
\**************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var $some = __webpack_require__(/*! ../internals/array-iteration */ "kk6e").some;
var arrayMethodIsStrict = __webpack_require__(/*! ../internals/array-method-is-strict */ "6CJb");
var arrayMethodUsesToLength = __webpack_require__(/*! ../internals/array-method-uses-to-length */ "w2hq");
var STRICT_METHOD = arrayMethodIsStrict('some');
var USES_TO_LENGTH = arrayMethodUsesToLength('some');
// `Array.prototype.some` method
// https://tc39.github.io/ecma262/#sec-array.prototype.some
$({ target: 'Array', proto: true, forced: !STRICT_METHOD || !USES_TO_LENGTH }, {
some: function some(callbackfn /* , thisArg */) {
return $some(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
}
});
/***/ }),
/***/ "XGwC":
/*!**********************************************************************!*\
!*** ./node_modules/core-js/internals/create-property-descriptor.js ***!
\**********************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = function (bitmap, value) {
return {
enumerable: !(bitmap & 1),
configurable: !(bitmap & 2),
writable: !(bitmap & 4),
value: value
};
};
/***/ }),
/***/ "XH/I":
/*!*****************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/internal-state.js ***!
\*****************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var NATIVE_WEAK_MAP = __webpack_require__(/*! ../internals/native-weak-map */ "yaK9");
var global = __webpack_require__(/*! ../internals/global */ "ocAm");
var isObject = __webpack_require__(/*! ../internals/is-object */ "6XUM");
var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ "aJMj");
var objectHas = __webpack_require__(/*! ../internals/has */ "OG5q");
var sharedKey = __webpack_require__(/*! ../internals/shared-key */ "/AsP");
var hiddenKeys = __webpack_require__(/*! ../internals/hidden-keys */ "yQMY");
var WeakMap = global.WeakMap;
var set, get, has;
var enforce = function (it) {
return has(it) ? get(it) : set(it, {});
};
var getterFor = function (TYPE) {
return function (it) {
var state;
if (!isObject(it) || (state = get(it)).type !== TYPE) {
throw TypeError('Incompatible receiver, ' + TYPE + ' required');
} return state;
};
};
if (NATIVE_WEAK_MAP) {
var store = new WeakMap();
var wmget = store.get;
var wmhas = store.has;
var wmset = store.set;
set = function (it, metadata) {
wmset.call(store, it, metadata);
return metadata;
};
get = function (it) {
return wmget.call(store, it) || {};
};
has = function (it) {
return wmhas.call(store, it);
};
} else {
var STATE = sharedKey('state');
hiddenKeys[STATE] = true;
set = function (it, metadata) {
createNonEnumerableProperty(it, STATE, metadata);
return metadata;
};
get = function (it) {
return objectHas(it, STATE) ? it[STATE] : {};
};
has = function (it) {
return objectHas(it, STATE);
};
}
module.exports = {
set: set,
get: get,
has: has,
enforce: enforce,
getterFor: getterFor
};
/***/ }),
/***/ "XUE8":
/*!********************************************************!*\
!*** ./node_modules/core-js/modules/es.reflect.get.js ***!
\********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var isObject = __webpack_require__(/*! ../internals/is-object */ "hh1v");
var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk");
var has = __webpack_require__(/*! ../internals/has */ "UTVS");
var getOwnPropertyDescriptorModule = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ "Bs8V");
var getPrototypeOf = __webpack_require__(/*! ../internals/object-get-prototype-of */ "4WOD");
// `Reflect.get` method
// https://tc39.github.io/ecma262/#sec-reflect.get
function get(target, propertyKey /* , receiver */) {
var receiver = arguments.length < 3 ? target : arguments[2];
var descriptor, prototype;
if (anObject(target) === receiver) return target[propertyKey];
if (descriptor = getOwnPropertyDescriptorModule.f(target, propertyKey)) return has(descriptor, 'value')
? descriptor.value
: descriptor.get === undefined
? undefined
: descriptor.get.call(receiver);
if (isObject(prototype = getPrototypeOf(target))) return get(prototype, propertyKey, receiver);
}
$({ target: 'Reflect', stat: true }, {
get: get
});
/***/ }),
/***/ "XdSI":
/*!*****************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/ie8-dom-define.js ***!
\*****************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "T69T");
var fails = __webpack_require__(/*! ../internals/fails */ "rG8t");
var createElement = __webpack_require__(/*! ../internals/document-create-element */ "qx7X");
// Thank's IE8 for his funny defineProperty
module.exports = !DESCRIPTORS && !fails(function () {
return Object.defineProperty(createElement('div'), 'a', {
get: function () { return 7; }
}).a != 7;
});
/***/ }),
/***/ "Xm88":
/*!***********************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.array.last-index-of.js ***!
\***********************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var lastIndexOf = __webpack_require__(/*! ../internals/array-last-index-of */ "rCRE");
// `Array.prototype.lastIndexOf` method
// https://tc39.github.io/ecma262/#sec-array.prototype.lastindexof
$({ target: 'Array', proto: true, forced: lastIndexOf !== [].lastIndexOf }, {
lastIndexOf: lastIndexOf
});
/***/ }),
/***/ "Y5OV":
/*!*********************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.date.to-primitive.js ***!
\*********************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ "aJMj");
var dateToPrimitive = __webpack_require__(/*! ../internals/date-to-primitive */ "CW9j");
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "m41k");
var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');
var DatePrototype = Date.prototype;
// `Date.prototype[@@toPrimitive]` method
// https://tc39.github.io/ecma262/#sec-date.prototype-@@toprimitive
if (!(TO_PRIMITIVE in DatePrototype)) {
createNonEnumerableProperty(DatePrototype, TO_PRIMITIVE, dateToPrimitive);
}
/***/ }),
/***/ "YOJ4":
/*!********************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.symbol.match-all.js ***!
\********************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var defineWellKnownSymbol = __webpack_require__(/*! ../internals/define-well-known-symbol */ "94Vg");
// `Symbol.matchAll` well-known symbol
defineWellKnownSymbol('matchAll');
/***/ }),
/***/ "YdMc":
/*!******************************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.reflect.prevent-extensions.js ***!
\******************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "Ew/G");
var anObject = __webpack_require__(/*! ../internals/an-object */ "F26l");
var FREEZING = __webpack_require__(/*! ../internals/freezing */ "cZY6");
// `Reflect.preventExtensions` method
// https://tc39.github.io/ecma262/#sec-reflect.preventextensions
$({ target: 'Reflect', stat: true, sham: !FREEZING }, {
preventExtensions: function preventExtensions(target) {
anObject(target);
try {
var objectPreventExtensions = getBuiltIn('Object', 'preventExtensions');
if (objectPreventExtensions) objectPreventExtensions(target);
return true;
} catch (error) {
return false;
}
}
});
/***/ }),
/***/ "Yg8j":
/*!*******************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/number-is-finite.js ***!
\*******************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__(/*! ../internals/global */ "ocAm");
var globalIsFinite = global.isFinite;
// `Number.isFinite` method
// https://tc39.github.io/ecma262/#sec-number.isfinite
module.exports = Number.isFinite || function isFinite(it) {
return typeof it == 'number' && globalIsFinite(it);
};
/***/ }),
/***/ "Yu3F":
/*!***************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.string.bold.js ***!
\***************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var createHTML = __webpack_require__(/*! ../internals/create-html */ "uoca");
var forcedStringHTMLMethod = __webpack_require__(/*! ../internals/string-html-forced */ "d8Sw");
// `String.prototype.bold` method
// https://tc39.github.io/ecma262/#sec-string.prototype.bold
$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('bold') }, {
bold: function bold() {
return createHTML(this, 'b', '', '');
}
});
/***/ }),
/***/ "ZBUp":
/*!******************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.number.epsilon.js ***!
\******************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
// `Number.EPSILON` constant
// https://tc39.github.io/ecma262/#sec-number.epsilon
$({ target: 'Number', stat: true }, {
EPSILON: Math.pow(2, -52)
});
/***/ }),
/***/ "ZJLg":
/*!******************************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/create-iterator-constructor.js ***!
\******************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var IteratorPrototype = __webpack_require__(/*! ../internals/iterators-core */ "G1Vw").IteratorPrototype;
var create = __webpack_require__(/*! ../internals/object-create */ "2RDa");
var createPropertyDescriptor = __webpack_require__(/*! ../internals/create-property-descriptor */ "uSMZ");
var setToStringTag = __webpack_require__(/*! ../internals/set-to-string-tag */ "shqn");
var Iterators = __webpack_require__(/*! ../internals/iterators */ "pz+c");
var returnThis = function () { return this; };
module.exports = function (IteratorConstructor, NAME, next) {
var TO_STRING_TAG = NAME + ' Iterator';
IteratorConstructor.prototype = create(IteratorPrototype, { next: createPropertyDescriptor(1, next) });
setToStringTag(IteratorConstructor, TO_STRING_TAG, false, true);
Iterators[TO_STRING_TAG] = returnThis;
return IteratorConstructor;
};
/***/ }),
/***/ "ZQqA":
/*!************************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.symbol.to-string-tag.js ***!
\************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var defineWellKnownSymbol = __webpack_require__(/*! ../internals/define-well-known-symbol */ "94Vg");
// `Symbol.toStringTag` well-known symbol
// https://tc39.github.io/ecma262/#sec-symbol.tostringtag
defineWellKnownSymbol('toStringTag');
/***/ }),
/***/ "ZRqE":
/*!**************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/object-keys.js ***!
\**************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var internalObjectKeys = __webpack_require__(/*! ../internals/object-keys-internal */ "vVmn");
var enumBugKeys = __webpack_require__(/*! ../internals/enum-bug-keys */ "aAjO");
// `Object.keys` method
// https://tc39.github.io/ecma262/#sec-object.keys
module.exports = Object.keys || function keys(O) {
return internalObjectKeys(O, enumBugKeys);
};
/***/ }),
/***/ "aAjO":
/*!****************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/enum-bug-keys.js ***!
\****************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
// IE8- don't enum bug keys
module.exports = [
'constructor',
'hasOwnProperty',
'isPrototypeOf',
'propertyIsEnumerable',
'toLocaleString',
'toString',
'valueOf'
];
/***/ }),
/***/ "aGCb":
/*!****************************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/well-known-symbol-wrapped.js ***!
\****************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "m41k");
exports.f = wellKnownSymbol;
/***/ }),
/***/ "aJMj":
/*!*********************************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/create-non-enumerable-property.js ***!
\*********************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "T69T");
var definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ "/Ybd");
var createPropertyDescriptor = __webpack_require__(/*! ../internals/create-property-descriptor */ "uSMZ");
module.exports = DESCRIPTORS ? function (object, key, value) {
return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));
} : function (object, key, value) {
object[key] = value;
return object;
};
/***/ }),
/***/ "aTTg":
/*!*************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.math.tanh.js ***!
\*************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var expm1 = __webpack_require__(/*! ../internals/math-expm1 */ "pn4C");
var exp = Math.exp;
// `Math.tanh` method
// https://tc39.github.io/ecma262/#sec-math.tanh
$({ target: 'Math', stat: true }, {
tanh: function tanh(x) {
var a = expm1(x = +x);
var b = expm1(-x);
return a == Infinity ? 1 : b == Infinity ? -1 : (a - b) / (exp(x) + exp(-x));
}
});
/***/ }),
/***/ "aYjs":
/*!*************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/src/webpack/es5-jit-polyfills.js ***!
\*************************************************************************************/
/*! no exports provided */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var core_js_es_reflect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/es/reflect */ "QPoQ");
/* harmony import */ var core_js_es_reflect__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_es_reflect__WEBPACK_IMPORTED_MODULE_0__);
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/***/ }),
/***/ "afO8":
/*!**********************************************************!*\
!*** ./node_modules/core-js/internals/internal-state.js ***!
\**********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var NATIVE_WEAK_MAP = __webpack_require__(/*! ../internals/native-weak-map */ "f5p1");
var global = __webpack_require__(/*! ../internals/global */ "2oRo");
var isObject = __webpack_require__(/*! ../internals/is-object */ "hh1v");
var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ "kRJp");
var objectHas = __webpack_require__(/*! ../internals/has */ "UTVS");
var shared = __webpack_require__(/*! ../internals/shared-store */ "xs3f");
var sharedKey = __webpack_require__(/*! ../internals/shared-key */ "93I0");
var hiddenKeys = __webpack_require__(/*! ../internals/hidden-keys */ "0BK2");
var WeakMap = global.WeakMap;
var set, get, has;
var enforce = function (it) {
return has(it) ? get(it) : set(it, {});
};
var getterFor = function (TYPE) {
return function (it) {
var state;
if (!isObject(it) || (state = get(it)).type !== TYPE) {
throw TypeError('Incompatible receiver, ' + TYPE + ' required');
} return state;
};
};
if (NATIVE_WEAK_MAP) {
var store = shared.state || (shared.state = new WeakMap());
var wmget = store.get;
var wmhas = store.has;
var wmset = store.set;
set = function (it, metadata) {
metadata.facade = it;
wmset.call(store, it, metadata);
return metadata;
};
get = function (it) {
return wmget.call(store, it) || {};
};
has = function (it) {
return wmhas.call(store, it);
};
} else {
var STATE = sharedKey('state');
hiddenKeys[STATE] = true;
set = function (it, metadata) {
metadata.facade = it;
createNonEnumerableProperty(it, STATE, metadata);
return metadata;
};
get = function (it) {
return objectHas(it, STATE) ? it[STATE] : {};
};
has = function (it) {
return objectHas(it, STATE);
};
}
module.exports = {
set: set,
get: get,
has: has,
enforce: enforce,
getterFor: getterFor
};
/***/ }),
/***/ "ane6":
/*!***********************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.number.to-precision.js ***!
\***********************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var fails = __webpack_require__(/*! ../internals/fails */ "rG8t");
var thisNumberValue = __webpack_require__(/*! ../internals/this-number-value */ "hH+7");
var nativeToPrecision = 1.0.toPrecision;
var FORCED = fails(function () {
// IE7-
return nativeToPrecision.call(1, undefined) !== '1';
}) || !fails(function () {
// V8 ~ Android 4.3-
nativeToPrecision.call({});
});
// `Number.prototype.toPrecision` method
// https://tc39.github.io/ecma262/#sec-number.prototype.toprecision
$({ target: 'Number', proto: true, forced: FORCED }, {
toPrecision: function toPrecision(precision) {
return precision === undefined
? nativeToPrecision.call(thisNumberValue(this))
: nativeToPrecision.call(thisNumberValue(this), precision);
}
});
/***/ }),
/***/ "azxr":
/*!*******************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/object-to-string.js ***!
\*******************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var TO_STRING_TAG_SUPPORT = __webpack_require__(/*! ../internals/to-string-tag-support */ "4PyY");
var classof = __webpack_require__(/*! ../internals/classof */ "mN5b");
// `Object.prototype.toString` method implementation
// https://tc39.github.io/ecma262/#sec-object.prototype.tostring
module.exports = TO_STRING_TAG_SUPPORT ? {}.toString : function toString() {
return '[object ' + classof(this) + ']';
};
/***/ }),
/***/ "b1ja":
/*!********************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.reflect.own-keys.js ***!
\********************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var ownKeys = __webpack_require__(/*! ../internals/own-keys */ "76gj");
// `Reflect.ownKeys` method
// https://tc39.github.io/ecma262/#sec-reflect.ownkeys
$({ target: 'Reflect', stat: true }, {
ownKeys: ownKeys
});
/***/ }),
/***/ "bHwr":
/*!***********************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.promise.js ***!
\***********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "g9hI");
var global = __webpack_require__(/*! ../internals/global */ "ocAm");
var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "Ew/G");
var NativePromise = __webpack_require__(/*! ../internals/native-promise-constructor */ "K1dl");
var redefine = __webpack_require__(/*! ../internals/redefine */ "2MGJ");
var redefineAll = __webpack_require__(/*! ../internals/redefine-all */ "8aNu");
var setToStringTag = __webpack_require__(/*! ../internals/set-to-string-tag */ "shqn");
var setSpecies = __webpack_require__(/*! ../internals/set-species */ "JHhb");
var isObject = __webpack_require__(/*! ../internals/is-object */ "6XUM");
var aFunction = __webpack_require__(/*! ../internals/a-function */ "Neub");
var anInstance = __webpack_require__(/*! ../internals/an-instance */ "SM6+");
var classof = __webpack_require__(/*! ../internals/classof-raw */ "ezU2");
var inspectSource = __webpack_require__(/*! ../internals/inspect-source */ "6urC");
var iterate = __webpack_require__(/*! ../internals/iterate */ "Rn6E");
var checkCorrectnessOfIteration = __webpack_require__(/*! ../internals/check-correctness-of-iteration */ "EIBq");
var speciesConstructor = __webpack_require__(/*! ../internals/species-constructor */ "p82S");
var task = __webpack_require__(/*! ../internals/task */ "Ox9q").set;
var microtask = __webpack_require__(/*! ../internals/microtask */ "3xQm");
var promiseResolve = __webpack_require__(/*! ../internals/promise-resolve */ "7aOP");
var hostReportErrors = __webpack_require__(/*! ../internals/host-report-errors */ "ktmr");
var newPromiseCapabilityModule = __webpack_require__(/*! ../internals/new-promise-capability */ "oB0/");
var perform = __webpack_require__(/*! ../internals/perform */ "pd8B");
var InternalStateModule = __webpack_require__(/*! ../internals/internal-state */ "XH/I");
var isForced = __webpack_require__(/*! ../internals/is-forced */ "MkZA");
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "m41k");
var V8_VERSION = __webpack_require__(/*! ../internals/engine-v8-version */ "D3bo");
var SPECIES = wellKnownSymbol('species');
var PROMISE = 'Promise';
var getInternalState = InternalStateModule.get;
var setInternalState = InternalStateModule.set;
var getInternalPromiseState = InternalStateModule.getterFor(PROMISE);
var PromiseConstructor = NativePromise;
var TypeError = global.TypeError;
var document = global.document;
var process = global.process;
var $fetch = getBuiltIn('fetch');
var newPromiseCapability = newPromiseCapabilityModule.f;
var newGenericPromiseCapability = newPromiseCapability;
var IS_NODE = classof(process) == 'process';
var DISPATCH_EVENT = !!(document && document.createEvent && global.dispatchEvent);
var UNHANDLED_REJECTION = 'unhandledrejection';
var REJECTION_HANDLED = 'rejectionhandled';
var PENDING = 0;
var FULFILLED = 1;
var REJECTED = 2;
var HANDLED = 1;
var UNHANDLED = 2;
var Internal, OwnPromiseCapability, PromiseWrapper, nativeThen;
var FORCED = isForced(PROMISE, function () {
var GLOBAL_CORE_JS_PROMISE = inspectSource(PromiseConstructor) !== String(PromiseConstructor);
if (!GLOBAL_CORE_JS_PROMISE) {
// V8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables
// https://bugs.chromium.org/p/chromium/issues/detail?id=830565
// We can't detect it synchronously, so just check versions
if (V8_VERSION === 66) return true;
// Unhandled rejections tracking support, NodeJS Promise without it fails @@species test
if (!IS_NODE && typeof PromiseRejectionEvent != 'function') return true;
}
// We need Promise#finally in the pure version for preventing prototype pollution
if (IS_PURE && !PromiseConstructor.prototype['finally']) return true;
// We can't use @@species feature detection in V8 since it causes
// deoptimization and performance degradation
// https://github.com/zloirock/core-js/issues/679
if (V8_VERSION >= 51 && /native code/.test(PromiseConstructor)) return false;
// Detect correctness of subclassing with @@species support
var promise = PromiseConstructor.resolve(1);
var FakePromise = function (exec) {
exec(function () { /* empty */ }, function () { /* empty */ });
};
var constructor = promise.constructor = {};
constructor[SPECIES] = FakePromise;
return !(promise.then(function () { /* empty */ }) instanceof FakePromise);
});
var INCORRECT_ITERATION = FORCED || !checkCorrectnessOfIteration(function (iterable) {
PromiseConstructor.all(iterable)['catch'](function () { /* empty */ });
});
// helpers
var isThenable = function (it) {
var then;
return isObject(it) && typeof (then = it.then) == 'function' ? then : false;
};
var notify = function (promise, state, isReject) {
if (state.notified) return;
state.notified = true;
var chain = state.reactions;
microtask(function () {
var value = state.value;
var ok = state.state == FULFILLED;
var index = 0;
// variable length - can't use forEach
while (chain.length > index) {
var reaction = chain[index++];
var handler = ok ? reaction.ok : reaction.fail;
var resolve = reaction.resolve;
var reject = reaction.reject;
var domain = reaction.domain;
var result, then, exited;
try {
if (handler) {
if (!ok) {
if (state.rejection === UNHANDLED) onHandleUnhandled(promise, state);
state.rejection = HANDLED;
}
if (handler === true) result = value;
else {
if (domain) domain.enter();
result = handler(value); // can throw
if (domain) {
domain.exit();
exited = true;
}
}
if (result === reaction.promise) {
reject(TypeError('Promise-chain cycle'));
} else if (then = isThenable(result)) {
then.call(result, resolve, reject);
} else resolve(result);
} else reject(value);
} catch (error) {
if (domain && !exited) domain.exit();
reject(error);
}
}
state.reactions = [];
state.notified = false;
if (isReject && !state.rejection) onUnhandled(promise, state);
});
};
var dispatchEvent = function (name, promise, reason) {
var event, handler;
if (DISPATCH_EVENT) {
event = document.createEvent('Event');
event.promise = promise;
event.reason = reason;
event.initEvent(name, false, true);
global.dispatchEvent(event);
} else event = { promise: promise, reason: reason };
if (handler = global['on' + name]) handler(event);
else if (name === UNHANDLED_REJECTION) hostReportErrors('Unhandled promise rejection', reason);
};
var onUnhandled = function (promise, state) {
task.call(global, function () {
var value = state.value;
var IS_UNHANDLED = isUnhandled(state);
var result;
if (IS_UNHANDLED) {
result = perform(function () {
if (IS_NODE) {
process.emit('unhandledRejection', value, promise);
} else dispatchEvent(UNHANDLED_REJECTION, promise, value);
});
// Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should
state.rejection = IS_NODE || isUnhandled(state) ? UNHANDLED : HANDLED;
if (result.error) throw result.value;
}
});
};
var isUnhandled = function (state) {
return state.rejection !== HANDLED && !state.parent;
};
var onHandleUnhandled = function (promise, state) {
task.call(global, function () {
if (IS_NODE) {
process.emit('rejectionHandled', promise);
} else dispatchEvent(REJECTION_HANDLED, promise, state.value);
});
};
var bind = function (fn, promise, state, unwrap) {
return function (value) {
fn(promise, state, value, unwrap);
};
};
var internalReject = function (promise, state, value, unwrap) {
if (state.done) return;
state.done = true;
if (unwrap) state = unwrap;
state.value = value;
state.state = REJECTED;
notify(promise, state, true);
};
var internalResolve = function (promise, state, value, unwrap) {
if (state.done) return;
state.done = true;
if (unwrap) state = unwrap;
try {
if (promise === value) throw TypeError("Promise can't be resolved itself");
var then = isThenable(value);
if (then) {
microtask(function () {
var wrapper = { done: false };
try {
then.call(value,
bind(internalResolve, promise, wrapper, state),
bind(internalReject, promise, wrapper, state)
);
} catch (error) {
internalReject(promise, wrapper, error, state);
}
});
} else {
state.value = value;
state.state = FULFILLED;
notify(promise, state, false);
}
} catch (error) {
internalReject(promise, { done: false }, error, state);
}
};
// constructor polyfill
if (FORCED) {
// 25.4.3.1 Promise(executor)
PromiseConstructor = function Promise(executor) {
anInstance(this, PromiseConstructor, PROMISE);
aFunction(executor);
Internal.call(this);
var state = getInternalState(this);
try {
executor(bind(internalResolve, this, state), bind(internalReject, this, state));
} catch (error) {
internalReject(this, state, error);
}
};
// eslint-disable-next-line no-unused-vars
Internal = function Promise(executor) {
setInternalState(this, {
type: PROMISE,
done: false,
notified: false,
parent: false,
reactions: [],
rejection: false,
state: PENDING,
value: undefined
});
};
Internal.prototype = redefineAll(PromiseConstructor.prototype, {
// `Promise.prototype.then` method
// https://tc39.github.io/ecma262/#sec-promise.prototype.then
then: function then(onFulfilled, onRejected) {
var state = getInternalPromiseState(this);
var reaction = newPromiseCapability(speciesConstructor(this, PromiseConstructor));
reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true;
reaction.fail = typeof onRejected == 'function' && onRejected;
reaction.domain = IS_NODE ? process.domain : undefined;
state.parent = true;
state.reactions.push(reaction);
if (state.state != PENDING) notify(this, state, false);
return reaction.promise;
},
// `Promise.prototype.catch` method
// https://tc39.github.io/ecma262/#sec-promise.prototype.catch
'catch': function (onRejected) {
return this.then(undefined, onRejected);
}
});
OwnPromiseCapability = function () {
var promise = new Internal();
var state = getInternalState(promise);
this.promise = promise;
this.resolve = bind(internalResolve, promise, state);
this.reject = bind(internalReject, promise, state);
};
newPromiseCapabilityModule.f = newPromiseCapability = function (C) {
return C === PromiseConstructor || C === PromiseWrapper
? new OwnPromiseCapability(C)
: newGenericPromiseCapability(C);
};
if (!IS_PURE && typeof NativePromise == 'function') {
nativeThen = NativePromise.prototype.then;
// wrap native Promise#then for native async functions
redefine(NativePromise.prototype, 'then', function then(onFulfilled, onRejected) {
var that = this;
return new PromiseConstructor(function (resolve, reject) {
nativeThen.call(that, resolve, reject);
}).then(onFulfilled, onRejected);
// https://github.com/zloirock/core-js/issues/640
}, { unsafe: true });
// wrap fetch result
if (typeof $fetch == 'function') $({ global: true, enumerable: true, forced: true }, {
// eslint-disable-next-line no-unused-vars
fetch: function fetch(input /* , init */) {
return promiseResolve(PromiseConstructor, $fetch.apply(global, arguments));
}
});
}
}
$({ global: true, wrap: true, forced: FORCED }, {
Promise: PromiseConstructor
});
setToStringTag(PromiseConstructor, PROMISE, false, true);
setSpecies(PROMISE);
PromiseWrapper = getBuiltIn(PROMISE);
// statics
$({ target: PROMISE, stat: true, forced: FORCED }, {
// `Promise.reject` method
// https://tc39.github.io/ecma262/#sec-promise.reject
reject: function reject(r) {
var capability = newPromiseCapability(this);
capability.reject.call(undefined, r);
return capability.promise;
}
});
$({ target: PROMISE, stat: true, forced: IS_PURE || FORCED }, {
// `Promise.resolve` method
// https://tc39.github.io/ecma262/#sec-promise.resolve
resolve: function resolve(x) {
return promiseResolve(IS_PURE && this === PromiseWrapper ? PromiseConstructor : this, x);
}
});
$({ target: PROMISE, stat: true, forced: INCORRECT_ITERATION }, {
// `Promise.all` method
// https://tc39.github.io/ecma262/#sec-promise.all
all: function all(iterable) {
var C = this;
var capability = newPromiseCapability(C);
var resolve = capability.resolve;
var reject = capability.reject;
var result = perform(function () {
var $promiseResolve = aFunction(C.resolve);
var values = [];
var counter = 0;
var remaining = 1;
iterate(iterable, function (promise) {
var index = counter++;
var alreadyCalled = false;
values.push(undefined);
remaining++;
$promiseResolve.call(C, promise).then(function (value) {
if (alreadyCalled) return;
alreadyCalled = true;
values[index] = value;
--remaining || resolve(values);
}, reject);
});
--remaining || resolve(values);
});
if (result.error) reject(result.value);
return capability.promise;
},
// `Promise.race` method
// https://tc39.github.io/ecma262/#sec-promise.race
race: function race(iterable) {
var C = this;
var capability = newPromiseCapability(C);
var reject = capability.reject;
var result = perform(function () {
var $promiseResolve = aFunction(C.resolve);
iterate(iterable, function (promise) {
$promiseResolve.call(C, promise).then(capability.resolve, reject);
});
});
if (result.error) reject(result.value);
return capability.promise;
}
});
/***/ }),
/***/ "busE":
/*!****************************************************!*\
!*** ./node_modules/core-js/internals/redefine.js ***!
\****************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__(/*! ../internals/global */ "2oRo");
var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ "kRJp");
var has = __webpack_require__(/*! ../internals/has */ "UTVS");
var setGlobal = __webpack_require__(/*! ../internals/set-global */ "zk60");
var inspectSource = __webpack_require__(/*! ../internals/inspect-source */ "iSVu");
var InternalStateModule = __webpack_require__(/*! ../internals/internal-state */ "afO8");
var getInternalState = InternalStateModule.get;
var enforceInternalState = InternalStateModule.enforce;
var TEMPLATE = String(String).split('String');
(module.exports = function (O, key, value, options) {
var unsafe = options ? !!options.unsafe : false;
var simple = options ? !!options.enumerable : false;
var noTargetGet = options ? !!options.noTargetGet : false;
var state;
if (typeof value == 'function') {
if (typeof key == 'string' && !has(value, 'name')) {
createNonEnumerableProperty(value, 'name', key);
}
state = enforceInternalState(value);
if (!state.source) {
state.source = TEMPLATE.join(typeof key == 'string' ? key : '');
}
}
if (O === global) {
if (simple) O[key] = value;
else setGlobal(key, value);
return;
} else if (!unsafe) {
delete O[key];
} else if (!noTargetGet && O[key]) {
simple = true;
}
if (simple) O[key] = value;
else createNonEnumerableProperty(O, key, value);
// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
})(Function.prototype, 'toString', function toString() {
return typeof this == 'function' && getInternalState(this).source || inspectSource(this);
});
/***/ }),
/***/ "busr":
/*!**********************************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/object-get-own-property-symbols.js ***!
\**********************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
exports.f = Object.getOwnPropertySymbols;
/***/ }),
/***/ "c/8x":
/*!*************************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.symbol.async-iterator.js ***!
\*************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var defineWellKnownSymbol = __webpack_require__(/*! ../internals/define-well-known-symbol */ "94Vg");
// `Symbol.asyncIterator` well-known symbol
// https://tc39.github.io/ecma262/#sec-symbol.asynciterator
defineWellKnownSymbol('asyncIterator');
/***/ }),
/***/ "cJLW":
/*!**************************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.object.define-property.js ***!
\**************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "T69T");
var objectDefinePropertyModile = __webpack_require__(/*! ../internals/object-define-property */ "/Ybd");
// `Object.defineProperty` method
// https://tc39.github.io/ecma262/#sec-object.defineproperty
$({ target: 'Object', stat: true, forced: !DESCRIPTORS, sham: !DESCRIPTORS }, {
defineProperty: objectDefinePropertyModile.f
});
/***/ }),
/***/ "cZY6":
/*!***********************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/freezing.js ***!
\***********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var fails = __webpack_require__(/*! ../internals/fails */ "rG8t");
module.exports = !fails(function () {
return Object.isExtensible(Object.preventExtensions({}));
});
/***/ }),
/***/ "cwa4":
/*!***************************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/correct-prototype-getter.js ***!
\***************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var fails = __webpack_require__(/*! ../internals/fails */ "rG8t");
module.exports = !fails(function () {
function F() { /* empty */ }
F.prototype.constructor = null;
return Object.getPrototypeOf(new F()) !== F.prototype;
});
/***/ }),
/***/ "d8Sw":
/*!*********************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/string-html-forced.js ***!
\*********************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var fails = __webpack_require__(/*! ../internals/fails */ "rG8t");
// check the existence of a method, lowercase
// of a tag and escaping quotes in arguments
module.exports = function (METHOD_NAME) {
return fails(function () {
var test = ''[METHOD_NAME]('"');
return test !== test.toLowerCase() || test.split('"').length > 3;
});
};
/***/ }),
/***/ "dBg+":
/*!***************************************************************************!*\
!*** ./node_modules/core-js/internals/object-get-own-property-symbols.js ***!
\***************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
exports.f = Object.getOwnPropertySymbols;
/***/ }),
/***/ "dI74":
/*!**************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.string.sup.js ***!
\**************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var createHTML = __webpack_require__(/*! ../internals/create-html */ "uoca");
var forcedStringHTMLMethod = __webpack_require__(/*! ../internals/string-html-forced */ "d8Sw");
// `String.prototype.sup` method
// https://tc39.github.io/ecma262/#sec-string.prototype.sup
$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('sup') }, {
sup: function sup() {
return createHTML(this, 'sup', '', '');
}
});
/***/ }),
/***/ "dPn5":
/*!***********************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/advance-string-index.js ***!
\***********************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var charAt = __webpack_require__(/*! ../internals/string-multibyte */ "G7bs").charAt;
// `AdvanceStringIndex` abstract operation
// https://tc39.github.io/ecma262/#sec-advancestringindex
module.exports = function (S, index, unicode) {
return index + (unicode ? charAt(S, index).length : 1);
};
/***/ }),
/***/ "eDl+":
/*!*********************************************************!*\
!*** ./node_modules/core-js/internals/enum-bug-keys.js ***!
\*********************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
// IE8- don't enum bug keys
module.exports = [
'constructor',
'hasOwnProperty',
'isPrototypeOf',
'propertyIsEnumerable',
'toLocaleString',
'toString',
'valueOf'
];
/***/ }),
/***/ "erNl":
/*!***********************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/is-array.js ***!
\***********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var classof = __webpack_require__(/*! ../internals/classof-raw */ "ezU2");
// `IsArray` abstract operation
// https://tc39.github.io/ecma262/#sec-isarray
module.exports = Array.isArray || function isArray(arg) {
return classof(arg) == 'Array';
};
/***/ }),
/***/ "ewvW":
/*!*****************************************************!*\
!*** ./node_modules/core-js/internals/to-object.js ***!
\*****************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ "HYAF");
// `ToObject` abstract operation
// https://tc39.github.io/ecma262/#sec-toobject
module.exports = function (argument) {
return Object(requireObjectCoercible(argument));
};
/***/ }),
/***/ "ezU2":
/*!**************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/classof-raw.js ***!
\**************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
var toString = {}.toString;
module.exports = function (it) {
return toString.call(it).slice(8, -1);
};
/***/ }),
/***/ "f3jH":
/*!*********************************************************************!*\
!*** ./node_modules/core-js/modules/es.reflect.get-prototype-of.js ***!
\*********************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk");
var objectGetPrototypeOf = __webpack_require__(/*! ../internals/object-get-prototype-of */ "4WOD");
var CORRECT_PROTOTYPE_GETTER = __webpack_require__(/*! ../internals/correct-prototype-getter */ "4Xet");
// `Reflect.getPrototypeOf` method
// https://tc39.github.io/ecma262/#sec-reflect.getprototypeof
$({ target: 'Reflect', stat: true, sham: !CORRECT_PROTOTYPE_GETTER }, {
getPrototypeOf: function getPrototypeOf(target) {
return objectGetPrototypeOf(anObject(target));
}
});
/***/ }),
/***/ "f5p1":
/*!***********************************************************!*\
!*** ./node_modules/core-js/internals/native-weak-map.js ***!
\***********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__(/*! ../internals/global */ "2oRo");
var inspectSource = __webpack_require__(/*! ../internals/inspect-source */ "iSVu");
var WeakMap = global.WeakMap;
module.exports = typeof WeakMap === 'function' && /native code/.test(inspectSource(WeakMap));
/***/ }),
/***/ "fHMY":
/*!*********************************************************!*\
!*** ./node_modules/core-js/internals/object-create.js ***!
\*********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk");
var defineProperties = __webpack_require__(/*! ../internals/object-define-properties */ "N+g0");
var enumBugKeys = __webpack_require__(/*! ../internals/enum-bug-keys */ "eDl+");
var hiddenKeys = __webpack_require__(/*! ../internals/hidden-keys */ "0BK2");
var html = __webpack_require__(/*! ../internals/html */ "G+Rx");
var documentCreateElement = __webpack_require__(/*! ../internals/document-create-element */ "zBJ4");
var sharedKey = __webpack_require__(/*! ../internals/shared-key */ "93I0");
var GT = '>';
var LT = '<';
var PROTOTYPE = 'prototype';
var SCRIPT = 'script';
var IE_PROTO = sharedKey('IE_PROTO');
var EmptyConstructor = function () { /* empty */ };
var scriptTag = function (content) {
return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
};
// Create object with fake `null` prototype: use ActiveX Object with cleared prototype
var NullProtoObjectViaActiveX = function (activeXDocument) {
activeXDocument.write(scriptTag(''));
activeXDocument.close();
var temp = activeXDocument.parentWindow.Object;
activeXDocument = null; // avoid memory leak
return temp;
};
// Create object with fake `null` prototype: use iframe Object with cleared prototype
var NullProtoObjectViaIFrame = function () {
// Thrash, waste and sodomy: IE GC bug
var iframe = documentCreateElement('iframe');
var JS = 'java' + SCRIPT + ':';
var iframeDocument;
iframe.style.display = 'none';
html.appendChild(iframe);
// https://github.com/zloirock/core-js/issues/475
iframe.src = String(JS);
iframeDocument = iframe.contentWindow.document;
iframeDocument.open();
iframeDocument.write(scriptTag('document.F=Object'));
iframeDocument.close();
return iframeDocument.F;
};
// Check for document.domain and active x support
// No need to use active x approach when document.domain is not set
// see https://github.com/es-shims/es5-shim/issues/150
// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
// avoid IE GC bug
var activeXDocument;
var NullProtoObject = function () {
try {
/* global ActiveXObject */
activeXDocument = document.domain && new ActiveXObject('htmlfile');
} catch (error) { /* ignore */ }
NullProtoObject = activeXDocument ? NullProtoObjectViaActiveX(activeXDocument) : NullProtoObjectViaIFrame();
var length = enumBugKeys.length;
while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
return NullProtoObject();
};
hiddenKeys[IE_PROTO] = true;
// `Object.create` method
// https://tc39.github.io/ecma262/#sec-object.create
module.exports = Object.create || function create(O, Properties) {
var result;
if (O !== null) {
EmptyConstructor[PROTOTYPE] = anObject(O);
result = new EmptyConstructor();
EmptyConstructor[PROTOTYPE] = null;
// add "__proto__" for Object.getPrototypeOf polyfill
result[IE_PROTO] = O;
} else result = NullProtoObject();
return Properties === undefined ? result : defineProperties(result, Properties);
};
/***/ }),
/***/ "fMvl":
/*!*****************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.string.search.js ***!
\*****************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var fixRegExpWellKnownSymbolLogic = __webpack_require__(/*! ../internals/fix-regexp-well-known-symbol-logic */ "HSQg");
var anObject = __webpack_require__(/*! ../internals/an-object */ "F26l");
var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ "hmpk");
var sameValue = __webpack_require__(/*! ../internals/same-value */ "EQZg");
var regExpExec = __webpack_require__(/*! ../internals/regexp-exec-abstract */ "unYP");
// @@search logic
fixRegExpWellKnownSymbolLogic('search', 1, function (SEARCH, nativeSearch, maybeCallNative) {
return [
// `String.prototype.search` method
// https://tc39.github.io/ecma262/#sec-string.prototype.search
function search(regexp) {
var O = requireObjectCoercible(this);
var searcher = regexp == undefined ? undefined : regexp[SEARCH];
return searcher !== undefined ? searcher.call(regexp, O) : new RegExp(regexp)[SEARCH](String(O));
},
// `RegExp.prototype[@@search]` method
// https://tc39.github.io/ecma262/#sec-regexp.prototype-@@search
function (regexp) {
var res = maybeCallNative(nativeSearch, regexp, this);
if (res.done) return res.value;
var rx = anObject(regexp);
var S = String(this);
var previousLastIndex = rx.lastIndex;
if (!sameValue(previousLastIndex, 0)) rx.lastIndex = 0;
var result = regExpExec(rx, S);
if (!sameValue(rx.lastIndex, previousLastIndex)) rx.lastIndex = previousLastIndex;
return result === null ? -1 : result.index;
}
];
});
/***/ }),
/***/ "fquo":
/*!****************************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.reflect.get-prototype-of.js ***!
\****************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var anObject = __webpack_require__(/*! ../internals/an-object */ "F26l");
var objectGetPrototypeOf = __webpack_require__(/*! ../internals/object-get-prototype-of */ "wIVT");
var CORRECT_PROTOTYPE_GETTER = __webpack_require__(/*! ../internals/correct-prototype-getter */ "cwa4");
// `Reflect.getPrototypeOf` method
// https://tc39.github.io/ecma262/#sec-reflect.getprototypeof
$({ target: 'Reflect', stat: true, sham: !CORRECT_PROTOTYPE_GETTER }, {
getPrototypeOf: function getPrototypeOf(target) {
return objectGetPrototypeOf(anObject(target));
}
});
/***/ }),
/***/ "ftMj":
/*!********************************************************!*\
!*** ./node_modules/core-js/modules/es.reflect.set.js ***!
\********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk");
var isObject = __webpack_require__(/*! ../internals/is-object */ "hh1v");
var has = __webpack_require__(/*! ../internals/has */ "UTVS");
var fails = __webpack_require__(/*! ../internals/fails */ "0Dky");
var definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ "m/L8");
var getOwnPropertyDescriptorModule = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ "Bs8V");
var getPrototypeOf = __webpack_require__(/*! ../internals/object-get-prototype-of */ "4WOD");
var createPropertyDescriptor = __webpack_require__(/*! ../internals/create-property-descriptor */ "XGwC");
// `Reflect.set` method
// https://tc39.github.io/ecma262/#sec-reflect.set
function set(target, propertyKey, V /* , receiver */) {
var receiver = arguments.length < 4 ? target : arguments[3];
var ownDescriptor = getOwnPropertyDescriptorModule.f(anObject(target), propertyKey);
var existingDescriptor, prototype;
if (!ownDescriptor) {
if (isObject(prototype = getPrototypeOf(target))) {
return set(prototype, propertyKey, V, receiver);
}
ownDescriptor = createPropertyDescriptor(0);
}
if (has(ownDescriptor, 'value')) {
if (ownDescriptor.writable === false || !isObject(receiver)) return false;
if (existingDescriptor = getOwnPropertyDescriptorModule.f(receiver, propertyKey)) {
if (existingDescriptor.get || existingDescriptor.set || existingDescriptor.writable === false) return false;
existingDescriptor.value = V;
definePropertyModule.f(receiver, propertyKey, existingDescriptor);
} else definePropertyModule.f(receiver, propertyKey, createPropertyDescriptor(0, V));
return true;
}
return ownDescriptor.set === undefined ? false : (ownDescriptor.set.call(receiver, V), true);
}
// MS Edge 17-18 Reflect.set allows setting the property to object
// with non-writable property on the prototype
var MS_EDGE_BUG = fails(function () {
var Constructor = function () { /* empty */ };
var object = definePropertyModule.f(new Constructor(), 'a', { configurable: true });
// eslint-disable-next-line no-undef
return Reflect.set(Constructor.prototype, 'a', 1, object) !== false;
});
$({ target: 'Reflect', stat: true, forced: MS_EDGE_BUG }, {
set: set
});
/***/ }),
/***/ "g69M":
/*!*********************************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.object.get-own-property-names.js ***!
\*********************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var fails = __webpack_require__(/*! ../internals/fails */ "rG8t");
var nativeGetOwnPropertyNames = __webpack_require__(/*! ../internals/object-get-own-property-names-external */ "TzEA").f;
var FAILS_ON_PRIMITIVES = fails(function () { return !Object.getOwnPropertyNames(1); });
// `Object.getOwnPropertyNames` method
// https://tc39.github.io/ecma262/#sec-object.getownpropertynames
$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, {
getOwnPropertyNames: nativeGetOwnPropertyNames
});
/***/ }),
/***/ "g6v/":
/*!*******************************************************!*\
!*** ./node_modules/core-js/internals/descriptors.js ***!
\*******************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var fails = __webpack_require__(/*! ../internals/fails */ "0Dky");
// Thank's IE8 for his funny defineProperty
module.exports = !fails(function () {
return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
});
/***/ }),
/***/ "g9hI":
/*!**********************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/is-pure.js ***!
\**********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = false;
/***/ }),
/***/ "gXAK":
/*!**************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.string.big.js ***!
\**************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var createHTML = __webpack_require__(/*! ../internals/create-html */ "uoca");
var forcedStringHTMLMethod = __webpack_require__(/*! ../internals/string-html-forced */ "d8Sw");
// `String.prototype.big` method
// https://tc39.github.io/ecma262/#sec-string.prototype.big
$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('big') }, {
big: function big() {
return createHTML(this, 'big', '', '');
}
});
/***/ }),
/***/ "gke3":
/*!****************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.array.filter.js ***!
\****************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var $filter = __webpack_require__(/*! ../internals/array-iteration */ "kk6e").filter;
var arrayMethodHasSpeciesSupport = __webpack_require__(/*! ../internals/array-method-has-species-support */ "lRyB");
var arrayMethodUsesToLength = __webpack_require__(/*! ../internals/array-method-uses-to-length */ "w2hq");
var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('filter');
// Edge 14- issue
var USES_TO_LENGTH = arrayMethodUsesToLength('filter');
// `Array.prototype.filter` method
// https://tc39.github.io/ecma262/#sec-array.prototype.filter
// with adding support of @@species
$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT || !USES_TO_LENGTH }, {
filter: function filter(callbackfn /* , thisArg */) {
return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
}
});
/***/ }),
/***/ "glrk":
/*!*****************************************************!*\
!*** ./node_modules/core-js/internals/an-object.js ***!
\*****************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var isObject = __webpack_require__(/*! ../internals/is-object */ "hh1v");
module.exports = function (it) {
if (!isObject(it)) {
throw TypeError(String(it) + ' is not an object');
} return it;
};
/***/ }),
/***/ "gn9T":
/*!********************************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/object-property-is-enumerable.js ***!
\********************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var nativePropertyIsEnumerable = {}.propertyIsEnumerable;
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
// Nashorn ~ JDK8 bug
var NASHORN_BUG = getOwnPropertyDescriptor && !nativePropertyIsEnumerable.call({ 1: 2 }, 1);
// `Object.prototype.propertyIsEnumerable` method implementation
// https://tc39.github.io/ecma262/#sec-object.prototype.propertyisenumerable
exports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
var descriptor = getOwnPropertyDescriptor(this, V);
return !!descriptor && descriptor.enumerable;
} : nativePropertyIsEnumerable;
/***/ }),
/***/ "hH+7":
/*!********************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/this-number-value.js ***!
\********************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var classof = __webpack_require__(/*! ../internals/classof-raw */ "ezU2");
// `thisNumberValue` abstract operation
// https://tc39.github.io/ecma262/#sec-thisnumbervalue
module.exports = function (value) {
if (typeof value != 'number' && classof(value) != 'Number') {
throw TypeError('Incorrect invocation');
}
return +value;
};
/***/ }),
/***/ "hN/g":
/*!**************************!*\
!*** ./src/polyfills.ts ***!
\**************************/
/*! no exports provided */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _angular_localize_init__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/localize/init */ "N/DB");
/* harmony import */ var classlist_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! classlist.js */ "5yqK");
/* harmony import */ var classlist_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(classlist_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var web_animations_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! web-animations-js */ "6dTf");
/* harmony import */ var web_animations_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(web_animations_js__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var core_js_es_reflect__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/es/reflect */ "SkA5");
/* harmony import */ var core_js_es_reflect__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_es_reflect__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var zone_js_dist_zone__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! zone.js/dist/zone */ "0TWp");
/* harmony import */ var zone_js_dist_zone__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(zone_js_dist_zone__WEBPACK_IMPORTED_MODULE_4__);
/***************************************************************************************************
* Load `$localize` onto the global scope - used if i18n tags appear in Angular templates.
*/
/**
* This file includes polyfills needed by Angular and is loaded before the app.
* You can add your own extra polyfills to this file.
*
* This file is divided into 2 sections:
* 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.
* 2. Application imports. Files imported after ZoneJS that should be loaded before your main
* file.
*
* The current setup is for so-called "evergreen" browsers; the last versions of browsers that
* automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera),
* Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile.
*
* Learn more in https://angular.io/docs/ts/latest/guide/browser-support.html
*/
/***************************************************************************************************
* BROWSER POLYFILLS
*/
/** IE9, IE10 and IE11 requires all of the following polyfills. **/
// import 'core-js/es6/symbol';
// import 'core-js/es6/object';
// import 'core-js/es6/function';
// import 'core-js/es6/parse-int';
// import 'core-js/es6/parse-float';
// import 'core-js/es6/number';
// import 'core-js/es6/math';
// import 'core-js/es6/string';
// import 'core-js/es6/date';
// import 'core-js/es6/array';
// import 'core-js/es6/regexp';
// import 'core-js/es6/map';
// import 'core-js/es6/set';
/** IE10 and IE11 requires the following for NgClass support on SVG elements */
// Run `npm install --save classlist.js`.
/** IE10 and IE11 requires the following to support `@angular/animation`. */
// Run `npm install --save webå-animations-js`.
/** Evergreen browsers require these. **/
/** ALL Firefox browsers require the following to support `@angular/animation`. **/
// Run `npm install --save web-animations-js`.
/***************************************************************************************************
* Zone JS is required by Angular itself.
*/
// Included with Angular CLI.
/***************************************************************************************************
* APPLICATION IMPORTS
*/
/**
* Date, currency, decimal and percent pipes.
* Needed for: All but Chrome, Firefox, Edge, IE11 and Safari 10
*/
// import 'intl'; // Run `npm install --save intl`.
/***/ }),
/***/ "hdsk":
/*!************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.weak-map.js ***!
\************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var global = __webpack_require__(/*! ../internals/global */ "ocAm");
var redefineAll = __webpack_require__(/*! ../internals/redefine-all */ "8aNu");
var InternalMetadataModule = __webpack_require__(/*! ../internals/internal-metadata */ "M7Xk");
var collection = __webpack_require__(/*! ../internals/collection */ "wdMf");
var collectionWeak = __webpack_require__(/*! ../internals/collection-weak */ "DAme");
var isObject = __webpack_require__(/*! ../internals/is-object */ "6XUM");
var enforceIternalState = __webpack_require__(/*! ../internals/internal-state */ "XH/I").enforce;
var NATIVE_WEAK_MAP = __webpack_require__(/*! ../internals/native-weak-map */ "yaK9");
var IS_IE11 = !global.ActiveXObject && 'ActiveXObject' in global;
var isExtensible = Object.isExtensible;
var InternalWeakMap;
var wrapper = function (init) {
return function WeakMap() {
return init(this, arguments.length ? arguments[0] : undefined);
};
};
// `WeakMap` constructor
// https://tc39.github.io/ecma262/#sec-weakmap-constructor
var $WeakMap = module.exports = collection('WeakMap', wrapper, collectionWeak);
// IE11 WeakMap frozen keys fix
// We can't use feature detection because it crash some old IE builds
// https://github.com/zloirock/core-js/issues/485
if (NATIVE_WEAK_MAP && IS_IE11) {
InternalWeakMap = collectionWeak.getConstructor(wrapper, 'WeakMap', true);
InternalMetadataModule.REQUIRED = true;
var WeakMapPrototype = $WeakMap.prototype;
var nativeDelete = WeakMapPrototype['delete'];
var nativeHas = WeakMapPrototype.has;
var nativeGet = WeakMapPrototype.get;
var nativeSet = WeakMapPrototype.set;
redefineAll(WeakMapPrototype, {
'delete': function (key) {
if (isObject(key) && !isExtensible(key)) {
var state = enforceIternalState(this);
if (!state.frozen) state.frozen = new InternalWeakMap();
return nativeDelete.call(this, key) || state.frozen['delete'](key);
} return nativeDelete.call(this, key);
},
has: function has(key) {
if (isObject(key) && !isExtensible(key)) {
var state = enforceIternalState(this);
if (!state.frozen) state.frozen = new InternalWeakMap();
return nativeHas.call(this, key) || state.frozen.has(key);
} return nativeHas.call(this, key);
},
get: function get(key) {
if (isObject(key) && !isExtensible(key)) {
var state = enforceIternalState(this);
if (!state.frozen) state.frozen = new InternalWeakMap();
return nativeHas.call(this, key) ? nativeGet.call(this, key) : state.frozen.get(key);
} return nativeGet.call(this, key);
},
set: function set(key, value) {
if (isObject(key) && !isExtensible(key)) {
var state = enforceIternalState(this);
if (!state.frozen) state.frozen = new InternalWeakMap();
nativeHas.call(this, key) ? nativeSet.call(this, key, value) : state.frozen.set(key, value);
} else nativeSet.call(this, key, value);
return this;
}
});
}
/***/ }),
/***/ "hh1v":
/*!*****************************************************!*\
!*** ./node_modules/core-js/internals/is-object.js ***!
\*****************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = function (it) {
return typeof it === 'object' ? it !== null : typeof it === 'function';
};
/***/ }),
/***/ "hmpk":
/*!***************************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/require-object-coercible.js ***!
\***************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
// `RequireObjectCoercible` abstract operation
// https://tc39.github.io/ecma262/#sec-requireobjectcoercible
module.exports = function (it) {
if (it == undefined) throw TypeError("Can't call method on " + it);
return it;
};
/***/ }),
/***/ "i5pp":
/*!*********************************************************************!*\
!*** ./node_modules/core-js/modules/es.reflect.set-prototype-of.js ***!
\*********************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk");
var aPossiblePrototype = __webpack_require__(/*! ../internals/a-possible-prototype */ "O741");
var objectSetPrototypeOf = __webpack_require__(/*! ../internals/object-set-prototype-of */ "0rvr");
// `Reflect.setPrototypeOf` method
// https://tc39.github.io/ecma262/#sec-reflect.setprototypeof
if (objectSetPrototypeOf) $({ target: 'Reflect', stat: true }, {
setPrototypeOf: function setPrototypeOf(target, proto) {
anObject(target);
aPossiblePrototype(proto);
try {
objectSetPrototypeOf(target, proto);
return true;
} catch (error) {
return false;
}
}
});
/***/ }),
/***/ "i85Z":
/*!********************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/use-symbol-as-uid.js ***!
\********************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var NATIVE_SYMBOL = __webpack_require__(/*! ../internals/native-symbol */ "U+kB");
module.exports = NATIVE_SYMBOL
// eslint-disable-next-line no-undef
&& !Symbol.sham
// eslint-disable-next-line no-undef
&& typeof Symbol.iterator == 'symbol';
/***/ }),
/***/ "iSVu":
/*!**********************************************************!*\
!*** ./node_modules/core-js/internals/inspect-source.js ***!
\**********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var store = __webpack_require__(/*! ../internals/shared-store */ "xs3f");
var functionToString = Function.toString;
// this helper broken in `3.4.1-3.4.4`, so we can't use `shared` helper
if (typeof store.inspectSource != 'function') {
store.inspectSource = function (it) {
return functionToString.call(it);
};
}
module.exports = store.inspectSource;
/***/ }),
/***/ "ipMl":
/*!***********************************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/call-with-safe-iteration-closing.js ***!
\***********************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var anObject = __webpack_require__(/*! ../internals/an-object */ "F26l");
// call something on iterator step with safe closing on error
module.exports = function (iterator, fn, value, ENTRIES) {
try {
return ENTRIES ? fn(anObject(value)[0], value[1]) : fn(value);
// 7.4.6 IteratorClose(iterator, completion)
} catch (error) {
var returnMethod = iterator['return'];
if (returnMethod !== undefined) anObject(returnMethod.call(iterator));
throw error;
}
};
/***/ }),
/***/ "jGBA":
/*!***************************************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.reflect.get-own-property-descriptor.js ***!
\***************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "T69T");
var anObject = __webpack_require__(/*! ../internals/an-object */ "F26l");
var getOwnPropertyDescriptorModule = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ "7gGY");
// `Reflect.getOwnPropertyDescriptor` method
// https://tc39.github.io/ecma262/#sec-reflect.getownpropertydescriptor
$({ target: 'Reflect', stat: true, sham: !DESCRIPTORS }, {
getOwnPropertyDescriptor: function getOwnPropertyDescriptor(target, propertyKey) {
return getOwnPropertyDescriptorModule.f(anObject(target), propertyKey);
}
});
/***/ }),
/***/ "jO7L":
/*!***************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.reflect.has.js ***!
\***************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
// `Reflect.has` method
// https://tc39.github.io/ecma262/#sec-reflect.has
$({ target: 'Reflect', stat: true }, {
has: function has(target, propertyKey) {
return propertyKey in target;
}
});
/***/ }),
/***/ "jnLS":
/*!**************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/string-trim.js ***!
\**************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ "hmpk");
var whitespaces = __webpack_require__(/*! ../internals/whitespaces */ "xFZC");
var whitespace = '[' + whitespaces + ']';
var ltrim = RegExp('^' + whitespace + whitespace + '*');
var rtrim = RegExp(whitespace + whitespace + '*$');
// `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
var createMethod = function (TYPE) {
return function ($this) {
var string = String(requireObjectCoercible($this));
if (TYPE & 1) string = string.replace(ltrim, '');
if (TYPE & 2) string = string.replace(rtrim, '');
return string;
};
};
module.exports = {
// `String.prototype.{ trimLeft, trimStart }` methods
// https://tc39.github.io/ecma262/#sec-string.prototype.trimstart
start: createMethod(1),
// `String.prototype.{ trimRight, trimEnd }` methods
// https://tc39.github.io/ecma262/#sec-string.prototype.trimend
end: createMethod(2),
// `String.prototype.trim` method
// https://tc39.github.io/ecma262/#sec-string.prototype.trim
trim: createMethod(3)
};
/***/ }),
/***/ "kIOX":
/*!*****************************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/web.dom-collections.for-each.js ***!
\*****************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__(/*! ../internals/global */ "ocAm");
var DOMIterables = __webpack_require__(/*! ../internals/dom-iterables */ "OjQg");
var forEach = __webpack_require__(/*! ../internals/array-for-each */ "nP0K");
var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ "aJMj");
for (var COLLECTION_NAME in DOMIterables) {
var Collection = global[COLLECTION_NAME];
var CollectionPrototype = Collection && Collection.prototype;
// some Chrome versions have non-configurable methods on DOMTokenList
if (CollectionPrototype && CollectionPrototype.forEach !== forEach) try {
createNonEnumerableProperty(CollectionPrototype, 'forEach', forEach);
} catch (error) {
CollectionPrototype.forEach = forEach;
}
}
/***/ }),
/***/ "kOOl":
/*!***********************************************!*\
!*** ./node_modules/core-js/internals/uid.js ***!
\***********************************************/
/*! no static exports found */
/***/ (function(module, exports) {
var id = 0;
var postfix = Math.random();
module.exports = function (key) {
return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36);
};
/***/ }),
/***/ "kP9Y":
/*!*********************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.array.copy-within.js ***!
\*********************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var copyWithin = __webpack_require__(/*! ../internals/array-copy-within */ "4GtL");
var addToUnscopables = __webpack_require__(/*! ../internals/add-to-unscopables */ "A1Hp");
// `Array.prototype.copyWithin` method
// https://tc39.github.io/ecma262/#sec-array.prototype.copywithin
$({ target: 'Array', proto: true }, {
copyWithin: copyWithin
});
// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
addToUnscopables('copyWithin');
/***/ }),
/***/ "kRJp":
/*!**************************************************************************!*\
!*** ./node_modules/core-js/internals/create-non-enumerable-property.js ***!
\**************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "g6v/");
var definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ "m/L8");
var createPropertyDescriptor = __webpack_require__(/*! ../internals/create-property-descriptor */ "XGwC");
module.exports = DESCRIPTORS ? function (object, key, value) {
return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));
} : function (object, key, value) {
object[key] = value;
return object;
};
/***/ }),
/***/ "kcGo":
/*!**********************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.date.to-iso-string.js ***!
\**********************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var toISOString = __webpack_require__(/*! ../internals/date-to-iso-string */ "qc/G");
// `Date.prototype.toISOString` method
// https://tc39.github.io/ecma262/#sec-date.prototype.toisostring
// PhantomJS / old WebKit has a broken implementations
$({ target: 'Date', proto: true, forced: Date.prototype.toISOString !== toISOString }, {
toISOString: toISOString
});
/***/ }),
/***/ "kk6e":
/*!******************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/array-iteration.js ***!
\******************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var bind = __webpack_require__(/*! ../internals/function-bind-context */ "tcQx");
var IndexedObject = __webpack_require__(/*! ../internals/indexed-object */ "tUdv");
var toObject = __webpack_require__(/*! ../internals/to-object */ "VCQ8");
var toLength = __webpack_require__(/*! ../internals/to-length */ "xpLY");
var arraySpeciesCreate = __webpack_require__(/*! ../internals/array-species-create */ "JafA");
var push = [].push;
// `Array.prototype.{ forEach, map, filter, some, every, find, findIndex }` methods implementation
var createMethod = function (TYPE) {
var IS_MAP = TYPE == 1;
var IS_FILTER = TYPE == 2;
var IS_SOME = TYPE == 3;
var IS_EVERY = TYPE == 4;
var IS_FIND_INDEX = TYPE == 6;
var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
return function ($this, callbackfn, that, specificCreate) {
var O = toObject($this);
var self = IndexedObject(O);
var boundFunction = bind(callbackfn, that, 3);
var length = toLength(self.length);
var index = 0;
var create = specificCreate || arraySpeciesCreate;
var target = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined;
var value, result;
for (;length > index; index++) if (NO_HOLES || index in self) {
value = self[index];
result = boundFunction(value, index, O);
if (TYPE) {
if (IS_MAP) target[index] = result; // map
else if (result) switch (TYPE) {
case 3: return true; // some
case 5: return value; // find
case 6: return index; // findIndex
case 2: push.call(target, value); // filter
} else if (IS_EVERY) return false; // every
}
}
return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;
};
};
module.exports = {
// `Array.prototype.forEach` method
// https://tc39.github.io/ecma262/#sec-array.prototype.foreach
forEach: createMethod(0),
// `Array.prototype.map` method
// https://tc39.github.io/ecma262/#sec-array.prototype.map
map: createMethod(1),
// `Array.prototype.filter` method
// https://tc39.github.io/ecma262/#sec-array.prototype.filter
filter: createMethod(2),
// `Array.prototype.some` method
// https://tc39.github.io/ecma262/#sec-array.prototype.some
some: createMethod(3),
// `Array.prototype.every` method
// https://tc39.github.io/ecma262/#sec-array.prototype.every
every: createMethod(4),
// `Array.prototype.find` method
// https://tc39.github.io/ecma262/#sec-array.prototype.find
find: createMethod(5),
// `Array.prototype.findIndex` method
// https://tc39.github.io/ecma262/#sec-array.prototype.findIndex
findIndex: createMethod(6)
};
/***/ }),
/***/ "kpca":
/*!**************************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.number.is-safe-integer.js ***!
\**************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var isInteger = __webpack_require__(/*! ../internals/is-integer */ "Nvxz");
var abs = Math.abs;
// `Number.isSafeInteger` method
// https://tc39.github.io/ecma262/#sec-number.issafeinteger
$({ target: 'Number', stat: true }, {
isSafeInteger: function isSafeInteger(number) {
return isInteger(number) && abs(number) <= 0x1FFFFFFFFFFFFF;
}
});
/***/ }),
/***/ "ktmr":
/*!*********************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/host-report-errors.js ***!
\*********************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__(/*! ../internals/global */ "ocAm");
module.exports = function (a, b) {
var console = global.console;
if (console && console.error) {
arguments.length === 1 ? console.error(a) : console.error(a, b);
}
};
/***/ }),
/***/ "lMq5":
/*!*****************************************************!*\
!*** ./node_modules/core-js/internals/is-forced.js ***!
\*****************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var fails = __webpack_require__(/*! ../internals/fails */ "0Dky");
var replacement = /#|\.prototype\./;
var isForced = function (feature, detection) {
var value = data[normalize(feature)];
return value == POLYFILL ? true
: value == NATIVE ? false
: typeof detection == 'function' ? fails(detection)
: !!detection;
};
var normalize = isForced.normalize = function (string) {
return String(string).replace(replacement, '.').toLowerCase();
};
var data = isForced.data = {};
var NATIVE = isForced.NATIVE = 'N';
var POLYFILL = isForced.POLYFILL = 'P';
module.exports = isForced;
/***/ }),
/***/ "lPAZ":
/*!******************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/es/date/index.js ***!
\******************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__(/*! ../../modules/es.date.now */ "8ydS");
__webpack_require__(/*! ../../modules/es.date.to-json */ "DGHb");
__webpack_require__(/*! ../../modules/es.date.to-iso-string */ "kcGo");
__webpack_require__(/*! ../../modules/es.date.to-string */ "n43T");
__webpack_require__(/*! ../../modules/es.date.to-primitive */ "Y5OV");
var path = __webpack_require__(/*! ../../internals/path */ "E7aN");
module.exports = path.Date;
/***/ }),
/***/ "lRyB":
/*!***********************************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/array-method-has-species-support.js ***!
\***********************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var fails = __webpack_require__(/*! ../internals/fails */ "rG8t");
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "m41k");
var V8_VERSION = __webpack_require__(/*! ../internals/engine-v8-version */ "D3bo");
var SPECIES = wellKnownSymbol('species');
module.exports = function (METHOD_NAME) {
// We can't use this feature detection in V8 since it causes
// deoptimization and serious performance degradation
// https://github.com/zloirock/core-js/issues/677
return V8_VERSION >= 51 || !fails(function () {
var array = [];
var constructor = array.constructor = {};
constructor[SPECIES] = function () {
return { foo: 1 };
};
return array[METHOD_NAME](Boolean).foo !== 1;
});
};
/***/ }),
/***/ "ls82":
/*!*****************************************************!*\
!*** ./node_modules/regenerator-runtime/runtime.js ***!
\*****************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
/**
* Copyright (c) 2014-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
var runtime = function (exports) {
"use strict";
var Op = Object.prototype;
var hasOwn = Op.hasOwnProperty;
var undefined; // More compressible than void 0.
var $Symbol = typeof Symbol === "function" ? Symbol : {};
var iteratorSymbol = $Symbol.iterator || "@@iterator";
var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
function define(obj, key, value) {
Object.defineProperty(obj, key, {
value: value,
enumerable: true,
configurable: true,
writable: true
});
return obj[key];
}
try {
// IE 8 has a broken Object.defineProperty that only works on DOM objects.
define({}, "");
} catch (err) {
define = function define(obj, key, value) {
return obj[key] = value;
};
}
function wrap(innerFn, outerFn, self, tryLocsList) {
// If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
var generator = Object.create(protoGenerator.prototype);
var context = new Context(tryLocsList || []); // The ._invoke method unifies the implementations of the .next,
// .throw, and .return methods.
generator._invoke = makeInvokeMethod(innerFn, self, context);
return generator;
}
exports.wrap = wrap; // Try/catch helper to minimize deoptimizations. Returns a completion
// record like context.tryEntries[i].completion. This interface could
// have been (and was previously) designed to take a closure to be
// invoked without arguments, but in all the cases we care about we
// already have an existing method we want to call, so there's no need
// to create a new function object. We can even get away with assuming
// the method takes exactly one argument, since that happens to be true
// in every case, so we don't have to touch the arguments object. The
// only additional allocation required is the completion record, which
// has a stable shape and so hopefully should be cheap to allocate.
function tryCatch(fn, obj, arg) {
try {
return {
type: "normal",
arg: fn.call(obj, arg)
};
} catch (err) {
return {
type: "throw",
arg: err
};
}
}
var GenStateSuspendedStart = "suspendedStart";
var GenStateSuspendedYield = "suspendedYield";
var GenStateExecuting = "executing";
var GenStateCompleted = "completed"; // Returning this object from the innerFn has the same effect as
// breaking out of the dispatch switch statement.
var ContinueSentinel = {}; // Dummy constructor functions that we use as the .constructor and
// .constructor.prototype properties for functions that return Generator
// objects. For full spec compliance, you may wish to configure your
// minifier not to mangle the names of these two functions.
function Generator() {}
function GeneratorFunction() {}
function GeneratorFunctionPrototype() {} // This is a polyfill for %IteratorPrototype% for environments that
// don't natively support it.
var IteratorPrototype = {};
IteratorPrototype[iteratorSymbol] = function () {
return this;
};
var getProto = Object.getPrototypeOf;
var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
if (NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
// This environment has a native %IteratorPrototype%; use it instead
// of the polyfill.
IteratorPrototype = NativeIteratorPrototype;
}
var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
GeneratorFunctionPrototype.constructor = GeneratorFunction;
GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"); // Helper for defining the .next, .throw, and .return methods of the
// Iterator interface in terms of a single ._invoke method.
function defineIteratorMethods(prototype) {
["next", "throw", "return"].forEach(function (method) {
define(prototype, method, function (arg) {
return this._invoke(method, arg);
});
});
}
exports.isGeneratorFunction = function (genFun) {
var ctor = typeof genFun === "function" && genFun.constructor;
return ctor ? ctor === GeneratorFunction || // For the native GeneratorFunction constructor, the best we can
// do is to check its .name property.
(ctor.displayName || ctor.name) === "GeneratorFunction" : false;
};
exports.mark = function (genFun) {
if (Object.setPrototypeOf) {
Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
} else {
genFun.__proto__ = GeneratorFunctionPrototype;
define(genFun, toStringTagSymbol, "GeneratorFunction");
}
genFun.prototype = Object.create(Gp);
return genFun;
}; // Within the body of any async function, `await x` is transformed to
// `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
// `hasOwn.call(value, "__await")` to determine if the yielded value is
// meant to be awaited.
exports.awrap = function (arg) {
return {
__await: arg
};
};
function AsyncIterator(generator, PromiseImpl) {
function invoke(method, arg, resolve, reject) {
var record = tryCatch(generator[method], generator, arg);
if (record.type === "throw") {
reject(record.arg);
} else {
var result = record.arg;
var value = result.value;
if (value && typeof value === "object" && hasOwn.call(value, "__await")) {
return PromiseImpl.resolve(value.__await).then(function (value) {
invoke("next", value, resolve, reject);
}, function (err) {
invoke("throw", err, resolve, reject);
});
}
return PromiseImpl.resolve(value).then(function (unwrapped) {
// When a yielded Promise is resolved, its final value becomes
// the .value of the Promise<{value,done}> result for the
// current iteration.
result.value = unwrapped;
resolve(result);
}, function (error) {
// If a rejected Promise was yielded, throw the rejection back
// into the async generator function so it can be handled there.
return invoke("throw", error, resolve, reject);
});
}
}
var previousPromise;
function enqueue(method, arg) {
function callInvokeWithMethodAndArg() {
return new PromiseImpl(function (resolve, reject) {
invoke(method, arg, resolve, reject);
});
}
return previousPromise = // If enqueue has been called before, then we want to wait until
// all previous Promises have been resolved before calling invoke,
// so that results are always delivered in the correct order. If
// enqueue has not been called before, then it is important to
// call invoke immediately, without waiting on a callback to fire,
// so that the async generator function has the opportunity to do
// any necessary setup in a predictable way. This predictability
// is why the Promise constructor synchronously invokes its
// executor callback, and why async functions synchronously
// execute code before the first await. Since we implement simple
// async functions in terms of async generators, it is especially
// important to get this right, even though it requires care.
previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, // Avoid propagating failures to Promises returned by later
// invocations of the iterator.
callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
} // Define the unified helper method that is used to implement .next,
// .throw, and .return (see defineIteratorMethods).
this._invoke = enqueue;
}
defineIteratorMethods(AsyncIterator.prototype);
AsyncIterator.prototype[asyncIteratorSymbol] = function () {
return this;
};
exports.AsyncIterator = AsyncIterator; // Note that simple async functions are implemented on top of
// AsyncIterator objects; they just return a Promise for the value of
// the final result produced by the iterator.
exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
if (PromiseImpl === void 0) PromiseImpl = Promise;
var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
return exports.isGeneratorFunction(outerFn) ? iter // If outerFn is a generator, return the full iterator.
: iter.next().then(function (result) {
return result.done ? result.value : iter.next();
});
};
function makeInvokeMethod(innerFn, self, context) {
var state = GenStateSuspendedStart;
return function invoke(method, arg) {
if (state === GenStateExecuting) {
throw new Error("Generator is already running");
}
if (state === GenStateCompleted) {
if (method === "throw") {
throw arg;
} // Be forgiving, per 25.3.3.3.3 of the spec:
// https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
return doneResult();
}
context.method = method;
context.arg = arg;
while (true) {
var delegate = context.delegate;
if (delegate) {
var delegateResult = maybeInvokeDelegate(delegate, context);
if (delegateResult) {
if (delegateResult === ContinueSentinel) continue;
return delegateResult;
}
}
if (context.method === "next") {
// Setting context._sent for legacy support of Babel's
// function.sent implementation.
context.sent = context._sent = context.arg;
} else if (context.method === "throw") {
if (state === GenStateSuspendedStart) {
state = GenStateCompleted;
throw context.arg;
}
context.dispatchException(context.arg);
} else if (context.method === "return") {
context.abrupt("return", context.arg);
}
state = GenStateExecuting;
var record = tryCatch(innerFn, self, context);
if (record.type === "normal") {
// If an exception is thrown from innerFn, we leave state ===
// GenStateExecuting and loop back for another invocation.
state = context.done ? GenStateCompleted : GenStateSuspendedYield;
if (record.arg === ContinueSentinel) {
continue;
}
return {
value: record.arg,
done: context.done
};
} else if (record.type === "throw") {
state = GenStateCompleted; // Dispatch the exception by looping back around to the
// context.dispatchException(context.arg) call above.
context.method = "throw";
context.arg = record.arg;
}
}
};
} // Call delegate.iterator[context.method](context.arg) and handle the
// result, either by returning a { value, done } result from the
// delegate iterator, or by modifying context.method and context.arg,
// setting context.delegate to null, and returning the ContinueSentinel.
function maybeInvokeDelegate(delegate, context) {
var method = delegate.iterator[context.method];
if (method === undefined) {
// A .throw or .return when the delegate iterator has no .throw
// method always terminates the yield* loop.
context.delegate = null;
if (context.method === "throw") {
// Note: ["return"] must be used for ES3 parsing compatibility.
if (delegate.iterator["return"]) {
// If the delegate iterator has a return method, give it a
// chance to clean up.
context.method = "return";
context.arg = undefined;
maybeInvokeDelegate(delegate, context);
if (context.method === "throw") {
// If maybeInvokeDelegate(context) changed context.method from
// "return" to "throw", let that override the TypeError below.
return ContinueSentinel;
}
}
context.method = "throw";
context.arg = new TypeError("The iterator does not provide a 'throw' method");
}
return ContinueSentinel;
}
var record = tryCatch(method, delegate.iterator, context.arg);
if (record.type === "throw") {
context.method = "throw";
context.arg = record.arg;
context.delegate = null;
return ContinueSentinel;
}
var info = record.arg;
if (!info) {
context.method = "throw";
context.arg = new TypeError("iterator result is not an object");
context.delegate = null;
return ContinueSentinel;
}
if (info.done) {
// Assign the result of the finished delegate to the temporary
// variable specified by delegate.resultName (see delegateYield).
context[delegate.resultName] = info.value; // Resume execution at the desired location (see delegateYield).
context.next = delegate.nextLoc; // If context.method was "throw" but the delegate handled the
// exception, let the outer generator proceed normally. If
// context.method was "next", forget context.arg since it has been
// "consumed" by the delegate iterator. If context.method was
// "return", allow the original .return call to continue in the
// outer generator.
if (context.method !== "return") {
context.method = "next";
context.arg = undefined;
}
} else {
// Re-yield the result returned by the delegate method.
return info;
} // The delegate iterator is finished, so forget it and continue with
// the outer generator.
context.delegate = null;
return ContinueSentinel;
} // Define Generator.prototype.{next,throw,return} in terms of the
// unified ._invoke helper method.
defineIteratorMethods(Gp);
define(Gp, toStringTagSymbol, "Generator"); // A Generator should always return itself as the iterator object when the
// @@iterator function is called on it. Some browsers' implementations of the
// iterator prototype chain incorrectly implement this, causing the Generator
// object to not be returned from this call. This ensures that doesn't happen.
// See https://github.com/facebook/regenerator/issues/274 for more details.
Gp[iteratorSymbol] = function () {
return this;
};
Gp.toString = function () {
return "[object Generator]";
};
function pushTryEntry(locs) {
var entry = {
tryLoc: locs[0]
};
if (1 in locs) {
entry.catchLoc = locs[1];
}
if (2 in locs) {
entry.finallyLoc = locs[2];
entry.afterLoc = locs[3];
}
this.tryEntries.push(entry);
}
function resetTryEntry(entry) {
var record = entry.completion || {};
record.type = "normal";
delete record.arg;
entry.completion = record;
}
function Context(tryLocsList) {
// The root entry object (effectively a try statement without a catch
// or a finally block) gives us a place to store values thrown from
// locations where there is no enclosing try statement.
this.tryEntries = [{
tryLoc: "root"
}];
tryLocsList.forEach(pushTryEntry, this);
this.reset(true);
}
exports.keys = function (object) {
var keys = [];
for (var key in object) {
keys.push(key);
}
keys.reverse(); // Rather than returning an object with a next method, we keep
// things simple and return the next function itself.
return function next() {
while (keys.length) {
var key = keys.pop();
if (key in object) {
next.value = key;
next.done = false;
return next;
}
} // To avoid creating an additional object, we just hang the .value
// and .done properties off the next function object itself. This
// also ensures that the minifier will not anonymize the function.
next.done = true;
return next;
};
};
function values(iterable) {
if (iterable) {
var iteratorMethod = iterable[iteratorSymbol];
if (iteratorMethod) {
return iteratorMethod.call(iterable);
}
if (typeof iterable.next === "function") {
return iterable;
}
if (!isNaN(iterable.length)) {
var i = -1,
next = function next() {
while (++i < iterable.length) {
if (hasOwn.call(iterable, i)) {
next.value = iterable[i];
next.done = false;
return next;
}
}
next.value = undefined;
next.done = true;
return next;
};
return next.next = next;
}
} // Return an iterator with no values.
return {
next: doneResult
};
}
exports.values = values;
function doneResult() {
return {
value: undefined,
done: true
};
}
Context.prototype = {
constructor: Context,
reset: function reset(skipTempReset) {
this.prev = 0;
this.next = 0; // Resetting context._sent for legacy support of Babel's
// function.sent implementation.
this.sent = this._sent = undefined;
this.done = false;
this.delegate = null;
this.method = "next";
this.arg = undefined;
this.tryEntries.forEach(resetTryEntry);
if (!skipTempReset) {
for (var name in this) {
// Not sure about the optimal order of these conditions:
if (name.charAt(0) === "t" && hasOwn.call(this, name) && !isNaN(+name.slice(1))) {
this[name] = undefined;
}
}
}
},
stop: function stop() {
this.done = true;
var rootEntry = this.tryEntries[0];
var rootRecord = rootEntry.completion;
if (rootRecord.type === "throw") {
throw rootRecord.arg;
}
return this.rval;
},
dispatchException: function dispatchException(exception) {
if (this.done) {
throw exception;
}
var context = this;
function handle(loc, caught) {
record.type = "throw";
record.arg = exception;
context.next = loc;
if (caught) {
// If the dispatched exception was caught by a catch block,
// then let that catch block handle the exception normally.
context.method = "next";
context.arg = undefined;
}
return !!caught;
}
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
var entry = this.tryEntries[i];
var record = entry.completion;
if (entry.tryLoc === "root") {
// Exception thrown outside of any try block that could handle
// it, so set the completion value of the entire function to
// throw the exception.
return handle("end");
}
if (entry.tryLoc <= this.prev) {
var hasCatch = hasOwn.call(entry, "catchLoc");
var hasFinally = hasOwn.call(entry, "finallyLoc");
if (hasCatch && hasFinally) {
if (this.prev < entry.catchLoc) {
return handle(entry.catchLoc, true);
} else if (this.prev < entry.finallyLoc) {
return handle(entry.finallyLoc);
}
} else if (hasCatch) {
if (this.prev < entry.catchLoc) {
return handle(entry.catchLoc, true);
}
} else if (hasFinally) {
if (this.prev < entry.finallyLoc) {
return handle(entry.finallyLoc);
}
} else {
throw new Error("try statement without catch or finally");
}
}
}
},
abrupt: function abrupt(type, arg) {
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
var entry = this.tryEntries[i];
if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
var finallyEntry = entry;
break;
}
}
if (finallyEntry && (type === "break" || type === "continue") && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc) {
// Ignore the finally entry if control is not jumping to a
// location outside the try/catch block.
finallyEntry = null;
}
var record = finallyEntry ? finallyEntry.completion : {};
record.type = type;
record.arg = arg;
if (finallyEntry) {
this.method = "next";
this.next = finallyEntry.finallyLoc;
return ContinueSentinel;
}
return this.complete(record);
},
complete: function complete(record, afterLoc) {
if (record.type === "throw") {
throw record.arg;
}
if (record.type === "break" || record.type === "continue") {
this.next = record.arg;
} else if (record.type === "return") {
this.rval = this.arg = record.arg;
this.method = "return";
this.next = "end";
} else if (record.type === "normal" && afterLoc) {
this.next = afterLoc;
}
return ContinueSentinel;
},
finish: function finish(finallyLoc) {
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
var entry = this.tryEntries[i];
if (entry.finallyLoc === finallyLoc) {
this.complete(entry.completion, entry.afterLoc);
resetTryEntry(entry);
return ContinueSentinel;
}
}
},
"catch": function _catch(tryLoc) {
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
var entry = this.tryEntries[i];
if (entry.tryLoc === tryLoc) {
var record = entry.completion;
if (record.type === "throw") {
var thrown = record.arg;
resetTryEntry(entry);
}
return thrown;
}
} // The context.catch method must only be called with a location
// argument that corresponds to a known catch block.
throw new Error("illegal catch attempt");
},
delegateYield: function delegateYield(iterable, resultName, nextLoc) {
this.delegate = {
iterator: values(iterable),
resultName: resultName,
nextLoc: nextLoc
};
if (this.method === "next") {
// Deliberately forget the last sent value so that we don't
// accidentally pass it on to the delegate.
this.arg = undefined;
}
return ContinueSentinel;
}
}; // Regardless of whether this script is executing as a CommonJS module
// or not, return the runtime object so that we can declare the variable
// regeneratorRuntime in the outer scope, which allows this module to be
// injected easily by `bin/regenerator --include-runtime script.js`.
return exports;
}( // If this script is executing as a CommonJS module, use module.exports
// as the regeneratorRuntime namespace. Otherwise create a new empty
// object. Either way, the resulting object will be used to initialize
// the regeneratorRuntime variable at the top of this file.
true ? module.exports : undefined);
try {
regeneratorRuntime = runtime;
} catch (accidentalStrictMode) {
// This module should not be running in strict mode, so the above
// assignment should always work unless something is misconfigured. Just
// in case runtime.js accidentally runs in strict mode, we can escape
// strict mode using a global Function call. This could conceivably fail
// if a Content Security Policy forbids using Function, but in that case
// the proper solution is to fix the accidental strict mode problem. If
// you've misconfigured your bundler to force strict mode and applied a
// CSP to forbid Function, and you're not willing to fix either of those
// problems, please detail your unique predicament in a GitHub issue.
Function("r", "regeneratorRuntime = r")(runtime);
}
/***/ }),
/***/ "m/L8":
/*!******************************************************************!*\
!*** ./node_modules/core-js/internals/object-define-property.js ***!
\******************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "g6v/");
var IE8_DOM_DEFINE = __webpack_require__(/*! ../internals/ie8-dom-define */ "DPsx");
var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk");
var toPrimitive = __webpack_require__(/*! ../internals/to-primitive */ "wE6v");
var nativeDefineProperty = Object.defineProperty;
// `Object.defineProperty` method
// https://tc39.github.io/ecma262/#sec-object.defineproperty
exports.f = DESCRIPTORS ? nativeDefineProperty : function defineProperty(O, P, Attributes) {
anObject(O);
P = toPrimitive(P, true);
anObject(Attributes);
if (IE8_DOM_DEFINE) try {
return nativeDefineProperty(O, P, Attributes);
} catch (error) { /* empty */ }
if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');
if ('value' in Attributes) O[P] = Attributes.value;
return O;
};
/***/ }),
/***/ "m2tE":
/*!**************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.array.from.js ***!
\**************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var from = __webpack_require__(/*! ../internals/array-from */ "IBH3");
var checkCorrectnessOfIteration = __webpack_require__(/*! ../internals/check-correctness-of-iteration */ "EIBq");
var INCORRECT_ITERATION = !checkCorrectnessOfIteration(function (iterable) {
Array.from(iterable);
});
// `Array.from` method
// https://tc39.github.io/ecma262/#sec-array.from
$({ target: 'Array', stat: true, forced: INCORRECT_ITERATION }, {
from: from
});
/***/ }),
/***/ "m41k":
/*!********************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/well-known-symbol.js ***!
\********************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__(/*! ../internals/global */ "ocAm");
var shared = __webpack_require__(/*! ../internals/shared */ "yIiL");
var has = __webpack_require__(/*! ../internals/has */ "OG5q");
var uid = __webpack_require__(/*! ../internals/uid */ "SDMg");
var NATIVE_SYMBOL = __webpack_require__(/*! ../internals/native-symbol */ "U+kB");
var USE_SYMBOL_AS_UID = __webpack_require__(/*! ../internals/use-symbol-as-uid */ "i85Z");
var WellKnownSymbolsStore = shared('wks');
var Symbol = global.Symbol;
var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol : Symbol && Symbol.withoutSetter || uid;
module.exports = function (name) {
if (!has(WellKnownSymbolsStore, name)) {
if (NATIVE_SYMBOL && has(Symbol, name)) WellKnownSymbolsStore[name] = Symbol[name];
else WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name);
} return WellKnownSymbolsStore[name];
};
/***/ }),
/***/ "mA9f":
/*!*****************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.function.bind.js ***!
\*****************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var bind = __webpack_require__(/*! ../internals/function-bind */ "E8Ab");
// `Function.prototype.bind` method
// https://tc39.github.io/ecma262/#sec-function.prototype.bind
$({ target: 'Function', proto: true }, {
bind: bind
});
/***/ }),
/***/ "mN5b":
/*!**********************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/classof.js ***!
\**********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var TO_STRING_TAG_SUPPORT = __webpack_require__(/*! ../internals/to-string-tag-support */ "4PyY");
var classofRaw = __webpack_require__(/*! ../internals/classof-raw */ "ezU2");
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "m41k");
var TO_STRING_TAG = wellKnownSymbol('toStringTag');
// ES3 wrong here
var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
// fallback for IE11 Script Access Denied error
var tryGet = function (it, key) {
try {
return it[key];
} catch (error) { /* empty */ }
};
// getting tag from ES6+ `Object.prototype.toString`
module.exports = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
var O, tag, result;
return it === undefined ? 'Undefined' : it === null ? 'Null'
// @@toStringTag case
: typeof (tag = tryGet(O = Object(it), TO_STRING_TAG)) == 'string' ? tag
// builtinTag case
: CORRECT_ARGUMENTS ? classofRaw(O)
// ES3 arguments fallback
: (result = classofRaw(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : result;
};
/***/ }),
/***/ "n/2t":
/*!************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/math-sign.js ***!
\************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
// `Math.sign` method implementation
// https://tc39.github.io/ecma262/#sec-math.sign
module.exports = Math.sign || function sign(x) {
// eslint-disable-next-line no-self-compare
return (x = +x) == 0 || x != x ? x : x < 0 ? -1 : 1;
};
/***/ }),
/***/ "n1Kw":
/*!*************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.math.sinh.js ***!
\*************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var fails = __webpack_require__(/*! ../internals/fails */ "rG8t");
var expm1 = __webpack_require__(/*! ../internals/math-expm1 */ "pn4C");
var abs = Math.abs;
var exp = Math.exp;
var E = Math.E;
var FORCED = fails(function () {
return Math.sinh(-2e-17) != -2e-17;
});
// `Math.sinh` method
// https://tc39.github.io/ecma262/#sec-math.sinh
// V8 near Chromium 38 has a problem with very small numbers
$({ target: 'Math', stat: true, forced: FORCED }, {
sinh: function sinh(x) {
return abs(x = +x) < 1 ? (expm1(x) - expm1(-x)) / 2 : (exp(x - 1) - exp(-x - 1)) * (E / 2);
}
});
/***/ }),
/***/ "n43T":
/*!******************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.date.to-string.js ***!
\******************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var redefine = __webpack_require__(/*! ../internals/redefine */ "2MGJ");
var DatePrototype = Date.prototype;
var INVALID_DATE = 'Invalid Date';
var TO_STRING = 'toString';
var nativeDateToString = DatePrototype[TO_STRING];
var getTime = DatePrototype.getTime;
// `Date.prototype.toString` method
// https://tc39.github.io/ecma262/#sec-date.prototype.tostring
if (new Date(NaN) + '' != INVALID_DATE) {
redefine(DatePrototype, TO_STRING, function toString() {
var value = getTime.call(this);
// eslint-disable-next-line no-self-compare
return value === value ? nativeDateToString.call(this) : INVALID_DATE;
});
}
/***/ }),
/***/ "nIH4":
/*!********************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/collection-strong.js ***!
\********************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var defineProperty = __webpack_require__(/*! ../internals/object-define-property */ "/Ybd").f;
var create = __webpack_require__(/*! ../internals/object-create */ "2RDa");
var redefineAll = __webpack_require__(/*! ../internals/redefine-all */ "8aNu");
var bind = __webpack_require__(/*! ../internals/function-bind-context */ "tcQx");
var anInstance = __webpack_require__(/*! ../internals/an-instance */ "SM6+");
var iterate = __webpack_require__(/*! ../internals/iterate */ "Rn6E");
var defineIterator = __webpack_require__(/*! ../internals/define-iterator */ "WijE");
var setSpecies = __webpack_require__(/*! ../internals/set-species */ "JHhb");
var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "T69T");
var fastKey = __webpack_require__(/*! ../internals/internal-metadata */ "M7Xk").fastKey;
var InternalStateModule = __webpack_require__(/*! ../internals/internal-state */ "XH/I");
var setInternalState = InternalStateModule.set;
var internalStateGetterFor = InternalStateModule.getterFor;
module.exports = {
getConstructor: function (wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER) {
var C = wrapper(function (that, iterable) {
anInstance(that, C, CONSTRUCTOR_NAME);
setInternalState(that, {
type: CONSTRUCTOR_NAME,
index: create(null),
first: undefined,
last: undefined,
size: 0
});
if (!DESCRIPTORS) that.size = 0;
if (iterable != undefined) iterate(iterable, that[ADDER], that, IS_MAP);
});
var getInternalState = internalStateGetterFor(CONSTRUCTOR_NAME);
var define = function (that, key, value) {
var state = getInternalState(that);
var entry = getEntry(that, key);
var previous, index;
// change existing entry
if (entry) {
entry.value = value;
// create new entry
} else {
state.last = entry = {
index: index = fastKey(key, true),
key: key,
value: value,
previous: previous = state.last,
next: undefined,
removed: false
};
if (!state.first) state.first = entry;
if (previous) previous.next = entry;
if (DESCRIPTORS) state.size++;
else that.size++;
// add to index
if (index !== 'F') state.index[index] = entry;
} return that;
};
var getEntry = function (that, key) {
var state = getInternalState(that);
// fast case
var index = fastKey(key);
var entry;
if (index !== 'F') return state.index[index];
// frozen object case
for (entry = state.first; entry; entry = entry.next) {
if (entry.key == key) return entry;
}
};
redefineAll(C.prototype, {
// 23.1.3.1 Map.prototype.clear()
// 23.2.3.2 Set.prototype.clear()
clear: function clear() {
var that = this;
var state = getInternalState(that);
var data = state.index;
var entry = state.first;
while (entry) {
entry.removed = true;
if (entry.previous) entry.previous = entry.previous.next = undefined;
delete data[entry.index];
entry = entry.next;
}
state.first = state.last = undefined;
if (DESCRIPTORS) state.size = 0;
else that.size = 0;
},
// 23.1.3.3 Map.prototype.delete(key)
// 23.2.3.4 Set.prototype.delete(value)
'delete': function (key) {
var that = this;
var state = getInternalState(that);
var entry = getEntry(that, key);
if (entry) {
var next = entry.next;
var prev = entry.previous;
delete state.index[entry.index];
entry.removed = true;
if (prev) prev.next = next;
if (next) next.previous = prev;
if (state.first == entry) state.first = next;
if (state.last == entry) state.last = prev;
if (DESCRIPTORS) state.size--;
else that.size--;
} return !!entry;
},
// 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined)
// 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined)
forEach: function forEach(callbackfn /* , that = undefined */) {
var state = getInternalState(this);
var boundFunction = bind(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3);
var entry;
while (entry = entry ? entry.next : state.first) {
boundFunction(entry.value, entry.key, this);
// revert to the last existing entry
while (entry && entry.removed) entry = entry.previous;
}
},
// 23.1.3.7 Map.prototype.has(key)
// 23.2.3.7 Set.prototype.has(value)
has: function has(key) {
return !!getEntry(this, key);
}
});
redefineAll(C.prototype, IS_MAP ? {
// 23.1.3.6 Map.prototype.get(key)
get: function get(key) {
var entry = getEntry(this, key);
return entry && entry.value;
},
// 23.1.3.9 Map.prototype.set(key, value)
set: function set(key, value) {
return define(this, key === 0 ? 0 : key, value);
}
} : {
// 23.2.3.1 Set.prototype.add(value)
add: function add(value) {
return define(this, value = value === 0 ? 0 : value, value);
}
});
if (DESCRIPTORS) defineProperty(C.prototype, 'size', {
get: function () {
return getInternalState(this).size;
}
});
return C;
},
setStrong: function (C, CONSTRUCTOR_NAME, IS_MAP) {
var ITERATOR_NAME = CONSTRUCTOR_NAME + ' Iterator';
var getInternalCollectionState = internalStateGetterFor(CONSTRUCTOR_NAME);
var getInternalIteratorState = internalStateGetterFor(ITERATOR_NAME);
// add .keys, .values, .entries, [@@iterator]
// 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11
defineIterator(C, CONSTRUCTOR_NAME, function (iterated, kind) {
setInternalState(this, {
type: ITERATOR_NAME,
target: iterated,
state: getInternalCollectionState(iterated),
kind: kind,
last: undefined
});
}, function () {
var state = getInternalIteratorState(this);
var kind = state.kind;
var entry = state.last;
// revert to the last existing entry
while (entry && entry.removed) entry = entry.previous;
// get next entry
if (!state.target || !(state.last = entry = entry ? entry.next : state.state.first)) {
// or finish the iteration
state.target = undefined;
return { value: undefined, done: true };
}
// return step by kind
if (kind == 'keys') return { value: entry.key, done: false };
if (kind == 'values') return { value: entry.value, done: false };
return { value: [entry.key, entry.value], done: false };
}, IS_MAP ? 'entries' : 'values', !IS_MAP, true);
// add [@@species], 23.1.2.2, 23.2.2.2
setSpecies(CONSTRUCTOR_NAME);
}
};
/***/ }),
/***/ "nP0K":
/*!*****************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/array-for-each.js ***!
\*****************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $forEach = __webpack_require__(/*! ../internals/array-iteration */ "kk6e").forEach;
var arrayMethodIsStrict = __webpack_require__(/*! ../internals/array-method-is-strict */ "6CJb");
var arrayMethodUsesToLength = __webpack_require__(/*! ../internals/array-method-uses-to-length */ "w2hq");
var STRICT_METHOD = arrayMethodIsStrict('forEach');
var USES_TO_LENGTH = arrayMethodUsesToLength('forEach');
// `Array.prototype.forEach` method implementation
// https://tc39.github.io/ecma262/#sec-array.prototype.foreach
module.exports = (!STRICT_METHOD || !USES_TO_LENGTH) ? function forEach(callbackfn /* , thisArg */) {
return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
} : [].forEach;
/***/ }),
/***/ "nkod":
/*!********************************************************************************!*\
!*** ./node_modules/core-js/modules/es.reflect.get-own-property-descriptor.js ***!
\********************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "g6v/");
var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk");
var getOwnPropertyDescriptorModule = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ "Bs8V");
// `Reflect.getOwnPropertyDescriptor` method
// https://tc39.github.io/ecma262/#sec-reflect.getownpropertydescriptor
$({ target: 'Reflect', stat: true, sham: !DESCRIPTORS }, {
getOwnPropertyDescriptor: function getOwnPropertyDescriptor(target, propertyKey) {
return getOwnPropertyDescriptorModule.f(anObject(target), propertyKey);
}
});
/***/ }),
/***/ "ntzx":
/*!**************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.array.join.js ***!
\**************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var IndexedObject = __webpack_require__(/*! ../internals/indexed-object */ "tUdv");
var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ "EMtK");
var arrayMethodIsStrict = __webpack_require__(/*! ../internals/array-method-is-strict */ "6CJb");
var nativeJoin = [].join;
var ES3_STRINGS = IndexedObject != Object;
var STRICT_METHOD = arrayMethodIsStrict('join', ',');
// `Array.prototype.join` method
// https://tc39.github.io/ecma262/#sec-array.prototype.join
$({ target: 'Array', proto: true, forced: ES3_STRINGS || !STRICT_METHOD }, {
join: function join(separator) {
return nativeJoin.call(toIndexedObject(this), separator === undefined ? ',' : separator);
}
});
/***/ }),
/***/ "nuqZ":
/*!*****************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.object.assign.js ***!
\*****************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var assign = __webpack_require__(/*! ../internals/object-assign */ "KlhL");
// `Object.assign` method
// https://tc39.github.io/ecma262/#sec-object.assign
$({ target: 'Object', stat: true, forced: Object.assign !== assign }, {
assign: assign
});
/***/ }),
/***/ "oB0/":
/*!*************************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/new-promise-capability.js ***!
\*************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var aFunction = __webpack_require__(/*! ../internals/a-function */ "Neub");
var PromiseCapability = function (C) {
var resolve, reject;
this.promise = new C(function ($$resolve, $$reject) {
if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor');
resolve = $$resolve;
reject = $$reject;
});
this.resolve = aFunction(resolve);
this.reject = aFunction(reject);
};
// 25.4.1.5 NewPromiseCapability(C)
module.exports.f = function (C) {
return new PromiseCapability(C);
};
/***/ }),
/***/ "oatR":
/*!**********************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.string.starts-with.js ***!
\**********************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var getOwnPropertyDescriptor = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ "7gGY").f;
var toLength = __webpack_require__(/*! ../internals/to-length */ "xpLY");
var notARegExp = __webpack_require__(/*! ../internals/not-a-regexp */ "s8qp");
var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ "hmpk");
var correctIsRegExpLogic = __webpack_require__(/*! ../internals/correct-is-regexp-logic */ "0Ds2");
var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "g9hI");
var nativeStartsWith = ''.startsWith;
var min = Math.min;
var CORRECT_IS_REGEXP_LOGIC = correctIsRegExpLogic('startsWith');
// https://github.com/zloirock/core-js/pull/702
var MDN_POLYFILL_BUG = !IS_PURE && !CORRECT_IS_REGEXP_LOGIC && !!function () {
var descriptor = getOwnPropertyDescriptor(String.prototype, 'startsWith');
return descriptor && !descriptor.writable;
}();
// `String.prototype.startsWith` method
// https://tc39.github.io/ecma262/#sec-string.prototype.startswith
$({ target: 'String', proto: true, forced: !MDN_POLYFILL_BUG && !CORRECT_IS_REGEXP_LOGIC }, {
startsWith: function startsWith(searchString /* , position = 0 */) {
var that = String(requireObjectCoercible(this));
notARegExp(searchString);
var index = toLength(min(arguments.length > 1 ? arguments[1] : undefined, that.length));
var search = String(searchString);
return nativeStartsWith
? nativeStartsWith.call(that, search, index)
: that.slice(index, index + search.length) === search;
}
});
/***/ }),
/***/ "ocAm":
/*!*********************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/global.js ***!
\*********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
var check = function (it) {
return it && it.Math == Math && it;
};
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
module.exports =
// eslint-disable-next-line no-undef
check(typeof globalThis == 'object' && globalThis) ||
check(typeof window == 'object' && window) ||
check(typeof self == 'object' && self) ||
check(typeof global == 'object' && global) ||
// eslint-disable-next-line no-new-func
Function('return this')();
/***/ }),
/***/ "ow8b":
/*!***************************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.number.min-safe-integer.js ***!
\***************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
// `Number.MIN_SAFE_INTEGER` constant
// https://tc39.github.io/ecma262/#sec-number.min_safe_integer
$({ target: 'Number', stat: true }, {
MIN_SAFE_INTEGER: -0x1FFFFFFFFFFFFF
});
/***/ }),
/***/ "p82S":
/*!**********************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/species-constructor.js ***!
\**********************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var anObject = __webpack_require__(/*! ../internals/an-object */ "F26l");
var aFunction = __webpack_require__(/*! ../internals/a-function */ "Neub");
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "m41k");
var SPECIES = wellKnownSymbol('species');
// `SpeciesConstructor` abstract operation
// https://tc39.github.io/ecma262/#sec-speciesconstructor
module.exports = function (O, defaultConstructor) {
var C = anObject(O).constructor;
var S;
return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? defaultConstructor : aFunction(S);
};
/***/ }),
/***/ "pWza":
/*!****************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.regexp.flags.js ***!
\****************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "T69T");
var objectDefinePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ "/Ybd");
var regExpFlags = __webpack_require__(/*! ../internals/regexp-flags */ "x0kV");
var UNSUPPORTED_Y = __webpack_require__(/*! ../internals/regexp-sticky-helpers */ "JkSk").UNSUPPORTED_Y;
// `RegExp.prototype.flags` getter
// https://tc39.github.io/ecma262/#sec-get-regexp.prototype.flags
if (DESCRIPTORS && (/./g.flags != 'g' || UNSUPPORTED_Y)) {
objectDefinePropertyModule.f(RegExp.prototype, 'flags', {
configurable: true,
get: regExpFlags
});
}
/***/ }),
/***/ "pd8B":
/*!**********************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/perform.js ***!
\**********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = function (exec) {
try {
return { error: false, value: exec() };
} catch (error) {
return { error: true, value: error };
}
};
/***/ }),
/***/ "pn4C":
/*!*************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/math-expm1.js ***!
\*************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
var nativeExpm1 = Math.expm1;
var exp = Math.exp;
// `Math.expm1` method implementation
// https://tc39.github.io/ecma262/#sec-math.expm1
module.exports = (!nativeExpm1
// Old FF bug
|| nativeExpm1(10) > 22025.465794806719 || nativeExpm1(10) < 22025.4657948067165168
// Tor Browser bug
|| nativeExpm1(-2e-17) != -2e-17
) ? function expm1(x) {
return (x = +x) == 0 ? x : x > -1e-6 && x < 1e-6 ? x + x * x / 2 : exp(x) - 1;
} : nativeExpm1;
/***/ }),
/***/ "ppGB":
/*!******************************************************!*\
!*** ./node_modules/core-js/internals/to-integer.js ***!
\******************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
var ceil = Math.ceil;
var floor = Math.floor;
// `ToInteger` abstract operation
// https://tc39.github.io/ecma262/#sec-tointeger
module.exports = function (argument) {
return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument);
};
/***/ }),
/***/ "pv2x":
/*!**********************************************************!*\
!*** ./node_modules/core-js/modules/es.reflect.apply.js ***!
\**********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "0GbY");
var aFunction = __webpack_require__(/*! ../internals/a-function */ "HAuM");
var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk");
var fails = __webpack_require__(/*! ../internals/fails */ "0Dky");
var nativeApply = getBuiltIn('Reflect', 'apply');
var functionApply = Function.apply;
// MS Edge argumentsList argument is optional
var OPTIONAL_ARGUMENTS_LIST = !fails(function () {
nativeApply(function () { /* empty */ });
});
// `Reflect.apply` method
// https://tc39.github.io/ecma262/#sec-reflect.apply
$({ target: 'Reflect', stat: true, forced: OPTIONAL_ARGUMENTS_LIST }, {
apply: function apply(target, thisArgument, argumentsList) {
aFunction(target);
anObject(argumentsList);
return nativeApply
? nativeApply(target, thisArgument, argumentsList)
: functionApply.call(target, thisArgument, argumentsList);
}
});
/***/ }),
/***/ "pz+c":
/*!************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/iterators.js ***!
\************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = {};
/***/ }),
/***/ "qaQR":
/*!********************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/es/number/index.js ***!
\********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__(/*! ../../modules/es.number.constructor */ "D+RQ");
__webpack_require__(/*! ../../modules/es.number.epsilon */ "ZBUp");
__webpack_require__(/*! ../../modules/es.number.is-finite */ "s5r0");
__webpack_require__(/*! ../../modules/es.number.is-integer */ "COcp");
__webpack_require__(/*! ../../modules/es.number.is-nan */ "+IJR");
__webpack_require__(/*! ../../modules/es.number.is-safe-integer */ "kpca");
__webpack_require__(/*! ../../modules/es.number.max-safe-integer */ "yI8t");
__webpack_require__(/*! ../../modules/es.number.min-safe-integer */ "ow8b");
__webpack_require__(/*! ../../modules/es.number.parse-float */ "5eAq");
__webpack_require__(/*! ../../modules/es.number.parse-int */ "5zDw");
__webpack_require__(/*! ../../modules/es.number.to-fixed */ "8xKV");
__webpack_require__(/*! ../../modules/es.number.to-precision */ "ane6");
var path = __webpack_require__(/*! ../../internals/path */ "E7aN");
module.exports = path.Number;
/***/ }),
/***/ "qc/G":
/*!*********************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/date-to-iso-string.js ***!
\*********************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var fails = __webpack_require__(/*! ../internals/fails */ "rG8t");
var padStart = __webpack_require__(/*! ../internals/string-pad */ "QcXc").start;
var abs = Math.abs;
var DatePrototype = Date.prototype;
var getTime = DatePrototype.getTime;
var nativeDateToISOString = DatePrototype.toISOString;
// `Date.prototype.toISOString` method implementation
// https://tc39.github.io/ecma262/#sec-date.prototype.toisostring
// PhantomJS / old WebKit fails here:
module.exports = (fails(function () {
return nativeDateToISOString.call(new Date(-5e13 - 1)) != '0385-07-25T07:06:39.999Z';
}) || !fails(function () {
nativeDateToISOString.call(new Date(NaN));
})) ? function toISOString() {
if (!isFinite(getTime.call(this))) throw RangeError('Invalid time value');
var date = this;
var year = date.getUTCFullYear();
var milliseconds = date.getUTCMilliseconds();
var sign = year < 0 ? '-' : year > 9999 ? '+' : '';
return sign + padStart(abs(year), sign ? 6 : 4, 0) +
'-' + padStart(date.getUTCMonth() + 1, 2, 0) +
'-' + padStart(date.getUTCDate(), 2, 0) +
'T' + padStart(date.getUTCHours(), 2, 0) +
':' + padStart(date.getUTCMinutes(), 2, 0) +
':' + padStart(date.getUTCSeconds(), 2, 0) +
'.' + padStart(milliseconds, 3, 0) +
'Z';
} : nativeDateToISOString;
/***/ }),
/***/ "qjkP":
/*!**************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/regexp-exec.js ***!
\**************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var regexpFlags = __webpack_require__(/*! ./regexp-flags */ "x0kV");
var stickyHelpers = __webpack_require__(/*! ./regexp-sticky-helpers */ "JkSk");
var nativeExec = RegExp.prototype.exec;
// This always refers to the native implementation, because the
// String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js,
// which loads this file before patching the method.
var nativeReplace = String.prototype.replace;
var patchedExec = nativeExec;
var UPDATES_LAST_INDEX_WRONG = (function () {
var re1 = /a/;
var re2 = /b*/g;
nativeExec.call(re1, 'a');
nativeExec.call(re2, 'a');
return re1.lastIndex !== 0 || re2.lastIndex !== 0;
})();
var UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y || stickyHelpers.BROKEN_CARET;
// nonparticipating capturing group, copied from es5-shim's String#split patch.
var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y;
if (PATCH) {
patchedExec = function exec(str) {
var re = this;
var lastIndex, reCopy, match, i;
var sticky = UNSUPPORTED_Y && re.sticky;
var flags = regexpFlags.call(re);
var source = re.source;
var charsAdded = 0;
var strCopy = str;
if (sticky) {
flags = flags.replace('y', '');
if (flags.indexOf('g') === -1) {
flags += 'g';
}
strCopy = String(str).slice(re.lastIndex);
// Support anchored sticky behavior.
if (re.lastIndex > 0 && (!re.multiline || re.multiline && str[re.lastIndex - 1] !== '\n')) {
source = '(?: ' + source + ')';
strCopy = ' ' + strCopy;
charsAdded++;
}
// ^(? + rx + ) is needed, in combination with some str slicing, to
// simulate the 'y' flag.
reCopy = new RegExp('^(?:' + source + ')', flags);
}
if (NPCG_INCLUDED) {
reCopy = new RegExp('^' + source + '$(?!\\s)', flags);
}
if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
match = nativeExec.call(sticky ? reCopy : re, strCopy);
if (sticky) {
if (match) {
match.input = match.input.slice(charsAdded);
match[0] = match[0].slice(charsAdded);
match.index = re.lastIndex;
re.lastIndex += match[0].length;
} else re.lastIndex = 0;
} else if (UPDATES_LAST_INDEX_WRONG && match) {
re.lastIndex = re.global ? match.index + match[0].length : lastIndex;
}
if (NPCG_INCLUDED && match && match.length > 1) {
// Fix browsers whose `exec` methods don't consistently return `undefined`
// for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/
nativeReplace.call(match[0], reCopy, function () {
for (i = 1; i < arguments.length - 2; i++) {
if (arguments[i] === undefined) match[i] = undefined;
}
});
}
return match;
};
}
module.exports = patchedExec;
/***/ }),
/***/ "qpIG":
/*!****************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.string.small.js ***!
\****************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var createHTML = __webpack_require__(/*! ../internals/create-html */ "uoca");
var forcedStringHTMLMethod = __webpack_require__(/*! ../internals/string-html-forced */ "d8Sw");
// `String.prototype.small` method
// https://tc39.github.io/ecma262/#sec-string.prototype.small
$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('small') }, {
small: function small() {
return createHTML(this, 'small', '', '');
}
});
/***/ }),
/***/ "qx7X":
/*!**************************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/document-create-element.js ***!
\**************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__(/*! ../internals/global */ "ocAm");
var isObject = __webpack_require__(/*! ../internals/is-object */ "6XUM");
var document = global.document;
// typeof document.createElement is 'object' in old IE
var EXISTS = isObject(document) && isObject(document.createElement);
module.exports = function (it) {
return EXISTS ? document.createElement(it) : {};
};
/***/ }),
/***/ "r8F+":
/*!**************************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.string.from-code-point.js ***!
\**************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var toAbsoluteIndex = __webpack_require__(/*! ../internals/to-absolute-index */ "7Oj1");
var fromCharCode = String.fromCharCode;
var nativeFromCodePoint = String.fromCodePoint;
// length should be 1, old FF problem
var INCORRECT_LENGTH = !!nativeFromCodePoint && nativeFromCodePoint.length != 1;
// `String.fromCodePoint` method
// https://tc39.github.io/ecma262/#sec-string.fromcodepoint
$({ target: 'String', stat: true, forced: INCORRECT_LENGTH }, {
fromCodePoint: function fromCodePoint(x) { // eslint-disable-line no-unused-vars
var elements = [];
var length = arguments.length;
var i = 0;
var code;
while (length > i) {
code = +arguments[i++];
if (toAbsoluteIndex(code, 0x10FFFF) !== code) throw RangeError(code + ' is not a valid code point');
elements.push(code < 0x10000
? fromCharCode(code)
: fromCharCode(((code -= 0x10000) >> 10) + 0xD800, code % 0x400 + 0xDC00)
);
} return elements.join('');
}
});
/***/ }),
/***/ "rBZX":
/*!********************************************************************!*\
!*** ./node_modules/core-js/modules/es.reflect.delete-property.js ***!
\********************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk");
var getOwnPropertyDescriptor = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ "Bs8V").f;
// `Reflect.deleteProperty` method
// https://tc39.github.io/ecma262/#sec-reflect.deleteproperty
$({ target: 'Reflect', stat: true }, {
deleteProperty: function deleteProperty(target, propertyKey) {
var descriptor = getOwnPropertyDescriptor(anObject(target), propertyKey);
return descriptor && !descriptor.configurable ? false : delete target[propertyKey];
}
});
/***/ }),
/***/ "rCRE":
/*!**********************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/array-last-index-of.js ***!
\**********************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ "EMtK");
var toInteger = __webpack_require__(/*! ../internals/to-integer */ "vDBE");
var toLength = __webpack_require__(/*! ../internals/to-length */ "xpLY");
var arrayMethodIsStrict = __webpack_require__(/*! ../internals/array-method-is-strict */ "6CJb");
var arrayMethodUsesToLength = __webpack_require__(/*! ../internals/array-method-uses-to-length */ "w2hq");
var min = Math.min;
var nativeLastIndexOf = [].lastIndexOf;
var NEGATIVE_ZERO = !!nativeLastIndexOf && 1 / [1].lastIndexOf(1, -0) < 0;
var STRICT_METHOD = arrayMethodIsStrict('lastIndexOf');
// For preventing possible almost infinite loop in non-standard implementations, test the forward version of the method
var USES_TO_LENGTH = arrayMethodUsesToLength('indexOf', { ACCESSORS: true, 1: 0 });
var FORCED = NEGATIVE_ZERO || !STRICT_METHOD || !USES_TO_LENGTH;
// `Array.prototype.lastIndexOf` method implementation
// https://tc39.github.io/ecma262/#sec-array.prototype.lastindexof
module.exports = FORCED ? function lastIndexOf(searchElement /* , fromIndex = @[*-1] */) {
// convert -0 to +0
if (NEGATIVE_ZERO) return nativeLastIndexOf.apply(this, arguments) || 0;
var O = toIndexedObject(this);
var length = toLength(O.length);
var index = length - 1;
if (arguments.length > 1) index = min(index, toInteger(arguments[1]));
if (index < 0) index = length + index;
for (;index >= 0; index--) if (index in O && O[index] === searchElement) return index || 0;
return -1;
} : nativeLastIndexOf;
/***/ }),
/***/ "rG8t":
/*!********************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/fails.js ***!
\********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = function (exec) {
try {
return !!exec();
} catch (error) {
return true;
}
};
/***/ }),
/***/ "rH3X":
/*!******************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.array.iterator.js ***!
\******************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ "EMtK");
var addToUnscopables = __webpack_require__(/*! ../internals/add-to-unscopables */ "A1Hp");
var Iterators = __webpack_require__(/*! ../internals/iterators */ "pz+c");
var InternalStateModule = __webpack_require__(/*! ../internals/internal-state */ "XH/I");
var defineIterator = __webpack_require__(/*! ../internals/define-iterator */ "WijE");
var ARRAY_ITERATOR = 'Array Iterator';
var setInternalState = InternalStateModule.set;
var getInternalState = InternalStateModule.getterFor(ARRAY_ITERATOR);
// `Array.prototype.entries` method
// https://tc39.github.io/ecma262/#sec-array.prototype.entries
// `Array.prototype.keys` method
// https://tc39.github.io/ecma262/#sec-array.prototype.keys
// `Array.prototype.values` method
// https://tc39.github.io/ecma262/#sec-array.prototype.values
// `Array.prototype[@@iterator]` method
// https://tc39.github.io/ecma262/#sec-array.prototype-@@iterator
// `CreateArrayIterator` internal method
// https://tc39.github.io/ecma262/#sec-createarrayiterator
module.exports = defineIterator(Array, 'Array', function (iterated, kind) {
setInternalState(this, {
type: ARRAY_ITERATOR,
target: toIndexedObject(iterated), // target
index: 0, // next index
kind: kind // kind
});
// `%ArrayIteratorPrototype%.next` method
// https://tc39.github.io/ecma262/#sec-%arrayiteratorprototype%.next
}, function () {
var state = getInternalState(this);
var target = state.target;
var kind = state.kind;
var index = state.index++;
if (!target || index >= target.length) {
state.target = undefined;
return { value: undefined, done: true };
}
if (kind == 'keys') return { value: index, done: false };
if (kind == 'values') return { value: target[index], done: false };
return { value: [index, target[index]], done: false };
}, 'values');
// argumentsList[@@iterator] is %ArrayProto_values%
// https://tc39.github.io/ecma262/#sec-createunmappedargumentsobject
// https://tc39.github.io/ecma262/#sec-createmappedargumentsobject
Iterators.Arguments = Iterators.Array;
// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
addToUnscopables('keys');
addToUnscopables('values');
addToUnscopables('entries');
/***/ }),
/***/ "riHj":
/*!*****************************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/web.dom-collections.iterator.js ***!
\*****************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__(/*! ../internals/global */ "ocAm");
var DOMIterables = __webpack_require__(/*! ../internals/dom-iterables */ "OjQg");
var ArrayIteratorMethods = __webpack_require__(/*! ../modules/es.array.iterator */ "rH3X");
var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ "aJMj");
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "m41k");
var ITERATOR = wellKnownSymbol('iterator');
var TO_STRING_TAG = wellKnownSymbol('toStringTag');
var ArrayValues = ArrayIteratorMethods.values;
for (var COLLECTION_NAME in DOMIterables) {
var Collection = global[COLLECTION_NAME];
var CollectionPrototype = Collection && Collection.prototype;
if (CollectionPrototype) {
// some Chrome versions have non-configurable methods on DOMTokenList
if (CollectionPrototype[ITERATOR] !== ArrayValues) try {
createNonEnumerableProperty(CollectionPrototype, ITERATOR, ArrayValues);
} catch (error) {
CollectionPrototype[ITERATOR] = ArrayValues;
}
if (!CollectionPrototype[TO_STRING_TAG]) {
createNonEnumerableProperty(CollectionPrototype, TO_STRING_TAG, COLLECTION_NAME);
}
if (DOMIterables[COLLECTION_NAME]) for (var METHOD_NAME in ArrayIteratorMethods) {
// some Chrome versions have non-configurable methods on DOMTokenList
if (CollectionPrototype[METHOD_NAME] !== ArrayIteratorMethods[METHOD_NAME]) try {
createNonEnumerableProperty(CollectionPrototype, METHOD_NAME, ArrayIteratorMethods[METHOD_NAME]);
} catch (error) {
CollectionPrototype[METHOD_NAME] = ArrayIteratorMethods[METHOD_NAME];
}
}
}
}
/***/ }),
/***/ "rwGd":
/*!*********************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/string-trim-forced.js ***!
\*********************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var fails = __webpack_require__(/*! ../internals/fails */ "rG8t");
var whitespaces = __webpack_require__(/*! ../internals/whitespaces */ "xFZC");
var non = '\u200B\u0085\u180E';
// check that a method works with the correct list
// of whitespaces and has a correct name
module.exports = function (METHOD_NAME) {
return fails(function () {
return !!whitespaces[METHOD_NAME]() || non[METHOD_NAME]() != non || whitespaces[METHOD_NAME].name !== METHOD_NAME;
});
};
/***/ }),
/***/ "s1IR":
/*!***************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.string.trim.js ***!
\***************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var $trim = __webpack_require__(/*! ../internals/string-trim */ "jnLS").trim;
var forcedStringTrimMethod = __webpack_require__(/*! ../internals/string-trim-forced */ "rwGd");
// `String.prototype.trim` method
// https://tc39.github.io/ecma262/#sec-string.prototype.trim
$({ target: 'String', proto: true, forced: forcedStringTrimMethod('trim') }, {
trim: function trim() {
return $trim(this);
}
});
/***/ }),
/***/ "s5r0":
/*!********************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.number.is-finite.js ***!
\********************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var numberIsFinite = __webpack_require__(/*! ../internals/number-is-finite */ "Yg8j");
// `Number.isFinite` method
// https://tc39.github.io/ecma262/#sec-number.isfinite
$({ target: 'Number', stat: true }, { isFinite: numberIsFinite });
/***/ }),
/***/ "s8qp":
/*!***************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/not-a-regexp.js ***!
\***************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var isRegExp = __webpack_require__(/*! ../internals/is-regexp */ "1p6F");
module.exports = function (it) {
if (isRegExp(it)) {
throw TypeError("The method doesn't accept regular expressions");
} return it;
};
/***/ }),
/***/ "sQrk":
/*!****************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.array.splice.js ***!
\****************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var toAbsoluteIndex = __webpack_require__(/*! ../internals/to-absolute-index */ "7Oj1");
var toInteger = __webpack_require__(/*! ../internals/to-integer */ "vDBE");
var toLength = __webpack_require__(/*! ../internals/to-length */ "xpLY");
var toObject = __webpack_require__(/*! ../internals/to-object */ "VCQ8");
var arraySpeciesCreate = __webpack_require__(/*! ../internals/array-species-create */ "JafA");
var createProperty = __webpack_require__(/*! ../internals/create-property */ "DYg9");
var arrayMethodHasSpeciesSupport = __webpack_require__(/*! ../internals/array-method-has-species-support */ "lRyB");
var arrayMethodUsesToLength = __webpack_require__(/*! ../internals/array-method-uses-to-length */ "w2hq");
var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('splice');
var USES_TO_LENGTH = arrayMethodUsesToLength('splice', { ACCESSORS: true, 0: 0, 1: 2 });
var max = Math.max;
var min = Math.min;
var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;
var MAXIMUM_ALLOWED_LENGTH_EXCEEDED = 'Maximum allowed length exceeded';
// `Array.prototype.splice` method
// https://tc39.github.io/ecma262/#sec-array.prototype.splice
// with adding support of @@species
$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT || !USES_TO_LENGTH }, {
splice: function splice(start, deleteCount /* , ...items */) {
var O = toObject(this);
var len = toLength(O.length);
var actualStart = toAbsoluteIndex(start, len);
var argumentsLength = arguments.length;
var insertCount, actualDeleteCount, A, k, from, to;
if (argumentsLength === 0) {
insertCount = actualDeleteCount = 0;
} else if (argumentsLength === 1) {
insertCount = 0;
actualDeleteCount = len - actualStart;
} else {
insertCount = argumentsLength - 2;
actualDeleteCount = min(max(toInteger(deleteCount), 0), len - actualStart);
}
if (len + insertCount - actualDeleteCount > MAX_SAFE_INTEGER) {
throw TypeError(MAXIMUM_ALLOWED_LENGTH_EXCEEDED);
}
A = arraySpeciesCreate(O, actualDeleteCount);
for (k = 0; k < actualDeleteCount; k++) {
from = actualStart + k;
if (from in O) createProperty(A, k, O[from]);
}
A.length = actualDeleteCount;
if (insertCount < actualDeleteCount) {
for (k = actualStart; k < len - actualDeleteCount; k++) {
from = k + actualDeleteCount;
to = k + insertCount;
if (from in O) O[to] = O[from];
else delete O[to];
}
for (k = len; k > len - actualDeleteCount + insertCount; k--) delete O[k - 1];
} else if (insertCount > actualDeleteCount) {
for (k = len - actualDeleteCount; k > actualStart; k--) {
from = k + actualDeleteCount - 1;
to = k + insertCount - 1;
if (from in O) O[to] = O[from];
else delete O[to];
}
}
for (k = 0; k < insertCount; k++) {
O[k + actualStart] = arguments[k + 2];
}
O.length = len - actualDeleteCount + insertCount;
return A;
}
});
/***/ }),
/***/ "shqn":
/*!********************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/set-to-string-tag.js ***!
\********************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var defineProperty = __webpack_require__(/*! ../internals/object-define-property */ "/Ybd").f;
var has = __webpack_require__(/*! ../internals/has */ "OG5q");
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "m41k");
var TO_STRING_TAG = wellKnownSymbol('toStringTag');
module.exports = function (it, TAG, STATIC) {
if (it && !has(it = STATIC ? it : it.prototype, TO_STRING_TAG)) {
defineProperty(it, TO_STRING_TAG, { configurable: true, value: TAG });
}
};
/***/ }),
/***/ "tNyX":
/*!************************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.string.code-point-at.js ***!
\************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var codeAt = __webpack_require__(/*! ../internals/string-multibyte */ "G7bs").codeAt;
// `String.prototype.codePointAt` method
// https://tc39.github.io/ecma262/#sec-string.prototype.codepointat
$({ target: 'String', proto: true }, {
codePointAt: function codePointAt(pos) {
return codeAt(this, pos);
}
});
/***/ }),
/***/ "tUdv":
/*!*****************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/indexed-object.js ***!
\*****************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var fails = __webpack_require__(/*! ../internals/fails */ "rG8t");
var classof = __webpack_require__(/*! ../internals/classof-raw */ "ezU2");
var split = ''.split;
// fallback for non-array-like ES3 and non-enumerable old V8 strings
module.exports = fails(function () {
// throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
// eslint-disable-next-line no-prototype-builtins
return !Object('z').propertyIsEnumerable(0);
}) ? function (it) {
return classof(it) == 'String' ? split.call(it, '') : Object(it);
} : Object;
/***/ }),
/***/ "tXU5":
/*!******************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/es/math/index.js ***!
\******************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__(/*! ../../modules/es.math.acosh */ "IXlp");
__webpack_require__(/*! ../../modules/es.math.asinh */ "3caY");
__webpack_require__(/*! ../../modules/es.math.atanh */ "8iOR");
__webpack_require__(/*! ../../modules/es.math.cbrt */ "D94X");
__webpack_require__(/*! ../../modules/es.math.clz32 */ "M1AK");
__webpack_require__(/*! ../../modules/es.math.cosh */ "S58s");
__webpack_require__(/*! ../../modules/es.math.expm1 */ "JhPs");
__webpack_require__(/*! ../../modules/es.math.fround */ "Pf6x");
__webpack_require__(/*! ../../modules/es.math.hypot */ "CwIO");
__webpack_require__(/*! ../../modules/es.math.imul */ "QFgE");
__webpack_require__(/*! ../../modules/es.math.log10 */ "WEpO");
__webpack_require__(/*! ../../modules/es.math.log1p */ "Djps");
__webpack_require__(/*! ../../modules/es.math.log2 */ "6oxo");
__webpack_require__(/*! ../../modules/es.math.sign */ "BnCb");
__webpack_require__(/*! ../../modules/es.math.sinh */ "n1Kw");
__webpack_require__(/*! ../../modules/es.math.tanh */ "aTTg");
__webpack_require__(/*! ../../modules/es.math.to-string-tag */ "OVXS");
__webpack_require__(/*! ../../modules/es.math.trunc */ "SdaC");
var path = __webpack_require__(/*! ../../internals/path */ "E7aN");
module.exports = path.Math;
/***/ }),
/***/ "tcQx":
/*!************************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/function-bind-context.js ***!
\************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var aFunction = __webpack_require__(/*! ../internals/a-function */ "Neub");
// optional / simple context binding
module.exports = function (fn, that, length) {
aFunction(fn);
if (that === undefined) return fn;
switch (length) {
case 0: return function () {
return fn.call(that);
};
case 1: return function (a) {
return fn.call(that, a);
};
case 2: return function (a, b) {
return fn.call(that, a, b);
};
case 3: return function (a, b, c) {
return fn.call(that, a, b, c);
};
}
return function (/* ...args */) {
return fn.apply(that, arguments);
};
};
/***/ }),
/***/ "tiKp":
/*!*************************************************************!*\
!*** ./node_modules/core-js/internals/well-known-symbol.js ***!
\*************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__(/*! ../internals/global */ "2oRo");
var shared = __webpack_require__(/*! ../internals/shared */ "VpIT");
var has = __webpack_require__(/*! ../internals/has */ "UTVS");
var uid = __webpack_require__(/*! ../internals/uid */ "kOOl");
var NATIVE_SYMBOL = __webpack_require__(/*! ../internals/native-symbol */ "STAE");
var USE_SYMBOL_AS_UID = __webpack_require__(/*! ../internals/use-symbol-as-uid */ "/b8u");
var WellKnownSymbolsStore = shared('wks');
var Symbol = global.Symbol;
var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol : Symbol && Symbol.withoutSetter || uid;
module.exports = function (name) {
if (!has(WellKnownSymbolsStore, name)) {
if (NATIVE_SYMBOL && has(Symbol, name)) WellKnownSymbolsStore[name] = Symbol[name];
else WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name);
} return WellKnownSymbolsStore[name];
};
/***/ }),
/***/ "tkWj":
/*!*******************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.string.iterator.js ***!
\*******************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var charAt = __webpack_require__(/*! ../internals/string-multibyte */ "G7bs").charAt;
var InternalStateModule = __webpack_require__(/*! ../internals/internal-state */ "XH/I");
var defineIterator = __webpack_require__(/*! ../internals/define-iterator */ "WijE");
var STRING_ITERATOR = 'String Iterator';
var setInternalState = InternalStateModule.set;
var getInternalState = InternalStateModule.getterFor(STRING_ITERATOR);
// `String.prototype[@@iterator]` method
// https://tc39.github.io/ecma262/#sec-string.prototype-@@iterator
defineIterator(String, 'String', function (iterated) {
setInternalState(this, {
type: STRING_ITERATOR,
string: String(iterated),
index: 0
});
// `%StringIteratorPrototype%.next` method
// https://tc39.github.io/ecma262/#sec-%stringiteratorprototype%.next
}, function next() {
var state = getInternalState(this);
var string = state.string;
var index = state.index;
var point;
if (index >= string.length) return { value: undefined, done: true };
point = charAt(string, index);
state.index += point.length;
return { value: point, done: false };
});
/***/ }),
/***/ "tuHh":
/*!****************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/engine-is-ios.js ***!
\****************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var userAgent = __webpack_require__(/*! ../internals/engine-user-agent */ "T/Kj");
module.exports = /(iphone|ipod|ipad).*applewebkit/i.test(userAgent);
/***/ }),
/***/ "u5Nv":
/*!*************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.object.is.js ***!
\*************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var is = __webpack_require__(/*! ../internals/same-value */ "EQZg");
// `Object.is` method
// https://tc39.github.io/ecma262/#sec-object.is
$({ target: 'Object', stat: true }, {
is: is
});
/***/ }),
/***/ "u7HS":
/*!***************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.reflect.get.js ***!
\***************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var isObject = __webpack_require__(/*! ../internals/is-object */ "6XUM");
var anObject = __webpack_require__(/*! ../internals/an-object */ "F26l");
var has = __webpack_require__(/*! ../internals/has */ "OG5q");
var getOwnPropertyDescriptorModule = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ "7gGY");
var getPrototypeOf = __webpack_require__(/*! ../internals/object-get-prototype-of */ "wIVT");
// `Reflect.get` method
// https://tc39.github.io/ecma262/#sec-reflect.get
function get(target, propertyKey /* , receiver */) {
var receiver = arguments.length < 3 ? target : arguments[2];
var descriptor, prototype;
if (anObject(target) === receiver) return target[propertyKey];
if (descriptor = getOwnPropertyDescriptorModule.f(target, propertyKey)) return has(descriptor, 'value')
? descriptor.value
: descriptor.get === undefined
? undefined
: descriptor.get.call(receiver);
if (isObject(prototype = getPrototypeOf(target))) return get(prototype, propertyKey, receiver);
}
$({ target: 'Reflect', stat: true }, {
get: get
});
/***/ }),
/***/ "uKyN":
/*!******************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.symbol.species.js ***!
\******************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var defineWellKnownSymbol = __webpack_require__(/*! ../internals/define-well-known-symbol */ "94Vg");
// `Symbol.species` well-known symbol
// https://tc39.github.io/ecma262/#sec-symbol.species
defineWellKnownSymbol('species');
/***/ }),
/***/ "uSMZ":
/*!*****************************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/create-property-descriptor.js ***!
\*****************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = function (bitmap, value) {
return {
enumerable: !(bitmap & 1),
configurable: !(bitmap & 2),
writable: !(bitmap & 4),
value: value
};
};
/***/ }),
/***/ "unYP":
/*!***********************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/regexp-exec-abstract.js ***!
\***********************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var classof = __webpack_require__(/*! ./classof-raw */ "ezU2");
var regexpExec = __webpack_require__(/*! ./regexp-exec */ "qjkP");
// `RegExpExec` abstract operation
// https://tc39.github.io/ecma262/#sec-regexpexec
module.exports = function (R, S) {
var exec = R.exec;
if (typeof exec === 'function') {
var result = exec.call(R, S);
if (typeof result !== 'object') {
throw TypeError('RegExp exec method returned something other than an Object or null');
}
return result;
}
if (classof(R) !== 'RegExp') {
throw TypeError('RegExp#exec called on incompatible receiver');
}
return regexpExec.call(R, S);
};
/***/ }),
/***/ "uoca":
/*!**************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/create-html.js ***!
\**************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ "hmpk");
var quot = /"/g;
// B.2.3.2.1 CreateHTML(string, tag, attribute, value)
// https://tc39.github.io/ecma262/#sec-createhtml
module.exports = function (string, tag, attribute, value) {
var S = String(requireObjectCoercible(string));
var p1 = '<' + tag;
if (attribute !== '') p1 += ' ' + attribute + '="' + String(value).replace(quot, '"') + '"';
return p1 + '>' + S + '</' + tag + '>';
};
/***/ }),
/***/ "uy83":
/*!****************************************************!*\
!*** ./node_modules/core-js/internals/freezing.js ***!
\****************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var fails = __webpack_require__(/*! ../internals/fails */ "0Dky");
module.exports = !fails(function () {
return Object.isExtensible(Object.preventExtensions({}));
});
/***/ }),
/***/ "v5if":
/*!******************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.array.for-each.js ***!
\******************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var forEach = __webpack_require__(/*! ../internals/array-for-each */ "nP0K");
// `Array.prototype.forEach` method
// https://tc39.github.io/ecma262/#sec-array.prototype.foreach
$({ target: 'Array', proto: true, forced: [].forEach != forEach }, {
forEach: forEach
});
/***/ }),
/***/ "vDBE":
/*!*************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/to-integer.js ***!
\*************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
var ceil = Math.ceil;
var floor = Math.floor;
// `ToInteger` abstract operation
// https://tc39.github.io/ecma262/#sec-tointeger
module.exports = function (argument) {
return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument);
};
/***/ }),
/***/ "vRoz":
/*!*******************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.map.js ***!
\*******************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var collection = __webpack_require__(/*! ../internals/collection */ "wdMf");
var collectionStrong = __webpack_require__(/*! ../internals/collection-strong */ "nIH4");
// `Map` constructor
// https://tc39.github.io/ecma262/#sec-map-objects
module.exports = collection('Map', function (init) {
return function Map() { return init(this, arguments.length ? arguments[0] : undefined); };
}, collectionStrong);
/***/ }),
/***/ "vVmn":
/*!***********************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/object-keys-internal.js ***!
\***********************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var has = __webpack_require__(/*! ../internals/has */ "OG5q");
var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ "EMtK");
var indexOf = __webpack_require__(/*! ../internals/array-includes */ "OXtp").indexOf;
var hiddenKeys = __webpack_require__(/*! ../internals/hidden-keys */ "yQMY");
module.exports = function (object, names) {
var O = toIndexedObject(object);
var i = 0;
var result = [];
var key;
for (key in O) !has(hiddenKeys, key) && has(O, key) && result.push(key);
// Don't enum bug & hidden keys
while (names.length > i) if (has(O, key = names[i++])) {
~indexOf(result, key) || result.push(key);
}
return result;
};
/***/ }),
/***/ "vZCr":
/*!*********************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/number-parse-float.js ***!
\*********************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__(/*! ../internals/global */ "ocAm");
var trim = __webpack_require__(/*! ../internals/string-trim */ "jnLS").trim;
var whitespaces = __webpack_require__(/*! ../internals/whitespaces */ "xFZC");
var $parseFloat = global.parseFloat;
var FORCED = 1 / $parseFloat(whitespaces + '-0') !== -Infinity;
// `parseFloat` method
// https://tc39.github.io/ecma262/#sec-parsefloat-string
module.exports = FORCED ? function parseFloat(string) {
var trimmedString = trim(String(string));
var result = $parseFloat(trimmedString);
return result === 0 && trimmedString.charAt(0) == '-' ? -0 : result;
} : $parseFloat;
/***/ }),
/***/ "vipS":
/*!********************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.string.ends-with.js ***!
\********************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var getOwnPropertyDescriptor = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ "7gGY").f;
var toLength = __webpack_require__(/*! ../internals/to-length */ "xpLY");
var notARegExp = __webpack_require__(/*! ../internals/not-a-regexp */ "s8qp");
var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ "hmpk");
var correctIsRegExpLogic = __webpack_require__(/*! ../internals/correct-is-regexp-logic */ "0Ds2");
var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "g9hI");
var nativeEndsWith = ''.endsWith;
var min = Math.min;
var CORRECT_IS_REGEXP_LOGIC = correctIsRegExpLogic('endsWith');
// https://github.com/zloirock/core-js/pull/702
var MDN_POLYFILL_BUG = !IS_PURE && !CORRECT_IS_REGEXP_LOGIC && !!function () {
var descriptor = getOwnPropertyDescriptor(String.prototype, 'endsWith');
return descriptor && !descriptor.writable;
}();
// `String.prototype.endsWith` method
// https://tc39.github.io/ecma262/#sec-string.prototype.endswith
$({ target: 'String', proto: true, forced: !MDN_POLYFILL_BUG && !CORRECT_IS_REGEXP_LOGIC }, {
endsWith: function endsWith(searchString /* , endPosition = @length */) {
var that = String(requireObjectCoercible(this));
notARegExp(searchString);
var endPosition = arguments.length > 1 ? arguments[1] : undefined;
var len = toLength(that.length);
var end = endPosition === undefined ? len : min(toLength(endPosition), len);
var search = String(searchString);
return nativeEndsWith
? nativeEndsWith.call(that, search, end)
: that.slice(end - search.length, end) === search;
}
});
/***/ }),
/***/ "voQr":
/*!*********************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/src/webpack/es5-polyfills.js ***!
\*********************************************************************************/
/*! no exports provided */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var core_js_es_symbol__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/es/symbol */ "LRWt");
/* harmony import */ var core_js_es_symbol__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_es_symbol__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_es_function_bind__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.function.bind */ "mA9f");
/* harmony import */ var core_js_modules_es_function_bind__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_function_bind__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var core_js_modules_es_function_name__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.function.name */ "MjoC");
/* harmony import */ var core_js_modules_es_function_name__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_function_name__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var core_js_modules_es_function_has_instance__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.function.has-instance */ "3vMK");
/* harmony import */ var core_js_modules_es_function_has_instance__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_function_has_instance__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var core_js_modules_es_object_create__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.object.create */ "RCvO");
/* harmony import */ var core_js_modules_es_object_create__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_create__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var core_js_modules_es_object_define_property__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/es.object.define-property */ "cJLW");
/* harmony import */ var core_js_modules_es_object_define_property__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_define_property__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var core_js_modules_es_object_define_properties__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! core-js/modules/es.object.define-properties */ "EntM");
/* harmony import */ var core_js_modules_es_object_define_properties__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_define_properties__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor */ "znfk");
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var core_js_modules_es_object_get_prototype_of__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! core-js/modules/es.object.get-prototype-of */ "A7hN");
/* harmony import */ var core_js_modules_es_object_get_prototype_of__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_prototype_of__WEBPACK_IMPORTED_MODULE_8__);
/* harmony import */ var core_js_modules_es_object_keys__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! core-js/modules/es.object.keys */ "wqfI");
/* harmony import */ var core_js_modules_es_object_keys__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_keys__WEBPACK_IMPORTED_MODULE_9__);
/* harmony import */ var core_js_modules_es_object_get_own_property_names__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! core-js/modules/es.object.get-own-property-names */ "g69M");
/* harmony import */ var core_js_modules_es_object_get_own_property_names__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_own_property_names__WEBPACK_IMPORTED_MODULE_10__);
/* harmony import */ var core_js_modules_es_object_freeze__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! core-js/modules/es.object.freeze */ "IzYO");
/* harmony import */ var core_js_modules_es_object_freeze__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_freeze__WEBPACK_IMPORTED_MODULE_11__);
/* harmony import */ var core_js_modules_es_object_seal__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! core-js/modules/es.object.seal */ "+5Eg");
/* harmony import */ var core_js_modules_es_object_seal__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_seal__WEBPACK_IMPORTED_MODULE_12__);
/* harmony import */ var core_js_modules_es_object_prevent_extensions__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! core-js/modules/es.object.prevent-extensions */ "WLa2");
/* harmony import */ var core_js_modules_es_object_prevent_extensions__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_prevent_extensions__WEBPACK_IMPORTED_MODULE_13__);
/* harmony import */ var core_js_modules_es_object_is_frozen__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! core-js/modules/es.object.is-frozen */ "KMug");
/* harmony import */ var core_js_modules_es_object_is_frozen__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_is_frozen__WEBPACK_IMPORTED_MODULE_14__);
/* harmony import */ var core_js_modules_es_object_is_sealed__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! core-js/modules/es.object.is-sealed */ "QVG+");
/* harmony import */ var core_js_modules_es_object_is_sealed__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_is_sealed__WEBPACK_IMPORTED_MODULE_15__);
/* harmony import */ var core_js_modules_es_object_is_extensible__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! core-js/modules/es.object.is-extensible */ "wVAr");
/* harmony import */ var core_js_modules_es_object_is_extensible__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_is_extensible__WEBPACK_IMPORTED_MODULE_16__);
/* harmony import */ var core_js_modules_es_object_assign__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! core-js/modules/es.object.assign */ "nuqZ");
/* harmony import */ var core_js_modules_es_object_assign__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_assign__WEBPACK_IMPORTED_MODULE_17__);
/* harmony import */ var core_js_modules_es_object_is__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! core-js/modules/es.object.is */ "u5Nv");
/* harmony import */ var core_js_modules_es_object_is__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_is__WEBPACK_IMPORTED_MODULE_18__);
/* harmony import */ var core_js_modules_es_object_set_prototype_of__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! core-js/modules/es.object.set-prototype-of */ "WnNu");
/* harmony import */ var core_js_modules_es_object_set_prototype_of__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_set_prototype_of__WEBPACK_IMPORTED_MODULE_19__);
/* harmony import */ var core_js_modules_es_object_to_string__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! core-js/modules/es.object.to-string */ "NX+v");
/* harmony import */ var core_js_modules_es_object_to_string__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string__WEBPACK_IMPORTED_MODULE_20__);
/* harmony import */ var core_js_modules_es_array_concat__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! core-js/modules/es.array.concat */ "F4rZ");
/* harmony import */ var core_js_modules_es_array_concat__WEBPACK_IMPORTED_MODULE_21___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_concat__WEBPACK_IMPORTED_MODULE_21__);
/* harmony import */ var core_js_modules_es_array_is_array__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! core-js/modules/es.array.is-array */ "wZP2");
/* harmony import */ var core_js_modules_es_array_is_array__WEBPACK_IMPORTED_MODULE_22___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_is_array__WEBPACK_IMPORTED_MODULE_22__);
/* harmony import */ var core_js_modules_es_array_from__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! core-js/modules/es.array.from */ "m2tE");
/* harmony import */ var core_js_modules_es_array_from__WEBPACK_IMPORTED_MODULE_23___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_from__WEBPACK_IMPORTED_MODULE_23__);
/* harmony import */ var core_js_modules_es_array_of__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! core-js/modules/es.array.of */ "BcWx");
/* harmony import */ var core_js_modules_es_array_of__WEBPACK_IMPORTED_MODULE_24___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_of__WEBPACK_IMPORTED_MODULE_24__);
/* harmony import */ var core_js_modules_es_array_join__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! core-js/modules/es.array.join */ "ntzx");
/* harmony import */ var core_js_modules_es_array_join__WEBPACK_IMPORTED_MODULE_25___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_join__WEBPACK_IMPORTED_MODULE_25__);
/* harmony import */ var core_js_modules_es_array_slice__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! core-js/modules/es.array.slice */ "6q6p");
/* harmony import */ var core_js_modules_es_array_slice__WEBPACK_IMPORTED_MODULE_26___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_slice__WEBPACK_IMPORTED_MODULE_26__);
/* harmony import */ var core_js_modules_es_array_splice__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! core-js/modules/es.array.splice */ "sQrk");
/* harmony import */ var core_js_modules_es_array_splice__WEBPACK_IMPORTED_MODULE_27___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_splice__WEBPACK_IMPORTED_MODULE_27__);
/* harmony import */ var core_js_modules_es_array_sort__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! core-js/modules/es.array.sort */ "6fhQ");
/* harmony import */ var core_js_modules_es_array_sort__WEBPACK_IMPORTED_MODULE_28___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_sort__WEBPACK_IMPORTED_MODULE_28__);
/* harmony import */ var core_js_modules_es_array_for_each__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! core-js/modules/es.array.for-each */ "v5if");
/* harmony import */ var core_js_modules_es_array_for_each__WEBPACK_IMPORTED_MODULE_29___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_for_each__WEBPACK_IMPORTED_MODULE_29__);
/* harmony import */ var core_js_modules_es_array_map__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! core-js/modules/es.array.map */ "FU1i");
/* harmony import */ var core_js_modules_es_array_map__WEBPACK_IMPORTED_MODULE_30___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_map__WEBPACK_IMPORTED_MODULE_30__);
/* harmony import */ var core_js_modules_es_array_filter__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! core-js/modules/es.array.filter */ "gke3");
/* harmony import */ var core_js_modules_es_array_filter__WEBPACK_IMPORTED_MODULE_31___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_filter__WEBPACK_IMPORTED_MODULE_31__);
/* harmony import */ var core_js_modules_es_array_some__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! core-js/modules/es.array.some */ "XEin");
/* harmony import */ var core_js_modules_es_array_some__WEBPACK_IMPORTED_MODULE_32___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_some__WEBPACK_IMPORTED_MODULE_32__);
/* harmony import */ var core_js_modules_es_array_every__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! core-js/modules/es.array.every */ "FeI/");
/* harmony import */ var core_js_modules_es_array_every__WEBPACK_IMPORTED_MODULE_33___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_every__WEBPACK_IMPORTED_MODULE_33__);
/* harmony import */ var core_js_modules_es_array_reduce__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! core-js/modules/es.array.reduce */ "Q4jj");
/* harmony import */ var core_js_modules_es_array_reduce__WEBPACK_IMPORTED_MODULE_34___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_reduce__WEBPACK_IMPORTED_MODULE_34__);
/* harmony import */ var core_js_modules_es_array_reduce_right__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! core-js/modules/es.array.reduce-right */ "IQbc");
/* harmony import */ var core_js_modules_es_array_reduce_right__WEBPACK_IMPORTED_MODULE_35___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_reduce_right__WEBPACK_IMPORTED_MODULE_35__);
/* harmony import */ var core_js_modules_es_array_index_of__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! core-js/modules/es.array.index-of */ "6lQQ");
/* harmony import */ var core_js_modules_es_array_index_of__WEBPACK_IMPORTED_MODULE_36___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_index_of__WEBPACK_IMPORTED_MODULE_36__);
/* harmony import */ var core_js_modules_es_array_last_index_of__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! core-js/modules/es.array.last-index-of */ "Xm88");
/* harmony import */ var core_js_modules_es_array_last_index_of__WEBPACK_IMPORTED_MODULE_37___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_last_index_of__WEBPACK_IMPORTED_MODULE_37__);
/* harmony import */ var core_js_modules_es_array_copy_within__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! core-js/modules/es.array.copy-within */ "kP9Y");
/* harmony import */ var core_js_modules_es_array_copy_within__WEBPACK_IMPORTED_MODULE_38___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_copy_within__WEBPACK_IMPORTED_MODULE_38__);
/* harmony import */ var core_js_modules_es_array_fill__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! core-js/modules/es.array.fill */ "DscF");
/* harmony import */ var core_js_modules_es_array_fill__WEBPACK_IMPORTED_MODULE_39___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_fill__WEBPACK_IMPORTED_MODULE_39__);
/* harmony import */ var core_js_modules_es_array_find__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! core-js/modules/es.array.find */ "6CEi");
/* harmony import */ var core_js_modules_es_array_find__WEBPACK_IMPORTED_MODULE_40___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_find__WEBPACK_IMPORTED_MODULE_40__);
/* harmony import */ var core_js_modules_es_array_find_index__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! core-js/modules/es.array.find-index */ "Jt/z");
/* harmony import */ var core_js_modules_es_array_find_index__WEBPACK_IMPORTED_MODULE_41___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_find_index__WEBPACK_IMPORTED_MODULE_41__);
/* harmony import */ var core_js_modules_es_array_iterator__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! core-js/modules/es.array.iterator */ "rH3X");
/* harmony import */ var core_js_modules_es_array_iterator__WEBPACK_IMPORTED_MODULE_42___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_iterator__WEBPACK_IMPORTED_MODULE_42__);
/* harmony import */ var core_js_modules_es_string_from_code_point__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! core-js/modules/es.string.from-code-point */ "r8F+");
/* harmony import */ var core_js_modules_es_string_from_code_point__WEBPACK_IMPORTED_MODULE_43___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_from_code_point__WEBPACK_IMPORTED_MODULE_43__);
/* harmony import */ var core_js_modules_es_string_raw__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! core-js/modules/es.string.raw */ "IPby");
/* harmony import */ var core_js_modules_es_string_raw__WEBPACK_IMPORTED_MODULE_44___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_raw__WEBPACK_IMPORTED_MODULE_44__);
/* harmony import */ var core_js_modules_es_string_trim__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! core-js/modules/es.string.trim */ "s1IR");
/* harmony import */ var core_js_modules_es_string_trim__WEBPACK_IMPORTED_MODULE_45___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_trim__WEBPACK_IMPORTED_MODULE_45__);
/* harmony import */ var core_js_modules_es_string_iterator__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(/*! core-js/modules/es.string.iterator */ "tkWj");
/* harmony import */ var core_js_modules_es_string_iterator__WEBPACK_IMPORTED_MODULE_46___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_iterator__WEBPACK_IMPORTED_MODULE_46__);
/* harmony import */ var core_js_modules_es_string_code_point_at__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(/*! core-js/modules/es.string.code-point-at */ "tNyX");
/* harmony import */ var core_js_modules_es_string_code_point_at__WEBPACK_IMPORTED_MODULE_47___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_code_point_at__WEBPACK_IMPORTED_MODULE_47__);
/* harmony import */ var core_js_modules_es_string_ends_with__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(/*! core-js/modules/es.string.ends-with */ "vipS");
/* harmony import */ var core_js_modules_es_string_ends_with__WEBPACK_IMPORTED_MODULE_48___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_ends_with__WEBPACK_IMPORTED_MODULE_48__);
/* harmony import */ var core_js_modules_es_string_includes__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(/*! core-js/modules/es.string.includes */ "L4l2");
/* harmony import */ var core_js_modules_es_string_includes__WEBPACK_IMPORTED_MODULE_49___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_includes__WEBPACK_IMPORTED_MODULE_49__);
/* harmony import */ var core_js_modules_es_string_repeat__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(/*! core-js/modules/es.string.repeat */ "BaTD");
/* harmony import */ var core_js_modules_es_string_repeat__WEBPACK_IMPORTED_MODULE_50___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_repeat__WEBPACK_IMPORTED_MODULE_50__);
/* harmony import */ var core_js_modules_es_string_starts_with__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(/*! core-js/modules/es.string.starts-with */ "oatR");
/* harmony import */ var core_js_modules_es_string_starts_with__WEBPACK_IMPORTED_MODULE_51___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_starts_with__WEBPACK_IMPORTED_MODULE_51__);
/* harmony import */ var core_js_modules_es_string_anchor__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(/*! core-js/modules/es.string.anchor */ "QUoj");
/* harmony import */ var core_js_modules_es_string_anchor__WEBPACK_IMPORTED_MODULE_52___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_anchor__WEBPACK_IMPORTED_MODULE_52__);
/* harmony import */ var core_js_modules_es_string_big__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(/*! core-js/modules/es.string.big */ "gXAK");
/* harmony import */ var core_js_modules_es_string_big__WEBPACK_IMPORTED_MODULE_53___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_big__WEBPACK_IMPORTED_MODULE_53__);
/* harmony import */ var core_js_modules_es_string_blink__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(/*! core-js/modules/es.string.blink */ "4axp");
/* harmony import */ var core_js_modules_es_string_blink__WEBPACK_IMPORTED_MODULE_54___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_blink__WEBPACK_IMPORTED_MODULE_54__);
/* harmony import */ var core_js_modules_es_string_bold__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(/*! core-js/modules/es.string.bold */ "Yu3F");
/* harmony import */ var core_js_modules_es_string_bold__WEBPACK_IMPORTED_MODULE_55___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_bold__WEBPACK_IMPORTED_MODULE_55__);
/* harmony import */ var core_js_modules_es_string_fixed__WEBPACK_IMPORTED_MODULE_56__ = __webpack_require__(/*! core-js/modules/es.string.fixed */ "J4zY");
/* harmony import */ var core_js_modules_es_string_fixed__WEBPACK_IMPORTED_MODULE_56___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_fixed__WEBPACK_IMPORTED_MODULE_56__);
/* harmony import */ var core_js_modules_es_string_fontcolor__WEBPACK_IMPORTED_MODULE_57__ = __webpack_require__(/*! core-js/modules/es.string.fontcolor */ "WKvG");
/* harmony import */ var core_js_modules_es_string_fontcolor__WEBPACK_IMPORTED_MODULE_57___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_fontcolor__WEBPACK_IMPORTED_MODULE_57__);
/* harmony import */ var core_js_modules_es_string_fontsize__WEBPACK_IMPORTED_MODULE_58__ = __webpack_require__(/*! core-js/modules/es.string.fontsize */ "W0ke");
/* harmony import */ var core_js_modules_es_string_fontsize__WEBPACK_IMPORTED_MODULE_58___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_fontsize__WEBPACK_IMPORTED_MODULE_58__);
/* harmony import */ var core_js_modules_es_string_italics__WEBPACK_IMPORTED_MODULE_59__ = __webpack_require__(/*! core-js/modules/es.string.italics */ "zTQA");
/* harmony import */ var core_js_modules_es_string_italics__WEBPACK_IMPORTED_MODULE_59___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_italics__WEBPACK_IMPORTED_MODULE_59__);
/* harmony import */ var core_js_modules_es_string_link__WEBPACK_IMPORTED_MODULE_60__ = __webpack_require__(/*! core-js/modules/es.string.link */ "WEX0");
/* harmony import */ var core_js_modules_es_string_link__WEBPACK_IMPORTED_MODULE_60___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_link__WEBPACK_IMPORTED_MODULE_60__);
/* harmony import */ var core_js_modules_es_string_small__WEBPACK_IMPORTED_MODULE_61__ = __webpack_require__(/*! core-js/modules/es.string.small */ "qpIG");
/* harmony import */ var core_js_modules_es_string_small__WEBPACK_IMPORTED_MODULE_61___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_small__WEBPACK_IMPORTED_MODULE_61__);
/* harmony import */ var core_js_modules_es_string_strike__WEBPACK_IMPORTED_MODULE_62__ = __webpack_require__(/*! core-js/modules/es.string.strike */ "VmbE");
/* harmony import */ var core_js_modules_es_string_strike__WEBPACK_IMPORTED_MODULE_62___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_strike__WEBPACK_IMPORTED_MODULE_62__);
/* harmony import */ var core_js_modules_es_string_sub__WEBPACK_IMPORTED_MODULE_63__ = __webpack_require__(/*! core-js/modules/es.string.sub */ "4Kt7");
/* harmony import */ var core_js_modules_es_string_sub__WEBPACK_IMPORTED_MODULE_63___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_sub__WEBPACK_IMPORTED_MODULE_63__);
/* harmony import */ var core_js_modules_es_string_sup__WEBPACK_IMPORTED_MODULE_64__ = __webpack_require__(/*! core-js/modules/es.string.sup */ "dI74");
/* harmony import */ var core_js_modules_es_string_sup__WEBPACK_IMPORTED_MODULE_64___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_sup__WEBPACK_IMPORTED_MODULE_64__);
/* harmony import */ var core_js_modules_es_string_match__WEBPACK_IMPORTED_MODULE_65__ = __webpack_require__(/*! core-js/modules/es.string.match */ "K1Z7");
/* harmony import */ var core_js_modules_es_string_match__WEBPACK_IMPORTED_MODULE_65___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_match__WEBPACK_IMPORTED_MODULE_65__);
/* harmony import */ var core_js_modules_es_string_replace__WEBPACK_IMPORTED_MODULE_66__ = __webpack_require__(/*! core-js/modules/es.string.replace */ "S3Yw");
/* harmony import */ var core_js_modules_es_string_replace__WEBPACK_IMPORTED_MODULE_66___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_replace__WEBPACK_IMPORTED_MODULE_66__);
/* harmony import */ var core_js_modules_es_string_search__WEBPACK_IMPORTED_MODULE_67__ = __webpack_require__(/*! core-js/modules/es.string.search */ "fMvl");
/* harmony import */ var core_js_modules_es_string_search__WEBPACK_IMPORTED_MODULE_67___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_search__WEBPACK_IMPORTED_MODULE_67__);
/* harmony import */ var core_js_modules_es_string_split__WEBPACK_IMPORTED_MODULE_68__ = __webpack_require__(/*! core-js/modules/es.string.split */ "PmIt");
/* harmony import */ var core_js_modules_es_string_split__WEBPACK_IMPORTED_MODULE_68___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_split__WEBPACK_IMPORTED_MODULE_68__);
/* harmony import */ var core_js_modules_es_parse_int__WEBPACK_IMPORTED_MODULE_69__ = __webpack_require__(/*! core-js/modules/es.parse-int */ "PbJR");
/* harmony import */ var core_js_modules_es_parse_int__WEBPACK_IMPORTED_MODULE_69___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_parse_int__WEBPACK_IMPORTED_MODULE_69__);
/* harmony import */ var core_js_modules_es_parse_float__WEBPACK_IMPORTED_MODULE_70__ = __webpack_require__(/*! core-js/modules/es.parse-float */ "Ay+M");
/* harmony import */ var core_js_modules_es_parse_float__WEBPACK_IMPORTED_MODULE_70___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_parse_float__WEBPACK_IMPORTED_MODULE_70__);
/* harmony import */ var core_js_es_number__WEBPACK_IMPORTED_MODULE_71__ = __webpack_require__(/*! core-js/es/number */ "qaQR");
/* harmony import */ var core_js_es_number__WEBPACK_IMPORTED_MODULE_71___default = /*#__PURE__*/__webpack_require__.n(core_js_es_number__WEBPACK_IMPORTED_MODULE_71__);
/* harmony import */ var core_js_es_math__WEBPACK_IMPORTED_MODULE_72__ = __webpack_require__(/*! core-js/es/math */ "tXU5");
/* harmony import */ var core_js_es_math__WEBPACK_IMPORTED_MODULE_72___default = /*#__PURE__*/__webpack_require__.n(core_js_es_math__WEBPACK_IMPORTED_MODULE_72__);
/* harmony import */ var core_js_es_date__WEBPACK_IMPORTED_MODULE_73__ = __webpack_require__(/*! core-js/es/date */ "lPAZ");
/* harmony import */ var core_js_es_date__WEBPACK_IMPORTED_MODULE_73___default = /*#__PURE__*/__webpack_require__.n(core_js_es_date__WEBPACK_IMPORTED_MODULE_73__);
/* harmony import */ var core_js_modules_es_regexp_constructor__WEBPACK_IMPORTED_MODULE_74__ = __webpack_require__(/*! core-js/modules/es.regexp.constructor */ "T4tC");
/* harmony import */ var core_js_modules_es_regexp_constructor__WEBPACK_IMPORTED_MODULE_74___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_constructor__WEBPACK_IMPORTED_MODULE_74__);
/* harmony import */ var core_js_modules_es_regexp_to_string__WEBPACK_IMPORTED_MODULE_75__ = __webpack_require__(/*! core-js/modules/es.regexp.to-string */ "Rj+b");
/* harmony import */ var core_js_modules_es_regexp_to_string__WEBPACK_IMPORTED_MODULE_75___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_to_string__WEBPACK_IMPORTED_MODULE_75__);
/* harmony import */ var core_js_modules_es_regexp_flags__WEBPACK_IMPORTED_MODULE_76__ = __webpack_require__(/*! core-js/modules/es.regexp.flags */ "pWza");
/* harmony import */ var core_js_modules_es_regexp_flags__WEBPACK_IMPORTED_MODULE_76___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_flags__WEBPACK_IMPORTED_MODULE_76__);
/* harmony import */ var core_js_modules_es_map__WEBPACK_IMPORTED_MODULE_77__ = __webpack_require__(/*! core-js/modules/es.map */ "vRoz");
/* harmony import */ var core_js_modules_es_map__WEBPACK_IMPORTED_MODULE_77___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_map__WEBPACK_IMPORTED_MODULE_77__);
/* harmony import */ var core_js_modules_es_weak_map__WEBPACK_IMPORTED_MODULE_78__ = __webpack_require__(/*! core-js/modules/es.weak-map */ "hdsk");
/* harmony import */ var core_js_modules_es_weak_map__WEBPACK_IMPORTED_MODULE_78___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_weak_map__WEBPACK_IMPORTED_MODULE_78__);
/* harmony import */ var core_js_modules_es_set__WEBPACK_IMPORTED_MODULE_79__ = __webpack_require__(/*! core-js/modules/es.set */ "ViWx");
/* harmony import */ var core_js_modules_es_set__WEBPACK_IMPORTED_MODULE_79___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_set__WEBPACK_IMPORTED_MODULE_79__);
/* harmony import */ var core_js_modules_web_dom_collections_for_each__WEBPACK_IMPORTED_MODULE_80__ = __webpack_require__(/*! core-js/modules/web.dom-collections.for-each */ "kIOX");
/* harmony import */ var core_js_modules_web_dom_collections_for_each__WEBPACK_IMPORTED_MODULE_80___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_for_each__WEBPACK_IMPORTED_MODULE_80__);
/* harmony import */ var core_js_modules_web_dom_collections_iterator__WEBPACK_IMPORTED_MODULE_81__ = __webpack_require__(/*! core-js/modules/web.dom-collections.iterator */ "riHj");
/* harmony import */ var core_js_modules_web_dom_collections_iterator__WEBPACK_IMPORTED_MODULE_81___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_iterator__WEBPACK_IMPORTED_MODULE_81__);
/* harmony import */ var core_js_modules_es_promise__WEBPACK_IMPORTED_MODULE_82__ = __webpack_require__(/*! core-js/modules/es.promise */ "bHwr");
/* harmony import */ var core_js_modules_es_promise__WEBPACK_IMPORTED_MODULE_82___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_promise__WEBPACK_IMPORTED_MODULE_82__);
/* harmony import */ var core_js_modules_es_json_to_string_tag__WEBPACK_IMPORTED_MODULE_83__ = __webpack_require__(/*! core-js/modules/es.json.to-string-tag */ "8CeQ");
/* harmony import */ var core_js_modules_es_json_to_string_tag__WEBPACK_IMPORTED_MODULE_83___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_json_to_string_tag__WEBPACK_IMPORTED_MODULE_83__);
/* harmony import */ var regenerator_runtime_runtime__WEBPACK_IMPORTED_MODULE_84__ = __webpack_require__(/*! regenerator-runtime/runtime */ "ls82");
/* harmony import */ var regenerator_runtime_runtime__WEBPACK_IMPORTED_MODULE_84___default = /*#__PURE__*/__webpack_require__.n(regenerator_runtime_runtime__WEBPACK_IMPORTED_MODULE_84__);
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
// ES2015 symbol capabilities
// ES2015 function capabilities
// ES2015 object capabilities
// ES2015 array capabilities
// ES2015 string capabilities
/***/ }),
/***/ "vyNX":
/*!***************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/array-reduce.js ***!
\***************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var aFunction = __webpack_require__(/*! ../internals/a-function */ "Neub");
var toObject = __webpack_require__(/*! ../internals/to-object */ "VCQ8");
var IndexedObject = __webpack_require__(/*! ../internals/indexed-object */ "tUdv");
var toLength = __webpack_require__(/*! ../internals/to-length */ "xpLY");
// `Array.prototype.{ reduce, reduceRight }` methods implementation
var createMethod = function (IS_RIGHT) {
return function (that, callbackfn, argumentsLength, memo) {
aFunction(callbackfn);
var O = toObject(that);
var self = IndexedObject(O);
var length = toLength(O.length);
var index = IS_RIGHT ? length - 1 : 0;
var i = IS_RIGHT ? -1 : 1;
if (argumentsLength < 2) while (true) {
if (index in self) {
memo = self[index];
index += i;
break;
}
index += i;
if (IS_RIGHT ? index < 0 : length <= index) {
throw TypeError('Reduce of empty array with no initial value');
}
}
for (;IS_RIGHT ? index >= 0 : length > index; index += i) if (index in self) {
memo = callbackfn(memo, self[index], index, O);
}
return memo;
};
};
module.exports = {
// `Array.prototype.reduce` method
// https://tc39.github.io/ecma262/#sec-array.prototype.reduce
left: createMethod(false),
// `Array.prototype.reduceRight` method
// https://tc39.github.io/ecma262/#sec-array.prototype.reduceright
right: createMethod(true)
};
/***/ }),
/***/ "w2hq":
/*!******************************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/array-method-uses-to-length.js ***!
\******************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "T69T");
var fails = __webpack_require__(/*! ../internals/fails */ "rG8t");
var has = __webpack_require__(/*! ../internals/has */ "OG5q");
var defineProperty = Object.defineProperty;
var cache = {};
var thrower = function (it) { throw it; };
module.exports = function (METHOD_NAME, options) {
if (has(cache, METHOD_NAME)) return cache[METHOD_NAME];
if (!options) options = {};
var method = [][METHOD_NAME];
var ACCESSORS = has(options, 'ACCESSORS') ? options.ACCESSORS : false;
var argument0 = has(options, 0) ? options[0] : thrower;
var argument1 = has(options, 1) ? options[1] : undefined;
return cache[METHOD_NAME] = !!method && !fails(function () {
if (ACCESSORS && !DESCRIPTORS) return true;
var O = { length: -1 };
if (ACCESSORS) defineProperty(O, 1, { enumerable: true, get: thrower });
else O[1] = 1;
method.call(O, argument0, argument1);
});
};
/***/ }),
/***/ "w4Hq":
/*!*************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/array-fill.js ***!
\*************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var toObject = __webpack_require__(/*! ../internals/to-object */ "VCQ8");
var toAbsoluteIndex = __webpack_require__(/*! ../internals/to-absolute-index */ "7Oj1");
var toLength = __webpack_require__(/*! ../internals/to-length */ "xpLY");
// `Array.prototype.fill` method implementation
// https://tc39.github.io/ecma262/#sec-array.prototype.fill
module.exports = function fill(value /* , start = 0, end = @length */) {
var O = toObject(this);
var length = toLength(O.length);
var argumentsLength = arguments.length;
var index = toAbsoluteIndex(argumentsLength > 1 ? arguments[1] : undefined, length);
var end = argumentsLength > 2 ? arguments[2] : undefined;
var endPos = end === undefined ? length : toAbsoluteIndex(end, length);
while (endPos > index) O[index++] = value;
return O;
};
/***/ }),
/***/ "wA6s":
/*!*********************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/export.js ***!
\*********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__(/*! ../internals/global */ "ocAm");
var getOwnPropertyDescriptor = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ "7gGY").f;
var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ "aJMj");
var redefine = __webpack_require__(/*! ../internals/redefine */ "2MGJ");
var setGlobal = __webpack_require__(/*! ../internals/set-global */ "Fqhe");
var copyConstructorProperties = __webpack_require__(/*! ../internals/copy-constructor-properties */ "NIlc");
var isForced = __webpack_require__(/*! ../internals/is-forced */ "MkZA");
/*
options.target - name of the target object
options.global - target is the global object
options.stat - export as static methods of target
options.proto - export as prototype methods of target
options.real - real prototype method for the `pure` version
options.forced - export even if the native feature is available
options.bind - bind methods to the target, required for the `pure` version
options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
options.unsafe - use the simple assignment of property instead of delete + defineProperty
options.sham - add a flag to not completely full polyfills
options.enumerable - export as enumerable property
options.noTargetGet - prevent calling a getter on target
*/
module.exports = function (options, source) {
var TARGET = options.target;
var GLOBAL = options.global;
var STATIC = options.stat;
var FORCED, target, key, targetProperty, sourceProperty, descriptor;
if (GLOBAL) {
target = global;
} else if (STATIC) {
target = global[TARGET] || setGlobal(TARGET, {});
} else {
target = (global[TARGET] || {}).prototype;
}
if (target) for (key in source) {
sourceProperty = source[key];
if (options.noTargetGet) {
descriptor = getOwnPropertyDescriptor(target, key);
targetProperty = descriptor && descriptor.value;
} else targetProperty = target[key];
FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
// contained in target
if (!FORCED && targetProperty !== undefined) {
if (typeof sourceProperty === typeof targetProperty) continue;
copyConstructorProperties(sourceProperty, targetProperty);
}
// add a flag to not completely full polyfills
if (options.sham || (targetProperty && targetProperty.sham)) {
createNonEnumerableProperty(sourceProperty, 'sham', true);
}
// extend global
redefine(target, key, sourceProperty, options);
}
};
/***/ }),
/***/ "wE6v":
/*!********************************************************!*\
!*** ./node_modules/core-js/internals/to-primitive.js ***!
\********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var isObject = __webpack_require__(/*! ../internals/is-object */ "hh1v");
// `ToPrimitive` abstract operation
// https://tc39.github.io/ecma262/#sec-toprimitive
// instead of the ES6 spec version, we didn't implement @@toPrimitive case
// and the second argument - flag - preferred type is a string
module.exports = function (input, PREFERRED_STRING) {
if (!isObject(input)) return input;
var fn, val;
if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
if (typeof (fn = input.valueOf) == 'function' && !isObject(val = fn.call(input))) return val;
if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
throw TypeError("Can't convert object to primitive value");
};
/***/ }),
/***/ "wIVT":
/*!**************************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/object-get-prototype-of.js ***!
\**************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var has = __webpack_require__(/*! ../internals/has */ "OG5q");
var toObject = __webpack_require__(/*! ../internals/to-object */ "VCQ8");
var sharedKey = __webpack_require__(/*! ../internals/shared-key */ "/AsP");
var CORRECT_PROTOTYPE_GETTER = __webpack_require__(/*! ../internals/correct-prototype-getter */ "cwa4");
var IE_PROTO = sharedKey('IE_PROTO');
var ObjectPrototype = Object.prototype;
// `Object.getPrototypeOf` method
// https://tc39.github.io/ecma262/#sec-object.getprototypeof
module.exports = CORRECT_PROTOTYPE_GETTER ? Object.getPrototypeOf : function (O) {
O = toObject(O);
if (has(O, IE_PROTO)) return O[IE_PROTO];
if (typeof O.constructor == 'function' && O instanceof O.constructor) {
return O.constructor.prototype;
} return O instanceof Object ? ObjectPrototype : null;
};
/***/ }),
/***/ "wVAr":
/*!************************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.object.is-extensible.js ***!
\************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var fails = __webpack_require__(/*! ../internals/fails */ "rG8t");
var isObject = __webpack_require__(/*! ../internals/is-object */ "6XUM");
var nativeIsExtensible = Object.isExtensible;
var FAILS_ON_PRIMITIVES = fails(function () { nativeIsExtensible(1); });
// `Object.isExtensible` method
// https://tc39.github.io/ecma262/#sec-object.isextensible
$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, {
isExtensible: function isExtensible(it) {
return isObject(it) ? nativeIsExtensible ? nativeIsExtensible(it) : true : false;
}
});
/***/ }),
/***/ "wZP2":
/*!******************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.array.is-array.js ***!
\******************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var isArray = __webpack_require__(/*! ../internals/is-array */ "erNl");
// `Array.isArray` method
// https://tc39.github.io/ecma262/#sec-array.isarray
$({ target: 'Array', stat: true }, {
isArray: isArray
});
/***/ }),
/***/ "wdMf":
/*!*************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/collection.js ***!
\*************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var global = __webpack_require__(/*! ../internals/global */ "ocAm");
var isForced = __webpack_require__(/*! ../internals/is-forced */ "MkZA");
var redefine = __webpack_require__(/*! ../internals/redefine */ "2MGJ");
var InternalMetadataModule = __webpack_require__(/*! ../internals/internal-metadata */ "M7Xk");
var iterate = __webpack_require__(/*! ../internals/iterate */ "Rn6E");
var anInstance = __webpack_require__(/*! ../internals/an-instance */ "SM6+");
var isObject = __webpack_require__(/*! ../internals/is-object */ "6XUM");
var fails = __webpack_require__(/*! ../internals/fails */ "rG8t");
var checkCorrectnessOfIteration = __webpack_require__(/*! ../internals/check-correctness-of-iteration */ "EIBq");
var setToStringTag = __webpack_require__(/*! ../internals/set-to-string-tag */ "shqn");
var inheritIfRequired = __webpack_require__(/*! ../internals/inherit-if-required */ "K6ZX");
module.exports = function (CONSTRUCTOR_NAME, wrapper, common) {
var IS_MAP = CONSTRUCTOR_NAME.indexOf('Map') !== -1;
var IS_WEAK = CONSTRUCTOR_NAME.indexOf('Weak') !== -1;
var ADDER = IS_MAP ? 'set' : 'add';
var NativeConstructor = global[CONSTRUCTOR_NAME];
var NativePrototype = NativeConstructor && NativeConstructor.prototype;
var Constructor = NativeConstructor;
var exported = {};
var fixMethod = function (KEY) {
var nativeMethod = NativePrototype[KEY];
redefine(NativePrototype, KEY,
KEY == 'add' ? function add(value) {
nativeMethod.call(this, value === 0 ? 0 : value);
return this;
} : KEY == 'delete' ? function (key) {
return IS_WEAK && !isObject(key) ? false : nativeMethod.call(this, key === 0 ? 0 : key);
} : KEY == 'get' ? function get(key) {
return IS_WEAK && !isObject(key) ? undefined : nativeMethod.call(this, key === 0 ? 0 : key);
} : KEY == 'has' ? function has(key) {
return IS_WEAK && !isObject(key) ? false : nativeMethod.call(this, key === 0 ? 0 : key);
} : function set(key, value) {
nativeMethod.call(this, key === 0 ? 0 : key, value);
return this;
}
);
};
// eslint-disable-next-line max-len
if (isForced(CONSTRUCTOR_NAME, typeof NativeConstructor != 'function' || !(IS_WEAK || NativePrototype.forEach && !fails(function () {
new NativeConstructor().entries().next();
})))) {
// create collection constructor
Constructor = common.getConstructor(wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER);
InternalMetadataModule.REQUIRED = true;
} else if (isForced(CONSTRUCTOR_NAME, true)) {
var instance = new Constructor();
// early implementations not supports chaining
var HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance;
// V8 ~ Chromium 40- weak-collections throws on primitives, but should return false
var THROWS_ON_PRIMITIVES = fails(function () { instance.has(1); });
// most early implementations doesn't supports iterables, most modern - not close it correctly
// eslint-disable-next-line no-new
var ACCEPT_ITERABLES = checkCorrectnessOfIteration(function (iterable) { new NativeConstructor(iterable); });
// for early implementations -0 and +0 not the same
var BUGGY_ZERO = !IS_WEAK && fails(function () {
// V8 ~ Chromium 42- fails only with 5+ elements
var $instance = new NativeConstructor();
var index = 5;
while (index--) $instance[ADDER](index, index);
return !$instance.has(-0);
});
if (!ACCEPT_ITERABLES) {
Constructor = wrapper(function (dummy, iterable) {
anInstance(dummy, Constructor, CONSTRUCTOR_NAME);
var that = inheritIfRequired(new NativeConstructor(), dummy, Constructor);
if (iterable != undefined) iterate(iterable, that[ADDER], that, IS_MAP);
return that;
});
Constructor.prototype = NativePrototype;
NativePrototype.constructor = Constructor;
}
if (THROWS_ON_PRIMITIVES || BUGGY_ZERO) {
fixMethod('delete');
fixMethod('has');
IS_MAP && fixMethod('get');
}
if (BUGGY_ZERO || HASNT_CHAINING) fixMethod(ADDER);
// weak collections should not contains .clear method
if (IS_WEAK && NativePrototype.clear) delete NativePrototype.clear;
}
exported[CONSTRUCTOR_NAME] = Constructor;
$({ global: true, forced: Constructor != NativeConstructor }, exported);
setToStringTag(Constructor, CONSTRUCTOR_NAME);
if (!IS_WEAK) common.setStrong(Constructor, CONSTRUCTOR_NAME, IS_MAP);
return Constructor;
};
/***/ }),
/***/ "wqfI":
/*!***************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.object.keys.js ***!
\***************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var toObject = __webpack_require__(/*! ../internals/to-object */ "VCQ8");
var nativeKeys = __webpack_require__(/*! ../internals/object-keys */ "ZRqE");
var fails = __webpack_require__(/*! ../internals/fails */ "rG8t");
var FAILS_ON_PRIMITIVES = fails(function () { nativeKeys(1); });
// `Object.keys` method
// https://tc39.github.io/ecma262/#sec-object.keys
$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, {
keys: function keys(it) {
return nativeKeys(toObject(it));
}
});
/***/ }),
/***/ "x0kV":
/*!***************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/regexp-flags.js ***!
\***************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var anObject = __webpack_require__(/*! ../internals/an-object */ "F26l");
// `RegExp.prototype.flags` getter implementation
// https://tc39.github.io/ecma262/#sec-get-regexp.prototype.flags
module.exports = function () {
var that = anObject(this);
var result = '';
if (that.global) result += 'g';
if (that.ignoreCase) result += 'i';
if (that.multiline) result += 'm';
if (that.dotAll) result += 's';
if (that.unicode) result += 'u';
if (that.sticky) result += 'y';
return result;
};
/***/ }),
/***/ "x2An":
/*!********************************************************!*\
!*** ./node_modules/core-js/modules/es.reflect.has.js ***!
\********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
// `Reflect.has` method
// https://tc39.github.io/ecma262/#sec-reflect.has
$({ target: 'Reflect', stat: true }, {
has: function has(target, propertyKey) {
return propertyKey in target;
}
});
/***/ }),
/***/ "xDBR":
/*!***************************************************!*\
!*** ./node_modules/core-js/internals/is-pure.js ***!
\***************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = false;
/***/ }),
/***/ "xFZC":
/*!**************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/whitespaces.js ***!
\**************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
// a string of all valid unicode whitespaces
// eslint-disable-next-line max-len
module.exports = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
/***/ }),
/***/ "xpLY":
/*!************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/to-length.js ***!
\************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var toInteger = __webpack_require__(/*! ../internals/to-integer */ "vDBE");
var min = Math.min;
// `ToLength` abstract operation
// https://tc39.github.io/ecma262/#sec-tolength
module.exports = function (argument) {
return argument > 0 ? min(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
};
/***/ }),
/***/ "xrYK":
/*!*******************************************************!*\
!*** ./node_modules/core-js/internals/classof-raw.js ***!
\*******************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
var toString = {}.toString;
module.exports = function (it) {
return toString.call(it).slice(8, -1);
};
/***/ }),
/***/ "xs3f":
/*!********************************************************!*\
!*** ./node_modules/core-js/internals/shared-store.js ***!
\********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__(/*! ../internals/global */ "2oRo");
var setGlobal = __webpack_require__(/*! ../internals/set-global */ "zk60");
var SHARED = '__core-js_shared__';
var store = global[SHARED] || setGlobal(SHARED, {});
module.exports = store;
/***/ }),
/***/ "yI8t":
/*!***************************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.number.max-safe-integer.js ***!
\***************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
// `Number.MAX_SAFE_INTEGER` constant
// https://tc39.github.io/ecma262/#sec-number.max_safe_integer
$({ target: 'Number', stat: true }, {
MAX_SAFE_INTEGER: 0x1FFFFFFFFFFFFF
});
/***/ }),
/***/ "yIiL":
/*!*********************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/shared.js ***!
\*********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "g9hI");
var store = __webpack_require__(/*! ../internals/shared-store */ "KBkW");
(module.exports = function (key, value) {
return store[key] || (store[key] = value !== undefined ? value : {});
})('versions', []).push({
version: '3.6.5',
mode: IS_PURE ? 'pure' : 'global',
copyright: '© 2020 Denis Pushkarev (zloirock.ru)'
});
/***/ }),
/***/ "yQMY":
/*!**************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/hidden-keys.js ***!
\**************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = {};
/***/ }),
/***/ "yUZX":
/*!***************************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.reflect.define-property.js ***!
\***************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "T69T");
var anObject = __webpack_require__(/*! ../internals/an-object */ "F26l");
var toPrimitive = __webpack_require__(/*! ../internals/to-primitive */ "LdO1");
var definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ "/Ybd");
var fails = __webpack_require__(/*! ../internals/fails */ "rG8t");
// MS Edge has broken Reflect.defineProperty - throwing instead of returning false
var ERROR_INSTEAD_OF_FALSE = fails(function () {
// eslint-disable-next-line no-undef
Reflect.defineProperty(definePropertyModule.f({}, 1, { value: 1 }), 1, { value: 2 });
});
// `Reflect.defineProperty` method
// https://tc39.github.io/ecma262/#sec-reflect.defineproperty
$({ target: 'Reflect', stat: true, forced: ERROR_INSTEAD_OF_FALSE, sham: !DESCRIPTORS }, {
defineProperty: function defineProperty(target, propertyKey, attributes) {
anObject(target);
var key = toPrimitive(propertyKey, true);
anObject(attributes);
try {
definePropertyModule.f(target, key, attributes);
return true;
} catch (error) {
return false;
}
}
});
/***/ }),
/***/ "yaK9":
/*!******************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/internals/native-weak-map.js ***!
\******************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__(/*! ../internals/global */ "ocAm");
var inspectSource = __webpack_require__(/*! ../internals/inspect-source */ "6urC");
var WeakMap = global.WeakMap;
module.exports = typeof WeakMap === 'function' && /native code/.test(inspectSource(WeakMap));
/***/ }),
/***/ "yoRg":
/*!****************************************************************!*\
!*** ./node_modules/core-js/internals/object-keys-internal.js ***!
\****************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var has = __webpack_require__(/*! ../internals/has */ "UTVS");
var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ "/GqU");
var indexOf = __webpack_require__(/*! ../internals/array-includes */ "TWQb").indexOf;
var hiddenKeys = __webpack_require__(/*! ../internals/hidden-keys */ "0BK2");
module.exports = function (object, names) {
var O = toIndexedObject(object);
var i = 0;
var result = [];
var key;
for (key in O) !has(hiddenKeys, key) && has(O, key) && result.push(key);
// Don't enum bug & hidden keys
while (names.length > i) if (has(O, key = names[i++])) {
~indexOf(result, key) || result.push(key);
}
return result;
};
/***/ }),
/***/ "zBJ4":
/*!*******************************************************************!*\
!*** ./node_modules/core-js/internals/document-create-element.js ***!
\*******************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__(/*! ../internals/global */ "2oRo");
var isObject = __webpack_require__(/*! ../internals/is-object */ "hh1v");
var document = global.document;
// typeof document.createElement is 'object' in old IE
var EXISTS = isObject(document) && isObject(document.createElement);
module.exports = function (it) {
return EXISTS ? document.createElement(it) : {};
};
/***/ }),
/***/ "zTQA":
/*!******************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.string.italics.js ***!
\******************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var createHTML = __webpack_require__(/*! ../internals/create-html */ "uoca");
var forcedStringHTMLMethod = __webpack_require__(/*! ../internals/string-html-forced */ "d8Sw");
// `String.prototype.italics` method
// https://tc39.github.io/ecma262/#sec-string.prototype.italics
$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('italics') }, {
italics: function italics() {
return createHTML(this, 'i', '', '');
}
});
/***/ }),
/***/ "zk60":
/*!******************************************************!*\
!*** ./node_modules/core-js/internals/set-global.js ***!
\******************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__(/*! ../internals/global */ "2oRo");
var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ "kRJp");
module.exports = function (key, value) {
try {
createNonEnumerableProperty(global, key, value);
} catch (error) {
global[key] = value;
} return value;
};
/***/ }),
/***/ "znfk":
/*!**************************************************************************************************************************!*\
!*** ./node_modules/@angular-devkit/build-angular/node_modules/core-js/modules/es.object.get-own-property-descriptor.js ***!
\**************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "wA6s");
var fails = __webpack_require__(/*! ../internals/fails */ "rG8t");
var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ "EMtK");
var nativeGetOwnPropertyDescriptor = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ "7gGY").f;
var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "T69T");
var FAILS_ON_PRIMITIVES = fails(function () { nativeGetOwnPropertyDescriptor(1); });
var FORCED = !DESCRIPTORS || FAILS_ON_PRIMITIVES;
// `Object.getOwnPropertyDescriptor` method
// https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptor
$({ target: 'Object', stat: true, forced: FORCED, sham: !DESCRIPTORS }, {
getOwnPropertyDescriptor: function getOwnPropertyDescriptor(it, key) {
return nativeGetOwnPropertyDescriptor(toIndexedObject(it), key);
}
});
/***/ })
},[[1,"runtime"]]]);
//# sourceMappingURL=polyfills-es5.js.map |
(window.webpackJsonp=window.webpackJsonp||[]).push([[100],{1580:function(e,t,a){"use strict";a.r(t);var n=a(0),r=a.n(n),o=a(24),s=a.n(o),l=a(25),i=a.n(l),c=a(22),u=a.n(c),d=a(26),m=a.n(d),p=a(27),f=a.n(p),g=a(16),v=a.n(g),b=a(6),h=a.n(b),y=a(32),C=a(14),N=a(4),E=a(706),D=a.n(E),w=a(7),O=a.n(w),A=a(703),S=a(702),k=a(700),x=a(699),P=a(829),j=a(202),q=a(708);function M(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function T(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?M(Object(a),!0).forEach((function(t){h()(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):M(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}function B(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,n=v()(e);if(t){var r=v()(this).constructor;a=Reflect.construct(n,arguments,r)}else a=n.apply(this,arguments);return f()(this,a)}}O.a.locale("nl");var R=function(e){m()(a,e);var t=B(a);function a(e){var n;return s()(this,a),n=t.call(this,e),h()(u()(n),"handleInputChange",(function(e){var t=e.target,a="checkbox"===t.type?t.checked:t.value,r=t.name;n.setState(T(T({},n.state),{},{vatCode:T(T({},n.state.vatCode),{},h()({},r,a))}))})),h()(u()(n),"handleInputChangeDate",(function(e,t){n.setState(T(T({},n.state),{},{vatCode:T(T({},n.state.vatCode),{},h()({},t,e))}))})),h()(u()(n),"handleSubmit",(function(e){e.preventDefault();var t=n.state.vatCode,a={},r=!1;D.a.isEmpty(t.startDate)&&(a.startDate=!0,r=!0),D.a.isEmpty(t.description)&&(a.description=!0,r=!0),D.a.isEmpty(t.percentage.toString())&&(a.percentage=!0,r=!0),n.setState(T(T({},n.state),{},{errors:a})),!r&&P.a.newVatCode(t).then((function(e){n.props.fetchSystemData(),N.f.push("/btw-code/".concat(e.data.data.id))})).catch((function(e){alert("Er is iets mis gegaan met opslaan!")}))})),n.state={vatCode:{startDate:"",description:"",percentage:"",twinfieldCode:"",twinfieldLedgerCode:""},errors:{startDate:!1,description:!1,percentage:!1}},n}return i()(a,[{key:"render",value:function(){var e=this.state.vatCode,t=e.startDate,a=e.description,n=e.percentage,o=e.twinfieldCode,s=e.twinfieldLedgerCode;return r.a.createElement("form",{className:"form-horizontal",onSubmit:this.handleSubmit},r.a.createElement(x.a,null,r.a.createElement(k.a,null,r.a.createElement("div",{className:"row"},r.a.createElement(q.a,{label:"Startdatum",name:"startDate",value:t,onChangeAction:this.handleInputChangeDate,required:"required",error:this.state.errors.startDate}),r.a.createElement(A.a,{label:"Omschrijving",name:"description",value:a,onChangeAction:this.handleInputChange,required:"required",error:this.state.errors.description})),r.a.createElement("div",{className:"row"},r.a.createElement(A.a,{type:"number",label:"Percentage",name:"percentage",value:n,onChangeAction:this.handleInputChange,required:"required",error:this.state.errors.percentage}),r.a.createElement(A.a,{label:"Twinfield code",name:"twinfieldCode",value:o,onChangeAction:this.handleInputChange})),r.a.createElement("div",{className:"row"},r.a.createElement(A.a,{label:"Twinfield grootboek code",name:"twinfieldLedgerCode",value:s,onChangeAction:this.handleInputChange}))),r.a.createElement(k.a,null,r.a.createElement("div",{className:"pull-right btn-group",role:"group"},r.a.createElement(S.a,{buttonText:"Opslaan",onClickAction:this.handleSubmit,type:"submit",value:"Submit"})))))}}]),a}(n.Component),z=Object(y.b)(null,(function(e){return Object(C.b)({fetchSystemData:j.a},e)}))(R),L=a(701),I=function(){return r.a.createElement("div",{className:"row"},r.a.createElement("div",{className:"col-md-4"},r.a.createElement("div",{className:"btn-group btn-group-flex margin-small",role:"group"},r.a.createElement(L.a,{iconName:"glyphicon-arrow-left",onClickAction:N.e.goBack}))),r.a.createElement("div",{className:"col-md-4"},r.a.createElement("h4",{className:"text-center margin-small"},"Nieuw BTW code")),r.a.createElement("div",{className:"col-md-4"}))};t.default=function(){return r.a.createElement("div",{className:"row"},r.a.createElement("div",{className:"col-md-9"},r.a.createElement("div",{className:"col-md-12 margin-10-top"},r.a.createElement(x.a,null,r.a.createElement(k.a,{className:"panel-small"},r.a.createElement(I,null)))),r.a.createElement("div",{className:"col-md-12 margin-10-top"},r.a.createElement(z,null))),r.a.createElement("div",{className:"col-md-3"}))}},699:function(e,t,a){"use strict";var n=a(0),r=a.n(n),o=a(8),s=a.n(o),l=function(e){var t=e.children,a=e.className,n=e.onMouseEnter,o=e.onMouseLeave;return r.a.createElement("div",{className:"panel panel-default ".concat(a),onMouseEnter:n,onMouseLeave:o},t)};l.defaultProps={className:"",onMouseEnter:function(){},onMouseLeave:function(){}},l.propTypes={className:s.a.string,onMouseEnter:s.a.func,onMouseLeave:s.a.func},t.a=l},700:function(e,t,a){"use strict";var n=a(0),r=a.n(n),o=a(8),s=a.n(o),l=function(e){var t=e.className,a=e.children;return r.a.createElement("div",{className:"panel-body ".concat(t)},a)};l.defaultProps={className:""},l.propTypes={className:s.a.string},t.a=l},701:function(e,t,a){"use strict";var n=a(0),r=a.n(n),o=a(8),s=a.n(o),l=function(e){var t=e.buttonClassName,a=e.iconName,n=e.onClickAction,o=e.title,s=e.disabled;return r.a.createElement("button",{type:"button",className:"btn ".concat(t),onClick:n,disabled:s,title:o},r.a.createElement("span",{className:"glyphicon ".concat(a)}))};l.defaultProps={buttonClassName:"btn-success btn-sm",title:"",disabled:!1},l.propTypes={buttonClassName:s.a.string,iconName:s.a.string.isRequired,onClickAction:s.a.func,title:s.a.string,disabled:s.a.bool},t.a=l},702:function(e,t,a){"use strict";var n=a(0),r=a.n(n),o=a(8),s=a.n(o),l=function(e){var t=e.buttonClassName,a=e.buttonText,n=e.onClickAction,o=e.type,s=e.value,l=e.loading,i=e.loadText,c=e.disabled;return l?r.a.createElement("button",{type:o,className:"btn btn-sm btn-loading ".concat(t),value:s,disabled:l},r.a.createElement("span",{className:"glyphicon glyphicon-refresh glyphicon-refresh-animate"})," ",i):r.a.createElement("button",{type:o,className:"btn btn-sm ".concat(t),onClick:n,value:s,disabled:c},a)};l.defaultProps={buttonClassName:"btn-success",type:"button",value:"",loading:!1,loadText:"Aan het laden",disabled:!1},l.propTypes={buttonClassName:s.a.string,buttonText:s.a.string.isRequired,onClickAction:s.a.func,type:s.a.string,value:s.a.string,loading:s.a.bool,loadText:s.a.string,disabled:s.a.bool},t.a=l},703:function(e,t,a){"use strict";var n=a(0),r=a.n(n),o=a(8),s=a.n(o),l=function(e){var t=e.label,a=e.type,n=e.className,o=e.size,s=e.id,l=e.placeholder,i=e.name,c=e.value,u=e.onClickAction,d=e.onChangeAction,m=e.onBlurAction,p=e.required,f=e.readOnly,g=e.maxLength,v=e.error,b=e.min,h=e.max,y=e.step,C=e.errorMessage,N=e.divSize,E=e.divClassName,D=e.autoComplete;return r.a.createElement("div",{className:"form-group ".concat(N," ").concat(E)},r.a.createElement("label",{htmlFor:s,className:"col-sm-6 ".concat(p)},t),r.a.createElement("div",{className:"".concat(o)},r.a.createElement("input",{type:a,className:"form-control input-sm ".concat(n)+(v?"has-error":""),id:s,placeholder:l,name:i,value:c,onClick:u,onChange:d,onBlur:m,readOnly:f,maxLength:g,min:b,max:h,autoComplete:D,step:y})),v&&r.a.createElement("div",{className:"col-sm-offset-6 col-sm-6"},r.a.createElement("span",{className:"has-error-message"}," ",C)))};l.defaultProps={divClassName:"",className:"",size:"col-sm-6",divSize:"col-sm-6",name:"",type:"text",value:"",required:"",readOnly:!1,maxLength:null,error:!1,min:"",max:"",step:"",errorMessage:"",autoComplete:"off",onBlurAction:function(){},onClickAction:function(){},onChangeAction:function(){}},l.propTypes={label:s.a.oneOfType([s.a.string,s.a.object]).isRequired,type:s.a.string,className:s.a.string,divClassName:s.a.string,size:s.a.string,divSize:s.a.string,id:s.a.string,placeholder:s.a.string,name:s.a.string.isRequired,value:s.a.oneOfType([s.a.string,s.a.number]),onClickAction:s.a.func,onChangeAction:s.a.func,onBlurAction:s.a.func,required:s.a.string,readOnly:s.a.bool,maxLength:s.a.string,error:s.a.bool,min:s.a.string,max:s.a.string,step:s.a.string,errorMessage:s.a.string,autoComplete:s.a.string},t.a=l},708:function(e,t,a){"use strict";var n=a(24),r=a.n(n),o=a(25),s=a.n(o),l=a(22),i=a.n(l),c=a(26),u=a.n(c),d=a(27),m=a.n(d),p=a(16),f=a.n(p),g=a(6),v=a.n(g),b=a(0),h=a.n(b),y=a(8),C=a.n(y),N=a(716),E=a.n(N),D=a(717),w=a.n(D),O=a(7),A=a.n(O);function S(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,n=f()(e);if(t){var r=f()(this).constructor;a=Reflect.construct(n,arguments,r)}else a=n.apply(this,arguments);return m()(this,a)}}A.a.locale("nl");var k=function(e){u()(a,e);var t=S(a);function a(e){var n;return r()(this,a),n=t.call(this,e),v()(i()(n),"validateDate",(function(e){var t=A()(e.target.value,"DD-MM-YYYY",!0),a=!1;t.isValid()||""===e.target.value||(a=!0),n.props.disabledBefore&&t.isBefore(n.props.disabledBefore)&&(a=!0),n.props.disabledAfter&&t.isAfter(n.props.disabledAfter)&&(a=!0),n.setState({errorDateFormat:a})})),v()(i()(n),"onDateChange",(function(e){var t=e?A()(e).format("Y-MM-DD"):"",a=!1;t&&n.props.disabledBefore&&A()(t).isBefore(n.props.disabledBefore)&&(a=!0),t&&n.props.disabledAfter&&A()(t).isAfter(n.props.disabledAfter)&&(a=!0),n.setState({errorDateFormat:a}),!a&&n.props.onChangeAction(t,n.props.name)})),n.state={errorDateFormat:!1},n}return s()(a,[{key:"render",value:function(){var e=this.props,t=e.label,a=e.className,n=e.size,r=e.divSize,o=e.id,s=e.value,l=e.required,i=e.readOnly,c=e.name,u=e.error,d=e.errorMessage,m=e.disabledBefore,p=e.disabledAfter,f=s?A()(s).format("L"):"",g={};return m&&(g.before=new Date(m)),p&&(g.after=new Date(p)),h.a.createElement("div",{className:"form-group ".concat(r)},h.a.createElement("div",null,h.a.createElement("label",{htmlFor:o,className:"col-sm-6 ".concat(l)},t)),h.a.createElement("div",{className:"".concat(n)},h.a.createElement(E.a,{id:o,value:f,formatDate:D.formatDate,parseDate:D.parseDate,onDayChange:this.onDateChange,dayPickerProps:{showWeekNumbers:!0,locale:"nl",firstDayOfWeek:1,localeUtils:w.a,disabledDays:g},inputProps:{className:"form-control input-sm ".concat(a)+(this.state.errorDateFormat||u?" has-error":""),name:c,onBlur:this.validateDate,autoComplete:"off",readOnly:i,disabled:i},required:l,readOnly:i,placeholder:""})),u&&h.a.createElement("div",{className:"col-sm-offset-6 col-sm-6"},h.a.createElement("span",{className:"has-error-message"}," ",d)))}}]),a}(b.Component);k.defaultProps={className:"",size:"col-sm-6",divSize:"col-sm-6",required:"",readOnly:!1,value:null,error:!1,errorMessage:"",disabledBefore:null,disabledAfter:null},k.propTypes={label:C.a.string.isRequired,type:C.a.string,className:C.a.string,size:C.a.string,divSize:C.a.string,id:C.a.string,name:C.a.string,value:C.a.oneOfType([C.a.string,C.a.object]),onChangeAction:C.a.func,required:C.a.string,readOnly:C.a.bool,error:C.a.bool,errorMessage:C.a.string,disabledBefore:C.a.string,disabledAfter:C.a.string},t.a=k},829:function(e,t,a){"use strict";var n=a(12);t.a={fetchVatCodeDetails:function(e){var t="jory/vat-code/".concat(e);return n.a.get(t,{params:{jory:{fld:["id","startDate","description","percentage","twinfieldCode","twinfieldLedgerCode"]}}})},newVatCode:function(e){return e.jory=JSON.stringify({fld:["id"]}),n.a.post("vat-code",e)},updateVatCode:function(e){var t="".concat("vat-code","/").concat(e.id);return n.a.post(t,e)}}}}]); |
var User = /** @class */ (function () {
function User(id, nome, email, senha, username) {
this.id = id;
this.nome = nome;
this.email = email;
this.senha = senha;
this.username = username;
}
return User;
}());
export { User };
//# sourceMappingURL=user.model.js.map |
'''
This file is part of PM4Py (More Info: https://pm4py.fit.fraunhofer.de).
PM4Py is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
PM4Py is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with PM4Py. If not, see <https://www.gnu.org/licenses/>.
'''
from pm4py.objects.trie import obj
|
module.exports = {"acrossmap":null,"admin":false,"answers":{"across":["TWIT","GLOVER","BOA","RENO","RENAME","ANN","ATTN","ONTIME","DRY","GOESOUTONALIMA","INN","RPI","SOME","CEDED","LAMACHOPS","TEL","NAVY","DST","VERAENDINGS","SRI","LIEU","STE","HONEYCOMA","HELGA","HUES","LAI","ORE","GRADEINFLATION","CHI","ELTORO","OTOE","HIP","ELEVEN","LEVI","ATE","REMADE","DRED"],"down":["TRAGIC","WETONE","INTEND","TONS","GROUP","LENTIL","ONTO","VAIN","EMMA","REEL","BADMOODS","ONRAMPS","ANY","ORDERLY","ISH","EST","ETE","ANNUM","MAD","AVIS","CYNTHIA","LAIC","VINERIPE","EEO","GEE","SHH","ROUGHIT","ESA","ALFRED","LOITER","GROOVE","AENEID","ALONE","DEER","ELLE","ITEM","NOVA","TOLD","CHA"]},"author":"Anna Shechtman","autowrap":null,"bbars":null,"circles":null,"clues":{"across":["1. Ninny","5. Actor Danny of \"The Color Purple\"","11. Jungle menace","14. \"___ 911!\" (former Comedy Central show)","15. Dub over","16. English novelist Radcliffe","17. Abbr. before a name in a memo","18. Promptly","19. Like zinfandel wines","20. Chokes after bean eating?","23. No room at the ___","24. The Engineers of the N.C.A.A.: Abbr.","25. Not all","27. Gave up","29. Monk's karate blows?","34. Business card abbr.","36. Shade of blue","37. When clocks are set ahead: Abbr.","38. Movie finales featuring actress Miles?","41. ___ Lanka","43. In ___ of","44. Fr. holy woman","45. Result of a sweetener overload?","48. Wife of Hägar the Horrible","52. Tints","53. China's Chou En-___","55. Metalliferous rock","56. Modern educational phenomenon ... or a hint to 20-, 29-, 38- and 45-Across","62. The Windy City, briefly","63. Fearsome wooden roller coaster at Six Flags Great Adventure","64. Plains Indian","65. Cool, man","66. Nearing midnight","67. Johnston in 2008-09 news","68. Broke a fast","69. Newly fashioned","70. Harriet Beecher Stowe novel"],"down":["1. Like some irony","2. Sloppy kiss","3. Mean","4. Lots and lots","5. Congregation","6. Soup bean","7. Not duped by","8. Futile","9. Novel on which \"Clueless\" is based","10. Recite rapidly, with \"off\"","11. Peevish states","12. Interstate entrances","13. \"Pick a number, ___ number\"","21. Hospital attendant","22. Noncommittal suffix","26. Approx. number","28. Time off from l'école","30. Per ___","31. Magazine featuring 47-Down","32. Alamo competitor","33. \"Sex and the City\" actress Nixon","35. Not of the cloth","38. Like some tomatoes","39. Abbr. in help-wanted ads","40. Exclamation before \"I didn't know that!\"","41. Library admonishment","42. Camp in the wild","46. That, to Juanita","47. ___ E. Neuman","49. Hang around","50. Pronounced rhythm, in music","51. Origin of the phrase \"Beware of Greeks bearing gifts\"","54. Unassisted","57. ___ Xing","58. She, in Cherbourg","59. Twosome","60. ___ Scotia","61. Tattled","62. When doubled, a dance"]},"code":null,"copyright":"2010, The New York Times","date":"5\/26\/2010","dow":"Wednesday","downmap":null,"editor":"Will Shortz","grid":["T","W","I","T",".","G","L","O","V","E","R",".","B","O","A","R","E","N","O",".","R","E","N","A","M","E",".","A","N","N","A","T","T","N",".","O","N","T","I","M","E",".","D","R","Y","G","O","E","S","O","U","T","O","N","A","L","I","M","A",".","I","N","N",".","R","P","I",".",".",".",".","S","O","M","E","C","E","D","E","D",".","L","A","M","A","C","H","O","P","S",".",".",".","T","E","L",".","N","A","V","Y",".","D","S","T",".",".","V","E","R","A","E","N","D","I","N","G","S",".",".","S","R","I",".","L","I","E","U",".","S","T","E",".",".",".","H","O","N","E","Y","C","O","M","A",".","H","E","L","G","A","H","U","E","S",".",".",".",".","L","A","I",".","O","R","E",".","G","R","A","D","E","I","N","F","L","A","T","I","O","N","C","H","I",".","E","L","T","O","R","O",".","O","T","O","E","H","I","P",".","E","L","E","V","E","N",".","L","E","V","I","A","T","E",".","R","E","M","A","D","E",".","D","R","E","D"],"gridnums":[1,2,3,4,0,5,6,7,8,9,10,0,11,12,13,14,0,0,0,0,15,0,0,0,0,0,0,16,0,0,17,0,0,0,0,18,0,0,0,0,0,0,19,0,0,20,0,0,0,21,0,0,0,0,0,0,22,0,0,0,23,0,0,0,24,0,0,0,0,0,0,25,0,0,26,27,0,0,28,0,0,29,30,31,32,33,0,0,0,0,0,0,0,34,0,35,0,36,0,0,0,0,37,0,0,0,0,38,0,0,0,39,0,0,0,0,40,0,0,0,41,42,0,0,43,0,0,0,0,44,0,0,0,0,0,45,0,0,46,0,0,0,0,47,0,48,0,49,50,51,52,0,0,0,0,0,0,0,53,54,0,0,55,0,0,0,56,0,0,57,58,59,60,0,0,0,61,0,0,0,62,0,0,0,63,0,0,0,0,0,0,64,0,0,0,65,0,0,0,66,0,0,0,0,0,0,67,0,0,0,68,0,0,0,69,0,0,0,0,0,0,70,0,0,0],"hold":null,"id":null,"id2":null,"interpretcolors":null,"jnotes":null,"key":null,"mini":null,"notepad":null,"publisher":"The New York Times","rbars":null,"shadecircles":null,"size":{"cols":15,"rows":15},"title":"NY TIMES, WED, MAY 26, 2010","track":null,"type":null} |
_base_ = './dnl_r50-d8_769x769_40k_cityscapes.py'
model = dict(pretrained='open-mmlab://resnet101_v1c', backbone=dict(depth=101))
|
/**
* @author a.demeshko
* created on 12/16/15
*/
(function() {
'use strict';
angular.module('Kronos.pages.charts.chartist')
.controller('chartistCtrl', chartistCtrl);
/** @ngInject */
function chartistCtrl($scope, $timeout, baConfig) {
$scope.simpleLineOptions = {
color: baConfig.colors.defaultText,
fullWidth: true,
height: "300px",
chartPadding: {
right: 40
}
};
$scope.simpleLineData = {
labels: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri'],
series: [
[20, 20, 12, 45, 50],
[10, 45, 30, 14, 12],
[34, 12, 12, 40, 50],
[10, 43, 25, 22, 16],
[3, 6, 30, 33, 43]
]
};
$scope.areaLineData = {
labels: [1, 2, 3, 4, 5, 6, 7, 8],
series: [
[5, 9, 7, 8, 5, 3, 5, 4]
]
};
$scope.areaLineOptions = {
fullWidth: true,
height: "300px",
low: 0,
showArea: true
};
$scope.biLineData = {
labels: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
series: [
[1, 2, 3, 1, -2, 0, 1],
[-2, -1, -2, -1, -2.5, -1, -2],
[0, 0, 0, 1, 2, 2.5, 2],
[2.5, 2, 1, 0.5, 1, 0.5, -1]
]
};
$scope.biLineOptions = {
height: "300px",
high: 3,
low: -3,
showArea: true,
showLine: false,
showPoint: false,
fullWidth: true,
axisX: {
showGrid: false
}
};
$scope.simpleBarData = {
labels: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
series: [
[15, 24, 43, 27, 5, 10, 23, 44, 68, 50, 26, 8],
[13, 22, 49, 22, 4, 6, 24, 46, 57, 48, 22, 4]
]
};
$scope.simpleBarOptions = {
fullWidth: true,
height: "300px"
};
$scope.multiBarData = {
labels: ['Quarter 1', 'Quarter 2', 'Quarter 3', 'Quarter 4'],
series: [
[5, 4, 3, 7],
[3, 2, 9, 5],
[1, 5, 8, 4],
[2, 3, 4, 6],
[4, 1, 2, 1]
]
};
$scope.multiBarOptions = {
fullWidth: true,
height: "300px",
stackBars: true,
axisX: {
labelInterpolationFnc: function(value) {
return value.split(/\s+/).map(function(word) {
return word[0];
}).join('');
}
},
axisY: {
offset: 20
}
};
$scope.multiBarResponsive = [
['screen and (min-width: 400px)', {
reverseData: true,
horizontalBars: true,
axisX: {
labelInterpolationFnc: Chartist.noop
},
axisY: {
offset: 60
}
}],
['screen and (min-width: 700px)', {
stackBars: false,
reverseData: false,
horizontalBars: false,
seriesBarDistance: 15
}]
];
$scope.stackedBarData = {
labels: ['Quarter 1', 'Quarter 2', 'Quarter 3', 'Quarter 4'],
series: [
[800000, 1200000, 1400000, 1300000],
[200000, 400000, 500000, 300000],
[100000, 200000, 400000, 600000]
]
};
$scope.stackedBarOptions = {
fullWidth: true,
height: "300px",
stackBars: true,
axisY: {
labelInterpolationFnc: function(value) {
return (value / 1000) + 'k';
}
}
};
$scope.simplePieData = {
series: [5, 3, 4]
};
$scope.simplePieOptions = {
fullWidth: true,
height: "300px",
weight: "300px",
labelInterpolationFnc: function(value) {
return Math.round(value / 12 * 100) + '%';
}
};
$scope.labelsPieData = {
labels: ['Bananas', 'Apples', 'Grapes'],
series: [20, 15, 40]
};
$scope.labelsPieOptions = {
fullWidth: true,
height: "300px",
weight: "300px",
labelDirection: 'explode',
labelInterpolationFnc: function(value) {
return value[0];
}
};
$scope.simpleDonutData = {
labels: ['Bananas', 'Apples', 'Grapes'],
series: [20, 15, 40]
};
$scope.simpleDonutOptions = {
fullWidth: true,
donut: true,
height: "300px",
weight: "300px",
labelDirection: 'explode',
labelInterpolationFnc: function(value) {
return value[0];
}
};
$scope.donutResponsive = getResponsive(5, 40);
$scope.pieResponsive = getResponsive(20, 80);
function getResponsive(padding, offset) {
return [
['screen and (min-width: 1550px)', {
chartPadding: padding,
labelOffset: offset,
labelDirection: 'explode',
labelInterpolationFnc: function(value) {
return value;
}
}],
['screen and (max-width: 1200px)', {
chartPadding: padding,
labelOffset: offset,
labelDirection: 'explode',
labelInterpolationFnc: function(value) {
return value;
}
}],
['screen and (max-width: 600px)', {
chartPadding: 0,
labelOffset: 0,
labelInterpolationFnc: function(value) {
return value[0];
}
}]
];
}
$timeout(function() {
new Chartist.Line('#line-chart', $scope.simpleLineData, $scope.simpleLineOptions);
new Chartist.Line('#area-chart', $scope.areaLineData, $scope.areaLineOptions);
new Chartist.Line('#bi-chart', $scope.biLineData, $scope.biLineOptions);
new Chartist.Bar('#simple-bar', $scope.simpleBarData, $scope.simpleBarOptions);
new Chartist.Bar('#multi-bar', $scope.multiBarData, $scope.multiBarOptions, $scope.multiBarResponsive);
new Chartist.Bar('#stacked-bar', $scope.stackedBarData, $scope.stackedBarOptions);
new Chartist.Pie('#simple-pie', $scope.simplePieData, $scope.simplePieOptions, $scope.pieResponsive);
new Chartist.Pie('#label-pie', $scope.labelsPieData, $scope.labelsPieOptions);
new Chartist.Pie('#donut', $scope.simpleDonutData, $scope.simpleDonutOptions, $scope.donutResponsive);
});
}
})(); |
/**
* Created by kuke on 2016/5/4.
*/
$(function(){
var demo=$(".registerform").Validform({
btnSubmit:"#btn_sub",
tiptype:3,
label:".label",
showAllError:true,
datatype:{
"number":/^\d+(\.\d{1,2})?$/,
},
});
$('.lbl-bank').on('click',function(){
$('.lbl-bank').removeClass('lbl-active');
$(this).addClass('lbl-active');
});
$('.g-recharge .cashier-alert').click(function(){
$('.cashier-alert-cont').toggle(500);
})
}) |
// You can use any data fetching library
import fetch from 'node-fetch';
import Head from 'next/head';
import Link from 'next/link';
import Header from '../components/Header';
import Footer from '../components/Footer'
// Only fetchg the title and blurb.
const FirestoreBlogPostsURL = `https://firestore.googleapis.com/v1/projects/${process.env.FIREBASE_PROJECT_ID}/databases/(default)/documents/posts?mask.fieldPaths=blurb&mask.fieldPaths=title`;
//
// Scroll to end to see getStaticPaths & getStaticProps
//
// posts will be populated at build time by getStaticProps()
function Blog({ posts }) {
return (
<div className="container">
<Head>
<title>Next.js SSG on Firebase Hosting</title>
<link rel="icon" href="/favicon.ico" />
</Head>
<main>
<Header />
<h1 className="title">
Welcome to{' '}
<a href="https://github.com/jthegedus/firebase-gcp-examples">
Next.js SSG on Firebase
</a>
</h1>
<p className="description">Blog Posts</p>
<div className="grid">
{posts.map((post) => (
<Link href="posts/[slug]" as={`/posts/${post.slug}`} key={`${post.slug}`}>
<a className="card">
<h3>{post.title} →</h3>
<p>{post.blurb}</p>
</a>
</Link>
))}
</div>
</main>
<Footer />
<style jsx>{`
.container {
min-height: 100vh;
padding: 0 0.5rem;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
main {
padding: 5rem 0;
flex: 1;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
a {
color: inherit;
text-decoration: none;
}
.title a {
color: #0070f3;
text-decoration: none;
}
.title a:hover,
.title a:focus,
.title a:active {
text-decoration: underline;
}
.title {
margin: 0;
line-height: 1.15;
font-size: 4rem;
}
.title,
.description {
text-align: center;
}
.description {
line-height: 1.5;
font-size: 1.5rem;
}
code {
background: #fafafa;
border-radius: 5px;
padding: 0.75rem;
font-size: 1.1rem;
font-family: Menlo, Monaco, Lucida Console, Liberation Mono,
DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier New, monospace;
}
.grid {
display: flex;
align-items: center;
justify-content: center;
flex-wrap: wrap;
max-width: 800px;
margin-top: 3rem;
}
.card {
margin: 1rem;
flex-basis: 45%;
padding: 1.5rem;
text-align: left;
color: inherit;
text-decoration: none;
border: 1px solid #eaeaea;
border-radius: 10px;
transition: color 0.15s ease, border-color 0.15s ease;
}
.card:hover,
.card:focus,
.card:active {
color: #0070f3;
border-color: #0070f3;
}
.card h3 {
margin: 0 0 1rem 0;
font-size: 1.5rem;
}
.card p {
margin: 0;
font-size: 1.25rem;
line-height: 1.5;
}
@media (max-width: 600px) {
.grid {
width: 100%;
flex-direction: column;
}
}
`}</style>
<style jsx global>{`
main {
max-width: 800px;
margin: 20px auto 0px auto;
}
html,
body {
padding: 0;
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto,
Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue,
sans-serif;
}
* {
box-sizing: border-box;
}
`}</style>
</div>
);
}
// This function gets called at build time on server-side.
// It won't be called on client-side, so you can even do
// direct database queries. See the "Technical details" section.
export async function getStaticProps() {
// Call an external API endpoint to get posts.
const res = await fetch(FirestoreBlogPostsURL);
const posts = await res.json();
const finalPosts = posts.documents.map((post) => {
return {
slug: post.name.split('/').pop(), // naively use documentId as slug
title: post.fields.title.stringValue,
blurb: post.fields.blurb.stringValue,
};
});
// By returning { props: posts }, the Blog component
// will receive `posts` as a prop at build time
return {
props: {
posts: finalPosts,
},
};
}
export default Blog;
|
import Layout from '@/layout/admin'
import lazy from '@/components/Lazy'
export default {
path: '/admin',
name: 'home',
component: Layout,
childRoutes: [
{ path: '', component: lazy(() => import('@/views/admin/home')) },
{ path: 'article/edit/:id', component: lazy(() => import('@/views/admin/article/edit')) },
{ path: 'article/add', component: lazy(() => import('@/views/admin/article/edit')) },
{ path: 'article/manager', component: lazy(() => import('@/views/admin/article/manager')) },
{ path: 'user', component: lazy(() => import('@/views/admin/user')) }
]
}
|
/**
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
* @providesModule RelayTaskScheduler
* @typechecks
* @flow
*/
'use strict';
var Promise = require('Promise');
var invariant = require('invariant');
type TaskCallback = () => void;
type TaskExecutor = () => void;
var queue: Array<TaskCallback> = [];
var schedule: ?(executeTask: TaskExecutor) => void;
var running: boolean = false;
/**
* Task scheduler used by Relay internals. Each task is a synchronous unit of
* work that can be deferred by an injected scheduler function. For example,
* an injected scheduler can defer each task to the next animation frame:
*
* RelayTaskScheduler.injectScheduler(function(executeTask) {
* // This function will be invoked whenever a task is enqueued. It will not
* // be invoked again until `executeTask` has been invoked. Also, invoking
* // `executeTask` more than once is an error.
* requestAnimationFrame(executeTask);
* });
*
* By default, the next task is executed synchronously after the previous one is
* finished. An injected scheduler using `setImmediate` can alter this behavior.
*/
var RelayTaskScheduler = {
/**
* @public
*
* Injects a scheduling function that is invoked with a callback that will
* execute the next unit of work. The callback will return a promise that
* resolves with a new callback when the next unit of work is available.
*/
injectScheduler: function(
injectedScheduler: (executeTask: TaskExecutor) => void
): void {
schedule = injectedScheduler;
},
/**
* @internal
*
* Enqueues one or more callbacks that each represent a synchronous unit of
* work that can be scheduled to be executed at a later time.
*
* The return value of each callback will be passed in as an argument to the
* next callback. If one of the callbacks throw an error, the execution will
* be aborted and the returned promise be rejected with the thrown error.
* Otherwise, the returned promise will be resolved with the return value of
* the last callback. For example:
*
* RelayTaskScheduler.await(
* function() {
* return 'foo';
* },
* function(foo) {
* return 'bar';
* }
* ).then(
* function(bar) {
* // ...
* }
* );
*
* RelayTaskScheduler.await(
* function() {
* return 'foo';
* },
* function(foo) {
* throw new Error();
* },
* function() {
* // Never executed.
* }
* ).catch(
* function(error) {}
* );
*/
await: function(...callbacks: Array<(value: any) => any>): Promise<any> {
var promise = new Promise((resolve, reject) => {
var nextIndex = 0;
var error = null;
function enqueueNext(value: any): void {
if (error) {
reject(error);
return;
}
if (nextIndex >= callbacks.length) {
resolve(value);
} else {
queue.push(function(): void {
enqueueNext((function(): any {
var nextCallback = callbacks[nextIndex++];
try {
value = nextCallback(value);
} catch (e) {
error = e;
value = undefined;
}
return value;
})());
});
}
}
enqueueNext(undefined);
});
scheduleIfNecessary();
return promise;
}
};
function scheduleIfNecessary(): void {
if (running) {
return;
}
if (queue.length) {
running = true;
var executeTask = createTaskExecutor(queue.shift());
if (schedule) {
schedule(executeTask);
} else {
executeTask();
}
} else {
running = false;
}
}
function createTaskExecutor(callback: TaskCallback): TaskExecutor {
var invoked = false;
return function() {
invariant(!invoked, 'RelayTaskScheduler: Tasks can only be executed once.');
invoked = true;
invokeWithinScopedQueue(callback);
running = false;
scheduleIfNecessary();
};
}
function invokeWithinScopedQueue(callback: TaskCallback): void {
var originalQueue = queue;
queue = [];
try {
callback();
} finally {
Array.prototype.unshift.apply(originalQueue, queue);
queue = originalQueue;
}
}
module.exports = RelayTaskScheduler;
|
(function( $ ){
// 当domReady的时候开始初始化
$(function() {
var $wrap = $('#uploader'),
// 图片容器
$queue = $( '<ul class="filelist"></ul>' )
.appendTo( $wrap.find( '.queueList' ) ),
// 状态栏,包括进度和控制按钮
$statusBar = $wrap.find( '.statusBar' ),
// 文件总体选择信息。
$info = $statusBar.find( '.info' ),
// 上传按钮
$upload = $wrap.find( '.uploadBtn' ),
// 没选择文件之前的内容。
$placeHolder = $wrap.find( '.placeholder' ),
$progress = $statusBar.find( '.progress' ).hide(),
// 添加的文件数量
fileCount = 0,
// 添加的文件总大小
fileSize = 0,
// 优化retina, 在retina下这个值是2
ratio = window.devicePixelRatio || 1,
// 缩略图大小
thumbnailWidth = 110 * ratio,
thumbnailHeight = 110 * ratio,
// 可能有pedding, ready, uploading, confirm, done.
state = 'pedding',
// 所有文件的进度信息,key为file id
percentages = {},
// 判断浏览器是否支持图片的base64
isSupportBase64 = ( function() {
var data = new Image();
var support = true;
data.onload = data.onerror = function() {
if( this.width != 1 || this.height != 1 ) {
support = false;
}
}
data.src = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==";
return support;
} )(),
// 检测是否已经安装flash,检测flash的版本
flashVersion = ( function() {
var version;
try {
version = navigator.plugins[ 'Shockwave Flash' ];
version = version.description;
} catch ( ex ) {
try {
version = new ActiveXObject('ShockwaveFlash.ShockwaveFlash')
.GetVariable('$version');
} catch ( ex2 ) {
version = '0.0';
}
}
version = version.match( /\d+/g );
return parseFloat( version[ 0 ] + '.' + version[ 1 ], 10 );
} )(),
supportTransition = (function(){
var s = document.createElement('p').style,
r = 'transition' in s ||
'WebkitTransition' in s ||
'MozTransition' in s ||
'msTransition' in s ||
'OTransition' in s;
s = null;
return r;
})(),
// WebUploader实例
uploader;
if ( !WebUploader.Uploader.support('flash') && WebUploader.browser.ie ) {
// flash 安装了但是版本过低。
if (flashVersion) {
(function(container) {
window['expressinstallcallback'] = function( state ) {
switch(state) {
case 'Download.Cancelled':
alert('您取消了更新!')
break;
case 'Download.Failed':
alert('安装失败')
break;
default:
alert('安装已成功,请刷新!');
break;
}
delete window['expressinstallcallback'];
};
var swf = './expressInstall.swf';
// insert flash object
var html = '<object type="application/' +
'x-shockwave-flash" data="' + swf + '" ';
if (WebUploader.browser.ie) {
html += 'classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" ';
}
html += 'width="100%" height="100%" style="outline:0">' +
'<param name="movie" value="' + swf + '" />' +
'<param name="wmode" value="transparent" />' +
'<param name="allowscriptaccess" value="always" />' +
'</object>';
container.html(html);
})($wrap);
// 压根就没有安转。
} else {
$wrap.html('<a href="http://www.adobe.com/go/getflashplayer" target="_blank" border="0"><img alt="get flash player" src="http://www.adobe.com/macromedia/style_guide/images/160x41_Get_Flash_Player.jpg" /></a>');
}
return;
} else if (!WebUploader.Uploader.support()) {
alert( 'Web Uploader 不支持您的浏览器!');
return;
}
// 实例化
uploader = WebUploader.create({
pick: {
id: '#filePicker',
label: '点击选择图片'
},
formData: {
imagePid:imagePid,
imageType:imageType,
associationId:workerId
},
dnd: '#dndArea',
paste: '#uploader',
swf: '../../dist/Uploader.swf',
chunked: false,
chunkSize: 5*1024 * 1024,
// server: '../../server/fileupload.php',
server: $("#ctx").val()+'/uploadImage/uploaderAssociation',
// runtimeOrder: 'flash',
accept: {
title: 'Images',
extensions: 'jpg,png',
mimeTypes: 'image/*'
},
duplicate :false,
// 禁掉全局的拖拽功能。这样不会出现图片拖进页面的时候,把图片打开。
disableGlobalDnd: true,
fileNumLimit: 1,
fileSizeLimit: 5 * 1024 * 1024, // 200 M
fileSingleSizeLimit: 2 * 1024 * 1024 // 50 M
});
// 拖拽时不接受 js, txt 文件。
uploader.on( 'dndAccept', function( items ) {
var denied = false,
len = items.length,
i = 0,
// 修改js类型
unAllowed = 'text/plain;application/javascript ';
for ( ; i < len; i++ ) {
// 如果在列表里面
if ( ~unAllowed.indexOf( items[ i ].type ) ) {
denied = true;
break;
}
}
return !denied;
});
// 文件上传成功
/* uploader.on('uploadSuccess', function(file,ret){
if(ret.status == 1){
// 上传成功
$('#img_box').attr('src',"__ROOT__" + ret.url);
}else{
// 上传错误或失败
}
});
*/
uploader.on('uploadSuccess', function(file,response) {
//window.parent.frames.appendNewImage();
var fileId = response._raw;
if(fileId.length == 32){
//alert(file.name);
//alert("上传成功");
window.parent.document.getElementById('mainFrame').contentWindow.reloadImage();
}
});
// 添加“添加文件”的按钮,
uploader.addButton({
id: '#filePicker2',
label: '继续添加'
});
uploader.on('ready', function() {
window.uploader = uploader;
});
// 当有文件添加进来时执行,负责view的创建
function addFile( file ) {
var $li = $( '<li id="' + file.id + '">' +
'<p class="title">' + file.name + '</p>' +
'<p class="imgWrap"></p>'+
'<p class="progress"><span></span></p>' +
'</li>' ),
$btns = $('<div class="file-panel">' +
'<span class="cancel">删除</span>' +
'<span class="rotateRight">向右旋转</span>' +
'<span class="rotateLeft">向左旋转</span></div>').appendTo( $li ),
$prgress = $li.find('p.progress span'),
$wrap = $li.find( 'p.imgWrap' ),
$info = $('<p class="error"></p>'),
showError = function( code ) {
switch( code ) {
case 'exceed_size':
text = '文件大小超出';
break;
case 'interrupt':
text = '上传暂停';
break;
default:
text = '上传失败,请重试';
break;
}
$info.text( text ).appendTo( $li );
};
if ( file.getStatus() === 'invalid' ) {
showError( file.statusText );
} else {
// @todo lazyload
$wrap.text( '预览中' );
var file2= file;
uploader.makeThumb( file, function( error, src ) {
var img;
if ( error ) {
$wrap.text( '不能预览' );
return;
}
imgWidth = file._info.width;
imgHeight = file._info.height;
/*if(!(imgWidth <= 295 && imgHeight <= 413) ){
alert('图片尺寸不符合要求,上传图片的尺寸应小于等于295*413');
uploader.removeFile( file );
}*/
if( isSupportBase64 ) {
img = $('<img src="'+src+'">');
$wrap.empty().append( img );
} else {
$.ajax('../../server/preview.php', {
method: 'POST',
data: src,
dataType:'json'
}).done(function( response ) {
if (response.result) {
img = $('<img src="'+response.result+'">');
$wrap.empty().append( img );
} else {
$wrap.text("预览出错");
}
});
}
}, thumbnailWidth, thumbnailHeight );
percentages[ file.id ] = [ file.size, 0 ];
file.rotation = 0;
}
file.on('statuschange', function( cur, prev ) {
if ( prev === 'progress' ) {
$prgress.hide().width(0);
} else if ( prev === 'queued' ) {
$li.off( 'mouseenter mouseleave' );
$btns.remove();
}
// 成功
if ( cur === 'error' || cur === 'invalid' ) {
// console.log( file.statusText );
showError( file.statusText );
percentages[ file.id ][ 1 ] = 1;
} else if ( cur === 'interrupt' ) {
showError( 'interrupt' );
} else if ( cur === 'queued' ) {
percentages[ file.id ][ 1 ] = 0;
} else if ( cur === 'progress' ) {
$info.remove();
$prgress.css('display', 'block');
} else if ( cur === 'complete' ) {
$li.append( '<span class="success"></span>' );
}
$li.removeClass( 'state-' + prev ).addClass( 'state-' + cur );
});
$li.on( 'mouseenter', function() {
$btns.stop().animate({height: 30});
});
$li.on( 'mouseleave', function() {
$btns.stop().animate({height: 0});
});
$btns.on( 'click', 'span', function() {
var index = $(this).index(),
deg;
switch ( index ) {
case 0:
uploader.removeFile( file );
return;
case 1:
file.rotation += 90;
break;
case 2:
file.rotation -= 90;
break;
}
if ( supportTransition ) {
deg = 'rotate(' + file.rotation + 'deg)';
$wrap.css({
'-webkit-transform': deg,
'-mos-transform': deg,
'-o-transform': deg,
'transform': deg
});
} else {
$wrap.css( 'filter', 'progid:DXImageTransform.Microsoft.BasicImage(rotation='+ (~~((file.rotation/90)%4 + 4)%4) +')');
// use jquery animate to rotation
// $({
// rotation: rotation
// }).animate({
// rotation: file.rotation
// }, {
// easing: 'linear',
// step: function( now ) {
// now = now * Math.PI / 180;
// var cos = Math.cos( now ),
// sin = Math.sin( now );
// $wrap.css( 'filter', "progid:DXImageTransform.Microsoft.Matrix(M11=" + cos + ",M12=" + (-sin) + ",M21=" + sin + ",M22=" + cos + ",SizingMethod='auto expand')");
// }
// });
}
});
$li.appendTo( $queue );
}
// 负责view的销毁
function removeFile( file ) {
var $li = $('#'+file.id);
delete percentages[ file.id ];
updateTotalProgress();
$li.off().find('.file-panel').off().end().remove();
}
function updateTotalProgress() {
var loaded = 0,
total = 0,
spans = $progress.children(),
percent;
$.each( percentages, function( k, v ) {
total += v[ 0 ];
loaded += v[ 0 ] * v[ 1 ];
} );
percent = total ? loaded / total : 0;
spans.eq( 0 ).text( Math.round( percent * 100 ) + '%' );
spans.eq( 1 ).css( 'width', Math.round( percent * 100 ) + '%' );
updateStatus();
}
function updateStatus() {
var text = '', stats;
if ( state === 'ready' ) {
text = '选中' + fileCount + '张图片,共' +
WebUploader.formatSize( fileSize ) + '。';
} else if ( state === 'confirm' ) {
stats = uploader.getStats();
if ( stats.uploadFailNum ) {
text = '已成功上传' + stats.successNum+ '张照片至XX相册,'+
stats.uploadFailNum + '张照片上传失败,<a class="retry" href="#">重新上传</a>失败图片或<a class="ignore" href="#">忽略</a>'
}
} else {
stats = uploader.getStats();
text = '共' + fileCount + '张(' +
WebUploader.formatSize( fileSize ) +
'),已上传' + stats.successNum + '张';
if ( stats.uploadFailNum ) {
text += ',失败' + stats.uploadFailNum + '张';
}
}
$info.html( text );
}
function setState( val ) {
var file, stats;
if ( val === state ) {
return;
}
$upload.removeClass( 'state-' + state );
$upload.addClass( 'state-' + val );
state = val;
switch ( state ) {
case 'pedding':
$placeHolder.removeClass( 'element-invisible' );
$queue.hide();
$statusBar.addClass( 'element-invisible' );
uploader.refresh();
break;
case 'ready':
$placeHolder.addClass( 'element-invisible' );
$( '#filePicker2' ).removeClass( 'element-invisible');
$queue.show();
$statusBar.removeClass('element-invisible');
uploader.refresh();
break;
case 'uploading':
$( '#filePicker2' ).addClass( 'element-invisible' );
$progress.show();
$upload.text( '暂停上传' );
break;
case 'paused':
$progress.show();
$upload.text( '继续上传' );
break;
case 'confirm':
$progress.hide();
$( '#filePicker2' ).removeClass( 'element-invisible' );
$upload.text( '开始上传' );
stats = uploader.getStats();
if ( stats.successNum && !stats.uploadFailNum ) {
setState( 'finish' );
return;
}
break;
case 'finish':
stats = uploader.getStats();
if ( stats.successNum ) {
alert( '上传成功' );
} else {
// 没有成功的图片,重设
state = 'done';
location.reload();
}
break;
}
updateStatus();
}
uploader.onUploadProgress = function( file, percentage ) {
var $li = $('#'+file.id),
$percent = $li.find('.progress span');
$percent.css( 'width', percentage * 100 + '%' );
// console.log(percentages);
// console.log(percentage);
// console.log(file.id);
// console.log();
//percentages[ file.id ][ 1 ] = percentage;
updateTotalProgress();
};
uploader.onFileQueued = function( file ) {
fileCount++;
fileSize += file.size;
if ( fileCount === 1 ) {
$placeHolder.addClass( 'element-invisible' );
$statusBar.show();
}
addFile( file );
setState( 'ready' );
updateTotalProgress();
/*uploader.makeThumb(file, function (error, src) {//验证图片尺寸
imgWidth = file._info.width;
imgHeight = file._info.height;
if(!(imgWidth <= 295 && imgHeight <= 413) ){
alert('图片尺寸不符合要求,请上传符合比例的图片');
//uploader.reset();
//$('.img-name').val('')
return false;
}else{
fileCount++;
fileSize += file.size;
if ( fileCount === 1 ) {
$placeHolder.addClass( 'element-invisible' );
$statusBar.show();
}
addFile( file );
setState( 'ready' );
updateTotalProgress();
}
}, 100, 100);*/
//return false;
};
uploader.onFileDequeued = function( file ) {
fileCount--;
fileSize -= file.size;
if ( !fileCount ) {
setState( 'pedding' );
}
removeFile( file );
updateTotalProgress();
};
uploader.on( 'all', function( type ) {
var stats;
switch( type ) {
case 'uploadFinished':
setState( 'confirm' );
break;
case 'startUpload':
setState( 'uploading' );
break;
case 'stopUpload':
setState( 'paused' );
break;
}
});
uploader.onError = function( code ) {
alert( 'Eroor: ' + code );
};
$upload.on('click', function() {
if ( $(this).hasClass( 'disabled' ) ) {
return false;
}
if ( state === 'ready' ) {
uploader.upload();
} else if ( state === 'paused' ) {
uploader.upload();
} else if ( state === 'uploading' ) {
uploader.stop();
}
});
$info.on( 'click', '.retry', function() {
uploader.retry();
} );
$info.on( 'click', '.ignore', function() {
alert( 'todo' );
} );
$upload.addClass( 'state-' + state );
updateTotalProgress();
});
})( jQuery ); |
#!/usr/bin/env node
const { JsonRpc } = require('eosjs')
const fetch = (...args) =>
import('node-fetch').then(({ default: fetch }) => fetch(...args))
const {
generalContractScope,
edenContractScope,
massiveDB
} = require('../config')
const HAPI_EOS_API_ENDPOINT =
process.env.HAPI_EOS_API_ENDPOINT || 'https://jungle.edenia.cloud'
const HAPI_RATING_CONTRACT = process.env.HAPI_RATING_CONTRACT || 'rateproducer'
const getUserRatings = async scope => {
const eos = new JsonRpc(HAPI_EOS_API_ENDPOINT, { fetch })
try {
const ratings = await eos.get_table_rows({
json: true,
code: HAPI_RATING_CONTRACT,
scope: scope,
table: 'rating',
limit: 1000,
reverse: false,
show_payer: false
})
return ratings
} catch (err) {
console.log(`Database connection error ${err}`)
return []
}
}
const updateUserRatings = async () => {
console.log(`==== Updating ratings ====`)
const db = await massiveDB
if (!db) throw new Error('Missing massive instance')
const generalRatings = await getUserRatings(generalContractScope)
const edenRatings = await getUserRatings(edenContractScope)
const allRatings = [...generalRatings.rows, ...edenRatings.rows]
for (const singleRating of allRatings) {
const { user, bp, ...ratings } = singleRating
const ratingsCore = { user, bp, ratings }
try {
const resultRatingsSave = await db.user_ratings.save(ratingsCore)
const dbResult =
resultRatingsSave || (await db.user_ratings.insert(ratingsCore))
console.log(
`Save or insert of ${ratingsCore.user}-${ratingsCore.bp} was ${
dbResult ? 'SUCCESSFULL' : 'UNSUCCESSFULL'
}`
)
} catch (err) {
console.log(`Error: ${err}`)
}
}
}
updateUserRatings()
|
'use babel';
import { CompositeDisposable } from 'atom';
import { DebuggerActions, BreakpointActions } from './actions';
import { DebuggerStateStore as StateStore } from './stores';
function _getActiveProjectRoot() {
let editor = atom.workspace.getActiveTextEditor();
let paths = atom.workspace.project.relativizePath(editor.getDirectoryPath());
return paths[0];
}
export default class AtomDelveCommands {
constructor(atomDelve) {
this.subscriptions = new CompositeDisposable();
this.atomDelve = atomDelve;
// Start New Debug Session
this.subscriptions.add(atom.commands.add(
'atom-workspace', 'atom-delve:start-debugger', () =>
this.atomDelve.startSession('debug', _getActiveProjectRoot())
));
// Kill Debugger & End Session
this.subscriptions.add(atom.commands.add(
'atom-workspace', 'atom-delve:kill', () => {
if (this.atomDelve.serverMgr && this.atomDelve.serverMgr._pid) {
let pid = this.atomDelve.serverMgr._pid;
this.atomDelve.stopSession();
atom.notifications.addInfo(`Killed Delve server with pid ${pid}`);
}
}
));
// Restart Process
this.subscriptions.add(atom.commands.add(
'atom-workspace', 'atom-delve:restart-process', () =>
DebuggerActions.restartProcess()
));
// Continue Debugger
this.subscriptions.add(atom.commands.add(
'atom-workspace', 'atom-delve:continue', () =>
DebuggerActions.continueToBreakpoint()
));
// Next in source
this.subscriptions.add(atom.commands.add(
'atom-workspace', 'atom-delve:next', () =>
DebuggerActions.nextInScope()
));
// Step Debugger
this.subscriptions.add(atom.commands.add(
'atom-workspace', 'atom-delve:step', () =>
DebuggerActions.step()
));
// Step Instruction
this.subscriptions.add(atom.commands.add(
'atom-workspace', 'atom-delve:step-instruction', () =>
DebuggerActions.stepInstruction()
));
// Clear Breakpoints
this.subscriptions.add(atom.commands.add(
'atom-workspace', 'atom-delve:clear-breakpoints', () =>
BreakpointActions.clearAllBreakpoints()
));
// Goto Current Source Line
this.subscriptions.add(atom.commands.add(
'atom-workspace', 'atom-delve:goto-current-scope', () => {
const scope = StateStore.getScope();
if (!scope)
return atom.notifications.addWarning('A scope is not established');
atom.workspace.open(scope.file, {
initialLine: scope.line - 1,
searchAllPanes: true,
pending: true
}).catch(err =>
atom.notifications.addError(
`Cannot navigate to ${scope.file}:${scope.line}`,
{ detail: err.toString() }
)
);
}
));
}
dispose() {
this.subscriptions.dispose();
}
}
|
import styled from 'styled-components';
export const ArticleContainer = styled.article`
position: relative;
max-width: 1000px;
padding: 6rem 2rem;
border-radius: 20px;
display: grid;
grid-gap: 1rem;
justify-content: start;
align-content: center;
align-items: center;
grid-template-areas: "img" "header" "sub";
@media only screen and (min-width: 800px) {
grid-template-areas: "img header header" "img sub sub";
height: 40vh;
}
img {
grid-area: img;
width: 200px;
height: 200px;
position: absolute;
bottom: -2.5rem;
left: 2rem;
@media only screen and (min-width: 800px) {
position: initial;
}
}
header {
grid-area: header;
@media only screen and (min-width: 800px) {
padding-left: 2rem;
}
h3 {
font-family: "Playfair Display";
font-weight: bold;
font-size: 3rem;
letter-spacing: 0.05em;
color: ${({ theme }) => theme.mint};
}
small {
font-weight: normal;
line-height: 3rem;
font-size: 1rem;
letter-spacing: 0.05em;
color: rgba(63, 61, 86, 0.6);
}
}
section {
grid-area: sub;
@media only screen and (min-width: 800px) {
padding-left: 2rem;
}
h1,
h2,
h3,
h4,
h5 {
font-family: "Playfair Display";
}
h2 {
line-height: 3rem;
font-size: 2.5rem;
}
h3 {
line-height: 2.5rem;
font-size: 2rem;
}
p {
font-size: 1.4rem;
letter-spacing: 0.05em;
color: rgba(63, 61, 86, 0.6);
padding: 3rem 0;
}
li {
font-size: 1.4rem;
margin: 0 2rem;
letter-spacing: 0.05em;
color: rgba(63, 61, 86, 0.9);
font-weight: bold;
}
blockquote {
p {
padding-left: 2rem;
line-height: 2.4rem;
font-size: 1.6rem;
color: rgba(63, 61, 86, 0.8);
border: none;
}
}
}
`;
export const End = styled.div`
padding: 2rem;
p {
font-size: 1.4rem;
letter-spacing: 0.05em;
color: rgba(63, 61, 86, 0.85);
}
`;
|
from tkinter import *
from tkinter.ttk import Progressbar
from tkinter import ttk
window = Tk()
window.title("Welcome to LikeGeeks app")
window.geometry('350x200')
style = ttk.Style()
style.theme_use('default')
style.configure("black.Horizontal.TProgressbar", background='blue')
bar = Progressbar(window, length=200, style='black.Horizontal.TProgressbar')
bar['value'] = 90
bar.grid(column=0, row=0)
window.mainloop() |
import 'babel-polyfill';
import assert from 'assert';
import d from '../src/main';
/**
* Mock browser APIs
*/
class HTMLElement {
constructor(tagName) {
this.tagName = tagName;
this.children = [];
this.attributes = [];
}
appendChild(childNode) {
this.children.push(childNode);
}
setAttribute(name, value) {
this.attributes.push({
name: name,
value: value
});
}
}
global.HTMLElement = HTMLElement;
class TextNode {
constructor(content) {
if (typeof content === "number") {
content = content.toString();
}
this.innerHTML = content;
}
}
global.TextNode = TextNode;
global.document = {
createElement: function(tagName) {
return new HTMLElement(tagName);
},
createTextNode: function(content) {
return new TextNode(content);
}
}
describe('DOM', () => {
it('should create div', () => {
const realNode = d('div');
const fakeNode = document.createElement('div');
assert.deepEqual(realNode, fakeNode);
});
it('should set class passing the second argument as string', () => {
const realNode = d('div', 'abc');
const fakeNode = document.createElement('div');
fakeNode.setAttribute('class', 'abc');
assert.deepEqual(realNode, fakeNode);
});
it('should set attributes passing second argument as object', () => {
const realNode = d('div', { id: 'test-id', name: 'test-name' });
const fakeNode = document.createElement('div');
fakeNode.setAttribute('id', 'test-id');
fakeNode.setAttribute('name', 'test-name');
assert.deepEqual(realNode, fakeNode);
});
it('should append HTMLElement child', () => {
const realNode = d('div', false, d('i'));
const fakeChild = document.createElement('i');
const fakeNode = document.createElement('div');
fakeNode.appendChild(fakeChild);
assert.deepEqual(realNode, fakeNode);
});
it('should append string child', () => {
const content = 'Hello test';
const realNode = d('div', false, content);
const fakeChild = document.createTextNode(content);
const fakeNode = document.createElement('div');
fakeNode.appendChild(fakeChild);
assert.deepEqual(realNode, fakeNode);
});
it('should append numeric child', () => {
const content = 123;
const realNode = d('div', false, content);
const fakeChild = document.createTextNode(content);
const fakeNode = document.createElement('div');
fakeNode.appendChild(fakeChild);
assert.deepEqual(realNode, fakeNode);
});
it('should append array of children', () => {
const children = { a: 'h1', b: 'text node', c: 123 };
const realNode = d('div', false, [
d(children.a), children.b, children.c
]);
const fakeChildA = document.createElement(children.a);
const fakeChildB = document.createTextNode(children.b);
const fakeChildC = document.createTextNode(children.c);
const fakeNode = document.createElement('div');
fakeNode.appendChild(fakeChildA);
fakeNode.appendChild(fakeChildB);
fakeNode.appendChild(fakeChildC);
assert.deepEqual(realNode, fakeNode);
});
}) |
const express = require("express");
const utils = require("./utils");
const app = express();
const PORT = process.env.PORT || 3000;
app.use(function(req, res, next) {
res.header("Access-Control-Allow-Origin", "*");
res.header(
"Access-Control-Allow-Headers",
"Origin, X-Requested-With, Content-Type, Accept"
);
next();
});
app.get("/", (req, res) => {
user_id = 1;
utils.get_activity_table(user_id, result => {
res.send(result);
});
});
app.get("/user/:user_id", (req, res) => {
user_id = 1;
utils.get_activity_table(req.params.user_id, result => {
let date = new Date().toISOString();
console.log(date);
res.send(result);
});
});
app.listen(PORT, () => console.log(`Activity app listening on port ${PORT}!`));
module.exports = app;
|
var readline = require('readline');
var fs = require('fs');
var util = require('util');
var path = require('path');
var glob = require('glob');
var helper = require('./helper');
var launcher = require('./launcher');
var logger = require('./logger');
var constant = require('./constants');
var log = logger.create('init');
var CONFIG_TPL_PATH = __dirname + '/../config.template';
var COLORS_ON = {
END: '\x1B[39m',
NYAN: '\x1B[36m',
GREEN: '\x1B[32m',
BOLD: '\x1B[1m',
bold: function(str) {
return this.BOLD + str + '\x1B[22m';
},
green: function(str) {
return this.GREEN + str + this.END;
}
};
// nasty global
var colors = COLORS_ON;
var COLORS_OFF = {
END: '',
NYAN: '',
GREEN: '',
BOLD: '',
bold: function(str) {
return str;
},
green: function(str) {
return str;
}
};
var validatePattern = function(value) {
if (!glob.sync(value).length) {
log.warn('There is no file matching this pattern.\n' + colors.NYAN);
}
};
var validateBrowser = function(value) {
var proto = launcher[value + 'Browser'].prototype;
var defaultCmd = proto.DEFAULT_CMD[process.platform];
var envCmd = process.env[proto.ENV_CMD];
if (!fs.existsSync(defaultCmd) && (!envCmd || !fs.existsSync(envCmd))) {
log.warn('No binary for ' + value + '.' + '\n Create symlink at "' + defaultCmd + '", or set "' + proto.ENV_CMD + '" env variable.\n' + colors.NYAN);
}
};
var questions = [{
id: 'framework',
question: 'Which testing framework do you want to use ?',
hint: 'Press tab to list possible options. Enter to move to the next question.',
options: ['jasmine', 'mocha', 'qunit', '']
}, {
id: 'requirejs',
question: 'Do you want to use Require.js ?',
hint: 'This will add Require.js adapter into files.\nPress tab to list possible options. Enter to move to the next question.',
options: ['no', 'yes'],
boolean: true
}, {
id: 'browsers',
question: 'Do you want to capture a browser automatically ?',
hint: 'Press tab to list possible options. Enter empty string to move to the next question.',
options: ['Chrome', 'ChromeCanary', 'Firefox', 'Safari', 'PhantomJS', 'Opera', 'IE', ''],
validate: validateBrowser,
multiple: true
}, {
id: 'includedFiles',
question: 'Which files do you want to include with <script> tag ?',
hint: 'This should be a script that bootstraps your test by configuring Require.js and kicking __karma__.start()\nYou can use glob patterns, eg. "js/*.js" or "test/**/*Spec.js".\nEnter empty string to move to the next question.',
multiple: true,
validate: validatePattern,
condition: function(answers) {return answers.requirejs;}
}, {
id: 'files',
question: 'Which files do you want to test ?',
hint: 'You can use glob patterns, eg. "js/*.js" or "test/**/*Spec.js".\nEnter empty string to move to the next question.',
multiple: true,
validate: validatePattern
}, {
id: 'exclude',
question: 'Any files you want to exclude ?',
hint: 'You can use glob patterns, eg. "**/*.swp".\nEnter empty string to move to the next question.',
multiple: true,
validate: validatePattern
}, {
id: 'autoWatch',
question: 'Do you want Karma to watch all the files and run the tests on change ?',
hint: 'Press tab to list possible options.',
options: ['yes', 'no'],
boolean: true
}];
var StateMachine = function(rli) {
var currentQuestion;
var answers;
var currentOptions;
var currentOptionsPointer;
var pendingQuestionId;
var done;
this.onKeypress = function(key) {
if (!currentOptions || !key) {
return;
}
if (key.name === 'tab' || key.name === 'right' || key.name === 'down') {
this.suggestNextOption();
} else if (key.name === 'left' || key.name === 'up') {
currentOptionsPointer = currentOptionsPointer + currentOptions.length - 2;
this.suggestNextOption();
}
if (!key.ctrl && !key.meta && key.name !== 'enter' && key.name !== 'return') {
key.name = 'escape';
}
};
this.suggestNextOption = function() {
if (!currentOptions) {
return;
}
currentOptionsPointer = (currentOptionsPointer + 1) % currentOptions.length;
rli._deleteLineLeft();
rli._deleteLineRight();
rli.write(currentOptions[currentOptionsPointer]);
};
this.onLine = function(line) {
if (pendingQuestionId) {
line = line.trim();
if (currentOptions) {
currentOptionsPointer = currentOptions.indexOf(line);
if (currentOptionsPointer === -1) {
return;
}
}
if (line && currentQuestion.validate) {
currentQuestion.validate(line);
}
if (currentQuestion.boolean) {
line = (line === 'yes' || line === 'true' || line === 'on');
}
if (currentQuestion.multiple) {
answers[pendingQuestionId] = answers[pendingQuestionId] || [];
if (line) {
answers[pendingQuestionId].push(line);
rli.prompt();
if (currentOptions) {
currentOptions.splice(currentOptionsPointer, 1);
currentOptionsPointer = -1;
}
} else {
this.nextQuestion();
}
} else {
answers[pendingQuestionId] = line;
this.nextQuestion();
}
}
};
this.nextQuestion = function() {
rli.write(colors.END);
currentQuestion = questions.shift();
while (currentQuestion && currentQuestion.condition && !currentQuestion.condition(answers)) {
currentQuestion = questions.shift();
}
if (currentQuestion) {
pendingQuestionId = null;
rli.write('\n' + colors.bold(currentQuestion.question) + '\n');
rli.write(currentQuestion.hint + colors.NYAN + '\n');
currentOptions = currentQuestion.options || null;
currentOptionsPointer = -1;
pendingQuestionId = currentQuestion.id;
rli.prompt();
this.suggestNextOption();
} else {
pendingQuestionId = null;
currentOptions = null;
// end
done(answers);
}
};
this.process = function(_questions, _done) {
questions = _questions;
answers = {};
done = _done;
this.nextQuestion();
};
};
var quote = function(value) {
return '\'' + value + '\'';
};
var quoteNonIncludedPattern = function(value) {
return util.format('{pattern: %s, included: false}', quote(value));
};
var formatFiles = function(files) {
return files.join(',\n ');
};
var getBasePath = function(configFilePath, cwd) {
var configParts = path.dirname(configFilePath).split(path.sep);
var cwdParts = cwd.split(path.sep);
var base = [];
while (configParts.length && configParts[0] === cwdParts[0]) {
configParts.shift();
cwdParts.shift();
}
while (configParts.length) {
var part = configParts.shift();
if (part === '..') {
base.unshift(cwdParts.pop());
} else if (part !== '.') {
base.unshift('..');
}
}
return base.join(path.sep);
};
var getReplacementsFromAnswers = function(answers, basePath) {
var files = answers.files.map(answers.includedFiles ? quoteNonIncludedPattern : quote);
if (answers.includedFiles) {
files = answers.includedFiles.map(quote).concat(files);
}
if (answers.requirejs) {
files.unshift('REQUIRE_ADAPTER');
files.unshift('REQUIRE');
}
if (answers.framework) {
var framework = answers.framework.toUpperCase();
files.unshift(framework + '_ADAPTER');
files.unshift(framework);
}
return {
DATE: new Date(),
BASE_PATH: basePath,
FILES: formatFiles(files),
EXCLUDE: answers.exclude ? formatFiles(answers.exclude.map(quote)) : '',
AUTO_WATCH: answers.autoWatch ? 'true' : 'false',
BROWSERS: answers.browsers.map(quote).join(', ')
};
};
exports.init = function(config) {
var useColors = true;
var logLevel = constant.LOG_INFO;
if (helper.isDefined(config.colors)) {
colors = config.colors ? COLORS_ON : COLORS_OFF;
useColors = config.colors;
}
if (helper.isDefined(config.logLevel)) {
logLevel = config.logLevel;
}
logger.setup(logLevel, useColors);
// need to be registered before creating readlineInterface
process.stdin.on('keypress', function(s, key) {
sm.onKeypress(key);
});
var rli = readline.createInterface(process.stdin, process.stdout);
var sm = new StateMachine(rli, colors);
rli.on('line', sm.onLine.bind(sm));
sm.process(questions, function(answers) {
var cwd = process.cwd();
var configFile = config.configFile;
var replacements = getReplacementsFromAnswers(answers, getBasePath(configFile, process.cwd()));
var content = fs.readFileSync(CONFIG_TPL_PATH).toString().replace(/%(.*)%/g, function(a, key) {
return replacements[key];
});
var configFilePath = path.resolve(cwd, configFile);
fs.writeFileSync(configFilePath, content);
rli.write(colors.green('\nConfig file generated at "' + configFilePath + '".\n\n'));
rli.close();
});
};
|
import sys
if sys.version_info[0] == 3:
unicode = str
import django
from django.test import TestCase
from django.contrib.auth import get_user_model
from sqlalchemy import MetaData
from sqlalchemy.orm import aliased
from aldjemy.orm import construct_models, get_remote_field
from sample.models import Chapter, Book, Author, StaffAuthor, StaffAuthorProxy, Review
from a_sample.models import BookProxy
User = get_user_model()
class SimpleTest(TestCase):
def test_aldjemy_initialization(self):
self.assertTrue(Chapter.sa)
self.assertTrue(Book.sa)
self.assertTrue(Author.sa)
self.assertTrue(StaffAuthor.sa)
self.assertTrue(StaffAuthorProxy.sa)
self.assertTrue(Review.sa)
self.assertTrue(BookProxy.sa)
self.assertTrue(User.sa)
# Automatic Many to Many fields get the ``sa`` property
books_field = Author._meta.get_field("books")
if django.VERSION < (1, 9):
self.assertTrue(books_field.rel.through.sa)
else:
self.assertTrue(books_field.remote_field.through.sa)
def test_engine_override_test(self):
from aldjemy import core
self.assertEqual(core.get_connection_string(), "sqlite+pysqlite://")
def test_querying(self):
Book.objects.create(title="book title")
Book.objects.all()
self.assertEqual(Book.sa.query().count(), 1)
def test_user_model(self):
u = User.objects.create()
Author.objects.create(user=u)
a = Author.sa.query().first()
self.assertEqual(a.user.id, u.id)
class AliasesTest(TestCase):
multi_db = True # Django<2.2
databases = "__all__"
def test_engines_cache(self):
from aldjemy.core import Cache, get_engine
self.assertEqual(get_engine("default"), Cache.engines["default"])
self.assertEqual(get_engine("logs"), Cache.engines["logs"])
self.assertEqual(get_engine(), Cache.engines["default"])
self.assertNotEqual(get_engine("default"), get_engine("logs"))
def test_sessions(self):
from aldjemy.orm import get_session
from django.db import connections
session_default = get_session()
session_default2 = get_session("default")
self.assertEqual(session_default, session_default2)
session_logs = get_session("logs")
self.assertEqual(connections["default"].sa_session, session_default)
self.assertEqual(connections["logs"].sa_session, session_logs)
self.assertNotEqual(session_default, session_logs)
def test_logs(self):
from sample.models import Log
Log.objects.create(record="1")
Log.objects.create(record="2")
self.assertEqual(Log.objects.using("logs").count(), 2)
self.assertEqual(Log.sa.query().count(), 2)
self.assertEqual(Log.sa.query().all()[0].record, "1")
class AldjemyMetaTests(TestCase):
multi_db = True # Django<2.2
databases = "__all__"
def test_meta(self):
from sample.models import Log
Log.objects.create(record="foo")
foo = Log.sa.query().one()
self.assertEqual(unicode(foo), "foo")
self.assertEqual(foo.reversed_record, "oof")
self.assertFalse(hasattr(foo, "this_is_not_copied"))
class CustomMetaDataTests(TestCase):
def test_custom_metadata_schema(self):
"""Use a custom MetaData instance to add a schema."""
# The use-case for this functionality is to allow using
# Foreign Data Wrappers, each with a full set of Django
# tables, to copy between databases using SQLAlchemy
# and the automatically generation of aldjemy.
from sample.models import Log
metadata = MetaData(schema="arbitrary")
sa_models = construct_models(metadata)
self.assertEqual(sa_models[Log].table.schema, "arbitrary")
def test_custom_metadata_schema_aliased(self):
"""Make sure the aliased command works with the schema."""
# This was an issue that cropped up after things seemed
# to be generating properly, so we want to test it and
# make sure that it stays working.
from sample.models import Log
metadata = MetaData(schema="pseudorandom")
sa_models = construct_models(metadata)
aliased(sa_models[Log])
def test_many_to_many_through_self(self):
"""Make sure recursive through tables work."""
from sample.models import Person
through_field = Person._meta.get_field("parents")
if django.VERSION < (1, 9):
through = through_field.rel.through
else:
through = through_field.remote_field.through
metadata = MetaData(schema="unique")
sa_models = construct_models(metadata)
self.assertEqual(sa_models[through].table.schema, "unique")
def test_many_to_many_through_self_aliased(self):
"""Make sure aliased recursive through tables work."""
from sample.models import Person
through_field = Person._meta.get_field("parents")
if django.VERSION < (1, 9):
through = through_field.rel.through
else:
through = through_field.remote_field.through
metadata = MetaData(schema="unique")
sa_models = construct_models(metadata)
aliased(sa_models[through])
|
/**
* @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
/**
* @module list/ui/collapsibleview
*/
import { View, ButtonView } from 'ckeditor5/src/ui';
// eslint-disable-next-line ckeditor5-rules/ckeditor-imports
import dropdownArrowIcon from '@ckeditor/ckeditor5-ui/theme/icons/dropdown-arrow.svg';
import '../../../theme/collapsible.css';
/**
* A collapsible UI component. Consists of a labeled button and a container which can be collapsed
* by clicking the button. The collapsible container can be a host to other UI views.
*
* @protected
* @extends module:ui/view~View
*/
export default class CollapsibleView extends View {
/**
* Creates an instance of the collapsible view.
*
* @param {module:utils/locale~Locale} locale The {@link module:core/editor/editor~Editor#locale} instance.
* @param {Array.<module:ui/view~View>} [childViews] An optional array of initial child views to be inserted
* into the collapsible.
*/
constructor( locale, childViews ) {
super( locale );
const bind = this.bindTemplate;
/**
* `true` when the container with {@link #children} is collapsed. `false` otherwise.
*
* @observable
* @member {Boolean} #isCollapsed
*/
this.set( 'isCollapsed', false );
/**
* The text label of the {@link #buttonView}.
*
* @observable
* @member {String} #label
* @default 'Show more'
*/
this.set( 'label', '' );
/**
* The main button that, when clicked, collapses or expands the container with {@link #children}.
*
* @readonly
* @member {module:ui/button/buttonview~ButtonView} #buttonView
*/
this.buttonView = this._createButtonView();
/**
* A collection of the child views that can be collapsed by clicking the {@link #buttonView}.
*
* @readonly
* @member {module:ui/viewcollection~ViewCollection} #children
*/
this.children = this.createCollection();
/**
* The ID of the label inside the {@link #buttonView} that describes the collapsible
* container for assistive technologies. Set after the button was {@link #render rendered}.
*
* @private
* @readonly
* @observable
* @member {String} #_collapsibleAriaLabelUid
*/
this.set( '_collapsibleAriaLabelUid' );
if ( childViews ) {
this.children.addMany( childViews );
}
this.setTemplate( {
tag: 'div',
attributes: {
class: [
'ck',
'ck-collapsible',
bind.if( 'isCollapsed', 'ck-collapsible_collapsed' )
]
},
children: [
this.buttonView,
{
tag: 'div',
attributes: {
class: [
'ck',
'ck-collapsible__children'
],
role: 'region',
hidden: bind.if( 'isCollapsed', 'hidden' ),
'aria-labelledby': bind.to( '_collapsibleAriaLabelUid' )
},
children: this.children
}
]
} );
}
/**
* @inheritDoc
*/
render() {
super.render();
this._collapsibleAriaLabelUid = this.buttonView.labelView.element.id;
}
/**
* Creates the main {@link #buttonView} of the collapsible.
*
* @private
* @returns {module:ui/button/buttonview~ButtonView}
*/
_createButtonView() {
const buttonView = new ButtonView( this.locale );
const bind = buttonView.bindTemplate;
buttonView.set( {
withText: true,
icon: dropdownArrowIcon
} );
buttonView.extendTemplate( {
attributes: {
'aria-expanded': bind.to( 'isOn', value => String( value ) )
}
} );
buttonView.bind( 'label' ).to( this );
buttonView.bind( 'isOn' ).to( this, 'isCollapsed', isCollapsed => !isCollapsed );
buttonView.on( 'execute', () => {
this.isCollapsed = !this.isCollapsed;
} );
return buttonView;
}
}
|
(this.webpackJsonpdashboard=this.webpackJsonpdashboard||[]).push([[158],{143:function(e,t,a){},144:function(e,t,a){},146:function(e,t,a){},148:function(e,t,a){},149:function(e,t,a){},151:function(e,t,a){},152:function(e,t,a){},153:function(e,t,a){},154:function(e,t,a){},155:function(e,t,a){},203:function(e,t,a){},22:function(e,t,a){"use strict";var n=a(2),i=a(3),s=a(6),r=a(5),o=a(4),l=a(0),c=a.n(l),h=a(45),u=a(10),d=function(e){Object(r.a)(a,e);var t=Object(o.a)(a);function a(e){var i;return Object(n.a)(this,a),(i=t.call(this,e)).onResize=i.onResize.bind(Object(s.a)(i)),i.initialState={height:e.height,width:e.width,rgb:null,depth:null},i.state=i.initialState,i}return Object(i.a)(a,[{key:"onResize",value:function(e,t,a,n,i){this.setState({width:parseInt(a.style.width,10),height:parseInt(a.style.height,10)})}},{key:"componentDidMount",value:function(){this.props.stateManager&&this.props.stateManager.connect(this)}},{key:"componentWillUnmount",value:function(){this.props.stateManager&&this.props.stateManager.disconnect(this)}},{key:"render",value:function(){var e=this.state,t=e.height,a=e.width,n=e.rgb,i=e.depth,s=this.props,r=s.offsetW,o=s.offsetH,l=s.isMobile,d=n;return null===n&&null==i?l?c.a.createElement("p",null,"Loading..."):c.a.createElement(h.a,{default:{x:r,y:o,width:a,height:t},lockAspectRatio:!0,onResize:this.onResize},c.a.createElement("p",null,"Loading...")):("depth"===this.props.type&&(d=i),l?c.a.createElement(u.Stage,{width:a,height:t},c.a.createElement(u.Layer,null,c.a.createElement(u.Image,{image:d,width:a,height:t}))):c.a.createElement(h.a,{default:{x:r,y:o,width:a,height:t},lockAspectRatio:!0,onResize:this.onResize},c.a.createElement(u.Stage,{width:a,height:t},c.a.createElement(u.Layer,null,c.a.createElement(u.Image,{image:d,width:a,height:t})))))}}]),a}(c.a.Component);t.a=d},34:function(e,t,a){"use strict";var n=a(17),i=a(2),s=a(3),r=a(6),o=a(5),l=a(4),c=a(0),h=a.n(c),u=a(45),d=a(10),p=a(48),m=["rgba(0,200,0,.5)","rgba(200,0,0,.5)","rgba(0,100,255,.5)","rgba(255,150,0,.5)","rgba(100,255,200,.5)","rgba(200,200,0,.5)","rgba(0,200,150,.5)","rgba(200,0,200,.5)","rgba(0,204,255,.5)"],g=function(e){Object(o.a)(a,e);var t=Object(l.a)(a);function a(e){var n;return Object(i.a)(this,a),(n=t.call(this,e)).addObject=n.addObject.bind(Object(r.a)(n)),n.onResize=n.onResize.bind(Object(r.a)(n)),n.onFixup=n.onFixup.bind(Object(r.a)(n)),n.onAnnotationSave=n.onAnnotationSave.bind(Object(r.a)(n)),n.onModelSwitch=n.onModelSwitch.bind(Object(r.a)(n)),n.onPrevFrame=n.onPrevFrame.bind(Object(r.a)(n)),n.onNextFrame=n.onNextFrame.bind(Object(r.a)(n)),n.initialState={height:e.height,width:e.width,scale:1,rgb:null,objects:null,modelMetrics:null,offline:!1,updateFixup:!1},n.state=n.initialState,n}return Object(s.a)(a,[{key:"componentDidUpdate",value:function(){this.state.updateFixup&&(this.onFixup(),this.setState({updateFixup:!1}))}},{key:"addObject",value:function(e){var t=this.state.objects?this.state.objects.concat(e):[e];this.setState({objects:t})}},{key:"onResize",value:function(e,t,a,n,i){this.setState({width:parseInt(a.style.width,10),height:parseInt(a.style.height,10)})}},{key:"onFixup",value:function(){if(this.props.stateManager){var e=this.props.stateManager,t=void 0;if(e.refs.forEach((function(e){e instanceof p.a&&(t=e)})),void 0!==t){var a=this.state.objects.map((function(e){return{mask:e.mask?e.mask.map((function(e){return e.map((function(e){return{x:e[0]/500,y:e[1]/500}}))})):[],label:e.label,properties:e.properties.split("\n "),type:e.type,id:e.id}}));t.setState({image:this.state.rgb,objects:a});for(var n=e.dashboardLayout,i=0;i<n._getAllContentItems().length;i++)if("ObjectFixup"===n._getAllContentItems()[i].config.component){var s=n._getAllContentItems()[i];s.parent.setActiveContentItem(s)}}}}},{key:"onAnnotationSave",value:function(){this.props.stateManager&&this.props.stateManager.onSave()}},{key:"onModelSwitch",value:function(){this.props.stateManager&&(console.log("switching model..."),this.props.stateManager.socket.emit("switch_detector"))}},{key:"onPrevFrame",value:function(){this.props.stateManager&&this.props.stateManager.previousFrame()}},{key:"onNextFrame",value:function(){this.props.stateManager&&this.props.stateManager.nextFrame()}},{key:"componentDidMount",value:function(){this.props.stateManager&&this.props.stateManager.connect(this)}},{key:"render",value:function(){var e=this,t=this.state,a=t.height,i=t.width,s=t.rgb,r=t.objects,o=this.props,l=o.offsetW,c=o.offsetH;if(null===s)return h.a.createElement(u.a,{default:{x:l,y:c,width:i,height:a},lockAspectRatio:!0,onResize:this.onResize},h.a.createElement("p",null,"Loading..."));var p=[],g=r;null===r&&(g=[]);var f=0;g.forEach((function(t,a){if("person"!==t.label){var i=t.id,s=a;Number.isInteger(i)&&(s=i);var r=String(i).concat("_"+t.label),o=(t.properties,m[s%m.length]),l=e.state.scale,c=parseInt(t.bbox[0]*l),u=parseInt(t.bbox[1]*l),g=parseInt(t.bbox[2]*l),v=parseInt(t.bbox[3]*l)-u,b=g-c;if(p.push(h.a.createElement(d.Rect,{key:f,x:c,y:u,width:b,height:v,fillEnabled:!1,stroke:o,opacity:1})),t&&t.mask)for(var y=function(e){var i=t.mask[e].map((function(e){return[e[0]*l,e[1]*l]}));p.push(h.a.createElement(d.Shape,{sceneFunc:function(e,t){e.beginPath(),e.moveTo.apply(e,Object(n.a)(i[0]));for(var a=1;a<i.length;a++)e.lineTo.apply(e,Object(n.a)(i[a]));e.closePath(),e.fillStrokeShape(t)},fill:o,opacity:1,stroke:"detector"===t.type?"white":"black",strokeWidth:1,key:"".concat(a,"-").concat(e)}))},k=0;k<t.mask.length;k++)y(k);p.push(h.a.createElement(d.Text,{key:[f++,r],text:r,x:c,y:u,fill:"white",opacity:1,fontSize:20}))}}));var v=null;return this.state.offline&&(v=h.a.createElement("span",{style:{float:"right"}},h.a.createElement("button",{onClick:this.onPrevFrame},"<-"),h.a.createElement("button",{onClick:this.onNextFrame},"->"))),h.a.createElement(u.a,{default:{x:l,y:c,width:i,height:a},lockAspectRatio:!0,onResize:this.onResize},h.a.createElement(d.Stage,{width:i,height:a},h.a.createElement(d.Layer,null,h.a.createElement(d.Image,{image:s,width:i,height:a}),p)),h.a.createElement("button",{onClick:this.onFixup},"Fix"),h.a.createElement("button",{onClick:this.onAnnotationSave},"Save"),v)}}]),a}(h.a.Component);t.a=g},410:function(e,t,a){e.exports=a(412)},412:function(e,t,a){"use strict";a.r(t);var n=a(0),i=a.n(n),s=a(19),r=a.n(s),o=a(167),l=a.n(o),c=(a(229),a(230),a(71)),h=a(60),u=a(70),d=a(56),p=a(2),m=a(3),g=a(5),f=a(4),v=a(444),b=a(276),y=Object(b.a)({palette:{primary:{main:"#ffffff"},secondary:{main:"#5f5f5f"}}}),k=a(449),E=function(e){Object(g.a)(a,e);var t=Object(f.a)(a);function a(e){var n;return Object(p.a)(this,a),(n=t.call(this,e)).handleClick=function(){n.state.isTimerOn?(n.setState({isTimerOn:!1,isSessionEnd:!0}),n.props.stateManager.socket.emit("terminateAgent",{turk_experiment_id:n.props.stateManager.getTurkExperimentId(),mephisto_agent_id:n.props.stateManager.getMephistoAgentId(),turk_worker_id:n.props.stateManager.getTurkWorkerId()})):(n.setState({isTimerOn:!0,startTime:Date.now()}),n.timer=setInterval((function(){n.setState({timeElapsed:Date.now()-n.state.startTime})}),10))},n.state={isTimerOn:!1,isSessionEnd:!1,startTime:0,timeElapsed:0},n}return Object(m.a)(a,[{key:"render",value:function(){var e=this.state.timeElapsed,t=("0"+Math.floor(e/1e3)%60).slice(-2),a=("0"+Math.floor(e/6e4)%60).slice(-2);return i.a.createElement(k.a,{theme:y},i.a.createElement("div",{className:"App"},i.a.createElement("div",{className:"content"},this.state.isSessionEnd?i.a.createElement("p",{style:{fontSize:40}},"Thanks for interacting with the bot. You may leave the page now."):i.a.createElement("div",null,i.a.createElement("div",{style:{fontSize:40}},a," : ",t),i.a.createElement("br",null),i.a.createElement(v.a,{className:"MsgButton",variant:"contained",color:this.state.isTimerOn?"secondary":"primary",onClick:this.handleClick.bind(this)},this.state.isTimerOn?"End":"Start"),i.a.createElement("br",null),i.a.createElement("p",null,"Please click on the button to start the session. "),i.a.createElement("p",null,"When you finished, click on the button to end the session and proceed to next steps.")))))}}]),a}(n.Component),M=a(9),w=a(44);a(203);window.React=i.a,window.ReactDOM=r.a;var x={settings:{showPopoutIcon:!1},content:[{type:"row",content:[{type:"column",content:[{type:"stack",content:[{title:"Interact",type:"react-component",component:"InteractApp",props:{stateManager:M.a}}]},{type:"stack",content:[{title:"Chat History",type:"react-component",component:"History",props:{stateManager:M.a}}]}]},{type:"column",content:[{type:"stack",content:[{title:"VoxelWorld",type:"react-component",component:"VoxelWorld",props:{stateManager:M.a}}],height:60},{type:"stack",content:[{title:"Info",type:"react-component",component:"TurkInfo",props:{stateManager:M.a}},{title:"Settings",type:"react-component",component:"Settings",props:{stateManager:M.a}}]}]}]}]},j=new l.a(x);j.registerComponent("MainPane",c.a),j.registerComponent("Settings",h.a),j.registerComponent("TurkInfo",E),j.registerComponent("History",u.a),j.registerComponent("VoxelWorld",d.a),j.registerComponent("InteractApp",w.a),j.init(),M.a.dashboardLayout=j},42:function(e,t,a){"use strict";var n=a(2),i=a(3),s=a(6),r=a(5),o=a(4),l=a(0),c=a.n(l),h=a(45),u=a(10),d=a(140),p=[["left_ear","left_eye"],["right_ear","right_eye"],["left_eye","right_eye"],["left_eye","nose"],["right_eye","nose"],["right_shoulder","right_elbow"],["right_elbow","right_wrist"],["left_shoulder","left_elbow"],["left_elbow","left_wrist"],["left_shoulder","left_hip"],["left_hip","left_knee"],["left_knee","left_ankle"],["right_shoulder","right_hip"],["right_hip","right_knee"],["right_knee","right_ankle"],["right_hip","left_hip"],["right_shoulder","left_shoulder"]],m=function(e){Object(r.a)(a,e);var t=Object(o.a)(a);function a(e){var i;return Object(n.a)(this,a),(i=t.call(this,e)).onResize=i.onResize.bind(Object(s.a)(i)),i.initialState={height:e.height,width:e.width,rgb:null,humans:null},i.state=i.initialState,i}return Object(i.a)(a,[{key:"onResize",value:function(e,t,a,n,i){this.setState({width:parseInt(a.style.width,10),height:parseInt(a.style.height,10)})}},{key:"componentDidMount",value:function(){this.props.stateManager&&this.props.stateManager.connect(this)}},{key:"componentWillUnmount",value:function(){this.props.stateManager&&this.props.stateManager.disconnect(this)}},{key:"render",value:function(){var e=this.state,t=e.height,a=e.width,n=e.rgb,i=e.humans,s=this.props,r=s.offsetW,o=s.offsetH,l=s.isMobile;if(null===n)return l?c.a.createElement("p",null,"Loading... "):c.a.createElement(h.a,{default:{x:r,y:o,width:a,height:t},lockAspectRatio:!0,onResize:this.onResize},c.a.createElement("p",null,"Loading..."));var m=[],g=0,f=0;return i.forEach((function(e){var a=t/512,n=d.a[g++];g===d.a.length&&(g=0),p.forEach((function(t){var i=e.keypoints[t[0]],s=e.keypoints[t[1]],r=[parseInt(i[0]*a),parseInt(i[1]*a),parseInt(s[0]*a),parseInt(s[1]*a)];m.push(c.a.createElement(u.Line,{key:f++,points:r,stroke:n}))}))})),l?c.a.createElement(u.Stage,{width:a,height:t},c.a.createElement(u.Layer,null,c.a.createElement(u.Image,{image:n,width:a,height:t}),m)):c.a.createElement(h.a,{default:{x:r,y:o,width:a,height:t},lockAspectRatio:!0,onResize:this.onResize},c.a.createElement(u.Stage,{width:a,height:t},c.a.createElement(u.Layer,null,c.a.createElement(u.Image,{image:n,width:a,height:t}),m)))}}]),a}(c.a.Component);t.a=m},43:function(e,t,a){"use strict";var n=a(2),i=a(3),s=a(6),r=a(5),o=a(4),l=a(0),c=a.n(l),h=a(10),u=a(212),d=function(e){Object(r.a)(a,e);var t=Object(o.a)(a);function a(e){var i;return Object(n.a)(this,a),(i=t.call(this,e)).handleDrag=function(e,t){i.setState({memory2d_className:e}),t&&i.setState({drag_coordinates:t})},i.convertGridCoordinate=function(e){var t=i.state,a=t.width,n=t.height,s=t.xmax,r=t.xmin,o=t.ymax,l=t.ymin;return[e[1]*(o-l)/n+l,0,e[0]*(s-r)/a+r]},i.convertCoordinate=function(e){var t=i.state,a=t.width,n=t.height,s=t.xmax,r=t.xmin,o=t.ymax,l=t.ymin,c=parseInt((e[2]-r)/(s-r)*a),h=parseInt((-e[0]-l)/(o-l)*n);return[c,h=n-h]},i.handleWheel=function(e){e.evt.preventDefault();var t=e.target.getStage(),a=t.scaleX(),n=t.getPointerPosition().x/a-t.x()/a,s=t.getPointerPosition().y/a-t.y()/a,r=e.evt.deltaY>0?1.2*a:a/1.2,o=r<1?1:r;i.setState({drag_coordinates:[-(n-t.getPointerPosition().x/o)*o,-(s-t.getPointerPosition().y/o)*o],stageScale:o,stageX:-(n-t.getPointerPosition().x/o)*o,stageY:-(s-t.getPointerPosition().y/o)*o})},i.initialState={height:400,width:600,isLoaded:!1,memory:null,xmin:-10,xmax:10,ymin:-10,ymax:10,bot_xyz:[0,0,0],tooltip:null,stageScale:1,stageX:0,stageY:0,memory2d_className:"memory2d",drag_coordinates:[0,0]},i.state=i.initialState,i.outer_div=c.a.createRef(),i.resizeHandler=i.resizeHandler.bind(Object(s.a)(i)),i}return Object(i.a)(a,[{key:"resizeHandler",value:function(){if(this.props.isMobile){var e=this.props.dimensions;(void 0!==e&&e!==this.state.height||void 0!==e&&e!==this.state.width)&&this.setState({height:e,width:e})}else if(null!=this.outer_div&&null!=this.outer_div.current){var t=this.outer_div.current,a=t.clientHeight,n=t.clientWidth;(void 0!==a&&a!==this.state.height||void 0!==n&&n!==this.state.width)&&this.setState({height:a,width:n})}}},{key:"componentDidMount",value:function(){this.props.stateManager&&this.props.stateManager.connect(this),void 0!==this.props.glContainer&&this.props.glContainer.on("resize",this.resizeHandler)}},{key:"componentDidUpdate",value:function(e,t){var a=this.state.bot_xyz,n=this.state,i=n.xmin,s=n.xmax,r=n.ymin,o=n.ymax,l=a[0],c=a[1],h=!1;l<i&&(i=l,h=!0),l>s&&(s=l,h=!0),c<r&&(r=c,h=!0),c>o&&(o=c,h=!0),h&&this.setState({xmin:i,ymin:r,xmax:s,ymax:o}),this.resizeHandler()}},{key:"componentWillUnmount",value:function(){this.props.stateManager&&this.props.stateManager.disconnect(this)}},{key:"render",value:function(){var e=this;if(!this.state.isLoaded)return c.a.createElement("p",null,"Loading");var t=this.state,a=t.height,n=t.width,i=t.memory,s=t.bot_xyz,r=t.obstacle_map,o=t.tooltip,l=t.drag_coordinates,d=t.stageScale,p=i.objects,m=this.state,g=m.xmin,f=m.xmax,v=m.ymin,b=m.ymax,y=s[1],k=-s[0],E=s[2];if(0===a&&0===n)return c.a.createElement("div",{ref:this.outer_div,style:{height:"100%",width:"100%"}});y=parseInt((y-g)/(f-g)*n),k=parseInt((k-v)/(b-v)*a),k=a-k;var M=[],w=[],x=0;r&&r.forEach((function(e){var t=parseInt((e[0]-g)/(f-g)*n),i=parseInt((e[1]-v)/(b-v)*a);w.push(c.a.createElement(h.Circle,{key:x++,radius:2,x:t,y:i,fill:"#827f7f"}))})),p.forEach((function(t,i,s){var r,o=u.a[Math.abs((r=t.label,r.split("").reduce((function(e,t){return(e=(e<<5)-e+t.charCodeAt(0))&e}),0)))%10],l=t.xyz,d=parseInt((l[2]-g)/(f-g)*n),p=parseInt((-l[0]-v)/(b-v)*a);p=a-p,M.push(c.a.createElement(h.Circle,{key:x++,radius:3,x:d,y:p,fill:o,onMouseEnter:function(a){e.setState({tooltip:JSON.stringify(t,null,4)}),a.currentTarget.setRadius(6)},onMouseLeave:function(t){e.setState({tooltip:null}),t.currentTarget.setRadius(3)}}))})),M.push(c.a.createElement(h.Circle,{key:x++,radius:10,x:y,y:k,fill:"red"})),M.push(c.a.createElement(h.Line,{key:x++,x:y,y:k,points:[0,0,12,0],rotation:180*-E/Math.PI,stroke:"black"}));for(var j=[],S=0;S<n/10;S++)j.push(c.a.createElement(h.Line,{key:12344+S,points:[Math.round(10*S)+.5,0,Math.round(10*S)+.5,a],stroke:"#f5f5f5",strokeWidth:1}));for(j.push(c.a.createElement(h.Line,{key:12344+S++,points:[0,0,10,10]})),x=0;x<a/10;x++)j.push(c.a.createElement(h.Line,{key:12344+S+x,points:[0,Math.round(10*x),n,Math.round(10*x)],stroke:"#ddd",strokeWidth:.5}));for(var O=[],C=this.convertCoordinate([9,0,-9]),I=(C[0]-l[0])/d,_=(C[1]-l[1])/d,R=this.convertGridCoordinate([I,_]),T=.5/d,P=c.a.createElement(h.Line,{key:"axesZ",points:[0,0,n,0],x:I,y:_,stroke:"#AAAAAA",strokeWidth:T}),L=c.a.createElement(h.Line,{key:"axesX",points:[0,-a,0,0],x:I,y:_,stroke:"#AAAAAA",strokeWidth:T}),A=[],D=[C[0]+n,C[1]-a],W=C[0],F=C[1];W<D[0];){W+=30;var H=this.convertGridCoordinate([(W-l[0])/d,0]);A.push(c.a.createElement(h.Text,{key:"textCoordinateX-"+W,text:H[2].toFixed(2),fontSize:10/d,x:(W-10-l[0])/d,y:(C[1]-15-l[1])/d,fill:"#AAAAAA"})),A.push(c.a.createElement(h.Line,{key:"coordinateX-"+W,points:[0,-3/d,0,3/d],x:(W-l[0])/d,y:_,stroke:"#AAAAAA",strokeWidth:T}))}for(;F>D[1];){F-=20;var N=this.convertGridCoordinate([0,(F-l[1])/d]);A.push(c.a.createElement(h.Text,{key:"textCoordinateY-"+F,text:N[0].toFixed(2),fontSize:10/d,x:(C[0]-35-l[0])/d,y:(F-5-l[1])/d,fill:"#AAAAAA"})),A.push(c.a.createElement(h.Line,{key:"coordinateY-"+F,points:[-3/d,0,3/d,0],x:I,y:(F-l[1])/d,stroke:"#AAAAAA",strokeWidth:T}))}var z=[(C[0]-25-l[0])/d,(C[1]+10-l[1])/d];return A.push(c.a.createElement(h.Text,{key:"root-text",fill:"#AAAAAA",text:"".concat(R[0].toFixed(2),", ").concat(R[2].toFixed(2)),fontSize:10/d,x:z[0],y:z[1]})),A.push(c.a.createElement(h.Text,{key:"x-text",fill:"#AAAAAA",text:"x",fontSize:12/d,x:(this.convertCoordinate([-9,0,-8.8])[0]-l[0])/d,y:(this.convertCoordinate([-9,0,-8.8])[1]-l[1])/d})),A.push(c.a.createElement(h.Text,{key:"z-text",fill:"#AAAAAA",text:"z",fontSize:12/d,x:(this.convertCoordinate([9.1,0,9])[0]-l[0])/d,y:(this.convertCoordinate([9.1,0,9])[1]-l[1])/d})),O.push(L,P,A),c.a.createElement("div",{ref:this.outer_div,style:{height:"100%",width:"100%"}},c.a.createElement(h.Stage,{draggable:!0,className:this.state.memory2d_className,width:n,height:a,onWheel:this.handleWheel,scaleX:this.state.stageScale,scaleY:this.state.stageScale,x:this.state.stageX,y:this.state.stageY,onDragMove:function(t){return e.handleDrag("memory2d dragging-memory2d",[t.target.attrs.x,t.target.attrs.y])},onDragEnd:function(t){return e.handleDrag("memory2d",[t.target.attrs.x,t.target.attrs.y])}},c.a.createElement(h.Layer,{className:"gridLayer"},j),c.a.createElement(h.Layer,{className:"coordinateAxesLayer"},O),c.a.createElement(h.Layer,{className:"mapBoundary"},w),c.a.createElement(h.Layer,{className:"renderedObjects"},M),c.a.createElement(h.Layer,null,c.a.createElement(h.Text,{text:o,offsetX:-12,offsetY:-12,visible:null!=o,shadowEnabled:!0}))))}}]),a}(c.a.Component);t.a=d},44:function(e,t,a){"use strict";var n=a(17),i=a(2),s=a(3),r=a(6),o=a(5),l=a(4),c=a(0),h=a.n(c),u=(a(143),a(444)),d=a(211),p=a(182),m=a(443),g=a(210),f=a(132),v=a.n(f),b=(a(144),new window.webkitSpeechRecognition);b.lang="en-US";var y=function(e){Object(o.a)(a,e);var t=Object(l.a)(a);function a(e){var n;return Object(i.a)(this,a),(n=t.call(this,e)).state={recognizing:!1},n.toggleListen=n.toggleListen.bind(Object(r.a)(n)),n.listen=n.listen.bind(Object(r.a)(n)),n.elementRef=h.a.createRef(),n.bindKeyPress=n.handleKeyPress.bind(Object(r.a)(n)),n}return Object(s.a)(a,[{key:"renderChatHistory",value:function(e){var t=this;return this.props.chats.map((function(a,n){return h.a.cloneElement(h.a.createElement(p.a,null,h.a.createElement(g.a,null,a.msg+(a.msg?"Sent successfully"===e?" \u2705":" \u274c":"")),h.a.createElement(m.a,null,""!==a.msg?h.a.createElement(u.a,{style:{backgroundColor:"red",color:"white"},onClick:function(){return t.props.goToQuestion(n)}},"Mark Error"):null)),{key:n.toString()})}))}},{key:"isMounted",value:function(){return null!=this.elementRef.current}},{key:"handleKeyPress",value:function(e){"Enter"===e.key&&(e.preventDefault(),this.handleSubmit())}},{key:"componentDidMount",value:function(){document.addEventListener("keypress",this.bindKeyPress)}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keypress",this.bindKeyPress)}},{key:"toggleListen",value:function(){console.log("togglelisten"),this.setState({recognizing:!this.state.recognizing},this.listen)}},{key:"listen",value:function(){this.state.recognizing?b.start():b.stop(),b.onresult=function(e){for(var t="",a=0;a<e.results.length;++a)e.results[a].isFinal&&(t+=e.results[a][0].transcript);document.getElementById("msg").innerHTML=t},b.onerror=function(e){"not-allowed"===e.error&&(alert("Please grant access to microphone"),b.stop())}}},{key:"handleSubmit",value:function(){var e=document.getElementById("msg").innerHTML;""!==e.replace(/\s/g,"")&&(this.props.setInteractState({msg:e,failed:!1}),this.props.stateManager.logInteractiondata("text command",e),this.props.stateManager.socket.emit("sendCommandToAgent",e),document.getElementById("msg").innerHTML="")}},{key:"render",value:function(){return h.a.createElement("div",{className:"Chat"},h.a.createElement("p",null,"Enter the command to the bot in the input box below, or click the mic button to start/stop voice input."),h.a.createElement("p",null,"Click the x next to the message if the outcome wasn't as expected."),h.a.createElement(v.a,{className:"ASRButton",variant:"contained",color:this.state.recognizing?"default":"secondary",fontSize:"large",onClick:this.toggleListen.bind(this)}),h.a.createElement("p",null," ",this.state.recognizing?"Listening...":""," "),h.a.createElement(d.a,null,this.renderChatHistory(this.props.status)),!0===this.props.isMobile?h.a.createElement("div",{style:{outline:" solid 1px black"},contentEditable:"true",className:"Msg single-line",id:"msg",suppressContentEditableWarning:!0}," "):h.a.createElement("div",{contentEditable:"true",className:"Msg single-line",id:"msg",suppressContentEditableWarning:!0}," "),h.a.createElement(u.a,{className:"MsgButton",variant:"contained",color:"primary",onClick:this.handleSubmit.bind(this)}," ","Submit"," "),h.a.createElement("p",{id:"assistantReply"},this.props.agent_reply," "))}}]),a}(c.Component),k=a(463),E=(a(146),function(e){Object(o.a)(a,e);var t=Object(l.a)(a);function a(e){var n;return Object(i.a)(this,a),(n=t.call(this,e)).state={view:0,parsing_error:!1,action_dict:{},feedback:""},n}return Object(s.a)(a,[{key:"finishQuestions",value:function(){var e={action_dict:this.state.action_dict,parsing_error:this.state.parsing_error,msg:this.props.chats[this.props.failidx].msg,feedback:this.state.feedback};this.props.stateManager.socket.emit("saveErrorDetailsToCSV",e),this.props.goToMessage()}},{key:"saveFeedback",value:function(e){this.setState({feedback:e.target.value})}},{key:"renderParsingFail",value:function(){return h.a.createElement("div",null,h.a.createElement("h3",null," ","Thanks for letting me know that I didn't understand the command right."," "),h.a.createElement(u.a,{variant:"contained",color:"primary",onClick:this.finishQuestions.bind(this)},"Done"))}},{key:"renderParsingSuccess",value:function(){var e=this;return h.a.createElement("div",null,h.a.createElement("h3",null," ","Okay, looks like I understood your command but couldn't follow it all the way through. Tell me more about what I did wrong :"," "),h.a.createElement(k.a,{style:{backgroundColor:"white"},id:"outlined-uncontrolled",label:"",margin:"normal",variant:"outlined",onChange:function(t){return e.saveFeedback(t)}}),h.a.createElement("div",null),h.a.createElement(u.a,{variant:"contained",color:"primary",onClick:this.finishQuestions.bind(this)},"Done"))}},{key:"renderEnd",value:function(){var e=this;return h.a.createElement("div",null,h.a.createElement("h3",null," Thanks! Submit any other feedback here: "),h.a.createElement(k.a,{style:{backgroundColor:"white"},id:"outlined-uncontrolled",label:"",margin:"normal",variant:"outlined",onChange:function(t){return e.saveFeedback(t)}}),h.a.createElement("div",null),h.a.createElement(u.a,{variant:"contained",color:"primary",onClick:this.finishQuestions.bind(this)},"Done"))}},{key:"renderSemanticParserErrorQuestion",value:function(){var e=this;if(this.state.action_dict)if("dialogue_type"in this.state.action_dict){var t=this.state.action_dict.dialogue_type,a="";if("HUMAN_GIVE_COMMAND"===t){var n=this.state.action_dict.action_sequence[0],i=n.action_type.toLowerCase();a="to "+i+" ",["build","dig"].indexOf(i)>=0?("schematic"in n&&(a=a+"'"+n.schematic.text_span+"'"),"location"in n&&(a=a+" at location '"+n.location.text_span+"'"),a+=" ?"):["destroy","fill","spawn","copy","get","scout"].indexOf(i)>=0?("reference_object"in n&&(a=a+"'"+n.reference_object.text_span+"'"),"location"in n&&(a=a+" at location '"+n.location.text_span+"'"),a+=" ?"):["move"].indexOf(i)>=0?("location"in n&&(a=a+" at location '"+n.location.text_span+"'"),a+=" ?"):["stop","resume","undo"].indexOf(i)>=0&&("target_action_type"in n&&(a=a+" at location '"+n.target_action_type+"'"),a+=" ?")}else"GET_MEMORY"===t?a="to answer a question about something in the Minecraft world ?":"PUT_MEMORY"===t?a="to remember or learn something you taught it ?":"NOOP"===t&&(a="to do nothing ?")}else a="did you want me to do nothing ?";return h.a.createElement("div",{className:"question"},h.a.createElement("h5",null,"Did you want the assistant ",a),h.a.createElement(d.a,{className:"answers",component:"nav"},h.a.createElement(p.a,{button:!0,onClick:function(){return e.answerParsing(1)}},h.a.createElement(g.a,{primary:"Yes"})),h.a.createElement(p.a,{button:!0,onClick:function(){return e.answerParsing(2)}},h.a.createElement(g.a,{primary:"No"}))))}},{key:"answerParsing",value:function(e){1===e?this.setState({view:2}):2===e&&this.setState({parsing_error:!0,view:1})}},{key:"goToEnd",value:function(e){this.setState({view:3,new_action_dict:e})}},{key:"componentDidMount",value:function(){var e=this.props.stateManager.memory.chatResponse,t=this.props.chats[this.props.failidx].msg;this.setState({action_dict:e[t]})}},{key:"render",value:function(){return h.a.createElement("div",null,h.a.createElement("div",{className:"msg-header"},"Message you sent to the bot: ",h.a.createElement("br",null),this.props.chats[this.props.failidx].msg),0===this.state.view?this.renderSemanticParserErrorQuestion():null,1===this.state.view?this.renderParsingFail():null,2===this.state.view?this.renderParsingSuccess():null,3===this.state.view?this.renderEnd():null)}}]),a}(c.Component)),M=function(e){Object(o.a)(a,e);var t=Object(l.a)(a);function a(e){var n;return Object(i.a)(this,a),(n=t.call(this,e)).initialState={currentView:1,chatResponse:"",status:"",chats:[{msg:"",failed:!1}],failidx:-1,agent_reply:""},n.state=n.initialState,n.setAssistantReply=n.setAssistantReply.bind(Object(r.a)(n)),n.MessageRef=h.a.createRef(),n}return Object(s.a)(a,[{key:"setInteractState",value:function(e){var t=Object(n.a)(this.state.chats);t.shift(),t.push(e),this.setState({chats:t})}},{key:"setAssistantReply",value:function(e){this.setState({agent_reply:e.agent_reply})}},{key:"componentDidMount",value:function(){this.props.stateManager&&(this.props.stateManager.connect(this),this.props.stateManager.socket.on("showAssistantReply",this.setAssistantReply))}},{key:"componentWillUnmount",value:function(){this.props.stateManager&&this.props.stateManager.disconnect(this)}},{key:"getUrlParameterByName",value:function(e){var t=RegExp("[?&]"+e+"=([^&]*)").exec(window.location.search);return t&&decodeURIComponent(t[1].replace(/\+/g," "))}},{key:"goToMessage",value:function(){var e=this.state.chats;-1!==this.state.failidx&&(e[this.state.failidx].failed=!0),this.setState({currentView:1,chats:e})}},{key:"goToQuestion",value:function(e){this.setState({currentView:2,chats:this.state.chats,failidx:e})}},{key:"render",value:function(){return h.a.createElement("div",{className:"App"},h.a.createElement("div",{className:"content"},1===this.state.currentView?h.a.createElement(y,{status:this.state.status,stateManager:this.props.stateManager,isMobile:this.props.isMobile,ref:this.MessageRef,chats:this.state.chats,agent_reply:this.state.agent_reply,goToQuestion:this.goToQuestion.bind(this),setInteractState:this.setInteractState.bind(this)}):null,2===this.state.currentView?h.a.createElement(E,{stateManager:this.props.stateManager,chats:this.state.chats,failidx:this.state.failidx,goToMessage:this.goToMessage.bind(this),failmsg:this.state.chats[this.state.failidx].msg}):null))}}]),a}(c.Component);t.a=M},46:function(e,t,a){"use strict";function n(e){return(e=e.replace(/_/g," ")).replace(/\w\S*/g,(function(e){return e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()}))}function i(e,t){var a=JSON.parse(t),i=function(e){var t=[];for(var a in e)"logical_form"===a?t.push({event:n(a),description:JSON.stringify(e[a])}):t.push({event:n(a),description:e[a]});return t}(a);e.memory.timelineDetails=i,e.updateTimelineResults();var s={title:n(a.name),cssClass:"scrollable",type:"react-component",component:"TimelineDetails",props:{stateManager:e}};e.dashboardLayout.root.getItemsById("timelineDetails")[0].addChild(s)}a.d(t,"a",(function(){return n})),a.d(t,"b",(function(){return i}))},48:function(e,t,a){"use strict";var n=a(2),i=a(3),s=a(5),r=a(4),o=a(0),l=a.n(o),c=a(17),h=a(6),u=(a(148),a(149),function(e){Object(s.a)(a,e);var t=Object(r.a)(a);function a(e){var i;return Object(n.a)(this,a),(i=t.call(this,e)).state={selectedTags:e.tags||[],suggestions:[],currentValue:""},i.inputRef=l.a.createRef(),i}return Object(i.a)(a,[{key:"render",value:function(){var e=this;return l.a.createElement("div",{className:"tag-selector"},l.a.createElement("div",{className:"tag-holder"},this.state.selectedTags.map((function(t,a){return l.a.createElement("span",{className:"tag-selected",key:a},t,l.a.createElement("button",{onClick:function(){e.removeTag(t)}},"X"))}))),l.a.createElement("input",{type:"text",placeholder:"Tags (press Enter to add)",ref:this.inputRef,onChange:this.update.bind(this),onKeyDown:this.keyDown.bind(this)}),l.a.createElement("div",{className:"tag-suggestions"},this.state.suggestions.map((function(t,a){return l.a.createElement("span",{kkey:a},l.a.createElement("button",{onClick:function(){e.addTag(t)}},a))}))))}},{key:"update",value:function(e){var t=this,a=this.inputRef.current.value;0!==a.length?this.setState({suggestions:this.props.tags.filter((function(e){return e.toLowerCase().slice(0,a.length)===a&&-1===t.state.selectedTags.indexOf(e)}))}):this.setState({suggestions:[]})}},{key:"removeTag",value:function(e){var t=this;this.setState({selectedTags:this.state.selectedTags.filter((function(t){return t!==e}))},(function(){t.props.update(t.state.selectedTags)}))}},{key:"addTag",value:function(e){var t=this;e=e.toLowerCase(),this.setState({selectedTags:this.state.selectedTags.concat(e),suggestions:[]},(function(){t.props.update(t.state.selectedTags)})),this.inputRef.current.value=""}},{key:"keyDown",value:function(e){"Enter"===e.key&&""!==this.inputRef.current.value.trim()&&this.addTag(this.inputRef.current.value),this.setState({currentValue:this.inputRef.current.value})}}]),a}(l.a.Component)),d=function(e){Object(s.a)(a,e);var t=Object(r.a)(a);function a(e){var i;return Object(n.a)(this,a),(i=t.call(this,e)).tags=i.props.tags||[],i.submit=i.submit.bind(Object(h.a)(i)),i.nameRef=l.a.createRef(),i}return Object(i.a)(a,[{key:"render",value:function(){var e=this;return this.props.isMobile?l.a.createElement("div",{className:"data-entry-root",style:{top:this.props.y+"px",left:this.props.x+"px"}},l.a.createElement("input",{placeholder:"Object Name",ref:this.nameRef,defaultValue:this.props.label||""}),l.a.createElement(u,{tags:this.tags,update:function(t){return e.tags=t}}),this.props.includeSubmitButton?l.a.createElement("button",{className:"data-entry-submit",onClick:this.submit},"Submit"):null,this.props.deleteCallback?l.a.createElement("button",{className:"data-entry-delete",onClick:this.props.deleteCallback},"Delete object (\u232b)"):null):l.a.createElement("div",{className:"data-entry-root",style:{top:this.props.y+"px",left:this.props.x+"px",position:"fixed"}},l.a.createElement("input",{placeholder:"Object Name",ref:this.nameRef,defaultValue:this.props.label||""}),l.a.createElement(u,{tags:this.tags,update:function(t){return e.tags=t}}),this.props.includeSubmitButton?l.a.createElement("button",{className:"data-entry-submit",onClick:this.submit},"Submit"):null,this.props.deleteCallback?l.a.createElement("button",{className:"data-entry-delete",onClick:this.props.deleteCallback},"Delete object (\u232b)"):null)}},{key:"submit",value:function(){var e=this.nameRef.current.value.trim();0!==e.length?this.tags.length<2?alert("Please enter at least 2 descriptive tags for the object. Examples include: color, shape, size, orientation, etc."):this.props.onSubmit({name:e.toLowerCase(),tags:this.tags}):alert("You must enter the object's name")}}]),a}(l.a.Component),p=function(e){Object(s.a)(a,e);var t=Object(r.a)(a);function a(e){var i;return Object(n.a)(this,a),(i=t.call(this,e)).state={message:""},i.update=i.update.bind(Object(h.a)(i)),i.drawPointsAndLines=i.drawPointsAndLines.bind(Object(h.a)(i)),i.onClick=i.onClick.bind(Object(h.a)(i)),i.addHandler=i.addHandler.bind(Object(h.a)(i)),i.addMaskHandler=i.addMaskHandler.bind(Object(h.a)(i)),i.addPointHandler=i.addPointHandler.bind(Object(h.a)(i)),i.deleteHandler=i.deleteHandler.bind(Object(h.a)(i)),i.deleteMaskHandler=i.deleteMaskHandler.bind(Object(h.a)(i)),i.deletePointHandler=i.deletePointHandler.bind(Object(h.a)(i)),i.changeTextHandler=i.changeTextHandler.bind(Object(h.a)(i)),i.zoomIn=i.zoomIn.bind(Object(h.a)(i)),i.zoomOut=i.zoomOut.bind(Object(h.a)(i)),i.onMouseMove=i.onMouseMove.bind(Object(h.a)(i)),i.keyDown=i.keyDown.bind(Object(h.a)(i)),i.drawPoint=i.drawPoint.bind(Object(h.a)(i)),i.drawLine=i.drawLine.bind(Object(h.a)(i)),i.localToImage=i.localToImage.bind(Object(h.a)(i)),i.imageToLocal=i.imageToLocal.bind(Object(h.a)(i)),i.shiftViewBy=i.shiftViewBy.bind(Object(h.a)(i)),i.mode=i.props.mode||"default",i.prevMode="default",i.baseMode="default",i.message="",i.currentMaskId=0,i.isDrawingPolygon=!1,i.lastMouse={x:0,y:0},i.points=[[]],i.regions=[],i.newMask="drawing"===i.props.mode,i.canvasRef=l.a.createRef(),i.dataEntryRef=l.a.createRef(),i.zoomPixels=300,i.zoomed=!1,i.pointSize=10,i.color=i.props.color,i}return Object(i.a)(a,[{key:"componentDidMount",value:function(){var e=this;this.canvas=this.canvasRef.current,this.ctx=this.canvas.getContext("2d"),this.points=this.props.masks?this.props.masks.map((function(t){return t.map((function(t){return{x:t.x*e.canvas.width,y:t.y*e.canvas.height}}))})).filter((function(e){return e})):[[]],this.img=this.props.img,this.Offset={x:0,y:0},this.baseScale=Math.min(this.canvas.width/this.img.width,this.canvas.height/this.img.height),this.scale=this.baseScale,this.update()}},{key:"render",value:function(){var e=this,t="500px";this.props.imageWidth&&(t=this.props.imageWidth);var a=0,n=0;return this.props.isMobile?(a=this.canvas&&this.canvas.getBoundingClientRect().left,n=this.canvas&&this.canvas.getBoundingClientRect().bottom+50):(a=this.canvas&&this.canvas.getBoundingClientRect().right,n=this.canvas&&this.canvas.getBoundingClientRect().top+this.canvas.height/3),l.a.createElement("div",null,l.a.createElement("p",null,this.state.message),l.a.createElement("div",null,l.a.createElement("button",{onClick:this.addHandler},l.a.createElement("span",{role:"img","aria-label":"Plus"},"\u2795")," ","(a)"),l.a.createElement("button",{onClick:this.deleteHandler},l.a.createElement("span",{role:"img","aria-label":"Trash"},"\ud83d\uddd1\ufe0f")," ","(d)"),l.a.createElement("button",{onClick:this.zoomIn},l.a.createElement("span",{role:"img","aria-label":"Magnifying Glass Right"},"\ud83d\udd0e")," ","(=)"),l.a.createElement("button",{onClick:this.zoomOut},l.a.createElement("span",{role:"img","aria-label":"Magnifying Glass Left"},"\ud83d\udd0d")," ","(-)"),l.a.createElement("button",{onClick:this.dataEntryRef.current&&this.dataEntryRef.current.submit},l.a.createElement("span",{role:"img","aria-label":"Save"},"\ud83d\udcbe")," ","(\u21b5)")),l.a.createElement("div",{style:{display:"flex",flexDirection:"row"}},l.a.createElement("canvas",{ref:this.canvasRef,width:t,height:t,tabIndex:"0",onClick:this.onClick,onMouseMove:this.onMouseMove,onKeyDown:this.keyDown}),this.props.isMobile&&l.a.createElement("button",{onClick:this.pressEnterOnMobile.bind(this)},"Finished with ",this.props.object,"'s label"),l.a.createElement("div",null,l.a.createElement(d,{ref:this.dataEntryRef,x:a,y:n,onSubmit:this.changeTextHandler,isMobile:this.props.isMobile,label:this.props.object,tags:this.props.tags,deleteCallback:function(){return e.props.deleteLabelHandler()}}))))}},{key:"update",value:function(){this.resetImage(this.zoomed),this.updateMessage();var e=["dragging","focus"].includes(this.mode);this.drawPointsAndLines(e),this.drawRegions(e),"Enter"===this.lastKey&&this.points[this.currentMaskId]&&this.points[this.currentMaskId].length>=3&&(this.zoomed=!1,this.resetImage(this.zoomed),this.drawPointsAndLines(),this.drawRegions())}},{key:"onClick",value:function(e){if("dragging"===this.mode){var t=this.prevMode;return this.prevMode=this.mode,this.mode=t,void this.update()}var a=this.getPointClick();if(null!=a){if("adding"===this.mode&&this.addPointHandler(),"deleting"===this.mode&&this.deletePointHandler(),["addingMask"].includes(this.mode)&&a[0]!==this.currentMaskId)return;if("addingPoint"===this.mode){var n=this.points[a[0]].slice();n.splice(a[1],0,n[a[1]]),this.points[a[0]]=n}return"deletingPoint"===this.mode&&this.points[a[0]].length>3?(this.points[a[0]].length>3&&this.points[a[0]].splice(a[1],1),void this.update()):(this.prevMode=this.mode,this.mode="dragging",this.draggingIndex=a,this.currentMaskId=a[0],void this.update())}if("adding"===this.mode&&this.addMaskHandler(),["drawing","addingMask"].includes(this.mode)&&("Enter"!==this.lastKey||["drawing","addingMask"].includes(this.prevMode)||this.points[this.currentMaskId]&&this.points[this.currentMaskId].length<3))return this.points[this.currentMaskId].push(this.localToImage(this.lastMouse)),this.updateZoom(),this.update(),void(this.lastKey="Mouse");var i=this.getRegionClick();if("default"!==this.mode){if("focus"===this.mode)return-1===i&&(this.prevMode=this.mode,this.mode="default",this.currentMaskId=-1),this.update(),void(this.lastKey="Mouse");if(["deletingMask","deleting"].includes(this.mode)){if(-1===i)return;return"deleting"===this.mode&&this.deleteMaskHandler(),1===this.points.length&&this.props.deleteLabelHandler(),this.points.splice(i,1),this.update(),void(this.lastKey="Mouse")}}else-1!==i&&(this.prevMode=this.mode,this.mode="focus",this.currentMaskId=i,this.update(),this.lastKey="Mouse")}},{key:"keyDown",value:function(e){switch(e.key){case" ":this.points[this.currentMaskId].length>0&&this.points[this.currentMaskId].pop(),this.update();break;case"a":this.addHandler();break;case"s":this.addMaskHandler();break;case"q":this.addPointHandler();break;case"d":this.deleteHandler();break;case"f":this.deleteMaskHandler();break;case"e":this.deletePointHandler();break;case"Backspace":this.props.deleteLabelHandler();break;case"Enter":"Enter"===this.lastKey&&this.points[this.currentMaskId]&&this.points[this.currentMaskId].length>=3&&(this.lastKey=null,this.baseMode="default",this.prevMode=this.mode,this.mode="default",this.save()),["adding","addingMask","addingPoint","deleting","deletingMask","deletingPoint"].includes(this.mode)&&this.points[this.currentMaskId]&&this.points[this.currentMaskId].length>=3&&(this.baseMode="default",this.prevMode=this.mode,this.mode="default");break;case"Escape":if(this.points[this.currentMaskId]){if(this.points[this.currentMaskId].length>=3)return this.save(),this.mode="default",void this.props.exitCallback();if(1===this.points.length)return void this.props.deleteLabelHandler();this.points.splice(this.currentMaskId,1),this.currentMaskId=0,this.prevMode=this.mode,this.mode="default"}break;case"=":this.zoomIn(),this.update();break;case"-":this.zoomOut(),this.update()}this.lastKey=e.key}},{key:"addHandler",value:function(){this.baseMode="default",this.prevMode=this.mode,this.mode="adding"}},{key:"addMaskHandler",value:function(){!this.points[this.currentMaskId]||this.points[this.currentMaskId].length<3||(this.currentMaskId=this.points.length,this.points.push([]),this.prevMode=this.mode,this.mode="addingMask")}},{key:"addPointHandler",value:function(){this.baseMode=this.points[this.currentMaskId]&&0===this.points[this.currentMaskId].length?"default":this.mode,this.prevMode=this.mode,this.mode="addingPoint"}},{key:"deleteHandler",value:function(){this.baseMode="default",this.prevMode=this.mode,this.mode="deleting"}},{key:"deleteMaskHandler",value:function(){!this.points[this.currentMaskId]||this.points[this.currentMaskId].length<3||(this.prevMode=this.mode,this.mode="deletingMask")}},{key:"deletePointHandler",value:function(){this.baseMode=["drawing","addingMask"].includes(this.mode)?this.mode:"default",this.prevMode=this.mode,this.mode="deletingPoint"}},{key:"changeTextHandler",value:function(e){!this.points[this.currentMaskId]||this.points[this.currentMaskId].length<3||(this.save(),this.props.dataEntrySubmit(e))}},{key:"zoomIn",value:function(){this.zoomPixels-=10,this.updateZoom()}},{key:"zoomOut",value:function(){this.zoomPixels+=10,this.updateZoom()}},{key:"updateMessage",value:function(){var e="";switch(this.mode){case"adding":e="Click a point to duplicate it (q) or click anywhere else to create a new mask for this object (s)";break;case"addingMask":e="Create a new mask for this object";break;case"addingPoint":e="Click a point to duplicate it and place it where you want";break;case"deleting":e="Click a point to delete it (e) or click a mask to delete it (f)";break;case"deletingMask":e="Select which mask to delete";break;case"deletingPoint":e="Select a point to delete";break;default:e="Please trace the "+(this.props.object||"object")}e!==this.state.message&&this.setState({message:e})}},{key:"updateZoom",value:function(){if(this.zoomed=!0,this.scale=Math.min(this.canvas.width/this.zoomPixels,this.canvas.height/this.zoomPixels),-1!==this.currentMaskId&&this.points[this.currentMaskId]&&0!==this.points[this.currentMaskId].length&&["default","dragging","drawing","addingMask"].includes(this.mode)){var e=this.points[this.currentMaskId];this.Offset={x:-(e[e.length-1].x-this.zoomPixels/2)*this.scale,y:-(e[e.length-1].y-this.zoomPixels/2)*this.scale}}}},{key:"onMouseMove",value:function(e){var t=this.canvas.getBoundingClientRect();this.lastMouse={x:e.clientX-t.left,y:e.clientY-t.top+1},"dragging"===this.mode&&(this.points[this.draggingIndex[0]][this.draggingIndex[1]]=this.localToImage(this.lastMouse)),this.update()}},{key:"pressEnterOnMobile",value:function(){this.lastKey=null,this.props.submitCallback(this.points)}},{key:"save",value:function(){var e=this;this.props.submitCallback(this.points.map((function(t){return t.map((function(t){return{x:t.x/e.canvas.width,y:t.y/e.canvas.height}}))})),this.newMask)}},{key:"getPointClick",value:function(){for(var e=0;e<this.points.length;e++)for(var t=0;t<this.points[e].length;t++)if(this.distance(this.points[e][t],this.localToImage(this.lastMouse))<this.pointSize/2)return[e,t];return null}},{key:"getRegionClick",value:function(){for(var e=-1,t=0;t<this.regions.length;t++)this.regions[t]&&this.ctx.isPointInPath(this.regions[t],this.lastMouse.x,this.lastMouse.y)&&(e=t);return e}},{key:"drawPointsAndLines",value:function(){for(var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=0;t<this.points.length;t++)if((!0!==e||t===this.currentMaskId)&&this.points[t]&&0!==this.points[t].length){for(var a=0;a<this.points[t].length-1;a++)this.drawLine(this.points[t][a],this.points[t][a+1]),this.drawPoint(this.points[t][a]);this.drawPoint(this.points[t][this.points[t].length-1]),["drawing","addingMask"].includes(this.mode)||["drawing","addingMask"].includes(this.prevMode)||this.drawLine(this.points[t][0],this.points[t][this.points[t].length-1])}this.points[this.currentMaskId]&&this.points[this.currentMaskId].length>0&&["drawing","addingMask"].includes(this.mode)&&this.drawLine(this.points[this.currentMaskId][this.points[this.currentMaskId].length-1],this.localToImage(this.lastMouse))}},{key:"drawRegions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.regions=[];for(var t=0;t<this.points.length;t++)if(!e||t===this.currentMaskId){var a=this.drawRegion(this.points[t]);this.regions.push(a)}}},{key:"drawPoint",value:function(e){this.ctx.fillStyle="detector"===this.props.originType?"white":"black",this.distance(e,this.localToImage(this.lastMouse))<this.pointSize/2&&(this.ctx.fillStyle="green"),this.ctx.fillRect(e.x-2.5,e.y-2.5,5,5)}},{key:"drawLine",value:function(e,t){this.ctx.beginPath(),this.ctx.moveTo(e.x,e.y),this.ctx.lineTo(t.x,t.y),this.ctx.strokeStyle="detector"===this.props.originType?"white":"black",this.ctx.stroke()}},{key:"drawRegion",value:function(e){if(e&&!(e.length<3)){var t=new Path2D;t.moveTo(e[0].x,e[0].y);for(var a=1;a<e.length;a++)t.lineTo(e[a].x,e[a].y);return t.closePath(),this.ctx.fillStyle=this.color,this.ctx.fill(t,"evenodd"),t}}},{key:"localToImage",value:function(e){var t,a;return this.zoomed?(t=(e.x-this.Offset.x)/this.scale,a=(e.y-this.Offset.y)/this.scale):(t=e.x/this.baseScale,a=e.y/this.baseScale),{x:Math.min(Math.max(t,0),512),y:Math.min(Math.max(a,0),512)}}},{key:"imageToLocal",value:function(e){var t=this.zoomed?this.scale:this.baseScale,a=this.zoomed?this.Offset.x:0,n=this.zoomed?this.Offset.y:0;return{x:e.x*t+a,y:e.y*t+n}}},{key:"resetView",value:function(){this.Offset={x:0,y:0},this.scale=Math.min(this.canvas.width/this.img.width,this.canvas.height/this.img.height)}},{key:"resetImage",value:function(e){this.ctx.resetTransform(),this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height),e?this.ctx.setTransform(this.scale,0,0,this.scale,this.Offset.x,this.Offset.y):(this.ctx.setTransform(this.baseScale,0,0,this.baseScale,0,0),this.zoomed=!1),this.ctx.drawImage(this.img,0,0)}},{key:"shiftViewBy",value:function(e,t){this.Offset={x:this.Offset.x+e,y:this.Offset.y+t}}},{key:"distance",value:function(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}},{key:"distanceToSegment",value:function(e,t,a){var n=this.distance(t,a);if(0===n)return this.distance(e,t);var i=((e.x-t.x)*(a.x-t.x)+(e.y-t.y)*(a.y-t.y))/n;i=Math.max(0,Math.min(1,i));var s={x:t.x+i*(a.x-t.x),y:t.y+i*(a.y-t.y)};return this.distance(e,s)}}]),a}(l.a.Component),m=function(e){Object(s.a)(a,e);var t=Object(r.a)(a);function a(e){var i;return Object(n.a)(this,a),(i=t.call(this,e)).update=i.update.bind(Object(h.a)(i)),i.onClick=i.onClick.bind(Object(h.a)(i)),i.regions={},i.canvasRef=l.a.createRef(),i.imgRef=l.a.createRef(),i}return Object(i.a)(a,[{key:"componentDidMount",value:function(){this.canvas=this.canvasRef.current,this.ctx=this.canvas.getContext("2d"),this.Offset={x:0,y:0},this.baseScale=this.canvas.width/this.props.img.width,this.scale=this.baseScale,this.canvas.height=this.props.img.height*this.baseScale,this.update()}},{key:"componentDidUpdate",value:function(){this.update()}},{key:"render",value:function(){var e="500px";return this.props.imageWidth&&(e=this.props.imageWidth),this.props.isFromCamera&&this.props.displayImage?l.a.createElement("div",null,l.a.createElement("img",{src:this.props.img.src}),l.a.createElement("canvas",{ref:this.canvasRef,width:e,height:e,tabIndex:"0",onMouseMove:this.onMouseMove,onKeyDown:this.keyDown})):l.a.createElement("div",null,l.a.createElement("canvas",{ref:this.canvasRef,width:e,height:e,tabIndex:"0",onMouseMove:this.onMouseMove,onKeyDown:this.keyDown}))}},{key:"update",value:function(){var e=this;this.ctx.resetTransform(),this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height),this.ctx.setTransform(this.scale,0,0,this.scale,this.Offset.x,this.Offset.y),this.ctx.drawImage(this.props.img,0,0);for(var t=0;t<this.props.objects.length;t++){var a=this.props.objects[t],n=this.props.pointMap[a];if(0!==n.length){this.regions[a]=[];var i=this.props.colors[t%this.props.colors.length]||"rgba(0,200,0,.5)",s="detector"===this.props.originTypeMap[a]?"white":"black";for(var r in n){var o=n[r].map((function(t){return{x:t.x*e.canvas.width,y:t.y*e.canvas.height}})),l=this.drawRegionsAndLines(o,i,s);this.regions[a].push(l)}}}this.canvas.addEventListener("mousedown",this.onClick)}},{key:"onClick",value:function(e){var t=-1;for(var a in this.regions)for(var n in this.regions[a])this.regions[a][n]&&this.ctx.isPointInPath(this.regions[a][n],e.offsetX,e.offsetY)&&(t=a);var i=-1!==t;this.props.onClick(e.clientX,e.clientY,i,t)}},{key:"drawRegionsAndLines",value:function(e,t,a){if(!(e.length<3)){var n=new Path2D;n.moveTo(e[0].x,e[0].y);for(var i=1;i<e.length;i++)n.lineTo(e[i].x,e[i].y),this.drawLine(e[i-1],e[i],a);return this.drawLine(e[0],e[e.length-1],a),n.closePath(),this.ctx.fillStyle=t,this.ctx.fill(n,"evenodd"),n}}},{key:"drawLine",value:function(e,t,a){this.ctx.beginPath(),this.ctx.moveTo(e.x,e.y),this.ctx.lineTo(t.x,t.y),this.ctx.strokeStyle=a,this.ctx.stroke()}},{key:"getCanvasBoundingBox",value:function(){return this.canvas.getBoundingClientRect()}}]),a}(l.a.Component),g=["rgba(0,200,0,.5)","rgba(200,0,0,.5)","rgba(0,100,255,.5)","rgba(255,150,0,.5)","rgba(100,255,200,.5)","rgba(200,200,0,.5)","rgba(0,200,150,.5)","rgba(200,0,200,.5)","rgba(0,204,255,.5)"],f=function(e){Object(s.a)(a,e);var t=Object(r.a)(a);function a(e){var i;Object(n.a)(this,a);var s=(i=t.call(this,e)).props.objects;return i.props.objects||(s=i.props.stateManager.curFeedState.objects),null===s&&(s=[]),i.props.isFromCamera&&(s=[]),i.state={objectIds:Object(c.a)(Array(s.length).keys()),currentMode:"select",currentOverlay:null,currentMaskId:null},i.processProps(s),i.registerClick=i.registerClick.bind(Object(h.a)(i)),i.segRef=l.a.createRef(),i.overtime=!1,i.displayImage=!0,setInterval((function(){i.overtime=!0}),6e4*window.MINUTES),i}return Object(i.a)(a,[{key:"componentDidUpdate",value:function(){var e=this.props.objects;this.props.objects||(e=this.props.stateManager.curFeedState.objects),this.props.isFromCamera&&(e=[]),JSON.stringify(e)!==JSON.stringify(this.objects)&&(this.setState({objectIds:Object(c.a)(Array(e.length).keys()),currentMode:"select",currentOverlay:null,currentMaskId:null}),this.processProps(e))}},{key:"render",value:function(){var e=this;if(["draw_polygon","start_polygon"].includes(this.state.currentMode)){this.displayImage=!1;var t=this.state.objectIds.indexOf(parseInt(this.state.currentMaskId)),a=t>=0?g[t%g.length]:g[this.state.objectIds.length%g.length];return l.a.createElement(p,{img:this.image,object:this.drawing_data.name,tags:this.drawing_data.tags,masks:this.pointMap[this.state.currentMaskId],isMobile:this.props.isMobile,originType:this.originTypeMap[this.state.currentMaskId],color:a,exitCallback:function(){e.setState({currentMode:"select"})},submitCallback:this.drawingFinished.bind(this),deleteLabelHandler:this.deleteLabelHandler.bind(this),dataEntrySubmit:this.dataEntrySubmit.bind(this),mode:"start_polygon"===this.state.currentMode?"drawing":null})}return l.a.createElement("div",null,l.a.createElement("p",null,"Label and outline as ",l.a.createElement("b",null,"many objects as possible.")," Click an object in the image to start. ",this.state.objectIds.length," ","object(s) labeled."),this.state.currentOverlay,l.a.createElement("button",{onClick:function(){return e.newPolygon.bind(e)()}},"New Label"),l.a.createElement("div",null,this.state.objectIds.map((function(t,a){return l.a.createElement("button",{key:t,style:{backgroundColor:e.fullColor(g[a%g.length])},onClick:function(){return e.labelSelectHandler(t)}},e.nameMap[t])}))),l.a.createElement(m,{ref:this.segRef,img:this.image,isFromCamera:this.props.isFromCamera,objects:this.state.objectIds,pointMap:this.pointMap,originTypeMap:this.originTypeMap,colors:g,imageWidth:this.props.imageWidth,onClick:this.registerClick,displayImage:this.displayImage}),l.a.createElement("button",{onClick:this.submit.bind(this)},"Finished annotating objects"))}},{key:"processProps",value:function(e){var t=this;this.nextId=e.length,this.objects=e,this.nameMap={},this.pointMap={},this.propertyMap={},this.originTypeMap={};for(var a=0;a<e.length;a++){var n=e[a];this.nameMap[a]=n.label,this.pointMap[a]=n.mask,this.parsePoints(a),this.propertyMap[a]=n.properties,this.originTypeMap[a]=n.type}void 0!==this.props.image?this.image=this.props.image:(this.image=new Image,this.image.onload=function(){t.forceUpdate()},this.image.src=this.props.imgUrl)}},{key:"parsePoints",value:function(e){for(var t in this.pointMap[e])if(this.pointMap[e][t].length<3)delete this.pointMap[e][t];else{var a=0,n=1,i=0,s=1;for(var r in this.pointMap[e][t]){var o=this.pointMap[e][t][r];a=Math.max(o.x,a),n=Math.min(o.x,n),i=Math.max(o.y,i),s=Math.min(o.y,s)}var l=a-n+i-s,c=l<.06?3:50*l;if(this.pointMap[e][t].length>c){for(var h=[],u=this.pointMap[e][t].length/c,d=0;d<this.pointMap[e][t].length-1;d+=u)h.push(this.pointMap[e][t][parseInt(d)]);this.pointMap[e][t]=h}}}},{key:"drawingFinished",value:function(e,t){if(this.pointMap[this.state.currentMaskId]=e,this.setState({currentMode:"select",objectIds:t?this.state.objectIds.splice(0).concat(this.state.currentMaskId):this.state.objectIds}),t){var a=l.a.createElement(d,{x:this.clickPoint.x,y:this.clickPoint.y,onSubmit:this.dataEntrySubmit.bind(this),includeSubmitButton:!0,isMobile:this.props.isMobile});this.setState({currentMode:"fill_data",currentOverlay:a})}}},{key:"deleteLabelHandler",value:function(){delete this.nameMap[this.state.currentMaskId],delete this.pointMap[this.state.currentMaskId],delete this.propertyMap[this.state.currentMaskId];var e=this.state.objectIds.slice(),t=this.state.objectIds.indexOf(parseInt(this.state.currentMaskId));t>=0&&e.splice(t,1),this.setState({currentMode:"select",currentMaskId:-1,objectIds:e})}},{key:"dataEntrySubmit",value:function(e){this.drawingData=e,this.propertyMap[this.state.currentMaskId]=this.drawingData.tags,this.nameMap[this.state.currentMaskId]=this.drawingData.name,this.setState({currentMode:"select",currentOverlay:null})}},{key:"labelSelectHandler",value:function(e){this.setState({currentMode:"draw_polygon",currentOverlay:null,currentMaskId:e}),this.drawing_data={tags:this.propertyMap[e],name:this.nameMap[e]}}},{key:"registerClick",value:function(e,t,a,n){"select"===this.state.currentMode&&(a?(this.drawing_data={tags:this.propertyMap[n],name:this.nameMap[n]},this.setState({currentMode:"draw_polygon",currentOverlay:null,currentMaskId:n})):"fill_data"!==this.state.currentMode&&this.newPolygon(e,t))}},{key:"newPolygon",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;if(this.drawing_data={tags:null,name:null},this.setState({currentMode:"start_polygon",currentMaskId:this.nextId}),-1===e){var a=this.segRef.current.getCanvasBoundingBox();e=a.left,t=a.top}this.clickPoint={x:e,y:t},this.nextId+=1}},{key:"fullColor",value:function(e){return e.substring(0,e.length-3)+"1)"}},{key:"submit",value:function(){if(this.state.objectIds.length<window.MIN_OBJECTS)alert("Label more objects, or your HIT may be rejected");else{for(var e in this.propertyMap)"string"===typeof this.propertyMap[e]&&(this.propertyMap[e]=this.propertyMap[e].split("\n "));var t={nameMap:this.nameMap,propertyMap:this.propertyMap,pointMap:this.pointMap};this.props.stateManager.socket.emit("saveObjectAnnotation",t),this.props.stateManager.logInteractiondata("object annotation",t),this.props.stateManager.onObjectAnnotationSave(t),this.props.not_turk}}}]),a}(l.a.Component),v=function(e){Object(s.a)(a,e);var t=Object(r.a)(a);function a(e){var i;return Object(n.a)(this,a),(i=t.call(this,e)).props.image?i.initialState={image:i.props.image}:i.initialState={image:void 0},i.state=i.initialState,i}return Object(i.a)(a,[{key:"componentDidMount",value:function(){this.props.stateManager&&this.props.stateManager.connect(this)}},{key:"render",value:function(){return void 0===this.state.image?null:l.a.createElement(f,{image:this.state.image,objects:this.state.objects,not_turk:!0,stateManager:this.props.stateManager,isMobile:this.props.isMobile,imageWidth:this.props.imageWidth,isFromCamera:this.props.isFromCamera})}}]),a}(l.a.Component);t.a=v},56:function(e,t,a){"use strict";var n=a(2),i=a(3),s=a(5),r=a(4),o=a(0),l=a.n(o),c=function(e){Object(s.a)(a,e);var t=Object(r.a)(a);function a(e){var i;return Object(n.a)(this,a),(i=t.call(this,e)).state={status:"",world_state:{}},i.worldContainerRef=l.a.createRef(),i}return Object(i.a)(a,[{key:"getVoxelWorldInitialState",value:function(){this.props.stateManager.socket.emit("getVoxelWorldInitialState")}},{key:"componentDidUpdate",value:function(){this.worldContainerRef.current.contentWindow.postMessage(this.state,"*")}},{key:"componentDidMount",value:function(){this.props.stateManager&&this.props.stateManager.connect(this),this.getVoxelWorldInitialState()}},{key:"render",value:function(){return l.a.createElement("div",null,l.a.createElement("div",{id:"world-container"},l.a.createElement("iframe",{id:"ifr",src:"VoxelWorld/world.html",title:"Voxel World",width:"900",height:"500",ref:this.worldContainerRef})),l.a.createElement("p",null,"Tip: press 'esc' to leave the voxel world, w/a/s/d to move, space to jump"))}}]),a}(l.a.Component);t.a=c},60:function(e,t,a){"use strict";var n=a(2),i=a(3),s=a(6),r=a(5),o=a(4),l=a(0),c=a.n(l),h=(a(94),a(31)),u=a(213),d=a(214),p=(a(95),a(9)),m={width:600,margin:50},g={minWidth:"60px",display:"inline-block"},f=function(e){Object(r.a)(a,e);var t=Object(o.a)(a);function a(e){var i;return Object(n.a)(this,a),(i=t.call(this,e)).switchAnnotation=function(e){p.a.useDesktopComponentOnMobile=e.target.checked,i.setState({use_old_annotation:p.a.useDesktopComponentOnMobile})},i.initialState={url:i.props.stateManager.url,fps:0,connected:!1,image_quality:-1,image_resolution:-1,use_old_annotation:p.a.useDesktopComponentOnMobile},i.props.isMobile&&(m={margin:50}),i.state=i.initialState,i.handleChange=i.handleChange.bind(Object(s.a)(i)),i.handleSubmit=i.handleSubmit.bind(Object(s.a)(i)),i.setImageSettings=i.setImageSettings.bind(Object(s.a)(i)),i.onImageQualityChange=i.onImageQualityChange.bind(Object(s.a)(i)),i.onImageResolutionChange=i.onImageResolutionChange.bind(Object(s.a)(i)),i}return Object(i.a)(a,[{key:"setImageSettings",value:function(e){this.setState(e)}},{key:"handleChange",value:function(e){this.setState({url:e.target.value})}},{key:"handleSubmit",value:function(e){this.props.stateManager.setUrl(this.state.url),e.preventDefault()}},{key:"handleClearSettings",value:function(e){this.props.stateManager.setDefaultUrl()}},{key:"componentDidMount",value:function(){this.props.stateManager&&(this.props.stateManager.connect(this),this.setState({connected:this.props.stateManager.connected}),this.props.stateManager.socket.on("image_settings",this.setImageSettings))}},{key:"componentWillUnmount",value:function(){this.props.stateManager&&(this.props.stateManager.disconnect(this),this.setState({connected:!1}),this.props.stateManager.socket.off("image_settings",this.setImageSettings))}},{key:"onImageQualityChange",value:function(e){!0===this.state.connected&&this.props.stateManager.socket.emit("update_image_settings",{image_quality:e,image_resolution:this.state.image_resolution})}},{key:"onImageResolutionChange",value:function(e){!0===this.state.connected&&this.props.stateManager.socket.emit("update_image_settings",{image_quality:this.state.image_quality,image_resolution:e})}},{key:"render",value:function(){var e;e=!0===this.state.connected?c.a.createElement("status-indicator",{positive:!0,pulse:!0}):c.a.createElement("status-indicator",{negative:!0,pulse:!0});var t=!1;return-1===this.state.image_quality&&(t=!0),c.a.createElement("div",null,c.a.createElement("form",{onSubmit:this.handleSubmit},c.a.createElement("label",null,"Server / Robot URL:",c.a.createElement("input",{type:"text",value:this.state.url,onChange:this.handleChange})),c.a.createElement("input",{type:"submit",value:"Reconnect"})),c.a.createElement("form",{onSubmit:this.handleClearSettings},c.a.createElement("input",{type:"submit",value:"Clear Saved Settings"})),this.props.isMobile&&c.a.createElement(u.a,{control:c.a.createElement(d.a,{checked:p.a.useDesktopComponentOnMobile,onChange:this.switchAnnotation}),label:"Use Old Annotation Tool"}),c.a.createElement("p",null,"FPS: ",this.state.fps),c.a.createElement("p",null," Connection Status: ",e," "),c.a.createElement("div",{style:m},c.a.createElement("label",{style:g},"Image Quality: \xa0"),c.a.createElement("span",null,this.state.image_quality),c.a.createElement("br",null),c.a.createElement("br",null),c.a.createElement(h.a,{value:this.state.image_quality,min:1,max:100,step:1,onChange:this.onImageQualityChange,disabled:t})),c.a.createElement("div",{style:m},c.a.createElement("label",{style:g},"Image Resolution: \xa0"),c.a.createElement("span",null,this.state.image_resolution),c.a.createElement("br",null),c.a.createElement("br",null),c.a.createElement(h.a,{value:this.state.image_resolution,min:16,max:512,step:16,onChange:this.onImageResolutionChange,disabled:t})))}}]),a}(c.a.Component);t.a=f},70:function(e,t,a){"use strict";var n=a(2),i=a(3),s=a(5),r=a(4),o=a(0),l=a.n(o),c=a(211),h=a(182),u=a(210),d=(a(151),function(e){Object(s.a)(a,e);var t=Object(r.a)(a);function a(){return Object(n.a)(this,a),t.apply(this,arguments)}return Object(i.a)(a,[{key:"renderChatHistory",value:function(){return this.props.stateManager.memory.chats.map((function(e,t){return l.a.cloneElement(l.a.createElement(h.a,{alignItems:"flex-start"},l.a.createElement("div",{className:"chatItem"},""!==e.msg?l.a.createElement(u.a,{primary:e.msg}):null)),{key:t.toString()})}))}},{key:"componentDidMount",value:function(){this.props.stateManager&&this.props.stateManager.connect(this)}},{key:"render",value:function(){return l.a.createElement("div",{className:"history"},l.a.createElement("p",null,"The history of the last 5 commands sent to the bot."),l.a.createElement(c.a,null,this.renderChatHistory()))}}]),a}(l.a.Component));t.a=d},71:function(e,t,a){"use strict";var n=a(2),i=a(3),s=a(5),r=a(4),o=a(0),l=a.n(o),c=a(44),h=a(22),u=a(34),d=a(42),p=function(e){Object(s.a)(a,e);var t=Object(r.a)(a);function a(e){var i;return Object(n.a)(this,a),(i=t.call(this,e)).state={rgb:null,depth:null,objects:null,humans:null},i}return Object(i.a)(a,[{key:"componentDidMount",value:function(){this.props.stateManager&&this.props.stateManager.connect(this)}},{key:"componentWillUnmount",value:function(){this.props.stateManager&&this.props.stateManager.disconnect(this)}},{key:"render",value:function(){var e=this.props.stateManager;return l.a.createElement("div",null,l.a.createElement(h.a,{type:"rgb",height:320,width:320,offsetH:10,offsetW:10,stateManager:e}),l.a.createElement(h.a,{type:"depth",height:320,width:320,offsetH:10,offsetW:340,stateManager:e}),l.a.createElement(u.a,{height:320,width:320,offsetH:340,offsetW:10,stateManager:e}),l.a.createElement(d.a,{height:320,width:320,offsetH:340,offsetW:340,stateManager:e}))}}]),a}(l.a.Component),m=a(56),g=function(e){Object(s.a)(a,e);var t=Object(r.a)(a);function a(e){var i;return Object(n.a)(this,a),(i=t.call(this,e)).state={agentType:"locobot"},i}return Object(i.a)(a,[{key:"componentDidMount",value:function(){this.props.stateManager&&this.props.stateManager.connect(this)}},{key:"render",value:function(){console.log("MainPane rendering agent type: "+this.state.agentType);var e=this.props.stateManager;return"locobot"===this.state.agentType?l.a.createElement("div",null,l.a.createElement(c.a,{stateManager:e}),l.a.createElement(p,{stateManager:e})):"craftassist"===this.state.agentType?l.a.createElement("div",null,l.a.createElement(c.a,{stateManager:e}),l.a.createElement(m.a,{stateManager:e})):(console.log("MainPane received invalid agent type"),l.a.createElement("h1",null,"Error: Invalid agent type"))}}]),a}(l.a.Component);t.a=g},80:function(e,t,a){},83:function(e,t,a){"use strict";var n=a(2),i=a(3),s=a(5),r=a(4),o=a(0),l=a.n(o),c=a(46),h=(a(80),function(e){Object(s.a)(a,e);var t=Object(r.a)(a);function a(){return Object(n.a)(this,a),t.apply(this,arguments)}return Object(i.a)(a,[{key:"componentDidMount",value:function(){this.props.stateManager&&this.props.stateManager.connect(this)}},{key:"jsonToResultsTable",value:function(e){var t=e.name,a=e[{perceive:"chat",interpreter:"tasks_to_push",dialogue:"object",memory:"operation"}[t]],n=e.start_time;return n=n.substring(n.indexOf(" ")),l.a.createElement("table",{className:"fixed"},l.a.createElement("tbody",null,l.a.createElement("tr",null,l.a.createElement("td",null,n),l.a.createElement("td",null,t),l.a.createElement("td",null,a))))}},{key:"render",value:function(){var e=this;return l.a.createElement("div",{className:"subpanel"},l.a.createElement("table",{className:"fixed"},l.a.createElement("thead",null,l.a.createElement("tr",null,l.a.createElement("th",null,"Timestamp"),l.a.createElement("th",null,"Event Type"),l.a.createElement("th",null,"Event Summary")))),l.a.createElement("hr",null),this.props.stateManager.memory.timelineSearchResults&&this.props.stateManager.memory.timelineSearchResults.map((function(t,a){return l.a.createElement("div",{className:"result",key:a,onClick:function(){return Object(c.b)(e.props.stateManager,JSON.stringify(t))}},e.jsonToResultsTable(t),l.a.createElement("hr",null))})))}}]),a}(l.a.Component));t.a=h},84:function(e,t,a){"use strict";var n=a(2),i=a(3),s=a(5),r=a(4),o=a(0),l=a.n(o),c=(a(80),function(e){Object(s.a)(a,e);var t=Object(r.a)(a);function a(){return Object(n.a)(this,a),t.apply(this,arguments)}return Object(i.a)(a,[{key:"shouldComponentUpdate",value:function(){return!1}},{key:"componentDidMount",value:function(){this.props.stateManager&&this.props.stateManager.connect(this)}},{key:"renderTable",value:function(e){if(e)return e.map((function(e,t){var a=e.event,n=e.description;return l.a.createElement("tr",{key:t},l.a.createElement("td",null,l.a.createElement("strong",null,a)),l.a.createElement("td",null,n))}))}},{key:"render",value:function(){return l.a.createElement("div",{className:"subpanel"},l.a.createElement("table",null,l.a.createElement("tbody",null,this.renderTable(this.props.stateManager.memory.timelineDetails))))}}]),a}(l.a.Component));t.a=c},85:function(e,t,a){"use strict";a.d(t,"b",(function(){return T}));var n=a(17),i=a(2),s=a(3),r=a(5),o=a(4),l=a(0),c=a.n(l),h=a(106),u=a(46),d=a(137);function p(e,t){var a=[];if(t){e.memory.timelineSearchPattern=t;var n=new d.a(e.memory.timelineEventHistory,{ignoreLocation:!0,useExtendedSearch:!0}).search("'"+t);n.length&&n.forEach((function(t){var n=t.item,i=JSON.parse(n);e.memory.timelineFilters.includes(Object(u.a)(i.name))&&a.push(i)}))}e.memory.timelineSearchResults=a,e.updateTimelineResults()}var m=a(40),g=a(452),f=a(445),v=a(466),b=a(453),y=a(447),k=a(210),E=a(459),M=a(461),w=Object(g.a)((function(e){return{formControl:{margin:e.spacing(1),minWidth:120,maxWidth:300}}})),x={PaperProps:{style:{maxHeight:224,width:250}}};function j(e){var t=e.stateManager,a=w(),n=T,i=c.a.useState(n),s=Object(m.a)(i,2),r=s[0],o=s[1];return c.a.createElement("div",null,c.a.createElement(y.a,{className:a.formControl},c.a.createElement(v.a,{id:"multiple-checkbox-label"},"Filters"),c.a.createElement(E.a,{labelId:"multiple-checkbox-label",id:"multiple-checkbox",multiple:!0,value:r,onChange:function(e){o(e.target.value),t.memory.timelineFilters=e.target.value,t.updateTimeline(),p(t,t.memory.timelineSearchPattern)},input:c.a.createElement(f.a,null),renderValue:function(e){return e.join(", ")},MenuProps:x},n.map((function(e){return c.a.createElement(b.a,{key:e,value:e},c.a.createElement(M.a,{checked:r.indexOf(e)>-1}),c.a.createElement(k.a,{primary:e}))})))))}var S=a(111),O=a.n(S),C=a(276),I=a(449),_=(a(80),Object(C.a)({palette:{type:"dark"}})),R=new h.a,T=["Perceive","Dialogue","Interpreter","Memory"],P=[{id:"Timeline",content:"Timeline",nestedGroups:T},{id:"Perceive",content:"Perception"},{id:"Dialogue",content:"Dialogue"},{id:"Interpreter",content:"Interpreter"},{id:"Memory",content:"Memory"}],L={tooltip:{followMouse:!0,overflowMethod:"cap",template:function(e,t){var a=JSON.parse(e.title);return"<pre>event: "+a.name+"\nagent time: "+a.agent_time+"</pre>"}},zoomMax:864e5,rollingMode:{follow:!0}},A=function(e){var t=e.onChange,a=e.placeholder;return c.a.createElement("div",{className:"search"},c.a.createElement("input",{className:"searchInput",type:"text",onChange:t,placeholder:a}),c.a.createElement("span",{className:"searchSpan"},c.a.createElement(O.a,null)))},D=function(e){Object(r.a)(a,e);var t=Object(o.a)(a);function a(){var e;return Object(i.a)(this,a),(e=t.call(this)).timeline={},e.appRef=Object(l.createRef)(),e.prevEvent="",e.searchPattern="",e}return Object(s.a)(a,[{key:"componentDidMount",value:function(){this.props.stateManager&&this.props.stateManager.connect(this),this.searchFilters=Object(n.a)(this.props.stateManager.memory.timelineFilters),this.timeline=new h.b(this.appRef.current,R,P,L);var e=this.timeline.getCurrentTime(),t=this.timeline.getCurrentTime();e=e.setSeconds(e.getSeconds()-10),t=t.setSeconds(t.getSeconds()+10),this.timeline.setOptions({start:e,end:t});var a=this;this.timeline.on("click",(function(e){if(e.item){var t=R.get(e.item);Object(u.b)(a.props.stateManager,t.title)}}))}},{key:"renderEvent",value:function(){var e=this.props.stateManager.memory.timelineEvent;if(e&&e!==this.prevEvent){this.prevEvent=e;var t=JSON.parse(e),a="";"perceive"===t.name&&(a=' ("'+t.chat+'")'),R.add([{title:JSON.stringify(t,null,2),content:t.name+a,group:"Timeline",className:t.name,start:t.start_time,end:t.end_time,type:"box"}]),R.add([{title:JSON.stringify(t,null,2),group:Object(u.a)(t.name),className:t.name,start:t.start_time,end:t.end_time,type:"box"}])}}},{key:"toggleVisibility",value:function(){var e=this.props.stateManager.memory.timelineFilters;if(e&&e!==this.searchFilters){console.log(e),this.searchFilters=Object(n.a)(e);for(var t=R.get(),a=0;a<t.length;a++)e.includes(Object(u.a)(t[a].className))?t[a].style="opacity: 1;":t[a].style="opacity: 0.2;";R.update(t)}}},{key:"render",value:function(){var e=this;return this.renderEvent(),this.toggleVisibility(),c.a.createElement("div",{className:"timeline"},c.a.createElement("p",{id:"description"},"A visualizer for viewing, inspecting, and searching through agent activities interactively.",c.a.createElement("br",null),"Click an event to view more details!"),c.a.createElement(A,{placeholder:"Search",onChange:function(t){return p(e.props.stateManager,t.target.value)}}),c.a.createElement("div",{id:"dropdown"},c.a.createElement(I.a,{theme:_},c.a.createElement(j,{stateManager:this.props.stateManager}))),c.a.createElement("div",{className:"clearfloat"}),c.a.createElement("div",{ref:this.appRef}))}}]),a}(c.a.Component);t.a=D},86:function(e,t,a){"use strict";var n=a(40),i=a(2),s=a(3),r=a(5),o=a(4),l=a(0),c=a.n(l),h=a(41),u=a(35);function d(e){return null===e.value||void 0===e.value?null:c.a.createElement(c.a.Fragment,null,c.a.createElement(h.a,{item:!0,xs:4,s:4},c.a.createElement(u.a,{variant:"button",align:"right"},e.title)),c.a.createElement(h.a,{item:!0,xs:8,s:8},c.a.createElement(u.a,{variant:"body1",align:"left"},e.value)))}var p=function(e){Object(r.a)(a,e);var t=Object(o.a)(a);function a(){return Object(i.a)(this,a),t.apply(this,arguments)}return Object(s.a)(a,[{key:"render",value:function(){var e=(0,Object(n.a)(this.props.memoryManager,3)[2])(this.props.uuid);return c.a.createElement(h.a,{container:!0,spacing:2,style:{padding:"16px"}},c.a.createElement(h.a,{item:!0,xs:11},c.a.createElement(u.a,{variant:"h4",align:"left"},"Attributes")),c.a.createElement(d,{title:"UUID",value:e.data[0]}),c.a.createElement(d,{title:"ID",value:e.data[1]}),c.a.createElement(d,{title:"X",value:e.data[2]}),c.a.createElement(d,{title:"Y",value:e.data[3]}),c.a.createElement(d,{title:"Z",value:e.data[4]}),c.a.createElement(d,{title:"Yaw",value:e.data[5]}),c.a.createElement(d,{title:"Pitch",value:e.data[6]}),c.a.createElement(d,{title:"Type",value:e.data[9]}),c.a.createElement(d,{title:"Name",value:e.data[7]}),c.a.createElement(h.a,{item:!0,xs:12},c.a.createElement(u.a,{variant:"h4",align:"left"},"Triples")),c.a.createElement(h.a,{item:!0,xs:4},c.a.createElement(u.a,{variant:"button",align:"left"},"Predicate")),c.a.createElement(h.a,{item:!0,xs:4},c.a.createElement(u.a,{variant:"button",align:"left"},"Value")),c.a.createElement(h.a,{item:!0,xs:4},c.a.createElement(u.a,{variant:"button",align:"left"},"Confidence")),e.triples.map((function(e){return c.a.createElement(c.a.Fragment,null,c.a.createElement(h.a,{item:!0,xs:4},c.a.createElement(u.a,{variant:"body2",align:"left"},e[4])),c.a.createElement(h.a,{item:!0,xs:4},c.a.createElement(u.a,{variant:"body2",align:"left"},e[6])),c.a.createElement(h.a,{item:!0,xs:4},c.a.createElement(u.a,{variant:"body2",align:"left"},e[7])))})))}}]),a}(c.a.Component);t.a=p},87:function(e,t,a){"use strict";var n=a(2),i=a(3),s=a(6),r=a(5),o=a(4),l=a(0),c=a.n(l),h=(a(94),a(31)),u=(a(95),{width:600,margin:50}),d={minWidth:"60px",display:"inline-block"},p=function(e){Object(r.a)(a,e);var t=Object(o.a)(a);function a(e){var i;return Object(n.a)(this,a),(i=t.call(this,e)).initialState={learningRate:.005,trainSplit:.7,maxIters:100,modelMetrics:null},i.onAnnotationSave=i.onAnnotationSave.bind(Object(s.a)(i)),i.onRetrain=i.onRetrain.bind(Object(s.a)(i)),i.onModelSwitch=i.onModelSwitch.bind(Object(s.a)(i)),i.onLearningRateChange=i.onLearningRateChange.bind(Object(s.a)(i)),i.onTrainSplitChange=i.onTrainSplitChange.bind(Object(s.a)(i)),i.onMaxItersChange=i.onMaxItersChange.bind(Object(s.a)(i)),i.state=i.initialState,i}return Object(i.a)(a,[{key:"componentDidMount",value:function(){this.props.stateManager&&this.props.stateManager.connect(this)}},{key:"onAnnotationSave",value:function(){this.props.stateManager&&this.props.stateManager.saveAnnotations()}},{key:"onRetrain",value:function(){if(this.props.stateManager){console.log("retraining detector...");var e=this.state,t=e.learningRate,a=e.trainSplit,n=e.maxIters;this.props.stateManager.socket.emit("retrain_detector",{learningRate:t,trainSplit:a,maxIters:n})}}},{key:"onModelSwitch",value:function(){this.props.stateManager&&(console.log("switching model..."),this.props.stateManager.socket.emit("switch_detector"))}},{key:"onLearningRateChange",value:function(e){this.setState({learningRate:e})}},{key:"onTrainSplitChange",value:function(e){this.setState({trainSplit:e})}},{key:"onMaxItersChange",value:function(e){this.setState({maxIters:e})}},{key:"render",value:function(){var e=null;if(this.state.modelMetrics){var t=this.state.modelMetrics.segm,a=Object.keys(t).map((function(e){return c.a.createElement("div",null,e+": "+t[e])}));e=c.a.createElement("div",null,c.a.createElement("div",null,"New model trained!"),"Evalution: ",a)}return c.a.createElement("div",null,c.a.createElement("div",{style:u},c.a.createElement("label",{style:d},"Learning Rate: \xa0"),c.a.createElement("span",null,this.state.learningRate),c.a.createElement("br",null),c.a.createElement("br",null),c.a.createElement(h.a,{value:this.state.learningRate,min:0,max:1,step:.005,onChange:this.onLearningRateChange})),c.a.createElement("div",{style:u},c.a.createElement("label",{style:d},"Train split: \xa0"),c.a.createElement("span",null,this.state.trainSplit),c.a.createElement("br",null),c.a.createElement("br",null),c.a.createElement(h.a,{value:this.state.trainSplit,min:0,max:1,step:.05,onChange:this.onTrainSplitChange})),c.a.createElement("div",{style:u},c.a.createElement("label",{style:d},"Max iterations: \xa0"),c.a.createElement("span",null,this.state.maxIters),c.a.createElement("br",null),c.a.createElement("br",null),c.a.createElement(h.a,{value:this.state.maxIters,min:50,max:1e3,step:50,onChange:this.onMaxItersChange})),c.a.createElement("button",{onClick:this.onAnnotationSave},"Save Annotations"),c.a.createElement("button",{onClick:this.onRetrain},"Retrain"),c.a.createElement("button",{onClick:this.onModelSwitch},"Switch"),e)}}]),a}(c.a.Component);t.a=p},88:function(e,t,a){"use strict";var n=a(2),i=a(3),s=a(6),r=a(5),o=a(4),l=a(0),c=a.n(l),h=a(9),u=(a(94),a(31)),d=(a(95),{width:600,margin:50}),p={minWidth:"60px",display:"inline-block"},m=function(e){Object(r.a)(a,e);var t=Object(o.a)(a);function a(e){var i;return Object(n.a)(this,a),(i=t.call(this,e)).keyboardToggle=function(){1==i.keyCheckRef.current.checked?i.addKeyListener():i.removeKeyListener(),i.setState({keyboard_enabled:i.keyCheckRef.current.checked})},i.initialState={move:.3,yaw:.01,velocity:.1,data_logging_time:30,keyboard_enabled:!1},i.state=i.initialState,i.handleSubmit=i.handleSubmit.bind(Object(s.a)(i)),i.onYawChange=i.onYawChange.bind(Object(s.a)(i)),i.onDataLoggingTimeChange=i.onDataLoggingTimeChange.bind(Object(s.a)(i)),i.onMoveChange=i.onMoveChange.bind(Object(s.a)(i)),i.onVelocityChange=i.onVelocityChange.bind(Object(s.a)(i)),i.navRef=c.a.createRef(),i.keyCheckRef=c.a.createRef(),i.handleClick=i.handleClick.bind(Object(s.a)(i)),i.logData=i.logData.bind(Object(s.a)(i)),i.stopRobot=i.stopRobot.bind(Object(s.a)(i)),i.unstopRobot=i.unstopRobot.bind(Object(s.a)(i)),i.keyboardToggle=i.keyboardToggle.bind(Object(s.a)(i)),i.addKeyListener=i.addKeyListener.bind(Object(s.a)(i)),i.removeKeyListener=i.removeKeyListener.bind(Object(s.a)(i)),i}return Object(i.a)(a,[{key:"handleSubmit",value:function(e){h.a.setUrl(this.state.url),e.preventDefault()}},{key:"logData",value:function(e){h.a.socket.emit("logData",this.state.data_logging_time),console.log("logData",this.state.data_logging_time)}},{key:"stopRobot",value:function(e){h.a.socket.emit("stopRobot"),console.log("Robot Stopped")}},{key:"unstopRobot",value:function(e){h.a.socket.emit("unstopRobot"),console.log("Robot UnStopped")}},{key:"addKeyListener",value:function(){var e={};this.onkey=function(t){e[t.keyCode]=!0},document.addEventListener("keyup",this.onkey);this.intervalHandle=setInterval(h.a.keyHandler,33.33,e)}},{key:"removeKeyListener",value:function(){document.removeEventListener("keyup",this.onkey),clearInterval(this.intervalHandle)}},{key:"componentDidMount",value:function(){h.a&&h.a.connect(this)}},{key:"onDataLoggingTimeChange",value:function(e){this.setState({data_logging_time:e})}},{key:"onYawChange",value:function(e){this.setState({yaw:e})}},{key:"onMoveChange",value:function(e){this.setState({move:e})}},{key:"onVelocityChange",value:function(e){this.setState({velocity:e})}},{key:"handleClick",value:function(e){var t=e.target.id;"key_up"===t?h.a.keyHandler({38:!0}):"key_down"===t?h.a.keyHandler({40:!0}):"key_left"===t?h.a.keyHandler({37:!0}):"key_right"===t?h.a.keyHandler({39:!0}):"pan_left"===t?h.a.keyHandler({49:!0}):"pan_right"===t?h.a.keyHandler({50:!0}):"tilt_up"===t?h.a.keyHandler({51:!0}):"tilt_down"===t&&h.a.keyHandler({52:!0})}},{key:"render",value:function(){return c.a.createElement("div",{ref:this.navRef},c.a.createElement("br",null),c.a.createElement("br",null),c.a.createElement("div",null,c.a.createElement("label",null," Base "),c.a.createElement("button",{id:"key_up",onClick:this.handleClick},"Up")),c.a.createElement("div",null,c.a.createElement("button",{id:"key_left",onClick:this.handleClick},"Left"),c.a.createElement("button",{id:"key_down",onClick:this.handleClick},"Down"),c.a.createElement("button",{id:"key_right",onClick:this.handleClick},"Right")),c.a.createElement("br",null),c.a.createElement("br",null),c.a.createElement("div",null,c.a.createElement("label",null," Camera "),c.a.createElement("button",{id:"tilt_up",onClick:this.handleClick},"Up")),c.a.createElement("div",null,c.a.createElement("button",{id:"pan_left",onClick:this.handleClick},"Left"),c.a.createElement("button",{id:"tilt_down",onClick:this.handleClick},"Down"),c.a.createElement("button",{id:"pan_right",onClick:this.handleClick},"Right")),c.a.createElement("br",null),c.a.createElement("input",{type:"checkbox",defaultChecked:this.state.keyboard_enabled,ref:this.keyCheckRef,onChange:this.keyboardToggle}),c.a.createElement("label",null," ","Enable Keyboard control (Use the arrow keys to move the robot, keys"," ",2," and ",4," to move camera)"," "),c.a.createElement("div",{style:d},c.a.createElement("label",{style:p},"Rotation (radians): \xa0"),c.a.createElement("span",null,this.state.yaw),c.a.createElement("br",null),c.a.createElement("br",null),c.a.createElement(u.a,{value:this.state.yaw,min:0,max:6.28,step:.01,onChange:this.onYawChange}),c.a.createElement("br",null),c.a.createElement("label",{style:p},"Move Distance (metres): \xa0"),c.a.createElement("span",null,this.state.move),c.a.createElement("br",null),c.a.createElement("br",null),c.a.createElement(u.a,{value:this.state.move,min:0,max:10,step:.1,onChange:this.onMoveChange})),c.a.createElement("div",{style:d},c.a.createElement("label",{style:p},"Velocity: \xa0"),c.a.createElement("span",null,this.state.velocity),c.a.createElement("br",null),c.a.createElement("br",null),c.a.createElement(u.a,{value:this.state.velocity,min:0,max:1,step:.05,onChange:this.onVelocityChange})),c.a.createElement("div",null,c.a.createElement("div",{style:d},c.a.createElement("label",{style:p},"Data Logging Time (seconds): \xa0"),c.a.createElement("span",null,this.state.data_logging_time),c.a.createElement("br",null),c.a.createElement("br",null),c.a.createElement(u.a,{value:this.state.data_logging_time,min:0,max:300,step:1,onChange:this.onDataLoggingTimeChange})),c.a.createElement("button",{id:"log_data",onClick:this.logData},"Log Data")))}}]),a}(c.a.Component);t.a=m},89:function(e,t,a){"use strict";var n=a(2),i=a(3),s=a(5),r=a(4),o=a(0),l=a.n(o),c=a(456),h=a(457),u=a(458),d=(a(152),function(e){Object(s.a)(a,e);var t=Object(r.a)(a);function a(e){var i;return Object(n.a)(this,a),(i=t.call(this,e)).state=e.state,i}return Object(i.a)(a,[{key:"render",value:function(){var e=this;return l.a.createElement(h.a,{style:{overflowX:"scroll",overflowY:"scroll",width:"100%"},className:"Navbar fixed-bottom"},l.a.createElement(u.a,null,l.a.createElement("button",{className:"button",onClick:function(){return e.props.paneHandler("home")}},"Home"),l.a.createElement("button",{className:"button",onClick:function(){return e.props.paneHandler("navigation")}},"Navigation"),l.a.createElement("button",{className:"button",onClick:function(){return e.props.paneHandler("settings")}},"Settings"),l.a.createElement("button",{className:"button",onClick:function(){return e.props.paneHandler("annotation")}},"Annotation"),l.a.createElement("button",{className:"button",onClick:function(){return e.props.paneHandler("camera")}},"Camera")))}}]),a}(l.a.Component)),p=a(454),m=a(455),g=a(22),f=a(42),v=a(9),b=a(44),y=a(43),k=function(e){Object(s.a)(a,e);var t=Object(r.a)(a);function a(){return Object(n.a)(this,a),t.apply(this,arguments)}return Object(i.a)(a,[{key:"render",value:function(){return l.a.createElement("div",null,l.a.createElement(p.a,null,l.a.createElement(m.a,null,"Video Feed 1",l.a.createElement(g.a,{type:"rgb",height:this.props.imageWidth,width:this.props.imageWidth,offsetH:0,offsetW:0,stateManager:v.a,isMobile:!0})),l.a.createElement(m.a,null,"Memory 2d",l.a.createElement(y.a,{stateManager:v.a,isMobile:!0,dimensions:this.props.imageWidth}))),l.a.createElement(p.a,null,l.a.createElement(m.a,null,"Video Feed 2",l.a.createElement(g.a,{type:"depth",height:this.props.imageWidth,width:this.props.imageWidth,offsetH:0,offsetW:0,stateManager:v.a,isMobile:!0})),l.a.createElement(m.a,null,"Video Feed 3",l.a.createElement(f.a,{type:"depth",height:this.props.imageWidth,width:this.props.imageWidth,offsetH:0,offsetW:0,stateManager:v.a,isMobile:!0}))),l.a.createElement(p.a,null,l.a.createElement(b.a,{stateManager:v.a,isMobile:!0})))}}]),a}(l.a.Component),E=(a(153),function(e){Object(s.a)(a,e);var t=Object(r.a)(a);function a(e){var i;return Object(n.a)(this,a),(i=t.call(this,e)).state={commands:[]},i.intervalId=void 0,i}return Object(i.a)(a,[{key:"componentDidMount",value:function(){this.intervalId=setInterval(this.sendAndClearCommands.bind(this),33.33)}},{key:"componentWillUnmount",value:function(){this.intervalId&&clearInterval(this.intervalId)}},{key:"addCommand",value:function(e){var t=this.state.commands;t.push(e),this.setState({commands:t})}},{key:"sendAndClearCommands",value:function(){this.state&&(v.a.buttonHandler(this.state.commands),this.setState({commands:[]}))}},{key:"render",value:function(){var e=this;return l.a.createElement("div",{className:"container"},l.a.createElement("button",{className:"directionButton left",onClick:function(){return e.addCommand("MOVE_LEFT")}},"Turn Left"),l.a.createElement("button",{className:"directionButton up",onClick:function(){return e.addCommand("MOVE_FORWARD")}},"Forward"),l.a.createElement("button",{className:"directionButton down",onClick:function(){return e.addCommand("MOVE_DOWN")}},"Backward"),l.a.createElement("button",{className:"directionButton right",onClick:function(){return e.addCommand("MOVE_RIGHT")}},"Turn Right"))}}]),a}(l.a.Component)),M=function(e){Object(s.a)(a,e);var t=Object(r.a)(a);function a(){return Object(n.a)(this,a),t.apply(this,arguments)}return Object(i.a)(a,[{key:"render",value:function(){return l.a.createElement("div",null,l.a.createElement(p.a,null,l.a.createElement(m.a,null,"Video Feed 1",l.a.createElement(g.a,{type:"rgb",height:this.props.imageWidth,width:this.props.imageWidth,offsetH:0,offsetW:0,stateManager:v.a,isMobile:!0})),l.a.createElement(m.a,null,"Memory 2d",l.a.createElement(y.a,{stateManager:v.a,isMobile:!0,dimensions:this.props.imageWidth}))),l.a.createElement(p.a,null,l.a.createElement(m.a,null,"Video Feed 2",l.a.createElement(g.a,{type:"depth",height:this.props.imageWidth,width:this.props.imageWidth,offsetH:0,offsetW:0,stateManager:v.a,isMobile:!0})),l.a.createElement(m.a,null,"Video Feed 3",l.a.createElement(f.a,{type:"depth",height:this.props.imageWidth,width:this.props.imageWidth,offsetH:0,offsetW:0,stateManager:v.a,isMobile:!0}))),l.a.createElement(E,null))}}]),a}(l.a.Component),w=a(60),x=function(e){Object(s.a)(a,e);var t=Object(r.a)(a);function a(){return Object(n.a)(this,a),t.apply(this,arguments)}return Object(i.a)(a,[{key:"render",value:function(){return l.a.createElement("div",null,l.a.createElement(p.a,null,l.a.createElement(m.a,null,"Video Feed 1",l.a.createElement(g.a,{type:"rgb",height:this.props.imageWidth,width:this.props.imageWidth,offsetH:0,offsetW:0,stateManager:v.a,isMobile:!0})),l.a.createElement(m.a,null,"Memory 2d",l.a.createElement(y.a,{stateManager:v.a,isMobile:!0,dimensions:this.props.imageWidth}))),l.a.createElement(p.a,null,l.a.createElement(m.a,null,"Video Feed 2",l.a.createElement(g.a,{type:"depth",height:this.props.imageWidth,width:this.props.imageWidth,offsetH:0,offsetW:0,stateManager:v.a,isMobile:!0})),l.a.createElement(m.a,null,"Video Feed 3",l.a.createElement(f.a,{type:"depth",height:this.props.imageWidth,width:this.props.imageWidth,offsetH:0,offsetW:0,stateManager:v.a,isMobile:!0}))),l.a.createElement(w.a,{stateManager:v.a,isMobile:!0}))}}]),a}(l.a.Component),j=a(48),S=a(6),O=(a(154),a(155),function(e){Object(s.a)(a,e);var t=Object(r.a)(a);function a(e){var i;return Object(n.a)(this,a),(i=t.call(this,e)).state={selectedTags:e.tags||[],suggestions:[],currentValue:""},i.inputRef=l.a.createRef(),i}return Object(i.a)(a,[{key:"render",value:function(){var e=this;return l.a.createElement("div",{className:"tag-selector"},l.a.createElement("div",{className:"tag-holder"},this.state.selectedTags.map((function(t,a){return l.a.createElement("span",{className:"tag-selected",key:a},t,l.a.createElement("button",{onClick:function(){e.removeTag(t)}},"X"))}))),l.a.createElement("input",{type:"text",placeholder:"Tags (press Enter to add)",ref:this.inputRef,onChange:this.update.bind(this),onKeyDown:this.keyDown.bind(this)}),l.a.createElement("div",{className:"tag-suggestions"},this.state.suggestions.map((function(t,a){return l.a.createElement("span",{kkey:a},l.a.createElement("button",{onClick:function(){e.addTag(t)}},a))}))))}},{key:"update",value:function(e){var t=this,a=this.inputRef.current.value;0!==a.length?this.setState({suggestions:this.props.tags.filter((function(e){return e.toLowerCase().slice(0,a.length)===a&&-1===t.state.selectedTags.indexOf(e)}))}):this.setState({suggestions:[]})}},{key:"removeTag",value:function(e){var t=this;this.setState({selectedTags:this.state.selectedTags.filter((function(t){return t!==e}))},(function(){t.props.update(t.state.selectedTags)}))}},{key:"addTag",value:function(e){var t=this;e=e.toLowerCase(),this.setState({selectedTags:this.state.selectedTags.concat(e),suggestions:[]},(function(){t.props.update(t.state.selectedTags)})),this.inputRef.current.value=""}},{key:"keyDown",value:function(e){"Enter"===e.key&&""!==this.inputRef.current.value.trim()&&this.addTag(this.inputRef.current.value),this.setState({currentValue:this.inputRef.current.value})}}]),a}(l.a.Component)),C=function(e){Object(s.a)(a,e);var t=Object(r.a)(a);function a(e){var i;return Object(n.a)(this,a),(i=t.call(this,e)).tags=i.props.tags||[],i.submit=i.submit.bind(Object(S.a)(i)),i.nameRef=l.a.createRef(),i}return Object(i.a)(a,[{key:"render",value:function(){var e=this;return l.a.createElement("div",{className:"data-entry-root",style:{top:this.props.y+"px",left:this.props.x+"px"}},l.a.createElement("input",{placeholder:"Object Name",ref:this.nameRef,defaultValue:this.props.label||""}),l.a.createElement(O,{tags:this.tags,update:function(t){return e.tags=t}}),this.props.includeSubmitButton?l.a.createElement("button",{className:"data-entry-submit",onClick:this.submit},"Submit"):null,this.props.deleteCallback?l.a.createElement("button",{className:"data-entry-delete",onClick:this.props.deleteCallback},"Delete object (\u232b)"):null)}},{key:"submit",value:function(){var e=this.nameRef.current.value.trim();0!==e.length?this.tags.length<2?alert("Please enter at least 2 descriptive tags for the object separated by enter. Examples include: color, shape, size, orientation, etc."):this.props.onSubmit({name:e.toLowerCase(),tags:this.tags}):alert("You must enter the object's name")}}]),a}(l.a.Component),I=function(e){Object(s.a)(a,e);var t=Object(r.a)(a);function a(e){var i;return Object(n.a)(this,a),(i=t.call(this,e)).onTouchEnd=function(e){i.isDrawing=!1,i.ctx.strokeStyle="red",i.ctx.lineJoin="round",i.ctx.linewidth=5,i.ctx.beginPath(),i.ctx.moveTo(i.currentMouse.x,i.currentMouse.y),i.ctx.lineTo(i.firstCoordinate.x,i.firstCoordinate.y),i.ctx.closePath(),i.ctx.stroke(),i.isDrawing=!1,i.pointList.push(i.firstCoordinate)},i.onTouchMove=function(e){if(i.isDrawing){var t=i.canvas,a=e.touches[0],n=(a.clientX-t.offsetLeft)/i.scale,s=(a.clientY-t.offsetTop)/i.scale;i.currentMouse?(i.prevMouse=i.currentMouse,i.currentMouse={x:n,y:s}):(i.currentMouse={x:n,y:s},i.firstCoordinate=i.currentMouse),i.pointList.push(i.currentMouse),i.prevMouse&&(i.ctx=i.canvas.getContext("2d"),i.ctx&&(i.ctx.strokeStyle="red",i.ctx.lineJoin="round",i.ctx.linewidth=5,i.ctx.beginPath(),i.ctx.moveTo(i.prevMouse.x,i.prevMouse.y),i.ctx.lineTo(i.currentMouse.x,i.currentMouse.y),i.ctx.closePath(),i.ctx.stroke()))}},i.canvasRef=l.a.createRef(),i.imgRef=l.a.createRef(),i.isDrawing=!1,i.annotationName="",i.annotationTags=[],i.pointList=[],i.isDrawing=!0,i}return Object(i.a)(a,[{key:"componentDidMount",value:function(){this.canvas=this.canvasRef.current,this.ctx=this.canvas.getContext("2d"),this.Offset={x:0,y:0},this.baseScale=this.canvas.width/this.props.img.width,this.scale=this.baseScale,this.canvas.height=this.props.img.height*this.baseScale,this.currentMouse=null,this.firstCoordinate=null,this.prevMouse=null,this.update()}},{key:"update",value:function(){this.ctx.resetTransform(),this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height),this.ctx.setTransform(this.scale,0,0,this.scale,this.Offset.x,this.Offset.y),this.ctx.drawImage(this.props.img,0,0)}},{key:"dataEntrySubmit",value:function(e){this.drawingData=e,this.annotationTags=this.drawingData.tags,this.annotationName=this.drawingData.name,this.props.setMode("select")}},{key:"clearMask",value:function(){this.pointList=[],this.update()}},{key:"render",value:function(){var e="500px";this.props.imageWidth&&(e=this.props.imageWidth);var t=this.canvas&&this.canvas.getBoundingClientRect().left,a=this.canvas&&this.canvas.getBoundingClientRect().bottom+50;return l.a.createElement("div",null,l.a.createElement("div",null," Outline image to annotate "),l.a.createElement("button",{onClick:this.clearMask.bind(this)},"Clear Mask"),l.a.createElement("canvas",{style:{touchAction:"none"},ref:this.canvasRef,width:e,height:e,tabIndex:"0",onTouchMove:this.onTouchMove,onTouchEnd:this.onTouchEnd,onMouseUp:this.mouseEvent}),l.a.createElement(C,{x:t,y:a,onSubmit:this.dataEntrySubmit.bind(this),includeSubmitButton:!0,isMobile:this.props.isMobile}))}}]),a}(l.a.Component),_=function(e){Object(s.a)(a,e);var t=Object(r.a)(a);function a(e){var i;return Object(n.a)(this,a),(i=t.call(this,e)).state={currentMode:"select"},i.image=i.props.image,i.stateManager=i.props.stateManager,i}return Object(i.a)(a,[{key:"setMode",value:function(e){this.setState({currentMode:e})}},{key:"render",value:function(){var e=this;return"select"===this.state.currentMode?l.a.createElement("div",null,l.a.createElement("button",{onClick:function(){e.setMode("annotating")}},"Start Annotating"),l.a.createElement("img",{width:this.props.imageWidth,height:this.props.imageWidth,src:this.image.src})):l.a.createElement("div",null,l.a.createElement(I,{img:this.image,imageWidth:this.props.imageWidth,setMode:this.setMode.bind(this)}))}}]),a}(l.a.Component),R=a(138),T=a.n(R),P=function(e){Object(s.a)(a,e);var t=Object(r.a)(a);function a(e){var i;return Object(n.a)(this,a),(i=t.call(this,e)).state={currentMode:"camera",img:null,webCamPermissions:"granted",videoConstraints:{facingMode:{exact:"environment"},height:i.props.imageWidth,width:i.props.imageWidth}},i.webcamRef=l.a.createRef(),navigator.permissions&&navigator.permissions.query&&navigator.permissions.query({name:"camera"}).then((function(e){i.setState({webCamPermissions:e.state})})),i}return Object(i.a)(a,[{key:"screenshot",value:function(){var e=this.webcamRef.current.getScreenshot(),t=new Image(this.props.imageWidth,this.props.imageWidth);t.src=e,this.setState({currentMode:"annotation",img:t})}},{key:"switchCamera",value:function(){var e=this.state.videoConstraints.facingMode;e="user"===e?{exact:"environment"}:"user",this.setState({videoConstraints:{facingMode:e,height:this.props.imageWidth,width:this.props.imageWidth}})}},{key:"render",value:function(){return"camera"===this.state.currentMode?"denied"===this.state.webCamPermissions?l.a.createElement("div",null," Please grant camera permissions "):l.a.createElement("div",null,l.a.createElement(T.a,{height:this.props.imageWidth,width:this.props.imageWidth,videoConstraints:this.state.videoConstraints,ref:this.webcamRef}),l.a.createElement("button",{onClick:this.screenshot.bind(this)}," Capture "),l.a.createElement("button",{onClick:this.switchCamera.bind(this)},"Switch Camera")):"annotation"===this.state.currentMode?v.a.useDesktopComponentOnMobile?l.a.createElement(j.a,{imageWidth:this.props.imageWidth,image:this.state.img,stateManager:v.a,isMobile:!0,isFromCamera:!0}):l.a.createElement(_,{imageWidth:this.props.imageWidth-25,image:this.state.img,stateManager:v.a}):void 0}}]),a}(l.a.Component),L=function(e){Object(s.a)(a,e);var t=Object(r.a)(a);function a(e){var i;Object(n.a)(this,a);var s=window.innerWidth;return(i=t.call(this,e)).state={screen:"home",imageWidth:.4*s,screenWidth:s,objectRGB:null},i}return Object(i.a)(a,[{key:"componentDidMount",value:function(){v.a&&v.a.connect(this)}},{key:"paneHandler",value:function(e){this.setState({screen:e})}},{key:"render",value:function(){var e;return"home"===this.state.screen?e=l.a.createElement(k,{imageWidth:this.state.imageWidth}):"navigation"===this.state.screen?e=l.a.createElement(M,{imageWidth:this.state.imageWidth}):"settings"===this.state.screen?e=l.a.createElement(x,{imageWidth:this.state.imageWidth}):"annotation"===this.state.screen?e=v.a.useDesktopComponentOnMobile?l.a.createElement(j.a,{imageWidth:this.state.screenWidth-25,image:this.state.objectRGB,stateManager:v.a,isMobile:!0}):l.a.createElement(_,{imageWidth:this.state.screenWidth-25,image:this.state.objectRGB,stateManager:v.a}):"camera"===this.state.screen&&(e=l.a.createElement(P,{imageWidth:this.state.screenWidth-25})),l.a.createElement(c.a,{fluid:!0},l.a.createElement("div",{style:{paddingBottom:50}},e),l.a.createElement("div",null,l.a.createElement(d,{paneHandler:this.paneHandler.bind(this)})))}}]),a}(l.a.Component);t.a=L},9:function(e,t,a){"use strict";var n=a(17),i=a(103),s=a.n(i),r=a(133),o=a(2),l=a(3),c=a(134),h=a.n(c),u=a(43),d=a(90),p=a(22),m=a(60),g=a(34),f=a(42),v=a(70),b=a(44),y=a(56),k=a(85),E=a(83),M=a(84),w=a(89),x=a(87),j=a(88),S=a(113),O=a(71),C=new(function(){function e(){Object(o.a)(this,e),this.refs=[],this.socket=null,this.default_url="http://localhost:8000",this.connected=!1,this.initialMemoryState={objects:new Map,humans:new Map,chatResponse:{},chats:[{msg:"",failed:!1},{msg:"",failed:!1},{msg:"",failed:!1},{msg:"",failed:!1},{msg:"",failed:!1}],timelineEvent:"",timelineEventHistory:[],timelineSearchResults:[],timelineDetails:[],timelineFilters:["Perceive","Dialogue","Interpreter","Memory"],timelineSearchPattern:"",agentType:"locobot"},this.session_id=null,this.processMemoryState=this.processMemoryState.bind(this),this.setChatResponse=this.setChatResponse.bind(this),this.setConnected=this.setConnected.bind(this),this.updateAgentType=this.updateAgentType.bind(this),this.updateStateManagerMemory=this.updateStateManagerMemory.bind(this),this.keyHandler=this.keyHandler.bind(this),this.updateVoxelWorld=this.updateVoxelWorld.bind(this),this.setVoxelWorldInitialState=this.setVoxelWorldInitialState.bind(this),this.memory=this.initialMemoryState,this.processRGB=this.processRGB.bind(this),this.processDepth=this.processDepth.bind(this),this.processRGBDepth=this.processRGBDepth.bind(this),this.processObjects=this.processObjects.bind(this),this.showAssistantReply=this.showAssistantReply.bind(this),this.processHumans=this.processHumans.bind(this),this.processMap=this.processMap.bind(this),this.returnTimelineEvent=this.returnTimelineEvent.bind(this),this.onObjectAnnotationSave=this.onObjectAnnotationSave.bind(this),this.startLabelPropagation=this.startLabelPropagation.bind(this),this.labelPropagationReturn=this.labelPropagationReturn.bind(this),this.onSave=this.onSave.bind(this),this.saveAnnotations=this.saveAnnotations.bind(this),this.annotationRetrain=this.annotationRetrain.bind(this),this.goOffline=this.goOffline.bind(this),this.handleMaxFrames=this.handleMaxFrames.bind(this);var t=new URLSearchParams(window.location.search),a=t.get("turk_experiment_id"),n=t.get("mephisto_agent_id"),i=t.get("turk_worker_id");this.setTurkExperimentId(a),this.setMephistoAgentId(n),this.setTurkWorkerId(i),this.default_url=window.location.host;var s=localStorage.getItem("server_url");"undefined"!==s&&void 0!==s&&null!==s||(s=this.default_url),this.setUrl(s),this.fps_time=performance.now(),this.curFeedState={rgbImg:null,depth:null,objects:[],origObjects:[],pose:null},this.prevFeedState={rgbImg:null,depth:null,objects:[],pose:null},this.stateProcessed={rgbImg:!1,depth:!1,objects:!1,pose:!1},this.frameCount=0,this.categories=new Set,this.properties=new Set,this.annotationsSaved=!0,this.offline=!1,this.frameId=0,this.offlineObjects={},this.updateObjects=[!1,!1],this.useDesktopComponentOnMobile=!0}return Object(l.a)(e,[{key:"setDefaultUrl",value:function(){localStorage.removeItem("server_url"),this.setUrl(this.default_url)}},{key:"setUrl",value:function(e){this.url=e,localStorage.setItem("server_url",e),this.socket&&this.socket.removeAllListeners(),this.restart(this.url)}},{key:"setTurkExperimentId",value:function(e){localStorage.setItem("turk_experiment_id",e)}},{key:"getTurkExperimentId",value:function(){return localStorage.getItem("turk_experiment_id")}},{key:"setMephistoAgentId",value:function(e){localStorage.setItem("mephisto_agent_id",e)}},{key:"getMephistoAgentId",value:function(){return localStorage.getItem("mephisto_agent_id")}},{key:"setTurkWorkerId",value:function(e){localStorage.setItem("turk_worker_id",e)}},{key:"getTurkWorkerId",value:function(){return localStorage.getItem("turk_worker_id")}},{key:"restart",value:function(e){var t=this;this.socket=h.a.connect(e,{transports:["polling","websocket"]});var a=this.socket;a.on("reconnect_attempt",(function(){a.io.opts.transports=["polling","websocket"]})),a.on("connect",(function(e){var a="";function n(){return(n=Object(r.a)(s.a.mark((function e(){var t,a;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch("https://api.ipify.org/?format=json");case 2:return t=e.sent,e.next=5,t.json();case 5:return a=e.sent,e.abrupt("return",a);case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}(function(){return n.apply(this,arguments)})().then((function(e){a=e.ip;var n=(+new Date).toString(36);t.session_id=a+":"+n,console.log("session id is"),console.log(t.session_id),t.socket.emit("store session id",t.session_id)})),console.log("connect event"),t.setConnected(!0),t.socket.emit("get_memory_objects"),t.socket.emit("get_agent_type")})),a.on("reconnect",(function(e){console.log("reconnect event"),t.setConnected(!0),t.socket.emit("get_memory_objects"),t.socket.emit("get_agent_type")})),a.on("disconnect",(function(e){console.log("disconnect event"),t.setConnected(!1),t.memory=t.initialMemoryState,t.refs.forEach((function(e){e instanceof M.a||(e.setState(e.initialState),e.forceUpdate())})),console.log("disconnected")})),a.on("setChatResponse",this.setChatResponse),a.on("memoryState",this.processMemoryState),a.on("updateState",this.updateStateManagerMemory),a.on("updateAgentType",this.updateAgentType),a.on("rgb",this.processRGB),a.on("depth",this.processDepth),a.on("image",this.processRGBDepth),a.on("objects",this.processObjects),a.on("updateVoxelWorldState",this.updateVoxelWorld),a.on("setVoxelWorldInitialState",this.setVoxelWorldInitialState),a.on("showAssistantReply",this.showAssistantReply),a.on("humans",this.processHumans),a.on("map",this.processMap),a.on("newTimelineEvent",this.returnTimelineEvent),a.on("labelPropagationReturn",this.labelPropagationReturn),a.on("annotationRetrain",this.annotationRetrain),a.on("saveRgbSegCallback",this.saveAnnotations),a.on("handleMaxFrames",this.handleMaxFrames)}},{key:"updateStateManagerMemory",value:function(e){this.memory=e.memory,this.refs.forEach((function(e){e.forceUpdate()}))}},{key:"updateAgentType",value:function(e){var t=this;this.memory.agentType=e.agent_type,this.refs.forEach((function(e){e instanceof O.a&&e.setState({agentType:t.memory.agentType})}))}},{key:"setConnected",value:function(e){this.connected=e,this.refs.forEach((function(t){t instanceof m.a&&t.setState({connected:e})}))}},{key:"setChatResponse",value:function(e){S.isMobile&&alert("Received text message: "+e.chat),this.memory.chats=e.allChats,this.memory.chatResponse[e.chat]=e.chatResponse,this.refs.forEach((function(t){t instanceof b.a&&t.setState({status:e.status}),t instanceof v.a&&t.forceUpdate()}))}},{key:"updateVoxelWorld",value:function(e){this.refs.forEach((function(t){t instanceof y.a&&(console.log("update Voxel World with "+e.world_state),t.setState({world_state:e.world_state,status:e.status}))}))}},{key:"setVoxelWorldInitialState",value:function(e){this.refs.forEach((function(t){t instanceof y.a&&(console.log("set Voxel World Initial state: "+e.world_state),t.setState({world_state:e.world_state,status:e.status}))}))}},{key:"showAssistantReply",value:function(e){this.refs.forEach((function(t){t instanceof b.a&&t.setState({agent_reply:e.agent_reply})}))}},{key:"updateTimeline",value:function(){this.refs.forEach((function(e){e instanceof k.a&&e.forceUpdate()}))}},{key:"returnTimelineEvent",value:function(e){this.memory.timelineEventHistory.push(e),this.memory.timelineEvent=e,this.updateTimeline()}},{key:"updateTimelineResults",value:function(){this.refs.forEach((function(e){e instanceof E.a&&e.forceUpdate()}))}},{key:"keyHandler",value:function(e){var t=[],a=[];for(var n in e){var i=e[n];n=parseInt(n),a.push(n),!0===i&&(38===n&&t.push("MOVE_FORWARD"),40===n&&t.push("MOVE_BACKWARD"),37===n&&t.push("MOVE_LEFT"),39===n&&t.push("MOVE_RIGHT"),49===n&&t.push("PAN_LEFT"),50===n&&t.push("PAN_RIGHT"),51===n&&t.push("TILT_UP"),52===n&&t.push("TILT_DOWN"))}if(t.length>0){var s={};for(var r in this.refs.forEach((function(e){e instanceof j.a&&(s=e.state)})),this.socket.emit("movement command",t,s),a)e[a[r]]=!1}}},{key:"buttonHandler",value:function(e){e.length>0&&this.socket.emit("movement command",e)}},{key:"logInteractiondata",value:function(e,t){var a={};a.session_id=this.session_id,a.mephisto_agent_id=this.getMephistoAgentId(),a.turk_worker_id=this.getTurkWorkerId(),a[e]=t,this.socket.emit("interaction data",a)}},{key:"onObjectAnnotationSave",value:function(e){var t=this,a=e.nameMap,n=e.pointMap,i=e.propertyMap,s=[];for(var r in a){for(var o=r<this.curFeedState.objects.length,l=o?this.curFeedState.objects[r].id:null,c=o?this.curFeedState.objects[r].xyz:null,h=0;h<n[r].length;)!n[r][h]||n[r][h].length<3?n[r].splice(h,1):h++;var u=n[r].map((function(e){return e.map((function(e,t){return[500*e.x,500*e.y]}))})),d=this.getNewBbox(u);s.push({label:a[r],mask:u,properties:i[r].join("\n "),type:"annotate",id:l,bbox:d,xyz:c})}this.curFeedState.objects=s,this.annotationsSaved=!1,this.refs.forEach((function(e){e instanceof g.a&&e.setState({objects:t.curFeedState.objects,updateFixup:!0})})),this.offline&&(this.offlineObjects[this.frameId]=this.curFeedState.objects)}},{key:"getNewBbox",value:function(e){for(var t=[],a=[],n=0;n<e.length;n++)for(var i=0;i<e[n].length;i++)t.push(e[n][i][0]),a.push(e[n][i][1]);var s=Math.min.apply(null,t),r=Math.max.apply(null,t);return[s,Math.min.apply(null,a),r,Math.max.apply(null,a)]}},{key:"startLabelPropagation",value:function(){var e=this,t=this.prevFeedState.objects.filter((function(e){return"annotate"===e.type}));for(var a in t){this.categories.add(t[a].label),t[a].properties.split("\n ").forEach((function(t){return e.properties.add(t)}))}if(t.length>0){var i={prevRgbImg:this.prevFeedState.rgbImg,depth:this.curFeedState.depth,prevDepth:this.prevFeedState.depth,objects:t,basePose:this.curFeedState.pose,prevBasePose:this.prevFeedState.pose};this.socket.emit("label_propagation",i)}if(!this.annotationsSaved){var s={rgb:this.prevFeedState.rgbImg,objects:t,frameCount:this.frameCount,categories:[null].concat(Object(n.a)(this.categories))};this.socket.emit("save_rgb_seg",s),this.annotationsSaved=!0}this.stateProcessed.rgbImg=!0,this.stateProcessed.depth=!0,this.stateProcessed.objects=!0,this.stateProcessed.pose=!0,this.frameCount++}},{key:"labelPropagationReturn",value:function(e){var t=this;this.refs.forEach((function(a){if(a instanceof g.a)for(var n in e){for(var i=0;i<e[n].mask.length;)!e[n].mask[i]||e[n].mask[i].length<3?e[n].mask.splice(i,1):i++;e[n].bbox=t.getNewBbox(e[n].mask),a.addObject(e[n]),t.curFeedState.objects.push(e[n])}})),this.offline&&(this.offlineObjects[this.frameId]=this.curFeedState.objects),Object.keys(e).length>0&&(this.annotationsSaved=!1)}},{key:"checkRunLabelProp",value:function(){return this.curFeedState.rgbImg&&this.curFeedState.depth&&this.curFeedState.objects.length>0&&this.curFeedState.pose&&this.prevFeedState.rgbImg&&this.prevFeedState.depth&&this.prevFeedState.objects.length>0&&this.prevFeedState.pose&&!this.stateProcessed.rgbImg&&!this.stateProcessed.depth&&!this.stateProcessed.objects&&!this.stateProcessed.pose}},{key:"onSave",value:function(){var e=this;if(console.log("saving annotations, categories, and properties"),this.offline){for(var t in this.offlineObjects){var a=this.offlineObjects[t];for(var i in a){var s=a[i];this.categories.add(s.label),s.properties.split("\n ").forEach((function(t){return e.properties.add(t)}))}}var r=[null].concat(Object(n.a)(this.categories)),o=Object(n.a)(this.properties);this.socket.emit("save_categories_properties",r,o);var l=0;for(var c in this.offlineObjects){var h=this.offlineObjects[c],u=l===Object.keys(this.offlineObjects).length-1,d={filepath:this.filepath,frameId:parseInt(c),outputId:l,objects:h,categories:r,finalFrame:u};this.socket.emit("offline_save_rgb_seg",d),l++}}else if(this.annotationsSaved)this.saveAnnotations();else{var p=this.curFeedState.objects.filter((function(e){return"annotate"===e.type}));for(var m in p){this.categories.add(p[m].label),p[m].properties.split("\n ").forEach((function(t){return e.properties.add(t)}))}var g={rgb:this.curFeedState.rgbImg,objects:p,frameCount:this.frameCount,categories:[null].concat(Object(n.a)(this.categories)),callback:!0};this.socket.emit("save_rgb_seg",g),this.annotationsSaved=!0}}},{key:"saveAnnotations",value:function(){var e=[null].concat(Object(n.a)(this.categories)),t=Object(n.a)(this.properties);this.socket.emit("save_annotations",e),this.socket.emit("save_categories_properties",e,t)}},{key:"annotationRetrain",value:function(e){console.log("retrained!"),this.refs.forEach((function(t){(t instanceof g.a||t instanceof x.a)&&t.setState({modelMetrics:e})}))}},{key:"goOffline",value:function(e){console.log("Going offline with filepath",e),this.filepath=e,this.frameId=0,this.offline=!0,this.socket.emit("get_offline_frame",{filepath:this.filepath,frameId:this.frameId}),this.socket.emit("start_offline_dashboard",e),this.refs.forEach((function(e){e instanceof g.a&&e.setState({objects:[],modelMetrics:null,offline:!0})}))}},{key:"handleMaxFrames",value:function(e){this.maxOfflineFrames=e,console.log("max frames:",e)}},{key:"offlineLabelProp",value:function(e,t){var a=this.offlineObjects[e],n={filepath:this.filepath,srcFrame:e,curFrame:t,objects:a};this.socket.emit("offline_label_propagation",n)}},{key:"previousFrame",value:function(){var e=this;if(0!==this.frameId){this.frameId--,console.log("Prev frame",this.frameId),this.socket.emit("get_offline_frame",{filepath:this.filepath,frameId:this.frameId}),this.curFeedState.objects=this.offlineObjects[this.frameId]||[],this.refs.forEach((function(t){t instanceof g.a&&t.setState({objects:e.curFeedState.objects})}));var t=this.offlineObjects[this.frameId]&&this.offlineObjects[this.frameId].length>0;this.offlineObjects[this.frameId+1]&&!t&&this.offlineLabelProp(this.frameId+1,this.frameId)}else console.log("no frames under 0")}},{key:"nextFrame",value:function(){var e=this;if(this.frameId!==this.maxOfflineFrames){this.frameId++,console.log("Next frame",this.frameId),this.socket.emit("get_offline_frame",{filepath:this.filepath,frameId:this.frameId}),this.curFeedState.objects=this.offlineObjects[this.frameId]||[],this.refs.forEach((function(t){t instanceof g.a&&t.setState({objects:e.curFeedState.objects})}));var t=this.offlineObjects[this.frameId]&&this.offlineObjects[this.frameId].length>0;this.offlineObjects[this.frameId-1]&&!t&&this.offlineLabelProp(this.frameId-1,this.frameId)}else console.log("no frames over",this.maxOfflineFrames)}},{key:"processMemoryState",value:function(e){this.refs.forEach((function(t){t instanceof d.a&&t.setState({isLoaded:!0,memory:e})}))}},{key:"processRGB",value:function(e){var t=this;if(this.curFeedState.rgbImg!==e){var a=new Image;a.src="data:image/webp;base64,"+e,this.refs.forEach((function(e){e instanceof p.a&&"rgb"===e.props.type&&e.setState({isLoaded:!0,rgb:a}),t.offline&&e instanceof g.a&&e.setState({rgb:a})})),this.prevFeedState.rgbImg=this.curFeedState.rgbImg,this.curFeedState.rgbImg=e,this.stateProcessed.rgbImg=!1,this.updateObjects=[!0,!0]}this.checkRunLabelProp()&&this.startLabelPropagation()}},{key:"processDepth",value:function(e){if(this.curFeedState.depth!==e){var t=new Image;t.src="data:image/webp;base64,"+e.depthImg,this.refs.forEach((function(e){e instanceof p.a&&"depth"===e.props.type&&e.setState({isLoaded:!0,depth:t})})),this.prevFeedState.depth=this.curFeedState.depth,this.curFeedState.depth={depthImg:e.depthImg,depthMax:e.depthMax,depthMin:e.depthMin},this.stateProcessed.depth=!1}this.checkRunLabelProp()&&this.startLabelPropagation()}},{key:"processRGBDepth",value:function(e){this.processRGB(e.rgb),this.processDepth(e.depth)}},{key:"processObjects",value:function(e){if(-1!==e.image&&void 0!==e.image){var t=new Image;t.src="data:image/webp;base64,"+e.image.rgb;for(var a=0;a<e.objects.length;){for(var n=0;n<e.objects[a].mask.length;)!e.objects[a].mask[n]||e.objects[a].mask[n].length<3?e.objects[a].mask.splice(n,1):n++;0!=e.objects[a].mask.length?a++:e.objects.splice(a,1)}e.objects.forEach((function(e){e.type="detector"})),this.updateObjects[1]&&(this.prevFeedState.objects=this.curFeedState.objects,this.curFeedState.objects=JSON.parse(JSON.stringify(e.objects)),this.curFeedState.origObjects=JSON.parse(JSON.stringify(e.objects)),this.stateProcessed.objects=!1,this.updateObjects=[!1,!1],this.refs.forEach((function(a){a instanceof g.a?a.setState({objects:e.objects,rgb:t,height:e.height,width:e.width,scale:e.scale}):a instanceof w.a&&a.setState({objectRGB:t})}))),this.updateObjects[0]&&(this.updateObjects[1]=!0),this.checkRunLabelProp()&&this.startLabelPropagation()}}},{key:"processHumans",value:function(e){if(-1!==e.image&&void 0!==e.image){var t=new Image;t.src="data:image/webp;base64,"+e.image.rgb,this.refs.forEach((function(a){a instanceof f.a&&a.setState({isLoaded:!0,humans:e.humans,rgb:t,height:e.height,width:e.width,scale:e.scale})}))}}},{key:"processMap",value:function(e){var t=this;this.refs.forEach((function(a){a instanceof u.a&&a.setState({isLoaded:!0,memory:t.memory,bot_xyz:[e.x,e.y,e.yaw],obstacle_map:e.map})})),this.curFeedState.pose&&(!e||e.x===this.curFeedState.pose.x&&e.y===this.curFeedState.pose.y&&e.yaw===this.curFeedState.pose.yaw)||(this.prevFeedState.pose=this.curFeedState.pose,this.curFeedState.pose={x:e.x,y:e.y,yaw:e.yaw},this.stateProcessed.pose=!1),this.checkRunLabelProp()&&this.startLabelPropagation()}},{key:"connect",value:function(e){this.refs.push(e)}},{key:"disconnect",value:function(e){this.refs=this.refs.filter((function(t){return t!==e}))}}]),e}());t.a=C},90:function(e,t,a){"use strict";var n=a(2),i=a(3),s=a(6),r=a(5),o=a(4),l=a(0),c=a.n(l),h=a(40),u=a(55),d=a(68),p=a(52),m=a(11),g=a(15),f=a(462),v=a(78),b=["height","width","classes","columns","rowHeight","headerHeight"],y=["dataKey"],k=function(e){Object(r.a)(a,e);var t=Object(o.a)(a);function a(){var e;Object(n.a)(this,a);for(var i=arguments.length,s=new Array(i),r=0;r<i;r++)s[r]=arguments[r];return(e=t.call.apply(t,[this].concat(s))).getRowClassName=function(t){var a=t.index,n=e.props,i=n.classes,s=n.onRowClick;return Object(m.a)(i.tableRow,i.flexContainer,Object(p.a)({},i.tableRowHover,-1!==a&&null!=s))},e.cellRenderer=function(t){var a=t.cellData,n=t.columnIndex,i=e.props,s=i.columns,r=i.classes,o=i.rowHeight,l=i.onRowClick;return c.a.createElement(f.a,{component:"div",className:Object(m.a)(r.tableCell,r.flexContainer,Object(p.a)({},r.noClick,null==l)),variant:"body",style:{height:o},align:null!=n&&s[n].numeric?"right":"left"},a)},e.headerRenderer=function(t){var a=t.label,n=t.columnIndex,i=e.props,s=i.headerHeight,r=i.columns,o=i.classes;return c.a.createElement(f.a,{component:"div",className:Object(m.a)(o.tableCell,o.flexContainer,o.noClick),variant:"head",style:{height:s},align:r[n].numeric?"right":"left"},c.a.createElement("span",null,a))},e}return Object(i.a)(a,[{key:"render",value:function(){var e=this,t=this.props,a=t.height,n=t.width,i=t.classes,s=t.columns,r=t.rowHeight,o=t.headerHeight,l=Object(d.a)(t,b);return c.a.createElement(v.c,Object.assign({height:a,width:n,rowHeight:r,gridStyle:{direction:"inherit"},size:"small",headerHeight:o,className:i.table},l,{rowClassName:this.getRowClassName}),s.map((function(t,a){var n=t.dataKey,s=Object(d.a)(t,y);return c.a.createElement(v.b,Object.assign({key:n,headerRenderer:function(t){return e.headerRenderer(Object(u.a)(Object(u.a)({},t),{},{columnIndex:a}))},className:i.flexContainer,cellRenderer:e.cellRenderer,dataKey:n},s))})))}}]),a}(c.a.PureComponent);k.defaultProps={headerHeight:48,rowHeight:36};var E=Object(g.a)((function(e){return{flexContainer:{display:"flex",alignItems:"center",boxSizing:"border-box"},table:{"& .ReactVirtualized__Table__headerRow":{flip:!1,paddingRight:"rtl"===e.direction?"0 !important":void 0}},tableRow:{cursor:"pointer"},tableRowHover:{"&:hover":{backgroundColor:e.palette.action.hover}},tableCell:{flex:1},noClick:{cursor:"initial"}}}))(k);function M(e){var t=e.memoryManager,a=e.onShowMemoryDetail,n=Object(h.a)(t,2),i=n[0],s=n[1];return c.a.createElement(v.a,null,(function(e){var t=e.height,n=e.width;return c.a.createElement(E,{height:t,width:n,rowCount:i(),rowGetter:function(e){var t,a=e.index;return{uuid:(t=s(a)).data[0],id:t.data[1],type:t.data[9],name:t.data[7]}},onRowClick:function(e){e.event,e.index;var t=e.rowData;t&&t.uuid&&a(t.uuid)},columns:[{flexGrow:1,width:1,label:"ID",dataKey:"id",numeric:!0},{flexGrow:5,width:5,label:"Type",dataKey:"type",numeric:!1},{flexGrow:5,width:5,label:"Name",dataKey:"name",numeric:!1}]})}))}var w=a(135);function x(e,t){e.memories,e.named_abstractions;var a=e.reference_objects,n=e.triples,i=new Map(a.map((function(e){return[e[0],{data:e}]})));n&&n.forEach((function(e){var t=e[1],a=i.get(t);a&&(a.triples?a.triples.push(e):a.triples=[e])}));var s=[];if(null!=t&&t.length>0){var r,o=Object(w.a)(i.values());try{for(o.s();!(r=o.n()).done;){var l=r.value;JSON.stringify(l).includes(t)&&s.push(l)}}catch(c){o.e(c)}finally{o.f()}}else s=Array.from(i.values());return[function(){return s.length},function(e){return s[e]},function(e){return i.get(e)}]}var j=a(86),S=a(463),O=a(464),C=a(415),I=a(136),_=a.n(I),R=a(451),T=a(276),P=a(449),L=function(e){Object(r.a)(a,e);var t=Object(o.a)(a);function a(e){var i;return Object(n.a)(this,a),(i=t.call(this,e)).initialState={height:400,width:600,isLoaded:!1,memory:null,filter:"",showDetail:!1,detailUUID:null},i.state=i.initialState,i.outer_div=c.a.createRef(),i.resizeHandler=i.resizeHandler.bind(Object(s.a)(i)),i}return Object(i.a)(a,[{key:"resizeHandler",value:function(){if(null!=this.outer_div&&null!=this.outer_div.current){var e=this.outer_div.current,t=e.clientHeight,a=e.clientWidth;(void 0!==t&&t!==this.state.height||void 0!==a&&a!==this.state.width)&&this.setState({height:t,width:a})}}},{key:"componentDidMount",value:function(){this.props.stateManager&&this.props.stateManager.connect(this),void 0!==this.props.glContainer&&this.props.glContainer.on("resize",this.resizeHandler)}},{key:"componentDidUpdate",value:function(e,t){this.resizeHandler()}},{key:"render",value:function(){var e=this;if(!this.state.isLoaded)return c.a.createElement("p",null,"Loading");var t=this.state,a=t.height,n=t.width,i=t.memory,s=t.isLoaded;if(0===a&&0===n)return c.a.createElement("div",{ref:this.outer_div,style:{height:"100%",width:"100%"}});if(!s)return c.a.createElement("div",{ref:this.outer_div,style:{height:"100%",width:"100%"}},"Loading...");var r=Object(T.a)({palette:{type:"dark"}}),o=new x(i,this.state.filter),l=this.state.height-24,h=this.state.width-24,u=function(){e.setState({showDetail:!1})};return c.a.createElement(P.a,{theme:r},c.a.createElement(S.a,{style:{borderBlockColor:"white"},color:"primary",id:"outlined-uncontrolled",label:"Search",margin:"dense",variant:"outlined",onChange:function(t){e.setState({filter:t.target.value})}}),c.a.createElement(M,{height:l,width:h,memoryManager:o,onShowMemoryDetail:function(t){e.setState({detailUUID:t,showDetail:!0})}}),c.a.createElement(O.a,{anchor:"right",open:this.state.showDetail,onClose:function(){u()}},c.a.createElement("div",{style:{width:450}},c.a.createElement(C.a,{onClick:function(){return u()}},c.a.createElement(_.a,null)),c.a.createElement(R.a,null),c.a.createElement(j.a,{memoryManager:o,uuid:this.state.detailUUID}))))}}]),a}(c.a.Component);t.a=L}},[[410,157,0,1]]]); |
import morseCli
__version__ = '1.1.0'
def morseMain():
morseCli.main() |
import React, { Component } from 'react';
import SignupForm from './presenter';
import PropTypes from 'prop-types';
class Container extends Component {
state = {
email: '',
name: '',
username: '',
password: '',
};
static propTypes = {
facebookLogin: PropTypes.func.isRequired,
createAccount: PropTypes.func.isRequired,
};
render() {
const { email, name, username, password } = this.state;
return (
<SignupForm
emailValue={email}
nameValue={name}
usernameValue={username}
passwordValue={password}
handleInputChange={this._handleInputChange}
handleSubmit={this._handleSubmit}
handleFacebookLogin={this._handleFacebookLogin}
/>
);
}
_handleInputChange = event => {
const {
target: { value, name },
} = event;
this.setState({ [name]: value });
};
_handleSubmit = event => {
const { email, name, password, username } = this.state;
const { createAccount } = this.props;
event.preventDefault();
createAccount(username, password, email, name);
// console.log(this.state);
};
_handleFacebookLogin = response => {
const { facebookLogin } = this.props;
facebookLogin(response.accessToken);
};
}
export default Container;
|
/* Javascript plotting library for jQuery, version 0.8.2.
Copyright (c) 2007-2013 IOLA and Ole Laursen.
Licensed under the MIT license.
*/
// first an inline dependency, jquery.colorhelpers.js, we inline it here
// for convenience
/* Plugin for jQuery for working with colors.
*
* Version 1.1.
*
* Inspiration from jQuery color animation plugin by John Resig.
*
* Released under the MIT license by Ole Laursen, October 2009.
*
* Examples:
*
* $.color.parse("#fff").scale('rgb', 0.25).add('a', -0.5).toString()
* var c = $.color.extract($("#mydiv"), 'background-color');
* console.log(c.r, c.g, c.b, c.a);
* $.color.make(100, 50, 25, 0.4).toString() // returns "rgba(100,50,25,0.4)"
*
* Note that .scale() and .add() return the same modified object
* instead of making a new one.
*
* V. 1.1: Fix error handling so e.g. parsing an empty string does
* produce a color rather than just crashing.
*/
(function($){$.color={};$.color.make=function(r,g,b,a){var o={};o.r=r||0;o.g=g||0;o.b=b||0;o.a=a!=null?a:1;o.add=function(c,d){for(var i=0;i<c.length;++i)o[c.charAt(i)]+=d;return o.normalize()};o.scale=function(c,f){for(var i=0;i<c.length;++i)o[c.charAt(i)]*=f;return o.normalize()};o.toString=function(){if(o.a>=1){return"rgb("+[o.r,o.g,o.b].join(",")+")"}else{return"rgba("+[o.r,o.g,o.b,o.a].join(",")+")"}};o.normalize=function(){function clamp(min,value,max){return value<min?min:value>max?max:value}o.r=clamp(0,parseInt(o.r),255);o.g=clamp(0,parseInt(o.g),255);o.b=clamp(0,parseInt(o.b),255);o.a=clamp(0,o.a,1);return o};o.clone=function(){return $.color.make(o.r,o.b,o.g,o.a)};return o.normalize()};$.color.extract=function(elem,css){var c;do{c=elem.css(css).toLowerCase();if(c!=""&&c!="transparent")break;elem=elem.parent()}while(elem.length&&!$.nodeName(elem.get(0),"body"));if(c=="rgba(0, 0, 0, 0)")c="transparent";return $.color.parse(c)};$.color.parse=function(str){var res,m=$.color.make;if(res=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(str))return m(parseInt(res[1],10),parseInt(res[2],10),parseInt(res[3],10));if(res=/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(str))return m(parseInt(res[1],10),parseInt(res[2],10),parseInt(res[3],10),parseFloat(res[4]));if(res=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(str))return m(parseFloat(res[1])*2.55,parseFloat(res[2])*2.55,parseFloat(res[3])*2.55);if(res=/rgba\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(str))return m(parseFloat(res[1])*2.55,parseFloat(res[2])*2.55,parseFloat(res[3])*2.55,parseFloat(res[4]));if(res=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(str))return m(parseInt(res[1],16),parseInt(res[2],16),parseInt(res[3],16));if(res=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(str))return m(parseInt(res[1]+res[1],16),parseInt(res[2]+res[2],16),parseInt(res[3]+res[3],16));var name=$.trim(str).toLowerCase();if(name=="transparent")return m(255,255,255,0);else{res=lookupColors[name]||[0,0,0];return m(res[0],res[1],res[2])}};var lookupColors={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0]}})(jQuery);
// the actual Flot code
(function($) {
// Cache the prototype hasOwnProperty for faster access
var hasOwnProperty = Object.prototype.hasOwnProperty;
///////////////////////////////////////////////////////////////////////////
// The Canvas object is a wrapper around an HTML5 <canvas> tag.
//
// @constructor
// @param {string} cls List of classes to apply to the canvas.
// @param {element} container Element onto which to append the canvas.
//
// Requiring a container is a little iffy, but unfortunately canvas
// operations don't work unless the canvas is attached to the DOM.
function Canvas(cls, container) {
var element = container.children("." + cls)[0];
if (element == null) {
element = document.createElement("canvas");
element.className = cls;
$(element).css({ direction: "ltr", position: "absolute", left: 0, top: 0 })
.appendTo(container);
// If HTML5 Canvas isn't available, fall back to [Ex|Flash]canvas
if (!element.getContext) {
if (window.G_vmlCanvasManager) {
element = window.G_vmlCanvasManager.initElement(element);
} else {
throw new Error("Canvas is not available. If you're using IE with a fall-back such as Excanvas, then there's either a mistake in your conditional include, or the page has no DOCTYPE and is rendering in Quirks Mode.");
}
}
}
this.element = element;
var context = this.context = element.getContext("2d");
// Determine the screen's ratio of physical to device-independent
// pixels. This is the ratio between the canvas width that the browser
// advertises and the number of pixels actually present in that space.
// The iPhone 4, for example, has a device-independent width of 320px,
// but its screen is actually 640px wide. It therefore has a pixel
// ratio of 2, while most normal devices have a ratio of 1.
var devicePixelRatio = window.devicePixelRatio || 1,
backingStoreRatio =
context.webkitBackingStorePixelRatio ||
context.mozBackingStorePixelRatio ||
context.msBackingStorePixelRatio ||
context.oBackingStorePixelRatio ||
context.backingStorePixelRatio || 1;
this.pixelRatio = devicePixelRatio / backingStoreRatio;
// Size the canvas to match the internal dimensions of its container
this.resize(container.width(), container.height());
// Collection of HTML div layers for text overlaid onto the canvas
this.textContainer = null;
this.text = {};
// Cache of text fragments and metrics, so we can avoid expensively
// re-calculating them when the plot is re-rendered in a loop.
this._textCache = {};
}
// Resizes the canvas to the given dimensions.
//
// @param {number} width New width of the canvas, in pixels.
// @param {number} width New height of the canvas, in pixels.
Canvas.prototype.resize = function(width, height) {
if (width <= 0 || height <= 0) {
throw new Error("Invalid dimensions for plot, width = " + width + ", height = " + height);
}
var element = this.element,
context = this.context,
pixelRatio = this.pixelRatio;
// Resize the canvas, increasing its density based on the display's
// pixel ratio; basically giving it more pixels without increasing the
// size of its element, to take advantage of the fact that retina
// displays have that many more pixels in the same advertised space.
// Resizing should reset the state (excanvas seems to be buggy though)
if (this.width != width) {
element.width = width * pixelRatio;
element.style.width = width + "px";
this.width = width;
}
if (this.height != height) {
element.height = height * pixelRatio;
element.style.height = height + "px";
this.height = height;
}
// Save the context, so we can reset in case we get replotted. The
// restore ensure that we're really back at the initial state, and
// should be safe even if we haven't saved the initial state yet.
context.restore();
context.save();
// Scale the coordinate space to match the display density; so even though we
// may have twice as many pixels, we still want lines and other drawing to
// appear at the same size; the extra pixels will just make them crisper.
context.scale(pixelRatio, pixelRatio);
};
// Clears the entire canvas area, not including any overlaid HTML text
Canvas.prototype.clear = function() {
this.context.clearRect(0, 0, this.width, this.height);
};
// Finishes rendering the canvas, including managing the text overlay.
Canvas.prototype.render = function() {
var cache = this._textCache;
// For each text layer, add elements marked as active that haven't
// already been rendered, and remove those that are no longer active.
for (var layerKey in cache) {
if (hasOwnProperty.call(cache, layerKey)) {
var layer = this.getTextLayer(layerKey),
layerCache = cache[layerKey];
layer.hide();
for (var styleKey in layerCache) {
if (hasOwnProperty.call(layerCache, styleKey)) {
var styleCache = layerCache[styleKey];
for (var key in styleCache) {
if (hasOwnProperty.call(styleCache, key)) {
var positions = styleCache[key].positions;
for (var i = 0, position; position = positions[i]; i++) {
if (position.active) {
if (!position.rendered) {
layer.append(position.element);
position.rendered = true;
}
} else {
positions.splice(i--, 1);
if (position.rendered) {
position.element.detach();
}
}
}
if (positions.length == 0) {
delete styleCache[key];
}
}
}
}
}
layer.show();
}
}
};
// Creates (if necessary) and returns the text overlay container.
//
// @param {string} classes String of space-separated CSS classes used to
// uniquely identify the text layer.
// @return {object} The jQuery-wrapped text-layer div.
Canvas.prototype.getTextLayer = function(classes) {
var layer = this.text[classes];
// Create the text layer if it doesn't exist
if (layer == null) {
// Create the text layer container, if it doesn't exist
if (this.textContainer == null) {
this.textContainer = $("<div class='flot-text'></div>")
.css({
position: "absolute",
top: 0,
left: 0,
bottom: 0,
right: 0,
'font-size': "smaller",
color: "#545454"
})
.insertAfter(this.element);
}
layer = this.text[classes] = $("<div></div>")
.addClass(classes)
.css({
position: "absolute",
top: 0,
left: 0,
bottom: 0,
right: 0
})
.appendTo(this.textContainer);
}
return layer;
};
// Creates (if necessary) and returns a text info object.
//
// The object looks like this:
//
// {
// width: Width of the text's wrapper div.
// height: Height of the text's wrapper div.
// element: The jQuery-wrapped HTML div containing the text.
// positions: Array of positions at which this text is drawn.
// }
//
// The positions array contains objects that look like this:
//
// {
// active: Flag indicating whether the text should be visible.
// rendered: Flag indicating whether the text is currently visible.
// element: The jQuery-wrapped HTML div containing the text.
// x: X coordinate at which to draw the text.
// y: Y coordinate at which to draw the text.
// }
//
// Each position after the first receives a clone of the original element.
//
// The idea is that that the width, height, and general 'identity' of the
// text is constant no matter where it is placed; the placements are a
// secondary property.
//
// Canvas maintains a cache of recently-used text info objects; getTextInfo
// either returns the cached element or creates a new entry.
//
// @param {string} layer A string of space-separated CSS classes uniquely
// identifying the layer containing this text.
// @param {string} text Text string to retrieve info for.
// @param {(string|object)=} font Either a string of space-separated CSS
// classes or a font-spec object, defining the text's font and style.
// @param {number=} angle Angle at which to rotate the text, in degrees.
// Angle is currently unused, it will be implemented in the future.
// @param {number=} width Maximum width of the text before it wraps.
// @return {object} a text info object.
Canvas.prototype.getTextInfo = function(layer, text, font, angle, width) {
var textStyle, layerCache, styleCache, info;
// Cast the value to a string, in case we were given a number or such
text = "" + text;
// If the font is a font-spec object, generate a CSS font definition
if (typeof font === "object") {
textStyle = font.style + " " + font.variant + " " + font.weight + " " + font.size + "px/" + font.lineHeight + "px " + font.family;
} else {
textStyle = font;
}
// Retrieve (or create) the cache for the text's layer and styles
layerCache = this._textCache[layer];
if (layerCache == null) {
layerCache = this._textCache[layer] = {};
}
styleCache = layerCache[textStyle];
if (styleCache == null) {
styleCache = layerCache[textStyle] = {};
}
info = styleCache[text];
// If we can't find a matching element in our cache, create a new one
if (info == null) {
var element = $("<div></div>").html(text)
.css({
position: "absolute",
'max-width': width,
top: -9999
})
.appendTo(this.getTextLayer(layer));
if (typeof font === "object") {
element.css({
font: textStyle,
color: font.color
});
} else if (typeof font === "string") {
element.addClass(font);
}
info = styleCache[text] = {
width: element.outerWidth(true),
height: element.outerHeight(true),
element: element,
positions: []
};
element.detach();
}
return info;
};
// Adds a text string to the canvas text overlay.
//
// The text isn't drawn immediately; it is marked as rendering, which will
// result in its addition to the canvas on the next render pass.
//
// @param {string} layer A string of space-separated CSS classes uniquely
// identifying the layer containing this text.
// @param {number} x X coordinate at which to draw the text.
// @param {number} y Y coordinate at which to draw the text.
// @param {string} text Text string to draw.
// @param {(string|object)=} font Either a string of space-separated CSS
// classes or a font-spec object, defining the text's font and style.
// @param {number=} angle Angle at which to rotate the text, in degrees.
// Angle is currently unused, it will be implemented in the future.
// @param {number=} width Maximum width of the text before it wraps.
// @param {string=} halign Horizontal alignment of the text; either "left",
// "center" or "right".
// @param {string=} valign Vertical alignment of the text; either "top",
// "middle" or "bottom".
Canvas.prototype.addText = function(layer, x, y, text, font, angle, width, halign, valign) {
var info = this.getTextInfo(layer, text, font, angle, width),
positions = info.positions;
// Tweak the div's position to match the text's alignment
if (halign == "center") {
x -= info.width / 2;
} else if (halign == "right") {
x -= info.width;
}
if (valign == "middle") {
y -= info.height / 2;
} else if (valign == "bottom") {
y -= info.height;
}
// Determine whether this text already exists at this position.
// If so, mark it for inclusion in the next render pass.
for (var i = 0, position; position = positions[i]; i++) {
if (position.x == x && position.y == y) {
position.active = true;
return;
}
}
// If the text doesn't exist at this position, create a new entry
// For the very first position we'll re-use the original element,
// while for subsequent ones we'll clone it.
position = {
active: true,
rendered: false,
element: positions.length ? info.element.clone() : info.element,
x: x,
y: y
};
positions.push(position);
// Move the element to its final position within the container
position.element.css({
top: Math.round(y),
left: Math.round(x),
'text-align': halign // In case the text wraps
});
};
// Removes one or more text strings from the canvas text overlay.
//
// If no parameters are given, all text within the layer is removed.
//
// Note that the text is not immediately removed; it is simply marked as
// inactive, which will result in its removal on the next render pass.
// This avoids the performance penalty for 'clear and redraw' behavior,
// where we potentially get rid of all text on a layer, but will likely
// add back most or all of it later, as when redrawing axes, for example.
//
// @param {string} layer A string of space-separated CSS classes uniquely
// identifying the layer containing this text.
// @param {number=} x X coordinate of the text.
// @param {number=} y Y coordinate of the text.
// @param {string=} text Text string to remove.
// @param {(string|object)=} font Either a string of space-separated CSS
// classes or a font-spec object, defining the text's font and style.
// @param {number=} angle Angle at which the text is rotated, in degrees.
// Angle is currently unused, it will be implemented in the future.
Canvas.prototype.removeText = function(layer, x, y, text, font, angle) {
if (text == null) {
var layerCache = this._textCache[layer];
if (layerCache != null) {
for (var styleKey in layerCache) {
if (hasOwnProperty.call(layerCache, styleKey)) {
var styleCache = layerCache[styleKey];
for (var key in styleCache) {
if (hasOwnProperty.call(styleCache, key)) {
var positions = styleCache[key].positions;
for (var i = 0, position; position = positions[i]; i++) {
position.active = false;
}
}
}
}
}
}
} else {
var positions = this.getTextInfo(layer, text, font, angle).positions;
for (var i = 0, position; position = positions[i]; i++) {
if (position.x == x && position.y == y) {
position.active = false;
}
}
}
};
///////////////////////////////////////////////////////////////////////////
// The top-level container for the entire plot.
function Plot(placeholder, data_, options_, plugins) {
// data is on the form:
// [ series1, series2 ... ]
// where series is either just the data as [ [x1, y1], [x2, y2], ... ]
// or { data: [ [x1, y1], [x2, y2], ... ], label: "some label", ... }
var series = [],
options = {
// the color theme used for graphs
colors: ["#edc240", "#afd8f8", "#cb4b4b", "#4da74d", "#9440ed"],
legend: {
show: true,
noColumns: 1, // number of colums in legend table
labelFormatter: null, // fn: string -> string
labelBoxBorderColor: "#ccc", // border color for the little label boxes
container: null, // container (as jQuery object) to put legend in, null means default on top of graph
position: "ne", // position of default legend container within plot
margin: 5, // distance from grid edge to default legend container within plot
backgroundColor: null, // null means auto-detect
backgroundOpacity: 0.85, // set to 0 to avoid background
sorted: null // default to no legend sorting
},
xaxis: {
show: null, // null = auto-detect, true = always, false = never
position: "bottom", // or "top"
mode: null, // null or "time"
font: null, // null (derived from CSS in placeholder) or object like { size: 11, lineHeight: 13, style: "italic", weight: "bold", family: "sans-serif", variant: "small-caps" }
color: null, // base color, labels, ticks
tickColor: null, // possibly different color of ticks, e.g. "rgba(0,0,0,0.15)"
transform: null, // null or f: number -> number to transform axis
inverseTransform: null, // if transform is set, this should be the inverse function
min: null, // min. value to show, null means set automatically
max: null, // max. value to show, null means set automatically
autoscaleMargin: null, // margin in % to add if auto-setting min/max
ticks: null, // either [1, 3] or [[1, "a"], 3] or (fn: axis info -> ticks) or app. number of ticks for auto-ticks
tickFormatter: null, // fn: number -> string
labelWidth: null, // size of tick labels in pixels
labelHeight: null,
reserveSpace: null, // whether to reserve space even if axis isn't shown
tickLength: null, // size in pixels of ticks, or "full" for whole line
alignTicksWithAxis: null, // axis number or null for no sync
tickDecimals: null, // no. of decimals, null means auto
tickSize: null, // number or [number, "unit"]
minTickSize: null // number or [number, "unit"]
},
yaxis: {
autoscaleMargin: 0.02,
position: "left" // or "right"
},
xaxes: [],
yaxes: [],
series: {
points: {
show: false,
radius: 3,
lineWidth: 2, // in pixels
fill: true,
fillColor: "#ffffff",
symbol: "circle" // or callback
},
lines: {
// we don't put in show: false so we can see
// whether lines were actively disabled
lineWidth: 2, // in pixels
fill: false,
fillColor: null,
steps: false
// Omit 'zero', so we can later default its value to
// match that of the 'fill' option.
},
bars: {
show: false,
lineWidth: 2, // in pixels
barWidth: 1, // in units of the x axis
fill: true,
fillColor: null,
align: "left", // "left", "right", or "center"
horizontal: false,
zero: true
},
shadowSize: 3,
highlightColor: null
},
grid: {
show: true,
aboveData: false,
color: "#545454", // primary color used for outline and labels
backgroundColor: null, // null for transparent, else color
borderColor: null, // set if different from the grid color
tickColor: null, // color for the ticks, e.g. "rgba(0,0,0,0.15)"
margin: 0, // distance from the canvas edge to the grid
labelMargin: 5, // in pixels
axisMargin: 8, // in pixels
borderWidth: 2, // in pixels
minBorderMargin: null, // in pixels, null means taken from points radius
markings: null, // array of ranges or fn: axes -> array of ranges
markingsColor: "#f4f4f4",
markingsLineWidth: 2,
// interactive stuff
clickable: false,
hoverable: false,
autoHighlight: true, // highlight in case mouse is near
mouseActiveRadius: 10 // how far the mouse can be away to activate an item
},
interaction: {
redrawOverlayInterval: 1000/60 // time between updates, -1 means in same flow
},
hooks: {}
},
surface = null, // the canvas for the plot itself
overlay = null, // canvas for interactive stuff on top of plot
eventHolder = null, // jQuery object that events should be bound to
ctx = null, octx = null,
xaxes = [], yaxes = [],
plotOffset = { left: 0, right: 0, top: 0, bottom: 0},
plotWidth = 0, plotHeight = 0,
hooks = {
processOptions: [],
processRawData: [],
processDatapoints: [],
processOffset: [],
drawBackground: [],
drawSeries: [],
draw: [],
bindEvents: [],
drawOverlay: [],
shutdown: []
},
plot = this;
// public functions
plot.setData = setData;
plot.setupGrid = setupGrid;
plot.draw = draw;
plot.getPlaceholder = function() { return placeholder; };
plot.getCanvas = function() { return surface.element; };
plot.getPlotOffset = function() { return plotOffset; };
plot.width = function () { return plotWidth; };
plot.height = function () { return plotHeight; };
plot.offset = function () {
var o = eventHolder.offset();
o.left += plotOffset.left;
o.top += plotOffset.top;
return o;
};
plot.getData = function () { return series; };
plot.getAxes = function () {
var res = {}, i;
$.each(xaxes.concat(yaxes), function (_, axis) {
if (axis)
res[axis.direction + (axis.n != 1 ? axis.n : "") + "axis"] = axis;
});
return res;
};
plot.getXAxes = function () { return xaxes; };
plot.getYAxes = function () { return yaxes; };
plot.c2p = canvasToAxisCoords;
plot.p2c = axisToCanvasCoords;
plot.getOptions = function () { return options; };
plot.highlight = highlight;
plot.unhighlight = unhighlight;
plot.triggerRedrawOverlay = triggerRedrawOverlay;
plot.pointOffset = function(point) {
return {
left: parseInt(xaxes[axisNumber(point, "x") - 1].p2c(+point.x) + plotOffset.left, 10),
top: parseInt(yaxes[axisNumber(point, "y") - 1].p2c(+point.y) + plotOffset.top, 10)
};
};
plot.shutdown = shutdown;
plot.destroy = function () {
shutdown();
placeholder.removeData("plot").empty();
series = [];
options = null;
surface = null;
overlay = null;
eventHolder = null;
ctx = null;
octx = null;
xaxes = [];
yaxes = [];
hooks = null;
highlights = [];
plot = null;
};
plot.resize = function () {
var width = placeholder.width(),
height = placeholder.height();
surface.resize(width, height);
overlay.resize(width, height);
};
// public attributes
plot.hooks = hooks;
// initialize
initPlugins(plot);
parseOptions(options_);
setupCanvases();
setData(data_);
setupGrid();
draw();
bindEvents();
function executeHooks(hook, args) {
args = [plot].concat(args);
for (var i = 0; i < hook.length; ++i)
hook[i].apply(this, args);
}
function initPlugins() {
// References to key classes, allowing plugins to modify them
var classes = {
Canvas: Canvas
};
for (var i = 0; i < plugins.length; ++i) {
var p = plugins[i];
p.init(plot, classes);
if (p.options)
$.extend(true, options, p.options);
}
}
function parseOptions(opts) {
$.extend(true, options, opts);
// $.extend merges arrays, rather than replacing them. When less
// colors are provided than the size of the default palette, we
// end up with those colors plus the remaining defaults, which is
// not expected behavior; avoid it by replacing them here.
if (opts && opts.colors) {
options.colors = opts.colors;
}
if (options.xaxis.color == null)
options.xaxis.color = $.color.parse(options.grid.color).scale('a', 0.22).toString();
if (options.yaxis.color == null)
options.yaxis.color = $.color.parse(options.grid.color).scale('a', 0.22).toString();
if (options.xaxis.tickColor == null) // grid.tickColor for back-compatibility
options.xaxis.tickColor = options.grid.tickColor || options.xaxis.color;
if (options.yaxis.tickColor == null) // grid.tickColor for back-compatibility
options.yaxis.tickColor = options.grid.tickColor || options.yaxis.color;
if (options.grid.borderColor == null)
options.grid.borderColor = options.grid.color;
if (options.grid.tickColor == null)
options.grid.tickColor = $.color.parse(options.grid.color).scale('a', 0.22).toString();
// Fill in defaults for axis options, including any unspecified
// font-spec fields, if a font-spec was provided.
// If no x/y axis options were provided, create one of each anyway,
// since the rest of the code assumes that they exist.
var i, axisOptions, axisCount,
fontSize = placeholder.css("font-size"),
fontSizeDefault = fontSize ? +fontSize.replace("px", "") : 13,
fontDefaults = {
style: placeholder.css("font-style"),
size: Math.round(0.8 * fontSizeDefault),
variant: placeholder.css("font-variant"),
weight: placeholder.css("font-weight"),
family: placeholder.css("font-family")
};
axisCount = options.xaxes.length || 1;
for (i = 0; i < axisCount; ++i) {
axisOptions = options.xaxes[i];
if (axisOptions && !axisOptions.tickColor) {
axisOptions.tickColor = axisOptions.color;
}
axisOptions = $.extend(true, {}, options.xaxis, axisOptions);
options.xaxes[i] = axisOptions;
if (axisOptions.font) {
axisOptions.font = $.extend({}, fontDefaults, axisOptions.font);
if (!axisOptions.font.color) {
axisOptions.font.color = axisOptions.color;
}
if (!axisOptions.font.lineHeight) {
axisOptions.font.lineHeight = Math.round(axisOptions.font.size * 1.15);
}
}
}
axisCount = options.yaxes.length || 1;
for (i = 0; i < axisCount; ++i) {
axisOptions = options.yaxes[i];
if (axisOptions && !axisOptions.tickColor) {
axisOptions.tickColor = axisOptions.color;
}
axisOptions = $.extend(true, {}, options.yaxis, axisOptions);
options.yaxes[i] = axisOptions;
if (axisOptions.font) {
axisOptions.font = $.extend({}, fontDefaults, axisOptions.font);
if (!axisOptions.font.color) {
axisOptions.font.color = axisOptions.color;
}
if (!axisOptions.font.lineHeight) {
axisOptions.font.lineHeight = Math.round(axisOptions.font.size * 1.15);
}
}
}
// backwards compatibility, to be removed in future
if (options.xaxis.noTicks && options.xaxis.ticks == null)
options.xaxis.ticks = options.xaxis.noTicks;
if (options.yaxis.noTicks && options.yaxis.ticks == null)
options.yaxis.ticks = options.yaxis.noTicks;
if (options.x2axis) {
options.xaxes[1] = $.extend(true, {}, options.xaxis, options.x2axis);
options.xaxes[1].position = "top";
}
if (options.y2axis) {
options.yaxes[1] = $.extend(true, {}, options.yaxis, options.y2axis);
options.yaxes[1].position = "right";
}
if (options.grid.coloredAreas)
options.grid.markings = options.grid.coloredAreas;
if (options.grid.coloredAreasColor)
options.grid.markingsColor = options.grid.coloredAreasColor;
if (options.lines)
$.extend(true, options.series.lines, options.lines);
if (options.points)
$.extend(true, options.series.points, options.points);
if (options.bars)
$.extend(true, options.series.bars, options.bars);
if (options.shadowSize != null)
options.series.shadowSize = options.shadowSize;
if (options.highlightColor != null)
options.series.highlightColor = options.highlightColor;
// save options on axes for future reference
for (i = 0; i < options.xaxes.length; ++i)
getOrCreateAxis(xaxes, i + 1).options = options.xaxes[i];
for (i = 0; i < options.yaxes.length; ++i)
getOrCreateAxis(yaxes, i + 1).options = options.yaxes[i];
// add hooks from options
for (var n in hooks)
if (options.hooks[n] && options.hooks[n].length)
hooks[n] = hooks[n].concat(options.hooks[n]);
executeHooks(hooks.processOptions, [options]);
}
function setData(d) {
series = parseData(d);
fillInSeriesOptions();
processData();
}
function parseData(d) {
var res = [];
for (var i = 0; i < d.length; ++i) {
var s = $.extend(true, {}, options.series);
if (d[i].data != null) {
s.data = d[i].data; // move the data instead of deep-copy
delete d[i].data;
$.extend(true, s, d[i]);
d[i].data = s.data;
}
else
s.data = d[i];
res.push(s);
}
return res;
}
function axisNumber(obj, coord) {
var a = obj[coord + "axis"];
if (typeof a == "object") // if we got a real axis, extract number
a = a.n;
if (typeof a != "number")
a = 1; // default to first axis
return a;
}
function allAxes() {
// return flat array without annoying null entries
return $.grep(xaxes.concat(yaxes), function (a) { return a; });
}
function canvasToAxisCoords(pos) {
// return an object with x/y corresponding to all used axes
var res = {}, i, axis;
for (i = 0; i < xaxes.length; ++i) {
axis = xaxes[i];
if (axis && axis.used)
res["x" + axis.n] = axis.c2p(pos.left);
}
for (i = 0; i < yaxes.length; ++i) {
axis = yaxes[i];
if (axis && axis.used)
res["y" + axis.n] = axis.c2p(pos.top);
}
if (res.x1 !== undefined)
res.x = res.x1;
if (res.y1 !== undefined)
res.y = res.y1;
return res;
}
function axisToCanvasCoords(pos) {
// get canvas coords from the first pair of x/y found in pos
var res = {}, i, axis, key;
for (i = 0; i < xaxes.length; ++i) {
axis = xaxes[i];
if (axis && axis.used) {
key = "x" + axis.n;
if (pos[key] == null && axis.n == 1)
key = "x";
if (pos[key] != null) {
res.left = axis.p2c(pos[key]);
break;
}
}
}
for (i = 0; i < yaxes.length; ++i) {
axis = yaxes[i];
if (axis && axis.used) {
key = "y" + axis.n;
if (pos[key] == null && axis.n == 1)
key = "y";
if (pos[key] != null) {
res.top = axis.p2c(pos[key]);
break;
}
}
}
return res;
}
function getOrCreateAxis(axes, number) {
if (!axes[number - 1])
axes[number - 1] = {
n: number, // save the number for future reference
direction: axes == xaxes ? "x" : "y",
options: $.extend(true, {}, axes == xaxes ? options.xaxis : options.yaxis)
};
return axes[number - 1];
}
function fillInSeriesOptions() {
var neededColors = series.length, maxIndex = -1, i;
// Subtract the number of series that already have fixed colors or
// color indexes from the number that we still need to generate.
for (i = 0; i < series.length; ++i) {
var sc = series[i].color;
if (sc != null) {
neededColors--;
if (typeof sc == "number" && sc > maxIndex) {
maxIndex = sc;
}
}
}
// If any of the series have fixed color indexes, then we need to
// generate at least as many colors as the highest index.
if (neededColors <= maxIndex) {
neededColors = maxIndex + 1;
}
// Generate all the colors, using first the option colors and then
// variations on those colors once they're exhausted.
var c, colors = [], colorPool = options.colors,
colorPoolSize = colorPool.length, variation = 0;
for (i = 0; i < neededColors; i++) {
c = $.color.parse(colorPool[i % colorPoolSize] || "#666");
// Each time we exhaust the colors in the pool we adjust
// a scaling factor used to produce more variations on
// those colors. The factor alternates negative/positive
// to produce lighter/darker colors.
// Reset the variation after every few cycles, or else
// it will end up producing only white or black colors.
if (i % colorPoolSize == 0 && i) {
if (variation >= 0) {
if (variation < 0.5) {
variation = -variation - 0.2;
} else variation = 0;
} else variation = -variation;
}
colors[i] = c.scale('rgb', 1 + variation);
}
// Finalize the series options, filling in their colors
var colori = 0, s;
for (i = 0; i < series.length; ++i) {
s = series[i];
// assign colors
if (s.color == null) {
s.color = colors[colori].toString();
++colori;
}
else if (typeof s.color == "number")
s.color = colors[s.color].toString();
// turn on lines automatically in case nothing is set
if (s.lines.show == null) {
var v, show = true;
for (v in s)
if (s[v] && s[v].show) {
show = false;
break;
}
if (show)
s.lines.show = true;
}
// If nothing was provided for lines.zero, default it to match
// lines.fill, since areas by default should extend to zero.
if (s.lines.zero == null) {
s.lines.zero = !!s.lines.fill;
}
// setup axes
s.xaxis = getOrCreateAxis(xaxes, axisNumber(s, "x"));
s.yaxis = getOrCreateAxis(yaxes, axisNumber(s, "y"));
}
}
function processData() {
var topSentry = Number.POSITIVE_INFINITY,
bottomSentry = Number.NEGATIVE_INFINITY,
fakeInfinity = Number.MAX_VALUE,
i, j, k, m, length,
s, points, ps, x, y, axis, val, f, p,
data, format;
function updateAxis(axis, min, max) {
if (min < axis.datamin && min != -fakeInfinity)
axis.datamin = min;
if (max > axis.datamax && max != fakeInfinity)
axis.datamax = max;
}
$.each(allAxes(), function (_, axis) {
// init axis
axis.datamin = topSentry;
axis.datamax = bottomSentry;
axis.used = false;
});
for (i = 0; i < series.length; ++i) {
s = series[i];
s.datapoints = { points: [] };
executeHooks(hooks.processRawData, [ s, s.data, s.datapoints ]);
}
// first pass: clean and copy data
for (i = 0; i < series.length; ++i) {
s = series[i];
data = s.data;
format = s.datapoints.format;
if (!format) {
format = [];
// find out how to copy
format.push({ x: true, number: true, required: true });
format.push({ y: true, number: true, required: true });
if (s.bars.show || (s.lines.show && s.lines.fill)) {
var autoscale = !!((s.bars.show && s.bars.zero) || (s.lines.show && s.lines.zero));
format.push({ y: true, number: true, required: false, defaultValue: 0, autoscale: autoscale });
if (s.bars.horizontal) {
delete format[format.length - 1].y;
format[format.length - 1].x = true;
}
}
s.datapoints.format = format;
}
if (s.datapoints.pointsize != null)
continue; // already filled in
s.datapoints.pointsize = format.length;
ps = s.datapoints.pointsize;
points = s.datapoints.points;
var insertSteps = s.lines.show && s.lines.steps;
s.xaxis.used = s.yaxis.used = true;
for (j = k = 0; j < data.length; ++j, k += ps) {
p = data[j];
var nullify = p == null;
if (!nullify) {
for (m = 0; m < ps; ++m) {
val = p[m];
f = format[m];
if (f) {
if (f.number && val != null) {
val = +val; // convert to number
if (isNaN(val))
val = null;
else if (val == Infinity)
val = fakeInfinity;
else if (val == -Infinity)
val = -fakeInfinity;
}
if (val == null) {
if (f.required)
nullify = true;
if (f.defaultValue != null)
val = f.defaultValue;
}
}
points[k + m] = val;
}
}
if (nullify) {
for (m = 0; m < ps; ++m) {
val = points[k + m];
if (val != null) {
f = format[m];
// extract min/max info
if (f.autoscale !== false) {
if (f.x) {
updateAxis(s.xaxis, val, val);
}
if (f.y) {
updateAxis(s.yaxis, val, val);
}
}
}
points[k + m] = null;
}
}
else {
// a little bit of line specific stuff that
// perhaps shouldn't be here, but lacking
// better means...
if (insertSteps && k > 0
&& points[k - ps] != null
&& points[k - ps] != points[k]
&& points[k - ps + 1] != points[k + 1]) {
// copy the point to make room for a middle point
for (m = 0; m < ps; ++m)
points[k + ps + m] = points[k + m];
// middle point has same y
points[k + 1] = points[k - ps + 1];
// we've added a point, better reflect that
k += ps;
}
}
}
}
// give the hooks a chance to run
for (i = 0; i < series.length; ++i) {
s = series[i];
executeHooks(hooks.processDatapoints, [ s, s.datapoints]);
}
// second pass: find datamax/datamin for auto-scaling
for (i = 0; i < series.length; ++i) {
s = series[i];
points = s.datapoints.points;
ps = s.datapoints.pointsize;
format = s.datapoints.format;
var xmin = topSentry, ymin = topSentry,
xmax = bottomSentry, ymax = bottomSentry;
for (j = 0; j < points.length; j += ps) {
if (points[j] == null)
continue;
for (m = 0; m < ps; ++m) {
val = points[j + m];
f = format[m];
if (!f || f.autoscale === false || val == fakeInfinity || val == -fakeInfinity)
continue;
if (f.x) {
if (val < xmin)
xmin = val;
if (val > xmax)
xmax = val;
}
if (f.y) {
if (val < ymin)
ymin = val;
if (val > ymax)
ymax = val;
}
}
}
if (s.bars.show) {
// make sure we got room for the bar on the dancing floor
var delta;
switch (s.bars.align) {
case "left":
delta = 0;
break;
case "right":
delta = -s.bars.barWidth;
break;
default:
delta = -s.bars.barWidth / 2;
}
if (s.bars.horizontal) {
ymin += delta;
ymax += delta + s.bars.barWidth;
}
else {
xmin += delta;
xmax += delta + s.bars.barWidth;
}
}
updateAxis(s.xaxis, xmin, xmax);
updateAxis(s.yaxis, ymin, ymax);
}
$.each(allAxes(), function (_, axis) {
if (axis.datamin == topSentry)
axis.datamin = null;
if (axis.datamax == bottomSentry)
axis.datamax = null;
});
}
function setupCanvases() {
// Make sure the placeholder is clear of everything except canvases
// from a previous plot in this container that we'll try to re-use.
placeholder.css("padding", 0) // padding messes up the positioning
.children().filter(function(){
return !$(this).hasClass("flot-overlay") && !$(this).hasClass('flot-base');
}).remove();
if (placeholder.css("position") == 'static')
placeholder.css("position", "relative"); // for positioning labels and overlay
surface = new Canvas("flot-base", placeholder);
overlay = new Canvas("flot-overlay", placeholder); // overlay canvas for interactive features
ctx = surface.context;
octx = overlay.context;
// define which element we're listening for events on
eventHolder = $(overlay.element).unbind();
// If we're re-using a plot object, shut down the old one
var existing = placeholder.data("plot");
if (existing) {
existing.shutdown();
overlay.clear();
}
// save in case we get replotted
placeholder.data("plot", plot);
}
function bindEvents() {
// bind events
if (options.grid.hoverable) {
eventHolder.mousemove(onMouseMove);
// Use bind, rather than .mouseleave, because we officially
// still support jQuery 1.2.6, which doesn't define a shortcut
// for mouseenter or mouseleave. This was a bug/oversight that
// was fixed somewhere around 1.3.x. We can return to using
// .mouseleave when we drop support for 1.2.6.
eventHolder.bind("mouseleave", onMouseLeave);
}
if (options.grid.clickable)
eventHolder.click(onClick);
executeHooks(hooks.bindEvents, [eventHolder]);
}
function shutdown() {
if (redrawTimeout)
clearTimeout(redrawTimeout);
eventHolder.unbind("mousemove", onMouseMove);
eventHolder.unbind("mouseleave", onMouseLeave);
eventHolder.unbind("click", onClick);
executeHooks(hooks.shutdown, [eventHolder]);
}
function setTransformationHelpers(axis) {
// set helper functions on the axis, assumes plot area
// has been computed already
function identity(x) { return x; }
var s, m, t = axis.options.transform || identity,
it = axis.options.inverseTransform;
// precompute how much the axis is scaling a point
// in canvas space
if (axis.direction == "x") {
s = axis.scale = plotWidth / Math.abs(t(axis.max) - t(axis.min));
m = Math.min(t(axis.max), t(axis.min));
}
else {
s = axis.scale = plotHeight / Math.abs(t(axis.max) - t(axis.min));
s = -s;
m = Math.max(t(axis.max), t(axis.min));
}
// data point to canvas coordinate
if (t == identity) // slight optimization
axis.p2c = function (p) { return (p - m) * s; };
else
axis.p2c = function (p) { return (t(p) - m) * s; };
// canvas coordinate to data point
if (!it)
axis.c2p = function (c) { return m + c / s; };
else
axis.c2p = function (c) { return it(m + c / s); };
}
function measureTickLabels(axis) {
var opts = axis.options,
ticks = axis.ticks || [],
labelWidth = opts.labelWidth || 0,
labelHeight = opts.labelHeight || 0,
maxWidth = labelWidth || (axis.direction == "x" ? Math.floor(surface.width / (ticks.length || 1)) : null),
legacyStyles = axis.direction + "Axis " + axis.direction + axis.n + "Axis",
layer = "flot-" + axis.direction + "-axis flot-" + axis.direction + axis.n + "-axis " + legacyStyles,
font = opts.font || "flot-tick-label tickLabel";
for (var i = 0; i < ticks.length; ++i) {
var t = ticks[i];
if (!t.label)
continue;
var info = surface.getTextInfo(layer, t.label, font, null, maxWidth);
labelWidth = Math.max(labelWidth, info.width);
labelHeight = Math.max(labelHeight, info.height);
}
axis.labelWidth = opts.labelWidth || labelWidth;
axis.labelHeight = opts.labelHeight || labelHeight;
}
function allocateAxisBoxFirstPhase(axis) {
// find the bounding box of the axis by looking at label
// widths/heights and ticks, make room by diminishing the
// plotOffset; this first phase only looks at one
// dimension per axis, the other dimension depends on the
// other axes so will have to wait
var lw = axis.labelWidth,
lh = axis.labelHeight,
pos = axis.options.position,
isXAxis = axis.direction === "x",
tickLength = axis.options.tickLength,
axisMargin = options.grid.axisMargin,
padding = options.grid.labelMargin,
innermost = true,
outermost = true,
first = true,
found = false;
// Determine the axis's position in its direction and on its side
$.each(isXAxis ? xaxes : yaxes, function(i, a) {
if (a && a.reserveSpace) {
if (a === axis) {
found = true;
} else if (a.options.position === pos) {
if (found) {
outermost = false;
} else {
innermost = false;
}
}
if (!found) {
first = false;
}
}
});
// The outermost axis on each side has no margin
if (outermost) {
axisMargin = 0;
}
// The ticks for the first axis in each direction stretch across
if (tickLength == null) {
tickLength = first ? "full" : 5;
}
if (!isNaN(+tickLength))
padding += +tickLength;
if (isXAxis) {
lh += padding;
if (pos == "bottom") {
plotOffset.bottom += lh + axisMargin;
axis.box = { top: surface.height - plotOffset.bottom, height: lh };
}
else {
axis.box = { top: plotOffset.top + axisMargin, height: lh };
plotOffset.top += lh + axisMargin;
}
}
else {
lw += padding;
if (pos == "left") {
axis.box = { left: plotOffset.left + axisMargin, width: lw };
plotOffset.left += lw + axisMargin;
}
else {
plotOffset.right += lw + axisMargin;
axis.box = { left: surface.width - plotOffset.right, width: lw };
}
}
// save for future reference
axis.position = pos;
axis.tickLength = tickLength;
axis.box.padding = padding;
axis.innermost = innermost;
}
function allocateAxisBoxSecondPhase(axis) {
// now that all axis boxes have been placed in one
// dimension, we can set the remaining dimension coordinates
if (axis.direction == "x") {
axis.box.left = plotOffset.left - axis.labelWidth / 2;
axis.box.width = surface.width - plotOffset.left - plotOffset.right + axis.labelWidth;
}
else {
axis.box.top = plotOffset.top - axis.labelHeight / 2;
axis.box.height = surface.height - plotOffset.bottom - plotOffset.top + axis.labelHeight;
}
}
function adjustLayoutForThingsStickingOut() {
// possibly adjust plot offset to ensure everything stays
// inside the canvas and isn't clipped off
var minMargin = options.grid.minBorderMargin,
axis, i;
// check stuff from the plot (FIXME: this should just read
// a value from the series, otherwise it's impossible to
// customize)
if (minMargin == null) {
minMargin = 0;
for (i = 0; i < series.length; ++i)
minMargin = Math.max(minMargin, 2 * (series[i].points.radius + series[i].points.lineWidth/2));
}
var margins = {
left: minMargin,
right: minMargin,
top: minMargin,
bottom: minMargin
};
// check axis labels, note we don't check the actual
// labels but instead use the overall width/height to not
// jump as much around with replots
$.each(allAxes(), function (_, axis) {
if (axis.reserveSpace && axis.ticks && axis.ticks.length) {
var lastTick = axis.ticks[axis.ticks.length - 1];
if (axis.direction === "x") {
margins.left = Math.max(margins.left, axis.labelWidth / 2);
if (lastTick.v <= axis.max) {
margins.right = Math.max(margins.right, axis.labelWidth / 2);
}
} else {
margins.bottom = Math.max(margins.bottom, axis.labelHeight / 2);
if (lastTick.v <= axis.max) {
margins.top = Math.max(margins.top, axis.labelHeight / 2);
}
}
}
});
plotOffset.left = Math.ceil(Math.max(margins.left, plotOffset.left));
plotOffset.right = Math.ceil(Math.max(margins.right, plotOffset.right));
plotOffset.top = Math.ceil(Math.max(margins.top, plotOffset.top));
plotOffset.bottom = Math.ceil(Math.max(margins.bottom, plotOffset.bottom));
}
function setupGrid() {
var i, axes = allAxes(), showGrid = options.grid.show;
// Initialize the plot's offset from the edge of the canvas
for (var a in plotOffset) {
var margin = options.grid.margin || 0;
plotOffset[a] = typeof margin == "number" ? margin : margin[a] || 0;
}
executeHooks(hooks.processOffset, [plotOffset]);
// If the grid is visible, add its border width to the offset
for (var a in plotOffset) {
if(typeof(options.grid.borderWidth) == "object") {
plotOffset[a] += showGrid ? options.grid.borderWidth[a] : 0;
}
else {
plotOffset[a] += showGrid ? options.grid.borderWidth : 0;
}
}
// init axes
$.each(axes, function (_, axis) {
axis.show = axis.options.show;
if (axis.show == null)
axis.show = axis.used; // by default an axis is visible if it's got data
axis.reserveSpace = axis.show || axis.options.reserveSpace;
setRange(axis);
});
if (showGrid) {
var allocatedAxes = $.grep(axes, function (axis) { return axis.reserveSpace; });
$.each(allocatedAxes, function (_, axis) {
// make the ticks
setupTickGeneration(axis);
setTicks(axis);
snapRangeToTicks(axis, axis.ticks);
// find labelWidth/Height for axis
measureTickLabels(axis);
});
// with all dimensions calculated, we can compute the
// axis bounding boxes, start from the outside
// (reverse order)
for (i = allocatedAxes.length - 1; i >= 0; --i)
allocateAxisBoxFirstPhase(allocatedAxes[i]);
// make sure we've got enough space for things that
// might stick out
adjustLayoutForThingsStickingOut();
$.each(allocatedAxes, function (_, axis) {
allocateAxisBoxSecondPhase(axis);
});
}
plotWidth = surface.width - plotOffset.left - plotOffset.right;
plotHeight = surface.height - plotOffset.bottom - plotOffset.top;
// now we got the proper plot dimensions, we can compute the scaling
$.each(axes, function (_, axis) {
setTransformationHelpers(axis);
});
if (showGrid) {
drawAxisLabels();
}
insertLegend();
}
function setRange(axis) {
var opts = axis.options,
min = +(opts.min != null ? opts.min : axis.datamin),
max = +(opts.max != null ? opts.max : axis.datamax),
delta = max - min;
if (delta == 0.0) {
// degenerate case
var widen = max == 0 ? 1 : 0.01;
if (opts.min == null)
min -= widen;
// always widen max if we couldn't widen min to ensure we
// don't fall into min == max which doesn't work
if (opts.max == null || opts.min != null)
max += widen;
}
else {
// consider autoscaling
var margin = opts.autoscaleMargin;
if (margin != null) {
if (opts.min == null) {
min -= delta * margin;
// make sure we don't go below zero if all values
// are positive
if (min < 0 && axis.datamin != null && axis.datamin >= 0)
min = 0;
}
if (opts.max == null) {
max += delta * margin;
if (max > 0 && axis.datamax != null && axis.datamax <= 0)
max = 0;
}
}
}
axis.min = min;
axis.max = max;
}
function setupTickGeneration(axis) {
var opts = axis.options;
// estimate number of ticks
var noTicks;
if (typeof opts.ticks == "number" && opts.ticks > 0)
noTicks = opts.ticks;
else
// heuristic based on the model a*sqrt(x) fitted to
// some data points that seemed reasonable
noTicks = 0.3 * Math.sqrt(axis.direction == "x" ? surface.width : surface.height);
var delta = (axis.max - axis.min) / noTicks,
dec = -Math.floor(Math.log(delta) / Math.LN10),
maxDec = opts.tickDecimals;
if (maxDec != null && dec > maxDec) {
dec = maxDec;
}
var magn = Math.pow(10, -dec),
norm = delta / magn, // norm is between 1.0 and 10.0
size;
if (norm < 1.5) {
size = 1;
} else if (norm < 3) {
size = 2;
// special case for 2.5, requires an extra decimal
if (norm > 2.25 && (maxDec == null || dec + 1 <= maxDec)) {
size = 2.5;
++dec;
}
} else if (norm < 7.5) {
size = 5;
} else {
size = 10;
}
size *= magn;
if (opts.minTickSize != null && size < opts.minTickSize) {
size = opts.minTickSize;
}
axis.delta = delta;
axis.tickDecimals = Math.max(0, maxDec != null ? maxDec : dec);
axis.tickSize = opts.tickSize || size;
// Time mode was moved to a plug-in in 0.8, but since so many people use this
// we'll add an especially friendly make sure they remembered to include it.
if (opts.mode == "time" && !axis.tickGenerator) {
throw new Error("Time mode requires the flot.time plugin.");
}
// Flot supports base-10 axes; any other mode else is handled by a plug-in,
// like flot.time.js.
if (!axis.tickGenerator) {
axis.tickGenerator = function (axis) {
var ticks = [],
start = floorInBase(axis.min, axis.tickSize),
i = 0,
v = Number.NaN,
prev;
do {
prev = v;
v = start + i * axis.tickSize;
ticks.push(v);
++i;
} while (v < axis.max && v != prev);
return ticks;
};
axis.tickFormatter = function (value, axis) {
var factor = axis.tickDecimals ? Math.pow(10, axis.tickDecimals) : 1;
var formatted = "" + Math.round(value * factor) / factor;
// If tickDecimals was specified, ensure that we have exactly that
// much precision; otherwise default to the value's own precision.
if (axis.tickDecimals != null) {
var decimal = formatted.indexOf(".");
var precision = decimal == -1 ? 0 : formatted.length - decimal - 1;
if (precision < axis.tickDecimals) {
return (precision ? formatted : formatted + ".") + ("" + factor).substr(1, axis.tickDecimals - precision);
}
}
return formatted;
};
}
if ($.isFunction(opts.tickFormatter))
axis.tickFormatter = function (v, axis) { return "" + opts.tickFormatter(v, axis); };
if (opts.alignTicksWithAxis != null) {
var otherAxis = (axis.direction == "x" ? xaxes : yaxes)[opts.alignTicksWithAxis - 1];
if (otherAxis && otherAxis.used && otherAxis != axis) {
// consider snapping min/max to outermost nice ticks
var niceTicks = axis.tickGenerator(axis);
if (niceTicks.length > 0) {
if (opts.min == null)
axis.min = Math.min(axis.min, niceTicks[0]);
if (opts.max == null && niceTicks.length > 1)
axis.max = Math.max(axis.max, niceTicks[niceTicks.length - 1]);
}
axis.tickGenerator = function (axis) {
// copy ticks, scaled to this axis
var ticks = [], v, i;
for (i = 0; i < otherAxis.ticks.length; ++i) {
v = (otherAxis.ticks[i].v - otherAxis.min) / (otherAxis.max - otherAxis.min);
v = axis.min + v * (axis.max - axis.min);
ticks.push(v);
}
return ticks;
};
// we might need an extra decimal since forced
// ticks don't necessarily fit naturally
if (!axis.mode && opts.tickDecimals == null) {
var extraDec = Math.max(0, -Math.floor(Math.log(axis.delta) / Math.LN10) + 1),
ts = axis.tickGenerator(axis);
// only proceed if the tick interval rounded
// with an extra decimal doesn't give us a
// zero at end
if (!(ts.length > 1 && /\..*0$/.test((ts[1] - ts[0]).toFixed(extraDec))))
axis.tickDecimals = extraDec;
}
}
}
}
function setTicks(axis) {
var oticks = axis.options.ticks, ticks = [];
if (oticks == null || (typeof oticks == "number" && oticks > 0))
ticks = axis.tickGenerator(axis);
else if (oticks) {
if ($.isFunction(oticks))
// generate the ticks
ticks = oticks(axis);
else
ticks = oticks;
}
// clean up/labelify the supplied ticks, copy them over
var i, v;
axis.ticks = [];
for (i = 0; i < ticks.length; ++i) {
var label = null;
var t = ticks[i];
if (typeof t == "object") {
v = +t[0];
if (t.length > 1)
label = t[1];
}
else
v = +t;
if (label == null)
label = axis.tickFormatter(v, axis);
if (!isNaN(v))
axis.ticks.push({ v: v, label: label });
}
}
function snapRangeToTicks(axis, ticks) {
if (axis.options.autoscaleMargin && ticks.length > 0) {
// snap to ticks
if (axis.options.min == null)
axis.min = Math.min(axis.min, ticks[0].v);
if (axis.options.max == null && ticks.length > 1)
axis.max = Math.max(axis.max, ticks[ticks.length - 1].v);
}
}
function draw() {
surface.clear();
executeHooks(hooks.drawBackground, [ctx]);
var grid = options.grid;
// draw background, if any
if (grid.show && grid.backgroundColor)
drawBackground();
if (grid.show && !grid.aboveData) {
drawGrid();
}
for (var i = 0; i < series.length; ++i) {
executeHooks(hooks.drawSeries, [ctx, series[i]]);
drawSeries(series[i]);
}
executeHooks(hooks.draw, [ctx]);
if (grid.show && grid.aboveData) {
drawGrid();
}
surface.render();
// A draw implies that either the axes or data have changed, so we
// should probably update the overlay highlights as well.
triggerRedrawOverlay();
}
function extractRange(ranges, coord) {
var axis, from, to, key, axes = allAxes();
for (var i = 0; i < axes.length; ++i) {
axis = axes[i];
if (axis.direction == coord) {
key = coord + axis.n + "axis";
if (!ranges[key] && axis.n == 1)
key = coord + "axis"; // support x1axis as xaxis
if (ranges[key]) {
from = ranges[key].from;
to = ranges[key].to;
break;
}
}
}
// backwards-compat stuff - to be removed in future
if (!ranges[key]) {
axis = coord == "x" ? xaxes[0] : yaxes[0];
from = ranges[coord + "1"];
to = ranges[coord + "2"];
}
// auto-reverse as an added bonus
if (from != null && to != null && from > to) {
var tmp = from;
from = to;
to = tmp;
}
return { from: from, to: to, axis: axis };
}
function drawBackground() {
ctx.save();
ctx.translate(plotOffset.left, plotOffset.top);
ctx.fillStyle = getColorOrGradient(options.grid.backgroundColor, plotHeight, 0, "rgba(255, 255, 255, 0)");
ctx.fillRect(0, 0, plotWidth, plotHeight);
ctx.restore();
}
function drawGrid() {
var i, axes, bw, bc;
ctx.save();
ctx.translate(plotOffset.left, plotOffset.top);
// draw markings
var markings = options.grid.markings;
if (markings) {
if ($.isFunction(markings)) {
axes = plot.getAxes();
// xmin etc. is backwards compatibility, to be
// removed in the future
axes.xmin = axes.xaxis.min;
axes.xmax = axes.xaxis.max;
axes.ymin = axes.yaxis.min;
axes.ymax = axes.yaxis.max;
markings = markings(axes);
}
for (i = 0; i < markings.length; ++i) {
var m = markings[i],
xrange = extractRange(m, "x"),
yrange = extractRange(m, "y");
// fill in missing
if (xrange.from == null)
xrange.from = xrange.axis.min;
if (xrange.to == null)
xrange.to = xrange.axis.max;
if (yrange.from == null)
yrange.from = yrange.axis.min;
if (yrange.to == null)
yrange.to = yrange.axis.max;
// clip
if (xrange.to < xrange.axis.min || xrange.from > xrange.axis.max ||
yrange.to < yrange.axis.min || yrange.from > yrange.axis.max)
continue;
xrange.from = Math.max(xrange.from, xrange.axis.min);
xrange.to = Math.min(xrange.to, xrange.axis.max);
yrange.from = Math.max(yrange.from, yrange.axis.min);
yrange.to = Math.min(yrange.to, yrange.axis.max);
if (xrange.from == xrange.to && yrange.from == yrange.to)
continue;
// then draw
xrange.from = xrange.axis.p2c(xrange.from);
xrange.to = xrange.axis.p2c(xrange.to);
yrange.from = yrange.axis.p2c(yrange.from);
yrange.to = yrange.axis.p2c(yrange.to);
if (xrange.from == xrange.to || yrange.from == yrange.to) {
// draw line
ctx.beginPath();
ctx.strokeStyle = m.color || options.grid.markingsColor;
ctx.lineWidth = m.lineWidth || options.grid.markingsLineWidth;
ctx.moveTo(xrange.from, yrange.from);
ctx.lineTo(xrange.to, yrange.to);
ctx.stroke();
}
else {
// fill area
ctx.fillStyle = m.color || options.grid.markingsColor;
ctx.fillRect(xrange.from, yrange.to,
xrange.to - xrange.from,
yrange.from - yrange.to);
}
}
}
// draw the ticks
axes = allAxes();
bw = options.grid.borderWidth;
for (var j = 0; j < axes.length; ++j) {
var axis = axes[j], box = axis.box,
t = axis.tickLength, x, y, xoff, yoff;
if (!axis.show || axis.ticks.length == 0)
continue;
ctx.lineWidth = 1;
// find the edges
if (axis.direction == "x") {
x = 0;
if (t == "full")
y = (axis.position == "top" ? 0 : plotHeight);
else
y = box.top - plotOffset.top + (axis.position == "top" ? box.height : 0);
}
else {
y = 0;
if (t == "full")
x = (axis.position == "left" ? 0 : plotWidth);
else
x = box.left - plotOffset.left + (axis.position == "left" ? box.width : 0);
}
// draw tick bar
if (!axis.innermost) {
ctx.strokeStyle = axis.options.color;
ctx.beginPath();
xoff = yoff = 0;
if (axis.direction == "x")
xoff = plotWidth + 1;
else
yoff = plotHeight + 1;
if (ctx.lineWidth == 1) {
if (axis.direction == "x") {
y = Math.floor(y) + 0.5;
} else {
x = Math.floor(x) + 0.5;
}
}
ctx.moveTo(x, y);
ctx.lineTo(x + xoff, y + yoff);
ctx.stroke();
}
// draw ticks
ctx.strokeStyle = axis.options.tickColor;
ctx.beginPath();
for (i = 0; i < axis.ticks.length; ++i) {
var v = axis.ticks[i].v;
xoff = yoff = 0;
if (isNaN(v) || v < axis.min || v > axis.max
// skip those lying on the axes if we got a border
|| (t == "full"
&& ((typeof bw == "object" && bw[axis.position] > 0) || bw > 0)
&& (v == axis.min || v == axis.max)))
continue;
if (axis.direction == "x") {
x = axis.p2c(v);
yoff = t == "full" ? -plotHeight : t;
if (axis.position == "top")
yoff = -yoff;
}
else {
y = axis.p2c(v);
xoff = t == "full" ? -plotWidth : t;
if (axis.position == "left")
xoff = -xoff;
}
if (ctx.lineWidth == 1) {
if (axis.direction == "x")
x = Math.floor(x) + 0.5;
else
y = Math.floor(y) + 0.5;
}
ctx.moveTo(x, y);
ctx.lineTo(x + xoff, y + yoff);
}
ctx.stroke();
}
// draw border
if (bw) {
// If either borderWidth or borderColor is an object, then draw the border
// line by line instead of as one rectangle
bc = options.grid.borderColor;
if(typeof bw == "object" || typeof bc == "object") {
if (typeof bw !== "object") {
bw = {top: bw, right: bw, bottom: bw, left: bw};
}
if (typeof bc !== "object") {
bc = {top: bc, right: bc, bottom: bc, left: bc};
}
if (bw.top > 0) {
ctx.strokeStyle = bc.top;
ctx.lineWidth = bw.top;
ctx.beginPath();
ctx.moveTo(0 - bw.left, 0 - bw.top/2);
ctx.lineTo(plotWidth, 0 - bw.top/2);
ctx.stroke();
}
if (bw.right > 0) {
ctx.strokeStyle = bc.right;
ctx.lineWidth = bw.right;
ctx.beginPath();
ctx.moveTo(plotWidth + bw.right / 2, 0 - bw.top);
ctx.lineTo(plotWidth + bw.right / 2, plotHeight);
ctx.stroke();
}
if (bw.bottom > 0) {
ctx.strokeStyle = bc.bottom;
ctx.lineWidth = bw.bottom;
ctx.beginPath();
ctx.moveTo(plotWidth + bw.right, plotHeight + bw.bottom / 2);
ctx.lineTo(0, plotHeight + bw.bottom / 2);
ctx.stroke();
}
if (bw.left > 0) {
ctx.strokeStyle = bc.left;
ctx.lineWidth = bw.left;
ctx.beginPath();
ctx.moveTo(0 - bw.left/2, plotHeight + bw.bottom);
ctx.lineTo(0- bw.left/2, 0);
ctx.stroke();
}
}
else {
ctx.lineWidth = bw;
ctx.strokeStyle = options.grid.borderColor;
ctx.strokeRect(-bw/2, -bw/2, plotWidth + bw, plotHeight + bw);
}
}
ctx.restore();
}
function drawAxisLabels() {
$.each(allAxes(), function (_, axis) {
var box = axis.box,
legacyStyles = axis.direction + "Axis " + axis.direction + axis.n + "Axis",
layer = "flot-" + axis.direction + "-axis flot-" + axis.direction + axis.n + "-axis " + legacyStyles,
font = axis.options.font || "flot-tick-label tickLabel",
tick, x, y, halign, valign;
// Remove text before checking for axis.show and ticks.length;
// otherwise plugins, like flot-tickrotor, that draw their own
// tick labels will end up with both theirs and the defaults.
surface.removeText(layer);
if (!axis.show || axis.ticks.length == 0)
return;
for (var i = 0; i < axis.ticks.length; ++i) {
tick = axis.ticks[i];
if (!tick.label || tick.v < axis.min || tick.v > axis.max)
continue;
if (axis.direction == "x") {
halign = "center";
x = plotOffset.left + axis.p2c(tick.v);
if (axis.position == "bottom") {
y = box.top + box.padding;
} else {
y = box.top + box.height - box.padding;
valign = "bottom";
}
} else {
valign = "middle";
y = plotOffset.top + axis.p2c(tick.v);
if (axis.position == "left") {
x = box.left + box.width - box.padding;
halign = "right";
} else {
x = box.left + box.padding;
}
}
surface.addText(layer, x, y, tick.label, font, null, null, halign, valign);
}
});
}
function drawSeries(series) {
if (series.lines.show)
drawSeriesLines(series);
if (series.bars.show)
drawSeriesBars(series);
if (series.points.show)
drawSeriesPoints(series);
}
function drawSeriesLines(series) {
function plotLine(datapoints, xoffset, yoffset, axisx, axisy) {
var points = datapoints.points,
ps = datapoints.pointsize,
prevx = null, prevy = null;
ctx.beginPath();
for (var i = ps; i < points.length; i += ps) {
var x1 = points[i - ps], y1 = points[i - ps + 1],
x2 = points[i], y2 = points[i + 1];
if (x1 == null || x2 == null)
continue;
// clip with ymin
if (y1 <= y2 && y1 < axisy.min) {
if (y2 < axisy.min)
continue; // line segment is outside
// compute new intersection point
x1 = (axisy.min - y1) / (y2 - y1) * (x2 - x1) + x1;
y1 = axisy.min;
}
else if (y2 <= y1 && y2 < axisy.min) {
if (y1 < axisy.min)
continue;
x2 = (axisy.min - y1) / (y2 - y1) * (x2 - x1) + x1;
y2 = axisy.min;
}
// clip with ymax
if (y1 >= y2 && y1 > axisy.max) {
if (y2 > axisy.max)
continue;
x1 = (axisy.max - y1) / (y2 - y1) * (x2 - x1) + x1;
y1 = axisy.max;
}
else if (y2 >= y1 && y2 > axisy.max) {
if (y1 > axisy.max)
continue;
x2 = (axisy.max - y1) / (y2 - y1) * (x2 - x1) + x1;
y2 = axisy.max;
}
// clip with xmin
if (x1 <= x2 && x1 < axisx.min) {
if (x2 < axisx.min)
continue;
y1 = (axisx.min - x1) / (x2 - x1) * (y2 - y1) + y1;
x1 = axisx.min;
}
else if (x2 <= x1 && x2 < axisx.min) {
if (x1 < axisx.min)
continue;
y2 = (axisx.min - x1) / (x2 - x1) * (y2 - y1) + y1;
x2 = axisx.min;
}
// clip with xmax
if (x1 >= x2 && x1 > axisx.max) {
if (x2 > axisx.max)
continue;
y1 = (axisx.max - x1) / (x2 - x1) * (y2 - y1) + y1;
x1 = axisx.max;
}
else if (x2 >= x1 && x2 > axisx.max) {
if (x1 > axisx.max)
continue;
y2 = (axisx.max - x1) / (x2 - x1) * (y2 - y1) + y1;
x2 = axisx.max;
}
if (x1 != prevx || y1 != prevy)
ctx.moveTo(axisx.p2c(x1) + xoffset, axisy.p2c(y1) + yoffset);
prevx = x2;
prevy = y2;
ctx.lineTo(axisx.p2c(x2) + xoffset, axisy.p2c(y2) + yoffset);
}
ctx.stroke();
}
function plotLineArea(datapoints, axisx, axisy) {
var points = datapoints.points,
ps = datapoints.pointsize,
bottom = Math.min(Math.max(0, axisy.min), axisy.max),
i = 0, top, areaOpen = false,
ypos = 1, segmentStart = 0, segmentEnd = 0;
// we process each segment in two turns, first forward
// direction to sketch out top, then once we hit the
// end we go backwards to sketch the bottom
while (true) {
if (ps > 0 && i > points.length + ps)
break;
i += ps; // ps is negative if going backwards
var x1 = points[i - ps],
y1 = points[i - ps + ypos],
x2 = points[i], y2 = points[i + ypos];
if (areaOpen) {
if (ps > 0 && x1 != null && x2 == null) {
// at turning point
segmentEnd = i;
ps = -ps;
ypos = 2;
continue;
}
if (ps < 0 && i == segmentStart + ps) {
// done with the reverse sweep
ctx.fill();
areaOpen = false;
ps = -ps;
ypos = 1;
i = segmentStart = segmentEnd + ps;
continue;
}
}
if (x1 == null || x2 == null)
continue;
// clip x values
// clip with xmin
if (x1 <= x2 && x1 < axisx.min) {
if (x2 < axisx.min)
continue;
y1 = (axisx.min - x1) / (x2 - x1) * (y2 - y1) + y1;
x1 = axisx.min;
}
else if (x2 <= x1 && x2 < axisx.min) {
if (x1 < axisx.min)
continue;
y2 = (axisx.min - x1) / (x2 - x1) * (y2 - y1) + y1;
x2 = axisx.min;
}
// clip with xmax
if (x1 >= x2 && x1 > axisx.max) {
if (x2 > axisx.max)
continue;
y1 = (axisx.max - x1) / (x2 - x1) * (y2 - y1) + y1;
x1 = axisx.max;
}
else if (x2 >= x1 && x2 > axisx.max) {
if (x1 > axisx.max)
continue;
y2 = (axisx.max - x1) / (x2 - x1) * (y2 - y1) + y1;
x2 = axisx.max;
}
if (!areaOpen) {
// open area
ctx.beginPath();
ctx.moveTo(axisx.p2c(x1), axisy.p2c(bottom));
areaOpen = true;
}
// now first check the case where both is outside
if (y1 >= axisy.max && y2 >= axisy.max) {
ctx.lineTo(axisx.p2c(x1), axisy.p2c(axisy.max));
ctx.lineTo(axisx.p2c(x2), axisy.p2c(axisy.max));
continue;
}
else if (y1 <= axisy.min && y2 <= axisy.min) {
ctx.lineTo(axisx.p2c(x1), axisy.p2c(axisy.min));
ctx.lineTo(axisx.p2c(x2), axisy.p2c(axisy.min));
continue;
}
// else it's a bit more complicated, there might
// be a flat maxed out rectangle first, then a
// triangular cutout or reverse; to find these
// keep track of the current x values
var x1old = x1, x2old = x2;
// clip the y values, without shortcutting, we
// go through all cases in turn
// clip with ymin
if (y1 <= y2 && y1 < axisy.min && y2 >= axisy.min) {
x1 = (axisy.min - y1) / (y2 - y1) * (x2 - x1) + x1;
y1 = axisy.min;
}
else if (y2 <= y1 && y2 < axisy.min && y1 >= axisy.min) {
x2 = (axisy.min - y1) / (y2 - y1) * (x2 - x1) + x1;
y2 = axisy.min;
}
// clip with ymax
if (y1 >= y2 && y1 > axisy.max && y2 <= axisy.max) {
x1 = (axisy.max - y1) / (y2 - y1) * (x2 - x1) + x1;
y1 = axisy.max;
}
else if (y2 >= y1 && y2 > axisy.max && y1 <= axisy.max) {
x2 = (axisy.max - y1) / (y2 - y1) * (x2 - x1) + x1;
y2 = axisy.max;
}
// if the x value was changed we got a rectangle
// to fill
if (x1 != x1old) {
ctx.lineTo(axisx.p2c(x1old), axisy.p2c(y1));
// it goes to (x1, y1), but we fill that below
}
// fill triangular section, this sometimes result
// in redundant points if (x1, y1) hasn't changed
// from previous line to, but we just ignore that
ctx.lineTo(axisx.p2c(x1), axisy.p2c(y1));
ctx.lineTo(axisx.p2c(x2), axisy.p2c(y2));
// fill the other rectangle if it's there
if (x2 != x2old) {
ctx.lineTo(axisx.p2c(x2), axisy.p2c(y2));
ctx.lineTo(axisx.p2c(x2old), axisy.p2c(y2));
}
}
}
ctx.save();
ctx.translate(plotOffset.left, plotOffset.top);
ctx.lineJoin = "round";
var lw = series.lines.lineWidth,
sw = series.shadowSize;
// FIXME: consider another form of shadow when filling is turned on
if (lw > 0 && sw > 0) {
// draw shadow as a thick and thin line with transparency
ctx.lineWidth = sw;
ctx.strokeStyle = "rgba(0,0,0,0.1)";
// position shadow at angle from the mid of line
var angle = Math.PI/18;
plotLine(series.datapoints, Math.sin(angle) * (lw/2 + sw/2), Math.cos(angle) * (lw/2 + sw/2), series.xaxis, series.yaxis);
ctx.lineWidth = sw/2;
plotLine(series.datapoints, Math.sin(angle) * (lw/2 + sw/4), Math.cos(angle) * (lw/2 + sw/4), series.xaxis, series.yaxis);
}
ctx.lineWidth = lw;
ctx.strokeStyle = series.color;
var fillStyle = getFillStyle(series.lines, series.color, 0, plotHeight);
if (fillStyle) {
ctx.fillStyle = fillStyle;
plotLineArea(series.datapoints, series.xaxis, series.yaxis);
}
if (lw > 0)
plotLine(series.datapoints, 0, 0, series.xaxis, series.yaxis);
ctx.restore();
}
function drawSeriesPoints(series) {
function plotPoints(datapoints, radius, fillStyle, offset, shadow, axisx, axisy, symbol) {
var points = datapoints.points, ps = datapoints.pointsize;
for (var i = 0; i < points.length; i += ps) {
var x = points[i], y = points[i + 1];
if (x == null || x < axisx.min || x > axisx.max || y < axisy.min || y > axisy.max)
continue;
ctx.beginPath();
x = axisx.p2c(x);
y = axisy.p2c(y) + offset;
if (symbol == "circle")
ctx.arc(x, y, radius, 0, shadow ? Math.PI : Math.PI * 2, false);
else
symbol(ctx, x, y, radius, shadow);
ctx.closePath();
if (fillStyle) {
ctx.fillStyle = fillStyle;
ctx.fill();
}
ctx.stroke();
}
}
ctx.save();
ctx.translate(plotOffset.left, plotOffset.top);
var lw = series.points.lineWidth,
sw = series.shadowSize,
radius = series.points.radius,
symbol = series.points.symbol;
// If the user sets the line width to 0, we change it to a very
// small value. A line width of 0 seems to force the default of 1.
// Doing the conditional here allows the shadow setting to still be
// optional even with a lineWidth of 0.
if( lw == 0 )
lw = 0.0001;
if (lw > 0 && sw > 0) {
// draw shadow in two steps
var w = sw / 2;
ctx.lineWidth = w;
ctx.strokeStyle = "rgba(0,0,0,0.1)";
plotPoints(series.datapoints, radius, null, w + w/2, true,
series.xaxis, series.yaxis, symbol);
ctx.strokeStyle = "rgba(0,0,0,0.2)";
plotPoints(series.datapoints, radius, null, w/2, true,
series.xaxis, series.yaxis, symbol);
}
ctx.lineWidth = lw;
ctx.strokeStyle = series.color;
plotPoints(series.datapoints, radius,
getFillStyle(series.points, series.color), 0, false,
series.xaxis, series.yaxis, symbol);
ctx.restore();
}
function drawBar(x, y, b, barLeft, barRight, fillStyleCallback, axisx, axisy, c, horizontal, lineWidth) {
var left, right, bottom, top,
drawLeft, drawRight, drawTop, drawBottom,
tmp;
// in horizontal mode, we start the bar from the left
// instead of from the bottom so it appears to be
// horizontal rather than vertical
if (horizontal) {
drawBottom = drawRight = drawTop = true;
drawLeft = false;
left = b;
right = x;
top = y + barLeft;
bottom = y + barRight;
// account for negative bars
if (right < left) {
tmp = right;
right = left;
left = tmp;
drawLeft = true;
drawRight = false;
}
}
else {
drawLeft = drawRight = drawTop = true;
drawBottom = false;
left = x + barLeft;
right = x + barRight;
bottom = b;
top = y;
// account for negative bars
if (top < bottom) {
tmp = top;
top = bottom;
bottom = tmp;
drawBottom = true;
drawTop = false;
}
}
// clip
if (right < axisx.min || left > axisx.max ||
top < axisy.min || bottom > axisy.max)
return;
if (left < axisx.min) {
left = axisx.min;
drawLeft = false;
}
if (right > axisx.max) {
right = axisx.max;
drawRight = false;
}
if (bottom < axisy.min) {
bottom = axisy.min;
drawBottom = false;
}
if (top > axisy.max) {
top = axisy.max;
drawTop = false;
}
left = axisx.p2c(left);
bottom = axisy.p2c(bottom);
right = axisx.p2c(right);
top = axisy.p2c(top);
// fill the bar
if (fillStyleCallback) {
c.fillStyle = fillStyleCallback(bottom, top);
c.fillRect(left, top, right - left, bottom - top)
}
// draw outline
if (lineWidth > 0 && (drawLeft || drawRight || drawTop || drawBottom)) {
c.beginPath();
// FIXME: inline moveTo is buggy with excanvas
c.moveTo(left, bottom);
if (drawLeft)
c.lineTo(left, top);
else
c.moveTo(left, top);
if (drawTop)
c.lineTo(right, top);
else
c.moveTo(right, top);
if (drawRight)
c.lineTo(right, bottom);
else
c.moveTo(right, bottom);
if (drawBottom)
c.lineTo(left, bottom);
else
c.moveTo(left, bottom);
c.stroke();
}
}
function drawSeriesBars(series) {
function plotBars(datapoints, barLeft, barRight, fillStyleCallback, axisx, axisy) {
var points = datapoints.points, ps = datapoints.pointsize;
for (var i = 0; i < points.length; i += ps) {
if (points[i] == null)
continue;
drawBar(points[i], points[i + 1], points[i + 2], barLeft, barRight, fillStyleCallback, axisx, axisy, ctx, series.bars.horizontal, series.bars.lineWidth);
}
}
ctx.save();
ctx.translate(plotOffset.left, plotOffset.top);
// FIXME: figure out a way to add shadows (for instance along the right edge)
ctx.lineWidth = series.bars.lineWidth;
ctx.strokeStyle = series.color;
var barLeft;
switch (series.bars.align) {
case "left":
barLeft = 0;
break;
case "right":
barLeft = -series.bars.barWidth;
break;
default:
barLeft = -series.bars.barWidth / 2;
}
var fillStyleCallback = series.bars.fill ? function (bottom, top) { return getFillStyle(series.bars, series.color, bottom, top); } : null;
plotBars(series.datapoints, barLeft, barLeft + series.bars.barWidth, fillStyleCallback, series.xaxis, series.yaxis);
ctx.restore();
}
function getFillStyle(filloptions, seriesColor, bottom, top) {
var fill = filloptions.fill;
if (!fill)
return null;
if (filloptions.fillColor)
return getColorOrGradient(filloptions.fillColor, bottom, top, seriesColor);
var c = $.color.parse(seriesColor);
c.a = typeof fill == "number" ? fill : 0.4;
c.normalize();
return c.toString();
}
function insertLegend() {
if (options.legend.container != null) {
$(options.legend.container).html("");
} else {
placeholder.find(".legend").remove();
}
if (!options.legend.show) {
return;
}
var fragments = [], entries = [], rowStarted = false,
lf = options.legend.labelFormatter, s, label;
// Build a list of legend entries, with each having a label and a color
for (var i = 0; i < series.length; ++i) {
s = series[i];
if (s.label) {
label = lf ? lf(s.label, s) : s.label;
if (label) {
entries.push({
label: label,
color: s.color
});
}
}
}
// Sort the legend using either the default or a custom comparator
if (options.legend.sorted) {
if ($.isFunction(options.legend.sorted)) {
entries.sort(options.legend.sorted);
} else if (options.legend.sorted == "reverse") {
entries.reverse();
} else {
var ascending = options.legend.sorted != "descending";
entries.sort(function(a, b) {
return a.label == b.label ? 0 : (
(a.label < b.label) != ascending ? 1 : -1 // Logical XOR
);
});
}
}
// Generate markup for the list of entries, in their final order
for (var i = 0; i < entries.length; ++i) {
var entry = entries[i];
if (i % options.legend.noColumns == 0) {
if (rowStarted)
fragments.push('</tr>');
fragments.push('<tr>');
rowStarted = true;
}
fragments.push(
'<td class="legendColorBox"><div style="border:1px solid ' + options.legend.labelBoxBorderColor + ';padding:1px"><div style="width:4px;height:0;border:5px solid ' + entry.color + ';overflow:hidden"></div></div></td>' +
'<td class="legendLabel">' + entry.label + '</td>'
);
}
if (rowStarted)
fragments.push('</tr>');
if (fragments.length == 0)
return;
var table = '<table style="font-size:smaller;color:' + options.grid.color + '">' + fragments.join("") + '</table>';
if (options.legend.container != null)
$(options.legend.container).html(table);
else {
var pos = "",
p = options.legend.position,
m = options.legend.margin;
if (m[0] == null)
m = [m, m];
if (p.charAt(0) == "n")
pos += 'top:' + (m[1] + plotOffset.top) + 'px;';
else if (p.charAt(0) == "s")
pos += 'bottom:' + (m[1] + plotOffset.bottom) + 'px;';
if (p.charAt(1) == "e")
pos += 'right:' + (m[0] + plotOffset.right) + 'px;';
else if (p.charAt(1) == "w")
pos += 'left:' + (m[0] + plotOffset.left) + 'px;';
var legend = $('<div class="legend">' + table.replace('style="', 'style="position:absolute;' + pos +';') + '</div>').appendTo(placeholder);
if (options.legend.backgroundOpacity != 0.0) {
// put in the transparent background
// separately to avoid blended labels and
// label boxes
var c = options.legend.backgroundColor;
if (c == null) {
c = options.grid.backgroundColor;
if (c && typeof c == "string")
c = $.color.parse(c);
else
c = $.color.extract(legend, 'background-color');
c.a = 1;
c = c.toString();
}
var div = legend.children();
$('<div style="position:absolute;width:' + div.width() + 'px;height:' + div.height() + 'px;' + pos +'background-color:' + c + ';"> </div>').prependTo(legend).css('opacity', options.legend.backgroundOpacity);
}
}
}
// interactive features
var highlights = [],
redrawTimeout = null;
// returns the data item the mouse is over, or null if none is found
function findNearbyItem(mouseX, mouseY, seriesFilter) {
var maxDistance = options.grid.mouseActiveRadius,
smallestDistance = maxDistance * maxDistance + 1,
item = null, foundPoint = false, i, j, ps;
for (i = series.length - 1; i >= 0; --i) {
if (!seriesFilter(series[i]))
continue;
var s = series[i],
axisx = s.xaxis,
axisy = s.yaxis,
points = s.datapoints.points,
mx = axisx.c2p(mouseX), // precompute some stuff to make the loop faster
my = axisy.c2p(mouseY),
maxx = maxDistance / axisx.scale,
maxy = maxDistance / axisy.scale;
ps = s.datapoints.pointsize;
// with inverse transforms, we can't use the maxx/maxy
// optimization, sadly
if (axisx.options.inverseTransform)
maxx = Number.MAX_VALUE;
if (axisy.options.inverseTransform)
maxy = Number.MAX_VALUE;
if (s.lines.show || s.points.show) {
for (j = 0; j < points.length; j += ps) {
var x = points[j], y = points[j + 1];
if (x == null)
continue;
// For points and lines, the cursor must be within a
// certain distance to the data point
if (x - mx > maxx || x - mx < -maxx ||
y - my > maxy || y - my < -maxy)
continue;
// We have to calculate distances in pixels, not in
// data units, because the scales of the axes may be different
var dx = Math.abs(axisx.p2c(x) - mouseX),
dy = Math.abs(axisy.p2c(y) - mouseY),
dist = dx * dx + dy * dy; // we save the sqrt
// use <= to ensure last point takes precedence
// (last generally means on top of)
if (dist < smallestDistance) {
smallestDistance = dist;
item = [i, j / ps];
}
}
}
if (s.bars.show && !item) { // no other point can be nearby
var barLeft, barRight;
switch (s.bars.align) {
case "left":
barLeft = 0;
break;
case "right":
barLeft = -s.bars.barWidth;
break;
default:
barLeft = -s.bars.barWidth / 2;
}
barRight = barLeft + s.bars.barWidth;
for (j = 0; j < points.length; j += ps) {
var x = points[j], y = points[j + 1], b = points[j + 2];
if (x == null)
continue;
// for a bar graph, the cursor must be inside the bar
if (series[i].bars.horizontal ?
(mx <= Math.max(b, x) && mx >= Math.min(b, x) &&
my >= y + barLeft && my <= y + barRight) :
(mx >= x + barLeft && mx <= x + barRight &&
my >= Math.min(b, y) && my <= Math.max(b, y)))
item = [i, j / ps];
}
}
}
if (item) {
i = item[0];
j = item[1];
ps = series[i].datapoints.pointsize;
return { datapoint: series[i].datapoints.points.slice(j * ps, (j + 1) * ps),
dataIndex: j,
series: series[i],
seriesIndex: i };
}
return null;
}
function onMouseMove(e) {
if (options.grid.hoverable)
triggerClickHoverEvent("plothover", e,
function (s) { return s["hoverable"] != false; });
}
function onMouseLeave(e) {
if (options.grid.hoverable)
triggerClickHoverEvent("plothover", e,
function (s) { return false; });
}
function onClick(e) {
triggerClickHoverEvent("plotclick", e,
function (s) { return s["clickable"] != false; });
}
// trigger click or hover event (they send the same parameters
// so we share their code)
function triggerClickHoverEvent(eventname, event, seriesFilter) {
var offset = eventHolder.offset(),
canvasX = event.pageX - offset.left - plotOffset.left,
canvasY = event.pageY - offset.top - plotOffset.top,
pos = canvasToAxisCoords({ left: canvasX, top: canvasY });
pos.pageX = event.pageX;
pos.pageY = event.pageY;
var item = findNearbyItem(canvasX, canvasY, seriesFilter);
if (item) {
// fill in mouse pos for any listeners out there
item.pageX = parseInt(item.series.xaxis.p2c(item.datapoint[0]) + offset.left + plotOffset.left, 10);
item.pageY = parseInt(item.series.yaxis.p2c(item.datapoint[1]) + offset.top + plotOffset.top, 10);
}
if (options.grid.autoHighlight) {
// clear auto-highlights
for (var i = 0; i < highlights.length; ++i) {
var h = highlights[i];
if (h.auto == eventname &&
!(item && h.series == item.series &&
h.point[0] == item.datapoint[0] &&
h.point[1] == item.datapoint[1]))
unhighlight(h.series, h.point);
}
if (item)
highlight(item.series, item.datapoint, eventname);
}
placeholder.trigger(eventname, [ pos, item ]);
}
function triggerRedrawOverlay() {
var t = options.interaction.redrawOverlayInterval;
if (t == -1) { // skip event queue
drawOverlay();
return;
}
if (!redrawTimeout)
redrawTimeout = setTimeout(drawOverlay, t);
}
function drawOverlay() {
redrawTimeout = null;
// draw highlights
octx.save();
overlay.clear();
octx.translate(plotOffset.left, plotOffset.top);
var i, hi;
for (i = 0; i < highlights.length; ++i) {
hi = highlights[i];
if (hi.series.bars.show)
drawBarHighlight(hi.series, hi.point);
else
drawPointHighlight(hi.series, hi.point);
}
octx.restore();
executeHooks(hooks.drawOverlay, [octx]);
}
function highlight(s, point, auto) {
if (typeof s == "number")
s = series[s];
if (typeof point == "number") {
var ps = s.datapoints.pointsize;
point = s.datapoints.points.slice(ps * point, ps * (point + 1));
}
var i = indexOfHighlight(s, point);
if (i == -1) {
highlights.push({ series: s, point: point, auto: auto });
triggerRedrawOverlay();
}
else if (!auto)
highlights[i].auto = false;
}
function unhighlight(s, point) {
if (s == null && point == null) {
highlights = [];
triggerRedrawOverlay();
return;
}
if (typeof s == "number")
s = series[s];
if (typeof point == "number") {
var ps = s.datapoints.pointsize;
point = s.datapoints.points.slice(ps * point, ps * (point + 1));
}
var i = indexOfHighlight(s, point);
if (i != -1) {
highlights.splice(i, 1);
triggerRedrawOverlay();
}
}
function indexOfHighlight(s, p) {
for (var i = 0; i < highlights.length; ++i) {
var h = highlights[i];
if (h.series == s && h.point[0] == p[0]
&& h.point[1] == p[1])
return i;
}
return -1;
}
function drawPointHighlight(series, point) {
var x = point[0], y = point[1],
axisx = series.xaxis, axisy = series.yaxis,
highlightColor = (typeof series.highlightColor === "string") ? series.highlightColor : $.color.parse(series.color).scale('a', 0.5).toString();
if (x < axisx.min || x > axisx.max || y < axisy.min || y > axisy.max)
return;
var pointRadius = series.points.radius + series.points.lineWidth / 2;
octx.lineWidth = pointRadius;
octx.strokeStyle = highlightColor;
var radius = 1.5 * pointRadius;
x = axisx.p2c(x);
y = axisy.p2c(y);
octx.beginPath();
if (series.points.symbol == "circle")
octx.arc(x, y, radius, 0, 2 * Math.PI, false);
else
series.points.symbol(octx, x, y, radius, false);
octx.closePath();
octx.stroke();
}
function drawBarHighlight(series, point) {
var highlightColor = (typeof series.highlightColor === "string") ? series.highlightColor : $.color.parse(series.color).scale('a', 0.5).toString(),
fillStyle = highlightColor,
barLeft;
switch (series.bars.align) {
case "left":
barLeft = 0;
break;
case "right":
barLeft = -series.bars.barWidth;
break;
default:
barLeft = -series.bars.barWidth / 2;
}
octx.lineWidth = series.bars.lineWidth;
octx.strokeStyle = highlightColor;
drawBar(point[0], point[1], point[2] || 0, barLeft, barLeft + series.bars.barWidth,
function () { return fillStyle; }, series.xaxis, series.yaxis, octx, series.bars.horizontal, series.bars.lineWidth);
}
function getColorOrGradient(spec, bottom, top, defaultColor) {
if (typeof spec == "string")
return spec;
else {
// assume this is a gradient spec; IE currently only
// supports a simple vertical gradient properly, so that's
// what we support too
var gradient = ctx.createLinearGradient(0, top, 0, bottom);
for (var i = 0, l = spec.colors.length; i < l; ++i) {
var c = spec.colors[i];
if (typeof c != "string") {
var co = $.color.parse(defaultColor);
if (c.brightness != null)
co = co.scale('rgb', c.brightness);
if (c.opacity != null)
co.a *= c.opacity;
c = co.toString();
}
gradient.addColorStop(i / (l - 1), c);
}
return gradient;
}
}
}
// Add the plot function to the top level of the jQuery object
$.plot = function(placeholder, data, options) {
//var t0 = new Date();
var plot = new Plot($(placeholder), data, options, $.plot.plugins);
//(window.console ? console.log : alert)("time used (msecs): " + ((new Date()).getTime() - t0.getTime()));
return plot;
};
$.plot.version = "0.8.2";
$.plot.plugins = [];
// Also add the plot function as a chainable property
$.fn.plot = function(data, options) {
return this.each(function() {
$.plot(this, data, options);
});
};
// round to nearby lower multiple of base
function floorInBase(n, base) {
return base * Math.floor(n / base);
}
})(jQuery);
|
from collections import namedtuple
class GeoPoint(namedtuple('GeoPoint', 'latitude longitude altitude accuracy')):
@property
def lat_lon(self):
return {
'lat': self.latitude,
'lon': self.longitude
}
|
var structEnergyPlus_1_1HVACVariableRefrigerantFlow_1_1VRFTerminalUnitEquipment =
[
[ "VRFTerminalUnitEquipment", "structEnergyPlus_1_1HVACVariableRefrigerantFlow_1_1VRFTerminalUnitEquipment.html#a8d5f5493c5048f55629f1142e534818a", null ],
[ "CalcVRF_FluidTCtrl", "structEnergyPlus_1_1HVACVariableRefrigerantFlow_1_1VRFTerminalUnitEquipment.html#a17023f3ba63328175d8cd6a4e250727b", null ],
[ "CalcVRFIUVariableTeTc", "structEnergyPlus_1_1HVACVariableRefrigerantFlow_1_1VRFTerminalUnitEquipment.html#a8bd6518542bcaffa9ffc984a8d1b39e0", null ],
[ "CalVRFTUAirFlowRate_FluidTCtrl", "structEnergyPlus_1_1HVACVariableRefrigerantFlow_1_1VRFTerminalUnitEquipment.html#a4a8cd2e620d8027051b0dd85bd9fd5fe", null ],
[ "ControlVRF_FluidTCtrl", "structEnergyPlus_1_1HVACVariableRefrigerantFlow_1_1VRFTerminalUnitEquipment.html#a7f12e7261f256dd04fde86f96a16b0b7", null ],
[ "ActualFanVolFlowRate", "structEnergyPlus_1_1HVACVariableRefrigerantFlow_1_1VRFTerminalUnitEquipment.html#a87e41b3fd91447191c380d4e49cdcb61", null ],
[ "ATMixerExists", "structEnergyPlus_1_1HVACVariableRefrigerantFlow_1_1VRFTerminalUnitEquipment.html#ae319d7a0b44fb25df3a8f2049809f4e5", null ],
[ "ATMixerIndex", "structEnergyPlus_1_1HVACVariableRefrigerantFlow_1_1VRFTerminalUnitEquipment.html#a8d37d267518e9978c1634c755f88efe9", null ],
[ "ATMixerName", "structEnergyPlus_1_1HVACVariableRefrigerantFlow_1_1VRFTerminalUnitEquipment.html#a1ad1b744bed982bd8964b742539a9534", null ],
[ "ATMixerOutNode", "structEnergyPlus_1_1HVACVariableRefrigerantFlow_1_1VRFTerminalUnitEquipment.html#a1877251841a81fe653db6c1fb8a2ead2", null ],
[ "ATMixerPriNode", "structEnergyPlus_1_1HVACVariableRefrigerantFlow_1_1VRFTerminalUnitEquipment.html#a83e9defe1d765cb9e497da1c2426ded4", null ],
[ "ATMixerSecNode", "structEnergyPlus_1_1HVACVariableRefrigerantFlow_1_1VRFTerminalUnitEquipment.html#a905fd8de6d6fef27b5c3b13c4614f250", null ],
[ "ATMixerType", "structEnergyPlus_1_1HVACVariableRefrigerantFlow_1_1VRFTerminalUnitEquipment.html#ad27a7c3ed7087b9a06c07140292bcffa", null ],
[ "AvailManagerListName", "structEnergyPlus_1_1HVACVariableRefrigerantFlow_1_1VRFTerminalUnitEquipment.html#ab90a396bf9785eec299222a8aba5bd85", null ],
[ "AvailStatus", "structEnergyPlus_1_1HVACVariableRefrigerantFlow_1_1VRFTerminalUnitEquipment.html#ae0559f3a1e5a4d52064ec40f57312406", null ],
[ "CoolCoilIndex", "structEnergyPlus_1_1HVACVariableRefrigerantFlow_1_1VRFTerminalUnitEquipment.html#a5b90fa95444a0ed2c2ae3a43b14e7816", null ],
[ "CoolingCoilPresent", "structEnergyPlus_1_1HVACVariableRefrigerantFlow_1_1VRFTerminalUnitEquipment.html#a9c161419778f22b2ba80c736fbaa0e81", null ],
[ "CoolingSpeedRatio", "structEnergyPlus_1_1HVACVariableRefrigerantFlow_1_1VRFTerminalUnitEquipment.html#ad0d7be3da9b13fbc182661952979d4e9", null ],
[ "CoolOutAirMassFlow", "structEnergyPlus_1_1HVACVariableRefrigerantFlow_1_1VRFTerminalUnitEquipment.html#a23ac58f17176b3bb944647ef09581edd", null ],
[ "CoolOutAirVolFlow", "structEnergyPlus_1_1HVACVariableRefrigerantFlow_1_1VRFTerminalUnitEquipment.html#a7cf1f90a9e390e1ad7808c1b4c206a4a", null ],
[ "DXCoolCoilType_Num", "structEnergyPlus_1_1HVACVariableRefrigerantFlow_1_1VRFTerminalUnitEquipment.html#ae691fe889ed0644c85190784ce473e0c", null ],
[ "DXHeatCoilType_Num", "structEnergyPlus_1_1HVACVariableRefrigerantFlow_1_1VRFTerminalUnitEquipment.html#a9233f15df00b46ee9890fe1912faeb6c", null ],
[ "EMSOverridePartLoadFrac", "structEnergyPlus_1_1HVACVariableRefrigerantFlow_1_1VRFTerminalUnitEquipment.html#aca87ab8d935a514010e6eb4280e8f710", null ],
[ "EMSValueForPartLoadFrac", "structEnergyPlus_1_1HVACVariableRefrigerantFlow_1_1VRFTerminalUnitEquipment.html#a5f4b8e09954c65fc39c9fc64c69e65b9", null ],
[ "FanAvailSchedPtr", "structEnergyPlus_1_1HVACVariableRefrigerantFlow_1_1VRFTerminalUnitEquipment.html#a8e9875de344baa00851a77823802fc07", null ],
[ "FanIndex", "structEnergyPlus_1_1HVACVariableRefrigerantFlow_1_1VRFTerminalUnitEquipment.html#a0798fdbc50a5a8d70b119a01ce7b3169", null ],
[ "FanOpModeSchedPtr", "structEnergyPlus_1_1HVACVariableRefrigerantFlow_1_1VRFTerminalUnitEquipment.html#aa172f9b5964bf5eba6c5fd486deb82b0", null ],
[ "FanPlace", "structEnergyPlus_1_1HVACVariableRefrigerantFlow_1_1VRFTerminalUnitEquipment.html#abd936a32802d02e11b94a51d639e05b4", null ],
[ "FanPower", "structEnergyPlus_1_1HVACVariableRefrigerantFlow_1_1VRFTerminalUnitEquipment.html#a9b641ff8f5dc47a43e7368b2595baa84", null ],
[ "fanType_Num", "structEnergyPlus_1_1HVACVariableRefrigerantFlow_1_1VRFTerminalUnitEquipment.html#a17b8b6fc09fc02154a208fbdac20e062", null ],
[ "FirstIterfailed", "structEnergyPlus_1_1HVACVariableRefrigerantFlow_1_1VRFTerminalUnitEquipment.html#a46dea073b3ca29a6e817d219aa7e24d2", null ],
[ "firstPass", "structEnergyPlus_1_1HVACVariableRefrigerantFlow_1_1VRFTerminalUnitEquipment.html#a0ff4cde903b8024049adc2e98efb31e4", null ],
[ "HeatCoilIndex", "structEnergyPlus_1_1HVACVariableRefrigerantFlow_1_1VRFTerminalUnitEquipment.html#a8f6f9a8d50de2290f686c520e86d9637", null ],
[ "HeatingCapacitySizeRatio", "structEnergyPlus_1_1HVACVariableRefrigerantFlow_1_1VRFTerminalUnitEquipment.html#a00c6ead179abe575a26dc7447efd6aff", null ],
[ "HeatingCoilPresent", "structEnergyPlus_1_1HVACVariableRefrigerantFlow_1_1VRFTerminalUnitEquipment.html#aa8b8b6f7fa6f6ee6e0e34f68b68dafe1", null ],
[ "HeatingSpeedRatio", "structEnergyPlus_1_1HVACVariableRefrigerantFlow_1_1VRFTerminalUnitEquipment.html#a8dc2559e01a9db296ff1c012c4809e21", null ],
[ "HeatOutAirMassFlow", "structEnergyPlus_1_1HVACVariableRefrigerantFlow_1_1VRFTerminalUnitEquipment.html#a36617c938506936a19a06ee03afe8e59", null ],
[ "HeatOutAirVolFlow", "structEnergyPlus_1_1HVACVariableRefrigerantFlow_1_1VRFTerminalUnitEquipment.html#a8f556668a2c9232ce9678c8a0622ad21", null ],
[ "HVACSizingIndex", "structEnergyPlus_1_1HVACVariableRefrigerantFlow_1_1VRFTerminalUnitEquipment.html#a0288e74ebc1a1163550768b1387a34f5", null ],
[ "IndexToTUInTUList", "structEnergyPlus_1_1HVACVariableRefrigerantFlow_1_1VRFTerminalUnitEquipment.html#ae1c0b1f566c0d7856cb245b2c6096452", null ],
[ "IterLimitExceeded", "structEnergyPlus_1_1HVACVariableRefrigerantFlow_1_1VRFTerminalUnitEquipment.html#af97eb1cc3a8d3a81b3b3ee5497b4bcad", null ],
[ "LatentCoolingEnergy", "structEnergyPlus_1_1HVACVariableRefrigerantFlow_1_1VRFTerminalUnitEquipment.html#a783ea5bdf258007acd3a2d7de9f23c25", null ],
[ "LatentCoolingRate", "structEnergyPlus_1_1HVACVariableRefrigerantFlow_1_1VRFTerminalUnitEquipment.html#a60b42e6a72722703c8e77305650ace24", null ],
[ "LatentHeatingEnergy", "structEnergyPlus_1_1HVACVariableRefrigerantFlow_1_1VRFTerminalUnitEquipment.html#a527cf82f9e9fc3ba74bae815d13eb71b", null ],
[ "LatentHeatingRate", "structEnergyPlus_1_1HVACVariableRefrigerantFlow_1_1VRFTerminalUnitEquipment.html#ab0093e7e405735d6567986a2bdc5dcae", null ],
[ "MaxCoolAirMassFlow", "structEnergyPlus_1_1HVACVariableRefrigerantFlow_1_1VRFTerminalUnitEquipment.html#a6bd6f206ac3163ca02fb84523a04a13e", null ],
[ "MaxCoolAirVolFlow", "structEnergyPlus_1_1HVACVariableRefrigerantFlow_1_1VRFTerminalUnitEquipment.html#a4642dee89c86b0e983edf7b32da62c53", null ],
[ "MaxHeatAirMassFlow", "structEnergyPlus_1_1HVACVariableRefrigerantFlow_1_1VRFTerminalUnitEquipment.html#a95a589fe2896a289638231738091a5f4", null ],
[ "MaxHeatAirVolFlow", "structEnergyPlus_1_1HVACVariableRefrigerantFlow_1_1VRFTerminalUnitEquipment.html#abad95aaeed5d11aff3687238f727cdd3", null ],
[ "MaxNoCoolAirMassFlow", "structEnergyPlus_1_1HVACVariableRefrigerantFlow_1_1VRFTerminalUnitEquipment.html#a523f28ca6df33c0892ae7dfd617ea5ae", null ],
[ "MaxNoCoolAirVolFlow", "structEnergyPlus_1_1HVACVariableRefrigerantFlow_1_1VRFTerminalUnitEquipment.html#ac411ae05042ea8dcb6d35f3e06e79803", null ],
[ "MaxNoHeatAirMassFlow", "structEnergyPlus_1_1HVACVariableRefrigerantFlow_1_1VRFTerminalUnitEquipment.html#adb0408b9eeff405fd2f1f03e764a027c", null ],
[ "MaxNoHeatAirVolFlow", "structEnergyPlus_1_1HVACVariableRefrigerantFlow_1_1VRFTerminalUnitEquipment.html#afe3997e89d8aed1eb4a6abf951fe57b3", null ],
[ "MinOperatingPLR", "structEnergyPlus_1_1HVACVariableRefrigerantFlow_1_1VRFTerminalUnitEquipment.html#ac113d00b4adb6e6ef0d8efba014107d9", null ],
[ "Name", "structEnergyPlus_1_1HVACVariableRefrigerantFlow_1_1VRFTerminalUnitEquipment.html#a85076f1b70d55e34cbae1d6ad9b5dedb", null ],
[ "NoCoolHeatOutAirMassFlow", "structEnergyPlus_1_1HVACVariableRefrigerantFlow_1_1VRFTerminalUnitEquipment.html#a5e5b7cb350d8bec14a456fa50a8eaf3c", null ],
[ "NoCoolHeatOutAirVolFlow", "structEnergyPlus_1_1HVACVariableRefrigerantFlow_1_1VRFTerminalUnitEquipment.html#aca5a88f4352297d2651b3442dcd58b6f", null ],
[ "OAMixerIndex", "structEnergyPlus_1_1HVACVariableRefrigerantFlow_1_1VRFTerminalUnitEquipment.html#a182f6565dfec96a07ca26485f72a68e6", null ],
[ "OAMixerName", "structEnergyPlus_1_1HVACVariableRefrigerantFlow_1_1VRFTerminalUnitEquipment.html#aaae492a6d4a6c40687c9bdd1693797ac", null ],
[ "OAMixerUsed", "structEnergyPlus_1_1HVACVariableRefrigerantFlow_1_1VRFTerminalUnitEquipment.html#a7dce2f3a63e0bb22928794c4d98da160", null ],
[ "OpMode", "structEnergyPlus_1_1HVACVariableRefrigerantFlow_1_1VRFTerminalUnitEquipment.html#af196cf85a4936881c5bf3338dae0b381", null ],
[ "ParasiticCoolElecPower", "structEnergyPlus_1_1HVACVariableRefrigerantFlow_1_1VRFTerminalUnitEquipment.html#ab078e2a7f5029f088914e4a0e642b76e", null ],
[ "ParasiticElec", "structEnergyPlus_1_1HVACVariableRefrigerantFlow_1_1VRFTerminalUnitEquipment.html#ae5d9c909b90bebffd7cfba9911453666", null ],
[ "ParasiticElecCoolConsumption", "structEnergyPlus_1_1HVACVariableRefrigerantFlow_1_1VRFTerminalUnitEquipment.html#a85ad1fc69ab36e67059f934d1b604ad9", null ],
[ "ParasiticElecHeatConsumption", "structEnergyPlus_1_1HVACVariableRefrigerantFlow_1_1VRFTerminalUnitEquipment.html#aed48b70720df672fd7922ce5ad921f94", null ],
[ "ParasiticHeatElecPower", "structEnergyPlus_1_1HVACVariableRefrigerantFlow_1_1VRFTerminalUnitEquipment.html#a0437e78f59a2df703b213c8266bdbc2e", null ],
[ "ParasiticOffElec", "structEnergyPlus_1_1HVACVariableRefrigerantFlow_1_1VRFTerminalUnitEquipment.html#aabcc182279e2d00bbfff6a5ee3a577b2", null ],
[ "SchedPtr", "structEnergyPlus_1_1HVACVariableRefrigerantFlow_1_1VRFTerminalUnitEquipment.html#ae1292414ec3dd80cde9b5d52f81c976f", null ],
[ "SensibleCoolingEnergy", "structEnergyPlus_1_1HVACVariableRefrigerantFlow_1_1VRFTerminalUnitEquipment.html#aff60b6689ba9479644b9ca880e94c495", null ],
[ "SensibleCoolingRate", "structEnergyPlus_1_1HVACVariableRefrigerantFlow_1_1VRFTerminalUnitEquipment.html#ab888f9bba17832930356dd88b6f1cfbf", null ],
[ "SensibleHeatingEnergy", "structEnergyPlus_1_1HVACVariableRefrigerantFlow_1_1VRFTerminalUnitEquipment.html#a2129650e8511c743692dc689510e0347", null ],
[ "SensibleHeatingRate", "structEnergyPlus_1_1HVACVariableRefrigerantFlow_1_1VRFTerminalUnitEquipment.html#a76fdd47c379a86885d438033a7036dd2", null ],
[ "TerminalUnitLatentRate", "structEnergyPlus_1_1HVACVariableRefrigerantFlow_1_1VRFTerminalUnitEquipment.html#aab1bbe4d81fa1d42faa28894cdd07396", null ],
[ "TerminalUnitSensibleRate", "structEnergyPlus_1_1HVACVariableRefrigerantFlow_1_1VRFTerminalUnitEquipment.html#a8dd9a823f1d56a7942811d59542005d9", null ],
[ "TotalCoolingEnergy", "structEnergyPlus_1_1HVACVariableRefrigerantFlow_1_1VRFTerminalUnitEquipment.html#ac585ce555aba0ae6b5c2870518add53f", null ],
[ "TotalCoolingRate", "structEnergyPlus_1_1HVACVariableRefrigerantFlow_1_1VRFTerminalUnitEquipment.html#a7d871a78012a0b1b3a09920bd22bbcac", null ],
[ "TotalHeatingEnergy", "structEnergyPlus_1_1HVACVariableRefrigerantFlow_1_1VRFTerminalUnitEquipment.html#a59cff9daccd74c8d692d9831a36609e7", null ],
[ "TotalHeatingRate", "structEnergyPlus_1_1HVACVariableRefrigerantFlow_1_1VRFTerminalUnitEquipment.html#a0524aef71b286f36d5bc0547fa37be05", null ],
[ "TUListIndex", "structEnergyPlus_1_1HVACVariableRefrigerantFlow_1_1VRFTerminalUnitEquipment.html#a3fd7d4df01821b553e8507efaf413610", null ],
[ "VRFSysNum", "structEnergyPlus_1_1HVACVariableRefrigerantFlow_1_1VRFTerminalUnitEquipment.html#a26dbfe66157005803f70f2de7f980f00", null ],
[ "VRFTUInletNodeNum", "structEnergyPlus_1_1HVACVariableRefrigerantFlow_1_1VRFTerminalUnitEquipment.html#adb90567df504370ad9ac50791ad649b4", null ],
[ "VRFTUOAMixerOANodeNum", "structEnergyPlus_1_1HVACVariableRefrigerantFlow_1_1VRFTerminalUnitEquipment.html#a5f3fa1f92eaeb8f8491f8bc2a5c66ed2", null ],
[ "VRFTUOAMixerRelNodeNum", "structEnergyPlus_1_1HVACVariableRefrigerantFlow_1_1VRFTerminalUnitEquipment.html#a5cd9214963a410974a92165655d2fb2e", null ],
[ "VRFTUOAMixerRetNodeNum", "structEnergyPlus_1_1HVACVariableRefrigerantFlow_1_1VRFTerminalUnitEquipment.html#a9b68d598bff09995b14f61bcaa7e4a6c", null ],
[ "VRFTUOutletNodeNum", "structEnergyPlus_1_1HVACVariableRefrigerantFlow_1_1VRFTerminalUnitEquipment.html#aa58745ed48b01432f22a60e18f587381", null ],
[ "VRFTUType_Num", "structEnergyPlus_1_1HVACVariableRefrigerantFlow_1_1VRFTerminalUnitEquipment.html#a746386665c9a41a5b41a61a20a33d863", null ],
[ "ZoneNum", "structEnergyPlus_1_1HVACVariableRefrigerantFlow_1_1VRFTerminalUnitEquipment.html#a4c8adf9c900f7eaae8b2919c0d3f654d", null ],
[ "ZonePtr", "structEnergyPlus_1_1HVACVariableRefrigerantFlow_1_1VRFTerminalUnitEquipment.html#a6f0a803c3660f9b641ab446d6f9d4855", null ]
]; |
from __future__ import with_statement
import copy
from datetime import datetime, timedelta
from nose.tools import assert_equal, assert_raises # @UnresolvedImport
from whoosh import analysis, fields, index, qparser, query, searching, scoring
from whoosh.compat import u, xrange, text_type, permutations
from whoosh.filedb.filestore import RamStorage
def make_index():
s = fields.Schema(key=fields.ID(stored=True),
name=fields.TEXT,
value=fields.TEXT)
st = RamStorage()
ix = st.create_index(s)
w = ix.writer()
w.add_document(key=u("A"), name=u("Yellow brown"),
value=u("Blue red green render purple?"))
w.add_document(key=u("B"), name=u("Alpha beta"),
value=u("Gamma delta epsilon omega."))
w.add_document(key=u("C"), name=u("One two"),
value=u("Three rendered four five."))
w.add_document(key=u("D"), name=u("Quick went"),
value=u("Every red town."))
w.add_document(key=u("E"), name=u("Yellow uptown"),
value=u("Interest rendering outer photo!"))
w.commit()
return ix
def _get_keys(stored_fields):
return sorted([d.get("key") for d in stored_fields])
def _docs(q, s):
return _get_keys([s.stored_fields(docnum) for docnum
in q.docs(s)])
def _run_query(q, target):
ix = make_index()
with ix.searcher() as s:
assert_equal(target, _docs(q, s))
def test_empty_index():
schema = fields.Schema(key=fields.ID(stored=True), value=fields.TEXT)
st = RamStorage()
assert_raises(index.EmptyIndexError, st.open_index, schema=schema)
def test_docs_method():
ix = make_index()
with ix.searcher() as s:
assert_equal(_get_keys(s.documents(name="yellow")), ["A", "E"])
assert_equal(_get_keys(s.documents(value="red")), ["A", "D"])
assert_equal(_get_keys(s.documents()), ["A", "B", "C", "D", "E"])
def test_term():
_run_query(query.Term("name", u("yellow")), [u("A"), u("E")])
_run_query(query.Term("value", u("zeta")), [])
_run_query(query.Term("value", u("red")), [u("A"), u("D")])
def test_require():
_run_query(query.Require(query.Term("value", u("red")),
query.Term("name", u("yellow"))),
[u("A")])
def test_and():
_run_query(query.And([query.Term("value", u("red")),
query.Term("name", u("yellow"))]),
[u("A")])
# Missing
_run_query(query.And([query.Term("value", u("ochre")),
query.Term("name", u("glonk"))]),
[])
def test_or():
_run_query(query.Or([query.Term("value", u("red")),
query.Term("name", u("yellow"))]),
[u("A"), u("D"), u("E")])
# Missing
_run_query(query.Or([query.Term("value", u("ochre")),
query.Term("name", u("glonk"))]),
[])
_run_query(query.Or([]), [])
def test_not():
_run_query(query.Or([query.Term("value", u("red")),
query.Term("name", u("yellow")),
query.Not(query.Term("name", u("quick")))]),
[u("A"), u("E")])
def test_topnot():
_run_query(query.Not(query.Term("value", "red")), [u("B"), "C", "E"])
_run_query(query.Not(query.Term("name", "yellow")), [u("B"), u("C"),
u("D")])
def test_andnot():
_run_query(query.AndNot(query.Term("name", u("yellow")),
query.Term("value", u("purple"))),
[u("E")])
def test_variations():
_run_query(query.Variations("value", u("render")),
[u("A"), u("C"), u("E")])
def test_wildcard():
_run_query(query.Or([query.Wildcard('value', u('*red*')),
query.Wildcard('name', u('*yellow*'))]),
[u("A"), u("C"), u("D"), u("E")])
# Missing
_run_query(query.Wildcard('value', 'glonk*'), [])
def test_not2():
schema = fields.Schema(name=fields.ID(stored=True), value=fields.TEXT)
storage = RamStorage()
ix = storage.create_index(schema)
writer = ix.writer()
writer.add_document(name=u("a"), value=u("alfa bravo charlie delta echo"))
writer.add_document(name=u("b"),
value=u("bravo charlie delta echo foxtrot"))
writer.add_document(name=u("c"),
value=u("charlie delta echo foxtrot golf"))
writer.add_document(name=u("d"), value=u("delta echo golf hotel india"))
writer.add_document(name=u("e"), value=u("echo golf hotel india juliet"))
writer.commit()
with ix.searcher() as s:
p = qparser.QueryParser("value", None)
results = s.search(p.parse("echo NOT golf"))
assert_equal(sorted([d["name"] for d in results]), ["a", "b"])
results = s.search(p.parse("echo NOT bravo"))
assert_equal(sorted([d["name"] for d in results]), ["c", "d", "e"])
ix.delete_by_term("value", u("bravo"))
with ix.searcher() as s:
results = s.search(p.parse("echo NOT charlie"))
assert_equal(sorted([d["name"] for d in results]), ["d", "e"])
# def test_or_minmatch():
# schema = fields.Schema(k=fields.STORED, v=fields.TEXT)
# st = RamStorage()
# ix = st.create_index(schema)
#
# w = ix.writer()
# w.add_document(k=1, v=u("alfa bravo charlie delta echo"))
# w.add_document(k=2, v=u("bravo charlie delta echo foxtrot"))
# w.add_document(k=3, v=u("charlie delta echo foxtrot golf"))
# w.add_document(k=4, v=u("delta echo foxtrot golf hotel"))
# w.add_document(k=5, v=u("echo foxtrot golf hotel india"))
# w.add_document(k=6, v=u("foxtrot golf hotel india juliet"))
# w.commit()
#
# s = ix.searcher()
# q = Or([Term("v", "echo"), Term("v", "foxtrot")], minmatch=2)
# r = s.search(q)
# assert sorted(d["k"] for d in r), [2, 3, 4, 5])
def test_range():
schema = fields.Schema(id=fields.ID(stored=True), content=fields.TEXT)
st = RamStorage()
ix = st.create_index(schema)
w = ix.writer()
w.add_document(id=u("A"), content=u("alfa bravo charlie delta echo"))
w.add_document(id=u("B"), content=u("bravo charlie delta echo foxtrot"))
w.add_document(id=u("C"), content=u("charlie delta echo foxtrot golf"))
w.add_document(id=u("D"), content=u("delta echo foxtrot golf hotel"))
w.add_document(id=u("E"), content=u("echo foxtrot golf hotel india"))
w.commit()
with ix.searcher() as s:
qp = qparser.QueryParser("content", schema)
q = qp.parse(u("charlie [delta TO foxtrot]"))
assert_equal(q.__class__, query.And)
assert_equal(q[0].__class__, query.Term)
assert_equal(q[1].__class__, query.TermRange)
assert_equal(q[1].start, "delta")
assert_equal(q[1].end, "foxtrot")
assert_equal(q[1].startexcl, False)
assert_equal(q[1].endexcl, False)
ids = sorted([d['id'] for d in s.search(q)])
assert_equal(ids, [u('A'), u('B'), u('C')])
q = qp.parse(u("foxtrot {echo TO hotel]"))
assert_equal(q.__class__, query.And)
assert_equal(q[0].__class__, query.Term)
assert_equal(q[1].__class__, query.TermRange)
assert_equal(q[1].start, "echo")
assert_equal(q[1].end, "hotel")
assert_equal(q[1].startexcl, True)
assert_equal(q[1].endexcl, False)
ids = sorted([d['id'] for d in s.search(q)])
assert_equal(ids, [u('B'), u('C'), u('D'), u('E')])
q = qp.parse(u("{bravo TO delta}"))
assert_equal(q.__class__, query.TermRange)
assert_equal(q.start, "bravo")
assert_equal(q.end, "delta")
assert_equal(q.startexcl, True)
assert_equal(q.endexcl, True)
ids = sorted([d['id'] for d in s.search(q)])
assert_equal(ids, [u('A'), u('B'), u('C')])
# Shouldn't match anything
q = qp.parse(u("[1 to 10]"))
assert_equal(q.__class__, query.TermRange)
assert_equal(len(s.search(q)), 0)
def test_range_clusiveness():
schema = fields.Schema(id=fields.ID(stored=True))
st = RamStorage()
ix = st.create_index(schema)
w = ix.writer()
for letter in u("abcdefg"):
w.add_document(id=letter)
w.commit()
with ix.searcher() as s:
def check(startexcl, endexcl, string):
q = query.TermRange("id", "b", "f", startexcl, endexcl)
r = "".join(sorted(d['id'] for d in s.search(q)))
assert_equal(r, string)
check(False, False, "bcdef")
check(True, False, "cdef")
check(True, True, "cde")
check(False, True, "bcde")
def test_open_ranges():
schema = fields.Schema(id=fields.ID(stored=True))
st = RamStorage()
ix = st.create_index(schema)
w = ix.writer()
for letter in u("abcdefg"):
w.add_document(id=letter)
w.commit()
with ix.searcher() as s:
qp = qparser.QueryParser("id", schema)
def check(qstring, result):
q = qp.parse(qstring)
r = "".join(sorted([d['id'] for d in s.search(q)]))
assert_equal(r, result)
check(u("[b TO]"), "bcdefg")
check(u("[TO e]"), "abcde")
check(u("[b TO d]"), "bcd")
check(u("{b TO]"), "cdefg")
check(u("[TO e}"), "abcd")
check(u("{b TO d}"), "c")
def test_open_numeric_ranges():
domain = range(0, 10000, 7)
schema = fields.Schema(num=fields.NUMERIC(stored=True))
ix = RamStorage().create_index(schema)
w = ix.writer()
for i in domain:
w.add_document(num=i)
w.commit()
qp = qparser.QueryParser("num", schema)
with ix.searcher() as s:
q = qp.parse("[100 to]")
r = [hit["num"] for hit in s.search(q, limit=None)]
assert_equal(r, [n for n in domain if n >= 100])
q = qp.parse("[to 5000]")
r = [hit["num"] for hit in s.search(q, limit=None)]
assert_equal(r, [n for n in domain if n <= 5000])
def test_open_date_ranges():
basedate = datetime(2011, 1, 24, 6, 25, 0, 0)
domain = [basedate + timedelta(days=n) for n in xrange(-20, 20)]
schema = fields.Schema(date=fields.DATETIME(stored=True))
ix = RamStorage().create_index(schema)
w = ix.writer()
for d in domain:
w.add_document(date=d)
w.commit()
with ix.searcher() as s:
# Without date parser
qp = qparser.QueryParser("date", schema)
q = qp.parse("[2011-01-10 to]")
r = [hit["date"] for hit in s.search(q, limit=None)]
assert len(r) > 0
target = [d for d in domain if d >= datetime(2011, 1, 10, 6, 25)]
assert_equal(r, target)
q = qp.parse("[to 2011-01-30]")
r = [hit["date"] for hit in s.search(q, limit=None)]
assert len(r) > 0
target = [d for d in domain if d <= datetime(2011, 1, 30, 6, 25)]
assert_equal(r, target)
# With date parser
from whoosh.qparser.dateparse import DateParserPlugin
qp.add_plugin(DateParserPlugin(basedate))
q = qp.parse("[10 jan 2011 to]")
r = [hit["date"] for hit in s.search(q, limit=None)]
assert len(r) > 0
target = [d for d in domain if d >= datetime(2011, 1, 10, 6, 25)]
assert_equal(r, target)
q = qp.parse("[to 30 jan 2011]")
r = [hit["date"] for hit in s.search(q, limit=None)]
assert len(r) > 0
target = [d for d in domain if d <= datetime(2011, 1, 30, 6, 25)]
assert_equal(r, target)
def test_negated_unlimited_ranges():
# Whoosh should treat u("[to]") as if it was "*"
schema = fields.Schema(id=fields.ID(stored=True), num=fields.NUMERIC,
date=fields.DATETIME)
ix = RamStorage().create_index(schema)
w = ix.writer()
from string import ascii_letters
domain = text_type(ascii_letters)
dt = datetime.now()
for i, letter in enumerate(domain):
w.add_document(id=letter, num=i, date=dt + timedelta(days=i))
w.commit()
with ix.searcher() as s:
qp = qparser.QueryParser("id", schema)
nq = qp.parse(u("NOT [to]"))
assert_equal(nq.__class__, query.Not)
q = nq.query
assert_equal(q.__class__, query.Every)
assert_equal("".join(h["id"] for h in s.search(q, limit=None)), domain)
assert_equal(list(nq.docs(s)), [])
nq = qp.parse(u("NOT num:[to]"))
assert_equal(nq.__class__, query.Not)
q = nq.query
assert_equal(q.__class__, query.NumericRange)
assert_equal(q.start, None)
assert_equal(q.end, None)
assert_equal("".join(h["id"] for h in s.search(q, limit=None)), domain)
assert_equal(list(nq.docs(s)), [])
nq = qp.parse(u("NOT date:[to]"))
assert_equal(nq.__class__, query.Not)
q = nq.query
assert_equal(q.__class__, query.Every)
assert_equal("".join(h["id"] for h in s.search(q, limit=None)), domain)
assert_equal(list(nq.docs(s)), [])
def test_keyword_or():
schema = fields.Schema(a=fields.ID(stored=True), b=fields.KEYWORD)
st = RamStorage()
ix = st.create_index(schema)
w = ix.writer()
w.add_document(a=u("First"), b=u("ccc ddd"))
w.add_document(a=u("Second"), b=u("aaa ddd"))
w.add_document(a=u("Third"), b=u("ccc eee"))
w.commit()
qp = qparser.QueryParser("b", schema)
with ix.searcher() as s:
qr = qp.parse(u("b:ccc OR b:eee"))
assert_equal(qr.__class__, query.Or)
r = s.search(qr)
assert_equal(len(r), 2)
assert_equal(r[0]["a"], "Third")
assert_equal(r[1]["a"], "First")
def test_merged():
sc = fields.Schema(id=fields.ID(stored=True), content=fields.TEXT)
st = RamStorage()
ix = st.create_index(sc)
w = ix.writer()
w.add_document(id=u("alfa"), content=u("alfa"))
w.add_document(id=u("bravo"), content=u("bravo"))
w.add_document(id=u("charlie"), content=u("charlie"))
w.add_document(id=u("delta"), content=u("delta"))
w.commit()
with ix.searcher() as s:
r = s.search(query.Term("content", u("bravo")))
assert_equal(len(r), 1)
assert_equal(r[0]["id"], "bravo")
w = ix.writer()
w.add_document(id=u("echo"), content=u("echo"))
w.commit()
assert_equal(len(ix._segments()), 1)
with ix.searcher() as s:
r = s.search(query.Term("content", u("bravo")))
assert_equal(len(r), 1)
assert_equal(r[0]["id"], "bravo")
def test_multireader():
sc = fields.Schema(id=fields.ID(stored=True), content=fields.TEXT)
st = RamStorage()
ix = st.create_index(sc)
w = ix.writer()
w.add_document(id=u("alfa"), content=u("alfa"))
w.add_document(id=u("bravo"), content=u("bravo"))
w.add_document(id=u("charlie"), content=u("charlie"))
w.add_document(id=u("delta"), content=u("delta"))
w.add_document(id=u("echo"), content=u("echo"))
w.add_document(id=u("foxtrot"), content=u("foxtrot"))
w.add_document(id=u("golf"), content=u("golf"))
w.add_document(id=u("hotel"), content=u("hotel"))
w.add_document(id=u("india"), content=u("india"))
w.commit()
with ix.searcher() as s:
r = s.search(query.Term("content", u("bravo")))
assert_equal(len(r), 1)
assert_equal(r[0]["id"], "bravo")
w = ix.writer()
w.add_document(id=u("juliet"), content=u("juliet"))
w.add_document(id=u("kilo"), content=u("kilo"))
w.add_document(id=u("lima"), content=u("lima"))
w.add_document(id=u("mike"), content=u("mike"))
w.add_document(id=u("november"), content=u("november"))
w.add_document(id=u("oscar"), content=u("oscar"))
w.add_document(id=u("papa"), content=u("papa"))
w.add_document(id=u("quebec"), content=u("quebec"))
w.add_document(id=u("romeo"), content=u("romeo"))
w.commit()
assert_equal(len(ix._segments()), 2)
#r = ix.reader()
#assert r.__class__.__name__, "MultiReader")
#pr = r.postings("content", u("bravo"))
with ix.searcher() as s:
r = s.search(query.Term("content", u("bravo")))
assert_equal(len(r), 1)
assert_equal(r[0]["id"], "bravo")
def test_posting_phrase():
schema = fields.Schema(name=fields.ID(stored=True), value=fields.TEXT)
storage = RamStorage()
ix = storage.create_index(schema)
writer = ix.writer()
writer.add_document(name=u("A"),
value=u("Little Miss Muffet sat on a tuffet"))
writer.add_document(name=u("B"), value=u("Miss Little Muffet tuffet"))
writer.add_document(name=u("C"), value=u("Miss Little Muffet tuffet sat"))
writer.add_document(name=u("D"),
value=u("Gibberish blonk falunk miss muffet sat " +
"tuffet garbonzo"))
writer.add_document(name=u("E"), value=u("Blah blah blah pancakes"))
writer.commit()
with ix.searcher() as s:
def names(results):
return sorted([fields['name'] for fields in results])
q = query.Phrase("value", [u("little"), u("miss"), u("muffet"),
u("sat"), u("tuffet")])
m = q.matcher(s)
assert_equal(m.__class__.__name__, "SpanNearMatcher")
r = s.search(q)
assert_equal(names(r), ["A"])
assert_equal(len(r), 1)
q = query.Phrase("value", [u("miss"), u("muffet"), u("sat"),
u("tuffet")])
assert_equal(names(s.search(q)), ["A", "D"])
q = query.Phrase("value", [u("falunk"), u("gibberish")])
r = s.search(q)
assert_equal(names(r), [])
assert_equal(len(r), 0)
q = query.Phrase("value", [u("gibberish"), u("falunk")], slop=2)
assert_equal(names(s.search(q)), ["D"])
q = query.Phrase("value", [u("blah")] * 4)
assert_equal(names(s.search(q)), []) # blah blah blah blah
q = query.Phrase("value", [u("blah")] * 3)
m = q.matcher(s)
assert_equal(names(s.search(q)), ["E"])
def test_phrase_score():
schema = fields.Schema(name=fields.ID(stored=True), value=fields.TEXT)
storage = RamStorage()
ix = storage.create_index(schema)
writer = ix.writer()
writer.add_document(name=u("A"),
value=u("Little Miss Muffet sat on a tuffet"))
writer.add_document(name=u("D"),
value=u("Gibberish blonk falunk miss muffet sat " +
"tuffet garbonzo"))
writer.add_document(name=u("E"), value=u("Blah blah blah pancakes"))
writer.add_document(name=u("F"),
value=u("Little miss muffet little miss muffet"))
writer.commit()
with ix.searcher() as s:
q = query.Phrase("value", [u("little"), u("miss"), u("muffet")])
m = q.matcher(s)
assert_equal(m.id(), 0)
score1 = m.weight()
assert score1 > 0
m.next()
assert_equal(m.id(), 3)
assert m.weight() > score1
def test_stop_phrase():
schema = fields.Schema(title=fields.TEXT(stored=True))
storage = RamStorage()
ix = storage.create_index(schema)
writer = ix.writer()
writer.add_document(title=u("Richard of York"))
writer.add_document(title=u("Lily the Pink"))
writer.commit()
with ix.searcher() as s:
qp = qparser.QueryParser("title", schema)
q = qp.parse(u("richard of york"))
assert_equal(q.__unicode__(), "(title:richard AND title:york)")
assert_equal(len(s.search(q)), 1)
#q = qp.parse(u("lily the pink"))
#assert len(s.search(q)), 1)
assert_equal(len(s.find("title", u("lily the pink"))), 1)
def test_phrase_order():
tfield = fields.TEXT(stored=True, analyzer=analysis.SimpleAnalyzer())
schema = fields.Schema(text=tfield)
storage = RamStorage()
ix = storage.create_index(schema)
writer = ix.writer()
for ls in permutations(["ape", "bay", "can", "day"], 4):
writer.add_document(text=u(" ").join(ls))
writer.commit()
with ix.searcher() as s:
def result(q):
r = s.search(q, limit=None, sortedby=None)
return sorted([d['text'] for d in r])
q = query.Phrase("text", ["bay", "can", "day"])
assert_equal(result(q), [u('ape bay can day'), u('bay can day ape')])
def test_phrase_sameword():
schema = fields.Schema(id=fields.STORED, text=fields.TEXT)
storage = RamStorage()
ix = storage.create_index(schema)
writer = ix.writer()
writer.add_document(id=1, text=u("The film Linda Linda Linda is good"))
writer.add_document(id=2, text=u("The model Linda Evangelista is pretty"))
writer.commit()
with ix.searcher() as s:
r = s.search(query.Phrase("text", ["linda", "linda", "linda"]),
limit=None)
assert_equal(len(r), 1)
assert_equal(r[0]["id"], 1)
def test_phrase_multi():
schema = fields.Schema(id=fields.STORED, text=fields.TEXT)
ix = RamStorage().create_index(schema)
domain = u("alfa bravo charlie delta echo").split()
w = None
for i, ls in enumerate(permutations(domain)):
if w is None:
w = ix.writer()
w.add_document(id=i, text=u(" ").join(ls))
if not i % 30:
w.commit()
w = None
if w is not None:
w.commit()
with ix.searcher() as s:
q = query.Phrase("text", ["alfa", "bravo"])
_ = s.search(q)
def test_missing_field_scoring():
schema = fields.Schema(name=fields.TEXT(stored=True),
hobbies=fields.TEXT(stored=True))
storage = RamStorage()
ix = storage.create_index(schema)
writer = ix.writer()
writer.add_document(name=u('Frank'), hobbies=u('baseball, basketball'))
writer.commit()
r = ix.reader()
assert_equal(r.field_length("hobbies"), 2)
assert_equal(r.field_length("name"), 1)
r.close()
writer = ix.writer()
writer.add_document(name=u('Jonny'))
writer.commit()
with ix.searcher() as s:
r = s.reader()
assert_equal(len(ix._segments()), 1)
assert_equal(r.field_length("hobbies"), 2)
assert_equal(r.field_length("name"), 2)
parser = qparser.MultifieldParser(['name', 'hobbies'], schema)
q = parser.parse(u("baseball"))
result = s.search(q)
assert_equal(len(result), 1)
def test_search_fieldname_underscores():
s = fields.Schema(my_name=fields.ID(stored=True), my_value=fields.TEXT)
st = RamStorage()
ix = st.create_index(s)
w = ix.writer()
w.add_document(my_name=u("Green"), my_value=u("It's not easy being green"))
w.add_document(my_name=u("Red"),
my_value=u("Hopping mad like a playground ball"))
w.commit()
qp = qparser.QueryParser("my_value", schema=s)
with ix.searcher() as s:
r = s.search(qp.parse(u("my_name:Green")))
assert_equal(r[0]['my_name'], "Green")
def test_short_prefix():
s = fields.Schema(name=fields.ID, value=fields.TEXT)
qp = qparser.QueryParser("value", schema=s)
q = qp.parse(u("s*"))
assert_equal(q.__class__.__name__, "Prefix")
assert_equal(q.text, "s")
def test_weighting():
from whoosh.scoring import Weighting, BaseScorer
schema = fields.Schema(id=fields.ID(stored=True),
n_comments=fields.STORED)
st = RamStorage()
ix = st.create_index(schema)
w = ix.writer()
w.add_document(id=u("1"), n_comments=5)
w.add_document(id=u("2"), n_comments=12)
w.add_document(id=u("3"), n_comments=2)
w.add_document(id=u("4"), n_comments=7)
w.commit()
# Fake Weighting implementation
class CommentWeighting(Weighting):
def scorer(self, searcher, fieldname, text, qf=1):
return self.CommentScorer(searcher.stored_fields)
class CommentScorer(BaseScorer):
def __init__(self, stored_fields):
self.stored_fields = stored_fields
def score(self, matcher):
sf = self.stored_fields(matcher.id())
ncomments = sf.get("n_comments", 0)
return ncomments
with ix.searcher(weighting=CommentWeighting()) as s:
q = query.TermRange("id", u("1"), u("4"), constantscore=False)
r = s.search(q)
ids = [fs["id"] for fs in r]
assert_equal(ids, ["2", "4", "1", "3"])
def test_dismax():
schema = fields.Schema(id=fields.STORED,
f1=fields.TEXT, f2=fields.TEXT, f3=fields.TEXT)
ix = RamStorage().create_index(schema)
w = ix.writer()
w.add_document(id=1, f1=u("alfa bravo charlie delta"),
f2=u("alfa alfa alfa"),
f3=u("alfa echo foxtrot hotel india"))
w.commit()
with ix.searcher(weighting=scoring.Frequency()) as s:
assert_equal(list(s.documents(f1="alfa")), [{"id": 1}])
assert_equal(list(s.documents(f2="alfa")), [{"id": 1}])
assert_equal(list(s.documents(f3="alfa")), [{"id": 1}])
qs = [query.Term("f1", "alfa"), query.Term("f2", "alfa"),
query.Term("f3", "alfa")]
dm = query.DisjunctionMax(qs)
r = s.search(dm)
assert_equal(r.score(0), 3.0)
def test_deleted_wildcard():
schema = fields.Schema(id=fields.ID(stored=True))
st = RamStorage()
ix = st.create_index(schema)
w = ix.writer()
w.add_document(id=u("alfa"))
w.add_document(id=u("bravo"))
w.add_document(id=u("charlie"))
w.add_document(id=u("delta"))
w.add_document(id=u("echo"))
w.add_document(id=u("foxtrot"))
w.commit()
w = ix.writer()
w.delete_by_term("id", "bravo")
w.delete_by_term("id", "delta")
w.delete_by_term("id", "echo")
w.commit()
with ix.searcher() as s:
r = s.search(query.Every("id"))
assert_equal(sorted([d['id'] for d in r]),
["alfa", "charlie", "foxtrot"])
def test_missing_wildcard():
schema = fields.Schema(id=fields.ID(stored=True), f1=fields.TEXT,
f2=fields.TEXT)
st = RamStorage()
ix = st.create_index(schema)
w = ix.writer()
w.add_document(id=u("1"), f1=u("alfa"), f2=u("apple"))
w.add_document(id=u("2"), f1=u("bravo"))
w.add_document(id=u("3"), f1=u("charlie"), f2=u("candy"))
w.add_document(id=u("4"), f2=u("donut"))
w.add_document(id=u("5"))
w.commit()
with ix.searcher() as s:
r = s.search(query.Every("id"))
assert_equal(sorted([d['id'] for d in r]), ["1", "2", "3", "4", "5"])
r = s.search(query.Every("f1"))
assert_equal(sorted([d['id'] for d in r]), ["1", "2", "3"])
r = s.search(query.Every("f2"))
assert_equal(sorted([d['id'] for d in r]), ["1", "3", "4"])
def test_finalweighting():
from whoosh.scoring import Frequency
schema = fields.Schema(id=fields.ID(stored=True),
summary=fields.TEXT,
n_comments=fields.STORED)
st = RamStorage()
ix = st.create_index(schema)
w = ix.writer()
w.add_document(id=u("1"), summary=u("alfa bravo"), n_comments=5)
w.add_document(id=u("2"), summary=u("alfa"), n_comments=12)
w.add_document(id=u("3"), summary=u("bravo"), n_comments=2)
w.add_document(id=u("4"), summary=u("bravo bravo"), n_comments=7)
w.commit()
class CommentWeighting(Frequency):
use_final = True
def final(self, searcher, docnum, score):
ncomments = searcher.stored_fields(docnum).get("n_comments", 0)
return ncomments
with ix.searcher(weighting=CommentWeighting()) as s:
q = qparser.QueryParser("summary", None).parse("alfa OR bravo")
r = s.search(q)
ids = [fs["id"] for fs in r]
assert_equal(["2", "4", "1", "3"], ids)
def test_outofdate():
schema = fields.Schema(id=fields.ID(stored=True))
st = RamStorage()
ix = st.create_index(schema)
w = ix.writer()
w.add_document(id=u("1"))
w.add_document(id=u("2"))
w.commit()
s = ix.searcher()
assert s.up_to_date()
w = ix.writer()
w.add_document(id=u("3"))
w.add_document(id=u("4"))
assert s.up_to_date()
w.commit()
assert not s.up_to_date()
s = s.refresh()
assert s.up_to_date()
s.close()
def test_find_missing():
schema = fields.Schema(id=fields.ID, text=fields.KEYWORD(stored=True))
ix = RamStorage().create_index(schema)
w = ix.writer()
w.add_document(id=u("1"), text=u("alfa"))
w.add_document(id=u("2"), text=u("bravo"))
w.add_document(text=u("charlie"))
w.add_document(id=u("4"), text=u("delta"))
w.add_document(text=u("echo"))
w.add_document(id=u("6"), text=u("foxtrot"))
w.add_document(text=u("golf"))
w.commit()
with ix.searcher() as s:
qp = qparser.QueryParser("text", schema)
q = qp.parse(u("NOT id:*"))
r = s.search(q, limit=None)
assert_equal(list(h["text"] for h in r), ["charlie", "echo", "golf"])
def test_ngram_phrase():
schema = fields.Schema(text=fields.NGRAM(minsize=2, maxsize=2,
phrase=True),
path=fields.ID(stored=True))
ix = RamStorage().create_index(schema)
writer = ix.writer()
writer.add_document(text=u('\u9AD8\u6821\u307E\u3067\u306F\u6771\u4EAC' +
'\u3067\u3001\u5927\u5B66\u304B\u3089\u306F' +
'\u4EAC\u5927\u3067\u3059\u3002'),
path=u('sample'))
writer.commit()
with ix.searcher() as s:
p = qparser.QueryParser("text", schema)
q = p.parse(u('\u6771\u4EAC\u5927\u5B66'))
assert_equal(len(s.search(q)), 1)
q = p.parse(u('"\u6771\u4EAC\u5927\u5B66"'))
assert_equal(len(s.search(q)), 0)
q = p.parse(u('"\u306F\u6771\u4EAC\u3067"'))
assert_equal(len(s.search(q)), 1)
def test_ordered():
domain = u("alfa bravo charlie delta echo foxtrot").split(" ")
schema = fields.Schema(f=fields.TEXT(stored=True))
ix = RamStorage().create_index(schema)
writer = ix.writer()
for ls in permutations(domain):
writer.add_document(f=u(" ").join(ls))
writer.commit()
with ix.searcher() as s:
q = query.Ordered([query.Term("f", u("alfa")),
query.Term("f", u("charlie")),
query.Term("f", u("echo"))])
r = s.search(q)
for hit in r:
ls = hit["f"].split()
assert "alfa" in ls
assert "charlie" in ls
assert "echo" in ls
a = ls.index("alfa")
c = ls.index("charlie")
e = ls.index("echo")
assert a < c and c < e, repr(ls)
def test_otherwise():
schema = fields.Schema(id=fields.STORED, f=fields.TEXT)
ix = RamStorage().create_index(schema)
w = ix.writer()
w.add_document(id=1, f=u("alfa one two"))
w.add_document(id=2, f=u("alfa three four"))
w.add_document(id=3, f=u("bravo four five"))
w.add_document(id=4, f=u("bravo six seven"))
w.commit()
with ix.searcher() as s:
q = query.Otherwise(query.Term("f", u("alfa")),
query.Term("f", u("six")))
assert_equal([d["id"] for d in s.search(q)], [1, 2])
q = query.Otherwise(query.Term("f", u("tango")),
query.Term("f", u("four")))
assert_equal([d["id"] for d in s.search(q)], [2, 3])
q = query.Otherwise(query.Term("f", u("tango")),
query.Term("f", u("nine")))
assert_equal([d["id"] for d in s.search(q)], [])
def test_fuzzyterm():
schema = fields.Schema(id=fields.STORED, f=fields.TEXT)
ix = RamStorage().create_index(schema)
w = ix.writer()
w.add_document(id=1, f=u("alfa bravo charlie delta"))
w.add_document(id=2, f=u("bravo charlie delta echo"))
w.add_document(id=3, f=u("charlie delta echo foxtrot"))
w.add_document(id=4, f=u("delta echo foxtrot golf"))
w.commit()
with ix.searcher() as s:
q = query.FuzzyTerm("f", "brave")
assert_equal([d["id"] for d in s.search(q)], [1, 2])
def test_fuzzyterm2():
schema = fields.Schema(id=fields.STORED, f=fields.TEXT(spelling=True))
ix = RamStorage().create_index(schema)
w = ix.writer()
w.add_document(id=1, f=u("alfa bravo charlie delta"))
w.add_document(id=2, f=u("bravo charlie delta echo"))
w.add_document(id=3, f=u("charlie delta echo foxtrot"))
w.add_document(id=4, f=u("delta echo foxtrot golf"))
w.commit()
with ix.searcher() as s:
assert_equal(list(s.reader().terms_within("f", u("brave"), 1)),
["bravo"])
q = query.FuzzyTerm("f", "brave")
assert_equal([d["id"] for d in s.search(q)], [1, 2])
def test_multireader_not():
schema = fields.Schema(id=fields.STORED, f=fields.TEXT)
ix = RamStorage().create_index(schema)
w = ix.writer()
w.add_document(id=0, f=u("alfa bravo chralie"))
w.add_document(id=1, f=u("bravo chralie delta"))
w.add_document(id=2, f=u("charlie delta echo"))
w.add_document(id=3, f=u("delta echo foxtrot"))
w.add_document(id=4, f=u("echo foxtrot golf"))
w.commit()
with ix.searcher() as s:
q = query.And([query.Term("f", "delta"),
query.Not(query.Term("f", "delta"))])
r = s.search(q)
assert_equal(len(r), 0)
ix = RamStorage().create_index(schema)
w = ix.writer()
w.add_document(id=5, f=u("alfa bravo chralie"))
w.add_document(id=6, f=u("bravo chralie delta"))
w.commit(merge=False)
w = ix.writer()
w.add_document(id=7, f=u("charlie delta echo"))
w.add_document(id=8, f=u("delta echo foxtrot"))
w.commit(merge=False)
w = ix.writer()
w.add_document(id=9, f=u("echo foxtrot golf"))
w.add_document(id=10, f=u("foxtrot golf delta"))
w.commit(merge=False)
assert len(ix._segments()) > 1
with ix.searcher() as s:
q = query.And([query.Term("f", "delta"),
query.Not(query.Term("f", "delta"))])
r = s.search(q)
assert_equal(len(r), 0)
def test_boost_phrase():
schema = fields.Schema(title=fields.TEXT(field_boost=5.0, stored=True),
text=fields.TEXT)
ix = RamStorage().create_index(schema)
domain = u("alfa bravo charlie delta").split()
w = ix.writer()
for ls in permutations(domain):
t = u(" ").join(ls)
w.add_document(title=t, text=t)
w.commit()
q = query.Or([query.Term("title", u("alfa")),
query.Term("title", u("bravo")),
query.Phrase("text", [u("bravo"), u("charlie"), u("delta")])
])
def boost_phrases(q):
if isinstance(q, query.Phrase):
q.boost *= 1000.0
return q
else:
return q.apply(boost_phrases)
q = boost_phrases(q)
with ix.searcher() as s:
r = s.search(q, limit=None)
for hit in r:
if "bravo charlie delta" in hit["title"]:
assert hit.score > 100.0
def test_filter():
schema = fields.Schema(id=fields.STORED, path=fields.ID, text=fields.TEXT)
ix = RamStorage().create_index(schema)
w = ix.writer()
w.add_document(id=1, path=u("/a/1"), text=u("alfa bravo charlie"))
w.add_document(id=2, path=u("/b/1"), text=u("bravo charlie delta"))
w.add_document(id=3, path=u("/c/1"), text=u("charlie delta echo"))
w.commit(merge=False)
w = ix.writer()
w.add_document(id=4, path=u("/a/2"), text=u("delta echo alfa"))
w.add_document(id=5, path=u("/b/2"), text=u("echo alfa bravo"))
w.add_document(id=6, path=u("/c/2"), text=u("alfa bravo charlie"))
w.commit(merge=False)
w = ix.writer()
w.add_document(id=7, path=u("/a/3"), text=u("bravo charlie delta"))
w.add_document(id=8, path=u("/b/3"), text=u("charlie delta echo"))
w.add_document(id=9, path=u("/c/3"), text=u("delta echo alfa"))
w.commit(merge=False)
with ix.searcher() as s:
fq = query.Or([query.Prefix("path", "/a"),
query.Prefix("path", "/b")])
r = s.search(query.Term("text", "alfa"), filter=fq)
assert_equal([d["id"] for d in r], [1, 4, 5])
r = s.search(query.Term("text", "bravo"), filter=fq)
assert_equal([d["id"] for d in r], [1, 2, 5, 7, ])
def test_timelimit():
schema = fields.Schema(text=fields.TEXT)
ix = RamStorage().create_index(schema)
w = ix.writer()
for _ in xrange(50):
w.add_document(text=u("alfa"))
w.commit()
import time
from whoosh import matching
class SlowMatcher(matching.WrappingMatcher):
def next(self):
time.sleep(0.02)
self.child.next()
class SlowQuery(query.WrappingQuery):
def matcher(self, searcher):
return SlowMatcher(self.child.matcher(searcher))
with ix.searcher() as s:
oq = query.Term("text", u("alfa"))
sq = SlowQuery(oq)
col = searching.Collector(timelimit=0.1, limit=None)
assert_raises(searching.TimeLimit, col.search, s, sq)
col = searching.Collector(timelimit=0.1, limit=40)
assert_raises(searching.TimeLimit, col.search, s, sq)
col = searching.Collector(timelimit=0.25, limit=None)
try:
col.search(s, sq)
assert False # Shouldn't get here
except searching.TimeLimit:
r = col.results()
assert r.scored_length() > 0
col = searching.Collector(timelimit=0.5, limit=None)
r = col.search(s, oq)
assert r.runtime < 0.5
def test_fieldboost():
schema = fields.Schema(id=fields.STORED, a=fields.TEXT, b=fields.TEXT)
ix = RamStorage().create_index(schema)
w = ix.writer()
w.add_document(id=0, a=u("alfa bravo charlie"), b=u("echo foxtrot india"))
w.add_document(id=1, a=u("delta bravo charlie"), b=u("alfa alfa alfa"))
w.add_document(id=2, a=u("alfa alfa alfa"), b=u("echo foxtrot india"))
w.add_document(id=3, a=u("alfa sierra romeo"), b=u("alfa tango echo"))
w.add_document(id=4, a=u("bravo charlie delta"), b=u("alfa foxtrot india"))
w.add_document(id=5, a=u("alfa alfa echo"), b=u("tango tango tango"))
w.add_document(id=6, a=u("alfa bravo echo"), b=u("alfa alfa tango"))
w.commit()
def field_booster(fieldname, factor=2.0):
"Returns a function which will boost the given field in a query tree"
def booster_fn(obj):
if obj.is_leaf() and obj.field() == fieldname:
obj = copy.deepcopy(obj)
obj.boost *= factor
return obj
else:
return obj
return booster_fn
with ix.searcher() as s:
q = query.Or([query.Term("a", u("alfa")),
query.Term("b", u("alfa"))])
q = q.accept(field_booster("a", 100.0))
assert_equal(text_type(q), text_type("(a:alfa^100.0 OR b:alfa)"))
r = s.search(q)
assert_equal([hit["id"] for hit in r], [2, 5, 6, 3, 0, 1, 4])
def test_andmaybe_quality():
schema = fields.Schema(id=fields.STORED, title=fields.TEXT(stored=True),
year=fields.NUMERIC)
ix = RamStorage().create_index(schema)
domain = [(u('Alpha Bravo Charlie Delta'), 2000),
(u('Echo Bravo Foxtrot'), 2000), (u('Bravo Golf Hotel'), 2002),
(u('Bravo India'), 2002), (u('Juliet Kilo Bravo'), 2004),
(u('Lima Bravo Mike'), 2004)]
w = ix.writer()
for title, year in domain:
w.add_document(title=title, year=year)
w.commit()
with ix.searcher() as s:
qp = qparser.QueryParser("title", ix.schema)
q = qp.parse(u("title:bravo ANDMAYBE year:2004"))
titles = [hit["title"] for hit in s.search(q, limit=None)[:2]]
assert "Juliet Kilo Bravo" in titles
titles = [hit["title"] for hit in s.search(q, limit=2)]
assert "Juliet Kilo Bravo" in titles
def test_collect_limit():
schema = fields.Schema(id=fields.STORED, text=fields.TEXT)
ix = RamStorage().create_index(schema)
w = ix.writer()
w.add_document(id="a", text=u("alfa bravo charlie delta echo"))
w.add_document(id="b", text=u("bravo charlie delta echo foxtrot"))
w.add_document(id="c", text=u("charlie delta echo foxtrot golf"))
w.add_document(id="d", text=u("delta echo foxtrot golf hotel"))
w.add_document(id="e", text=u("echo foxtrot golf hotel india"))
w.commit()
with ix.searcher() as s:
r = s.search(query.Term("text", u("golf")), limit=10)
assert_equal(len(r), 3)
count = 0
for _ in r:
count += 1
assert_equal(count, 3)
w = ix.writer()
w.add_document(id="f", text=u("foxtrot golf hotel india juliet"))
w.add_document(id="g", text=u("golf hotel india juliet kilo"))
w.add_document(id="h", text=u("hotel india juliet kilo lima"))
w.add_document(id="i", text=u("india juliet kilo lima mike"))
w.add_document(id="j", text=u("juliet kilo lima mike november"))
w.commit(merge=False)
with ix.searcher() as s:
r = s.search(query.Term("text", u("golf")), limit=20)
assert_equal(len(r), 5)
count = 0
for _ in r:
count += 1
assert_equal(count, 5)
def test_scorer():
schema = fields.Schema(key=fields.TEXT(stored=True))
ix = RamStorage().create_index(schema)
w = ix.writer()
w.add_document(key=u("alfa alfa alfa"))
w.add_document(key=u("alfa alfa alfa alfa"))
w.add_document(key=u("alfa alfa"))
w.commit()
w = ix.writer()
w.add_document(key=u("alfa alfa alfa alfa alfa alfa"))
w.add_document(key=u("alfa"))
w.add_document(key=u("alfa alfa alfa alfa alfa"))
w.commit(merge=False)
dw = scoring.DebugModel()
s = ix.searcher(weighting=dw)
r = s.search(query.Term("key", "alfa"))
log = dw.log
assert_equal(log, [('key', 'alfa', 0, 3.0, 3), ('key', 'alfa', 1, 4.0, 4),
('key', 'alfa', 2, 2.0, 2), ('key', 'alfa', 0, 6.0, 6),
('key', 'alfa', 1, 1.0, 1), ('key', 'alfa', 2, 5.0, 5)])
def test_pos_scorer():
ana = analysis.SimpleAnalyzer()
schema = fields.Schema(id=fields.STORED, key=fields.TEXT(analyzer=ana))
ix = RamStorage().create_index(schema)
w = ix.writer()
w.add_document(id=0, key=u("0 0 1 0 0 0"))
w.add_document(id=1, key=u("0 0 0 1 0 0"))
w.add_document(id=2, key=u("0 1 0 0 0 0"))
w.commit()
w = ix.writer()
w.add_document(id=3, key=u("0 0 0 0 0 1"))
w.add_document(id=4, key=u("1 0 0 0 0 0"))
w.add_document(id=5, key=u("0 0 0 0 1 0"))
w.commit(merge=False)
def pos_score_fn(searcher, fieldname, text, matcher):
poses = matcher.value_as("positions")
return 1.0 / (poses[0] + 1)
pos_weighting = scoring.FunctionWeighting(pos_score_fn)
s = ix.searcher(weighting=pos_weighting)
r = s.search(query.Term("key", "1"))
assert_equal([hit["id"] for hit in r], [4, 2, 0, 1, 5, 3])
def test_too_many_prefix_positions():
from whoosh import matching
schema = fields.Schema(id=fields.STORED, text=fields.TEXT)
ix = RamStorage().create_index(schema)
with ix.writer() as w:
for i in xrange(200):
text = u("a%s" % i)
w.add_document(id=i, text=text)
q = query.Prefix("text", u("a"))
q.TOO_MANY_CLAUSES = 100
with ix.searcher() as s:
m = q.matcher(s)
assert_equal(m.__class__, matching.ListMatcher)
assert m.supports("positions")
items = list(m.items_as("positions"))
assert_equal([(i, [0]) for i in xrange(200)], items)
|
import ibmsecurity.utilities.tools
import logging
logger = logging.getLogger(__name__)
module_uri = "/isam/felb/configuration/ha"
requires_module = None
requires_version = None
def disable(isamAppliance, check_mode=False, force=False):
"""
Disabling HA
"""
if force is True or _check_disable(isamAppliance) is True:
if check_mode is True:
return isamAppliance.create_return_object(changed=True)
else:
return isamAppliance.invoke_delete("Disabling HA", "{0}".format(module_uri),
requires_version=requires_version,
requires_modules=requires_module)
else:
return isamAppliance.create_return_object()
def enable(isamAppliance, is_primary, interface, remote, port, health_check_interval,
health_check_timeout, check_mode=False, force=False):
"""
Enabling HA
"""
if force is True or _check_enable(isamAppliance, is_primary, interface, remote, port, health_check_interval,
health_check_timeout) is True:
if check_mode is True:
return isamAppliance.create_return_object(changed=True)
else:
return isamAppliance.invoke_post("Enabling HA", "{0}".format(module_uri),
{
"is_primary": is_primary,
"interface": interface,
"remote": remote,
"port": port,
"health_check_interval": health_check_interval,
"health_check_timeout": health_check_timeout
}, requires_version=requires_version, requires_modules=requires_module)
else:
return isamAppliance.create_return_object()
def get(isamAppliance, check_mode=False, force=False):
"""
Retrieving HA configuration
"""
return isamAppliance.invoke_get("Retrieving HA configuration", "{0}".format(module_uri),
requires_version=requires_version, requires_modules=requires_module)
def update(isamAppliance, is_primary, interface, remote, port, health_check_interval,
health_check_timeout, check_mode=False, force=False):
"""
Updating HA configuration
"""
# Call to check function to see if configuration already exist
update_required = _check_enable(isamAppliance, is_primary=is_primary, interface=interface, remote=remote,
port=port, health_check_interval=health_check_interval,
health_check_timeout=health_check_timeout)
if force is True or update_required is True:
if check_mode is True:
return isamAppliance.create_return_object(changed=True)
else:
return isamAppliance.invoke_put("Updating HA configuration", module_uri,
{
"is_primary": is_primary,
"interface": interface,
"remote": remote,
"port": port,
"health_check_interval": health_check_interval,
"health_check_timeout": health_check_timeout
}, requires_modules=requires_module, requires_version=requires_version)
else:
return isamAppliance.create_return_object()
def set(isamAppliance, is_primary, interface, remote, port, health_check_interval,
health_check_timeout, check_mode=False, force=False):
"""
determines if add or update is used.
"""
check_obj = get(isamAppliance)
if check_mode['data']['enabled'] is False:
enable(isamAppliance, is_primary, interface, remote, port, health_check_interval,
health_check_timeout, check_mode, force)
else:
update(isamAppliance, is_primary, interface, remote, port, health_check_interval,
health_check_timeout, check_mode, force)
def _check_enable(isamAppliance, is_primary, interface, remote, port, health_check_interval,
health_check_timeout):
"""
idempotency test for each parameter
"""
ret_obj = get(isamAppliance)
if ret_obj['data']['enabled'] != True:
return True
elif ret_obj['data']['is_primary'] != is_primary:
return True
elif ret_obj['data']['interface'] != interface:
return True
elif ret_obj['data']['remote'] != remote:
return True
elif ret_obj['data']['port'] != port:
return True
elif ret_obj['data']['health_check_interval'] != health_check_interval:
return True
elif ret_obj['data']['health_check_timeout'] != health_check_timeout:
return True
else:
return False
def _check_disable(isamAppliance):
"""
Checks delete function for idempotency
"""
check_obj = get(isamAppliance)
if check_obj['data']['enabled'] == True:
return True
else:
return False
def compare(isamAppliance1, isamAppliance2):
"""
Compare cluster configuration between two appliances
"""
ret_obj1 = get(isamAppliance1)
ret_obj2 = get(isamAppliance2)
return ibmsecurity.utilities.tools.json_compare(ret_obj1, ret_obj2, deleted_keys=[]) |
/**
* Selects the 'obj' extension.
*/
registerFileType((fileExt, filePath, data) => {
// Check for obj
if (fileExt == 'obj')
return true;
return false;
});
/**
* Parser for obj files.
* This parser just demonstrates the very basics of the parsing commands.
*/
registerParser(() => {
addStandardHeader();
read(2);
addRow('WORD 1', getHexValue());
read(2);
addRow('WORD 2', getHexValue());
read(1);
addRow('BYTE 1', getHexValue());
read(1);
addRow('Flags', getHex0xValue());
addDetails(() => {
readBits(1);
addRow('Flag 0', getNumberValue(), 'Bit 0');
readBits(3);
addRow('Count', getDecimalValue(), 'Bits 1-3');
readBits(4);
addRow('Reserved');
}, true);
});
|
require('./camera');
require('./geometry');
require('./gltf-model');
require('./light');
require('./material');
require('./renderer');
require('./shadow');
require('./tracked-controls-webvr');
require('./tracked-controls-webxr');
require('./webxr');
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
import React, { forwardRef } from 'react';
import PropTypes from 'prop-types';
var ArrowDownLeftCircleFill = /*#__PURE__*/forwardRef(function (_ref, ref) {
var color = _ref.color,
size = _ref.size,
rest = _objectWithoutProperties(_ref, ["color", "size"]);
return /*#__PURE__*/React.createElement("svg", _extends({
ref: ref,
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 16 16",
width: size,
height: size,
fill: color
}, rest), /*#__PURE__*/React.createElement("path", {
d: "M16 8A8 8 0 1 0 0 8a8 8 0 0 0 16 0zm-5.904-2.803a.5.5 0 1 1 .707.707L6.707 10h2.768a.5.5 0 0 1 0 1H5.5a.5.5 0 0 1-.5-.5V6.525a.5.5 0 0 1 1 0v2.768l4.096-4.096z"
}));
});
ArrowDownLeftCircleFill.propTypes = {
color: PropTypes.string,
size: PropTypes.oneOfType([PropTypes.string, PropTypes.number])
};
ArrowDownLeftCircleFill.defaultProps = {
color: 'currentColor',
size: '1em'
};
export default ArrowDownLeftCircleFill; |
class Solution:
def combine(self, str1, str2):
res = []
if len(str1) == 0:
return str2
elif len(str2) == 0:
return str1
for s1 in str1:
for s2 in str2:
res.append(s1+s2)
return res
def recursive_append(self, digits_str, map_dict):
'''This method combines two list of strings
'''
if len(digits_str) == 0:
return []
elif len(digits_str) == 1:
return map_dict[digits_str[0]]
else:
return self.combine(map_dict[digits_str[0]], self.recursive_append(digits_str[1:], map_dict))
def letterCombinations(self, digits: str):
import string
alphabete = string.ascii_lowercase
map_dict = {}
map_dict['2'] = list("abc")
map_dict['3'] = list("def")
map_dict['4'] = list("ghi")
map_dict['5'] = list("jkl")
map_dict['6'] = list("mno")
map_dict['7'] = list("pqrs")
map_dict['8'] = list("tuv")
map_dict['9'] = list("wxyz")
return self.recursive_append(digits, map_dict)
|
<html style="margin: 0;">
<head>
<title>Minimal WebGL Example</title>
<!-- This use of <script> elements is so that we can have multiline text
without quoting it inside of JavaScript; the web browser doesn't
actually do anything besides store the text of these. -->
<script id="shader-fs" type="x-shader/x-fragment">
precision highp float;
varying vec4 v_color;
void main(void) {
// "Varying" variables are implicitly interpolated across triangles.
gl_FragColor = v_color;
}
</script>
<script id="shader-vs" type="x-shader/x-vertex">
attribute vec3 a_position;
attribute vec4 a_color;
varying vec4 v_color;
void main(void) {
gl_Position = vec4(a_position, 1.0);
v_color = a_color;
}
</script>
<script type="text/javascript">
function getShader(gl, id) {
var scriptElement = document.getElementById(id);
// Create shader object
var shader;
if (scriptElement.type == "x-shader/x-fragment")
shader = gl.createShader(gl.FRAGMENT_SHADER);
else if (scriptElement.type == "x-shader/x-vertex")
shader = gl.createShader(gl.VERTEX_SHADER);
else
throw new Error("unknown shader script type");
// Compile shader from source
gl.shaderSource(shader, scriptElement.textContent);
gl.compileShader(shader);
if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS))
throw new Error(gl.getShaderInfoLog(shader));
return shader;
}
</script>
</head>
<body style="margin: 0;">
<canvas id="glcanvas" style="border: none; margin: auto; display: block;" width="640" height="480"></canvas>
<script type="text/javascript">
var canvas = document.getElementById("glcanvas");
// Get WebGL context.
var gl = canvas.getContext("webgl")
|| canvas.getContext("experimental-webgl");
if (!gl)
throw new Error("WebGL context not found");
// Create shader program from vertex and fragment shader code.
var shaderProgram = gl.createProgram();
gl.attachShader(shaderProgram, getShader(gl, "shader-vs"));
gl.attachShader(shaderProgram, getShader(gl, "shader-fs"));
gl.linkProgram(shaderProgram);
if (!gl.getProgramParameter(shaderProgram, gl.LINK_STATUS))
throw new Error(gl.getProgramInfoLog(shaderProgram));
// Specify to render using that program.
gl.useProgram(shaderProgram);
// Get the indexes to communicate vertex attributes to the program.
var positionAttr = gl.getAttribLocation(shaderProgram, "a_position");
var colorAttr = gl.getAttribLocation(shaderProgram, "a_color");
// And specify that we will be actually delivering data to those attributes.
gl.enableVertexAttribArray(positionAttr);
gl.enableVertexAttribArray(colorAttr);
// Store vertex positions and colors in array buffer objects.
var vertices;
var positionBuffer = gl.createBuffer();
gl.bindBuffer(gl.ARRAY_BUFFER, positionBuffer);
gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(vertices = [
-0.5, -0.5, 0,
+0.5, -0.5, 0,
-0.5, +0.5, 0
]), gl.STATIC_DRAW);
var colorBuffer = gl.createBuffer();
gl.bindBuffer(gl.ARRAY_BUFFER, colorBuffer);
gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([
1, 0, 0, 1,
0, 1, 0, 1,
0, 0, 1, 1
]), gl.STATIC_DRAW);
var numVertices = vertices.length / 3; // 3 coordinates per vertex
// Set GL state
gl.clearColor(0.3, 0.3, 0.3, 1.0);
gl.enable(gl.DEPTH_TEST);
gl.viewport(0, 0, gl.drawingBufferWidth || canvas.width,
gl.drawingBufferHeight || canvas.height);
// Draw scene.
// If this were an animation, everything after this point would go in a main loop.
// Clear frame.
gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
// Specify the array data to render.
// 3 and 4 are the lengths of the vectors (3 for XYZ, 4 for RGBA).
gl.bindBuffer(gl.ARRAY_BUFFER, positionBuffer);
gl.vertexAttribPointer(positionAttr, 3, gl.FLOAT, false, 0, 0);
gl.bindBuffer(gl.ARRAY_BUFFER, colorBuffer);
gl.vertexAttribPointer(colorAttr, 4, gl.FLOAT, false, 0, 0);
// Draw triangles using the specified arrays.
gl.drawArrays(gl.TRIANGLES, 0, numVertices);
// Check for errors.
var e;
while (e = gl.getError())
console.log("GL error", e);
</script>
</body>
</html>
|
const Card = require('../../Card.js');
class BreakerHill extends Card {
setupCardAbilities(ability) {
this.persistentEffect({
match: (card) => this.neighbors.includes(card),
effect: ability.effects.gainAbility('action', {
gameAction: ability.actions.steal()
})
});
}
}
BreakerHill.id = 'breaker-hill';
module.exports = BreakerHill;
|
#
# FBrowser.py -- File Browser plugin for fits viewer
#
# Eric Jeschke ([email protected])
#
# Copyright (c) Eric R. Jeschke. All rights reserved.
# This is open-source software licensed under a BSD license.
# Please see the file LICENSE.txt for details.
#
import os, glob
import stat, time
from ginga.misc import Bunch
from ginga import AstroImage, GingaPlugin
from ginga.gtkw import gtksel
import gtk
#icon_ext = '.svg'
icon_ext = '.png'
class FBrowser(GingaPlugin.LocalPlugin):
def __init__(self, fv, fitsimage):
# superclass defines some variables for us, like logger
super(FBrowser, self).__init__(fv, fitsimage)
self.keywords = ['OBJECT', 'UT']
self.columns = [('Name', 'name'),
('Size', 'st_size'),
('Mode', 'st_mode'),
('Last Changed', 'st_mtime')
]
self.cell_data_funcs = (self.file_name, self.file_size,
self.file_mode, self.file_last_changed)
self.cell_sort_funcs = []
for hdr, key in self.columns:
self.cell_sort_funcs.append(self._mksrtfnN(key))
self.jumpinfo = []
homedir = os.environ['HOME']
self.curpath = os.path.join(homedir, '*')
self.do_scanfits = False
self.moving_cursor = False
icondir = self.fv.iconpath
foldericon = os.path.join(icondir, 'folder'+icon_ext)
self.folderpb = gtksel.pixbuf_new_from_file_at_size(foldericon, 24, 24)
fileicon = os.path.join(icondir, 'file'+icon_ext)
self.filepb = gtksel.pixbuf_new_from_file_at_size(fileicon, 24, 24)
fitsicon = os.path.join(icondir, 'fits'+icon_ext)
self.fitspb = gtksel.pixbuf_new_from_file_at_size(fitsicon, 24, 24)
def build_gui(self, container):
rvbox = gtk.VBox()
sw = gtk.ScrolledWindow()
sw.set_border_width(2)
sw.set_policy(gtk.POLICY_AUTOMATIC,
gtk.POLICY_AUTOMATIC)
# create the TreeView
self.treeview = gtk.TreeView()
# create the TreeViewColumns to display the data
self.tvcolumn = [None] * len(self.columns)
cellpb = gtk.CellRendererPixbuf()
cellpb.set_padding(2, 0)
header, kwd = self.columns[0]
tvc = gtk.TreeViewColumn(header, cellpb)
tvc.set_resizable(True)
tvc.connect('clicked', self.sort_cb, 0)
tvc.set_clickable(True)
self.tvcolumn[0] = tvc
self.tvcolumn[0].set_cell_data_func(cellpb, self.file_pixbuf)
cell = gtk.CellRendererText()
cell.set_padding(2, 0)
self.tvcolumn[0].pack_start(cell, False)
self.tvcolumn[0].set_cell_data_func(cell, self.file_name)
self.treeview.append_column(self.tvcolumn[0])
for n in range(1, len(self.columns)):
cell = gtk.CellRendererText()
cell.set_padding(2, 0)
header, kwd = self.columns[n]
tvc = gtk.TreeViewColumn(header, cell)
tvc.set_resizable(True)
tvc.connect('clicked', self.sort_cb, n)
tvc.set_clickable(True)
self.tvcolumn[n] = tvc
if n == 1:
cell.set_property('xalign', 1.0)
self.tvcolumn[n].set_cell_data_func(cell, self.cell_data_funcs[n])
self.treeview.append_column(self.tvcolumn[n])
sw.add(self.treeview)
self.treeview.connect('row-activated', self.open_file)
rvbox.pack_start(sw, fill=True, expand=True)
self.entry = gtk.Entry()
rvbox.pack_start(self.entry, fill=True, expand=False)
self.entry.connect('activate', self.browse_cb)
btns = gtk.HButtonBox()
btns.set_layout(gtk.BUTTONBOX_START)
btns.set_spacing(3)
btn = gtk.Button("Close")
btn.connect('clicked', lambda w: self.close())
btns.add(btn)
btn = gtk.Button("Refresh")
btn.connect('clicked', lambda w: self.refresh())
btns.add(btn)
btn = gtk.Button("Make Thumbs")
btn.connect('clicked', lambda w: self.make_thumbs())
btns.add(btn)
rvbox.pack_start(btns, padding=4, fill=True, expand=False)
container.pack_start(rvbox, padding=0, fill=True, expand=True)
def sort_cb(self, column, idx):
treeview = column.get_tree_view()
model = treeview.get_model()
model.set_sort_column_id(idx, gtk.SORT_ASCENDING)
fn = self.cell_sort_funcs[idx]
model.set_sort_func(idx, fn)
return True
def close(self):
chname = self.fv.get_channelName(self.fitsimage)
self.fv.stop_operation_channel(chname, str(self))
return True
def _mksrtfnN(self, key):
def fn(model, iter1, iter2):
bnch1 = model.get_value(iter1, 0)
bnch2 = model.get_value(iter2, 0)
val1, val2 = bnch1[key], bnch2[key]
if isinstance(val1, str):
val1 = val1.lower()
val2 = val2.lower()
res = cmp(val1, val2)
return res
return fn
def file_pixbuf(self, *args):
column, cell, model, iter = args[:4]
bnch = model.get_value(iter, 0)
if bnch.type == 'dir':
pb = self.folderpb
elif bnch.type == 'fits':
pb = self.fitspb
else:
pb = self.filepb
cell.set_property('pixbuf', pb)
def file_name(self, *args):
column, cell, model, iter = args[:4]
bnch = model.get_value(iter, 0)
cell.set_property('text', bnch.name)
def file_size(self, *args):
column, cell, model, iter = args[:4]
bnch = model.get_value(iter, 0)
cell.set_property('text', str(bnch.st_size))
def file_mode(self, *args):
column, cell, model, iter = args[:4]
bnch = model.get_value(iter, 0)
cell.set_property('text', oct(stat.S_IMODE(bnch.st_mode)))
def file_last_changed(self, *args):
column, cell, model, iter = args[:4]
bnch = model.get_value(iter, 0)
cell.set_property('text', time.ctime(bnch.st_mtime))
def open_file(self, treeview, path, column):
model = treeview.get_model()
iter = model.get_iter(path)
bnch = model.get_value(iter, 0)
path = bnch.path
self.logger.debug("path: %s" % (path))
if path == '..':
curdir, curglob = os.path.split(self.curpath)
path = os.path.join(curdir, path, curglob)
if os.path.isdir(path):
path = os.path.join(path, '*')
self.browse(path)
elif os.path.exists(path):
self.fv.load_file(path)
else:
self.browse(path)
def get_info(self, path):
dirname, filename = os.path.split(path)
name, ext = os.path.splitext(filename)
ftype = 'file'
if os.path.isdir(path):
ftype = 'dir'
elif os.path.islink(path):
ftype = 'link'
elif ext.lower() == '.fits':
ftype = 'fits'
filestat = os.stat(path)
bnch = Bunch.Bunch(path=path, name=filename, type=ftype,
st_mode=filestat.st_mode, st_size=filestat.st_size,
st_mtime=filestat.st_mtime)
return bnch
def browse(self, path):
self.logger.debug("path: %s" % (path))
if os.path.isdir(path):
dirname = path
globname = None
else:
dirname, globname = os.path.split(path)
dirname = os.path.abspath(dirname)
if not globname:
globname = '*'
path = os.path.join(dirname, globname)
# Make a directory listing
self.logger.debug("globbing path: %s" % (path))
filelist = glob.glob(path)
filelist.sort(key=str.lower)
filelist.insert(0, os.path.join(dirname, '..'))
self.jumpinfo = map(self.get_info, filelist)
self.curpath = path
self.entry.set_text(path)
if self.do_scanfits:
self.scan_fits()
self.makelisting()
def makelisting(self):
listmodel = gtk.ListStore(object)
for bnch in self.jumpinfo:
listmodel.append([bnch])
self.treeview.set_fixed_height_mode(False)
self.treeview.set_model(listmodel)
# Hack to get around slow TreeView scrolling with large lists
self.treeview.set_fixed_height_mode(True)
def scan_fits(self):
for bnch in self.jumpinfo:
if not bnch.type == 'fits':
continue
if not bnch.has_key('kwds'):
try:
in_f = AstroImage.pyfits.open(bnch.path, 'readonly')
try:
kwds = {}
for kwd in self.keywords:
kwds[kwd] = in_f[0].header.get(kwd, 'N/A')
bnch.kwds = kwds
finally:
in_f.close()
except Exception, e:
continue
def refresh(self):
self.browse(self.curpath)
def scan_headers(self):
self.browse(self.curpath)
def browse_cb(self, w):
path = w.get_text().strip()
self.browse(path)
def make_thumbs(self):
path = self.curpath
self.logger.info("Generating thumbnails for '%s'..." % (
path))
filelist = glob.glob(path)
filelist.sort(key=str.lower)
# find out our channel
chname = self.fv.get_channelName(self.fitsimage)
# Invoke the method in this channel's Thumbs plugin
# TODO: don't expose gpmon!
rsobj = self.fv.gpmon.getPlugin('Thumbs')
self.fv.nongui_do(rsobj.make_thumbs, chname, filelist)
def start(self):
self.win = None
self.browse(self.curpath)
def pause(self):
pass
def resume(self):
pass
def stop(self):
pass
def redo(self):
return True
def __str__(self):
return 'fbrowser'
#END
|
var extend = require('raptor-util/extend');
var expect = require('chai').expect;
exports.templateData = {
outer: function(callback) {
setTimeout(function() {
callback(null, {});
}, 400);
},
inner1: function(callback) {
setTimeout(function() {
callback(null, {});
}, 500);
},
inner2: function(callback) {
setTimeout(function() {
callback(null, {});
}, 600);
}
};
exports.checkEvents = function(events, helpers) {
events = events.map(function(eventInfo) {
var arg = extend({}, eventInfo.arg);
expect(arg.out != null).to.equal(true);
delete arg.out; // Not serializable
delete arg.asyncValue; // Not serializable
return {
event: eventInfo.event,
arg: arg
};
});
helpers.compare(events, '-events.json');
}; |
$(document).ready( function() {
/* global code */
// -------------- FILTER FORM CODE ------------------
// Submit filter form when enter is pressed
$('.input-qv-cell-search',active_part).unbind('keypress').keypress( function(e) {
if(e.which == 13) {
$(this).blur();
$('#hid_page_number',active_part).val( 1 );
ajax_submit_filter();
}
});
// Submit filter form when rows per page is changed
$('select#rows_per_page',active_part).unbind('change').change( function() {
$('#hid_rows_per_page',active_part).val( $(this).val() );
$('#hid_page_number',active_part).val( 1 );
ajax_submit_filter();
});
// Submit filter form when page number is pressed
$('input#txt_page_number',active_part).unbind('keypress').keypress(function(e) {
$(this).val( $(this).val().formatInteger() );
if(e.which == 13) {
$(this).blur();
ajax_submit_filter();
}
}).unbind('change').change( function() {
if ($(this).val()*1 > $('#hid_total_pages',active_part).val()*1 ) $(this).val( $('#hid_total_pages',active_part).val() );
$('#hid_page_number',active_part).val( $(this).val() );
ajax_submit_filter();
});
// -------------- QUICKVIEW TABLE STUFF -----------------
$(".qv-table input[type=checkbox]",active_part).unbind('change').change( function() {
$index = $(this).parent().index();
$qv_table = $(this).closest('.qv-table');
$chk_all = $('#chk_sel_all',$qv_table);
$all_checks = $("input[type=checkbox]",$qv_table);
if ($index == 0) { // the select/deselect all checkbox was clicked
$all_checks.prop('checked', $(this).prop('checked') );
}
else { // a different checkbox was clicked.
$num_checked = $("input:gt(0):checked",$qv_table).length;
$num_unchecked = $("input:gt(0):not(:checked)",$qv_table).length;
if($num_checked == 0) { $chk_all.prop('checked',false); $chk_all.prop('indeterminate',false); }
if($num_unchecked == 0) { $chk_all.prop('checked',true); $chk_all.prop('indeterminate',false); }
if($num_checked > 0 && $num_unchecked > 0 ) { $chk_all.prop('indeterminate',true); }
}
});
$('#content-header-bar ul li').unbind('click').click( function() {
$(this).parent().find('li.active').removeClass('active');
$(this).addClass('active');
$index = $(this).index();
$('#main .main-content.active .content-body .part').removeClass('active').eq($index).addClass('active');
Tabs.activeTab.subtab = $index;
Tabs.activeTab.refreshBindings();
//Tabs.activeTab.refreshTab();
});
$('.qv-table .qv-col .qv-cell').mouseover( function() {
$table = $(this).closest('.qv-table');
$index = $(this).index();
if( $index > 1 ) {
$('.qv-col',$table).each( function(i,elm) {
$('.qv-cell',elm).eq($index).addClass('highlight')
});
}
}).mouseout( function() {
$table = $(this).closest('.qv-table');
$index = $(this).index();
if( $index > 1 ) {
$('.qv-col',$table).each( function(i,elm) {
$('.qv-cell',elm).eq($index).removeClass('highlight');
});
}
})
$('.qv-a',active_part).unbind('click').click( function() {
var $qvtable = $(this).closest('.qv-table');
var friendlytable = $qvtable.attr('name'); //friendly table name
var friendlyrecord = $(this).html();
var table_cid = $(this).attr('rel');
Tabs[table_cid] = new Tab('editor');
Tabs[table_cid].newTab(table_cid,friendlytable + ' . ' + friendlyrecord);
});
$('.input_text',active_part).unbind('keypress').keypress(function(e) {
if(e.which == 13) {
$(this).blur();
ajax_submit_filter();
}
});
$('.sb',active_part).focus(function() {
if ($(this).val() == 'Search Records...') {
$(this).val('');
}
}).blur(function() {
if ($(this).val() == '') {
$(this).val('Search Records...');
}
});
$('.easyui-linkbutton').linkbutton({plain:true});
$('.easyui-splitbutton').splitbutton({plain:true});
$('.easyui-menubutton').menubutton({plain:true});
$("input[type=text],input[type=password],input[type=textarea]").addClass('ui-state-default').addClass('ui-corner-all');
$("select.editor-element").addClass('ui-state-default').addClass('ui-corner-left');
$('.jquery-singleselect',active_part).multiselect({
multiple: false,
header: false,
selectedList: 1
});
$('.jquery-multiselect',active_part).multiselect({
selectedList: 2,
multiple: true,
checkAllText : 'all',
uncheckAllText : 'all',
}).multiselectfilter();
// Tooltip function
$('[tt]').unbind('mouseenter');
$('[tt]').unbind('mouseleave');
$('[tt]').mouseenter( function() { // status bar message
status_timeout = setTimeout("noty_status('"+$(this).attr('tt')+"')",1000);
//noty_status( $(this).attr('tt') );
}).mouseleave( function() {
clearTimeout(status_timeout);
//$.noty.closeAll();
});
$("input[type=text],input[type=password],input[type=textarea],select.editor-element",active_part).hover(function(){
$(this).addClass("ui-state-hover");
},function(){
$(this).removeClass("ui-state-hover");
});
$('.easyui-linkbutton.disabled',active_part).addClass('l-btn-disabled');
$("#lb-first:not('.disabled')",active_part).unbind('click').click( function() {
$('input#txt_page_number',active_part).val( 1 ).trigger('change');
});
$("#lb-prev:not('.disabled')",active_part).unbind('click').click( function() {
$('input#txt_page_number',active_part).val( $('input#txt_page_number',active_part).val()*1-1 ).trigger('change');
});
$("#lb-next:not('.disabled')",active_part).unbind('click').click( function() {
$('input#txt_page_number',active_part).val( $('input#txt_page_number',active_part).val()*1+1 ).trigger('change');
});
$("#lb-last:not('.disabled')",active_part).unbind('click').click( function() {
$('input#txt_page_number',active_part).val( $('#hid_total_pages',active_part).val() ).trigger('change');
});
$('a.table_heading',active_part).unbind('click').click( function() {
$col = $(this).attr('rel');
$dir = $(this).attr('iconcls');
$new_dir = ($col == $('#hid_prev_order',active_part).val() && $dir == 'icon-asc') ? 'DESC' : 'ASC';
$('#hid_order',active_part).val( $col );
$('#hid_dir',active_part).val( $new_dir );
ajax_submit_filter();
});
$('fieldset').addClass('ui-corner-all');
// Validation stuff
$("[validType='Phone Number']").unbind('keyup').keyup( function() {
$(this).val( formatPhone( $(this).val() ) );
});
$("[validType='Zip Code']").unbind('keyup').keyup( function() {
$(this).val( formatZip( $(this).val() ) );
});
$("[validType='US State']").unbind('keyup').keyup( function() {
$(this).val( formatUC( $(this).val() ) );
});
$("[validType='number']").unbind('keyup').keyup( function() {
$(this).val( formatNumber( $(this).val() ) );
});
$("[validType='integer']").unbind('keyup').keyup( function() {
$(this).val( formatInteger( $(this).val() ) );
});
}); |
// Copyright 2006 The Closure Library Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS-IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
/**
* @fileoverview Definition of the DebugWindow class. Please minimize
* dependencies this file has on other closure classes as any dependency it
* takes won't be able to use the logging infrastructure.
*
*/
goog.provide('goog.debug.DebugWindow');
goog.require('goog.debug.HtmlFormatter');
goog.require('goog.debug.LogManager');
goog.require('goog.structs.CircularBuffer');
goog.require('goog.userAgent');
/**
* Provides a debug DebugWindow that is bound to the goog.debug.Logger.
* It handles log messages and writes them to the DebugWindow. This doesn't
* provide a lot of functionality that the old Gmail logging infrastructure
* provided like saving debug logs for exporting to the server. Now that we
* have an event-based logging infrastructure, we can encapsulate that
* functionality in a separate class.
*
* @constructor
* @param {string=} opt_identifier Identifier for this logging class.
* @param {string=} opt_prefix Prefix prepended to messages.
*/
goog.debug.DebugWindow = function(opt_identifier, opt_prefix) {
/**
* Identifier for this logging class
* @type {string}
* @protected
* @suppress {underscore}
*/
this.identifier_ = opt_identifier || '';
/**
* Optional prefix to be prepended to error strings
* @type {string}
* @private
*/
this.prefix_ = opt_prefix || '';
/**
* Array used to buffer log output
* @type {Array}
* @protected
* @suppress {underscore}
*/
this.outputBuffer_ = [];
/**
* Buffer for saving the last 1000 messages
* @type {goog.structs.CircularBuffer}
* @private
*/
this.savedMessages_ =
new goog.structs.CircularBuffer(goog.debug.DebugWindow.MAX_SAVED);
/**
* Save the publish handler so it can be removed
* @type {Function}
* @private
*/
this.publishHandler_ = goog.bind(this.addLogRecord, this);
/**
* Formatter for formatted output
* @type {goog.debug.Formatter}
* @private
*/
this.formatter_ = new goog.debug.HtmlFormatter(this.prefix_);
/**
* Loggers that we shouldn't output
* @type {Object}
* @private
*/
this.filteredLoggers_ = {};
// enable by default
this.setCapturing(true);
/**
* Whether we are currently enabled. When the DebugWindow is enabled, it tries
* to keep its window open. When it's disabled, it can still be capturing log
* output if, but it won't try to write them to the DebugWindow window until
* it's enabled.
* @type {boolean}
* @private
*/
this.enabled_ = goog.debug.DebugWindow.isEnabled(this.identifier_);
// timer to save the DebugWindow's window position in a cookie
goog.global.setInterval(goog.bind(this.saveWindowPositionSize_, this), 7500);
};
/**
* Max number of messages to be saved
* @type {number}
*/
goog.debug.DebugWindow.MAX_SAVED = 500;
/**
* How long to keep the cookies for in milliseconds
* @type {number}
*/
goog.debug.DebugWindow.COOKIE_TIME = 30 * 24 * 60 * 60 * 1000; // 30-days
/**
* HTML string printed when the debug window opens
* @type {string}
* @protected
*/
goog.debug.DebugWindow.prototype.welcomeMessage = 'LOGGING';
/**
* Whether to force enable the window on a severe log.
* @type {boolean}
* @private
*/
goog.debug.DebugWindow.prototype.enableOnSevere_ = false;
/**
* Reference to debug window
* @type {Window}
* @protected
* @suppress {underscore}
*/
goog.debug.DebugWindow.prototype.win_ = null;
/**
* In the process of opening the window
* @type {boolean}
* @private
*/
goog.debug.DebugWindow.prototype.winOpening_ = false;
/**
* Whether we are currently capturing logger output.
*
* @type {boolean}
* @private
*/
goog.debug.DebugWindow.prototype.isCapturing_ = false;
/**
* Whether we already showed an alert that the DebugWindow was blocked.
* @type {boolean}
* @private
*/
goog.debug.DebugWindow.showedBlockedAlert_ = false;
/**
* Reference to timeout used to buffer the output stream.
* @type {?number}
* @private
*/
goog.debug.DebugWindow.prototype.bufferTimeout_ = null;
/**
* Timestamp for the last time the log was written to.
* @type {number}
* @protected
* @suppress {underscore}
*/
goog.debug.DebugWindow.prototype.lastCall_ = goog.now();
/**
* Sets the welcome message shown when the window is first opened or reset.
*
* @param {string} msg An HTML string.
*/
goog.debug.DebugWindow.prototype.setWelcomeMessage = function(msg) {
this.welcomeMessage = msg;
};
/**
* Initializes the debug window.
*/
goog.debug.DebugWindow.prototype.init = function() {
if (this.enabled_) {
this.openWindow_();
}
};
/**
* Whether the DebugWindow is enabled. When the DebugWindow is enabled, it
* tries to keep its window open and logs all messages to the window. When the
* DebugWindow is disabled, it stops logging messages to its window.
*
* @return {boolean} Whether the DebugWindow is enabled.
*/
goog.debug.DebugWindow.prototype.isEnabled = function() {
return this.enabled_;
};
/**
* Sets whether the DebugWindow is enabled. When the DebugWindow is enabled, it
* tries to keep its window open and log all messages to the window. When the
* DebugWindow is disabled, it stops logging messages to its window. The
* DebugWindow also saves this state to a cookie so that it's persisted across
* application refreshes.
* @param {boolean} enable Whether the DebugWindow is enabled.
*/
goog.debug.DebugWindow.prototype.setEnabled = function(enable) {
this.enabled_ = enable;
if (this.enabled_) {
this.openWindow_();
if (this.win_) {
this.writeInitialDocument_();
}
}
this.setCookie_('enabled', enable ? '1' : '0');
};
/**
* Sets whether the debug window should be force enabled when a severe log is
* encountered.
* @param {boolean} enableOnSevere Whether to enable on severe logs..
*/
goog.debug.DebugWindow.prototype.setForceEnableOnSevere =
function(enableOnSevere) {
this.enableOnSevere_ = enableOnSevere;
};
/**
* Whether we are currently capturing logger output.
* @return {boolean} whether we are currently capturing logger output.
*/
goog.debug.DebugWindow.prototype.isCapturing = function() {
return this.isCapturing_;
};
/**
* Sets whether we are currently capturing logger output.
* @param {boolean} capturing Whether to capture logger output.
*/
goog.debug.DebugWindow.prototype.setCapturing = function(capturing) {
if (capturing == this.isCapturing_) {
return;
}
this.isCapturing_ = capturing;
// attach or detach handler from the root logger
var rootLogger = goog.debug.LogManager.getRoot();
if (capturing) {
rootLogger.addHandler(this.publishHandler_);
} else {
rootLogger.removeHandler(this.publishHandler_);
}
};
/**
* Gets the formatter for outputting to the debug window. The default formatter
* is an instance of goog.debug.HtmlFormatter
* @return {goog.debug.Formatter} The formatter in use.
*/
goog.debug.DebugWindow.prototype.getFormatter = function() {
return this.formatter_;
};
/**
* Sets the formatter for outputting to the debug window.
* @param {goog.debug.Formatter} formatter The formatter to use.
*/
goog.debug.DebugWindow.prototype.setFormatter = function(formatter) {
this.formatter_ = formatter;
};
/**
* Adds a separator to the debug window.
*/
goog.debug.DebugWindow.prototype.addSeparator = function() {
this.write_('<hr>');
};
/**
* @return {boolean} Whether there is an active window.
*/
goog.debug.DebugWindow.prototype.hasActiveWindow = function() {
return !!this.win_ && !this.win_.closed;
};
/**
* Clears the contents of the debug window
* @protected
* @suppress {underscore}
*/
goog.debug.DebugWindow.prototype.clear_ = function() {
this.savedMessages_.clear();
if (this.hasActiveWindow()) {
this.writeInitialDocument_();
}
};
/**
* Adds a log record.
* @param {goog.debug.LogRecord} logRecord the LogRecord.
*/
goog.debug.DebugWindow.prototype.addLogRecord = function(logRecord) {
if (this.filteredLoggers_[logRecord.getLoggerName()]) {
return;
}
var html = this.formatter_.formatRecord(logRecord);
this.write_(html);
if (this.enableOnSevere_ &&
logRecord.getLevel().value >= goog.debug.Logger.Level.SEVERE.value) {
this.setEnabled(true);
}
};
/**
* Writes a message to the log, possibly opening up the window if it's enabled,
* or saving it if it's disabled.
* @param {string} html The HTML to write.
* @private
*/
goog.debug.DebugWindow.prototype.write_ = function(html) {
// If the logger is enabled, open window and write html message to log
// otherwise save it
if (this.enabled_) {
this.openWindow_();
this.savedMessages_.add(html);
this.writeToLog_(html);
} else {
this.savedMessages_.add(html);
}
};
/**
* Write to the buffer. If a message hasn't been sent for more than 750ms just
* write, otherwise delay for a minimum of 250ms.
* @param {string} html HTML to post to the log.
* @private
*/
goog.debug.DebugWindow.prototype.writeToLog_ = function(html) {
this.outputBuffer_.push(html);
goog.global.clearTimeout(this.bufferTimeout_);
if (goog.now() - this.lastCall_ > 750) {
this.writeBufferToLog_();
} else {
this.bufferTimeout_ =
goog.global.setTimeout(goog.bind(this.writeBufferToLog_, this), 250);
}
};
/**
* Write to the log and maybe scroll into view
* @protected
* @suppress {underscore}
*/
goog.debug.DebugWindow.prototype.writeBufferToLog_ = function() {
this.lastCall_ = goog.now();
if (this.hasActiveWindow()) {
var body = this.win_.document.body;
var scroll = body &&
body.scrollHeight - (body.scrollTop + body.clientHeight) <= 100;
this.win_.document.write(this.outputBuffer_.join(''));
this.outputBuffer_.length = 0;
if (scroll) {
this.win_.scrollTo(0, 1000000);
}
}
};
/**
* Writes all saved messages to the DebugWindow.
* @protected
* @suppress {underscore}
*/
goog.debug.DebugWindow.prototype.writeSavedMessages_ = function() {
var messages = this.savedMessages_.getValues();
for (var i = 0; i < messages.length; i++) {
this.writeToLog_(messages[i]);
}
};
/**
* Opens the debug window if it is not already referenced
* @private
*/
goog.debug.DebugWindow.prototype.openWindow_ = function() {
if (this.hasActiveWindow() || this.winOpening_) {
return;
}
var winpos = this.getCookie_('dbg', '0,0,800,500').split(',');
var x = Number(winpos[0]);
var y = Number(winpos[1]);
var w = Number(winpos[2]);
var h = Number(winpos[3]);
this.winOpening_ = true;
this.win_ = window.open('', this.getWindowName_(), 'width=' + w +
',height=' + h + ',toolbar=no,resizable=yes,' +
'scrollbars=yes,left=' + x + ',top=' + y +
',status=no,screenx=' + x + ',screeny=' + y);
if (!this.win_) {
if (!this.showedBlockedAlert_) {
// only show this once
alert('Logger popup was blocked');
this.showedBlockedAlert_ = true;
}
}
this.winOpening_ = false;
if (this.win_) {
this.writeInitialDocument_();
}
};
/**
* Gets a valid window name for the debug window. Replaces invalid characters in
* IE.
* @return {string} Valid window name.
* @private
*/
goog.debug.DebugWindow.prototype.getWindowName_ = function() {
return goog.userAgent.IE ?
this.identifier_.replace(/[\s\-\.\,]/g, '_') : this.identifier_;
};
/**
* @return {string} The style rule text, for inclusion in the initial HTML.
*/
goog.debug.DebugWindow.prototype.getStyleRules = function() {
return '*{font:normal 14px monospace;}' +
'.dbg-sev{color:#F00}' +
'.dbg-w{color:#E92}' +
'.dbg-sh{background-color:#fd4;font-weight:bold;color:#000}' +
'.dbg-i{color:#666}' +
'.dbg-f{color:#999}' +
'.dbg-ev{color:#0A0}' +
'.dbg-m{color:#990}';
};
/**
* Writes the initial HTML of the debug window
* @protected
* @suppress {underscore}
*/
goog.debug.DebugWindow.prototype.writeInitialDocument_ = function() {
if (this.hasActiveWindow()) {
return;
}
this.win_.document.open();
var html = '<style>' + this.getStyleRules() + '</style>' +
'<hr><div class="dbg-ev" style="text-align:center">' +
this.welcomeMessage + '<br><small>Logger: ' +
this.identifier_ + '</small></div><hr>';
this.writeToLog_(html);
this.writeSavedMessages_();
};
/**
* Save persistent data (using cookies) for 1 month (cookie specific to this
* logger object)
* @param {string} key Data name.
* @param {string} value Data value.
* @private
*/
goog.debug.DebugWindow.prototype.setCookie_ = function(key, value) {
key += this.identifier_;
document.cookie = key + '=' + encodeURIComponent(value) +
';path=/;expires=' +
(new Date(goog.now() + goog.debug.DebugWindow.COOKIE_TIME)).toUTCString();
};
/**
* Retrieve data (using cookies).
* @param {string} key Data name.
* @param {string=} opt_default Optional default value if cookie doesn't exist.
* @return {string} Cookie value.
* @private
*/
goog.debug.DebugWindow.prototype.getCookie_ = function(key, opt_default) {
return goog.debug.DebugWindow.getCookieValue_(
this.identifier_, key, opt_default);
};
/**
* Retrieve data (using cookies).
* @param {string} identifier Identifier for logging class.
* @param {string} key Data name.
* @param {string=} opt_default Optional default value if cookie doesn't exist.
* @return {string} Cookie value.
* @private
*/
goog.debug.DebugWindow.getCookieValue_ = function(
identifier, key, opt_default) {
var fullKey = key + identifier;
var cookie = String(document.cookie);
var start = cookie.indexOf(fullKey + '=');
if (start != -1) {
var end = cookie.indexOf(';', start);
return decodeURIComponent(cookie.substring(start + fullKey.length + 1,
end == -1 ? cookie.length : end));
} else {
return opt_default || '';
}
};
/**
* @param {string} identifier Identifier for logging class.
* @return {boolean} Whether the DebugWindow is enabled.
*/
goog.debug.DebugWindow.isEnabled = function(identifier) {
return goog.debug.DebugWindow.getCookieValue_(identifier, 'enabled') == '1';
};
/**
* Saves the window position size to a cookie
* @private
*/
goog.debug.DebugWindow.prototype.saveWindowPositionSize_ = function() {
if (!this.hasActiveWindow()) {
return;
}
var x = this.win_.screenX || this.win_.screenLeft || 0;
var y = this.win_.screenY || this.win_.screenTop || 0;
var w = this.win_.outerWidth || 800;
var h = this.win_.outerHeight || 500;
this.setCookie_('dbg', x + ',' + y + ',' + w + ',' + h);
};
/**
* Adds a logger name to be filtered.
* @param {string} loggerName the logger name to add.
*/
goog.debug.DebugWindow.prototype.addFilter = function(loggerName) {
this.filteredLoggers_[loggerName] = 1;
};
/**
* Removes a logger name to be filtered.
* @param {string} loggerName the logger name to remove.
*/
goog.debug.DebugWindow.prototype.removeFilter = function(loggerName) {
delete this.filteredLoggers_[loggerName];
};
|
#!/usr/bin/env python
###############################################################################
# $Id$
#
# Project: GDAL/OGR Test Suite
# Purpose: Test functioning of the ProxyDB PAM metadata support
# Author: Even Rouault, <even dot rouault at mines dash paris dot org>
#
###############################################################################
# Copyright (c) 2011, Even Rouault <even dot rouault at mines-paris dot org>
#
# 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.
###############################################################################
import sys
import os
try:
os.putenv('CPL_SHOW_MEM_STATS', '')
except:
pass
# Must to be launched from pam.py/pam_11()
# Test creating a new proxydb
if len(sys.argv) == 2 and sys.argv[1] == '-test1':
from osgeo import gdal
import os
import shutil
try:
shutil.rmtree('tmppamproxydir')
except:
pass
os.mkdir('tmppamproxydir')
gdal.SetConfigOption('GDAL_PAM_PROXY_DIR', 'tmppamproxydir')
# Compute statistics. They should be saved in the .aux.xml in the proxyDB
ds = gdal.Open('tmpdirreadonly/byte.tif')
stats = ds.GetRasterBand(1).ComputeStatistics(False)
gdal.ErrorReset()
ds = None
error_msg = gdal.GetLastErrorMsg()
if error_msg != '':
print('did not expected error message')
sys.exit(1)
# Check that the .aux.xml in the proxyDB exists
filelist = gdal.ReadDir('tmppamproxydir')
if not '000000_tmpdirreadonly_byte.tif.aux.xml' in filelist:
print('did not get find 000000_tmpdirreadonly_byte.tif.aux.xml on filesystem')
sys.exit(1)
# Test altering a value to check that the file will be used
f = open('tmppamproxydir/000000_tmpdirreadonly_byte.tif.aux.xml', 'w')
f.write("""<PAMDataset>
<PAMRasterBand band="1">
<Metadata>
<MDI key="STATISTICS_MAXIMUM">255</MDI>
<MDI key="STATISTICS_MEAN">126.765</MDI>
<MDI key="STATISTICS_MINIMUM">-9999</MDI>
<MDI key="STATISTICS_STDDEV">22.928470838676</MDI>
</Metadata>
</PAMRasterBand>
</PAMDataset>""")
f.close()
ds = gdal.Open('tmpdirreadonly/byte.tif')
filelist = ds.GetFileList()
if len(filelist) != 2:
print('did not get find 000000_tmpdirreadonly_byte.tif.aux.xml in dataset GetFileList()')
print(filelist)
sys.exit(1)
stats = ds.GetRasterBand(1).GetStatistics(False, False)
if stats[0] != -9999:
print('did not get expected minimum')
sys.exit(1)
ds = None
# Check that proxy overviews work
ds = gdal.Open('tmpdirreadonly/byte.tif')
ds.BuildOverviews('NEAR', overviewlist = [2])
ds = None
filelist = gdal.ReadDir('tmppamproxydir')
if not '000001_tmpdirreadonly_byte.tif.ovr' in filelist:
print('did not get find 000001_tmpdirreadonly_byte.tif.ovr')
sys.exit(1)
ds = gdal.Open('tmpdirreadonly/byte.tif')
filelist = ds.GetFileList()
if len(filelist) != 3:
print('did not get find 000001_tmpdirreadonly_byte.tif.ovr in dataset GetFileList()')
print(filelist)
sys.exit(1)
nb_ovr = ds.GetRasterBand(1).GetOverviewCount()
ds = None
if nb_ovr != 1:
print('did not get expected overview count')
sys.exit(1)
print('success')
sys.exit(0)
# Must to be launched from pam.py/pam_11()
# Test loading an existing proxydb
if len(sys.argv) == 2 and sys.argv[1] == '-test2':
from osgeo import gdal
gdal.SetConfigOption('GDAL_PAM_PROXY_DIR', 'tmppamproxydir')
ds = gdal.Open('tmpdirreadonly/byte.tif')
filelist = ds.GetFileList()
if len(filelist) != 3:
print('did not get find 000000_tmpdirreadonly_byte.tif.aux.xml and/or 000001_tmpdirreadonly_byte.tif.ovr in dataset GetFileList()')
print(filelist)
sys.exit(1)
stats = ds.GetRasterBand(1).GetStatistics(False, False)
if stats[0] != -9999:
print('did not get expected minimum')
sys.exit(1)
nb_ovr = ds.GetRasterBand(1).GetOverviewCount()
ds = None
if nb_ovr != 1:
print('did not get expected overview count')
sys.exit(1)
print('success')
sys.exit(0)
|
"""Test single-instance lock timeout."""
import time
import pytest
from flask_celery.exceptions import OtherInstanceError
from flask_celery.lock_manager import LockManager
from .tasks import add, add2, add3, mul
@pytest.mark.parametrize('task,timeout', [
(mul, 20), (add, 300), (add2, 70),
(add3, 80)
])
def test_instances(task, timeout, celery_app, celery_worker):
"""Test task instances."""
manager_instance = list()
original_exit = LockManager.__exit__
def new_exit(self, *_):
manager_instance.append(self)
return original_exit(self, *_)
setattr(LockManager, '__exit__', new_exit)
task.apply_async(args=(4, 4)).get()
setattr(LockManager, '__exit__', original_exit)
assert timeout == manager_instance[0].timeout
@pytest.mark.parametrize('key,value', [('task_time_limit', 200), ('task_soft_time_limit', 100)])
def test_settings(key, value, celery_app, celery_worker):
"""Test different Celery time limit settings."""
celery_app.conf.update({key: value})
manager_instance = list()
original_exit = LockManager.__exit__
def new_exit(self, *_):
manager_instance.append(self)
return original_exit(self, *_)
setattr(LockManager, '__exit__', new_exit)
tasks = [
(mul, 20), (add, value), (add2, 70),
(add3, 80)
]
for task, timeout in tasks:
task.apply_async(args=(4, 4)).get()
assert manager_instance.pop().timeout == timeout
setattr(LockManager, '__exit__', original_exit)
celery_app.conf.update({key: None})
def test_expired(celery_app, celery_worker):
"""Test timeout expired task instances."""
celery_app.conf.update({'task_time_limit': 5})
manager_instance = list()
task = add
original_exit = LockManager.__exit__
def new_exit(self, *_):
manager_instance.append(self)
return None
setattr(LockManager, '__exit__', new_exit)
# Run the task and don't remove the lock after a successful run.
assert 8 == task.apply_async(args=(4, 4)).get()
setattr(LockManager, '__exit__', original_exit)
# Run again, lock is still active so this should fail.
with pytest.raises(OtherInstanceError):
task.apply_async(args=(4, 4)).get()
# Wait 5 seconds (per CELERYD_TASK_TIME_LIMIT), then re-run, should work.
time.sleep(5)
assert 8 == task.apply_async(args=(4, 4)).get()
celery_app.conf.update({'task_time_limit': None})
|
'use strict';
define(function () {
return function () {
return {
version : '0.1'
};
}
}); |
#!/usr/bin/python3
# -*- coding: utf-8 -*-
# This is a part of CMSeeK, check the LICENSE file for more information
# Copyright (c) 2018 - 2020 Tuhinshubhra
# This file contains all the methods of detecting cms via Source Code
# Version: 1.0.0
# Return a list with ['1'/'0','ID of CMS'/'na'] 1 = detected 0 = not detected 2 = No Sourcecode Provided
import re
import cmseekdb.basic as cmseek
def check(page_source_code, site): ## Check if no generator meta tag available
if page_source_code == "": ## No source code provided kinda shitty check but oh well
return ['2', 'na']
else: ## The real shit begins here
# hstring = s
# harray = s.split("\n") ### Array conversion can use if needed later
page_source_detection_keys = [
"/wp-content/||/wp-include/:-wp",
"/skin/frontend/||x-magento-init:-mg",
"https://www.blogger.com/static/:-blg",
"ic.pics.livejournal.com:-lj",
"END: 3dcart stats:-tdc",
"href=\"/apos-minified/:-apos",
"href=\"/CatalystStyles/:-abc",
"/misc/drupal.js:-dru",
"css/joomla.css:-joom",
"Powered By <a href=\"http://www.opencart.com\">OpenCart||\"catalog/view/javascript/jquery/swiper/css/opencart.css\"||index.php?route=:-oc",
"/xoops.js||xoops_redirect:-xoops",
"Wolf Default RSS Feed:-wolf",
"/ushahidi.js||alt=\"Ushahidi\":-ushahidi",
"getWebguiProperty:-wgui",
"title: \"TiddlyWiki\"||TiddlyWiki created by Jeremy Ruston,:-tidw",
"Running Squiz Matrix:-sqm",
"assets.spin-cdn.com:-spin",
"content=\"Solodev\" name=\"author\":-sdev",
"content=\"sNews:-snews",
"/api/sitecore/:-score",
"simsite/:-sim",
"simplebo.net/ ||\"pswp__:-spb",
"/silvatheme:-silva",
"serendipityQuickSearchTermField ||\"serendipity_||serendipity[:-spity",
"Published by Seamless.CMS.WebUI:-slcms",
"rock-config-trigger||rock-config-cancel-trigger:-rock",
"/rcms-f-production.:-rcms",
"CMS by Quick.Cms:-quick",
"\"pimcore_:-pcore",
"xmlns:perc||cm/css/perc_decoration.css:-percms",
"PencilBlueController||\"pencilblueApp\":-pblue",
"/libraries/ophal.js:-ophal",
"Sitefinity/WebsiteTemplates:-sfy",
"published by Open Text Web Solutions:-otwsm",
"/opencms/export/:-ocms",
"odoo.session_info||var odoo =:-odoo",
"_spBodyOnLoadWrapper||_spPageContextInfo||_spFormOnSubmitWrapper:-share",
"/storage/app/media/:-octcms",
"mura.min.css||/plugins/Mura:-mura",
"mt-content/||moto-website-style:-moto",
"mono_donottrack||monotracker.js ||_monoTracker:-mnet",
"Powered by MODX</a>:-modx",
"siteCMS:methode\"||\"contentOriginatingCMS=Methode\"||Methode tags version||/r/PortalConfig/common/assets/:-methd",
"var LIVESTREET_SECURITY_KEY:-lscms",
"/koken.js||data-koken-internal:-koken",
"jimdo_layout_css||var jimdoData||isJimdoMobileApp:-jimdo",
"<!-- you must provide a link to Indexhibit||\"Built with <a href=http://www.indexhibit.org/>Indexhibit\"||ndxz-studio/site||ndxzsite/:-ibit",
"<!-- webflow css -->||css/webflow.css||js/webflow.js:-wflow",
"css/jalios/core/||js/jalios/core/||jalios:ready:-jcms",
"ip_themes/||ip_libs/||ip_cms/:-impage",
"/css_js_cache/hotaru_css||hotaruFooterImg||/css_js_cache/hotaru_js:-hotaru",
"binaries/content/gallery/:-hippo",
"PHP-Nuke Copyright ©||PHP-Nuke theme by:-phpn",
"FlexCMP - CMS per Siti Accessibili||/flex/TemplatesUSR/||FlexCMP - Digital Experience Platform (DXP):-flex",
"copyright\" content=\"eZ Systems\"||ezcontentnavigationpart||ezinfo/copyright:-ezpu",
"e107_files/e107.js||e107_themes/||e107_plugins/:-e107",
"<!-- DNN Platform|| by DNN Corporation -->||DNNROBOTS||js/dnncore.js?||dnn_ContentPane||js/dnn.js?:-dnn",
"phpBBstyle||phpBBMobileStyle||style_cookie_settings:-phpbb",
"dede_fields||dede_fieldshash||DedeAjax||DedeXHTTP||include/dedeajax2.js||css/dedecms.css:-dede",
"/Orchard.jQuery/||orchard.themes||orchard-layouts-root:-orchd",
"modules/contentbox/themes/:-cbox",
"data-contentful||.contentful.com/||.ctfassets.net/:-conful",
"Contensis.current||ContensisSubmitFromTextbox||ContensisTextOnly:-contensis",
"system/cron/cron.txt:-contao",
"/burningBoard.css||wcf/style/:-bboard",
"/concrete/images||/concrete/css||/concrete/js:-con5",
"discourse_theme_id||discourse_current_homepage:-discrs",
"discuz_uid||discuz_tips||content=\"Discuz! Team and Comsenz UI Team\":-discuz",
"flarum-loading||flarum/app:-flarum",
"/* IP.Board||js/ipb.js||js/ipb.lang.js:-ipb",
"ips_usernameand ips_password:-ipb",
"bb_default_style.css||name=\"URL\" content=\"http://www.minibb.net/\":-minibb",
"var MyBBEditor:-mybb",
"/assets/nodebb.min.js||/plugins/nodebb-:-nodebb",
"PUNBB.env||typeof PUNBB ===:-punbb",
"Powered by SMF:-smf",
"vanilla_discussions_index||vanilla_categories_index:-vanilla",
"Forum software by XenForo™||<html id=\"XenForo\"||css.php?css=xenforo:-xf",
"<!-- Powered by XMB||<!-- The XMB Group -->||Powered by XMB:-xmb",
"yabbfiles/:-yabb",
"Powered By AEF:-aef",
"Powered by: FUDforum:-fudf",
"<div id=\"phorum\">:-phorum",
"\"YafHead:-yaf",
"<!-- NoNonsense Forum:-nnf",
"/mvnplugin/mvnforum/:-mvnf",
"aspnetforum.css\"||_AspNetForumContentPlaceHolder:-aspf",
"jforum/templates/:-jf",
"This OnlineStore is brought to you by ViA-Online GmbH Afterbuy.:-abuy",
'/arastta.js:-arstta',
'<script src=\'//bizweb.dktcdn.net:-bizw',
'cloudcart","title:-cloudc',
'framework/colormekit.css:-cmshop',
'<meta name="keywords" content="moodle:-mdle',
'<meta property="ajaris:baseURL"||<meta property="ajaris:language"||<meta property="ajaris:ptoken":-orkis',
'window.Comandia = JSON.parse||<script src="https://cdn.mycomandia.com/static/shop/common/js/functions.js"></script>:-cmdia',
'/bundles/elcodimetric/js/tracker.js:-elcd',
'de_epages.remotesearch.ui.suggest||require([[\'de_epages\':-epgs',
'href="https://www.fortune3.com/en/siterate/rate.css":-for3',
'<body class="gridlock shifter">::::<div class="shifter-page">:-btree',
'list-unstyled::::editable-zone:-pmoc',
'<!-- Demandware Analytics code||<!-- Demandware Apple Pay -->:-sfcc',
'icons__icons___XoCGh||styles__empty___3WCoC||icons__icon-phone___22Eum:-sazito',
'SHOPATRON-CRAWLER:-shopatron',
'Umbraco/||umbraco/:-umbraco',
'Sklep internetowy Shoper.pl:-shoper',
'//www.googletagmanager.com/ns.html?id=GTM-N2T2D3:-shopery',
'shopfa_license:-shopfa',
'/smjslib.js||/smartstore.core.js:-smartstore',
'_W.configDomain||Weebly.footer:-weebly',
'js/whmcs.js:-whmcs',
'OpenNeMaS CMS by Openhost||var u = "https://piwik.openhost.es/":-opennemas',
'zenid=||Congratulations! You have successfully installed your Zen Cart||Google Code for ZenCart Google||Powered by ZenCart||sideboxpzen-cart||stylesheet_zen_lightbox.css:-zencart',
'Redakční systém IPO||cdn.antee.cz/||ipo.min.js:-ipo'
]
for detection_key in page_source_detection_keys:
if ':-' in detection_key:
detection_array = detection_key.split(':-')
if '||' in detection_array[0]:
idkwhat = detection_array[0]
detection_strings = idkwhat.split('||')
for detection_string in detection_strings:
if detection_string in page_source_code and detection_array[1] not in cmseek.ignore_cms: # check if the cms_id is not in the ignore list
if cmseek.strict_cms == [] or detection_array[1] in cmseek.strict_cms:
return ['1', detection_array[1]]
elif '::::' in detection_array[0]:
# :::: is used when we want to check if both detection strings are present in the source code.
match_status = '0' # 0 = neutral, 1 = passed, 2 = failed
match_strings = detection_array[0].split('::::')
for match_string in match_strings:
if match_status == '0' or match_status == '1':
if match_string in page_source_code:
match_status = '1'
else:
match_status = '2'
else:
match_status = '2'
if match_status == '1' and detection_array[1] not in cmseek.ignore_cms:
if cmseek.strict_cms == [] or detection_array[1] in cmseek.strict_cms:
return ['1', detection_array[1]]
else:
if detection_array[0] in page_source_code and detection_array[1] not in cmseek.ignore_cms:
if cmseek.strict_cms == [] or detection_array[1] in cmseek.strict_cms:
return ['1', detection_array[1]]
####################################################
# REGEX DETECTIONS STARTS FROM HERE #
####################################################
page_source_detection_regex_keys = [
'(\'|")https\://afosto\-cdn(.*?)\.afosto\.com(.*?)(\'|"):-afsto',
'Powered by(.*?)JForum(.*?)\</a\>:-jf',
'Powered by(.*?)AspNetForum(.*?)(\</a\>|\</span\>):-aspf',
'Powered by(.*?)MercuryBoard(.*?)\</a\>:-mcb',
'Powered by(.*?)mwForum(.*?)Markus Wichitill:-mvnf',
'Powered by(.*?)mvnForum(.*?)\</a\>:-mvnf',
'Powered by myUPB(.*?)\</a\>:-myupb',
'\>Powered by UBB\.threads(.*?)\</a\>:-ubbt',
'Powered by(.*?)NoNonsense Forum\</a\>:-nnf',
'\>Powered by YAF\.NET(.*?)\</a\>:-yaf',
'aefonload(.*?)\</script\>:-aef',
'applications/vanilla/(.*?)\.js:-vanilla',
'var smf_(theme_url|images_url|scripturl) \=(.*?)\</script\>:-smf',
'Powered by(.*?)PunBB\</a\>:-punbb',
'Powered by(.*?)NodeBB\</a\>:-nodebb',
'(Powered By|href\="https\://www\.mybb\.com")(.*?)(MyBB|MyBB Group)\</a\>:-mybb',
'(powered by|http\://www\.miniBB\.net)(.*?)(miniBB|miniBB forum software):-minibb',
'Powered by(.*?)FluxBB:-fluxbb',
'invisioncommunity\.com(.*?)Powered by Invision Community:-ipb',
'ipb\.(vars|templates|lang)\[(.*?)=(.*?)\</script\>:-ipb',
'(a href\="http\://www\.woltlab\.com"|Forum Software|Forensoftware)(.*?)Burning Board(.*?)\</strong\>:-bboard',
'Discourse\.(.*?)\=(.*?)\</script\>:-dscrs',
'ping\.src \= node\.href(.*?)\</script\>:-arc',
'binaries/(.*?)/content/gallery/:-hippo',
'\.php\?m\=(.*?)&c\=(.*?)&a\=(.*?)&catid\=:-phpc',
'Powered by (.*?)phpBB:-phpbb',
'copyright(.*?)phpBB Group:-phpbb',
'Powered by(.*?)Cotonti:-coton',
'CCM_(.*?)(_|)(MODE|URL|PATH|FILENAME|REL|CID):-con5',
'\<link href\=(.*?)cdn(\d).bigcommerce\.com\/:-bigc',
'\<a href\=(.*?)main_bigware_(\d)\.php:-bigw',
'var Bizweb \=(.*?)\</script\>:-bizw',
'var clientexec \=(.*?)\</script\>||Powered by(.*?)http\://www\.clientexec\.com\?source\=poweredby(.*?)\</a\>:-cexec',
'\<meta name\=(.*?)author(.*?)CloudCart LLC(.*?)\>:-cloudc',
'var Colorme \=(.*?)\</script\>:-cmshop',
'https://cdn.mycomandia.com/uploads/comandia_(.*?)/r/(.*?)//js/(functions|main).js:-cmdia',
'<script(.*?)cosmoshop_functions.js(.*?)</script>:-cosmos',
'.cm-noscript(.*?)</script>:-csc',
'<link(.*?)cubecart.common.css(.*?)>:-cubec',
'<a href(.*?)http://www.almubda.net(.*?)Powered by Al Mubda(.*?)</a>:-abda',
'<!--(.*?)Dynamicweb Software(.*?)-->:-dweb',
'<script(.*?)eccube.js(.*?)</script>||<script(.*?)win_op.js(.*?)</script>||<script(.*?)cube.site.js(.*?)</script>:-ecc',
'<script(.*?)Tracker generator for elcodi bamboo store(.*?)</script>:-elcd',
'href=(.*?)/epages/(.*?).sf(.*?)</a>:-epgs',
'<script(.*?)/extension/iagutils/design/ezwebin/(.*?)</script>:-ezpub',
'Powered by(.*?)Fortune3</a>:-for3',
'Built on(.*?)bigtreecms.org(.*?)BigTree CMS:-btree',
'powered(.*?)opensolution.org(.*?)Sklep internetowy',
'href\=(.*?)on/demandware.static:-sfcc',
'href\=(.*?)mediacdn.shopatron.com||href\=(.*?)cdn.shptrn.com:-shopatron',
'href\=(.*?)rwd_shoper(|_1):-shoper',
'(cdn|font).shopery.com/:-shopery',
'href\=(.*?)cdn.shopfa.com/||href\=(.*?)cdnfa.com/:-shopfa',
'id=("|\')(shopify-digital-wallet|shopify-features)||href\=(.*?)cdn.shopify.com/:-shopify',
'href\=(.*?)cdn.myshoptet.com/||content="Shoptet.sk"||var shoptet=:-shoptet',
'css/smartstore.(core|theme|modules).css:-smartstore',
'src=(.*?)spree/(products|brands)||Spree.(api_key|routes|translations):-spree',
'meta name\=("|\')brightspot.(contentId|cached)||href=("|\')brightspotcdn:-brightspot',
'amiro_sys_(css|js).php:-amiro',
'weebly-(footer|icon):-weebly',
'/ekmps/(scripts|css|assets|images|shops|designs)||globalstats.ekmsecure.com/hits/stats(-global).js:-ekmps',
'sf_(wrapper|footer|banner|subnavigation|pagetitle):-godaddywb',
'onm-(new|image|carousel|big|cropped):-opennemas',
'ipo(pagetext|mainframe|footer|menuwrapper|copyright|header|main|menu|statistics):-ipo'
]
for detection_key in page_source_detection_regex_keys:
if ':-' in detection_key:
detection_array = detection_key.split(':-')
if '||' in detection_array[0]:
detection_regex_strings = detection_array[0].split('||')
for detection_regex_string in detection_regex_strings:
regex_match_status = re.search(detection_regex_string, page_source_code, re.DOTALL)
if regex_match_status != None and detection_array[1] not in cmseek.ignore_cms:
if cmseek.strict_cms == [] or detection_array[1] in cmseek.strict_cms:
return ['1', detection_array[1]]
else:
regex_match_status = re.search(detection_array[0], page_source_code, re.DOTALL)
if regex_match_status != None and detection_array[1] not in cmseek.ignore_cms:
if cmseek.strict_cms == [] or detection_array[1] in cmseek.strict_cms:
return ['1', detection_array[1]]
else:
# Failure
return ['0', 'na']
|
// a duplex stream is just a stream that is both readable and writable.
// Since JS doesn't have multiple prototypal inheritance, this class
// prototypally inherits from Readable, and then parasitically from
// Writable.
'use strict';
module.exports = Duplex;
const util = require('util');
const Readable = require('_stream_readable');
const Writable = require('_stream_writable');
util.inherits(Duplex, Readable);
var keys = Object.keys(Writable.prototype);
for (var v = 0; v < keys.length; v++) {
var method = keys[v];
if (!Duplex.prototype[method])
Duplex.prototype[method] = Writable.prototype[method];
}
function Duplex(options) {
if (!(this instanceof Duplex))
return new Duplex(options);
Readable.call(this, options);
Writable.call(this, options);
if (options && options.readable === false)
this.readable = false;
if (options && options.writable === false)
this.writable = false;
this.allowHalfOpen = true;
if (options && options.allowHalfOpen === false)
this.allowHalfOpen = false;
this.once('end', onend);
}
// the no-half-open enforcer
function onend() {
// if we allow half-open state, or if the writable side ended,
// then we're ok.
if (this.allowHalfOpen || this._writableState.ended)
return;
// no more data can be written.
// But allow more writes to happen in this tick.
process.nextTick(onEndNT, this);
}
function onEndNT(self) {
self.end();
}
|
// Copyright (c) 2014-2017, MyMonero.com
//
// 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.
//
// 3. Neither the name of the copyright holder nor the names of its contributors may be
// used to endorse or promote products derived from this software without specific
// prior written permission.
//
// 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.
//
"use strict"
//
const View = require('../../Views/View.web')
const EmojiPickerPopoverContentView = require('./EmojiPickerPopoverContentView.web')
//
class EmojiPickerPopoverView extends View
{
// Lifecycle - Init
constructor(options, context)
{
super(options, context)
//
const self = this
self.didPickEmoji_fn = options.didPickEmoji_fn || function(emoji) {}
self.setup()
}
setup()
{
const self = this
self.setup_views()
}
setup_views()
{
const self = this
const bg_w = self.Width()
const bg_h = self.Height()
{
const layer = self.layer
layer.style.position = "absolute"
layer.style.width = bg_w+"px"
layer.style.height = bg_h+"px"
layer.style.boxSizing = "border-box"
// using a whole image instead of css for this due to more complex styling
layer.style.backgroundImage = "url("+self.context.crossPlatform_appBundledIndexRelativeAssetsRootPath+"Emoji/Resources/[email protected])"
layer.style.backgroundPosition = "0px 0px"
layer.style.backgroundRepeat = "no-repeat"
layer.style.backgroundSize = `${bg_w}px ${bg_h}px`
layer.style.pointerEvents = "none" // otherwise the transparent part of the bg img interferes with clicking on the control, itself
}
{
const view = new EmojiPickerPopoverContentView({
didPickEmoji_fn: function(emoji)
{
self.value = emoji
self.didPickEmoji_fn(emoji)
}
}, self.context)
view.layer.style.pointerEvents = "all" // must offset self.layer.style.pointerEvents
self.emojiPickerPopoverContentView = view
self.addSubview(view)
}
}
// Lifecycle - Teardown
TearDown()
{
super.TearDown()
//
const self = this
}
// Accessors
Width()
{
return 341
}
Height()
{
return 264
}
// Runtime - Imperatives
SetPreVisibleSelectedEmoji(emoji)
{
const self = this
self.emojiPickerPopoverContentView.SetPreVisibleSelectedEmoji(emoji)
}
}
module.exports = EmojiPickerPopoverView |
import React from 'react';
import { Placeholder } from '@sitecore-jss/sitecore-jss-react';
import StyleguideSpecimen from '../Styleguide-Specimen';
/**
* Demonstrates how to reuse content within JSS. See /data/routes/styleguide/en.yml
* for the reused content definition sample. This component also demonstrates how to use
* the Placeholder component's render props API to wrap all components in the placeholder
* in a column tag (thus creating a horizontally laid out placeholder)
*/
const StyleguideLayoutReuse = (props) => (
<StyleguideSpecimen {...props}>
<div className="row">
{/*
This placeholder is using _render props_ to enable customizing the markup for each component within.
In this case, it's placing each component in its own column of a flexbox layout - giving an n-up columnar layout.
The component itself does not need to know it's living in a columnar layout.
There are three render props available:
renderEach - called once for each content component
Sitecore Experience Editor markup is automatically rendered in between content components when present
renderEmpty - called when the placeholder contains no content components. Can be used to wrap the Sitecore EE empty placeholder
markup in something that's visually correct, like here where we need to wrap it in a column div to make it selectable.
render - called once and passed _all_ components in the placeholder. Allows custom iteration. EE code markup must be accounted for.
Generally speaking stick to renderEach and renderEmpty unless doing something really custom.
*/}
<Placeholder
rendering={props.rendering}
name="jss-reuse-example"
renderEach={(component, index) => (
<div className="col-sm" key={index}>
{component}
</div>
)}
renderEmpty={(components) => <div className="col-sm">{components}</div>}
/>
</div>
</StyleguideSpecimen>
);
export default StyleguideLayoutReuse;
|
Nova.booting((Vue, router) => {
/** Shared */
Vue.component('r64-default-field', require('./components/DefaultField'))
Vue.component('r64-panel-item', require('./components/PanelItem'))
Vue.component('r64-excerpt', require('./components/Excerpt'))
/** Text & Number */
Vue.component(
'index-nova-fields-text',
require('./components/text/IndexField')
)
Vue.component(
'detail-nova-fields-text',
require('./components/text/DetailField')
)
Vue.component('form-nova-fields-text', require('./components/text/FormField'))
/** Computed */
Vue.component(
'index-nova-fields-computed',
require('./components/text/IndexField')
)
Vue.component(
'detail-nova-fields-computed',
require('./components/text/DetailField')
)
Vue.component(
'form-nova-fields-computed',
require('./components/computed/FormField')
)
/** Textarea */
Vue.component(
'index-nova-fields-textarea',
require('./components/text/IndexField')
)
Vue.component(
'detail-nova-fields-textarea',
require('./components/textarea/DetailField')
)
Vue.component(
'form-nova-fields-textarea',
require('./components/textarea/FormField')
)
/** Password */
Vue.component(
'index-nova-fields-password',
require('./components/password/IndexField')
)
Vue.component(
'detail-nova-fields-password',
require('./components/password/DetailField')
)
Vue.component(
'form-nova-fields-password',
require('./components/password/FormField')
)
/** Boolean */
Vue.component(
'index-nova-fields-boolean',
require('./components/boolean/IndexField')
)
Vue.component(
'detail-nova-fields-boolean',
require('./components/boolean/DetailField')
)
Vue.component(
'form-nova-fields-boolean',
require('./components/boolean/FormField')
)
/** Select */
Vue.component(
'index-nova-fields-select',
require('./components/text/IndexField')
)
Vue.component(
'detail-nova-fields-select',
require('./components/text/DetailField')
)
Vue.component(
'form-nova-fields-select',
require('./components/select/FormField')
)
/** Autocomplete */
Vue.component(
'index-nova-fields-autocomplete',
require('./components/text/IndexField')
)
Vue.component(
'detail-nova-fields-autocomplete',
require('./components/text/DetailField')
)
Vue.component(
'form-nova-fields-autocomplete',
require('./components/autocomplete/FormField')
)
/** File & Image */
Vue.component(
'index-nova-fields-file',
require('./components/file/IndexField')
)
Vue.component(
'detail-nova-fields-file',
require('./components/file/DetailField')
)
Vue.component('form-nova-fields-file', require('./components/file/FormField'))
/** Trix */
Vue.component(
'detail-nova-fields-trix',
require('./components/textarea/DetailField')
)
Vue.component('form-nova-fields-trix', require('./components/trix/FormField'))
/** R64 Fields */
/** Row */
Vue.component('index-nova-fields-row', require('./components/row/IndexField'))
Vue.component(
'detail-nova-fields-row',
require('./components/row/DetailField')
)
Vue.component('form-nova-fields-row', require('./components/row/FormField'))
/** JSON */
Vue.component(
'index-nova-fields-json',
require('./components/json/IndexField')
)
Vue.component(
'detail-nova-fields-json',
require('./components/json/DetailField')
)
Vue.component('form-nova-fields-json', require('./components/json/FormField'))
/** RELATIONS */
/** BelongsTo */
Vue.component(
'index-nova-fields-belongs-to',
require('./components/belongs-to/IndexField')
)
Vue.component(
'detail-nova-fields-belongs-to',
require('./components/belongs-to/DetailField')
)
Vue.component(
'form-nova-fields-belongs-to',
require('./components/belongs-to/FormField')
)
/** DependencyContainer */
Vue.component(
'detail-nova-fields-dependency-container',
require('./components/dependency-container/DetailField')
)
Vue.component(
'form-nova-fields-dependency-container',
require('./components/dependency-container/FormField')
)
})
|
module.exports = {
'facebookAuth' : {
'clientID' : 'your-secret-clientID-here', // your App ID
'clientSecret' : 'your-client-secret-here', // your App Secret
'callbackURL' : 'http://localhost:8080/auth/facebook/callback',
'profileURL' : 'https://graph.facebook.com/v2.5/me?fields=first_name,last_name,email',
'profileFields' : ['id', 'email', 'name'] // For requesting permissions from Facebook API
}
} |
!function(){"use strict";var e="undefined"==typeof global?self:global;if("function"!=typeof e.require){var t={},n={},r={},i={}.hasOwnProperty,o=/^\.\.?(\/|$)/,a=function(e,t){for(var n,r=[],i=(o.test(t)?e+"/"+t:t).split("/"),a=0,s=i.length;a<s;a++)n=i[a],".."===n?r.pop():"."!==n&&""!==n&&r.push(n);return r.join("/")},s=function(e){return e.split("/").slice(0,-1).join("/")},u=function(t){return function(n){var r=a(s(t),n);return e.require(r,t)}},l=function(e,t){var r=v&&v.createHot(e),i={id:e,exports:{},hot:r};return n[e]=i,t(i.exports,u(e),i),i.exports},c=function(e){var t=r[e];return t&&e!==t?c(t):e},f=function(e,t){return c(a(s(e),t))},p=function(e,r){null==r&&(r="/");var o=c(e);if(i.call(n,o))return n[o].exports;if(i.call(t,o))return l(o,t[o]);throw new Error("Cannot find module '"+e+"' from '"+r+"'")};p.alias=function(e,t){r[t]=e};var h=/\.[^.\/]+$/,d=/\/index(\.[^\/]+)?$/,g=function(e){if(h.test(e)){var t=e.replace(h,"");i.call(r,t)&&r[t].replace(h,"")!==t+"/index"||(r[t]=e)}if(d.test(e)){var n=e.replace(d,"");i.call(r,n)||(r[n]=e)}};p.register=p.define=function(e,r){if(e&&"object"==typeof e)for(var o in e)i.call(e,o)&&p.register(o,e[o]);else t[e]=r,delete n[e],g(e)},p.list=function(){var e=[];for(var n in t)i.call(t,n)&&e.push(n);return e};var v=e._hmr&&new e._hmr(f,p,t,n);p._cache=n,p.hmr=v&&v.wrap,p.brunch=!0,e.require=p}}(),function(){var e,t="undefined"==typeof window?this:window,n=function(e,t,n){var r={},i=function(t,n){var o;try{return o=e(n+"/node_modules/"+t)}catch(a){if(a.toString().indexOf("Cannot find module")===-1)throw a;if(n.indexOf("node_modules")!==-1){var s=n.split("/"),u=s.lastIndexOf("node_modules"),l=s.slice(0,u).join("/");return i(t,l)}}return r};return function(o){if(o in t&&(o=t[o]),o){if("."!==o[0]&&n){var a=i(o,n);if(a!==r)return a}return e(o)}}};require.register("@babel/runtime/helpers/arrayLikeToArray.js",function(e,t,r){t=n(t,{},"@babel/runtime"),function(){function e(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}r.exports=e}()}),require.register("@babel/runtime/helpers/arrayWithHoles.js",function(e,t,r){t=n(t,{},"@babel/runtime"),function(){function e(e){if(Array.isArray(e))return e}r.exports=e}()}),require.register("@babel/runtime/helpers/arrayWithoutHoles.js",function(e,t,r){t=n(t,{},"@babel/runtime"),function(){function e(e){if(Array.isArray(e))return n(e)}var n=t("./arrayLikeToArray");r.exports=e}()}),require.register("@babel/runtime/helpers/assertThisInitialized.js",function(e,t,r){t=n(t,{},"@babel/runtime"),function(){function e(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}r.exports=e}()}),require.register("@babel/runtime/helpers/classCallCheck.js",function(e,t,r){t=n(t,{},"@babel/runtime"),function(){function e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}r.exports=e}()}),require.register("@babel/runtime/helpers/createClass.js",function(e,t,r){t=n(t,{},"@babel/runtime"),function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function t(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}r.exports=t}()}),require.register("@babel/runtime/helpers/defineProperty.js",function(e,t,r){t=n(t,{},"@babel/runtime"),function(){function e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}r.exports=e}()}),require.register("@babel/runtime/helpers/getPrototypeOf.js",function(e,t,r){t=n(t,{},"@babel/runtime"),function(){function e(t){return r.exports=e=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},e(t)}r.exports=e}()}),require.register("@babel/runtime/helpers/inherits.js",function(e,t,r){t=n(t,{},"@babel/runtime"),function(){function e(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&n(e,t)}var n=t("./setPrototypeOf");r.exports=e}()}),require.register("@babel/runtime/helpers/iterableToArray.js",function(e,t,r){t=n(t,{},"@babel/runtime"),function(){function e(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}r.exports=e}()}),require.register("@babel/runtime/helpers/iterableToArrayLimit.js",function(e,t,r){t=n(t,{},"@babel/runtime"),function(){function e(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(u){i=!0,o=u}finally{try{r||null==s["return"]||s["return"]()}finally{if(i)throw o}}return n}}r.exports=e}()}),require.register("@babel/runtime/helpers/nonIterableRest.js",function(e,t,r){t=n(t,{},"@babel/runtime"),function(){function e(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}r.exports=e}()}),require.register("@babel/runtime/helpers/nonIterableSpread.js",function(e,t,r){t=n(t,{},"@babel/runtime"),function(){function e(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}r.exports=e}()}),require.register("@babel/runtime/helpers/objectSpread.js",function(e,t,r){t=n(t,{},"@babel/runtime"),function(){function e(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},i=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),i.forEach(function(t){n(e,t,r[t])})}return e}var n=t("./defineProperty");r.exports=e}()}),require.register("@babel/runtime/helpers/possibleConstructorReturn.js",function(e,t,r){t=n(t,{},"@babel/runtime"),function(){function e(e,t){return!t||"object"!==n(t)&&"function"!=typeof t?i(e):t}var n=t("../helpers/typeof"),i=t("./assertThisInitialized");r.exports=e}()}),require.register("@babel/runtime/helpers/setPrototypeOf.js",function(e,t,r){t=n(t,{},"@babel/runtime"),function(){function e(t,n){return r.exports=e=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},e(t,n)}r.exports=e}()}),require.register("@babel/runtime/helpers/slicedToArray.js",function(e,t,r){t=n(t,{},"@babel/runtime"),function(){function e(e,t){return n(e)||i(e,t)||o(e,t)||a()}var n=t("./arrayWithHoles"),i=t("./iterableToArrayLimit"),o=t("./unsupportedIterableToArray"),a=t("./nonIterableRest");r.exports=e}()}),require.register("@babel/runtime/helpers/toArray.js",function(e,t,r){t=n(t,{},"@babel/runtime"),function(){function e(e){return n(e)||i(e)||o(e)||a()}var n=t("./arrayWithHoles"),i=t("./iterableToArray"),o=t("./unsupportedIterableToArray"),a=t("./nonIterableRest");r.exports=e}()}),require.register("@babel/runtime/helpers/toConsumableArray.js",function(e,t,r){t=n(t,{},"@babel/runtime"),function(){function e(e){return n(e)||i(e)||o(e)||a()}var n=t("./arrayWithoutHoles"),i=t("./iterableToArray"),o=t("./unsupportedIterableToArray"),a=t("./nonIterableSpread");r.exports=e}()}),require.register("@babel/runtime/helpers/typeof.js",function(e,t,r){t=n(t,{},"@babel/runtime"),function(){function e(t){"@babel/helpers - typeof";return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?r.exports=e=function(e){return typeof e}:r.exports=e=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}r.exports=e}()}),require.register("@babel/runtime/helpers/unsupportedIterableToArray.js",function(e,t,r){t=n(t,{},"@babel/runtime"),function(){function e(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}var n=t("./arrayLikeToArray");r.exports=e}()}),require.register("countup.js/dist/countUp.min.js",function(e,t,r){t=n(t,{},"countup.js"),function(){"use strict";var t=this&&this.__assign||function(){return(t=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function e(e,n,r){var i=this;this.target=e,this.endVal=n,this.options=r,this.version="2.0.3",this.defaults={startVal:0,decimalPlaces:0,duration:2,useEasing:!0,useGrouping:!0,smartEasingThreshold:999,smartEasingAmount:333,separator:",",decimal:".",prefix:"",suffix:""},this.finalEndVal=null,this.useEasing=!0,this.countDown=!1,this.error="",this.startVal=0,this.paused=!0,this.count=function(e){i.startTime||(i.startTime=e);var t=e-i.startTime;i.remaining=i.duration-t,i.useEasing?i.countDown?i.frameVal=i.startVal-i.easingFn(t,0,i.startVal-i.endVal,i.duration):i.frameVal=i.easingFn(t,i.startVal,i.endVal-i.startVal,i.duration):i.countDown?i.frameVal=i.startVal-(i.startVal-i.endVal)*(t/i.duration):i.frameVal=i.startVal+(i.endVal-i.startVal)*(t/i.duration),i.countDown?i.frameVal=i.frameVal<i.endVal?i.endVal:i.frameVal:i.frameVal=i.frameVal>i.endVal?i.endVal:i.frameVal,i.frameVal=Math.round(i.frameVal*i.decimalMult)/i.decimalMult,i.printValue(i.frameVal),t<i.duration?i.rAF=requestAnimationFrame(i.count):null!==i.finalEndVal?i.update(i.finalEndVal):i.callback&&i.callback()},this.formatNumber=function(e){var t,n,r,o,a,s=e<0?"-":"";if(t=Math.abs(e).toFixed(i.options.decimalPlaces),r=(n=(t+="").split("."))[0],o=1<n.length?i.options.decimal+n[1]:"",i.options.useGrouping){a="";for(var u=0,l=r.length;u<l;++u)0!==u&&u%3==0&&(a=i.options.separator+a),a=r[l-u-1]+a;r=a}return i.options.numerals&&i.options.numerals.length&&(r=r.replace(/[0-9]/g,function(e){return i.options.numerals[+e]}),o=o.replace(/[0-9]/g,function(e){return i.options.numerals[+e]})),s+i.options.prefix+r+o+i.options.suffix},this.easeOutExpo=function(e,t,n,r){return n*(1-Math.pow(2,-10*e/r))*1024/1023+t},this.options=t({},this.defaults,r),this.formattingFn=this.options.formattingFn?this.options.formattingFn:this.formatNumber,this.easingFn=this.options.easingFn?this.options.easingFn:this.easeOutExpo,this.startVal=this.validateValue(this.options.startVal),this.frameVal=this.startVal,this.endVal=this.validateValue(n),this.options.decimalPlaces=Math.max(this.options.decimalPlaces),this.decimalMult=Math.pow(10,this.options.decimalPlaces),this.resetDuration(),this.options.separator=String(this.options.separator),this.useEasing=this.options.useEasing,""===this.options.separator&&(this.options.useGrouping=!1),this.el="string"==typeof e?document.getElementById(e):e,this.el?this.printValue(this.startVal):this.error="[CountUp] target is null or undefined"}return e.prototype.determineDirectionAndSmartEasing=function(){var e=this.finalEndVal?this.finalEndVal:this.endVal;this.countDown=this.startVal>e;var t=e-this.startVal;if(Math.abs(t)>this.options.smartEasingThreshold){this.finalEndVal=e;var n=this.countDown?1:-1;this.endVal=e+n*this.options.smartEasingAmount,this.duration=this.duration/2}else this.endVal=e,this.finalEndVal=null;this.finalEndVal?this.useEasing=!1:this.useEasing=this.options.useEasing},e.prototype.start=function(e){this.error||(this.callback=e,0<this.duration?(this.determineDirectionAndSmartEasing(),this.paused=!1,this.rAF=requestAnimationFrame(this.count)):this.printValue(this.endVal))},e.prototype.pauseResume=function(){this.paused?(this.startTime=null,this.duration=this.remaining,this.startVal=this.frameVal,this.determineDirectionAndSmartEasing(),this.rAF=requestAnimationFrame(this.count)):cancelAnimationFrame(this.rAF),this.paused=!this.paused},e.prototype.reset=function(){cancelAnimationFrame(this.rAF),this.paused=!0,this.resetDuration(),this.startVal=this.validateValue(this.options.startVal),this.frameVal=this.startVal,this.printValue(this.startVal)},e.prototype.update=function(e){cancelAnimationFrame(this.rAF),this.startTime=null,this.endVal=this.validateValue(e),this.endVal!==this.frameVal&&(this.startVal=this.frameVal,this.finalEndVal||this.resetDuration(),this.determineDirectionAndSmartEasing(),this.rAF=requestAnimationFrame(this.count))},e.prototype.printValue=function(e){var t=this.formattingFn(e);"INPUT"===this.el.tagName?this.el.value=t:"text"===this.el.tagName||"tspan"===this.el.tagName?this.el.textContent=t:this.el.innerHTML=t},e.prototype.ensureNumber=function(e){return"number"==typeof e&&!isNaN(e)},e.prototype.validateValue=function(e){var t=Number(e);return this.ensureNumber(t)?t:(this.error="[CountUp] invalid start or end value: "+e,null)},e.prototype.resetDuration=function(){this.startTime=null,this.duration=1e3*Number(this.options.duration),this.remaining=this.duration},e}();e.CountUp=n}()}),require.register("domurl/url.min.js",function(r,i,o){i=n(i,{},"domurl"),function(){!function(n){"use strict";function r(){return P?c=c||"file://"+(e.platform.match(d)?"/":"")+q("fs").realpathSync("."):"about:srcdoc"===document.location.href?self.parent.document.location.href:document.location.href}function o(e,t,n){var i,o,a;t=t||r(),P?i=q("url").parse(t):(i=document.createElement("a")).href=t;var c,d,x=(d={path:!0,query:!0,hash:!0},(c=t)&&f.test(c)&&(d.protocol=!0,d.host=!0,p.test(c)&&(d.port=!0),h.test(c)&&(d.user=!0,d.pass=!0)),d);for(o in a=t.match(h)||[],A)x[o]?e[o]=i[A[o]]||"":e[o]="";if(e.protocol=e.protocol.replace(g,""),e.query=e.query.replace(v,""),e.hash=s(e.hash.replace(m,"")),e.user=s(a[1]||""),e.pass=s(a[2]||""),e.port=R[e.protocol]==e.port||0==e.port?"":e.port,!x.protocol&&L.test(t.charAt(0))&&(e.path=t.split("?")[0].split("#")[0]),!x.protocol&&n){var k=new l(r().match(y)[0]),j=k.path.split("/"),S=e.path.split("/"),O=["protocol","user","pass","host","port"],C=O.length;for(j.pop(),o=0;o<C;o++)e[O[o]]=k[O[o]];for(;".."===S[0];)j.pop(),S.shift();e.path=("/"!==t.charAt(0)?j.join("/"):"")+"/"+S.join("/")}e.path=e.path.replace(b,"/"),E&&(e.path=e.path.replace(w,"/")),e.paths(e.paths()),e.query=new u(e.query)}function a(e){return encodeURIComponent(e).replace(x,"%27")}function s(e){return(e=(e=(e=e.replace(O," ")).replace(k,function(e,t,n,r){var i=parseInt(t,16)-224,o=parseInt(n,16)-128;if(0==i&&o<32)return e;var a=(i<<12)+(o<<6)+(parseInt(r,16)-128);return 65535<a?e:String.fromCharCode(a)})).replace(j,function(e,t,n){var r=parseInt(t,16)-192;if(r<2)return e;var i=parseInt(n,16)-128;return String.fromCharCode((r<<6)+i)})).replace(S,function(e,t){return String.fromCharCode(parseInt(t,16))})}function u(e){for(var t=e.split("&"),n=0,r=t.length;n<r;n++){var i=t[n].split("="),o=decodeURIComponent(i[0].replace(O," "));if(o){var a=void 0!==i[1]?s(i[1]):null;void 0===this[o]?this[o]=a:(this[o]instanceof Array||(this[o]=[this[o]]),this[o].push(a))}}}function l(e,t){o(this,e,!t)}var c,f=/^[a-z]+:/,p=/[-a-z0-9]+(\.[-a-z0-9])*:\d+/i,h=/\/\/(.*?)(?::(.*?))?@/,d=/^win/i,g=/:$/,v=/^\?/,m=/^#/,y=/(.*\/)/,b=/^\/{2,}/,w=/(^\/?)/,x=/'/g,k=/%([ef][0-9a-f])%([89ab][0-9a-f])%([89ab][0-9a-f])/gi,j=/%([cd][0-9a-f])%([89ab][0-9a-f])/gi,S=/%([0-7][0-9a-f])/gi,O=/\+/g,C=/^\w:$/,L=/[^/#?]/,P="undefined"==typeof window&&"undefined"!=typeof t&&"function"==typeof i,E=!P&&n.navigator&&n.navigator.userAgent&&~n.navigator.userAgent.indexOf("MSIE"),q=P?n.require:null,A={protocol:"protocol",host:"hostname",port:"port",path:"pathname",query:"search",hash:"hash"},R={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443};u.prototype.toString=function(){var e,t,n="",r=a;for(e in this){var i=this[e];if(!(i instanceof Function||void 0===i))if(i instanceof Array){var o=i.length;if(!o){n+=(n?"&":"")+r(e)+"=";continue}for(t=0;t<o;t++){var s=i[t];void 0!==s&&(n+=n?"&":"",n+=r(e)+(null===s?"":"="+r(s)))}}else n+=n?"&":"",n+=r(e)+(null===i?"":"="+r(i))}return n},l.prototype.clearQuery=function(){for(var e in this.query)this.query[e]instanceof Function||delete this.query[e];return this},l.prototype.queryLength=function(){var e=0;for(var t in this.query)this.query[t]instanceof Function||e++;return e},l.prototype.isEmptyQuery=function(){return 0===this.queryLength()},l.prototype.paths=function(e){var t,n="",r=0;if(e&&e.length&&e+""!==e){for(this.isAbsolute()&&(n="/"),t=e.length;r<t;r++)e[r]=!r&&C.test(e[r])?e[r]:a(e[r]);this.path=n+e.join("/")}for(r=0,t=(e=("/"===this.path.charAt(0)?this.path.slice(1):this.path).split("/")).length;r<t;r++)e[r]=s(e[r]);return e},l.prototype.encode=a,l.prototype.decode=s,l.prototype.isAbsolute=function(){return this.protocol||"/"===this.path.charAt(0)},l.prototype.toString=function(){return(this.protocol&&this.protocol+"://")+(this.user&&a(this.user)+(this.pass&&":"+a(this.pass))+"@")+(this.host&&this.host)+(this.port&&":"+this.port)+(this.path&&this.path)+(this.query.toString()&&"?"+this.query)+(this.hash&&"#"+a(this.hash))},n[n.exports?"exports":"Url"]=l}("undefined"!=typeof o&&o.exports?o:window)}()}),require.register("i18next-browser-languagedetector/dist/cjs/i18nextBrowserLanguageDetector.js",function(e,t,r){t=n(t,{},"i18next-browser-languagedetector"),function(){"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e["default"]:e}function n(e){return l.call(c.call(arguments,1),function(t){if(t)for(var n in t)void 0===e[n]&&(e[n]=t[n])}),e}function i(){return{order:["querystring","cookie","localStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],checkWhitelist:!0,checkForSimilarInWhitelist:!1}}var o,a=e(t("@babel/runtime/helpers/classCallCheck")),s=e(t("@babel/runtime/helpers/createClass")),u=[],l=u.forEach,c=u.slice,f={create:function(e,t,n,r){var i,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{path:"/"};if(n){var a=new Date;a.setTime(a.getTime()+60*n*1e3),i="; expires="+a.toUTCString()}else i="";r=r?"domain="+r+";":"",o=Object.keys(o).reduce(function(e,t){return e+";"+t.replace(/([A-Z])/g,function(e){return"-"+e.toLowerCase()})+"="+o[t]},""),document.cookie=e+"="+encodeURIComponent(t)+i+";"+r+o},read:function(e){for(var t=e+"=",n=document.cookie.split(";"),r=0;r<n.length;r++){for(var i=n[r];" "===i.charAt(0);)i=i.substring(1,i.length);if(0===i.indexOf(t))return i.substring(t.length,i.length)}return null},remove:function(e){this.create(e,"",-1)}},p={name:"cookie",lookup:function(e){var t;if(e.lookupCookie&&"undefined"!=typeof document){var n=f.read(e.lookupCookie);n&&(t=n)}return t},cacheUserLanguage:function(e,t){t.lookupCookie&&"undefined"!=typeof document&&f.create(t.lookupCookie,e,t.cookieMinutes,t.cookieDomain,t.cookieOptions)}},h={name:"querystring",lookup:function(e){var t;if("undefined"!=typeof window)for(var n=window.location.search.substring(1),r=n.split("&"),i=0;i<r.length;i++){var o=r[i].indexOf("=");if(o>0){var a=r[i].substring(0,o);a===e.lookupQuerystring&&(t=r[i].substring(o+1))}}return t}};try{o="undefined"!==window&&null!==window.localStorage;var d="i18next.translate.boo";window.localStorage.setItem(d,"foo"),window.localStorage.removeItem(d)}catch(g){o=!1}var v={name:"localStorage",lookup:function(e){var t;if(e.lookupLocalStorage&&o){var n=window.localStorage.getItem(e.lookupLocalStorage);n&&(t=n)}return t},cacheUserLanguage:function(e,t){t.lookupLocalStorage&&o&&window.localStorage.setItem(t.lookupLocalStorage,e)}},m={name:"navigator",lookup:function(e){var t=[];if("undefined"!=typeof navigator){if(navigator.languages)for(var n=0;n<navigator.languages.length;n++)t.push(navigator.languages[n]);navigator.userLanguage&&t.push(navigator.userLanguage),navigator.language&&t.push(navigator.language)}return t.length>0?t:void 0}},y={name:"htmlTag",lookup:function(e){var t,n=e.htmlTag||("undefined"!=typeof document?document.documentElement:null);return n&&"function"==typeof n.getAttribute&&(t=n.getAttribute("lang")),t}},b={name:"path",lookup:function(e){var t;if("undefined"!=typeof window){var n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(n instanceof Array)if("number"==typeof e.lookupFromPathIndex){if("string"!=typeof n[e.lookupFromPathIndex])return;t=n[e.lookupFromPathIndex].replace("/","")}else t=n[0].replace("/","")}return t}},w={name:"subdomain",lookup:function(e){var t;if("undefined"!=typeof window){var n=window.location.href.match(/(?:http[s]*\:\/\/)*(.*?)\.(?=[^\/]*\..{2,5})/gi);n instanceof Array&&(t="number"==typeof e.lookupFromSubdomainIndex?n[e.lookupFromSubdomainIndex].replace("http://","").replace("https://","").replace(".",""):n[0].replace("http://","").replace("https://","").replace(".",""))}return t}},x=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};a(this,e),this.type="languageDetector",this.detectors={},this.init(t,n)}return s(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.services=e,this.options=n(t,this.options||{},i()),this.options.checkForSimilarInWhitelist&&(this.options.checkWhitelist=!0),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=r,this.addDetector(p),this.addDetector(h),this.addDetector(v),this.addDetector(m),this.addDetector(y),this.addDetector(b),this.addDetector(w)}},{key:"addDetector",value:function(e){this.detectors[e.name]=e}},{key:"detect",value:function(e){var t=this;e||(e=this.options.order);var n=[];e.forEach(function(e){if(t.detectors[e]){var r=t.detectors[e].lookup(t.options);r&&"string"==typeof r&&(r=[r]),r&&(n=n.concat(r))}});var r;if(n.forEach(function(e){if(!r){var n=t.services.languageUtils.formatLanguageCode(e);t.options.checkWhitelist&&!t.services.languageUtils.isWhitelisted(n)||(r=n),!r&&t.options.checkForSimilarInWhitelist&&(r=t.getSimilarInWhitelist(n))}}),!r){var i=this.i18nOptions.fallbackLng;"string"==typeof i&&(i=[i]),i||(i=[]),r="[object Array]"===Object.prototype.toString.apply(i)?i[0]:i[0]||i["default"]&&i["default"][0]}return r}},{key:"cacheUserLanguage",value:function(e,t){var n=this;t||(t=this.options.caches),t&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||t.forEach(function(t){n.detectors[t]&&n.detectors[t].cacheUserLanguage(e,n.options)}))}},{key:"getSimilarInWhitelist",value:function(e){var t=this;if(this.i18nOptions.whitelist){if(e.includes("-")){var n=e.split("-")[0],r=this.services.languageUtils.formatLanguageCode(n);if(this.services.languageUtils.isWhitelisted(r))return r;e=r}var i=this.i18nOptions.whitelist.find(function(n){var r=t.services.languageUtils.formatLanguageCode(n);if(r.startsWith(e))return r});return i?i:void 0}}}]),e}();x.type="languageDetector",r.exports=x}()}),require.register("i18next-http-backend/cjs/getFetch.js",function(e,r,i){r=n(r,{},"i18next-http-backend"),function(){var n;if("function"==typeof fetch&&("undefined"!=typeof t&&t.fetch?n=t.fetch:"undefined"!=typeof window&&window.fetch&&(n=window.fetch)),"undefined"!=typeof r&&("undefined"==typeof window||"undefined"==typeof window.document)){var o=n||r("node-fetch");o["default"]&&(o=o["default"]),e["default"]=o,i.exports=e["default"]}}()}),require.register("i18next-http-backend/cjs/index.js",function(e,t,r){t=n(t,{},"i18next-http-backend"),function(){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function a(e,t,n){return t&&o(e.prototype,t),n&&o(e,n),e}function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=void 0;var u=t("./utils.js"),l=n(t("./request.js")),c=function(){return{loadPath:"/locales/{{lng}}/{{ns}}.json",addPath:"/locales/add/{{lng}}/{{ns}}",allowMultiLoading:!1,parse:function(e){return JSON.parse(e)},stringify:JSON.stringify,parsePayload:function(e,t,n){return s({},t,n||"")},request:l["default"],reloadInterval:"undefined"==typeof window&&36e5,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}}},f=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};i(this,e),this.services=t,this.options=n,this.allOptions=r,this.type="backend",this.init(t,n,r)}return a(e,[{key:"init",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.services=e,this.options=(0,u.defaults)(n,this.options||{},c()),this.allOptions=r,this.options.reloadInterval&&setInterval(function(){return t.reload()},this.options.reloadInterval)}},{key:"readMulti",value:function(e,t,n){var r=this.options.loadPath;"function"==typeof this.options.loadPath&&(r=this.options.loadPath(e,t));var i=this.services.interpolator.interpolate(r,{lng:e.join("+"),ns:t.join("+")});this.loadUrl(i,n,e,t)}},{key:"read",value:function(e,t,n){var r=this.options.loadPath;"function"==typeof this.options.loadPath&&(r=this.options.loadPath([e],[t]));var i=this.services.interpolator.interpolate(r,{lng:e,ns:t});this.loadUrl(i,n,e,t)}},{key:"loadUrl",value:function(e,t,n,r){var i=this;this.options.request(this.options,e,void 0,function(o,a){if(a&&(a.status>=500&&a.status<600||!a.status))return t("failed loading "+e,!0);if(a&&a.status>=400&&a.status<500)return t("failed loading "+e,!1);if(!a&&o&&o.message&&o.message.indexOf("Failed to fetch")>-1)return t("failed loading "+e,!0);if(o)return t(o,!1);var s,u;try{s="string"==typeof a.data?i.options.parse(a.data,n,r):a.data}catch(l){u="failed parsing "+e+" to json"}return u?t(u,!1):void t(null,s)})}},{key:"create",value:function(e,t,n,r){var i=this;if(this.options.addPath){"string"==typeof e&&(e=[e]);var o=this.options.parsePayload(t,n,r);e.forEach(function(e){var n=i.services.interpolator.interpolate(i.options.addPath,{lng:e,ns:t});i.options.request(i.options,n,o,function(e,t){})})}}},{key:"reload",value:function(){var e=this,t=this.services,n=t.backendConnector,r=t.languageUtils,i=t.logger,o=n.language;if(!o||"cimode"!==o.toLowerCase()){var a=[],s=function(e){var t=r.toResolveHierarchy(e);t.forEach(function(e){a.indexOf(e)<0&&a.push(e)})};s(o),this.allOptions.preload&&this.allOptions.preload.forEach(function(e){return s(e)}),a.forEach(function(t){e.allOptions.ns.forEach(function(e){n.read(t,e,"read",null,null,function(r,o){r&&i.warn("loading namespace ".concat(e," for language ").concat(t," failed"),r),!r&&o&&i.log("loaded namespace ".concat(e," for language ").concat(t),o),n.loaded("".concat(t,"|").concat(e),r,o)})})})}}}]),e}();f.type="backend";var p=f;e["default"]=p,r.exports=e["default"]}()}),require.register("i18next-http-backend/cjs/request.js",function(e,r,i){r=n(r,{},"i18next-http-backend"),function(){"use strict";function n(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return n=function(){return e},e}function o(e){if(e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!=typeof e)return{"default":e};var t=n();if(t&&t.has(e))return t.get(e);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var s=i?Object.getOwnPropertyDescriptor(e,o):null;s&&(s.get||s.set)?Object.defineProperty(r,o,s):r[o]=e[o]}return r["default"]=e,t&&t.set(e,r),r}function a(e){"@babel/helpers - typeof";return(a="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})(e)}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=void 0;var s,u=r("./utils.js"),l=o(r("./getFetch.js"));"function"==typeof fetch&&("undefined"!=typeof t&&t.fetch?s=t.fetch:"undefined"!=typeof window&&window.fetch&&(s=window.fetch));var c;"function"==typeof XMLHttpRequest&&("undefined"!=typeof t&&t.XMLHttpRequest?c=t.XMLHttpRequest:"undefined"!=typeof window&&window.XMLHttpRequest&&(c=window.XMLHttpRequest));var f;"function"==typeof ActiveXObject&&("undefined"!=typeof t&&t.ActiveXObject?f=t.ActiveXObject:"undefined"!=typeof window&&window.ActiveXObject&&(f=window.ActiveXObject)),s||!l||c||f||(s=l["default"]||l),"function"!=typeof s&&(s=void 0);var p=function(e,t){if(t&&"object"===a(t)){var n="";for(var r in t)n+="&"+encodeURIComponent(r)+"="+encodeURIComponent(t[r]);if(!n)return e;e=e+(e.indexOf("?")!==-1?"&":"?")+n.slice(1)}return e},h=function(e,t,n,r){e.queryStringParams&&(t=p(t,e.queryStringParams));var i=(0,u.defaults)({},"function"==typeof e.customHeaders?e.customHeaders():e.customHeaders);n&&(i["Content-Type"]="application/json"),s(t,(0,u.defaults)({method:n?"POST":"GET",body:n?e.stringify(n):void 0,headers:i},"function"==typeof e.requestOptions?e.requestOptions(n):e.requestOptions)).then(function(e){return e.ok?void e.text().then(function(t){r(null,{status:e.status,data:t})})["catch"](r):r(e.statusText||"Error",{status:e.status})})["catch"](r)},d=function(e,t,n,r){n&&"object"===a(n)&&(n=p("",n).slice(1)),e.queryStringParams&&(t=p(t,e.queryStringParams));try{var i;i=c?new c:new f("MSXML2.XMLHTTP.3.0"),i.open(n?"POST":"GET",t,1),e.crossDomain||i.setRequestHeader("X-Requested-With","XMLHttpRequest"),i.withCredentials=!!e.withCredentials,n&&i.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),i.overrideMimeType&&i.overrideMimeType("application/json");var o=e.customHeaders;if(o="function"==typeof o?o():o)for(var s in o)i.setRequestHeader(s,o[s]);i.onreadystatechange=function(){i.readyState>3&&r(i.status>=400?i.statusText:null,{status:i.status,data:i.responseText})},i.send(n)}catch(u){console&&console.log(u)}},g=function(e,t,n,r){return"function"==typeof n&&(r=n,n=void 0),r=r||function(){},s?h(e,t,n,r):"function"==typeof XMLHttpRequest||"function"==typeof ActiveXObject?d(e,t,n,r):void 0},v=g;e["default"]=v,i.exports=e["default"]}()}),require.register("i18next-http-backend/cjs/utils.js",function(e,t,r){t=n(t,{},"i18next-http-backend"),function(){"use strict";function t(e){return r.call(i.call(arguments,1),function(t){if(t)for(var n in t)void 0===e[n]&&(e[n]=t[n])}),e}Object.defineProperty(e,"__esModule",{value:!0}),e.defaults=t;var n=[],r=n.forEach,i=n.slice}()}),require.register("i18next-localstorage-cache/dist/commonjs/index.js",function(e,t,r){t=n(t,{},"i18next-localstorage-cache"),function(){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(){return{enabled:!1,prefix:"i18next_res_",expirationTime:6048e5,versions:{}}}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=t("./utils"),s=n(a),u={setItem:function(e,t){if(window.localStorage)try{window.localStorage.setItem(e,t)}catch(n){}},getItem:function(e,t){if(window.localStorage)try{return window.localStorage.getItem(e,t)}catch(n){}}},l=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r(this,e),this.init(t,n),this.type="cache",this.debouncedStore=s.debounce(this.store,1e4)}return o(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.services=e,this.options=s.defaults(t,this.options||{},i());
}},{key:"load",value:function(e,t){var n=this,r={},i=(new Date).getTime();if(!window.localStorage||!e.length)return t(null,null);var o=e.length;e.forEach(function(e){var a=u.getItem(n.options.prefix+e);a&&(a=JSON.parse(a),a.i18nStamp&&a.i18nStamp+n.options.expirationTime>i&&n.options.versions[e]===a.i18nVersion&&(delete a.i18nVersion,r[e]=a)),o-=1,0===o&&t(null,r)})}},{key:"store",value:function t(e){var t=e;if(window.localStorage)for(var n in t)t[n].i18nStamp=(new Date).getTime(),this.options.versions[n]&&(t[n].i18nVersion=this.options.versions[n]),u.setItem(this.options.prefix+n,JSON.stringify(t[n]))}},{key:"save",value:function(e){this.debouncedStore(e)}}]),e}();l.type="cache",e["default"]=l}()}),require.register("i18next-localstorage-cache/dist/commonjs/utils.js",function(e,t,r){t=n(t,{},"i18next-localstorage-cache"),function(){"use strict";function t(e){return o.call(a.call(arguments,1),function(t){if(t)for(var n in t)void 0===e[n]&&(e[n]=t[n])}),e}function n(e){return o.call(a.call(arguments,1),function(t){if(t)for(var n in t)e[n]=t[n]}),e}function r(e,t,n){var r;return function(){var i=this,o=arguments,a=function(){r=null,n||e.apply(i,o)},s=n&&!r;clearTimeout(r),r=setTimeout(a,t),s&&e.apply(i,o)}}Object.defineProperty(e,"__esModule",{value:!0}),e.defaults=t,e.extend=n,e.debounce=r;var i=[],o=i.forEach,a=i.slice}()}),require.register("i18next-localstorage-cache/index.js",function(e,t,r){t=n(t,{},"i18next-localstorage-cache"),function(){r.exports=t("./dist/commonjs/index.js")["default"]}()}),require.register("i18next/dist/cjs/i18next.js",function(e,t,r){t=n(t,{},"i18next"),function(){"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e["default"]:e}function n(){var e,t,n=new Promise(function(n,r){e=n,t=r});return n.resolve=e,n.reject=t,n}function i(e){return null==e?"":""+e}function o(e,t,n){e.forEach(function(e){t[e]&&(n[e]=t[e])})}function a(e,t,n){function r(e){return e&&e.indexOf("###")>-1?e.replace(/###/g,"."):e}function i(){return!e||"string"==typeof e}for(var o="string"!=typeof t?[].concat(t):t.split(".");o.length>1;){if(i())return{};var a=r(o.shift());!e[a]&&n&&(e[a]=new n),e=e[a]}return i()?{}:{obj:e,k:r(o.shift())}}function s(e,t,n){var r=a(e,t,Object),i=r.obj,o=r.k;i[o]=n}function u(e,t,n,r){var i=a(e,t,Object),o=i.obj,s=i.k;o[s]=o[s]||[],r&&(o[s]=o[s].concat(n)),r||o[s].push(n)}function l(e,t){var n=a(e,t),r=n.obj,i=n.k;if(r)return r[i]}function c(e,t,n){var r=l(e,n);return void 0!==r?r:l(t,n)}function f(e,t,n){for(var r in t)r in e?"string"==typeof e[r]||e[r]instanceof String||"string"==typeof t[r]||t[r]instanceof String?n&&(e[r]=t[r]):f(e[r],t[r],n):e[r]=t[r];return e}function p(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}function h(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,function(e){return N[e]}):e}function d(e){return e.charAt(0).toUpperCase()+e.slice(1)}function g(){var e={};return H.forEach(function(t){t.lngs.forEach(function(n){e[n]={numbers:t.nr,plurals:W[t.fc]}})}),e}function v(e,t){for(var n=e.indexOf(t);n!==-1;)e.splice(n,1),n=e.indexOf(t)}function m(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,whitelist:!1,nonExplicitWhitelist:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var t={};if("object"===w(e[1])&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"===w(e[2])||"object"===w(e[3])){var n=e[3]||e[2];Object.keys(n).forEach(function(e){t[e]=n[e]})}return t},interpolation:{escapeValue:!0,format:function(e,t,n,r){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3}}}function y(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.whitelist&&e.whitelist.indexOf("cimode")<0&&(e.whitelist=e.whitelist.concat(["cimode"])),e}function b(){}var w=e(t("@babel/runtime/helpers/typeof")),x=e(t("@babel/runtime/helpers/objectSpread")),k=e(t("@babel/runtime/helpers/classCallCheck")),j=e(t("@babel/runtime/helpers/createClass")),S=e(t("@babel/runtime/helpers/possibleConstructorReturn")),O=e(t("@babel/runtime/helpers/getPrototypeOf")),C=e(t("@babel/runtime/helpers/assertThisInitialized")),L=e(t("@babel/runtime/helpers/inherits")),P=e(t("@babel/runtime/helpers/toConsumableArray")),E=e(t("@babel/runtime/helpers/toArray")),q=e(t("@babel/runtime/helpers/slicedToArray")),A={type:"logger",log:function(e){this.output("log",e)},warn:function(e){this.output("warn",e)},error:function(e){this.output("error",e)},output:function(e,t){var n;console&&console[e]&&(n=console)[e].apply(n,P(t))}},R=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};k(this,e),this.init(t,n)}return j(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||A,this.options=t,this.debug=t.debug}},{key:"setDebug",value:function(e){this.debug=e}},{key:"log",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"log","",!0)}},{key:"warn",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","",!0)}},{key:"error",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"error","")}},{key:"deprecate",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(e,t,n,r){return r&&!this.debug?null:("string"==typeof e[0]&&(e[0]="".concat(n).concat(this.prefix," ").concat(e[0])),this.logger[t](e))}},{key:"create",value:function(t){return new e(this.logger,x({},{prefix:"".concat(this.prefix,":").concat(t,":")},this.options))}}]),e}(),V=new R,T=function(){function e(){k(this,e),this.observers={}}return j(e,[{key:"on",value:function(e,t){var n=this;return e.split(" ").forEach(function(e){n.observers[e]=n.observers[e]||[],n.observers[e].push(t)}),this}},{key:"off",value:function(e,t){if(this.observers[e])return t?void(this.observers[e]=this.observers[e].filter(function(e){return e!==t})):void delete this.observers[e]}},{key:"emit",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(this.observers[e]){var i=[].concat(this.observers[e]);i.forEach(function(e){e.apply(void 0,n)})}if(this.observers["*"]){var o=[].concat(this.observers["*"]);o.forEach(function(t){t.apply(t,[e].concat(n))})}}}]),e}(),N={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},F="undefined"!=typeof window&&window.navigator&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,I=function(e){function t(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return k(this,t),n=S(this,O(t).call(this)),F&&T.call(C(n)),n.data=e||{},n.options=r,void 0===n.options.keySeparator&&(n.options.keySeparator="."),n}return L(t,e),j(t,[{key:"addNamespaces",value:function(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}},{key:"removeNamespaces",value:function(e){var t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}},{key:"getResource",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,o=[e,t];return n&&"string"!=typeof n&&(o=o.concat(n)),n&&"string"==typeof n&&(o=o.concat(i?n.split(i):n)),e.indexOf(".")>-1&&(o=e.split(".")),l(this.data,o)}},{key:"addResource",value:function(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},o=this.options.keySeparator;void 0===o&&(o=".");var a=[e,t];n&&(a=a.concat(o?n.split(o):n)),e.indexOf(".")>-1&&(a=e.split("."),r=t,t=a[1]),this.addNamespaces(t),s(this.data,a,r),i.silent||this.emit("added",e,t,n,r)}},{key:"addResources",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var i in n)"string"!=typeof n[i]&&"[object Array]"!==Object.prototype.toString.apply(n[i])||this.addResource(e,t,i,n[i],{silent:!0});r.silent||this.emit("added",e,t,n)}},{key:"addResourceBundle",value:function(e,t,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},a=[e,t];e.indexOf(".")>-1&&(a=e.split("."),r=n,n=t,t=a[1]),this.addNamespaces(t);var u=l(this.data,a)||{};r?f(u,n,i):u=x({},u,n),s(this.data,a,u),o.silent||this.emit("added",e,t,n)}},{key:"removeResourceBundle",value:function(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}},{key:"hasResourceBundle",value:function(e,t){return void 0!==this.getResource(e,t)}},{key:"getResourceBundle",value:function(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?x({},{},this.getResource(e,t)):this.getResource(e,t)}},{key:"getDataByLanguage",value:function(e){return this.data[e]}},{key:"toJSON",value:function(){return this.data}}]),t}(T),D={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,n,r,i){var o=this;return e.forEach(function(e){o.processors[e]&&(t=o.processors[e].process(t,n,r,i))}),t}},M={},U=function(e){function t(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return k(this,t),n=S(this,O(t).call(this)),F&&T.call(C(n)),o(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,C(n)),n.options=r,void 0===n.options.keySeparator&&(n.options.keySeparator="."),n.logger=V.create("translator"),n}return L(t,e),j(t,[{key:"changeLanguage",value:function(e){e&&(this.language=e)}},{key:"exists",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}},n=this.resolve(e,t);return n&&void 0!==n.res}},{key:"extractFromKey",value:function(e,t){var n=t.nsSeparator||this.options.nsSeparator;void 0===n&&(n=":");var r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,i=t.ns||this.options.defaultNS;if(n&&e.indexOf(n)>-1){var o=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(o[0])>-1)&&(i=o.shift()),e=o.join(r)}return"string"==typeof i&&(i=[i]),{key:e,namespaces:i}}},{key:"translate",value:function(e,t){var n=this;if("object"!==w(t)&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),t||(t={}),void 0===e||null===e)return"";Array.isArray(e)||(e=[String(e)]);var r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,i=this.extractFromKey(e[e.length-1],t),o=i.key,a=i.namespaces,s=a[a.length-1],u=t.lng||this.language,l=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(u&&"cimode"===u.toLowerCase()){if(l){var c=t.nsSeparator||this.options.nsSeparator;return s+c+o}return o}var f=this.resolve(e,t),p=f&&f.res,h=f&&f.usedKey||o,d=f&&f.exactUsedKey||o,g=Object.prototype.toString.apply(p),v=["[object Number]","[object Function]","[object RegExp]"],m=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,y=!this.i18nFormat||this.i18nFormat.handleAsObject,b="string"!=typeof p&&"boolean"!=typeof p&&"number"!=typeof p;if(y&&p&&b&&v.indexOf(g)<0&&("string"!=typeof m||"[object Array]"!==g)){if(!t.returnObjects&&!this.options.returnObjects)return this.logger.warn("accessing an object - but returnObjects options is not enabled!"),this.options.returnedObjectHandler?this.options.returnedObjectHandler(h,p,t):"key '".concat(o," (").concat(this.language,")' returned an object instead of string.");if(r){var k="[object Array]"===g,j=k?[]:{},S=k?d:h;for(var O in p)if(Object.prototype.hasOwnProperty.call(p,O)){var C="".concat(S).concat(r).concat(O);j[O]=this.translate(C,x({},t,{joinArrays:!1,ns:a})),j[O]===C&&(j[O]=p[O])}p=j}}else if(y&&"string"==typeof m&&"[object Array]"===g)p=p.join(m),p&&(p=this.extendTranslation(p,e,t));else{var L=!1,P=!1;if(!this.isValidLookup(p)&&void 0!==t.defaultValue){if(L=!0,void 0!==t.count){var E=this.pluralResolver.getSuffix(u,t.count);p=t["defaultValue".concat(E)]}p||(p=t.defaultValue)}this.isValidLookup(p)||(P=!0,p=o);var q=t.defaultValue&&t.defaultValue!==p&&this.options.updateMissing;if(P||L||q){this.logger.log(q?"updateKey":"missingKey",u,s,o,q?t.defaultValue:p);var A=[],R=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&R&&R[0])for(var V=0;V<R.length;V++)A.push(R[V]);else"all"===this.options.saveMissingTo?A=this.languageUtils.toResolveHierarchy(t.lng||this.language):A.push(t.lng||this.language);var T=function(e,r){n.options.missingKeyHandler?n.options.missingKeyHandler(e,s,r,q?t.defaultValue:p,q,t):n.backendConnector&&n.backendConnector.saveMissing&&n.backendConnector.saveMissing(e,s,r,q?t.defaultValue:p,q,t),n.emit("missingKey",e,s,r,p)};if(this.options.saveMissing){var N=void 0!==t.count&&"string"!=typeof t.count;this.options.saveMissingPlurals&&N?A.forEach(function(e){var t=n.pluralResolver.getPluralFormsOfKey(e,o);t.forEach(function(t){return T([e],t)})}):T(A,o)}}p=this.extendTranslation(p,e,t,f),P&&p===o&&this.options.appendNamespaceToMissingKey&&(p="".concat(s,":").concat(o)),P&&this.options.parseMissingKeyHandler&&(p=this.options.parseMissingKeyHandler(p))}return p}},{key:"extendTranslation",value:function(e,t,n,r){var i=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,n,r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init(x({},n,{interpolation:x({},this.options.interpolation,n.interpolation)}));var o=n.replace&&"string"!=typeof n.replace?n.replace:n;this.options.interpolation.defaultVariables&&(o=x({},this.options.interpolation.defaultVariables,o)),e=this.interpolator.interpolate(e,o,n.lng||this.language,n),n.nest!==!1&&(e=this.interpolator.nest(e,function(){return i.translate.apply(i,arguments)},n)),n.interpolation&&this.interpolator.reset()}var a=n.postProcess||this.options.postProcess,s="string"==typeof a?[a]:a;return void 0!==e&&null!==e&&s&&s.length&&n.applyPostProcessor!==!1&&(e=D.handle(s,e,t,this.options&&this.options.postProcessPassResolved?x({i18nResolved:r},n):n,this)),e}},{key:"resolve",value:function(e){var t,n,r,i,o,a=this,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach(function(e){if(!a.isValidLookup(t)){var u=a.extractFromKey(e,s),l=u.key;n=l;var c=u.namespaces;a.options.fallbackNS&&(c=c.concat(a.options.fallbackNS));var f=void 0!==s.count&&"string"!=typeof s.count,p=void 0!==s.context&&"string"==typeof s.context&&""!==s.context,h=s.lngs?s.lngs:a.languageUtils.toResolveHierarchy(s.lng||a.language,s.fallbackLng);c.forEach(function(e){a.isValidLookup(t)||(o=e,!M["".concat(h[0],"-").concat(e)]&&a.utils&&a.utils.hasLoadedNamespace&&!a.utils.hasLoadedNamespace(o)&&(M["".concat(h[0],"-").concat(e)]=!0,a.logger.warn('key "'.concat(n,'" for namespace "').concat(o,'" for languages "').concat(h.join(", "),"\" won't get resolved as namespace was not yet loaded"),"This means something IS WRONG in your application setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),h.forEach(function(n){if(!a.isValidLookup(t)){i=n;var o=l,u=[o];if(a.i18nFormat&&a.i18nFormat.addLookupKeys)a.i18nFormat.addLookupKeys(u,l,n,e,s);else{var c;f&&(c=a.pluralResolver.getSuffix(n,s.count)),f&&p&&u.push(o+c),p&&u.push(o+="".concat(a.options.contextSeparator).concat(s.context)),f&&u.push(o+=c)}for(var h;h=u.pop();)a.isValidLookup(t)||(r=h,t=a.getResource(n,e,h,s))}}))})}}),{res:t,usedKey:n,exactUsedKey:r,usedLng:i,usedNS:o}}},{key:"isValidLookup",value:function(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}},{key:"getResource",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}}]),t}(T),_=function(){function e(t){k(this,e),this.options=t,this.whitelist=this.options.whitelist||!1,this.logger=V.create("languageUtils")}return j(e,[{key:"getScriptPartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return null;var t=e.split("-");return 2===t.length?null:(t.pop(),this.formatLanguageCode(t.join("-")))}},{key:"getLanguagePartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return e;var t=e.split("-");return this.formatLanguageCode(t[0])}},{key:"formatLanguageCode",value:function(e){if("string"==typeof e&&e.indexOf("-")>-1){var t=["hans","hant","latn","cyrl","cans","mong","arab"],n=e.split("-");return this.options.lowerCaseLng?n=n.map(function(e){return e.toLowerCase()}):2===n.length?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=d(n[1].toLowerCase()))):3===n.length&&(n[0]=n[0].toLowerCase(),2===n[1].length&&(n[1]=n[1].toUpperCase()),"sgn"!==n[0]&&2===n[2].length&&(n[2]=n[2].toUpperCase()),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=d(n[1].toLowerCase())),t.indexOf(n[2].toLowerCase())>-1&&(n[2]=d(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}},{key:"isWhitelisted",value:function(e){return("languageOnly"===this.options.load||this.options.nonExplicitWhitelist)&&(e=this.getLanguagePartFromCode(e)),!this.whitelist||!this.whitelist.length||this.whitelist.indexOf(e)>-1}},{key:"getFallbackCodes",value:function(e,t){if(!e)return[];if("string"==typeof e&&(e=[e]),"[object Array]"===Object.prototype.toString.apply(e))return e;if(!t)return e["default"]||[];var n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e["default"]),n||[]}},{key:"toResolveHierarchy",value:function(e,t){var n=this,r=this.getFallbackCodes(t||this.options.fallbackLng||[],e),i=[],o=function(e){e&&(n.isWhitelisted(e)?i.push(e):n.logger.warn("rejecting non-whitelisted language code: ".concat(e)))};return"string"==typeof e&&e.indexOf("-")>-1?("languageOnly"!==this.options.load&&o(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(e))):"string"==typeof e&&o(this.formatLanguageCode(e)),r.forEach(function(e){i.indexOf(e)<0&&o(n.formatLanguageCode(e))}),i}}]),e}(),H=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","id","ja","jbo","ka","kk","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he"],nr:[1,2,20,21],fc:22}],W={1:function(e){return Number(e>1)},2:function(e){return Number(1!=e)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(0===e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(1==e?0:e>=2&&e<=4?1:2)},7:function(e){return Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(1==e?0:2==e?1:8!=e&&11!=e?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(1==e?0:2==e?1:e<7?2:e<11?3:4)},11:function(e){return Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(0!==e)},14:function(e){return Number(1==e?0:2==e?1:3==e?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:0!==e?1:2)},17:function(e){return Number(1==e||e%10==1?0:1)},18:function(e){return Number(0==e?0:1==e?1:2)},19:function(e){return Number(1==e?0:0===e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(1==e?0:0===e||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0)},22:function(e){return Number(1===e?0:2===e?1:(e<0||e>10)&&e%10==0?2:3)}},B=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};k(this,e),this.languageUtils=t,this.options=n,this.logger=V.create("pluralResolver"),this.rules=g()}return j(e,[{key:"addRule",value:function(e,t){this.rules[e]=t}},{key:"getRule",value:function(e){return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}},{key:"needsPlural",value:function(e){var t=this.getRule(e);return t&&t.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(e,t){var n=this,r=[],i=this.getRule(e);return i?(i.numbers.forEach(function(i){var o=n.getSuffix(e,i);r.push("".concat(t).concat(o))}),r):r}},{key:"getSuffix",value:function(e,t){var n=this,r=this.getRule(e);if(r){var i=r.noAbs?r.plurals(t):r.plurals(Math.abs(t)),o=r.numbers[i];this.options.simplifyPluralSuffix&&2===r.numbers.length&&1===r.numbers[0]&&(2===o?o="plural":1===o&&(o=""));var a=function(){return n.options.prepend&&o.toString()?n.options.prepend+o.toString():o.toString()};return"v1"===this.options.compatibilityJSON?1===o?"":"number"==typeof o?"_plural_".concat(o.toString()):a():"v2"===this.options.compatibilityJSON?a():this.options.simplifyPluralSuffix&&2===r.numbers.length&&1===r.numbers[0]?a():this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString()}return this.logger.warn("no plural rule found for: ".concat(e)),""}}]),e}(),K=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};k(this,e),this.logger=V.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(e){return e},this.init(t)}return j(e,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});var t=e.interpolation;this.escape=void 0!==t.escape?t.escape:h,this.escapeValue=void 0===t.escapeValue||t.escapeValue,this.useRawValueToEscape=void 0!==t.useRawValueToEscape&&t.useRawValueToEscape,this.prefix=t.prefix?p(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?p(t.suffix):t.suffixEscaped||"}}",this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||",",this.unescapePrefix=t.unescapeSuffix?"":t.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":t.unescapeSuffix||"",this.nestingPrefix=t.nestingPrefix?p(t.nestingPrefix):t.nestingPrefixEscaped||p("$t("),this.nestingSuffix=t.nestingSuffix?p(t.nestingSuffix):t.nestingSuffixEscaped||p(")"),this.nestingOptionsSeparator=t.nestingOptionsSeparator?t.nestingOptionsSeparator:t.nestingOptionsSeparator||",",this.maxReplaces=t.maxReplaces?t.maxReplaces:1e3,this.alwaysFormat=void 0!==t.alwaysFormat&&t.alwaysFormat,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var e="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(e,"g");var t="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(t,"g");var n="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(n,"g")}},{key:"interpolate",value:function(e,t,n,r){function o(e){return e.replace(/\$/g,"$$$$")}var a,s,u,l=this,f=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},p=function(e){if(e.indexOf(l.formatSeparator)<0){var i=c(t,f,e);return l.alwaysFormat?l.format(i,void 0,n):i}var o=e.split(l.formatSeparator),a=o.shift().trim(),s=o.join(l.formatSeparator).trim();return l.format(c(t,f,a),s,n,r)};this.resetRegExp();var h=r&&r.missingInterpolationHandler||this.options.missingInterpolationHandler;for(u=0;a=this.regexpUnescape.exec(e);){if(s=p(a[1].trim()),void 0===s)if("function"==typeof h){var d=h(e,a,r);s="string"==typeof d?d:""}else this.logger.warn("missed to pass in variable ".concat(a[1]," for interpolating ").concat(e)),s="";else"string"==typeof s||this.useRawValueToEscape||(s=i(s));if(e=e.replace(a[0],o(s)),this.regexpUnescape.lastIndex=0,u++,u>=this.maxReplaces)break}for(u=0;a=this.regexp.exec(e);){if(s=p(a[1].trim()),void 0===s)if("function"==typeof h){var g=h(e,a,r);s="string"==typeof g?g:""}else this.logger.warn("missed to pass in variable ".concat(a[1]," for interpolating ").concat(e)),s="";else"string"==typeof s||this.useRawValueToEscape||(s=i(s));if(s=o(this.escapeValue?this.escape(s):s),e=e.replace(a[0],s),this.regexp.lastIndex=0,u++,u>=this.maxReplaces)break}return e}},{key:"nest",value:function(e,t){function n(e,t){var n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;var r=e.split(new RegExp("".concat(n,"[ ]*{"))),i="{".concat(r[1]);e=r[0],i=this.interpolate(i,u),i=i.replace(/'/g,'"');try{u=JSON.parse(i),t&&(u=x({},t,u))}catch(o){return this.logger.warn("failed parsing options string in nesting for key ".concat(e),o),"".concat(e).concat(n).concat(i)}return delete u.defaultValue,e}var r,o,a=this,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},u=x({},s);for(u.applyPostProcessor=!1,delete u.defaultValue;r=this.nestingRegexp.exec(e);){var l=[],c=!1;if(r[0].includes(this.formatSeparator)&&!/{.*}/.test(r[1])){var f=r[1].split(this.formatSeparator).map(function(e){return e.trim()}),p=E(f);r[1]=p[0],l=p.slice(1),c=!0}if(o=t(n.call(this,r[1].trim(),u),u),o&&r[0]===e&&"string"!=typeof o)return o;"string"!=typeof o&&(o=i(o)),o||(this.logger.warn("missed to resolve ".concat(r[1]," for nesting ").concat(e)),o=""),c&&(o=l.reduce(function(e,t){return a.format(e,t,s.lng,s)},o.trim())),e=e.replace(r[0],o),this.regexp.lastIndex=0}return e}}]),e}(),z=function(e){function t(e,n,r){var i,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return k(this,t),i=S(this,O(t).call(this)),F&&T.call(C(i)),i.backend=e,i.store=n,i.services=r,i.languageUtils=r.languageUtils,i.options=o,i.logger=V.create("backendConnector"),i.state={},i.queue=[],i.backend&&i.backend.init&&i.backend.init(r,o.backend,o),i}return L(t,e),j(t,[{key:"queueLoad",value:function(e,t,n,r){var i=this,o=[],a=[],s=[],u=[];return e.forEach(function(e){var r=!0;t.forEach(function(t){var s="".concat(e,"|").concat(t);!n.reload&&i.store.hasResourceBundle(e,t)?i.state[s]=2:i.state[s]<0||(1===i.state[s]?a.indexOf(s)<0&&a.push(s):(i.state[s]=1,r=!1,a.indexOf(s)<0&&a.push(s),o.indexOf(s)<0&&o.push(s),u.indexOf(t)<0&&u.push(t)))}),r||s.push(e)}),(o.length||a.length)&&this.queue.push({pending:a,loaded:{},errors:[],callback:r}),{toLoad:o,pending:a,toLoadLanguages:s,toLoadNamespaces:u}}},{key:"loaded",value:function n(e,t,r){var i=e.split("|"),o=q(i,2),a=o[0],s=o[1];t&&this.emit("failedLoading",a,s,t),r&&this.store.addResourceBundle(a,s,r),this.state[e]=t?-1:2;var n={};this.queue.forEach(function(r){u(r.loaded,[a],s),v(r.pending,e),t&&r.errors.push(t),0!==r.pending.length||r.done||(Object.keys(r.loaded).forEach(function(e){n[e]||(n[e]=[]),r.loaded[e].length&&r.loaded[e].forEach(function(t){n[e].indexOf(t)<0&&n[e].push(t)})}),r.done=!0,r.errors.length?r.callback(r.errors):r.callback())}),this.emit("loaded",n),this.queue=this.queue.filter(function(e){return!e.done})}},{key:"read",value:function(e,t,n){var r=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:350,a=arguments.length>5?arguments[5]:void 0;return e.length?this.backend[n](e,t,function(s,u){return s&&u&&i<5?void setTimeout(function(){r.read.call(r,e,t,n,i+1,2*o,a)},o):void a(s,u)}):a(null,{})}},{key:"prepareLoading",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);var o=this.queueLoad(e,t,r,i);return o.toLoad.length?void o.toLoad.forEach(function(e){n.loadOne(e)}):(o.pending.length||i(),null)}},{key:"load",value:function(e,t,n){this.prepareLoading(e,t,{},n)}},{key:"reload",value:function(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}},{key:"loadOne",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=e.split("|"),i=q(r,2),o=i[0],a=i[1];this.read(o,a,"read",void 0,void 0,function(r,i){r&&t.logger.warn("".concat(n,"loading namespace ").concat(a," for language ").concat(o," failed"),r),!r&&i&&t.logger.log("".concat(n,"loaded namespace ").concat(a," for language ").concat(o),i),t.loaded(e,r,i)})}},{key:"saveMissing",value:function(e,t,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};return this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t)?void this.logger.warn('did not save key "'.concat(n,'" for namespace "').concat(t,'" as the namespace was not yet loaded'),"This means something IS WRONG in your application setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!"):void(void 0!==n&&null!==n&&""!==n&&(this.backend&&this.backend.create&&this.backend.create(e,t,n,r,null,x({},o,{isUpdate:i})),e&&e[0]&&this.store.addResource(e[0],t,n,r)))}}]),t}(T),X=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;if(k(this,t),e=S(this,O(t).call(this)),F&&T.call(C(e)),e.options=y(n),e.services={},e.logger=V,e.modules={external:[]},r&&!e.isInitialized&&!n.isClone){if(!e.options.initImmediate)return e.init(n,r),S(e,C(e));setTimeout(function(){e.init(n,r)},0)}return e}return L(t,e),j(t,[{key:"init",value:function(){function e(e){return e?"function"==typeof e?new e:e:null}var t=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;if("function"==typeof r&&(i=r,r={}),this.options=x({},m(),this.options,y(r)),this.format=this.options.interpolation.format,i||(i=b),!this.options.isClone){this.modules.logger?V.init(e(this.modules.logger),this.options):V.init(null,this.options);var o=new _(this.options);this.store=new I(this.options.resources,this.options);
var a=this.services;a.logger=V,a.resourceStore=this.store,a.languageUtils=o,a.pluralResolver=new B(o,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),a.interpolator=new K(this.options),a.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},a.backendConnector=new z(e(this.modules.backend),a.resourceStore,a,this.options),a.backendConnector.on("*",function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];t.emit.apply(t,[e].concat(r))}),this.modules.languageDetector&&(a.languageDetector=e(this.modules.languageDetector),a.languageDetector.init(a,this.options.detection,this.options)),this.modules.i18nFormat&&(a.i18nFormat=e(this.modules.i18nFormat),a.i18nFormat.init&&a.i18nFormat.init(this)),this.translator=new U(this.services,this.options),this.translator.on("*",function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];t.emit.apply(t,[e].concat(r))}),this.modules.external.forEach(function(e){e.init&&e.init(t)})}this.modules.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");var s=["getResource","addResource","addResources","addResourceBundle","removeResourceBundle","hasResourceBundle","getResourceBundle","getDataByLanguage"];s.forEach(function(e){t[e]=function(){var n;return(n=t.store)[e].apply(n,arguments)}});var u=n(),l=function(){t.changeLanguage(t.options.lng,function(e,n){t.isInitialized=!0,t.logger.log("initialized",t.options),t.emit("initialized",t.options),u.resolve(n),i(e,n)})};return this.options.resources||!this.options.initImmediate?l():setTimeout(l,0),u}},{key:"loadResources",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:b,r=n,i="string"==typeof e?e:this.language;if("function"==typeof e&&(r=e),!this.options.resources||this.options.partialBundledLanguages){if(i&&"cimode"===i.toLowerCase())return r();var o=[],a=function(e){if(e){var n=t.services.languageUtils.toResolveHierarchy(e);n.forEach(function(e){o.indexOf(e)<0&&o.push(e)})}};if(i)a(i);else{var s=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);s.forEach(function(e){return a(e)})}this.options.preload&&this.options.preload.forEach(function(e){return a(e)}),this.services.backendConnector.load(o,this.options.ns,r)}else r(null)}},{key:"reloadResources",value:function(e,t,r){var i=n();return e||(e=this.languages),t||(t=this.options.ns),r||(r=b),this.services.backendConnector.reload(e,t,function(e){i.resolve(),r(e)}),i}},{key:"use",value:function(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&D.addPostProcessor(e),"3rdParty"===e.type&&this.modules.external.push(e),this}},{key:"changeLanguage",value:function(e,t){var r=this;this.isLanguageChangingTo=e;var i=n();this.emit("languageChanging",e);var o=function(e,n){n?(r.language=n,r.languages=r.services.languageUtils.toResolveHierarchy(n),r.translator.changeLanguage(n),r.isLanguageChangingTo=void 0,r.emit("languageChanged",n),r.logger.log("languageChanged",n)):r.isLanguageChangingTo=void 0,i.resolve(function(){return r.t.apply(r,arguments)}),t&&t(e,function(){return r.t.apply(r,arguments)})},a=function(e){e&&(r.language||(r.language=e,r.languages=r.services.languageUtils.toResolveHierarchy(e)),r.translator.language||r.translator.changeLanguage(e),r.services.languageDetector&&r.services.languageDetector.cacheUserLanguage(e)),r.loadResources(e,function(t){o(t,e)})};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(a):a(e):a(this.services.languageDetector.detect()),i}},{key:"getFixedT",value:function(e,t){var n=this,r=function i(e,t){var r;if("object"!==w(t)){for(var o=arguments.length,a=new Array(o>2?o-2:0),s=2;s<o;s++)a[s-2]=arguments[s];r=n.options.overloadTranslationOptionHandler([e,t].concat(a))}else r=x({},t);return r.lng=r.lng||i.lng,r.lngs=r.lngs||i.lngs,r.ns=r.ns||i.ns,n.t(e,r)};return"string"==typeof e?r.lng=e:r.lngs=e,r.ns=t,r}},{key:"t",value:function(){var e;return this.translator&&(e=this.translator).translate.apply(e,arguments)}},{key:"exists",value:function(){var e;return this.translator&&(e=this.translator).exists.apply(e,arguments)}},{key:"setDefaultNamespace",value:function(e){this.options.defaultNS=e}},{key:"hasLoadedNamespace",value:function(e){var t=this;if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var n=this.languages[0],r=!!this.options&&this.options.fallbackLng,i=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;var o=function(e,n){var r=t.services.backendConnector.state["".concat(e,"|").concat(n)];return r===-1||2===r};return!!this.hasResourceBundle(n,e)||(!this.services.backendConnector.backend||!(!o(n,e)||r&&!o(i,e)))}},{key:"loadNamespaces",value:function(e,t){var r=this,i=n();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach(function(e){r.options.ns.indexOf(e)<0&&r.options.ns.push(e)}),this.loadResources(function(e){i.resolve(),t&&t(e)}),i):(t&&t(),Promise.resolve())}},{key:"loadLanguages",value:function(e,t){var r=n();"string"==typeof e&&(e=[e]);var i=this.options.preload||[],o=e.filter(function(e){return i.indexOf(e)<0});return o.length?(this.options.preload=i.concat(o),this.loadResources(function(e){r.resolve(),t&&t(e)}),r):(t&&t(),Promise.resolve())}},{key:"dir",value:function(e){if(e||(e=this.languages&&this.languages.length>0?this.languages[0]:this.language),!e)return"rtl";var t=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam"];return t.indexOf(this.services.languageUtils.getLanguagePartFromCode(e))>=0?"rtl":"ltr"}},{key:"createInstance",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new t(e,n)}},{key:"cloneInstance",value:function(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:b,i=x({},this.options,n,{isClone:!0}),o=new t(i),a=["store","services","language"];return a.forEach(function(t){o[t]=e[t]}),o.services=x({},this.services),o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o.translator=new U(o.services,o.options),o.translator.on("*",function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];o.emit.apply(o,[e].concat(n))}),o.init(i,r),o.translator.options=o.options,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}}]),t}(T),$=new X;r.exports=$}()}),require.register("jquery-i18next/dist/commonjs/index.js",function(e,t,r){t=n(t,{},"jquery-i18next"),function(){"use strict";function t(e,t){function i(t,r,i){function o(e,t){return s.parseDefaultValueFromContent?n({},e,{defaultValue:t}):e}if(0!==r.length){var a="text";if(0===r.indexOf("[")){var u=r.split("]");r=u[1],a=u[0].substr(1,u[0].length-1)}if(r.indexOf(";")===r.length-1&&(r=r.substr(0,r.length-2)),"html"===a)t.html(e.t(r,o(i,t.html())));else if("text"===a)t.text(e.t(r,o(i,t.text())));else if("prepend"===a)t.prepend(e.t(r,o(i,t.html())));else if("append"===a)t.append(e.t(r,o(i,t.html())));else if(0===a.indexOf("data-")){var l=a.substr("data-".length),c=e.t(r,o(i,t.data(l)));t.data(l,c),t.attr(a,c)}else t.attr(a,e.t(r,o(i,t.attr(a))))}}function o(e,r){var o=e.attr(s.selectorAttr);if(o||"undefined"==typeof o||o===!1||(o=e.text()||e.val()),o){var a=e,u=e.data(s.targetAttr);if(u&&(a=e.find(u)||e),r||s.useOptionsAttr!==!0||(r=e.data(s.optionsAttr)),r=r||{},o.indexOf(";")>=0){var l=o.split(";");t.each(l,function(e,t){""!==t&&i(a,t.trim(),r)})}else i(a,o,r);if(s.useOptionsAttr===!0){var c={};c=n({clone:c},r),delete c.lng,e.data(s.optionsAttr,c)}}}function a(e){return this.each(function(){o(t(this),e);var n=t(this).find("["+s.selectorAttr+"]");n.each(function(){o(t(this),e)})})}var s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};s=n({},r,s),t[s.tName]=e.t.bind(e),t[s.i18nName]=e,t.fn[s.handleName]=a}Object.defineProperty(e,"__esModule",{value:!0});var n=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},r={tName:"t",i18nName:"i18n",handleName:"localize",selectorAttr:"data-i18n",targetAttr:"i18n-target",optionsAttr:"i18n-options",useOptionsAttr:!1,parseDefaultValueFromContent:!0};e["default"]={init:t}}()}),require.register("jquery-i18next/index.js",function(e,t,r){t=n(t,{},"jquery-i18next"),function(){r.exports=t("./dist/commonjs/index.js")["default"]}()}),require.register("js-cookie/src/js.cookie.js",function(e,t,r){t=n(t,{},"js-cookie"),function(){!function(t){var n;if("function"==typeof define&&define.amd&&(define(t),n=!0),"object"==typeof e&&(r.exports=t(),n=!0),!n){var i=window.Cookies,o=window.Cookies=t();o.noConflict=function(){return window.Cookies=i,o}}}(function(){function e(){for(var e=0,t={};e<arguments.length;e++){var n=arguments[e];for(var r in n)t[r]=n[r]}return t}function t(e){return e.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)}function n(r){function i(){}function o(t,n,o){if("undefined"!=typeof document){o=e({path:"/"},i.defaults,o),"number"==typeof o.expires&&(o.expires=new Date(1*new Date+864e5*o.expires)),o.expires=o.expires?o.expires.toUTCString():"";try{var a=JSON.stringify(n);/^[\{\[]/.test(a)&&(n=a)}catch(s){}n=r.write?r.write(n,t):encodeURIComponent(String(n)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),t=encodeURIComponent(String(t)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var u="";for(var l in o)o[l]&&(u+="; "+l,o[l]!==!0&&(u+="="+o[l].split(";")[0]));return document.cookie=t+"="+n+u}}function a(e,n){if("undefined"!=typeof document){for(var i={},o=document.cookie?document.cookie.split("; "):[],a=0;a<o.length;a++){var s=o[a].split("="),u=s.slice(1).join("=");n||'"'!==u.charAt(0)||(u=u.slice(1,-1));try{var l=t(s[0]);if(u=(r.read||r)(u,l)||t(u),n)try{u=JSON.parse(u)}catch(c){}if(i[l]=u,e===l)break}catch(c){}}return e?i[e]:i}}return i.set=o,i.get=function(e){return a(e,!1)},i.getJSON=function(e){return a(e,!0)},i.remove=function(t,n){o(t,"",e(n,{expires:-1}))},i.defaults={},i.withConverter=n,i}return n(function(){})})}()}),require.register("node-fetch/browser.js",function(e,t,r){t=n(t,{},"node-fetch"),function(){"use strict";var t=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if("undefined"!=typeof n)return n;throw new Error("unable to locate global object")},n=t();r.exports=e=n.fetch,n.fetch&&(e["default"]=n.fetch.bind(n)),e.Headers=n.Headers,e.Request=n.Request,e.Response=n.Response}()}),require.register("process/browser.js",function(e,t,r){t=n(t,{},"process"),function(){function e(){throw new Error("setTimeout has not been defined")}function t(){throw new Error("clearTimeout has not been defined")}function n(t){if(l===setTimeout)return setTimeout(t,0);if((l===e||!l)&&setTimeout)return l=setTimeout,setTimeout(t,0);try{return l(t,0)}catch(n){try{return l.call(null,t,0)}catch(n){return l.call(this,t,0)}}}function i(e){if(c===clearTimeout)return clearTimeout(e);if((c===t||!c)&&clearTimeout)return c=clearTimeout,clearTimeout(e);try{return c(e)}catch(n){try{return c.call(null,e)}catch(n){return c.call(this,e)}}}function o(){d&&p&&(d=!1,p.length?h=p.concat(h):g=-1,h.length&&a())}function a(){if(!d){var e=n(o);d=!0;for(var t=h.length;t;){for(p=h,h=[];++g<t;)p&&p[g].run();g=-1,t=h.length}p=null,d=!1,i(e)}}function s(e,t){this.fun=e,this.array=t}function u(){}var l,c,f=r.exports={};!function(){try{l="function"==typeof setTimeout?setTimeout:e}catch(n){l=e}try{c="function"==typeof clearTimeout?clearTimeout:t}catch(n){c=t}}();var p,h=[],d=!1,g=-1;f.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];h.push(new s(e,t)),1!==h.length||d||n(a)},s.prototype.run=function(){this.fun.apply(null,this.array)},f.title="browser",f.browser=!0,f.env={},f.argv=[],f.version="",f.versions={},f.on=u,f.addListener=u,f.once=u,f.off=u,f.removeListener=u,f.removeAllListeners=u,f.emit=u,f.prependListener=u,f.prependOnceListener=u,f.listeners=function(e){return[]},f.binding=function(e){throw new Error("process.binding is not supported")},f.cwd=function(){return"/"},f.chdir=function(e){throw new Error("process.chdir is not supported")},f.umask=function(){return 0}}()}),require.alias("countup.js/dist/countUp.min.js","countup.js"),require.alias("domurl/url.min.js","domurl"),require.alias("i18next/dist/cjs/i18next.js","i18next"),require.alias("i18next-browser-languagedetector/dist/cjs/i18nextBrowserLanguageDetector.js","i18next-browser-languagedetector"),require.alias("i18next-http-backend/cjs/index.js","i18next-http-backend"),require.alias("js-cookie/src/js.cookie.js","js-cookie"),require.alias("node-fetch/browser.js","node-fetch"),require.alias("process/browser.js","process"),e=require("process"),require.register("___globals___",function(e,t,n){})}(),require("___globals___"); |
var esprima = require('esprima');
module.exports = function (src, file) {
if (typeof src !== 'string') src = String(src);
try {
Function(src);
return;
}
catch (err) {
if (err.constructor.name !== 'SyntaxError') throw err;
return errorInfo(src, file);
}
};
function errorInfo (src, file) {
try {
esprima.parse(src);
return;
}
catch (err) {
return new ParseError(err, src, file);
}
}
function ParseError (err, src, file) {
SyntaxError.call(this);
this.message = err.message.replace(/^Line \d+: /, '');
this.line = err.lineNumber;
this.column = err.column;
this.annotated = '\n'
+ (file || '(anonymous file)')
+ ':' + this.line
+ '\n'
+ src.split('\n')[this.line - 1]
+ '\n'
+ Array(this.column).join(' ') + '^'
+ '\n'
+ 'ParseError: ' + this.message
;
}
ParseError.prototype = new SyntaxError;
ParseError.prototype.toString = function () {
return this.annotated;
};
ParseError.prototype.inspect = function () {
return this.annotated;
};
|
const { Buffer } = require('buffer');
const { spawn } = require('child_process');
module.exports = {
splitCommandAndArgs: function (command) {
const regex = new RegExp('"[^"]+"|[\\S]+', 'g');
return command.match(regex).map(s => s.replace(/"/g, ''));
}, exec: async (command, options={}) => {
return new Promise((resolve, reject) => {
let items = module.exports.splitCommandAndArgs(command);
const child = spawn(items[0], items.slice(1), options);
if(options.detached) {
child.unref();
resolve(child.pid);
return;
}
let match = false;
let output = new Buffer.from('');
child.stdout.on('data', (data) => {
if (options.matcher && options.matcher.test(data)) {
match = true;
child.kill('SIGTERM');
resolve();
return;
}
output = Buffer.concat([output, data]);
if (options.verbose) {
console.log(data.toString());
}
});
child.stderr.on('data', (data) => {
output = Buffer.concat([output, data]);
if (options.verbose) {
console.log(data.toString());
}
});
child.on('close', (code) => {
if (code !== 0 && !match) {
console.error(`Command execution failed with code: ${code}`);
reject(new Error(code));
}
else {
resolve(output);
}
});
});
}
}
|
/*
SPDX-License-Identifier: Apache-2.0
*/
'use strict';
const State = require('./state.js');
/**
* StateList provides a named virtual container for a set of ledger states.
* Each state has a unique key which associates it with the container, rather
* than the container containing a link to the state. This minimizes collisions
* for parallel transactions on different states.
*/
class StateList {
/**
* Store Fabric context for subsequent API access, and name of list
*/
constructor(ctx, listName) {
this.ctx = ctx;
this.name = listName;
this.id = 0;
this.supportedClasses = {};
}
/**
* Add a state to the list. Creates a new state in worldstate with
* appropriate composite key. Note that state defines its own key.
* State object is serialized before writing.
*/
async addState(state) {
let key = this.name + state.getKey();
console.log('This composite key: ' + key);
let data = State.serialize(state);
await this.ctx.stub.putState(key, data);
return key;
}
/**
* Get a state from the list using supplied keys. Form composite
* keys to retrieve state from world state. State data is deserialized
* into JSON object before being returned.
*/
async getState(key) {
let ledgerKey = this.name + state.getKey();
let data = await this.ctx.stub.getState(ledgerKey);
let state = State.deserialize(data, this.supportedClasses);
return state;
}
/**
* Update a state in the list. Puts the new state in world state with
* appropriate composite key. Note that state defines its own key.
* A state is serialized before writing. Logic is very similar to
* addState() but kept separate becuase it is semantically distinct.
*/
async updateState(state) {
let key = this.name + state.getKey();
let data = State.serialize(state);
await this.ctx.stub.putState(key, data);
}
/** Stores the class for future deserialization */
use(stateClass) {
this.supportedClasses[stateClass.getClass()] = stateClass;
}
}
module.exports = StateList; |
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
from enum import Enum
from six import with_metaclass
from azure.core import CaseInsensitiveEnumMeta
class GeoReplicationStatusType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)):
"""The status of the secondary location
"""
LIVE = "live"
BOOTSTRAP = "bootstrap"
UNAVAILABLE = "unavailable"
class StorageErrorCode(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)):
"""Error codes returned by the service
"""
ACCOUNT_ALREADY_EXISTS = "AccountAlreadyExists"
ACCOUNT_BEING_CREATED = "AccountBeingCreated"
ACCOUNT_IS_DISABLED = "AccountIsDisabled"
AUTHENTICATION_FAILED = "AuthenticationFailed"
AUTHORIZATION_FAILURE = "AuthorizationFailure"
CONDITION_HEADERS_NOT_SUPPORTED = "ConditionHeadersNotSupported"
CONDITION_NOT_MET = "ConditionNotMet"
EMPTY_METADATA_KEY = "EmptyMetadataKey"
INSUFFICIENT_ACCOUNT_PERMISSIONS = "InsufficientAccountPermissions"
INTERNAL_ERROR = "InternalError"
INVALID_AUTHENTICATION_INFO = "InvalidAuthenticationInfo"
INVALID_HEADER_VALUE = "InvalidHeaderValue"
INVALID_HTTP_VERB = "InvalidHttpVerb"
INVALID_INPUT = "InvalidInput"
INVALID_MD5 = "InvalidMd5"
INVALID_METADATA = "InvalidMetadata"
INVALID_QUERY_PARAMETER_VALUE = "InvalidQueryParameterValue"
INVALID_RANGE = "InvalidRange"
INVALID_RESOURCE_NAME = "InvalidResourceName"
INVALID_URI = "InvalidUri"
INVALID_XML_DOCUMENT = "InvalidXmlDocument"
INVALID_XML_NODE_VALUE = "InvalidXmlNodeValue"
MD5_MISMATCH = "Md5Mismatch"
METADATA_TOO_LARGE = "MetadataTooLarge"
MISSING_CONTENT_LENGTH_HEADER = "MissingContentLengthHeader"
MISSING_REQUIRED_QUERY_PARAMETER = "MissingRequiredQueryParameter"
MISSING_REQUIRED_HEADER = "MissingRequiredHeader"
MISSING_REQUIRED_XML_NODE = "MissingRequiredXmlNode"
MULTIPLE_CONDITION_HEADERS_NOT_SUPPORTED = "MultipleConditionHeadersNotSupported"
OPERATION_TIMED_OUT = "OperationTimedOut"
OUT_OF_RANGE_INPUT = "OutOfRangeInput"
OUT_OF_RANGE_QUERY_PARAMETER_VALUE = "OutOfRangeQueryParameterValue"
REQUEST_BODY_TOO_LARGE = "RequestBodyTooLarge"
RESOURCE_TYPE_MISMATCH = "ResourceTypeMismatch"
REQUEST_URL_FAILED_TO_PARSE = "RequestUrlFailedToParse"
RESOURCE_ALREADY_EXISTS = "ResourceAlreadyExists"
RESOURCE_NOT_FOUND = "ResourceNotFound"
SERVER_BUSY = "ServerBusy"
UNSUPPORTED_HEADER = "UnsupportedHeader"
UNSUPPORTED_XML_NODE = "UnsupportedXmlNode"
UNSUPPORTED_QUERY_PARAMETER = "UnsupportedQueryParameter"
UNSUPPORTED_HTTP_VERB = "UnsupportedHttpVerb"
INVALID_MARKER = "InvalidMarker"
MESSAGE_NOT_FOUND = "MessageNotFound"
MESSAGE_TOO_LARGE = "MessageTooLarge"
POP_RECEIPT_MISMATCH = "PopReceiptMismatch"
QUEUE_ALREADY_EXISTS = "QueueAlreadyExists"
QUEUE_BEING_DELETED = "QueueBeingDeleted"
QUEUE_DISABLED = "QueueDisabled"
QUEUE_NOT_EMPTY = "QueueNotEmpty"
QUEUE_NOT_FOUND = "QueueNotFound"
AUTHORIZATION_SOURCE_IP_MISMATCH = "AuthorizationSourceIPMismatch"
AUTHORIZATION_PROTOCOL_MISMATCH = "AuthorizationProtocolMismatch"
AUTHORIZATION_PERMISSION_MISMATCH = "AuthorizationPermissionMismatch"
AUTHORIZATION_SERVICE_MISMATCH = "AuthorizationServiceMismatch"
AUTHORIZATION_RESOURCE_TYPE_MISMATCH = "AuthorizationResourceTypeMismatch"
FEATURE_VERSION_MISMATCH = "FeatureVersionMismatch"
|
(window.webpackJsonp=window.webpackJsonp||[]).push([[5],{339:function(t,e,r){"use strict";r.r(e);var o=r(8),n=Object(o.a)({},(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[r("h2",{attrs:{id:"🔨-已发现的bug"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#🔨-已发现的bug"}},[t._v("#")]),t._v(" 🔨 已发现的Bug")]),t._v(" "),r("ul",[r("li",[t._v("[x] css并不能适配所有主题,请有问题的用户自己调整。")]),t._v(" "),r("li",[t._v("[x] 发表说说得时候,第一次会失败,即使你的密码正确。但并无任何提示,js判断逻辑也无问题,就是没有存储到leancloud,页面重新加载之后 恢复正常 。算是~解决~了吧。提交成功后会刷新界面。")]),t._v(" "),r("li",[t._v("[x] 不支持"),r("code",[t._v("<a>")]),t._v("标签,于"),r("code",[t._v("1.2.1")]),t._v("版本已修复。")]),t._v(" "),r("li",[t._v("[x] Hexo可能会通过自带的渲染插件将"),r("code",[t._v('"')]),t._v("渲染成"),r("code",[t._v("“")]),t._v("导致js所需的参数出错。解决办法是在hexo根目录下的"),r("code",[t._v("_config.yml")]),t._v("文件中添加以下语句")])]),t._v(" "),r("div",{staticClass:"language- extra-class"},[r("pre",{pre:!0,attrs:{class:"language-text"}},[r("code",[t._v("kramed:\n smartypants: false\n")])])]),r("ul",[r("li",[t._v("[x] 某些Hexo主题可能会对图片的链接进行处理。比如说将图片链接渲染出来的时候添加上"),r("code",[t._v("a")]),t._v("标签,导致所需参数赋值异常。目前想到的办法由两种\n一:hexo中自带的标签,标定不渲染的部分,将"),r("code",[t._v("md")]),t._v("文件中的js部分标中选择不渲染\n二: 下载js后直接把赋值放在js中\n注意,这两种办法都是可以直接解决上面两种bug的(引号和图片链接的渲染)")]),t._v(" "),r("li",[t._v("[x] 获取发布说说的设备的api似乎不是很给力。换一个应该就可以了。引用os.js判断发布系统。对于移动端不用的浏览器返回的返回的设备和位置仍然不准确。版本"),r("code",[t._v("2.1.2")]),t._v("中取消位置显示。")]),t._v(" "),r("li",[t._v("[x] 因为我的不严谨,在源码中少了一个"),r("code",[t._v("</div>")]),t._v("导致部分博客框架出现div错位的情况,已解决。")])]),t._v(" "),r("h3",{attrs:{id:"🔨-遇到问题自己排错的方法"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#🔨-遇到问题自己排错的方法"}},[t._v("#")]),t._v(" 🔨 遇到问题自己排错的方法")]),t._v(" "),r("ol",[r("li",[t._v("查看js和css是否成功引用。")]),t._v(" "),r("li",[t._v("检查是否使用的是leancloud的国际版")])]),t._v(" "),r("div",{staticClass:"custom-block tip"},[r("p",{staticClass:"custom-block-title"},[t._v("成功案例")]),t._v(" "),r("p",[t._v("若遇到无法解决的问题,可联系一下与你相同框架主题的小伙伴提问。也欢迎你加入成功案例。")])]),t._v(" "),r("table",[r("thead",[r("tr",[r("th",[t._v("博主")]),t._v(" "),r("th",[t._v("链接")]),t._v(" "),r("th",[t._v("框架")]),t._v(" "),r("th",[t._v("主题")])])]),t._v(" "),r("tbody",[r("tr",[r("td",[t._v("Uncle_drew")]),t._v(" "),r("td",[r("a",{attrs:{href:"https://cndrew.cn/shuoshuo/",target:"_blank",rel:"noopener noreferrer"}},[t._v("https://cndrew.cn/shuoshuo/"),r("OutboundLink")],1)]),t._v(" "),r("td",[t._v("Hexo")]),t._v(" "),r("td",[r("a",{attrs:{href:"https://github.com/honjun/hexo-theme-sakura",target:"_blank",rel:"noopener noreferrer"}},[t._v("Sakura"),r("OutboundLink")],1)])]),t._v(" "),r("tr",[r("td",[t._v("Jankin")]),t._v(" "),r("td",[r("a",{attrs:{href:"https://chenzkun.top/shuoshuo/",target:"_blank",rel:"noopener noreferrer"}},[t._v("https://chenzkun.top/shuoshuo/"),r("OutboundLink")],1)]),t._v(" "),r("td",[t._v("Hexo")]),t._v(" "),r("td",[r("a",{attrs:{href:"https://github.com/jerryc127/hexo-theme-butterfly",target:"_blank",rel:"noopener noreferrer"}},[t._v("Butterfly"),r("OutboundLink")],1)])]),t._v(" "),r("tr",[r("td",[t._v("segment-tree")]),t._v(" "),r("td",[r("a",{attrs:{href:"https://segment-tree.top/talk/",target:"_blank",rel:"noopener noreferrer"}},[t._v("https://segment-tree.top/talk/"),r("OutboundLink")],1)]),t._v(" "),r("td",[t._v("Hexo")]),t._v(" "),r("td",[r("a",{attrs:{href:"https://volantis.js.org/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Volantis"),r("OutboundLink")],1)])]),t._v(" "),r("tr",[r("td",[t._v("cungudafa")]),t._v(" "),r("td",[r("a",{attrs:{href:"https://cungudafa.top/artitalk/",target:"_blank",rel:"noopener noreferrer"}},[t._v("https://cungudafa.top/artitalk/"),r("OutboundLink")],1)]),t._v(" "),r("td",[t._v("Hexo")]),t._v(" "),r("td",[r("a",{attrs:{href:"https://github.com/jerryc127/hexo-theme-butterfly",target:"_blank",rel:"noopener noreferrer"}},[t._v("Butterfly"),r("OutboundLink")],1)])]),t._v(" "),r("tr",[r("td",[t._v("AngelNI")]),t._v(" "),r("td",[r("a",{attrs:{href:"https://angelni.github.io/AngelNI.github.io/suisuinian/",target:"_blank",rel:"noopener noreferrer"}},[t._v("https://angelni.github.io/AngelNI.github.io/suisuinian/"),r("OutboundLink")],1)]),t._v(" "),r("td",[t._v("Hexo")]),t._v(" "),r("td",[r("a",{attrs:{href:"https://github.com/jerryc127/hexo-theme-butterfly",target:"_blank",rel:"noopener noreferrer"}},[t._v("Butterfly"),r("OutboundLink")],1)])]),t._v(" "),r("tr",[r("td",[t._v("GH670")]),t._v(" "),r("td",[r("a",{attrs:{href:"https://wblog.tech/photos/Sshuo.html",target:"_blank",rel:"noopener noreferrer"}},[t._v("https://wblog.tech/photos/Sshuo.html"),r("OutboundLink")],1)]),t._v(" "),r("td",[t._v("Hexo")]),t._v(" "),r("td",[r("a",{attrs:{href:"https://github.com/GH670/yileas",target:"_blank",rel:"noopener noreferrer"}},[t._v("Yileas"),r("OutboundLink")],1)])]),t._v(" "),r("tr",[r("td",[t._v("zzx0826")]),t._v(" "),r("td",[r("a",{attrs:{href:"https://www.zzx0826.top/shuoshuo/",target:"_blank",rel:"noopener noreferrer"}},[t._v("https://www.zzx0826.top/shuoshuo/"),r("OutboundLink")],1)]),t._v(" "),r("td",[t._v("Hexo")]),t._v(" "),r("td",[r("a",{attrs:{href:"https://github.com/jerryc127/hexo-theme-butterfly",target:"_blank",rel:"noopener noreferrer"}},[t._v("Butterfly"),r("OutboundLink")],1)])])])]),t._v(" "),r("p",[t._v("如果以上都解决不了你的问题,请"),r("a",{attrs:{href:"/contact"}},[t._v("联系")]),t._v("我。")]),t._v(" "),r("h2",{attrs:{id:"🚩-未来想要实现的功能"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#🚩-未来想要实现的功能"}},[t._v("#")]),t._v(" 🚩 未来想要实现的功能")]),t._v(" "),r("ul",[r("li",[t._v("[] 说说的评论及点赞功能。")])])])}),[],!1,null,null,null);e.default=n.exports}}]); |
load("8b38e12cab5de21ec5393724c0d9b7dd.js");
//-------------------------------------------------------------------------------------------------------
// Copyright (C) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
//-------------------------------------------------------------------------------------------------------
function foo() {
var x = "bp A";
x; /**bp(A):evaluate('x');enableBp('B');deleteBp('D');**/
x = "Hit loc B";
x; /**loc(B):evaluate('x');disableBp('C');**/
x = "bp C, BUG";
x; /**bp(C):evaluate('x');**/
x = "bp D, BUG";
x; /**bp(D):evaluate('x');**/
x = "bp D";
x; /**bp:evaluate('x');**/
}
WScript.Attach(foo);
WScript.Detach(foo);
WScript.Attach(foo);
WScript.Echo("pass");
|
import React from "react"
import Layout from "../components/layout"
const ExternalLink = props => (
<li style={{ marginRight: `1rem` }}>
<a style={{ textShadow: `none`, color : '#000' }} href={props.to} target="_blank">{props.children}</a>
</li>
)
export default function Home() {
return (
<Layout template="home">
<div className="text-center">
<h3 style={{ color: '#fff' }}>
<strong>Hi! I'm building a fake Gatsby site! </strong>
</h3>
<p className="mx-auto" style={{ color: '#fff' }}>This website is part of lots of tutorials. Here somes of links :
<ul style={{ border: '2px solid #000', padding: '2em', borderRadius: '5px' }} className="mt-4">
<ExternalLink to="https://fr.reactjs.org/docs/thinking-in-react.html" children="Penser en React sur la doc officielle de React js"/>
<ExternalLink to="https://www.taniarascia.com/how-to-connect-to-an-api-with-javascript/" children="How to connect to an API with JS, par Tania Rascia"/>
<ExternalLink to="https://www.taniarascia.com/getting-started-with-react/" children="React Tutorial: An overview and walkthrough, par Tania Rascia"/>
</ul>
</p>
</div>
</Layout>
);
}
|
#!/usr/bin/env python
from mininet.net import Mininet
from mininet.cli import CLI
from mininet.link import Link, TCLink,Intf
from subprocess import Popen, PIPE
from mininet.log import setLogLevel
if '__main__' == __name__:
setLogLevel('info')
net = Mininet(link=TCLink)
# key = "net.mptcp.mptcp_enabled"
# value = 1
# p = Popen("sysctl -w %s=%s" % (key, value), shell=True, stdout=PIPE, stderr=PIPE)
# stdout, stderr = p.communicate()
# print "stdout=",stdout,"stderr=", stderr
h1 = net.addHost('h1')
h2 = net.addHost('h2')
r1 = net.addHost('r1')
linkopt_wifi={'bw':10, 'delay':'50ms', "loss":5}
linkopt_4g={'bw':10, 'delay':'50ms', "loss":5}
linkopt2={'bw':100}
net.addLink(r1,h1,cls=TCLink, **linkopt_wifi)
net.addLink(r1,h1,cls=TCLink, **linkopt_4g)
net.addLink(r1,h2,cls=TCLink, **linkopt2)
net.build()
r1.cmd("ifconfig r1-eth0 0")
r1.cmd("ifconfig r1-eth1 0")
r1.cmd("ifconfig r1-eth2 0")
h1.cmd("ifconfig h1-eth0 0")
h1.cmd("ifconfig h1-eth1 0")
h2.cmd("ifconfig h2-eth0 0")
r1.cmd("echo 1 > /proc/sys/net/ipv4/ip_forward")
r1.cmd("ifconfig r1-eth0 10.0.0.1 netmask 255.255.255.0")
r1.cmd("ifconfig r1-eth1 10.0.1.1 netmask 255.255.255.0")
r1.cmd("ifconfig r1-eth2 10.0.2.1 netmask 255.255.255.0")
h1.cmd("ifconfig h1-eth0 10.0.0.2 netmask 255.255.255.0")
h1.cmd("ifconfig h1-eth1 10.0.1.2 netmask 255.255.255.0")
h2.cmd("ifconfig h2-eth0 10.0.2.2 netmask 255.255.255.0")
h1.cmd("ip rule add from 10.0.0.2 table 1")
h1.cmd("ip rule add from 10.0.1.2 table 2")
h1.cmd("ip route add 10.0.0.0/24 dev h1-eth0 scope link table 1")
h1.cmd("ip route add default via 10.0.0.1 dev h1-eth0 table 1")
h1.cmd("ip route add 10.0.1.0/24 dev h1-eth1 scope link table 2")
h1.cmd("ip route add default via 10.0.1.1 dev h1-eth1 table 2")
h1.cmd("ip route add default scope global nexthop via 10.0.0.1 dev h1-eth0")
h2.cmd("ip rule add from 10.0.2.2 table 1")
h2.cmd("ip route add 10.0.2.0/24 dev h2-eth0 scope link table 1")
h2.cmd("ip route add default via 10.0.2.1 dev h2-eth0 table 1")
h2.cmd("ip route add default scope global nexthop via 10.0.2.1 dev h2-eth0")
CLI(net)
net.stop()
|
import React, { useState } from 'react';
import { NavLink } from 'react-router-dom';
import { MdClose } from 'react-icons/md';
import { FiMenu } from 'react-icons/fi';
const Navbar = () => {
const [navbarOpen, setNavbarOpen] = useState(false);
const links = [
{
id: 1,
path: '/',
text: 'Home',
},
{
id: 2,
path: '/about',
text: 'About',
},
];
const handleToggle = () => {
setNavbarOpen(!navbarOpen);
};
const closeMenu = () => {
setNavbarOpen(false);
};
return (
<nav className="navBar">
<button type="button" onClick={handleToggle}>
{
navbarOpen
? (
<MdClose
style={{ color: '#fff', width: '40px', height: '40px' }}
/>
)
: (
<FiMenu
style={{ color: '#7b7b7b', width: '40px', height: '40px' }}
/>
)
}
</button>
<ul className={`menuNav ${navbarOpen ? ' showMenu' : ''}`}>
{links.map((link) => (
<li key={link.id}>
<NavLink
to={link.path}
activeClassName="active-link"
onClick={() => closeMenu()}
exact
>
{link.text}
</NavLink>
</li>
))}
</ul>
</nav>
);
};
export default Navbar;
|
import Item from "./item";
const List = ({listData, deleteData, submittingDataStatus}) => {
return (
<div className="list">
{listData.map((item) => {
const {note, date, time, id} = item;
return (
<Item
key={id}
id={id}
note={note}
date={date}
time={time}
deleteData={deleteData}
submittingDataStatus={submittingDataStatus}
/>
);
})}
</div>
);
};
export default List;
|
import json
class Comment:
def __init__(self, **args):
if len(args) != len(self.params):
raise KeyError("different number of params")
for key, value in args.items():
if key in self.params:
setattr(self, key, value)
else:
raise KeyError("unknown attribute: %s" % key)
def jsonify(self):
out = {"type": self.__class__.__name__}
for param in self.params:
out[param] = getattr(self, param)
return json.dumps(out, separators=(',', ':'))
class Approved(Comment):
def __init__(self, bot=None, **args):
# Because homu needs to leave a comment for itself to kick off a build,
# we need to know the correct botname to use. However, we don't want to
# save that botname in our state JSON. So we need a custom constructor
# to grab the botname and delegate the rest of the keyword args to the
# Comment constructor.
super().__init__(**args)
self.bot = bot
params = ["sha", "approver"]
def render(self):
# The comment here is required because Homu wants a full, unambiguous,
# pinned commit hash to kick off the build, and this note-to-self is
# how it gets it. This is to safeguard against situations where Homu
# reloads and another commit has been pushed since the approval.
message = ":pushpin: Commit {sha} has been " + \
"approved by `{approver}`\n\n" + \
"<!-- @{bot} r={approver} {sha} -->"
return message.format(
sha=self.sha,
approver=self.approver,
bot=self.bot
)
class ApprovalIgnoredWip(Comment):
def __init__(self, wip_keyword=None, **args):
# We want to use the wip keyword in the message, but not in the json
# blob.
super().__init__(**args)
self.wip_keyword = wip_keyword
params = ["sha"]
def render(self):
message = ':clipboard:' + \
' Looks like this PR is still in progress,' + \
' ignoring approval.\n\n' + \
'Hint: Remove **{wip_keyword}** from this PR\'s title when' + \
' it is ready for review.'
return message.format(wip_keyword=self.wip_keyword)
class Delegated(Comment):
params = ["delegator", "delegate"]
def render(self):
message = ':v: @{} can now approve this pull request'
return message.format(self.delegate)
class BuildStarted(Comment):
params = ["head_sha", "merge_sha"]
def render(self):
return ":hourglass: Testing commit %s with merge %s..." % (
self.head_sha, self.merge_sha,
)
class TryBuildStarted(Comment):
params = ["head_sha", "merge_sha"]
def render(self):
return ":hourglass: Trying commit %s with merge %s..." % (
self.head_sha, self.merge_sha,
)
class BuildCompleted(Comment):
params = ["approved_by", "base_ref", "builders", "merge_sha"]
def render(self):
urls = ", ".join(
"[%s](%s)" % kv for kv in sorted(self.builders.items())
)
return (
":sunny: Test successful - %s\n"
"Approved by: %s\n"
"Pushing %s to %s..."
% (
urls, self.approved_by, self.merge_sha, self.base_ref,
)
)
class TryBuildCompleted(Comment):
params = ["builders", "merge_sha"]
def render(self):
urls = ", ".join(
"[%s](%s)" % kv for kv in sorted(self.builders.items())
)
return ":sunny: Try build successful - %s\nBuild commit: %s (`%s`)" % (
urls, self.merge_sha, self.merge_sha,
)
class BuildFailed(Comment):
params = ["builder_url", "builder_name"]
def render(self):
return ":broken_heart: Test failed - [%s](%s)" % (
self.builder_name, self.builder_url
)
class TryBuildFailed(Comment):
params = ["builder_url", "builder_name"]
def render(self):
return ":broken_heart: Test failed - [%s](%s)" % (
self.builder_name, self.builder_url
)
class TimedOut(Comment):
params = []
def render(self):
return ":boom: Test timed out"
|
import base64
import datetime
import json
import logging
from cryptography import x509
from cryptography.hazmat.backends import default_backend
from cryptography.hazmat.primitives import hashes, serialization
from cryptography.hazmat.primitives.asymmetric import rsa
from cryptography.x509.oid import NameOID
from dateutil import parser
from django.urls import reverse
from django.utils import timezone
from zentral.conf import settings
from zentral.utils.certificates import split_certificate_chain
from .crypto import decrypt_cms_payload
from .dep_client import DEPClient, DEPClientError
from .models import DEPDevice
logger = logging.getLogger("zentral.contrib.mdm.dep")
def build_dep_token_certificate(dep_token):
private_key = rsa.generate_private_key(
public_exponent=65537,
key_size=2048,
backend=default_backend()
)
public_key = private_key.public_key()
builder = x509.CertificateBuilder()
builder = builder.subject_name(x509.Name([
x509.NameAttribute(NameOID.COMMON_NAME, u'zentral-dep-token-{}'.format(dep_token.pk)),
]))
builder = builder.issuer_name(x509.Name([
x509.NameAttribute(NameOID.COMMON_NAME, u'zentral'),
]))
now = timezone.now()
one_day = datetime.timedelta(days=1)
builder = builder.not_valid_before(now - one_day)
builder = builder.not_valid_after(now + 2 * one_day)
builder = builder.serial_number(x509.random_serial_number())
builder = builder.public_key(public_key)
builder = builder.add_extension(
x509.BasicConstraints(ca=False, path_length=None), critical=True,
)
certificate = builder.sign(
private_key=private_key, algorithm=hashes.SHA256(),
backend=default_backend()
)
return certificate, private_key
def add_dep_token_certificate(dep_token):
certificate, private_key = build_dep_token_certificate(dep_token)
dep_token.certificate = certificate.public_bytes(serialization.Encoding.PEM)
dep_token.private_key = private_key.private_bytes(
encoding=serialization.Encoding.PEM,
format=serialization.PrivateFormat.TraditionalOpenSSL,
encryption_algorithm=serialization.NoEncryption()
)
dep_token.save()
def decrypt_dep_token(dep_token, payload):
decrypted_payload = decrypt_cms_payload(payload, dep_token.private_key)
message_lines = []
found_tag = False
for line in decrypted_payload.splitlines():
line = line.decode("utf-8")
if found_tag and line != "-----END MESSAGE-----":
message_lines.append(line)
if line == "-----BEGIN MESSAGE-----":
found_tag = True
return json.loads("".join(message_lines))
def serialize_dep_profile(dep_enrollment):
payload = {"profile_name": dep_enrollment.name,
"url": "{}{}".format(
settings["api"]["tls_hostname"],
reverse("mdm:dep_enroll", args=(dep_enrollment.enrollment_secret.secret,))
),
"devices": [dep_device.serial_number
for dep_device in dep_enrollment.depdevice_set.all()]}
# do authentication in webview if a realm is present
if dep_enrollment.realm:
payload["configuration_web_url"] = "{}{}".format(
settings["api"]["tls_hostname"],
reverse("mdm:dep_web_enroll", args=(dep_enrollment.enrollment_secret.secret,))
)
# standard attibutes
for attr in ("allow_pairing",
"auto_advance_setup",
"await_device_configured",
"is_mandatory",
"is_mdm_removable",
"is_multi_user",
"is_supervised",
"skip_setup_items"):
payload[attr] = getattr(dep_enrollment, attr)
# optional strings
for attr in ("department",
"language",
"org_magic",
"region",
"support_phone_number",
"support_email_address",
):
val = getattr(dep_enrollment, attr)
if val:
val = val.strip()
if val:
payload[attr] = val
# certificates
if dep_enrollment.include_tls_certificates:
anchor_certs = []
crypto_backend = default_backend()
for pem_data in split_certificate_chain(settings["api"]["tls_fullchain"]):
certificate = x509.load_pem_x509_certificate(pem_data.encode("utf-8"), crypto_backend)
der_bytes = certificate.public_bytes(serialization.Encoding.DER)
anchor_certs.append(base64.b64encode(der_bytes).decode("utf-8"))
if anchor_certs:
payload["anchor_certs"] = anchor_certs
return payload
def dep_device_update_dict(device):
update_d = {}
# standard nullable attibutes
for attr in ("device_assigned_by",
"profile_status",
"profile_uuid"):
try:
update_d[attr] = device[attr]
except KeyError:
pass
# datetime nullable attributes
for attr in ("device_assigned_date",
"profile_assign_time",
"profile_push_time"):
val = device.get(attr, None)
if val:
val = parser.parse(val)
update_d[attr] = val
return update_d
def sync_dep_virtual_server_devices(dep_virtual_server, force_fetch=False):
dep_token = dep_virtual_server.token
client = DEPClient.from_dep_token(dep_token)
if force_fetch or not dep_token.sync_cursor:
fetch = True
devices = client.fetch_devices()
else:
fetch = False
devices = client.sync_devices(dep_token.sync_cursor)
found_serial_numbers = []
for device in devices:
serial_number = device["serial_number"]
found_serial_numbers.append(serial_number)
defaults = {"virtual_server": dep_virtual_server}
# sync
if not fetch:
op_type = device["op_type"]
op_date = parser.parse(device["op_date"])
if timezone.is_aware(op_date):
op_date = timezone.make_naive(op_date)
try:
dep_device = DEPDevice.objects.get(serial_number=serial_number)
except DEPDevice.DoesNotExist:
dep_device = None
if dep_device and dep_device.last_op_date and dep_device.last_op_date > op_date:
# already applied a newer operation. skip stalled one.
continue
else:
defaults["last_op_type"] = op_type
defaults["last_op_date"] = op_date
defaults.update(dep_device_update_dict(device))
yield DEPDevice.objects.update_or_create(serial_number=serial_number, defaults=defaults)
dep_token.sync_cursor = devices.cursor
dep_token.last_synced_at = timezone.now()
dep_token.save()
if fetch:
# mark all other existing token devices as deleted
(DEPDevice.objects.filter(virtual_server=dep_virtual_server)
.exclude(serial_number__in=found_serial_numbers)
.update(last_op_type=DEPDevice.OP_TYPE_DELETED))
def assign_dep_device_profile(dep_device, dep_profile):
dep_client = DEPClient.from_dep_virtual_server(dep_device.virtual_server)
serial_number = dep_device.serial_number
profile_uuid = str(dep_profile.uuid)
response = dep_client.assign_profile(profile_uuid, [serial_number])
try:
result = response["devices"][serial_number]
except KeyError:
raise DEPClientError("Unknown client response structure")
if result == "SUCCESS":
# fetch a fresh device record and apply the updates
updated_device = dep_client.get_devices([serial_number])[serial_number]
for attr, val in dep_device_update_dict(updated_device).items():
setattr(dep_device, attr, val)
dep_device.save()
else:
err_msg = "Could not assigne profile {} to device {}: {}".format(profile_uuid, serial_number, result)
logger.error(err_msg)
raise DEPClientError(err_msg)
def add_dep_profile(dep_profile):
dep_client = DEPClient.from_dep_virtual_server(dep_profile.virtual_server)
profile_payload = serialize_dep_profile(dep_profile)
profile_response = dep_client.add_profile(profile_payload)
dep_profile.uuid = profile_response["profile_uuid"]
dep_profile.save()
success_devices = []
not_accessible_devices = []
failed_devices = []
for serial_number, result in profile_response["devices"].items():
if result == "SUCCESS":
success_devices.append(serial_number)
elif result == "NOT_ACCESSIBLE":
not_accessible_devices.append(serial_number)
elif result == "FAILED":
failed_devices.append(serial_number)
else:
raise DEPClientError("Unknown result {} {}".format(serial_number, result))
if failed_devices:
# TODO: implement retry
raise DEPClientError("Failed devices!")
# update dep devices
# TODO: Performance: this could concern a LOT of devices
if success_devices:
for serial_number, updated_device in dep_client.get_devices(success_devices).items():
dep_device = DEPDevice.objects.get(serial_number=serial_number)
for attr, val in dep_device_update_dict(updated_device).items():
setattr(dep_device, attr, val)
dep_device.save()
# mark unaccessible devices as deleted
# TODO: better?
if not_accessible_devices:
(DEPDevice.objects.filter(serial_number__in=not_accessible_devices)
.update(last_op_type=DEPDevice.OP_TYPE_DELETED))
def refresh_dep_device(dep_device):
dep_client = DEPClient.from_dep_virtual_server(dep_device.virtual_server)
devices = dep_client.get_devices([dep_device.serial_number])
if dep_device.serial_number not in devices:
dep_device.last_op_type = DEPDevice.OP_TYPE_DELETED
dep_device.save()
raise DEPClientError("Could not find device.")
else:
for attr, val in dep_device_update_dict(devices[dep_device.serial_number]).items():
setattr(dep_device, attr, val)
dep_device.save()
|
/**
* @overview Flickslider class.
* @project UI flicksliders.
* @author Anton Parkhomenko
* @version 1.0
*/
goog.provide('DD.ui.flickSliders.PanMenu');
goog.require('DD.ui.flickSliders.FlickSlider');
goog.require('DD.ui.flickSliders.renderer.PanMenu');
goog.require('DD.ui.flickSliders.SlidePanMenu');
goog.require('goog.ui.registry');
/**
* Компонент вертикального меню, появляющегося при взаимподействии указателя по области назначения компонента
* @constructor
* @param {Object=} [params] Список входящих параметров
* @this DD.ui.flickSliders.PanMenu
* @extends DD.ui.flickSliders.FlickSlider
* @author Антон Пархоменко
*/
DD.ui.flickSliders.PanMenu = function(params)
{
DD.ui.flickSliders.FlickSlider.call(this, params);
var defaults =
{
hideTime : 300,
overlay : false,
overlayColor : '#000',
overlayOpacity : .3,
fadeSpeed : 300,
/** Область воздействия на компонент, передается DOM-элемент */
actionTarget : null
};
params = params || {};
this.params_ = this.assignParams(params, defaults);
this.slideClass_ = DD.ui.flickSliders.SlidePanMenu;
this.hideTimer_ = null;
};
goog.inherits(DD.ui.flickSliders.PanMenu, DD.ui.flickSliders.FlickSlider);
goog.ui.registry.setDefaultRenderer(DD.ui.flickSliders.PanMenu, DD.ui.flickSliders.renderer.PanMenu);
goog.scope(function()
{
/** @alias DD.ui.flickSliders.PanMenu.prototype */
var prototype = DD.ui.flickSliders.PanMenu.prototype;
var superClass_ = DD.ui.flickSliders.PanMenu.superClass_;
// prototype.setActiveBarCaption = function(value)
// {
// this.renderer_.setActiveBarCaption(this, value);
// this.activeBarCaption_ = value;
// };
/** @inheritdoc */
prototype.append = function(options)
{
return superClass_.append.call(this, this.slideClass_, options);
};
/**
* Убирает из поля зрения по истечении заданного промежутка времени
*/
prototype.hideByTimer = function()
{
var this_ = this;
clearTimeout(this.hideTimer_);
this.hideTimer_ = setTimeout(function()
{
this_.hide();
}, this.params_.hideTime);
}
/**
* Метод скрытия компонента
*/
prototype.hide = function()
{
this.renderer_.hide(this);
};
/** @inheritdoc */
prototype.select = function(index)
{
superClass_.select.call(this, index);
this.renderer_.select_(this, index);
};
/**
* Метод обновления компонента в момент изменения размеров окна браузера
*/
prototype.resize = function()
{
this.renderer_.resize(this);
};
}); // goog.scoope |
//Desafio 2.0
//CAPTURANDO O ELEMENTO HTML USANDO UM ATRIBUTO AO INVÉS DA CLASSE PARA PRATICAR O USO DO DATA ATTRIBUTE:
var logo = document.querySelector(".android-logo-image");
//ADICIONANDO UM ESCUTADOR NO ELEMENTO DO BOTÃO VIEW SOURCE, QUE AO SER CLICADO IRÁ COLOCAR A VARIÁVEL E O EVENTO NO DATALAYER:
logo.addEventListener("click", function(){
dataLayer.push({
'event': 'eventoTeste',
});
});
|
"use strict";
var _babelHelpers = require("./utils/babelHelpers.js");
exports.__esModule = true;
var _react = _babelHelpers.interopRequireDefault(require("react"));
var _Icon = require("./Icon");
var FilledCalendarViewDay =
/*#__PURE__*/
function FilledCalendarViewDay(props) {
return _react.default.createElement(_Icon.Icon, props, _react.default.createElement("path", {
d: "M3 17h18v2H3zm0-7h18v5H3zm0-4h18v2H3z"
}));
};
exports.FilledCalendarViewDay = FilledCalendarViewDay; |
module.exports = () => ({
before: (handler, next) => {
const { event } = handler
if (event.hasOwnProperty('httpMethod')) {
event.queryStringParameters = event.queryStringParameters || {}
event.multiValueQueryStringParameters = event.multiValueQueryStringParameters || {}
event.pathParameters = event.pathParameters || {}
}
return next()
}
})
|
/*************************************************!
*
* project: liteAccordion - a horizontal accordion plugin for jQuery
* author: Nicola Hibbert
* url: http://nicolahibbert.com/liteaccordion-v2/
* demo: http://www.nicolahibbert.com/demo/liteAccordion/
*
* Version: 2.1.1
* Copyright: (c) 2010-2012 Nicola Hibbert
* Licence: MIT
*
**************************************************/
;(function($) {
var LiteAccordion = function(elem, options) {
var defaults = {
containerWidth : 960, // fixed (px)
containerHeight : 320, // fixed (px)
headerWidth : 48, // fixed (px)
responsive : false, // overrides the above three settings, accordion adjusts to fill container
autoScaleImages : false, // if a single image is placed within the slide, this will be automatically scaled to fit
minContainerWidth : 300, // minimum width the accordion will resize to
maxContainerWidth : 960, // maximum width the accordion will resize to
activateOn : 'click', // click or mouseover
firstSlide : 1, // displays slide (n) on page load
slideSpeed : 800, // slide animation speed
onTriggerSlide : function(e) {}, // callback on slide activate
onSlideAnimComplete : function() {}, // callback on slide anim complete
autoPlay : false, // automatically cycle through slides
pauseOnHover : false, // pause on hover
cycleSpeed : 6000, // time between slide cycles
easing : 'swing', // custom easing function
theme : 'basic', // basic, dark, light, or stitch
rounded : false, // square or rounded corners
enumerateSlides : false, // put numbers on slides
linkable : false // link slides via hash
},
// merge defaults with options in new settings object
settings = $.extend({}, defaults, options),
// 'globals'
slides = elem.children('ol').children('li'),
header = slides.children(':first-child'),
slideLen = slides.length,
slideWidth = settings.containerWidth - slideLen * settings.headerWidth,
// public methods
methods = {
// start elem animation
play : function(index) {
var next = core.nextSlide(index && index);
if (core.playing) return;
// start autoplay
core.playing = setInterval(function() {
header.eq(next()).trigger('click.liteAccordion');
}, settings.cycleSpeed);
},
// stop elem animation
stop : function() {
clearInterval(core.playing);
core.playing = 0;
},
// trigger next slide
next : function() {
methods.stop();
header.eq(core.currentSlide === slideLen - 1 ? 0 : core.currentSlide + 1).trigger('click.liteAccordion');
},
// trigger previous slide
prev : function() {
methods.stop();
header.eq(core.currentSlide - 1).trigger('click.liteAccordion');
},
// destroy plugin instance
destroy : function() {
// stop autoplay
methods.stop();
// remove hashchange event bound to window
$(window).off('.liteAccordion');
// remove generated styles, classes, data, events
elem
.attr('style', '')
.removeClass('liteAccordion basic dark light stitch')
.removeData('liteAccordion')
.off('.liteAccordion')
.find('li > :first-child')
.off('.liteAccordion')
.filter('.selected')
.removeClass('selected')
.end()
.find('b')
.remove();
slides
.removeClass('slide')
.children()
.attr('style', '');
},
// poke around the internals (NOT CHAINABLE)
debug : function() {
return {
elem : elem,
defaults : defaults,
settings : settings,
methods : methods,
core : core
};
}
},
// core utility and animation methods
core = {
// set style properties
setStyles : function() {
// set container height and width, theme and corner style
elem
.width(settings.containerWidth)
.height(settings.containerHeight)
.addClass('liteAccordion')
.addClass(settings.rounded && 'rounded')
.addClass(settings.theme);
// set slide heights
slides
.addClass('slide')
.children(':first-child')
.height(settings.headerWidth);
// set slide positions
core.setSlidePositions();
// override container and slide widths for responsive setting
if (settings.responsive) {
core.responsive();
} else {
// trigger autoScaleImages once for fixed width accordions
if (settings.autoScaleImages) core.autoScaleImages();
}
},
// set initial positions for each slide
setSlidePositions : function() {
var selected = header.filter('.selected');
// account for already selected slide
if (!selected.length) header.eq(settings.firstSlide - 1).addClass('selected');
header.each(function(index) {
var $this = $(this),
left = index * settings.headerWidth,
margin = header.first().next(),
offset = parseInt(margin.css('marginLeft'), 10) || parseInt(margin.css('marginRight'), 10) || 0;
// compensate for already selected slide on resize
if (selected.length) {
if (index > header.index(selected)) left += slideWidth;
} else {
if (index >= settings.firstSlide) left += slideWidth;
}
// set each slide position
$this
.css('left', left)
.width(settings.containerHeight)
.next()
.width(slideWidth - offset)
.css({ left : left, paddingLeft : settings.headerWidth });
// add number to bottom of tab
settings.enumerateSlides && $this.append('<b>' + (index + 1) + '</b>');
});
},
// responsive styles
responsive : function() {
var parentWidth = elem.parent().width();
// set new container width
if (parentWidth > settings.minContainerWidth) {
settings.containerWidth = parentWidth < settings.maxContainerWidth ? parentWidth : settings.maxContainerWidth;
} else if (parentWidth < settings.maxContainerWidth) {
settings.containerWidth = parentWidth > settings.minContainerWidth ? parentWidth : settings.minContainerWidth;
}
// set new container height
settings.containerHeight = settings.containerWidth / 3 | 0;
// resize slides
slideWidth = settings.containerWidth - slideLen * settings.headerWidth;
// resize container
elem
.width(settings.containerWidth)
.height(settings.containerHeight);
// resize slides
slides
.children(':first-child')
.width(settings.containerHeight);
// set slide positions
core.setSlidePositions();
},
// scale images contained within a slide to fit the slide height and width
autoScaleImages : function() {
slides.children('div').each(function() {
var $this = $(this),
$imgs = $this.find('img');
if ($imgs.length) {
$imgs.each(function(index, item) {
$(item).width($this.width() + 1); // fix the anti-aliasing bug in chrome
$(item).height($this.height());
});
}
});
},
// bind click and mouseover events
bindEvents : function() {
var resizeTimer = 0;
if (settings.activateOn === 'click') {
header.on('click.liteAccordion', core.triggerSlide);
} else if (settings.activateOn === 'mouseover') {
header.on('click.liteAccordion mouseover.liteAccordion', core.triggerSlide);
}
// pause on hover (can't use custom events with $.hover())
if (settings.pauseOnHover && settings.autoPlay) {
elem
.on('mouseover.liteAccordion', function() {
core.playing && methods.stop();
})
.on('mouseout.liteAccordion', function() {
!core.playing && methods.play(core.currentSlide);
});
}
// resize and orientationchange
if (settings.responsive) {
$(window)
.on('load.liteAccordion', function() {
if (settings.autoScaleImages) core.autoScaleImages();
})
.on('resize.liteAccordion orientationchange.liteAccordion', function() {
// approximates 'onresizeend'
clearTimeout(resizeTimer);
resizeTimer = setTimeout(function() {
core.responsive();
if (settings.autoScaleImages) core.autoScaleImages();
}, 100);
});
}
},
linkable : function() {
var cacheSlideNames = (function() {
var slideNames = [];
slides.each(function() {
if ($(this).attr('data-slide-name')) slideNames.push(($(this).attr('data-slide-name')).toLowerCase());
});
// memoize
return cacheSlideNames = slideNames;
})();
var triggerHash = function(e) {
var index;
if (e.type === 'load' && !window.location.hash) return;
if (e.type === 'hashchange' && core.playing) return;
index = $.inArray((window.location.hash.slice(1)).toLowerCase(), cacheSlideNames);
if (index > -1 && index < cacheSlideNames.length) header.eq(index).trigger('click.liteAccordion');
};
$(window).on('hashchange.liteAccordion load.liteAccordion', triggerHash);
},
// counter for autoPlay (zero index firstSlide on init)
currentSlide : settings.firstSlide - 1,
// next slide index
nextSlide : function(index) {
var next = index + 1 || core.currentSlide + 1;
// closure
return function() {
return next++ % slideLen;
};
},
// holds interval counter
playing : 0,
slideAnimCompleteFlag : false,
// trigger slide animation
triggerSlide : function(e) {
var $this = $(this),
tab = {
elem : $this,
index : header.index($this),
next : $this.next(),
prev : $this.parent().prev().children('h2')
};
// update core.currentSlide
core.currentSlide = tab.index;
// reset onSlideAnimComplete callback flag
core.slideAnimCompleteFlag = false;
// set location.hash
if (settings.linkable && !core.playing) window.location.hash = $this.parent().attr('data-slide-name');
// trigger callback in context of sibling div (jQuery wrapped)
settings.onTriggerSlide.call(tab.next, $this);
// animate
if ($this.hasClass('selected') && $this.position().left < slideWidth / 2) {
// animate single selected tab
core.animSlide(tab);
} else {
// animate groups
core.animSlideGroup(tab);
}
// stop autoplay, reset current slide index in core.nextSlide closure
if (e.originalEvent && settings.autoPlay) {
methods.stop();
methods.play(header.index(header.filter('.selected')));
}
},
animSlide : function(triggerTab) {
var _this = this;
// set pos for single selected tab
if (typeof this.pos === 'undefined') this.pos = slideWidth;
// remove, then add selected class
header.removeClass('selected').filter(this.elem).addClass('selected');
// if slide index not zero
if (!!this.index) {
this.elem
.add(this.next)
.stop(true)
.animate({
left : this.pos + this.index * settings.headerWidth
},
settings.slideSpeed,
settings.easing,
function() {
// flag ensures that fn is only called one time per triggerSlide
if (!core.slideAnimCompleteFlag) {
// trigger onSlideAnimComplete callback in context of sibling div (jQuery wrapped)
settings.onSlideAnimComplete.call(triggerTab ? triggerTab.next : _this.prev.next());
core.slideAnimCompleteFlag = true;
}
});
// remove, then add selected class
header.removeClass('selected').filter(this.prev).addClass('selected');
}
},
// animates left and right groups of slides
animSlideGroup : function(triggerTab) {
var group = ['left', 'right'];
$.each(group, function(index, side) {
var filterExpr, left;
if (side === 'left') {
filterExpr = ':lt(' + (triggerTab.index + 1) + ')';
left = 0;
} else {
filterExpr = ':gt(' + triggerTab.index + ')';
left = slideWidth;
}
slides
.filter(filterExpr)
.children('h2')
.each(function() {
var $this = $(this),
tab = {
elem : $this,
index : header.index($this),
next : $this.next(),
prev : $this.parent().prev().children('h2'),
pos : left
};
// trigger item anim, pass original trigger context for callback fn
core.animSlide.call(tab, triggerTab);
});
});
// remove, then add selected class
header.removeClass('selected').filter(triggerTab.elem).addClass('selected');
},
ieClass : function(version) {
if (version < 7) methods.destroy();
if (version === 7 || version === 8) {
slides.each(function(index) {
$(this).addClass('slide-' + index);
});
}
elem.addClass('ie ie' + version);
},
init : function() {
var ua = navigator.userAgent,
index = ua.indexOf('MSIE');
// test for ie
if (index !== -1) {
ua = ua.slice(index + 5, index + 6);
core.ieClass(+ua);
}
// init styles and events
core.setStyles();
core.bindEvents();
// check slide speed is not faster than cycle speed
if (settings.cycleSpeed < settings.slideSpeed) settings.cycleSpeed = settings.slideSpeed;
// init hash links
if (settings.linkable && 'onhashchange' in window) core.linkable();
// init autoplay
settings.autoPlay && methods.play();
}
};
// init plugin
core.init();
// expose methods
return methods;
};
$.fn.liteAccordion = function(method) {
var elem = this,
instance = elem.data('liteAccordion');
// if creating a new instance
if (typeof method === 'object' || !method) {
return elem.each(function() {
var liteAccordion;
// if plugin already instantiated, return
if (instance) return;
// otherwise create a new instance
liteAccordion = new LiteAccordion(elem, method);
elem.data('liteAccordion', liteAccordion);
});
// otherwise, call method on current instance
} else if (typeof method === 'string' && instance[method]) {
// debug method isn't chainable b/c we need the debug object to be returned
if (method === 'debug') {
return instance[method].call(elem);
} else { // the rest of the methods are chainable though
instance[method].call(elem);
return elem;
}
}
};
})(jQuery); |
'use strict';
const reduceRecursiveCore = require('./reduce-recursive-core');
const reverseRecursive = require('./reverse-recursive');
function reduceRightRecursive(arr, callback, initialValue) {
return reduceRecursiveCore(reverseRecursive(arr), callback, initialValue);
}
module.exports = reduceRightRecursive;
|
/*
Massively by HTML5 UP
html5up.net | @ajlkn
Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
*/
(function($) {
var $window = $(window),
$body = $('body'),
$wrapper = $('#wrapper'),
$header = $('#header'),
$nav = $('#nav'),
$main = $('#main'),
$navPanelToggle, $navPanel, $navPanelInner;
// Breakpoints.
breakpoints({
default: ['1681px', null ],
xlarge: ['1281px', '1680px' ],
large: ['981px', '1280px' ],
medium: ['737px', '980px' ],
small: ['481px', '736px' ],
xsmall: ['361px', '480px' ],
xxsmall: [null, '360px' ]
});
/**
* Applies parallax scrolling to an element's background image.
* @return {jQuery} jQuery object.
*/
$.fn._parallax = function(intensity) {
var $window = $(window),
$this = $(this);
if (this.length == 0 || intensity === 0)
return $this;
if (this.length > 1) {
for (var i=0; i < this.length; i++)
$(this[i])._parallax(intensity);
return $this;
}
if (!intensity)
intensity = 0.25;
$this.each(function() {
var $t = $(this),
$bg = $('<div class="bg"></div>').appendTo($t),
on, off;
on = function() {
$bg
.removeClass('fixed')
.css('transform', 'matrix(1,0,0,1,0,0)');
$window
.on('scroll._parallax', function() {
var pos = parseInt($window.scrollTop()) - parseInt($t.position().top);
$bg.css('transform', 'matrix(1,0,0,1,0,' + (pos * intensity) + ')');
});
};
off = function() {
$bg
.addClass('fixed')
.css('transform', 'none');
$window
.off('scroll._parallax');
};
// Disable parallax on ..
if (browser.name == 'ie' // IE
|| browser.name == 'edge' // Edge
|| window.devicePixelRatio > 1 // Retina/HiDPI (= poor performance)
|| browser.mobile) // Mobile devices
off();
// Enable everywhere else.
else {
breakpoints.on('>large', on);
breakpoints.on('<=large', off);
}
});
$window
.off('load._parallax resize._parallax')
.on('load._parallax resize._parallax', function() {
$window.trigger('scroll');
});
return $(this);
};
// Play initial animations on page load.
$window.on('load', function() {
window.setTimeout(function() {
$body.removeClass('is-preload');
}, 100);
});
// Scrolly.
$('.scrolly').scrolly();
// Background.
$wrapper._parallax(0.925);
// Nav Panel.
// Toggle.
$navPanelToggle = $(
'<a href="#navPanel" id="navPanelToggle">Menu</a>'
)
.appendTo($wrapper);
// Change toggle styling once we've scrolled past the header.
$header.scrollex({
bottom: '5vh',
enter: function() {
$navPanelToggle.removeClass('alt');
},
leave: function() {
$navPanelToggle.addClass('alt');
}
});
// Panel.
$navPanel = $(
'<div id="navPanel">' +
'<nav>' +
'</nav>' +
'<a href="#navPanel" class="close"></a>' +
'</div>'
)
.appendTo($body)
.panel({
delay: 500,
hideOnClick: true,
hideOnSwipe: true,
resetScroll: true,
resetForms: true,
side: 'right',
target: $body,
visibleClass: 'is-navPanel-visible'
});
// Get inner.
$navPanelInner = $navPanel.children('nav');
// Move nav content on breakpoint change.
var $navContent = $nav.children();
breakpoints.on('>medium', function() {
// NavPanel -> Nav.
$navContent.appendTo($nav);
// Flip icon classes.
$nav.find('.icons, .icon')
.removeClass('alt');
});
breakpoints.on('<=medium', function() {
// Nav -> NavPanel.
$navContent.appendTo($navPanelInner);
// Flip icon classes.
$navPanelInner.find('.icons, .icon')
.addClass('alt');
});
// Hack: Disable transitions on WP.
if (browser.os == 'wp'
&& browser.osVersion < 10)
$navPanel
.css('transition', 'none');
// Intro.
var $intro = $('#intro');
if ($intro.length > 0) {
// Hack: Fix flex min-height on IE.
if (browser.name == 'ie') {
$window.on('resize.ie-intro-fix', function() {
var h = $intro.height();
if (h > $window.height())
$intro.css('height', 'auto');
else
$intro.css('height', h);
}).trigger('resize.ie-intro-fix');
}
// Hide intro on scroll (> small).
breakpoints.on('>small', function() {
$main.unscrollex();
$main.scrollex({
mode: 'bottom',
top: '25vh',
bottom: '-50vh',
enter: function() {
$intro.addClass('hidden');
},
leave: function() {
$intro.removeClass('hidden');
}
});
});
// Hide intro on scroll (<= small).
breakpoints.on('<=small', function() {
$main.unscrollex();
$main.scrollex({
mode: 'middle',
top: '15vh',
bottom: '-15vh',
enter: function() {
$intro.addClass('hidden');
},
leave: function() {
$intro.removeClass('hidden');
}
});
});
}
})(jQuery); |
from itertools import product
from mip import Model, BINARY
n = m = 3
times = [[2, 1, 2],
[1, 2, 2],
[1, 2, 1]]
M = sum(times[i][j] for i in range(n) for j in range(m))
machines = [[2, 0, 1],
[1, 2, 0],
[2, 1, 0]]
model = Model('JSSP')
c = model.add_var(name="C")
x = [[model.add_var(name='x({},{})'.format(j+1, i+1))
for i in range(m)] for j in range(n)]
y = [[[model.add_var(var_type=BINARY, name='y({},{},{})'.format(j+1, k+1, i+1))
for i in range(m)] for k in range(n)] for j in range(n)]
model.objective = c
for (j, i) in product(range(n), range(1, m)):
model += x[j][machines[j][i]] - x[j][machines[j][i-1]] >= \
times[j][machines[j][i-1]]
for (j, k) in product(range(n), range(n)):
if k != j:
for i in range(m):
model += x[j][i] - x[k][i] + M*y[j][k][i] >= times[k][i]
model += -x[j][i] + x[k][i] - M*y[j][k][i] >= times[j][i] - M
for j in range(n):
model += c - x[j][machines[j][m - 1]] >= times[j][machines[j][m - 1]]
model.optimize()
print("Completion time: ", c.x)
for (j, i) in product(range(n), range(m)):
print("task %d starts on machine %d at time %g " % (j+1, i+1, x[j][i].x))
|
from __future__ import absolute_import
from __future__ import print_function
import os
import sys
import shutil
import glob
import importlib
from ._all_keywords import r_keywords
from ._py_components_generation import reorder_props
# Declaring longer string templates as globals to improve
# readability, make method logic clearer to anyone inspecting
# code below
r_component_string = '''{prefix}{name} <- function({default_argtext}{wildcards}) {{
{wildcard_declaration}
component <- list(
props = list({default_paramtext}{wildcards}),
type = '{name}',
namespace = '{project_shortname}',
propNames = c({prop_names}{wildcard_names}),
package = '{package_name}'
)
component$props <- filter_null(component$props)
structure(component, class = c('dash_component', 'list'))
}}''' # noqa:E501
# the following strings represent all the elements in an object
# of the html_dependency class, which will be propagated by
# iterating over _js_dist in __init__.py
frame_open_template = '''.{rpkgname}_js_metadata <- function() {{
deps_metadata <- list('''
frame_element_template = '''`{dep_name}` = structure(list(name = "{dep_name}",
version = "{project_ver}", src = list(href = NULL,
file = "deps/"), meta = NULL,
script = "{dep_rpp}",
stylesheet = NULL, head = NULL, attachment = NULL, package = "{rpkgname}",
all_files = FALSE), class = "html_dependency")'''
frame_body_template = '''`{project_shortname}` = structure(list(name = "{project_shortname}",
version = "{project_ver}", src = list(href = NULL,
file = "deps/"), meta = NULL,
script = "{dep_rpp}",
stylesheet = NULL, head = NULL, attachment = NULL, package = "{rpkgname}",
all_files = FALSE), class = "html_dependency")''' # noqa:E501
frame_close_template = ''')
return(deps_metadata)
}'''
help_string = '''% Auto-generated: do not edit by hand
\\name{{{prefix}{name}}}
\\alias{{{prefix}{name}}}
\\title{{{name} component}}
\\description{{
{description}
}}
\\usage{{
{prefix}{name}({default_argtext}, ...)
}}
\\arguments{{
{item_text}
}}
'''
description_template = '''Package: {package_name}
Title: {package_description}
Version: {package_version}
Authors @R: as.person(c({package_author}))
Description: {package_description}
Depends: R (>= 3.5.0)
Suggests: testthat, roxygen2
License: {package_license}
URL: {package_url}
BugReports: {package_issues}
Encoding: UTF-8
LazyData: true
Author: {package_author_no_email}
Maintainer: {package_author}
'''
rbuild_ignore_string = r'''# ignore JS config files/folders
node_modules/
coverage/
src/
lib/
.babelrc
.builderrc
.eslintrc
.npmignore
# demo folder has special meaning in R
# this should hopefully make it still
# allow for the possibility to make R demos
demo/.*\.js
demo/.*\.html
demo/.*\.css
# ignore python files/folders
setup.py
usage.py
setup.py
requirements.txt
MANIFEST.in
CHANGELOG.md
test/
# CRAN has weird LICENSE requirements
LICENSE.txt
^.*\.Rproj$
^\.Rproj\.user$
'''
pkghelp_stub = '''% Auto-generated: do not edit by hand
\\docType{{package}}
\\name{{{package_name}-package}}
\\alias{{{package_name}}}
\\title{{{pkg_help_header}}}
\\description{{
{pkg_help_desc}
}}
\\seealso{{
Useful links:
\\itemize{{
\\item \\url{{https://github.com/plotly/{lib_name}}}
\\item Report bugs at \\url{{https://github.com/plotly/{lib_name}/issues}}
}}
}}
\\author{{
\\strong{{Maintainer}}: {package_author}
}}
'''
# pylint: disable=R0914
def generate_class_string(name, props, project_shortname, prefix):
# Here we convert from snake case to camel case
package_name = snake_case_to_camel_case(project_shortname)
# Ensure props are ordered with children first
props = reorder_props(props=props)
prop_keys = list(props.keys())
wildcards = ''
wildcard_declaration = ''
wildcard_names = ''
if any('-*' in key for key in prop_keys):
wildcards = ', ...'
wildcard_declaration =\
'\n wildcard_names = names(assert_valid_wildcards(...))\n'
wildcard_names = ', wildcard_names'
default_paramtext = ''
default_argtext = ''
default_wildcards = ''
# Produce a string with all property names other than WCs
prop_names = ", ".join(
'\'{}\''.format(p)
for p in prop_keys
if '*' not in p and
p not in ['setProps']
)
# in R, we set parameters with no defaults to NULL
# Here we'll do that if no default value exists
default_wildcards += ", ".join(
'\'{}\''.format(p)
for p in prop_keys
if '*' in p
)
if default_wildcards == '':
default_wildcards = 'NULL'
else:
default_wildcards = 'c({})'.format(default_wildcards)
# Filter props to remove those we don't want to expose
for item in prop_keys[:]:
if item.endswith('-*') \
or item in r_keywords \
or item == 'setProps':
prop_keys.remove(item)
default_argtext += ", ".join(
'{}=NULL'.format(p)
for p in prop_keys
)
# pylint: disable=C0301
default_paramtext += ", ".join(
'{0}={0}'.format(p)
if p != "children" else
'{}=children'
.format(p)
for p in prop_keys
)
return r_component_string.format(prefix=prefix,
name=name,
default_argtext=default_argtext,
wildcards=wildcards,
wildcard_declaration=wildcard_declaration,
default_paramtext=default_paramtext,
project_shortname=project_shortname,
prop_names=prop_names,
wildcard_names=wildcard_names,
package_name=package_name)
# pylint: disable=R0914
def generate_js_metadata(pkg_data, project_shortname):
"""
Dynamically generate R function to supply JavaScript
dependency information required by htmltools package,
which is loaded by dashR.
Parameters
----------
project_shortname = component library name, in snake case
Returns
-------
function_string = complete R function code to provide component features
"""
importlib.import_module(project_shortname)
# import component library module into sys
mod = sys.modules[project_shortname]
jsdist = getattr(mod, '_js_dist', [])
project_ver = pkg_data.get('version')
rpkgname = snake_case_to_camel_case(project_shortname)
# since _js_dist may suggest more than one dependency, need
# a way to iterate over all dependencies for a given set.
# here we define an opening, element, and closing string --
# if the total number of dependencies > 1, we can concatenate
# them and write a list object in R with multiple elements
function_frame_open = frame_open_template.format(rpkgname=rpkgname)
function_frame = []
function_frame_body = []
# pylint: disable=consider-using-enumerate
if len(jsdist) > 1:
for dep in range(len(jsdist)):
if 'dash_' in jsdist[dep]['relative_package_path']:
dep_name = jsdist[dep]['relative_package_path'].split('.')[0]
else:
dep_name = '{}_{}'.format(project_shortname, str(dep))
project_ver = str(dep)
function_frame += [frame_element_template.format(
dep_name=dep_name,
project_ver=project_ver,
rpkgname=rpkgname,
project_shortname=project_shortname,
dep_rpp=jsdist[dep]['relative_package_path']
)]
function_frame_body = ',\n'.join(function_frame)
elif len(jsdist) == 1:
function_frame_body = frame_body_template. \
format(project_shortname=project_shortname,
project_ver=project_ver,
rpkgname=rpkgname,
dep_rpp=jsdist[0]['relative_package_path'])
function_string = ''.join([function_frame_open,
function_frame_body,
frame_close_template])
return function_string
def write_help_file(name, props, description, prefix):
"""
Write R documentation file (.Rd) given component name and properties
Parameters
----------
name = the name of the Dash component for which a help file is generated
props = the properties of the component
description = the component's description, inserted into help file header
prefix = the DashR library prefix (optional, can be a blank string)
Returns
-------
writes an R help file to the man directory for the generated R package
"""
file_name = '{}{}.Rd'.format(prefix, name)
default_argtext = ''
item_text = ''
# Ensure props are ordered with children first
props = reorder_props(props=props)
prop_keys = list(props.keys())
has_wildcards = any('-*' in key for key in prop_keys)
# Filter props to remove those we don't want to expose
for item in prop_keys[:]:
if item.endswith('-*') \
or item in r_keywords \
or item == 'setProps':
prop_keys.remove(item)
default_argtext += ", ".join(
'{}=NULL'.format(p)
for p in prop_keys
)
item_text += "\n\n".join(
'\\item{{{}}}{{{}}}'.format(p, props[p]['description'])
for p in prop_keys
)
if has_wildcards:
item_text += '\n\n\\item{...}{wildcards: `data-*` or `aria-*`}'
file_path = os.path.join('man', file_name)
with open(file_path, 'w') as f:
f.write(help_string.format(
prefix=prefix,
name=name,
default_argtext=default_argtext,
item_text=item_text,
description=description.replace('\n', ' ')
))
def write_class_file(name,
props,
description,
project_shortname,
prefix=None):
props = reorder_props(props=props)
import_string =\
"# AUTO GENERATED FILE - DO NOT EDIT\n\n"
class_string = generate_class_string(
name,
props,
project_shortname,
prefix
)
file_name = "{}{}.R".format(prefix, name)
file_path = os.path.join('R', file_name)
with open(file_path, 'w') as f:
f.write(import_string)
f.write(class_string)
# generate the R help pages for each of the Dash components that we
# are transpiling -- this is done to avoid using Roxygen2 syntax,
# we may eventually be able to generate similar documentation using
# doxygen and an R plugin, but for now we'll just do it on our own
# from within Python
write_help_file(
name,
props,
description,
prefix
)
print('Generated {}'.format(file_name))
def write_js_metadata(pkg_data, project_shortname):
"""
Write an internal (not exported) R function to return all JS
dependencies as required by htmltools package given a
function string
Parameters
----------
project_shortname = hyphenated string, e.g. dash-html-components
Returns
-------
"""
function_string = generate_js_metadata(
pkg_data=pkg_data,
project_shortname=project_shortname
)
file_name = "internal.R"
# the R source directory for the package won't exist on first call
# create the R directory if it is missing
if not os.path.exists('R'):
os.makedirs('R')
file_path = os.path.join('R', file_name)
with open(file_path, 'w') as f:
f.write(function_string)
# now copy over all JS dependencies from the (Python) components dir
# the inst/lib directory for the package won't exist on first call
# create this directory if it is missing
if not os.path.exists('inst/deps'):
os.makedirs('inst/deps')
for javascript in glob.glob('{}/*.js'.format(project_shortname)):
shutil.copy(javascript, 'inst/deps/')
for css in glob.glob('{}/*.css'.format(project_shortname)):
shutil.copy(css, 'inst/deps/')
for sourcemap in glob.glob('{}/*.map'.format(project_shortname)):
shutil.copy(sourcemap, 'inst/deps/')
# pylint: disable=R0914
def generate_rpkg(pkg_data,
project_shortname,
export_string):
"""
Generate documents for R package creation
Parameters
----------
pkg_data
project_shortname
export_string
Returns
-------
"""
# Leverage package.json to import specifics which are also applicable
# to R package that we're generating here, use .get in case the key
# does not exist in package.json
package_name = snake_case_to_camel_case(project_shortname)
lib_name = pkg_data.get('name')
package_description = pkg_data.get('description', '')
package_version = pkg_data.get('version', '0.0.1')
if 'bugs' in pkg_data.keys():
package_issues = pkg_data['bugs'].get('url', '')
else:
package_issues = ''
print(
'Warning: a URL for bug reports was '
'not provided. Empty string inserted.',
file=sys.stderr
)
if 'homepage' in pkg_data.keys():
package_url = pkg_data.get('homepage', '')
else:
package_url = ''
print(
'Warning: a homepage URL was not provided. Empty string inserted.',
file=sys.stderr
)
package_author = pkg_data.get('author')
package_author_no_email = package_author.split(" <")[0] + ' [aut]'
if not (os.path.isfile('LICENSE') or os.path.isfile('LICENSE.txt')):
package_license = pkg_data.get('license', '')
else:
package_license = pkg_data.get('license', '') + ' + file LICENSE'
# R requires that the LICENSE.txt file be named LICENSE
if not os.path.isfile('LICENSE'):
os.symlink("LICENSE.txt", "LICENSE")
import_string =\
'# AUTO GENERATED FILE - DO NOT EDIT\n\n'
pkghelp_stub_path = os.path.join('man', package_name + '-package.Rd')
# generate the internal (not exported to the user) functions which
# supply the JavaScript dependencies to the htmltools package,
# which is required by DashR (this avoids having to generate an
# RData file from within Python, given the current package generation
# workflow)
write_js_metadata(
pkg_data=pkg_data,
project_shortname=project_shortname
)
with open('NAMESPACE', 'w') as f:
f.write(import_string)
f.write(export_string)
with open('.Rbuildignore', 'w') as f2:
f2.write(rbuild_ignore_string)
# Write package stub files for R online help, generate if
# dashHtmlComponents or dashCoreComponents; makes it easy
# for R users to bring up main package help page
pkg_help_header = ""
if package_name in ['dashHtmlComponents']:
pkg_help_header = "Vanilla HTML Components for Dash"
pkg_help_desc = "Dash is a web application framework that\n\
provides pure Python and R abstraction around HTML, CSS, and\n\
JavaScript. Instead of writing HTML or using an HTML\n\
templating engine, you compose your layout using R\n\
functions within the dashHtmlComponents package. The\n\
source for this package is on GitHub:\n\
plotly/dash-html-components."
if package_name in ['dashCoreComponents']:
pkg_help_header = "Core Interactive UI Components for Dash"
pkg_help_desc = "Dash ships with supercharged components for\n\
interactive user interfaces. A core set of components,\n\
written and maintained by the Dash team, is available in\n\
the dashCoreComponents package. The source for this package\n\
is on GitHub: plotly/dash-core-components."
description_string = description_template.format(
package_name=package_name,
package_description=package_description,
package_version=package_version,
package_author=package_author,
package_license=package_license,
package_url=package_url,
package_issues=package_issues,
package_author_no_email=package_author_no_email
)
with open('DESCRIPTION', 'w') as f3:
f3.write(description_string)
if pkg_help_header != "":
pkghelp = pkghelp_stub.format(package_name=package_name,
pkg_help_header=pkg_help_header,
pkg_help_desc=pkg_help_desc,
lib_name=lib_name,
package_author=package_author)
with open(pkghelp_stub_path, 'w') as f4:
f4.write(pkghelp)
# This converts a string from snake case to camel case
# Not required for R package name to be in camel case,
# but probably more conventional this way
def snake_case_to_camel_case(namestring):
s = namestring.split('_')
return s[0] + ''.join(w.capitalize() for w in s[1:])
# pylint: disable=unused-argument
def generate_exports(project_shortname,
components,
metadata,
pkg_data,
prefix,
**kwargs):
export_string = ''
for component in components:
if not component.endswith('-*') and \
str(component) not in r_keywords and \
str(component) not in ['setProps', 'children', 'dashEvents']:
export_string += 'export({}{})\n'.format(prefix, component)
# now, bundle up the package information and create all the requisite
# elements of an R package, so that the end result is installable either
# locally or directly from GitHub
generate_rpkg(
pkg_data,
project_shortname,
export_string
)
|
import calendar
from datetime import datetime, timedelta
import uuid
from snuba import settings
from snuba.datasets.factory import get_dataset
from snuba.datasets.events_processor_base import InsertEvent
from snuba.datasets.storages import StorageKey
from snuba.datasets.storages.factory import get_writable_storage
from tests.helpers import write_unprocessed_events
class BaseSubscriptionTest:
def setup_method(self):
self.project_id = 1
self.platforms = ["a", "b"]
self.minutes = 20
self.dataset = get_dataset("events")
self.base_time = datetime.utcnow().replace(
minute=0, second=0, microsecond=0
) - timedelta(minutes=self.minutes)
write_unprocessed_events(
get_writable_storage(StorageKey.EVENTS),
[
InsertEvent(
{
"event_id": uuid.uuid4().hex,
"group_id": tick,
"primary_hash": uuid.uuid4().hex,
"project_id": self.project_id,
"message": "a message",
"platform": self.platforms[tick % len(self.platforms)],
"datetime": (self.base_time + timedelta(minutes=tick)).strftime(
settings.PAYLOAD_DATETIME_FORMAT
),
"data": {
"received": calendar.timegm(
(self.base_time + timedelta(minutes=tick)).timetuple()
),
},
"organization_id": 1,
"retention_days": settings.DEFAULT_RETENTION_DAYS,
}
)
for tick in range(self.minutes)
],
)
|
$(document).ready(function () {
$(window).bind('resize', setImageHeight);
setImageHeight();
var users = [];
var currentUser = {};
var isEdit = false;
var userListRef = new Firebase('https://resplendent-inferno-4684.firebaseio.com//score');
userListRef.on('child_added', function (userSnapshot) {
handleUserAdded(userSnapshot);
});
userListRef.on('child_removed', function (userSnapshot) {
handleUserRemoved(userSnapshot);
});
userListRef.on('child_changed', function (userSnapshot) {
handleUserChanged(userSnapshot);
});
$(".js-bonus-min").tap(bonusMin);
$(".js-bonus-plus").tap(bonusPlus);
$(".js-level-min").tap(levelMin);
$(".js-level-plus").tap(levelPlus);
$(".js-name-edit").click(userEdit);
$(".js-name-save").click(userSave);
$(".js-name-input").bind('keypress', function (e) {
if ( e.keyCode == 13 ) userSave();
});
$(".js-user-add").tap(userAdd);
function bonusMin() {
currentUser.bonus--;
updateUser(currentUser);
}
function bonusPlus() {
currentUser.bonus++;
updateUser(currentUser);
}
function levelMin() {
currentUser.level--;
updateUser(currentUser);
}
function levelPlus() {
currentUser.level++;
updateUser(currentUser);
}
function userEdit() {
isEdit = true;
$(".js-name-input").val(currentUser.name);
$("h1.name").addClass("hidden");
$("h1.name-edit").removeClass("hidden");
$(".js-name-input").focus();
}
function userSave() {
isEdit = false;
currentUser.name = $(".js-name-input").val();
updateUser(currentUser);
$("h1.name").removeClass("hidden");
$("h1.name-edit").addClass("hidden");
}
function userAdd() {
if (isEdit) {
userSave();
}
newUser = {
id : getRandomId(),
name : "Munchkin",
level : 1,
bonus : 0
};
userListRef.child(newUser.id).set(newUser);
currentUser = newUser;
updateUser(currentUser);
userEdit();
$(".js-name-input").select();
}
function changeCurrentUser(userId) {
if (isEdit) {
userSave();
}
currentUser = getUserById(userId);
updateUser(currentUser);
showUserList(users);
}
function deleteUser(userId, ask) {
var user = getUserById(userId),
confirmation = true,
i = 0;
if (ask) {
confirmation = confirm("Delete " + user.name + "?");
}
if (confirmation) {
userListRef.child(user.id).remove();
}
}
function updateUser(user) {
userListRef.child(user.id).set(user);
$(".js-name").html(user.name);
$(".js-level").html(user.level);
$(".js-bonus").html(user.bonus);
$(".js-points").html(user.level + user.bonus);
$(".js-bonus-min").prop("disabled", user.bonus <= 0);
$(".js-level-min").prop("disabled", user.level <= 1);
$(".js-plural-points").toggleClass("hidden", (user.level + user.bonus) === 1);
}
function showUserList(userList) {
var output = "";
userList.sort(function (a, b) { return b.level - a.level; });
userList.forEach(function (user) {
output += "<tr data-id='" + user.id + "'";
output += user === currentUser ? " class='self'" : "";
output += ">"
output += "<td>" + user.name + "</td>";
output += "<td>" + user.level + "</td>";
output += "<td>" + user.bonus + "</td>";
output += "<td>" + (user.level + user.bonus) + "</td>";
output += "</tr>";
});
$(".js-users").html(output);
$(".js-users tr")
.tap(function () { changeCurrentUser($(this).data("id")); })
.taphold(function () { deleteUser($(this).data("id"), true); });
}
function handleUserAdded(userSnapshot) {
users.push(userSnapshot.val());
showUserList(users);
if (users.length === 1) {
changeCurrentUser(users[0].id);
}
}
function handleUserRemoved(userSnapshot) {
var user = getUserById(userSnapshot.val().id);
var i = 0;
while (users[i] !== user) i++;
users.splice(i, 1);
if (users.length === 0) {
userAdd();
}
if (currentUser === user) {
changeCurrentUser(users[0].id);
}
showUserList(users);
}
function handleUserChanged(userSnapshot) {
var updatedUser = userSnapshot.val();
var user = getUserById(updatedUser.id);
user.name = updatedUser.name;
user.level = updatedUser.level;
user.bonus = updatedUser.bonus;
if (currentUser.id === user.id) {
updateUser(user);
}
showUserList(users);
}
function getUserById(id) {
return users.filter(function (user) { return user.id === id; })[0];
}
function getRandomId() {
return Math.floor((Math.random() * 1000000) + 1);
}
function setImageHeight() {
$('.board').css("max-height", $(window).height() - 50);
}
});
|
/* global angular:false */
angular
.module('ndslabs')
/**
* The Controller for our "Clone Spec" Modal Window
*
* @author lambert8
* @see https://opensource.ncsa.illinois.edu/confluence/display/~lambert8/3.%29+Controllers%2C+Scopes%2C+and+Partial+Views
*/
.controller('CloneSpecCtrl', [ '$scope', '$log', '$uibModalInstance', '_', 'NdsLabsApi', 'Specs', 'spec',
function($scope, $log, $uibModalInstance, _, NdsLabsApi, Specs, spec) {
"use strict";
$scope.$watch('spec.key', function(newValue, oldValue) {
if (!newValue) {
$scope.nameIsValid = false;
}
$scope.nameIsValid = !_.find(Specs.all, [ 'key', $scope.spec.key ]);
});
$scope.spec = angular.copy(spec);
$scope.clone = function() {
$log.debug("Closing modal with success!");
NdsLabsApi.postServices({ 'service': $scope.spec }).then(function() {
Specs.populate().then(function() {
$uibModalInstance.close();
});
});
};
$scope.cancel = function() {
$log.debug("Closing modal with dismissal!");
$uibModalInstance.dismiss('cancel');
};
}]); |
import { createActions, handleActions } from 'redux-actions';
import { fetchCommentsByPageNumber } from 'API/comments';
const initialState = {
};
export const { api: { comments: { getPage: commentsGetPage } } } = createActions({
API: {
COMMENTS: {
GET_PAGE: page => fetchCommentsByPageNumber(page),
},
},
});
export default handleActions({
}, initialState);
|
/**
* Copyright 2017 The AMP HTML Authors. All Rights Reserved.
*
* 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.
*/
import {AmpEvents} from '../../../../../src/amp-events';
import {AmpForm, AmpFormService} from '../../amp-form';
import {AmpMustache} from '../../../../amp-mustache/0.1/amp-mustache';
import {listenOncePromise} from '../../../../../src/event-helper';
import {poll} from '../../../../../testing/iframe';
import {registerExtendedTemplate} from
'../../../../../src/service/template-impl';
/** @const {number} */
const RENDER_TIMEOUT = 15000;
describes.realWin('AmpForm Integration', {
amp: {
runtimeOn: true,
ampdoc: 'single',
},
mockFetch: false,
}, env => {
// TODO(aghassemi, #14336): Fails due to console errors.
describe.skip('AmpForm Integration', () => {
const baseUrl = 'http://localhost:31862';
let doc;
let sandbox;
const realSetTimeout = window.setTimeout;
const stubSetTimeout = (callback, delay) => {
realSetTimeout(() => {
try {
callback();
} catch (e) {}
}, delay);
};
beforeEach(() => {
sandbox = env.sandbox;
doc = env.win.document;
const scriptElement = document.createElement('script');
scriptElement.setAttribute('custom-template', 'amp-mustache');
doc.body.appendChild(scriptElement);
registerExtendedTemplate(env.win, 'amp-mustache', AmpMustache);
new AmpFormService(env.ampdoc);
});
function getForm(config) {
const form = doc.createElement('form');
form.id = config.id || 'test-form';
form.setAttribute('method', config.method || 'POST');
form.setAttribute('target', config.target || '_top');
const nameInput = doc.createElement('input');
nameInput.setAttribute('name', 'name');
nameInput.setAttribute('value', 'John Miller');
form.appendChild(nameInput);
if (config.actionXhr) {
form.setAttribute('action-xhr', config.actionXhr);
}
if (config.action) {
form.setAttribute('action', config.action);
}
const submitButton = doc.createElement('input');
submitButton.setAttribute('type', 'submit');
form.appendChild(submitButton);
if (config.on) {
form.setAttribute('on', config.on);
}
if (config.success) {
const {message, template} = config.success;
const successDiv = doc.createElement('div');
successDiv.setAttribute('submit-success', '');
if (template) {
const child = doc.createElement('template');
child.setAttribute('type', 'amp-mustache');
child./*OK*/innerHTML = message;
successDiv.appendChild(child);
} else {
successDiv./*OK*/innerHTML = message;
}
form.appendChild(successDiv);
}
if (config.error) {
const {message, template} = config.error;
const errorDiv = doc.createElement('div');
errorDiv.setAttribute('submit-error', '');
if (template) {
const child = doc.createElement('template');
child.setAttribute('type', 'amp-mustache');
child./*OK*/innerHTML = message;
errorDiv.appendChild(child);
} else {
errorDiv./*OK*/innerHTML = message;
}
form.appendChild(errorDiv);
}
doc.body.appendChild(form);
return form;
}
const describeChrome =
describe.configure().skipFirefox().skipSafari().skipEdge();
describeChrome.run('on=submit:form.submit', () => {
it('should be protected from recursive-submission', () => {
const form = getForm({
id: 'sameform',
actionXhr: baseUrl + '/form/post',
on: 'submit:sameform.submit',
});
const ampForm = new AmpForm(form, 'sameform');
sandbox.spy(ampForm, 'handleXhrSubmit_');
sandbox.spy(ampForm, 'handleSubmitAction_');
sandbox.spy(ampForm.xhr_, 'fetch');
const fetch = poll('submit request sent',
() => ampForm.xhrSubmitPromiseForTesting());
form.dispatchEvent(new Event('submit'));
return fetch.then(() => {
// Due to recursive nature of 'on=submit:sameform.submit' we expect
// the action handler to be called twice, the first time for the
// actual user submission.
// The second time in response to the `submit` event being triggered
// and sameform.submit being invoked.
expect(ampForm.handleSubmitAction_).to.have.been.calledTwice;
// However, only the first invocation should be handled completely.
// and any subsequent calls should be stopped early-on.
expect(ampForm.handleXhrSubmit_).to.have.been.calledOnce;
expect(ampForm.xhr_.fetch).to.have.been.calledOnce;
});
});
});
describeChrome.run('Submit xhr-POST', function() {
this.timeout(RENDER_TIMEOUT);
it('should submit and render success', () => {
const form = getForm({
id: 'form1',
actionXhr: baseUrl + '/form/post/success',
success: {
message: 'Thanks {{name}} for adding your interests:' +
' {{#interests}}{{title}} {{/interests}}.',
template: true,
},
error: {message: 'Should not render this.', template: true},
});
const ampForm = new AmpForm(form, 'form1');
const fetch = poll('submit request sent',
() => ampForm.xhrSubmitPromiseForTesting());
const render = listenOncePromise(form, AmpEvents.DOM_UPDATE);
form.dispatchEvent(new Event('submit'));
return fetch.then(() => render).then(() => {
const rendered = form.querySelector('[i-amphtml-rendered]');
expect(rendered.textContent).to.equal(
'Thanks John Miller for adding your interests: ' +
'Football Basketball Writing .');
});
});
it('should submit and render error', () => {
// Stubbing timeout to catch async-thrown errors and expect
// them. These catch errors thrown inside the catch-clause of the
// xhr request using rethrowAsync.
sandbox.stub(window, 'setTimeout').callsFake(stubSetTimeout);
const form = getForm({
id: 'form1',
actionXhr: baseUrl + '/form/post/error',
success: {message: 'Should not render this.', template: true},
error: {
message: 'Oops. {{name}} your email {{email}} is already ' +
'subscribed.',
template: true,
},
});
const ampForm = new AmpForm(form, 'form1');
const fetchSpy = sandbox.spy(ampForm.xhr_, 'fetch');
const fetch =
poll('submit request sent', () => fetchSpy.returnValues[0]);
const render = listenOncePromise(form, AmpEvents.DOM_UPDATE);
form.dispatchEvent(new Event('submit'));
return fetch.then(() => {
throw new Error('UNREACHABLE');
}, fetchError => {
expect(fetchError.message).to.match(/HTTP error 500/);
return render.then(() => {
const rendered = form.querySelector('[i-amphtml-rendered]');
expect(rendered.textContent).to.equal(
'Oops. John Miller your email [email protected] is already ' +
'subscribed.');
});
});
});
});
describeChrome.run('Submit xhr-GET', function() {
this.timeout(RENDER_TIMEOUT);
it('should submit and render success', () => {
const form = getForm({
id: 'form1',
method: 'GET',
actionXhr: baseUrl + '/form/post/success',
success: {
message: 'Thanks {{name}} for adding your interests:' +
' {{#interests}}{{title}} {{/interests}}.',
template: true,
},
error: {message: 'Should not render this.', template: true},
});
const ampForm = new AmpForm(form, 'form1');
const fetch = poll('submit request sent',
() => ampForm.xhrSubmitPromiseForTesting());
const render = listenOncePromise(form, AmpEvents.DOM_UPDATE);
form.dispatchEvent(new Event('submit'));
return fetch.then(() => render).then(() => {
const rendered = form.querySelectorAll('[i-amphtml-rendered]');
expect(rendered.length).to.equal(1);
expect(rendered[0].textContent).to.equal(
'Thanks John Miller for adding your interests: ' +
'Football Basketball Writing .');
});
});
it('should submit and render error', () => {
// Stubbing timeout to catch async-thrown errors and expect
// them. These catch errors thrown inside the catch-clause of the
// xhr request using rethrowAsync.
sandbox.stub(window, 'setTimeout').callsFake(stubSetTimeout);
const form = getForm({
id: 'form1',
actionXhr: baseUrl + '/form/post/error',
success: {message: 'Should not render this.', template: true},
error: {
message: 'Oops. {{name}} your email {{email}} is already ' +
'subscribed.',
template: true,
},
});
const ampForm = new AmpForm(form, 'form1');
const fetchSpy = sandbox.spy(ampForm.xhr_, 'fetch');
const fetch =
poll('submit request sent', () => fetchSpy.returnValues[0]);
const render = listenOncePromise(form, AmpEvents.DOM_UPDATE);
form.dispatchEvent(new Event('submit'));
return fetch.then(() => {
throw new Error('UNREACHABLE');
}, fetchError => {
expect(fetchError.message).to.match(/HTTP error 500/);
return render.then(() => {
const rendered = form.querySelector('[i-amphtml-rendered]');
expect(rendered.textContent).to.equal(
'Oops. John Miller your email [email protected] is already ' +
'subscribed.');
});
});
});
});
describeChrome.run('Submit result message', () => {
// TODO(cvializ, #14336): Fails due to console errors.
it.skip('should render messages with or without a template', () => {
// Stubbing timeout to catch async-thrown errors and expect
// them. These catch errors thrown inside the catch-clause of the
// xhr request using rethrowAsync.
sandbox.stub(window, 'setTimeout').callsFake(stubSetTimeout);
const form = getForm({
id: 'form1',
actionXhr: baseUrl + '/form/post/error',
success: {message: 'Should not render this.', template: false},
error: {
message: 'Oops! Your email is already subscribed.' +
'<amp-img src="/examples/img/ampicon.png" ' +
'width="42" height="42"></amp-img>',
template: false,
},
});
const ampForm = new AmpForm(form, 'form1');
const fetchSpy = sandbox.spy(ampForm.xhr_, 'fetch');
const fetch =
poll('submit request sent', () => fetchSpy.returnValues[0]);
form.dispatchEvent(new Event('submit'));
return fetch.then(() => {
throw new Error('UNREACHABLE');
}, fetchError => {
expect(fetchError.message).to.match(/HTTP error 500/);
// It shouldn't have the i-amphtml-rendered attribute since no
// template was rendered.
const rendered = form.querySelectorAll('[i-amphtml-rendered]');
expect(rendered.length).to.equal(0);
// Any amp elements inside the message should be layed out.
const layout = listenOncePromise(form, AmpEvents.LOAD_START);
return layout.then(() => {
const img = form.querySelector('amp-img img');
expect(img.src).to.contain('/examples/img/ampicon.png');
});
});
});
});
});
});
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.