text
stringlengths 3
1.05M
|
---|
/**
* @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
*/
// THIS CODE IS GENERATED - DO NOT MODIFY
// See angular/tools/gulp-tasks/cldr/extract.js
(function(global) {
global.ng = global.ng || {};
global.ng.common = global.ng.common || {};
global.ng.common.locales = global.ng.common.locales || {};
const u = undefined;
function plural(n) { return 5; }
root.ng.common.locales['ig'] = [
'ig',
[['A.M.', 'P.M.'], u, ['N’ụtụtụ', 'N’abali']],
[['A.M.', 'P.M.'], u, u],
[
['S', 'M', 'T', 'W', 'T', 'F', 'S'],
['Ụka', 'Mọn', 'Tiu', 'Wen', 'Tọọ', 'Fraị', 'Sat'],
['Sọndee', 'Mọnde', 'Tiuzdee', 'Wenezdee', 'Tọọzdee', 'Fraịdee', 'Satọdee'],
['Sọn', 'Mọn', 'Tiu', 'Wen', 'Tọọ', 'Fraị', 'Sat']
],
u,
[
['J', 'F', 'M', 'E', 'M', 'J', 'J', 'Ọ', 'S', 'Ọ', 'N', 'D'],
['Jen', 'Feb', 'Maa', 'Epr', 'Mee', 'Juu', 'Jul', 'Ọgọ', 'Sep', 'Ọkt', 'Nov', 'Dis'],
[
'Jenụwarị', 'Febrụwarị', 'Maachị', 'Epreel', 'Mee', 'Juun', 'Julaị',
'Ọgọọst', 'Septemba', 'Ọktoba', 'Novemba', 'Disemba'
]
],
u,
[['T.K.', 'A.K.'], u, ['Tupu Kraist', 'Afọ Kraịst']],
1,
[6, 0],
['d/M/yy', 'd MMM y', 'd MMMM y', 'EEEE, d MMMM y'],
['HH:mm', 'HH:mm:ss', 'HH:mm:ss z', 'HH:mm:ss zzzz'],
['{1}, {0}', u, '{1} \'na\' {0}', u],
['.', ',', ';', '%', '+', '-', 'E', '×', '‰', '∞', 'NaN', ':'],
['#,##0.###', '#,##0%', '¤#,##0.00', '#E0'],
'₦',
'Naịra',
{'NGN': ['₦']},
plural,
[]
];
})(typeof globalThis !== 'undefined' && globalThis || typeof global !== 'undefined' && global ||
typeof window !== 'undefined' && window);
|
import {
GET_CERTS,
GET_CERTS_ERROR,
OPEN_CERT,
OPEN_SECTION,
} from '../actions/types';
const INITIAL_STATE = {
certificates: [],
errorMessage: '',
};
export default function (state = INITIAL_STATE, action) {
switch (action.type) {
case GET_CERTS:
return { ...state, certificates: action.payload };
case GET_CERTS_ERROR:
return { ...state, errorMessage: action.payload };
case OPEN_CERT:
return Object.assign({}, state, {
certificates: state.certificates.map(cert => (
{ ...cert, open: !cert.open && cert._id === action.payload }
)),
});
case OPEN_SECTION:
return Object.assign({}, state, {
certificates: state.certificates.map((cert) => {
const sections = cert.sections.map(section => ({
...section,
open: !section.open && section._id === action.payload,
}));
return { ...cert, sections };
}),
});
default:
return state;
}
}
|
import { bindEvent, extend, clone, isPromiseLike, probe } from 'sav-util'
import {Request} from './request.js'
export function Flux (opts = {strict: true}) {
let flux = this
let prop = initProp(flux)
prop('flux', flux)
prop('prop', prop)
prop('mutations', {})
prop('actions', {})
prop('proxys', {})
prop('opts', opts)
initUse(flux)([initUtil, bindEvent, initPromise, initCloneThen,
initState, initCommit, initDispatch, initProxy,
initDeclare])
}
function initProp (flux) {
let prop = (key, value, opts = {}) => {
opts.value = value
Object.defineProperty(flux, key, opts)
}
prop.get = (key, value, opts = {}) => {
opts.get = value
Object.defineProperty(flux, key, opts)
}
return prop
}
function initUse ({flux, prop}) {
let use = (plugin, opts) => {
if (Array.isArray(plugin)) {
return plugin.forEach(plugin => {
flux.use(plugin, opts)
})
}
plugin(flux, opts)
}
prop('use', use)
return use
}
function initUtil ({prop, opts}) {
prop('clone', clone)
prop('extend', extend)
prop('request', new Request())
prop('opt', (name, defaultVal = null) => {
return name in opts ? opts[name] : defaultVal
})
}
function initState ({prop, emit, cloneThen, clone, resolve}) {
let state = {}
prop.get('state', () => state, {
set () {
throw new Error('[flux] Use flux.replaceState() to explicit replace store state.')
}
})
prop('getState', () => clone(state))
prop('replaceState', newState => {
let stateStr = JSON.stringify(newState)
newState = JSON.parse(stateStr)
for (let x in state) {
delete state[x]
}
for (let x in newState) {
state[x] = newState[x]
}
return Promise.resolve(JSON.parse(stateStr)).then((cloneState) => {
emit('replace', cloneState)
return cloneState
})
})
prop('updateState', (changedState, slice) => {
if (typeof changedState !== 'object') {
throw new Error('[flux] updateState require new state as object')
}
if (changedState !== state) {
Object.keys(changedState).map(key => {
state[key] = changedState[key]
})
}
if (!slice) {
return cloneThen(changedState).then(cloneState => {
emit('update', cloneState)
return cloneState
})
}
return resolve()
})
}
function initCommit ({prop, flux, updateState, resolve}) {
let commit = (type, payload) => {
let {mutations} = flux
if (typeof type === 'object') {
payload = type
type = type.type
}
let entry = mutations[type]
if (!entry) {
throw new Error('[flux] unknown mutation : ' + type)
}
let state = flux.state
let ret = entry(flux, payload)
let update = (ret) => {
if (ret) {
if (ret === state) {
throw new Error('[flux] commit require new object rather than old state')
}
if (typeof ret !== 'object') {
throw new Error('[flux] commit require new object')
}
return updateState(ret)
}
return resolve()
}
if (isPromiseLike(ret)) {
return ret.then(update)
} else {
return update(ret)
}
}
prop('commit', flux.opts.noProxy ? commit : proxyApi(commit))
}
function initDispatch ({prop, flux, commit, resolve, reject, opts, cloneThen}) {
let dispatch = (action, payload) => {
let {actions, mutations, proxys} = flux
let entry = action in actions && actions[action] ||
action in mutations && function (_, payload) {
return commit(action, payload)
}
if (!entry && (proxys[action])) {
entry = proxys[action]
}
if (!entry) {
return reject('[flux] unknown action : ' + action)
}
let err, ret
try {
ret = entry(flux, payload)
} catch (e) {
err = e
}
if (err) {
return reject(err)
}
if (!isPromiseLike(ret)) {
ret = resolve(ret)
}
// make copy
return opts.strict ? ret.then(data => {
if (Array.isArray(data) || typeof data === 'object') {
if (data.__clone) {
return resolve(data)
}
return cloneThen(data).then(newData => {
Object.defineProperty(newData, '__clone', {value: true})
return resolve(newData)
})
}
return resolve(data)
}) : ret
}
prop('dispatch', flux.opts.noProxy ? dispatch : proxyApi(dispatch))
}
function initProxy ({prop, proxys}) {
prop('proxy', (name, value) => {
if (typeof name === 'object') { // batch mode
for (let x in name) {
if (value === null) {
delete proxys[x]
} else {
proxys[x] = name[x]
}
}
} else { // once mode
if (value === null) {
delete proxys[name]
} else {
proxys[name] = value
}
}
})
}
function initDeclare ({prop, flux, emit, commit, dispatch, updateState}) {
let declare = (mod) => {
if (!mod) {
return
}
if (Array.isArray(mod)) {
return mod.forEach(declare)
}
if (mod.mutations) {
for (let mutation in mod.mutations) {
if (flux.mutations[mutation]) {
throw new Error(`[flux] mutation exists: ${mutation}`)
}
flux.mutations[mutation] = mod.mutations[mutation]
if (flux.opts.noProxy || !probe.Proxy) {
proxyFunction(commit, mutation)
proxyFunction(dispatch, mutation)
}
}
}
if (mod.proxys) {
for (let action in mod.proxys) {
flux.proxys[action] = mod.proxys[action]
}
}
if (mod.actions) {
for (let action in mod.actions) {
if (flux.actions[action]) {
throw new Error(`[flux] action exists: ${action}`)
}
flux.actions[action] = mod.actions[action]
if (flux.opts.noProxy || !probe.Proxy) {
proxyFunction(dispatch, action)
}
}
}
if (mod.state) {
let states = flux.state
for (let state in mod.state) {
if (state in states) {
throw new Error(`[flux] state exists: ${state}`)
}
}
updateState(mod.state, true)
}
emit('declare', mod)
}
prop('declare', declare)
}
function proxyFunction (target, name) {
target[name] = (payload) => {
return target(name, payload)
}
}
function proxyApi (entry) {
if (probe.Proxy) {
return new Proxy(entry, {
get (target, name) {
return payload => {
return entry(name, payload)
}
}
})
}
return entry
}
function initPromise ({prop}) {
let PROMISE = Promise
prop('resolve', PROMISE.resolve.bind(PROMISE))
prop('reject', PROMISE.reject.bind(PROMISE))
prop('all', PROMISE.all.bind(PROMISE))
prop('then', fn => {
return new PROMISE(fn)
})
}
function initCloneThen ({prop, clone, resolve, then}) {
if (!probe.MessageChannel) {
prop('cloneThen', value => {
return resolve().then(() => resolve(clone(value)))
})
return
}
/* global MessageChannel */
const channel = new MessageChannel()
let maps = {}
let idx = 0
let port2 = channel.port2
port2.start()
port2.onmessage = ({data: {key, value}}) => {
const resolve = maps[key]
resolve(value)
delete maps[key]
}
prop('cloneThen', value => {
return new Promise(resolve => {
const key = idx++
maps[key] = resolve
try {
channel.port1.postMessage({key, value})
} catch (err) {
console.error('cloneThen.postMessage', err)
delete maps[key]
try {
value = JSON.parse(JSON.stringify(value))
} catch (err) {
console.error('cloneThen.JSON', err)
value = clone(value)
}
return then(() => resolve(value))
}
})
})
}
|
'use strict';
const types = require('../utils/types');
const computedPropertyUtils = require('../utils/computed-properties');
const propertySetterUtils = require('../utils/property-setter');
const emberUtils = require('../utils/ember');
const Traverser = require('../utils/traverser');
const { getImportIdentifier } = require('../utils/import');
//------------------------------------------------------------------------------
// General rule - Don't introduce side-effects in computed properties
//------------------------------------------------------------------------------
// Ember.set(this, 'foo', 123)
function isEmberSetThis(node, importedEmberName) {
return (
types.isCallExpression(node) &&
types.isMemberExpression(node.callee) &&
types.isIdentifier(node.callee.object) &&
node.callee.object.name === importedEmberName &&
types.isIdentifier(node.callee.property) &&
['set', 'setProperties'].includes(node.callee.property.name) &&
node.arguments.length > 0 &&
memberExpressionBeginsWithThis(node.arguments[0])
);
}
// set(this, 'foo', 123)
function isImportedSetThis(node, importedSetName, importedSetPropertiesName) {
return (
types.isCallExpression(node) &&
types.isIdentifier(node.callee) &&
[importedSetName, importedSetPropertiesName].includes(node.callee.name) &&
node.arguments.length > 0 &&
memberExpressionBeginsWithThis(node.arguments[0])
);
}
// this.set('foo', 123)
// this.prop.set('foo', 123)
function isThisSet(node) {
return (
types.isCallExpression(node) &&
types.isMemberExpression(node.callee) &&
types.isIdentifier(node.callee.property) &&
['set', 'setProperties'].includes(node.callee.property.name) &&
memberExpressionBeginsWithThis(node.callee.object)
);
}
// import { sendEvent } from "@ember/object/events"
// Ember.sendEvent
// Looks for variations like:
// - this.send(...)
// - Ember.send(...)
const DISALLOWED_FUNCTION_CALLS = new Set(['send', 'sendAction', 'sendEvent', 'trigger']);
function isDisallowedFunctionCall(node, importedEmberName) {
return (
types.isCallExpression(node) &&
types.isMemberExpression(node.callee) &&
(types.isThisExpression(node.callee.object) ||
(types.isIdentifier(node.callee.object) && node.callee.object.name === importedEmberName)) &&
types.isIdentifier(node.callee.property) &&
DISALLOWED_FUNCTION_CALLS.has(node.callee.property.name)
);
}
// sendEvent(...)
function isImportedSendEventCall(node, importedSendEventName) {
return (
types.isCallExpression(node) &&
types.isIdentifier(node.callee) &&
node.callee.name === importedSendEventName
);
}
/**
* Finds:
* - this
* - this.foo
* - this.foo.bar
* - this?.foo?.bar
* @param {node} node
*/
function memberExpressionBeginsWithThis(node) {
if (types.isThisExpression(node)) {
return true;
} else if (types.isMemberExpression(node) || types.isOptionalMemberExpression(node)) {
return memberExpressionBeginsWithThis(node.object);
} else if (node.type === 'ChainExpression') {
return memberExpressionBeginsWithThis(node.expression);
}
return false;
}
/**
* Recursively finds calls that could be side effects in a computed property function body.
*
* @param {ASTNode} computedPropertyBody body of computed property to search
* @param {boolean} catchEvents
* @param {string} importedEmberName
* @param {string} importedSetName
* @param {string} importedSetPropertiesName
* @param {string} importedSendEventName
* @returns {Array<ASTNode>}
*/
function findSideEffects(
computedPropertyBody,
catchEvents,
importedEmberName,
importedSetName,
importedSetPropertiesName,
importedSendEventName
) {
const results = [];
new Traverser().traverse(computedPropertyBody, {
enter(child) {
if (
isEmberSetThis(child, importedEmberName) || // Ember.set(this, 'foo', 123)
isImportedSetThis(child, importedSetName, importedSetPropertiesName) || // set(this, 'foo', 123)
isThisSet(child) || // this.set('foo', 123)
propertySetterUtils.isThisSet(child) || // this.foo = 123;
(catchEvents && isDisallowedFunctionCall(child, importedEmberName)) || // this.send('done')
(catchEvents && isImportedSendEventCall(child, importedSendEventName)) // sendEvent(...)
) {
results.push(child);
}
},
});
return results;
}
const ERROR_MESSAGE = "Don't introduce side-effects in computed properties";
module.exports = {
meta: {
type: 'problem',
docs: {
description: 'disallow unexpected side effects in computed properties',
category: 'Computed Properties',
recommended: true,
url: 'https://github.com/ember-cli/eslint-plugin-ember/tree/master/docs/rules/no-side-effects.md',
},
fixable: null,
schema: [
{
type: 'object',
properties: {
catchEvents: {
type: 'boolean',
default: true,
},
checkPlainGetters: {
type: 'boolean',
default: true,
},
},
},
],
},
ERROR_MESSAGE,
create(context) {
// Options:
const catchEvents = context.options[0] ? context.options[0].catchEvents : true;
const checkPlainGetters = !context.options[0] || context.options[0].checkPlainGetters;
let importedEmberName;
let importedComputedName;
let importedSetName;
let importedSetPropertiesName;
let importedSendEventName;
let currentEmberClass;
const report = function (node) {
context.report(node, ERROR_MESSAGE);
};
return {
ImportDeclaration(node) {
if (node.source.value === 'ember') {
importedEmberName = importedEmberName || getImportIdentifier(node, 'ember');
}
if (node.source.value === '@ember/object') {
importedComputedName =
importedComputedName || getImportIdentifier(node, '@ember/object', 'computed');
importedSetName = importedSetName || getImportIdentifier(node, '@ember/object', 'set');
importedSetPropertiesName =
importedSetPropertiesName ||
getImportIdentifier(node, '@ember/object', 'setProperties');
}
if (node.source.value === '@ember/object/events') {
importedSendEventName =
importedSendEventName || getImportIdentifier(node, '@ember/object/events', 'sendEvent');
}
},
MethodDefinition(node) {
if (
!checkPlainGetters ||
!currentEmberClass ||
node.kind !== 'get' ||
!types.isFunctionExpression(node.value)
) {
return;
}
for (const sideEffect of findSideEffects(
node.value,
catchEvents,
importedEmberName,
importedSetName,
importedSetPropertiesName,
importedSendEventName
)) {
report(sideEffect);
}
},
ClassDeclaration(node) {
if (emberUtils.isAnyEmberCoreModule(context, node)) {
currentEmberClass = node;
}
},
'ClassDeclaration:exit'(node) {
if (currentEmberClass === node) {
currentEmberClass = null;
}
},
CallExpression(node) {
if (
(checkPlainGetters && currentEmberClass) ||
!emberUtils.isComputedProp(node, importedEmberName, importedComputedName)
) {
return;
}
const computedPropertyBody = computedPropertyUtils.getComputedPropertyFunctionBody(node);
for (const sideEffect of findSideEffects(
computedPropertyBody,
catchEvents,
importedEmberName,
importedSetName,
importedSetPropertiesName,
importedSendEventName
)) {
report(sideEffect);
}
},
Identifier(node) {
if (
(checkPlainGetters && currentEmberClass) ||
!emberUtils.isComputedProp(node, importedEmberName, importedComputedName)
) {
return;
}
const computedPropertyBody = computedPropertyUtils.getComputedPropertyFunctionBody(node);
for (const sideEffect of findSideEffects(
computedPropertyBody,
catchEvents,
importedEmberName,
importedSetName,
importedSetPropertiesName,
importedSendEventName
)) {
report(sideEffect);
}
},
};
},
};
|
import json
import datetime as dt
import dateutil.parser as dp
import requests
import polling
from celery import shared_task
from django.conf import settings
from genie.models import NotebookJob, RunStatus, NOTEBOOK_STATUS_SUCCESS, NOTEBOOK_STATUS_ERROR, NOTEBOOK_STATUS_RUNNING, NOTEBOOK_STATUS_FINISHED, NOTEBOOK_STATUS_ABORT
from system.services import NotificationServices
from utils.zeppelinAPI import Zeppelin
import logging
# Get an instance of a logger
logger = logging.getLogger(__name__)
@shared_task
def runNotebookJob(notebookId: str, runStatusId: int = None, runType: str = "Scheduled"):
"""
Celery task to run a zeppelin notebook
:param notebookId: ID of the zeppelin notebook which to run
:param runStatusId: ID of genie.runStatus model
"""
if not runStatusId:
runStatus = RunStatus.objects.create(notebookId=notebookId, status=NOTEBOOK_STATUS_RUNNING, runType=runType)
else:
runStatus = RunStatus.objects.get(id=runStatusId)
runStatus.startTimestamp = dt.datetime.now()
runStatus.save()
try:
# Check if notebook is already running
isRunning, notebookName = checkIfNotebookRunning(notebookId)
if(isRunning):
runStatus.status=NOTEBOOK_STATUS_ERROR
runStatus.message="Notebook already running"
runStatus.save()
else:
# Clear notebook results
Zeppelin.clearNotebookResults(notebookId)
response = Zeppelin.runNotebookJob(notebookId)
if response:
try:
polling.poll(
lambda: checkIfNotebookRunningAndStoreLogs(notebookId, runStatus) != True, step=3, timeout=3600
)
except Exception as ex:
runStatus.status = NOTEBOOK_STATUS_ERROR
runStatus.message = str(ex)
runStatus.save()
NotificationServices.notify(notebookName=notebookName, isSuccess=False, message=str(ex))
else:
runStatus.status=NOTEBOOK_STATUS_ERROR
runStatus.message = "Failed running notebook"
runStatus.save()
except Exception as ex:
runStatus.status=NOTEBOOK_STATUS_ERROR
runStatus.message = str(ex)
runStatus.save()
NotificationServices.notify(notebookName=notebookName, isSuccess=False, message=str(ex))
def checkIfNotebookRunning(notebookId: str):
response = Zeppelin.getNotebookDetails(notebookId)
isNotebookRunning = response.get("info", {}).get("isRunning", False)
notebookName = response.get("name", "Undefined")
return isNotebookRunning, notebookName
def checkIfNotebookRunningAndStoreLogs(notebookId, runStatus):
response = Zeppelin.getNotebookDetails(notebookId)
runStatus.logs = json.dumps(response)
runStatus.save()
isNotebookRunning = response.get("info", {}).get("isRunning", False)
if not isNotebookRunning:
setNotebookStatus(response, runStatus)
return isNotebookRunning
def setNotebookStatus(response: dict, runStatus: RunStatus):
paragraphs = response.get("paragraphs", [])
notebookName = response.get("name", "Undefined")
for paragraph in paragraphs:
if paragraph.get("status") != "FINISHED":
runStatus.status=NOTEBOOK_STATUS_ERROR
runStatus.save()
NotificationServices.notify(notebookName=notebookName, isSuccess=False, message=paragraph.get("title") + " " + paragraph.get("id") + " failed")
return
runStatus.status=NOTEBOOK_STATUS_SUCCESS
runStatus.save()
NotificationServices.notify(notebookName=notebookName, isSuccess=True, message="Run successful") |
import traceback
import json
import requests
import os
from ssm_util import fetch_ssm_params
from customlist_data_builder import CustomlistItemDataBuilder
from constants import IMAGE_PATH
from builder_client import BuilderClient
def add_employee_to_guide(event, context):
"""
This lambda adds a new employee
to the guide after they are added
in Zenefits
"""
try:
# Fetch the Builder API key, the guide ID of the guide where the content
# is published, and the custom list ID that the items are associated with
api_key, guide_and_list_ids, zenefits_app_key = fetch_ssm_params()
# Initialize a Session
builder_client = BuilderClient(api_key)
for guide_id, employee_customlist_id in guide_and_list_ids:
# Use the lambda event data to build a CustomListItem
employee_data = event["data"]
customlist_data_builder = CustomlistItemDataBuilder(guide_id, zenefits_app_key)
customlist_data = customlist_data_builder.build(employee_data)
# Create a new CustomListItem in Builder
url = f"https://builder.guidebook.com/open-api/v1/custom-list-items/?guide={guide_id}&custom_lists={employee_customlist_id}"
photo_available = False
if employee_data.get('photo_url'):
img_response = requests.get(employee_data['photo_url'])
photo_available = True if img_response.status_code == 200 else False
if photo_available:
with open(IMAGE_PATH, 'wb') as handler:
handler.write(img_response.content)
with open(IMAGE_PATH, 'rb') as handler:
response = builder_client.post(url, customlist_data, {"thumbnail": handler})
os.remove(IMAGE_PATH)
else:
response = builder_client.post(url, customlist_data)
# Create a new CustomListItemRelation in Builder
relations_data = {
"custom_list": employee_customlist_id,
"custom_list_item": response.json()["id"],
}
url = "https://builder.guidebook.com/open-api/v1/custom-list-item-relations/"
builder_client.post(url, data=relations_data)
# Publish the changes
response = builder_client.post(f"https://builder.guidebook.com/open-api/v1/guides/{guide_id}/publish/", raise_error=False)
if response.status_code == 403:
print(response.content)
except Exception as e:
print(e)
traceback.print_exc()
return {"statusCode": 500}
return {"statusCode": 200}
|
# coding: utf-8
"""
Isilon SDK
Isilon SDK - Language bindings for the OneFS API # noqa: E501
OpenAPI spec version: 9
Contact: [email protected]
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import unittest
import isi_sdk_8_2_2
from isi_sdk_8_2_2.models.pools_pool_interfaces import PoolsPoolInterfaces # noqa: E501
from isi_sdk_8_2_2.rest import ApiException
class TestPoolsPoolInterfaces(unittest.TestCase):
"""PoolsPoolInterfaces unit test stubs"""
def setUp(self):
pass
def tearDown(self):
pass
def testPoolsPoolInterfaces(self):
"""Test PoolsPoolInterfaces"""
# FIXME: construct object with mandatory attributes with example values
# model = isi_sdk_8_2_2.models.pools_pool_interfaces.PoolsPoolInterfaces() # noqa: E501
pass
if __name__ == '__main__':
unittest.main()
|
var connect = require('connect'),
http = require('http'),
assert = require('assert'),
tokenator = require('../lib/tokenator');
function accessGranted(req, res){
res.end('Tokenator says yes!');
}
var app = connect()
.use(tokenator(['5917f138c80b512d14a4ee2fe05a17dc', '7b1a47ab847f7534b507c6ae4a763118']))
.use(accessGranted)
describe('Making a get request', function(){
before(function(){
http.Server(app).listen(3000);
})
describe('with a valid token', function(){
it('should get return a 200 response', function(done){
http.get( {
host: '127.0.0.1',
port: '3000',
headers: {
'api-token': '7b1a47ab847f7534b507c6ae4a763118'
}
}, function(res){
assert.strictEqual(res.statusCode, 200);
done();
})
})
it('should return the correct body content', function(done){
http.get( {
host: '127.0.0.1',
port: '3000',
headers: {
'api-token': '7b1a47ab847f7534b507c6ae4a763118'
}
}, function(res){
var body = '';
res.on('data', function (chunk) {
body += chunk;
});
res.on('end', function () {
assert.strictEqual(body, 'Tokenator says yes!');
done();
});
})
})
})
describe('with no token', function(){
it('should get return a 401 response', function(done){
http.get( { host: '127.0.0.1', port: '3000' }, function(res){
assert.strictEqual(res.statusCode, 401);
done();
})
})
it('should have an application/json header', function(done){
http.get( { host: '127.0.0.1', port: '3000' }, function(res){
assert.strictEqual(res.headers['content-type'], 'application/json; charset=utf-8');
done();
})
})
it('should return an error message as json', function(done){
http.get( { host: '127.0.0.1', port: '3000' }, function(res){
var body = '';
res.on('data', function (chunk) {
body += chunk;
});
res.on('end', function () {
assert.strictEqual(body, '{"errors":"An API token is required."}');
done();
});
})
})
})
describe('with a invalid token', function(){
it('should get return a 401 response', function(done){
http.get( {
host: '127.0.0.1',
port: '3000',
headers: {
'api-token': 'invalidtoken'
}
}, function(res){
assert.strictEqual(res.statusCode, 401);
done();
})
})
it('should have an application/json header', function(done){
http.get( {
host: '127.0.0.1',
port: '3000',
headers: {
'api-token': 'invalidtoken'
}
}, function(res){
assert.strictEqual(res.headers['content-type'], 'application/json; charset=utf-8');
done();
})
})
it('should return an error message as json', function(done){
http.get( {
host: '127.0.0.1',
port: '3000',
headers: {
'api-token': 'invalidtoken'
}
}, function(res){
var body = '';
res.on('data', function (chunk) {
body += chunk;
});
res.on('end', function () {
assert.strictEqual(body, '{"errors":"Your API token is invalid."}');
done();
});
})
})
})
})
|
from waldur_core.quotas import fields as quota_fields
from waldur_core.structure import models as structure_models
from . import models
TENANT_QUOTAS = (
('vpc_cpu_count', 'vcpu'),
('vpc_ram_size', 'ram'),
('vpc_storage_size', 'storage'),
('vpc_floating_ip_count', 'floating_ip_count'),
)
TENANT_PATHS = {
structure_models.Project: models.Tenant.Permissions.project_path,
structure_models.Customer: models.Tenant.Permissions.customer_path,
}
def inject_tenant_quotas():
for model in TENANT_PATHS:
for (quota_name, child_quota_name) in TENANT_QUOTAS:
def get_children(scope):
path = TENANT_PATHS[type(scope)]
return models.Tenant.objects.filter(**{path: scope})
model.add_quota_field(
name=quota_name,
quota_field=quota_fields.UsageAggregatorQuotaField(
get_children=get_children,
child_quota_name=child_quota_name,
)
)
|
import { itemPoints } from "../../constants.js";
import { getFormated } from "../../utils.js";
function getFunnelTooltip(dataType, digit, tooltipMap) {
return {
extraCssText: "box-shadow:0px 4px 10px 0px rgba(0,52,113,0.1);",
backgroundColor: "#fff",
show: true,
trigger: "item",
padding: 10,
formatter(item) {
let tpl = [];
// tpl.push(itemPoint(item.color))
if (Object.keys(tooltipMap).length) {
tpl.push(itemPoints(item.color));
tpl.push(
`<span style='font-size:12px;color:rgba(153,153,153,1);font-family:MicrosoftYaHeiUI;'>${item.name}</span>`
);
Object.keys(tooltipMap).forEach(val => {
tpl.push("<br>");
tpl.push(`<span style='font-size:12px;color:rgba(48,48,48,1);font-family:MicrosoftYaHeiUI;padding-left: 10px;
'>${tooltipMap[val] || val}:${item.data.data[val]}</span>`);
});
} else {
tpl.push(
`<span style="display:inline-block;margin-right:5px;border-radius:4px;width:6px;height:6px;background-color:${item.color}"></span>`
);
tpl.push(
`<span style='font-size:12px;color:rgba(153,153,153,1);font-family:MicrosoftYaHeiUI;'>${item.name}</span>`
);
tpl.push(`<span style='font-size:12px;color:rgba(48,48,48,1);font-family:MicrosoftYaHeiUI;padding-left: 5px;
'>${getFormated(item.value, dataType, digit)}</span>`);
// tpl.push(
// `${item.name}: ${getFormated(item.data.realValue, dataType, digit)}`
// );
}
return tpl.join("");
}
};
}
function getFunnelLegend(args) {
const { data, legendName } = args;
const defaultSet = {
icon: "circle",
orient: "horizontal",
x: "center",
bottom: 20,
itemWidth: 6,
itemHeight: 6
};
return {
...defaultSet,
data,
formatter(name) {
return legendName[name] != null ? legendName[name] : name;
}
};
}
function getFunnelSeries(args) {
const {
dimension,
metrics,
rows,
sequence,
ascending,
label,
labelLine,
itemStyle,
filterZero,
useDefaultOrder
} = args;
let series = {
type: "funnel",
width: "70%",
gap: 0,
minSize: "8%",
itemStyle: {
normal: {
borderColor: "#fff",
borderWidth: 0
}
},
labelLine: {
normal: {
// length: 20,
lineStyle: {
width: 1,
type: "solid",
color: "#E4E7ED",
fontSize: 12
}
}
},
label: {
normal: {
show: true,
position: "left",
textStyle: {
fontSize: 12,
color: "#999999"
}
}
}
};
let innerRows = rows.sort((a, b) => {
return sequence.indexOf(a[dimension]) - sequence.indexOf(b[dimension]);
});
if (filterZero) {
innerRows = innerRows.filter(row => {
return row[metrics];
});
}
let falseFunnel = false;
innerRows.some((row, index) => {
if (index && row[metrics] > innerRows[index - 1][metrics]) {
falseFunnel = true;
return true;
}
});
const step = 100 / innerRows.length;
if (falseFunnel && !useDefaultOrder) {
series.data = innerRows
.slice()
.reverse()
.map((row, index) => ({
name: row[dimension],
value: (index + 1) * step,
realValue: row[metrics],
data: row
}));
} else {
series.data = innerRows.map(row => ({
name: row[dimension],
value: row[metrics],
realValue: row[metrics],
data: row
}));
}
if (ascending) series.sort = "ascending";
if (label) series.label = label;
if (labelLine) series.labelLine = labelLine;
if (itemStyle) series.itemStyle = itemStyle;
let copySeries = Object.assign({}, series, {
labelLine: {
show: false
},
label: {
normal: {
show: true,
position: "inside",
textStyle: {
fontSize: 12
},
formatter: function(param) {
return param.value;
}
}
}
});
// console.log("1234", series, copySeries);
return [series, copySeries];
}
function getGrid(args) {
const grid = {
left: 20,
right: 20,
bottom: 20,
top: 60,
containLabel: true
};
return {
...grid,
...args
};
}
function getFunnelTitle() {
return {
textStyle: {
fontWeight: "bold",
fontSize: 16,
color: "rgba(48,48,48,1)"
},
top: 20,
left: 20
};
}
export const funnel = (outerColumns, outerRows, settings, extra) => {
const columns = outerColumns.slice();
const rows = outerRows.slice();
const {
dataType = "normal",
dimension = columns[0],
sequence = rows.map(row => row[dimension]),
digit = 2,
ascending,
label,
labelLine,
legendName = {},
itemStyle,
filterZero,
useDefaultOrder,
tooltipMap = [],
grid
} = settings;
const { tooltipVisible, legendVisible } = extra;
let metrics;
if (settings.metrics) {
metrics = settings.metrics;
} else {
let metricsTemp = columns.slice();
metricsTemp.splice(columns.indexOf(dimension), 1);
metrics = metricsTemp[0];
}
const tooltip =
tooltipVisible && getFunnelTooltip(dataType, digit, tooltipMap);
const legend =
legendVisible && getFunnelLegend({ data: sequence, legendName });
const series = getFunnelSeries({
dimension,
metrics,
rows,
sequence,
ascending,
label,
labelLine,
itemStyle,
filterZero,
useDefaultOrder
});
const _grid = getGrid(grid);
const title = getFunnelTitle();
const options = { title, tooltip, legend, series, grid: _grid };
return options;
};
|
var searchData=
[
['nagagog_32247',['Nagagog',['../namespace_brawl_lib_1_1_s_s_b_b_1_1_resource_nodes.html#a8ee16394b7d4914ccae85a71954c0fe9ab27bdd40981e2fa6f56dd60a8f006363',1,'BrawlLib::SSBB::ResourceNodes']]],
['name_32248',['Name',['../class_brawl_lib_1_1_modeling_1_1_collada_1_1_collada.html#a3cb1e359a1066f4dd73d437e2419d181a49ee3087348e8d44e1feda1917443987',1,'BrawlLib::Modeling::Collada::Collada']]],
['nbt_32249',['NBT',['../class_brawl_lib_1_1_s_s_b_b_1_1_resource_nodes_1_1_m_d_l0_normal_node.html#afe23950ffc20e820ec958d7ae1c5596aaeba879e90e48586dc246a1aa3c6bc98d',1,'BrawlLib.SSBB.ResourceNodes.MDL0NormalNode.NBT()'],['../namespace_brawl_lib_1_1_wii_1_1_graphics.html#a312aa6cad349670693a273f2ca53cf42aeba879e90e48586dc246a1aa3c6bc98d',1,'BrawlLib.Wii.Graphics.NBT()'],['../namespace_brawl_lib_1_1_wii_1_1_graphics.html#a9e8d15413edd7e808cdce256f53d24c3aeba879e90e48586dc246a1aa3c6bc98d',1,'BrawlLib.Wii.Graphics.NBT()']]],
['nbt3_32250',['NBT3',['../class_brawl_lib_1_1_s_s_b_b_1_1_resource_nodes_1_1_m_d_l0_normal_node.html#afe23950ffc20e820ec958d7ae1c5596aafa5c8e251179981dc9395fd30cf0ba8b',1,'BrawlLib::SSBB::ResourceNodes::MDL0NormalNode']]],
['nearconstant_32251',['NearConstant',['../namespace_brawl_lib_1_1_s_s_b_b_1_1_types.html#ae77e17c9e21f77e4a29cbee2be4e406cad8a12443eb9d978206526ef2a4ec6c93',1,'BrawlLib::SSBB::Types']]],
['nearest_32252',['Nearest',['../namespace_brawl_lib_1_1_s_s_b_b_1_1_resource_nodes.html#a1036195b4e97203c50fdfb60d9eefdc3a60494f02d440f316319dd0fad40ad007',1,'BrawlLib.SSBB.ResourceNodes.Nearest()'],['../namespace_brawl_lib_1_1_s_s_b_b_1_1_resource_nodes.html#a555214f10de806b0ed5be99ad89a12e8a60494f02d440f316319dd0fad40ad007',1,'BrawlLib.SSBB.ResourceNodes.Nearest()']]],
['nearest_5fmipmap_5flinear_32253',['Nearest_Mipmap_Linear',['../namespace_brawl_lib_1_1_s_s_b_b_1_1_resource_nodes.html#a1036195b4e97203c50fdfb60d9eefdc3a4385be674d727059f6328a98745248d3',1,'BrawlLib::SSBB::ResourceNodes']]],
['nearest_5fmipmap_5fnearest_32254',['Nearest_Mipmap_Nearest',['../namespace_brawl_lib_1_1_s_s_b_b_1_1_resource_nodes.html#a1036195b4e97203c50fdfb60d9eefdc3acf2ce1d8a7724df31781d260a2971b2a',1,'BrawlLib::SSBB::ResourceNodes']]],
['nearz_32255',['NearZ',['../namespace_brawl_lib_1_1_s_s_b_b_1_1_resource_nodes.html#a2d5fa73e676c294357b7a2bdd6446569afefc9363814c340d2a751d6ee1189f55',1,'BrawlLib::SSBB::ResourceNodes']]],
['never_32256',['Never',['../namespace_brawl_lib_1_1_wii_1_1_graphics.html#a2e385e0f8ac242b5d179c1ee0effee5ca6e7b34fa59e1bd229b207892956dc41c',1,'BrawlLib.Wii.Graphics.Never()'],['../namespace_brawl_lib_1_1_wii_1_1_graphics.html#afadec15fb0526a987decd19f294dce6ea6e7b34fa59e1bd229b207892956dc41c',1,'BrawlLib.Wii.Graphics.Never()']]],
['newton_32257',['Newton',['../namespace_brawl_lib_1_1_s_s_b_b_1_1_types.html#a6e4e11c291643530dccd9b582e1faa82a1c8b97c83b0726216cd5dbc88a64b0ed',1,'BrawlLib::SSBB::Types']]],
['no_32258',['No',['../class_brawl_crate_1_1_discord_1_1_discord_rpc.html#aeaa805de06569dc0034609d9f8097fc8abafd7322c6e97d25b6299b5d6fe8920b',1,'BrawlCrate::Discord::DiscordRpc']]],
['nocache_32259',['NoCache',['../class_brawl_lib_1_1_platform_1_1_win32.html#aa21f4be2e992fe11edbb601ce8ce792ea9c2a36ed94b288fe8f5ce5b6b16d3fdd',1,'BrawlLib::Platform::Win32']]],
['node_32260',['NODE',['../class_brawl_lib_1_1_modeling_1_1_collada_1_1_collada.html#ab4079943a0aebe343e1acc03c31d3760a0cc25b606fe928a0c9a58f7f209c4495',1,'BrawlLib.Modeling.Collada.Collada.NODE()'],['../class_brawl_lib_1_1_modeling_1_1_collada_1_1_collada.html#a9e243f1f6be413b7a6f015e530e8516ba6c3a6944a808a7c0bbb6788dbec54a9f',1,'BrawlLib.Modeling.Collada.Collada.Node()']]],
['nodesign_32261',['NoDesign',['../namespace_brawl_lib_1_1_s_s_b_b_1_1_types.html#acb8923d932490252ed7b4e087f37749ba640a027182fae363f8947a011ac49b74',1,'BrawlLib::SSBB::Types']]],
['nodesignyaxis_32262',['NoDesignYAxis',['../namespace_brawl_lib_1_1_s_s_b_b_1_1_types.html#acb8923d932490252ed7b4e087f37749ba3cfe0c39fae186f4de6c90144b7dc256',1,'BrawlLib::SSBB::Types']]],
['noedit_32263',['NoEdit',['../namespace_brawl_lib_1_1_s_s_b_b_1_1_resource_nodes.html#a57416f79e39a4c4dd86a4334e94ee180a3df6a2120849c3699e235131ffe10447',1,'BrawlLib::SSBB::ResourceNodes']]],
['noeditentry_32264',['NoEditEntry',['../namespace_brawl_lib_1_1_s_s_b_b_1_1_resource_nodes.html#a57416f79e39a4c4dd86a4334e94ee180ae22cad2369ae1cc8a1218aa89b719812',1,'BrawlLib::SSBB::ResourceNodes']]],
['noeditfolder_32265',['NoEditFolder',['../namespace_brawl_lib_1_1_s_s_b_b_1_1_resource_nodes.html#a57416f79e39a4c4dd86a4334e94ee180ad704715f61ceff33d5b06873db6f2653',1,'BrawlLib::SSBB::ResourceNodes']]],
['nomatrix_32266',['NoMatrix',['../namespace_brawl_lib_1_1_wii_1_1_graphics.html#afc897bd2b403902b8822bb85249c5dc7a3e3e96b754085325096bb3dab9c4a704',1,'BrawlLib::Wii::Graphics']]],
['none_32267',['NONE',['../class_brawl_lib_1_1_modeling_1_1_collada_1_1_collada.html#ab4079943a0aebe343e1acc03c31d3760ab50339a10e1de285ac99d4c3990b8693',1,'BrawlLib.Modeling.Collada.Collada.NONE()'],['../class_brawl_lib_1_1_internal_1_1_audio_1_1_audio_provider.html#a3ab3496203ad68fb90fe0f58ea1e6251a6adf97f83acf6453d4a6a4b1070f3754',1,'BrawlLib.Internal.Audio.AudioProvider.None()'],['../class_brawl_lib_1_1_modeling_1_1_collada_1_1_collada.html#af6b11e1957eaaba2430ee53d0bdef964a6adf97f83acf6453d4a6a4b1070f3754',1,'BrawlLib.Modeling.Collada.Collada.None()'],['../class_brawl_lib_1_1_modeling_1_1_collada_1_1_collada.html#afe74d4fd6bac502bd9305c099771e12ba6adf97f83acf6453d4a6a4b1070f3754',1,'BrawlLib.Modeling.Collada.Collada.None()'],['../class_brawl_lib_1_1_modeling_1_1_collada_1_1_collada.html#a12b713e6a5791e4ec305bcba7c7e5e5ea6adf97f83acf6453d4a6a4b1070f3754',1,'BrawlLib.Modeling.Collada.Collada.None()'],['../class_brawl_lib_1_1_modeling_1_1_collada_1_1_collada.html#aff0205d9f45e236c3fe2a153e8a0541aa6adf97f83acf6453d4a6a4b1070f3754',1,'BrawlLib.Modeling.Collada.Collada.None()'],['../class_brawl_lib_1_1_modeling_1_1_collada_1_1_collada.html#a3cb1e359a1066f4dd73d437e2419d181a6adf97f83acf6453d4a6a4b1070f3754',1,'BrawlLib.Modeling.Collada.Collada.None()'],['../class_brawl_lib_1_1_platform_1_1_linux.html#a81c9dc6c0c570683e154c6cd2a3dbf24a6adf97f83acf6453d4a6a4b1070f3754',1,'BrawlLib.Platform.Linux.None()'],['../class_brawl_lib_1_1_platform_1_1_o_s_x.html#a09363ea20b65697a0f86915f326e3c8ea6adf97f83acf6453d4a6a4b1070f3754',1,'BrawlLib.Platform.OSX.None()'],['../class_brawl_lib_1_1_platform_1_1_win32_1_1_direct_sound.html#ac0a91877723d646687e0a57d4a3eff86a6adf97f83acf6453d4a6a4b1070f3754',1,'BrawlLib.Platform.Win32.DirectSound.None()'],['../class_brawl_lib_1_1_platform_1_1_win32_1_1_direct_sound.html#aed39126f34ab0b1108cb2201dd123650a6adf97f83acf6453d4a6a4b1070f3754',1,'BrawlLib.Platform.Win32.DirectSound.None()'],['../class_brawl_lib_1_1_platform_1_1_win32_1_1_direct_sound.html#a01e9dc8965e2d12ecf83985241d94f17a6adf97f83acf6453d4a6a4b1070f3754',1,'BrawlLib.Platform.Win32.DirectSound.None()'],['../class_brawl_lib_1_1_s_s_b_b_1_1_resource_nodes_1_1_b_r_e_s_group_node.html#a883a106f4795baf12cd9fcefe6159f97a6adf97f83acf6453d4a6a4b1070f3754',1,'BrawlLib.SSBB.ResourceNodes.BRESGroupNode.None()'],['../class_brawl_lib_1_1_s_s_b_b_1_1_resource_nodes_1_1_f_c_f_g_node.html#a5b3f67051f77c38629188da6ff91f19ea6adf97f83acf6453d4a6a4b1070f3754',1,'BrawlLib.SSBB.ResourceNodes.FCFGNode.None()'],['../class_brawl_lib_1_1_s_s_b_b_1_1_resource_nodes_1_1_f_c_f_g_node.html#a500db1364f2c0f69ca00a4c1eda86779a6adf97f83acf6453d4a6a4b1070f3754',1,'BrawlLib.SSBB.ResourceNodes.FCFGNode.None()'],['../class_brawl_lib_1_1_s_s_b_b_1_1_resource_nodes_1_1_f_c_f_g_node.html#abfa6c21fc16fbbd6063afbeebb82b75aa6adf97f83acf6453d4a6a4b1070f3754',1,'BrawlLib.SSBB.ResourceNodes.FCFGNode.None()'],['../class_brawl_lib_1_1_s_s_b_b_1_1_resource_nodes_1_1_f_c_f_g_node.html#a61e195d82096092bc49f682eaa28a216a6adf97f83acf6453d4a6a4b1070f3754',1,'BrawlLib.SSBB.ResourceNodes.FCFGNode.None()'],['../class_brawl_lib_1_1_s_s_b_b_1_1_resource_nodes_1_1_f_c_f_g_node.html#a127f5843fa29dd8489b38de6745df8a3a6adf97f83acf6453d4a6a4b1070f3754',1,'BrawlLib.SSBB.ResourceNodes.FCFGNode.None()'],['../class_brawl_lib_1_1_s_s_b_b_1_1_resource_nodes_1_1_f_c_f_g_node.html#a6b77aecd0b346062572d4fa67b579aa9a6adf97f83acf6453d4a6a4b1070f3754',1,'BrawlLib.SSBB.ResourceNodes.FCFGNode.None()'],['../class_brawl_lib_1_1_s_s_b_b_1_1_resource_nodes_1_1_collision_object.html#a9d8bde16e409cdfacd73c50dff8e7204a6adf97f83acf6453d4a6a4b1070f3754',1,'BrawlLib.SSBB.ResourceNodes.CollisionObject.None()'],['../class_brawl_lib_1_1_s_s_b_b_1_1_resource_nodes_1_1_i_s_o_partition_node.html#a158553297727ed48f439f7b23f6a07e2a6adf97f83acf6453d4a6a4b1070f3754',1,'BrawlLib.SSBB.ResourceNodes.ISOPartitionNode.None()'],['../class_brawl_lib_1_1_s_s_b_b_1_1_resource_nodes_1_1_project_plus_1_1_s_t_e_x_node.html#ab8fe59a579245e5c71e0fb0997a7115fa6adf97f83acf6453d4a6a4b1070f3754',1,'BrawlLib.SSBB.ResourceNodes.ProjectPlus.STEXNode.None()'],['../class_brawl_lib_1_1_s_s_b_b_1_1_resource_nodes_1_1_project_plus_1_1_s_t_e_x_node.html#adf751eb676e80c333ad725bfe51780a3a6adf97f83acf6453d4a6a4b1070f3754',1,'BrawlLib.SSBB.ResourceNodes.ProjectPlus.STEXNode.None()'],['../class_brawl_lib_1_1_s_s_b_b_1_1_resource_nodes_1_1_r_s_a_r_sound_node.html#aba7abf470ef80a4a65f818f51b86d6b9a6adf97f83acf6453d4a6a4b1070f3754',1,'BrawlLib.SSBB.ResourceNodes.RSARSoundNode.None()'],['../struct_brawl_lib_1_1_s_s_b_b_1_1_types_1_1hk_array.html#a494602b83e4544da2e569da6753a5ecba6adf97f83acf6453d4a6a4b1070f3754',1,'BrawlLib.SSBB.Types.hkArray.None()'],['../struct_brawl_lib_1_1_s_s_b_b_1_1_types_1_1_lighting.html#a6c67615b4c4aa2b5ff3ff95414137b53a6adf97f83acf6453d4a6a4b1070f3754',1,'BrawlLib.SSBB.Types.Lighting.None()'],['../struct_brawl_lib_1_1_s_s_b_b_1_1_types_1_1_post_field_info.html#a45ef19b90e423680ee100b39e2cfa3a7a6adf97f83acf6453d4a6a4b1070f3754',1,'BrawlLib.SSBB.Types.PostFieldInfo.None()'],['../struct_brawl_lib_1_1_s_s_b_b_1_1_types_1_1_post_field_info.html#a84dd88eb611f27e40ad8c9955b27bb59a6adf97f83acf6453d4a6a4b1070f3754',1,'BrawlLib.SSBB.Types.PostFieldInfo.None()'],['../namespace_brawl_lib_1_1_imaging.html#a2bc45223fae4eb191d42b9b0b47d7b6ba6adf97f83acf6453d4a6a4b1070f3754',1,'BrawlLib.Imaging.None()'],['../namespace_brawl_lib_1_1_internal_1_1_drawing_1_1_imaging.html#a1d8a53aa2a8c2b44a748fbb264d60a70a6adf97f83acf6453d4a6a4b1070f3754',1,'BrawlLib.Internal.Drawing.Imaging.None()'],['../namespace_brawl_lib_1_1_internal.html#aad47dc5d3712e8ed8eab131cedff7ccca6adf97f83acf6453d4a6a4b1070f3754',1,'BrawlLib.Internal.None()'],['../namespace_brawl_lib_1_1_internal.html#ac2516ff5ea868140730c54036525888aa6adf97f83acf6453d4a6a4b1070f3754',1,'BrawlLib.Internal.None()'],['../namespace_brawl_lib_1_1_internal_1_1_windows_1_1_controls_1_1_model_viewer_1_1_main_window_base.html#ac7cbf8caf9f94017699671b5e23d74eea6adf97f83acf6453d4a6a4b1070f3754',1,'BrawlLib.Internal.Windows.Controls.ModelViewer.MainWindowBase.None()'],['../namespace_brawl_lib_1_1_internal_1_1_windows_1_1_controls_1_1_model_viewer_1_1_main_window_base.html#aa3cb14495590d3bfc26097c7d36ca3e4a6adf97f83acf6453d4a6a4b1070f3754',1,'BrawlLib.Internal.Windows.Controls.ModelViewer.MainWindowBase.None()'],['../namespace_brawl_lib_1_1_internal_1_1_windows_1_1_controls_1_1_model_viewer_1_1_main_window_base.html#a3e5999d6e42155c1b4b2d7324fcb7170a6adf97f83acf6453d4a6a4b1070f3754',1,'BrawlLib.Internal.Windows.Controls.ModelViewer.MainWindowBase.None()'],['../namespace_brawl_lib_1_1_internal_1_1_windows_1_1_controls_1_1_model_viewer_1_1_panels.html#a6d5b7585874e984d83c5cd31fb3c8ab8a6adf97f83acf6453d4a6a4b1070f3754',1,'BrawlLib.Internal.Windows.Controls.ModelViewer.Panels.None()'],['../namespace_brawl_lib_1_1_s_s_b_b_1_1_resource_nodes.html#ab5f5e2cf756212b1902ffe32f383bbeba6adf97f83acf6453d4a6a4b1070f3754',1,'BrawlLib.SSBB.ResourceNodes.None()'],['../namespace_brawl_lib_1_1_s_s_b_b_1_1_resource_nodes.html#a97716354bebe4ecb24b337f3693a0270a6adf97f83acf6453d4a6a4b1070f3754',1,'BrawlLib.SSBB.ResourceNodes.None()'],['../namespace_brawl_lib_1_1_s_s_b_b_1_1_resource_nodes.html#a54c4cebad8472f65094fc04fe22d0150a6adf97f83acf6453d4a6a4b1070f3754',1,'BrawlLib.SSBB.ResourceNodes.None()'],['../namespace_brawl_lib_1_1_s_s_b_b_1_1_types_1_1_animations.html#a27c04f6f0b86076b80659db9dbeac138a6adf97f83acf6453d4a6a4b1070f3754',1,'BrawlLib.SSBB.Types.Animations.None()'],['../namespace_brawl_lib_1_1_s_s_b_b_1_1_types.html#a57606938d06f854a5a4a568f5d455e8da6adf97f83acf6453d4a6a4b1070f3754',1,'BrawlLib.SSBB.Types.None()'],['../namespace_brawl_lib_1_1_s_s_b_b_1_1_types.html#a3739f396eb02106909e68eddaa34fdc6a6adf97f83acf6453d4a6a4b1070f3754',1,'BrawlLib.SSBB.Types.None()'],['../namespace_brawl_lib_1_1_s_s_b_b_1_1_types.html#af5a1b4c3c89bdc68715acc694194a838a6adf97f83acf6453d4a6a4b1070f3754',1,'BrawlLib.SSBB.Types.None()'],['../namespace_brawl_lib_1_1_s_s_b_b_1_1_types.html#a8ef3098b2d78b40c06ecc372fca00ba0a6adf97f83acf6453d4a6a4b1070f3754',1,'BrawlLib.SSBB.Types.None()'],['../namespace_brawl_lib_1_1_s_s_b_b_1_1_types.html#af1e007dacde9d6ff43dcbeb6e85133cba6adf97f83acf6453d4a6a4b1070f3754',1,'BrawlLib.SSBB.Types.None()'],['../namespace_brawl_lib_1_1_s_s_b_b_1_1_types.html#a250ca3408d30336c5103a7fd279be296a6adf97f83acf6453d4a6a4b1070f3754',1,'BrawlLib.SSBB.Types.None()'],['../namespace_brawl_lib_1_1_s_s_b_b_1_1_types.html#aee48afce3162f75d9f96bd4acb5bd0f5a6adf97f83acf6453d4a6a4b1070f3754',1,'BrawlLib.SSBB.Types.None()'],['../namespace_brawl_lib_1_1_s_s_b_b_1_1_types.html#a614615e1eda07c39af881834c54e9c40a6adf97f83acf6453d4a6a4b1070f3754',1,'BrawlLib.SSBB.Types.None()'],['../namespace_brawl_lib_1_1_s_s_b_b_1_1_types.html#aa1704689002f0063ef50530b295d7f76a6adf97f83acf6453d4a6a4b1070f3754',1,'BrawlLib.SSBB.Types.None()'],['../namespace_brawl_lib_1_1_s_s_b_b_1_1_types.html#aeae291ea16f477d0772fae9eda06580aa6adf97f83acf6453d4a6a4b1070f3754',1,'BrawlLib.SSBB.Types.None()'],['../namespace_brawl_lib_1_1_s_s_b_b_1_1_types.html#ad67c779aff65645c06c1f3f964da1ebea6adf97f83acf6453d4a6a4b1070f3754',1,'BrawlLib.SSBB.Types.None()'],['../namespace_brawl_lib_1_1_s_s_b_b_1_1_types.html#a861939016d40ba3b04eec3b50af258cea6adf97f83acf6453d4a6a4b1070f3754',1,'BrawlLib.SSBB.Types.None()'],['../namespace_brawl_lib_1_1_s_s_b_b_1_1_types.html#a6b4c6b3ba61214bd24201b497faf490da6adf97f83acf6453d4a6a4b1070f3754',1,'BrawlLib.SSBB.Types.None()'],['../namespace_brawl_lib_1_1_s_s_b_b_1_1_types.html#a94b0e94b99343f56b3a2b16f58d6626ba6adf97f83acf6453d4a6a4b1070f3754',1,'BrawlLib.SSBB.Types.None()'],['../namespace_brawl_lib_1_1_wii_1_1_compression.html#a650883f83462880bfa587832ba342815a6adf97f83acf6453d4a6a4b1070f3754',1,'BrawlLib.Wii.Compression.None()'],['../namespace_brawl_lib_1_1_wii_1_1_graphics.html#a3af845e6adb2464a52b7588fad75e879a6adf97f83acf6453d4a6a4b1070f3754',1,'BrawlLib.Wii.Graphics.None()'],['../namespace_brawl_lib_1_1_wii_1_1_graphics.html#a035d42370d6d3d1b47a255b9297a535aa6adf97f83acf6453d4a6a4b1070f3754',1,'BrawlLib.Wii.Graphics.None()'],['../namespace_brawl_lib_1_1_wii_1_1_graphics.html#a96537ab6e16fc4e3f9286d7e2f07b652a6adf97f83acf6453d4a6a4b1070f3754',1,'BrawlLib.Wii.Graphics.None()'],['../namespace_brawl_lib_1_1_wii_1_1_graphics.html#a312aa6cad349670693a273f2ca53cf42a6adf97f83acf6453d4a6a4b1070f3754',1,'BrawlLib.Wii.Graphics.None()'],['../namespace_brawl_lib_1_1_wii_1_1_graphics.html#ac6f9cc63c8a0a85a916ff1dbab085b1ea6adf97f83acf6453d4a6a4b1070f3754',1,'BrawlLib.Wii.Graphics.None()'],['../namespace_brawl_lib_1_1_wii_1_1_models.html#a5b7df835f9135fb4052993d18c9ccaaca6adf97f83acf6453d4a6a4b1070f3754',1,'BrawlLib.Wii.Models.None()'],['../namespace_brawl_lib_1_1_wii_1_1_models.html#ad60abe1fb6bc18fceeeed8f7b1567e75a6adf97f83acf6453d4a6a4b1070f3754',1,'BrawlLib.Wii.Models.None()']]],
['noninterlaced_32268',['NonInterlaced',['../struct_brawl_lib_1_1_s_s_b_b_1_1_types_1_1_t_h_p_video_info.html#acb98ee0eb380751af8747726d0c424d9a379c1d082a0888f90eef16a8add53810',1,'BrawlLib::SSBB::Types::THPVideoInfo']]],
['nooperation_32269',['NoOperation',['../namespace_brawl_lib_1_1_wii_1_1_graphics.html#ac1e90eb61ce98e140d55c32504332494a621666d91ebf4ce8af89ffdfdbdc7f44',1,'BrawlLib::Wii::Graphics']]],
['noouttransition_32270',['NoOutTransition',['../namespace_brawl_lib_1_1_s_s_b_b_1_1_types.html#af1e007dacde9d6ff43dcbeb6e85133cbaa1bda776e8cdff1c035f9ecb1388f23f',1,'BrawlLib::SSBB::Types']]],
['nop_32271',['NOP',['../namespace_brawl_lib_1_1_wii_1_1_graphics.html#afda46c1fd4a6aa155ca3e1f5bfc4f8fca1a004f5abe2b334db21328be1ea6b593',1,'BrawlLib.Wii.Graphics.NOP()'],['../namespace_brawl_lib_1_1_s_s_b_b_1_1_resource_nodes.html#a5034d410bfd57401bd5b555b7c9b2a8dab7e7f2b46723f5b08d763041108f8fed',1,'BrawlLib.SSBB.ResourceNodes.Nop()'],['../namespace_brawl_lib_1_1_s_s_b_b_1_1_types.html#abbe5ca57eaa693da2aa4d75fd78fe2b9ab7e7f2b46723f5b08d763041108f8fed',1,'BrawlLib.SSBB.Types.Nop()']]],
['noprocessing_32272',['NoProcessing',['../namespace_brawl_lib_1_1_s_s_b_b_1_1_types.html#a2cec183def8371318e642a0d56aabffcafeb185a61ab8e46ea145ee6bd3217d06',1,'BrawlLib::SSBB::Types']]],
['normal_32273',['NORMAL',['../class_brawl_lib_1_1_modeling_1_1_collada_1_1_collada.html#aff0205d9f45e236c3fe2a153e8a0541aa1e23852820b9154316c7c06e2b7ba051',1,'BrawlLib.Modeling.Collada.Collada.NORMAL()'],['../class_brawl_lib_1_1_platform_1_1_win32_1_1_direct_sound.html#a7586af691e8d4049738940397ea33753a960b44c579bc2f6818d2daaf9e4c16f0',1,'BrawlLib.Platform.Win32.DirectSound.Normal()'],['../class_brawl_lib_1_1_s_s_b_b_1_1_resource_nodes_1_1_classic_fighter_node.html#aade6c2ed380e28724bb4331531443914a960b44c579bc2f6818d2daaf9e4c16f0',1,'BrawlLib.SSBB.ResourceNodes.ClassicFighterNode.Normal()'],['../class_brawl_lib_1_1_s_s_b_b_1_1_resource_nodes_1_1_event_match_fighter_node.html#ac13fccf817b4839df45ca2d5a8e8fc31a960b44c579bc2f6818d2daaf9e4c16f0',1,'BrawlLib.SSBB.ResourceNodes.EventMatchFighterNode.Normal()'],['../class_brawl_lib_1_1_s_s_b_b_1_1_resource_nodes_1_1_project_plus_1_1_s_t_e_x_node.html#adf751eb676e80c333ad725bfe51780a3a960b44c579bc2f6818d2daaf9e4c16f0',1,'BrawlLib.SSBB.ResourceNodes.ProjectPlus.STEXNode.Normal()'],['../namespace_brawl_lib_1_1_internal.html#aad47dc5d3712e8ed8eab131cedff7ccca960b44c579bc2f6818d2daaf9e4c16f0',1,'BrawlLib.Internal.Normal()'],['../namespace_brawl_lib_1_1_s_s_b_b_1_1_types.html#ae26875bce89a02d25d4f594bcaf11a67a960b44c579bc2f6818d2daaf9e4c16f0',1,'BrawlLib.SSBB.Types.Normal()'],['../namespace_brawl_lib_1_1_s_s_b_b_1_1_types.html#a3a1585cb0b55e48ba8cd168818710df8a960b44c579bc2f6818d2daaf9e4c16f0',1,'BrawlLib.SSBB.Types.Normal()'],['../namespace_brawl_lib_1_1_s_s_b_b_1_1_types.html#affd97e4da2c003abbad6685119902e47a960b44c579bc2f6818d2daaf9e4c16f0',1,'BrawlLib.SSBB.Types.Normal()'],['../namespace_brawl_lib_1_1_s_s_b_b_1_1_types.html#a9d6933987232359e6ee0628a7d45dd41a960b44c579bc2f6818d2daaf9e4c16f0',1,'BrawlLib.SSBB.Types.Normal()'],['../namespace_brawl_lib_1_1_wii_1_1_graphics.html#a9e8d15413edd7e808cdce256f53d24c3a960b44c579bc2f6818d2daaf9e4c16f0',1,'BrawlLib.Wii.Graphics.Normal()'],['../namespace_brawl_lib_1_1_wii_1_1_models.html#ad60abe1fb6bc18fceeeed8f7b1567e75a960b44c579bc2f6818d2daaf9e4c16f0',1,'BrawlLib.Wii.Models.Normal()']]],
['normalairjump_32274',['NormalAirJump',['../class_brawl_lib_1_1_s_s_b_b_1_1_resource_nodes_1_1_f_c_f_g_node.html#a6b77aecd0b346062572d4fa67b579aa9a5f486d683ee29a6e0393337d4f9a94ff',1,'BrawlLib::SSBB::ResourceNodes::FCFGNode']]],
['normalizedbumpalpha_32275',['NormalizedBumpAlpha',['../namespace_brawl_lib_1_1_wii_1_1_graphics.html#a24b937c050766d054f07778602365f04a4d68f4e35972f7ba67b3155d9fa1c5e7',1,'BrawlLib::Wii::Graphics']]],
['normalmap_32276',['NormalMap',['../class_brawl_lib_1_1_s_s_b_b_1_1_resource_nodes_1_1_m_d_l0_material_node.html#a72c6d1b22d181b91e16a367d91adf3b7a6b9d0d690dd35849b77d2c234ce90d90',1,'BrawlLib::SSBB::ResourceNodes::MDL0MaterialNode']]],
['normalmapspecular_32277',['NormalMapSpecular',['../class_brawl_lib_1_1_s_s_b_b_1_1_resource_nodes_1_1_m_d_l0_material_node.html#a72c6d1b22d181b91e16a367d91adf3b7a4765d38ea48cebb0b8fee8a68ae5b72b',1,'BrawlLib::SSBB::ResourceNodes::MDL0MaterialNode']]],
['normalnoroll_32278',['NormalNoRoll',['../namespace_brawl_lib_1_1_s_s_b_b_1_1_types.html#affd97e4da2c003abbad6685119902e47adfed5ebe247475d5bba35ff20c8a9cc5',1,'BrawlLib::SSBB::Types']]],
['normals_32279',['Normals',['../namespace_brawl_lib_1_1_wii_1_1_graphics.html#abc11fd2a159d97e58a0e34564e51a553a4ab971a51f0335cbf8d9c2c65d379e99',1,'BrawlLib.Wii.Graphics.Normals()'],['../namespace_brawl_lib_1_1_wii_1_1_models.html#a0a6bfaac1bc782504be7d79af8fa6d0ba4ab971a51f0335cbf8d9c2c65d379e99',1,'BrawlLib.Wii.Models.Normals()']]],
['normtx_32280',['NorMtx',['../namespace_brawl_lib_1_1_wii_1_1_models.html#ab175ebe1c9a8c2871641e5f706bacbedae101ff73f29b7cb8762eb71c019f3ceb',1,'BrawlLib::Wii::Models']]],
['not_5fowned_32281',['NOT_OWNED',['../struct_brawl_lib_1_1_s_s_b_b_1_1_types_1_1hk_class_member.html#a431cec4e3245fcf62b886e2ed08222eeaeac8dab356093f6ef126de559f11da79',1,'BrawlLib::SSBB::Types::hkClassMember']]],
['notand_32282',['NotAnd',['../namespace_brawl_lib_1_1_wii_1_1_graphics.html#ac1e90eb61ce98e140d55c32504332494a6d48c9b6392d76562f288772a4338eb2',1,'BrawlLib::Wii::Graphics']]],
['notequal_32283',['NotEqual',['../namespace_brawl_lib_1_1_wii_1_1_graphics.html#a2e385e0f8ac242b5d179c1ee0effee5ca19bb0af2c3c530538cb41aff7f235b96',1,'BrawlLib.Wii.Graphics.NotEqual()'],['../namespace_brawl_lib_1_1_wii_1_1_graphics.html#afadec15fb0526a987decd19f294dce6ea19bb0af2c3c530538cb41aff7f235b96',1,'BrawlLib.Wii.Graphics.NotEqual()']]],
['notor_32284',['NotOr',['../namespace_brawl_lib_1_1_wii_1_1_graphics.html#ac1e90eb61ce98e140d55c32504332494a7c06c8aa73b2be287aafb805e88a98cd',1,'BrawlLib::Wii::Graphics']]],
['notpan_32285',['NotPan',['../class_brawl_lib_1_1_s_s_b_b_1_1_resource_nodes_1_1_r_s_a_r_sound_node.html#ad4113a62a6241c081637ce3de96e6b9ba90877437d74f35d61fcf2fa5085dcf29',1,'BrawlLib::SSBB::ResourceNodes::RSARSoundNode']]],
['notpriority_32286',['NotPriority',['../class_brawl_lib_1_1_s_s_b_b_1_1_resource_nodes_1_1_r_s_a_r_sound_node.html#ad4113a62a6241c081637ce3de96e6b9ba8769012a126bfebf082c988bfd95ae2d',1,'BrawlLib::SSBB::ResourceNodes::RSARSoundNode']]],
['notransform_32287',['NoTransform',['../namespace_brawl_lib_1_1_s_s_b_b_1_1_types.html#a250ca3408d30336c5103a7fd279be296ac8c9fe0abed7ae3bab93a24ac8ac1e97',1,'BrawlLib::SSBB::Types']]],
['notsurroundpan_32288',['NotSurroundPan',['../class_brawl_lib_1_1_s_s_b_b_1_1_resource_nodes_1_1_r_s_a_r_sound_node.html#ad4113a62a6241c081637ce3de96e6b9ba9161908657001dd0c9dd21e7bfd36759',1,'BrawlLib::SSBB::ResourceNodes::RSARSoundNode']]],
['notvolume_32289',['NotVolume',['../class_brawl_lib_1_1_s_s_b_b_1_1_resource_nodes_1_1_r_s_a_r_sound_node.html#ad4113a62a6241c081637ce3de96e6b9ba273d447a8f50b1632797622e49be27ee',1,'BrawlLib::SSBB::ResourceNodes::RSARSoundNode']]],
['nowalljump_32290',['NoWalljump',['../namespace_brawl_lib_1_1_s_s_b_b_1_1_types.html#a8ef3098b2d78b40c06ecc372fca00ba0a708da212d3e91728d3f39ac3e0b719b3',1,'BrawlLib::SSBB::Types']]],
['nowrap_32291',['NoWrap',['../namespace_brawl_lib_1_1_wii_1_1_graphics.html#a94babd8bae22049c4fbf8558f709f287a93ac740a98eb4cc45b853c780ed16c44',1,'BrawlLib::Wii::Graphics']]],
['nrmmtxarray_32292',['NrmMtxArray',['../namespace_brawl_lib_1_1_wii_1_1_graphics.html#a9e8d15413edd7e808cdce256f53d24c3a2a07ba3a9b493233fd49e04f8f57ff83',1,'BrawlLib::Wii::Graphics']]],
['nrmnbt_32293',['NrmNBT',['../namespace_brawl_lib_1_1_wii_1_1_graphics.html#a3c79c410422ef03a6509d3b7e23d2062a6bb8a09d103ef5dfeaeed6f8b0699a56',1,'BrawlLib::Wii::Graphics']]],
['nrmnbt3_32294',['NrmNBT3',['../namespace_brawl_lib_1_1_wii_1_1_graphics.html#a3c79c410422ef03a6509d3b7e23d2062abd5f23f361c9fb579bb4a463f831b405',1,'BrawlLib::Wii::Graphics']]],
['nrmxyz_32295',['NrmXYZ',['../namespace_brawl_lib_1_1_wii_1_1_graphics.html#a3c79c410422ef03a6509d3b7e23d2062a7a5f7dbc6439321e24934befbcddc476',1,'BrawlLib::Wii::Graphics']]],
['null_32296',['Null',['../struct_brawl_lib_1_1_s_s_b_b_1_1_types_1_1_color_input.html#af541af917b3d0bb5aceb3190688223e6abbb93ef26e3c101ff11cdd21cab08a94',1,'BrawlLib.SSBB.Types.ColorInput.Null()'],['../struct_brawl_lib_1_1_s_s_b_b_1_1_types_1_1_color_input.html#a9dd27dfecee717aacce79b875cd60621abbb93ef26e3c101ff11cdd21cab08a94',1,'BrawlLib.SSBB.Types.ColorInput.Null()'],['../namespace_brawl_lib_1_1_s_s_b_b_1_1_resource_nodes.html#a1ea6574d2fe9d2789519b485b064b732abbb93ef26e3c101ff11cdd21cab08a94',1,'BrawlLib.SSBB.ResourceNodes.Null()'],['../namespace_brawl_lib_1_1_s_s_b_b_1_1_resource_nodes.html#a8c18b53425c4a4bec5191cd32b3db5d9abbb93ef26e3c101ff11cdd21cab08a94',1,'BrawlLib.SSBB.ResourceNodes.Null()'],['../namespace_brawl_lib_1_1_wii_1_1_graphics.html#a9e8d15413edd7e808cdce256f53d24c3abbb93ef26e3c101ff11cdd21cab08a94',1,'BrawlLib.Wii.Graphics.Null()']]],
['numberoflinesdef_32297',['NumberOfLinesDef',['../namespace_brawl_lib_1_1_s_s_b_b_1_1_resource_nodes.html#add592c198a54493ad0659bc44f0de0cba20ec96aa3d5bb43b1e1f5081ad408b7f',1,'BrawlLib::SSBB::ResourceNodes']]]
];
|
from __future__ import unicode_literals
import mock
import unittest
import pytest
import pytz
from django.utils import timezone
from nose.tools import * # noqa
from framework.auth import Auth
from addons.osfstorage.models import OsfStorageFile, OsfStorageFileNode, OsfStorageFolder
from osf.exceptions import ValidationError
from osf.utils.permissions import WRITE, ADMIN
from osf.utils.fields import EncryptedJSONField
from osf_tests.factories import ProjectFactory, UserFactory, PreprintFactory, RegionFactory, NodeFactory
from addons.osfstorage.tests import factories
from addons.osfstorage.tests.utils import StorageTestCase
from addons.osfstorage.listeners import delete_files_task
import datetime
from osf import models
from addons.osfstorage import utils
from addons.osfstorage import settings
from website.files.exceptions import FileNodeCheckedOutError, FileNodeIsPrimaryFile
@pytest.mark.django_db
class TestOsfstorageFileNode(StorageTestCase):
def test_root_node_exists(self):
assert_true(self.node_settings.root_node is not None)
def test_root_node_has_no_parent(self):
assert_true(self.node_settings.root_node.parent is None)
def test_node_reference(self):
assert_equal(self.project, self.node_settings.root_node.target)
# def test_get_folder(self):
# file = models.OsfStorageFile(name='MOAR PYLONS', node=self.node)
# folder = models.OsfStorageFolder(name='MOAR PYLONS', node=self.node)
# _id = folder._id
# file.save()
# folder.save()
# assert_equal(folder, models.OsfStorageFileNode.get_folder(_id, self.node_settings))
# def test_get_file(self):
# file = models.OsfStorageFile(name='MOAR PYLONS', node=self.node)
# folder = models.OsfStorageFolder(name='MOAR PYLONS', node=self.node)
# file.save()
# folder.save()
# _id = file._id
# assert_equal(file, models.OsfStorageFileNode.get_file(_id, self.node_settings))
def test_serialize(self):
file = OsfStorageFile(name='MOAR PYLONS', target=self.node_settings.owner)
file.save()
assert_equals(file.serialize(), {
u'id': file._id,
u'path': file.path,
u'created': None,
u'name': u'MOAR PYLONS',
u'kind': 'file',
u'version': 0,
u'downloads': 0,
u'size': None,
u'modified': None,
u'contentType': None,
u'checkout': None,
u'md5': None,
u'sha256': None,
u'sha512': None,
})
version = file.create_version(
self.user,
{
u'service': u'cloud',
settings.WATERBUTLER_RESOURCE: u'osf',
u'object': u'06d80e',
}, {
u'size': 1234,
u'contentType': u'text/plain'
})
assert_equals(file.serialize(), {
u'id': file._id,
u'path': file.path,
u'created': version.created.isoformat(),
u'name': u'MOAR PYLONS',
u'kind': u'file',
u'version': 1,
u'downloads': 0,
u'size': 1234L,
u'modified': version.created.isoformat(),
u'contentType': u'text/plain',
u'checkout': None,
u'md5': None,
u'sha256': None,
u'sha512': None,
})
date = timezone.now()
version.update_metadata({
u'modified': date.isoformat()
})
assert_equals(file.serialize(), {
u'id': file._id,
u'path': file.path,
u'created': version.created.isoformat(),
u'name': u'MOAR PYLONS',
u'kind': u'file',
u'version': 1,
u'downloads': 0,
u'size': 1234L,
# modified date is the creation date of latest version
# see https://github.com/CenterForOpenScience/osf.io/pull/7155
u'modified': version.created.isoformat(),
u'contentType': u'text/plain',
u'checkout': None,
u'md5': None,
u'sha256': None,
u'sha512': None,
})
def test_get_child_by_name(self):
child = self.node_settings.get_root().append_file('Test')
assert_equal(child, self.node_settings.get_root().find_child_by_name('Test'))
def test_root_node_path(self):
assert_equal(self.node_settings.get_root().name, '')
def test_folder_path(self):
path = '/{}/'.format(self.node_settings.root_node._id)
assert_equal(self.node_settings.get_root().path, path)
def test_file_path(self):
file = OsfStorageFile(name='MOAR PYLONS', target=self.node)
file.save()
assert_equal(file.name, 'MOAR PYLONS')
assert_equal(file.path, '/{}'.format(file._id))
def test_append_folder(self):
child = self.node_settings.get_root().append_folder('Test')
children = self.node_settings.get_root().children
assert_equal(child.kind, 'folder')
assert_equal([child], list(children))
def test_append_file(self):
child = self.node_settings.get_root().append_file('Test')
children = self.node_settings.get_root().children
assert_equal(child.kind, 'file')
assert_equal([child], list(children))
def test_append_to_file(self):
child = self.node_settings.get_root().append_file('Test')
with assert_raises(AttributeError):
child.append_file('Cant')
def test_children(self):
kids = [
self.node_settings.get_root().append_file('Foo{}Bar'.format(x))
for x in range(100)
]
assert_equals(sorted(kids, key=lambda kid: kid.name), list(self.node_settings.get_root().children.order_by('name')))
def test_download_count_file_defaults(self):
child = self.node_settings.get_root().append_file('Test')
assert_equals(child.get_download_count(), 0)
@mock.patch('framework.sessions.session')
def test_download_count_file(self, mock_session):
mock_session.data = {}
child = self.node_settings.get_root().append_file('Test')
utils.update_analytics(self.project, child._id, 0)
utils.update_analytics(self.project, child._id, 1)
utils.update_analytics(self.project, child._id, 2)
assert_equals(child.get_download_count(), 3)
assert_equals(child.get_download_count(0), 1)
assert_equals(child.get_download_count(1), 1)
assert_equals(child.get_download_count(2), 1)
@unittest.skip
def test_create_version(self):
pass
@unittest.skip
def test_update_version_metadata(self):
pass
def test_delete_folder(self):
parent = self.node_settings.get_root().append_folder('Test')
kids = []
for x in range(10):
kid = parent.append_file(str(x))
kid.save()
kids.append(kid)
count = OsfStorageFileNode.objects.count()
tcount = models.TrashedFileNode.objects.count()
parent.delete()
assert_is(OsfStorageFileNode.load(parent._id), None)
assert_equals(count - 11, OsfStorageFileNode.objects.count())
assert_equals(tcount + 11, models.TrashedFileNode.objects.count())
for kid in kids:
assert_is(
OsfStorageFileNode.load(kid._id),
None
)
def test_delete_file(self):
child = self.node_settings.get_root().append_file('Test')
field_names = [f.name for f in child._meta.get_fields() if not f.is_relation and f.name not in ['id', 'content_type_pk']]
child_data = {f: getattr(child, f) for f in field_names}
child.delete()
assert_is(OsfStorageFileNode.load(child._id), None)
trashed = models.TrashedFileNode.load(child._id)
child_storage = dict()
trashed_storage = dict()
trashed_storage['parent'] = trashed.parent._id
child_storage['materialized_path'] = child.materialized_path
assert_equal(trashed.path, '/' + child._id)
trashed_field_names = [f.name for f in child._meta.get_fields() if not f.is_relation and
f.name not in ['id', '_materialized_path', 'content_type_pk', '_path', 'deleted_on', 'deleted_by', 'type', 'modified']]
for f, value in child_data.items():
if f in trashed_field_names:
assert_equal(getattr(trashed, f), value)
def test_delete_preprint_primary_file(self):
user = UserFactory()
preprint = PreprintFactory(creator=user)
preprint.save()
file = preprint.files.all()[0]
with assert_raises(FileNodeIsPrimaryFile):
file.delete()
def test_delete_file_no_guid(self):
child = self.node_settings.get_root().append_file('Test')
assert_is(OsfStorageFileNode.load(child._id).guids.first(), None)
with mock.patch('osf.models.files.apps.get_model') as get_model:
child.delete()
assert_is(get_model.called, False)
assert_is(OsfStorageFileNode.load(child._id), None)
def test_delete_file_guids(self):
child = self.node_settings.get_root().append_file('Test')
guid = child.get_guid(create=True)
assert_is_not(OsfStorageFileNode.load(child._id).guids.first(), None)
with mock.patch('osf.models.files.apps.get_model') as get_model:
child.delete()
assert_is(get_model.called, True)
assert_is(get_model('osf.Comment').objects.filter.called, True)
assert_is(OsfStorageFileNode.load(child._id), None)
@mock.patch('addons.osfstorage.listeners.enqueue_postcommit_task')
def test_file_deleted_when_node_deleted(self, mock_enqueue):
child = self.node_settings.get_root().append_file('Test')
self.node.remove_node(auth=Auth(self.user))
mock_enqueue.assert_called_with(delete_files_task, (self.node._id, ), {}, celery=True)
def test_materialized_path(self):
child = self.node_settings.get_root().append_file('Test')
assert_equals('/Test', child.materialized_path)
def test_materialized_path_folder(self):
child = self.node_settings.get_root().append_folder('Test')
assert_equals('/Test/', child.materialized_path)
def test_materialized_path_nested(self):
child = self.node_settings.get_root().append_folder('Cloud').append_file('Carp')
assert_equals('/Cloud/Carp', child.materialized_path)
def test_copy(self):
to_copy = self.node_settings.get_root().append_file('Carp')
copy_to = self.node_settings.get_root().append_folder('Cloud')
copied = to_copy.copy_under(copy_to)
assert_not_equal(copied, to_copy)
assert_equal(copied.parent, copy_to)
assert_equal(to_copy.parent, self.node_settings.get_root())
def test_copy_node_file_to_preprint(self):
user = UserFactory()
preprint = PreprintFactory(creator=user)
preprint.save()
to_copy = self.node_settings.get_root().append_file('Carp')
copy_to = preprint.root_folder
copied = to_copy.copy_under(copy_to)
assert_equal(copied.parent, copy_to)
assert_equal(copied.target, preprint)
def test_move_nested(self):
new_project = ProjectFactory()
other_node_settings = new_project.get_addon('osfstorage')
move_to = other_node_settings.get_root().append_folder('Cloud')
to_move = self.node_settings.get_root().append_folder('Carp')
child = to_move.append_file('A dee um')
moved = to_move.move_under(move_to)
child.reload()
assert_equal(moved, to_move)
assert_equal(new_project, to_move.target)
assert_equal(new_project, move_to.target)
assert_equal(new_project, child.target)
def test_copy_rename(self):
to_copy = self.node_settings.get_root().append_file('Carp')
copy_to = self.node_settings.get_root().append_folder('Cloud')
copied = to_copy.copy_under(copy_to, name='But')
assert_equal(copied.name, 'But')
assert_not_equal(copied, to_copy)
assert_equal(to_copy.name, 'Carp')
assert_equal(copied.parent, copy_to)
assert_equal(to_copy.parent, self.node_settings.get_root())
def test_move(self):
to_move = self.node_settings.get_root().append_file('Carp')
move_to = self.node_settings.get_root().append_folder('Cloud')
moved = to_move.move_under(move_to)
assert_equal(to_move, moved)
assert_equal(moved.parent, move_to)
def test_move_and_rename(self):
to_move = self.node_settings.get_root().append_file('Carp')
move_to = self.node_settings.get_root().append_folder('Cloud')
moved = to_move.move_under(move_to, name='Tuna')
assert_equal(to_move, moved)
assert_equal(to_move.name, 'Tuna')
assert_equal(moved.parent, move_to)
def test_move_preprint_primary_file_to_node(self):
user = UserFactory()
preprint = PreprintFactory(creator=user)
preprint.save()
to_move = preprint.files.all()[0]
assert_true(to_move.is_preprint_primary)
move_to = self.node_settings.get_root().append_folder('Cloud')
with assert_raises(FileNodeIsPrimaryFile):
moved = to_move.move_under(move_to, name='Tuna')
def test_move_preprint_primary_file_within_preprint(self):
user = UserFactory()
preprint = PreprintFactory(creator=user)
preprint.save()
folder = OsfStorageFolder(name='foofolder', target=preprint)
folder.save()
to_move = preprint.files.all()[0]
assert_true(to_move.is_preprint_primary)
moved = to_move.move_under(folder, name='Tuna')
assert preprint.primary_file == to_move
assert to_move.parent == folder
assert folder.target == preprint
@unittest.skip
def test_move_folder(self):
pass
@unittest.skip
def test_move_folder_and_rename(self):
pass
@unittest.skip
def test_rename_folder(self):
pass
@unittest.skip
def test_rename_file(self):
pass
@unittest.skip
def test_move_across_nodes(self):
pass
@unittest.skip
def test_move_folder_across_nodes(self):
pass
@unittest.skip
def test_copy_across_nodes(self):
pass
@unittest.skip
def test_copy_folder_across_nodes(self):
pass
def test_get_file_guids_for_live_file(self):
node = self.node_settings.owner
file = OsfStorageFile(name='foo', target=node)
file.save()
file.get_guid(create=True)
guid = file.get_guid()._id
assert guid is not None
assert guid in OsfStorageFileNode.get_file_guids(
'/' + file._id, provider='osfstorage', target=node)
def test_get_file_guids_for_live_folder(self):
node = self.node_settings.owner
folder = OsfStorageFolder(name='foofolder', target=node)
folder.save()
files = []
for i in range(1, 4):
files.append(folder.append_file('foo.{}'.format(i)))
files[-1].get_guid(create=True)
guids = [file.get_guid()._id for file in files]
assert len(guids) == len(files)
all_guids = OsfStorageFileNode.get_file_guids(
'/' + folder._id, provider='osfstorage', target=node)
assert sorted(guids) == sorted(all_guids)
def test_get_file_guids_for_trashed_file(self):
node = self.node_settings.owner
file = OsfStorageFile(name='foo', target=node)
file.save()
file.get_guid(create=True)
guid = file.get_guid()._id
file.delete()
assert guid is not None
assert guid in OsfStorageFileNode.get_file_guids(
'/' + file._id, provider='osfstorage', target=node)
def test_get_file_guids_for_trashed_folder(self):
node = self.node_settings.owner
folder = OsfStorageFolder(name='foofolder', target=node)
folder.save()
files = []
for i in range(1, 4):
files.append(folder.append_file('foo.{}'.format(i)))
files[-1].get_guid(create=True)
guids = [file.get_guid()._id for file in files]
assert len(guids) == len(files)
folder.delete()
all_guids = OsfStorageFileNode.get_file_guids(
'/' + folder._id, provider='osfstorage', target=node)
assert sorted(guids) == sorted(all_guids)
def test_get_file_guids_live_file_wo_guid(self):
node = self.node_settings.owner
file = OsfStorageFile(name='foo', target=node)
file.save()
assert [] == OsfStorageFileNode.get_file_guids(
'/' + file._id, provider='osfstorage', target=node)
def test_get_file_guids_for_live_folder_wo_guids(self):
node = self.node_settings.owner
folder = OsfStorageFolder(name='foofolder', target=node)
folder.save()
files = []
for i in range(1, 4):
files.append(folder.append_file('foo.{}'.format(i)))
all_guids = OsfStorageFileNode.get_file_guids(
'/' + folder._id, provider='osfstorage', target=node)
assert [] == all_guids
def test_get_file_guids_trashed_file_wo_guid(self):
node = self.node_settings.owner
file = OsfStorageFile(name='foo', target=node)
file.save()
file.delete()
assert [] == OsfStorageFileNode.get_file_guids(
'/' + file._id, provider='osfstorage', target=node)
def test_get_file_guids_for_trashed_folder_wo_guids(self):
node = self.node_settings.owner
folder = OsfStorageFolder(name='foofolder', target=node)
folder.save()
files = []
for i in range(1, 4):
files.append(folder.append_file('foo.{}'.format(i)))
folder.delete()
all_guids = OsfStorageFileNode.get_file_guids(
'/' + folder._id, provider='osfstorage', target=node)
assert [] == all_guids
def test_get_file_guids_for_live_folder_recursive(self):
node = self.node_settings.owner
folder = OsfStorageFolder(name='foofolder', target=node)
folder.save()
files = []
for i in range(1, 4):
files.append(folder.append_file('foo.{}'.format(i)))
files[-1].get_guid(create=True)
subfolder = folder.append_folder('subfoo')
for i in range(1, 4):
files.append(subfolder.append_file('subfoo.{}'.format(i)))
files[-1].get_guid(create=True)
guids = [file.get_guid()._id for file in files]
assert len(guids) == len(files)
all_guids = OsfStorageFileNode.get_file_guids(
'/' + folder._id, provider='osfstorage', target=node)
assert sorted(guids) == sorted(all_guids)
def test_get_file_guids_for_trashed_folder_recursive(self):
node = self.node_settings.owner
folder = OsfStorageFolder(name='foofolder', target=node)
folder.save()
files = []
for i in range(1, 4):
files.append(folder.append_file('foo.{}'.format(i)))
files[-1].get_guid(create=True)
subfolder = folder.append_folder('subfoo')
for i in range(1, 4):
files.append(subfolder.append_file('subfoo.{}'.format(i)))
files[-1].get_guid(create=True)
guids = [file.get_guid()._id for file in files]
assert len(guids) == len(files)
folder.delete()
all_guids = OsfStorageFileNode.get_file_guids(
'/' + folder._id, provider='osfstorage', target=node)
assert sorted(guids) == sorted(all_guids)
def test_get_file_guids_for_live_folder_recursive_wo_guids(self):
node = self.node_settings.owner
folder = OsfStorageFolder(name='foofolder', target=node)
folder.save()
files = []
for i in range(1, 4):
files.append(folder.append_file('foo.{}'.format(i)))
subfolder = folder.append_folder('subfoo')
for i in range(1, 4):
files.append(subfolder.append_file('subfoo.{}'.format(i)))
all_guids = OsfStorageFileNode.get_file_guids(
'/' + folder._id, provider='osfstorage', target=node)
assert [] == all_guids
def test_get_file_guids_for_trashed_folder_recursive_wo_guids(self):
node = self.node_settings.owner
folder = OsfStorageFolder(name='foofolder', target=node)
folder.save()
files = []
for i in range(1, 4):
files.append(folder.append_file('foo.{}'.format(i)))
subfolder = folder.append_folder('subfoo')
for i in range(1, 4):
files.append(subfolder.append_file('subfoo.{}'.format(i)))
folder.delete()
all_guids = OsfStorageFileNode.get_file_guids(
'/' + folder._id, provider='osfstorage', target=node)
assert [] == all_guids
@pytest.mark.django_db
class TestNodeSettingsModel(StorageTestCase):
def test_fields(self):
assert_true(self.node_settings._id)
assert_is(self.node_settings.has_auth, True)
assert_is(self.node_settings.complete, True)
def test_after_fork_copies_versions(self):
num_versions = 5
path = 'jazz/dreamers-ball.mp3'
record = self.node_settings.get_root().append_file(path)
for _ in range(num_versions):
version = factories.FileVersionFactory()
record.versions.add(version)
fork = self.project.fork_node(self.auth_obj)
fork_node_settings = fork.get_addon('osfstorage')
fork_node_settings.reload()
cloned_record = fork_node_settings.get_root().find_child_by_name(path)
assert_equal(list(cloned_record.versions.all()), list(record.versions.all()))
assert_true(fork_node_settings.root_node)
def test_fork_reverts_to_using_user_storage_default(self):
user = UserFactory()
user2 = UserFactory()
us = RegionFactory()
canada = RegionFactory()
user_settings = user.get_addon('osfstorage')
user_settings.default_region = us
user_settings.save()
user2_settings = user2.get_addon('osfstorage')
user2_settings.default_region = canada
user2_settings.save()
project = ProjectFactory(creator=user, is_public=True)
child = NodeFactory(parent=project, creator=user, is_public=True)
child_settings = child.get_addon('osfstorage')
child_settings.region_id = canada.id
child_settings.save()
fork = project.fork_node(Auth(user))
child_fork = models.Node.objects.get_children(fork).first()
assert fork.get_addon('osfstorage').region_id == us.id
assert fork.get_addon('osfstorage').user_settings == user.get_addon('osfstorage')
assert child_fork.get_addon('osfstorage').region_id == us.id
fork = project.fork_node(Auth(user2))
child_fork = models.Node.objects.get_children(fork).first()
assert fork.get_addon('osfstorage').region_id == canada.id
assert fork.get_addon('osfstorage').user_settings == user2.get_addon('osfstorage')
assert child_fork.get_addon('osfstorage').region_id == canada.id
def test_region_wb_url_from_creators_defaults(self):
user = UserFactory()
region = RegionFactory()
user_settings = user.get_addon('osfstorage')
user_settings.default_region = region
user_settings.save()
project = ProjectFactory(creator=user)
node_settings = project.get_addon('osfstorage')
assert node_settings.region_id == region.id
def test_encrypted_json_field(self):
new_test_creds = {
'storage': {
'go': 'science',
'hey': ['woo', 'yeah', 'great']
}
}
region = RegionFactory()
region.waterbutler_credentials = new_test_creds
region.save()
assert region.waterbutler_credentials == new_test_creds
@pytest.mark.django_db
@pytest.mark.enable_implicit_clean
class TestOsfStorageFileVersion(StorageTestCase):
def setUp(self):
super(TestOsfStorageFileVersion, self).setUp()
self.user = factories.AuthUserFactory()
self.mock_date = datetime.datetime(1991, 10, 31, tzinfo=pytz.UTC)
def test_fields(self):
version = factories.FileVersionFactory(
size=1024,
content_type='application/json',
modified=timezone.now(),
)
retrieved = models.FileVersion.load(version._id)
assert_true(retrieved.creator)
assert_true(retrieved.location)
assert_true(retrieved.size)
# sometimes identifiers are strings, so this always has to be a string, sql is funny about that.
assert_equal(retrieved.identifier, u'0')
assert_true(retrieved.content_type)
assert_true(retrieved.modified)
def test_is_duplicate_true(self):
version1 = factories.FileVersionFactory()
version2 = factories.FileVersionFactory()
assert_true(version1.is_duplicate(version2))
assert_true(version2.is_duplicate(version1))
def test_is_duplicate_false(self):
version1 = factories.FileVersionFactory(
location={
'service': 'cloud',
settings.WATERBUTLER_RESOURCE: 'osf',
'object': 'd077f2',
},
)
version2 = factories.FileVersionFactory(
location={
'service': 'cloud',
settings.WATERBUTLER_RESOURCE: 'osf',
'object': '06d80e',
},
)
assert_false(version1.is_duplicate(version2))
assert_false(version2.is_duplicate(version1))
def test_validate_location(self):
creator = factories.AuthUserFactory()
version = factories.FileVersionFactory.build(creator=creator, location={'invalid': True})
with assert_raises(ValidationError):
version.save()
version.location = {
'service': 'cloud',
settings.WATERBUTLER_RESOURCE: 'osf',
'object': 'object',
}
version.save()
def test_update_metadata(self):
version = factories.FileVersionFactory()
version.update_metadata(
{'archive': 'glacier', 'size': 123, 'modified': 'Mon, 16 Feb 2015 18:45:34 GMT'})
version.reload()
assert_in('archive', version.metadata)
assert_equal(version.metadata['archive'], 'glacier')
def test_matching_archive(self):
version = factories.FileVersionFactory(
location={
'service': 'cloud',
settings.WATERBUTLER_RESOURCE: 'osf',
'object': 'd077f2',
},
metadata={'sha256': 'existing'}
)
factories.FileVersionFactory(
location={
'service': 'cloud',
settings.WATERBUTLER_RESOURCE: 'osf',
'object': '06d80e',
},
metadata={
'sha256': 'existing',
'vault': 'the cloud',
'archive': 'erchiv'
}
)
assert_is(version._find_matching_archive(), True)
assert_is_not(version.archive, None)
assert_equal(version.metadata['vault'], 'the cloud')
assert_equal(version.metadata['archive'], 'erchiv')
def test_archive_exits(self):
node_addon = self.project.get_addon('osfstorage')
fnode = node_addon.get_root().append_file('MyCoolTestFile')
version = fnode.create_version(
self.user,
{
'service': 'cloud',
settings.WATERBUTLER_RESOURCE: 'osf',
'object': '06d80e',
}, {
'sha256': 'existing',
'vault': 'the cloud',
'archive': 'erchiv'
})
assert_equal(version.archive, 'erchiv')
version2 = fnode.create_version(
self.user,
{
'service': 'cloud',
settings.WATERBUTLER_RESOURCE: 'osf',
'object': '07d80a',
}, {
'sha256': 'existing',
})
assert_equal(version2.archive, 'erchiv')
def test_no_matching_archive(self):
models.FileVersion.objects.all().delete()
assert_is(False, factories.FileVersionFactory(
location={
'service': 'cloud',
settings.WATERBUTLER_RESOURCE: 'osf',
'object': 'd077f2',
},
metadata={'sha256': 'existing'}
)._find_matching_archive())
@pytest.mark.django_db
@pytest.mark.enable_quickfiles_creation
class TestOsfStorageCheckout(StorageTestCase):
def setUp(self):
super(TestOsfStorageCheckout, self).setUp()
self.user = factories.AuthUserFactory()
self.node = ProjectFactory(creator=self.user)
self.osfstorage = self.node.get_addon('osfstorage')
self.root_node = self.osfstorage.get_root()
self.file = self.root_node.append_file('3005')
def test_checkout_logs(self):
non_admin = factories.AuthUserFactory()
self.node.add_contributor(non_admin, permissions=WRITE)
self.node.save()
self.file.check_in_or_out(non_admin, non_admin, save=True)
self.file.reload()
self.node.reload()
assert_equal(self.file.checkout, non_admin)
assert_equal(self.node.logs.latest().action, 'checked_out')
assert_equal(self.node.logs.latest().user, non_admin)
self.file.check_in_or_out(self.user, None, save=True)
self.file.reload()
self.node.reload()
assert_equal(self.file.checkout, None)
assert_equal(self.node.logs.latest().action, 'checked_in')
assert_equal(self.node.logs.latest().user, self.user)
self.file.check_in_or_out(self.user, self.user, save=True)
self.file.reload()
self.node.reload()
assert_equal(self.file.checkout, self.user)
assert_equal(self.node.logs.latest().action, 'checked_out')
assert_equal(self.node.logs.latest().user, self.user)
with assert_raises(FileNodeCheckedOutError):
self.file.check_in_or_out(non_admin, None, save=True)
with assert_raises(FileNodeCheckedOutError):
self.file.check_in_or_out(non_admin, non_admin, save=True)
def test_delete_checked_out_file(self):
self.file.check_in_or_out(self.user, self.user, save=True)
self.file.reload()
assert_equal(self.file.checkout, self.user)
with assert_raises(FileNodeCheckedOutError):
self.file.delete()
def test_delete_folder_with_checked_out_file(self):
folder = self.root_node.append_folder('folder')
self.file.move_under(folder)
self.file.check_in_or_out(self.user, self.user, save=True)
self.file.reload()
assert_equal(self.file.checkout, self.user)
with assert_raises(FileNodeCheckedOutError):
folder.delete()
def test_move_checked_out_file(self):
self.file.check_in_or_out(self.user, self.user, save=True)
self.file.reload()
assert_equal(self.file.checkout, self.user)
folder = self.root_node.append_folder('folder')
with assert_raises(FileNodeCheckedOutError):
self.file.move_under(folder)
def test_checked_out_merge(self):
user = factories.AuthUserFactory()
node = ProjectFactory(creator=user)
osfstorage = node.get_addon('osfstorage')
root_node = osfstorage.get_root()
file = root_node.append_file('test_file')
user_merge_target = factories.AuthUserFactory()
file.check_in_or_out(user, user, save=True)
file.reload()
assert_equal(file.checkout, user)
user_merge_target.merge_user(user)
file.reload()
assert_equal(user_merge_target.id, file.checkout.id)
def test_remove_contributor_with_checked_file(self):
user = factories.AuthUserFactory()
models.Contributor.objects.create(
node=self.node,
user=user,
visible=True
)
self.node.add_permission(user, ADMIN)
self.file.check_in_or_out(self.user, self.user, save=True)
self.file.reload()
assert_equal(self.file.checkout, self.user)
self.file.target.remove_contributors([self.user], save=True)
self.file.reload()
assert_equal(self.file.checkout, None)
|
#
# PySNMP MIB module SPINS-DS2-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/SPINS-DS2-MIB
# Produced by pysmi-0.3.4 at Wed May 1 15:10:25 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
OctetString, Integer, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "OctetString", "Integer", "ObjectIdentifier")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
SingleValueConstraint, ConstraintsUnion, ConstraintsIntersection, ValueSizeConstraint, ValueRangeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "SingleValueConstraint", "ConstraintsUnion", "ConstraintsIntersection", "ValueSizeConstraint", "ValueRangeConstraint")
NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance")
IpAddress, enterprises, ModuleIdentity, Unsigned32, snmpModules, ObjectName, Integer32, Gauge32, Counter64, TimeTicks, MibScalar, MibTable, MibTableRow, MibTableColumn, ObjectIdentity, iso, NotificationType, Counter32, MibIdentifier, Bits = mibBuilder.importSymbols("SNMPv2-SMI", "IpAddress", "enterprises", "ModuleIdentity", "Unsigned32", "snmpModules", "ObjectName", "Integer32", "Gauge32", "Counter64", "TimeTicks", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "ObjectIdentity", "iso", "NotificationType", "Counter32", "MibIdentifier", "Bits")
DisplayString, TestAndIncr, TimeStamp, RowStatus, TruthValue, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TestAndIncr", "TimeStamp", "RowStatus", "TruthValue", "TextualConvention")
lucent = MibIdentifier((1, 3, 6, 1, 4, 1, 1751))
products = MibIdentifier((1, 3, 6, 1, 4, 1, 1751, 1))
softSwitch = MibIdentifier((1, 3, 6, 1, 4, 1, 1751, 1, 1198))
spinsDeviceServer = MibIdentifier((1, 3, 6, 1, 4, 1, 1751, 1, 1198, 8))
spinsDS2 = ModuleIdentity((1, 3, 6, 1, 4, 1, 1751, 1, 1198, 8, 2))
if mibBuilder.loadTexts: spinsDS2.setLastUpdated('240701')
if mibBuilder.loadTexts: spinsDS2.setOrganization('Lucent Technologies')
if mibBuilder.loadTexts: spinsDS2.setContactInfo('')
if mibBuilder.loadTexts: spinsDS2.setDescription('The MIB module for entities implementing the xxxx protocol.')
spinsSystem = MibIdentifier((1, 3, 6, 1, 4, 1, 1751, 1, 1198, 8, 2, 1))
mibBuilder.exportSymbols("SPINS-DS2-MIB", PYSNMP_MODULE_ID=spinsDS2, spinsSystem=spinsSystem, lucent=lucent, spinsDS2=spinsDS2, spinsDeviceServer=spinsDeviceServer, products=products, softSwitch=softSwitch)
|
/* globals MockL10n, MocksHelper, MockSIMSlot, MockSIMSlotManager,
SimPinDialog */
'use strict';
require('/shared/test/unit/mocks/mock_l10n.js');
requireApp('system//shared/test/unit/mocks/mock_simslot.js');
requireApp('system//shared/test/unit/mocks/mock_simslot_manager.js');
var mocksForSIMPINDialog = new MocksHelper([
'SIMSlotManager'
]).init();
suite('simcard dialog', function() {
var realL10n = window.navigator.mozL10n;
var stubByQuery, stubById;
mocksForSIMPINDialog.attachTestHelpers();
var MockSimPinSystemDialog = function(id, options) {
return {
show: function() {},
hide: function() {},
requestFocus: function() {}
};
};
suiteSetup(function() {
window.navigator.mozL10n = MockL10n;
window.SimPinSystemDialog = MockSimPinSystemDialog;
});
suiteTeardown(function() {
window.navigator.mozL10n = realL10n;
window.SimPinSystemDialog = null;
});
setup(function(callback) {
stubByQuery = this.sinon.stub(document, 'querySelector');
stubByQuery.returns(document.createElement('div'));
stubById = this.sinon.stub(document, 'getElementById');
stubById.returns(document.createElement('div'));
MockSIMSlotManager.mInstances = [new MockSIMSlot(null, 0)];
requireApp('system/js/simcard_dialog.js', function() {
SimPinDialog.init();
callback();
});
});
teardown(function() {
stubByQuery.restore();
stubById.restore();
});
test('requestFocus should be called when inputFieldControl is called',
function() {
this.sinon.stub(SimPinDialog.simPinSystemDialog, 'requestFocus');
SimPinDialog.inputFieldControl(true);
assert.isTrue(SimPinDialog.simPinSystemDialog.requestFocus.called);
});
test('unlock', function() {
var slot = new MockSIMSlot(null, 0);
slot.simCard.cardState = 'pinRequired';
var stubUnlockCardLock = this.sinon.stub(slot, 'unlockCardLock');
var stubRequestClose = this.sinon.stub(SimPinDialog, 'requestClose');
var stubHandleError = this.sinon.stub(SimPinDialog, 'handleError');
var domreq = {
error: {},
onsuccess: function() {},
onerror: function() {}
};
stubUnlockCardLock.returns(domreq);
SimPinDialog._currentSlot = slot;
SimPinDialog.unlockCardLock({});
assert.isTrue(stubUnlockCardLock.called);
domreq.onsuccess();
assert.isTrue(stubRequestClose.calledWith('success'));
domreq.onerror();
assert.isTrue(stubHandleError.called);
});
test('unlockPin', function() {
var stubUnlockCardLock = this.sinon.stub(SimPinDialog, 'unlockCardLock');
var stubClear = this.sinon.stub(SimPinDialog, 'clear');
SimPinDialog.pinInput.value = '0000';
SimPinDialog.unlockPin();
assert.isTrue(stubClear.called);
assert.deepEqual(stubUnlockCardLock.getCall(0).args[0], {
lockType: 'pin',
pin: '0000'
});
});
test('unlockPuk', function() {
this.sinon.stub(SimPinDialog, 'unlockCardLock');
var stubClear = this.sinon.stub(SimPinDialog, 'clear');
SimPinDialog.pukInput.value = '0000';
SimPinDialog.newPinInput.value = '1111';
SimPinDialog.confirmPinInput.value = '1111';
SimPinDialog.unlockPuk();
assert.isTrue(stubClear.called);
});
test('unlockXck', function() {
var stubUnlockCardLock = this.sinon.stub(SimPinDialog, 'unlockCardLock');
var stubClear = this.sinon.stub(SimPinDialog, 'clear');
SimPinDialog.xckInput.value = '0000';
SimPinDialog.lockType = 'xxxx';
SimPinDialog.unlockXck();
assert.isTrue(stubClear.called);
assert.deepEqual(stubUnlockCardLock.getCall(0).args[0], {
lockType: 'xxxx',
pin: '0000'
});
});
suite('error handling', function() {
test('retry', function() {
var stubShowErrorMsg = this.sinon.stub(SimPinDialog, 'showErrorMsg');
SimPinDialog.handleError('pin', 1);
assert.isTrue(stubShowErrorMsg.calledWith(1, 'pin'));
SimPinDialog.handleError('puk', 1);
assert.isTrue(stubShowErrorMsg.calledWith(1, 'puk'));
SimPinDialog.handleError('xck', 1);
assert.isTrue(stubShowErrorMsg.calledWith(1, 'xck'));
});
test('showErrorMsg', function() {
var stub_ = this.sinon.stub(MockL10n, 'setAttributes');
var count = 0;
stub_.returns(count++);
SimPinDialog.showErrorMsg(1, 'pin');
assert.deepEqual(stub_.getCall(0).args[2], { n: 1 });
assert.deepEqual(stub_.getCall(1).args[1], 'pinErrorMsg');
assert.deepEqual(stub_.getCall(2).args[1], 'pinLastChanceMsg');
});
});
suite('handle card state', function() {
teardown(function() {
});
test('null', function() {
var slot = new MockSIMSlot(null, 0);
slot.simCard.cardState = 'pinRequired';
SimPinDialog._currentSlot = slot;
slot.simCard = {
cardState: null
};
var stubSkip = this.sinon.stub(SimPinDialog, 'skip');
SimPinDialog.handleCardState();
assert.isTrue(stubSkip.called);
});
test('unknown', function() {
var slot = new MockSIMSlot(null, 0);
slot.simCard.cardState = 'pinRequired';
SimPinDialog._currentSlot = slot;
slot.simCard = {
cardState: 'unknown'
};
SimPinDialog.handleCardState();
var stubSkip = this.sinon.stub(SimPinDialog, 'skip');
SimPinDialog.handleCardState();
assert.isTrue(stubSkip.called);
});
test('ready', function() {
var slot = new MockSIMSlot(null, 0);
slot.simCard.cardState = 'pinRequired';
SimPinDialog._currentSlot = slot;
slot.simCard = {
cardState: 'ready'
};
SimPinDialog.handleCardState();
var stubSkip = this.sinon.stub(SimPinDialog, 'skip');
SimPinDialog.handleCardState();
assert.isTrue(stubSkip.called);
});
test('pin required', function() {
var slot = new MockSIMSlot(null, 0);
slot.simCard.cardState = 'pinRequired';
SimPinDialog._currentSlot = slot;
slot.simCard = {
cardState: 'pinRequired'
};
var stubInputFieldControl =
this.sinon.stub(SimPinDialog, 'inputFieldControl');
SimPinDialog.handleCardState();
assert.isTrue(
stubInputFieldControl.calledWith(true, false, false, false));
});
test('puk required', function() {
var slot = new MockSIMSlot(null, 0);
slot.simCard.cardState = 'pinRequired';
SimPinDialog._currentSlot = slot;
slot.simCard = {
cardState: 'pukRequired'
};
var stubInputFieldControl =
this.sinon.stub(SimPinDialog, 'inputFieldControl');
SimPinDialog.handleCardState();
assert.isTrue(
stubInputFieldControl.calledWith(false, true, false, true));
});
test('network locked', function() {
var slot = new MockSIMSlot(null, 0);
slot.simCard.cardState = 'pinRequired';
SimPinDialog._currentSlot = slot;
slot.simCard = {
cardState: 'networkLocked'
};
var stubInputFieldControl =
this.sinon.stub(SimPinDialog, 'inputFieldControl');
SimPinDialog.handleCardState();
assert.isTrue(
stubInputFieldControl.calledWith(false, false, true, false));
});
test('corporate locked', function() {
var slot = new MockSIMSlot(null, 0);
slot.simCard.cardState = 'pinRequired';
SimPinDialog._currentSlot = slot;
slot.simCard = {
cardState: 'corporateLocked'
};
var stubInputFieldControl =
this.sinon.stub(SimPinDialog, 'inputFieldControl');
SimPinDialog.handleCardState();
assert.isTrue(
stubInputFieldControl.calledWith(false, false, true, false));
});
test('service provider locked', function() {
var slot = new MockSIMSlot(null, 0);
slot.simCard.cardState = 'pinRequired';
SimPinDialog._currentSlot = slot;
slot.simCard = {
cardState: 'serviceProviderLocked'
};
var stubInputFieldControl =
this.sinon.stub(SimPinDialog, 'inputFieldControl');
SimPinDialog.handleCardState();
assert.isTrue(
stubInputFieldControl.calledWith(false, false, true, false));
});
test('network1 locked', function() {
var slot = new MockSIMSlot(null, 0);
slot.simCard.cardState = 'pinRequired';
SimPinDialog._currentSlot = slot;
slot.simCard = {
cardState: 'network1Locked'
};
var stubInputFieldControl =
this.sinon.stub(SimPinDialog, 'inputFieldControl');
SimPinDialog.handleCardState();
assert.isTrue(
stubInputFieldControl.calledWith(false, false, true, false));
});
test('network2 locked', function() {
var slot = new MockSIMSlot(null, 0);
slot.simCard.cardState = 'pinRequired';
SimPinDialog._currentSlot = slot;
slot.simCard = {
cardState: 'network2Locked'
};
var stubInputFieldControl =
this.sinon.stub(SimPinDialog, 'inputFieldControl');
SimPinDialog.handleCardState();
assert.isTrue(
stubInputFieldControl.calledWith(false, false, true, false));
});
test('hrpd network locked', function() {
var slot = new MockSIMSlot(null, 0);
slot.simCard.cardState = 'pinRequired';
SimPinDialog._currentSlot = slot;
slot.simCard = {
cardState: 'hrpdNetworkLocked'
};
var stubInputFieldControl =
this.sinon.stub(SimPinDialog, 'inputFieldControl');
SimPinDialog.handleCardState();
assert.isTrue(
stubInputFieldControl.calledWith(false, false, true, false));
});
test('ruim corporate locked', function() {
var slot = new MockSIMSlot(null, 0);
slot.simCard.cardState = 'pinRequired';
SimPinDialog._currentSlot = slot;
slot.simCard = {
cardState: 'ruimCorporateLocked'
};
var stubInputFieldControl =
this.sinon.stub(SimPinDialog, 'inputFieldControl');
SimPinDialog.handleCardState();
assert.isTrue(
stubInputFieldControl.calledWith(false, false, true, false));
});
test('ruim service provider locked', function() {
var slot = new MockSIMSlot(null, 0);
slot.simCard.cardState = 'pinRequired';
SimPinDialog._currentSlot = slot;
slot.simCard = {
cardState: 'ruimServiceProviderLocked'
};
var stubInputFieldControl =
this.sinon.stub(SimPinDialog, 'inputFieldControl');
SimPinDialog.handleCardState();
assert.isTrue(
stubInputFieldControl.calledWith(false, false, true, false));
});
});
});
|
# -*- encoding: utf-8 -*-
#
# Copyright © 2013 Intel
#
# Author: Shuangtai Tian <[email protected]>
#
# 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.
"""Converters for producing compute CPU sample messages from notification
events.
"""
from ceilometer.compute import notifications
from ceilometer.openstack.common.gettextutils import _ # noqa
from ceilometer.openstack.common import log
from ceilometer.openstack.common import timeutils
from ceilometer import sample
LOG = log.getLogger(__name__)
class ComputeMetricsNotificationBase(notifications.ComputeNotificationBase):
"""Convert compute.metrics.update notifications into Samples
"""
event_types = ['compute.metrics.update']
metric = None
sample_type = None
unit = None
@staticmethod
def _get_sample(message, name):
try:
for metric in message['payload']['metrics']:
if name == metric['name']:
info = {}
info['payload'] = metric
info['event_type'] = message['event_type']
info['publisher_id'] = message['publisher_id']
info['resource_id'] = '%s_%s' % (
message['payload']['host'],
message['payload']['nodename'])
info['timestamp'] = str(timeutils.parse_strtime(
metric['timestamp']))
return info
except Exception as err:
LOG.warning(_('An error occurred while building %(m)s '
'sample: %(e)s') % {'m': name, 'e': err})
def process_notification(self, message):
info = self._get_sample(message, self.metric)
if info:
yield sample.Sample.from_notification(
name='compute.node.%s' % self.metric,
type=self.sample_type,
unit=self.unit,
volume=(info['payload']['value'] * 100 if self.unit == '%'
else info['payload']['value']),
user_id=None,
project_id=None,
resource_id=info['resource_id'],
message=info)
class CpuFrequency(ComputeMetricsNotificationBase):
"""Handle CPU current frequency message."""
metric = 'cpu.frequency'
sample_type = sample.TYPE_GAUGE
unit = 'MHz'
class CpuUserTime(ComputeMetricsNotificationBase):
"""Handle CPU user mode time message."""
metric = 'cpu.user.time'
sample_type = sample.TYPE_CUMULATIVE
unit = 'ns'
class CpuKernelTime(ComputeMetricsNotificationBase):
"""Handle CPU kernel time message."""
metric = 'cpu.kernel.time'
unit = 'ns'
sample_type = sample.TYPE_CUMULATIVE
class CpuIdleTime(ComputeMetricsNotificationBase):
"""Handle CPU idle time message."""
metric = 'cpu.idle.time'
unit = 'ns'
sample_type = sample.TYPE_CUMULATIVE
class CpuIowaitTime(ComputeMetricsNotificationBase):
"""Handle CPU I/O wait time message."""
metric = 'cpu.iowait.time'
unit = 'ns'
sample_type = sample.TYPE_CUMULATIVE
class CpuKernelPercent(ComputeMetricsNotificationBase):
"""Handle CPU kernel percentage message."""
metric = 'cpu.kernel.percent'
unit = '%'
sample_type = sample.TYPE_GAUGE
class CpuIdlePercent(ComputeMetricsNotificationBase):
"""Handle CPU idle percentage message."""
metric = 'cpu.idle.percent'
unit = '%'
sample_type = sample.TYPE_GAUGE
class CpuUserPercent(ComputeMetricsNotificationBase):
"""Handle CPU user mode percentage message."""
metric = 'cpu.user.percent'
unit = '%'
sample_type = sample.TYPE_GAUGE
class CpuIowaitPercent(ComputeMetricsNotificationBase):
"""Handle CPU I/O wait percentage message."""
metric = 'cpu.iowait.percent'
unit = '%'
sample_type = sample.TYPE_GAUGE
class CpuPercent(ComputeMetricsNotificationBase):
"""Handle generic CPU utilization message."""
metric = 'cpu.percent'
unit = '%'
sample_type = sample.TYPE_GAUGE
|
(function(undefined) {
/**
* A list with all the chunk filenames
* @type {Array}
*/
var _files = [
'xa',
'xb',
'xc',
'xd',
'xe',
'xf',
'xg',
'xh',
'xi',
'xj',
'xk',
'xl',
'xm',
'xn',
'xo',
'xp',
'xq',
'xr',
'xs',
'xt',
'xu',
'xv',
'xw',
'xx',
'xy'];
/**
* The MediaSource that will be used for appending chunks.
* @type {MediaSource}
*/
var _mediaSource = new MediaSource();
/**
* The Audio html element.
*/
var _audioEl = document.querySelector('#track');
/**
* The html element that will show the logs.
*/
var _logEl = document.querySelector("#logger");
/**
* The MediaSource's AudioBuffer.
*/
var _sourceBuffer;
/**
* Stores all the buffers that we load.
* @type {Array}
*/
var _loadedBuffers = [];
/**
* The audio analyser of the web audio API that will be used
* for getting audio data.
*/
var _analyser;
/**
* The Canvas html element.
*/
var _canvas;
/**
* The 2D Canvas Context that will be used for drawing the frequency.
*/
var _canvasContext;
/**
* Holds a counter with all cached the buffered that we send to the
* SourceBuffer.
* @type {Number}
*/
var _itemsAppendedToSourceBuffer = 0;
//#### LOGGER ###
/**
* The logger object is used for showing logs in an HTML element.
* @type {Object}
*/
var _logger = {
log: function() {
try {
var args = Array.prototype.slice.call(arguments, 0);
_logEl.textContent = args.join(' ') + '\n' + _logEl.textContent;
} catch (e) {
console.log(e);
}
}
}
//#### FILE LOADING ###
/**
* Loads a file as an array buffer.
*
* @param {String} filename The name of the file to load.
* @param {Function} callback The callback that will be executed when the file is loaded.
*/
function get(filename, callback) {
var request = new XMLHttpRequest();
request.responseType = 'arraybuffer';
request.onreadystatechange = function() {
if (request.readyState == 4 && (request.status == 200 || request.status == 304)) {
callback(request.response);
}
};
var file = 'chunks/' + filename;
request.open('GET', file , true);
request.send();
}
/**
* It resolves a file name for the array and recursively loads
* all the files.
*
* @param {int} i The index of the file to load.
*/
function startFileLoading(i) {
// Load the chunk
get(_files[i], function(result) {
console.log('XMLHttpRequest: loaded', _files[i]);
_logger.log('XMLHttpRequest: loaded', _files[i]);
// Cache the buffer
_loadedBuffers.push(result);
if (!_sourceBuffer.updating) {
loadNextBuffer();
}
if (i == 0) {
// Start playback
startPlayback();
}
i++;
// Recursively load next chunk (if one exists)
if (i < _files.length) {
startFileLoading(i);
}
});
}
//#### AUDIO STUFF ###
/**
* It appends puts the next cached buffer into the source buffer.
*/
function loadNextBuffer() {
if (_loadedBuffers.length) {
console.log('SourceBuffer: appending', _files[_itemsAppendedToSourceBuffer]);
_logger.log('SourceBuffer: appending', _files[_itemsAppendedToSourceBuffer]);
// append the next one into the source buffer.
_sourceBuffer.appendBuffer(_loadedBuffers.shift());
_itemsAppendedToSourceBuffer++;
}
if (_itemsAppendedToSourceBuffer >= _files.length && !_sourceBuffer.updating) {
// else close the stream
_mediaSource.endOfStream();
}
}
/**
* Will be executed when the MediaSource is open and it will start
* loading the chunks recursively.
*/
function sourceOpenCallback() {
console.log('mediaSource readyState: ' + this.readyState);
_logger.log('mediaSource readyState: ' + this.readyState);
// Create the source buffer where we are going to append the
// new chunks.
_sourceBuffer = _mediaSource.addSourceBuffer('audio/mpeg');
_sourceBuffer.addEventListener('updateend', loadNextBuffer, false);
// Start
startFileLoading(0);
}
/**
* Will be executed when the MediaSource is closed.
*/
function sourceCloseCallback() {
console.log('mediaSource readyState: ' + this.readyState);
_logger.log('mediaSource readyState: ' + this.readyState);
_mediaSource.removeSourceBuffer(_sourceBuffer);
}
/**
* Will be executed when the MediaSource is ended.
*/
function sourceEndedCallback() {
console.log('mediaSource readyState: ' + this.readyState);
_logger.log('mediaSource readyState: ' + this.readyState);
}
/**
* It starts playback.
*/
function startPlayback() {
if (_audioEl.paused) {
_audioEl.play();
}
}
//#### SETTING UP STUFF ###
/**
* Setups the Web Audio API.
*/
function setupWebAudio() {
var audioContext = new AudioContext();
_analyser = audioContext.createAnalyser();
var source = audioContext.createMediaElementSource(_audioEl);
source.connect(_analyser);
_analyser.connect(audioContext.destination);
}
/**
* Will setup a canvas and a drawing context.
*/
function setupDrawingCanvas() {
_canvas = document.querySelector('canvas');
// 1024 is the number of samples that's available in the frequency data
_canvas.width = 800;
// 255 is the maximum magnitude of a value in the frequency data
_canvas.height = 255;
_canvasContext = _canvas.getContext('2d');
_canvasContext.fillStyle = '#cccccc';
}
//#### DRAWING SHIT ###
/**
* It is drawing the frequency at every frame.
*/
function draw() {
// Setup the next frame of the drawing
requestAnimationFrame(draw);
// Create a new array that we can copy the frequency data into
var freqByteData = new Uint8Array(_analyser.frequencyBinCount);
// Copy the frequency data into our new array
_analyser.getByteFrequencyData(freqByteData);
// Clear the drawing display
_canvasContext.clearRect(0, 0, _canvas.width, _canvas.height);
// For each "bucket" in the frequency data, draw a line corresponding to its magnitude
for (var i = 0; i < freqByteData.length / 0.78; i++) {
_canvasContext.fillRect(i * 2, _canvas.height - freqByteData[i * 2], 1, _canvas.height);
}
}
// Necessary event listeners
_mediaSource.addEventListener('sourceopen', sourceOpenCallback, false);
_mediaSource.addEventListener('webkitsourceopen', sourceOpenCallback, false);
_mediaSource.addEventListener('sourceclose', sourceCloseCallback, false);
_mediaSource.addEventListener('webkitsourceclose', sourceCloseCallback, false);
_mediaSource.addEventListener('sourceended', sourceEndedCallback, false);
_mediaSource.addEventListener('webkitsourceended', sourceEndedCallback, false);
// This starts the entire flow. This will trigger the 'sourceopen' event
_audioEl.src = window.URL.createObjectURL(_mediaSource);
// Typical setup of the Web Audio API and the scene.
setupWebAudio();
setupDrawingCanvas();
draw();
}())
|
studentRoster.factory('StudentsFactory', function StudentsFactory() {
var factory = {};
factory.students = [];
factory.addStudent = function(newName) {
this.students.push({name: newName, permissionSlip: false });
};
factory.deleteStudent = function(student) {
var index = this.students.indexOf(student);
this.students.splice(index, 1);
};
factory.updatePermSlip = function(student) {
student.permissionSlip = true;
};
return factory;
});
|
module.exports = {
types: {
// streaming protocol
PROTOCOL_INVALID_INPUT_SIGNAL: 'error-streaming-invalid-input-signal',
PROTOCOL_MISSING_START_SIGNAL: 'error-streaming-missing-start-signal',
PROTOCOL_OUTPUT_COUNT_MISMATCH: 'error-streaming-invalid-output-count',
PROTOCOL_TOO_MANY_START_SIGNALS: 'error-streaming-too-many-start-signals',
// streaming functions
STREAMING_FUNCTION_RUNTIME: 'streaming-function-runtime-error',
// request-reply functions
REQUEST_REPLY_FUNCTION_RUNTIME: 'request-reply-function-runtime-error',
FUNCTION_PROMOTION: 'error-promoting-function',
// argument transformers
ARGUMENT_TRANSFORMER: 'error-argument-transformer',
// hooks
HOOK_INVALID: 'error-invalid-hook',
HOOK_TIMEOUT: 'error-hook-timeout',
HOOK_RUNTIME: 'error-hook-runtime-error',
// (un)marshalling errors
UNSUPPORTED_INPUT_CONTENT_TYPE: 'error-input-content-type-unsupported',
INVALID_INPUT: 'error-input-invalid',
UNSUPPORTED_OUTPUT_CONTENT_TYPE: 'error-output-content-type-unsupported',
INVALID_OUTPUT: 'error-output-invalid',
},
// these are specially handled by the streaming HTTP adapter
reserved_prefixes: {
NOT_ACCEPTABLE: 'Invoker: Not Acceptable',
UNSUPPORTED_MEDIA_TYPE: 'Invoker: Unsupported Media Type'
}
};
|
import React from 'react'
import './Card.scss'
import {OverflowMenu, OverflowMenuItem, Tooltip} from 'carbon-components-react';
import PropTypes from 'prop-types'
/**
* Card to display content
*/
const Card = ({children, title, style, className, info, actions, setProps}) => {
const actionClick = (actionPropName) => setProps(
{action_click: `${actionPropName} ${new Date().toISOString()}`}
)
return (
<div className={'card'}>
{title &&
<>
<div className={'card-header'}>
<div className={'card-title'}>
{title}
</div>
<div className={'card-header-buttons'}>
{info &&
<div style={{marginRight: actions.length > 0 ? '4px' : '16px'}}>
<Tooltip
iconDescription={`Card ${title} Info`}>
<p>{info}</p>
</Tooltip>
</div>
}
{actions.length > 0 &&
<OverflowMenu>
{actions.map(action => (
<OverflowMenuItem
key={action.actionPropName}
itemText={action.displayName}
onClick={() => actionClick(action.actionPropName)}
/>
)
)}
</OverflowMenu>
}
</div>
</div>
<div className={'card-divider'}/>
</>
}
<div style={style} className={'card-body ' + className}>
{children}
</div>
</div>
)
};
Card.propTypes = {
/**
* The inline styles
*/
style: PropTypes.object,
/**
* The ID of this component, used to identify dash components
* in callbacks. The ID needs to be unique across all of the
* components in an app.
*/
id: PropTypes.string,
/**
The children of the element
*/
children: PropTypes.oneOfType([
PropTypes.arrayOf(PropTypes.node),
PropTypes.node
]),
/**
* The class of the element
*/
className: PropTypes.string,
/**
* Title of the card
*/
title: PropTypes.string,
/**
* Additional information about the content of this card.
*/
info: PropTypes.string,
/**
* Actions available on the side menu, button clicks will be outputted to the actionPropName prop of this card
*/
actions: PropTypes.arrayOf(
PropTypes.shape({displayName: PropTypes.string, actionPropName: PropTypes.string})
),
/**
* The action click value
*/
action_click: PropTypes.string,
/**
* Dash function
*/
setProps: PropTypes.func
}
Card.defaultProps = {
className: '',
actions: []
}
export default Card;
|
const {
Component,
} = window.Torus;
const MSG = {
Hello: 0,
Text: 1,
ChangeUser: 2,
PresentUsers: 3,
EmptyCanvas: 4,
}
const DEFAULT_USER = 'user';
const DEFAULT_COLOR = '#333333';
const PALM_REJECTION_LIMIT = 200 * 200;
const CURVE_SMOOTHING_LIMIT = 10;
const TOAST_DELAY = 1600;
class UserEditDialog extends Component {
init(name, color, saveCallback) {
this.name = name;
this.color = color;
this.handleSave = () => saveCallback(this.name, this.color);
this.handleNameInput = this.handleInput.bind(this, 'name');
this.handleColorInput = this.handleInput.bind(this, 'color');
this.handleKeydown = this.handleKeydown.bind(this);
}
handleInput(label, evt) {
const value = evt.target.value;
this[label] = value;
this.render();
}
handleKeydown(evt) {
if (evt && evt.key === 'Enter') {
this.handleSave();
}
}
compose() {
return jdom`<div class="userEditDialog-wrapper">
<div class="userEditDialog">
<div class="userEditDialog-form fixed block">
<div class="inputGroup">
<label for="ued--name">Name</label>
<div class="inputWrapper fixed block">
<input type="text" placeholder="User" id="ued--name"
autofocus
value="${this.name}"
oninput="${this.handleNameInput}"
onkeydown="${this.handleKeydown}"/>
</div>
</div>
<div class="inputGroup">
<label for="ued--color">Color</label>
<div class="inputWrapper fixed block">
<input type="color" id="ued--color"
value="${this.color}"
oninput="${this.handleColorInput}"
onkeydown="${this.handleKeydown}"/>
</div>
</div>
<button onclick="${this.handleSave}" class="updateButton accent block">Update</button>
</div>
</div>
</div>`;
}
}
class App extends Component {
init() {
this.name = DEFAULT_USER;
this.color = DEFAULT_COLOR;
// attempt to restore previous name, color
this.tryRestoreState();
this.editingUser = this.name === DEFAULT_USER && this.color === DEFAULT_COLOR;
this.dialog = new UserEditDialog(this.name, this.color, (name, color) => {
this.changeUser(name, color);
this.editingUser = false;
this.render();
});
this.conn = null;
// Used by presencer
this.users = [];
// user-visible alerts, FIFO queue
this.toasts = [];
// canvas states
this.curves = [];
this.currentCurve = [];
// is the mouse being dragged (clicked down)?
this.isDragging = false;
// last positions used to calculated speed
// and thickness of stroke
this.xLast = null;
this.yLast = null;
this.canvas = document.createElement('canvas');
this.ctx = this.canvas.getContext('2d');
this.resize = this.resize.bind(this);
this.onStart = this.onStart.bind(this);
this.onEnd = this.onEnd.bind(this);
this.onMove = this.onMove.bind(this);
this.emptyCanvas = this.emptyCanvas.bind(this);
this.canvas.addEventListener('mousedown', this.onStart);
this.canvas.addEventListener('touchstart', this.onStart);
this.canvas.addEventListener('mouseup', this.onEnd);
this.canvas.addEventListener('touchend', this.onEnd);
this.canvas.addEventListener('mousemove', this.onMove);
this.canvas.addEventListener('touchmove', this.onMove);
window.addEventListener('resize', this.resize);
this.connect();
this.resize();
}
remove() {
window.removeEventListener('resize', this.resize);
}
saveState() {
window.localStorage.setItem('state0', JSON.stringify({
name: this.name,
color: this.color,
}));
}
tryRestoreState() {
const stateString = window.localStorage.getItem('state0');
if (stateString === null) {
return;
}
try {
const state = JSON.parse(stateString);
this.name = state.name;
this.color = state.color;
} catch (e) {
console.error(e);
}
}
resize() {
const dpr = window.devicePixelRatio || 2;
this.canvas.width = window.innerWidth * dpr;
this.canvas.height = window.innerHeight * dpr;
this.canvas.style.width = window.innerWidth + 'px';
this.canvas.style.height = window.innerHeight + 'px';
this.ctx.scale(dpr, dpr);
this.render();
}
// connect() is responsible for establishing and keeping the lifecycle
// of the websocket connection. It handles all incoming messages
// and connects the websocket JSON stream to the rest of the app, dispatching
// method calls as necessary.
connect() {
if (window.location.protocol === 'https:') {
this.conn = new WebSocket(`wss://${window.location.host}/connect`);
} else {
this.conn = new WebSocket(`ws://${window.location.host}/connect`);
}
this.conn.addEventListener('open', evt => {
this.conn.send(JSON.stringify({
type: MSG.Hello,
text: `${this.name}\n${this.color}`,
}))
});
this.conn.addEventListener('message', evt => {
const message = JSON.parse(evt.data);
switch (message.type) {
case MSG.Hello: {
const [name, color] = message.text.split('\n');
if (!name || !color) {
break;
}
this.users.push({name, color});
this.render();
break;
}
case MSG.Text:
try {
const curve = JSON.parse(message.text);
this.curves.push(curve);
this.render();
} catch (e) {
console.error('Error marshaling received curve.', e);
}
break;
case MSG.EmptyCanvas:
this.toast(`${message.user.name} cleared`);
break;
case MSG.ChangeUser: {
const prev = message.user;
const [name, color] = message.text.split('\n');
if (!name || !color) {
break;
}
for (const u of this.users) {
if (u.name === prev.name && u.color === prev.color) {
u.name = name;
u.color = color;
break;
}
}
this.render();
break;
}
case MSG.PresentUsers:
try {
const presentUsers = JSON.parse(message.text);
this.users = presentUsers;
this.render();
} catch (e) {
console.error('Error marshaling received users.', e);
}
break;
default:
console.error('Unknown message type:', evt.data);
}
});
this.conn.addEventListener('error', evt => {
console.log('WebSocket error:', evt);
});
}
send(text) {
if (this.conn === null) {
return;
}
this.conn.send(JSON.stringify({
type: MSG.Text,
text: text,
}));
}
toast(text) {
this.toasts.push(text);
this.render();
setTimeout(() => {
this.toasts.shift();
this.render();
}, TOAST_DELAY)
}
pushPt(x, y) {
this.currentCurve.push([x, y]);
}
pushCurve() {
const curve = {
color: this.color,
points: this.currentCurve,
}
this.currentCurve = [];
this.curves.push(curve);
this.send(JSON.stringify(curve));
}
onStart(evt) {
evt.preventDefault();
if (evt.touches) {
// helps with palm rejection -- reject secondary touches
if (evt.touches.length > 1) {
return;
}
evt = evt.touches[0];
}
this.isDragging = true;
this.xLast = evt.clientX;
this.yLast = evt.clientY;
this.pushPt(this.xLast, this.yLast);
}
onEnd(evt) {
evt.preventDefault();
this.isDragging = false;
this.xLast = null;
this.yLast = null;
this.pushCurve();
}
onMove(evt) {
evt.preventDefault();
if (evt.touches) {
evt = evt.touches[0];
}
if (!this.isDragging) {
return;
}
const xPos = evt.clientX;
const yPos = evt.clientY;
const xDif = this.xLast - xPos;
const yDif = this.yLast - yPos;
const sqDist = xDif * xDif + yDif * yDif;
if (sqDist > PALM_REJECTION_LIMIT) {
// ignore jumps more than a limit -- palm rejection
this.isDragging = false;
this.xLast = null;
this.yLast = null;
this.pushCurve();
return
}
if (sqDist <= CURVE_SMOOTHING_LIMIT) {
return
}
this.ctx.lineWidth = 2;
this.ctx.strokeStyle = this.color;
this.ctx.beginPath();
this.ctx.moveTo(this.xLast, this.yLast);
this.ctx.lineTo(xPos, yPos);
this.ctx.stroke();
this.xLast = xPos;
this.yLast = yPos;
this.pushPt(xPos, yPos);
}
emptyCanvas() {
this.curves = [];
this.currentCurve = [];
this.render();
// notify other clients
if (this.conn === null) {
return;
}
this.conn.send(JSON.stringify({
type: MSG.EmptyCanvas,
}));
}
drawCurve(curve) {
const {color, points} = curve;
let lastPt = points[0];
this.ctx.lineWidth = 2;
this.ctx.strokeStyle = color;
for (const pt of points.slice(1)) {
this.ctx.beginPath();
this.ctx.moveTo(lastPt[0], lastPt[1]);
this.ctx.lineTo(pt[0], pt[1]);
this.ctx.stroke();
lastPt = pt;
}
}
changeUser(name, color) {
this.name = name;
this.color = color;
if (this.conn === null) {
return;
}
this.saveState();
this.conn.send(JSON.stringify({
type: MSG.ChangeUser,
text: `${name}\n${color}`,
}));
}
compose() {
const User = u => jdom`<div class="avatar fixed block">
<div class="avatar-icon" style="background:${u.color}"></div>
<div class="avatar-name">${u.name}</div>
</div>`;
const Toast = t => jdom`<li class="toast fixed block">${t}</li>`;
return jdom`<div class="app">
${this.canvas}
<ul class="toasts">
${this.toasts.map(Toast)}
</ul>
<nav class="nav">
<div class="users">
${this.users.map(User)}
</div>
<div class="btnGroup">
<button class="avatarEditButton accent block" onclick="${() => {
this.editingUser = !this.editingUser;
this.render();
}}">profile...</button>
<button class="emptyCanvasButton block" onclick="${this.emptyCanvas}">
clear
</button>
</div>
</nav>
${this.editingUser ? this.dialog.node : null}
</div>`;
}
render(...args) {
this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height);
for (const curve of this.curves) {
this.drawCurve(curve);
}
this.drawCurve({
color: this.color,
points: this.currentCurve,
});
super.render(...args);
}
}
const app = new App();
document.getElementById('root').appendChild(app.node);
|
const cf = require('@mapbox/cloudfriend')
const Parameters = {
BucketName: {
Type: 'String',
Description: 'Name of S3 bucket where Lambda code is saved',
Default: 'slack-bot-commands',
},
GitSha: {
Type: 'String',
Description: 'Git SHA of latest commit for Lambda function',
},
}
const Resources = {
GuidelinesSNS: {
Type: 'AWS::SNS::Topic',
Properties: {
TopicName: 'guidelines',
Subscription: [
{
Endpoint: cf.getAtt('GuidelinesLambda', 'Arn'),
Protocol: 'lambda',
},
],
Tags: [
{ Key: 'Name', Value: 'guidelines-sns' },
{ Key: 'Tool', Value: 'slackbot' },
{ Key: 'Environment', Value: cf.stackName },
],
},
},
GuidelinesPermission: {
Type: 'AWS::Lambda::Permission',
Properties: {
Action: 'lambda:InvokeFunction',
FunctionName: cf.ref('GuidelinesLambda'),
Principal: 'sns.amazonaws.com',
SourceArn: cf.ref('GuidelinesSNS'),
},
},
}
const lambda = new cf.shortcuts.Lambda({
LogicalName: 'GuidelinesLambda',
Handler: 'guidelines/guidelines-lambda.handler',
Code: {
S3Bucket: cf.ref('BucketName'),
S3Key: 'guidelines.zip',
},
Environment: {
Variables: {
SLACK_TOKEN: '{{resolve:secretsmanager:slackbots/secret/slacktoken:SecretString:SLACK_TOKEN}}',
}
},
Runtime: 'nodejs12.x',
Timeout: '60',
Tags: [
{ Key: 'Name', Value: 'guidelines-lambda' },
{ Key: 'Project', Value: 'slackbot' },
],
})
module.exports = cf.merge({ Parameters, Resources }, lambda)
|
# Django settings for thetracker project.
DEBUG = True
TEMPLATE_DEBUG = DEBUG
ADMINS = (
# ('Your Name', '[email protected]'),
)
MANAGERS = ADMINS
DATABASE_ENGINE = 'sqlite3' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
DATABASE_NAME = 'db' # Or path to database file if using sqlite3.
DATABASE_USER = '' # Not used with sqlite3.
DATABASE_PASSWORD = '' # Not used with sqlite3.
DATABASE_HOST = '' # Set to empty string for localhost. Not used with sqlite3.
DATABASE_PORT = '' # Set to empty string for default. Not used with sqlite3.
# Local time zone for this installation. Choices can be found here:
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
# although not all choices may be available on all operating systems.
# If running in a Windows environment this must be set to the same as your
# system time zone.
TIME_ZONE = 'America/Chicago'
# Language code for this installation. All choices can be found here:
# http://www.i18nguy.com/unicode/language-identifiers.html
LANGUAGE_CODE = 'en-us'
SITE_ID = 1
# If you set this to False, Django will make some optimizations so as not
# to load the internationalization machinery.
USE_I18N = True
# Absolute path to the directory that holds media.
# Example: "/home/media/media.lawrence.com/"
MEDIA_ROOT = ''
# URL that handles the media served from MEDIA_ROOT. Make sure to use a
# trailing slash if there is a path component (optional in other cases).
# Examples: "http://media.lawrence.com", "http://example.com/media/"
MEDIA_URL = ''
# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
# trailing slash.
# Examples: "http://foo.com/media/", "/media/".
ADMIN_MEDIA_PREFIX = '/media/'
# Make this unique, and don't share it with anybody.
SECRET_KEY = '@vhi@@dsyxmm8z_&awlpd@7)mx4ugud*cenbmzzsv7tyt7bop2'
# List of callables that know how to import templates from various sources.
TEMPLATE_LOADERS = (
'django.template.loaders.filesystem.load_template_source',
'django.template.loaders.app_directories.load_template_source',
# 'django.template.loaders.eggs.load_template_source',
)
MIDDLEWARE_CLASSES = (
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
)
ROOT_URLCONF = 'exampleapp.urls'
TEMPLATE_DIRS = (
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
)
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.comments',
'django.contrib.markup',
'registration',
'djtracker',
'djtracker_comments',
)
ACCOUNT_ACTIVATION_DAYS = 7
ISSUE_ADDRESS = "[email protected]"
WEB_SERVER = "apache"
COMMENTS_APP = 'djtracker_comments'
|
def q(n):
if n==1:
return n
else:
return q(n-1)+(2*n-1)
n=int(input("Digite um número: "))
print(q(n))
|
'use strict'
/*
* Create a constant variables for each primitives
* `str`, `num`, `bool` and `undef`
*
* @notions Primitive and Operators, Variables
*/
// Your code :
const str = "1337"
const num = 42
const bool = false
const undef = undefined
//* Begin of tests
const assert = require('assert')
assert.strictEqual(typeof str, 'string')
assert.strictEqual(str, '1337')
assert.strictEqual(typeof num, 'number')
assert.strictEqual(num, 42)
assert.strictEqual(typeof bool, 'boolean')
assert.strictEqual(bool, false)
assert.strictEqual(typeof undef, 'undefined')
assert.strictEqual(undef, undefined)
// End of tests */
|
$(document).ready(registration);
function userAuth() {
// VK auth via Implicit Flow
let uri = window.location.hostname + window.location.pathname + window.location.search;
let clientId = $("#clientId").text();
window.location.href = `https://oauth.vk.com/authorize?client_id=${clientId}&redirect_uri=${uri}&display=page&scope=email&response_type=token&revoke=1`;
}
function registration() {
if (window.location.hash !== "") { // checking hash with VK auth info
let info = getInfo(); // getting info of user
let vkId = info.user_id;
$.ajax({
url: API_URL + `user`,
data: {vk_id: vkId, check: true},
type: 'GET',
async: false,
error: holdErrorResponse,
}).done(function (r) { // checking an existing VK user page
if (r.exist) {
makeErrorToast("Эта страница уже зарегистрирована");
return;
}
if (typeof info['error'] !== "undefined") // checking correct response in auth
return;
VK.Api.call("users.get", { // getting user's info
users_ids: info['user_id'],
fields: "bdate,city",
v: "5.103"
},
function (r) {
if (typeof info['email'] !== "undefined") {
$("#email_field").val(info.email);
}
if (!r.response)
return;
let resp = r.response[0];
// completing registration fields via VK auth
$("#surname_field").val(resp.last_name);
$("#name_field").val(resp.first_name);
if (typeof resp['bdate'] !== "undefined") {
$("#birthday_field").val(resp.bdate);
}
if (typeof resp['city'] !== "undefined") {
$("#city_field").val(resp.city.title);
}
}
);
// edit page view
let button = $("#vk_login_button");
button.prop("onclick", null);
button.text("Ваша страница успешно привязана");
let vkInfo = $("#vk_notification");
vkInfo.removeClass("hidden");
let vkLink = '';
// getting the screen name of the group with bot
VK.Api.call("groups.getById", {
group_id: $("#groupId").text(),
fields: 'screen_name',
v: "5.103"
},
function (r) { // displaying the explanatory text of VK notifications
if (r.response) {
vkLink = r.response[0].screen_name;
vkInfo.html(`Для того, чтобы получать уведомления через ВКонтакте,
напишите в сообщения <a href="https://vk.com/${vkLink}">сообщества</a>`);
// adding VK id to complete registration with comefrom info
let href = window.location.pathname + window.location.search;
if (window.location.search === '') {
href = href + `?user_id=${info.user_id}&screen_name=${vkLink}`;
} else {
href = href + `&user_id=${info.user_id}&screen_name=${vkLink}`;
}
// remove page's refresh
window.history.replaceState(null, null, href);
}
}
);
}
);
}
}
function getInfo() {
let hash = window.location.hash.slice(1).split("&");
let info = {};
// creating a dict with auth info
for (let i = 0; i < hash.length; ++i) {
let temp = hash[i].split("=");
info[temp[0]] = temp[1];
}
window.location.hash = '';
return info;
}
|
import Icon from '../components/Icon'
Icon.register({
equals: {
width: 448,
height: 512,
paths: [
{
d: 'M416 304c17.7 0 32 14.3 32 32v32c0 17.7-14.3 32-32 32h-384c-17.7 0-32-14.3-32-32v-32c0-17.7 14.3-32 32-32h384zM416 112c17.7 0 32 14.3 32 32v32c0 17.7-14.3 32-32 32h-384c-17.7 0-32-14.3-32-32v-32c0-17.7 14.3-32 32-32h384z'
}
]
}
})
|
# -*- coding: utf-8 -*-
class ConnectionResolverInterface(object):
def connection(self, name=None):
raise NotImplementedError()
def get_default_connection(self):
raise NotImplementedError()
def set_default_connection(self, name):
raise NotImplementedError()
|
// script to find and remove definitions which have no paths, or paths
// but no operations
// run with a find command piped into xargs for now
const yaml = require('js-yaml');
const fs = require('fs');
for (let i=2;i<process.argv.length;i++) {
let fname = process.argv[i];
try {
let api = yaml.safeLoad(fs.readFileSync(fname,'utf8'),{json:true});
if (api && (Object.keys(api.paths).length === 0)) {
console.warn('*',fname);
fs.unlinkSync(fname);
}
}
catch (ex) {
console.warn('?',fname);
}
}
|
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var ResolutionsMemoryPersistence_1 = require("./ResolutionsMemoryPersistence");
exports.ResolutionsMemoryPersistence = ResolutionsMemoryPersistence_1.ResolutionsMemoryPersistence;
var ResolutionsFilePersistence_1 = require("./ResolutionsFilePersistence");
exports.ResolutionsFilePersistence = ResolutionsFilePersistence_1.ResolutionsFilePersistence;
var ResolutionsMongoDbPersistence_1 = require("./ResolutionsMongoDbPersistence");
exports.ResolutionsMongoDbPersistence = ResolutionsMongoDbPersistence_1.ResolutionsMongoDbPersistence;
//# sourceMappingURL=index.js.map |
module.exports = {
permissions: ["MANAGE_GUILD"],
botpermissions: ["MANAGE_NICKNAMES"],
run: async(client, message, args) =>{
message.guild.members.cache.forEach(m => {
if(m.presence){
if(m.presence.activities[0]){
if(m.presence.activities[0].type == "CUSTOM_STATUS"){
if(m.presence.activities[0].state){
if(m.presence.activities[0].state.includes(".gg/")){
m.setNickname(`zzzz Dehoisted ${m.user.username}`, `${message.author.username} used dehoist.`).catch(e => {return;})
}
}
}
}
}
});
message.reply(client.embed("Dehoist", `Completed.`))
}
} |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const React = require("react");
const wrapIcon_1 = require("../utils/wrapIcon");
const rawSvg = (iconProps) => {
const { className, primaryFill } = iconProps;
return React.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", xmlns: "http://www.w3.org/2000/svg", className: className },
React.createElement("path", { d: "M10 8.5a.5.5 0 100-1 .5.5 0 000 1z", fill: primaryFill }),
React.createElement("path", { d: "M1 5.5A2.5 2.5 0 013.5 3h9A2.5 2.5 0 0115 5.5v5a2.5 2.5 0 01-2.5 2.5h-9A2.5 2.5 0 011 10.5v-5zm3.5.5a.5.5 0 00-.5.5v3a.5.5 0 001 0v-3a.5.5 0 00-.5-.5zm6.85 2.65a1.5 1.5 0 000-1.3l.5-.5a.5.5 0 00-.7-.7l-.5.5a1.5 1.5 0 00-1.3 0l-.5-.5a.5.5 0 10-.7.7l.5.5a1.5 1.5 0 000 1.3l-.5.5a.5.5 0 10.7.7l.5-.5a1.5 1.5 0 001.3 0l.5.5a.5.5 0 00.7-.7l-.5-.5z", fill: primaryFill }));
};
const Vault16Filled = wrapIcon_1.default(rawSvg({}), 'Vault16Filled');
exports.default = Vault16Filled;
|
/**
* @class Oskari.mapframework.domain.Style
*
* Map Layer Style
*/
Oskari.clazz.define('Oskari.mapframework.domain.Style',
/**
* @method create called automatically on construction
* @static
*/
function () {
this._name = null;
this._title = null;
this._legend = null;
}, {
/**
* @method setName
* Sets name for the style
*
* @param {String} name
* style name
*/
setName: function (name) {
this._name = name;
},
/**
* @method getName
* Gets name for the style
*
* @return {String} style name
*/
getName: function () {
return this._name;
},
/**
* @method setTitle
* Sets title for the style
*
* @param {String} title
* style title
*/
setTitle: function (title) {
this._title = title;
},
/**
* @method getTitle
* Gets title for the style
*
* @return {String} style title
*/
getTitle: function () {
return this._title;
},
/**
* @method setLegend
* Sets legendimage URL for the style
*
* @param {String} legend
* style legend
*/
setLegend: function (legend) {
this._legend = legend;
},
/**
* @method getLegend
* Gets legendimage URL for the style
*
* @return {String} style legend
*/
getLegend: function () {
return this._legend;
}
});
|
const adjectives = require('./dictionaries/adjectives_by_letter.json')
const nouns = require('./dictionaries/nouns_by_letter.json')
const defaults = {
order: [
{ type: 'adj', letter: '*' },
{ type: 'adj', letter: '*' },
{ type: 'noun', letter: '*' }
],
spacer: '',
caps: true
}
function wordListByType (type) {
switch (type) {
case 'adj':
return adjectives
case 'noun':
return nouns
default:
return adjectives
}
}
function randomize (obj, char) {
if (char === '*') char = Object.keys(obj)[Math.floor(Math.random() * Object.keys(obj).length)]
return obj[char][Math.floor(Math.random() * obj[char].length)]
}
function capitalize (str) {
return `${str.charAt(0).toUpperCase()}${str.slice(1)}`
}
class SillyId {
constructor (order, spacer, caps) {
this.order = order || defaults.order
this.spacer = spacer || defaults.spacer
this.caps = caps === false ? false : defaults.caps
}
generate () {
return this.order.map(entry => {
const wordList = wordListByType(entry.type)
const word = randomize(wordList, entry.letter)
return this.caps
? capitalize(word)
: word
}).join(this.spacer)
}
}
module.exports = SillyId
|
module.exports = function(config) {
config.set({
browsers: ['ChromeHeadless'],
files: [
{ pattern: 'test-context.js', watched: false }
],
frameworks: ['jasmine'],
preprocessors: {
'test-context.js': ['webpack']
},
webpack: {
module: {
loaders: [
{ test: /\.js$/, exclude: /node_modules/, loader: 'babel-loader?presets[]=env' }
]
},
watch: true
},
webpackServer: {
noInfo: true
}
});
};
|
#!/usr/bin/env python
#
# License: BSD
# https://raw.githubusercontent.com/splintered-reality/py_trees/devel/LICENSE
#
##############################################################################
# Imports
##############################################################################
import py_trees
import py_trees.console as console
##############################################################################
# Logging Level
##############################################################################
py_trees.logging.level = py_trees.logging.Level.DEBUG
logger = py_trees.logging.Logger("Nosetest")
##############################################################################
# Tests
##############################################################################
def test_single_behaviour():
console.banner("Single Behaviour")
failure = py_trees.behaviours.Failure(name="Failure")
running = py_trees.behaviours.Running(name="Running")
success = py_trees.behaviours.Success(name="Success")
print("\nAll status' except INVALID are permissable.")
print("\n--------- Assertions ---------\n")
print("failure.tip()[before tick]......None [{}]".format(failure.tip()))
assert(failure.tip() is None)
print("")
failure.tick_once()
running.tick_once()
success.tick_once()
print("")
print("failure.tip()...................Failure [{}]".format(failure.tip().name))
assert(failure.tip() is failure)
print("running.tip()...................Running [{}]".format(running.tip().name))
assert(running.tip() is running)
print("success.tip()...................Success [{}]".format(success.tip().name))
assert(success.tip() is success)
def test_sequence():
console.banner("Sequence")
print("\n--------- Assertions ---------\n")
root = py_trees.composites.Sequence(name="Root")
running = py_trees.behaviours.Running(name="Running")
success = py_trees.behaviours.Success(name="Success")
root.add_children([success, running])
py_trees.tests.tick_tree(root, 1, 1, print_snapshot=True)
print("root.tip()...................running [{}]".format(root.tip()))
assert(root.tip() is running)
root = py_trees.composites.Sequence(name="Root")
success_one = py_trees.behaviours.Success(name="Success 1")
success_two = py_trees.behaviours.Success(name="Success 2")
root.add_children([success_one, success_two])
py_trees.tests.tick_tree(root, 1, 1, print_snapshot=True)
print("root.tip()...................Success 2 [{}]".format(root.tip().name))
assert(root.tip() is success_two)
root = py_trees.composites.Sequence(name="Root")
failure = py_trees.behaviours.Failure(name="Failure")
root.add_children([failure])
py_trees.tests.tick_tree(root, 1, 1, print_snapshot=True)
print("root.tip()...................Failure [{}]".format(root.tip().name))
assert(root.tip() is failure)
root = py_trees.composites.Sequence(name="Root")
py_trees.tests.tick_tree(root, 1, 1, print_snapshot=True)
print("root.tip()...................Root [{}]".format(root.tip().name))
assert(root.tip() is root)
def test_selector():
console.banner("Selector")
print("\n--------- Assertions ---------\n")
root = py_trees.composites.Selector(name="Root")
failure = py_trees.behaviours.Failure(name="Failure")
running = py_trees.behaviours.Running(name="Running")
root.add_children([failure, running])
py_trees.tests.tick_tree(root, 1, 1, print_snapshot=True)
print("root.tip()...................running [{}]".format(root.tip().name))
assert(root.tip() is running)
root = py_trees.composites.Selector(name="Root")
failure = py_trees.behaviours.Failure(name="Failure")
success = py_trees.behaviours.Success(name="Success")
root.add_children([failure, success])
py_trees.tests.tick_tree(root, 1, 1, print_snapshot=True)
print("root.tip()...................success [{}]".format(root.tip().name))
assert(root.tip() is success)
root = py_trees.composites.Selector(name="Root")
running = py_trees.behaviours.Running(name="Running")
failure = py_trees.behaviours.Failure(name="Failure")
root.add_children([running, failure])
py_trees.tests.tick_tree(root, 1, 1, print_snapshot=True)
print("root.tip()...................running [{}]".format(root.tip().name))
assert(root.tip() is running)
root = py_trees.composites.Selector(name="Root")
success = py_trees.behaviours.Success(name="Success")
failure = py_trees.behaviours.Failure(name="Failure")
root.add_children([success, failure])
py_trees.tests.tick_tree(root, 1, 1, print_snapshot=True)
print("root.tip()...................success [{}]".format(root.tip().name))
assert(root.tip() is success)
root = py_trees.composites.Selector(name="Root")
failure = py_trees.behaviours.Failure(name="Failure 1")
failure_two = py_trees.behaviours.Failure(name="Failure 2")
root.add_children([failure, failure_two])
py_trees.tests.tick_tree(root, 1, 1, print_snapshot=True)
print("root.tip()...................Failure 2 [{}]".format(root.tip().name))
assert(root.tip() is failure_two)
root = py_trees.composites.Selector(name="Root")
fail_then_run = py_trees.behaviours.Count(name="Fail Then Run", fail_until=1, running_until=10)
running = py_trees.behaviours.Running(name="Running")
root.add_children([fail_then_run, running])
py_trees.tests.tick_tree(root, 1, 1, print_snapshot=True)
print("root.tip()...................Running [{}]".format(root.tip().name))
assert(root.tip() is running)
py_trees.tests.tick_tree(root, 2, 2, print_snapshot=True)
print("root.tip()...................Fail Then Run [{}]".format(root.tip().name))
assert(root.tip() is fail_then_run)
root = py_trees.composites.Selector(name="Root")
py_trees.tests.tick_tree(root, 1, 1, print_snapshot=True)
print("root.tip()...................Root [{}]".format(root.tip().name))
assert(root.tip() is root)
def test_decorator():
console.banner("Decorators")
print("\n--------- Assertions ---------\n")
# Decorators are the exception, when they reach SUCCESS||FAILURE and
# the child is RUNNING they invalidate their children, so look to the
# decorator, not the child!
child = py_trees.behaviours.Running(name="Child")
root = py_trees.decorators.RunningIsFailure(name="Decorator", child=child)
py_trees.tests.tick_tree(root, 1, 1, print_snapshot=True)
print("root.tip()...................Decorator [{}]".format(root.tip().name))
assert(root.tip() is root)
child = py_trees.behaviours.Success(name="Child")
root = py_trees.decorators.RunningIsSuccess(name="Decorator", child=child)
py_trees.tests.tick_tree(root, 1, 1, print_snapshot=True)
print("root.tip()...................Child [{}]".format(root.tip().name))
assert(root.tip() is child)
child = py_trees.behaviours.Running(name="Child")
child = py_trees.behaviours.Running(name="Child")
root = py_trees.decorators.SuccessIsFailure(name="Decorator", child=child)
py_trees.tests.tick_tree(root, 1, 1, print_snapshot=True)
print("root.tip()...................Child [{}]".format(root.tip().name))
assert(root.tip() is child)
def test_parallel():
console.banner("Parallel")
root = py_trees.composites.Parallel(name="Root", policy=py_trees.common.ParallelPolicy.SuccessOnAll())
failure = py_trees.behaviours.Failure(name="Failure")
running = py_trees.behaviours.Running(name="Running")
root.add_children([failure, running])
py_trees.tests.tick_tree(root, 1, 1, print_snapshot=True)
# running node is invalidated because failure failed
print("\n----- Assertions (OnAll) -----\n")
print("root.tip()...................failure [{}]".format(root.tip().name))
assert(root.tip() is failure)
root = py_trees.composites.Parallel(name="Root", policy=py_trees.common.ParallelPolicy.SuccessOnAll())
failure = py_trees.behaviours.Failure(name="Failure")
success = py_trees.behaviours.Success(name="Success")
root.add_children([failure, success])
py_trees.tests.tick_tree(root, 1, 1, print_snapshot=True)
print("\n----- Assertions (OnAll) -----\n")
print("root.tip()...................failure [{}]".format(root.tip().name))
assert(root.tip() is failure)
root = py_trees.composites.Parallel(name="Root", policy=py_trees.common.ParallelPolicy.SuccessOnOne())
failure = py_trees.behaviours.Failure(name="Failure")
success = py_trees.behaviours.Success(name="Success")
root.add_children([failure, success])
py_trees.tests.tick_tree(root, 1, 1, print_snapshot=True)
print("\n----- Assertions (OnOne) -----\n")
print("root.tip()...................failure [{}]".format(root.tip().name))
assert(root.tip() is failure)
root = py_trees.composites.Parallel(name="Root", policy=py_trees.common.ParallelPolicy.SuccessOnAll())
success = py_trees.behaviours.Success(name="Success")
running = py_trees.behaviours.Running(name="Running")
root.add_children([success, running])
py_trees.tests.tick_tree(root, 1, 1, print_snapshot=True)
# running node is tip because it was updated last
print("\n----- Assertions (OnAll) -----\n")
print("root.tip()...................running [{}]".format(root.tip().name))
assert(root.tip() is running)
root = py_trees.composites.Parallel(name="Root", policy=py_trees.common.ParallelPolicy.SuccessOnOne())
success = py_trees.behaviours.Success(name="Success")
running = py_trees.behaviours.Running(name="Running")
root.add_children([success, running])
py_trees.tests.tick_tree(root, 1, 1, print_snapshot=True)
# success is tip because it flipped it's parent to success
print("\n----- Assertions (OnOne) -----\n")
print("root.tip()...................success [{}]".format(root.tip().name))
assert(root.tip() is success)
root = py_trees.composites.Parallel(name="Root", policy=py_trees.common.ParallelPolicy.SuccessOnAll())
running = py_trees.behaviours.Running(name="Running 1")
running_two = py_trees.behaviours.Running(name="Running 2")
root.add_children([running, running_two])
py_trees.tests.tick_tree(root, 1, 1, print_snapshot=True)
# running two node is tip because it was updated last
print("\n----- Assertions (OnAll) -----\n")
print("root.tip()...................Running 2 [{}]".format(root.tip().name))
assert(root.tip() is running_two)
|
from nav_tts_v1.nav_tts import Module
|
var chromedriver = require('chromedriver'),
selenium = require('selenium-webdriver');
var one_step_timeout = 8000;
var chromeOpts = [
'--test-type',
'--no-default-browser-check',
'--no-first-run',
'--disable-default-apps',
'--host-resolver-rules=MAP *pencilcode.net.dev localhost:8193',
'--allow-running-insecure-content',
'--ignore-certificate-errors', // '=http://pencilcode.net.dev/',
'--headless',
'--no-sandbox',
'--disable-dev-shm-usage',
'--disable-web-security',
];
exports.startChrome = function() {
var capabilities = selenium.Capabilities.chrome();
capabilities.set('chromeOptions', {args: chromeOpts});
var driver = new selenium.Builder().
withCapabilities(capabilities).
build();
driver.getWindowHandle()
driver.manage().setTimeouts({script: one_step_timeout});
return driver;
}
// pollScript constructs a 100ms-repeating function in the selenium-based
// browser. As long as the predicate returns false, the polling continues;
// when the predicate returns somthing non-false, the polling ends.
exports.pollScript =
function pollScript(driver, result) {
// console.log('polling ' + result);
var s =
'var ps_done = arguments[arguments.length - 1];' +
'var ps_retry = (function() {' +
' var ps_result = (' + result + ')' +
(result instanceof Function ? '();' : ';') +
' if (ps_result && ps_result.poll) { ps_result = null; }' +
' if (!ps_result) { setTimeout(ps_retry, 100); } ' +
' else { ps_done(ps_result); } ' +
'}); window.ps_retry = ps_retry; ps_retry();'
return driver.executeAsyncScript(s);
}
exports.refreshThen =
function refreshThen(page, callback) {
page.reload(function(err) {
assert.ifError(err);
// Wait a little time before interacting with the page after a refresh.
setTimeout(callback, 100);
});
}
// asyncTest does a single async test using a headless webkit.
//
// In these tests, there is the testing process driving the tests
// and checking assertions, and there is the headless webkit process
// running the website being tested. This function performs a
// three-step dance that is used in many of the tests.
//
// 1. (in webkit) it runs an "action" script once in the browser.
// This is typically a simulation of a user action like clicking
// on a button.
// 2. (in webkit) it waits for some condition to be satisfied in the
// browser by polling a "predicate" script in the browser
// repeatedly. If the predicate returns without a value,
// it is not yet done and it needs to be polled again.
// When the predicate returns a value (usually a JSON tuple),
// it is done.
// 3. (back in the test process) the results of the predicate or
// error (if there was one) are passed to a callback in the
// main testing process. The callback can do the test validation.
//
// Parameters:
//
// page the node-phantom page object being tested.
// The action and predicate will be evaluated within this page.
// timeout is the amount of time, in milliseconds, that are allowed
// after which the test can fail.
// params is an optional array of values to be marshalled from the
// test process to the browser. These will be given as arguments
// to both the action and predicate functions.
// action is a function to execute once within the browser.
// Note that although action is written as as a function in the
// test process, it is actually not run in the test process: it is
// just serialized as a source code string to be evaled within the
// browser. Therefore nonlocal variables such as globals or
// calls to functions within the test process will not work.
// predicate a function to execute repeatedly within the browser.
// Again this is run in the browser to the same rules apply.
// If the predicate returns without a value, or with a value that
// has a non-false property "poll", it will be called again
// unless the timeout has elapsed. If the predicate returns with
// a value, the polling will stop and the value will be passed
// to the callback.
// callback is called when the predicate is satisfied or when
// an error occurs. It is passed (err, result) where err is
// non-null if there was an error, and result is the result
// of the predicate if there wasn't.
exports.asyncTest =
function asyncTest(page, timeout, params, action, predicate, callback) {
var startTime = +(new Date), evalTime = startTime,
rt_args, ac_args;
function handletry(err, result) {
if (err || (!!result && !result.poll)) {
callback(err, result);
} else if (evalTime - startTime > timeout) {
// Note that timeout is measured not from the time
// of the callback, but the time of the call-in.
// After a slow callback, we can try one more time.
throw (new Error('timeout'));
} else {
if (result) { console.log(result); }
setTimeout(retry, 100);
}
}
function retry() {
evalTime = +(new Date);
page.evaluate.apply(page, rt_args);
}
function handleact(err, result) {
if (err) {
callback(err);
}
retry();
}
rt_args = [ predicate ];
rt_args.push.apply(rt_args, params);
rt_args.push(handletry);
ac_args = [ action ];
ac_args.push.apply(ac_args, params);
ac_args.push(handleact);
if (action) {
page.evaluate.apply(page, ac_args);
} else {
retry();
}
}
// Mouse event simluation function.
// defineSimulate injects a global function "simulate"
// into the page.
exports.defineSimulate = function(page) {
page.evaluate(function() {
window.simulate = function(type, target, options) {
if ('string' == typeof(target)) {
target = window.document.querySelector(target);
}
options = options || {};
var pageX = pageY = clientX = clientY = dx = dy = 0;
var location = options.location || target;
if (location) {
if ('string' == typeof(location)) {
location = window.document.querySelector(location);
}
var gbcr = location.getBoundingClientRect();
clientX = gbcr.left,
clientY = gbcr.top,
pageX = clientX + window.pageXOffset
pageY = clientY + window.pageYOffset
dx = Math.floor((gbcr.right - gbcr.left) / 2)
dy = Math.floor((gbcr.bottom - gbcr.top) / 2)
}
if ('dx' in options) { dx = options.dx; }
if ('dy' in options) { dy = options.dy; }
pageX = (options.pageX == null ? pageX : options.pageX) + dx;
pageY = (options.pageY == null ? pageY : options.pageY) + dy;
clientX = pageX - window.pageXOffset;
clientY = pageY - window.pageYOffset;
var opts = {
bubbles: options.bubbles || true,
cancelable: options.cancelable || true,
view: options.view || target.ownerDocument.defaultView,
detail: options.detail || 1,
pageX: pageX,
pageY: pageY,
clientX: clientX,
clientY: clientY,
screenX: clientX + window.screenLeft,
screenY: clientY + window.screenTop,
ctrlKey: options.ctrlKey || false,
altKey: options.altKey || false,
shiftKey: options.shiftKey || false,
metaKey: options.metaKey || false,
button: options.button || 0,
which: options.which || 1,
relatedTarget: options.relatedTarget || null,
}
var evt;
try {
// Modern API supported by IE9+
evt = new MouseEvent(type, opts);
} catch (e) {
// Old API still required by PhantomJS.
evt = target.ownerDocument.createEvent('MouseEvents');
evt.initMouseEvent(type, opts.bubbles, opts.cancelable, opts.view,
opts.detail, opts.screenX, opts.screenY, opts.clientX, opts.clientY,
opts.ctrlKey, opts.altKey, opts.shiftKey, opts.metaKey, opts.button,
opts.relatedTarget);
}
target.dispatchEvent(evt);
};
});
};
|
# Implementing ASM algorithm
#
# references:
#
# Stegmann, Mikkel B, and David Delgado Gomez. n.d. “A Brief Introduction to Statistical Shape Analysis,” 15.
# Cootes, Tim. “An Introduction to Active Shape Models.” Image Processing and Analysis, January 1, 2000
import numpy as np
import matplotlib.pyplot as plt
import json
import random
decoder = json.decoder
def rotationMatrix(fi):
return np.array([[np.cos(fi), -np.sin(fi)],[np.sin(fi), np.cos(fi)]])
def procrustesDistance(X1, X2):
return np.sqrt(np.sum(np.square(X1 - X2)))
def centerOfGravity(X):
M = X.shape[0]
return np.sum(X, axis=0, keepdims = True)/M
def sizeFrobenious(X, centroidFun=centerOfGravity):
center = centroidFun(X)
return np.sqrt(np.sum(np.square(X-center)))
def centroidSize(X, centroidFun=centerOfGravity):
center = centroidFun(X)
return np.sum(np.sqrt(np.sum(np.square(X - center), axis = 1)), axis = 0)
def tangentSpaceProjection(shapes, mean):
meanSize = np.sum(mean*mean)
projections = []
for shape in shapes:
alpha = meanSize/np.sum(mean*shape)
projection = alpha * shape
projections.append(projection)
return projections
def toPCAform(shape):
# reshape to (x1, x2, ..., y1, y2, ...) to avoid tensor SVD when doing PCA
return shape.T.reshape(-1,1)
def toNormalform(shape):
# reshape to (m x 2), for m landmarks
return shape.reshape(2,-1).T
if __name__ == '__main__':
# Choose size metric and centroid function
sizeFun = sizeFrobenious
centroidFun = centerOfGravity
shapes = []
tmpshapes = []
with open('data/hand-landmarks.json', 'r') as saveFile:
for line in saveFile.readlines():
a = json.loads(line)
shapes.append(np.array(a["coords"]))
tmpshapes.append(None)
# Shuffle data
random.shuffle(shapes)
# Take the first shape as mean, center it at origin
mean = shapes[0]
mean -= centroidFun(mean)
mean /= sizeFun(mean)
# Make mean hand shape look up
mean = rotationMatrix(-np.pi/2).dot(mean.T).T
# Center shapes at origin, resize them to unity
for shape in shapes:
# Center shapes around 0
shape -= centroidFun(shape)
# Resize to unity
shape /= sizeFun(shape)
# Calculate mean iteratively
for iteration in range(10):
for i, shape in enumerate(shapes):
# Rotate shape to mean
# SVD
corelationMatrix = mean.T.dot(shape)
U, S, V = np.linalg.svd(corelationMatrix)
# Rotate
rotation = U.dot(V.T)
shapes[i] = rotation.dot(shape.T).T
# Calculte mean, and normalize
mean = sum(shapes)/len(shapes)
mean /= sizeFun(mean)
# Display mean shape
# plt.plot(*mean.T)
# plt.scatter(*centroidFun(mean).T)
# plt.show()
# Ravel mean and shapes to vectors for PCA
mean2 = toPCAform(mean)
shapes2 = []
for shape in shapes:
shapes2.append(toPCAform(shape))
# Shift shapes to tangent space:
shapes2 = tangentSpaceProjection(shapes2, mean2)
# prepare for covariance calculation
N = mean2.shape[0]
covarianceX = np.zeros(shape = (N, N))
# Calculate shape covariance
for shape2 in shapes2:
diff = shape2 - mean2
covarianceX += diff.dot(diff.T)
covarianceX /= N
# Calculate eigenbasis and eigenvalue
U, covariance, Vt = np.linalg.svd(covarianceX)
# Standard deviations for each mode
sigma = np.sqrt(covariance).reshape(-1,1)
# Display a few shapes of +/- sigma for first mode
b = sigma*0
for i in range(9):
b[0] = sigma[0]*0.25*i - sigma[0]
x = mean2 + U.dot(b)
plt.plot(*toNormalform(mean2).T)
plt.plot(*toNormalform(x).T)
plt.show()
# Display a few shapes of +/- sigma for second mode
b = sigma*0
for i in range(9):
b[1] = sigma[1]*0.25*i - sigma[1]
x = mean2 + U.dot(b)
plt.plot(*toNormalform(mean2).T)
plt.plot(*toNormalform(x).T)
plt.show()
|
import sklearn.decomposition
import scipy.stats
import numpy as np
import matplotlib.pyplot as plt
import torch
from torch.utils.data import Dataset, DataLoader
# import cuml
# import cuml.decomposition
# import cupy
import gc
from tqdm.notebook import tqdm
###########################
########## PCA ############
###########################
def simple_pca(X , n_components=None , mean_sub=True, zscore=False, plot_pref=False , n_PCs_toPlot=2):
if mean_sub and not zscore:
X = X - np.mean(X, axis=0)
if zscore:
# X = scipy.stats.zscore(X, axis=0)
X = X - np.mean(X, axis=0)
stds = np.std(X, axis=0)
X = X / stds[None,:]
else:
stds = None
if n_components is None:
n_components = X.shape[1]
decomp = sklearn.decomposition.PCA(n_components=n_components)
decomp.fit_transform(X)
components = decomp.components_
scores = decomp.transform(X)
if plot_pref:
fig , axs = plt.subplots(4 , figsize=(7,15))
axs[0].plot(np.arange(n_components)+1,
decomp.explained_variance_ratio_)
axs[0].set_xscale('log')
axs[0].set_xlabel('component #')
axs[0].set_ylabel('explained variance ratio')
axs[1].plot(np.arange(n_components)+1,
np.cumsum(decomp.explained_variance_ratio_))
axs[1].set_xscale('log')
axs[1].set_ylabel('cumulative explained variance ratio')
axs[2].plot(scores[:,:n_PCs_toPlot])
axs[2].set_xlabel('sample num')
axs[2].set_ylabel('a.u.')
axs[3].plot(components.T[:,:n_PCs_toPlot])
axs[3].set_xlabel('feature num')
axs[3].set_ylabel('score')
return components , scores , decomp.explained_variance_ratio_ , stds
def torch_pca( X,
device='cpu',
mean_sub=True,
zscore=False,
rank=None,
return_cpu=True,
return_numpy=False):
"""
Principal Components Analysis for PyTorch.
If using GPU, then call torch.cuda.empty_cache() after.
RH 2021
Args:
X (torch.Tensor or np.ndarray):
Data to be decomposed.
2-D array. Columns are features, rows are samples.
PCA will be performed column-wise.
device (str):
Device to use. ie 'cuda' or 'cpu'. Use a function
torch_helpers.set_device() to get.
mean_sub (bool):
Whether or not to mean subtract ('center') the
columns.
zscore (bool):
Whether or not to z-score the columns. This is
equivalent to doing PCA on the correlation-matrix.
rank (int):
Maximum estimated rank of decomposition. If None,
then rank is X.shape[1]
return_cpu (bool):
Whether or not to force returns/outputs to be on
the 'cpu' device. If False, and device!='cpu',
then returns will be on device.
return_numpy (bool):
Whether or not to force returns/outputs to be
numpy.ndarray type.
Returns:
components (torch.Tensor or np.ndarray):
The components of the decomposition.
2-D array.
Each column is a component vector. Each row is a
feature weight.
scores (torch.Tensor or np.ndarray):
The scores of the decomposition.
2-D array.
Each column is a score vector. Each row is a
sample weight.
singVals (torch.Tensor or np.ndarray):
The singular values of the decomposition.
1-D array.
Each element is a singular value.
EVR (torch.Tensor or np.ndarray):
The explained variance ratio of each component.
1-D array.
Each element is the explained variance ratio of
the corresponding component.
"""
if isinstance(X, torch.Tensor) == False:
X = torch.from_numpy(X).to(device)
elif X.device != device:
X = X.to(device)
if mean_sub and not zscore:
X = X - torch.mean(X, dim=0)
if zscore:
X = X - torch.mean(X, dim=0)
stds = torch.std(X, dim=0)
X = X / stds[None,:]
if rank is None:
rank = X.shape[1]
(U,S,V) = torch.pca_lowrank(X, q=rank, center=False, niter=2)
components = V
scores = torch.matmul(X, V[:, :rank])
singVals = (S**2)/(len(S)-1)
EVR = (singVals) / torch.sum(singVals)
if return_cpu:
components = components.cpu()
scores = scores.cpu()
singVals = singVals.cpu()
EVR = EVR.cpu()
if return_numpy:
components = components.cpu().numpy()
scores = scores.cpu().numpy()
singVals = singVals.cpu().numpy()
EVR = EVR.cpu().numpy()
gc.collect()
torch.cuda.empty_cache()
gc.collect()
torch.cuda.empty_cache()
gc.collect()
return components, scores, singVals, EVR
def unmix_pcs(pca_components, weight_vecs):
"""
Transforms weight_vecs into pca_components space
RH 2021
"""
if weight_vecs.ndim == 1:
weight_vecs = weight_vecs[:,None]
if type(pca_components) == np.ndarray:
zeros = np.zeros
elif type(pca_components) == torch.Tensor:
zeros = torch.zeros
mixing_vecs = zeros((pca_components.shape[1], weight_vecs.shape[1]))
mixing_vecs[:weight_vecs.shape[0],:] = weight_vecs
return pca_components @ mixing_vecs
#######################################
########## Incremental PCA ############
#######################################
class ipca_dataset(Dataset):
"""
see incremental_pca for demo
"""
def __init__(self,
X,
mean_sub=True,
zscore=False,
preprocess_sample_method='random',
preprocess_sample_num=100,
device='cpu',
dtype=torch.float32):
"""
Make a basic dataset.
RH 2021
Args:
X (torch.Tensor or np.array):
Data to make dataset from.
2-D array. Columns are features, rows are samples.
mean_sub (bool):
Whether or not to mean subtract ('center') the
columns.
zscore (bool):
Whether or not to z-score the columns. This is
equivalent to doing PCA on the correlation-matrix.
preprocess_sample_method (str):
Method to use for sampling for mean_sub and zscore.
'random' - uses random samples (rows) from X.
'first' - uses the first rows of X.
preprocess_sample_num (int):
Number of samples to use for mean_sub and zscore.
device (str):
Device to use.
dtype (torch.dtype):
Data type to use.
"""
# Upgrade here for using an on the fly dataset.
self.X = torch.as_tensor(X, dtype=dtype, device=device) # first (0th) dim will be subsampled from
self.n_samples = self.X.shape[0]
self.mean_sub = mean_sub
self.zscore = zscore
if mean_sub or zscore:
if preprocess_sample_method == 'random':
self.preprocess_inds = torch.randperm(preprocess_sample_num)[:preprocess_sample_num]
elif preprocess_sample_method == 'first':
self.preprocess_inds = torch.arange(preprocess_sample_num)
else:
raise ValueError('preprocess_sample_method must be "random" or "first"')
self.preprocess_inds = self.preprocess_inds.to(device)
# Upgrade here for using an on the fly dataset.
if mean_sub:
self.mean_vals = torch.mean(self.X[self.preprocess_inds,:], dim=0)
if zscore:
self.std_vals = torch.std(self.X[self.preprocess_inds,:], dim=0)
def __len__(self):
return self.n_samples
def __getitem__(self, idx):
"""
Returns a single sample.
Args:
idx (int):
Index of sample to return.
"""
if self.mean_sub or self.zscore:
out = self.X[idx,:] - self.mean_vals
else:
out = self.X[idx,:]
if self.zscore:
out = out / self.std_vals
return out, idx
def incremental_pca(dataloader,
method='sklearn',
method_kwargs=None,
return_cpu=True,
):
"""
Incremental PCA using either sklearn or cuml.
Keep batches small-ish to remain performat (~64 samples).
RH 2021
Args:
dataloader (torch.utils.data.DataLoader):
Data to be decomposed.
method (str):
Method to use.
'sklearn' : sklearn.decomposition.PCA
'cuml' : cuml.decomposition.IncrementalPCA
method_kwargs (dict):
Keyword arguments to pass to method.
See method documentation for details.
device (str):
Device to use.
Only used if method is 'cuml'
return_cpu (bool):
Whether or not to force returns/outputs to be on
the 'cpu' device. If False, and device!='cpu',
then returns will be on device.
return_numpy (bool):
Whether or not to force returns/outputs to be
numpy.ndarray type.
Returns:
components (torch.Tensor or np.ndarray):
The components of the decomposition.
2-D array.
Each column is a component vector. Each row is a
feature weight.
EVR (torch.Tensor or np.ndarray):
The explained variance ratio of each component.
1-D array.
Each element is the explained variance ratio of
the corresponding component.
object_params (dict):
Dictionary of parameters used to create the
decomposition.
demo:
import torch_helpers, cupy_helpers
cupy_helpers.set_device() # calls: cupy.cuda.Device(DEVICE_NUM).use()
dataset = decomposition.ipca_dataset( X,
mean_sub=True,
zscore=False,
preprocess_sample_method='random',
preprocess_sample_num=10000,
device='cpu',
dtype=torch.float32)
dataloader = torch.utils.data.DataLoader( dataset,
batch_size=64,
drop_last=True,
shuffle=False,
num_workers=0,
pin_memory=False)
cuml_kwargs = {
"handle": cuml.Handle(),
"n_components": 20,
"whiten": False,
"copy": False,
"batch_size": None,
"verbose": True,
"output_type": None
}
sk_kwargs = {
"n_components": 20,
"whiten": False,
"copy": False,
"batch_size": None,
}
components, EVR, ipca = decomposition.incremental_pca(dataloader,
method='cuml',
method_kwargs=cuml_kwargs,
return_cpu=True)
scores = decomposition.ipca_transform(dataloader, components)
"""
if method_kwargs is None:
method_kwargs = {}
if method == 'sklearn':
ipca = sklearn.decomposition.IncrementalPCA(**method_kwargs)
elif method == 'cuml':
ipca = cuml.decomposition.IncrementalPCA(**method_kwargs)
for iter_batch, batch in enumerate(tqdm(dataloader)):
if method == 'sklearn':
batch = batch[0].cpu().numpy()
if method == 'cuml':
batch = cupy.asarray(batch[0])
ipca.partial_fit(batch)
if (return_cpu) and (method=='cuml'):
components = ipca.components_.get()
else:
components = ipca.components_
EVR = ipca.explained_variance_ratio_
return components, EVR, ipca
def ipca_transform(dataloader, components):
"""
Transform data using incremental PCA.
RH 2020
Args:
dataloader (torch.utils.data.DataLoader):
Data to be decomposed.
components (torch.Tensor or np.ndarray):
The components of the decomposition.
2-D array.
Each column is a component vector. Each row is a
feature weight.
"""
out = []
for iter_batch, batch in enumerate(dataloader):
out.append(batch[0] @ components.T)
return torch.cat(out, dim=0) |
import videojs from 'video.js';
import RecommendationsOverlayContent from './recommendations-overlay-content';
import RecommendationsOverlayHideButton from './recommendations-overlay-hide-button';
import './recommendations-overlay.scss';
const MAXIMUM_ITEMS = 4;
const Component = videojs.getComponent('Component');
// TODO: Use Video.js's ModalDialog instead. It handles clicking block logic.
class RecommendationsOverlay extends Component {
constructor(player, options, ...args) {
super(player, ...args);
this._content = new RecommendationsOverlayContent(player);
this.addChild(this._content);
this.addChild(new RecommendationsOverlayHideButton(player, { clickHandler: () => {
this.close();
} }, ...args));
this.on(player, 'recommendationschanged', (_, eventData) => {
this.setItems(...eventData.items);
});
this.on(player, 'recommendationsnoshow', this.setDoNotOpen);
this.on(player, 'recommendationsshow', this.open);
this.on(player, 'recommendationshide', this.close);
this.on(player, 'sourcechanged', () => {
this.clearItems();
this.close();
});
this.doNotOpen = false;
}
setDoNotOpen() {
this.doNotOpen = true;
}
open() {
if (!this.doNotOpen) {
// Only show controls on close if they were visible from the first place
this._showControlsOnClose = this.player().controls();
this.player().controls(false);
this.el().style.visibility = 'visible';
}
}
clearItems() {
this._content.clearItems();
}
close() {
this.el().style.visibility = 'hidden';
if (this._showControlsOnClose) {
this.player().controls(true);
}
}
createEl() {
const el = super.createEl('div', {
className: 'vjs-recommendations-overlay'
});
videojs.dom.addClass(el, 'vjs-recommendations-overlay');
return el;
}
setItems(primary, ...secondary) {
this.doNotOpen = false;
secondary = secondary.slice(0, MAXIMUM_ITEMS - 1);
this._content.setItems(primary, ...secondary);
}
handleClick() {
this.stopPropagation();
}
dispose() {
super.dispose();
}
}
videojs.registerComponent('recommendationsOverlay', RecommendationsOverlay);
export default RecommendationsOverlay;
|
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __generator = (this && this.__generator) || function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
exports.__esModule = true;
// libreria para controlar las rutas de las apis
// route => trabaja el protocolo de salida http o https
/**
* request=> se encarga de gestionar las solicitudes que vienen en el path(urlapi)
* reponse=> regresa las respuestas
*/
var express_1 = require("express");
// modelo de la tabla deliveries
var Delivery_1 = require("../models/Delivery");
// se importa una funcion que regresa datos de prueba para cargar en base de datos
var test_1 = require("../config/test");
//libreria para trabajar fechas y formatos en relación
var moment_1 = require("moment");
//libreria de envio de correo que se instala por automatico
var nodemailer_1 = require("../config/nodemailer");
// retorna la plantilla de html del correo a enviar junto con sus paramentros
var templatesEmails_1 = require("../emails/templatesEmails");
var DeliveriesController = /** @class */ (function () {
function DeliveriesController() {
}
DeliveriesController.prototype.router = function () {
var router = express_1.Router();
router.post('/:email', this.verifyEntrega);
router.get('/new_data', this.createDataDemo);
return router;
};
DeliveriesController.prototype.verifyEntrega = function (req, res) {
return __awaiter(this, void 0, Promise, function () {
var email, user, data, data, error_1;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
_a.trys.push([0, 6, , 7]);
email = req.params.email;
// si no exite el email retorna un estatus para solicitarlo
if (!email)
return [2 /*return*/, res.status(400).json({ message: 'email is required' })
// busca dentro de la tabla deliveries el email que se esta recibiendo
];
return [4 /*yield*/, Delivery_1["default"].find({ email: email })
// si hay dos coincidencias retorna un email de solicitud rechazada
// porque sabemos que ya existen en el servidor
];
case 1:
user = _a.sent();
if (!(user.length == 2)) return [3 /*break*/, 3];
data = {
email: email,
note: "CAMCELACION DE EVENTO",
status: "Solicitud Cancelada, ya tienes dos eventos creados espera a que se culmine alguno.",
date: moment_1["default"]().format("YYYY-MM-DD HH:mm")
};
// la funcion transporter sendMail sirve para mandar el correo y este depende de la libreria
return [4 /*yield*/, nodemailer_1.transporter.sendMail({
from: "\"PAZ Y BIEN | TALLER ESCUELA DE CARPINTER\u00CDA ALERTA \uD83D\uDC7B\" <" + email + ">",
to: email,
subject: "Ya tienes dos eventos creados ✔",
html: templatesEmails_1.emailOne(data)
})];
case 2:
// la funcion transporter sendMail sirve para mandar el correo y este depende de la libreria
_a.sent();
return [3 /*break*/, 5];
case 3:
data = {
email: email,
note: "EVENTO CREADO",
status: "Solicitud Exitosa",
date: moment_1["default"]().format("YYYY-MM-DD HH:mm")
};
return [4 /*yield*/, nodemailer_1.transporter.sendMail({
from: "\"PAZ Y BIEN | TALLER ESCUELA DE CARPINTER\u00CDA ALERTA \uD83D\uDC7B\" <" + email + ">",
to: email,
subject: "Tu evento se a creado con exito ✔",
html: templatesEmails_1.emailOne(data)
})];
case 4:
_a.sent();
_a.label = 5;
case 5: return [2 /*return*/, res.status(200).json({ message: 'email enviado' })];
case 6:
error_1 = _a.sent();
console.log(error_1);
return [2 /*return*/, res.status(400).json({ message: 'error to send email' })];
case 7: return [2 /*return*/];
}
});
});
};
DeliveriesController.prototype.createDataDemo = function (req, res) {
return __awaiter(this, void 0, Promise, function () {
var total, entregas, result, error_2;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
_a.trys.push([0, 4, , 5]);
return [4 /*yield*/, Delivery_1["default"].find({})
// si no exiten datos crea los datos de prueba que estan en el archivo config/test.ts
];
case 1:
total = _a.sent();
if (!(total.length === 0)) return [3 /*break*/, 3];
entregas = test_1.dataDemo();
return [4 /*yield*/, Delivery_1["default"].insertMany(entregas)
// si existe un error al crear los documentos retorna una respuesta
];
case 2:
result = _a.sent();
// si existe un error al crear los documentos retorna una respuesta
if (!result)
return [2 /*return*/, res.status(400).json({ message: 'error to create data' })
//si se crearon los datos y como de inicio la variable total es igual a cero o []vacio asignale
// la variable result que tiene los nuevos registros
];
//si se crearon los datos y como de inicio la variable total es igual a cero o []vacio asignale
// la variable result que tiene los nuevos registros
else
total = result;
_a.label = 3;
case 3:
//if total tiene por lo menos un dato regresa la respuesta de manera exitosa
return [2 /*return*/, res.status(200).json({ message: 'exito', total: total })];
case 4:
error_2 = _a.sent();
console.log(error_2);
return [2 /*return*/, res.status(400).json({ message: "error trying insert entrega", error: error_2 })];
case 5: return [2 /*return*/];
}
});
});
};
return DeliveriesController;
}());
exports["default"] = DeliveriesController;
|
var Promise = require('bluebird')
var graph = Promise.promisifyAll(require('fbgraph'))
const fbAppToken = process.env.FACEBOOK_APP_TOKEN
graph.setAccessToken(fbAppToken)
const userId = process.env.FACEBOOK_ID
const ptPageId = process.env.FACEBOOK_PAGE_ID
const Upload = require('../../models/index').Upload
function buildWallPost(message, link) {
const wallPost = {
message: message,
link: link
}
return wallPost
}
async function facebookPost(message, upload) {
upload = await Upload.findOne({ _id: upload._id }).populate('uploader')
const link = `https://pew.tube/user/${upload.uploader.channelUrl}/${upload.uniqueTag}`
const wallPost = buildWallPost(message, link)
const response = await graph.postAsync(ptPageId + "/feed", wallPost)
// console.log(response);
return response
}
module.exports = {
facebookPost
}
/** EXTEND TOKEN **/
// graph.extendAccessToken({
// "access_token": fbToken
// , "client_id": app_id
// , "client_secret": app_secret
// }, function (err, facebookRes) {
//
// if(err){
// console.log('err');
// console.log(err);
// }
//
// console.log(facebookRes);
// });
|
import { combineReducers } from "redux"
import { reducer as formReducer } from "redux-form"
import * as authReducer from "./authReducer"
import * as ideaReducer from "./ideaReducer"
function createReducer(defaultState, reducerMappings) {
return function(state=defaultState, {type, payload}) {
const mapping = reducerMappings[type]
return mapping ? mapping(state, payload) : state
}
}
const reducer = combineReducers({
idea: createReducer(ideaReducer.DEFAULT_STATE, ideaReducer.mappings),
auth: createReducer(authReducer.DEFAULT_STATE, authReducer.mappings),
form: formReducer
})
export default reducer
|
/**
* @license
* Copyright (c) 2014, 2021, Oracle and/or its affiliates.
* Licensed under The Universal Permissive License (UPL), Version 1.0
* as shown at https://oss.oracle.com/licenses/upl/
* @ignore
*/
define(["exports"],function(e){"use strict";
/**
* @license
* Copyright (c) 2019 2021, Oracle and/or its affiliates.
* The Universal Permissive License (UPL), Version 1.0
* as shown at https://oss.oracle.com/licenses/upl/
* @ignore
*/
// JSEP may be freely distributed under the MIT License
e.ExpParser=function(){function e(e){for(var n=e.expr,r=n.charCodeAt(e.index);32===r||9===r||10===r||13===r;)r=n.charCodeAt(++e.index)}function n(i){var d,x,a=i.expr,o=function(e){var n,i,d,x,a,o,c,u,p;if(o=t(e),!(i=r(e)))return o;for(a={value:i,prec:S(i)},(c=t(e))||O("Expected expression after "+i,e.index),x=[o,a,c];(i=r(e))&&0!==(d=S(i));){for(a={value:i,prec:d},p=i;x.length>2&&d<=x[x.length-2].prec;)c=x.pop(),i=x.pop().value,o=x.pop(),n=j(i,o,c,e),x.push(n);(n=t(e))||O("Expected expression after "+p,e.index),x.push(a,n)}for(u=x.length-1,n=x[u];u>1;)n=j(x[u-1].value,x[u-2],n,e),u-=2;return n}(i);return e(i),a.charCodeAt(i.index)!==A?o:(i.index++,(d=n(i))||O("Expected expression",i.index),e(i),a.charCodeAt(i.index)===C?(i.index++,(x=n(i))||O("Expected expression",i.index),{type:8,test:o,consequent:d,alternate:x}):void O("Expected :",i.index))}function r(n){var r=n.expr;e(n);for(var t=r.substr(n.index,w),i=t.length;i>0;){if(E[t]&&(!q(r.charCodeAt(n.index))||n.index+t.length<r.length&&!F(r.charCodeAt(n.index+t.length))))return n.index+=i,t;t=t.substr(0,--i)}return!1}function t(r){var l,A,b,E=r.expr;if(e(r),M(l=E.charCodeAt(r.index))||l===o)return function(e){for(var n,r,t=e.expr,i="";M(t.charCodeAt(e.index));)i+=t.charAt(e.index++);if(t.charCodeAt(e.index)===o)for(i+=t.charAt(e.index++);M(t.charCodeAt(e.index));)i+=t.charAt(e.index++);if("e"===(n=t.charAt(e.index))||"E"===n){for(i+=t.charAt(e.index++),"+"!==(n=t.charAt(e.index))&&"-"!==n||(i+=t.charAt(e.index++));M(t.charCodeAt(e.index));)i+=t.charAt(e.index++);M(t.charCodeAt(e.index-1))||O("Expected exponent ("+i+t.charAt(e.index)+")",e.index)}return q(r=t.charCodeAt(e.index))?O("Variable names cannot start with a number ("+i+t.charAt(e.index)+")",e.index):r===o&&O("Unexpected period",e.index),{type:3,value:parseFloat(i),raw:i}}(r);if(l===u||l===p||l===s)return a(r);if(l===g)return function(r){var t=r.expr;r.index++;for(var x,a=[],o=0,h=t.length;r.index<h&&!x;){e(r);var f=t.charCodeAt(r.index);if(f===y)x=!0,r.index++;else if(f===c)r.index++,++o!==a.length&&O("Unexpected token ,",r.index);else{var s;s=f===u||f===p?i(r).value:d(r).name,e(r),(f=t.charCodeAt(r.index))!==C&&O("Expected ':'. Found "+String.fromCharCode(f),r.index),r.index++;var l=r.writer;"_ko_property_writers"===s&&(r.writer=1);try{a.push({key:s,value:n(r)})}finally{r.writer=l}}}return x||O("Expected "+String.fromCharCode(y),r.index),{type:10,properties:a}}(r);for(b=(A=E.substr(r.index,k)).length;b>0;){if(A in m&&(!q(E.charCodeAt(r.index))||r.index+A.length<E.length&&!F(E.charCodeAt(r.index+A.length))))return r.index+=b,{type:5,operator:A,argument:t(r),prefix:!0};A=A.substr(0,--b)}var w=r.index,U=r.index+8;return"function"!==E.substring(w,U)||F(E.charCodeAt(U))?!(!q(l)&&l!==h)&&a(r):(r.index=U,function(r){var t=r.expr;e(r);var i=t.charCodeAt(r.index);i!==h&&O("Expected (,",r.index),r.index++;var d=x(r,f,!0);e(r),(i=t.charCodeAt(r.index))!==g&&O("Expected {,",r.index),r.index++,e(r);var a,o=r.index,c=r.index;"return"===t.substring(c,c+6)&&(a=!0,r.index+=6),e(r);var u=n(r);return e(r),(i=t.charCodeAt(r.index))===v&&(r.index++,e(r)),(i=t.charCodeAt(r.index))!==y&&O("Expected },",r.index),r.index++,{type:11,arguments:d,body:u,expr:t.substring(o,r.index-1),return:a}}(r))}function i(e){for(var n,r=e.expr,t="",i=r.charAt(e.index++),d=!1,x=r.length;e.index<x;){if((n=r.charAt(e.index++))===i){d=!0;break}if("\\"===n)switch(n=r.charAt(e.index++)){case"n":t+="\n";break;case"r":t+="\r";break;case"t":t+="\t";break;case"b":t+="\b";break;case"f":t+="\f";break;case"v":t+="\v";break;default:t+=n}else t+=n}return d||O('Unclosed quote after "'+t+'"',e.index),{type:3,value:t,raw:i+t+i}}function d(n){var r,t=n.expr,i=t.charCodeAt(n.index),d=n.index;q(i)?n.index++:O("Unexpected "+t.charAt(n.index),n.index);for(var x=t.length;n.index<x&&F(i=t.charCodeAt(n.index));)n.index++;if("new"===(r=t.slice(d,n.index))){e(n);var o=a(n,4);return 4!==o.type&&O("Expression of type: "+o.type+" not supported for constructor expression"),{type:12,callee:o.callee,arguments:o.arguments}}return U.has(r)?{type:3,value:U.get(r),raw:r}:{type:1,name:r}}function x(r,t,i){for(var x,a,o=r.expr,u=o.length,p=[],h=!1,s=0;r.index<u;){if(e(r),(x=o.charCodeAt(r.index))===t){h=!0,r.index++,t===f&&s&&s>=p.length&&O("Unexpected token "+String.fromCharCode(t),r.index);break}if(x===c){if(r.index++,++s!==p.length)if(t===f)O("Unexpected token ,",r.index);else if(t===l)for(var A=p.length;A<s;A++)p.push(null)}else(!(a=i?d(r):n(r))||p.length>s)&&O("Expected comma",r.index),p.push(a)}return h||O("Expected "+String.fromCharCode(t),r.index),p}function a(r,t){var a,c,v=r.expr;for(c=(a=v.charCodeAt(r.index))===h?function(r){r.index++;var t=n(r);if(e(r),r.expr.charCodeAt(r.index)===f)return r.index++,t;O("Unclosed (",r.index)}(r):a===u||a===p?i(r):a===s?function(e){return e.index++,{type:9,elements:x(e,l)}}(r):d(r),e(r),a=v.charCodeAt(r.index);a===o||a===s||a===h||_(r);){if(r.index++,a===o?(e(r),c={type:2,computed:!1,object:c,property:d(r)}):a===A?(r.index++,e(r),c={type:2,computed:!1,conditional:!0,object:c,property:d(r)}):a===s?(c={type:2,computed:!0,object:c,property:n(r)},e(r),(a=v.charCodeAt(r.index))!==l&&O("Unclosed [",r.index),r.index++):a===h&&(c={type:4,arguments:x(r,f),callee:c}),t===c.type)return c;e(r),a=v.charCodeAt(r.index)}return c}this.parse=function(e){for(var r=e.length,t={index:0,expr:e},i=[];t.index<r;){var d=e.charCodeAt(t.index);if(d===v||d===c)t.index++;else{var x=n(t);x?i.push(x):t.index<r&&O('Unexpected "'+e.charAt(t.index)+'"',t.index)}}return 1===i.length?i[0]:{type:0,body:i}};var o=46,c=44,u=39,p=34,h=40,f=41,s=91,l=93,A=63,v=59,C=58,g=123,y=125;function b(e){return Object.keys(e).reduce(function(e,n){return Math.max(e,n.length)},0)}var m={"-":!0,"!":!0,"~":!0,"+":!0},E={"=":1,"||":2,"&&":3,"|":4,"^":5,"&":6,"==":7,"!=":7,"===":7,"!==":7,"<":8,">":8,"<=":8,">=":8,"<<":9,">>":9,">>>":9,"+":10,"-":10,"*":11,"/":11,"%":11},k=b(m),w=b(E),U=new Map;function S(e){return E[e]||0}function j(e,n,r,t){return"="!==e||t.writer||O("Unexpected operator '='",t.index),{type:"||"===e||"&&"===e?7:6,operator:e,left:n,right:r}}function _(e){var n=e.expr;return n.charCodeAt(e.index)===A&&n.charCodeAt(e.index+1)===o&&!M(n.charCodeAt(e.index+2))}function M(e){return e>=48&&e<=57}function q(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||e>=128&&!E[String.fromCharCode(e)]}function F(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||e>=128&&!E[String.fromCharCode(e)]}function O(e,n){var r=new Error(e+" at character "+n);throw r.index=n,r.description=e,r}U.set("true",!0),U.set("false",!1),U.set("null",null),U.set("undefined",void 0)},Object.defineProperty(e,"__esModule",{value:!0})});
//# sourceMappingURL=ojexpparser.js.map |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.NsisTarget = void 0;
function _bluebirdLst() {
const data = _interopRequireWildcard(require("bluebird-lst"));
_bluebirdLst = function () {
return data;
};
return data;
}
function _zipBin() {
const data = require("7zip-bin");
_zipBin = function () {
return data;
};
return data;
}
function _builderUtil() {
const data = require("builder-util");
_builderUtil = function () {
return data;
};
return data;
}
function _builderUtilRuntime() {
const data = require("builder-util-runtime");
_builderUtilRuntime = function () {
return data;
};
return data;
}
function _binDownload() {
const data = require("../../binDownload");
_binDownload = function () {
return data;
};
return data;
}
function _fs() {
const data = require("builder-util/out/fs");
_fs = function () {
return data;
};
return data;
}
function _hash() {
const data = require("../../util/hash");
_hash = function () {
return data;
};
return data;
}
var _debug2 = _interopRequireDefault(require("debug"));
function _fsExtraP() {
const data = require("fs-extra-p");
_fsExtraP = function () {
return data;
};
return data;
}
function _lazyVal() {
const data = require("lazy-val");
_lazyVal = function () {
return data;
};
return data;
}
var path = _interopRequireWildcard(require("path"));
function _core() {
const data = require("../../core");
_core = function () {
return data;
};
return data;
}
function _CommonWindowsInstallerConfiguration() {
const data = require("../../options/CommonWindowsInstallerConfiguration");
_CommonWindowsInstallerConfiguration = function () {
return data;
};
return data;
}
function _platformPackager() {
const data = require("../../platformPackager");
_platformPackager = function () {
return data;
};
return data;
}
function _timer() {
const data = require("../../util/timer");
_timer = function () {
return data;
};
return data;
}
function _wine() {
const data = require("../../wine");
_wine = function () {
return data;
};
return data;
}
function _archive() {
const data = require("../archive");
_archive = function () {
return data;
};
return data;
}
function _differentialUpdateInfoBuilder() {
const data = require("../differentialUpdateInfoBuilder");
_differentialUpdateInfoBuilder = function () {
return data;
};
return data;
}
function _targetUtil() {
const data = require("../targetUtil");
_targetUtil = function () {
return data;
};
return data;
}
function _nsisLang() {
const data = require("./nsisLang");
_nsisLang = function () {
return data;
};
return data;
}
function _nsisLicense() {
const data = require("./nsisLicense");
_nsisLicense = function () {
return data;
};
return data;
}
function _nsisScriptGenerator() {
const data = require("./nsisScriptGenerator");
_nsisScriptGenerator = function () {
return data;
};
return data;
}
function _nsisUtil() {
const data = require("./nsisUtil");
_nsisUtil = function () {
return data;
};
return data;
}
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
const debug = (0, _debug2.default)("electron-builder:nsis"); // noinspection SpellCheckingInspection
const ELECTRON_BUILDER_NS_UUID = _builderUtilRuntime().UUID.parse("50e065bc-3134-11e6-9bab-38c9862bdaf3"); // noinspection SpellCheckingInspection
const nsisResourcePathPromise = new (_lazyVal().Lazy)(() => (0, _binDownload().getBinFromGithub)("nsis-resources", "3.3.0", "4okc98BD0v9xDcSjhPVhAkBMqos+FvD/5/H72fTTIwoHTuWd2WdD7r+1j72hxd+ZXxq1y3FRW0x6Z3jR0VfpMw=="));
const USE_NSIS_BUILT_IN_COMPRESSOR = false;
class NsisTarget extends _core().Target {
constructor(packager, outDir, targetName, packageHelper) {
super(targetName);
this.packager = packager;
this.outDir = outDir;
this.packageHelper = packageHelper;
/** @private */
this.archs = new Map();
this.packageHelper.refCount++;
this.options = targetName === "portable" ? Object.create(null) : Object.assign({}, this.packager.config.nsis, {
preCompressedFileExtensions: [".avi", ".mov", ".m4v", ".mp4", ".m4p", ".qt", ".mkv", ".webm", ".vmdk"]
});
if (targetName !== "nsis") {
Object.assign(this.options, this.packager.config[targetName === "nsis-web" ? "nsisWeb" : targetName]);
}
const deps = packager.info.metadata.dependencies;
if (deps != null && deps["electron-squirrel-startup"] != null) {
_builderUtil().log.warn('"electron-squirrel-startup" dependency is not required for NSIS');
}
}
build(appOutDir, arch) {
var _this = this;
return (0, _bluebirdLst().coroutine)(function* () {
_this.archs.set(arch, appOutDir);
})();
}
get isBuildDifferentialAware() {
return !this.isPortable && this.options.differentialPackage !== false;
}
getPreCompressedFileExtensions() {
const result = this.isWebInstaller ? null : this.options.preCompressedFileExtensions;
return result == null ? null : (0, _builderUtil().asArray)(result).map(it => it.startsWith(".") ? it : `.${it}`);
}
/** @private */
buildAppPackage(appOutDir, arch) {
var _this2 = this;
return (0, _bluebirdLst().coroutine)(function* () {
const options = _this2.options;
const packager = _this2.packager;
const isBuildDifferentialAware = _this2.isBuildDifferentialAware;
const format = !isBuildDifferentialAware && options.useZip ? "zip" : "7z";
const archiveFile = path.join(_this2.outDir, `${packager.appInfo.sanitizedName}-${packager.appInfo.version}-${_builderUtil().Arch[arch]}.nsis.${format}`);
const preCompressedFileExtensions = _this2.getPreCompressedFileExtensions();
const archiveOptions = {
withoutDir: true,
compression: packager.compression,
excluded: preCompressedFileExtensions == null ? null : preCompressedFileExtensions.map(it => `*${it}`)
};
const timer = (0, _timer().time)(`nsis package, ${_builderUtil().Arch[arch]}`);
yield (0, _archive().archive)(format, archiveFile, appOutDir, isBuildDifferentialAware ? (0, _differentialUpdateInfoBuilder().configureDifferentialAwareArchiveOptions)(archiveOptions) : archiveOptions);
timer.end();
if (isBuildDifferentialAware && _this2.isWebInstaller) {
const data = yield (0, _differentialUpdateInfoBuilder().appendBlockmap)(archiveFile);
return Object.assign({}, data, {
path: archiveFile
});
} else {
return yield createPackageFileInfo(archiveFile);
}
})();
}
finishBuild() {
var _this3 = this;
return (0, _bluebirdLst().coroutine)(function* () {
try {
yield _this3.buildInstaller();
} finally {
yield _this3.packageHelper.finishBuild();
}
})();
}
get installerFilenamePattern() {
// tslint:disable:no-invalid-template-strings
return "${productName} " + (this.isPortable ? "" : "Setup ") + "${version}.${ext}";
}
get isPortable() {
return this.name === "portable";
}
buildInstaller() {
var _this4 = this;
return (0, _bluebirdLst().coroutine)(function* () {
const packager = _this4.packager;
const appInfo = packager.appInfo;
const options = _this4.options;
const installerFilename = packager.expandArtifactNamePattern(options, "exe", null, _this4.installerFilenamePattern);
const oneClick = options.oneClick !== false;
const installerPath = path.join(_this4.outDir, installerFilename);
const logFields = {
target: _this4.name,
file: _builderUtil().log.filePath(installerPath),
archs: Array.from(_this4.archs.keys()).map(it => _builderUtil().Arch[it]).join(", ")
};
if (!_this4.isPortable) {
logFields.oneClick = oneClick;
}
_builderUtil().log.info(logFields, "building");
const guid = options.guid || _builderUtilRuntime().UUID.v5(appInfo.id, ELECTRON_BUILDER_NS_UUID);
const uninstallAppKey = guid.replace(/\\/g, " - ");
const defines = {
APP_ID: appInfo.id,
APP_GUID: guid,
// Windows bug - entry in Software\Microsoft\Windows\CurrentVersion\Uninstall cannot have \ symbols (dir)
UNINSTALL_APP_KEY: uninstallAppKey,
PRODUCT_NAME: appInfo.productName,
PRODUCT_FILENAME: appInfo.productFilename,
APP_FILENAME: (0, _targetUtil().getWindowsInstallationDirName)(appInfo, !oneClick || options.perMachine === true),
APP_DESCRIPTION: appInfo.description,
VERSION: appInfo.version,
PROJECT_DIR: packager.projectDir,
BUILD_RESOURCES_DIR: packager.info.buildResourcesDir
};
if (uninstallAppKey !== guid) {
defines.UNINSTALL_REGISTRY_KEY_2 = `Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\${guid}`;
}
const commands = {
OutFile: `"${installerPath}"`,
VIProductVersion: appInfo.getVersionInWeirdWindowsForm(),
VIAddVersionKey: _this4.computeVersionKey(),
Unicode: _this4.isUnicodeEnabled
};
const isPortable = _this4.isPortable;
const iconPath = (isPortable ? null : yield packager.getResource(options.installerIcon, "installerIcon.ico")) || (yield packager.getIconPath());
if (iconPath != null) {
if (isPortable) {
commands.Icon = `"${iconPath}"`;
} else {
defines.MUI_ICON = iconPath;
defines.MUI_UNICON = iconPath;
}
}
const packageFiles = {};
let estimatedSize = 0;
if (_this4.isPortable && options.useZip) {
for (const [arch, dir] of _this4.archs.entries()) {
defines[arch === _builderUtil().Arch.x64 ? "APP_DIR_64" : "APP_DIR_32"] = dir;
}
} else if (USE_NSIS_BUILT_IN_COMPRESSOR && _this4.archs.size === 1) {
defines.APP_BUILD_DIR = _this4.archs.get(_this4.archs.keys().next().value);
} else {
yield _bluebirdLst().default.map(_this4.archs.keys(),
/*#__PURE__*/
function () {
var _ref = (0, _bluebirdLst().coroutine)(function* (arch) {
const fileInfo = yield _this4.packageHelper.packArch(arch, _this4);
const file = fileInfo.path;
const defineKey = arch === _builderUtil().Arch.x64 ? "APP_64" : "APP_32";
defines[defineKey] = file;
defines[`${defineKey}_NAME`] = path.basename(file); // nsis expect a hexadecimal string
defines[`${defineKey}_HASH`] = Buffer.from(fileInfo.sha512, "base64").toString("hex").toUpperCase();
if (_this4.isWebInstaller) {
packager.dispatchArtifactCreated(file, _this4, arch);
packageFiles[_builderUtil().Arch[arch]] = fileInfo;
}
const archiveInfo = (yield (0, _builderUtil().exec)(_zipBin().path7za, ["l", file])).trim(); // after adding blockmap data will be "Warnings: 1" in the end of output
const match = archiveInfo.match(/(\d+)\s+\d+\s+\d+\s+files/);
if (match == null) {
_builderUtil().log.warn({
output: archiveInfo
}, "cannot compute size of app package");
} else {
estimatedSize += parseInt(match[1], 10);
}
});
return function (_x) {
return _ref.apply(this, arguments);
};
}());
}
_this4.configureDefinesForAllTypeOfInstaller(defines);
if (isPortable) {
defines.REQUEST_EXECUTION_LEVEL = options.requestExecutionLevel || "user";
} else {
yield _this4.configureDefines(oneClick, defines);
}
if (estimatedSize !== 0) {
// in kb
defines.ESTIMATED_SIZE = Math.round(estimatedSize / 1024);
}
if (packager.compression === "store") {
commands.SetCompress = "off";
} else {
// difference - 33.540 vs 33.601, only 61 KB (but zip is faster to decompress)
// do not use /SOLID - "With solid compression, files are uncompressed to temporary file before they are copied to their final destination",
// it is not good for portable installer (where built-in NSIS compression is used). http://forums.winamp.com/showpost.php?p=2982902&postcount=6
commands.SetCompressor = "zlib";
if (!_this4.isWebInstaller) {
defines.COMPRESS = "auto";
}
}
debug(defines);
debug(commands);
if (packager.packagerOptions.effectiveOptionComputed != null && (yield packager.packagerOptions.effectiveOptionComputed([defines, commands]))) {
return;
}
const sharedHeader = yield _this4.computeCommonInstallerScriptHeader();
const script = isPortable ? yield (0, _fsExtraP().readFile)(path.join(_nsisUtil().nsisTemplatesDir, "portable.nsi"), "utf8") : yield _this4.computeScriptAndSignUninstaller(defines, commands, installerPath, sharedHeader);
yield _this4.executeMakensis(defines, commands, sharedHeader + (yield _this4.computeFinalScript(script, true)));
yield Promise.all([packager.sign(installerPath), defines.UNINSTALLER_OUT_FILE == null ? Promise.resolve() : (0, _fsExtraP().unlink)(defines.UNINSTALLER_OUT_FILE)]);
const safeArtifactName = (0, _platformPackager().isSafeGithubName)(installerFilename) ? installerFilename : _this4.generateGitHubInstallerName();
let updateInfo;
if (_this4.isWebInstaller) {
updateInfo = (0, _differentialUpdateInfoBuilder().createNsisWebDifferentialUpdateInfo)(installerPath, packageFiles);
} else if (_this4.isBuildDifferentialAware) {
updateInfo = yield (0, _differentialUpdateInfoBuilder().createBlockmap)(installerPath, _this4, packager, safeArtifactName);
}
packager.info.dispatchArtifactCreated({
file: installerPath,
updateInfo,
target: _this4,
packager,
arch: _this4.archs.size === 1 ? _this4.archs.keys().next().value : null,
safeArtifactName,
isWriteUpdateInfo: !_this4.isPortable
});
})();
}
generateGitHubInstallerName() {
const appInfo = this.packager.appInfo;
const classifier = appInfo.name.toLowerCase() === appInfo.name ? "setup-" : "Setup-";
return `${appInfo.name}-${this.isPortable ? "" : classifier}${appInfo.version}.exe`;
}
get isUnicodeEnabled() {
return this.options.unicode !== false;
}
get isWebInstaller() {
return false;
}
computeScriptAndSignUninstaller(defines, commands, installerPath, sharedHeader) {
var _this5 = this;
return (0, _bluebirdLst().coroutine)(function* () {
const packager = _this5.packager;
const customScriptPath = yield packager.getResource(_this5.options.script, "installer.nsi");
const script = yield (0, _fsExtraP().readFile)(customScriptPath || path.join(_nsisUtil().nsisTemplatesDir, "installer.nsi"), "utf8");
if (customScriptPath != null) {
_builderUtil().log.info({
reason: "custom NSIS script is used"
}, "uninstaller is not signed by electron-builder");
return script;
} // https://github.com/electron-userland/electron-builder/issues/2103
// it is more safe and reliable to write uninstaller to our out dir
const uninstallerPath = path.join(_this5.outDir, `.__uninstaller-${_this5.name}-${_this5.packager.appInfo.sanitizedName}.exe`);
const isWin = process.platform === "win32";
defines.BUILD_UNINSTALLER = null;
defines.UNINSTALLER_OUT_FILE = isWin ? uninstallerPath : path.win32.join("Z:", uninstallerPath);
yield _this5.executeMakensis(defines, commands, sharedHeader + (yield _this5.computeFinalScript(script, false)));
yield (0, _wine().execWine)(installerPath, []);
yield packager.sign(uninstallerPath, " Signing NSIS uninstaller");
delete defines.BUILD_UNINSTALLER; // platform-specific path, not wine
defines.UNINSTALLER_OUT_FILE = uninstallerPath;
return script;
})();
}
computeVersionKey() {
// Error: invalid VIProductVersion format, should be X.X.X.X
// so, we must strip beta
const localeId = this.options.language || "1033";
const appInfo = this.packager.appInfo;
const versionKey = [`/LANG=${localeId} ProductName "${appInfo.productName}"`, `/LANG=${localeId} ProductVersion "${appInfo.version}"`, `/LANG=${localeId} LegalCopyright "${appInfo.copyright}"`, `/LANG=${localeId} FileDescription "${appInfo.description}"`, `/LANG=${localeId} FileVersion "${appInfo.buildVersion}"`];
(0, _builderUtil().use)(this.packager.platformSpecificBuildOptions.legalTrademarks, it => versionKey.push(`/LANG=${localeId} LegalTrademarks "${it}"`));
(0, _builderUtil().use)(appInfo.companyName, it => versionKey.push(`/LANG=${localeId} CompanyName "${it}"`));
return versionKey;
}
configureDefines(oneClick, defines) {
const packager = this.packager;
const options = this.options;
const asyncTaskManager = new (_builderUtil().AsyncTaskManager)(packager.info.cancellationToken);
if (oneClick) {
defines.ONE_CLICK = null;
if (options.runAfterFinish !== false) {
defines.RUN_AFTER_FINISH = null;
}
asyncTaskManager.add(
/*#__PURE__*/
(0, _bluebirdLst().coroutine)(function* () {
const installerHeaderIcon = yield packager.getResource(options.installerHeaderIcon, "installerHeaderIcon.ico");
if (installerHeaderIcon != null) {
defines.HEADER_ICO = installerHeaderIcon;
}
}));
} else {
if (options.runAfterFinish === false) {
defines.HIDE_RUN_AFTER_FINISH = null;
}
asyncTaskManager.add(
/*#__PURE__*/
(0, _bluebirdLst().coroutine)(function* () {
const installerHeader = yield packager.getResource(options.installerHeader, "installerHeader.bmp");
if (installerHeader != null) {
defines.MUI_HEADERIMAGE = null;
defines.MUI_HEADERIMAGE_RIGHT = null;
defines.MUI_HEADERIMAGE_BITMAP = installerHeader;
}
}));
asyncTaskManager.add(
/*#__PURE__*/
(0, _bluebirdLst().coroutine)(function* () {
const bitmap = (yield packager.getResource(options.installerSidebar, "installerSidebar.bmp")) || "${NSISDIR}\\Contrib\\Graphics\\Wizard\\nsis3-metro.bmp";
defines.MUI_WELCOMEFINISHPAGE_BITMAP = bitmap;
defines.MUI_UNWELCOMEFINISHPAGE_BITMAP = (yield packager.getResource(options.uninstallerSidebar, "uninstallerSidebar.bmp")) || bitmap;
}));
if (options.allowElevation !== false) {
defines.MULTIUSER_INSTALLMODE_ALLOW_ELEVATION = null;
}
}
if (options.perMachine === true) {
defines.INSTALL_MODE_PER_ALL_USERS = null;
}
if (!oneClick || options.perMachine === true) {
defines.INSTALL_MODE_PER_ALL_USERS_REQUIRED = null;
}
if (options.allowToChangeInstallationDirectory) {
if (oneClick) {
throw new (_builderUtil().InvalidConfigurationError)("allowToChangeInstallationDirectory makes sense only for assisted installer (please set oneClick to false)");
}
defines.allowToChangeInstallationDirectory = null;
}
const commonOptions = (0, _CommonWindowsInstallerConfiguration().getEffectiveOptions)(options, packager);
if (commonOptions.menuCategory != null) {
defines.MENU_FILENAME = commonOptions.menuCategory;
}
defines.SHORTCUT_NAME = commonOptions.shortcutName;
if (options.deleteAppDataOnUninstall) {
defines.DELETE_APP_DATA_ON_UNINSTALL = null;
}
asyncTaskManager.add(
/*#__PURE__*/
(0, _bluebirdLst().coroutine)(function* () {
const uninstallerIcon = yield packager.getResource(options.uninstallerIcon, "uninstallerIcon.ico");
if (uninstallerIcon != null) {
// we don't need to copy MUI_UNICON (defaults to app icon), so, we have 2 defines
defines.UNINSTALLER_ICON = uninstallerIcon;
defines.MUI_UNICON = uninstallerIcon;
}
}));
defines.UNINSTALL_DISPLAY_NAME = packager.expandMacro(options.uninstallDisplayName || "${productName} ${version}", null, {}, false);
if (commonOptions.isCreateDesktopShortcut === _CommonWindowsInstallerConfiguration().DesktopShortcutCreationPolicy.NEVER) {
defines.DO_NOT_CREATE_DESKTOP_SHORTCUT = null;
}
if (commonOptions.isCreateDesktopShortcut === _CommonWindowsInstallerConfiguration().DesktopShortcutCreationPolicy.ALWAYS) {
defines.RECREATE_DESKTOP_SHORTCUT = null;
}
if (!commonOptions.isCreateStartMenuShortcut) {
defines.DO_NOT_CREATE_START_MENU_SHORTCUT = null;
}
if (options.displayLanguageSelector === true) {
defines.DISPLAY_LANG_SELECTOR = null;
}
return asyncTaskManager.awaitTasks();
}
configureDefinesForAllTypeOfInstaller(defines) {
const appInfo = this.packager.appInfo;
const companyName = appInfo.companyName;
if (companyName != null) {
defines.COMPANY_NAME = companyName;
} // electron uses product file name as app data, define it as well to remove on uninstall
if (defines.APP_FILENAME !== appInfo.productFilename) {
defines.APP_PRODUCT_FILENAME = appInfo.productFilename;
}
if (this.isWebInstaller) {
defines.APP_PACKAGE_STORE_FILE = `${appInfo.productFilename}\\${_builderUtilRuntime().CURRENT_APP_PACKAGE_FILE_NAME}`;
} else {
defines.APP_INSTALLER_STORE_FILE = `${appInfo.productFilename}\\${_builderUtilRuntime().CURRENT_APP_INSTALLER_FILE_NAME}`;
}
if (!this.isWebInstaller && defines.APP_BUILD_DIR == null) {
const options = this.options;
if (options.useZip) {
defines.ZIP_COMPRESSION = null;
}
defines.COMPRESSION_METHOD = options.useZip ? "zip" : "7z";
}
}
executeMakensis(defines, commands, script) {
var _this6 = this;
return (0, _bluebirdLst().coroutine)(function* () {
const args = _this6.options.warningsAsErrors === false ? [] : ["-WX"];
for (const name of Object.keys(defines)) {
const value = defines[name];
if (value == null) {
args.push(`-D${name}`);
} else {
args.push(`-D${name}=${value}`);
}
}
for (const name of Object.keys(commands)) {
const value = commands[name];
if (Array.isArray(value)) {
for (const c of value) {
args.push(`-X${name} ${c}`);
}
} else {
args.push(`-X${name} ${value}`);
}
}
args.push("-");
if (_this6.packager.debugLogger.isEnabled) {
_this6.packager.debugLogger.add("nsis.script", script);
}
const nsisPath = yield _nsisUtil().NSIS_PATH.value;
const command = path.join(nsisPath, process.platform === "darwin" ? "mac" : process.platform === "win32" ? "Bin" : "linux", process.platform === "win32" ? "makensis.exe" : "makensis");
yield (0, _builderUtil().spawnAndWrite)(command, args, script, {
// we use NSIS_CONFIG_CONST_DATA_PATH=no to build makensis on Linux, but in any case it doesn't use stubs as MacOS/Windows version, so, we explicitly set NSISDIR
env: Object.assign({}, process.env, {
NSISDIR: nsisPath
}),
cwd: _nsisUtil().nsisTemplatesDir
});
})();
}
computeCommonInstallerScriptHeader() {
var _this7 = this;
return (0, _bluebirdLst().coroutine)(function* () {
const packager = _this7.packager;
const options = _this7.options;
const scriptGenerator = new (_nsisScriptGenerator().NsisScriptGenerator)();
const langConfigurator = new (_nsisLang().LangConfigurator)(options);
scriptGenerator.include(path.join(_nsisUtil().nsisTemplatesDir, "include", "StdUtils.nsh"));
const includeDir = path.join(_nsisUtil().nsisTemplatesDir, "include");
scriptGenerator.addIncludeDir(includeDir);
scriptGenerator.flags(["updated", "force-run", "keep-shortcuts", "no-desktop-shortcut", "delete-app-data"]);
(0, _nsisLang().createAddLangsMacro)(scriptGenerator, langConfigurator);
const taskManager = new (_builderUtil().AsyncTaskManager)(packager.info.cancellationToken);
const pluginArch = _this7.isUnicodeEnabled ? "x86-unicode" : "x86-ansi";
taskManager.add(
/*#__PURE__*/
(0, _bluebirdLst().coroutine)(function* () {
scriptGenerator.addPluginDir(pluginArch, path.join((yield nsisResourcePathPromise.value), "plugins", pluginArch));
}));
taskManager.add(
/*#__PURE__*/
(0, _bluebirdLst().coroutine)(function* () {
const userPluginDir = path.join(packager.info.buildResourcesDir, pluginArch);
const stat = yield (0, _fs().statOrNull)(userPluginDir);
if (stat != null && stat.isDirectory()) {
scriptGenerator.addPluginDir(pluginArch, userPluginDir);
}
}));
taskManager.addTask((0, _nsisLang().addCustomMessageFileInclude)("messages.yml", packager, scriptGenerator, langConfigurator));
if (!_this7.isPortable) {
if (options.oneClick === false) {
taskManager.addTask((0, _nsisLang().addCustomMessageFileInclude)("assistedMessages.yml", packager, scriptGenerator, langConfigurator));
}
taskManager.add(
/*#__PURE__*/
(0, _bluebirdLst().coroutine)(function* () {
const customInclude = yield packager.getResource(_this7.options.include, "installer.nsh");
if (customInclude != null) {
scriptGenerator.addIncludeDir(packager.info.buildResourcesDir);
scriptGenerator.include(customInclude);
}
}));
}
yield taskManager.awaitTasks();
return scriptGenerator.build();
})();
}
computeFinalScript(originalScript, isInstaller) {
var _this8 = this;
return (0, _bluebirdLst().coroutine)(function* () {
const packager = _this8.packager;
const options = _this8.options;
const langConfigurator = new (_nsisLang().LangConfigurator)(options);
const scriptGenerator = new (_nsisScriptGenerator().NsisScriptGenerator)();
const taskManager = new (_builderUtil().AsyncTaskManager)(packager.info.cancellationToken);
if (isInstaller) {
// http://stackoverflow.com/questions/997456/nsis-license-file-based-on-language-selection
taskManager.add(() => (0, _nsisLicense().computeLicensePage)(packager, options, scriptGenerator, langConfigurator.langs));
}
yield taskManager.awaitTasks();
if (_this8.isPortable) {
return scriptGenerator.build() + originalScript;
}
const preCompressedFileExtensions = _this8.getPreCompressedFileExtensions();
if (preCompressedFileExtensions != null) {
for (const [arch, dir] of _this8.archs.entries()) {
const preCompressedAssets = yield (0, _fs().walk)(path.join(dir, "resources"), (file, stat) => stat.isDirectory() || preCompressedFileExtensions.some(it => file.endsWith(it)));
if (preCompressedAssets.length !== 0) {
const macro = new (_nsisScriptGenerator().NsisScriptGenerator)();
for (const file of preCompressedAssets) {
macro.file(`$INSTDIR\\${path.relative(dir, file).replace(/\//g, "\\")}`, file);
}
scriptGenerator.macro(`customFiles_${_builderUtil().Arch[arch]}`, macro);
}
}
}
const fileAssociations = packager.fileAssociations;
if (fileAssociations.length !== 0) {
scriptGenerator.include(path.join(path.join(_nsisUtil().nsisTemplatesDir, "include"), "FileAssociation.nsh"));
if (isInstaller) {
const registerFileAssociationsScript = new (_nsisScriptGenerator().NsisScriptGenerator)();
for (const item of fileAssociations) {
const extensions = (0, _builderUtil().asArray)(item.ext).map(_platformPackager().normalizeExt);
for (const ext of extensions) {
const customIcon = yield packager.getResource((0, _builderUtil().getPlatformIconFileName)(item.icon, false), `${extensions[0]}.ico`);
let installedIconPath = "$appExe,0";
if (customIcon != null) {
installedIconPath = `$INSTDIR\\resources\\${path.basename(customIcon)}`;
registerFileAssociationsScript.file(installedIconPath, customIcon);
}
const icon = `"${installedIconPath}"`;
const commandText = `"Open with ${packager.appInfo.productName}"`;
const command = '"$appExe $\\"%1$\\""';
registerFileAssociationsScript.insertMacro("APP_ASSOCIATE", `"${ext}" "${item.name || ext}" "${item.description || ""}" ${icon} ${commandText} ${command}`);
}
}
scriptGenerator.macro("registerFileAssociations", registerFileAssociationsScript);
} else {
const unregisterFileAssociationsScript = new (_nsisScriptGenerator().NsisScriptGenerator)();
for (const item of fileAssociations) {
for (const ext of (0, _builderUtil().asArray)(item.ext)) {
unregisterFileAssociationsScript.insertMacro("APP_UNASSOCIATE", `"${(0, _platformPackager().normalizeExt)(ext)}" "${item.name || ext}"`);
}
}
scriptGenerator.macro("unregisterFileAssociations", unregisterFileAssociationsScript);
}
}
return scriptGenerator.build() + originalScript;
})();
}
}
exports.NsisTarget = NsisTarget;
function createPackageFileInfo(_x2) {
return _createPackageFileInfo.apply(this, arguments);
} function _createPackageFileInfo() {
_createPackageFileInfo = (0, _bluebirdLst().coroutine)(function* (file) {
return {
path: file,
size: (yield (0, _fsExtraP().stat)(file)).size,
sha512: yield (0, _hash().hashFile)(file)
};
});
return _createPackageFileInfo.apply(this, arguments);
}
// [email protected]
//# sourceMappingURL=NsisTarget.js.map |
import React, { PureComponent } from 'react'
import PropTypes from 'prop-types'
import styled from 'styled-components'
import { CSSIcon } from 'source/__utils__'
const COLOR_SELECT = 'rgba(0, 0, 0, 0.06)'
const COLOR_HOVER = 'rgba(0, 0, 0, 0.04)'
const COLOR_SHADOW = 'rgba(0, 0, 0, 0.10)'
const COLOR_PRIMARY = '#EB5648'
const COLOR_BORDER = '#D9D9D9'
const COLOR_TEXT_80 = '#525E71'
const COLOR_INACTIVE = '#BBB'
const CSSSelectDiv = styled.div`
position: relative;
margin: 0 1px;
height: 22px;
font-size: 16px;
color: ${COLOR_TEXT_80};
& > .item-select {
display: flex;
flex-flow: row;
align-items: center;
padding: 0 5px;
width: 100%;
height: 100%;
&:hover { background: ${COLOR_HOVER}; }
&.open { background: ${COLOR_SELECT}; }
&.lock { cursor: not-allowed; color: ${COLOR_INACTIVE}; }
&.lock, &.lock:hover { background: transparent; }
& > .icon { margin-left: 5px; color: ${COLOR_INACTIVE}; }
}
& > .item-list {
position: absolute;
top: 100%;
display: flex;
align-items: center;
justify-content: center;
box-shadow: inset 0 0 0 1px ${COLOR_SHADOW}, 0 2px 8px 0 ${COLOR_SHADOW};
background: #fff;
z-index: 1;
& > .item {
display: flex;
align-items: center;
justify-content: center;
&:hover { background: ${COLOR_HOVER}; }
&.select { background: ${COLOR_SELECT}; }
}
}
/* custom style */
&.select-font-size {
font-size: 12px;
& > .item-select > div { min-width: 24px; }
& > .item-list {
flex-flow: column;
& > .item { width: 64px; height: 30px; }
}
}
&.select-fore-color {
& > .item-select {
& > div { position: relative; height: 100%; }
& > div > span { position: absolute; left: 2px; bottom: 4px; width: 13px; height: 1px; }
&.lock > div > span { opacity: 0.4; }
}
& > .item-list {
flex-flow: row wrap;
padding: 10px;
width: 160px;
& > .item { width: 20px; height: 24px; }
& > .item > span { width: 14px; height: 14px; box-shadow: inset 0 0 0 1px ${COLOR_SHADOW}; }
}
}
&.select-alignment > .item-list {
flex-flow: row nowrap;
justify-content: space-between;
padding: 10px;
width: 112px;
& > .item { width: 24px; height: 24px; }
}
`
const CSSSelectV2Div = styled.div`
display: flex;
flex-flow: row nowrap;
align-items: center;
padding: 0 5px;
font-size: 12px;
color: ${COLOR_TEXT_80};
& > .item-label {
pointer-events: none;
margin-right: 4px;
white-space: nowrap;
&.lock { color: ${COLOR_INACTIVE}; }
}
& > :local(.select) {
border-bottom: 1px solid ${COLOR_BORDER};
&:hover { border-bottom: 1px solid ${COLOR_TEXT_80}; }
&:focus { border-bottom: 1px solid ${COLOR_PRIMARY}; }
&.lock {
cursor: not-allowed;
border-bottom: 1px solid ${COLOR_BORDER};
& > * { pointer-events: none; opacity: 0; }
}
& > .item-select {
&:hover,
&.open { background: transparent; }
}
}
`
class Select extends PureComponent {
static propTypes = {
itemList: PropTypes.array.isRequired,
selectItemIndex: PropTypes.number.isRequired,
renderItem: PropTypes.func.isRequired,
renderSelectItem: PropTypes.func,
onChange: PropTypes.func.isRequired,
isLock: PropTypes.bool,
className: PropTypes.string,
tooltip: PropTypes.string
}
constructor (props) {
super(props)
this.toggleIsOpen = () => this.setState({ isOpen: !this.state.isOpen })
this.onDismissClick = (event) => this.divElement && !this.divElement.contains(event.target) && this.setState({ isOpen: false })
this.setElementRef = (ref) => (this.divElement = ref)
this.divElement = null
this.state = { isOpen: false }
}
componentWillUnmount () { document.removeEventListener('click', this.onDismissClick) }
componentWillUpdate (nextProps, nextState) {
if (nextState.isOpen === this.state.isOpen) return
nextState.isOpen
? document.addEventListener('click', this.onDismissClick)
: document.removeEventListener('click', this.onDismissClick)
}
renderItem (item, index) {
const { selectItemIndex, renderItem, onChange } = this.props
const isSelect = index === selectItemIndex
return <div key={index} className={`safari-flex-button item ${isSelect ? 'select' : ''}`} onClick={isSelect ? null : () => onChange(item)}>
{renderItem(item, isSelect)}
</div>
}
render () {
const { itemList, selectItemIndex, renderItem, renderSelectItem, isLock, className, tooltip } = this.props
const { isOpen } = this.state
return <CSSSelectDiv ref={this.setElementRef} className={className || ''}>
<div
className={`safari-flex-button item-select ${isOpen ? 'open' : ''} ${isLock ? 'lock' : 'tooltip-top'}`}
onClick={!isLock ? this.toggleIsOpen : null}
data-tooltip-content={tooltip}
>
{(renderSelectItem || renderItem)(itemList[ selectItemIndex ])}
<CSSIcon name="arrow-down" className="icon" />
</div>
{!isLock && isOpen && <div className="item-list">{itemList.map(this.renderItem, this)}</div>}
</CSSSelectDiv>
}
}
// don't ask me why...
class SelectV2 extends Select {
render () {
const { itemList, selectItemIndex, renderItem, renderSelectItem, isLock, className, tooltip } = this.props
const { isOpen } = this.state
return <CSSSelectV2Div>
<div className={`item-label ${isLock ? 'lock' : ''}`}>{tooltip}</div>
<CSSSelectDiv ref={this.setElementRef} className={`${isLock ? 'lock' : ''} ${className || ''}`}>
<div
className={`safari-flex-button item-select ${isOpen ? 'open' : ''} ${isLock ? 'lock' : ''}`}
onClick={!isLock ? this.toggleIsOpen : null}
>
{(renderSelectItem || renderItem)(itemList[ selectItemIndex ])}
<CSSIcon name={isOpen ? 'arrow-up' : 'arrow-down'} className="icon" />
</div>
{!isLock && isOpen && <div className="item-list">{itemList.map(this.renderItem, this)}</div>}
</CSSSelectDiv>
</CSSSelectV2Div>
}
}
export {
Select,
SelectV2
}
|
(function() {
'use strict';
// Declare app level module which depends on views, and components
angular.module('myApp', [
'ngRoute',
'myApp.main',
'myApp.configuration',
'myApp.gameBoard',
'myApp.ticTacToeCell',
'myApp.statistics'
]).
config(['$locationProvider', '$routeProvider', function($locationProvider, $routeProvider) {
$routeProvider.when('/', {
templateUrl: 'main/main.html',
controller: 'mainCtrl'
})
.when('/configuration', {
templateUrl: 'configuration/configuration.html',
controller: 'configurationCtrl'
})
.when('/gameBoard', {
templateUrl: 'gameBoard/gameBoard.html',
controller: 'gameBoardCtrl'
})
.when('/statistics', {
templateUrl: 'statistics/statistics.html',
controller: 'statisticsCtrl'
})
.otherwise({redirectTo: '/'});
}])
.run(['$rootScope', function($rootScope) {
$rootScope.defaultConfiguration = {
team1: "Team 1",
team2: "Team 2",
forWin: 3,
cols: 3,
rows: 3
};
$rootScope.gameConfiguration = $rootScope.defaultConfiguration;
$rootScope.statistics = [];
}])
.filter('range', function(){
return function(n) {
var res = [];
for (var i = 0; i < n; i++) {
res.push(i);
}
return res;
};
});
})(); |
import resolve from 'rollup-plugin-node-resolve'
import babel from 'rollup-plugin-babel'
import replace from 'rollup-plugin-replace'
import commonjs from 'rollup-plugin-commonjs'
import { uglify } from 'rollup-plugin-uglify'
const PACKAGE_NAME = process.env.PACKAGE_NAME
const ENTRY_FILE = "./src/Swipeable.js"
const OUTPUT_DIR = "./dist"
const EXTERNAL = ['react-spring', 'react']
const GLOBALS = {
react: 'React'
}
const isExternal = id => !id.startsWith('.') && !id.startsWith('/')
export default [
{
input: ENTRY_FILE,
output: {
file: `${OUTPUT_DIR}/${PACKAGE_NAME}.umd.js`,
format: 'umd',
name: PACKAGE_NAME,
globals: GLOBALS,
},
external: EXTERNAL,
plugins: [
resolve(),
babel(),
commonjs(),
replace({ 'process.env.NODE_ENV': JSON.stringify('development') }),
],
},
{
input: ENTRY_FILE,
output: {
file: `${OUTPUT_DIR}/${PACKAGE_NAME}.min.js`,
format: 'umd',
name: PACKAGE_NAME,
globals: GLOBALS,
},
external: EXTERNAL,
plugins: [
resolve(),
babel(),
commonjs(),
replace({ 'process.env.NODE_ENV': JSON.stringify('production') }),
uglify(),
],
},
{
input: ENTRY_FILE,
output: {
file: `${OUTPUT_DIR}/${PACKAGE_NAME}.cjs.js`,
format: 'cjs',
},
external: isExternal,
plugins: [babel()],
},
{
input: ENTRY_FILE,
output: {
file: `${OUTPUT_DIR}/${PACKAGE_NAME}.esm.js`,
format: 'es',
},
external: isExternal,
plugins: [babel()],
},
]
|
'use strict'
const assert = require('assert')
describe('resourceFilter', () => {
const Filter = require('../../src/resource_filter')
describe('getExcluded', () => {
const filter = new Filter({})
describe('private', () => {
it('returns empty array', () => {
let excluded = filter.getExcluded({
access: 'private'
})
assert.equal(Array.isArray(excluded), true)
assert.equal(excluded.length, 0)
})
})
describe('protected', () => {
it('returns empty array', () => {
let excluded = filter.getExcluded({
access: 'protected',
filteredKeys: {}
})
assert.equal(Array.isArray(excluded), true)
assert.equal(excluded.length, 0)
})
it('returns empty array', () => {
let excluded = filter.getExcluded({
access: 'protected'
})
assert.equal(Array.isArray(excluded), true)
assert.equal(excluded.length, 0)
})
it('returns array of private fields', () => {
let excluded = filter.getExcluded({
access: 'protected',
filteredKeys: {
private: ['foo'],
protected: ['bar']
}
})
assert.equal(Array.isArray(excluded), true)
assert.equal(excluded.length, 1)
assert.deepEqual(excluded, ['foo'])
})
it('returns array of private fields', () => {
let excluded = filter.getExcluded({
access: 'protected',
modelName: 'FooModel',
excludedMap: {
FooModel: {
private: ['foo'],
protected: ['bar']
}
}
})
assert.equal(Array.isArray(excluded), true)
assert.equal(excluded.length, 1)
assert.deepEqual(excluded, ['foo'])
})
})
describe('public', () => {
it('returns empty array', () => {
let excluded = filter.getExcluded({
access: 'public',
filteredKeys: {}
})
assert.equal(Array.isArray(excluded), true)
assert.equal(excluded.length, 0)
})
it('returns empty array', () => {
let excluded = filter.getExcluded({
access: 'public'
})
assert.equal(Array.isArray(excluded), true)
assert.equal(excluded.length, 0)
})
it('returns array of private and protected fields', () => {
let excluded = filter.getExcluded({
access: 'public',
filteredKeys: {
private: ['foo'],
protected: ['bar']
}
})
assert.equal(Array.isArray(excluded), true)
assert.equal(excluded.length, 2)
assert.deepEqual(excluded, ['foo', 'bar'])
})
it('returns array of private and protected fields', () => {
let excluded = filter.getExcluded({
access: 'public',
modelName: 'FooModel',
excludedMap: {
FooModel: {
private: ['foo'],
protected: ['bar']
}
}
})
assert.equal(Array.isArray(excluded), true)
assert.equal(excluded.length, 2)
assert.deepEqual(excluded, ['foo', 'bar'])
})
})
})
describe('filterItem', () => {
let filter = new Filter({})
it('does nothing', () => {
let item = filter.filterItem()
assert.equal(item, undefined)
})
it('removes excluded keys from a document', () => {
let doc = {
foo: {
bar: {
baz: '3.14'
}
}
}
filter.filterItem(doc, ['foo'])
assert.deepEqual(doc, {})
})
it('removes excluded keys from a document', () => {
let doc = {
foo: {
bar: {
baz: '3.14'
}
}
}
filter.filterItem(doc, ['foo.bar.baz'])
assert.deepEqual(doc, {
foo: {
bar: {}
}
})
})
it('removes excluded keys from an array of document', () => {
let docs = [{
foo: {
bar: {
baz: '3.14'
}
}
}, {
foo: {
bar: {
baz: 'pi'
}
}
}]
filter.filterItem(docs, ['foo.bar.baz'])
assert.deepEqual(docs, [{
foo: {
bar: {}
}
}, {
foo: {
bar: {}
}
}])
})
})
describe('filterPopulatedItem', () => {
const db = require('../integration/setup')()
db.initialize({
connect: false
})
let invoiceFilter = new Filter({
model: db.models.Invoice
})
let customerFilter = new Filter({
model: db.models.Customer,
filteredKeys: {
private: ['name']
}
})
let productFilter = new Filter({
model: db.models.Product,
filteredKeys: {
private: ['name']
}
})
it('does nothing', () => {
let item = invoiceFilter.filterPopulatedItem(null, {
populate: []
})
assert.equal(item, null)
})
it('removes keys in populated document', () => {
let invoice = {
customer: {
name: 'John'
},
amount: '42'
}
invoiceFilter.filterPopulatedItem(invoice, {
populate: [{
path: 'customer'
}],
excludedMap: {
Customer: customerFilter.filteredKeys
}
})
assert.deepEqual(invoice, {
customer: {},
amount: '42'
})
})
it('removes keys in array with populated document', () => {
let invoices = [{
customer: {
name: 'John'
},
amount: '42'
}, {
customer: {
name: 'Bob'
},
amount: '3.14'
}]
invoiceFilter.filterPopulatedItem(invoices, {
populate: [{
path: 'customer'
}],
excludedMap: {
Customer: customerFilter.filteredKeys
}
})
assert.deepEqual(invoices, [{
customer: {},
amount: '42'
}, {
customer: {},
amount: '3.14'
}])
})
it('ignores undefined path', () => {
let invoice = {
amount: '42'
}
invoiceFilter.filterPopulatedItem(invoice, {
populate: [{
path: 'customer'
}],
excludedMap: {
Customer: customerFilter.filteredKeys
}
})
assert.deepEqual(invoice, {
amount: '42'
})
})
it('skip when populate path is undefined', () => {
let invoice = {
customer: {
name: 'John'
},
amount: '42'
}
invoiceFilter.filterPopulatedItem(invoice, {
populate: [{}],
excludedMap: {
Customer: customerFilter.filteredKeys
}
})
assert.deepEqual(invoice, {
customer: {
name: 'John'
},
amount: '42'
})
})
it('removes keys in populated document array', () => {
let invoice = {
products: [{
name: 'Squirt Gun'
}, {
name: 'Water Balloons'
}],
amount: '42'
}
invoiceFilter.filterPopulatedItem(invoice, {
populate: [{
path: 'products'
}],
excludedMap: {
Product: productFilter.filteredKeys
}
})
assert.deepEqual(invoice, {
products: [{}, {}],
amount: '42'
})
})
it('removes keys in populated document in array', () => {
let customer = {
name: 'John',
purchases: [{
item: {
name: 'Squirt Gun'
}
}]
}
customerFilter.filterPopulatedItem(customer, {
populate: [{
path: 'purchases.item'
}],
excludedMap: {
Product: productFilter.filteredKeys
}
})
assert.deepEqual(customer, {
name: 'John',
purchases: [{
item: {}
}]
})
})
})
})
|
'use strict'
const Shared = require('@mojaloop/central-services-shared')
const BaseError = Shared.BaseError
const Category = Shared.ErrorCategory
const InvalidResponseError = class extends BaseError {
constructor (message) {
super(Category.INTERNAL, message)
}
}
module.exports = InvalidResponseError
|
# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
# This product includes software developed at Datadog (https://www.datadoghq.com/).
# Copyright 2019-Present Datadog, Inc.
from datadog_api_client.v1.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,
ModelNormal,
ModelSimple,
cached_property,
change_keys_js_to_python,
convert_js_args_to_python_args,
date,
datetime,
file_type,
none_type,
)
def lazy_import():
from datadog_api_client.v1.model.logs_filter import LogsFilter
from datadog_api_client.v1.model.logs_processor import LogsProcessor
globals()["LogsFilter"] = LogsFilter
globals()["LogsProcessor"] = LogsProcessor
class LogsPipeline(ModelNormal):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Do not edit the class manually.
Attributes:
allowed_values (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
with a capitalized key describing the allowed value and an allowed
value. These dicts store the allowed enum values.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
discriminator_value_class_map (dict): A dict to go from the discriminator
variable value to the discriminator class name.
validations (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
that stores validations for max_length, min_length, max_items,
min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
inclusive_minimum, and regex.
additional_properties_type (tuple): A tuple of classes accepted
as additional properties values.
"""
allowed_values = {}
validations = {}
additional_properties_type = None
_nullable = False
@cached_property
def openapi_types():
"""
This must be a method because a model may have properties that are
of type self, this must run after the class is loaded
Returns
openapi_types (dict): The key is attribute name
and the value is attribute type.
"""
lazy_import()
return {
"name": (str,), # noqa: E501
"filter": (LogsFilter,), # noqa: E501
"id": (str,), # noqa: E501
"is_enabled": (bool,), # noqa: E501
"is_read_only": (bool,), # noqa: E501
"processors": ([LogsProcessor],), # noqa: E501
"type": (str,), # noqa: E501
}
discriminator = None
attribute_map = {
"name": "name", # noqa: E501
"filter": "filter", # noqa: E501
"id": "id", # noqa: E501
"is_enabled": "is_enabled", # noqa: E501
"is_read_only": "is_read_only", # noqa: E501
"processors": "processors", # noqa: E501
"type": "type", # noqa: E501
}
read_only_vars = {
"id", # noqa: E501
"is_read_only", # noqa: E501
"type", # noqa: E501
}
_composed_schemas = {}
@convert_js_args_to_python_args
def __init__(self, name, *args, **kwargs): # noqa: E501
"""LogsPipeline - a model defined in OpenAPI
Args:
name (str): Name of the pipeline.
Keyword Args:
_check_type (bool): if True, values for parameters in openapi_types
will be type checked and a TypeError will be
raised if the wrong type is input.
Defaults to True
_path_to_item (tuple/list): This is a list of keys or values to
drill down to the model in received_data
when deserializing a response
_spec_property_naming (bool): True if the variable names in the input data
are serialized names, as specified in the OpenAPI document.
False if the variable names in the input data
are pythonic names, e.g. snake case (default)
_configuration (Configuration): the instance to use when
deserializing a file_type parameter.
If passed, type conversion is attempted
If omitted no type conversion is done.
_visited_composed_classes (tuple): This stores a tuple of
classes that we have traveled through so that
if we see that class again we will not use its
discriminator again.
When traveling through a discriminator, the
composed schema that is
is traveled through is added to this set.
For example if Animal has a discriminator
petType and we pass in "Dog", and the class Dog
allOf includes Animal, we move through Animal
once using the discriminator, and pick Dog.
Then in Dog, we will make an instance of the
Animal class but this time we won't travel
through its discriminator because we passed in
_visited_composed_classes = (Animal,)
filter (LogsFilter): [optional] # noqa: E501
id (str): ID of the pipeline.. [optional] # noqa: E501
is_enabled (bool): Whether or not the pipeline is enabled.. [optional] # noqa: E501
is_read_only (bool): Whether or not the pipeline can be edited.. [optional] # noqa: E501
processors ([LogsProcessor]): Ordered list of processors in this pipeline.. [optional] # noqa: E501
type (str): Type of pipeline.. [optional] # noqa: E501
"""
super().__init__(kwargs)
self._check_pos_args(args)
self.name = name
@classmethod
@convert_js_args_to_python_args
def _from_openapi_data(cls, name, *args, **kwargs): # noqa: E501
"""Helper creating a new instance from a response."""
self = super(LogsPipeline, cls)._from_openapi_data(kwargs)
self._check_pos_args(args)
self.name = name
return self
|
from pylivetrader.api import (
attach_pipeline,
date_rules,
get_datetime,
time_rules,
order,
get_open_orders,
cancel_order,
pipeline_output,
schedule_function,
)
from pipeline_live.data.iex.pricing import USEquityPricing
from pipeline_live.data.iex.fundamentals import IEXCompany, IEXKeyStats
from pipeline_live.data.iex.factors import (
SimpleMovingAverage, AverageDollarVolume,
)
from pipeline_live.data.polygon.filters import (
IsPrimaryShareEmulation as IsPrimaryShare,
)
from pylivetrader.finance.execution import LimitOrder
from zipline.pipeline import Pipeline
import numpy as np # needed for NaN handling
import math # ceil and floor are useful for rounding
from itertools import cycle
import logbook
log = logbook.Logger('algo')
def record(*args, **kwargs):
print('args={}, kwargs={}'.format(args, kwargs))
def initialize(context):
# set_commission(commission.PerShare(cost=0.01, min_trade_cost=1.50))
# set_slippage(slippage.VolumeShareSlippage(volume_limit=.20,price_impact=0.0))
# set_slippage(slippage.FixedSlippage(spread=0.00))
# set_commission(commission.PerTrade(cost=0.00))
# set_slippage(slippage.FixedSlippage(spread=0.00))
# set_long_only()
context.MaxCandidates = 150
context.MaxBuyOrdersAtOnce = 30
context.MyLeastPrice = 3.00
context.MyMostPrice = 25.00
context.MyFireSalePrice = context.MyLeastPrice
context.MyFireSaleAge = 6
# over simplistic tracking of position age
# context.age = {}
print(len(context.portfolio.positions))
# Rebalance
EveryThisManyMinutes = 10
TradingDayHours = 6.5
TradingDayMinutes = int(TradingDayHours * 60)
for minutez in range(
1,
TradingDayMinutes,
EveryThisManyMinutes
):
schedule_function(
my_rebalance,
date_rules.every_day(),
time_rules.market_open(
minutes=minutez))
# Prevent excessive logging of canceled orders at market close.
schedule_function(
cancel_open_orders,
date_rules.every_day(),
time_rules.market_close(
hours=0,
minutes=1))
# Record variables at the end of each day.
schedule_function(
my_record_vars,
date_rules.every_day(),
time_rules.market_close())
# Create our pipeline and attach it to our algorithm.
my_pipe = make_pipeline(context)
attach_pipeline(my_pipe, 'my_pipeline')
def make_pipeline(context):
"""
Create our pipeline.
"""
# Filter for primary share equities. IsPrimaryShare is a built-in filter.
primary_share = IsPrimaryShare()
# Equities listed as common stock (as opposed to, say, preferred stock).
# 'ST00000001' indicates common stock.
common_stock = morningstar.share_class_reference.security_type.latest.eq(
'ST00000001')
# Non-depositary receipts. Recall that the ~ operator inverts filters,
# turning Trues into Falses and vice versa
not_depositary = ~morningstar.share_class_reference.is_depositary_receipt.latest
# Equities not trading over-the-counter.
not_otc = ~morningstar.share_class_reference.exchange_id.latest.startswith(
'OTC')
# Not when-issued equities.
not_wi = ~morningstar.share_class_reference.symbol.latest.endswith('.WI')
# Equities without LP in their name, .matches does a match using a regular
# expression
not_lp_name = ~morningstar.company_reference.standard_name.latest.matches(
'.* L[. ]?P.?$')
# Equities with a null value in the limited_partnership Morningstar
# fundamental field.
not_lp_balance_sheet = morningstar.balance_sheet.limited_partnership.latest.isnull()
# Equities whose most recent Morningstar market cap is not null have
# fundamental data and therefore are not ETFs.
have_market_cap = morningstar.valuation.market_cap.latest.notnull()
# At least a certain price
price = USEquityPricing.close.latest
AtLeastPrice = (price >= context.MyLeastPrice)
AtMostPrice = (price <= context.MyMostPrice)
# Filter for stocks that pass all of our previous filters.
tradeable_stocks = (
primary_share
& common_stock
& not_depositary
& not_otc
& not_wi
& not_lp_name
& not_lp_balance_sheet
& have_market_cap
& AtLeastPrice
& AtMostPrice
)
LowVar = 5
HighVar = 40
log.info(
'''
Algorithm initialized variables:
context.MaxCandidates %s
LowVar %s
HighVar %s''' %
(context.MaxCandidates, LowVar, HighVar))
# High dollar volume filter.
base_universe = AverageDollarVolume(
window_length=20,
mask=tradeable_stocks
).percentile_between(LowVar, HighVar)
# Short close price average.
ShortAvg = SimpleMovingAverage(
inputs=[USEquityPricing.close],
window_length=3,
mask=base_universe
)
# Long close price average.
LongAvg = SimpleMovingAverage(
inputs=[USEquityPricing.close],
window_length=45,
mask=base_universe
)
percent_difference = (ShortAvg - LongAvg) / LongAvg
# Filter to select securities to long.
stocks_worst = percent_difference.bottom(context.MaxCandidates)
securities_to_trade = (stocks_worst)
return Pipeline(
columns={
'stocks_worst': stocks_worst
},
screen=(securities_to_trade),
)
def my_compute_weights(context):
"""
Compute ordering weights.
"""
# Compute even target weights for our long positions and short positions.
stocks_worst_weight = 1.00 / len(context.stocks_worst)
return stocks_worst_weight
def before_trading_start(context, data):
# over simplistic tracking of position age
if not hasattr(context, 'age') or not context.age:
context.age = {}
today = get_datetime().floor('1D')
last_date = getattr(context, 'last_date', None)
if today != last_date:
# Gets our pipeline output every day.
context.output = pipeline_output('my_pipeline')
context.stocks_worst = context.output[
context.output['stocks_worst']].index.tolist()
context.stocks_worst_weight = my_compute_weights(context)
context.MyCandidate = cycle(context.stocks_worst)
context.LowestPrice = context.MyLeastPrice # reset beginning of day
print(len(context.portfolio.positions))
for stock in context.portfolio.positions:
CurrPrice = float(data.current([stock], 'price'))
if CurrPrice < context.LowestPrice:
context.LowestPrice = CurrPrice
if stock in context.age:
context.age[stock] += 1
else:
context.age[stock] = 1
for stock in context.age:
if stock not in context.portfolio.positions:
context.age[stock] = 0
message = 'stock.symbol: {symbol} : age: {age}'
log.info(message.format(symbol=stock.symbol, age=context.age[stock]))
context.last_date = today
def my_rebalance(context, data):
BuyFactor = .99
SellFactor = 1.01
cash = context.portfolio.cash
cancel_open_buy_orders(context, data)
# Order sell at profit target in hope that somebody actually buys it
for stock in context.portfolio.positions:
if not get_open_orders(stock):
StockShares = context.portfolio.positions[stock].amount
CurrPrice = float(data.current([stock], 'price'))
CostBasis = float(context.portfolio.positions[stock].cost_basis)
SellPrice = float(
make_div_by_05(
CostBasis *
SellFactor,
buy=False))
if np.isnan(SellPrice):
pass # probably best to wait until nan goes away
elif (stock in context.age and context.age[stock] == 1):
pass
elif (CurrPrice < 0.9 * CostBasis):
SellPrice = float(
make_div_by_05(.99 * CurrPrice, buy=False))
order(stock, -StockShares,style=LimitOrder(SellPrice))
elif (
stock in context.age
and context.MyFireSaleAge <= context.age[stock]
and (
context.MyFireSalePrice > CurrPrice
or CostBasis > CurrPrice
)
):
if (stock in context.age and context.age[stock] < 2):
pass
elif stock not in context.age:
context.age[stock] = 1
else:
SellPrice = float(
make_div_by_05(.98 * CurrPrice, buy=False))
order(stock, -StockShares,
style=LimitOrder(SellPrice)
)
else:
if (stock in context.age and context.age[stock] < 2):
pass
elif stock not in context.age:
context.age[stock] = 1
else:
order(stock, -StockShares,
style=LimitOrder(SellPrice)
)
WeightThisBuyOrder = float(1.00 / context.MaxBuyOrdersAtOnce)
for ThisBuyOrder in range(context.MaxBuyOrdersAtOnce):
stock = next(context.MyCandidate)
PH = data.history([stock], 'price', 20, '1d')
PH_Avg = float(PH.mean())
CurrPrice = float(data.current([stock], 'price'))
if np.isnan(CurrPrice):
pass # probably best to wait until nan goes away
else:
if CurrPrice > float(1.25 * PH_Avg):
BuyPrice = float(CurrPrice)
else:
BuyPrice = float(CurrPrice * BuyFactor)
BuyPrice = float(make_div_by_05(BuyPrice, buy=True))
StockShares = int(WeightThisBuyOrder * cash / BuyPrice)
order(stock, StockShares,
style=LimitOrder(BuyPrice)
)
# if cents not divisible by .05, round down if buy, round up if sell
def make_div_by_05(s, buy=False):
s *= 20.00
s = math.floor(s) if buy else math.ceil(s)
s /= 20.00
return s
def my_record_vars(context, data):
"""
Record variables at the end of each day.
"""
# Record our variables.
record(leverage=context.account.leverage)
record(positions=len(context.portfolio.positions))
if 0 < len(context.age):
MaxAge = context.age[max(
list(context.age.keys()), key=(lambda k: context.age[k]))]
print(MaxAge)
record(MaxAge=MaxAge)
record(LowestPrice=context.LowestPrice)
def log_open_order(StockToLog):
oo = get_open_orders()
if len(oo) == 0:
return
for stock, orders in oo.items():
if stock == StockToLog:
for o in orders:
message = 'Found open order for {amount} shares in {stock}'
log.info(message.format(amount=o.amount, stock=stock))
def log_open_orders():
oo = get_open_orders()
if len(oo) == 0:
return
for stock, orders in oo.items():
for o in orders:
message = 'Found open order for {amount} shares in {stock}'
log.info(message.format(amount=o.amount, stock=stock))
def cancel_open_buy_orders(context, data):
oo = get_open_orders()
if len(oo) == 0:
return
for stock, orders in oo.items():
for o in orders:
# message = 'Canceling order of {amount} shares in {stock}'
# log.info(message.format(amount=o.amount, stock=stock))
if 0 < o.amount: # it is a buy order
cancel_order(o)
def cancel_open_orders(context, data):
oo = get_open_orders()
if len(oo) == 0:
return
for stock, orders in oo.items():
for o in orders:
# message = 'Canceling order of {amount} shares in {stock}'
# log.info(message.format(amount=o.amount, stock=stock))
cancel_order(o)
# This is the every minute stuff
def handle_data(context, data):
pass
|
import React, {Component} from 'react';
import ProductGallery from './ProductGallery';
import ProductVariants from './ProductVariants';
import ProductDetails from './ProductDetails';
import ProductBtn from './ProductBtn';
class ProductFull extends Component {
constructor(){
super();
this.state = {
selectedImg: {},
selectedOptions: {},
selectedVariant: {}
}
this.updateSelectedImg = this.updateSelectedImg.bind(this);
this.handleOptionChange = this.handleOptionChange.bind(this);
}
updateSelectedImg(image){
this.setState({selectedImg: image})
}
getInitialSelectedOptions(options){
return options.reduce((acc, next) => {
acc[next.name] = next.values[0]
return acc;
}, {})
}
handleOptionChange(event){
const newSelectedOptions = Object.assign({...this.state.selectedOptions}, {[event.target.name]: event.target.value})
this.setState({selectedOptions: newSelectedOptions})
}
getVariantForSelectedOptions(selectedOptions, variants){
return variants.find(variant => {
return variant.node.selectedOptions.every(selectedOption => selectedOptions[selectedOption.name] === selectedOption.value)
}).node
}
componentDidUpdate(prevProps, prevState){
if(prevState.selectedOptions !== this.state.selectedOptions) {
this.setState({selectedVariant: this.getVariantForSelectedOptions(this.state.selectedOptions, this.props.product.variants.edges)})
}
}
componentDidMount(){
if (this.props.product) {
const selectedOptions = this.getInitialSelectedOptions(this.props.product.options);
this.setState({selectedImg: this.props.product.images.edges[0].node, selectedOptions: selectedOptions})
}
}
render() {
const { product } = this.props
const { selectedImg, selectedOptions, selectedVariant } = this.state
return(
<div className="Product">
{product ?
<React.Fragment>
<ProductGallery
images={product.images.edges}
selectedImg={selectedImg}
updateSelectedImg={this.updateSelectedImg}
/>
<section className="Product_info">
<ProductDetails
title={product.title}
description={product.description}
tags={product.tags}
/>
<ProductVariants
options={product.options}
selectedOptions={selectedOptions}
handleOptionChange={this.handleOptionChange}
/>
<ProductBtn
selectedVariant={selectedVariant}
addVariant={this.props.addVariant}
/>
</section>
</React.Fragment>
:
<p>No product Variants...</p>
}
</div>
)
}
}
export default ProductFull; |
module.exports = {
"processors": ["stylelint-processor-styled-components"],
"extends": [
"stylelint-config-standard",
"stylelint-config-styled-components"
],
"rules": {
"unit-whitelist": ["rem"]
}
};
|
import React from "react"
import SEO from "../components/seo"
import Footer from "../components/footer"
const NotFoundPage = () => (
<>
<SEO title="404: Not found" />
<div className="bg-gray-300 h-screen w-full flex items-center justify-center -mt-24 md:-mt-32">
<div className="text-center max-w-md">
<h1>404 - PAGE NOT FOUND</h1>
<p>Unfortunately, that page does not exist... Please return home.</p>
</div>
</div>
<Footer siteTitle="Sotos Nakis" />
</>
)
export default NotFoundPage
|
const siteMetadata = {
title: `STEFFIE HARNER | Tokyo-based cyberpunk model & software engineer`,
siteUrl: `https://cybersteffie.netlify.com`,
capitalizeTitleOnHome: false,
logo: `/images/logo.png`,
icon: `/images/icon.png`,
headshot: `/images/headshot.png`,
titleImage: `/images/wall.jpg`,
introTag: `tokyo-based model | concept artist | developer`,
description: `Tokyo-based cyberpunk-obsessed, freelance model & software engineer. \n\n よろしくお願いします。`,
author: `@cybersteffie`,
blogItemsPerPage: 10,
portfolioItemsPerPage: 10,
darkmode: true,
switchTheme: true,
navLinks: [
{
name: "home",
url: "/"
},
{
name: "about",
url: "/about"
},
// {
// name: "blog",
// url: "/blog"
// },
{
name: "portfolio",
url: "/portfolio"
},
{
name: "bookings",
url: "https://ko-fi.com/cybersteffie/commissions"
},
{
name: "support",
url: "https://ko-fi.com/cybersteffie"
}
],
footerLinks: [
// {
// name: "PRIVACY POLICY",
// url: "/privacy-policy"
// }
],
social: [
{
name: "Instagram",
icon: "/images/Instagram.svg",
url: "https://www.instagram.com/cybersteffie"
},
{
name: "Twitter",
icon: "/images/Twitter.svg",
url: "https://www.twitter.com/cybersteffie"
},
{
name: "Youtube",
icon: "/images/Youtube.svg",
url: "https://www.youtube.com/cybersteffie"
},
{
name: "Twitch",
icon: "/images/Twitch.svg",
url: "https://twitch.tv/cybersteffie"
},
{
name: "Github",
icon: "/images/Github.svg",
url: "https://www.github.com/steffieharner"
}
],
contact: {
/* Leave the below value completely empty (no space either) if you don't want a contact form. */
api_url: "",
description: `for model rates, business inquiries, collaboration requests ー by email only please! `,
mail: "[email protected]"
}
// this is optional. you can uncomment this if you use disqus
// disqus: `your-disqus-shortname`
};
const plugins = [
{
resolve: `gatsby-plugin-sharp`,
options: {
useMozJpeg: false,
stripMetadata: true,
defaultQuality: 75,
duotone: true
}
},
`gatsby-transformer-sharp`,
`gatsby-plugin-react-helmet`,
{
resolve: `gatsby-transformer-remark`,
options: {
plugins: [
"gatsby-remark-copy-linked-files",
{
resolve: `gatsby-remark-images`,
options: {
linkImagesToOriginal: false,
maxWidth: 1280,
tracedSVG: {
color: "#f36fda",
turnPolicy: "TURNPOLICY_MAJORITY"
}
}
}
]
}
},
{
resolve: `gatsby-source-filesystem`,
options: {
name: `contents`,
path: `${__dirname}/contents/`
}
},
{
resolve: `gatsby-plugin-less`,
options: {
strictMath: true
}
}
];
if (siteMetadata.disqus) {
plugins.push({
resolve: `gatsby-plugin-disqus`,
options: {
shortname: siteMetadata.disqus
}
});
}
module.exports = {
siteMetadata: siteMetadata,
plugins: plugins
};
|
var util = require('util');
var spawn = require('child_process').spawn;
var path = require('path');
var dbus = require('dbus-native');
var UbuntuReporter = function(helper, logger) {
var log = logger.create('reporter.ubuntu');
var notifications = null;
var notificationId = 0;
var sessionBus = dbus.systemBus();
sessionBus.getService('org.freedesktop.Notifications').getInterface(
'/org/freedesktop/Notifications',
'org.freedesktop.Notifications', function(err, service) {
notifications = service;
});
this.onBrowserComplete = function(browser) {
var results = browser.lastResult;
var time = helper.formatTimeInterval(results.totalTime);
var icon = null,
title = null,
message = null;
log.debug(results);
if (results.failed) {
icon = 'dialog-error';
title = util.format('FAILED - %s', browser.name);
message = util.format('%d/%d tests failed in %s.', results.failed, results.total, time);
}
else if (results.disconnected || results.error) {
icon = 'face-crying';
title = util.format('ERROR - %s', browser.name);
message = 'Test error';
}
else {
icon = 'emblem-default'; // Currently, this is a green tick mark. Didn't find better stock id.
title = util.format('PASSED - %s', browser.name);
message = util.format('%d tests passed in %s.', results.success, time);
}
if (notifications) {
notifications.Notify('', notificationId, icon, title, message, [], [], 5, function(err, id) {
notificationId = id;
});
} else {
log.info("Notification service not ready yet");
}
};
};
// PUBLISH DI MODULE
module.exports = {
'reporter:ubuntu': ['type', UbuntuReporter]
};
|
/* eslint-disable */module.exports={languageData:{"plurals":function(n,ord){if(ord)return"other";return n==1?"one":"other"}},messages:{"% of parent":"% del padre","% of total":"% del total","(Events)":"(Eventos)","(Extension)":"(Extensi\xF3n)","(already added to this object)":"(ya se ha a\xF1adido a este objeto)","(already installed)":"(ya est\xE1 instalado)","(auto)":"(autom\xE1tico)","(on the desktop app only)":"(s\xF3lo en la aplicaci\xF3n de escritorio)","(or paste actions)":"(o pegar acciones)","(or paste conditions)":"(o pegar condiciones)","(yet!)":"(\xA1a\xFAn!)","* (multiply by)":"* (multiplicar por)","+ (add)":"+ (a\xF1adir)",", objects /*{parameterObjects}*/":function(a){return[", objetos /*",a("parameterObjects"),"*/"]},"- (subtract)":"- (restar)","/ (divide by)":"/ (dividir entre)","/* Click here to choose objects to pass to JavaScript */":"/* Haz clic aqu\xED para escoger los objetos que pasar a JavaScript */","0,date":"0,fecha","0,date,date0":"0,fecha,fecha0","1st secondary editor":"1er editor secundario","2nd secondary editor":"2\xBA editor secundario","3rd secondary editor":"3er editor secundario","< (less than)":"< ( menor que)","<0>For every child in<1><2/>{0}</1>, store the child in variable<3><4/>{1}</3>, the child name in<5><6/>{2}</5>and do:</0>":function(a){return["<0>Por cada hijo en<1><2/>",a("0"),"</1>, almacene el hijo en la variable<3><4/>",a("1"),"</3>, el nombre del hijo en<5><6/>",a("2"),"</5>y hace:</0>"]},"<Create a New Extension>":"<Crea una Nueva Extension>","<Enter comment>":"<introducir comentario>","<Enter group name>":"<Introducir nombre de grupo>","<Enter the name of external events>":"<Introducir nombre de evento externo>","<Select a variable>":"<Seleccionar una variable>","<Select a variable> (optional)":"<Seleccionar una variable> (opcional)","= (equal to)":"= (igual a)","= (set to)":"= (fijar a)","> (greater than)":"> (mayor que)","A condition that can be used in other events sheet. You can define the condition parameters: objects, texts, numbers, layers, etc...":"Una condici\xF3n que puede ser usada en otras hojas de eventos. Puedes definir los par\xE1metros de la condici\xF3n: objetos, textos, n\xFAmeros, capas, etc...","A condition that can be used on objects with the behavior. You can define the condition parameters: objects, texts, numbers, layers, etc...":"Una condici\xF3n que puede ser usada en objetos con el comportamiento. Puedes definir los par\xE1metos de la condici\xF3n: objetos, textos, n\xFAmeros, capas, etc...","A lighting layer was created. Lights will be placed on it automatically. You can change the ambient light color in the properties of this layer":"Se cre\xF3 una capa de iluminaci\xF3n. Las luces se colocar\xE1n en \xE9l autom\xE1ticamente. Puedes cambiar el color de la luz ambiental en las propiedades de esta capa","A new physics engine (Physics Engine 2.0) is now available. You should prefer using it for new game. For existing games, note that the two behaviors are not compatible, so you should only use one of them with your objects.":"Ahora est\xE1 disponible un nuevo motor de f\xEDsica (Physics Engine 2.0). Deber\xEDas usarlo para crear un juego nuevo. Para los juegos existentes, hay que tener en cuenta que los dos comportamientos no son compatibles, por lo que s\xF3lo se debe usar uno de ellos.","A scale under 1 on a Bitmap text object can downgrade the quality text, prefer to remake a bitmap font smaller in the external bmFont editor.":"Una escala menor a 1 en un objeto de texto de mapa de bits puede degradar la calidad del texto, es preferible rehacer una fuente de mapa de bits m\xE1s peque\xF1a en el editor externo de bmFont.","A temporary image to help you visualize the shape/polygon":"Una imagen temporal para ayudarte a visualizar la figura/pol\xEDgono","APK (for testing on device or sharing outside Google Play)":"APK (para pruebas en el dispositivo o compartir fuera de Google Play)","Abandon":"Abandonar","About GDevelop":"Acerca de GDevelop","Access public profile":"Acceder al perfil p\xFAblico","Action":"Acci\xF3n","Actions":"Acciones","Add":"A\xF1adir","Add New Event Below":"A\xF1adir Nuevo Evento Debajo","Add New External Events":"A\xF1adir eventos externos","Add Other":"A\xF1adir Otro","Add Sub Event":"Agregar Sub-Evento","Add a Long Description":"A\xF1ade una descripci\xF3n larga ","Add a New Extension":"A\xF1adir nueva extensi\xF3n","Add a New External Layout":"A\xF1adir nuevo dise\xF1o externo","Add a New Scene":"Agregar nueva escena","Add a behavior":"A\xF1adir un comportamiento","Add a comment":"A\xF1adir un comentario","Add a layer":"A\xF1adir una capa","Add a new behavior":"A\xF1adir un nuevo comportamiento","Add a new behavior to the object":"A\xF1adir un nuevo comportamiento al objeto","Add a new empty event":"Insertar un nuevo evento vac\xEDo","Add a new event":"Insertar un nuevo evento","Add a new function":"Insertar una nueva funci\xF3n","Add a new group":"A\xF1adir un nuevo grupo","Add a new group...":"A\xF1adir un nuevo grupo...","Add a new object":"A\xF1adir un nuevo objeto","Add a new object...":"A\xF1adir un nuevo objeto...","Add a new option":"A\xF1adir una nueva opci\xF3n","Add a parameter":"A\xF1adir un par\xE1metro","Add a point":"A\xF1adir un punto","Add a property":"A\xF1adir una propiedad","Add a sub-condition":"A\xF1adir una sub-condici\xF3n","Add a sub-event to the selected event":"A\xF1adir un sub-evento al evento seleccionado","Add a vertex":"A\xF1adir un nuevo v\xE9rtice","Add action":"A\xF1adir acci\xF3n","Add an animation":"A\xF1adir una animaci\xF3n","Add an effect":"A\xF1adir un efecto","Add an event":"A\xF1adir un evento","Add an object from the store":"A\xF1adir un objeto de la tienda","Add child variable":"A\xF1adir variable hijo","Add collision mask":"A\xF1adir m\xE1scara de colisi\xF3n","Add condition":"A\xF1adir condici\xF3n","Add instance to the scene":"A\xF1adir instancia a la escena","Add lighting layer":"A\xF1adir capa de iluminaci\xF3n","Add to the game":"A\xF1adir al juego","Add your first animation":"A\xF1ade tu primera animaci\xF3n","Add your first behavior":"A\xF1ade tu primer comportamiento","Add your first effect":"A\xF1ade tu primer efecto","Add your first event":"A\xF1ade tu primer evento","Add your first global variable":"A\xF1ade tu primera variable global","Add your first instance variable":"A\xF1ade tu primera variable de instancia","Add your first object variable":"A\xF1ade tu primera variable de objeto","Add your first scene variable":"A\xF1ade tu primera variable de escena","Add...":"A\xF1adir...","Add/update {0} tag(s)":function(a){return["A\xF1adir/actualizar ",a("0")," etiqueta(s)"]},"Additive rendering":"Renderizado aditivo","Advanced":"Avanzado","Advanced options":"Opciones avanzadas","Advanced preview options (debugger, network preview...)":"Opciones de vista previa avanzadas (depurador, vista previa de red...)","Adventure":"Aventura","All":"Todos","All assets":"Todos los recursos","All behaviors being directly referenced in the events:":"Todos los comportamientos a los que se hace referencia directamente en los eventos:","All current entries will be deleted, are you sure you want to reset this leaderboard? This can't be undone.":"Todas las entradas actuales se borrar\xE1n, \xBFest\xE1s seguro de que quieres reiniciar esta tabla de clasificaci\xF3n? Esto no se puede deshacer.","All entries":"Todas las entradas","All entries are displayed.":"Todas las entradas son mostradas.","All games":"Todos los juegos","All objects potentially used in events: {0}":function(a){return["Todos los objetos potencialmente utilizados en eventos: ",a("0")]},"All tutorials":"Todos los tutoriales","Already have an account?":"\xBFYa tienes una cuenta?","Always display the preview window on top of the editor":"Muestra siempre la ventana de vista previa en la parte superior del editor","Ambient light color":"Color de la luz ambiental","An action that can be used in other events sheet. You can define the action parameters: objects, texts, numbers, layers, etc...":"Una acci\xF3n que puede ser usada en otras hojas de eventos. Puede definir los par\xE1metros de acci\xF3n: objetos, textos, n\xFAmeros, capas, etc...","An action that can be used on objects with the behavior. You can define the action parameters: objects, texts, numbers, layers, etc...":"Una acci\xF3n que puede ser usada en objetos con el comportamiento. Puedes definir los par\xE1metros de la acci\xF3n: objetos, textos, n\xFAmeros, capas, etc...","An autosave file (backup made automatically by GDevelop) that is newer than the project file exists. Would you like to load it instead?":"Existe un archivo de autoguardado (copia de seguridad realizada autom\xE1ticamente por GDevelop) que es m\xE1s reciente que el archivo de proyecto. \xBFDesea cargarlo en su lugar?","An error happened while loading this extension. Please check that it is a proper extension file and compatible with this version of GDevelop":"Se ha producido un error al cargar esta extensi\xF3n. Por favor, compruebe que es un archivo de extensi\xF3n correcto y compatible con esta versi\xF3n de GDevelop","An error has occured during functions generation. If GDevelop is installed, verify that nothing is preventing GDevelop from writing on disk. If you're running GDevelop online, verify your internet connection and refresh functions from the Project Manager.":"Se ha producido un error durante la generaci\xF3n de funciones. Si GDevelop est\xE1 instalado, verifique que no hay nada que impida que GDevelop escriba en el disco. Si est\xE1 ejecutando GDevelop en l\xEDnea, verifique su conexi\xF3n a Internet y actualice las funciones del administrador del proyecto.","An error occurred when creating a new leaderboard, please close the dialog, come back and try again.":"Se ha producido un error al crear una nueva tabla de clasificaci\xF3n, por favor, cierre el cuadro de di\xE1logo, vuelva e int\xE9ntelo de nuevo.","An error occurred when deleting the entry, please try again.":"Se ha producido un error al borrar la entrada, por favor, int\xE9ntelo de nuevo.","An error occurred when deleting the leaderboard, please close the dialog, come back and try again.":"Se ha producido un error al borrar la tabla de clasificaci\xF3n, por favor, cierra el di\xE1logo, vuelve e int\xE9ntalo de nuevo.","An error occurred when fetching the entries of the leaderboard, please try again.":"Se ha producido un error al obtener las entradas de la tabla de clasificaci\xF3n, por favor, int\xE9ntelo de nuevo.","An error occurred when fetching the leaderboards, please close the dialog and reopen it.":"Se ha producido un error al obtener las tablas de clasificaci\xF3n, por favor cierre el di\xE1logo y vuelva a abrirlo.","An error occurred when resetting the leaderboard, please close the dialog, come back and try again.":"Se ha producido un error al restablecer la tabla de clasificaci\xF3n, por favor, cierra el di\xE1logo, vuelve y prueba de nuevo.","An error occurred when retrieving leaderboards, please try again later.":"Se ha producido un error al recuperar las tablas de clasificaci\xF3n, int\xE9ntelo de nuevo m\xE1s tarde.","An error occurred when setting the leaderboard as default, please close the dialog, come back and try again.":"Se ha producido un error al establecer la tabla de clasificaci\xF3n como predeterminada, por favor, cierra el di\xE1logo, vuelve e int\xE9ntalo de nuevo.","An error occurred when updating the appearance of the leaderboard, please close the dialog, come back and try again.":"Se ha producido un error al actualizar la apariencia de la tabla de clasificaci\xF3n, por favor, cierra el di\xE1logo, vuelve y prueba de nuevo.","An error occurred when updating the display choice of the leaderboard, please close the dialog, come back and try again.":"Se ha producido un error al actualizar la opci\xF3n de visualizaci\xF3n de la tabla de clasificaci\xF3n, por favor, cierre el di\xE1logo, vuelva a intentarlo.","An error occurred when updating the name of the leaderboard, please close the dialog, come back and try again.":"Se ha producido un error al actualizar el nombre de la tabla de clasificaci\xF3n, por favor, cierre el di\xE1logo, vuelva e int\xE9ntelo de nuevo.","An error occurred when updating the sort direction of the leaderboard, please close the dialog, come back and try again.":"Se ha producido un error al actualizar el orden de direcci\xF3n de la tabla de clasificaci\xF3n, por favor, cierre el di\xE1logo, vuelva e int\xE9ntelo de nuevo.","An error occurred when updating the visibility of the leaderboard, please close the dialog, come back and try again.":"Se ha producido un error al actualizar la visibilidad de la tabla de clasificaci\xF3n, por favor, cierre el di\xE1logo, vuelva a intentarlo.","An error ocurred while loading examples.":"Ocurri\xF3 un error mientras se cargaban los ejemplos.","An error ocurred while loading showcased games.":"Ocurri\xF3 un error al cargar los juegos exhibidos.","An error ocurred while loading tutorials.":"Ocurri\xF3 un error mientras se cargaban los tutoriales.","An expression that can be used in formulas. Can either return a number or a string, and take some parameters.":"Una expresi\xF3n que puede ser usada en f\xF3rmulas. Puede devolver un n\xFAmero o una cadena, y tomar algunos par\xE1metros.","An expression that can be used on objects with the behavior. Can either return a number or a string, and take some parameters.":"Una expresi\xF3n que puede usarse en objetos con el comportamiento. Puede devolver un n\xFAmero o una cadena, y usar algunos parametros.","An extension with this name already exists in the project. Importing this extension will replace it: are you sure you want to continue?":"Ya existe una extensi\xF3n con este nombre en el proyecto. Al importar esta extensi\xF3n la reemplazar\xE1: \xBFest\xE1 seguro de que desea continuar?","An internet connection is required to administrate your game's leaderboards.":"Se requiere una conexi\xF3n a Internet para administrar las tablas de clasificaci\xF3n del juego.","Analytics":"Anal\xEDticas","Analyze Objects Used in this Event":"Analizar Objetos usados en este evento","And {remainingResultsCount} more results.":function(a){return["Y ",a("remainingResultsCount")," resultados m\xE1s."]},"Android (& iOS coming soon)":"Android (y iOS pr\xF3ximamente)","Android App Bundle (for publishing on Google Play)":"Android App Bundle (ABB) (para publicar en Google Play)","Android Build":"Constructor Android","Android icons:":"Iconos Android:","Angle":"\xC1ngulo","Animation":"Animaci\xF3n","Animation #{i} {0}":function(a){return["Animaci\xF3n #",a("i")," ",a("0")]},"Animations are a sequence of images.":"Las animaciones son una secuencia de im\xE1genes.","Another extension with this name already exists (or you used a reserved extension name). Please choose another name.":"Ya existe otra extensi\xF3n con este nombre (o ha utilizado un nombre de extensi\xF3n reservada). Por favor, elija otro nombre.","Another external layout with this name already exists.":"Ya existe otro dise\xF1o externo con este nombre.","Another scene with this name already exists.":"Ya existe otra escena con este nombre.","Any additional properties will appear here if you add behaviors to objects, like Physics behavior.":"Cualquier propiedad adicional aparecer\xE1 aqu\xED si a\xF1ade comportamientos a objetos, como el comportamiento f\xEDsico.","Any object":"Cualquier objeto","Any unsaved changes in the project will be lost.":"Cualquier cambio no guardado en el proyecto se perder\xE1.","Anyone can access it.":"Cualquiera puede acceder a ella.","Anyone with the link can see it, but it is not listed in your game's leaderboards.":"Cualquiera que tenga el enlace puede verlo, pero no aparece en las tablas de clasificaci\xF3n de su juego.","Appearance":"Apariencia","Apply":"Aplicar","Apply a filter":"Aplicar un filtro","Apply changes":"Aplicar cambios","Apply changes to preview":"Aplicar cambios a la vista previa","Apply changes to the running preview":"Aplicar cambios a la vista previa en ejecuci\xF3n","Apply changes to the running preview, right click for more":"Aplicar cambios a la vista previa, clic derecho para m\xE1s","Are you sure you want to cancel your subscription?":"\xBFSeguro que quieres cancelar tu suscripci\xF3n?","Are you sure you want to delete this entry? This can't be undone.":"\xBFEst\xE1s seguro de que quieres eliminar esta entrada? Esto no se puede deshacer.","Are you sure you want to delete this leaderboard and all of its entries? This can't be undone.":"\xBFEst\xE1s seguro de que quieres eliminar esta tabla de clasificaci\xF3n y todas sus entradas? Esto no se puede deshacer.","Are you sure you want to quit GDevelop?":"\xBFEst\xE1s seguro de que quieres salir de GDevelop?","Are you sure you want to remove these external events? This can't be undone.":"\xBFEst\xE1s seguro de que quieres eliminar estos eventos externos? Esto no se puede deshacer.","Are you sure you want to remove this extension? This can't be undone.":"\xBFEst\xE1s seguro de que quieres eliminar esta extensi\xF3n? Esto no se puede deshacer.","Are you sure you want to remove this external layout? This can't be undone.":"\xBFEst\xE1s seguro de que quieres eliminar este dise\xF1o externo? Esto no se puede deshacer.","Are you sure you want to remove this object? This can't be undone.":"\xBFEst\xE1 seguro de que desea eliminar este objeto? Esto no se puede deshacer.","Are you sure you want to remove this scene? This can't be undone.":"\xBFEst\xE1s seguro de que quieres eliminar esta escena? Esto no se puede deshacer.","Are you sure you want to reset all shortcuts to their default values?":"\xBFEst\xE1 seguro de querer reiniciar todos los ajustes a sus valores por defecto?","Are you sure you want to subscribe to this new plan?":"\xBFSeguro que quieres suscribirte a este nuevo plan?","Array":"Matriz","As a percent of the game width.":"Como un porcentaje del ancho del juego.","Assets (coming soon!)":"Recursos (\xA1pr\xF3ximamente!)","Audio":"Audio","Audio resource":"Recurso de audio","Authors":"Autores","Authors:":"Autor","Auto download and install updates (recommended)":"Descargar e instalar actualizaciones autom\xE1ticamente (recomendado)","Auto-save project on Preview":"Auto-guardar proyecto en vista previa","Automatic creation of lighting layer":"Creaci\xF3n autom\xE1tica de la capa de iluminaci\xF3n","Automatically follow the base layer.":"Seguir autom\xE1ticamente la capa base.","Automatically re-open the project edited during last session":"Volver a abrir autom\xE1ticamente el proyecto editado durante la \xFAltima sesi\xF3n","Back":"Atr\xE1s","Background":"Fondo","Background color":"Color de fondo","Background color:":"Color de fondo:","Background fade in duration (in seconds)":"El fondo se desvanece con duraci\xF3n (en segundos)","Background image":"Imagen de fondo","Base layer":"Capa base","Be careful with this action, you may have problems exiting the preview if you don't add a way to toggle it back.":"Tenga cuidado con esta acci\xF3n, puede tener problemas al salir de la vista previa si no a\xF1ade una forma de cambiarla.","Behavior":"Comportamiento","Behavior (for the previous object)":"Comportamiento (para el objeto anterior)","Behavior functions":"Funciones de comportamiento","Behavior name":"Nombre de comportamiento","Behavior type":"Tipo de comportamiento","Behaviors":"Comportamientos","Behaviors add features to objects in a matter of clicks.":"Los comportamientos a\xF1aden caracter\xEDsticas a los objetos con solo unos clics.","Behaviors of {objectOrGroupName}: {0} ;":function(a){return["Comportamientos de ",a("objectOrGroupName"),": ",a("0"),";"]},"Bio":"Biograf\xEDa","Bitmap Font":"Fuente de mapa de bits","Bitmap font resource":"Recurso de fuente de Bitmap","Bold":"Negrita","Boolean (checkbox)":"Booleano (checkbox)","Bottom margin":"Margen inferior","Box":"Caja","Browse all":"Buscar todos","Browse the documentation":"Navegar por la documentaci\xF3n","Build and download":"Compilar y descargar","Build could not start or errored. Please check your internet connection or try again later.":"La compilaci\xF3n no pudo iniciarse o se produjo un error. Por favor, compruebe su conexi\xF3n a Internet o vuelva a intentarlo m\xE1s tarde.","Build is starting...":"La compilaci\xF3n esta Iniciando...","Build manually":"Crear manualmente","Building":"Construyendo","Builds":"Versi\xF3nes","By creating an account and using GDevelop, you agree to the [Terms and Conditions](https://gdevelop-app.com/legal/terms-and-conditions). Having an account allows you to export your game on Android or as a Desktop app and it unlocks other services for your project!":"Al crear una cuenta y utilizar GDevelop, aceptas los [T\xE9rminos y condiciones] (https://gdevelop-app.com/legal/terms-and-conditions). \xA1Tener una cuenta te permite exportar tu juego en Android o como una aplicaci\xF3n de escritorio y desbloquea otros servicios para tu proyecto!","By:":"Por:","Can't check if the game is registered online.":"No se puede comprobar si el juego est\xE1 registrado en l\xEDnea.","Can't load the example. Verify your internet connection or try again later.":"No se pudo cargar el ejemplo. Verifique su conexi\xF3n a Internet e int\xE9ntelo de nuevo m\xE1s tarde.","Can't load the extension registry. Verify your internet connection or try again later.":"No se puede cargar el registro de extensi\xF3n. Verifica tu conexi\xF3n a Internet o vuelve a intentarlo m\xE1s tarde.","Can't load the games. Verify your internet connection or retry later.":"No se pueden cargar los juegos. Verifique su conexi\xF3n a internet o vuelva a intentarlo m\xE1s tarde.","Can't load the results. Verify your internet connection or retry later.":"No se pueden cargar los resultados. Verifique su conexi\xF3n a internet o vuelva a intentarlo m\xE1s tarde.","Can't properly export the game.":"No se puede exportar el juego correctamente.","Can't upload your game to the build service.":"No se pudo subir tu juego al servicio de compilaci\xF3n.","Cancel":"Cancelar","Cancel and close":"Cancelar y cerrar","Cancel changes":"Cancelar cambios","Cancel your subscription":"Cancele su suscripci\xF3n","Case insensitive":"Caso insensitivo","Categories":"Categor\xEDas","Category (shown in the editor)":"Categor\xEDa (se muestra en el editor)","Cell height (in pixels)":"Altura de la celda (en p\xEDxeles)","Cell width (in pixels)":"Ancho de celda (en p\xEDxeles)","Center":"Centrar","Center View":"Centrar","Change color {propertyName} of _PARAM0_ to _PARAM2_":function(a){return["Cambiar el color ",a("propertyName")," de _PARAM0_ a _PARAM2_"]},"Change editor zoom":"Cambiar el zoom del editor","Change height to fit the screen or window size":"Cambia la altura para ajustarse al tama\xF1o de la pantalla o ventana","Change my email":"Cambiar mi direcci\xF3n de correo electr\xF3nico","Change sort direction":"Cambiar la direcci\xF3n de la clasificaci\xF3n","Change the content of {propertyLabel}":function(a){return["Cambia el contenido de ",a("propertyLabel")]},"Change the value of {propertyLabel}":function(a){return["Cambia el valor de ",a("propertyLabel")]},"Change variable type":"Cambiar el tipo de variable","Change width to fit the screen or window size":"Cambia la anchura para ajustarse al tama\xF1o de la pantalla o ventana","Change your email":"Cambiar tu direcci\xF3n de correo electr\xF3nico","Check that the file exists, that this file is a proper game created with GDevelop and that you have the authorizations to open it.":"Comprueba que el archivo existe, que este archivo es un juego adecuado creado con GDevelop y que tienes las autorizaciones para abrirlo.","Check that the path/URL is correct, that you selected a file that is a game file created with GDevelop and that is was not removed.":"Compruebe que la ruta / URL es correcta, que seleccion\xF3 un archivo que es un archivo de juego creado con GDevelop y que no se elimin\xF3.","Check that you don't have any blocked popup (if so, allow them and retry) and that you have the authorizations for reading the file you're trying to access.":"Comprueba que no tienes ninguna ventana emergente bloqueada (si es as\xED, perm\xEDtelas y vuelve a intentarlo) y que tienes las autorizaciones para leer el archivo al que intentas acceder.","Check the color {propertyLabel}":function(a){return["Comprueba el color ",a("propertyLabel")]},"Check the logs to see if there is an explanation about what went wrong, or try again later.":"Compruebe los registros para ver si hay una explicaci\xF3n sobre lo que sali\xF3 mal, o vuelva a intentarlo m\xE1s tarde.","Check the value of {propertyLabel}":function(a){return["Compruebe el valor de ",a("propertyLabel")]},"Check your inbox and click the link to verify your email address - and come back here when it's done.":"Comprueba tu bandeja de entrada y haz click en el enlace para verificar tu direcci\xF3n de correo - y vuelve aqu\xED cuando termines.","Choose":"Seleccionar","Choose GDevelop language":"Elige el idioma de GDevelop","Choose a category to display filters":"Elija una categor\xEDa para mostrar los filtros","Choose a condition (or an object then a condition) on the left":"Elige una condici\xF3n (o un objeto y luego una condici\xF3n) en la izquierda","Choose a file":"Escoge un archivo","Choose a file or folder":"Elige un archivo o carpeta","Choose a folder for the new game":"Elige una carpeta para el nuevo juego","Choose a font":"Elije una tipograf\xEDa","Choose a function, or a function of a behavior, to edit its events.":"Elija una funci\xF3n, o una funci\xF3n de un comportamiento, para editar sus eventos.","Choose a function, or a function of a behavior, to set the parameters that it accepts.":"Elija una funci\xF3n, o una funci\xF3n de un comportamiento, para editar sus eventos.","Choose a key":"Seleccionar una tecla","Choose a leaderboard":"Elija una tabla de clasificaci\xF3n","Choose a leaderboard (optional)":"Elija una tabla de clasificaci\xF3n (opcional)","Choose a mouse button":"Seleccione un bot\xF3n del rat\xF3n","Choose a new behavior function (\"method\")":"Seleccione una nueva funci\xF3n de comportamiento (\"m\xE9todo\")","Choose a new extension function":"Seleccione una nueva funci\xF3n de extensi\xF3n","Choose a subscription":"Seleccione una suscripci\xF3n","Choose an action (or an object then an action) on the left":"Elige una acci\xF3n (o un objeto despu\xE9s una acci\xF3n) en la izquierda","Choose an animation and frame to edit the collision masks":"Seleccione una animaci\xF3n y un marco para editar las m\xE1scaras de colisi\xF3n","Choose an animation and frame to edit the points":"Seleccione una animaci\xF3n y un marco para editar los puntos","Choose an element to inspect in the list":"Elija un elemento para inspeccionar en la lista","Choose an export folder":"Elija una carpeta para exportar","Choose an icon for the extension":"Elija un icono para la extensi\xF3n","Choose an object":"Seleccione un objeto","Choose an object to add to the group":"Seleccione un objeto para a\xF1adir al grupo","Choose an operator":"Elige un operador","Choose an option":"Elige una opci\xF3n","Choose and add an event":"Elige y agrega un evento","Choose and add an event...":"Seleccione y agregue un evento...","Choose folder":"Seleccione carpeta","Choose from asset store":"Elegir de la tienda de recursos","Choose the associated scene:":"Seleccione la escena asociada:","Choose the audio file to use":"Elija el archivo de audio a usar","Choose the bitmap font file (.fnt, .xml) to use":"Elija el archivo de fuente de mapa de bits (.fnt, .xml) para usar","Choose the effect to apply":"Elige el efecto a aplicar","Choose the font file to use":"Elija el archivo de fuente a usar","Choose the image file to use":"Elija el archivo de imagen que va a utilizar","Choose the json file to use":"Elija el archivo json a usar","Choose the scene":"Seleccione la escena","Choose the upload key to use to identify your Android App Bundle. In most cases you don't need to change this. Use the \"Old upload key\" if you used to publish your game as an APK and you activated Play App Signing before switching to Android App Bundle.":"Elige la clave de subida para identificar tu paquete de aplicaciones Android. En la mayor\xEDa de los casos no necesitas cambiar esto. Usa la \"antigua clave de subida\" si utilizaste para publicar tu juego como APK y activaste Play App Sign antes de cambiar a Android App Bundle.","Choose the video file to use":"Seleccione el archivo de v\xEDdeo a utilizar","Choose this plan":"Seleccione este plan","Choose where to create the game":"Seleccione d\xF3nde crear el juego","Choose where to export the game":"Seleccione d\xF3nde exportar el juego","Choose where to load the project from":"Elija desde d\xF3nde cargar el proyecto","Choose where to save the project to":"Elija d\xF3nde guardar el proyecto","Choose...":"Escoger...","Circle":"C\xEDrculo","Clear the rendered image between each frame":"Elimina la imagen procesada entre cada fotograma","Click here to test the link.":"Haga clic aqu\xED para probar el enlace.","Click on an instance in the scene to display its properties":"Haga clic en una instancia en la escena para mostrar sus propiedades","Click to add a scene":"Haz clic para a\xF1adir una escena","Click to add an external layout":"Haga clic para a\xF1adir una escena externa","Click to add external events":"Haga clic para a\xF1adir eventos externos","Click to add functions and behaviors":"Haga clic para a\xF1adir funciones y comportamientos","Click to choose for which objects this event will be repeated":"Haga clic para elegir para qu\xE9 objetos se repetir\xE1 este evento","Click to choose how many times will be repeated":"Haga clic para elegir cu\xE1ntas veces se repetir\xE1","Click to connect":"Clic para conectar","Close":"Cerrar","Close GDevelop":"Cerrar GDevelop","Close Project":"Cerrar proyecto","Close all":"Cerrar todo","Close and launch a new preview":"Cerrar y lanzar una nueva vista previa","Close others":"Cerrar otros","Close project":"Cerrar proyecto","Close the project? Any changes that have not been saved will be lost.":"\xBFCerrar el proyecto? Cualquier cambio que no se haya guardado se perder\xE1.","Code editor Theme":"Tema del editor de c\xF3digo","Collapse all":"Versiones","Collisions handling with the Physics engine":"Manejo de colisiones con el motor de f\xEDsicas","Color":"Color","Color (text)":"Color (texto)","Color {propertyName}":function(a){return["Color ",a("propertyName")]},"Color:":"Color:","Column title":"T\xEDtulo de la columna","Command palette keyboard shortcut":"Atajo de teclado de paleta de comandos","Community Discord Chat":"Chat de Comunidad Discord","Community Forums":"Foros de la Comunidad","Community forum":"Foro de la comunidad","Compare the content of {propertyLabel}":function(a){return["Comparar el contenido de ",a("propertyLabel")]},"Compare the value of {propertyLabel}":function(a){return["Comparar el valor de ",a("propertyLabel")]},"Compressing before upload...":"Comprimiendo antes de subir...","Condition":"Condici\xF3n","Conditions":"Condiciones","Configuration":"Configuraci\xF3n","Configure the external events":"Configura los eventos externos","Configure the external layout":"Configura el dise\xF1o externo","Confirm the opening":"Confirmar la apertura","Congratulations, your new subscription is now active! nYou can now use the services unlocked with this plan.":"\xA1Felicitaciones, su nueva suscripci\xF3n ahora est\xE1 activa! n Ahora puede usar los servicios desbloqueados con este plan.","Console":"Consola","Consolidated metrics":"M\xE9tricas consolidadas","Continue anyway":"Continuar de todas formas","Contribute to GDevelop":"Contribuir a GDevelop","Contributions":"Contribuciones","Contributors":"Contribuidores","Contributors, in no particular order:":"Contribuidores, en ning\xFAn orden particular:","Convert the variable to a collection before adding children":"Convertir la variable a una colecci\xF3n antes de a\xF1adir hijos","Convert to array":"Convertir a una matriz","Convert to boolean":"Convertir a un booleano","Convert to number":"Convertir a un n\xFAmero","Convert to string":"Convertir a un String","Convert to structure":"Convertir a una estructura","Copied to clipboard!":"\xA1Copiado en el portapapeles!","Copy":"Copiar","Copy File Path":"Copiar ruta de archivo","Cordova":"Cordova","Could not launch the preview":"No se pudo iniciar la vista previa","Create":"Crear","Create Extensions for GDevelop":"Crear extensiones para GDevelop","Create a GDevelop account to continue. It's free and you'll be able to access to online services like one-click builds:":"Cree una cuenta de GDevelop para continuar. Es gratis y podr\xE1 acceder a servicios en l\xEDnea como compilaciones de un solo clic:","Create a New Project...":"Crear un nuevo proyecto...","Create a blank project":"Crear un proyecto en blanco","Create a leaderboard":"Crear una tabla de clasificaci\xF3n","Create a new GDevelop account":"Crea una nueva cuenta de GDevelop","Create a new instance on the scene (will be at position 0;0):":"Crear una nueva instancia en la escena (estar\xE1 en la posici\xF3n 0;0):","Create a new project":"Crear un nuevo proyecto","Create an account or login first to publish your game.":"Crea una cuenta o reg\xEDstrate antes para publicar tu juego.","Create an account to register your games and to get access to metrics collected anonymously, like the number of daily players and retention of the players after a few days.":"Crea una cuenta para registrar tus juegos y obtener acceso a las m\xE9tricas recogidas an\xF3nimamente, como el n\xFAmero de jugadores diarios y la retenci\xF3n de los jugadores despu\xE9s de unos d\xEDas.","Create my account":"Crear mi cuenta","Create project":"Crear proyecto","Create your game's first leaderboard":"Crea la primera tabla de clasificaci\xF3n de tu juego","Create your own behavior":"Crea tus propios comportamientos","Created on {0}":function(a){return["Creado en ",a("0")]},"Currently edited":"Actualmente editado","Custom display":"Pantalla personalizada","Custom size":"Personalizar tama\xF1o","Custom upload key (not available yet)":"Clave de subida personalizada (no disponible todav\xEDa)","Cut":"Cortar","Daily metrics":"M\xE9tricas diarias","Dark (colored)":"Oscuro (colorado)","Dark (plain)":"Oscuro (plano)","Dashboard":"Tablero","Date":"Fecha","Date from which entries are taken into account: {0}":function(a){return["Fecha a partir de la cual se tienen en cuenta las entradas: ",a("0")]},"Day":"Dia","Day {dayIndex} retained players":function(a){return["D\xEDa ",a("dayIndex")," jugadores retenidos"]},"Debugger":"Depurador","Debugger is starting...":"El depurador est\xE1 iniciando...","Default":"Por defecto","Default height (in pixels)":"Altura predeterminada (en p\xEDxeles)","Default value":"Valor predeterminado","Default width (in pixels)":"Ancho predeterminado (en p\xEDxeles)","Delete":"Eliminar","Delete collision mask":"Eliminar la m\xE1scara de colisi\xF3n","Delete option":"Eliminar opci\xF3n","Delete selection":"Borrar selecci\xF3n","Delete the layer":"Eliminar la capa","Delete the selected event(s)":"Eliminar los eventos seleccionados","Delete the selected instances from the scene":"Eliminar las instancias seleccionadas de la escena","Delete the selected resource":"Eliminar el recurso seleccionado","Delete when out of particles":"Eliminar cuando salga de las part\xEDculas","Dependencies":"Dependencias","Dependencies allow to add additional libraries in the exported games. NPM dependencies will be included for Electron builds (Windows, macOS, Linux) and Cordova dependencies will be included for Cordova builds (Android, iOS). Note that this is intended for usage in JavaScript events only. If you are only using standard events, you should not worry about this.":"Las dependencias permiten a\xF1adir bibliotecas adicionales en los juegos exportados. Las dependencias de NPM ser\xE1n incluidas para las versiones de Electron (Windows, macOS, Linux) y Cordova ser\xE1n incluidas para las versiones de Cordova (Android, iOS). Tenga en cuenta que esto s\xF3lo est\xE1 pensado para uso en eventos JavaScript. Si s\xF3lo est\xE1 utilizando eventos est\xE1ndar, no deber\xEDa preocuparse por esto.","Dependency type":"Tipo de Dependencia","Description":"Descripci\xF3n","Description (markdown supported)":"Descripci\xF3n (marcador soportado)","Description, displayed in editor":"Descripci\xF3n, mostrada en el editor","Desktop":"Escritorio","Desktop (Windows, macOS and Linux) icon:":"Icono de escritorio (Windows, macOS y Linux):","Details":"Detalles","Device orientation (for mobile)":"Orientaci\xF3n del dispositivo (para m\xF3vil)","Dialog backdrop click behavior":"Comportamiento de fondo del click","Dialogs":"Di\xE1logos","Different objects":"Objetos diferentes","Direction":"Direcci\xF3n","Direction #{i}":function(a){return["Direcci\xF3n #",a("i")]},"Disable GDevelop splash at startup":"Deshabilitar la pantalla splash de GDevelop al iniciar","Discoverable on Liluo.io":"Desc\xFAbrelo en Liluo.io","Display GDevelop logo at startup (in exported game)":"Mostrar logo de GDevelop al inicio (en juego exportado)","Display What's New when a new version is launched (recommended)":"Mostrar las Novedades cuando se lanza una nueva versi\xF3n (recomendado)","Display as time":"Mostrar como tiempo","Display assignment operators in Events Sheets":"Mostrar operadores de asignaci\xF3n en hojas de eventos","Display object thumbnails in Events Sheets":"Mostrar miniaturas de objetos en las hojas de eventos","Displayed score":"Puntuaci\xF3n mostrada","Do nothing":"No hacer nada","Do you want to remove all references to this object in groups and events (actions and conditions using the object)?":"\xBFDesea eliminar todas las referencias a este objeto en grupos y eventos (acciones y condiciones que utiliza el objeto)?","Don't have an account yet?":"\xBFA\xFAn no tienes una cuenta?","Don't play the animation when the object is far from the camera or hidden (recommended for performance)":"No reproducir la animaci\xF3n cuando el objeto est\xE1 lejos de la c\xE1mara u oculto (recomendado para el rendimiento)","Done":"Hecho","Done!":"\xA1Hecho!","Double click on a condition or action to edit it.":"Haga doble clic en una condici\xF3n o acci\xF3n para editarla.","Double tap a condition or action to edit it. Long press to show more options.":"Toca dos veces una condici\xF3n o acci\xF3n para editarla. Mantenga presionado para mostrar m\xE1s opciones.","Download":"Descargar","Download (APK)":"Descargar (APK)","Download (Android App Bundle)":"Descargar (Android App Bundle)","Download GDevelop desktop version":"Descargar versi\xF3n de escritorio de GDevelop","Download GDevelop desktop version to generate the Android and iOS icons of your game.":"Descarga la versi\xF3n de escritorio de GDevelop para generar los iconos Android y iOS de tu juego.","Download GDevelop to use images from your computer":"Descarga GDevelop para usar im\xE1genes de tu ordenador","Download a copy":"Descargar una copia","Download game file":"Descargar archivo del juego","Download the Instant Game archive":"Descargue el archivo Instant Game","Download the exported game":"Descargar el juego exportado","Download the full desktop version":"Descargar la versi\xF3n completa de GDevelop para la versi\xF3n de escritorio","Downloading game resources...":"Descargando recursos del juego...","Drag and Drop the object icon to the scene or long press to show options to edit the object.":"Arrastre y suelte el icono del objeto a la escena o mantenga presionado para mostrar las opciones para editar el objeto.","Drag and Drop the object to the scene or use the right click menu to add an instance of it.":"Arrastra y suelta el objeto a la escena o usa el men\xFA de clic derecho para a\xF1adir una instancia de ella.","Draw the shapes relative to the object position on the scene":"Dibuja las formas relativas a la posici\xF3n del objeto en la escena","Dropbox (coming soon)":"Dropbox (pr\xF3ximamente)","Duplicate":"Duplicar","Duplicate selection":"Duplicar selecci\xF3n","Duration":"Duraci\xF3n","Dynamic":"Din\xE1mico","Edge":"Borde","Edit":"Editar","Edit Grid Options":"Editar Opciones de Cuadr\xEDcula","Edit Layer Properties":"Editar propiedades de capa","Edit Object Variables":"Editar Variables del Objeto","Edit Scene Properties":"Editar propiedades de la escena","Edit Scene Variables":"Editar variables de la escena","Edit behavior properties":"Editar las propiedades de la capa","Edit behaviors":"Editar comportamientos","Edit behaviors ({eventsBasedBehaviorsCount})":function(a){return["Editar comportamientos (",a("eventsBasedBehaviorsCount"),")"]},"Edit collision masks":"Editar m\xE1scara de colisi\xF3n","Edit effects":"Editar efectos","Edit effects ({effectsCount})":function(a){return["Editar efectos (",a("effectsCount"),")"]},"Edit extension options":"Editar opciones de extensi\xF3n","Edit functions (not attached to behaviors) ({eventsFunctionsCount})":function(a){return["Funciones de edici\xF3n (no asociadas a comportamientos) (",a("eventsFunctionsCount"),")"]},"Edit game details":"Editar detalles del juego","Edit global variables":"Modificar las variables globales","Edit group":"Editar grupo","Edit layer effects...":"Editar efectos de capa...","Edit layer...":"Editar capa...","Edit lighting properties":"Editar propiedades de iluminaci\xF3n","Edit loading screen":"Editar pantalla de carga","Edit my profile":"Edici\xF3n de Mi Perfil","Edit object":"Editar objeto","Edit object behaviors...":"Editar comportamientos de objeto...","Edit object effects...":"Editar efectos de objeto...","Edit object group...":"Editar grupo del objeto...","Edit object variables":"Editar variables de objeto","Edit object variables...":"Editar variables del objeto...","Edit object {0}":function(a){return["Editar objeto ",a("0")]},"Edit object...":"Modificar objeto...","Edit points":"Editar puntos","Edit properties":"Editar propiedades","Edit scene variables":"Editar variables de escena","Edit shortcut":"Editar acceso directo","Edit the behavior":"Editar el comportamiento","Edit the event text":"Editar el texto del evento","Edit your GDevelop profile":"Edita tu perfil de GDevelop","Edit your profile to pick a username!":"\xA1Edita tu perfil para escoger un nombre de usuario!","Editor without transitions":"Editor sin transiciones","Effect name:":"Nombre del efecto:","Effects":"Efectos","Effects create visual changes to the object.":"Los efectos crean cambios visuales en el objeto.","Email":"Email","Email sent!":"\xA1E-Mail enviado!","Embedded help and tutorials":"Ayuda y tutoriales incrustados","End opacity (0-255)":"Opacidad final (0-255)","Enter the effect name":"Ingrese el nombre del efecto","Enter the expression parameters":"Introduzca los par\xE1metros de la expresi\xF3n","Enter the leaderboard id as a text or an expression":"Introduzca el id de la tabla de clasificaci\xF3n como un texto o una expresi\xF3n","Enter the name of an object.":"Introduzca el nombre de un objeto.","Enter the name of the object":"Introduce el nombre del objeto","Enter the parameter name (mandatory)":"Ingrese el nombre del par\xE1metro (obligatorio)","Enter the property name":"Introduzca el nombre de la propiedad","Enter the sentence that will be displayed in the events sheet":"Introduzca la frase que se mostrar\xE1 en la hoja de eventos","Enter the text to be displayed":"Introduzca el atributo a ser mostrado","Enter the text to be displayed by the object":"Introduzca el texto a mostrar por el objeto","Error retrieving the examples":"Error al recuperar los ejemplos","Error retrieving the extensions":"Error al recuperar las extensiones","Error while loading the asset. Verify your internet connection or try again later.":"Error al cargar el activo. Verifique su conexi\xF3n a Internet o int\xE9ntelo de nuevo m\xE1s tarde.","Escape key behavior when editing an parameter inline":"Comportamiento de la tecla de escape al editar un par\xE1metro en l\xEDnea","Events":"Eventos","Events Sheet":"Hoja de eventos","Events define the rules of a game.":"Los eventos definen las reglas de un juego.","Events that will be run at every frame (roughly 60 times per second), after the events from the events sheet of the scene.":"Eventos que se ejecutar\xE1n en cada fotograma (aproximadamente 60 veces por segundo), despu\xE9s de los eventos de la hoja de eventos de la escena.","Events that will be run at every frame (roughly 60 times per second), before the events from the events sheet of the scene.":"Eventos que se ejecutar\xE1n en cada fotograma (aproximadamente 60 veces por segundo), antes de los eventos de la hoja de eventos de la escena.","Events that will be run at every frame (roughly 60 times per second), for every object that has the behavior attached, after the events from the events sheet.":"Eventos que se ejecutar\xE1n en cada fotograma (aproximadamente 60 veces por segundo), para cada objeto que tenga el comportamiento adjunto, despu\xE9s de los eventos de la hoja de eventos.","Events that will be run at every frame (roughly 60 times per second), for every object that has the behavior attached, before the events from the events sheet are launched.":"Eventos que se ejecutar\xE1n en cada fotograma (aproximadamente 60 veces por segundo), para cada objeto que tenga el comportamiento adjunto, despu\xE9s de los eventos de la hoja de eventos.","Events that will be run once when a scene is about to be unloaded from memory. The previous scene that was paused will be resumed after this.":"Eventos que se ejecutar\xE1n una vez cuando una escena est\xE1 a punto de ser descargada de la memoria. La escena anterior que se paus\xF3 se reanudar\xE1 despu\xE9s de esto.","Events that will be run once when a scene is paused (another scene is run on top of it).":"Eventos que se ejecutar\xE1n una vez que se pausa una escena (otra escena se ejecuta encima de ella).","Events that will be run once when a scene is resumed (after it was previously paused).":"Eventos que se ejecutar\xE1n una vez que se reanude una escena (despu\xE9s de que se haya pausado previamente).","Events that will be run once when a scene of the game is loaded, before the scene events.":"Eventos que se ejecutar\xE1n una vez cuando se carga una escena del juego, antes de los eventos de la escena.","Events that will be run once when the behavior is deactivated on an object (step events won't be run until the behavior is activated again).":"Eventos que se ejecutar\xE1n una vez que el comportamiento est\xE9 desactivado en un objeto (los eventos del paso no se ejecutar\xE1n hasta que el comportamiento se active de nuevo).","Events that will be run once when the behavior is re-activated on an object (after it was previously deactivated).":"Eventos que se ejecutar\xE1n una vez que el comportamiento sea reactivado en un objeto (despu\xE9s de que fue desactivado previamente).","Events that will be run once when the first scene of the game is loaded, before any other events.":"Eventos que se ejecutar\xE1n una vez que se cargue la primera escena del juego, antes de cualquier otro evento.","Events that will be run once, after the object is removed from the scene and before it is entirely removed from memory.":"Eventos que se ejecutar\xE1n una vez, despu\xE9s de que el objeto se elimine de la escena y antes de que se elimine completamente de la memoria.","Events that will be run once, when an object is created with this behavior being attached to it.":"Eventos que se ejecutar\xE1n una vez, cuando se crea un objeto con este comportamiento que se adjunta a \xE9l.","Ex: $":"Ej: $","Ex: coins":"Ej: monedas","Example: Check if the object is flashing.":"Ejemplo: compruebe si el objeto est\xE1 parpadeando.","Example: Equipped shield name":"Ejemplo: nombre de escudo equipado","Example: Flash the object":"Ejemplo: flashear el objeto","Example: Is flashing?":"Ejemplo: \xBFparpadea?","Example: Life remaining":"Ejemplo: vida restante","Example: Life remaining for the player.":"Ejemplo: vida restante para el jugador.","Example: Make the object flash for 5 seconds.":"Ejemplo: haga que el objeto parpadee durante 5 segundos.","Example: Name of the shield equipped by the player.":"Ejemplo: Nombre del escudo equipado por el jugador.","Examples":"Ejemplos","Examples ({0})":function(a){return["Ejemplos (",a("0"),")"]},"Examples:":"Ejemplos:","Exit GDevelop":"Salir de GDevelop","Expand all to level":"Expandir todo al nivel","Explanation after an object is installed from the store":"Explicaci\xF3n despu\xE9s de que un objeto se instala desde la tienda","Export":"Exportar","Export (web, iOS, Android)...":"Exportar (web, iOS, Android)...","Export and publish on other platforms":"Exportar y publicar en otras plataformas","Export as a HTML5 game":"Exportar como juego HTML5","Export extension":"Exportar extensi\xF3n","Export game":"Exportar juego","Export in progress...":"Exportar en progreso...","Export name":"Exportar nombre","Export the game (Web, Android, iOS...)":"Exportar el juego (Web, Android, iOS...)","Export to a file":"Exportar a un archivo","Export to other platforms":"Exportar a otras plataformas","Export your game to mobile, desktop and web platforms.":"Exporta tu juego a plataformas m\xF3viles, de escritorio y sitios web.","Expression":"Expresi\xF3n","Extension (storing the function)":"Extensi\xF3n (almacenando la funci\xF3n)","Extensions ({0})":function(a){return["Extensiones (",a("0"),")"]},"Extensions can provide functions (which can be actions, conditions or expressions) or new behaviors.":"Las extensiones pueden proporcionar funciones (que pueden ser acciones, condiciones o expresiones) o nuevos comportamientos.","External events":"Eventos externos","External layouts":"Dise\xF1os externos","Extract Events to a Function":"Extraer eventos a una funci\xF3n","Extract the events in a function":"Extraer los eventos en una funci\xF3n","FPS:":"FPS:","Facebook Instant Games":"Juegos instant\xE1neos de Facebook","False":"Falso","False (not checked)":"Falso (no marcado)","File":"Archivo","Fill color":"Color de relleno","Fill opacity (0-255)":"Opacidad de relleno (0-255)","Filter the logs by group":"Filtra los registros por grupo","Filters":"Filtros","First editor":"Primer editor","Flow of particles (particles/seconds)":"Flujo de part\xEDculas (part\xEDculas/segundos)","Font":"Fuente","Font resource":"Recurso Fuente","Font:":"Fuente:","For a given video resource, only one video will be played in memory and displayed. If you put this object multiple times on the scene, all the instances will be displaying the exact same video (with the same timing and paused/played/stopped state).":"Para un recurso de v\xEDdeo dado, s\xF3lo un v\xEDdeo se reproducir\xE1 en memoria y se mostrar\xE1. Si se pone este objeto varias veces en la escena, todas las instancias mostrar\xE1n el mismo v\xEDdeo (con el mismo tiempo y estado pausado/reproducido/parado).","For a pixel type font, you must disable the Smooth checkbox related to your texture in the game resources to disable anti-aliasing.":"Para una fuente de tipo p\xEDxel, debe desactivar la casilla de verificaci\xF3n de suavizado relacionada con su textura en los recursos del juego para desactivar el aliasing.","For example: player, spaceship, inventory...":"Por ejemplo: jugador, nave espacial, inventario...","For the lifecycle functions to be executed, you need the extension to be used in the game, either by having at least one action, condition or expression used, or a behavior of the extension added to an object. Otherwise, the extension won't be included in the game.":"Para que las funciones del ciclo de vida sean ejecutadas, necesitas que la extensi\xF3n sea usada en el juego, ya sea teniendo al menos una acci\xF3n, condici\xF3n o expresi\xF3n utilizada, o un comportamiento de la extensi\xF3n a\xF1adido a un objeto. De lo contrario, la extensi\xF3n no se incluir\xE1 en el juego.","Frame":"Frame","Frame #{i}":function(a){return["Marco # ",a("i")]},"Free":"Gratis","Full name displayed in editor":"Nombre completo mostrado en el editor","Function Configuration":"Configuraci\xF3n de funciones","Function name":"Nombre de la funci\xF3n","Function type":"Tipo de funci\xF3n","Functions":"Funciones","Functions/Behaviors":"Funciones/comportamientos","GDevelop 5":"GDevelop 5","GDevelop Website":"Sitio web GDevelop","GDevelop logo style":"Estilo del logo de GDevelop","GDevelop on Discord":"GDevelop en Discord","GDevelop on Facebook":"GDevelop en Facebook","GDevelop on Reddit":"GDevelop en Reddit","GDevelop on Twitter":"GDevelop en Twitter","GDevelop was created by Florian \"4ian\" Rival.":"GDevelop fue creado por Florian \"4ian\" Rival.","GDevelop was upgraded to a new version! Check out the changes.":"GDevelop fue actualizado a una nueva versi\xF3n! Echa un vistazo a los cambios.","GDevelop website":"Sitio web de GDevelop","GDevelop {0} based on GDevelop.js {1}":function(a){return["GDevelop ",a("0")," basado en GDevelop.js ",a("1")]},"Game Info":"Informaci\xF3n del juego","Game description":"Descripci\xF3n del juego","Game export":"Exportar juego","Game info":"Informaci\xF3n del juego","Game name":"Nombre del Juego","Game name in the game URL":"Nombre del juego en la URL del juego","Game preview #{id}":function(a){return["Vista previa del juego # ",a("id")]},"Game resolution height":"Altura de la resoluci\xF3n del juego","Game resolution resize mode (fullscreen or window)":"Modo de redimensionamiento de resoluci\xF3n del juego (pantalla completa o ventana)","Game resolution width":"Anchura de la resoluci\xF3n del juego","Game settings":"Configuraci\xF3n del juego","Games Dashboard":"Panel de juegos","Games made by the community":"Juegos hechos por la comunidad","Games showcase":"C\xE1talogo de juegos","General":"General","General:":"General:","Generate a unique link, playable from any computer or mobile phone's browser.":"Genera un enlace \xFAnico para compartir tu juego, jugable desde el navegador de cualquier ordenador o tel\xE9fono m\xF3vil.","Generate icons from a file":"Generar iconos de un archivo","Generate link":"Crear enlace","Genres":"G\xE9neros","Genres:":"G\xE9neros:","Get a subscription":"Obtener una suscripci\xF3n","Get a subscription or login":"Obtener una suscripci\xF3n o iniciar sesi\xF3n","Get a subscription to gain more one-click exports, remove the GDevelop splashscreen and messages asking you to get a subscription. With a subscription, you're also supporting the development of GDevelop, which is an open-source software maintained by volunteers in their free time.":"Obt\xE9n una suscripci\xF3n para obtener m\xE1s exportaciones con un solo clic, elimina la pantalla de carga (splashscreen) de GDevelop y mensajes pidiendo que obtengas una suscripci\xF3n. Con una suscripci\xF3n, tambi\xE9n est\xE1 apoyando el desarrollo de GDevelop, que es un software de c\xF3digo abierto mantenido por voluntarios en su tiempo libre.","Get a subscription to gain more one-click exports, remove the GDevelop splashscreen, this message asking you to get a subscription.":"Obt\xE9n una suscripci\xF3n para obtener m\xE1s exportaciones de un solo clic, elimina la pantalla de inicio o carga (splashscreen) de GDevelop y este mensaje que te pide que obtengas una suscripci\xF3n.","Get game stats":"Obtener estad\xEDsticas","Get stats about your game every week!":"\xA1Obt\xE9n estad\xEDsticas de tu juego todas las semanas!","Global Variables":"Variables globales","Global variable":"Variable global","Global variables":"Variables globales","Go to first page":"Ir a la primera p\xE1gina","Google Drive":"Google Drive","Google Drive could not be loaded. Check that you are not offline and have a proper internet connection, then try again.":"No se pudo cargar Google Drive. Comprueba que no est\xE1s fuera de l\xEDnea y que tienes una conexi\xF3n a Internet adecuada, y vuelve a intentarlo.","Google Drive folder or existing file to overwrite":"Carpeta de Google Drive o archivo existente para sobrescribir","Got it":"Entiendo","Gravity on particles on X axis":"Gravedad en part\xEDculas en el eje X","Gravity on particles on Y axis":"Gravedad en part\xEDculas en el eje Y","Group name":"Nombre de grupo","Group: {0}":function(a){return["Grupo: ",a("0")]},"Height":"Altura","Help":"Ayuda","Help and documentation":"Ayuda y documentaci\xF3n","Help for this action":"Ayuda para esta acci\xF3n","Help for this condition":"Ayuda para esta condici\xF3n","Help page URL":"URL de p\xE1gina de ayuda","Help to Translate GDevelop":"Ayuda a traducir GDevelop","Help to translate GD in your language":"Ayuda a traducir GD en tu idioma","Help!":"\xA1Ayuda!","Hidden":"Oculto","Hide":"Ocultar","Hide details":"Oculta detalles","Hide layer":"Oculta una capa","Hide lifecycle functions (advanced)":"Ocultar funciones de ciclo de vida (avanzado)","Hide other lifecycle functions (advanced)":"Ocultar otras funciones de ciclo de vida (avanzado)","Hide the layer":"Oculta la capa","Hide the leaderboard":"Ocultar la tabla de clasificaci\xF3n","Hide the menu bar in the preview window":"Oculta la barra de men\xFA en la ventana de vista previa","Higher is better":"M\xE1s alto es mejor\xA1","Horror":"Terror","How to edit instructions":"Como editar instrucciones","I forgot my password":"Olvid\xE9 mi contrase\xF1a","I want to receive weekly stats about my games":"Quiero recibir estad\xEDsticas semanales sobre mis juegos","IDE":"IDE","Icon URL":"URL de icono","Icons and thumbnail":"Iconos y miniaturas","Ideal for advanced game makers":"Ideal para creadores de juegos avanzados","Ideal for beginners":"Ideal para principiantes","If no previous condition or action used the specified object(s), the picked instances count will be 0.":"Si no hay condici\xF3n o acci\xF3n previas empleadas el(los) objeto(s) especificados, el contador de instancias escogidas ser\xE1 0.","If the parameter is a string or a number, you probably want to use the expressions \"GetArgumentAsString\" or \"GetArgumentAsNumber\", along with the conditions \"Compare two strings\" or \"Compare two numbers\".":"Si el par\xE1metro es una cadena o un n\xFAmero, probablemente desee utilizar las expresiones \"GetArgumentAsString\" o \"GetArgumentAsNumber\", junto con las condiciones \"Comparar dos cadenas\" o \"Comparar dos n\xFAmeros\".","If you close this window while the build is being done, you can see its progress and download the game later by clicking on See All My Builds below.":"Si cierra esta ventana mientras se est\xE1 haciendo la construcci\xF3n, puede ver su progreso y descargar el juego m\xE1s tarde haciendo clic en Ver Todos mis edificios a continuaci\xF3n.","If you don't have a subscription, consider getting one now. Accounts allow you to access all of the online services. With just one click, you can build your game for Android, Windows, macOS and Linux!":"Si no tienes una suscripci\xF3n, considera obtener una ahora. Las cuentas te permiten acceder a todos los servicios en l\xEDnea. Con un solo clic, puedes construir tu juego para Android, Windows, macOS y Linux!","If you have a popup blocker interrupting the opening, allow the popups and try a second time to open the project.":"Si tiene un bloqueador de ventanas emergentes que interrumpe la apertura, permita las ventanas emergentes e intente abrir el proyecto por segunda vez.","Image":"Imagen","Image resource":"Recurso de imagen","Immerse your players by removing GDevelop logo when the game loads":"Sumerge a tus jugadores eliminando el logotipo de GDevelop cuando se carga el juego","Immerse your players by removing GDevelop logo when the game loads.":"Sumerge a tus jugadores eliminando el logotipo de GDevelop cuando se carga el juego.","Import extension":"Importar extensi\xF3n","In order to see your objects in the scene, you need to add an action \"Create objects from external layout\" in your events sheet.":"Para poder ver tus objetos en la escena, necesitas agregar una acci\xF3n \"Crea objetos a partir de dise\xF1o externo\" en tu hoja de eventos.","In order to update these details you have to open the game's project.":"Para actualizar estos detalles tienes que abrir el proyecto del juego","In order to use these external events, you still need to add a \"Link\" event in the events sheet of the corresponding scene":"Para utilizar estos eventos externos, todav\xEDa necesitas a\xF1adir un evento \"Enlace\" en la hoja de eventos de la escena correspondiente","In pixels. 0 to ignore.":"En p\xEDxeles. 0 para ignorar.","Include events from":"Incluir eventos de","Initial text to display":"Texto inicial para mostrar","Insert new...":"Insertar nuevo...","Inspectors":"Inspectores","Install in project":"Instalar en el proyecto","Installed Behaviors":"Comportamientos instalados","Instance":"Instancia","Instance Variables":"Variables de instancia","Instance variables overwrite the default values of the variables of the object.":"Las variables de instancia sobreescriben los valores por defecto de las variables del objeto.","Instance variables:":"Variables de instancia:","Instances list":"Lista de instancias","Instances panel is already opened. You can search instances in the scene and click one to move the view to it.":"El panel de instancias ya est\xE1 abierto. Puedes buscar instancias en la escena y hacer clic en una para mover la vista a ella.","Instant":"Instant\xE1neo","Instant Games":"Juegos instant\xE1neos","Instant or permanent force":"Fuerza instant\xE1nea o permanente","Internal Name":"Nombre Interno","Invert Condition":"Invertir condici\xF3n","Invert condition":"Invertir condici\xF3n","Isometric":"Isom\xE9trico","It is recommended to use your own custom broker server. Read the wiki page for more info.":"Se recomienda utilizar su propio servidor broker personalizado. Lea la wiki para m\xE1s informaci\xF3n.","It looks like the build has timed out, please try again.":"Parece que la versi\xF3n ha expirado, int\xE9ntalo de nuevo.","It looks like your email is not verified. Click on the link received by email to verify your account. Didn't receive it?":"Parece que tu correo electr\xF3nico no ha sido verificado. Haz click en el enlace recibido en tu correo electr\xF3nico para verificar tu cuenta. \xBFNo has recibido el correo?","It seems you entered a name with a quote. Variable names should not be quoted.":"Parece que has introducido un nombre entre comillas. No se deben citar los nombres de las variables.","Italic":"Cursiva","JSON resource":"Recursos JSON","Json":"Json","Just a few seconds while we generate the link...":"S\xF3lo unos segundos mientras generamos el enlace...","Keyboard Key (text)":"Teclear algo (texto)","Keyboard Shortcuts":"Atajos de teclado","Keyboard key":"Tecla del teclado","Kinematic":"Cinem\xE1tico","Label":"Etiqueta","Label, shown in the editor":"Etiqueta, mostrada en el editor","Landscape":"Modo horizontal","Language":"Idioma","Last run collected on {0} frames.":function(a){return["\xDAltima ejecuci\xF3n recolectada en ",a("0")," fotogramas."]},"Last week sessions count":"N\xFAmero de sesiones de la semana pasada","Last year sessions count":"N\xFAmero de sesiones del a\xF1o pasado","Launch a preview of the external layout inside the scene, right click for more":"Lanzar una vista previa del dise\xF1o externo dentro de la escena, haga clic derecho para m\xE1s","Launch a preview of the scene, right click for more":"Lanza una vista previa de la escena, haz clic derecho para m\xE1s","Launch another preview in a new window":"Iniciar otra vista previa en una nueva ventana","Launch network preview over WiFi/LAN":"Iniciar vista previa de red a trav\xE9s de una conexi\xF3n WiFi/LAN","Launch new preview":"Iniciar la vista previa","Launch preview with debugger and profiler":"Iniciar vista previa con el depurador y el perfilador","Launch the preview":"Iniciar la vista previa","Layer":"Capa","Layer (text)":"Capa (texto)","Layer effect name":"Nombre de efecto de capa","Layer effect parameter name":"Nombre de par\xE1metro de efecto de capa","Layers":"Capas","Layers panel is already opened. You can add new layers and apply effects on them from this panel.":"El panel de capas ya est\xE1 abierto. Puede a\xF1adir nuevas capas y aplicar efectos en ellas desde este panel.","Layers:":"Capas:","Layouts":"Layouts","Leaderboard":"Tabla de Clasificaci\xF3n","Leaderboard appearance":"Apariencia de la tabla de clasificaci\xF3n","Leaderboard name":"Nombre de la tabla de clasificaci\xF3n","Leaderboards":"Tablas de clasificaci\xF3n","Leaderboards help retain your players":"Las tablas de clasificaci\xF3n ayudan a retener a los jugadores","Learn game making":"Aprende a crear juegos","Learn more":"Aprende m\xE1s","Learn more about Instant Games publication":"Aprende m\xE1s sobre la publicaci\xF3n de Juegos Instant\xE1neos","Learn more about publishing":"Aprende mas acerca de la publicaci\xF3n","Leave it empty to use the default group for this extension.":"D\xE9jalo vac\xEDo para usar el grupo predeterminado para esta extensi\xF3n.","Leave it empty to use the default group.":"D\xE9jalo vac\xEDo para usar el grupo predeterminado.","Left (primary)":"Izquierda (primario)","Left margin":"Margen Izquierdo","Let the user select":"Permitir que el usuario seleccione","Let's go!":"\xA1Vamos!","Level {0}":function(a){return["Nivel ",a("0")]},"License: <0>{0}</0>":function(a){return["Licencia: <0>",a("0"),"</0>"]},"Lifecycle functions (advanced)":"Funciones de ciclo de vida (avanzado)","Lifecycle functions only included when extension used":"Las funciones de ciclo de vida s\xF3lo se incluyen cuando se utiliza la extensi\xF3n","Lifecycle methods":"M\xE9todos de ciclo de vida","Light (colored)":"Luz (colorado)","Light (plain)":"Luz (llano)","Light object automatically put in lighting layer":"El objeto claro se pone autom\xE1ticamente en la capa de iluminaci\xF3n","Lighting settings":"Ajustes de iluminaci\xF3n","Liluo.io thumbnail:":"Miniatura Liluo.io:","Line":"L\xEDnea","Line color":"Color de l\xEDnea","Linear (antialiased rendering, good for most games)":"Lineal (renderizado con antialiasing, ideal para la mayor\xEDa de juegos)","Lines length":"Longitud de l\xEDneas","Lines thickness":"Grosor de l\xEDneas","Links can't be used outside of a scene.":"Los enlaces no se pueden usar fuera de una escena.","Linux (AppImage)":"Linux (AppImage)","Live preview (apply changes to the running preview)":"Actual vista previa (aplicar cambios a la vista previa en ejecuci\xF3n)","Loading Screen":"Pantalla de carga","Loading...":"Cargando...","Local file system":"Sistema de archivos local","Locate File":"Encontrar archivo","Lock position/angle in the editor":"Bloquear posici\xF3n/\xE1ngulo en el editor","Login":"Iniciar sesi\xF3n","Login to your GDevelop account":"Inicie sesi\xF3n en su cuenta de GDevelop","Logo":"Logo","Logo and progress fade in delay (in seconds)":"Logo y progreso se desvanecen, en retraso (en segundos)","Logo and progress fade in duration (in seconds)":"Logo y progreso se desvanecen, en duraci\xF3n (en segundos)","Logout":"Cerrar sesi\xF3n","Long description":"Descripci\xF3n larga","Loop":"Bucle","Lower is better":"M\xE1s bajo es mejor","Make private":"Hacer privado","Make public":"Hacer p\xFAblico","Make sure to verify all your events creating objects, and optionally add an action to set the Z order back to 0 if it's important for your game. Do you want to continue (recommened)?":"Aseg\xFArese de verificar todos sus eventos creando objetos, y opcionalmente a\xF1adir una acci\xF3n para ajustar el orden Z a 0 si es importante para tu juego. \xBFQuiere continuar (asumido)?","Make sure you're online, have a proper internet connection and try again. If you download and use GDevelop desktop application, you can also run previews without any internet connection.":"Aseg\xFArese de estar en l\xEDnea, tener una conexi\xF3n a Internet adecuada e intente nuevamente. Si descarga y usa la aplicaci\xF3n de escritorio GDevelop, tambi\xE9n puede ejecutar vistas previas sin conexi\xF3n a Internet.","Make the leaderboard public":"Hacer p\xFAblica la tabla de clasificaci\xF3n","Make your game discoverable on Liluo.io":"Haz que tu juego se pueda encontrar en Liluo.io","Manage game":"Gestionar juego","Maximum FPS (0 for unlimited)":"FPS m\xE1ximo (0 para ilimitado)","Maximum Fps is too low":"Los fps m\xE1ximos son demasiado bajos","Maximum emitter force applied on particles":"Fuerza m\xE1xima de emisi\xF3n aplicada a part\xEDculas","Maximum number of particles displayed":"N\xFAmero m\xE1ximo de part\xEDculas mostradas","Middle (Auxiliary button, usually the wheel button)":"Medio (bot\xF3n Auxiliario, normalmente el bot\xF3n de rueda)","Minimize":"Minimizar","Minimum FPS":"FPS M\xEDnimo","Minimum Fps is too low":"Los Fps m\xEDnimos son demasiado bajos","Minimum duration of the screen (in seconds)":"Duraci\xF3n m\xEDnima de la pantalla (en segundos)","Minimum emitter force applied on particles":"Fuerza m\xEDnima de emisi\xF3n aplicada a part\xEDculas","Missing some contributions? If you are the author, create a Pull Request on the corresponding GitHub repository after adding your username in the authors of the example or the extension - or directly ask the original author to add your username.":"\xBFFaltan algunas contribuciones? Si eres el autor, crea una solicitud de extracci\xF3n en el repositorio de GitHub correspondiente despu\xE9s de agregar tu nombre de usuario en los autores del ejemplo o la extensi\xF3n, o p\xEDdele directamente al autor original que agregue tu nombre de usuario.","Mobile":"M\xF3vil","More examples":"M\xE1s ejemplos","Most browsers will require the user to have interacted with your game before allowing any video to play. Make sure that the player click/touch the screen at the beginning of the game before starting any video.":"La mayor\xEDa de los navegadores requerir\xE1n que el usuario haya interactuado con tu juego antes de permitir que cualquier video se pueda reproducir. Aseg\xFArate de que el jugador haga clic/toque la pantalla al comienzo del juego antes de iniciar cualquier video.","Most monitors have a refresh rate of 60 FPS. Setting a maximum number of FPS under 60 will force the game to skip frames, and the real number of FPS will be way below 60, making the game laggy and impacting the gameplay negatively. Consider putting 60 or more for the maximum number or FPS, or disable it by setting 0.":"La mayor\xEDa de los monitores tienen una tasa de actualizaci\xF3n de 60 FPS. Establecer un n\xFAmero m\xE1ximo de FPS menor de 60 obligar\xE1 al juego a saltar fotogramas, y el n\xFAmero real de FPS ser\xE1 muy inferior a 60, haciendo que el juego funcione lento e impactando negativamente en la jugabilidad. Considere poner 60 o m\xE1s para el n\xFAmero m\xE1ximo de FPS, o desactivarlo poni\xE9ndolo a 0.","Mouse button":"Bot\xF3n del rat\xF3n","Mouse button (text)":"Bot\xF3n del rat\xF3n (texto)","Move Events into a Group":"Mover eventos a un grupo","Move down":"Mover hacia abajo","Move objects":"Mover Objetos","Move objects on layer {0} to:":function(a){return["Mover objetos en la capa ",a("0")," a:"]},"Move up":"Subir","Multiplayer":"Multijugador","Multiple files, saved in folder next to the main file":"M\xFAltiples archivos, guardados en una carpeta junto al archivo principal","Musics will only be played if the user has interacted with the game before (by clicking/touching it or pressing a key on the keyboard). This is due to browser limitations. Make sure to have the user interact with the game before using this action.":"La m\xFAsica s\xF3lo se reproducir\xE1 si el usuario ha interactuado con el juego antes (haciendo clic/tocando o pulsando una tecla en el teclado). Esto se debe a limitaciones del navegador. Aseg\xFArese de que el usuario interact\xFAe con el juego antes de usar esta acci\xF3n.","My Profile":"Mi Perfil","My profile":"Mi perfil","NPM":"NPM","Name":"Nombre","Name displayed in editor":"Nombre mostrado en el editor","Name of the external layout":"Nombre del dise\xF1o -layout- externo","Nearest (no antialiasing, good for pixel perfect games)":"Aumento (sin antialiasing, ideal para los juegos perfectos de p\xEDxeles)","Need more power? You can upgrade to a new plan to increase the limit!":"\xBFNecesitas m\xE1s poder? \xA1Puedes actualizar a un nuevo plan para aumentar el l\xEDmite!","New Project":"Nuevo Proyecto","New color to set":"Nuevo color a definir","New extension name":"Nombre de nueva extensi\xF3n","New file name":"Nuevo nombre de archivo","New object from scratch":"Nuevo objeto desde cero","New players count":"Conteo de jugadores nuevos","New upload key (recommended)":"Nueva clave de subida (recomendado)","New value to set":"Nuevo valor a establecer","Next actions (and sub-events) will wait for this action to be finished before running.":"Las siguientes acciones (y subeventos) esperar\xE1n a que esta acci\xF3n termine antes de ejecutarse.","Next page":"P\xE1gina siguiente","No":"No","No behavior found for your search. Try another search, or search for new behaviors to install.":"No se ha encontrado ning\xFAn comportamiento para su b\xFAsqueda. Intente otra b\xFAsqueda, o busque nuevos comportamientos para instalar.","No bio defined.":"No se ha definido la bio.","No bio defined. Edit your profile to tell us what you are using GDevelop for!":"Tu bio no est\xE1 definida. \xA1Edita tu perfil para contarnos para qu\xE9 usas GDevelop!","No changes to the game size":"No hay cambios en el tama\xF1o del juego","No description set.":"No se ha establecido ninguna descripci\xF3n.","No entries":"No hay registros","No filters in this category.":"No hay filtros en esta categor\xEDa.","No inspector, choose another element in the list or toggle the raw data view.":"Sin inspector, elija otro elemento en la lista o cambie la vista de datos.","No leaderboard chosen":"No se ha elegido una tabla de clasificaci\xF3n","No leaderboards":"No hay tablas de clasificaci\xF3n","No parameters for this function.":"No hay par\xE1metros para esta funci\xF3n.","No preview running. Run a preview and you will be able to inspect it with the debugger":"No hay vista previa en ejecuci\xF3n. Ejecute una vista previa y podr\xE1 inspeccionarla con el depurador","No project opened recently":"Ning\xFAn proyecto abierto recientemente","No properties for this behavior. Add one to store data inside this behavior (for example: health, ammo, speed, etc...)":"No hay propiedades para este comportamiento. Agrega una para almacenar datos dentro de este comportamiento (por ejemplo: salud, munici\xF3n, velocidad, etc...)","No results":"Sin resultados","No results returned for your search. Try something else or typing at least 2 characters.":"No se han encontrado resultados para la b\xFAsqueda. Pruebe otra cosa o escriba al menos 2 caracteres.","No results returned for your search. Try something else, browse the categories or create your object from scratch!":"No hay resultados devueltos para su b\xFAsqueda. \xA1Pruebe otra cosa, navegue por las categor\xEDas o cree su objeto desde cero!","No shortcut":"Sin acceso directo","No tags - add a tag to an object first":"No hay etiquetas - a\xF1adir una etiqueta a un objeto primero","No thanks, I'm good":"No gracias, estoy bien","No thumbnail set":"No hay miniaturas","No username":"No se ha especificado nombre de usuario","Not compatible":"No es compatible","Not now, thanks":"Ahora no, gracias","Not now, thanks!":"\xA1No ahora, gracias!","Not visible":"No visible","Note that the distinction between what is a mobile device and what is not is becoming blurry (with devices like iPad pro and other \"desktop-class\" tablets). If you use this for mobile controls, prefer to check if the device has touchscreen support.":"Tenga en cuenta que la distinci\xF3n entre lo que es un dispositivo m\xF3vil y lo que no se est\xE1 volviendo borrosa (con dispositivos como iPad pro y otras tabletas de \"clase de escritorio\"). Si lo utiliza para los controles m\xF3viles, prefiere comprobar si el dispositivo tiene soporte para pantalla t\xE1ctil.","Note: write _PARAMx_ for parameters, e.g: Flash _PARAM1_ for 5 seconds":"Nota: escriba _PARAMx_ para los par\xE1metros, por ejemplo: Flash _PARAM1_ durante 5 segundos","Nothing corresponding to your search. Choose an object first or browse the list of actions/conditions.":"Nada que corresponda a su b\xFAsqueda. Elija un objeto primero o navegue por la lista de acciones/condiciones.","Nothing corresponding to your search. Try browsing the list instead.":"Nada que corresponda a su b\xFAsqueda. Intente navegar por la lista en su lugar.","Number":"N\xFAmero","Number between 0 and 1":"N\xFAmero entre 0 y 1","Number of entries to display":"N\xFAmero de entradas a mostrar","Number of particles in tank (-1 for infinite)":"N\xFAmero de part\xEDculas en tanque (-1 para infinito)","OK":"OK","Object":"Objeto","Object Groups":"Grupos de objetos","Object Name":"Nombre del objeto","Object Variables":"Variables de objeto","Object animation (text)":"Animaci\xF3n de objeto (texto)","Object animation name":"Nombre de la animaci\xF3n del objeto","Object effect name":"Nombre de efecto de objeto","Object effect parameter name":"Nombre de par\xE1metro de efecto de objeto","Object groups":"Grupos de objetos","Object name":"Nombre del objeto","Object on which this behavior can be used":"Objeto en el que se puede usar este comportamiento","Object point (text)":"Punto del objeto (texto)","Object point name":"Nombre del punto del objeto","Object tags":"Etiquetas de objetos","Object type":"Tipo de objeto","Object variable":"Variable de objeto","Objects":"Objetos","Objects on {0}":function(a){return["Objetos en ",a("0")]},"Objects or groups being directly referenced in the events: {0}":function(a){return["Objetos o grupos referenciados directamente en los eventos: ",a("0")]},"Objects panel is already opened: use it to add and edit objects.":"El panel de objetos ya est\xE1 abierto: \xFAsalo para a\xF1adir y editar objetos.","Ok":"Ok","Old upload key (only if you used to publish your game as an APK and already activated Play App Signing)":"Clave de subida antigua (s\xF3lo si utilizaste para publicar tu juego como APK y ya activaste la firma de la aplicaci\xF3n)","Once you're done, close this dialog and start adding some functions to the behavior. Then, test the behavior by adding it to an object in a scene.":"Una vez que hayas terminado, cierra este di\xE1logo y empieza a a\xF1adir algunas funciones al comportamiento. Despu\xE9s, prueba el comportamiento agregandolo a un objeto en una escena.","Once you're done, come back to GDevelop and your account will be upgraded automatically, unlocking the extra exports and online services.":"Una vez que haya terminado, regrese a GDevelop y su cuenta se actualizar\xE1 autom\xE1ticamente, desbloqueando las exportaciones adicionales y los servicios en l\xEDnea.","One-click packaging for Windows, macOS and Linux up to 10 times a day (every 24 hours).":"Empaquetado en un solo clic para Windows, macOS y Linux hasta 10 veces al d\xEDa (cada 24 horas).","One-click packaging for Windows, macOS and Linux up to 70 times a day (every 24 hours).":"Empaquetado en un solo clic para Windows, macOS y Linux hasta 70 veces al d\xEDa (cada 24 horas).","OneDrive (coming soon)":"OneDrive (pr\xF3ximamente)","Only best entry":"S\xF3lo mejor entrada","Only player's best entries are displayed.":"S\xF3lo se muestran las mejores entradas de los jugadores.","Open":"Abrir","Open Debugger":"Abrir depurador","Open File":"Abrir archivo","Open My Games Dashboard":"Abrir el tablero de Mis Juegos","Open My Profile":"Abrir mi perfil","Open Project Manager":"Abrir administrador de proyectos","Open Recent":"Abrir recientes","Open a project":"Abrir un proyecto","Open advanced settings":"Abrir ajustes avanzados","Open command palette":"Abrir paleta de comandos","Open details":"Abrir detalles","Open extension settings":"Abrir ajustes de extensi\xF3n","Open extension...":"Abrir extensi\xF3n...","Open external events...":"Abrir eventos externos...","Open external layout...":"Abrir escena externa...","Open folder":"Abrir carpeta","Open in a new tab":"Abrir en una nueva pesta\xF1a","Open in browser":"Abrir en el navegador","Open in editor":"Abrir en el editor","Open in the web-app":"Abrir en la versi\xF3n web","Open project":"Abrir proyecto","Open project icons":"Abrir iconos del proyecto","Open project manager":"Abrir gestor de proyecto","Open project properties":"Abrir propiedades del proyecto","Open project resources":"Abrir recursos del proyecto","Open recent project...":"Abrir proyecto reciente...","Open scene events":"Abrir eventos de escena","Open scene properties":"Abrir propiedades de la escena","Open scene variables":"Abrir variables de escena","Open scene...":"Abrir escena...","Open settings":"Configuraci\xF3n abierta","Open the console":"Abre la consola","Open the exported game folder":"Abra la carpeta del juego exportado","Open the layers editor":"Abre el editor de capas","Open the list of instances":"Abrir la lista de instancias","Open the object groups editor":"Abrir el editor de grupos de objetos","Open the objects editor":"Abre el editor de objetos","Open the objects groups editor":"Abra el editor de grupos de objetos","Open the performance profiler":"Abrir el analizador de rendimiento","Open the project":"Abrir proyecto","Open the project folder":"Abra carpeta del proyecto.","Open the properties panel":"Abra el panel de propiedades","Open...":"Abrir...","Operator":"Operador","Optional animation name":"Nombre de animaci\xF3n opcional","Options":"Opciones","Origin":"Origen","Other actions":"Otras acciones","Other conditions":"Otras condiciones","Other external events with this name already exist.":"Ya existen otros eventos externos con este nombre.","Other lifecycle methods":"Otros m\xE9todos de ciclo de vida","Outline color":"Color de contorno","Outline opacity (0-255)":"Opacidad del borde (0-255)","Outline size (in pixels)":"Tama\xF1o del contorno (en p\xEDxeles)","Overriding the ID may have unwanted consequences. Do not use this feature unless you really know what you are doing.":"Sustituir la ID puede tener consecuencias no deseadas. No utilice esta caracter\xEDstica a menos que sepa realmente lo que est\xE1 haciendo.","Owners":"Propietarios","Package":"Paquete","Package name (for iOS and Android)":"Nombre del paquete (para iOS y Android)","Package your game for Android up to 10 times a day (every 24 hours).":"Empaquete su juego para Android hasta 10 veces al d\xEDa (cada 24 horas).","Package your game for Android up to 70 times a day (every 24 hours).":"Empaquete su juego para Android hasta 70 veces al d\xEDa (cada 24 horas).","Packaging":"Embalaje","Packaging for Android":"Empaque para Android","Packaging your game for Android will create an APK file that can be installed on Android phones or an Android App Bundle that can be published to Google Play.":"Empaquetar tu juego para Android crear\xE1 un archivo APK que se puede instalar en tel\xE9fonos Android o en un Android App Bundle que se puede publicar en Google Play.","Parameter #{0}:":function(a){return["Par\xE1metro #",a("0"),":"]},"Parameter name":"Nombre del par\xE1metro","Parameter name in events: `{parameterName}`":function(a){return["Nombre del par\xE1metro en eventos: `",a("parameterName"),"`"]},"Parameters":"Par\xE1metros","Particle end size (in percents)":"Tama\xF1o final de part\xEDculas (en porcentajes)","Particle maximum lifetime (in seconds)":"Tiempo m\xE1ximo de vida de part\xEDcula (en segundos)","Particle maximum rotation speed (degrees/second)":"Velocidad m\xE1xima de rotaci\xF3n de part\xEDculas (grados/segundo)","Particle minimum lifetime (in seconds)":"Duraci\xF3n m\xEDnima de part\xEDcula (en segundos)","Particle minimum rotation speed (degrees/second)":"Velocidad m\xEDnima de rotaci\xF3n de part\xEDculas (grados/segundo)","Particle start size (in percents)":"Tama\xF1o de inicio de part\xEDculas (en porcentajes)","Particle type":"Tipo de part\xEDculas","Particles end color":"Color final de part\xEDculas","Particles start color":"Color de inicio de part\xEDculas","Particles start height":"Altura de inicio de part\xEDculas","Particles start width":"Ancho de inicio de part\xEDculas","Password":"Contrase\xF1a","Paste":"Pegar","Paste action(s)":"Pegar acci\xF3n(es)","Paste and Match Style":"Pegar con el mismo estilo","Paste condition(s)":"Pegar condici\xF3n(es)","Pause the game":"Pausar el juego","Pause the game (from the toolbar) or hit refresh (on the left) to inspect the game":"Pausa el juego (desde la barra de herramientas) o presiona actualizar (a la izquierda) para inspeccionar el juego","Peer to peer broker server recommendation":"Recomendaci\xF3n del servidor de broker de pares","Permanent":"Permanente","Platform default":"Plataforma por defecto","Platformer":"Plataformas","Play":"Jugar","Play on Liluo.io":"Jugar en Liluo.io","Play or download":"Reproducir o descargar","Play the game":"Juega al juego","Playable on mobile":"Jugable en el m\xF3vil","Playable with a gamepad":"Jugable con un gamepad","Playable with a keyboard":"Jugable con un teclado","Player":"Jugador","Player best entry":"Mejor entrada del jugador","Players count":"N\xFAmero de jugadores","Please check your internet connection or try again later.":"Verifique su conexi\xF3n a Internet o vuelva a intentarlo m\xE1s tarde.","Please double check online the changes to make sure that you are aware of anything new in this version that would require you to adapt your project.":"Verifique en l\xEDnea los cambios para asegurarse de estar al tanto de cualquier novedad en esta versi\xF3n que requiera que adapte su proyecto.","Please enter a name for your project.":"Por favor, introduce un nombre para tu proyecto.","Please enter a name that is at least one character long and 50 at most.":"Por favor, Ingrese un nombre que tenga al menos un car\xE1cter y 50 como m\xE1ximo.","Please get a subscription to keep GDevelop running.":"Por favor, obt\xE9n una suscripci\xF3n para mantener GDevelop funcionando.","Please log out and log in again to verify your identify, then change your email.":"Por favor, cierre sesi\xF3n y vuelva a iniciar sesi\xF3n para verificar su identificaci\xF3n, y luego cambie su correo electr\xF3nico.","Please note that your device should be connected on the same network as this computer.":"Por favor tenga en cuenta que su dispositivo debe estar conectado en la misma red que este ordenador.","Please prefer using the new action \"Enforce camera boundaries\" which is more flexible.":"Por favor, prefiera utilizar la nueva acci\xF3n \"Reforzar los l\xEDmites de la c\xE1mara\", que es m\xE1s flexible.","Please wait...":"Por favor espere...","Point name":"Nombre del punto","Polygon":"Pol\xEDgono","Polygon is not convex!":"\xA1El pol\xEDgono no es convexo!","Portrait":"Vertical","Position":"Posici\xF3n","Preferences":"Preferencias","Prefix":"Prefijo","Prepare your game for Facebook Instant Games so that it can be play on Facebook Messenger. GDevelop will create a compressed file that you can upload on your Facebook Developer account.":"Prepare su juego para Facebook Instant Games para que pueda jugarse en Facebook Messenger. GDevelop crear\xE1 un archivo comprimido que puede cargar en su cuenta de desarrollador de Facebook.","Press a shortcut combination...":"Presione una combinaci\xF3n de accesos directos...","Preview":"Vista previa","Preview is overridden, right click for more":"Vista previa anulada, clic derecho para m\xE1s","Preview over wifi":"Vista previa sobre wifi","Previous page":"P\xE1gina anterior","Profiler":"Perfiles","Progress bar":"Barra de progreso","Progress bar color":"Color de la barra de progreso","Progress bar height":"Altura de la barra de progreso","Progress bar maximum width":"Ancho m\xE1ximo de la barra de progreso","Progress bar minimum width":"Ancho m\xEDnimo de la barra de progreso","Progress bar width":"Ancho de la barra de progreso","Project":"Proyecto","Project file type":"Tipo de archivo del proyecto","Project files":"Archivos del proyecto","Project icons":"Iconos del proyecto","Project manager":"Gestor de proyecto","Project name":"Nombre del proyecto","Project package names should not begin with com.example":"Los nombres de los paquetes del proyecto no deben empezar por com.example","Project properly saved":"Proyecto guardado correctamente","Properties":"Propiedades","Properties panel is already opened. After selecting a resource, inspect and change its properties from this panel.":"El panel de propiedades est\xE1 abierto. Despu\xE9s de seleccionar un recurso, inspeccione y cambie sus propiedades desde este panel.","Properties panel is already opened. After selecting an instance on the scene, inspect and change its properties from this panel.":"El panel de propiedades ya est\xE1 abierto. Despu\xE9s de seleccionar una instancia en la escena, inspeccione y cambie sus propiedades desde este panel.","Property {propertyName} of _PARAM0_ is true":function(a){return["La propiedad ",a("propertyName")," de _PARAM0_ es verdadera"]},"Public":"P\xFAblica","Publish":"Publicar","Publish and share with friends on Liluo.io":"Publicar y compartir con amigos en Liluo.io","Publish this build on Liluo.io":"Publicar esta versi\xF3n en Liluo.io","Publish without saving project":"Publicar sin guardar el proyecto","Publish your game":"Publicar tu juego","Publish your game on CrazyGames.com":"Publica tu juego en CrazyGames.com","Publish your game on Game Jolt":"Publica tu juego en Game Jolt","Publish your game on Itch.io":"Publica tu juego en Itch.io","Publish your game on Kongregate":"Publica tu juego en Kongregate","Publish your game on Poki.com":"Publica tu juego en Poki.com","Published Games Dashboard":"Panel de Juegos Publicado","Published on Liluo.io":"Publicado en Liluo.io","Publisher name":"Nombre de editor","Puzzle":"Rompecabezas puzzle","RPG":"RPG","Racing":"Carreras","Radius of the emitter":"Radio del emisor","Re-install":"Reinstalar","Read the doc":"Leer la documentaci\xF3n","Read the tutorial":"Leer el tutorial","Read the wiki page for more info about the dataloss mode.":"Lea la p\xE1gina wiki para m\xE1s informaci\xF3n sobre el modo de dataloss.","Redo":"Rehacer","Redo the last changes":"Rehacer los \xFAltimos cambios","Refine your search with more specific keyword to see them.":"Acota tu b\xFAsqueda con una palabra clave m\xE1s espec\xEDfica para verlas.","Refresh":"Actualizar","Register the project":"Registrar el proyecto","Relational operator":"Operador de relaciones","Remove Resources with Invalid Path":"Eliminar recursos con ruta no v\xE1lida","Remove all tags":"Eliminar todas las etiquetas","Remove objects":"Eliminar objetos","Remove shortcut":"Eliminar acceso directo","Remove the Long Description":"Eliminar la descripci\xF3n larga","Remove unused...":"Eliminar los no usados...","Rename":"Renombrar","Repeat borders and center textures (instead of stretching them)":"Repetir bordes y texturas del centro (en lugar de estirar)","Repeat for each instance of {objectName}:":function(a){return["Repetir para cada instancia de ",a("objectName"),":"]},"Repeat these:":"Repita estos:","Repeat {expression} times:":function(a){return["Repetir ",a("expression")," veces:"]},"Replace":"Reemplazar","Replay":"Reproducir","Report a wrong translation":"Reportar una traducci\xF3n err\xF3nea","Report the issue on GitHub":"Reportar el problema en GitHub","Required behavior":"Comportamiento requerido","Reset":"Restablecer","Reset Debugger layout":"Restablecer dise\xF1o del depurador","Reset Extension Editor layout":"Restablecer dise\xF1o del editor de extensiones","Reset Resource Editor layout":"Restablecer dise\xF1o del editor de recursos","Reset Scene Editor (small window) layout":"Restablecer dise\xF1o del editor de escenas (ventana peque\xF1a)","Reset Scene Editor layout":"Restablecer dise\xF1o del editor de escena","Reset all shortcuts to default":"\xBFRestablecer los valores por defecto","Reset hidden embedded explanations":"Restablecer explicaciones ocultas incrustadas","Reset hidden embedded tutorials":"Restablecer tutoriales incrustados ocultos","Reset leaderboard":"Restablecer tabla de clasificaci\xF3n","Reset to default":"Volver a valores predefinidos","Reset your password":"Restablece tu contrase\xF1a","Resolution and rendering":"Resoluci\xF3n y renderizado.","Resource URL":"URL del recurso","Resource(s) URL(s) (one per line)":"URL(s) de recurso(s) (uno por l\xEDnea)","Resources":"Recursos","Resources are automatically added to your project whenever you add an image, a font or a video to an object or when you choose an audio file in events. Choose a resource to display its properties.":"Los recursos se agregan autom\xE1ticamente a su proyecto cada vez que a\xF1ada una imagen, una fuente o un video a un objeto o cuando elija un archivo de audio en eventos. Elija un recurso para mostrar sus propiedades.","Resources needed for the project are downloaded...":"Se han descargado los recursos necesarios para el proyecto...","Restart":"Reiniciar","Restarting the preview from scratch is required":"Es necesario reiniciar la vista previa desde cero","Restore original size":"Restaurar tama\xF1o original","Restore the default collision mask":"Restaurar la m\xE1scara de colisi\xF3n predeterminada","Retry":"Reintentar","Right (secondary)":"Derecho (secundario)","Right margin":"Margen derecho","Round pixels when rendering, useful for pixel perfect games.":"Redondea p\xEDxeles al renderizar, \xFAtil para juegos perfectos de pixel.","Round to X decimal point":"Redondear a X decimales","Run a preview":"Ejecutar una vista previa","Run a preview (with loading screen)":"Ejecutar una vista previa (con pantalla de carga)","Run a preview and you will be able to inspect it with the debugger.":"Ejecuta una vista previa y podr\xE1s inspeccionarla con el depurador.","Run on this computer":"Ejecutar en este equipo","Save":"Guardar","Save as...":"Guardar como...","Save on Google Drive":"Guardar en Google Drive","Save project":"Guardar proyecto","Save project and publish":"Guardar proyecto y publicar","Save project as...":"Guardar proyecto como...","Saving...":"Guardando...","Scale mode (also called \"Sampling\")":"Modo de escala (tambi\xE9n llamado \"muestreo\")","Scan in the project folder for...":"Escanear en la carpeta del proyecto para...","Scene":"Escena","Scene Variables":"Variables de la escena","Scene background color":"Color de fondo de escena","Scene name":"Nombre de escena","Scene name (text)":"Nombre de escena (texto)","Scene properties":"Propiedades de la escena","Scene variable":"Variable de escena","Scenes":"Escenas","Score":"Puntuaci\xF3n","Score column settings":"Ajustes de la columna de puntuaci\xF3n","Score display":"Visualizaci\xF3n de la puntuaci\xF3n","Search":"Buscar","Search Asset Store":"Buscar tienda de activos","Search New Behaviors":"Buscar nuevos comportamientos","Search and replace in parameters":"Buscar y reemplazar en par\xE1metros","Search for New Extensions":"Buscar nuevas extensiones","Search for new actions in extensions":"Buscar nuevas acciones en extensiones","Search for new conditions in extensions":"Buscar nuevas condiciones en extensiones","Search for new extensions":"Buscar nuevas extensiones","Search in event sentences":"Buscar en sentencias de evento","Search in events":"Buscar en eventos","Search in:":"Buscar en:","Search on the documentation.":"Buscar en la documentaci\xF3n.","Search {searchPlaceholderObjectName} actions":function(a){return["Buscar comportamientos de ",a("searchPlaceholderObjetName")]},"Search {searchPlaceholderObjectName} conditions":function(a){return["Buscar condiciones de ",a("searchPlaceholderObjectName")]},"Search/import extensions":"Buscar/importar extensiones","Section name":"Nombre de la secci\xF3n","See all the releases notes":"Ver todas las notas de publicaci\xF3n","See logs":"Ver registros","See the releases notes online":"Ver las notas de publicaci\xF3n en l\xEDnea","See this game builds":"Ver versi\xF3nes del juego","Select All":"Seleccionar todo","Select a behavior to display the functions inside this behavior.":"Seleccione un comportamiento para mostrar las funciones dentro de este comportamiento.","Select a genre":"Seleccione un g\xE9nero","Select an image":"Seleccione una imagen","Select log groups to display":"Selecciona grupos de registro a mostrar","Select the leaderboard from a list":"Seleccione la tabla de clasificaci\xF3n de una lista","Select the usernames of the authors of this project. They will be displayed in the selected order, if you publish this game as an example or in the community.":"Seleccione los nombres de usuario de los autores de este proyecto. Se mostrar\xE1n en el orden seleccionado, si publicas este juego como ejemplo o en la comunidad.","Select the usernames of the contributors to this extension. They will be displayed in the order selected. Do not see your name? Go to the Profile section and create an account!":"Selecciona los nombres de usuario de los contribuyentes a esta extensi\xF3n. Ser\xE1n mostrados en el orden seleccionado. \xBFNo ves tu nombre? \xA1Ve a la secci\xF3n de perfil y crea una cuenta!","Select the usernames of the owners of this project to let them manage this game builds. Be aware that owners can revoke your ownership.":"Seleccione los nombres de usuario de los propietarios de este proyecto para permitirles administrar las compilaciones de este juego. Tenga en cuenta que los propietarios pueden revocar su propiedad.","Select up to 4 genres for the game to be visible on Liluo.io's categories pages!":"\xA1Selecciona hasta 4 g\xE9neros para que el juego sea visible en las p\xE1ginas de categor\xEDas de Liluo.io!","Send it again":"Enviar de nuevo","Sentence in Events Sheet":"Frase en la hoja de eventos","Service seems to be unavailable, please try again later.":"El servicio no parece estar disponible, vuelva a intertarlo m\xE1s tarde.","Sessions count":"N\xFAmero de sesiones","Set as default":"Establecer como predeterminado","Set as global group":"Establecer como grupo global","Set as global object":"Establecer como objeto global","Set as start scene":"Establecer como escena inicial","Set property {propertyName} of _PARAM0_ to _PARAM2_":function(a){return["Establecer propiedad ",a("propertyName")," de _PARAM0_ a _PARAM2_"]},"Set shortcut":"Establecer acceso directo","Setting the minimum number of FPS below 20 will increase a lot the time that is allowed between the simulation of two frames of the game. If case of a sudden slowdown, or on slow computers, this can create buggy behaviors like objects passing beyond a wall. Consider setting 20 as the minimum FPS.":"Establecer el n\xFAmero m\xEDnimo de FPS por debajo de 20 aumentar\xE1 mucho el tiempo que se permite entre dos fotogramas simultaneos del juego. En este caso se produce una desaceleraci\xF3n repentina, o en computadoras lentas, esto puede crear comportamientos err\xE1tico como objetos que pasan m\xE1s all\xE1 de una pared. Considere establecer 20 como el FPS m\xEDnimo.","Settings":"Ajustes","Setup grid":"Configurar cuadr\xEDcula","Share":"Comparte","Share same collision masks for all animations":"Comparte las mismas m\xE1scaras de colisi\xF3n para todas las animaciones","Share same collision masks for all sprites of this animation":"Comparte las mismas m\xE1scaras de colisi\xF3n para todos los sprites de esta animaci\xF3n","Share same points for all animations":"Compartir los mismos puntos para todas las animaciones","Share same points for all sprites of this animation":"Comparte los mismos puntos para todos los sprites de esta animaci\xF3n","Share your game":"Comparte tu juego","Shooter":"Tirador-Shooter","Short description":"Descripci\xF3n corta","Should finish soon.":"Deber\xEDa terminar pronto.","Show Home":"Mostrar inicio","Show Mask":"Mostrar m\xE1scara","Show Parameter Names":"Mostrar nombres de par\xE1metros","Show Project Manager":"Mostrar administrador de proyectos","Show deprecated (old) behaviors":"Mostrar comportamientos obsoletos (antiguos)","Show details":"Muestra detalles","Show grid":"Mostrar cuadr\xEDcula","Show internal":"Muestra el interno","Show layer":"Muestra capa","Show lifecycle functions (advanced)":"Mostrar funciones de ciclo de vida (avanzado)","Show other lifecycle functions (advanced)":"Mostrar otra funci\xF3n de ciclo de vida (avanzado)","Show progress bar":"Mostrar barra de progreso","Showcase":"Mostrar caso","Showing {0} of {resultsCount}":function(a){return["Mostrando ",a("0")," de ",a("resultsCount")]},"Signing options":"Opciones de firma","Simulation":"Simulaci\xF3n","Single file (default)":"Archivo \xFAnico (por defecto)","Size":"Tama\xF1o","Size:":"Tama\xF1o:","Something wrong happened :(":"Ha ocurrido un Error :(","Speech":"Discurso","Sport":"Deporte","Spray cone angle (in degrees)":"\xC1ngulo de cono de Spray (en grados)","Start Network Preview (Preview over WiFi/LAN)":"Iniciar vista previa de red (vista previa a trav\xE9s de WiFi/LAN)","Start Preview with Debugger and Performance Profiler":"Iniciar vista previa con el Depurador y el Perfilador de Rendimiento","Start all previews from external layout {0}":function(a){return["Comenzar todas las vistas previas desde el dise\xF1o externo ",a("0")]},"Start all previews from scene {0}":function(a){return["Iniciar todas las vistas previas desde la escena ",a("0")]},"Start from an example":"Empezar desde un ejemplo","Start opacity (0-255)":"Opacidad de inicio (0-255)","Start profiling":"Iniciar perfil","Start profiling and then stop it after a few seconds to see the results.":"Empieza a perfilar y luego detenerlo despu\xE9s de unos segundos para ver los resultados.","Start typing a command...":"Comienza a escribir un comando...","Start typing a username":"Comienza escribiendo un nombre de usuario","Static":"Est\xE1tico","Stop music and sounds on startup":"Detener m\xFAsica y sonidos al iniciar","Stop profiling":"Detener perfil","Story-Rich":"Historia","Strategy":"Estrategia","String":"Cadena","String (text)":"Cadena (texto)","String Expression":"Expresi\xF3n de cadena","String from a list of options (text)":"Cadena de una lista de opciones (texto)","Structure":"Estructura","Submit extension to the community":"Enviar extensi\xF3n a la comunidad","Submit your game to the showcase":"Enviar tu juego al cat\xE1logo","Submit your project as an example":"Sube tu proyecto como ejemplo","Subscriptions can be stopped at any time. GDevelop uses Stripe.com for secure payment. No credit card data is stored by GDevelop: everything is managed by Stripe secure infrastructure.":"Las suscripciones se pueden detener en cualquier momento. GDevelop utiliza Stripe.com para el pago seguro. No hay datos de tarjeta de cr\xE9dito almacenados por GDevelop: todo est\xE1 gestionado por la infraestructura segura de Stripe.","Suffix":"Sufijo","Suggest names of variables used in events but not declared in the list of variables":"Sugerir nombres de variables usadas en eventos pero no declaradas en la lista de variables","Supported files":"Archivos admitidos","Survival":"Supervivencia","Switch to create objects with the highest Z order of the layer":"Cambia para crear objetos con el orden Z m\xE1s alto de la capa","Table settings":"Configuraci\xF3n de la tabla","Tags":"Etiquetas","Tags (comma separated)":"Etiquetas (separadas por comas)","Take a quick tour?":"\xBFRealizar una visita guiada r\xE1pida?","Test value":"Valor de la prueba","Test value (in second)":"Valor de la prueba (en segundos)","Text color:":"Color del texto:","Text in the format R;G;B, like 100;200;180":"Texto en el formato R;G;B, como 100;200;180","Text to replace in parameters":"Texto para reemplazar en par\xE1metros","Text to search in event sentences":"Texto a buscar en sentencias de evento","Text to search in parameters":"Texto para buscar en parametros","Texts":"Textos","Thanks for getting a subscription and supporting GDevelop!":"\xA1Gracias por obtener una suscripci\xF3n y apoyar a GDevelop!","Thanks to all users of GDevelop! There must be missing tons of people, please send your name if you've contributed and you're not listed.":"\xA1Gracias a todos los usuarios de GDevelop! Debe haber toneladas de personas perdidas, por favor env\xEDe tu nombre si has contribuido y no est\xE1s listado.","Thanks!":"\xA1Gracias!","That's a lot of unsuccessful login attempts! Wait a bit before trying again or reset your password.":"\n\xA1Hay muchos intentos de inicio de sesi\xF3n fallidos! Espere un poco antes de volver a intentarlo o restablecer su contrase\xF1a.","The URLs must be public and stay accessible while you work on this project - they won't be stored inside the project file. When exporting a game, the resources pointed by these URLs will be downloaded and stored inside the game.":"Las URLs deben ser p\xFAblicas y mantenerse accesibles mientras trabajas en este proyecto - no ser\xE1n almacenadas dentro del archivo del proyecto. Al exportar un juego, los recursos se\xF1alados por estas URLs se descargar\xE1n y almacenar\xE1n dentro del juego.","The behavior is not attached to this object. Please select another object or add this behavior.":"El comportamiento no est\xE1 asignado a este objeto. Por favor, seleccione otro objeto o agregue este comportamiento.","The behavior was added to the project. You can now add it to your object.":"El comportamiento fue a\xF1adido al proyecto. Ahora puedes a\xF1adirlo a tu objeto.","The bounding box is an imaginary rectangle surrounding the object collision mask. Even if the object X and Y positions are not changed, this rectangle can change if the object is rotated or if an animation is being played. Usually you should use actions and conditions related to the object position or center, but the bounding box can be useful to deal with the area of the object.":"La casilla delimitadora es un rect\xE1ngulo imaginario alrededor de la m\xE1scara de colisi\xF3n de objetos. Incluso si las posiciones X e Y del objeto no son cambiadas, este rect\xE1ngulo puede cambiar si el objeto est\xE1 rotado o si se est\xE1 reproduciendo una animaci\xF3n. Normalmente se deben usar acciones y condiciones relacionadas con la posici\xF3n o centro del objeto pero la caja de l\xEDmites puede ser \xFAtil para tratar con el \xE1rea del objeto.","The description of the behavior should explain what the behavior is doing to the object, and, briefly, how to use it.":"La descripci\xF3n del comportamiento debe explicar lo que el comportamiento est\xE1 haciendo al objeto y, brevemente, c\xF3mo usarlo.","The extension was added to the project. You can now use it in the list of actions/conditions and, if it's a behavior, in the list of behaviors for an object.":"La extensi\xF3n fue a\xF1adida al proyecto. Ahora puede usarlo en la lista de acciones/condiciones y, si es un comportamiento, en la lista de comportamientos de un objeto.","The font size is stored directly inside the font. If you want to change it, export again your font using an external editor like bmFont. Click on the help button to learn more.":"El tama\xF1o de la fuente se almacena directamente dentro de la fuente. Si desea cambiarlo, exporte de nuevo su fuente utilizando un editor externo como bmFont. Haga clic en el bot\xF3n de ayuda para obtener m\xE1s informaci\xF3n.","The force will only push the object during the time of one frame. Typically used in an event with no conditions or with conditions that stay valid for a certain amount of time.":"La fuerza s\xF3lo presionar\xE1 el objeto durante el tiempo de un fotograma. Normalmente utilizado en un evento sin condiciones o con condiciones que permanezcan v\xE1lidas por una cierta cantidad de tiempo.","The force will push the object forever, unless you use the action \"Stop the object\". Typically used in an event with conditions that are only true once, or with a \"Trigger Once\" condition.":"La fuerza empujar\xE1 el objeto para siempre, a menos que utilice la acci\xF3n \"Detener el objeto\". Normalmente utilizado en un evento con condiciones que s\xF3lo son verdaderas una vez, o con una condici\xF3n \"Trigger Once\".","The game was properly exported. You can now use Electron Builder (you need Node.js installed and to use the command-line on your computer to run it) to create an executable.":"El juego fue exportado correctamente. Ahora puedes usar Electron Builder (necesitas Node.js instalado y usar la linea de comandos en tu computador para ejecutarlo) para crear un ejecutable.","The light object was automatically placed on the Lighting layer.":"El objeto de luz se coloc\xF3 autom\xE1ticamente en la capa de iluminaci\xF3n.","The lighting layer renders an ambient light on the scene. All lights should be placed on this layer so that shadows are properly rendered. By default, the layer follows the base layer camera. Uncheck this if you want to manually move the camera using events.":"La capa de iluminaci\xF3n renderiza una luz ambiental en la escena. Todas las luces deben colocarse en esta capa para que las sombras est\xE9n correctamente renderizadas. De forma predeterminada, la capa sigue la c\xE1mara de la capa base. Desmarque esto si desea mover la c\xE1mara manualmente usando eventos.","The name of a parameter can not be empty. Enter a name for the parameter or you won't be able to use it.":"El nombre de un par\xE1metro no puede estar vac\xEDo. Introduzca un nombre para el par\xE1metro o no podr\xE1 utilizarlo.","The name of a property cannot be \"name\" or \"type\", as they are used by GDevelop internally.":"El nombre de una propiedad no puede ser \"name\" o \"type\", ya que son utilizados internamente por GDevelop.","The name of a property cannot be empty.":"El nombre de una propiedad no puede estar vac\xEDo.","The number of decimal places must be a whole value between {precisionMinValue} and {precisionMaxValue}":function(a){return["El n\xFAmero de decimales debe ser un valor entero entre ",a("precisionMinValue")," y ",a("precisionMaxValue")]},"The number of displayed entries must be a whole value between {displayedEntriesMinNumber} and {displayedEntriesMaxNumber}":function(a){return["El n\xFAmero de entradas mostradas debe ser un valor entero entre ",a("displayedEntriesMinNumber")," y ",a("displayedEntriesMaxNumber")]},"The object does not exist or can't be used here.":"El objeto no existe o no puede ser usado aqu\xED.","The object was added to the list of objects. You can now use it on the scene, in events, and customize it.":"El objeto fue a\xF1adido a la lista de objetos. Ahora puede usarlo en la escena, en eventos, y personalizarlo.","The package name begins with com.example, make sure you replace it with an unique one to be able to publish your game on app stores.":"El nombre del paquete comienza con com.example, aseg\xFArate de reemplazarlo con uno \xFAnico para poder publicar tu juego en tiendas de aplicaciones.","The package name begins with com.example, make sure you replace it with an unique one, else installing your game might overwrite other games.":"El nombre del paquete comienza con com.example, aseg\xFArese de reemplazarlo con uno \xFAnico, de lo contrario la instalaci\xF3n de su juego podr\xEDa sobreescribir otros juegos.","The package name is containing invalid characters or not following the convention \"xxx.yyy.zzz\" (numbers allowed after a letter only).":"El nombre del paquete contiene caracteres no v\xE1lidos o no sigue la convenci\xF3n \"xxx.yy.zzz\" (los n\xFAmeros solo est\xE1n permitidos despu\xE9s de una letra).","The password is invalid.":"La contrase\xF1a es inv\xE1lida.","The polygon is not convex. Ensure it is, otherwise the collision mask won't work.":"El pol\xEDgono no es convexo. Aseg\xFArate de que lo es, de lo contrario la m\xE1scara de colisi\xF3n no funcionar\xE1.","The preview could not be launched because an error happened: {0}.":function(a){return["La vista previa no se pudo lanzar porque ha ocurrido un error: ",a("0"),"."]},"The preview could not be launched because you're offline.":"La vista previa no pudo ser lanzada porque estas offline.","The project file appears to be malformed, but an autosave file exists (backup made automatically by GDevelop). Would you like to try to load it instead?":"El archivo del proyecto parece estar corrupto, pero existe un archivo autosave (copia de seguridad hecha autom\xE1ticamente por GDevelop). Desea intentar cargarlo en su lugar?","The sentence is probably missing this/these parameter(s):":"La sentencia carece probablemente de este/os par\xE1metro(s):","The shape used in the Physics behavior is independent from the collision mask of the object. Be sure to use the \"Collision\" condition provided by the Physics behavior in the events. The usual \"Collision\" condition won't take into account the shape that you've set up here.":"La forma utilizada en el comportamiento de f\xEDsica es independiente de la m\xE1scara de colisi\xF3n del objeto. Aseg\xFArese de utilizar la condici\xF3n de \"Colisi\xF3n\" proporcionada por el comportamiento de f\xEDsica en los eventos. La condici\xF3n de \"Colisi\xF3n\" no tendr\xE1 en cuenta la forma que ha configurado aqu\xED.","The specified external events do not exist in the game. Be sure that the name is correctly spelled or create them using the project manager.":"Los eventos externos especificados no existen en el juego. Aseg\xFArese de que el nombre est\xE1 correctamente escrito o creelos usando el administrador del proyecto.","The text input will be always shown on top of all other objects in the game - this is a limitation that can't be changed. According to the platform/device or browser running the game, the appearance can also slightly change.":"La entrada de texto se mostrar\xE1 siempre encima de todos los dem\xE1s objetos del juego - esta es una limitaci\xF3n que no se puede cambiar. Seg\xFAn la plataforma/dispositivo o navegador que ejecuta el juego, la apariencia tambi\xE9n puede cambiar ligeramente.","The tilemap must be designed in a separated program, Tiled, that can be downloaded on mapeditor.org. Save your map as a JSON file, then select here the Atlas image that you used and the Tile map JSON file.":"El mapa de losetas debe dise\xF1arse en un programa separado, llamado Tiled, que se puede descargar en mapeditor.org. Guarde el mapa como un archivo JSON, luego seleccione aqu\xED la imagen atlas que utiliz\xF3 y el archivo JSON del mapa de losetas.","The usage of a number or expression is deprecated. Please now use only \"Permanent\" or \"Instant\" for configuring forces.":"El uso de un n\xFAmero o expresi\xF3n est\xE1 obsoleto. Por favor, utilice s\xF3lo \"Permanente\" o \"Instante\" para configurar fuerzas.","The user was disabled.":"El usuario fue desactivado.","The variable name contains a space - this is not recommended. Prefer to use underscores or uppercase letters to separate words.":"El nombre de la variable contiene un espacio - esto no es recomendable. Es preferible usar guiones bajos o letras may\xFAsculas para separar palabras.","The variable name looks like you're building an expression or a formula. You can only use this for structure or arrays. For example: Score[3].":"El nombre de la variable parece estar construyendo una expresi\xF3n o una f\xF3rmula. Solo puede usar esto para estructuras o matrices-arrays. Por ejemplo: puntuaci\xF3n[3].","There are currently no leaderboards created for this game. Open the leaderboards manager to create one.":"Actualmente, no hay tablas de clasificaci\xF3n creadas para este juego. Abre el gestor de tablas de clasificaci\xF3n para crear una.","There are no objects. Objects will appear if you add some as parameters.":"No hay objetos. Los objetos aparecer\xE1n si a\xF1ade algunos como par\xE1metros.","There is no object in your game or in this scene. Start by adding an new object in the scene editor, using the objects list.":"No hay ning\xFAn objeto en tu juego o en esta escena. Empieza a\xF1adiendo un nuevo objeto en el editor de escena, usando la lista de objetos.","There is nothing to configure for this behavior. You can still use events to interact with the object and this behavior.":"No hay nada que configurar para este comportamiento. Todav\xEDa puedes usar eventos para interactuar con el objeto y este comportamiento.","There is nothing to configure for this object. You can still use events to interact with the object.":"No hay nada que configurar para este objeto. A\xFAn puede usar eventos para interactuar con el objeto.","There is nothing to configure.":"No hay nada que configurar.","There was an error updating your game. Verify that your internet connection is working or try again later.":"Se ha producido un error al actualizar el juego. Comprueba que tu conexi\xF3n a Internet funciona o int\xE9ntalo m\xE1s tarde.","There was an error verifying the URL(s). Please check they are correct.":"Hubo un error al verificar las URL(s). Por favor, compruebe que son correctas.","There was an error while making an auto-save of the project. Verify that you have permissions to write in the project folder.":"Se ha producido un error al crear un guardado autom\xE1tico del proyecto. Verifique que tiene permisos para escribir en la carpeta del proyecto.","There was an issue getting the game analytics.":"Hubo un problema al obtener el an\xE1lisis del juego.","There was an issue getting the game details.":"Hubo un problema al obtener los detalles del juego","There were errors when fetching resources for the project.":"Hubo errores al buscar recursos para el proyecto.","There were no players or stored metrics for this day. Be sure to publish your game and get players to try it to see the collected anonymous analytics.":"No hab\xEDa jugadores ni m\xE9tricas almacenadas para este d\xEDa. Aseg\xFArate de publicar tu juego y conseguir que los jugadores lo prueben para ver los an\xE1lisis an\xF3nimos recogidos.","These variables hold additional information on a project.":"Estas variables contienen informaci\xF3n adicional sobre un proyecto.","These variables hold additional information on a scene.":"Estas variables contienen informaci\xF3n adicional sobre una escena.","These variables hold additional information on an object.":"Estas variables contienen informaci\xF3n adicional sobre un objeto.","Third editor":"Tercer editor","This action is deprecated and should not be used anymore. Instead, use for all your objects the behavior called \"Physics2\" and the associated actions (in this case, all objects must be set up to use Physics2, you can't mix the behaviors).":"Esta acci\xF3n est\xE1 obsoleta y ya no debe ser usada. En su lugar, utilice para todos sus objetos el comportamiento llamado \"Physics2\" y las acciones asociadas (en este caso, todos los objetos deben estar configurados para usar Physics2, no puede mezclar los comportamientos).","This action will create a new texture and re-render the text each time it is called, which is expensive and can reduce performances. Prefer to avoid changing a lot the character size of a text.":"Esta acci\xF3n crear\xE1 una nueva textura y reerenderizar\xE1 el texto cada vez que se llame, lo que es costoso y puede reducir las prestaciones. Evite cambiar mucho el tama\xF1o de un texto.","This behavior is being used by multiple types of objects. Thus, you can't restrict its usage to any particular object type. All the object types using this behavior are listed here: {0}":function(a){return["Este comportamiento est\xE1 siendo usado por varios tipos de objetos. Por lo tanto, no puedes restringir su uso a ning\xFAn tipo de objeto particular. Todos los tipos de objeto que usan este comportamiento se enumeran aqu\xED: ",a("0")]},"This behavior is unknown. It might be a behavior that was defined in an extension and that was later removed. You should delete it.":"Este comportamiento es desconocido. Puede ser un comportamiento definido en una extensi\xF3n que fue eliminado m\xE1s tarde. Debria eliminarlo.","This build is old and the generated games can't be downloaded anymore.":"Esta compilaci\xF3n es antigua y los juegos generados ya no se pueden descargar.","This can either be a URL to a web page, or a path starting with a slash that will be opened in the GDevelop wiki. Leave empty if there is no help page, although it's recommended you eventually write one if you distribute the extension.":"Esto puede ser una URL a una p\xE1gina web, o una ruta que comience con una barra que se abrir\xE1 en la wiki de GDevelop. Dejar en blanco si no hay p\xE1gina de ayuda, aunque se recomienda que escriba una si distribuye la extensi\xF3n.","This condition may have unexpected results when the object is on different floors at the same time, due to the fact that the engine only considers the first floor the object comes into contact with.":"Esta condici\xF3n podr\xEDa tener resultados inesperados cuando el objeto est\xE1 en diferentes suelos al mismo tiempo, debido al hecho de que el motor solamente considera que objeto entra en contacto con el primer suelo.","This email is invalid.":"Este email es inv\xE1lido.","This email was already used for another account.":"Este correo ya ha sido usado en otra cuenta","This file is an extension file for GDevelop 5. You should instead import it, using the window to add a new extension to your project.":"Este archivo es un archivo de extensi\xF3n de GDevelop 5. Deber\xEDas importarlo, usando la ventana para a\xF1adir una nueva extensi\xF3n a tu proyecto.","This file is not recognized as a GDevelop 5 project. Be sure to open a file that was saved using GDevelop.":"Este archivo se reconoce como un proyecto GDevelop 5. Aseg\xFArate de abrir un archivo que fue guardado usando GDevelop.","This function will have a lot of parameters. Consider creating groups or functions for a smaller set of objects so that the function is easier to reuse.":"Esta funci\xF3n tendr\xE1 muchos par\xE1metros. Considere crear grupos o funciones para un conjunto de objetos m\xE1s peque\xF1o as\xED la funci\xF3n ser\xE1 m\xE1s f\xE1cil de reutilizar.","This is a \"lifecycle function\". It will be called automatically by the game engine. It has no parameters. Only global objects can be used as the events will be run for all scenes in your game.":"Esta es una \"funci\xF3n de ciclo de vida\". Ser\xE1 llamada autom\xE1ticamente por el motor de juego. No tiene par\xE1metros. S\xF3lo los objetos globales pueden ser usados ya que los eventos ser\xE1n ejecutados para todas las escenas de tu juego.","This is a \"lifecycle method\". It will be called automatically by the game engine and has two parameters: \"Object\" (the object the behavior is acting on) and \"Behavior\" (the behavior itself).":"Este es un \"m\xE9todo de ciclo de vida\". Ser\xE1 llamado autom\xE1ticamente por el motor de juego y tiene dos par\xE1metros: \"Objeto\" (el objeto en el que est\xE1 actuando el comportamiento) y \"Comportamiento\" (el propio comportamiento).","This is a \"lifecycle method\". It will be called automatically by the game engine for each instance living on the scene having the behavior.":"Este es un \"m\xE9todo de ciclo de vida\" que ser\xE1 llamado autom\xE1ticamente por el motor de juegos para cada instancia que viva en la escena teniendo el comportamiento.","This is a UI component dev environment for GDevelop.":"Este es un entorno de desarrollo de componentes UI para GDevelop.","This is a relative path that will open in the GDevelop wiki.":"Esta es una ruta relativa que se abrir\xE1 en la wiki de GDevelop.","This is link to a webpage.":"Este es un enlace a una p\xE1gina web.","This is not a URL starting with \"http://\" or \"https://\".":"Esta no es una URL que comience con \"http://\" o \"https://\".","This is the configuration of your behavior. Make sure to choose a proper internal name as it's hard to change it later. Enter a description explaining what the behavior is doing to the object.":"Esta es la configuraci\xF3n de tu comportamiento. Aseg\xFArate de elegir un nombre interno adecuado ya que es dif\xEDcil cambiarlo m\xE1s tarde. Introduzca una descripci\xF3n explicando lo que el comportamiento est\xE1 haciendo al objeto.","This is the list of builds that you've done for this game. Note that builds for mobile and desktop are available for 7 days, after which they are removed.":"Esta es la lista de compilaciones que has hecho para este juego. Tenga en cuenta que las compilaciones para dispositivos m\xF3viles y de escritorio est\xE1n disponibles durante 7 d\xEDas, despu\xE9s de lo cual se eliminan","This is your current plan":"Este es su plan actual","This link is private so you can share it with friends and testers. When you're ready you can update your Liluo.io game page.":"Este enlace es privado para que puedas compartirlo con tus amigos y evaluadores-testers. Cuando est\xE9s listo puedes actualizar tu p\xE1gina de juego de Liluo.io.","This name cannot be empty, please enter a new name.":"Este nombre no puede estar vac\xEDo, por favor ingrese un nuevo nombre.","This name is already taken":"Este nombre ya est\xE1 en uso","This name is already taken by another extension.":"Este nombre ya est\xE1 siendo utilizado por otra extensi\xF3n.","This name is already taken by another function. Choose another name.":"Este nombre ya est\xE1 siendo usado por otra funci\xF3n. Elija otro nombre.","This name is already used by another property. Choose a unique name for each property.":"Este nombre ya es utilizado por otra propiedad. Elija un nombre \xFAnico para cada propiedad.","This name is invalid. Only use alphanumeric characters (0-9, a-z) and underscores. Digits are not allowed as the first character.":"Este nombre no es v\xE1lido. S\xF3lo use caracteres alfanum\xE9ricos (0-9, a-z) y guiones bajos. Los d\xEDgitos no est\xE1n permitidos como el primer car\xE1cter.","This name is not valid. Only use alphanumeric characters (0-9, a-z) and underscores.":"Este nombre no es v\xE1lido. Utilice s\xF3lo caracteres alfanum\xE9ricos (0-9, a-z) y guiones bajos.","This name is reserved for a lifecycle function of the extension. Choose another name for your function.":"Este nombre est\xE1 reservado para una funci\xF3n de ciclo de vida de la extensi\xF3n. Elija otro nombre para su funci\xF3n.","This name is reserved for a lifecycle method of the behavior. Choose another name for your custom function.":"Este nombre est\xE1 reservado para un m\xE9todo de ciclo de vida del comportamiento. Elija otro nombre para su funci\xF3n personalizada.","This object does not have any specific configuration. Add it on the scene and use events to interact with it.":"Este objeto no tiene ninguna configuraci\xF3n espec\xEDfica. Agrega en la escena y utiliza eventos para interactuar con \xE9l.","This object exists, but can't be used here.":"Este objeto existe, pero no puede ser usado aqu\xED.","This object has no behaviors: please add this behavior to the object first.":"Este objeto no tiene comportamientos: por favor, agregue este comportamiento al objeto primero.","This object is experimental and not yet complete. It might have bugs or incomplete support in GDevelop, be sure to read the wiki by clicking on help button below.":"Este objeto es experimental y a\xFAn no est\xE1 completo. Puede tener errores o soporte incompleto en GDevelop, aseg\xFArese de leer el wiki haciendo clic en el bot\xF3n de ayuda de abajo.","This password is too weak: please use more letters and digits.":"Esta contrase\xF1a es demasiado d\xE9bil: por favor, use m\xE1s letras y d\xEDgitos.","This project is not registered online. Register it now to get access to metrics collected anonymously, like the number of daily players and retention of the players after a few days.":"Este proyecto no est\xE1 registrado en l\xEDnea. Reg\xEDstralo ahora para tener acceso a las m\xE9tricas recogidas an\xF3nimamente, como el n\xFAmero de jugadores diarios y la retenci\xF3n de los jugadores despu\xE9s de unos d\xEDas.","This project is registered online but you don't have access to it. Ask the original owner of the game to share it with you to get access to the game metrics.":"Este proyecto est\xE1 registrado en l\xEDnea pero no tienes acceso a \xE9l. Pide al propietario original del juego que lo comparta contigo para tener acceso a las m\xE9tricas del juego.","This scene will be used as the start scene.":"Esta escena se utilizar\xE1 como escena de inicio.","This setting changes the visibility of the entire layer. Objects on the layer will not be treated as \"hidden\" for event conditions or actions.":"Este ajuste cambia la visibilidad de toda la capa. Los objetos en la capa no ser\xE1n tratados como \"ocultos\" para condiciones o acciones de eventos.","This shortcut clashes with another action.":"Este atajo choca con otra acci\xF3n.","This should make the purpose of the property easy to understand":"Esto debe hacer que el prop\xF3sito de la propiedad sea f\xE1cil de entender","This sprite uses the default collision mask, a rectangle that is as large as the sprite.":"Este sprite utiliza la m\xE1scara de colisi\xF3n por defecto, un rect\xE1ngulo que es tan grande como el sprite.","This user was not found: have you created your account?":"Este usuario no se encontr\xF3: has creado tu cuenta?","This will be used when packaging and submitting your application to the stores.":"Esto se utilizar\xE1 al empaquetar y enviar tu aplicaci\xF3n a las tiendas.","This will export your game as a Cordova project. Cordova is a technology that enables HTML5 games to be packaged for iOS and Android.":"Esto exportar\xE1 tu juego como un proyecto de Cordova. Cordova es una tecnolog\xEDa que permite que los juegos HTML5 sean empaquetados para iOS y Android.","This will export your game so that you can package it for Windows, macOS or Linux. You will need to install third-party tools (Node.js, Electron Builder) to package your game.":"Esto exportar\xE1 tu juego para que puedas empaquetarlo para Windows, macOS o Linux. Necesitar\xE1s instalar herramientas de terceros (Node.js, Electron Builder) para empaquetar tu juego.","This will export your game to a folder. You can then upload it on a website/game hosting service and share it on marketplaces and gaming portals like CrazyGames, Poki, Game Jolt, itch.io, Newgrounds...":"Esto exportar\xE1 tu juego a una carpeta. Luego puede cargarlo en un sitio web / servicio de compartimiento de juegos o compartirlo en mercados y plataformas de juegos como CrazyGames, Poki, Game Jolt, itch.io, Newgrounds","This/these file(s) are outside the project folder. Would you like to make a copy of them in your project folder first (recommended)?":"Este/estos archivos est\xE1n fuera de la carpeta del proyecto. \xBFDesea hacer primero una copia de ellos en su carpeta de proyecto (recomendado)?","Time (ms)":"Tiempo (ms)","Time format":"Formato de la hora","Timestamp: {0}":function(a){return["Marca de tiempo: ",a("0")]},"Title cannot be empty.":"El t\xEDtulo no puede estar vac\xEDo.","To avoid flickering on objects followed by the camera, use sprites with even dimensions.":"Para evitar el parpadeo en los objetos seguidos por la c\xE1mara, utiliza sprites con dimensiones uniformes. ","To begin, open or create a new project.":"Para empezar, abrir o crear un nuevo proyecto.","To edit the external events, choose the scene in which it will be included:":"Para editar los eventos externos, seleccione la escena en la que se incluir\xE1:","To edit the external layout, choose the scene in which it will be included:":"Para editar el layout externo, seleccione la escena en la que se incluir\xE1:","To obtain the best pixel-perfect effect possible, go in the resources editor and disable the Smoothing for all images of your game. It will be done automatically for new images added from now.":"Para obtener el mejor efecto pixel-perfect posible, ve al editor de recursos y desactiva el suavizado para todas las im\xE1genes de tu juego. Se har\xE1 autom\xE1ticamente para las nuevas im\xE1genes a\xF1adidas.","To preview the shape that the Physics engine will use for this object, choose first a temporary image to use for the preview.":"Para previsualizar la forma que el motor de la f\xEDsica usar\xE1 para este objeto, primero elija una imagen temporal para la vista previa.","To skip this dialog and <0>directly open the preview next time</0>, please allow popups to be opened for this website in your browser.":"Para omitir este di\xE1logo y <0>abrir directamente la vista previa la pr\xF3xima vez</0>, por favor permita que se abran popups para este sitio web en su navegador.","To start a timer, don't forget to use the action \"Start (or reset) a scene timer\" in another event.":"Para iniciar un temporizador, no olvides usar la acci\xF3n \"Iniciar (o restablecer) un temporizador de escena\" en otro evento.","To start a timer, don't forget to use the action \"Start (or reset) an object timer\" in another event.":"Para empezar un temporizador, no olvides usar la acci\xF3n \"Iniciar (o restablecer) un temporizador de objeto\" en otro evento.","To update your thumbnail, go into your Game Settings > Icons and thumbnail, then create and publish a new build.":"Para actualizar tu miniatura, entra en tu Configuraci\xF3n del juego > Iconos y miniatura, y luego crea y publica una nueva compilaci\xF3n.","To use this feature, we ask you to get a subscription to GDevelop.":"Para utilizar esta caracter\xEDstica, le pedimos que obtenga una suscripci\xF3n a GDevelop.","To use this formatting, you must send a score expressed in seconds":"Para utilizar este formato, debe enviar una puntuaci\xF3n expresada en segundos","Today (so far, in real time)":"Hoy (hasta ahora, en tiempo real)","Toggle Developer Tools":"Alternar herramientas de desarrollador","Toggle Fullscreen":"Cambiar pantalla completa","Toggle disabled":"Alternar desactivado","Toggle disabled event":"Alternar evento deshabilitado","Toggle grid":"Alternar cuadr\xEDcula","Toggle mask":"Alternar m\xE1scara","Toggle/edit grid":"Activar/editar cuadr\xEDcula","Top margin":"Margen superior","Top-Left":"Arriba-izquierda","Trailer":"Tr\xE1iler","True":"Verdadero","True (checked)":"Verdadero (marcado)","True or False":"Verdadero o False","True or False (boolean)":"Verdadero o Falso (booleano)","Tutorials":"Tutoriales","Tutorials on YouTube":"Tutoriales en YouTube","Type":"Tipo","Type:":"Tipo:","UI Theme":"Tema de UI","URL":"URL","Unable to create the game in the specified folder. Check that you have permissions to write in this folder: {outputPath} or choose another folder.":function(a){return["No se puede crear el juego en la carpeta especificada. Compruebe que tiene permisos para escribir en esta carpeta: ",a("outputPath")," o seleccione otra carpeta."]},"Unable to display your achievements for now.":"No se pueden mostrar tus logros por ahora.","Unable to download and install the extension. Verify that your internet connection is working or try again later.":"No se puede descargar e instalar la extensi\xF3n. Verifica que tu conexi\xF3n a Internet est\xE9 funcionando o vuelve a intentarlo m\xE1s tarde.","Unable to download the icon. Verify your internet connection or try again later.":"No se puede descargar el icono. Verifique su conexi\xF3n a Internet o int\xE9ntelo de nuevo m\xE1s tarde.","Unable to fetch the example.":"No se puede obtener el ejemplo.","Unable to load the code editor":"No se puede cargar el editor de c\xF3digo","Unable to load the example or save it on disk.":"No se puede cargar el ejemplo o guardarlo en el disco.","Unable to load the image":"No se pudo cargar la imagen","Unable to load the information about the latest GDevelop releases. Verify your internet connection or retry later.":"No se puede cargar la informaci\xF3n sobre las \xFAltimas versiones de GDevelop. Verifique su conexi\xF3n a Internet o vuelva a intentarlo m\xE1s tarde.","Unable to load the profile, please verify your internet connection or try again later.":"No se ha podido cargar el perfil, verifica tu conexi\xF3n a internet o vuelve a intentarlo m\xE1s tarde.","Unable to open the preview! Be sure that popup are allowed for this website.":"\xA1No se puede abrir la vista previa! Aseg\xFArese de que los popup est\xE1n permitidos para este sitio web.","Unable to open the project because this provider is unknown: {storageProviderName}. Try to open the project again from another location.":function(a){return["No se puede abrir el proyecto porque este proveedor es desconocido: ",a("storageProviderName"),". Intenta abrir el proyecto de nuevo desde otra ubicaci\xF3n."]},"Unable to open the project.":"No se puede abrir el proyecto.","Unable to open this file.":"No se puede abrir este archivo.","Unable to save as the project! Please try again by choosing another location.":"\xA1No se puede guardar como proyecto! Por favor, int\xE9ntalo de nuevo eligiendo otra ubicaci\xF3n.","Unable to search in the documentation. Are you sure you are online and have a proper internet connection?":"No se puede buscar en la documentaci\xF3n. \xBFEst\xE1 seguro de que est\xE1 online y tiene conexi\xF3n a Internet?","Unable to start the debugger server! Make sure that you are authorized to run servers on this computer.":"\xA1No se puede iniciar el servidor de depuraci\xF3n! Aseg\xFArese de que est\xE1 autorizado a ejecutar servidores en este equipo.","Unable to start the server for the preview! Make sure that you are authorized to run servers on this computer. Otherwise, use classic preview to test your game.":"\xA1No se puede iniciar el servidor para la vista previa! Aseg\xFArese de que est\xE1 autorizado a ejecutar servidores en este equipo. De lo contrario, utilice la vista previa cl\xE1sica para probar su juego.","Unable to update the authors of the project.":"Imposible actualizar los autores del proyecto.","Unable to update the game details.":"No se pueden actualizar los detalles del juego.","Unable to update the game owners or authors. Have you removed yourself from the owners?":"No se pueden actualizar los propietarios o autores del juego. \xBFTe has eliminado de los propietarios?","Unable to update the game slug. A slug must be 6 to 30 characters long and only contains letters, digits or dashes.":"No se puede actualizar la Url amigable del juego. Una Url amigable debe tener entre 6 y 30 caracteres y solo contener letras, d\xEDgitos o guiones.","Unable to verify URLs {0} . Please check they are correct.":function(a){return["No se pueden verificar las URLs ",a("0")," . Por favor, comprueba que son correctas."]},"Undo":"Deshacer","Undo the last changes":"Deshacer los \xFAltimos cambios","Unexpected error":"Error inesperado","Unfortunately, this example requires a newer version of GDevelop to work. Update GDevelop to be able to open this example.":"Desafortunadamente, este ejemplo requiere una versi\xF3n m\xE1s reciente de GDevelop para funcionar. Actualize GDevelop para poder usar este ejemplo.","Unfortunately, this extension requires a newer version of GDevelop to work. Update GDevelop to be able to use this extension in your project.":"Desafortunadamente, esta extensi\xF3n requiere una nueva versi\xF3n de GDevelop para funcionar. Actualiza GDevelop para poder usar esta extensi\xF3n en tu proyecto.","Unknown behavior":"Comportamiento desconocido","Unknown status":"Estado desconocido","Unpublish from Liluo.io":"Despublicar de Liluo.io","Unpublish this build from Liluo.io":"Despublicar esta versi\xF3n de Liluo.io","Unregister this game":"Quitar registro de esta partida","Untitled external events":"Eventos externos sin t\xEDtulo","Untitled external layout":"Dise\xF1o-Layout externo sin t\xEDtulo","Untitled scene":"Escena sin t\xEDtulo","UntitledExtension":"Extensi\xF3n sin t\xEDtulo","Update":"Actualizar","Update resolution during the game to fit the screen or window size":"Actualizar resoluci\xF3n durante el juego para ajustar el tama\xF1o de la pantalla o ventana","Update the color of {propertyLabel}":function(a){return["Actualizar el color de ",a("propertyLabel")]},"Update the value of {propertyLabel}":function(a){return["Actualizar el valor de ",a("propertyLabel")]},"Updates":"Actualizaciones","Upgrade my account":"Mejorar mi cuenta","Upgrade/change":"Mejorar/cambiar","Upload to build service":"Subir al servicio de construcci\xF3n","Use a custom collision mask":"Usar una m\xE1scara de colisi\xF3n personalizada","Use an URL":"Usar un URL","Use the new action/condition editor":"Usar el nuevo editor de acci\xF3n/condici\xF3n","Use this external layout inside this scene to start all previews":"Usa este dise\xF1o externo dentro de esta escena para iniciar todas las vistas previas","Use this scene to start all previews":"Usa esta escena para iniciar todas las vistas previas","User name in the game URL":"Nombre de usuario en la URL del juego","Username":"Nombre de usuario","Usernames are required to choose a custom game URL.":"Los nombres de usuario son necesarios para elegir una URL de juego personalizada.","Users can chose to see only players' best entries or not.":"Los usuarios pueden elegir ver s\xF3lo las mejores entradas de los jugadores o no.","Using Nearest Scale Mode":"Usando el Modo de Escala M\xE1s Cercano","Using a lot of effects can have a severe negative impact on the rendering performance, especially on low-end or mobile devices. Consider using less effects if possible. You can also disable and re-enable effects as needed using events.":"El uso elevado de efectos puede tener un gran impacto negativo en el renderizado, especialmente en los dispositivos m\xF3viles o de gama baja. Considere usar el menor n\xFAmero de efectos posible. Tambi\xE9n puede desactivar y rehabilitar efectos seg\xFAn sea necesario usando eventos.","Using effects":"Usando efectos","Using empty events based behavior":"Usando el comportamiento basado en eventos vac\xEDos","Using events based behavior":"Usando el comportamiento basado en eventos vac\xEDos","Using function extractor":"Usando extractor de funci\xF3n","Using instance drag'n'drop":"Usando instancia arrastrar y soltar","Using lighting layer":"Utilizando capa de iluminaci\xF3n","Using non smoothed textures":"Usando texturas no alisadas","Using pixel rounding":"Usar el redondeo de p\xEDxeles","Using the instance properties panel":"Usando el panel de propiedades de la instancia","Using the instances panel":"Usar el panel de instancias","Using the layers panel":"Usando el panel de capas","Using the objects panel":"Usando el panel de objetos","Using the resource properties panel":"Usando el panel de propiedades de recursos","Using too much effects":"Usando demasiados efectos","Validate these parameters":"Validar estos par\xE1metros","Variables":"Variables","Verify and Publish to Liluo.io":"Verificar y publicar en Liluo.io","Verify that you have the authorizations for reading the file you're trying to access.":"Comprueba que tienes autorizacion para leer el archivo al que est\xE1s intentando acceder.","Verify your game info before publishing":"Verifique la informaci\xF3n de su juego antes de publicarlo","Verify your internet connection or try again later.":"Verifique su conexi\xF3n a Internet o int\xE9ntelo de nuevo m\xE1s tarde.","Version":"Versi\xF3n","Version number (X.Y.Z)":"N\xFAmero de versi\xF3n (X.Y.Z)","Version {0}":function(a){return["Versi\xF3n ",a("0")]},"Video":"V\xEDdeo","Video format supported can vary according to devices and browsers. For maximum compatibility, use H.264/mp4 file format (and AAC for audio).":"El formato de v\xEDdeo soportado puede variar seg\xFAn los dispositivos y navegadores. Para la m\xE1xima compatibilidad, utilice el formato de archivo H.264/mp4 (y AAC para audio).","Video resource":"Recurso de v\xEDdeo","View":"Ver","Visible":"Visible","Visible in editor":"Visible en el editor","Watch changes in game engine (GDJS) sources and auto import them (dev only)":"Ver cambios en las fuentes del motor de juegos (GDJS) y auto importarlos (s\xF3lo dev)","Watch the tutorial":"Ver el tutorial","We need your support!":"\xA1Necesitamos tu apoyo!","Web":"Web","Web Build":"Construcci\xF3n Web","What are you using GDevelop for?":"\xBFPara qu\xE9 est\xE1s usando GDevelop?","What's new in GDevelop?":"\xBFQu\xE9 es lo nuevo en GDevelop?","What's new?":"\xBFQu\xE9 es lo nuevo?","When checked, will only display the best score of each player (only for the display below).":"Cuando est\xE1 marcada, s\xF3lo mostrar\xE1 la mejor puntuaci\xF3n de cada jugador (s\xF3lo para la pantalla de abajo).","When previewing the game in the editor, this duration is ignored (the game preview starts as soon as possible).":"Cuando se previsualiza el juego en el editor, esta duraci\xF3n es ignorada (la vista previa del juego comenzar\xE1 tan pronto como sea posible).","When you create an object using an action, GDevelop now sets the Z order of the object to the maximum value that was found when starting the scene for each layer. This allow to make sure that objects that you create are in front of others. This game was created before this change, so GDevelop maintains the old behavior: newly created objects Z order is set to 0. It's recommended that you switch to the new behavior by clicking the following button.":"Cuando creas un objeto usando una acci\xF3n, GDevelop ahora establece el orden Z del objeto al valor m\xE1ximo que se encontr\xF3 al iniciar la escena para cada capa. Esto permite asegurarse de que los objetos que usted crea est\xE1n delante de otros. Este juego fue creado antes de este cambio, por lo que GDevelop mantiene el viejo comportamiento: el orden Z de los objetos reci\xE9n creados est\xE1 establecido en 0. Se recomienda que cambie al nuevo comportamiento haciendo clic en el siguiente bot\xF3n.","While these conditions are true:":"Si bien estas condiciones son verdaderas:","Width":"Ancho","Window":"Ventana","Window title":"T\xEDtulo de ventana","Windows (auto-installer file)":"Windows (archivo auto-instalador)","Windows (exe)":"Windows (exe)","Windows (zip file)":"Windows (archivo zip)","Windows (zip)":"Windows (zip)","Windows/macOS/Linux":"Windows/macOS/Linux","Windows/macOS/Linux (manual)":"Windows/macOS/Linux (manual)","Windows/macOS/Linux Build":"Compilaci\xF3n de Windows/macOS","X":"X","X offset (in pixels)":"Offset X(en p\xEDxeles)","Y":"Y","Y offset (in pixels)":"Offset Y (en p\xEDxeles)","Yes":"S\xED","Yes or No":"S\xED o No","Yes or No (boolean)":"S\xED o No (booleano)","Yesterday":"Ayer","You are in raw mode. You can edit the fields, but be aware that this can lead to unexpected results or even crash the debugged game!":"Est\xE1s en modo crudo. Puedes editar los campos, pero sabes que esto puede conducir a resultados inesperados o incluso provocar un fallo en el juego depurado!","You are not connected. Create an account to build your game for Android, Windows, macOS and Linux in one click, and get access to metrics for your game.":"No est\xE1 conectado. Crea una cuenta para construir tu juego para Android, Windows, macOS y Linux con un solo clic y consigue acceso a las m\xE9tricas de tu juego.","You are subscribed to {0}. Congratulations! You have access to more online services, including building your game for Android, Windows, macOS and Linux in one click!":function(a){return["Est\xE1s suscrito a ",a("0"),". \xA1Felicidades! Tienes acceso a m\xE1s servicios en l\xEDnea, incluyendo la construcci\xF3n de tu juego para Android, Windows, macOS y Linux en un solo clic!"]},"You can also launch a preview from this external layout, but remember that it will still create objects from the scene, as well as trigger its events. Make sure to disable any action loading the external layout before doing so to avoid having duplicate objects!":"Tambi\xE9n puedes lanzar una vista previa desde este dise\xF1o externo, pero recuerda que todav\xEDa crear\xE1s objetos a partir de la escena, as\xED como desencadenar\xE1s sus eventos. \xA1Aseg\xFArate de desactivar cualquier acci\xF3n cargando el dise\xF1o externo antes de hacerlo para evitar tener objetos duplicados!","You can contribute and create your own themes:":"Puedes contribuir y crear tus propios temas:","You can download the file of your game to continue working on it using the full GDevelop version:":"Puedes descargar el archivo de tu juego para continuar trabajando en \xE9l usando la versi\xF3n completa de GDevelop:","You can export the extension to a file to easily import it in another project. If your extension is providing useful and reusable functions or behaviors, consider sharing it with the GDevelop community!":"Puedes exportar la extensi\xF3n a un archivo para importarla f\xE1cilmente en otro proyecto. Si tu extensi\xF3n est\xE1 proporcionando funciones o comportamientos \xFAtiles y reutilizables, \xA1considera compartirlo con la comunidad GDevelop!","You can now compile the game by yourself using Cordova command-line tool to iOS (XCode is required) or Android (Android SDK is required).":"Ahora puede compilar el juego usted mismo utilizando la herramienta de l\xEDnea de comandos Cordova para iOS (se requiere XCode) o Android (se requiere SDK de Android).","You can now create a game on Facebook Instant Games, if not already done, and upload the generated archive.":"Ahora puede crear un juego en Facebook Instant Games, si a\xFAn no lo ha hecho, y cargar el archivo generado.","You can now upload the game to a web hosting to play to the game.":"Puedes ahora subir el juego a un hosting web para jugar al juego.","You can open the command palette by pressing":"Puedes abrir la paleta de comandos presionando","You can use GDevelop for free! Online packaging for Android, Windows, macOS and Linux is limited to twice a day (every 24 hours) to avoid overloading the services.":"\xA1Puedes usar GDevelop gratis! El empaquetado en l\xEDnea para Android, Windows, macOS y Linux est\xE1 limitado a dos veces al d\xEDa (cada 24 horas) para evitar sobrecargar los servicios.","You cannot unregister a game that has active leaderboards. To delete them, go in the Leaderboards tab, and delete them one by one.":"No puedes anular el registro de un juego que tenga tablas de clasificaci\xF3n activas. Para eliminarlas, ve a la pesta\xF1a Tablas de clasificaci\xF3n y elim\xEDnalas una por una.","You don't have a subscription. Get one to increase the limits!":"No tienes una suscripci\xF3n. \xA1Consigue uno para aumentar los l\xEDmites!","You don't have any builds for this game.":"No tienes versiones para este juego.","You have {0} remaining builds for today (out of {1}).":function(a){return["Tienes ",a("0")," creaciones restantes para hoy (de ",a("1"),")."]},"You haven't contributed any examples":"No has aportado ning\xFAn ejemplo","You haven't contributed any extensions":"No has aportado ninguna extensi\xF3n","You must be online and have a proper internet connection to export your game.":"Debes estar en l\xEDnea y tener una conexi\xF3n a Internet adecuada para exportar tu juego.","You must select a key.":"Debe seleccionar una clave.","You must select a valid key. \"{value}\" is not valid.":function(a){return["You must select a valid key. \"",a("value"),"\" is not valid."]},"You must select at least one user to be the owner of the game.":"Debes seleccionar al menos un usuario para que sea el propietario del juego.","You need to login first to see your builds.":"Necesitas iniciar sesi\xF3n primero para ver tus compilaciones.","You should have received an email containing instructions to reset and set a new password. Once it's done, you can use your new password in GDevelop.":"Debe haber recibido un correo electr\xF3nico con instrucciones para restablecer y establecer una nueva contrase\xF1a. Una vez terminado, puede utilizar su nueva contrase\xF1a en GDevelop.","You'll also have access to online packaging for iOS or other services when they are released.":"Tambi\xE9n tendr\xE1 acceso a paquetes en l\xEDnea para iOS u otros servicios cuando se publiquen.","You're about to open (or re-open) a project. Click on \"Open the Project\" to continue.":"Est\xE1 a punto de abrir (o volver a abrir) un proyecto. Haga clic en \"Abrir proyecto\" para continuar.","You're also supporting the development of GDevelop, an open-source software! In the future, more online services will be available for users with a subscription.":"\xA1Tambi\xE9n est\xE1 apoyando el desarrollo de GDevelop, un software de c\xF3digo abierto! En el futuro, m\xE1s servicios en l\xEDnea estar\xE1n disponibles para los usuarios con una suscripci\xF3n.","You've made some changes here. Are you sure you want to discard them and open the function?":"Se han hecho algunos cambios aqu\xED. \xBFEst\xE1 seguro de que desea descartarlos y abrir la funci\xF3n?","Your account is upgraded, with the extra exports and online services. If you wish to change later, come back to your profile and choose another plan.":"Su cuenta se actualiza, con las exportaciones adicionales y los servicios en l\xEDnea. Si desea cambiar m\xE1s tarde, vuelva a su perfil y elija otro plan.","Your browser will now open to enter your payment details (handled securely by Stripe.com).":"Su navegador ahora se abrir\xE1 para ingresar sus detalles de pago (Stripe.com maneja de forma segura).","Your email is now verified!":"\xA1Tu correo electr\xF3nico ha sido verificado con \xE9xito!","Your game builds":"Tus versiones del juego","Your game is published! Share it with the community!":"\xA1Tu juego est\xE1 publicado! \xA1Comp\xE1rtelo con la comunidad!","Your game will be exported and packaged online as a stand-alone game for Windows, Linux and/or macOS.":"Su juego se exportar\xE1 y empaquetar\xE1 en l\xEDnea como un juego independiente para Windows, Linux y/o macOS.","Your game won't work if you open index.html on your computer. You must upload it to a web hosting (Kongregate, Itch.io, etc...) or a web server to run it.":"Tu juego no funcionar\xE1 si abres index.html en tu ordenador. Debes subirlo a un alojamiento web (Kongregate, Itch.io, etc...) o a un servidor web para ejecutarlo.","Your latest changes could not be applied to the preview(s) being run. You should start a new preview instead to make sure that all your changes are reflected in the game.":"No se han podido aplicar los \xFAltimos cambios a la vista previa que se est\xE1 ejecutando. Deber\xEDas iniciar una nueva vista previa para asegurarte que todos tus cambios se reflejen en el juego.","Your name":"Tu nombre","Your new plan is now activated":"Tu nuevo plan ahora est\xE1 activado","Your preview is ready! Click on the button to launch the preview.":"\xA1Tu vista previa est\xE1 lista! Haga clic en el bot\xF3n para lanzar la vista previa.","Your preview is ready! On your mobile or tablet, open your browser and enter in the address bar:":"\xA1Tu vista previa est\xE1 lista! En tu m\xF3vil o tableta, abre tu navegador e introduce en la barra de direcciones:","Your subscription could not be updated. Please try again later!":"Su suscripci\xF3n no pudo ser actualizada. \xA1Por favor, int\xE9ntelo de nuevo m\xE1s tarde!","Your subscription was properly cancelled. Sorry to see you go!":"Su suscripci\xF3n se cancel\xF3 correctamente. \xA1Siento verte ir!","YourGame.json":"Tujuego.json","Z Order":"Orden Z","Z Order of objects created from events":"Orden Z de objetos creados a partir de eventos","Zoom In":"Ampliar vista","Zoom Out":"Reducir vista","Zoom in":"Acercar","Zoom in (you can also use Ctrl + Mouse wheel)":"Zoom (tambi\xE9n puede usar Ctrl + Rueda de rat\xF3n)","Zoom out":"Alejar","Zoom out (you can also use Ctrl + Mouse wheel)":"Alejar zoom (tambi\xE9n puede usar Ctrl + Rueda de rat\xF3n)","a permanent":"un permanente","add":"a\xF1adir","an instant":"un instant\xE1neo","by {author}":function(a){return["por ",a("author")]},"divide by":"dividir por","false":"falso","iOS & Android (manual)":"iOS & Android (manual)","iOS (iPhone and iPad) icons:":"iOS (iPhone e iPad) iconos:","macOS (zip file)":"macOS (archivo zip)","macOS (zip)":"macOS (zip)","multiply by":"multiplicar por","no":"no","or":"o","set to":"establecer a","subtract":"sustraer","the property {propertyName}":function(a){return["la propiedad ",a("propertyName")]},"true":"verdadero","yes":"s\xED","{0} (default)":function(a){return[a("0")," (por defecto)"]},"{0} - {1}":function(a){return[a("0")," - ",a("1")]},"{0}/{1} achievements":function(a){return[a("0"),"/",a("1")," logros"]},"{0}\u20AC/month":function(a){return[a("0"),"\u20AC/mes"]},"{propertyName} property":function(a){return["propiedad de ",a("propertyName")]},"{resultsCount} results":function(a){return[a("resultsCount")," resultados"]},"~{0} minutes.":function(a){return["~",a("0")," minutos."]},"\u2260 (not equal to)":"\u2260 (no igual a)","\u2264 (less or equal to)":"\u2264 (menor o igual a)","\u2265 (greater or equal to)":"\u2265 (mayor o igual a)","Error during exporting! Unable to export source files:\n":"\xA1Error durante la exportaci\xF3n! Imposible exportar los archivos fuente:\n","Unable to write ":"Imposible escribir ","Could not copy external file":"No se pudo copiar el archivo externo","Error during exporting! Unable to export events:\n":"\xA1Error durante la exportaci\xF3n! No se pudieron exportar los eventos:\n","Error during export:\n":"Error durante la exportaci\xF3n:\n","Consider objects touching each other, but not overlapping, as in collision (default: no)":"Considere los objetos que se tocan entre s\xED, pero no se superponen, como en la colisi\xF3n (predeterminado: no)","Storage":"Almacenamiento","Javascript code":"C\xF3digo Javascript","Insert some Javascript code into events":"Introducir c\xF3digo Javascript en los eventos","HTML5 (Web and Android games)":"HTML5 (juegos web y Android)","HTML5 and javascript based games for web browsers.":"Juegos en HTML5 y Javascript para los navegadores web.","Enables the creation of 2D games that can be played in web browsers. These can also be exported to Android with third-party tools.":"Permite la creaci\xF3n de juegos 2D que se pueden jugar en navegadores web. Estos tambi\xE9n se pueden exportar a Android con herramientas de terceros.","Gravity on X axis (in m/s\xB2)":"Gravedad en el eje X (en m/s\xB2)","Gravity on Y axis (in m/s\xB2)":"Gravedad en el eje Y (en m/s\xB2)","X Scale: number of pixels for 1 meter":"Escala X: n\xFAmero de p\xEDxeles por 1 metro","Y Scale: number of pixels for 1 meter":"Escala Y: n\xFAmero de p\xEDxeles por 1 metro","X scale: number of pixels for 1 meter":"Escala X: n\xFAmero de p\xEDxeles por 1 metro","Y scale: number of pixels for 1 meter":"Escala Y: n\xFAmero de p\xEDxeles por 1 metro","Box (rectangle)":"Caja (rect\xE1ngulo)","Custom polygon":"Pol\xEDgono personalizado","Shape":"Forma","Dynamic object":"Objeto din\xE1mico","Fixed rotation":"Rotaci\xF3n fija","Consider as bullet (better collision handling)":"Considerar como bala (mejor gesti\xF3n de colisiones)","Mass density":"Densidad de masa","Friction":"Fricci\xF3n","Restitution (elasticity)":"Restituci\xF3n (elasticidad)","Linear Damping":"Amortiguamiento lineal","Angular Damping":"Amortiguaci\xF3n angular","Physics Engine (deprecated)":"Motor de f\xEDsica (obsoleto)","Physics Engine":"Motor de f\xEDsica","Physics":"F\xEDsica","Make objects move as if they are subject to the laws of physics. If you're creating a new game, prefer Physics Engine 2.0":"Mover objetos como si estuvieran sujetos a las leyes de la f\xEDsica. Si est\xE1 creando un nuevo juego, es preferible el motor de f\xEDsica 2.0","Make the object static":"Establecer como objeto est\xE1tico","Make the object immovable.":"Establece el objeto como inamovible.","Make _PARAM0_ static":"Establecer _PARAM0_ como est\xE1tico","Movement":"Movimiento","Make the object dynamic":"Establece el objeto como din\xE1mico","Make the object dynamic ( affected by forces and other objects ).":"Establece el objeto como din\xE1mico (afectado por fuerzas y otros objetos).","Make _PARAM0_ dynamic":"Establecer _PARAM0_ como din\xE1mico","The object is dynamic":"El objeto es din\xE1mico","Test if an object is dynamic ( affected by forces and other objects ).":"Comprueba si el objeto es din\xE1mico (afectado por fuerzas y otros objetos).","_PARAM0_ is dynamic":"_PARAM0_ es din\xE1mico","Fix rotation":"Rotaci\xF3n fija","Prevent the object from rotating":"Impide que el objeto rote.","Fix rotation of _PARAM0_":"Fijar la rotaci\xF3n de _PARAM0_","Rotation":"Rotaci\xF3n","Add a hinge":"Agregar una bisagra","Add a hinge that the object will rotate around.\nThe distance between the hinge and the object will remain identical.":"Agrega una bisagra sobre la que rotar\xE1 el objeto.\nLa distancia entre la bisagra y el objeto permanecer\xE1 inalterada.","Add a hinge to _PARAM0_ at _PARAM2_;_PARAM3_":"Agregar una bisagra a _PARAM0_ en _PARAM2_;_PARAM3_","Joints":"Uni\xF3n","Hinge X position":"Posici\xF3n X de la bisagra","Hinge Y position":"Posici\xF3n Y de la bisagra","Add a hinge between two objects":"Agregar una bisagra entre dos objetos","Add a hinge that the object will rotate around.":"Agrega una bisagra sobre la que rotar\xE1 el objeto.","Add a hinge between _PARAM0_ and _PARAM2_":"Agregar una bisagra entre _PARAM0_ y _PARAM2_","X position of the hinge, from the first object mass center":"Posici\xF3n X de la bisagra, respecto al centro de masa del 1er objeto","Y position of the hinge, from the first object mass center":"Posici\xF3n Y de la bisagra, respecto al centro de masa del 1er objeto","Add a gear between two objects":"Agregar un engranaje entre dos objetos","Add a virtual gear between two objects.":"Agrega una uni\xF3n de engranaje virtual entre dos objetos. ","Add a gear between _PARAM0_ and _PARAM2_":"Agregar un engranaje entre _PARAM0_ y _PARAM2_","Ratio":"Radio","Make object's rotation free":"Establecer con libre rotaci\xF3n","Allows the object to rotate.":"Permite rotar al objeto.","Allow _PARAM0_ to rotate":"Permitir a _PARAM0_ rotar","Test if the object's rotation is fixed.":"Comprueba si el objeto tiene rotaci\xF3n fija.","The rotation of _PARAM0_ is fixed.":"La rotaci\xF3n de _PARAM0_ est\xE1 fija.","Treat object like a bullet.":"Tratar el objeto como una bala.","Treat the object like a bullet, so it will have better collision handling.":"Trata el objeto como una bala, con el fin de obtener una mejor gesti\xF3n en las colisiones.","Consider _PARAM0_ as a bullet":"Considerar _PARAM0_ como proyectil","Other":"Otro","Do not treat object like a bullet":"No tratar el objeto como una bala","Do not treat the object like a bullet, so it will use standard collision handling.":"Deja de tratar el objeto como una bala, tendr\xE1 una gesti\xF3n de colisiones est\xE1ndar.","Do not consider _PARAM0_ as a bullet.":"No considerar _PARAM0_ como proyectil","Object is treated like a bullet":"Objeto es tratado como una bala","Test if the object is treated like a bullet":"Comprueba si el objeto es tratado como una bala","_PARAM0_ is considered as a bullet":"_PARAM0_ es considerado como proyectil","Apply an impulse":"Aplicar un impulso","Apply an impulse to the object.":"Aplica un impulso al objeto.","Apply to _PARAM0_ impulse _PARAM2_;_PARAM3_":"Aplicar a _PARAM0_ un impulso de _PARAM2_;_PARAM3_","Displacement":"Desplazamiento","X component ( Newtons/Seconds )":"Componente X ( Newtons/Segundos )","Y component ( Newtons/Seconds )":"Componente Y ( Newtons/Segundos )","Apply an impulse (angle)":"Aplicar un impulso (\xE1ngulo)","Apply an impulse to an object, using an angle and a length as coordinates.":"Aplica un impulso a un objeto, usando un \xE1ngulo y una longitud como coordenadas.","Apply to _PARAM0_ impulse _PARAM3_ with angle: _PARAM2_\xB0":"Aplicar a _PARAM0_ un impulso de _PARAM3_ con un \xE1ngulo de: _PARAM2_\xB0","Impulse value ( Newton/seconds )":"Valor del impulso ( Newtons/Segundos )","Apply an impulse toward a position":"Aplicar un impulso hacia una posici\xF3n","Apply an impulse, directed toward a position, to the object.":"Aplica un impulso, dirigido hacia una posici\xF3n, al objeto.","Apply to _PARAM0_ impulse _PARAM4_ toward position _PARAM2_;_PARAM3_":"Aplicar a _PARAM0_ un impulso hacia la posici\xF3n _PARAM2_;_PARAM3_ de _PARAM4_","X position":"Posici\xF3n X","Y position":"Posici\xF3n Y","Add a force":"Aplicar una fuerza","Add a force to the object":"Agrega una fuerza al objeto","Apply to _PARAM0_ force _PARAM2_;_PARAM3_":"Aplicar a _PARAM0_ una fuerza de _PARAM2_;_PARAM3_","X component ( Newtons )":"Componente X ( Newtons )","Y component ( Newtons )":"Componente Y ( Newtons )","Apply a force ( angle )":"Aplicar una fuerza ( \xE1ngulo )","Apply a force to an object, using an angle and a length as coordinates.":"Aplica una fuerza al objeto, utilizando un \xE1ngulo y una longitud como coordenadas.","Apply to _PARAM0_ force _PARAM3_ at angle _PARAM2_":"Aplicar a _PARAM0_ una fuerza de _PARAM3_ y \xE1ngulo _PARAM2_","Length of the force ( Newtons )":"Valor de la fuerza ( Newtons )","Apply a force toward a position":"Aplicar una fuerza hacia una posici\xF3n","Apply a force, directed toward a position, to the object.":"Aplica una fuerza, dirigida hacia una posici\xF3n, al objeto.","Add to _PARAM0_ force _PARAM4_ toward position _PARAM2_;_PARAM3_":"Aplicar a _PARAM0_ une force hacia la posici\xF3n _PARAM2_;_PARAM3_ de _PARAM4_","Add a torque (a rotation)":"Aplicar un torque (rotaci\xF3n)","Add a torque (a rotation) to the object.":"Agrega un torque (una rotaci\xF3n) al objeto.","Add to _PARAM0_ torque _PARAM2_":"Aplicar a _PARAM0_ un torque de _PARAM2_","Torque value":"Valor del torque","Linear velocity":"Velocidad lineal","Modify the velocity of an object.":"Modifica la velocidad de un objeto.","Set linear velocity of _PARAM0_ to _PARAM2_;_PARAM3_":"Igualar la velocidad linear de _PARAM0_ a _PARAM2_;_PARAM3_","X Coordinate":"Coordenada X","Y Coordinate":"Coordenada Y","X component":"Velocidad lineal en X","Compare the linear velocity on the X axis of the object.":"Eval\xFAa la velocidad lineal en el eje X de un objeto.","the linear velocity on X axis":"la velocidad lineal en el eje X","Y component":"Velocidad lineal Y","Compare the linear velocity on the Y axis of the object.":"Eval\xFAa la velocidad lineal en el eje Y de un objeto.","the linear velocity on Y axis":"la velocidad lineal en el eje Y","Linear speed":"Velocidad lineal","Compare the linear velocity of the object.":"Eval\xFAa la velocidad lineal del objeto.","the linear velocity":"la velocidad lineal","Angular speed":"Velocidad angular","Modify the angular velocity of the object.":"Modifica la velocidad angular del objeto.","Set angular speed of _PARAM0_ to _PARAM2_":"Igualar la velocidad angular de _PARAM0_ a _PARAM2_","New value":"Nuevo valor","Compare the angular speed of the object.":"Eval\xFAa la velocidad angular ( velocidad de rotaci\xF3n ) del objeto.","the angular speed":"la velocidad angular","Linear damping":"Amortiguamiento lineal","Compare the linear damping of the object.":"Eval\xFAa el amortiguamiento lineal del objeto.","the linear damping":"el amortiguamiento lineal","Collision":"Colisi\xF3n","Test if two objects are colliding.\nAttention! Only objects specified in the first parameter will be taken into account by the next actions and conditions, if they are colliding with the other objects.":"Comprueba si dos objetos est\xE1n colisionando.\n\xA1Atenci\xF3n! Solo los objetos especificados en el primer par\xE1metro ser\xE1n tomados en cuenta por las pr\xF3ximas condiciones y acciones, si est\xE1n en colisi\xF3n con los otros objetos.","_PARAM0_ is in collision with a _PARAM2_":"_PARAM0_ est\xE1 en colisi\xF3n con _PARAM2_","Modify the linear damping of the object.":"Modifica el amortiguamiento lineal del objeto.","Set linear damping of _PARAM0_ to _PARAM2_":"Establecer el amortiguamiento lineal de _PARAM0_ a _PARAM2_","Value":"Valor","Angular damping":"Amortiguamiento angular","Test the object's angular damping":"Comprueba el amortiguamiento lineal del objeto","the angular damping":"el amortiguamiento angular","Modify the angular damping of the object.":"Modifica el amortiguamiento angular del objeto.","Set angular damping of _PARAM0_ to _PARAM2_":"Igualar el amortiguamiento angular de _PARAM0_ a _PARAM2_","Gravity":"Gravedad","Modify the gravity":"Modifica la fuerza de gravedad","Set gravity force to _PARAM2_;_PARAM3_":"Igualar la fuerza de gravedad a _PARAM2_;_PARAM3_","Global options":"Opciones globales","Change the X scale of a collision polygon":"Escala en X de un pol\xEDgono de colisi\xF3n","Change the X scale of the polygon. Use a value greater than 1 to enlarge the polygon, less than 1 to reduce it.":"Modifica la escala en X del pol\xEDgono de colisi\xF3n. Utiliza un valor mayor a 1 para aumentar el ancho del pol\xEDgono, y menor a 1 para reducirlo.","Change the X scale of the collision polygon of _PARAM0_ to _PARAM2_":"Cambiar la escala en X del pol\xEDgono de colisi\xF3n de _PARAM0_ a _PARAM2_","Collision polygon":"Pol\xEDgono de colisi\xF3n","Scale":"Escala","Change the Y scale of a collision polygon":"Escala en Y de un pol\xEDgono de colisi\xF3n","Change the Y scale of the polygon. Use a value greater than 1 to enlarge the polygon, less than 1 to reduce it.":"Modifica la escala en Y del pol\xEDgono de colisi\xF3n. Utiliza un valor mayor a 1 para aumentar el alto del pol\xEDgono, y menor a 1 para reducirlo.","Change the Y scale of the collision polygon of _PARAM0_ Y to _PARAM2_":"Cambiar la escala en Y del pol\xEDgono de colisi\xF3n de _PARAM0_ a _PARAM2_","Collision polygon X scale":"Escala en X del pol\xEDgono de colisi\xF3n","Test the value of the X scale of the collision polygon.":"Comprueba la escala en X del pol\xEDgono de colisi\xF3n.","the X scale of the collision polygon":"la escala en X del pol\xEDgono de colisi\xF3n","Collision polygon Y scale":"Escala en Y del pol\xEDgono de colisi\xF3n","Test the value of the Y scale of the collision polygon.":"Comprueba la escala en Y del pol\xEDgono de colisi\xF3n.","the Y scale of the collision polygon":"la escala Y del pol\xEDgono de colisi\xF3n","Tiled Sprite Object":"Objeto Mosaico","Tiled Sprite":"Mosaico","Displays an image repeated over an area.":"Muestra una imagen repetida sobre un \xE1rea.","Opacity":"Opacidad","Compare the opacity of a Tiled Sprite, between 0 (fully transparent) to 255 (opaque).":"Compara la opacidad de un sprite de teselas, entre 0 (completamente transparente) a 255 (opaco).","the opacity":"la opacidad","Visibility":"Visibilidad","Change Tiled Sprite opacity":"Cambia la opacidad de un sprite de teselas","Change the opacity of a Tiled Sprite. 0 is fully transparent, 255 is opaque (default).":"Cambia la opacidad de un sprite de teselas. 0 es completamente transparente, 255 es opaco (por defecto).","Tint color":"Color de tinte","Change the tint of a Tiled Sprite. The default color is white.":"Cambia el tinte de un sprite de teselas. El color predeterminado es blanco.","Change tint of _PARAM0_ to _PARAM1_":"Cambia el tinte de _PARAM0_ a _PARAM1_","Tint":"Tinta","Modify the width of a Tiled Sprite.":"Modifica el ancho del objeto Mosaico.","the width":"el ancho","Test the width of a Tiled Sprite.":"Eval\xFAa el ancho del objeto Mosaico.","Modify the height of a Tiled Sprite.":"Modifica el alto del objeto Mosaico.","the height":"la altura","Test the height of a Tiled Sprite.":"Eval\xFAa el alto del objeto Mosaico.","Modify the size of a Tiled Sprite.":"Modificar el tama\xF1o de un Sprite embaldosado.","Change the size of _PARAM0_: set to _PARAM1_x_PARAM2_":"Cambiar el tama\xF1o de _PARAM0_: a _PARAM1_x_PARAM2_","Modify the angle of a Tiled Sprite.":"Modifica el \xE1ngulo del objeto Mosaico.","the angle":"el \xE1ngulo","Image X Offset":"Desplazamiento en X de la imagen","Modify the offset used on the X axis when displaying the image.":"Modifica el desplazamiento en el eje X usado cuando se visualiza la imagen.","the X offset":"el desplazamiento X","Image offset":"Desplazamiento de la imagen","Test the offset used on the X axis when displaying the image.":"Eval\xFAa el desplazamiento en el eje X usado cuando se visualiza la imagen.","Image Y Offset":"Desplazamiento en Y de la imagen","Modify the offset used on the Y axis when displaying the image.":"Modifica el desplazamiento en el eje Y usado cuando se visualiza la imagen.","the Y offset":"el desplazamiento Y","Test the offset used on the Y axis when displaying the image.":"Eval\xFAa el desplazamiento en el eje Y usado cuando se visualiza la imagen.","Window left":"Izquierda de la ventana","Window right":"Derecha de la ventana","Proportional":"Proporcional","No anchor":"Sin anclaje","Window top":"Superior de la ventana","Window bottom":"Inferior de la ventana","relativeToOriginalWindowSize":"relativo al tama\xF1o original de la ventana","Anchor relatively to original window size":"Anclar relativamente al tama\xF1o de la ventana original","otherwise, objects are anchored according to the window size when the object is created.":"sino, los objetos se anclan en funci\xF3n del tama\xF1o de la ventana cuando se crea el objeto.","Left edge anchor":"Anclaje del lado izquierdo","Use this to anchor the object on X axis.":"Usa esto para anclar el objeto en el eje X.","Right edge anchor":"Anclaje del lado derecho","Top edge anchor":"Anclaje del lado superior","Use this to anchor the object on Y axis.":"Usa esto para anclar el objeto en el eje Y.","Bottom edge anchor":"Anclaje del lado inferior","Anchor":"Anclaje","Anchor objects to the window's bounds.":"Ancla objetos a los bordes de la ventana.","Panel Sprite (9-patch) Object":"Objeto Panel de Sprite (9-patch)","Panel Sprite (\"9-patch\")":"Panel de Sprite (\"9-patch\")","An image with edges and corners that are stretched separately from the full image.":"Una imagen con bordes y esquinas que se estiran de forma independiente de la imagen completa.","Compare the opacity of a Panel Sprite, between 0 (fully transparent) to 255 (opaque).":"Comparar la opacidad de un Sprite de Panel, entre 0 (totalmente transparente) a 255 (opaco).","Change Panel Sprite opacity":"Cambiar opacidad del Sprite de Panel","Change the opacity of a Panel Sprite. 0 is fully transparent, 255 is opaque (default).":"Cambia la opacidad de un Sprite de Panel. 0 es completamente transparente, 255 es opaco (por defecto).","Panel Sprite":"Sprite de Panel","Change the tint of a Panel Sprite. The default color is white.":"Cambia el tono de un objeto del panel. El color predeterminado es blanco.","Modify the width of a Panel Sprite.":"Modifica el ancho del objeto Panel.","Size and angle":"Tama\xF1o y \xE1ngulo","Check the width of a Panel Sprite.":"Eval\xFAa el ancho de un objeto Panel.","Modify the height of a Panel Sprite.":"Mpdifica el alto de un objeto Panel.","Check the height of a Panel Sprite.":"Eval\xFAa el alto de un objeto Panel.","Image name":"Nombre de imagen","Change the image of a Panel Sprite.":"Cambia la imgagen de un objeto Panel.","Set image _PARAM1_ on _PARAM0_":"Establecer la imagen _PARAM1_ en _PARAM0_","Destroy Outside Screen Behavior":"Comportamiento Destruir Fuera de Pantalla","This behavior can be used to destroy objects when they go outside of the bounds of the camera. Useful for bullets or other short-lived objects.":"Este comportamiento se puede utilizar para destruir objetos cuando salen fuera de los l\xEDmites de la c\xE1mara. \xDAtil para balas u otros objetos de breve existencia.","Destroy when outside of the screen":"Destruir cuando sale fuera de pantalla","DestroyOutside":"Destruir Fuera","Destroy objects automatically when they go outside of the screen's borders.":"Destruye objetos autom\xE1ticamente cuando salen de los bordes de la pantalla.","Additional border":"Bordes adicionales","Compare the additional border that the object must cross before being deleted.":"Eval\xFAa el borde adicional que el objeto debe superar antes de ser eliminado.","the additional border":"el borde adicional","Change the additional border that the object must cross before being deleted.":"Modifica el borde adicional que el objeto debe superar antes de ser eliminado.","Margin before deleting the object, in pixels":"Margen antes de eliminar el objeto, en p\xEDxeles","Inventories":"Inventarios","Provides actions and conditions to add an inventory to your game, with items in memory.":"Provee condiciones y acciones para agregar un inventario a tu juego, con \xEDtems en la memoria.","Add an item":"Agregar un \xEDtem","Add an item in an inventory.":"Agrega un \xEDtem en un inventario.","Add a _PARAM2_ to inventory _PARAM1_":"Agregar _PARAM2_ al inventario _PARAM1_","Inventory name":"Nombre del inventario","Item name":"Nombre del \xEDtem","Remove an item":"Eliminar un \xEDtem","Remove an item from an inventory.":"Elimina un \xEDtem de un inventario.","Remove a _PARAM2_ from inventory _PARAM1_":"Eliminar _PARAM2_ del inventario _PARAM1_","Item count":"Cantidad de un \xEDtem","Compare the number of an item in an inventory.":"Eval\xFAa la cantidad de un \xEDtem en un inventario.","the count of _PARAM2_ in _PARAM1_":"el recuento de _PARAM2_ en _PARAM1_","Has an item":"Tiene un \xEDtem","Check if at least one of the specified items is in the inventory.":"Eval\xFAa si al menos un \xEDtem del tipo especificado est\xE1 en el inventario.","Inventory _PARAM1_ contains a _PARAM2_":"El inventario _PARAM1_ contiene _PARAM2_","Set a maximum count for an item":"Cantidad m\xE1xima para un \xEDtem","Set the maximum number of the specified item that can be added in the inventory. By default, the number allowed for each item is unlimited.":"Establece la cantidad m\xE1xima del \xEDtem especificado que puede ser agregado en el inventario. Por defecto, la cantidad permitida de cada \xEDtem es ilimitada.","Set the maximum count for _PARAM2_ in inventory _PARAM1_ to _PARAM3_":"Establecer la cantidad m\xE1xima para _PARAM2_ en el inventario _PARAM1_ en _PARAM3_","Maximum count":"Cantidad m\xE1xima","Set unlimited count for an item":"Cantidad ilimitada para un \xEDtem","Allow an unlimited amount of an object to be in an inventory. This is the case by default for each item.":"Permite agregar una cantidad ilimitada de un \xEDtem a un inventario. Esta es la situaci\xF3n por defecto para cada \xEDtem.","Allow an unlimited count of _PARAM2_ in inventory _PARAM1_: _PARAM3_":"Permitir una cantidad ilimitada de _PARAM2_ en el inventario _PARAM1_: _PARAM3_","Allow an unlimited amount?":"\xBFPermitir una cantidad ilimitada?","Item full":"\xCDtem completo","Check if an item has reached its maximum number allowed in the inventory.":"Eval\xFAa si un \xEDtem ha alcanzado su m\xE1xima cantidad permitida en el inventario.","Inventory _PARAM1_ is full of _PARAM2_":"Inventario _PARAM1_ est\xE1 completo de _PARAM2_","Equip an item":"Equipar un \xEDtem","Mark an item as being equipped. If the item count is 0, it won't be marked as equipped.":"Marca un \xEDtem como equipado. Si la cantidad de este \xEDtem en el inventario es 0, no se marcar\xE1 como equipado.","Set _PARAM2_ as equipped in inventory _PARAM1_: _PARAM3_":"Marcar _PARAM2_ como equipado en el inventario _PARAM1_: _PARAM3_","Equip?":"\xBFEquipar?","Item equipped":"\xCDtem equipado","Check if an item is equipped.":"Eval\xFAa si un \xEDtem est\xE1 equipado.","_PARAM2_ is equipped in inventory _PARAM1_":"_PARAM2_ est\xE1 equipado en el inventario _PARAM1_","Save an inventory in a scene variable":"Guardar un inventario en una variable de escena","Save all the items of the inventory in a scene variable, so that it can be restored later.":"Guardar todos los elementos del inventario en una variable de escena, para que pueda ser restaurado m\xE1s tarde.","Save inventory _PARAM1_ in variable _PARAM2_":"Guardar inventario _PARAM1_ en la variable _PARAM2_","Load an inventory from a scene variable":"Cargar un inventario desde una variable de escena","Load the content of the inventory from a scene variable.":"Carga el contenido del inventario desde una variable de escena.","Load inventory _PARAM1_ from variable _PARAM2_":"Cargar el inventario _PARAM1_ desde la variable _PARAM2_","Get the number of an item in the inventory":"Obtener la cantidad de un \xEDtem en el inventario","Jump":"saltar","Jump speed":"Velocidad de salto","Jump sustain time":"Tiempo de salto sostenido","Maximum time (in seconds) during which the jump strength is sustained if the jump key is held - allowing variable height jumps.":"Tiempo m\xE1ximo (en segundos) durante el cual la fuerza del salto se mantiene si se mantiene pulsada la tecla de salto - permitiendo saltos de alturas variables.","Max. falling speed":"Velocidad de ca\xEDda m\xE1x.","Ladder climbing speed":"Velocidad de escalada","Ladder":"Escalera","Acceleration":"Aceleraci\xF3n","Walk":"caminar","Deceleration":"Desaceleraci\xF3n","Max. speed":"Velocidad m\xE1x.","Default controls":"Controles por defecto","Slope max. angle":"\xC1ngulo m\xE1x. de pendiente","Can grab platform ledges":"Puede sujetar bordes","Ledge":"repisa","Automatically grab platform ledges without having to move horizontally":"Agarra autom\xE1ticamente los bordes de la plataforma sin tener que moverse horizontalmente","Grab offset on Y axis":"Desplazamiento en Y del agarre","Grab tolerance on X axis":"Tolerancia en X del agarre","Use frame rate dependent trajectories (deprecated, it's recommended to let this unchecked)":"Usar trayectorias dependientes de la tasa de fotogramas (obsoleto, se recomienda dejar esto sin marcar)","Deprecated options (advanced)":"Opciones obsoletas (avanzado)","Can go down from jumpthru platforms":"Puede descender desde plataformas de salto","Platform":"Plataforma","Jumpthru platform":"Plataforma atravesable","Ledges can be grabbed":"Los bordes pueden ser agarrados","Platform behavior":"Comportamiento de Plataforma","Platformer character":"Objeto que se desplaza sobre plataformas","Jump and run on platforms.":"Salta y corre en las plataformas.","Is moving":"Est\xE1 en movimiento","Check if the object is moving (whether it is on the floor or in the air).":"Eval\xFAa si el objeto est\xE1 en movimiento ( tanto en el suelo como en el aire ).","_PARAM0_ is moving":"_PARAM0_ est\xE1 en movimiento","Is on floor":"Est\xE1 sobre el suelo","Check if the object is on a platform.":"Eval\xFAa si el objeto est\xE1 sobre una plataforma.","_PARAM0_ is on floor":"_PARAM0_ est\xE1 sobre el suelo","Is on ladder":"Est\xE1 en una escalera","Check if the object is on a ladder.":"Eval\xFAa si el objeto est\xE1 en una escalera.","_PARAM0_ is on ladder":"_PARAM0_ est\xE1 en una escalera","Is jumping":"Est\xE1 saltando","Check if the object is jumping.":"Eval\xFAa si el objeto est\xE1 saltando.","_PARAM0_ is jumping":"_PARAM0_ est\xE1 saltando","Is falling":"Est\xE1 cayendo","Check if the object is falling.\nNote that the object can be flagged as jumping and falling at the same time: at the end of a jump, the fall speed becomes higher than the jump speed.":"Eval\xFAa si el objeto est\xE1 cayendo.\nTen en cuenta que un objeto puede estar marcado como saltando y cayendo al mismo tiempo: al final de un salto, la velocidad de ca\xEDda se vuelve mayor que la velocidad de salto.","_PARAM0_ is falling":"_PARAM0_ est\xE1 cayendo","Is grabbing platform ledge":"Est\xE1 sujetando un borde","Check if the object is grabbing a platform ledge.":"Eval\xFAa si el objeto est\xE1 sujetando el borde de una plataforma.","_PARAM0_ is grabbing a platform ledge":"_PARAM0_ est\xE1 sujetando el borde de una plataforma","Compare the gravity applied on the object (in pixels per second per second).":"Eval\xFAa la gravedad aplicada sobre el objeto ( en p\xEDxeles por segundo por segundo ).","the gravity":"la gravedad","Change the gravity applied on an object (in pixels per second per second).":"Modifica la gravedad aplicada sobre el objeto ( en p\xEDxeles por segundo por segundo ).","Maximum falling speed":"Velocidad de ca\xEDda m\xE1xima","Compare the maximum falling speed of the object (in pixels per second).":"Eval\xFAa la velocidad de ca\xEDda m\xE1xima del objeto ( en p\xEDxeles por segundo ).","the maximum falling speed":"la velocidad m\xE1xima de ca\xEDda","Change the maximum falling speed of an object (in pixels per second).":"Modifica la velocidad de ca\xEDda m\xE1xima del objeto ( en p\xEDxeles por segundo ).","If jumping, try to preserve the current speed in the air":"Si salta, trate de preservar la velocidad actual en el aire","Compare the ladder climbing speed (in pixels per second).":"Compara la velocidad de escalada (en p\xEDxeles por segundo).","the ladder climbing speed":"la velocidad de escalada","Change the ladder climbing speed (in pixels per second).":"Cambia la velocidad de escalada (en p\xEDxeles por segundo).","Compare the horizontal acceleration of the object (in pixels per second per second).":"Eval\xFAa la aceleraci\xF3n del objeto (en p\xEDxeles por segundo por segundo).","the horizontal acceleration":"la aceleraci\xF3n horizontal","Change the horizontal acceleration of an object (in pixels per second per second).":"Cambia la aceleraci\xF3n horizontal de un objeto (en p\xEDxeles por segundo).","Compare the horizontal deceleration of the object (in pixels per second per second).":"Compara la desaceleraci\xF3n horizontal del objeto (en p\xEDxeles por segundo por segundo).","the horizontal deceleration":"la desaceleraci\xF3n horizontal","Change the horizontal deceleration of an object (in pixels per second per second).":"Cambia la desaceleraci\xF3n horizontal de un objeto (en p\xEDxeles por segundo por segundo).","Maximum horizontal speed":"Velocidad m\xE1xima horizontal","Compare the maximum horizontal speed of the object (in pixels per second).":"Compara la velocidad horizontal m\xE1xima del objeto (en p\xEDxeles por segundo).","the maximum horizontal speed":"la velocidad m\xE1xima horizontal","Change the maximum horizontal speed of an object (in pixels per second).":"Cambia la velocidad horizontal m\xE1xima de un objeto (en p\xEDxeles por segundo).","Compare the jump speed of the object (in pixels per second).Its value is always positive.":"Compara la velocidad de salto del objeto (en p\xEDxeles por segundo).Su valor es siempre positivo.","the jump speed":"la velocidad de salto","Change the jump speed of an object (in pixels per second). Its value is always positive.":"Cambia la velocidad de salto de un objeto (en p\xEDxeles por segundo). Su valor es siempre positivo.","Compare the jump sustain time of the object (in seconds).This is the time during which keeping the jump button held allow the initial jump speed to be maintained.":"Compara El tiempo de salto del objeto (en segundos). El tiempo durante El cual mantener pulsado El bot\xF3n de salto permite mantener la velocidad de salto inicial.","the jump sustain time":"tiempo de salto sostenido","Change the jump sustain time of an object (in seconds). This is the time during which keeping the jump button held allow the initial jump speed to be maintained.":"Cambia el tiempo de salto sostenido de un objeto (en segundos). Este es el tiempo durante el cual mantener pulsado el bot\xF3n de salto permite mantener la velocidad de salto inicial.","Allow jumping again":"Permite saltar de nuevo","When this action is executed, the object is able to jump again, even if it is in the air: this can be useful to allow a double jump for example. This is not a permanent effect: you must call again this action everytime you want to allow the object to jump (apart if it's on the floor).":"Cuando se ejecuta esta acci\xF3n, el objeto es capaz de saltar de nuevo, incluso si est\xE1 en el aire: esto puede ser \xFAtil para permitir un doble salto, por ejemplo. Este no es un efecto permanente: debes llamar de nuevo esta acci\xF3n cada vez que quieras permitir que el objeto salte (aparte si est\xE1 en el piso).","Allow _PARAM0_ to jump again":"Permitir a _PARAM0_ saltar nuevamente","Forbid jumping again in the air":"Prohibe saltar de nuevo en el aire","This revokes the effect of \"Allow jumping again\". The object is made unable to jump while in mid air. This has no effect if the object is not in the air.":"Esto revoca el efecto de \"Permitir saltar de nuevo\". El objeto no puede saltar mientras est\xE1 en el aire. Esto no tiene efecto si el objeto no est\xE1 en el aire.","Forbid _PARAM0_ to air jump":"Prohibir a _PARAM0_ el salto en el aire","Abort jump":"Cancelar salto","Abort the current jump and stop the object vertically. This action doesn't have any effect when the character is not jumping.":"Cancelar el salto actual y detener el objeto verticalmente. Est\xE1 acci\xF3n no tiene ning\xFAn efecto cuando el personaje no est\xE1 saltando.","Abort the current jump of _PARAM0_":"Cancelar el actual salto de _PARAM0_","Can jump":"Puede saltar","Check if the object can jump.":"Eval\xFAa si el objeto puede saltar.","_PARAM0_ can jump":"_PARAM0_ puede saltar","Simulate left key press":"Simular tecla Izquierda","Simulate a press of the left key.":"Simula que se ha presionado la tecla Izquierda.","Simulate pressing Left for _PARAM0_":"Simular tecla Izquierda para _PARAM0_","Controls":"Controles","Simulate right key press":"Simular tecla Derecha","Simulate a press of the right key.":"Simula que se ha presionado la tecla Derecha.","Simulate pressing Right for _PARAM0_":"Simular tecla Derecha para _PARAM0_","Simulate up key press":"Simular tecla Arriba","Simulate a press of the up key (used when on a ladder).":"Simula que se ha presionado la tecla Arriba (utilizada en las escaleras).","Simulate pressing Up for _PARAM0_":"Simular tecla Arriba para _PARAM0_","Simulate down key press":"Simular tecla Abajo","Simulate a press of the down key (used when on a ladder).":"Simula que se ha presionado la tecla Abajo (utilizada en las escaleras).","Simulate pressing Down for _PARAM0_":"Simular tecla Abajo para _PARAM0_","Simulate ladder key press":"Simular tecla Escalera","Simulate a press of the ladder key (used to grab a ladder).":"Simula que se ha presionado la tecla Escalera (utilizada para sujetar escaleras).","Simulate pressing Ladder key for _PARAM0_":"Simular tecla Escalera para _PARAM0_","Simulate release ladder key press":"Simular soltar escalera al presionar tecla","Simulate a press of the Release Ladder key (used to get off a ladder).":"Simula que se ha presionado la tecla Escalera (utilizada para sujetar escaleras).","Simulate pressing Release Ladder key for _PARAM0_":"Simular que se presiona la tecla Soltar Escalera","Simulate jump key press":"Simular tecla Salto","Simulate a press of the jump key.":"Simula que se ha presionado la tecla Salto.","Simulate pressing Jump key for _PARAM0_":"Simular tecla Salto para _PARAM0_","Simulate release platform key press":"Simula soltar la tecla de la plataforma","Simulate a press of the release platform key (used when grabbing a platform ledge).":"Simula la pulsaci\xF3n de la tecla de liberaci\xF3n de la plataforma (usada al agarrar un borde de la plataforma).","Simulate pressing Release Platform key for _PARAM0_":"Simular tecla presionada para soltar plataforma para _PARAM0_","Simulate control":"Simular una tecla","Simulate a press of a key.\nValid keys are Left, Right, Jump, Ladder, Release Ladder, Up, Down.":"Simula que se ha pulsado una tecla.\nLas teclas v\xE1lidas son Izquierda, Derecha, Salto, Escalera, Soltar escalera, Arriba, Abajo.","Simulate pressing _PARAM2_ key for _PARAM0_":"Simular que se ha presionado la tecla _PARAM2_ para _PARAM0_","Key":"Tecla","Control pressed or simulated":"Control presionado o simulado","A control was applied from a default control or simulated by an action.":"Un control fue aplicado desde un control por defecto o simulado por una acci\xF3n.","_PARAM0_ has the _PARAM2_ key pressed or simulated":"_PARAM0_ tiene la tecla _PARAM2_ presionada o simulada","Ignore default controls":"Ignorar controles por defecto","De/activate the use of default controls.\nIf deactivated, use the simulated actions to move the object.":"Des/activa el uso de los controles por defecto.\nSi est\xE1n desactivados, puedes utilizar las acciones para simular teclas y mover el objeto.","Ignore default controls for _PARAM0_: _PARAM2_":"Ignorar los controles por defecto para _PARAM0_ : _PARAM2_","Ignore controls":"Ignorar controles","Platform grabbing":"Capturaci\xF3n de plataforma","Enable (or disable) the ability of the object to grab platforms when falling near to one.":"Activa (o desactiva) la capacidad del objeto de agarrar plataformas cuando cae cerca de una.","Allow _PARAM0_ to grab platforms: _PARAM2_":"Permitir a _PARAM0_ tomar plataformas: _PARAM2_","Can grab platforms":"Puede agarrar plataformas","Check if the object can grab the platforms.":"Eval\xFAa si el objeto puede tomar las plataformas.","_PARAM0_ can grab the platforms":"_PARAM0_ puede tomar las plataformas","Current falling speed":"Velocidad de ca\xEDda actual","Change the current falling speed of the object (in pixels per second). This action doesn't have any effect when the character is not falling or is in the first phase of a jump.":"Cambia la velocidad actual de ca\xEDda del objeto (en p\xEDxeles por segundo). Esta acci\xF3n no tiene ning\xFAn efecto cuando el personaje no est\xE1 cayendo o est\xE1 en la primera fase de un salto.","the current falling speed":"la velocidad de ca\xEDda actual","Compare the current falling speed of the object (in pixels per second). Its value is always positive.":"Compara la velocidad de ca\xEDda actual del objeto (en p\xEDxeles por segundo). Su valor es siempre positivo.","Current jump speed":"Velocidad de salto actual","Compare the current jump speed of the object (in pixels per second). Its value is always positive.":"Compara la velocidad de salto actual del objeto (en p\xEDxeles por segundo). Su valor es siempre positivo.","the current jump speed":"la velocidad de salto actual","Current horizontal speed":"Velocidad horizontal actual","Change the current horizontal speed of the object (in pixels per second). The object moves to the left with negative values and to the right with positive ones":"Cambia la velocidad horizontal actual del objeto (en p\xEDxeles por segundo). El objeto se mueve a la izquierda con valores negativos y a la derecha con valores positivos","the current horizontal speed":"la velocidad horizontal actual","Compare the current horizontal speed of the object (in pixels per second). The object moves to the left with negative values and to the right with positive ones":"Compara la velocidad horizontal actual del objeto (en p\xEDxeles por segundo). El objeto se mueve a la izquierda con valores negativos y a la derecha con valores positivos","Return the gravity applied on the object (in pixels per second per second).":"Devuelve la gravedad aplicada en el objeto (en p\xEDxeles por segundo por segundo).","Return the maximum falling speed of the object (in pixels per second).":"Devuelve la velocidad m\xE1xima de ca\xEDda del objeto (en p\xEDxeles por segundo).","Return the ladder climbing speed of the object (in pixels per second).":"Devuelve la velocidad de escalada del objeto (en p\xEDxeles por segundo).","Return the horizontal acceleration of the object (in pixels per second per second).":"Devuelve la aceleraci\xF3n horizontal del objeto (en p\xEDxeles por segundo por segundo).","Return the horizontal deceleration of the object (in pixels per second per second).":"Devuelve la desaceleraci\xF3n horizontal del objeto (en p\xEDxeles por segundo por segundo).","Return the maximum horizontal speed of the object (in pixels per second).":"Devuelve la velocidad horizontal m\xE1xima del objeto (en p\xEDxeles por segundo).","Return the jump speed of the object (in pixels per second). Its value is always positive.":"Devuelve la velocidad de salto del objeto (en p\xEDxeles por segundo). Su valor es siempre positivo.","Return the jump sustain time of the object (in seconds).This is the time during which keeping the jump button held allow the initial jump speed to be maintained.":"Devuelve el tiempo de salto sostenido del objeto (en segundos). Este es el tiempo durante el cual mantener pulsado el bot\xF3n de salto permite mantener la velocidad de salto inicial.","Current fall speed":"Velocidad de ca\xEDda actual","Return the current fall speed of the object (in pixels per second). Its value is always positive.":"Devuelve la velocidad de ca\xEDda actual del objeto (en p\xEDxeles por segundo). Su valor es siempre positivo.","Return the current horizontal speed of the object (in pixels per second). The object moves to the left with negative values and to the right with positive ones":"Devuelve la velocidad horizontal actual del objeto (en p\xEDxeles por segundo). El objeto se mueve a la izquierda con valores negativos y a la derecha con valores positivos","Return the current jump speed of the object (in pixels per second). Its value is always positive.":"Devuelve la velocidad de salto actual del objeto (en p\xEDxeles por segundo). Su valor es siempre positivo.","Flag objects as being platforms where characters can run on.":"Marca los objetos como plataformas en las que los personajes pueden correr.","Change platform type":"Cambiar el tipo de plataforma","Change the platform type of the object: Platform, Jump-Through, or Ladder.":"Cambia el tipo de plataforma del objeto: plataforma, jump-through (atravesable desde abajo), o escalera.","Set platform type of _PARAM0_ to _PARAM2_":"Establecer el tipo de plataforma de _PARAM0_ en _PARAM2_","Platform type (\"Platform\", \"Jumpthru\" or \"Ladder\")":"Tipo de plataforma (\"Platform\", \"Jumpthru\" o \"Ladder\")","Is object on given floor":"Es un objeto en un suelo determinado","Test if an object is on a given floor.":"Comprueba si un objeto est\xE1 en un suelo determinado.","_PARAM0_ is on floor _PARAM2_":"_PARAM0_ est\xE1 en el suelo _PARAM2_","Platforms":"Plataformas","Shape painter":"Pintor de Formas","This provides an object that can be used to draw arbitrary shapes on the screen using events.":"Esto proporciona un objeto que puede ser usado para dibujar formas arbitrarias en la pantalla usando eventos.","Allows you to draw simple shapes on the screen":"Te permite dibujar formas simples en la pantalla","Rectangle":"Rect\xE1ngulo","Draw a rectangle on screen":"Dibuja un rect\xE1ngulo en la pantalla","Draw from _PARAM1_;_PARAM2_ to _PARAM3_;_PARAM4_ a rectangle with _PARAM0_":"Dibujar desde _PARAM1_;_PARAM2_ a _PARAM3_;_PARAM4_ un rect\xE1ngulo con _PARAM0_","Drawing":"Dibujante","Shape Painter object":"Objeto Pintor de Formas","Left X position":"X posici\xF3n izquierda","Top Y position":"Posici\xF3n Y superior","Right X position":"posici\xF3n x derecha","Bottom Y position":"Posici\xF3n Y inferior","Draw a circle on screen":"Dibuja un c\xEDrculo en la pantalla","Draw at _PARAM1_;_PARAM2_ a circle of radius _PARAM3_ with _PARAM0_":"Dibujar en _PARAM1_;_PARAM2_ un c\xEDrculo de radio _PARAM3_ con _PARAM0_","X position of center":"Centro : Posici\xF3n X","Y position of center":"Centro : Posici\xF3n Y","Radius (in pixels)":"Radio (en p\xEDxeles)","X position of start point":"Posici\xF3n X del punto inicial","Y position of start point":"Posici\xF3n Y del punto inicial","X position of end point":"Posici\xF3n X del punto final","Y position of end point":"Posici\xF3n Y del punto final","Thickness (in pixels)":"Grosor (en p\xEDxeles)","Draw a line on screen":"Dibujar una l\xEDnea en la pantalla","Draw from _PARAM1_;_PARAM2_ to _PARAM3_;_PARAM4_ a line (thickness: _PARAM5_) with _PARAM0_":"Dibujar desde _PARAM1_;_PARAM2_ a _PARAM3_;_PARAM4_ una linea (grosor: _PARAM5_) con _PARAM0_","Ellipse":"Ellipse","Draw an ellipse on screen":"Dibujar una elipse en pantalla","Draw at _PARAM1_;_PARAM2_ an ellipse of width _PARAM3_ and height _PARAM4_ with _PARAM0_":"Dibujar en _PARAM1_;_PARAM2_ una elipse de ancho _PARAM3_ y altura _PARAM4_ con _PARAM0_","The width of the ellipse":"El ancho de la elipse","The height of the ellipse":"La altura de la elipse","Rounded rectangle":"Rect\xE1ngulo redondeado","Draw a rounded rectangle on screen":"Dibujar un rect\xE1ngulo redondeado en pantalla","Draw from _PARAM1_;_PARAM2_ to _PARAM3_;_PARAM4_ a rounded rectangle (radius: _PARAM5_) with _PARAM0_":"Dibujar de _PARAM1_;_PARAM2_ a _PARAM3_;_PARAM4_ un rect\xE1ngulo redondeado (radio: _PARAM5_) con _PARAM0_","Star":"Estrella","Draw a star on screen":"Dibujar una estrella en pantalla","Draw at _PARAM1_;_PARAM2_ a star with _PARAM3_ points and radius: _PARAM4_ (inner radius: _PARAM5_, rotation: _PARAM6_) with _PARAM0_":"Dibujar en _PARAM1_;_PARAM2_ una estrella con _PARAM3_ puntos y radio: _PARAM4_ (radio interno: _PARAM5_, rotaci\xF3n: _PARAM6_) con _PARAM0_","Number of points of the star (minimum: 2)":"N\xFAmero de puntos de la estrella (m\xEDnimo: 2)","Inner radius (in pixels, half radius by default)":"Radio interior (en p\xEDxeles, medio radio por defecto)","Rotation (in degrees)":"Rotaci\xF3n (en grados)","Arc":"Arco","Draw an arc on screen. If \"Close path\" is set to yes, a line will be drawn between the start and end point of the arc, closing the shape.":"Dibuja un arco en la pantalla. Si \"Cerrar ruta\" se pone a s\xED, se dibujar\xE1 una l\xEDnea entre el punto de inicio y el punto final del arco, cerrando la forma.","Draw at _PARAM1_;_PARAM2_ an arc with radius: _PARAM3_, start angle: _PARAM4_, end angle: _PARAM5_ (anticlockwise: _PARAM6_, close path: _PARAM7_) with _PARAM0_":"Dibujar en _PARAM1_;_PARAM2_ un arco con radio: _PARAM3_, \xE1ngulo de inicio: _PARAM4_, \xE1ngulo final: _PARAM5_ (anticlockwise: _PARAM6_, cerrar ruta: _PARAM7_) con _PARAM0_","Start angle of the arc (in degrees)":"\xC1ngulo inicial del arco (en grados)","End angle of the arc (in degrees)":"\xC1ngulo final del arco (en grados)","Anticlockwise":"En sentido antihorario","Close path":"Cerrar ruta","Bezier curve":"Curva B\xE9zier","Draw a bezier curve on screen":"Dibujar una curva de bezier en la pantalla","Draw from _PARAM1_;_PARAM2_ to _PARAM7_;_PARAM8_ a bezier curve (first control point: _PARAM3_;_PARAM4_, second control point: _PARAM5_;_PARAM6_) with _PARAM0_":"Dibuja de _PARAM1_;_PARAM2_ a _PARAM7_;_PARAM8_ una curva de bezier (primer punto de control: _PARAM3_;_PARAM4_, segundo punto de control: _PARAM5_;_PARAM6_) con _PARAM0_","First control point x":"Primer punto de control x","First control point y":"Primer punto de control y","Second Control point x":"Segundo punto de control x","Second Control point y":"Segundo punto de control y","Destination point x":"Punto de destino x","Destination point y":"Punto de destino y","Quadratic curve":"Curva cuadr\xE1tica","Draw a quadratic curve on screen":"Dibujar una curva cuadr\xE1tica en la pantalla","Draw from _PARAM1_;_PARAM2_ to _PARAM5_;_PARAM6_ a quadratic curve (control point: _PARAM3_;_PARAM4_) with _PARAM0_":"Dibuja de _PARAM1_;_PARAM2_ a _PARAM5_;_PARAM6_ una curva cuadr\xE1tica (punto de control: _PARAM3_;_PARAM4_) con _PARAM0_","Control point x":"Punto de control x","Control point y":"Punto de control y","Begin fill path":"Iniciar ruta de relleno","Begin to draw a simple one-color fill. Subsequent actions, such as \"Path line\" (in the Advanced category) can be used to draw. Be sure to use \"End fill path\" action when you're done drawing the shape.":"Comienza a dibujar un relleno simple de un color. Las acciones posteriores, como \"L\xEDnea de ruta\" (en la categor\xEDa Avanzada) pueden ser utilizadas para dibujar. Aseg\xFArate de usar la acci\xF3n \"Finalizar la ruta de relleno\" cuando hayas hecho el dibujo de la forma.","Begins drawing filling of an advanced path with _PARAM0_ (start: _PARAM1_;_PARAM2_)":"Comienza a rellenar una ruta avanzada con _PARAM0_ (inicio: _PARAM1_;_PARAM2_)","Start drawing x":"Comenzar dibujando x","Start drawing y":"Comenzar dibujando y","End fill path":"Fin de la ruta de relleno","Finish the filling drawing in an advanced path":"Terminar el relleno del dibujo en una ruta avanzada","Finish the filling drawing in an advanced path with _PARAM0_":"Termina el dibujo de relleno en una ruta avanzada con _PARAM0_","Move path drawing position":"Mover posici\xF3n de dibujo de ruta","Move the drawing position for the current path":"Mover la posici\xF3n de dibujo para la ruta actual","Move the drawing position of the path to _PARAM1_;_PARAM2_ with _PARAM0_":"Mueve la posici\xF3n de dibujo de la ruta a _PARAM1_;_PARAM2_ con _PARAM0_","Path line":"L\xEDnea de ruta","Add to a path a line to a position. The origin comes from the previous action or from \"Begin fill path\" or \"Move path drawing position\". By default, the start position will be the object's position.":"A\xF1ade a una ruta una l\xEDnea a una posici\xF3n. El origen proviene de la acci\xF3n anterior o de \"Comenzar la ruta de relleno\" o \"Mover posici\xF3n de trazado de ruta\". Por defecto, la posici\xF3n de inicio ser\xE1 la posici\xF3n del objeto.","Add to a path a line to the position _PARAM1_;_PARAM2_ with _PARAM0_":"A\xF1adir a una ruta una l\xEDnea en la posici\xF3n _PARAM1_;_PARAM2_ con _PARAM0_","Path bezier curve":"Ruta de curva de bezier","Add to a path a bezier curve to a position. The origin comes from the previous action or from \"Begin fill path\" or \"Move path drawing position\". By default, the start position will be the object's position.":"A\xF1ade a una ruta una curva de bezier a una posici\xF3n. El origen proviene de la acci\xF3n anterior o de \"Comenzar la ruta de relleno\" o \"Mover posici\xF3n de trazado de ruta\". Por defecto, la posici\xF3n de inicio ser\xE1 la posici\xF3n del objeto.","Add to a path a bezier curve to the position _PARAM5_;_PARAM6_ (first control point: _PARAM1_;_PARAM2_, second control point: _PARAM3_;_PARAM4_) with _PARAM0_":"A\xF1adir a una ruta una curva de bezier a la posici\xF3n _PARAM5_;_PARAM6_ (primer punto de control: _PARAM1_;_PARAM2_, segundo punto de control: _PARAM3_;_PARAM4_) con _PARAM0_","Path arc":"Ruta de arco","Add to a path an arc to a position. The origin comes from the previous action or from \"Begin fill path\" or \"Move path drawing position\". By default, the start position will be the object's position.":"A\xF1ade a una ruta de arco a una posici\xF3n. El origen proviene de la acci\xF3n anterior o de \"Comenzar la ruta de relleno\" o \"Mover posici\xF3n de trazado de ruta\". Por defecto, la posici\xF3n de inicio ser\xE1 la posici\xF3n del objeto.","Add to a path an arc at the position _PARAM1_;_PARAM2_ (radius: _PARAM3_, start angle: _PARAM4_, end angle: _PARAM5_, anticlockwise: _PARAM6_) with _PARAM0_":"A\xF1adir a una ruta un arco en la posici\xF3n _PARAM1_;_PARAM2_ (radio: _PARAM3_, \xE1ngulo de inicio: _PARAM4_, \xE1ngulo final: _PARAM5_, anticlockwise: _PARAM6_) con _PARAM0_","Center x of circle":"Centro x del c\xEDrculo","Center y of circle":"Centro y del c\xEDrculo","Start angle":"\xC1ngulo inicial","End angle":"\xC1ngulo final","Path quadratic curve":"Curva cuadr\xE1tica","Add to a path a quadratic curve to a position. The origin comes from the previous action or from \"Begin fill path\" or \"Move path drawing position\". By default, the start position will be the object's position.":"A\xF1ade a una ruta una curva cuadratica a una posici\xF3n. El origen proviene de la acci\xF3n anterior o de \"Comenzar la ruta de relleno\" o \"Mover posici\xF3n de trazado de ruta\". Por defecto, la posici\xF3n de inicio ser\xE1 la posici\xF3n del objeto.","Add to a path a quadratic curve to the position _PARAM3_;_PARAM4_ (control point: _PARAM1_;_PARAM2_) with _PARAM0_":"A\xF1adir a una ruta una curva cuadr\xE1tica a la posici\xF3n _PARAM3_;_PARAM4_ (punto de control: _PARAM1_;_PARAM2_) con _PARAM0_","Close Path":"Cerrar ruta","Close the path of the advanced shape. This closes the outline between the last and the first point.":"Cerrar la ruta de la forma avanzada. Esto cierra el contorno entre el \xFAltimo y el primer punto.","Close the path with _PARAM0_":"Cerrar la ruta con _PARAM0_","Clear shapes":"Borrar formas","Clear the rendered shape(s). Useful if not set to be done automatically.":"Elimina la(s) forma(s) renderizada(s). \xDAtil si no se establece para hacerse autom\xE1ticamente.","Clear the rendered image of _PARAM0_":"Borrar la imagen renderizada de _PARAM0_","Clear between frames":"Borrar entre fotogramas","Activate (or deactivate) the clearing of the rendered shape at the beginning of each frame.":"Activar (o desactivar) la limpieza de la forma renderizada al principio de cada fotograma.","Clear the rendered image of _PARAM0_ between each frame: _PARAM1_":"Borrar la imagen renderizada de _PARAM0_ entre cada fotograma: _PARAM1_","Setup":"Configuraci\xF3n","Clear between each frame":"Borrar entre cada fotograma","Check if the rendered image is cleared between frames.":"Eval\xFAa si la imagen renderizada se borra entre fotogramas.","_PARAM0_ is clearing its rendered image between each frame":"_PARAM0_ est\xE1 limpiando su imagen renderizada entre cada fotograma","Change the color used when filling":"Modifica el color usado como relleno","Change fill color of _PARAM0_ to _PARAM1_":"Cambiar el color de relleno de _PARAM0_ a _PARAM1_","Filing color red component":"Color de relleno componente rojo","Filing color green component":"Color de relleno componente verde","Filing color blue component":"Color de relleno componente azul","Modify the color of the outline of future drawings.":"Modifica el color de contorno en futuros dibujos.","Change outline color of _PARAM0_ to _PARAM1_":"Cambiar el color de contorno de _PARAM0_ a _PARAM1_","Outline color red component":"Color de contorno componente rojo","Outline color green component":"Color de contorno componente verde","Outline color blue component":"Color de contorno componente azul","Outline size":"Espesor de contorno","Modify the size of the outline of future drawings.":"Modifica el espesor de contorno en futuros dibujos.","the size of the outline":"el tama\xF1o del contorno","Test the size of the outline.":"Eval\xFAa el espesor de contorno.","Fill opacity":"Opacidad de relleno","Modify the opacity level used when filling future drawings.":"Modifica el nivel de opacidad usado al rellenar futuros dibujos.","the opacity of filling":"la opacidad del relleno","Test the value of the opacity level used when filling.":"Comprueba el valor del nivel de opacidad usado al rellenar.","Filling opacity":"Opacidad de relleno","Outline opacity":"Opacidad de contorno","Modify the opacity of the outline of future drawings.":"Modifica la opacidad de contorno en futuros dibujos.","the opacity of the outline":"la opacidad del contorno","Test the opacity of the outline.":"Eval\xFAa la opacidad de contorno.","Use relative coordinates":"Use las coordenadas relativas","Set if the object should use relative coordinates (by default) or not. It's recommended to use relative coordinates.":"Establece si el objeto debe usar coordenadas relativas (por defecto) o no. Se recomienda usar coordenadas relativas.","Use relative coordinates for _PARAM0_: _PARAM1_":"Use las coordenadas relativas para _PARAM0_: _PARAM1_","Use relative coordinates?":"\xBFUsar coordenadas relativas?","Relative coordinates":"Coordenadas relativas","Check if the coordinates of the shape painter is relative.":"Comprueba si las coordenadas del pintor de formas son relativas.","_PARAM0_ is using relative coordinates":"_PARAM0_ est\xE1 usando coordenadas relativas","Modify the scale of the specified object.":"Modifica la escala del objeto especificado.","the scale":"la escala","Scale on X axis":"Escalar en eje X","the width's scale of an object":"la escala de anchura de un objeto","the width's scale":"la escala del ancho","Scale on Y axis":"Escalar en eje Y","the height's scale of an object":"La escala de altura de un objeto","the height's scale":"la escala de la altura","Flip the object horizontally":"Invertir el objeto horizontalmente","Flip horizontally _PARAM0_: _PARAM1_":"Voltear horizontalmente _PARAM0_: _PARAM1_","Activate flipping":"Activar inversi\xF3n","Flip the object vertically":"Invertir el objeto verticalmente","Flip vertically _PARAM0_: _PARAM1_":"Voltear verticalmente _PARAM0_: _PARAM1_","Horizontally flipped":"Invertido horizontalmente","Check if the object is horizontally flipped":"Eval\xFAa si el objeto est\xE1 invertido horizontalmente","_PARAM0_ is horizontally flipped":"_PARAM0_ est\xE1 invertido horizontalmente","Vertically flipped":"Invertido verticalmente","Check if the object is vertically flipped":"Eval\xFAa si el objeto est\xE1 invertido verticalmente","_PARAM0_ is vertically flipped":"_PARAM0_ est\xE1 invertido verticalmente","Change the width of an object.":"Cambia el ancho de un objeto.","Change the height of an object.":"Cambia la altura de un objeto.","Center of rotation":"Centro de rotaci\xF3n","Change the center of rotation of an object relatively to the object origin.":"Cambia el centro de rotaci\xF3n de un objeto relativamente al origen del objeto.","Change the center of rotation of _PARAM0_: _PARAM1_; _PARAM2_":"Cambiar el centro de rotaci\xF3n de _PARAM0_: _PARAM1_; _PARAM2_","Collision Mask":"M\xE1scara de colisi\xF3n","Change the collision mask of an object to a rectangle relatively to the object origin.":"Cambia la m\xE1scara de colisi\xF3n de un objeto a un rect\xE1ngulo relativo al origen del objeto.","Change the collision mask of _PARAM0_ to a rectangle from _PARAM1_; _PARAM2_ to _PARAM3_; _PARAM4_":"Cambiar la m\xE1scara de colisi\xF3n de _PARAM0_ a un rect\xE1ngulo de _PARAM1_; _PARAM2_ a _PARAM3_; _PARAM4_","X drawing coordinate of a point from the scene":"Coordenada de dibujo en X de un punto de la escena","X scene position":"Posici\xF3n X de la escena","Y scene position":"Posici\xF3n Y de la escena","Y drawing coordinate of a point from the scene":"Coordenada de dibujo en Y de un punto de la escena","X scene coordinate of a point from the drawing":"Coordenada de escena en Y de un punto del dibujo","X drawing position":"Posici\xF3n X de dibujo","Y drawing position":"Posici\xF3n de dibujo Y","Y scene coordinate of a point from the drawing":"Coordenada Y de la escena de un punto de dibujo","System information":"Informaci\xF3n del sistema","Get information about the system and device running the game.":"Obtiene informaci\xF3n sobre el sistema y el dispositivo ejecutando el juego.","Is a mobile device":"Es un dispositivo m\xF3vil","Check if the device running the game is a mobile device":"Eval\xFAa si el dispositivo ejecutando el juego es un dispositivo m\xF3vil","The device is a mobile device":"El dispositivo es un dispositivo m\xF3vil","Is WebGL supported":"Es compatible con WebGL","Check if GPU accelerated WebGL is supported on the target device.":"Comprobar si GPU acelerado WebGL es compatible con el dispositivo objetivo.","WebGL is available":"WebGL est\xE1 disponible","Is the game running as a preview":"El juego se est\xE1 ejecutando como vista previa","Check if the game is currently being previewed in the editor. This can be used to enable a \"Debug mode\" or do some work only in previews.":"Comprueba si el juego est\xE1 siendo previsualizado en el editor. Esto se puede usar para habilitar un \"modo de depuraci\xF3n\" o trabajar s\xF3lo en vistas previas.","The game is being previewed in the editor":"El juego est\xE1 siendo previsualizado en el editor","Device has a touchscreen":"El dispositivo tiene una pantalla t\xE1ctil","Check if the device running the game has a touchscreen (typically Android phones, iPhones, iPads, but also some laptops).":"Compruebe si el dispositivo que ejecuta el juego tiene una pantalla t\xE1ctil (t\xEDpicamente tel\xE9fonos Android, iPhones, iPads, pero tambi\xE9n algunos port\xE1tiles).","The device has a touchscreen":"El dispositivo tiene una pantalla t\xE1ctil","Shopify":"Shopify","Interact with products and generate URLs for checkouts with your Shopify shop.":"Interactuar con productos y generar URLs para los checkouts con su tienda Shopify.","Initialize a shop":"Inicializar una tienda","Initialize a shop with your credentials. Call this action first, and then use the shop name in the other actions to interact with products.":"Inicializar una tienda con sus credenciales. Llame primero a esta acci\xF3n y luego utilice el nombre de la tienda en las otras acciones para interactuar con los productos.","Initialize shop _PARAM1_ (domain: _PARAM2_, appId: _PARAM3_)":"Inicializar tienda _PARAM1_ (dominio: _PARAM2_, appId: _PARAM3_)","Shop name":"Nombre de la tienda","Domain (xxx.myshopify.com)":"Dominio (xxx.myshopify.com)","App Id":"Id de la App","Access Token":"Token de acceso","Get the URL for buying a product":"Obtener la URL para comprar un producto","Get the URL for buying a product from a shop. The URL will be stored in the scene variable that you specify. You can then use the action to open an URL to redirect the player to the checkout.":"Obtener la URL para comprar un producto de una tienda. La URL se almacenar\xE1 en la variable de escena que especifique. Puede usar la acci\xF3n abrir una URL para redirigir al jugador a la compra.","Get the URL for product #_PARAM2_ (quantity: _PARAM3_, variant: _PARAM4_) from shop _PARAM1_, and store it in _PARAM5_ (or _PARAM6_ in case of error)":"Obtener la URL del producto #_PARAM2_ (cantidad: _PARAM3_, variante: _PARAM4_) de la tienda _PARAM1_, y almacenarla en _PARAM5_ (o _PARAM6_ en caso de error)","Shop name (initialized with \"Initialize a shop\" action)":"Nombre de la tienda (inicializado con la acci\xF3n \"Inicializar una tienda\")","Product id":"Id del producto","Quantity":"Cantidad","Variant (0 by default)":"Variante (0 por defecto)","Scene variable where the URL for checkout must be stored":"Variable de escena donde se debe almacenar la URL para el pago","Scene variable containing the error (if any)":"Variable de escena que contiene el error (si hay alguno)","Draggable Behavior":"Comportamiento Arrastrable","Allows objects to be moved using the mouse (or touch). Add the behavior to an object to make it draggable. Use events to enable or disable the behavior when needed.":"Permite mover objetos usando el rat\xF3n (o tocando). Agrega el comportamiento a un objeto para hacerlo arrastrable. Utiliza eventos para activar o desactivar el comportamiento cuando sea necesario.","Draggable object":"Objeto arrastrable","Draggable":"Arrastrable","Move objects by holding a mouse button (or touch).":"Mueve objetos manteniendo presionado el bot\xF3n del mouse (o toque).","Being dragged":"Siendo arrastrado","Check if the object is being dragged":"Eval\xFAa si el objeto est\xE1 siendo arrastrado","_PARAM0_ is being dragged":"_PARAM0_ est\xE1 siendo arrastrado","Do a precision check against the object's collision mask":"Realiza una comprobaci\xF3n de precisi\xF3n contra la m\xE1scara de colisi\xF3n del objeto","Use the object (custom) collision mask instead of the bounding box, making the behavior more precise at the cost of reduced performance":"Usa la m\xE1scara de colisi\xF3n del objeto (personalizada) en lugar de la caja de delimitaci\xF3n, haciendo el comportamiento m\xE1s preciso a costa de un menor rendimiento","Linked objects":"Objetos enlazados","Link two objects":"Enlazar dos objetos","Link two objects together, so as to be able to get one from the other.":"Enlaza/asocia dos objetos, para poder acceder a uno a trav\xE9s del otro.","Link _PARAM1_ and _PARAM2_":"Enlazar _PARAM1_ y _PARAM2_","Object 1":"Objeto 1","Object 2":"Objeto 2","Unlink two objects":"Desenlazar dos objetos","Unlink two objects.":"Desenlaza dos objetos.","Unlink _PARAM1_ and _PARAM2_":"Desenlazar _PARAM1_ y _PARAM2_","Unlink all objects from an object":"Desenlazar todos los objetos de un objeto","Unlink all objects from an object.":"Desenlaza todos los objetos enlazados a otro objeto.","Unlink all objects from _PARAM1_":"Desenlazar todos los objetos enlazados a _PARAM1_","Take into account linked objects":"Tener en cuenta todos los objetos enlazados","Take some objects linked to the object into account for next conditions and actions.\nThe condition will return false if no object was taken into account.":"Toma en cuenta los objetos enlazados a otro objeto para las siguientes condiciones y acciones.\nLa condici\xF3n retornar\xE1 falso si ning\xFAn objeto se tom\xF3 en cuenta.","Take into account all \"_PARAM1_\" linked to _PARAM2_":"Tener en cuenta todos los objetos \"_PARAM1_\" enlazados _PARAM2_","Pick these objects...":"Tomar estos objetos...","...if they are linked to this object":"...si est\xE1n enlazados a este objeto","Take objects linked to the object into account for next actions.":"Toma en cuenta los objetos enlazados a este objeto para las siguientes condiciones y acciones.","Recreate particles":"Recrear part\xEDculas","Destroy and recreate particles, so as to take changes made to setup of the emitter in account.":"Destruye y recrea las part\xEDculas, con el fin de establecer en el emisor los cambios de par\xE1metros.","Recreate particles of _PARAM0_":"Recrear part\xEDculas de _PARAM0_","Rendering first parameter":"Renderizado, par\xE1metro 1","Modify first parameter of rendering (Size/Length).\nParticles have to be recreated in order to take changes in account.":"Modificar el primer par\xE1metro de renderizaci\xF3n (Tama\xF1o/Longitud).\nPart\xEDculas tienen que ser recreadas para tener en cuenta los cambios.","the rendering 1st parameter":"renderizado, 1er par\xE1metro","Test the first parameter of rendering (Size/Length).":"Eval\xFAa el primer par\xE1metro de renderizado (tama\xF1o/longitud).","the 1st rendering parameter":"el 1er par\xE1metro de renderizado","Rendering second parameter":"Renderizado, par\xE1metro 2","Modify the second parameter of rendering (Size/Length).\nParticles have to be recreated in order to take changes in account.":"Modificar el segundo par\xE1metro de renderizado (Tama\xF1o/Longitud).\nPart\xEDculas tienen que ser recreadas para tener en cuenta los cambios.","the rendering 2nd parameter":"renderizado, 2do par\xE1metro","Test the second parameter of rendering (Size/Length).":"Eval\xFAa el segundo par\xE1metro de renderizado (tama\xF1o/longitud).","the 2nd rendering parameter":"el 2do par\xE1metro de renderizado","Capacity":"Capacidad","Change the capacity of the emitter.":"Modifica la capacidad del emisor.","the capacity":"la capacidad","Common":"Com\xFAn","Test the capacity of the emitter.":"Eval\xFAa la capacidad del emisor.","Flow":"Flujo","Change the flow of the emitter.":"Modifica el flujo del emisor.","the flow":"el flujo","Test the flow of the emitter.":"Eval\xFAa el flujo del emisor.","Change image (using an expression)":"Cambiar imagen (usando una expresi\xF3n)","Change the image of particles (if displayed).":"Cambiar la imagen de las part\xEDculas (si se muestra).","Change the image of particles of _PARAM0_ to _PARAM1_":"Cambiar la imagen de part\xEDculas de _PARAM0_ a _PARAM1_","Image to use":"Imagen a usar","Change image":"Cambiar imagen","Image file (or image resource name)":"Archivo de imagen (o nombre del recurso de imagen)","Test the name of the image displayed by particles.":"Eval\xFAa el nombre de la imagen visualizada por las part\xEDculas.","the image displayed by particles":"la imagen mostrada por las part\xEDculas","Particles image":"Imagen de part\xEDculas","Name of the image displayed by particles.":"Nombre de la imagen mostrada por las part\xEDculas.","Particles":"Part\xEDculas","Particles number":"N\xFAmero de part\xEDculas","Particles count":"Cantidad de part\xEDculas","Number of particles currently displayed.":"N\xFAmero de part\xEDculas que se muestran actualmente.","Capacity of the particle tank.":"Capacidad del dep\xF3sito de part\xEDculas.","Flow of the particles (particles/second).":"Flujo de las part\xEDculas (part\xEDculas/segundo).","Emission minimal force":"Fuerza m\xEDnima de emisi\xF3n","The minimal emission force of the particles.":"La fuerza m\xEDnima de emisi\xF3n de las part\xEDculas.","Emission maximal force":"Fuerza m\xE1xima de emisi\xF3n","The maximal emission force of the particles.":"La fuerza m\xE1xima de emisi\xF3n de las part\xEDculas.","Emission angle":"\xC1ngulo de emisi\xF3n","Emission angle of the particles.":"\xC1ngulo de emisi\xF3n de las part\xEDculas.","Emission angle A":"\xC1ngulo A de emisi\xF3n","Emission angle B":"\xC1ngulo B de emisi\xF3n","Radius of emission zone":"Radio de la zona de emisi\xF3n","The radius of the emission zone.":"El radio de la zona de emisi\xF3n.","X gravity":"Gravedad X","Gravity of particles applied on X-axis.":"Gravedad de las part\xEDculas aplicada en el eje X.","Y gravity":"Gravedad Y","Gravity of particles applied on Y-axis.":"Gravedad de las part\xEDculas aplicada en el eje Y.","Gravity angle":"\xC1ngulo de gravedad","Angle of gravity.":"\xC1ngulo de gravedad.","Value of gravity.":"Valor de la gravedad.","Minimum lifetime of particles":"Tiempo de vida m\xEDnimo de part\xEDculas","Minimum lifetime of the particles.":"Duraci\xF3n m\xEDnima de las part\xEDculas.","Maximum lifetime of particles":"Tiempo de vida m\xE1ximo de part\xEDculas","Maximum lifetime of the particles.":"Duraci\xF3n m\xE1xima de las part\xEDculas.","Start color red component":"Color inicial del componente rojo","The start color red component of the particles.":"El componente rojo del color inicial de las part\xEDculas.","End color red component":"Componente rojo de color final","The end color red component of the particles.":"El componente rojo del color final de las part\xEDculas.","Start color blue component":"Color inicial del componente azul","The start color blue component of the particles.":"El componente azul del color inicial de las part\xEDculas.","End color blue component":"Componente azul de color final","The end color blue component of the particles.":"El componente azul del color final de las part\xEDculas.","Start color green component":"Color inicial del componente verde","The start color green component of the particles.":"El componente verde del color inicial de las part\xEDculas.","End color green component":"Componente verde de color final","The end color green component of the particles.":"El componente verde del color final de las part\xEDculas.","Start opacity":"Opacidad inicial","Start opacity of the particles.":"Opacidad inicial de las part\xEDculas.","End opacity":"Opacidad final","End opacity of the particles.":"Opacidad final de las part\xEDculas.","Start size":"Tama\xF1o inicial","Start size of particles.":"Tama\xF1o inicial de las part\xEDculas.","End size":"Tama\xF1o final","End size of particles.":"Tama\xF1o final de las part\xEDculas.","Parameter 1 of angle":"Par\xE1metro 1 de \xE1ngulo","Parameter 2 of angle":"Par\xE1metro 2 de \xE1ngulo","Particle system":"Sistema de part\xEDculas","Particles emitter":"Emisor de part\xEDculas","Displays a large number of small particles to create visual effects.":"Muestra una gran cantidad de peque\xF1as part\xEDculas para crear efectos visuales.","Modify minimal emission force of particles.":"Modifica la fuerza m\xEDnima de emisi\xF3n de part\xEDculas.","the minimal emission force":"la m\xEDnima fuerza de emisi\xF3n","Modify maximal emission force of particles.":"Modifica la fuerza m\xE1xima de emisi\xF3n de part\xEDculas.","the maximal emission force":"la m\xE1xima fuerza de emisi\xF3n","Modify emission angle.":"Modifica el \xE1ngulo de emisi\xF3n de part\xEDculas.","the emission angle":"el \xE1ngulo de emisi\xF3n","Test the value of emission angle of the emitter.":"Eval\xFAa el \xE1ngulo de emisi\xF3n del emisor.","Emission angle 1":"\xC1ngulo de emisi\xF3n 1","Change emission angle #1":"Modifica el \xE1ngulo de emisi\xF3n n\xB01.","the 1st emission angle":"el primer \xE1ngulo de emisi\xF3n","Test the value of emission 1st angle of the emitter":"Eval\xFAa el \xE1ngulo de emisi\xF3n n\xB01 del emisor.","Emission angle 2":"\xC1ngulo de emisi\xF3n 2","Change emission angle #2":"Modifica el \xE1ngulo de emisi\xF3n n\xB02.","the 2nd emission angle":"el segundo \xE1ngulo de emisi\xF3n","Test the emission angle #2 of the emitter.":"Eval\xFAa el \xE1ngulo de emisi\xF3n n\xB02 del emisor.","Angle of the spray cone":"\xC1ngulo de apertura del cono","Modify the angle of the spray cone.":"Modifica el \xE1ngulo de apertura del cono de emisi\xF3n.","the angle of the spray cone":"el \xE1ngulo de apertura del cono","Test the angle of the spray cone of the emitter":"Eval\xFAa el \xE1ngulo de apertura del cono de emisi\xF3n.","Creation radius":"Radio de creaci\xF3n","Modify creation radius of particles.\nParticles have to be recreated in order to take changes in account.":"Modifica el radio de creaci\xF3n de part\xEDculas.\nLas part\xEDculas deben ser recreadas a fin de tener en cuenta los cambios.","the creation radius":"el radio de creaci\xF3n","Test creation radius of particles.":"Eval\xFAa el radio de creaci\xF3n de part\xEDculas.","Minimum lifetime":"Tiempo de vida m\xEDnimo","Modify particles minimum lifetime.Particles have to be recreated in order to take changes in account.":"Modifica el tiempo de vida m\xEDnimo de las part\xEDculas.\nLas part\xEDculas deben ser recreadas a fin de tener en cuenta los cambios.","the minimum lifetime of particles":"el m\xEDnimo tiempo de vida de las part\xEDculas","Test minimum lifetime of particles.":"Eval\xFAa el tiempo de vida m\xEDnimo de las part\xEDculas.","Maximum lifetime":"Tiempo de vida m\xE1ximo","Modify particles maximum lifetime.\nParticles have to be recreated in order to take changes in account.":"Modifica el tiempo de vida m\xE1ximo de part\xEDcuals.\nLas part\xEDculas deben ser recreadas a fin de tener en cuenta los cambios.","the maximum lifetime of particles":"el m\xE1ximo tiempo de vida de las part\xEDculas","Test maximum lifetime of particles.":"Eval\xFAa el tiempo de vida m\xE1ximo de las part\xEDculas.","Gravity value on X axis":"Gravedad en eje X","Change value of the gravity on X axis.":"Modifica la direcci\xF3n de la gravedad en el eje X.","the gravity on X axis":"la gravedad en el eje X","Compare value of the gravity on X axis.":"Comparar el valor de la gravedad en el eje X.","Gravity value on Y axis":"Gravedad en eje Y","Change value of the gravity on Y axis.":"Modifica la direcci\xF3n de la gravedad en el eje Y.","the gravity on Y axis":"la gravedad en el eje Y","Compare value of the gravity on Y axis.":"Comparar el valor de la gravedad en el eje Y.","Change gravity angle":"Modifica el \xE1ngulo de gravedad.","the gravity angle":"el \xE1ngulo de gravedad","Test the gravity angle of the emitter":"Comprueba el \xE1ngulo de gravedad del emisor","Change the gravity of the emitter.":"Modifica la gravedad del emisor.","Test the gravity of the emitter.":"Eval\xFAa la gravedad del emisor.","Start emission":"Iniciar emisi\xF3n","Refill tank (if not infinite) and start emission of the particles.":"Rellena el tanque (si no es infinito) y comienza la emisi\xF3n de las part\xEDculas.","Start emission of _PARAM0_":"Empezar la emisi\xF3n de _PARAM0_","Stop emission":"Detener emisi\xF3n","Stop the emission of particles.":"Detener la emisi\xF3n de part\xEDculas.","Stop emission of _PARAM0_":"Detener la emisi\xF3n de _PARAM0_","Start color":"Color inicial","Modify start color of particles.":"Modificar el color inicial de las part\xEDculas.","Change particles start color of _PARAM0_ to _PARAM1_":"Cambiar el color de inicio de las part\xEDculas de _PARAM0_ a _PARAM1_","End color":"Color final","Modify end color of particles.":"Modifica el color final de las part\xEDculas.","Change particles end color of _PARAM0_ to _PARAM1_":"Cambia el color final de las part\xEDculas de _PARAM0_ a _PARAM1_","Modify the start color red component.":"Modifica el componente de color rojo de inicio.","the start color red component":"el componente de color rojo de inicio","Compare the start color red component.":"Compara el componente rojo del color inicial.","Modify the end color red component.":"Modificar el componente rojo del color final.","the end color red component":"el componente rojo de color final","Compare the end color red component.":"Compara el componente rojo del color final.","Modify the start color blue component.":"Modifica el componente azul del color inicial.","the start color blue component":"el componente azul del color inicial","Compare the start color blue component.":"Compara el componente azul de color inicial.","Modify the end color blue component.":"Modifica el componente azul del color final.","the end color blue component":"el componente azul del color final","Compare the end color blue component.":"Compara el componente azul del color final.","Modify the start color green component.":"Modifica el componente de color verde de inicio.","the start color green component":"el componente verde color inicial","Compare the start color green component.":"Compara el componente verde de color inicial.","Modify the end color green component.":"Modifica el componente verde color final.","the end color green component":"el componente verde de color final","Compare the end color green component.":"Compara el componente verde del color final.","Modify the particle start size.":"Modificar el tama\xF1o inicial de las part\xEDculas.","the start size":"el tama\xF1o inicial","Compare the particle start size.":"Compara el tama\xF1o inicial de las part\xEDculas.","Modify the particle end size.":"Modifica el tama\xF1o final de las part\xEDculas.","the end size":"el tama\xF1o final","Compare the particle end size.":"Compara el tama\xF1o final de las part\xEDculas.","Angle, parameter 1":"\xC1ngulo, par\xE1metro 1","Modify parameter 1 of the angle of particles.":"Modifica el par\xE1metro 1 del \xE1ngulo de part\xEDculas.","the parameter 1 of angle":"el par\xE1metro 1 del \xE1ngulo","Compare parameter 1 of the angle of particles.":"Compara el par\xE1metro 1 del \xE1ngulo de part\xEDculas.","Angle, parameter 2":"\xC1ngulo, par\xE1metro 2","Modify parameter 2 of the angle of particles":"Modifica el par\xE1metro 2 del \xE1ngulo de las part\xEDculas","the parameter 2 of angle":"el par\xE1metro 2 del \xE1ngulo","Compare parameter 2 of the angle of particles.":"Compara el par\xE1metro 2 del \xE1ngulo de part\xEDculas.","Modify the start opacity of particles.":"Modificar la opacidad inicial de las part\xEDculas.","the start opacity":"la opacidad inicial","Compare the start opacity of particles.":"Compara la opacidad inicial de las part\xEDculas.","Modify the end opacity of particles.":"Modificar la opacidad final de las part\xEDculas.","the end opacity":"la opacidad final","Compare the end opacity of particles.":"Compara la opacidad final de las part\xEDculas.","No more particles":"No m\xE1s part\xEDculas","Check if the object does not emit particles any longer, so as to destroy it for example.":"Eval\xFAa si el objeto ya no emite part\xEDculas, para destruirlo por ejemplo.","_PARAM0_ does not emit any longer":"_PARAM0_ ya no emite","Allows diagonals":"Permitir diagonales","Rotate speed":"Velocidad de rotaci\xF3n","Rotate object":"Objeto a rotar","Angle offset":"Desplazamiento angular","Viewpoint":"Punto de vista","Top-Down":"Top-Down","Isometry 2:1 (26.565\xB0)":"Isometr\xEDa 2:1 (26.565\xB0)","True Isometry (30\xB0)":"Isometr\xEDa verdadera (30\xB0)","Custom Isometry":"Isometr\xEDa personalizada","Custom isometry angle":"\xC1ngulo de isometr\xEDa personalizada","If you choose \"Custom Isometry\", this allows to specify the angle of your isometry projection.":"Si elige \"Personalizar Isometr\xEDa\", esto permite especificar el \xE1ngulo de su proyecci\xF3n isom\xE9trica.","Movement angle offset":"Desplazamiento del \xE1ngulo de movimiento","Usually 0, unless you choose an *Isometry* viewpoint in which case -45 is recommended.":"Normalmente 0, a menos que elijas un punto de vista *Isometry*, en cuyo caso se recomienda -45.","Top-down movement":"Movimiento arriba-abajo","Allows to move objects in either 4 or 8 directions, with the keyboard or using events.":"Permite mover objetos en 4 u 8 direcciones, con el teclado o utilizando eventos.","Top-down movement (4 or 8 directions)":"Movimiento de arriba-abajo (4 u 8 direcciones)","Move objects left, up, right, and down (and, optionally, diagonally).":"Mueve objetos a la izquierda, arriba, derecha y abajo (y, opcionalmente, diagonal)","Simulate a press of left key.":"Simula que se ha presionada la tecla Izquierda.","Simulate a press of right key.":"Simula que se ha presionada la tecla Derecha.","Simulate a press of up key.":"Simular una pulsaci\xF3n de tecla arriba.","Simulate a press of down key.":"Simular una pulsaci\xF3n de tecla abajo.","Simulate a press of a key.\nValid keys are Left, Right, Up, Down.":"Simula que se ha presionado una tecla.\nLas teclas v\xE1lidas son Izquierda, Derecha, Arriba, Abajo.","Simulate stick control":"Simular una tecla","Simulate a stick control.":"Simular una tecla.","Simulate a stick control for _PARAM0_ with a _PARAM2_ angle and a _PARAM3_ force":"Simula un control de palancas para _PARAM0_ con un \xE1ngulo _PARAM2_ y una fuerza _PARAM3_","Stick angle (in degrees)":"El \xE1ngulo (en grados)","Stick force (between 0 and 1)":"Pegar fuerza (entre 0 y 1)","Stick angle":"\xC1ngulo del stick","Return the angle of the simulated stick input (in degrees)":"Devuelve el \xE1ngulo de la entrada del stick simulado (en grados)","Check if the object is moving.":"Eval\xFAa si el objeto est\xE1 en movimiento.","Change the acceleration of the object":"Modifica la aceleraci\xF3n del objeto","the acceleration":"la aceleraci\xF3n","Compare the acceleration of the object":"Eval\xFAa la aceleraci\xF3n del objeto","Change the deceleration of the object":"Modifica la desaceleraci\xF3n del objeto ","the deceleration":"la desaceleraci\xF3n","Compare the deceleration of the object":"Eval\xFAa la desaceleraci\xF3n del objeto","Maximum speed":"Velocidad m\xE1xima","Change the maximum speed of the object":"Modifica la velocidad m\xE1xima del objeto","the max. speed":"la velocidad m\xE1xima","Compare the maximum speed of the object":"Eval\xFAa la velocidad m\xE1xima del objeto","Speed":"Velocidad","Compare the speed of the object":"Eval\xFAa la velocidad del objeto","the speed":"la velocidad","Angular maximum speed":"Velocidad angular m\xE1xima","Change the maximum angular speed of the object":"Modifica la velocidad angular m\xE1xima del objeto","the max. angular speed":"la velocidad angular m\xE1xima","Compare the maximum angular speed of the object":"Eval\xFAa la velocidad angular m\xE1x. del objeto.","Rotation offset":"Desplazamiento del \xE1ngulo","Change the rotation offset applied when moving the object":"Modifica el desplazamiento del \xE1ngulo aplicado al objeto en la ruta","the rotation offset":"el desplazamiento de rotaci\xF3n","Compare the rotation offset applied when moving the object":"Modifica el desplazamiento del \xE1ngulo aplicado al mover el objeto","Angle of movement":"\xC1ngulo de movimiento","Compare the angle of the top-down movement of the object.":"Compara el \xE1ngulo del movimiento superior abajo del objeto.","the angle of movement":"el \xE1ngulo de movimiento","Speed on X axis":"Velocidad en eje X","Compare the velocity of the top-down movement of the object on the X axis.":"Compara la velocidad del movimiento de arriba abajo del objeto en el eje X.","the speed of movement on X axis":"la velocidad de movimiento en el eje X","Speed on Y axis":"Velocidad en eje Y","Compare the velocity of the top-down movement of the object on the Y axis.":"Compara la velocidad del movimiento de arriba abajo del objeto en el eje Y.","the speed of movement on Y axis":"la velocidad de movimiento en el eje Y","Diagonal movement":"Movimiento diagonal","Allow or restrict diagonal movemment":"Permitir o restringir movimientos diagonales","Allow diagonal moves for _PARAM0_: _PARAM2_":"Permitir movimientos diagonales para _PARAM0_ : _PARAM2_","Allow?":"\xBFPermitir?","Check if the object is allowed to move diagonally":"Eval\xFAa si el objeto puede moverse diagonalmente","Allow diagonal moves for _PARAM0_":"Permitir movimientos diagonales para _PARAM0_","Rotate the object":"Rotar el objeto","Enable or disable rotation of the object":"Des/activa la rotaci\xF3n del objeto","Enable rotation of _PARAM0_: _PARAM2_":"Permitir rotaci\xF3n de _PARAM0_ : _PARAM2_","Rotate object?":"\xBFRotar objeto?","Object rotated":"Objeto rotado","Check if the object is rotated while traveling on its path.":"Eval\xFAa si el objeto est\xE1 rotado mientras viaja por su ruta.","_PARAM0_ is rotated when moving":"_PARAM0_ est\xE1 rotado mientras se mueve","Acceleration of the object":"Aceleraci\xF3n del objeto","Deceleration of the object":"Desaceleraci\xF3n del objeto","Maximum speed of the object":"Velocidad m\xE1xima del objeto","Speed of the object":"Velocidad de un objeto","Angular maximum speed of the object":"Velocidad angular m\xE1xima del objeto","Rotation offset applied to the object":"Desplazamiento del \xE1ngulo aplicado al objeto","Angle of the movement":"\xC1ngulo del movimiento","Angle, in degrees, of the movement":"\xC1ngulo, en grados, del movimiento","Speed on the X axis":"Velocidad en el eje X","Speed on the X axis of the movement":"Velocidad en el eje X del movimiento","Speed on the Y axis":"Velocidad en el eje Y","Speed on the Y axis of the movement":"Velocidad en el eje Y del movimiento","Change the speed on the X axis of the movement":"Cambiar la velocidad en el eje X del movimiento","the speed on the X axis of the movement":"la velocidad en el eje X del movimiento","Change the speed on the Y axis of the movement":"Cambiar la velocidad en el eje Y del movimiento","the speed on the Y axis of the movement":"la velocidad en el eje Y del movimiento","the movement angle offset":"desplazamiento del \xE1ngulo de movimiento","Text entry object":"Objeto Entrada de texto","An object that can be used to capture the text entered with a keyboard by a player.":"Un objeto que puede ser usado para capturar el texto introducido con un teclado por un jugador.","Text entry":"Entrada de texto","Invisible object used to get the text entered with the keyboard.":"Objeto invisible utilizado para obtener el texto introducido con el teclado.","Text in memory":"Texto en memoria","Modify text in memory of the object":"Modifica el texto en la memoria del objeto","the text in memory":"texto en memoria","Test the text of a Text Entry object.":"Eval\xFAa el texto de un objeto Entrada de texto.","the text":"el texto","De/activate capturing text input":"Des/activar la captura de texto","Activate or deactivate the capture of text entered with keyboard.":"Activa o desactiva la captura de texto ingresado con el teclado.","Activate capture by _PARAM0_ of the text entered with keyboard: _PARAM1_":"Activar la captura para _PARAM0_ de texto ingresado con teclado : _PARAM1_","Activate":"Activar","Text input":"Captura de texto","Test if the object captured text entered with keyboard.":"Comprueba si el objeto captura el texto ingresado con el teclado.","_PARAM0_ capture the text entered with keyboard":"_PARAM0_ captura texto ingresado con teclado","Text entered with keyboard":"Texto ingresado con el teclado","Impassable obstacle":"Obst\xE1culo intransitable","Cost (if not impassable)":"Dificultad de paso","Pathfinding behavior":"Comportamiento B\xFAsqueda de Ruta (Pathfinding A*)","Pathfinding":"B\xFAsqueda de ruta","Move objects to a target while avoiding all objects that are flagged as obstacles.":"Mueva objetos a un objetivo mientras evita todos los objetos que est\xE1n marcados como obst\xE1culos.","Move to a position":"Mover a la posici\xF3n","Move the object to a position":"Mueve al objeto a la posici\xF3n","Move _PARAM0_ to _PARAM3_;_PARAM4_":"Mover _PARAM0_ a _PARAM3_;_PARAM4_","Movement on the path":"Movimiento en la ruta","Destination X position":"Posici\xF3n X del destino","Destination Y position":"Posici\xF3n Y del destino","Path found":"Ruta encontrada","Check if a path has been found.":"Compruebe si se ha encontrado una ruta.","A path has been found for _PARAM0_":"Una ruta a sido encontrada para _PARAM0_","Destination reached":"Destino alcanzado","Check if the destination was reached.":"Compruebe si el destino ha sido alcanzado.","_PARAM0_ reached its destination":"_PARAM0_ a alcanzado su destino","Width of the cells":"Ancho de celda :","Change the width of the cells of the virtual grid.":"Modifica el ancho de celda de la grilla virtual.","the width of the virtual cells":"el ancho de las celdas virtuales","Virtual grid":"Cuadr\xEDcula virtual","Width of the virtual grid":"Ancho de la cuadr\xEDcula virtual","Compare the width of the cells of the virtual grid.":"Compara el ancho de las celdas de la cuadr\xEDcula virtual.","Height of the cells":"Alto de celda :","Change the height of the cells of the virtual grid.":"Cambia la altura de las celdas de la cuadr\xEDcula virtual.","the height of the virtual cells":"la altura de las celdas virtuales","Height of the virtual grid":"Altura de la cuadr\xEDcula virtual","Compare the height of the cells of the virtual grid.":"Compara la altura de las celdas de la cuadr\xEDcula virtual.","Change the acceleration when moving the object":"Modifica la aceleraci\xF3n del objeto en la ruta.","the acceleration on the path":"la aceleraci\xF3n en la ruta","Pathfinding configuration":"Configuraci\xF3n de b\xFAsqueda de ruta","Compare the acceleration when moving the object":"Eval\xFAa la aceleraci\xF3n del objeto en la ruta.","Change the maximum speed when moving the object":"Modifica la velocidad m\xE1xima del objeto en la ruta.","the max. speed on the path":"la velocidad m\xE1xima en la ruta","Compare the maximum speed when moving the object":"Eval\xFAa la velocidad m\xE1xima del objeto en la ruta","Change the speed of the object on the path":"Modifica la velocidad del objeto en la ruta","the speed on the path":"la velocidad en la ruta","Speed on its path":"Velocidad en el camino","Compare the speed of the object on its path.":"Compara la velocidad del objeto en su ruta.","Angle of movement on its path":"\xC1ngulo del movimiento en el camino","Compare the angle of movement of an object on its path.":"Compara el \xE1ngulo de movimiento de un objeto en su ruta.","Angle of movement of _PARAM0_ is _PARAM2_ (tolerance: _PARAM3_ degrees)":"El \xE1ngulo de movimiento de _PARAM0_ es _PARAM2_ (tolerancia: _PARAM3_ grados)","Angle, in degrees":"\xC1ngulo ( en grados )","Tolerance, in degrees":"Tolerancia, en grados","Change the maximum angular speed when moving the object":"Modifica la velocidad angular m\xE1xima del objeto en la ruta","the max. angular speed on the path":"la velocidad angular m\xE1xima en la ruta","Compare the maximum angular speed when moving the object":"Eval\xFAa la velocidad angular m\xE1xima del objeto en la ruta","the rotation offset on the path":"el desplazamiento de rotaci\xF3n en la ruta","Compare the rotation offset when moving the object":"Eval\xFAa el desplazamiento del \xE1ngulo del objeto en la ruta.","Extra border":"Borde adicional","Change the size of the extra border applied to the object when planning a path":"Modifica el tama\xF1o del borde adicional aplicado al objeto en la ruta.","the size of the extra border on the path":"el borde adicional de la ruta","Compare the size of the extra border applied to the object when planning a path":"Eval\xFAa el tama\xF1o del borde adicional aplicado al objeto","Allow or restrict diagonal movement on the path":"Permite o restringe movimientos diagonales en la ruta","Allow diagonal movement for _PARAM0_ on the path: _PARAM2_":"Permitir movimientos diagonales para _PARAM0_ en la ruta: _PARAM2_","Check if the object is allowed to move diagonally on the path":"Eval\xFAa si el objeto tiene permitido moverse diagonalmente en la ruta","Diagonal moves allowed for _PARAM0_":"Permitir movimientos diagonales para _PARAM0_","Enable or disable rotation of the object on the path":"Des/activa la rotaci\xF3n del objeto en la ruta.","Enable rotation of _PARAM0_ on the path: _PARAM2_":"Permitir rotaci\xF3n de _PARAM0_ en la ruta: _PARAM2_","Check if the object is rotated when traveling on its path.":"Eval\xFAa si el objeto est\xE1 rotado al viajar por su ruta.","_PARAM0_ is rotated when traveling on its path":"_PARAM0_ est\xE1 rotado mientras atravieza la ruta","Get a waypoint X position":"Posici\xF3n X de un punto de control","Get next waypoint X position":"Posici\xF3n X del siguiente punto de control","Node index (start at 0!)":"\xCDndice de nodo (\xA1comienza en 0!)","Get a waypoint Y position":"Posici\xF3n Y de un punto de control","Get next waypoint Y position":"Posici\xF3n Y del siguiente punto de control","Index of the next waypoint":"\xCDndice del siguiente punto de control","Get the index of the next waypoint to reach":"Obtiene el \xEDndice del siguiente punto de control a alcanzar","Waypoint count":"N\xFAmero de puntos de control","Get the number of waypoints on the path":"Obtiene el n\xFAmero de puntos de control en la ruta","Last waypoint X position":"Posici\xF3n X del \xFAltimo punto de control","Last waypoint Y position":"Posici\xF3n Y del \xFAltimo punto de control","Acceleration of the object on the path":"Aceleraci\xF3n del objeto en la ruta","Maximum speed of the object on the path":"Velocidad m\xE1xima del objeto en la ruta","Speed of the object on the path":"Velocidad del objeto en la ruta","Angular maximum speed of the object on the path":"Velocidad angular m\xE1xima del objeto en la ruta","Rotation offset applied the object on the path":"Desplazamiento del \xE1ngulo aplicado al objeto en la ruta","Extra border size":"Tama\xF1o del borde adicional","Extra border applied the object on the path":"Borde adicional aplicado al objeto en la ruta","Width of a cell":"Ancho de celda :","Height of a cell":"Alto de celda :","Grid X offset":"Cuadr\xEDcula X","X offset of the virtual grid":"Desplazamiento en X de la cuadr\xEDcula virtual","Grid Y offset":"Cuadr\xEDcula Y","Y offset of the virtual grid":"Desplazamiento en Y de la cuadr\xEDcula virtual","Obstacle for pathfinding":"Obst\xE1culo para la b\xFAsqueda de ruta","Flag objects as being obstacles for pathfinding.":"Marque los objetos como obst\xE1culos para las b\xFAsqueda de rutas.","Cost":"Dificultad de paso","Change the cost of going through the object.":"Modifica la dificultad de paso a trav\xE9s del objeto","the cost":"el coste","Obstacles":"Obst\xE1culos","Compare the cost of going through the object":"Eval\xFAa la dificultad de paso a trav\xE9s del objeto","Should object be impassable?":"Objeto intransitable?","Decide if the object is an impassable obstacle":"Decide si el objeto es un obst\xE1culo intransitable","Set _PARAM0_ as an impassable obstacle: _PARAM2_":"Establecer _PARAM0_ como objeto intransitable: _PARAM2_","Impassable?":"\xBFIntransitable?","Is object impassable?":"Objeto intransitable?","Check if the obstacle is impassable":"Compruebe si el obst\xE1culo es intransitable","_PARAM0_ is impassable":"_PARAM0_ es intransitable","Obstacle cost":"Dificultad de pasar por el obst\xE1culo","Virtual cell width":"Ancho de celda virtual","Virtual Grid":"Cuadr\xEDcula virtual","Virtual cell height":"Alto de celda virtual","Virtual grid X offset":"Desplazamiento de la cuadr\xEDcula virtual X","Virtual grid Y offset":"Desplazamiento de cuadr\xEDcula virtual Y","Text object":"Objeto Texto","An object that can be used to display any text on the screen: remaining life counter, some indicators, menu buttons, dialogues...":"Un objeto que se puede utilizar para mostrar cualquier texto en la pantalla: contador de vida restante, algunos indicadores, botones de men\xFA, di\xE1logos...","Text":"Texto","Displays a text on the screen.":"Muestra un texto en la pantalla.","Modify the text":"Modificar texto","Modify the text of a Text object.":"Modifica el texto de un objeto Texto.","Compare the text":"Evaluar texto","Compare the text of a Text object.":"Eval\xFAa el texto de un objeto Texto.","Change the font of the text.":"Cambia la fuente del texto.","Change font of _PARAM0_ to _PARAM1_":"Establecer la fuente de _PARAM0_ en _PARAM1_","Compare the scale of the text on the X axis":"Comparar la escala del texto en el eje XY","the scale on the X axis":"la escala en el eje X","Modify the scale of the text on the X axis (default scale is 1)":"Modificar la escala del texto en el eje X (por defecto es 1)","Compare the scale of the text on the Y axis":"Compara la escala del texto en el eje Y","the scale on the Y axis":"la escala en el eje Y","Modify the scale of the text on the Y axis (default scale is 1)":"Modificar la escala del texto en el eje Y (por defecto es 1)","Modify the scale of the specified object (default scale is 1)":"Modificar la escala del objeto especificado (por defecto es 1)","Change the color of the text. The color is white by default.":"Modifica el color del texto. Por defecto, el color es blanco.","Change color of _PARAM0_ to _PARAM1_":"Cambiar el color de _PARAM0_ a _PARAM1_","Gradient":"Gradiente","Change the gradient of the text.":"Cambia el gradiente del texto.","Change gradient of _PARAM0_ to colors _PARAM1_ _PARAM2_ _PARAM3_ _PARAM4_ type _PARAM5_":"Cambiar el degradado de _PARAM0_ a los colores _PARAM1_ _PARAM2_ _PARAM3_ _PARAM4_ tipo _PARAM5_","Gradient type":"Tipo de gradiente","First Color":"Primer color","Second Color":"Segundo color","Third Color":"Tercer color","Fourth Color":"Cuarto color","Outline":"Contorno","Change the outline of the text. A thickness of 0 disables the outline.":"Cambia el contorno del texto. El grosor 0 desactiva el contorno.","Change outline of _PARAM0_ to color _PARAM1_ with thickness _PARAM2_":"Cambia el contorno de _PARAM0_ al color _PARAM1_ con el grosor _PARAM2_","Thickness":"Grosor","Change Shadow":"Cambiar sombra","Change the shadow of the text.":"Cambiar la sombra del texto.","Change the shadow of _PARAM0_ to color _PARAM1_ distance _PARAM2_ blur _PARAM3_ angle _PARAM4_":"Cambia la sombra de _PARAM0_ al color _PARAM1_ distancia _PARAM2_ desenfoque _PARAM3_ con un \xE1ngulo _PARAM4_","Effects/Shadow":"Efectos/Sombra","Distance":"Distancia","Blur":"Desenfocar","Show Shadow":"Mostrar sombra","Show the shadow of the text.":"Mostrar la sombra del texto.","Show the shadow of _PARAM0_: _PARAM1_":"Mostrar la sombra de _PARAM0_: _PARAM1_","Show the shadow":"Mostrar la sombra","Change text opacity":"Cambiar la opacidad del texto","Change the opacity of a Text. 0 is fully transparent, 255 is opaque (default).":"Cambiar la opacidad de un texto. 0 es completamente transparente, 255 es opaco (valor predeterminado).","Compare the opacity of a Text object, between 0 (fully transparent) to 255 (opaque).":"Compara la opacidad de un objeto de Texto, entre 0 (totalmente transparente) a 255 (opaco).","Smoothing":"Suavizar","Activate or deactivate text smoothing.":"Activar o desactivar el suavizado de texto.","Smooth _PARAM0_: _PARAM1_":"Suavizar _PARAM0_ : _PARAM1_","Style":"Estilo","Smooth the text":"Suavizar el texto","Check if an object is smoothed":"Comprueba si un objeto est\xE1 suavizado","_PARAM0_ is smoothed":"_PARAM0_ est\xE1 suavizado","De/activate bold":"Desactivar/activar negrita","Set bold style of _PARAM0_ : _PARAM1_":"Estilo negrita de _PARAM0_ : _PARAM1_","Set bold style":"Establecer estilo negrita","Check if the bold style is activated":"Compruebe si est\xE1 activado el estilo negrita","_PARAM0_ bold style is set":"_PARAM0_ est\xE1 en negrita","De/activate italic.":"Desactivar/activar cursiva.","Set italic style for _PARAM0_ : _PARAM1_":"Estilo cursiva de _PARAM0_ : _PARAM1_","Set italic":"Establecer estilo cursiva","Check if the italic style is activated":"Comprueba si est\xE1 activado el estilo cursiva","_PARAM0_ italic style is set":"_PARAM0_ est\xE1 en cursiva","Underlined":"Subrayado","De/activate underlined style.":"Desactivar/activar el subrrayado.","Set underlined style of _PARAM0_: _PARAM1_":"Estilo subrayado de _PARAM0_ : _PARAM1_","Underline":"Subrayado","Check if the underlined style of an object is set.":"Compruebe si est\xE1 activado el estilo subrayado de un objeto.","_PARAM0_ underlined style is activated":"_PARAM0_ est\xE1 subrayado","Modify the angle of a Text object.":"Modifica el \xE1ngulo de un objeto Texto.","Compare the value of the angle of a Text object.":"Comparar el valor del \xE1ngulo de un objeto de Texto.","Padding":"Relleno","Compare the number of pixels around a text object. If the shadow or the outline around the text are getting cropped, raise this value.":"Compara el n\xFAmero de p\xEDxeles alrededor de un objeto de texto. Si la sombra o el contorno alrededor del texto se recortan, aumenta este valor.","the padding":"el relleno","Set the number of pixels around a text object. If the shadow or the outline around the text are getting cropped, raise this value.":"Establece el n\xFAmero de p\xEDxeles alrededor de un objeto de texto. Si la sombra o el contorno alrededor del texto se recortan, aumenta este valor.","Alignment":"Alineaci\xF3n","Set the text alignment of a multiline text object (does not work with single line texts).":"Establecer la alineaci\xF3n de texto de un objeto de texto multil\xEDnea (no funciona con textos de una l\xEDnea \xFAnica).","Align _PARAM0_: _PARAM1_":"Alinear _PARAM0_: _PARAM1_","Compare the text alignment of a multiline text object.":"Compara la alineaci\xF3n de texto de un objeto de texto multil\xEDnea.","the alignment":"la alineaci\xF3n","Wrapping":"Ajuste","De/activate word wrapping. Note that word wrapping is a graphical option,\nyou can't get the number of lines displayed":"Des/activar el ajuste de palabras. Tenga en cuenta que el ajuste de palabras es una opci\xF3n gr\xE1fica,\no se puede obtener el n\xFAmero de l\xEDneas mostradas","Activate wrapping style of _PARAM0_: _PARAM1_":"Activar el estilo de ajuste de palabras de _PARAM0_: _PARAM1_","Test if the word wrapping style of an object is set.":"Comprueba si est\xE1 activado el estilo de ajuste de palabras de un objeto.","_PARAM0_ word wrapping style is activated":"_PARAM0_ estilo de ajuste de palabras est\xE1 activado","Wrapping width":"Ancho de ajuste","Modify the word wrapping width of a Text object.":"Modificar el ancho del ajuste de las palabras de un objeto de texto.","the wrapping width":"el ancho de ajuste","Test the word wrapping width of a Text object.":"Comprobar el ancho del ajuste de palabra de un objeto de texto.","X Scale of a Text object":"Escala X de un objeto de texto","Y Scale of a Text object":"Escala Y de un objeto de texto","Opacity of a Text object":"Opacidad de un objeto de texto","Font size":"Tama\xF1o de fuente","the font size of a text object":"tama\xF1o de fuente de objeto de texto","the font size":"el tama\xF1o de la fuente","File system":"Sistema de archivos","Access the filesystem of the operating system.":"Acceso al sistema de archivos del sistema operativo.","File or directory exists":"Archivo o directorio existe","Check if the file or directory exists.":"Compruebe si el archivo o directorio existe.","The path _PARAM0_ exists":"La ruta _PARAM0_ existe","Windows, Linux, MacOS":"Windows, Linux, MacOS","Path to file or directory":"Ruta al archivo o directorio","Create a directory":"Crear un directorio","Create a new directory at the specified path.":"Crear un nuevo directorio en la ruta especificada.","Create directory _PARAM0_":"Crear directorio _PARAM0_","Directory":"Directorio","(Optional) Variable to store the result. 'ok': task was successful, 'error': an error occured.":"(Opcional) Variable para almacenar el resultado. 'ok': la tarea fue exitosa, 'error': ha ocurrido un error.","Save a text into a file":"Guardar un texto en un archivo","Save a text into a file. Only use this on small files to avoid any lag or freeze during the game execution.":"Guardar un texto en un archivo. Utilice esto s\xF3lo en archivos peque\xF1os para evitar cualquier retraso o bloqueos durante la ejecuci\xF3n del juego.","Save _PARAM0_ into file _PARAM1_":"Guardar _PARAM0_ en el archivo _PARAM1_","Save path":"Guardar ruta","Save a text into a file (Async)":"Guardar un texto en un archivo (Async)","Save a text into a file asynchronously. Use this for large files to avoid any lag or freeze during game execution. The 'result' variable gets updated when the operation has finished.":"Guardar un texto en un archivo asincr\xF3nicamente. Utilice esto para archivos grandes para evitar cualquier lag o congelar durante la ejecuci\xF3n del juego. La variable 'resultado' se actualiza cuando la operaci\xF3n haya terminado.","Windows, Linux, MacOS/Asynchronous":"Windows, Linux, MacOS/As\xEDncrono","Save a scene variable into a JSON file":"Guardar una variable de escena en un archivo JSON","Save a scene variable (including, for structure, all the children) into a file in JSON format. Only use this on small files to avoid any lag or freeze during the game execution.":"Guardar una variable de escena (incluyendo, para la estructura, todos los hijos) en un archivo en formato JSON. S\xF3lo use esto en archivos peque\xF1os para evitar cualquier retraso o bloqueo durante la ejecuci\xF3n del juego.","Save scene variable _PARAM0_ into file _PARAM1_ as JSON":"Guardar variable de escena _PARAM0_ en el archivo PARAM1 como JSON","Save a scene variable into a JSON file (Async)":"Guardar una variable de escena en un archivo JSON (Async)","Save the scene variable (including, for structures, all the children) into a file in JSON format, asynchronously. Use this for large files to avoid any lag or freeze during game execution. The 'result' variable gets updated when the operation has finished.":"Guarda la variable de escena (incluyendo, para estructuras, todos los hijos) en un archivo en formato JSON, asincr\xF3nicamente. \xDAsalo para archivos grandes para evitar cualquier retraso o congelaci\xF3n durante la ejecuci\xF3n del juego. La variable 'resultado' se actualiza cuando la operaci\xF3n haya terminado.","Load a text from a file (Async)":"Cargar un texto de un archivo (Async)","Load a text from a file, asynchronously. Use this for large files to avoid any lag or freeze during game execution. The content of the file will be available in the scene variable after a small delay (usually a few milliseconds). The 'result' variable gets updated when the operation has finished.":"Carga un texto de un archivo, asincr\xF3nicamente. Usa esto para archivos grandes para evitar cualquier lag o congelar durante la ejecuci\xF3n del juego. El contenido del archivo estar\xE1 disponible en la variable de escena despu\xE9s de un peque\xF1o retraso (normalmente unos pocos milisegundos). La variable 'resultado' se actualiza cuando la operaci\xF3n haya terminado.","Load text from _PARAM1_ into scene variable _PARAM0_ (Async)":"Cargar texto de _PARAM1_ en la variable de escena _PARAM0_ (Async)","Load path":"Cargar ruta","Load a text from a file":"Cargar un texto de un archivo","Load a text from a file. Only use this on small files to avoid any lag or freeze during the game execution.":"Cargar un texto desde un archivo. Utilice s\xF3lo esto en archivos peque\xF1os para evitar cualquier retraso o bloqueo durante la ejecuci\xF3n del juego.","Load text from _PARAM1_ into scene variable _PARAM0_":"Cargar texto de _PARAM1_ en la variable de escena _PARAM0_","Load a scene variable from a JSON file":"Cargar una variable de escena desde un archivo JSON","Load a JSON formatted text from a file and convert it to a scene variable (potentially a structure variable with children). Only use this on small files to avoid any lag or freeze during the game execution.":"Cargar un texto con formato JSON desde un archivo y convertirlo a una variable de escena (potencialmente una variable de estructura con hijos). S\xF3lo use esto en archivos peque\xF1os para evitar cualquier retraso o bloqueo durante la ejecuci\xF3n del juego.","Load JSON from _PARAM1_ into scene variable _PARAM0_":"Cargar JSON de _PARAM1_ en la variable de escena _PARAM0_","Load a scene variable from a JSON file (Async)":"Cargar una variable de escena desde un archivo JSON (Async)","Load a JSON formatted text from a file and convert it to a scene variable (potentially a structure variable with children), asynchronously. Use this for large files to avoid any lag or freeze during game execution. The content of the file will be available as a scene variable after a small delay (usually a few milliseconds). The 'result' variable gets updated when the operation has finished.":"Carga un texto formateado JSON desde un archivo y convertirlo a una variable de escena (potencialmente una variable de estructura con hijos), asincr\xF3nicamente. \xDAsalo para archivos grandes para evitar cualquier lag o congelar durante la ejecuci\xF3n del juego. El contenido del archivo estar\xE1 disponible como variable de escena despu\xE9s de un peque\xF1o retraso (normalmente algunos milisegundos). La variable 'resultado' se actualiza cuando la operaci\xF3n haya terminado.","Delete a file":"Eliminar un archivo","Delete a file from the filesystem.":"Eliminar un archivo del sistema de archivos.","Delete the file _PARAM0_":"Eliminar el archivo _PARAM0_","File path":"Ruta de archivo","Delete a file (Async)":"Eliminar un archivo (Async)","Delete a file from the filesystem asynchronously. The option result variable will be updated once the file is deleted.":"Eliminar un archivo del sistema de ficheros de forma asincrona. La variable de resultado de la opci\xF3n se actualizar\xE1 una vez que el archivo sea eliminado.","Desktop folder":"Carpeta de escritorio","Get the path to the desktop folder.":"Obtener la ruta a la carpeta de escritorio.","Documents folder":"Carpeta de documentos","Get the path to the documents folder.":"Obtener la ruta a la carpeta de documentos.","Pictures folder":"Carpeta de im\xE1genes","Get the path to the pictures folder.":"Obtener la ruta a la carpeta de im\xE1genes.","Game executable file":"\nArchivo ejecutable del juego","Get the path to this game executable file.":"Obt\xE9n la ruta al archivo ejecutable de este juego.","Game executable folder":"Carpeta ejecutable del juego","Get the path to this game executable folder.":"Obt\xE9n la ruta a la carpeta ejecutable del juego.","Userdata folder (for application settings)":"Carpeta de datos de usuario (para la configuraci\xF3n de la aplicaci\xF3n)","Get the path to userdata folder (for application settings).":"Obtenga la ruta a la carpeta de datos de usuario (para la configuraci\xF3n de la aplicaci\xF3n).","User's Home folder":"Carpeta de inicio del usuario","Get the path to the user home folder.":"Obtener la ruta a la carpeta de escritorio.","Temp folder":"Carpeta temporal","Get the path to temp folder.":"Obtener la ruta a la carpeta temporal.","Path delimiter":"Delimitador de ruta","Get the operating system path delimiter.":"Obt\xE9n el delimitador de ruta del sistema operativo.","Get directory name from a path":"Obtener el nombre del directorio de una ruta","Returns the portion of the path that represents the directories, without the ending file name.":"Devuelve la parte de la ruta que representa los directorios, sin el nombre del archivo final.","File or folder path":"Ruta del archivo o carpeta","Get file name from a path":"Obtener el nombre de archivo de una ruta","Returns the name of the file with its extension, if any.":"Retorna el nombre del archivo con su extensi\xF3n, si hay alguna.","Get the extension from a file path":"Conseguir la extensi\xF3n desde un archivo o ruta","Returns the extension of the file designated by the given path, including the extension period. For example: \".txt\".":"Retorna la extensi\xF3n del archivo designado por la ruta dada, incluyendo el periodo de extensi\xF3n\nPor ejemplo: \".txt\".","Video opacity (0-255)":"Opacidad del v\xEDdeo (0-255)","Loop the video":"Repetir v\xEDdeo","Playback settings":"Configuraci\xF3n de reproducci\xF3n","Video volume (0-100)":"Volumen de v\xEDdeo (0-100)","Displays a video.":"Muestra un v\xEDdeo.","Multimedia":"Multimedia","Play a video":"Reproducir un v\xEDdeo","Play a video (recommended file format is MPEG4, with H264 video codec and AAC audio codec).":"Reproducir un video (el formato de archivo recomendado es MPEG4, con codec de v\xEDdeo H264 y codec de audio AAC).","Play the video of _PARAM0_":"Reproducir el v\xEDdeo de _PARAM0_","Video object":"Objeto de v\xEDdeo","Pause a video":"Pausar un v\xEDdeo","Pause the specified video.":"Pausar el v\xEDdeo especificado.","Pause video _PARAM0_":"Pausar video _PARAM0_","Loop a video":"Repetir un v\xEDdeo","Loop the specified video.":"Bucle del v\xEDdeo especificado.","Loop video of _PARAM0_: _PARAM1_":"Bucle v\xEDdeo de _PARAM0_: _PARAM1_","Activate loop":"Activar bucle","Mute a video":"Silenciar un v\xEDdeo","Mute, or unmute, the specified video.":"Silenciar o activar el sonido del v\xEDdeo especificado.","Mute video of _PARAM0_: _PARAM1_":"Silenciar v\xEDdeo de _PARAM0_: _PARAM1_","Activate mute":"Activar silencio","Set time":"Establecer el tiempo","Set the time of the video object in seconds":"Establecer el tiempo del objeto de v\xEDdeo en segundos","the time":"el tiempo","Set volume":"Ajustar el volumen","Set the volume of the video object, between 0 (muted) and 100 (maximum).":"Establecer el volumen del objeto de v\xEDdeo, entre 0 (silenciado) y 100 (m\xE1ximo).","the volume":"el volumen","Get the volume":"Obtener el volumen","Get the volume of a video object, between 0 (muted) and 100 (maximum).":"Obtener el volumen de un objeto de v\xEDdeo, entre 0 (silenciado) y 100 (m\xE1ximo).","Is played":"Se est\xE1 reproduciendo","Check if a video is played.":"Compruebar si se reproduce un v\xEDdeo.","_PARAM0_ is played":"_PARAM0_ est\xE1 en reproducci\xF3n","Is paused":"Est\xE1 pausado","Check if the video is paused.":"Comprobar si el v\xEDdeo est\xE1 pausado.","_PARAM0_ is paused":"_PARAM0_ est\xE1 en pausa","Is looped":"Est\xE1 en bucle","Check if the video is looped.":"Compruebe si el v\xEDdeo est\xE1 en bucle.","_PARAM0_ is looped":"_PARAM0_ est\xE1 en bucle","Volume":"Vol\xFAmen","Compare the current volume of a video object.":"Comparar el volumen actual de un objeto de v\xEDdeo.","Is muted":"Est\xE1 silenciado","Check if a video is muted.":"Comprobar si un v\xEDdeo est\xE1 silenciado.","_PARAM0_ is muted":"_PARAM0_ est\xE1 silenciado","Get current time":"Obtener hora actual","Return the current time of a video object (in seconds).":"Devuelve el tiempo actual de un objeto de v\xEDdeo (en segundos).","Get the duration":"Obtener la duraci\xF3n","Return the duration of a video object (in seconds).":"Devuelve la duraci\xF3n de un objeto de v\xEDdeo (en segundos).","Compare the duration of a video object":"Comparar la duraci\xF3n de un objeto de v\xEDdeo","the duration (in seconds)":"la duraci\xF3n (en segundos)","Current time":"Tiempo actual","Compare the current time of a video object":"Comparar el tiempo actual de un objeto de v\xEDdeo","the current time (in seconds)":"la hora actual (en segundos)","Is ended":"Ha finalizado","Check if a video is ended":"Comprueba si un v\xEDdeo ha terminado","_PARAM0_ is ended":"_PARAM0_ ha terminado","Set opacity":"Establecer opacidad","Set opacity of the specified video object, between 0 (fully transparent) and 255 (opaque).":"Establecer opacidad del objeto de v\xEDdeo especificado, entre 0 (totalmente transparente) y 255 (opaco).","Compare the opacity of a video object":"Comparar la opacidad de un objeto de v\xEDdeo","Get current opacity":"Obtener opacidad actual","Return the opacity of a video object":"Devuelve la opacidad de un objeto de v\xEDdeo","Set playback speed":"Establecer la velocidad de reproducci\xF3n","Set playback speed of the specified video object, (1 = the default speed, >1 = faster and <1 = slower).":"Establecer velocidad de reproducci\xF3n del objeto de v\xEDdeo especificado, (1 = la velocidad por defecto, >1 = m\xE1s r\xE1pido y <1 = m\xE1s lento).","the playback speed":"la velocidad de reproducci\xF3n","Playback speed ":"Velocidad de reproducci\xF3n ","Compare the playback speed of a video object":"Comparar la velocidad de reproducci\xF3n de un objeto de v\xEDdeo","Get current playback speed":"Obtener velocidad de reproducci\xF3n actual","Return the playback speed of a video object":"Devuelve la velocidad de reproducci\xF3n de un objeto de v\xEDdeo","Dialogue Tree (experimental)":"\xC1rbol de di\xE1logo (experimental)","Load dialogue Tree from a scene variable":"Cargar \xE1rbol de di\xE1logo desde una variable de escena","Load a dialogue data object - Yarn json format, stored in a scene variable. Use this command to load all the Dialogue data at the beginning of the game.":"Carga un objeto de datos de di\xE1logo - formato Yarn json, almacenado en una variable de escena. Usa este comando para cargar todos los datos de di\xE1logo al comienzo del juego.","Load dialogue data from Scene variable _PARAM1_":"Cargar datos de di\xE1logo de la variable de escena _PARAM1_","Scene variable that holds the Yarn Json data":"Variable de escena que contiene los datos de Yarn Json","Load dialogue Tree from a Json File":"Cargar \xC1rbol de di\xE1logo desde un archivo Json","Load a dialogue data object - Yarn json format, stored in a Json file. Use this command to load all the Dialogue data at the beginning of the game.":"Carga un objeto de datos de di\xE1logo - formato Yarn json, almacenado en un archivo Json. Usa este comando para cargar todos los datos de di\xE1logo al comienzo del juego.","Load dialogue data from json file _PARAM1_":"Cargar datos de di\xE1logo del archivo json _PARAM1_","Json file that holds the Yarn Json data":"Archivo Json que contiene los datos de Yarn Json","Start dialogue from branch":"Iniciar el di\xE1logo desde la rama","Start dialogue from branch. Use this to initiate the dialogue from a specified branch.":"Iniciar el di\xE1logo desde la rama. Use esto para iniciar el di\xE1logo desde una rama especificada.","Start dialogue from branch _PARAM0_":"Iniciar el di\xE1logo desde la rama _PARAM0_","Dialogue branch":"Rama de di\xE1logo","Stop running dialogue":"Dejar de ejecutar el di\xE1logo","Stop the running dialogue. Use this to interrupt dialogue parsing.":"Detener el di\xE1logo en curso. \xDAsalo para interrumpir el an\xE1lisis del di\xE1logo.","Go to the next dialogue line":"Ir a la siguiente l\xEDnea de di\xE1logo","Go to the next dialogue line. Use this to advance to the next dialogue line when the player presses a button.":"Vaya a la siguiente l\xEDnea de di\xE1logo. Use esto para avanzar a la siguiente l\xEDnea de di\xE1logo cuando el jugador presione un bot\xF3n.","Confirm selected Option":"Confirmar selecci\xF3n","Set the selected option as confirmed, which will validate it and go forward to the next node. Use other actions to select options (see \"select next option\" and \"Select previous option\").":"Establecer la opci\xF3n seleccionada como confirmada, que la validar\xE1 y pasar\xE1 al siguiente nodo. Utilice otras acciones para seleccionar opciones (ver \"seleccionar la siguiente opci\xF3n\" y \"Seleccionar opci\xF3n anterior\").","Select next Option":"Seleccione la siguiente opci\xF3n","Select next Option (add 1 to selected option number). Use this when the dialogue line is of type \"options\" and the player has pressed a button to change selected option.":"Seleccione la siguiente opci\xF3n (a\xF1adir 1 al n\xFAmero de opciones seleccionado). Use esto cuando la l\xEDnea de di\xE1logo es de tipo \"opciones\" y el jugador ha presionado un bot\xF3n para cambiar la opci\xF3n seleccionada.","Select previous Option":"Seleccionar opci\xF3n anterior","Select previous Option (subtract 1 from selected option number). Use this when the dialogue line is of type \"options\" and the player has pressed a button to change selected option.":"Seleccione la opci\xF3n anterior (restar 1 del n\xFAmero de opci\xF3n seleccionado). Use esto cuando la l\xEDnea de di\xE1logo es de tipo \"opciones\" y el jugador ha presionado un bot\xF3n para cambiar la opci\xF3n seleccionada.","Select option by number":"Seleccione opci\xF3n por n\xFAmero","Select option by number. Use this when the dialogue line is of type \"options\" and the player has pressed a button to change selected option.":"Seleccione la opci\xF3n por n\xFAmero. Use esto cuando la l\xEDnea de di\xE1logo es de tipo \"opciones\" y el jugador ha presionado un bot\xF3n para cambiar la opci\xF3n seleccionada.","Select option at index _PARAM0_":"Seleccionar opci\xF3n en \xEDndice _PARAM0_","Option index number":"N\xFAmero de \xEDndice de opci\xF3n","Scroll clipped text":"Desplazar el texto cortado","Scroll clipped text. Use this with a timer and \"get clipped text\" when you want to create a typewriter effect. Every time the action runs, a new character appears from the text.":"Desplazar el texto cortado. Usa esto con un temporizador y \"obtener texto cortado\" cuando quieras crear un efecto de tipo m\xE1quina de escribir. Cada vez que se ejecuta la acci\xF3n, aparece un nuevo car\xE1cter del texto.","Complete clipped text scrolling":"Desplazamiento completo del texto recortado","Complete the clipped text scrolling. Use this action whenever you want to skip scrolling.":"Completa el desplazamiento del texto recortado. Usa esta acci\xF3n siempre que quieras saltar el desplazamiento.","Set dialogue state string variable":"Establecer variable de estado de di\xE1logo","Set dialogue state string variable. Use this to set a variable that the dialogue data is using.":"Establecer variable de estado de di\xE1logo. Use esto para establecer una variable que est\xE1n usando los datos de di\xE1logo.","Set dialogue state string variable _PARAM0_ to _PARAM1_":"Establecer la cadena de la variable de estado de di\xE1logo _PARAM0_ a _PARAM1_","State Variable Name":"Nombre de la variable del estado","Variable string value":"Valor de variable tipo cadena","Set dialogue state number variable":"Establecer variable de n\xFAmero estado de di\xE1logo","Set dialogue state number variable. Use this to set a variable that the dialogue data is using.":"Establecer variable de numero de estado de di\xE1logo. Use esto para establecer una variable que use los datos de di\xE1logo.","Set dialogue state number variable _PARAM0_ to _PARAM1_":"Establecer el estado de la variable de estado de di\xE1logo _PARAM0_ a _PARAM1_","Variable number value":"Valor de n\xFAmero de variable","Set dialogue state boolean variable":"Establecer variable booleana del estado del di\xE1logo","Set dialogue state boolean variable. Use this to set a variable that the dialogue data is using.":"Establecer variable booleana de estado de di\xE1logo. Use esto para establecer una variable que use los datos de di\xE1logo.","Set dialogue state boolean variable _PARAM0_ to _PARAM1_":"Establecer el booleano de la variable de estado de di\xE1logo _PARAM0_ a _PARAM1_","Variable boolean value":"Valor booleano de la variable","Save dialogue state":"Guardar estado de di\xE1logo","Save dialogue state. Use this to store the dialogue state into a variable, which can later be used for saving the game. That way player choices can become part of the game save.":"Guardar estado de di\xE1logo. Usa esto para almacenar el estado de di\xE1logo en una variable, que puede ser usada m\xE1s tarde para guardar el juego. De esta manera las elecciones de los jugadores pueden ser parte del juego guardado.","Save dialogue state to _PARAM0_":"Guardar estado de di\xE1logo a _PARAM0_","Global Variable":"Variable global","Load dialogue state":"Cargar estado de di\xE1logo","Load dialogue state. Use this to restore dialogue state, if you have stored in a variable before with the \"Save state\" action.":"Cargar estado de di\xE1logo. Utilice esto para restaurar el estado de di\xE1logo, si lo ha guardado en una variable antes con la acci\xF3n \"Guardar estado\".","Load dialogue state from _PARAM0_":"Cargar estado de di\xE1logo de _PARAM0_","Clear dialogue state":"Limpiar estado del di\xE1logo","Clear dialogue state. This resets all dialogue state accumulated by the player choices. Useful when the player is starting a new game.":"Limpiar estado del di\xE1logo. Esto restablece todo el estado de di\xE1logo acumulado por las opciones del jugador. \xDAtil cuando el jugador est\xE1 comenzando una nueva partida.","Get the current dialogue line text":"Obtener el texto de la l\xEDnea actual de di\xE1logo","Returns the current dialogue line text":"Devuelve la l\xEDnea de texto actual de di\xE1logo","Get the number of options in an options line type":"Obtener el n\xFAmero de opciones en una l\xEDnea de tipo opciones","Get the text of an option from an Options line type":"Obtener el texto de una opci\xF3n desde una l\xEDnea de tipo opciones","Get the text of an option from an Options line type, using the option's Number. The numbers start from 0.":"Obtener el texto de una opci\xF3n de una linea de opciones, usando el n\xFAmero de la opci\xF3n. Los n\xFAmeros comienzan desde 0.","Option Index Number":"N\xFAmero de \xEDndice de la opci\xF3n","Get a Horizontal list of options from the Options line type":"Obtener una lista horizontal de opciones del tipo de l\xEDnea de opciones","Get the text of all available options from an Options line type as a horizontal list. You can also pass the selected option's cursor string, which by default is ->":"Obtener el texto de las opciones disponibles desde una l\xEDnea de tipo opciones como una lista horizontal. Tambi\xE9n puede pasar la cadena de la opci\xF3n seleccionada, que por defecto es ->","Options Selection Cursor":"Cursor de selecci\xF3n de opciones","Get a Vertical list of options from the Options line type":"Obtener una lista vertical de opciones de una l\xEDnea de tipo opciones","Get the text of all available options from an Options line type as a vertical list. You can also pass the selected option's cursor string, which by default is ->":"Obtener el texto de las opciones disponibles desde una l\xEDnea de tipo opciones como una lista vertical. Tambi\xE9n puede pasar la cadena de la opci\xF3n seleccionada, que por defecto es ->","Get the number of the currently selected option":"Obtener el n\xFAmero de la opci\xF3n seleccionada actualmente","Get the number of the currently selected option. Use this to help you render the option selection marker at the right place.":"Obtiene el n\xFAmero de la opci\xF3n seleccionada actualmente. Utiliza esto para ayudarte a renderizar el marcador de selecci\xF3n de opciones en el lugar correcto.","Get dialogue line text clipped":"Obtener texto de l\xEDnea de di\xE1logo recortado","Get dialogue line text clipped by the typewriter effect. Use the \"Scroll clipped text\" action to control the typewriter effect.":"Obtener el texto de la l\xEDnea de di\xE1logo recortado com efecto de m\xE1quina de escribir. Usa la acci\xF3n \"desplazar el texto recortado\" para controlar el efecto de m\xE1quina de escribir.","Get the title of the current branch of the running dialogue":"Obtener el t\xEDtulo de la rama actual del di\xE1logo en curso","Get the tags of the current branch of the running dialogue":"Obtener las etiquetas de la rama actual del di\xE1logo en curso","Get a tag of the current branch of the running dialogue via its index":"Obtener una etiqueta de la rama actual del di\xE1logo en ejecuci\xF3n a trav\xE9s de su \xEDndice","Tag Index Number":"N\xFAmero de \xEDndice de la etiqueta","Get the parameters of a command call":"Obtener los par\xE1metros de un comando de llamada","Get the parameters of a command call - <<command withParameter anotherParameter>>":"Obtener los par\xE1metros de un comando de llamada - <<command withParameter anotherParameter>>","parameter Index Number":"par\xE1metro N\xFAmero de \xEDndice","Get the number of parameters in the currently passed command":"Obtener el n\xFAmero de par\xE1metros pasados en el comando actual","Get parameter from a Tag found by the branch contains tag condition":"Obtener par\xE1metro de una etiqueta encontrada por la rama que contiene la condici\xF3n de etiquetas","Get a list of all visited branches":"Obtener una lista de todas las ramas visitadas","Get the full raw text of the current branch":"Obtener el texto completo de la rama actual","Get dialogue state value":"Obtener el valor del estado del di\xE1logo","Variable Name":"Nombre de la Variable","Command is called":"Se llama un comando","Check if a specific Command is called. If it is a <<command withParameter>>, you can even get the parameter with the CommandParameter expression.":"Compruebe si un comando espec\xEDfico es llamado. Si es un <<command withParameter>>, incluso puede obtener el par\xE1metro con la expresi\xF3n CommandParameter.","Command <<_PARAM0_>> is called":"Se llams el comando <<_PARAM0_>>","Command String":"Cadena de comando","Dialogue line type":"Tipo de l\xEDnea de di\xE1logo","Check if the current dialogue line line is one of the three existing types. Use this to set what logic is executed for each type.\nThe three types are as follows:\n- text: when displaying dialogue text.\n- options: when displaying [[branching/options]] for dialogue choices.\n-command: when <<commands>> are triggered by the dialogue data.":"Compruebe si la l\xEDnea de di\xE1logo actual es uno de los tres tipos existentes. Utilice esto para establecer qu\xE9 l\xF3gica se ejecuta para cada tipo.\nLos tres tipos son los siguientes:\n- texto: cuando se muestra el texto del di\xE1logo.\n- opciones: al mostrar [[branching/options]] para opciones de di\xE1logo.\n-command: cuando <<commands>> son activados por los datos del di\xE1logo.","The dialogue line is _PARAM0_":"La l\xEDnea de di\xE1logo es _PARAM0_","type":"tipo","Dialogue is running":"El di\xE1logo se est\xE1 ejecutando","Check if the dialogue is running. Use this to for things like locking the player movement while speaking with a non player character.":"Comprueba si el di\xE1logo se est\xE1 ejecutando. \xDAsalo para cosas como bloquear el movimiento del jugador mientras habla con un personaje no jugador.","Dialogue has branch":"El di\xE1logo tiene una rama","Check if the dialogue has a branch with specified name. Use this to check if a dialogue branch exists in the loaded dialogue data.":"Compruebe si el di\xE1logo tiene una rama con el nombre especificado. Utilice esto para comprobar si existe una rama de di\xE1logo en los datos de di\xE1logo cargados.","Dialogue has a branch named _PARAM0_":"El di\xE1logo tiene una rama llamada _PARAM0_","Branch name":"Nombre de la rama","Has selected option changed":"Ha cambiado la opci\xF3n seleccionada","Check if a selected option has changed when the current dialogue line type is options. Use this to detect when the player has selected another option, so you can re-draw where the selection arrow is.":"Compruebe si una opci\xF3n seleccionada ha cambiado cuando el tipo de l\xEDnea de di\xE1logo actual es opciones. Use esto para detectar cuando el jugador ha seleccionado otra opci\xF3n, as\xED que puedes volver a dibujar donde est\xE1 la flecha de selecci\xF3n.","Selected option has changed":"La opci\xF3n seleccionada ha cambiado","Current dialogue branch title":"T\xEDtulo de rama de di\xE1logo actual","Check if the current dialogue branch title is equal to a string. Use this to trigger game events when the player has visited a specific dialogue branch.":"Compruebe si el t\xEDtulo de la rama de di\xE1logo actual es igual a una cadena. Use esto para activar eventos del juego cuando el jugador haya visitado una rama de di\xE1logo espec\xEDfica.","The current dialogue branch title is _PARAM0_":"El t\xEDtulo de la rama de di\xE1logo actual es _PARAM0_","title name":"nombre del t\xEDtulo","Current dialogue branch contains a tag":"La rama de di\xE1logo actual contiene una etiqueta","Check if the current dialogue branch contains a specific tag. Tags are an alternative useful way to <<commands>> to drive game logic with the dialogue data.":"Compruebe si la rama de di\xE1logo actual contiene una etiqueta espec\xEDfica. Las etiquetas son una alternativa \xFAtil a <<comandos>> para manejar la l\xF3gica del juego con los datos del di\xE1logo.","The current dialogue branch contains a _PARAM0_ tag":"La rama de di\xE1logo actual contiene una etiqueta _PARAM0_","tag name":"nombre de la etiqueta","Branch title has been visited":"El t\xEDtulo de la rama ha sido visitado","Check if a branch has been visited":"Comprobar si una rama ha sido visitada","Branch title _PARAM0_ has been visited":"T\xEDtulo de la rama _PARAM0_ ha sido visitado","branch title":"t\xEDtulo de la rama","Compare dialogue state string variable":"Comparar la cadena de la variable de di\xE1logo de estado","Compare dialogue state string variable. Use this to trigger game events via dialogue variables.":"Compara la variable de estado de di\xE1logo. Usa esto para activar eventos del juego a trav\xE9s de variables de di\xE1logo.","Dialogue state string variable _PARAM0_ is equal to _PARAM1_":"La variable de estado de di\xE1logo _PARAM0_ es igual a _PARAM1_","State variable":"Variable de estado","Equal to":"Es igual a","Compare dialogue state number variable":"Comparar variable num\xE9rica de estado de di\xE1logo","Compare dialogue state number variable. Use this to trigger game events via dialogue variables.":"Compara la variable n\xFAmero de estado del di\xE1logo. Usa esto para activar eventos del juego a trav\xE9s de variables de di\xE1logo.","Dialogue state number variable _PARAM0_ is equal to _PARAM1_":"La variable de n\xFAmero de estado de di\xE1logo _PARAM0_ es igual a _PARAM1_","Compare dialogue state boolean variable":"Comparar la variable booleana del estado del di\xE1logo","Compare dialogue state variable. Use this to trigger game events via dialogue variables.":"Comparar la variable de estado de di\xE1logo. Use esto para activar eventos del juego a trav\xE9s de variables de di\xE1logo.","Dialogue state boolean variable _PARAM0_ is equal to _PARAM1_":"La variable booleana del estado de di\xE1logo _PARAM0_ es igual a _PARAM1_","Clipped text has completed scrolling":"Texto recortado ha completado el desplazamiento","Check if the clipped text scrolling has completed. Use this to prevent the player from going to the next dialogue line before the typing effect has revealed the entire text.":"Comprueba si el desplazamiento del texto recortado ha sido completado. Utiliza esto para prevenir que el jugador avance a la siguiente linea de dialogo antes de que el efecto de tecleo haya revelado el texto completo.","Device vibration":"Vibraci\xF3n del dispositivo","Vibrate":"Vibrar","Vibrate (Duration in ms).":"Vibrar (Duraci\xF3n en ms).","Start vibration for _PARAM0_ ms":"Iniciar vibraci\xF3n para _PARAM0_ ms","Vibrate by pattern":"Vibrar por patr\xF3n","Vibrate (Duration in ms). You can add multiple comma-separated values where every second value determines the period of silence between two vibrations. This is a string value so use quotes.":"Vibrar (duraci\xF3n en ms). Puedes a\xF1adir varios valores separados por comas donde cada segundo valor determina el per\xEDodo de silencio entre dos vibraciones. Este es un valor de tipo cadena as\xED que usa comillas.","Intervals (for example \"500,100,200\"":"Intervalos (por ejemplo \"500,100,200\"","Stop vibration":"Detener vibraci\xF3n","Stop the vibration":"Detener la vibraci\xF3n","Device sensors":"Sensores del dispositivo","Allow the game to access the sensors of a mobile device.":"Permite al juego acceder a los sensores de un dispositivo m\xF3vil.","Sensor active":"Sensor Activo","The condition is true if the device orientation sensor is currently active":"La condici\xF3n es cierta si el sensor de movimiento del dispositivo est\xE1 activo","Orientation sensor is active":"La orientaci\xF3n del sensor esta activo","Orientation":"Orientaci\xF3n","Compare the value of orientation alpha":"Comparar el valor de la orientaci\xF3n alpha","Compare the value of orientation alpha. (Range: 0 to 360\xB0)":"Comparar el valor de la orientaci\xF3n alpha. (Rango: 0 a 360\xB0)","the orientation alpha":"orientaci\xF3n de alfa","Sign of the test":"Signo de evaluaci\xF3n","Compare the value of orientation beta":"Comparar el valor de orientaci\xF3n beta","Compare the value of orientation beta. (Range: -180 to 180\xB0)":"Compare el valor de la versi\xF3n beta de orientaci\xF3n. (Rango: -180 a 180\xB0)","the orientation beta":"orientaci\xF3n beta","Compare the value of orientation gamma":"Comparar el valor de la gamma de orientaci\xF3n","Compare the value of orientation gamma. (Range: -90 to 90\xB0)":"Compare el valor de orientaci\xF3n gamma. (Rango: -90 a 90\xB0)","the orientation gamma":"orientaci\xF3n gamma","Activate orientation sensor":"Activar sensor de orientaci\xF3n","Activate the orientation sensor. (remember to turn it off again)":"Activa el sensor de orientaci\xF3n. (Recuerda apagarlo de nuevo)","Activate the orientation sensor.":"Activar el sensor de orientaci\xF3n.","Deactivate orientation sensor":"Desactivar sensor de orientaci\xF3n","Deactivate the orientation sensor.":"Desactivar el sensor de orientaci\xF3n.","Is Absolute":"Es absoluto","Get if the devices orientation is absolute and not relative":"Obtener si la orientaci\xF3n de los dispositivos es absoluta y no relativa","Alpha value":"Valor alpha","Get the devices orientation Alpha (compass)":"Obtiene la orientaci\xF3n de los dispositivos Alpha (br\xFAjula)","Beta value":"Valor Beta","Get the devices orientation Beta":"Obt\xE9n la Beta de orientaci\xF3n de los dispositivos","Gamma value":"Valor de Gamma","Get the devices orientation Gamma value":"Obtener el valor Gamma de orientaci\xF3n de los dispositivos","The condition is true if the device motion sensor is currently active":"La condici\xF3n es cierta si el sensor de movimiento del dispositivo est\xE1 activo","Motion sensor is active":"Sensor de movimiento activo","Motion":"Movimiento","Compare the value of rotation alpha":"Comparar el valor de rotaci\xF3n alpha","Compare the value of rotation alpha. (Note: few devices support this sensor)":"Comparar el valor de rotaci\xF3n alfa. (Nota: pocos dispositivos soportan este sensor)","the rotation alpha":"rotaci\xF3n alfa","Value (m/s\xB2)":"Valor (m/s\xB2)","Compare the value of rotation beta":"Comparar el valor de rotaci\xF3n beta","Compare the value of rotation beta. (Note: few devices support this sensor)":"Comparar el valor de rotaci\xF3n beta. (Nota: pocos dispositivos soportan este sensor)","the rotation beta":"rotaci\xF3n beta","Compare the value of rotation gamma":"Comparar el valor de rotaci\xF3n gamma","Compare the value of rotation gamma. (Note: few devices support this sensor)":"Comparar el valor de rotaci\xF3n alfa. (Nota: pocos dispositivos soportan este sensor)","the rotation gamma":"rotaci\xF3n gamma","Compare the value of acceleration on X-axis":"Comparar el valor de la aceleraci\xF3n en el eje x","Compare the value of acceleration on the X-axis (m/s\xB2).":"Comparar el valor de la aceleraci\xF3n en el eje x (m/s\xB2).","the acceleration X":"aceleraci\xF3n en X","Compare the value of acceleration on Y-axis":"Comparar el valor de la aceleraci\xF3n en el eje Y","Compare the value of acceleration on the Y-axis (m/s\xB2).":"Comparar el valor de la aceleraci\xF3n en el eje Y (m/s\xB2).","the acceleration Y":"aceleraci\xF3n en Y","Compare the value of acceleration on Z-axis":"Comparar el valor de aceleraci\xF3n en el eje Z","Compare the value of acceleration on the Z-axis (m/s\xB2).":"Compare el valor de aceleraci\xF3n en el eje Z (m/s\xB2).","the acceleration Z":"aceleraci\xF3n en Z","Activate motion sensor":"Activar sensor de movimiento","Activate the motion sensor. (remember to turn it off again)":"Activa el sensor de movimiento. (Recuerda apagarlo de nuevo)","Activate the motion sensor.":"Activar el sensor de movimiento.","Deactivate motion sensor":"Desactivar sensor de movimiento","Deactivate the motion sensor.":"Desactivar el sensor de movimiento.","Get the devices rotation Alpha":"Obtener la rotaci\xF3n Alfa de dispositivos","Get the devices rotation Beta":"Obtener la rotaci\xF3n Beta de dispositivos","Get the devices rotation Gamma":"Obtener el Gamma de rotaci\xF3n de dispositivos","Acceleration X value":"Valor de aceleraci\xF3n X","Get the devices acceleration on the X-axis (m/s\xB2)":"Obtener la aceleraci\xF3n de los dispositivos en el eje X (m/s\xB2)","Acceleration Y value":"Valor de aceleraci\xF3n Y","Get the devices acceleration on the Y-axis (m/s\xB2)":"Obtener la aceleraci\xF3n de los dispositivos en el eje Y (m/s\xB2)","Acceleration Z value":"Valor Z de aceleraci\xF3n","Get the devices acceleration on the Z-axis (m/s\xB2)":"Obtener la aceleraci\xF3n de los dispositivos en el eje Z (m/s\xB2)","Bitmap Text":"Texto Bitmap","Displays a text using a \"Bitmap Font\" (an image representing characters). This is more performant than a traditional Text object and it allows for complete control on the characters aesthetic.":"Muestra un texto usando una fuente \"Bitmap\" (una imagen que representa caracteres). Esto tiene mayor rendimiento que un objeto de texto tradicional y permite un control completo sobre los caracteres est\xE9ticos.","Opacity (0-255)":"Opacidad (0-255)","Alignment, when multiple lines are displayed":"Alineaci\xF3n, cuando se muestran varias l\xEDneas","Bitmap atlas image":"Imagen de mapa de bits de atlas","Text scale":"Escala de texto","Font tint":"Tinta de la fuenta","Word wrapping":"Salto automatico de linea","Bitmap text":"Fuente de mapa de bits","the opacity, between 0 (fully transparent) and 255 (opaque)":"la opacidad, entre 0 (totalmente transparente) y 255 (opaco)","the font size, defined in the Bitmap Font":"el tama\xF1o de la fuente, definido en la fuente de mapa de bits","the scale (1 by default)":"la escala (1 por defecto)","Font name":"Nombre de la fuente","the font name (defined in the Bitmap font)":"el nombre de fuente (definido en la fuente Bitmap)","the font name":"el nombre de fuente","Set the tint of the Bitmap Text object.":"Establece el tinte del objeto Bitmap Text.","Set tint of _PARAM0_ to _PARAM1_":"Establecer tinte de _PARAM0_ a _PARAM1_","Bitmap files resources":"Recursos de archivos de mapa de bits","Change the Bitmap Font and/or the atlas image used by the object.":"Cambia la fuente del mapa de bits y/o la imagen del atlas utilizada por el objeto.","Set the bitmap font of _PARAM0_ to _PARAM1_ and the atlas to _PARAM2_":"Establecer la fuente de mapa de bits de _PARAM0_ a _PARAM1_ y el atlas a _PARAM2_","Bitmap font resource name":"Nombre del recurso de mapa de bits","Texture atlas resource name":"Nombre del recurso del atlas","the text alignment":"el alineamiento de texto","Change the alignment of a Bitmap text object.":"Cambia la alineaci\xF3n de un objeto de texto de mapa de bits.","Set the alignment of _PARAM0_ to _PARAM1_":"Establecer la alineaci\xF3n de _PARAM0_ a _PARAM1_","Word wrap":"Ajuste de l\xEDnea","Check if word wrap is enabled.":"Compruebe si el ajuste de l\xEDnea est\xE1 habilitado.","_PARAM0_ word wrap is enabled":"El envoltorio de palabras _PARAM0_ est\xE1 activado","De/activate word wrapping.":"Des/activar envoltura de palabras.","Activate word wrap of _PARAM0_: _PARAM1_":"Activar el envoltorio de palabras de _PARAM0_: _PARAM1_","Activate word wrap":"Activar envoltura de palabras","the width, in pixels, after which the text is wrapped on next line":"el ancho, en p\xEDxeles, despu\xE9s del cual el texto est\xE1 envuelto en la siguiente l\xEDnea","Text Input":"Entrada de Texto","A text field the player can type text into.":"Un campo de texto en el que el jugador puede escribir texto.","Initial value":"Valor inicial","Content":"Contenido","Placeholder":"Marcador de posici\xF3n","Font size (px)":"Tama\xF3 de fuente (px)","Input type":"Tipo de entrada","By default, a \"text\" is single line. Choose \"text area\" to allow multiple lines to be entered.":"De forma predeterminada, un \"texto\" es una sola l\xEDnea. Elija \"\xE1rea de texto\" para permitir que se introduzcan m\xFAltiples l\xEDneas.","Read only":"S\xF3lo lectura","Field appearance":"Apariencia del campo","Disabled":"Deshabilitado","Text color":"Color del texto","Border color":"Color del borde","Border opacity":"Opacidad del borde","Border width":"Ancho del borde","Text input (experimental)":"Entrada de texto (experimental)","Form control":"Control de formularios","the placeholder":"el marcador de posici\xF3n","Set the font of the object.":"Establece la fuente del objeto.","Set the font of _PARAM0_ to _PARAM1_":"Establecer la fuente de _PARAM0_ a _PARAM1_","Font resource name":"Nombre del recurso de fuente","the input type":"el tipo de entrada","Set the text color of the object.":"Establece el color del texto del objeto.","Set the text color of _PARAM0_ to _PARAM1_":"Establecer el color de texto de _PARAM0_ a _PARAM1_","Set the fill color of the object.":"Establece el color de relleno del objeto.","Set the fill color of _PARAM0_ to _PARAM1_":"Establecer el color de relleno de _PARAM0_ a _PARAM1_","the fill opacity, between 0 (fully transparent) and 255 (opaque)":"la opacidad de relleno, entre 0 (totalmente transparente) y 255 (opaco)","the fill opacity":"la opacidad de relleno","Set the border color of the object.":"Establece el color del borde del objeto.","Set the border color of _PARAM0_ to _PARAM1_":"Establecer el color del borde de _PARAM0_ a _PARAM1_","the border opacity, between 0 (fully transparent) and 255 (opaque)":"la opacidad del borde, entre 0 (totalmente transparente) y 255 (opaco)","the border opacity":"la opacidad del borde","the border width":"el ancho del borde","Read-only":"S\xF3lo lectura","the text input is read-only":"la entrada de texto es de s\xF3lo lectura","read-only":"s\xF3lo lectura","the text input is disabled":"la entrada de texto est\xE1 desactivada","disabled":"deshabilitado","Focused":"Enfocado","Check if the text input is focused (the cursor is in the field and player can type text in).":"Compruebe si la entrada de texto est\xE1 enfocada (el cursor est\xE1 en el campo y el jugador puede escribir texto).","_PARAM0_ is focused":"_PARAM0_ est\xE1 enfocado","Physics Engine 2.0":"Motor de f\xEDsica 2.0","Simulate realistic object physics with gravity, forces, joints, etc.":"Simula la f\xEDsica de objetos realista con gravedad, fuerzas, articulaciones, etc.","World gravity on X axis":"Gravedad del mundo en el eje X","Compare the world gravity on X axis.":"Compara la gravedad del mundo en el eje X.","the world gravity on X axis":"la gravedad del mundo en el eje X","Global":"Global","World gravity on Y axis":"Gravedad del mundo en el eje Y","Compare the world gravity on Y axis.":"Compara la gravedad del mundo en el eje Y.","the world gravity on Y axis":"la gravedad del mundo en el eje Y","World gravity":"Gravedad del mundo","Modify the world gravity.":"Modificar la gravedad del mundo.","While an object is needed, this will apply to all objects using the behavior.":"Mientras que un objeto es necesario, esto se aplicar\xE1 a todos los objetos usando el comportamiento.","Set the world gravity of _PARAM0_ to _PARAM2_;_PARAM3_":"Establecer la gravedad mundial de _PARAM0_ a _PARAM2_;_PARAM3_","Gravity X":"Gravedad X","Gravity Y":"Gravedad Y","World time scale":"Escala de tiempo del mundo","Compare the world time scale.":"Compara la escala de tiempo del mundo.","the world time scale":"la escala de tiempo del mundo","Modify the world time scale.":"Modificar la escala de tiempo mundial.","Set the world time scale of _PARAM0_ to _PARAM2_":"Establecer la escala de tiempo del mundo de _PARAM0_ a _PARAM2_","Is dynamic":"Es din\xE1mico","Test if an object is dynamic.":"Comprueba si un objeto es din\xE1mico.","Dynamics":"Din\xE1micas","Set as dynamic":"Establecer como din\xE1mico","Set an object as dynamic. Is affected by gravity, forces and velocities.":"Establecer un objeto como din\xE1mico. Est\xE1 afectado por la gravedad, las fuerzas y las velocidades.","Set _PARAM0_ as dynamic":"Establecer _PARAM0_ como din\xE1mico","Is static":"Es est\xE1tico","Test if an object is static.":"Comprueba si un objeto es est\xE1tico.","_PARAM0_ is static":"_PARAM0_ es est\xE1tico","Set as static":"Establecer como est\xE1tico","Set an object as static. Is not affected by gravity, and can't be moved by forces or velocities at all.":"Establecer un objeto como est\xE1tico. No est\xE1 afectado por la gravedad, y no puede ser movido por fuerzas o velocidades en absoluto.","Set _PARAM0_ as static":"Establecer _PARAM0_ como est\xE1tico","Is kinematic":"Es Cinem\xE1tico","Test if an object is kinematic.":"Comprueba si un objeto es cinem\xE1tico.","_PARAM0_ is kinematic":"_PARAM0_ es cinem\xE1tico","Set as kinematic":"Establecer como cinem\xE1tico","Set an object as kinematic. Is like a static body but can be moved through its velocity.":"Establecer un objeto como cinem\xE1tico. Es como un cuerpo est\xE1tico pero puede ser movido a trav\xE9s de su velocidad.","Set _PARAM0_ as kinematic":"Establecer _PARAM0_ como cinem\xE1tico","Is treat as bullet":"Es tratado como bala","Test if an object is being treat as a bullet.":"Comprueba si un objeto est\xE1 siendo tratado como un bala.","_PARAM0_ is bullet":"_PARAM0_ es bala","Treat as bullet":"Tratar como bala","Treat the object as a bullet. Better collision handling on high speeds at cost of some performance.":"Tratar el objeto como un bala. Mejor manejo de colisi\xF3n en altas velocidades a costa de alg\xFAn rendimiento.","Treat _PARAM0_ as bullet: _PARAM2_":"Tratar _PARAM0_ como bala: _PARAM2_","Treat as bullet?":"\xBFTratar como bala?","Has fixed rotation":"Tiene rotaci\xF3n fija","Test if an object has fixed rotation.":"Comprueba si un objeto tiene rotaci\xF3n fija.","_PARAM0_ has fixed rotation":"_PARAM0_ tiene rotaci\xF3n fija","Enable or disable an object fixed rotation. If enabled the object won't be able to rotate.":"Activa o desactiva una rotaci\xF3n fija de un objeto. Si se activa el objeto no ser\xE1 capaz de rotar.","Set _PARAM0_ fixed rotation: _PARAM2_":"Establecer _PARAM0_ rotaci\xF3n fija: _PARAM2_","Fixed rotation?":"Rotaci\xF3n fija?","Is sleeping allowed":"Est\xE1 permitido dormir","Test if an object can sleep.":"Comprueba si un objeto puede dormir.","_PARAM0_ can sleep":"_PARAM0_ puede dormir","Sleeping allowed":"Dormir permitido","Allow or not an object to sleep. If enabled the object will be able to sleep, improving performance for non-currently-moving objects.":"Permitir o no un objeto dormir. Si est\xE1 habilitado, el objeto ser\xE1 capaz de dormir, mejorando el rendimiento para objetos que no se mueven actualmente.","Allow _PARAM0_ to sleep: _PARAM2_":"Permitir a _PARAM0_ dormir: _PARAM2_","Can sleep?":"\xBFPuede dormir?","Is sleeping":"Est\xE1 dormido","Test if an object is sleeping.":"Comprueba si un objeto est\xE1 durmiendo.","_PARAM0_ is sleeping":"_PARAM0_ est\xE1 durmiendo","Shape scale":"Escala de forma","Modify an object shape scale. It affects custom shape dimensions and shape offset, if custom dimensions are not set the body will be scaled automatically to the object size.":"Modifica la escala de la forma del objeto. Afecta las dimensiones de la forma personalizada y el desplazamiento de la forma, si las dimensiones personalizadas no se ajustan el cuerpo se escalar\xE1n autom\xE1ticamente al tama\xF1o del objeto.","the shape scale":"la escala de forma","Body settings":"Ajustes del cuerpo","Density":"Densidad","Test an object density.":"Comprueba una densidad de objeto.","the _PARAM0_ density":"la densidad _PARAM0_","Modify an object density. The body's density and volume determine its mass.":"Modifica la densidad de un objeto. La densidad y el volumen del cuerpo determinan su masa.","the density":"la densidad","Density of the object":"Densidad del objeto","Get the density of an object.":"Obtener la densidad de un objeto.","Test an object friction.":"Comprueba la fricci\xF3n de un objeto.","the _PARAM0_ friction":"la fricci\xF3n _PARAM0_","Modify an object friction. How much energy is lost from the movement of one object over another. The combined friction from two bodies is calculated as 'sqrt(bodyA.friction * bodyB.friction)'.":"Modifica una fricci\xF3n de objetos. Cu\xE1nta energ\xEDa se pierde del movimiento de un objeto sobre otro. La fricci\xF3n combinada de dos cuerpos se calcula como 'sqrt(bodyA.friction * bodyB.friction)'.","the friction":"la fricci\xF3n","Friction of the object":"Fricci\xF3n del objeto","Get the friction of an object.":"Obtener la fricci\xF3n de un objeto.","Restitution":"Restituci\xF3n","Test an object restitution.":"Prueba la restituci\xF3n de un objeto.","the _PARAM0_ restitution":"la restituci\xF3n _PARAM0_","Modify an object restitution. Energy conservation on collision. The combined restitution from two bodies is calculated as 'max(bodyA.restitution, bodyB.restitution)'.":"Modifica la restituci\xF3n de un objeto. La conservaci\xF3n de la energ\xEDa en la colisi\xF3n. La restituci\xF3n combinada de dos cuerpos se calcula como 'max(bodyA.restitution, bodyB.restitution)'.","the restitution":"la restituci\xF3n","Restitution of the object":"Restituci\xF3n del objeto","Get the restitution of an object.":"Obtiene la restituci\xF3n de un objeto.","Test an object linear damping.":"Probar un amortiguamiento lineal del objeto.","the _PARAM0_ linear damping":"el amortiguamiento lineal _PARAM0_","Modify an object linear damping. How much movement speed is lost across the time.":"Modificar una amortiguaci\xF3n lineal de un objeto. Cu\xE1nta velocidad de movimiento se pierde a lo largo del tiempo.","Linear damping of the object":"Amortiguaci\xF3n lineal del objeto","Get the linear damping of an object.":"Obtiene el amortiguamiento lineal de un objeto.","Test an object angular damping.":"Prueba un amortiguamiento angular del objeto.","the _PARAM0_ angular damping":"la amortiguaci\xF3n angular _PARAM0_","Modify an object angular damping. How much angular speed is lost across the time.":"Modificar una amortiguaci\xF3n angular de un objeto. Cu\xE1nta velocidad angular se pierde a lo largo del tiempo.","Angular damping of the object":"Amortiguaci\xF3n angular del objeto","Get the angular damping of an object.":"Obt\xE9n la amortiguaci\xF3n angular de un objeto.","Gravity scale":"Escala de gravedad","Test an object gravity scale.":"Eval\xFAa una escala de gravedad del objeto.","the _PARAM0_ gravity scale":"la escala de gravedad _PARAM0_","Modify an object gravity scale. The gravity applied to an object is the world gravity multiplied by the object gravity scale.":"Modificar una escala de gravedad del objeto. La gravedad aplicada a un objeto es la gravedad mundial multiplicada por la escala de gravedad del objeto.","the gravity scale":"la escala de gravedad","Gravity scale of the object":"Escala de gravedad del objeto","Get the gravity scale of an object.":"Obtiene la escala de gravedad de un objeto.","Layer enabled":"Capa habilitado","Test if an object has a specific layer enabled.":"Prueba si un objeto tiene una capa espec\xEDfica activada.","_PARAM0_ has layer _PARAM2_ enabled":"_PARAM0_ tiene la capa _PARAM2_ habilitada","Filtering":"Filtrado","Layer (1 - 16)":"Capa (1 - 16)","Enable layer":"Activar capa","Enable or disable a layer for an object. Two objects collide if any layer of the first object matches any mask of the second one and vice versa.":"Activa o desactiva una capa para un objeto. Dos objetos chocan si cualquier capa del primer objeto coincide con cualquier m\xE1scara del segundo y viceversa.","Enable layer _PARAM2_ for _PARAM0_: _PARAM3_":"Activar la capa de _PARAM2_ para _PARAM0_: _PARAM3_","Enable?":"\xBFHabilitar?","Mask enabled":"M\xE1scara habilitada","Test if an object has a specific mask enabled.":"Prueba si un objeto tiene una m\xE1scara espec\xEDfica habilitada.","_PARAM0_ has mask _PARAM2_ enabled":"_PARAM0_ tiene la m\xE1scara _PARAM2_ habilitada","Mask (1 - 16)":"M\xE1scara (1 - 16)","Enable mask":"Activar m\xE1scara","Enable or disable a mask for an object. Two objects collide if any layer of the first object matches any mask of the second one and vice versa.":"Activa o desactiva una m\xE1scara para un objeto. Dos objetos chocan si cualquier capa del primer objeto coincide con cualquier m\xE1scara del segundo y viceversa.","Enable mask _PARAM2_ for _PARAM0_: _PARAM3_":"Activar m\xE1scara _PARAM2_ para _PARAM0_: _PARAM3_","Linear velocity X":"Velocidad lineal X","Test an object linear velocity on X.":"Prueba una velocidad lineal del objeto en X.","the linear velocity on X":"la velocidad lineal en X","Velocity":"Velocidad","Modify an object linear velocity on X.":"Modificar una velocidad lineal del objeto en X.","Linear velocity on X axis":"Velocidad lineal en el eje X","Get the linear velocity of an object on X axis.":"Obtener la velocidad lineal de un objeto en el eje X.","Linear velocity Y":"Velocidad lineal Y","Test an object linear velocity on Y.":"Prueba una velocidad lineal del objeto en Y.","the linear velocity on Y":"la velocidad lineal en Y","Modify an object linear velocity on Y.":"Modificar una velocidad lineal del objeto en Y.","Linear velocity on Y axis":"Velocidad lineal en el eje Y","Get the linear velocity of an object on Y axis.":"Obtener la velocidad lineal de un objeto en el eje Y.","Test an object linear velocity length.":"Prueba una longitud de velocidad lineal del objeto.","the linear velocity length":"la longitud de velocidad lineal","Get the linear velocity of an object.":"Consigue la velocidad lineal de un objeto.","Angular velocity":"Velocidad angular","Test an object angular velocity.":"Prueba una velocidad angular del objeto.","the angular velocity":"la velocidad angular","Modify an object angular velocity.":"Modificar una velocidad angular del objeto.","Get the angular velocity of an object.":"Obtiene la velocidad angular de un objeto.","Apply force":"Aplicar fuerza","Apply a force to the object. You need to specify the point of application (you can get the body mass center through expressions).":"Aplique una fuerza al objeto. Debe especificar el punto de aplicaci\xF3n (puede obtener el centro de masa corporal a trav\xE9s de las expresiones).","Apply to _PARAM0_ a force of _PARAM2_;_PARAM3_":"Aplicar a _PARAM0_ una fuerza de _PARAM2_;_PARAM3_","Forces & impulses":"Fuerzas e impulsos","X component (N)":"Componente X (N)","Y component (N)":"Componente Y (N)","Applying X position":"Aplicando posici\xF3n X","Applying Y position":"Aplicando posici\xF3n Y","Apply force (angle)":"Aplicar fuerza (\xE1ngulo)","Apply a force to the object using polar coordinates. You need to specify the point of application (you can get the body mass center through expressions).":"Aplica una fuerza al objeto usando coordenadas polares. Necesita especificar el punto de aplicaci\xF3n (puede obtener el centro de masa corporal a trav\xE9s de expresiones).","Apply to _PARAM0_ a force of angle _PARAM2_ and length _PARAM3_":"Aplicar a _PARAM0_ una fuerza de \xE1ngulo _PARAM2_ y longitud _PARAM3_","Length (N)":"Longitud (N)","Apply force toward position":"Aplicar fuerza hacia la posici\xF3n","Apply a force to the object to move it toward a position. You need to specify the point of application (you can get the body mass center through expressions).":"Aplica una fuerza al objeto para moverlo hacia una posici\xF3n. Necesita especificar el punto de aplicaci\xF3n (puede obtener el centro de masa corporal a trav\xE9s de expresiones).","Apply to _PARAM0_ a force of length _PARAM2_ towards _PARAM3_;_PARAM4_":"Aplicar a _PARAM0_ una fuerza de longitud _PARAM2_ hacia _PARAM3_;_PARAM4_","Apply impulse":"Aplicar impulso","Apply an impulse to the object. You need to specify the point of application (you can get the body mass center through expressions).":"Aplique un impulso al objeto. Debe especificar el punto de aplicaci\xF3n (puede obtener el centro de masa corporal a trav\xE9s de las expresiones).","Apply to _PARAM0_ an impulse of _PARAM2_;_PARAM3_":"Aplicar a _PARAM0_ un impulso de _PARAM2_;_PARAM3_","X component (N.m)":"Componente X (N.m)","Y component (N.m)":"Componente Y (N.m)","Apply impulse (angle)":"Aplicar impulso (\xE1ngulo)","Apply an impulse to the object using polar coordinates. You need to specify the point of application (you can get the body mass center through expressions).":"Aplicar un impulso al objeto usando coordenadas polares. Necesita especificar el punto de aplicaci\xF3n (puede obtener el centro de masa corporal a trav\xE9s de expresiones).","Apply to _PARAM0_ an impulse of angle _PARAM2_ and length _PARAM3_ (applied at _PARAM4_;_PARAM5_)":"Aplicar a _PARAM0_ un impulso del \xE1ngulo _PARAM2_ y longitud _PARAM3_ (aplicado en _PARAM4_;_PARAM5_)","Length (N.m)":"Longitud (N.m)","Apply impulse toward position":"Aplicar impulso hacia la posici\xF3n","Apply an impulse to the object to move it toward a position. You need to specify the point of application (you can get the body mass center through expressions).":"Aplica un impulso al objeto para moverlo hacia una posici\xF3n. Necesita especificar el punto de aplicaci\xF3n (puede obtener el centro de masa corporal a trav\xE9s de expresiones).","Apply to _PARAM0_ an impulse of length _PARAM2_ towards _PARAM3_;_PARAM4_ (applied at _PARAM5_;_PARAM6_)":"Aplicar a _PARAM0_ un impulso de longitud _PARAM2_ hacia _PARAM3_;_PARAM4_ (aplicado en _PARAM5_;_PARAM6_)","Apply torque (rotational force)":"Aplicar par (fuerza rotacional)","Apply a torque (also called \"rotational force\") to the object. This will make the object rotate without moving it.":"Aplica un par (tambi\xE9n llamado \"fuerza rotacional\") al objeto. Esto har\xE1 que el objeto gire sin moverlo.","Apply to _PARAM0_ a torque of _PARAM2_":"Aplicar a _PARAM0_ una torsi\xF3n de _PARAM2_","Torque (N.m)":"Torsi\xF3n (N.m)","Apply angular impulse (rotational impulse)":"Aplicar impulso angular (impulso rotacional)","Apply an angular impulse (also called a \"rotational impulse\") to the object. This will make the object rotate without moving it.":"Aplica un impulso angular (tambi\xE9n llamado \"impulso rotacional\") al objeto. Esto har\xE1 que el objeto gire sin moverlo.","Apply to _PARAM0_ an angular impulse of _PARAM2_":"Aplicar a _PARAM0_ un impulso angular de _PARAM2_","Angular impulse (N.m.s":"Impulso angular (N.m.s","Mass center X":"Centro de masas X","Mass center Y":"Centro de masas Y","Joint first object":"Articular primer objeto","Test if an object is the first object on a joint.":"Eval\xFAa si un objeto es el primer objeto en una articulaci\xF3n.","_PARAM0_ is the first object for joint _PARAM2_":"_PARAM0_ es el primer objeto para la articulaci\xF3n _PARAM2_","Joint ID":"ID com\xFAn","Joint second object":"Articulaci\xF3n del segundo objeto","Test if an object is the second object on a joint.":"Eval\xFAa si un objeto es el segundo objeto en una articulaci\xF3n.","_PARAM0_ is the second object for joint _PARAM2_":"_PARAM0_ es el segundo objeto para la articulaci\xF3n _PARAM2_","Joint first anchor X":"Primer anclaje de articulaci\xF3n X","Joint first anchor Y":"Primer anclaje de articulaci\xF3n Y","Joint second anchor X":"Segundo anclaje articulaci\xF3n X","Joint second anchor Y":"Segundo anclaje articulaci\xF3n Y","Joint reaction force":"Fuerza de reacci\xF3n conjunta","Test a joint reaction force.":"Prueba una fuerza de reacci\xF3n conjunta.","the joint _PARAM2_ reaction force":"la fuerza de reacci\xF3n de la uni\xF3n _PARAM2_","Joint reaction torque":"Par de reacci\xF3n conjunta","Test a joint reaction torque.":"Prueba un par de reacci\xF3n conjunta.","the joint _PARAM2_ reaction torque":"el par de reacci\xF3n de la uni\xF3n _PARAM2_","Remove joint":"Eliminar conjunto","Remove a joint from the scene.":"Eliminar un conjunto de la escena.","Remove joint _PARAM2_":"Eliminar conjunto _PARAM2_","Add distance joint":"A\xF1adir distancia conjunta","Add a distance joint between two objects. The length is converted to meters using the world scale on X. The frequency and damping ratio are related to the joint speed of oscillation and how fast it stops.":"Agrega una articulaci\xF3n de distancia entre dos objetos. La longitud se convierte a metros usando la escala mundial en X. La frecuencia y el ratio de amortiguaci\xF3n est\xE1n relacionadas con la velocidad conjunta de oscilaci\xF3n y la rapidez que se detiene.","Add a distance joint between _PARAM0_ and _PARAM4_":"A\xF1adir una articulaci\xF3n de distancia entre _PARAM0_ y _PARAM4_","Joints/Distance":"Conjunto/Distancia","First object":"Primer objeto","Anchor X on first body":"Anchor X en el primer cuerpo","Anchor Y on first body":"Anchor Y en el primer cuerpo","Second object":"Segundo objeto","Anchor X on second body":"Anchor X en segundo cuerpo","Anchor Y on second body":"Anchor Y en segundo cuerpo","Length (-1 to use current objects distance) (default: -1)":"Longitud (-1 para usar la distancia de objetos actuales) (por defecto: -1)","Frequency (Hz) (non-negative) (default: 0)":"Frecuencia (Hz) (no negativa) (por defecto: 0)","Damping ratio (non-negative) (default: 1)":"Ratio de amortiguaci\xF3n (no negativo) (por defecto: 1)","Allow collision between connected bodies? (default: no)":"\xBFPermitir colisi\xF3n entre los cuerpos conectados? (por defecto: no)","Variable where to store the joint ID (default: none)":"Variable donde guardar el ID conjunto (por defecto: ninguno)","Distance joint length":"Longitud com\xFAn de distancia","Modify a distance joint length.":"Modificar una longitud com\xFAn de distancia.","the length for distance joint _PARAM2_":"la longitud de la uni\xF3n de distancia _PARAM2_","Distance joint frequency":"Frecuencia de la articulaci\xF3n de distancia","Modify a distance joint frequency.":"Modificar una frecuencia com\xFAn de distancia.","the frequency for distance joint _PARAM2_":"la frecuencia de la articulaci\xF3n de distancia _PARAM2_","Distance joint damping ratio":"Relaci\xF3n de amortiguaci\xF3n conjunta de distancia","Modify a distance joint damping ratio.":"Modificar una relaci\xF3n de amortiguaci\xF3n conjunta de distancia.","the damping ratio for distance joint _PARAM2_":"el ratio de amortiguaci\xF3n para la articulaci\xF3n de distancia _PARAM2_","Add revolute joint":"A\xF1adir conjunto revolucionado","Add a revolute joint to an object at a fixed point. The object is attached as the second object in the joint, so you can use this for gear joints.":"Agrega una articulaci\xF3n revolucionada a un objeto en un punto fijo. El objeto se adjunta como el segundo objeto en la articulaci\xF3n, para que pueda utilizarlo para articulaciones de engranaje.","Add a revolute joint to _PARAM0_ at _PARAM2_;_PARAM3_":"A\xF1adir una articulaci\xF3n revolucionada a _PARAM0_ en _PARAM2_;_PARAM3_","Joints/Revolute":"Conjunto/Revolucionar","X anchor":"Ancho X","Y anchor":"Ancho Y","Enable angle limits? (default: no)":"\xBFHabilitar l\xEDmites de \xE1ngulo? (por defecto: no)","Reference angle (default: 0)":"\xC1ngulo de referencia (por defecto: 0)","Minimum angle (default: 0)":"\xC1ngulo m\xEDnimo (por defecto: 0)","Maximum angle (default: 0)":"\xC1ngulo m\xE1ximo (por defecto: 0)","Enable motor? (default: no)":"\xBFActivar motor? (por defecto: no)","Motor speed (default: 0)":"Velocidad de motor (por defecto: 0)","Motor maximum torque (default: 0)":"Torsi\xF3n m\xE1xima de motor (por defecto: 0)","Add revolute joint between two bodies":"A\xF1adir articulaci\xF3n revolucionada entre dos cuerpos","Add a revolute joint between two objects. The reference angle determines what is considered as the base angle at the initial state.":"A\xF1adir una articulaci\xF3n revolucionada entre dos objetos. El \xE1ngulo de referencia determina lo que se considera el \xE1ngulo base en el estado inicial.","Add a revolute joint between _PARAM0_ and _PARAM4_":"A\xF1adir una articulaci\xF3n revolucionada entre _PARAM0_ y _PARAM4_","Revolute joint reference angle":"\xC1ngulo de referencia de la articulaci\xF3n revolute","Revolute joint current angle":"\xC1ngulo de referencia de la articulaci\xF3n","Revolute joint angular speed":"Velocidad angular de la articulaci\xF3n","Revolute joint limits enabled":"L\xEDmites de revoluci\xF3n de la articulaci\xF3n habilitados","Test if a revolute joint limits are enabled.":"Eval\xFAar si est\xE1n habilitados los l\xEDmites de revoluci\xF3n de la articulaci\xF3n.","Limits for revolute joint _PARAM2_ are enabled":"Los l\xEDmites para la articulaci\xF3n de revoluci\xF3n _PARAM2_ est\xE1n habilitados","Enable revolute joint limits":"Activar l\xEDmites de la articulaci\xF3n de revoluci\xF3n","Enable or disable a revolute joint angle limits.":"Activa o desactiva los l\xEDmites de \xE1ngulo de la articulaci\xF3n de revoluci\xF3n.","Enable limits for revolute joint _PARAM2_: _PARAM3_":"Habilitar l\xEDmites para la articulaci\xF3n de revoluci\xF3n _PARAM2_: _PARAM3_","Revolute joint limits":"Activar l\xEDmites de la articulaci\xF3n de revoluci\xF3n","Modify a revolute joint angle limits.":"Modificar los l\xEDmites de \xE1ngulo de la articulaci\xF3n de revoluci\xF3n.","Set the limits to _PARAM3_;_PARAM4_ for revolute joint _PARAM2_":"Establecer los l\xEDmites a _PARAM3_;_PARAM4_ para la articulaci\xF3n de revoluci\xF3n _PARAM2_","Minimum angle":"\xC1ngulo m\xEDnimo","Maximum angle":"\xC1ngulo m\xE1ximo","Revolute joint minimum angle":"\xC1ngulo m\xEDnimo de la articulaci\xF3n de revoluci\xF3n","Revolute joint maximum angle":"\xC1ngulo m\xE1ximo de la articulaci\xF3n de revoluci\xF3n","Revolute joint motor enabled":"Motor de la articulaci\xF3n de revoluci\xF3n habilitado","Test if a revolute joint motor is enabled.":"Comprobar si est\xE1 habilitado el motor articulado de revoluci\xF3n.","Motor of revolute joint _PARAM2_ is enabled":"Motor de la articulaci\xF3n de revoluci\xF3n _PARAM2_ est\xE1 habilitado","Enable revolute joint motor":"Activar motor de la articulaci\xF3n de revoluci\xF3n","Enable or disable a revolute joint motor.":"Activa o desactiva un motor de una articulaci\xF3n de revoluci\xF3n.","Enable motor for revolute joint _PARAM2_: _PARAM3_":"Activar motor para la articulaci\xF3n de revoluci\xF3n _PARAM2_: _PARAM3_","Revolute joint motor speed":"Velocidad del motor de la articulaci\xF3n de revoluci\xF3n","Modify a revolute joint motor speed.":"Modificar la velocidad de un motor de la articulaci\xF3n de revoluci\xF3n.","the motor speed for revolute joint _PARAM2_":"la velocidad del motor para la articulaci\xF3n de revoluci\xF3n _PARAM2_","Revolute joint max motor torque":"Par motor m\xE1ximo de la articulaci\xF3n de revoluci\xF3n","Modify a revolute joint maximum motor torque.":"Modificar el par motor m\xE1ximo de una articulaci\xF3n de revoluci\xF3n.","the maximum motor torque for revolute joint _PARAM2_":"el par m\xE1ximo del motor para la articulaci\xF3n de revoluci\xF3n _PARAM2_","Revolute joint maximum motor torque":"Par motor m\xE1ximo de la articulaci\xF3n de revoluci\xF3n","Revolute joint motor torque":"Par motor de la articulaci\xF3n de revoluci\xF3n","Add prismatic joint":"A\xF1adir articulaci\xF3n prism\xE1tica","Add a prismatic joint between two objects. The translation limits are converted to meters using the world scale on X.":"Agrega una articulaci\xF3n prism\xE1tica entre dos objetos. Los l\xEDmites de traducci\xF3n se convierten a metros usando la escala mundial en X.","Add a prismatic joint between _PARAM0_ and _PARAM4_":"A\xF1adir una articulaci\xF3n prism\xE1tica entre _PARAM0_ y _PARAM4_","Joints/Prismatic":"Articulaci\xF3nes/Prism\xE1tico","Axis angle":"\xC1ngulo del eje","Enable limits? (default: no)":"\xBFHabilitar l\xEDmites? (por defecto: no)","Minimum translation (default: 0)":"Traducci\xF3n m\xEDnima (por defecto: 0)","Maximum translation (default: 0)":"Traducci\xF3n m\xE1xima (por defecto: 0)","Motor maximum force (default: 0)":"Fuerza m\xE1xima de motor (por defecto: 0)","Prismatic joint axis angle":"\xC1ngulo del eje de articulaci\xF3n prism\xE1tica","Prismatic joint reference angle":"\xC1ngulo de referencia de la articulaci\xF3n prism\xE1tica","Prismatic joint current translation":"Traducci\xF3n actual de la articulaci\xF3n Prism\xE1tica","Prismatic joint current speed":"Velocidad actual de la articulaci\xF3n Prism\xE1tica","Prismatic joint speed":"Velocidad de articulaci\xF3n Prism\xE1tica","Prismatic joint limits enabled":"L\xEDmites articulaci\xF3n prism\xE1tica habilitados","Test if a prismatic joint limits are enabled.":"Eval\xFAar si est\xE1n habilitados los l\xEDmites de la articulaci\xF3n prism\xE1tica.","Limits for prismatic joint _PARAM2_ are enabled":"Los l\xEDmites para la articulaci\xF3n de revoluci\xF3n _PARAM2_ est\xE1n habilitados","Enable prismatic joint limits":"Activar l\xEDmites de la articulaci\xF3n prism\xE1tica","Enable or disable a prismatic joint limits.":"Activar o desactivar los l\xEDmites de la articulaci\xF3n prism\xE1tica.","Enable limits for prismatic joint _PARAM2_: _PARAM3_":"Habilitar l\xEDmites para la articulaci\xF3n prism\xE1tica _PARAM2_: _PARAM3_","Prismatic joint limits":"L\xEDmites articulaci\xF3n prism\xE1tica","Modify a prismatic joint limits.":"Modificar un l\xEDmite com\xFAn prism\xE1tico.","Set the limits to _PARAM3_;_PARAM4_ for prismatic joint _PARAM2_":"Establecer los l\xEDmites a _PARAM3_;_PARAM4_ para la articulaci\xF3n prism\xE1tica _PARAM2_","Minimum translation":"Traducci\xF3n m\xEDnima","Maximum translation":"Traducci\xF3n m\xE1xima","Prismatic joint minimum translation":"Traducci\xF3n m\xEDnima de la articulaci\xF3n Prism\xE1tica","Prismatic joint maximum translation":"Traducci\xF3n m\xE1xima de la articulaci\xF3n Prism\xE1tica","Prismatic joint motor enabled":"Motor articulado Prism\xE1tico habilitado","Test if a prismatic joint motor is enabled.":"Eval\xFAa si se activa un motor articulado prism\xE1tico.","Motor for prismatic joint _PARAM2_ is enabled":"Motor para la articulaci\xF3n prism\xE1tica _PARAM2_ est\xE1 habilitado","Enable prismatic joint motor":"Activar motor articulado prism\xE1tico","Enable or disable a prismatic joint motor.":"Activa o desactiva un motor conjunto prism\xE1tico.","Enable motor for prismatic joint _PARAM2_: _PARAM3_":"Activar motor para la articulaci\xF3n prism\xE1tica _PARAM2_: _PARAM3_","Prismatic joint motor speed":"Velocidad de motor articulaci\xF3n Prism\xE1tica","Modify a prismatic joint motor speed.":"Modificar la velocidad de un motor de la articulaci\xF3n prism\xE1tica.","the motor force for prismatic joint _PARAM2_":"la fuerza motriz para la articulaci\xF3n prism\xE1tica _PARAM2_","Prismatic joint max motor force":"Fuerza m\xE1xima del motor de la articulaci\xF3n Prism\xE1tica","Modify a prismatic joint maximum motor force.":"Modificar la fuerza de motor m\xE1ximo de una articulaci\xF3n de prism\xE1tica.","the maximum motor force for prismatic joint _PARAM2_":"la fuerza m\xE1xima del motor para la articulaci\xF3n prism\xE1tica _PARAM2_","Prismatic joint maximum motor force":"Fuerza m\xE1xima del motor de la articulaci\xF3n Prism\xE1tica","Prismatic joint motor force":"Fuerza del motor de la articulaci\xF3n Prism\xE1tica","Add pulley joint":"A\xF1adir articulacion de polea","Add a pulley joint between two objects. Lengths are converted to meters using the world scale on X.":"Agrega una articulaci\xF3n de polea entre dos objetos. Las longitudes se convierten a metros usando la escala mundial en X.","Add a pulley joint between _PARAM0_ and _PARAM4_":"A\xF1adir una articulaci\xF3n de polea entre _PARAM0_ y _PARAM4_","Joints/Pulley":"Articulaciones/Polea","Ground anchor X for first object":"Anclaje X a tierra para el primer objeto","Ground anchor Y for first object":"Anclaje Y a tierra para el primer objeto","Ground anchor X for second object":"Anclaje X a tierra para el segundo objeto","Ground anchor Y for second object":"Anclaje Y a tierra para el segundo objeto","Length for first object (-1 to use anchor positions) (default: -1)":"Longitud para el primer objeto (-1 para usar posiciones de anclaje) (por defecto: -1)","Length for second object (-1 to use anchor positions) (default: -1)":"Longitud para el segundo objeto (-1 para usar posiciones de anclaje) (por defecto: -1)","Ratio (non-negative) (default: 1":"Ratio (no negativo) (por defecto: 1","Pulley joint first ground anchor X":"Articulacion de polea primer anclaje de tierra X","Pulley joint first ground anchor Y":"Articulacion de polea primer anclaje de tierra Y","Pulley joint second ground anchor X":"Articulacion de polea segundo anclaje de tierra X","Pulley joint second ground anchor Y":"Articulacion de polea segundo anclaje de tierra Y","Pulley joint first length":"Primera longitud de la articulaci\xF3n de polea","Pulley joint second length":"Segunda longitud de la articulaci\xF3n de polea","Pulley joint ratio":"Relaci\xF3n de la articulaci\xF3n de polea","Add gear joint":"Agregar articulaci\xF3n de engranaje","Add a gear joint between two joints. Attention: Gear joints require the joints to be revolute or prismatic, and both of them to be attached to a static body as first object.":"Agrega una articulaci\xF3n de engranaje entre dos articulaciones. Atenci\xF3n: las articulaciones de engranaje requieren que las articulaciones sean revolucionadas o prism\xE1ticas, y que ambas se adhieran a un cuerpo est\xE1tico como primer objeto.","Add a gear joint between joints _PARAM2_ and _PARAM3_":"A\xF1adir una articulaci\xF3n de engranaje entre las articulaciones _PARAM2_ y _PARAM3_","Joints/Gear":"Articulacines/Engranaje","First joint ID":"ID primera articulaci\xF3n","Second joint ID":"ID segunda articulaci\xF3n","Ratio (non-zero) (default: 1)":"Relaci\xF3n (no cero) (por defecto: 1)","Gear joint first joint":"Primera uni\xF3n de la articulaci\xF3n de engranaje","Gear joint second joint":"Segunda uni\xF3n de la articulaci\xF3n de engrana","Gear joint ratio":"Cociente de la articualci\xF3n de engranaje","Modify a Gear joint ratio.":"Modificar el cociente de una articulaci\xF3n de engranaje.","the ratio for gear joint _PARAM2_":"el ratio para la articulaci\xF3n de engranaje _PARAM2_","Add mouse joint":"A\xF1adir articulaci\xF3n de rat\xF3n","Add a mouse joint to an object (makes the object move towards a specific point).":"Agrega una articulaci\xF3n del rat\xF3n a un objeto (hace que el objeto se mueva hacia un punto espec\xEDfico).","Add a mouse joint to _PARAM0_":"A\xF1adir una articulaci\xF3n de rat\xF3n a _PARAM0_","Joints/Mouse":"Articulaciones/Rat\xF3n","Target X":"Objetivo X","Target Y":"Objetivo Y","Maximum force (N) (non-negative) (default: 500)":"Fuerza m\xE1xima (N) (no negativo) (por defecto: 500)","Frequency (Hz) (positive) (default: 10)":"Frecuencia (Hz) (positiva) (por defecto: 10)","Mouse joint target":"Articulaci\xF3n de rat\xF3n objetivo","Set a mouse joint target.":"Establecer un objetivo articulaci\xF3n de rat\xF3n.","Set the target position of mouse joint _PARAM2_ of _PARAM0_ to _PARAM3_;_PARAM4_":"Establecer la posici\xF3n destino de la articulaci\xF3n de rat\xF3n _PARAM2_ de _PARAM0_ a _PARAM3_;_PARAM4_","Mouse joint target X":"Articulaci\xF3n de rat\xF3n objetivo X","Mouse joint target Y":"Articulaci\xF3n de rat\xF3n objetivo Y","Mouse joint max force":"Fuerza m\xE1xima de la articulaci\xF3n de rat\xF3n","Set a mouse joint maximum force.":"Establecer una fuerza m\xE1xima com\xFAn del rat\xF3n.","the maximum force for mouse joint _PARAM2_":"la fuerza m\xE1xima para la articulaci\xF3n de rat\xF3n _PARAM2_","Mouse joint maximum force":"Establecer una fuerza m\xE1xima com\xFAn del rat\xF3n","Mouse joint frequency":"Frecuencia de la articulaci\xF3n de rat\xF3n","Set a mouse joint frequency.":"Establecer frecuencia de una articulaci\xF3n de rat\xF3n.","the frequency for mouse joint _PARAM2_":"la frecuencia de la articulaci\xF3n del rat\xF3n _PARAM2_","Mouse joint damping ratio":"Relaci\xF3n de amortiguaci\xF3n de la articulaci\xF3n de rat\xF3n","Set a mouse joint damping ratio.":"Establecer relaci\xF3n de amortiguaci\xF3n de una articulaci\xF3n de rat\xF3n.","the damping ratio for mouse joint _PARAM2_":"el ratio de amortiguaci\xF3n para la articulaci\xF3n de distancia _PARAM2_","Add wheel joint":"Agregar articulaci\xF3n de rueda","Add a wheel joint between two objects. Higher frequencies means higher suspensions. Damping determines oscillations, critical damping of 1 means no oscillations.":"Agrega una articulaci\xF3n de rueda entre dos objetos. Frecuencias m\xE1s altas significan suspensiones m\xE1s altas. La amortiguaci\xF3n determina oscilaciones, amortiguaci\xF3n cr\xEDtica de 1 significa no oscilaciones.","Add a wheel joint between _PARAM0_ and _PARAM4_":"A\xF1adir una articulaci\xF3n de rueda entre _PARAM0_ y _PARAM4_","Joints/Wheel":"Articulaciones/Rueda","Frequency (Hz) (non-negative) (default: 10)":"Frecuencia (Hz) (no negativa) (por defecto: 10)","Wheel joint axis angle":"\xC1ngulo de eje articulaci\xF3n de rueda","Wheel joint current translation":"Traducci\xF3n actual de la articulaci\xF3n de rueda","Wheel joint current speed":"Velocidad actual de la articulaci\xF3n de rueda","Wheel joint speed":"Velocidad articulacion de rueda","Wheel joint motor enabled":"Motor de la articulaci\xF3n de rueda habilitado","Test if a wheel joint motor is enabled.":"Comprobar si est\xE1 habilitado el motor de una articulaci\xF3n de rueda.","Motor for wheel joint _PARAM2_ is enabled":"Motor de la articulaci\xF3n de rueda _PARAM2_ est\xE1 habilitado","Enable wheel joint motor":"Activar motor de la articulaci\xF3n de rueda","Enable or disable a wheel joint motor.":"Activa o desactiva un motor de articulacion de rueda.","Enable motor for wheel joint _PARAM2_: _PARAM3_":"Activar motor para la articulaci\xF3n de rueda _PARAM2_: _PARAM3_","Wheel joint motor speed":"Velocidad motor de la articulaci\xF3n de rueda","Modify a wheel joint motor speed.":"Modificar la velocidad de un motor de la articulaci\xF3n de rueda.","the motor speed for wheel joint _PARAM2_":"la velocidad del motor para la articulaci\xF3n de la rueda _PARAM2_","Wheel joint max motor torque":"Par motor m\xE1ximo de la articulaci\xF3n de rueda","Modify a wheel joint maximum motor torque.":"Modificar el par motor m\xE1ximo de una articulaci\xF3n de rueda.","the maximum motor torque for wheel joint _PARAM2_":"la fuerza m\xE1xima del motor para la articulaci\xF3n de la rueda _PARAM2_","Wheel joint maximum motor torque":"Par motor m\xE1ximo de la articulaci\xF3n de Rueda","Wheel joint motor torque":"Par motor de la articulaci\xF3n de rueda","Wheel joint frequency":"Frecuencia de la articulaci\xF3n de rueda","Modify a wheel joint frequency.":"Modificar frecuencia de una articulaci\xF3n de rueda.","the frequency for wheel joint _PARAM2_":"la frecuencia para la articulaci\xF3n de la rueda _PARAM2_","Wheel joint damping ratio":"Relaci\xF3n de amortiguaci\xF3n de la articulaci\xF3n de rueds","Modify a wheel joint damping ratio.":"Modificar coeficiente de amortiguacion de una articulaci\xF3n rueda.","the damping ratio for wheel joint _PARAM2_":"el ratio de amortiguaci\xF3n para la articulaci\xF3n de la rueda _PARAM2_","Add weld joint":"A\xF1adir articulaci\xF3n soldada","Add a weld joint between two objects.":"A\xF1adir una articulaci\xF3n soldada entre dos objetos.","Add a weld joint between _PARAM0_ and _PARAM4_":"A\xF1adir una articulaci\xF3n soldada entre _PARAM0_ y _PARAM4_","Joints/Weld":"Articulaciones/Soldada","Weld joint reference angle":"\xC1ngulo de referencia de la articulaci\xF3n soldada","Weld joint frequency":"Frecuencia de la articulaci\xF3n soldada","Modify a weld joint frequency.":"Modificar frecuencia de una articulaci\xF3n de soldada.","the frequency for weld joint _PARAM2_":"la frecuencia para la articulaci\xF3n de la rueda _PARAM2_","Weld joint damping ratio":"Relaci\xF3n de amortiguaci\xF3n de la articulaci\xF3n soldada","Modify a weld joint damping ratio.":"Modificar coeficiente de amortiguacion de una articulaci\xF3n soldada.","the damping ratio for weld joint _PARAM2_":"el ratio de amortiguaci\xF3n para la articulaci\xF3n de la rueda _PARAM2_","Add rope joint":"A\xF1adir articulaci\xF3n de cuerda","Add a rope joint between two objects. The maximum length is converted to meters using the world scale on X.":"Agregar una articulaci\xF3n de cuerda entre dos objetos. La longitud m\xE1xima se convierte a metros usando la escala mundial en X.","Add a rope joint between _PARAM0_ and _PARAM4_":"A\xF1adir una articulaci\xF3n de cuerda entre _PARAM0_ y _PARAM4_","Joints/Rope":"Articulaciones/Cuerda","Maximum length (-1 to use current objects distance) (default: -1)":"Longitud m\xE1xima (-1 para usar la distancia entre objetos actual) (por defecto: -1)","Rope joint max length":"Longitud m\xE1xima de la articulaci\xF3n de cuerda","Modify a rope joint maximum length.":"Modificar una longitud m\xE1xima de una articulaci\xF3n de cuerda.","the maximum length for rope joint _PARAM2_":"la fuerza m\xE1xima para la articulaci\xF3n de rat\xF3n _PARAM2_","Rope joint maximum length":"Longitud m\xE1xima de la articulaci\xF3n de cuerda","Add friction joint":"A\xF1adir articulaci\xF3n de fricci\xF3n","Add a friction joint between two objects.":"A\xF1adir una articulaci\xF3n de fricci\xF3n entre dos objetos.","Add a friction joint between _PARAM0_ and _PARAM4_":"A\xF1adir una articulaci\xF3n de fricci\xF3n entre _PARAM0_ y _PARAM4_","Joints/Friction":"Articulaci\xF3n/Fricci\xF3n","Maximum force (non-negative)":"Fuerza m\xE1xima (no negativa)","Maximum torque (non-negative)":"M\xE1ximo torsi\xF3n (no negativo)","Friction joint max force":"Fricci\xF3n m\xE1xima fuerza conjunta","Modify a friction joint maximum force.":"Modificar una fricci\xF3n m\xE1xima fuerza conjunta.","the maximum force for friction joint _PARAM2_":"la fuerza m\xE1xima para la articulaci\xF3n de rat\xF3n _PARAM2_","Friction joint maximum force":"Fuerza m\xE1xima de la articulaci\xF3n de fricci\xF3n","Friction joint max torque":"Par m\xE1ximo de la articulaci\xF3n de fricci\xF3n","Modify a friction joint maximum torque.":"Modificar la fuerza de par m\xE1ximo de una articulaci\xF3n de fricci\xF3n.","the maximum torque for friction joint _PARAM2_":"la fuerza m\xE1xima para la articulaci\xF3n de rat\xF3n _PARAM2_","Friction joint maximum torque":"Par m\xE1ximo de la articulaci\xF3n de fricci\xF3n","Add motor joint":"A\xF1adir articulaci\xF3n de motor","Add a motor joint between two objects. The position and angle offsets are relative to the first object.":"Agregar una articulaci\xF3n de motor entre dos objetos. La posici\xF3n y el \xE1ngulo son relativos al primer objeto.","Add a motor joint between _PARAM0_ and _PARAM2_":"A\xF1adir una combinaci\xF3n de motor entre _PARAM0_ y _PARAM2_","Joints/Motor":"Articulaciones/Motor","Offset X position":"Desplazamiento posici\xF3n X","Offset Y position":"Desplazamiento posici\xF3n Y","Offset Angle":"\xC1ngulo de desplazamiento","Correction factor (default: 1)":"Factor de correcci\xF3n (por defecto: 1)","Motor joint offset":"Desplazamiento articulaci\xF3n de Motor","Modify a motor joint offset.":"Modificar desplazamiento articulaci\xF3n de motor.","Set offset to _PARAM3_;_PARAM4_ for motor joint _PARAM2_":"Establecer desplazamiento a _PARAM3_;_PARAM4_ para la articulaci\xF3n del motor _PARAM2_","Offset X":"Desplazamiento X","Offset Y":"Desplazamiento Y","Motor joint offset X":"Desplazamiento X articulaci\xF3n de Motor","Motor joint offset Y":"Desplazamiento Y articulaci\xF3n de Motor","Motor joint angular offset":"Desplazamiento angular de articulaci\xF3n de Motor","Modify a motor joint angular offset.":"Modificar un desplazamiento angular articulaci\xF3n de motor.","the angular offset for motor joint _PARAM2_":"la fuerza m\xE1xima para la articulaci\xF3n de rat\xF3n _PARAM2_","Motor joint max force":"Fuerza m\xE1xima de la articulaci\xF3n de motor","Modify a motor joint maximum force.":"Modificar una fuerza m\xE1xima de una articulaci\xF3n de motor.","the maximum force for motor joint _PARAM2_":"la fuerza m\xE1xima para la articulaci\xF3n de rat\xF3n _PARAM2_","Motor joint maximum force":"Fuerza m\xE1xima de la articulaci\xF3n de motor","Motor joint max torque":"Par m\xE1ximo de la articulaci\xF3n de motor","Modify a motor joint maximum torque.":"Modificar par m\xE1ximo de una articulaci\xF3n de motor.","the maximum torque for motor joint _PARAM2_":"la fuerza m\xE1xima para la articulaci\xF3n de rat\xF3n _PARAM2_","Motor joint maximum torque":"Par m\xE1ximo de la articulaci\xF3n de motor","Motor joint correction factor":"Factor de correcci\xF3n articulaci\xF3n de Motor","Modify a motor joint correction factor.":"Modificar un factor de correcci\xF3n articulaci\xF3n de motor.","the correction factor for motor joint _PARAM2_":"el factor de correcci\xF3n de la articulaci\xF3n de motor _PARAM2_","Test if two objects collide.":"Comprobar si dos objetos colisionan.","_PARAM0_ is colliding with _PARAM2_":"_PARAM0_ est\xE1 colisionando con _PARAM2_","Debugger Tools":"Herramientas de depurador","Allow to interact with the editor debugger from the game.":"Permite interactuar con el depurador del editor del juego.","Pause game execution":"Pausar ejecuci\xF3n del juego","This pauses the game, useful for inspecting the game state through the debugger. Note that events will be still executed until the end before the game is paused.":"Esto pausa el juego, \xFAtil para inspeccionar el estado del juego a trav\xE9s del depurador. Tenga en cuenta que los eventos se ejecutar\xE1n hasta el final antes de que el juego se pause.","Draw collisions hitboxes and points":"Dibujar cajas de colisiones y puntos","This activates the display of rectangles and information on screen showing the objects bounding boxes (blue), the hitboxes (red) and some points of objects.":"Esto activa la visualizaci\xF3n de rect\xE1ngulos e informaci\xF3n en la pantalla que muestra los objetos que delimitan cajas (azul), los hitboxes (rojos) y algunos puntos de objetos.","Enable debugging view of bounding boxes/collision masks: _PARAM1_ (include invisible objects: _PARAM2_, point names: _PARAM3_, custom points: _PARAM4_)":"Habilitar vista de depuraci\xF3n de casillas/m\xE1scaras de colisi\xF3n: _PARAM1_ (incluir objetos invisibles: _PARAM2_, nombres de puntos: _PARAM3_, puntos personalizados: _PARAM4_)","Enable debug draw":"Habilitar depuraci\xF3n de dibujo","Show collisions for hidden objects":"Mostrar colisiones para objetos ocultos","Show points names":"Mostrar nombres de puntos","Show custom points":"Mostrar puntos personalizados","Log a message to the console":"Registra un mensaje en la consola","Logs a message to the debugger's console.":"Registra un mensaje en la consola del depurador.","Log message _PARAM0_ of type _PARAM1_ to the console in group _PARAM2_":"Registra mensaje _PARAM0_ del tipo _PARAM1_ en la consola en el grupo _PARAM2_","BBCode Text Object":"Objeto de texto BBCode","BBCode text":"Texto BBCode","Base color":"Color base","Base size":"Tama\xF1o base","Base alignment":"Alineaci\xF3n base","Visible on start":"Visible al inicio","BBText":"BBText","Displays a rich text label using BBCode markup (allowing to set parts of the text as bold, italic, use different colors and shadows).":"Muestra una etiqueta de texto enriquecido usando marcado BBCode (permitiendo establecer partes del texto como negrita, cursiva, usar diferentes colores y sombras).","Compare the value of the BBCode text.":"Compare el valor del texto BBCode.","the BBCode text":"el texto de BBCode","Set BBCode text":"Establecer texto de BBCode","Get BBCode text":"Obtener texto de BBCode","Set base color":"Establecer color base","Set base color of _PARAM0_ to _PARAM1_":"Establecer el color base de _PARAM0_ en _PARAM1_","Compare the value of the base opacity of the text.":"Comparar el valor de la opacidad base del texto.","the base opacity":"la opacidad base","Set base opacity":"Establecer la opacidad base","Get the base opacity":"Obtener la opacidad base","Compare the base font size of the text.":"Compara el tama\xF1o de fuente base del texto.","the base font size":"el tama\xF1o de fuente base","Set base font size":"Establecer tama\xF1o de fuente base","Get the base font size":"Obtener el tama\xF1o de fuente base","Font family":"Familia tipogr\xE1fica","Compare the value of font family":"Compara el valor de la familia de fuentes","the base font family":"la familia de fuentes base","Set font family":"Establecer familia de fuentes","Get the base font family":"Obtener la familia de fuentes base","Check the current text alignment.":"Verifique la alineaci\xF3n actual del texto.","The text alignment of _PARAM0_ is _PARAM1_":"La alineaci\xF3n del texto de _PARAM0_ es _PARAM1_","Change the alignment of the text.":"Cambiar la alineaci\xF3n del texto.","Set text alignment of _PARAM0_ to _PARAM1_":"Establezca la alineaci\xF3n de texto de _PARAM0_ en _PARAM1_","Get the text alignment":"Obtener la alineaci\xF3n del texto","Word wrap is enabled":"Word wrap est\xE1 habilitado","Set word wrap":"Establecer word wrap","Activate word wrap for _PARAM0_: _PARAM1_":"Activar word wrap para _PARAM0_: _PARAM1_","Compare the width, in pixels, after which the text is wrapped on next line.":"Compara el ancho, en p\xEDxeles, despu\xE9s del cual el texto se envuelve en la siguiente l\xEDnea.","Change the width, in pixels, after which the text is wrapped on next line.":"Cambiar el ancho, en p\xEDxeles, despu\xE9s del cual el texto se envuelve en l\xEDnea siguiente.","Get the wrapping width":"Obtener el ancho de wrapping","P2P (experimental)":"P2P (experimental)","Event triggered by peer":"Evento activado por un punto","Triggers once when a connected client sends the event":"Se lanza una vez cuando un cliente conectado env\xEDa el evento","Event _PARAM0_ received from other client (data loss: _PARAM1_)":"Evento _PARAM0_ recibido de otro cliente (p\xE9rdida de datos: _PARAM1_)","Event name":"Nombre del evento","Data loss allowed?":"\xBFSe permite la perdida de datos?","Is P2P ready":"Est\xE1 listo P2P","True if the peer-to-peer extension initialized and is ready to use.":"Verdadero si la extensi\xF3n peer-to-peer est\xE1 inicializada y lista para usar.","Is P2P ready?":"\xBFEst\xE1 listo el P2P?","An error occurred":"Se ha producido un error","Triggers once when an error occurs. Use P2P::GetLastError() expression to get the content of the error if you want to analyse it or display it to the user.":"Se lanza una vez cuando ocurre un error. Utilice la expresi\xF3n P2P::GetLastError() para obtener el contenido del error si desea analizarlo o mostrarlo al usuario.","P2P error occurred":"Se ha producido un error P2P","Peer disconnected":"Par desconectado","Triggers once when a peer disconnects.":"Se lanza una vez cuando un par se desconecta.","P2P peer disconnected":"Par P2P desconectado","Peer Connected":"Pares conectados","Triggers once when a remote peer initiates a connection.":"Se activa una vez cuando un par remoto inicia una conexi\xF3n.","P2P peer connected":"P2P conectado","Connect to another client":"Conectar a otro cliente","Connects the current client to another client using its id.":"Conecta el cliente actual a otro cliente usando su id.","Connect to P2P client _PARAM0_":"Conectar al cliente P2P _PARAM0_","ID of the other client":"ID del otro cliente","Connect to a broker server":"Conectar a un servidor broker","Connects the extension to a broker server.":"Conecta la extensi\xF3n a un servidor broker.","Connect to the broker server at http://_PARAM0_:_PARAM1_/":"Conectar al servidor broker en http://_PARAM0_:_PARAM1_/","Host":"Host","Port":"Puerto","Path":"Ruta","SSl enabled?":"\xBFSSl habilitado?","Use a custom ICE server":"Usa un servidor ICE personalizado","Disables the default ICE (STUN or TURN) servers list and use one of your own. Note that it is recommended to add at least 1 self-hosted STUN and TURN server for games that are not over LAN but over the internet. This action can be used multiple times to add multiple servers. This action needs to be called BEFORE connecting to the broker server.":"Deshabilita la lista de servidores de ICE (STUN o TURN) por defecto y usa uno propio. Tenga en cuenta que se recomienda a\xF1adir al menos 1 servidor STUN y TURN autoalojado para juegos que no se encuentren en LAN sino a trav\xE9s de Internet. Esta acci\xF3n puede ser usada varias veces para agregar m\xFAltiples servidores. Esta acci\xF3n debe ser llamada BEFORE conectando al servidor de broker.","Use ICE server _PARAM0_ (username: _PARAM1_, password: _PARAM2_)":"Usa servidor ICE _PARAM0_ (usuario: _PARAM1_, contrase\xF1a: _PARAM2_)","URL to the ICE server":"URL al servidor ICE","(Optional) Username":"(Opcional) Nombre de usuario","(Optional) Password":"(Opcional) Contrase\xF1a","Connect to the default broker server":"Conectar al servidor broker por defecto","Connects to the default broker server.":"Conecta al servidor broker predeterminado.","Override the client ID":"Reemplazar el ID del cliente","Overrides the client ID of the current game instance with a specified ID. Must be called BEFORE connecting to a broker.":"Reemplaza el ID del cliente de la instancia actual del juego con un ID especificado. Debe llamarse BEFORE conect\xE1ndose a un broker.","Override the client ID with _PARAM0_":"Reemplazar el ID del cliente con _PARAM0_","ID":"ID","Trigger event on all connected clients":"Lanza el evento en todos los clientes conectados","Triggers an event on all connected clients":"Lanza un evento en todos los clientes conectados","Trigger event _PARAM0_ on all connected clients (extra data: _PARAM1_)":"Lanza el evento _PARAM0_ en todos los clientes conectados (datos extra: _PARAM1_)","Extra data (optional)":"Datos adicionales (opcional)","Trigger event on a specific client":"Lanza el evento en un cliente especifico","Triggers an event on a specific connected client":"Lanza el evento en un cliente especifico conectado","Trigger event _PARAM1_ on client _PARAM0_ (extra data: _PARAM2_)":"Lanza el evento _PARAM1_ en el cliente _PARAM0_ (datos extra: _PARAM2_)","Trigger event on all connected clients (variable)":"Lanza el evento en todos los clientes conectados (variable)","Variable containing the extra data":"Variable que contiene los datos adicionales","Trigger event on a specific client (variable)":"Lanza el evento en un cliente especifico (variable)","Get event data (variable)":"Obtener datos del evento (variable)","Store the data of the specified event in a variable. Check in the conditions that the event was received using the \"Event received\" condition.":"Almacena los datos del evento especificado en una variable. Comprueba las condiciones en las que el evento fue recibido usando la condici\xF3n \"Evento recibido\".","Overwrite _PARAM1_ with variable sent with last trigger of _PARAM0_":"Sobrescribir _PARAM1_ con la variable enviada con el \xFAltimo disparador de _PARAM0_","Variable where to store the received data":"Variable donde almacenar los datos recibidos","Disconnect from a peer":"Desconectar de un par","Disconnects this client from another client.":"Desconecta este cliente de otro cliente.","Disconnect from client _PARAM0_":"Desconectar del cliente _PARAM0_","Disconnect from all peers":"Desconectar de todos los pares","Disconnects this client from all other clients.":"Desconecta este cliente de todos los dem\xE1s clientes.","Disconnect from all clients":"Desconectar de todos los clientes","Disconnect from broker":"Desconectar del broker","Disconnects the client from the broker server.":"Desconecta el cliente del servidor broker.","Disconnect the client from the broker":"Desconectar el cliente del broker","Disconnect from all":"Desconectar de todo","Disconnects the client from the broker server and all other clients.":"Desconecta el cliente del servidor broker y del resto de clientes.","Disconnect the client from the broker and other clients":"Desconectar el cliente del broker y otros clientes","Get event data":"Obtener datos del evento","Returns the data received when the specified event was last triggered":"Devuelve los datos recibidos cuando el evento especificado fue activado por \xFAltima vez","Get event sender":"Obtener remitente de eventos","Returns the id of the peer that triggered the event":"Devuelve el id del par que desencaden\xF3 el evento","Get client ID":"Obtener ID de cliente","Gets the client ID of the current game instance":"Obtiene el ID del cliente de la instancia actual del juego","Get last error":"Obtener el \xFAltimo error","Gets the description of the last P2P error":"Obtiene la descripci\xF3n del \xFAltimo error P2P","Get last disconnected peer":"Obtener \xFAltimo par desconectado","Gets the ID of the latest peer that has disconnected.":"Obtiene el ID del \xFAltimo par que se ha desconectado.","Get ID of the connected peer":"Obtener ID del par conectado","Gets the ID of the newly connected peer.":"Obtiene el ID del nuevo par conectado.","Adjustment":"Rectificaci\xF3n","Adjust gamma, contrast, saturation, brightness, alpha or color-channel shift.":"Ajuste gamma, contraste, saturaci\xF3n, brillo, alfa o cambio de canal de color.","Gamma (between 0 and 5)":"Gamma (entre 0 y 5)","Saturation (between 0 and 5)":"Saturaci\xF3n (entre 0 y 5)","Contrast (between 0 and 5)":"Contraste (entre 0 y 5)","Brightness (between 0 and 5)":"Brillo (entre 0 y 5)","Red (between 0 and 5)":"Rojo (entre 0 y 5)","Green (between 0 and 5)":"Verde (entre 0 y 5)","Blue (between 0 and 5)":"Azul (entre 0 y 5)","Alpha (between 0 and 1, 0 is transparent)":"Alfa (entre 0 y 1, 0 es transparente)","Advanced bloom":"Floraci\xF3n avanzada","Applies a bloom effect.":"Aplica efecto bloom.","Threshold (between 0 and 1)":"Umbral (entre 0 y 1)","Bloom Scale (between 0 and 2)":"Escala de floraci\xF3n (entre 0 y 2)","Brightness (between 0 and 2)":"Brillo (entre 0 y 2)","Blur (between 0 and 20)":"Desenfoque (entre 0 y 20)","Quality (between 0 and 20)":"Calidad (entre 0 y 20)","Padding for the visual effect area":"Relleno para el \xE1rea de efecto visual","ASCII":"ASCII","Render the image with ASCII characters only.":"Renderiza la imagen s\xF3lo con caracteres ASCII.","Size (between 2 and 20)":"Tama\xF1o (entre 2 y 20)","Beveled edges":"Bordes biselados","Add beveled edges around the rendered image.":"Agrega bordes biselados alrededor de la imagen renderizada.","Rotation (between 0 and 360)":"Rotaci\xF3n (entre 0 y 360)","Outer strength (between 0 and 5)":"fuerza externa (entre 0 y 5)","Distance (between 10 and 20)":"Distancia (entre 10 y 20)","Light alpha (between 0 and 1)":"Alfa ligera (entre 0 y 1)","Light color (color of the outline)":"Color claro (color del contorno)","Shadow color (color of the outline)":"Color de sombra (color del contorno)","Shadow alpha (between 0 and 1)":"Alfa sombra (entre 0 y 1)","Black and White":"Negro y Blanco","Alter the colors to make the image black and white":"Alterna los colores para hacer la imagen en blanco y negro","Opacity (between 0 and 1)":"Opacidad (entre 0 y 1)","Blending mode":"Modo de fundido","Alter the rendered image with the specified blend mode.":"Modifica la imagen con el modo de fundido especificado.","Mode (0: Normal, 1: Add, 2: Multiply, 3: Screen)":"Modo (0: Normal, 1: A\xF1adir, 2: Multiplicar, 3: Pantalla)","Blur (Gaussian, slow - prefer to use Kawase blur)":"Desenfoque (Gaussiano, lento - prefiere usar desenfoque Kawase)","Blur the rendered image. This is slow, so prefer to use Kawase blur in most cases.":"Desenfoque de la imagen procesada. Esto es lento, as\xED que prefiere usar desenfoque Kawase en la mayor\xEDa de los casos.","Blur intensity":"Intensidad del desenfoque","Number of render passes. An high value will cause lags/poor performance.":"La cantidad de procesamiento pasa. Un valor alto causar\xE1 retrasos/mal rendimiento.","Resolution":"Resoluci\xF3n","Kernel size (one of these values: 5, 7, 9, 11, 13, 15)":"(uno de estos valores: 5, 7, 9, 11, 13, 15)","Brightness":"Brillo","Make the image brighter.":"Hace la imagen m\xE1s brillante.","Brightness (between 0 and 1)":"Brillo (entre 0 y 1)","Bulge Pinch":"Bulge Pinch","Bulges or pinches the image in a circle.":"Curva o pellizca la imagen en un c\xEDrculo.","Center X (between 0 and 1, 0.5 is image middle)":"Centro X (entre 0 y 1, 0.5 es el centro de la imagen)","Center Y (between 0 and 1, 0.5 is image middle)":"Centro Y (entre 0 y 1, 0.5 es el centro de la imagen)","Radius":"Radio","strength (between -1 and 1)":"fuerza (entre -1 y 1)","-1 is strong pinch, 0 is no effect, 1 is strong bulge":"-1 es un pellizco fuerte, 0 no es ning\xFAn efecto, 1 es una curvatura fuerte","Color Map":"Mapa de colores","Change the color rendered on screen.":"Cambiar el color representado en la pantalla.","Color map texture for the effect":"Textura de mapa de color para el efecto","You can change colors of pixels by modifing a reference color image, containing each colors, called the *Color Map Texture*. To get started, **download** [a default color map texture here](http://wiki.compilgames.net/doku.php/gdevelop5/interface/scene-editor/layer-effects).":"Puede cambiar los colores de los p\xEDxeles modificando una imagen de color de referencia, que contiene cada color, llamada * Textura de mapa de color *. Para comenzar, ** descargue ** [una textura de mapa de color predeterminada aqu\xED] (http://wiki.compilgames.net/doku.php/gdevelop5/interface/scene-editor/layer-effects).","Disable anti-aliasing (\"nearest\" pixel rounding)":"Desactivar suavizado (redondeo de p\xEDxeles \"m\xE1s cercano\")","Mix":"Mezcla","Mix value of the effect on the layer (in percent)":"Valor de mezcla del efecto en la capa (en porcentaje)","Color Replace":"Reemplazar color","Effect replacing a color (or similar) by another.":"Efecto reemplazando un color (o similar) por otro.","Original Color":"Color original","New Color":"Nuevo color","Epsilon (between 0 and 1)":"Epsil\xF3n (entre 0 y 1)","Tolerance/sensitivity of the floating-point comparison between colors (lower = more exact, higher = more inclusive)":"Tolerancia/sensibilidad de la comparaci\xF3n de coma flotante entre colores (menor = m\xE1s exacto, mayor = m\xE1s inclusivo)","CRT":"CRT","Apply an effect resembling old CRT monitors.":"Aplicar un efecto que emite viejos controles de CRT.","Line width (between 0 and 5)":"Ancho de l\xEDnea (entre 0 y 5)","Line contrast (between 0 and 1)":"Contraste de l\xEDnea (entre 0 y 1)","Noise (between 0 and 1)":"Ruido (entre 0 y 1)","Curvature (between 0 and 10)":"Curvatura (entre 0 y 10)","Show vertical lines":"Mostrar l\xEDneas verticales","Noise size (between 0 and 10)":"Ruido (entre 0 y 1)","Vignetting (between 0 and 1)":"Vi\xF1eteado (entre 0 y 1)","Vignetting alpha (between 0 and 1)":"Vi\xF1eteo alfa (entre 0 y 1)","Vignetting blur (between 0 and 1)":"Desenfoque de vi\xF1etas (entre 0 y 1)","Interlaced Lines Speed":"Velocidad de l\xEDneas entrelazadas","0: Pause, 0.5: Half speed, 1: Normal speed, 2: Double speed, etc...":"0: Pausa, 0.5: Velocidad media, 1: Velocidad normal, 2: Velocidad doble, etc...","Noise Frequency":"Frecuencia de ruido","Uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object.":"Utiliza los valores de p\xEDxel de la textura especificada (llamada mapa de desplazamiento) para realizar un desplazamiento de un objeto.","Displacement map texture":"Textura de mapa de desplazamiento","Displacement map texture for the effect. To get started, **download** [a default displacement map texture here](http://wiki.compilgames.net/doku.php/gdevelop5/interface/scene-editor/layer-effects).":"Textura de mapa de desplazamiento para el efecto. Para comenzar, ** descargue ** [una textura de mapa de desplazamiento predeterminada aqu\xED] (http://wiki.compilgames.net/doku.php/gdevelop5/interface/scene-editor/layer-effects).","Dot":"Punto","Applies a dotscreen effect making objects appear to be made out of black and white halftone dots like an old printer.":"Se aplica un efecto de dotscreen que hace que los objetos parezcan estar hechos de puntos a medio tono blanco y negro como una impresora antigua.","Scale (between 0.3 and 1)":"Escala (entre 0,3 y 1)","Angle (between 0 and 5)":"\xC1ngulo (entre 0 y 5)","Drop shadow":"Soltar sombra","Add a shadow around the rendered image.":"Agrega una sombra alrededor de la imagen renderizada.","Quality (between 1 and 20)":"Calidad (entre 1 y 20)","Alpha (between 0 and 1)":"Alfa (entre 0 y 1)","Distance (between 0 and 50)":"Distancia (entre 0 y 50)","Color of the shadow":"Color de la sombra","Shadow only (shows only the shadow when enabled)":"Solo sombra (muestra s\xF3lo la sombra cuando est\xE1 activada)","Glitch":"Glitch","Applies a glitch effect to an object.":"Aplica un efecto de glitch a un objeto.","Slices (between 2 and infinite)":"Partes (entre 2 e infinitas)","Offset (between -400 and 400)":"Desplazamiento (entre -400 y 400)","Direction (between -180 and 180)":"Direcci\xF3n (entre -180 y 180)","Fill Mode (between 0 and 4)":"Modo de relleno (entre 0 y 4)","The fill mode of the space after the offset.(0: TRANSPARENT, 1: ORIGINAL, 2: LOOP, 3: CLAMP, 4: MIRROR)":"Modo de relleno del espacio despu\xE9s del desplazamiento.(0: TRANSPARENTE, 1: ORIGINAL, 2: LOOP, 3: CLAMP, 4: MIRROR)","Average":"Promedio","Min Size":"Tama\xF1o Min","Sample Size":"Tama\xF1o de muestra","Animation Frequency":"Frecuencia de animaci\xF3n","Red X offset (between -50 and 50)":"Desplazamiento rojo en X (entre -50 y 50)","Red Y offset (between -50 and 50)":"Desplazamiento rojo en Y (entre -50 y 50)","Green X offset (between -50 and 50)":"Desplazamiento verde en X (entre -50 y 50)","Green Y offset (between -50 and 50)":"Desplazamiento verde en Y (entre -50 y 50)","Blue X offset (between -50 and 50)":"Desplazamiento en X azul (entre -50 y 50)","Blue Y offset (between -50 and 50)":"Desplazamiento en Y azul (entre -50 y 50)","Glow":"Resplandor","Add a glow effect around the rendered image.":"Agrega un efecto resplandor alrededor de la imagen renderizada.","Inner strength (between 0 and 20)":"fuerza interior (entre 0 y 20)","Outer strength (between 0 and 20)":"fuerza externa (entre 0 y 20)","Color (color of the outline)":"Color (color del contorno)","Godray":"Godray","Apply and animate atmospheric light rays.":"Aplicar y animar los rayos de luz atmosf\xE9rica.","Parallel (parallel rays)":"Paralelo (rayos paralelos)","Animation Speed":"Velocidad de animaci\xF3n","Lacunarity (between 0 and 5)":"Lacunaridad (entre 0 y 5)","Angle (between -60 and 60)":"Angulo (entre -60 y 60)","Gain (between 0 and 1)":"Ganancia (entre 0 y 1)","Light (between 0 and 60)":"Ligero (entre 0 y 60)","Center X (between 100 and 1000)":"Centro X (entre 100 y 1000)","Center Y (between -1000 and 100)":"Centro Y (entre -1000 y 100)","Blur (Kawase, fast)":"Desenfoque (Kawase, r\xE1pido)","Blur the rendered image, with much better performance than Gaussian blur.":"Desenfoca la imagen renderizada, con un rendimiento superior al desenfoque Gaussiano.","Pixelize X (between 0 and 10)":"Pixelize X (entre 0 y 10)","Pixelize Y (between 0 and 10)":"Pixelize Y (entre 0 y 10)","Light Night":"Luz nocturna","Alter the colors to simulate night.":"Cambia los colores para simular la noche.","Dark Night":"Noche oscura","Alter the colors to simulate a dark night.":"Cambia los colores para simular la noche.","Intensity (between 0 and 1)":"Intensidad (entre 0 y 1)","Noise":"Ruido","Add some noise on the rendered image.":"Agrega algo de ruido en la imagen renderizada.","Noise intensity (between 0 and 1)":"Intensidad del ruido (entre 0 y 1)","Old Film":"Pel\xEDcula antigua","Add a Old film effect around the rendered image.":"Agrega un efecto de pel\xEDcula antigua alrededor de la imagen renderizada.","Sepia (between 0 and 1)":"Sepia (entre 0 y 1)","The amount of saturation of sepia effect, a value of 1 is more saturation and closer to 0 is less, and a value of 0 produces no sepia effect":"Cantidad de saturaci\xF3n del efecto sepia, un valor de 1 es m\xE1s saturaci\xF3n y m\xE1s cercano a 0 es menos, y un valor de 0 no produce efecto sepia","Noise Size (between 0 and 10)":"Tama\xF1o del ruido (entre 0 y 10)","Scratch (between -1 and 1)":"Scratch (entre -1 y 1)","Scratch Density (between 0 and 1)":"Densidad de Scratch (entre 0 y 1)","Scratch Width (between 1 and 20)":"Ancho de Scratch (entre 1 y 20)","Vignetting Alpha (between 0 and 1)":"Alfa de Vignetting (entre 0 y 1)","Vignetting Blur (between 0 and 1)":"Desenfoque de Vignetting (entre 0 y 1)","Draws an outline around the rendered image.":"Dibuja un contorno alrededor de la imagen procesada.","Thickness (between 0 and 20)":"Grosor (entre 0 y 20)","Color of the outline":"Color del contorno","Pixelate":"Pixelate","Applies a pixelate effect, making display objects appear 'blocky'.":"Aplica un efecto de pixelado, lo que hace que los objetos de visualizaci\xF3n parezcan 'bloqueados'.","Size of the pixels (10 pixels by default)":"Tama\xF1o de los p\xEDxeles (10 p\xEDxeles por defecto)","Radial Blur":"Desenfoque radial","Applies a Motion blur to an object.":"Aplica un desenfoque de movimiento a un objeto.","The maximum size of the blur radius, -1 is infinite":"El tama\xF1o m\xE1ximo del radio de desenfoque -1 es infinito","Angle (between -180 and 180)":"\xC1ngulo (entre -180 y 180)","The angle in degree of the motion for blur effect":"El \xE1ngulo en grados del efecto de desenfoque","Kernel Size (between 3 and 25)":"Tama\xF1o del Kernel (entre 3 y 25)","The kernel size of the blur filter (Odd number)":"El tama\xF1o del n\xFAcleo del filtro de desenfoque (n\xFAmero impar)","Reflection":"Reflexi\xF3n","Applies a reflection effect to simulate the reflection on water with waves.":"Se aplica un efecto de reflexi\xF3n para simular la reflexi\xF3n sobre el agua con olas.","Reflect the image on the waves":"Reflejar la imagen en las ondas","Vertical position of the reflection point":"Posici\xF3n vertical del punto de reflexi\xF3n","Default is 50% (middle). Smaller numbers produce a larger reflection, larger numbers produce a smaller reflection.":"Por defecto es 50% (medio). Los n\xFAmeros m\xE1s peque\xF1os producen una reflexi\xF3n m\xE1s grande, n\xFAmeros m\xE1s grandes producen una reflexi\xF3n m\xE1s peque\xF1a.","Amplitude start":"Inicio de Amplitud","Starting amplitude of waves (0 by default)":"Comenzando amplitud de ondas (0 por defecto)","Amplitude ending":"Fin de Amplitud","Ending amplitude of waves (20 by default)":"Finalizando amplitud de ondas (20 por defecto)","Wave length start":"Inicio de longitud de onda","Starting wave length (30 by default)":"Iniciando longitud de onda (30 por defecto)","Wave length ending":"Longitud de onda final","Ending wave length (100 by default)":"Finalizando la longitud de la onda (100 por defecto)","Alpha start":"Inicio alfa","Starting alpha (1 by default)":"Alfa inicial (1 por defecto)","Alpha ending":"Alfa final","Ending alpha (1 by default)":"Alfa final (1 por defecto)","RGB split (chromatic aberration)":"Divisi\xF3n RGB (aberraci\xF3n crom\xE1tica)","Applies a RGB split effect also known as chromatic aberration.":"Aplica un efecto de divisi\xF3n RGB tambi\xE9n conocido como aberraci\xF3n crom\xE1tica.","Red X offset (between -20 and 20)":"Desplazamiento en X rojo (entre -20 y 20)","Red Y offset (between -20 and 20)":"Desplazamiento rojo en Y (entre -20 y 20)","Green X offset (between -20 and 20)":"Desplazamiento en X verde (entre -20 y 20)","Green Y offset (between -20 and 20)":"Desplazamiento en Y verde (entre -20 y 20)","Blue X offset (between -20 and 20)":"Desplazamiento en X azul (entre -20 y 20)","Blue Y offset (between -20 and 20)":"Desplazamiento azul Y (entre -20 y 20)","Sepia":"Sepia","Alter the colors to sepia.":"Cambia los colores a sepia.","Tilt shift":"Cambio de inclinaci\xF3n","Render a tilt-shift-like camera effect.":"Renderiza un efecto de c\xE1mara tipo tilt-shift.","Blur (between 0 and 200)":"Desenfoque (entre 0 y 200)","Gradient blur (between 0 and 2000)":"Desenfoque de gradiente (entre 0 y 2000)","Twist":"Torsion","Applies a twist effect making objects appear twisted in the given direction.":"Se aplica un efecto de torsi\xF3n que hace que los objetos aparezcan distorsionados en la direcci\xF3n dada.","The radius of the twist":"Radio del giro","Angle (between -10 and 10)":"\xC1ngulo (entre -10 y 10)","The angle in degree of the twist":"\xC1ngulo en grados del giro","Offset X (between 0 and 1, 0.5 is image middle)":"Desplazamiento X (entre 0 y 1, 0.5 es el medio de la imagen)","Offset Y (between 0 and 1, 0.5 is image middle)":"Desplazamiento Y (entre 0 y 1, 0.5 es el medio de la imagen)","Zoom blur":"Desenfoque de zoom","Applies a Zoom blur.":"Aplica un desenfoque de zoom.","Inner radius":"Radius interior","strength (between 0 and 5)":"fuerza (entre 0 y 5)","Firebase":"Firebase","Use Google Firebase services (database, functions, storage...) in your game.":"Utiliza los servicios de Google Firebase (base de datos, funciones, almacenamiento...) en tu juego.","Firebase configuration string":"Cadena de configuraci\xF3n Firebase","Enable analytics":"Habilitar analytics","Enables Analytics for that project.":"Habilita Analytics para ese proyecto.","Log an Event":"Registrar un evento","Triggers an Event/Conversion for the current user on the Analytics.Can also pass additional data to the Analytics":"Activa un evento/conversi\xF3n para el usuario actual en el An\xE1lisis. Tambi\xE9n puede pasar datos adicionales a los Anal\xEDticos","Trigger Event _PARAM0_ with argument _PARAM1_":"Evento de activaci\xF3n _PARAM0_ con argumento _PARAM1_","Event Name":"Nombre del evento","Additional Data":"Datos adicionales","Change user UID":"Cambiar UID de usuario","Changes the current user's analytics identifier. This is what let Analytics differienciate user, so it should always be unique for each user. For advanced usage only.":"Cambia el identificador anal\xEDtico del usuario actual. Esto es lo que permite a Analytics diferenciar al usuario, por lo que siempre deber\xEDa ser \xFAnico para cada usuario. Para uso avanzado.","Set current user's ID to _PARAM0_":"Establecer el ID del usuario actual a _PARAM0_","New Unique ID":"Nuevo ID \xDAnico","Set a user's property":"Establecer la propiedad de un usuario","Sets an user's properties.Can be used to classify user in Analytics.":"Establece las propiedades de un usuario. Se puede utilizar para clasificar al usuario en Analytics.","Set property _PARAM0_ of the current user to _PARAM1_":"Establecer la propiedad _PARAM0_ del usuario actual a _PARAM1_","Property Name":"Nombre de la propiedad","Property Data":"Datos de Propiedad","Get Remote setting as String":"Obtener configuraci\xF3n remota como cadena","Get a setting from Firebase Remote Config as a string.":"Obt\xE9n una configuraci\xF3n desde la configuraci\xF3n remota de Firebase como una cadena.","Remote Config":"Configuraci\xF3n remota","Setting Name":"Nombre de la configuraci\xF3n","Get Remote setting as Number":"Obtener configuraci\xF3n remota como n\xFAmero","Get a setting from Firebase Remote Config as Number.":"Obt\xE9n un ajuste desde la configuraci\xF3n remota de Firebase como n\xFAmero.","Set Remote Config Auto Update Inteval":"Ajustar el intervalo de actualizaci\xF3n remota autom\xE1tica","Sets Remote Config Auto Update Inteval.":"Ajustar el intervalo de actualizaci\xF3n remota autom\xE1tica.","Set Remote Config Auto Update Inteval to _PARAM0_":"Ajustar el intervalo de actualizaci\xF3n remota a _PARAM0_","Update Interval in ms":"Intervalo de actualizaci\xF3n en ms","Set the default configuration":"Cargar la configuraci\xF3n predeterminada","As the Remote Config is stored online, you need to set default values or the Remote Config expressions to return while there is no internet or the config is still loading.":"Como la configuraci\xF3n remota se almacena en l\xEDnea, necesita establecer valores por defecto o las expresiones de configuraci\xF3n remota a retornar mientras no hay internet o la configuraci\xF3n todav\xEDa se est\xE1 cargando.","Set default config to _PARAM0_":"Establecer configuraci\xF3n predeterminada a _PARAM0_","Structure with defaults":"Estructura con defectos","Force sync the configuration":"Forzar la sincronizaci\xF3n de la configuraci\xF3n","Use this to sync the Remote Config with the client at any time.":"Utilice esto para sincronizar la configuraci\xF3n remota con el cliente en cualquier momento.","Synchronize Remote Config":"Sincronizar configuraci\xF3n remota","Create account with email":"Crear cuenta con correo electr\xF3nico","Create an account with email and password as credentials.":"Crear una cuenta con correo electr\xF3nico y contrase\xF1a como credenciales.","Create account with email _PARAM0_ and password _PARAM1_":"Crear cuenta con el correo electr\xF3nico _PARAM0_ y la contrase\xF1a _PARAM1_","Authentication":"Autenticaci\xF3n","Callback variable with state (ok or error)":"Variable de devoluci\xF3n de llamada con estado (ok o error)","Sign into an account with email":"Inicia sesi\xF3n en una cuenta con correo electr\xF3nico","Sign into an account with email and password as credentials. ":"Crear una cuenta con correo electr\xF3nico y contrase\xF1a como credenciales.","Connect to account with email _PARAM0_ and password _PARAM1_":"Conectar a la cuenta con el correo electr\xF3nico _PARAM0_ y la contrase\xF1a _PARAM1_","Log out of the account":"Cerrar la sesi\xF3n de la cuenta","Logs out of the current account. ":"Cerrar sesi\xF3n de la cuenta actual. ","Log out from the account":"Cerrar la sesi\xF3n de la cuenta","Sign into an account with auth from provider":"Inicia sesi\xF3n en una cuenta con la autenticaci\xF3n del proveedor","Sign into an account via an external provider. The available providers are: \"google\", \"facebook\", \"github\" and \"twitter\".\nProvider authentication only works in the browser! Not on previews or pc/mobile exports.":"Inicia sesi\xF3n en una cuenta a trav\xE9s de un proveedor externo. Los proveedores disponibles son: \"google\", \"facebook\", \"github\" y \"twitter\".\nLa autenticaci\xF3n de proveedores solo funciona en el navegador. No en vistas previas o exportaciones de pc/m\xF3vil.","Connect to account with Provider _PARAM0_":"Conectar a la cuenta con Provider _PARAM0_","Provider":"Proveedor","Sign In as an anonymous guest":"Iniciar sesi\xF3n como invitado","Sign into a temporary anonymous account.":"Inicia sesi\xF3n con una cuenta an\xF3nima temporal.","Authenticate anonymously":"Autenticar an\xF3nimamente","Is the user signed in?":"\xBFTiene iniciada sesi\xF3n el usuario?","Checks if the user is signed in. \nYou should always use this before actions requiring authentications.":"Comprueba si el usuario tiene una sesi\xF3n iniciada. \nSiempre debes usar esto antes de acciones que requieran autenticaciones.","Check for authentication":"Comprobar autenticaci\xF3n","Get the user authentififcation token":"Obtener el token de identificaci\xF3n de usuario","Get the user authentififcation token. The token is the proof of authentication.":"Obtener el token de identificaci\xF3n de usuario. El token es la prueba de autenticaci\xF3n.","Is the user email address verified":"Se verifica la direcci\xF3n de correo electr\xF3nico del usuario","Checks if the email address of the user got verified.":"Comprueba si la direcci\xF3n de correo electr\xF3nico del usuario ha sido verificada.","The email of the user is verified":"El correo electr\xF3nico del usuario ha sido verificado","Authentication/User Management":"Gesti\xF3n de Autenticaci\xF3n/Usuario","Get the user email address":"Obtener la direcci\xF3n de correo electr\xF3nico del usuario","Gets the user email address.":"Obtiene la direcci\xF3n de correo electr\xF3nico del usuario.","Get the accounts creation time":"Obtener el tiempo de creaci\xF3n de cuentas","Gets the accounts creation time.":"Obtiene el tiempo de creaci\xF3n de cuentas.","Get the user last login time":"Obtener el usuario por \xFAltima vez","Gets the user last login time.":"Obtiene la \xFAltima vez que el usuario inici\xF3 sesi\xF3n.","Get the user display name":"Obtener el nombre de usuario","Gets the user display name.":"Obtiene el nombre de usuario.","Get the user phone number":"Obtener el n\xFAmero de tel\xE9fono del usuario","Gets the user phone number.":"Obtiene el n\xFAmero de tel\xE9fono del usuario.","Get the user UID":"Obtener el UID de usuario","Gets the user Unique IDentifier. Use that to link data to an user instead of the name or email.":"Obtiene el identificador \xFAnico de usuario. Utilice eso para vincular datos a un usuario en lugar del nombre o correo electr\xF3nico.","Get the user tenant ID":"Obtener el ID del usuario","Gets the user tenant ID. For advanced usage only.":"Obtiene el ID de inquilino del usuario. Solo para uso avanzado.","Get the user refresh token":"Obtener el token de actualizaci\xF3n de usuario","Gets the user refresh token. For advanced usage only.":"Obtiene el token de actualizaci\xF3n del usuario. S\xF3lo para uso avanzado.","Get the user profile picture URL":"Obtener la URL de la foto de perfil del usuario","Gets an URL to the user profile picture.":"Obtiene una URL a la imagen de perfil del usuario.","Send a verification email":"Enviar correo de verificaci\xF3n","Send a link per email to verify the user email.":"Enviar un enlace por email para verificar la direcci\xF3n del usuario.","Send verification email":"Enviar email de verificaci\xF3n","Set display name":"Establecer nombre para mostrar","Sets the user display name.":"Establece el nombre de usuario.","Set the user's display name to _PARAM0_":"Establecer el nombre de usuario a _PARAM0_","New display name":"Nuevo nombre de pantalla","Set the user profile picture":"Establecer la foto de perfil de usuario","Sets the user profile picture URL to a new one.":"Establece la URL de la imagen de perfil de usuario a una nueva.","Set the user's profile picture URL to _PARAM0_":"Establecer la URL de la imagen de perfil del usuario a _PARAM0_","New profile picture URL":"Nueva URL de imagen de perfil","Change the user email":"Cambiar el email del usuario","This action is dangerous so it requires reauthentication.\nChanges the user's email address.":"Esta acci\xF3n es peligrosa por lo que requiere reautenticaci\xF3n.\nCambia la direcci\xF3n de correo electr\xF3nico del usuario.","Change the user's email to _PARAM0_ and store result in _PARAM4_ (send verification email: _PARAM3_)":"Cambiar el correo electr\xF3nico del usuario a _PARAM0_ y almacenar el resultado en _PARAM4_ (enviar correo de verificaci\xF3n: _PARAM3_)","Authentication/User Management/Advanced":"Autenticaci\xF3n/Gesti\xF3n de usuarios/Avanzado","Old email":"Email antiguo","New email":"Nuevo email","Send a verification email before doing the change?":"\xBFEnviar un correo de verificaci\xF3n antes de hacer el cambio?","Change the user email (Provider)":"Cambiar el correo del usuario (proveedor)","This action is dangerous so it requires reauthentication.\nChanges the user's email address.\nThis is the same as Change the user email but reauthenticates via an external provider.":"Esta acci\xF3n es peligrosa por lo que requiere reautenticaci\xF3n.\nCambia la direcci\xF3n de correo electr\xF3nico del usuario.\nEsto es lo mismo que Cambiar el correo electr\xF3nico del usuario pero se vuelve a autenticar a trav\xE9s de un proveedor externo.","Change the user's email to _PARAM0_ and store result in _PARAM2_ (send verification email: _PARAM1_)":"Cambiar el correo electr\xF3nico del usuario a _PARAM0_ y almacenar el resultado en _PARAM4_ (enviar correo de verificaci\xF3n: _PARAM3_)","Change the user password":"Cambiar la contrase\xF1a de usuario","This action is dangerous so it requires reauthentication.\nChanges the user password.":"Esta acci\xF3n es peligrosa por lo que requiere reautenticaci\xF3n.\nCambia la contrase\xF1a de usuario.","Change the user password to _PARAM2_ and store result in _PARAM4_ (send verification email: _PARAM3_)":"Cambiar la contrase\xF1a de usuario a _PARAM2_ y almacenar el resultado en _PARAM4_ (enviar email de verificaci\xF3n: _PARAM3_)","Old password":"Contrase\xF1a antigua","New password":"Nueva contrase\xF1a","Change the user password (Provider)":"Cambiar la contrase\xF1a de usuario (Proveedor)","This action is dangerous so it requires reauthentication.\nChanges the user password.\nThis is the same as \"Change the user password\" but reauthenticates via an external provider.":"Esta acci\xF3n es peligrosa por lo que requiere reautenticaci\xF3n.\nCambia la direcci\xF3n de correo electr\xF3nico del usuario.\nEsto es lo mismo que Cambiar el correo electr\xF3nico del usuario pero se vuelve a autenticar a trav\xE9s de un proveedor externo.","Change the user password to _PARAM0_ and store result in _PARAM2_ (send verification email: _PARAM1_)":"Cambiar la contrase\xF1a de usuario a _PARAM0_ y almacenar el resultado en _PARAM2_ (enviar email de verificaci\xF3n: _PARAM1_)","New Password":"Nueva contrase\xF1a","Delete the user account":"Eliminar la cuenta de usuario","This action is dangerous so it requires reauthentication.\nDeletes the user account.":"Esta acci\xF3n es peligrosa por lo que requiere la reautenticaci\xF3n.\nElimina la cuenta de usuario.","Delete the user account and store result in _PARAM2_":"Eliminar la cuenta de usuario y almacenar el resultado en _PARAM2_","Delete the user account (Provider)":"Eliminar la cuenta de usuario (proveedor)","This action is dangerous so it requires reauthentication.\nDeletes the user account.\nThis is the same as \"Delete the user account\" but reauthenticates via an external provider.":"Esta acci\xF3n es peligrosa por lo que requiere la reautenticaci\xF3n.\nElimina la cuenta de usuario.\nEsto es lo mismo que \"Eliminar la cuenta de usuario\" pero se vuelve a autenticar a trav\xE9s de un proveedor externo.","Delete the user account and store result in _PARAM0_":"Eliminar la cuenta de usuario y almacenar el resultado en _PARAM0_","Enable performance measuring":"Activar medici\xF3n de rendimiento","Enables performance measuring.":"Permite la medici\xF3n del rendimiento.","Performance Measuring":"Medici\xF3n del rendimiento","Create a custom performance tracker":"Crear un rastreador de rendimiento personalizado","Creates a new custom performance tracker (If it doesn't already exists). They are used to measure performance of custom events.":"Crea un nuevo rastreador de rendimiento personalizado (si no existe). Se utilizan para medir el rendimiento de eventos personalizados.","Create performance tracker: _PARAM0_":"Crear rastreador de rendimiento: _PARAM0_","Tracker Name":"Nombre del rastreador","Start a tracer":"Iniciar un rastreador","Start measuring performance for that tracer":"Comenzar a medir el rendimiento de ese rastreador","Start performance measuring on tracer _PARAM0_":"Comenzar la medici\xF3n de rendimiento del rastreador _PARAM0_","Stop a tracer":"Detener un rastreador","Stop measuring performance for that tracer":"Dejar de medir el rendimiento de ese rastreador","Stop performance measuring on tracer _PARAM0_":"Detener la medici\xF3n de rendimiento en el rastreador _PARAM0_","Record performance":"Grabar rendimiento","Record performance for a delimited period of time. Use this if you want to measure the performance for a specified duration.":"Grabar rendimiento para un per\xEDodo de tiempo delimitado. Utilice esto si desea medir el rendimiento para una duraci\xF3n especificada.","Record performance for _PARAM1_ms with a delay of _PARAM2_ms (store in tracker _PARAM0_)":"Grabar rendimiento para _PARAM1_ms con un retraso de _PARAM2_ms (almacenar en el rastreador _PARAM0_)","Delay before measuring start (in ms)":"Retraso antes de comenzar la medici\xF3n (en ms)","Measuring duration (in ms)":"Duraci\xF3n de medici\xF3n (en ms)","Call a HTTP function":"Llamar a una funci\xF3n HTTP","Calls a HTTP function by name, and store the result in a variable.":"Llama a una funci\xF3n HTTP por nombre y almacenar el resultado en una variable.","Call HTTP Function _PARAM0_ with parameter(s) _PARAM1_ (Callback variables: Value: _PARAM2_ State: _PARAM3_)":"Llamar a la funci\xF3n HTTP _PARAM0_ con par\xE1metro(s) _PARAM1_ (Variables de devoluci\xF3n: Valor: _PARAM2_ Estado: _PARAM3_)","HTTP Function Name":"Nombre de la Funci\xF3n HTTP","Parameter(s) as JSON or string.":"Par\xE1metro(s) como JSON o cadena.","Callback variable with returned value":"Variable de devoluci\xF3n de llamada con valor de retorno","Get server timestamp":"Obtener fecha y hora del servidor","Set a field to the timstamp on the server when the request arrives there":"Establecer una entrada para marcar el tiempo del servidor cuando la solicitud llegue all\xED","Cloud Firestore":"Nube Firestore","Start a query":"Iniciar una consulta","Start a query on a collection. A query allows to get a filtered and ordered list of documents in a collection.":"Iniciar una consulta en una colecci\xF3n. Una consulta permite obtener una lista de documentos filtrados y ordenados en una colecci\xF3n.","Create a query named _PARAM0_ for collection _PARAM1_":"Crear una consulta llamada _PARAM0_ para la colecci\xF3n _PARAM1_","Cloud Firestore/Queries/Initialize":"Nube Firstore/Consultas/Inicializar","Query name":"Nombre de la Consulta","Collection":"Colecci\xF3n","Start a query from another query":"Iniciar una consulta desde otra consulta","Start a query with the same collection and filters as another one.":"Iniciar una consulta con la misma colecci\xF3n y filtros que otra.","Create a query named _PARAM0_ from query _PARAM1_":"Crear una consulta llamada _PARAM0_ desde la consulta _PARAM1_","Source query name":"Nombre de la consulta origen","Filter by field value":"Filtrar por el valor de la entrada","Only match the documents that have a field passing a check.":"S\xF3lo relacionar los documentos que tienen una entrada tras pasar por una verificaci\xF3n.","Filter query _PARAM0_ to remove documents whose field _PARAM1_ is not _PARAM2__PARAM3_":"Filtrar consulta _PARAM0_ para eliminar documentos cuyo campo _PARAM1_ no es _PARAM2__PARAM3_","Cloud Firestore/Queries/Filters":"Nube Firestore/Consultas/Filtros","Field to check":"Campo a Comprobar","Check type":"Tipo de verificaciones","Value to check":"Valor a verificar","Filter by field text":"Filtrar por campo","Text to check":"Texto a verificar","Order by field value":"Filtrar por el valor de la entrada","Orders all documents in the query by a the value of a field.":"Ordena todos los documentos en la consulta por un valor de una entrada.","Order query _PARAM0_ by field _PARAM1_ (direction: _PARAM2_)":"Orden de consulta _PARAM0_ por entrada _PARAM1_ (direcci\xF3n: _PARAM2_)","Field to order by":"Campo para ordenar por","Direction (ascending or descending)":"Direcci\xF3n (ascendente o descendente)","Limit amount of documents":"Limitar la cantidad de documentos","Limits the amount of documents returned by the query. Can only be used after an order filter.":"Limita la cantidad de documentos devueltos por la consulta. S\xF3lo se puede utilizar despu\xE9s de un filtro.","Limit query _PARAM0_ to _PARAM1_ documents (begin from the end: _PARAM2_)":"Limitar la consulta _PARAM0_ a _PARAM1_ documentos (comenzando desde el final: _PARAM2_)","Amount to limit by":"Cantidad a limitar por","Begin from the end":"Comenzar desde el final","Skip some documents":"Omitir algunos documentos","Removes documents before or after a certain value on the field ordered by in a query. Can only be used after an order filter.":"Elimina documentos antes o despu\xE9s de un determinado valor en el campo ordenado por una consulta. S\xF3lo se puede utilizar despu\xE9s de un filtro de pedido.","Skip documents with fields (before: _PARAM2_) value _PARAM1_ in query _PARAM0_ (include documents at that value: _PARAM3_)":"Omitir documentos con campos (antes: _PARAM2_) valor _PARAM1_ en la consulta _PARAM0_ (incluir documentos a ese valor: _PARAM3_)","The value of the field ordered by to skip after":"El valor del campo ordenado para omitir despu\xE9s","Skip documents before?":"\xBFSaltar documentos antes?","Include documents which field value equals the value to skip after?":"\xBFIncluir documentos cuyo valor de campo es igual al valor a omitir?","Execute a query":"Ejecutar una consulta","Execute the query and store results in a scene variable.":"Ejecutar la consulta y almacenar los resultados en una variable de escena.","Execute query _PARAM0_ and store results into _PARAM1_ (store result state in _PARAM2_)":"Ejecutar consulta _PARAM0_ y almacenar los resultados en _PARAM1_ (estado de resultado de la tienda en _PARAM2_)","Cloud Firestore/Queries/Execute":"Nube Firestore/Consultas/Ejecutar","Callback variable where to load the results":"Variable de devoluci\xF3n de llamada donde cargar los resultados","Callback variable with state (ok or error message)":"Variable de devoluci\xF3n de llamada con estado (ok o mensaje de error)","Watch a query":"Ver una consulta","Executes the query every time a new documents starts or stops matching the query, or a document that matches the query has been changed.":"Ejecuta la consulta cada vez que un nuevo documento comienza o deja de coincidir con la consulta, o un documento que coincide con la consulta ha sido cambiado.","Watch and automatically execute query _PARAM0_ and store results into _PARAM1_ (store result state in _PARAM2_)":"Ver y ejecutar autom\xE1ticamente la consulta _PARAM0_ y almacenar los resultados en _PARAM1_ (estado de resultado de la tienda en _PARAM2_)","Enable persistence":"Habilitar persistencia","When persistence is enabled, all data that is fetched from the database is being automatically stored to allow to continue accessing the data if cut off from the network, instead of waiting for reconnection.\nThis needs to be called before any other firestore operation, otherwise it will fail.":"Cuando la persistencia est\xE1 activada, todos los datos que se obtienen de la base de datos se almacenan autom\xE1ticamente para permitir el acceso a los datos si se desconecta de la red, en lugar de esperar a la reconexi\xF3n.\nEsto necesita ser llamado antes de cualquier otra operaci\xF3n de firestore, de lo contrario fallar\xE1.","Disable persistence":"Deshabilitar la persistencia","Disables the storing of fetched data and clear all the data that has been stored.\nThis needs to be called before any other firestore operation, otherwise it will fail.":"Deshabilita el almacenamiento de datos obtenidos y borra todos los datos almacenados.\nEsto necesita ser llamado antes de cualquier otra operaci\xF3n de firestore, de lo contrario fallar\xE1.","Re-enable network":"Vuelva a habilitar la red","Re-enables the connection to the database after disabling it.":"Vuelve a habilitar la conexi\xF3n a la base de datos despu\xE9s de deshabilitarla.","Disable network":"Desactivar la red","Disables the connection to the database.\nWhile the network is disabled, any read operations will return results from cache, and any write operations will be queued until the network is restored.":"Deshabilita la conexi\xF3n a la base de datos.\nMientras la red est\xE1 desactivada, cualquier operaci\xF3n de lectura devolver\xE1 resultados de la cach\xE9, y cualquier operaci\xF3n de escritura se pondr\xE1 en cola hasta que la red sea restaurada.","Write a document to firestore":"Escribe un documento a firestore","Writes a document (variable) to cloud firestore.":"Escribe un documento (variable) en la nube de firestore.","Write _PARAM2_ to firestore in document _PARAM1_ of collection _PARAM0_ (store result state in _PARAM3_)":"Escribe _PARAM2_ a firestore en el documento _PARAM1_ de la colecci\xF3n _PARAM0_ (estado de resultado de la tienda en _PARAM3_)","Cloud Firestore/Documents":"Nube Firestore/Documentos","Document":"Documento","Variable to write":"Variable para escribir","Add a document to firestore":"A\xF1adir un documento a firestore","Adds a document (variable) to cloud firestore with a unique name.":"A\xF1ade un documento (variable) a la nube de firestore con un nombre \xFAnico.","Add _PARAM1_ to firestore collection _PARAM0_ (store result state in _PARAM2_)":"A\xF1adir _PARAM1_ a la colecci\xF3n de firestore _PARAM0_ (estado de resultado de la tienda en _PARAM2_)","Write a field in firestore":"Escribe un campo en firestore","Writes a field of a firestore document.":"Escribe un campo de un documento firestore.","Write _PARAM3_ to firestore in field _PARAM2_ of document _PARAM1_ in collection _PARAM0_ (store result state in _PARAM4_, Merge: _PARAM5_)":"Escribe _PARAM3_ a firestore en el campo _PARAM2_ del documento _PARAM1_ en la colecci\xF3n _PARAM0_ (estado de resultado de la tienda en _PARAM4_, Combinar: _PARAM5_)","Cloud Firestore/Fields":"Nube Firestore/Campos","Field to write":"Campo a escribir","Value to write":"Valor a escribir","Merge Document?":"\xBFCombinar documento?","Update a document in firestore":"Actualizar un documento en firestore","Updates a firestore document (variable).":"Actualiza un documento de firestore (variable).","Update firestore document _PARAM1_ in collection _PARAM0_ with _PARAM2_ (store result state in _PARAM3_)":"Actualizar documento de firestore _PARAM1_ en la colecci\xF3n _PARAM0_ con _PARAM2_ (estado de resultado de la tienda en _PARAM3_)","Variable to update with":"Variable para actualizar con","Update a field of a document":"Actualizar un campo de un documento","Updates a field of a firestore document.":"Actualiza un campo de un documento de firestore.","Update field _PARAM2_ of firestore document _PARAM1_ in collection _PARAM0_ with _PARAM3_ (store result state in _PARAM4_)":"Actualizar el campo _PARAM2_ del documento firestore _PARAM1_ en la colecci\xF3n _PARAM0_ con _PARAM3_ (estado del resultado de la tienda en _PARAM4_)","Field to update":"Campo a actualizar","Delete a document in firestore":"Eliminar un documento en firestore","Deletes a firestore document (variable).":"Elimina un documento de firestore (variable).","Delete firestore document _PARAM1_ in collection _PARAM0_ (store result state in _PARAM2_)":"Eliminar documento de firestore _PARAM1_ de la colecci\xF3n _PARAM0_ (resultado de la tienda en _PARAM2_)","Delete a field of a document":"Eliminar un campo de un documento","Deletes a field of a firestore document.":"Elimina un campo de un documento de firestore.","Delete field _PARAM2_ of firestore document _PARAM1_ in collection _PARAM0_ with (store result state in _PARAM3_)":"Eliminar campo _PARAM2_ del documento firestore _PARAM1_ en la colecci\xF3n _PARAM0_ con (estado de resultado de la tienda en _PARAM3_)","Field to delete":"Campo a borrar","Get a document from firestore":"Obtener un documento de firestore","Gets a firestore document and store it in a variable.":"Obtiene un documento de firestore y almacena este en una variable.","Load firestore document _PARAM1_ from collection _PARAM0_ into _PARAM2_ (store result state in _PARAM3_)":"Cargar documento firestore _PARAM1_ de la colecci\xF3n _PARAM0_ a _PARAM2_ (estado de resultado de la tienda en _PARAM3_)","Callback variable where to load the document":"Variable de devoluci\xF3n de llamada donde cargar el documento","Get a field of a document":"Obtener un campo de un documento","Gets the value of a field in a firestore document.":"Obtiene el valor de un campo en un documento de firestore.","Load field _PARAM2_ of firestore document _PARAM1_ in collection _PARAM0_ into _PARAM3_ (store result state in _PARAM4_)":"Cargar el campo _PARAM2_ del documento firestore _PARAM1_ en la colecci\xF3n _PARAM0_ en _PARAM3_ (almacenar el estado de resultado en _PARAM4_)","Field to get":"Campo a obtener","Callback variable where to store the field's value":"Variable de devoluci\xF3n de llamada donde almacenar el valor del campo","Check for a document's existence":"Buscar la existencia de un documento","Checks for the existence of a document. Sets the result variable to 1 if it exists else to 2.":"Comprueba la existencia de un documento. Establece la variable de resultado a 1. Si existiese, a 2.","Check for existence of _PARAM1_ in collection _PARAM0_ and store result in _PARAM2_ (store result state in _PARAM3_)":"Comprobar la existencia de _PARAM1_ en la colecci\xF3n _PARAM0_ y almacenar el resultado en _PARAM2_ (estado del resultado de la tienda en _PARAM3_)","Callback variable where to store the result":"Variable de devoluci\xF3n de llamada donde almacenar el resultado","Check for existence of a document's field":"Comprobar la existencia de un campo en un documento","Checks for the existence of a field in a document. Sets the result variable to 1 if it exists else to 2.":"Comprueba la existencia de un campo en un documento. Establece la variable de resultado a 1. Si existiese, a 2.","Check for existence of _PARAM2_ in document _PARAM1_ of collection _PARAM0_ and store result in _PARAM3_ (store result state in _PARAM4_)":"Compruebe la existencia de _PARAM2_ en el documento _PARAM1_ de la colecci\xF3n _PARAM0_ y almacene el resultado en _PARAM3_ (almacenar el estado del resultado en _PARAMA4_)","Callback Variable where to store the result":"Variable de devoluci\xF3n de llamada donde almacenar el resultado","List all documents of a collection":"Listar todos los documentos de una colecci\xF3n","Generates a list of all document names in a collection, and stores it as a structure.":"Genera una lista de todos los nombres de documentos en una colecci\xF3n, y lo almacena como una estructura.","List all documents in _PARAM0_ and store result in _PARAM1_ (store result state in _PARAM2_)":"Listar todos los documentos en _PARAM0_ y almacenar el resultado en _PARAM1_ (estado de resultado de la tienda en _PARAM2_)","Upload a file":"Subir un archivo","Upload a file to firebase Storage.":"Subir un archivo al almacenamiento de firebase.","Save _PARAM0_ in location _PARAM1_ to Firebase storage and store access URL in _PARAM3_ (Format: _PARAM2_, Store result state in _PARAM4_)":"Guardar _PARAM0_ en la ubicaci\xF3n _PARAM1_ en almacenamiento Firebase y almacenar la URL de acceso en _PARAM3_ (Formato: _PARAM2_, Estado de resultado de la tienda en _PARAM4_)","Upload ID":"Subir ID","File content":"Contenido del archivo","Storage path":"Nombre de almacenamiento","File content format":"Formato del contenido del tema","Callback variable with the url to the uploaded file":"Variable de devoluci\xF3n de llamada con la url al archivo subido","Get Download URL":"Obtener URL de descarga","Get a unique download URL for a file.":"Obtener una URL de descarga \xFAnica para un archivo.","Get a download url for _PARAM0_ and store it in _PARAM1_ (store result state in _PARAM2_)":"Obtener una url de descarga para _PARAM0_ y guardarla en _PARAM1_ (almacenar el estado de resultado en _PARAM2_)","Storage path to the file":"Ruta de almacenamiento al archivo","Write a variable to Database":"Escribir una variable a la Base de Datos","Writes a variable to Database.":"Escribir una variable a la Base de Datos.","Write _PARAM1_ to Database in _PARAM0_ (store result state in _PARAM2_)":"Escribe _PARAM1_ a la base de datos en _PARAM0_ (almacena el estado de resultado en _PARAM2_)","Realtime Database":"Base de datos en tiempo real","Write a field in Database":"Escribe un campo en la base de datos","Writes a field of a Database document.":"Escribe un campo de un documento de base de datos.","Write _PARAM2_ in field _PARAM1_ of _PARAM0_ (store result state in _PARAM3_)":"Escribe _PARAM2_ en el campo _PARAM1_ de _PARAM0_ (estado de resultado del almac\xE9n en _PARAM3_)","Update a document in Database":"Actualizar un documento en la base de datos","Updates a variable on the database.":"Actualiza una variable en la base de datos.","Update varable _PARAM0_ with _PARAM1_ (store result state in _PARAM2_)":"Actualizar _PARAM0_ varable con _PARAM1_ (estado de resultado de la tienda en _PARAM2_)","Updates a field of a Database document.":"Actualiza un campo de un documento de base de datos.","Update field _PARAM1_ of _PARAM0_ with _PARAM2_ (store result state in _PARAM3_)":"Actualizar el campo _PARAM1_ de _PARAM0_ con _PARAM2_ (estado de resultado de la tienda en _PARAM3_)","Delete a database variable":"Eliminar una variable de base de datos","Deletes a variable from the database.":"Elimina una variable de la base de datos.","Delete variable _PARAM0_ from database (store result state in _PARAM1_)":"Eliminar la variable _PARAM0_ de la base de datos (estado de resultado de la tienda en _PARAM1_)","Delete a field of a variable":"Eliminar un campo de una variable","Deletes a field of a variable on the database.":"Elimina un campo de una variable en la base de datos.","Delete field _PARAM1_ of variable _PARAM0_ on the database (store result state in _PARAM2_)":"Eliminar campo _PARAM1_ de la variable _PARAM0_ en la base de datos (estado de resultado de la tienda en _PARAM2_)","Get a variable from the database":"Obtener una variable de la base de datos","Gets a variable from the database and store it in a Scene variable.":"Obtiene una variable de la base de datos y la almacena en una variable de escena.","Load database variable _PARAM0_ into _PARAM1_ (store result state in _PARAM2_)":"Cargar la variable de base de datos _PARAM0_ en _PARAM1_ (estado de resultado de la tienda en _PARAM2_)","Callback variable where to store the data":"Variable de llamada donde almacenar los datos","Get a field of a variable":"Obtener un campo de una variable","Gets the value of a field in a variable from the database and store it in a scene variable.":"Obtiene el valor de un campo en una variable de la base de datos y lo almacena en una variable de escena.","Load field _PARAM1_ of database variable _PARAM0_ into _PARAM2_ (store result state in _PARAM3_)":"Cargar campo _PARAM1_ de la variable de base de datos _PARAM0_ en _PARAM2_ (estado de resultado del almac\xE9n en _PARAM3_)","Check for a variable's existence":"Comprobar la existencia de una variable","Checks for the existence of a variable. Sets the result variable to 1 if it exists else to 2.":"Comprueba la existencia de una variable. Establece la variable resultante a 1 si existe a 2.","Check for existence of _PARAM0_ and store result in _PARAM1_ (store result state in _PARAM2_)":"Comprobar la existencia de _PARAM0_ y almacenar el resultado en _PARAM1_ (estado del resultado del almac\xE9n en _PARAM2_)","Check for existence of a variable's field":"Comprobar la existencia del campo de una variable","Checks for the existence of a field in a variable. Sets the result variable to 1 if it exists else to 2.":"Comprueba la existencia de un campo en una variable. Establece la variable resultante a 1 si existe a 2.","Check for existence of _PARAM1_ in database variable _PARAM0_ and store result in _PARAM2_ (store result state in _PARAM3_)":"Comprobar la existencia de _PARAM1_ en la variable de base de datos _PARAM0_ y almacenar el resultado en _PARAM2_ (estado del resultado del almac\xE9n en _PARAM3_)","storage":"almacenamiento","Screenshot":"Captura de Pantalla","Take screenshot":"Tomar captura de pantalla","Take a screenshot of the game, and save it to a png file (supported only when running on Windows/Linux/macOS).":"Tome una captura de pantalla del juego y guarde un archivo png (soportado s\xF3lo cuando se ejecute en Windows/Linux/macOS).","Take a screenshot and save at _PARAM1_":"Tomar una captura de pantalla y guardar en _PARAM1_","Allow your game to send scores and interact with the Facebook Instant Games platform.":"Permite que tu juego env\xEDe puntuaciones e interact\xFAe con la plataforma Instant Games de Facebook.","Save player data":"Guardar datos del jugador","Save the content of the given scene variable in the player data, stored on Facebook Instant Games servers":"Guardar el contenido de la variable de escena dada en los datos del jugador, almacenado en los servidores de Facebook Instant Games","Save the content of _PARAM1_ in key _PARAM0_ of player data (store success message in _PARAM2_ or error in _PARAM3_)":"Guardar el contenido de _PARAM1_ en la clave _PARAM0_ de los datos del jugador (almacenar el mensaje de \xE9xito en _PARAM2_ o error en _PARAM3_)","Player data":"Datos del jugador","Variable where to store the success message (optional)":"Variable donde guardar el mensaje exitoso (opcional)","Variable where to store the error message (optional, if an error occurs)":"Variable donde almacenar el mensaje de error (opcional, si ocurre un error)","Load player data":"Cargar datos del jugador","Load the player data with the given key in a variable":"Cargar los datos del jugador con la clave dada en una variable","Load player data with key _PARAM0_ in _PARAM1_ (or error in _PARAM2_)":"Cargar datos del jugador con clave _PARAM0_ en _PARAM1_ (o error en _PARAM2_)","Data key name (e.g: \"Lives\")":"Nombre de la clave de datos (por ejemplo: \"Vidas\")","Variable where to store loaded data":"Variable donde almacenar los datos cargados","Save player score":"Guardar puntuaci\xF3n del jugador","Save the score, and optionally the content of the given variable in the player score, for the given metadata.":"Guardar la puntuaci\xF3n, y opcionalmente el contenido de la variable dada en la puntuaci\xF3n del jugador, para los metadatos dados.","In leaderboard _PARAM0_, save score _PARAM1_ for the player and extra data from _PARAM2_ (store success message in _PARAM3_ or error in _PARAM4_)":"En el tablero _PARAM0_, guardar la puntuaci\xF3n _PARAM1_ para el jugador y datos adicionales de _PARAM2_ (almacenar el mensaje de \xE9xito en _PARAM3_ o error en _PARAM4_)","Optional variable with metadata to save":"Variable opcional con metadatos para guardar","Load player entry":"Cargar datos del jugador","Load the player entry in the given leaderboard":"Cargar la entrada del jugador en el tablero de puntuaci\xF3n dado","Load player entry from leaderboard _PARAM0_. Set rank in _PARAM1_, score in _PARAM2_ (extra data if any in _PARAM3_ and error in _PARAM4_)":"Cargar entrada del jugador desde el tablero _PARAM0_. Establecer rango en _PARAM1_, puntuar en _PARAM2_ (datos adicionales si hay en _PARAM3_ y error en _PARAM4_)","Leaderboard name (e.g: \"PlayersBestTimes\")":"Nombre de la tabla de clasificaci\xF3n (por ejemplo: \"PlayersBestTimes\")","Variable where to store the player rank (of -1 if not ranked)":"Variable donde guardar el rango del jugador (-1 si no est\xE1 clasificado)","Variable where to store the player score (of -1 if no score)":"Variable donde guardar la puntuaci\xF3n del jugador (-1 si no tiene puntuaci\xF3n)","Variable where to store extra data (if any)":"Variable donde almacenar datos adicionales (si existen)","Check if ads are supported":"Compruebe si se admiten anuncios","Check if showing ads is supported on this device (only mobile phones can show ads)":"Comprobar si mostrar anuncios es compatible con este dispositivo (s\xF3lo los tel\xE9fonos m\xF3viles pueden mostrar anuncios)","Ads can be shown on this device":"Este dispositivo pueden visualizar anuncios","Ads":"Anuncios","Is the interstitial ad ready":"Est\xE1 listo el anuncio intersticial","Check if the interstitial ad requested from Facebook is loaded and ready to be shown.":"Comprobar si el anuncio intersticial de Facebook est\xE1 cargado y listo para ser mostrado.","The interstitial ad is loaded and ready to be shown":"El anuncio intersticial est\xE1 cargado y listo para ser mostrado","Load and prepare an interstitial ad":"Cargar y preparar un anuncio intersticial","Request and load an interstitial ad from Facebook, so that it is ready to be shown.":"Solicitar y cargar un anuncio intersticial de Facebook, para que est\xE9 listo para ser mostrado.","Request and load an interstitial ad from Facebook (ad placement id: _PARAM0_, error in _PARAM1_)":"Solicitar y cargar un anuncio intersticial de Facebook (id de colocaci\xF3n de anuncios: _PARAM0_, error en _PARAM1_)","The Ad Placement id (can be found while setting up the ad on Facebook)":"El id de la colocaci\xF3n de anuncios (se puede encontrar al configurar los anuncios en Facebook)","Show the loaded interstitial ad":"Mostrar el anuncio intersticial cargado","Show the interstitial ad previously loaded in memory. This won't work if you did not load the interstitial before.":"Mostrar el anuncio intersticial previamente cargado en memoria. Esto no funcionar\xE1 si no cargaste el intersticial antes.","Show the interstitial ad previously loaded in memory (if any error, store it in _PARAM0_)":"Mostrar el anuncio intersticial previamente cargado en memoria (si existe alg\xFAn error, almacenarlo en _PARAM0_)","Is the rewarded video ready":"Est\xE1 listo el video premiado","Check if the rewarded video requested from Facebook is loaded and ready to be shown.":"Compruebe si el v\xEDdeo recompensado solicitado de Facebook est\xE1 cargado y listo para ser mostrado.","The rewarded video is loaded and ready to be shown":"El v\xEDdeo recompensado est\xE1 cargado y listo para ser mostrado","Load and prepare a rewarded video":"Cargar y preparar un v\xEDdeo recompensado","Request and load a rewarded video from Facebook, so that it is ready to be shown.":"Solicitar y cargar un video recompensado de Facebook, para que est\xE9 listo para ser mostrado.","Request and load a rewarded video from Facebook (ad placement id: _PARAM0_, error in _PARAM1_)":"Solicitar y cargar un v\xEDdeo recompensado de Facebook (id de colocaci\xF3n de anuncios: _PARAM0_, error en _PARAM1_)","Show the loaded rewarded video":"Mostrar el v\xEDdeo recompensado cargado","Show the rewarded video previously loaded in memory. This won't work if you did not load the video before.":"Mostrar el v\xEDdeo recompensado previamente cargado en memoria. Esto no funcionar\xE1 si no cargaste el v\xEDdeo antes.","Show the rewarded video previously loaded in memory (if any error, store it in _PARAM0_)":"Mostrar el v\xEDdeo recompensado previamente cargado en memoria (si existe alg\xFAn error, almacenarlo en _PARAM0_)","Player identifier":"Identificador de jugador","Get the player unique identifier":"Obtener el identificador \xFAnico del jugador","Player name":"Nombre del jugador","Get the player name":"Obtener el nombre del jugador","Advanced window management":"Administraci\xF3n avanzada de la ventana","Provides advanced features related to the game window positioning and interaction with the operating system.":"Provee caracter\xEDsticas avanzadas con la ventana de juego posicionando e interactuando con el sistema operativo.","Change focus of the window":"Cambia el foco de la ventana","Make the window gain or lose focus.":"Hace que la ventana gane o pierda foco.","Focus the window: _PARAM0_":"Enfoca la ventana: _PARAMETRO0_","Windows, Linux, macOS":"Windows, Linux, MacOS","Focus the window?":"Enfocar ventana?","Window focused":"Ventana enfocada","Checks if the window is focused.":"Verifica el foco de la ventana.","The window is focused":"La ventana tiene foco","Change visibility of the window":"Cambiar visibilidad de la ventana","Make the window visible or invisible.":"Hacer ventana visible o invisible.","Window visible: _PARAM0_":"Ventana visible: _PARAMETRO0_","Show window?":"Mostrar ventana?","Window visible":"Ventana visible","Checks if the window is visible.":"Verificar la visibilidad de la ventana.","The window is visible":"La ventana es visible","Maximize the window":"Maximizar ventana","Maximize or unmaximize the window.":"Maximixar o desmaximizar la ventana.","Maximize window: _PARAM0_":"Maximizar ventana: _PARAMETRO0_","Maximize window?":"Maximizar ventana?","Window maximized":"Ventana maximizada","Checks if the window is maximized.":"Comprueba si la ventana est\xE1 maximizada.","The window is maximized":"La ventana est\xE1 maximizada","Minimize the window":"Miminizar la ventana","Minimize or unminimize the window.":"Minimice o desminimice la ventana.","Minimize window: _PARAM0_":"Minimizar ventana: _PARAMETRO0_","Minimize window?":"Minimizar ventana?","Window minimized":"Ventana minimizada","Checks if the window is minimized.":"Verificar si la ventana est\xE1 miminizada.","The window is minimized":"La ventana esta miminizada","Enable the window":"Activar la ventana","Enables or disables the window.":"Habilita o deshabilita la ventana.","Enable window: _PARAM0_":"Habilitar ventana: _PARAMETRO0_","Enable window?":"Habilitar ventana?","Window enabled":"Ventana habilitada","Checks if the window is enabled.":"Verifica si la ventana est\xE1 habilitada.","The window is enabled":"La ventana est\xE1 habilitada","Allow resizing":"Permitir el redimensionamiento","Enables or disables resizing of the window by the user.":"Habilita o deshabilita el cambio de tama\xF1o de la ventana por el usuario.","Enable window resizing: _PARAM0_":"Habilitar redimensionamiento de ventanas: _PARAMETRO0_","Allow resizing?":"Permitir redimensionamiento?","Window resizable":"Ventana redimensionable","Checks if the window can be resized.":"Comprueba si la ventana puede ser redimensionada.","The window can be resized":"La ventana puede ser redimensionada","Allow moving":"Permitir mover","Enables or disables moving of the window by the user.":"Habilita o deshabilita el movimiento de la ventana por el usuario.","Enable window moving: _PARAM0_":"Habilitar el movimiento de ventana: _PARAMETRO0_","Allow moving?":"Permitir mover?","Window movable":"Ventana movible","Checks if the window can be moved.":"Comprueba si la ventana se puede mover.","The window can be moved":"La ventana se puede mover","Allow maximizing":"Permitir maximizaci\xF3n","Enables or disables maximizing of the window by the user.":"Habilita o deshabilita la maximizaci\xF3n de la ventana por el usuario.","Enable window maximizing: _PARAM0_":"Habilitar maximizaci\xF3n de ventanas: _PARAMETRO0_","Allow maximizing?":"Permitir maximizaci\xF3n?","Window maximizable":"Ventana maximizable","Checks if the window can be maximized.":"Comprueba si la ventana puede ser maximizada.","The window can be maximized":"La ventana puede ser maximizada","Allow minimizing":"Permitir minimizar","Enables or disables minimizing of the window by the user.":"Habilita o deshabilita la minimizaci\xF3n de la ventana por el usuario.","Enable window minimizing: _PARAM0_":"Activar minimizaci\xF3n de ventanas: _PARAMETRO0_","Allow minimizing?":"Permitir minimizar?","Window minimizable":"Ventana minimizable","Checks if the window can be minimized.":"Comprueba si la ventana puede minimizarse.","The window can be minimized":"La ventana puede minimizarse","Allow full-screening":"Permitir pantalla completa","Enables or disables full-screening of the window by the user.":"Habilita o deshabilita la pantalla completa de la ventana por el usuario.","Enable window full-screening: _PARAM0_":"Activar pantalla completa de la ventana: _PARAMETRO0_","Allow full-screening?":"\xBFPermitir pantalla completa?","Window full-screenable":"Ventana puede estar en pantalla completa","Checks if the window can be full-screened.":"Comprueba si la ventana puede ser de pantalla completa.","The window can be set in fullscreen":"La ventana puede establecerse en pantalla completa","Allow closing":"Permitir cerrar","Enables or disables closing of the window by the user.":"Habilita o deshabilita el cierre de la ventana por el usuario.","Enable window closing: _PARAM0_":"Habilitar el cierre de ventanas: _PARAMETRO0_","Allow closing?":"\xBFPermitir cerrar?","Window closable":"Ventana cerrable","Checks if the window can be closed.":"Comprueba si la ventana puede ser cerrada.","The window can be closed":"La ventana puede cerrarse","Make the windows always on top":"Hacer las ventanas siempre encima","Puts the window constantly above all other windows.":"Coloca la ventana constantemente sobre todas las dem\xE1s ventanas.","Make window always on top: _PARAM0_, level: _PARAM1_":"Hacer ventana siempre arriba: _PARAMETRO0_, nivel: _PARAMETRO1_","Enable always on top?":"\xBFHabilitar siempre arriba?","Level":"Nivel","Window always on top":"Ventana siempre encima","Checks if the window is always on top.":"Comprueba si la ventana est\xE1 siempre arriba.","The window is always on top":"La ventana est\xE1 siempre encima","Enable kiosk mode":"Activar modo kiosco","Puts the window in kiosk mode. This prevents the user from exiting fullscreen.":"Coloca la ventana en modo kiosco. Esto evita que el usuario salga de pantalla completa.","Enable kiosk mode: _PARAM0_":"Activar modo kiosco: _PARAMETRO0_","Enable kiosk mode?":"\xBFHabilitar modo de kiosco?","Kiosk mode":"Modo de Kiosco","Checks if the window is currently in kiosk mode.":"Comprueba si la ventana est\xE1 actualmente en modo kiosco.","The window is in kiosk mode":"La ventana est\xE1 en modo kiosco","Enable window shadow":"Activar sombra de ventana","Enables or disables the window shadow.":"Habilita o deshabilita la sombra de la ventana.","Enable window shadow: _PARAM0_":"Habilitar sombra de ventana: _PARAMETRO0_","Enable shadow?":"Habilitar sombra?","Shadow enabled":"Sombra activada","Checks if the window currently has it's shadow enabled.":"Comprueba si la ventana tiene la sombra activada.","The window has a shadow":"La ventana tiene una sombra","Enable content protection":"Activar protecci\xF3n de contenido","Enables or disables the content protection mode. This should prevent screenshots of the game from being taken.":"Habilita o deshabilita el modo de protecci\xF3n de contenido. Esto deber\xEDa evitar que se tomen capturas de pantalla del juego.","Enable content protection: _PARAM0_":"Habilitar protecci\xF3n de contenido: _PARAMETRO0_","Enable content protection?":"Habilitar protecci\xF3n de contenido?","Allow focusing":"Permitir enfocar","Allow or disallow the user to focus the window.":"Permitir o no permitir al usuario enfocar la ventana.","Allow to focus the window: _PARAM0_":"Permitir enfocar la ventana: _PARAMETRO0_","Allow focus?":"Permitir enfoque?","Flash the window":"Parpadear la ventana","Make the window flash or end flashing.":"Hace que la ventana parpadee o deje de parpadear.","Make the window flash: _PARAM0_":"Hacer que la ventana parpadee: _PARAMETRO0_","Flash the window?":"Parpadear la ventana?","Set window opacity":"Establecer opacidad de ventana","Changes the window opacity.":"Cambia la opacidad de la ventana.","Set the window opacity to _PARAM0_":"Establecer la opacidad de la ventana a _PARAMETRO0_","New opacity":"Nueva opacidad","Set window position":"Posici\xF3nar la ventana","Changes the window position.":"Cambiar la posici\xF3n de la ventana.","Set the window position to _PARAM0_;_PARAM1_":"Establecer la posici\xF3n de la ventana a _PARAMETRO0_;_PARAMETRO1_","Window X position":"Posici\xF3n X de la ventana","Returns the current window X position.":"Devuelve la posici\xF3n X de la ventana actual.","Window Y position":"Posici\xF3n Y de la ventana","Returns the current window Y position.":"Devuelve la posici\xF3n Y de la ventana actual.","Window opacity":"Opacidad de la ventana","Returns the current window opacity (a number from 0 to 1, 1 being fully opaque).":"Devuelve la opacidad de la ventana actual (un n\xFAmero de 0 a 1, 1 siendo totalmente opaco).","Leaderboards (experimental)":"Tablas de clasificaci\xF3n (experimental)","Allow your game to send scores to your leaderboards.":"Permite que tu juego env\xEDe las puntuaciones a tus tablas de clasificaci\xF3n.","Save the player's score to the given leaderboard.":"Guarda la puntuaci\xF3n del jugador en la tabla de clasificaci\xF3n dada.","Send to leaderboard _PARAM1_ the score _PARAM2_ with player name: _PARAM3_.":"Env\xEDa a la tabla de clasificaci\xF3n _PARAM1_ la puntuaci\xF3n _PARAM2_ con el nombre del jugador: _PARAM3_.","Save score":"Guardar puntuaci\xF3n","Score to register for the player":"Puntuaci\xF3n a registrar para el jugador","Name to register for the player":"Nombre a registrar para el jugador","Last score save has errored":"La \xFAltima puntuaci\xF3n guardada ha dado un error","Check if the last attempt to save a score has errored.":"Comprueba si el \xFAltimo intento de guardar una partitura ha dado error.","Last score save in leaderboard _PARAM0_ has errored":"La \xFAltima puntuaci\xF3n guardada en la tabla de clasificaci\xF3n _PARAM0_ ha dado un error","If no leaderboard is specified, will return the value related to the last leaderboard save action.":"Si no se especifica ninguna tabla de clasificaci\xF3n, devolver\xE1 el valor relacionado con la \xFAltima acci\xF3n de guardado de la tabla de clasificaci\xF3n.","Last score save has succeeded":"\xDAltima puntuaci\xF3n guardada con \xE9xito","Check if the last attempt to save a score has succeeded.":"Comprueba si el \xFAltimo intento de guardar una puntuaci\xF3n ha tenido \xE9xito.","Last score save in leaderboard _PARAM0_ has succeeded":"\xDAltima puntuaci\xF3n guardada en la tabla de clasificaci\xF3n _PARAM0_ ha sido exitosa","If no leaderboard is specified, will return the value related to the last leaderboard save action that successfully ended.":"Si no se especifica ninguna tabla de clasificaci\xF3n, devolver\xE1 el valor relacionado con la \xFAltima acci\xF3n de guardado de la tabla de clasificaci\xF3n que termin\xF3 con \xE9xito.","Score is saving":"La puntuaci\xF3n se est\xE1 guardando","Check if a score is currently being saved in leaderboard.":"Comprueba si una puntuaci\xF3n se est\xE1 guardando actualmente en la tabla de clasificaci\xF3n.","Score is saving in leaderboard _PARAM0_":"La puntuaci\xF3n se est\xE1 guardando en la clasificaci\xF3n _PARAM0_","Error of last save attempt":"Error del \xFAltimo intento de guardado","Get the error of the last save attempt.":"Obtener el error del \xFAltimo intento de guardado.","Error of last save attempt in leaderboard _PARAM0_":"Error del \xFAltimo intento de guardado en la tabla de clasificaci\xF3n _PARAM0_","Leaderboard display has errored":"La visualizaci\xF3n de la tabla de clasificaci\xF3n ha dado un error","Check if the display of the leaderboard errored.":"Comprueba si la visualizaci\xF3n de la tabla de clasificaci\xF3n ha sido err\xF3nea.","Display leaderboard":"Mostrar tabla de clasificaci\xF3n","Leaderboard display has loaded":"La pantalla de la tabla de clasificaci\xF3n se ha cargado","Check if the display of the leaderboard has finished loading and been displayed on screen.":"Comprueba si la visualizaci\xF3n de la tabla de clasificaci\xF3n ha terminado de cargarse y se ha mostrado en pantalla.","Leaderboard display has loaded and is displayed on screen":"La tabla de clasificaci\xF3n se ha cargado y aparece en la pantalla","Leaderboard display is loading":"La pantalla de la tabla de clasificaci\xF3n se est\xE1 cargando","Check if the display of the leaderboard is loading.":"Comprueba si la pantalla de la tabla de clasificaci\xF3n se est\xE1 cargando.","Format player name":"Formato del nombre del jugador","Formats a name so that it can be submitted to a leaderboard.":"Formatea un nombre para que pueda ser enviado a una tabla de clasificaci\xF3n.","Raw player name":"Nombre del jugador en bruto o sin procesar","Display the specified leaderboard on top of the game. If a leaderboard was already displayed on top of the game, the new leaderboard will replace it.":"Muestra la tabla de clasificaci\xF3n especificada en la parte superior del juego. Si ya se mostraba una tabla de clasificaci\xF3n en la parte superior del juego, la nueva tabla de clasificaci\xF3n la sustituir\xE1.","Display leaderboard _PARAM1_ (display a loader: _PARAM2_)":"Mostrar tabla de clasificaci\xF3n _PARAM1_ (mostrar un cargador: _PARAM2_)","Display loader while leaderboard is loading":"Mostrar cargador mientras la tabla de clasificaci\xF3n est\xE1 cargando","Close current leaderboard":"Cerrar la tabla de clasificaci\xF3n actual","Close the leaderboard currently displayed on top of the game.":"Cierra la tabla de clasificaci\xF3n que se muestra actualmente en la parte superior del juego.","Close current leaderboard displayed on top of the game":"Cerrar la tabla de clasificaci\xF3n actual que se muestra en la parte superior del juego","Lights":"Luces","Light Obstacle Behavior":"Comportamiento de la luz en obst\xE1culos","Flag objects as being obstacles to light. The light emitted by light objects will be stopped by the object.":"Marca los objetos como obst\xE1culos a la luz. La luz emitida por los objetos de luz ser\xE1 detenida por el objeto.","Debug mode":"Modo depuraci\xF3n","When activated, display the lines used to render the light - useful to understand how the light is rendered on screen.":"Cuando est\xE1 activado, muestra las l\xEDneas utilizadas para renderizar la luz - \xFAtil para entender c\xF3mo la luz serenderiza en la pantalla.","Light texture (optional)":"Textura de la luz (opcional)","A texture to be used to display the light. If you don't specify a texture, the light is rendered as fading from bright, in its center, to dark.":"Textura que se utilizar\xE1 para mostrar la luz. Si no especificas una textura, la luz se renderiza como desvanecimiento de brillo, en su centro, a oscuridad.","Light":"Luz","Displays a light on the scene, with a customizable radius and color. Add then the Light Obstacle behavior to the objects that must act as obstacle to the lights.":"Muestra una luz en la escena, con un radio y color personalizables. Agrega el comportamiento del Obst\xE1culo de Luz a los objetos que deben actuar como obst\xE1culo a las luces.","Set the radius of light object":"Define el radio del objeto de luz","Set the radius of _PARAM0_ to: _PARAM1_":"Establezca el radio de _PARAM0_ a: _PARAM1_","Set the color of light object":"Define el color del objeto de luz","Set the color of light object in format \"R;G;B\" string.":"Define el color del objeto de luz en el formato de cadena \"R;G;B\".","Set the color of _PARAM0_ to: _PARAM1_":"Establezca el color de _PARAM0_ a: _PARAM1_","AdMob":"AdMob","Allow to display AdMob banners, interstitials and reward video ads.":"Permitir mostrar banners de AdMob, intersticiales y anuncios de v\xEDdeos de recompensas.","AdMob Android App ID":"AdMob Android App ID","AdMob iOS App ID":"AdMob iOS App ID","Enable test mode":"Activar modo de prueba","Activate or deactivate the test mode (\"development\" mode).\nWhen activated, tests ads will be served instead of real ones.\n\nIt is important to enable test ads during development so that you can click on them without charging advertisers. If you click on too many ads without being in test mode, you risk your account being flagged for invalid activity.":"Activa o desactiva el modo de prueba (modo \"desarrollo\").\nCuando se activa, los anuncios de pruebas se mostrar\xE1n en lugar de los anuncios reales.\n\nEs importante habilitar los anuncios de prueba durante el desarrollo para que puedas hacer clic en ellos sin cobrar a los anunciantes. Si haces clic en demasiados anuncios sin estar en modo de prueba, corres el riesgo de que tu cuenta sea marcada por actividad inv\xE1lida.","Enable test mode (serving test ads, for development): _PARAM0_":"Activa modo de prueba (mostrando anuncios de pruebas, para desarrollo): _PARAM0_","Enable test mode?":"\xBFActivar modo de prueba?","Banner loading":"Cargando banner","Check if a banner is currently loading. It will be shown automatically when loaded.":"Compruebe si un banner se est\xE1 cargando actualmente. Se mostrar\xE1 autom\xE1ticamente cuando se cargue.","Banner is loading":"El banner est\xE1 cargando","Banner showing":"Mostrando Banner","Check if there is a banner being displayed.":"Compruebe si hay un banner que se muestra.","Banner is showing":"El banner se est\xE1 mostrando","Banner had an error":"El banner tuvo un error","Check if there was a error while displaying a banner.":"Compruebe si hubo un error mientras se mostraba un banner.","Banner ad had an error":"El anuncio tipo banner tuvo un error","Configure the banner":"Configurar el banner","Configure a banner, which can then be displayed.\nIf test mode is set, a test banner will be displayed.\n\nOnce a banner is positioned (at the top or bottom of the game), it can't be moved anymore.":"Configurar un banner, que se puede mostrar.\nSi el modo de prueba est\xE1 activado, se mostrar\xE1 un banner de prueba.\n\nUna vez que un banner est\xE1 posicionado (en la parte superior o inferior del juego), ya no se puede mover.","Configure the banner with Android ad unit ID: _PARAM0_, iOS ad unit ID: _PARAM1_, display at top: _PARAM2_":"Configurar el banner con Android ad unit ID: _PARAM0_, id de unidad de anuncios iOS: _PARAM1_, mostrar en la parte superior: _PARAM2_","Android banner ID":"Android banner ID","iOS banner ID":"iOS banner ID","Display at top? (bottom otherwise)":"\xBFMostrar en la parte superior? (abajo de otra manera)","Show banner":"Mostrar Banner","Show the banner that was previously set up.":"Mostrar el banner previamente configurado.","Hide banner":"Ocultar banner","Hide the banner. You can show it again with the corresponding action.":"Ocultar el banner. Puedes mostrarlo de nuevo con la acci\xF3n correspondiente.","Interstitial loading":"Cargando Intersticial","Check if an interstitial is currently loading.":"Compruebe si una intersticial est\xE1 cargando actualmente.","Interstitial is loading":"Intersticial est\xE1 cargando","Interstitial ready":"Intersticial listo","Check if an interstitial is ready to be displayed.":"Compruebe si una intersticial est\xE1 lista para ser mostrada.","Interstitial is ready":"Intersticial esta listo","Interstitial showing":"Mostrando Intersticial","Check if there is an interstitial being displayed.":"Compruebe si hay un Intersticial que se muestra.","Interstitial is showing":"Mostrando Intersticial","Interstitial had an error":"El anuncio interstitial tuvo un error","Check if there was a error while loading the interstitial.":"Compruebe si ha habido un error mientras se cargaba el anuncio intersticial.","Interstitial ad had an error":"El anuncio intersticial tuvo un error","Load interstitial":"Cargar Intersticial","Start loading an interstitial (that can be displayed automatically when the loading is finished).\nIf test mode is set, a test interstitial will be displayed.":"Cargue un intersticial (puede mostrarse autom\xE1ticamente cuando la haya terminado de cargar).\nSi se establece el modo de prueba, se mostrar\xE1 una un anuncio de prueba intersticial.","Load interstitial with Android ad unit ID: _PARAM0_, iOS ad unit ID: _PARAM1_ (display automatically when loaded: _PARAM2_)":"Cargar interstitial con Android ad unit ID: _PARAM0_, iOS ad unit ID: _PARAM1_ (mostrar autom\xE1ticamente cuando se carga: _PARAM2_)","Android interstitial ID":"ID intersticial Android","iOS interstitial ID":"iD intersticial iOS","Displayed automatically when loading is finished?":"\xBFMostrar autom\xE1ticamente al terminar la carga?","Show interstitial":"Mostrar intersticial","Show the interstitial that was loaded. Will work only when the interstitial is fully loaded.":"Mostrar el intersticial cargado. Solo funcionar\xE1 cuando el intersticial est\xE9 completamente cargado.","Show the loaded interstitial":"Mostrar el anuncio intersticial cargado","Video loading":"Cargando de v\xEDdeo","Check if a reward video is currently loading.":"Compruebe si un video recompensa est\xE1 cargando actualmente.","Reward video is loading":"V\xEDdeo de recompensa est\xE1 cargando","Video ready":"Video listo","Check if a reward video is ready to be displayed.":"Compruebe si un video recompensa est\xE1 lista para ser mostrada.","Reward video is ready":"El v\xEDdeo de recompensa est\xE1 listo","Video showing":"Mostrando v\xEDdeo","Check if there is a reward video being displayed.":"Compruebe si hay un video de recompensa que se muestra.","Reward video is showing":"V\xEDdeo de recompensa se est\xE1 mostrando","Video had an error":"Error al cargar el v\xEDdeo","Check if there was a error while loading the rewarded video.":"Compruebe si ha habido un error mientras se cargaba el anuncio recompensado.","Video ad had an error":"Error al cargar el v\xEDdeoanuncio","Video reward received":"Recompensa de v\xEDdeo recibida","Check if the reward of the video was given to the user.\nYou can mark this reward as cleared, so that the condition will be false and you can show later another reward video.":"Compruebe si la recompensa del v\xEDdeo ha sido entregada al usuario.\nPuedes marcar esta recompensa como limpiada, para que la condici\xF3n sea falsa y puedas mostrar m\xE1s tarde otro v\xEDdeo de recompensa.","User got the reward of the video (and clear this reward: _PARAM0_)":"El usuario obtuvo la recompensa del v\xEDdeo (y limpiar esta recompensa: _PARAM0_)","Clear the reward (needed to show another video)":"Limpia la recompensa (necesaria para mostrar otro v\xEDdeo)","Load video":"Cargar v\xEDdeo","Start loading a reward video (that can be displayed automatically when the loading is finished).\nIf test mode is set, a test video will be displayed.":"Comienza a cargar un video de recompensa, (puedes mostrarlo autom\xE1ticamente cuando termine la carga).\nSi el modo de prueba est\xE1 activado, se mostrar\xE1 un video de prueba.","Load reward video with Android ad unit ID: _PARAM0_, iOS ad unit ID: _PARAM1_ (display automatically when loaded: _PARAM2_)":"Cargar v\xEDdeo de recompensa con Android ad unit ID: _PARAM0_, id de unidad de anuncio de iOS: _PARAM1_ (mostrar autom\xE1ticamente cuando se carga: _PARAM2_)","Android reward video ID":"ID de v\xEDdeo de recompensa de Android","iOS reward video ID":"iD de v\xEDdeo recompensa iOS","Show video":"Mostrar v\xEDdeo","Show the reward video that was loaded. Will work only when the video is fully loaded.":"Mostrar el v\xEDdeo de recompensa que fue cargado. Funcionar\xE1 s\xF3lo cuando el v\xEDdeo est\xE9 completamente cargado.","Show the loaded reward video":"Mostrar el v\xEDdeo de recompensa cargado","Mark the reward of the video as claimed":"Marcar la recompensa del v\xEDdeo como reclamada","Mark the video reward as claimed. Useful if you used the condition to check if the reward was given to the user without clearing the reward.":"Marcar la recompensa de v\xEDdeo como reclamada. \xDAtil si usaste la condici\xF3n para comprobar si la recompensa fue entregada al usuario sin limpiar la recompensa.","Tweening":"Interpolaci\xF3n","Animate object properties over time. This allows smooth transitions, animations or movement of objects to specified positions.":"Anima las propiedades del objeto a lo largo del tiempo. Esto permite transiciones suaves, animaciones o movimientos de objetos a posiciones espec\xEDficas.","Ease":"Suavizar","Tween between 2 values according to an easing function.":"Interpolaci\xF3n entre 2 valores seg\xFAn una funci\xF3n de aceleraci\xF3n.","Easing":"Facilitando","From value":"Desde el valor","To value":"Al valor","Weighting":"Ponderaci\xF3n","From 0 to 1.":"De 0 a 1.","Tween":"Interpolaci\xF3n","Smoothly animate position, angle, scale and other properties of objects.":"Animar suavemente la posici\xF3n, \xE1ngulo, escala y otras propiedades de los objetos.","Add object variable tween":"A\xF1adir variable de objeto interpolada","Add a tween animation for an object variable.":"Agregar una animaci\xF3n de interpolaci\xF3n para una variable de objeto.","Tween the variable _PARAM3_ of _PARAM0_ from _PARAM4_ to _PARAM5_ with easing _PARAM6_ over _PARAM7_ms as _PARAM2_":"Interpolar la variable _PARAM3_ de _PARAM0_ desde _PARAM4_ a _PARAM5_ mejorando_PARAM6_ sobre _PARAM7_ms como _PARAM2_","Tween Identifier":"Identificador de interpolaci\xF3n","Destroy this object when tween finishes":"Destruir este objeto cuando termine la interpolaci\xF3n","Add object position tween":"A\xF1adir posici\xF3n de objeto interpolada","Add a tween animation for the object position.":"Agregar una animaci\xF3n interpolada para la posici\xF3n del objeto.","Tween the position of _PARAM0_ to x: _PARAM3_, y: _PARAM4_ with easing _PARAM5_ over _PARAM6_ms as _PARAM2_":"Interpolar la posici\xF3n de _PARAM0_ a x: _PARAM3_, y: _PARAM4_ mejorando _PARAM5_ sobre _PARAM6_ms como _PARAM2_","To X":"A X","To Y":"A Y","Add object position X tween":"A\xF1adir posici\xF3n X de objeto interpolada","Add a tween animation for the object X position.":"Agregar una animaci\xF3n interpolada para la posici\xF3n X del objeto.","Tween the X position of _PARAM0_ to _PARAM3_ with easing _PARAM4_ over _PARAM5_ms as _PARAM2_":"Interpolar la posici\xF3n de _PARAM0_ a _PARAM3_ mejorando _PARAM4_ sobre _PARAM5_ms como _PARAM2_","Add object width tween":"A\xF1adir interpolaci\xF3n de anchura de objeto","Add a tween animation for the object width.":"Agrega una animaci\xF3n de tween para el ancho del objeto.","Tween the width of _PARAM0_ to _PARAM3_ with easing _PARAM4_ over _PARAM5_ms as _PARAM2_":"Interpolar la anchuro de _PARAM0_ a _PARAM3_ con la flexibilizaci\xF3n _PARAM4_ sobre _PARAM5_ms como _PARAM2_","To width":"Al ancho","Add object height tween":"A\xF1adir interpolaci\xF3n de altura de objeto","Add a tween animation for the object height.":"Agregar una animaci\xF3n interpolada para la altura del objeto.","Tween the height of _PARAM0_ to _PARAM3_ with easing _PARAM4_ over _PARAM5_ms as _PARAM2_":"Interpolar la altura de _PARAM0_ a _PARAM3_ con la flexibilizaci\xF3n de _PARAM4_ sobre _PARAM5_ms como _PARAM2_","To height":"A altura","Add object position Y tween":"A\xF1adir posici\xF3n Y de objeto interpolada","Add a tween animation for the object Y position.":"Agregar una animaci\xF3n interpolada para la posici\xF3n Y del objeto.","Tween the Y position of _PARAM0_ to _PARAM3_ with easing _PARAM4_ over _PARAM5_ms as _PARAM2_":"Interpolar la posici\xF3n Y de _PARAM0_ a _PARAM3_ mejorando _PARAM4_ sobre _PARAM5_ms como _PARAM2_","Add object angle tween":"A\xF1adir \xE1ngulo de objeto interpolado","Add a tween animation for the object angle.":"Agregar una animaci\xF3n interpolada para el \xE1ngulo del objeto.","Tween the angle of _PARAM0_ to _PARAM3_\xB0 with easing _PARAM4_ over _PARAM5_ms as _PARAM2_":"Interpolar el \xE1ngulo de _PARAM0_ a _PARAM3_\xB0 con la flexibilizaci\xF3n de _PARAM4_ sobre _PARAM5_ms como _PARAM2_","To angle (in degrees)":"Al \xE1ngulo (en grados)","Add object scale tween":"A\xF1adir escala de objeto interpolado","Add a tween animation for the object scale (Note: the scale can never be less than 0).":"A\xF1ade una animaci\xF3n de interpolaci\xF3n para la escala del objeto (Nota: la escala nunca puede ser menor que 0).","Tween the scale of _PARAM0_ to X-scale: _PARAM3_, Y-scale: _PARAM4_ (from center: _PARAM8_) with easing _PARAM5_ over _PARAM6_ms as _PARAM2_":"Interpolar la escala de _PARAM0_ a escala-X: _PARAM3_, escala-Y: _PARAM4_ (del centro: _PARAM8_) con facilidad de _PARAM5_ sobre _PARAM6_ms como _PARAM2_","To scale X":"A escala X","To scale Y":"A escala Y","Scale from center of object":"Escala desde el centro del objeto","Add object X-scale tween":"A\xF1adir escala X de objeto interpolado","Add a tween animation for the object X-scale (Note: the scale can never be less than 0).":"Agregar una animaci\xF3n de interpolaci\xF3n para el objeto X-scale (Nota: la escala no puede ser nunca menor que 0).","Tween the X-scale of _PARAM0_ to _PARAM3_ (from center: _PARAM7_) with easing _PARAM4_ over _PARAM5_ms as _PARAM2_":"Interpolar la X-escala de _PARAM0_ a _PARAM3_ con flexibilizaci\xF3n _PARAM4_ sobre _PARAM5_ms como _PARAM2_","Add object Y-scale tween":"A\xF1adir escala Y de objeto interpolado","Add a tween animation for the object Y-scale (Note: the scale can never be less than 0).":"Agregar una animaci\xF3n de interpolaci\xF3n para el objeto Y-scale (Nota: la escala no puede ser nunca menor que 0).","Tween the Y-scale of _PARAM0_ to _PARAM3_ (from center: _PARAM7_) with easing _PARAM4_ over _PARAM5_ms as _PARAM2_":"Interpolar Y-scale de _PARAM0_ a _PARAM3_ (Desde el centro: _PARAM7_) con la eliminaci\xF3n de _PARAM4_ sobre _PARAM5_ms como _PARAM2_","Add text size tween":"A\xF1adir interpolaci\xF3n de tama\xF1o de texto","Add a tween animation for the text object character size (Note: the size can never be less than 1).":"A\xF1ade una animaci\xF3n de interpolaci\xF3n para el tama\xF1o del car\xE1cter del objeto de texto (Nota: el tama\xF1o nunca puede ser menor que 1).","Tween the character size of _PARAM0_ to _PARAM3_ with easing _PARAM4_ over _PARAM5_ms as _PARAM2_":"Interpolar el tama\xF1o de caracter de _PARAM0_ a _PARAM3_ con la flexibilizaci\xF3n de _PARAM4_ sobre _PARAM5_ms como _PARAM2_","To character size":"A tama\xF1o de car\xE1cter","Add object opacity tween":"A\xF1adir interpolaci\xF3n de opacidad del objeto","Add a tween animation for the object opacity (Value between 0 and 255).":"Agregar una animaci\xF3n de interpolaci\xF3n para la opacidad del objeto (valor entre 0 y 255).","Tween the opacity of _PARAM0_ to _PARAM3_ with easing _PARAM4_ over _PARAM5_ms as _PARAM2_":"Interpolar la opacidad de _PARAM0_ a _PARAM3_ con la flexibilizaci\xF3n de _PARAM4_ sobre _PARAM5_ms como _PARAM2_","To opacity":"A opacidad","Add object color tween":"A\xF1adir interpolaci\xF3n de color del objeto","Add a tween animation for the object color. Format: \"128;200;255\" with values between 0 and 255 for red, green and blue":"Agregar una animaci\xF3n interpolada para el color del objeto. Formato: \"128; 200; 255\" con valores entre 0 y 255 para rojo, verde y azul","Tween the color of _PARAM0_ to _PARAM3_ with easing _PARAM4_ over _PARAM5_ms as _PARAM2_":"Interpolar el color de _PARAM0_ para _PARAM3_ con flexibilizaci\xF3n de _PARAM4_ sobre _PARAM5_ms como _PARAM2_","To color":"A color","Tween on the Hue/Saturation/Lightness (HSL)":"Interpolar en la Matiz/Saturaci\xF3n/Luminosidad (MSL)","Useful to have a more natural change between colors.":"\xDAtil para tener un cambio m\xE1s natural entre colores.","Add object HSL color tween":"Agrega el color HSL del objeto","Add a tween animation for the object color using Hue/Saturation/Lightness. Hue can be any number, Saturation and Lightness are between 0 and 100. Use -1 for Saturation and Lightness to let them unchanged.":"Agrega una animaci\xF3n de Interpolaci\xF3n para el color del objeto usando Matiz/Saturaci\xF3n/Iluminaci\xF3n. La Matiz puede ser cualquier n\xFAmero, Saturaci\xF3n y Luminosidad son entre 0 y 100. Use -1 en Saturaci\xF3n y Luminosidad para dejarlos sin cambios.","Tween the color of _PARAM0_ using HSL to H: _PARAM3_ (_PARAM4_), S: _PARAM5_, L: _PARAM6_ with easing _PARAM7_ over _PARAM8_ms as _PARAM2_":"Interpolar el color de _PARAM0_ usando MSL a M: _PARAM3_ (_PARAM4_), S: _PARAM5_, L: _PARAM6_ con naturalidad _PARAM7_ sobre _PARAM8_ms como _PARAM2_","To Hue":"Para matizar","Animate Hue":"Animar la matiz/tono","To Saturation (-1 to ignore)":"Saturaci\xF3n (-1 para ignorar)","To Lightness (-1 to ignore)":"Luz (-1 para ignorar)","Tween exists":"Existe Interpolaci\xF3n","Check if the tween animation exists.":"Compruebe si existe la animaci\xF3n de interpolaci\xF3n.","Tween _PARAM2_ on _PARAM0_ exists":"Existe Interpolaci\xF3n _PARAM2_ en _PARAM0_","Tween is playing":"La Interpolaci\xF3n se esta reproduciendo","Check if the tween animation is currently playing.":"Compruebe si se est\xE1 reproduciendo la animaci\xF3n de interpolaci\xF3n.","Tween _PARAM2_ on _PARAM0_ is playing":"La Interpolaci\xF3n _PARAM2_ en _PARAM0_ se est\xE1 reproduciendo","Tween finished playing":"La Interpolaci\xF3n ha terminado de reproducirse","Check if the tween animation has finished playing.":"Comprobar si la animaci\xF3n de interpolaci\xF3n ha terminado de reproducirse.","Tween _PARAM2_ on _PARAM0_ has finished playing":"La Interpolaci\xF3n _PARAM2_ en _PARAM0_ ha terminado de reproducirse","Pause a tween":"Pausar una interpolaci\xF3n","Pause the running tween animation.":"Pausa la animaci\xF3n de Interpolaci\xF3n en ejecuci\xF3n.","Pause the tween _PARAM2_ on _PARAM0_":"Pausar la interpolaci\xF3n _PARAM2_ en _PARAM0_","Stop a tween":"Detener una interpolaci\xF3n","Stop the running tween animation.":"Detener la animaci\xF3n de Interpolaci\xF3n en ejecuci\xF3n.","Stop the tween _PARAM2_ on _PARAM0_":"Detener la interpolaci\xF3n _PARAM2_ en _PARAM0_","Jump to end":"Saltar al final","Resume a tween":"Reanudar una interpolaci\xF3n","Resume the tween animation.":"Reanudar la animaci\xF3n de interpolaci\xF3n.","Resume the tween _PARAM2_ on _PARAM0_":"Reanudar la interpolaci\xF3n _PARAM2_ en _PARAM0_","Remove a tween":"Quitar una interpolaci\xF3n","Remove the tween animation from the object.":"Quitar la animaci\xF3n de interpolaci\xF3n del objeto.","Remove the tween _PARAM2_ from _PARAM0_":"Eliminar la Interpolaci\xF3n _PARAM2_ de _PARAM0_","Progress of a tween":"Progreso de una interpolaci\xF3n","Progress of a tween (between 0.0 and 1.0)":"Progreso de una interpolaci\xF3n (entre 0.0 y 1.0)","Tilemap":"Mapa de teselas","Tilemap JSON file":"Archivo JSON de mapa de illas","This is the JSON file that was saved or exported from Tiled.":"Este es el archivo JSON que fue guardado o exportado desde Tiled.","Tilemap and tileset":"Mapa de mosaicos y conjunto de mosaicos","Tileset JSON file (optional)":"Archivo JSON de teselas (opcional)","Optional, don't specify it if you've not saved the tileset in a different file.":"Opcional, no lo especifiques si no has guardado el juego de baldosas en un archivo diferente.","Atlas image":"Imagen del atlas","Display mode":"Modo de visualizaci\xF3n","Layer index to display":"\xCDndice de capa a mostrar","If \"index\" is selected as the display mode, this is the index of the layer to display.":"Si se selecciona \"\xEDndice\" como modo de visualizaci\xF3n, este es el \xEDndice de la capa a mostrar.","Animation speed scale":"Escala de la velocidad de animaci\xF3n","Animation FPS":"Animaci\xF3n FPS","Displays a tiled-based map, made with the Tiled editor (download it separately on https://www.mapeditor.org/).":"Muestra un mapa basado en mosaicos, creado con el editor Tiled (desc\xE1rguelo por separado en https://www.mapeditor.org/).","Check the Tilemap JSON file being used.":"Compruebe el archivo JSON de Tilemap que se est\xE1 utilizando.","The Tilemap JSON file of _PARAM0_ is _PARAM1_":"El archivo Tilemap JSON de _PARAM0_ es _PARAM1_","Set the JSON file containing the Tilemap data to display. This is usually the JSON file exported from Tiled.":"Configure el archivo JSON que contiene los datos de Tilemap para mostrar. Este suele ser el archivo JSON exportado desde Tiled.","Set the Tilemap JSON file of _PARAM0_ to _PARAM1_":"Establezca el archivo JSON de mapa de mosaicos de _PARAM0_ en _PARAM1_","Tileset JSON file":"Archivo set de teselas JSON","Check the tileset JSON file being used.":"Compruebe el archivo JSON del juego de teselas que se est\xE1 usando.","The tileset JSON file of _PARAM0_ is _PARAM1_":"El archivo JSON del juego de teselas de _PARAM0_ es _PARAM1_","Set the JSON file with the tileset data (sometimes that is embeded in the Tilemap, so not needed)":"Establece el archivo JSON con los datos del juego de teselas (a veces que est\xE1 incrustado en el mapa de teselas, por lo que no es necesario)","Set the tileset JSON file of _PARAM0_ to _PARAM1_":"Establecer el archivo JSON del juego de teselas de _PARAM0_ a _PARAM1_","Compare the value of the display mode.":"Compare el valor del modo de visualizaci\xF3n.","The display mode of _PARAM0_ is _PARAM1_":"El modo de visualizaci\xF3n de _PARAM0_ es _PARAM1_","Set the display mode":"Establece el modo de visualizaci\xF3n","Set the display mode of _PARAM0_ to _PARAM1_":"Establece el modo de visualizaci\xF3n de _PARAM0_a_PARAM1_","Layer index":"\xCDndice de capa","Compare the value of the layer index.":"Compara el valor del \xEDndice de capa.","the layer index":"el \xEDndice de capa","Set the layer index of the Tilemap.":"Establece el \xEDndice de capa del mapa de teselas.","Get the layer index being displayed":"Obtener el \xEDndice de capa que se muestra","Compare the animation speed scale.":"Compara la escala de velocidad de la animaci\xF3n.","the animation speed scale":"la escala de tiempo de animaci\xF3n","Set the animation speed scale of the Tilemap (1 by default).":"Establezca la escala de velocidad de animaci\xF3n del mapa de mosaicos (1 por defecto).","Get the Animation speed scale":"Obt\xE9n la escala de velocidad de animaci\xF3n","Animation speed (FPS)":"Velocidad de animaci\xF3n (FPS)","Compare the animation speed (in frames per second).":"Compare la velocidad de la animaci\xF3n (en cuadros por segundo).","the animation speed (FPS)":"la velocidad de animaci\xF3n (FPS)","Set the animation speed (in frames per second) of the Tilemap.":"Define la velocidad de animaci\xF3n (en fotogramas por segundo) del Tilemap.","Get the animation speed (in frames per second)":"Obtener la velocidad de animaci\xF3n (en fotogramas por segundo)","Spatial sound":"Sonido espacial","Allow positioning sounds in a 3D space. The stereo system of the device is used to simulate the position of the sound and to give the impression that the sound is located somewhere around the player.":"Permite posicionar sonidos en un espacio 3D. El sistema est\xE9reo del dispositivo se utiliza para simular la posici\xF3n del sonido y dar la impresi\xF3n de que el sonido se encuentra en alg\xFAn lugar alrededor del reproductor.","Set position of sound":"Definir posici\xF3n del sonido","Sets the spatial position of a sound. When a sound is at a distance of 1 to the listener, it's heard at 100% volume. Then, it follows an *inverse distance model*. At a distance of 2, it's heard at 50%, and at a distance of 4 it's heard at 25%.":"Establece la posici\xF3n espacial de un sonido. Cuando un sonido est\xE1 a una distancia de 1 al oyente, se escucha al volumen 100%. Luego, sigue un *modelo de distancia inversa*. A una distancia de 2, se escucha en el 50%, y a una distancia de 4 se escucha en el 25%.","Set position of sound on channel _PARAM1_ to position _PARAM2_, _PARAM3_, _PARAM4_":"Define la posici\xF3n del sonido en el canal _PARAM1_ para colocar _PARAM2_, _PARAM3_, _PARAM4_","Channel":"Canal","Z position":"Posici\xF3n Z","Set position of the listener":"Define la posici\xF3n del oyente","Sets the spatial position of the listener/player.":"Establece la posici\xF3n espacial del oyente/jugador.","Set the listener position to _PARAM0_, _PARAM1_, _PARAM2_":"Establecer la posici\xF3n del oyente a _PARAM0_, _PARAM1_, _PARAM2_","Smooth the image":"Suavizar la imagen","Always loaded in memory":"Mantener siempre cargado en la memoria","Preload as sound":"Precargar como sonido","Preload as music":"Precargar como m\xFAsica","Disable preloading at game startup":"Desactivar la precarga al iniciar el juego","Unable to copy \"":"Imposible copiar \"","\" to \"":"\" a \"","\".":"\".","Cannot find an expression with this name: ":"No se puede encontrar una expresi\xF3n con este nombre: ","Double check that you've not made any typo in the name.":"Comprobar dos veces que no has hecho ning\xFAn tipo en el nombre.","You tried to use an expression that returns a number, but a string is expected. Use `ToString` if you need to convert a number to a string.":"Intent\xF3 usar una expresi\xF3n que devuelva un n\xFAmero, pero se espera una cadena. Usa `ToString` si necesitas convertir un n\xFAmero a una cadena.","You tried to use an expression that returns a number, but another type is expected:":"Intent\xF3 utilizar una expresi\xF3n que devuelva un n\xFAmero, pero se espera otro tipo:","You tried to use an expression that returns a string, but a number is expected. Use `ToNumber` if you need to convert a string to a number.":"Intent\xF3 usar una expresi\xF3n que devuelva una cadena, pero se espera un n\xFAmero. Usa `ToNumber` si necesitas convertir una cadena a un n\xFAmero.","You tried to use an expression that returns a string, but another type is expected:":"Intent\xF3 usar una expresi\xF3n que devuelva una cadena, pero se espera otro tipo:","You tried to use an expression with the wrong return type:":"Intent\xF3 utilizar una expresi\xF3n con el tipo de retorno incorrecto:","The number of parameters must be exactly ":"El n\xFAmero de par\xE1metros debe ser exactamente ","The number of parameters must be: ":"El n\xFAmero de par\xE1metros debe ser: ","A text must start with a double quote (\").":"Un texto debe comenzar con una comilla doble (\").","A text must end with a double quote (\"). Add a double quote to terminate the text.":"Un texto debe terminar con una comilla doble (\"). A\xF1adir una doble comilla para terminar el texto.","A number was expected. You must enter a number here.":"Se esperaba un n\xFAmero. Debe introducir un n\xFAmero aqu\xED.","Return <subject>.":"Devolver <subject>.","Compare <subject>.":"Comparar <subject>.","Check if <subject>.":"Compruebe si <subject>.","Set (or unset) if <subject>.":"Establece (o desestablece) si <subject>.","Change <subject>.":"Cambiar <subject>.","Set _PARAM0_ as <subject>: <value>":"Establecer _PARAM0_ como <subject>: <value>","Change <subject>: <value>":"Cambiar <subject>: <value>","Modification's sign":"Signo de modificaci\xF3n","Change <subject> of _PARAM0_: <operator> <value>":"Cambiar <subject> de _PARAM0_: <operator> <value>","Change <subject>: <operator> <value>":"Cambiar <subject>: <operator> <value>","_PARAM0_ is <subject>":"_PARAM0_ es <subject>","<subject>":"<subject>","Value to compare":"Valor a comparar","<subject> of _PARAM0_ <operator> <value>":"<subject> de _PARAM0_ <operator> <value>","<subject> <operator> <value>":"<subject> <operator> <value>","Value of a scene variable":"Valor de una variable de escena","Compare the value of a scene variable.":"Compara el valor de una variable de escena.","the scene variable _PARAM0_":"la variable de escena _PARAM0_","Scene variables":"Variable de escena","Variable":"Variable","Text of a scene variable":"Texto de una variable de escena","Compare the text of a scene variable.":"Eval\xFAa el texto de una variable de escena.","the text of scene variable _PARAM0_":"el texto de la variable _PARAM0_","Boolean value of a scene variable":"Valor booleano de la variable de una escena","Compare the boolean value of a scene variable.":"Compara el valor booleano de la variable de una escena.","The boolean value of scene variable _PARAM0_ is _PARAM1_":"El valor booleano de la variable _PARAM0_ es _PARAM1_","Check if the value is":"Comprobar si el valor es","Child existence":"Existencia de un hijo","Check if the specified child of the scene variable exists.":"Comprueba si el hijo especificado de la variable de escena existe.","Child _PARAM1_ of scene variable _PARAM0_ exists":"El hijo _PARAM1_ de la variable de escena _PARAM0_ existe","Scene variables/Collections/Structures":"Variables de escena/Colecciones/Estructuras","Name of the child":"Nombre del hijo","Check if the specified child of the global variable exists.":"Comprobar si el hijo especificado de la variable global existe.","Child _PARAM1_ of global variable _PARAM0_ exists":"El hijo _PARAM1_ de la variable global _PARAM0_ existe","Global variables/Collections/Structures":"Variables globales/Colecciones/Estructuras","Value of a global variable":"Valor de una variable global","Compare the value of a global variable.":"Compara el valor de la variable global.","the global variable _PARAM0_":"la variable global _PARAM0_","Text of a global variable":"Texto de una variable global","Compare the text of a global variable.":"Eval\xFAa el texto de una variable global.","the text of the global variable _PARAM0_":"el texto de la variable global _PARAM0_","Boolean value of a global variable":"Valor booleano de una variable global","Compare the boolean value of a global variable.":"Comparar el valor booleano de una variable global.","The boolean value of global variable _PARAM0_ is _PARAM1_":"El valor booleano de la variable global _PARAM0_ es _PARAM1_","Change the value of a scene variable.":"Cambiar el valor de una variable de escena.","String of a scene variable":"Texto de una variable de escena","Modify the text of a scene variable.":"Modifica el texto de una variable de escena.","Modify the boolean value of a scene variable.":"Modificar el valor booleano de una variable de escena.","Set the boolean value of scene variable _PARAM0_ to _PARAM1_":"Establecer el valor booleano de la variable de escena _PARAM0_ a _PARAM1_","New Value:":"Nuevo valor:","Toggle boolean value of a scene variable":"Alternar el valor booleano de una variable de escena","Toggle the boolean value of a scene variable.":"Alternar el valor booleano de una variable de escena.","If it was true, it will become false, and if it was false it will become true.":"Si fuese cierto se convertir\xE1 en falso, y si fuese falso se convertir\xE1 en verdadero.","Toggle the boolean value of scene variable _PARAM0_":"Alternar el valor booleano de la variable de escena _PARAM0_","Change the value of a global variable":"Cambiar el valor de una variable global","String of a global variable":"Texto de una variable global","Modify the text of a global variable.":"Modifica el texto de una variable global.","the text of global variable _PARAM0_":"el texto de la variable global _PARAM0_","Modify the boolean value of a global variable.":"Modificar el valor booleano de una variable global.","Set the boolean value of global variable _PARAM0_ to _PARAM1_":"Establecer el valor booleano de la variable global _PARAM0_ a _PARAM1_","Toggle boolean value of a global variable":"Alternar el valor booleano de una variable global","Toggle the boolean value of a global variable.":"Alternar el valor booleano de una variable global.","Toggle the boolean value of global variable _PARAM0_":"Alternar el valor booleano de la variable global _PARAM0_","Remove a child":"Eliminar un hijo","Remove a child from a scene variable.":"Elimina un hijo de una variable de escena.","Remove child _PARAM1_ from scene variable _PARAM0_":"Eliminar hijo _PARAM1_ de la variable de escena _PARAM0_","Child's name":"Nombre del hijo","Remove a child from a global variable.":"Elimina un hijo de una variable global.","Remove child _PARAM1_ from global variable _PARAM0_":"Eliminar al hijo _PARAM1_ de la variable global _PARAM0_","Clear scene variable":"Borrar variable de escena","Remove all the children from the scene variable.":"Eliminar todos los hijos de la variable de escena.","Clear children from scene variable _PARAM0_":"Borrar hijos de la variable de escena _PARAM0_","Scene variables/Collections":"Variables de escena/Colecciones","Clear global variable":"Limpiar la variable global","Remove all the children from the global variable.":"Remueve a todos los ni\xF1os de la variable global.","Clear children from global variable _PARAM0_":"Limpia a los ni\xF1os de la variable global _PARAM0_","Global variables/Collections":"Variables globales/Colecciones","Append variable to a scene array":"Anexar una variable a un array de la escena","Appends a variable at the end of a scene array variable.":"A\xF1ade una variable al final de una variable de tipo array de la escena.","Append variable _PARAM1_ to array variable _PARAM0_":"Anexar la variable _PARAM1_ a la variable array _PARAM0_","Scene variables/Collections/Arrays":"Variables de escena/Colecciones/Arrays","Array variable":"Variable Array","Scene variable with the content to append":"Variable de escena con el contenido que anexar","The content of the variable will *be copied* and appended at the end of the array.":"El contenido de la variable *ser\xE1 copiado* y anexado al final del array.","Append a string to a scene array":"Anexar una cadena a un array de escena","Appends a string at the end of a scene array variable.":"Agrega una cadena al final de una variable array de escena.","Append string _PARAM1_ to array variable _PARAM0_":"Anexar la cadena _PARAM1_ a la variable array _PARAM0_","String to append":"Cadena para anexar","Append a number to a scene array":"Anexar un n\xFAmero a un array de escena","Appends a number at the end of a scene array variable.":"Agrega un n\xFAmero al final de una variable array de escena.","Append number _PARAM1_ to array variable _PARAM0_":"Anexar el n\xFAmero _PARAM1_ a la variable array _PARAM0_","Number to append":"N\xFAmero que anexar","Append a boolean to a scene array":"Anexar un booleano a un array de escena","Appends a boolean at the end of a scene array variable.":"Agregar un booleano al final de una variable array de escena.","Append boolean _PARAM1_ to array variable _PARAM0_":"Anexar el booleano _PARAM1_ a la variable array _PARAM0_","Boolean to append":"Booleano para anexar","Remove variable from a scene array (by index)":"Elimina una variable de un array de escena (por \xEDndice)","Removes a variable at the specified index of a scene array variable.":"Elimina una variable en el \xEDndice especificado de una variable de array de escena.","Remove variable at index _PARAM1_ from scene array variable _PARAM0_":"Remueve la variable del \xEDndice _PARAM1_ de la variable de arrasre de la escena _PARAM0_","Index to remove":"\xCDndice que eliminar","Append variable to a global array":"Anexar una variable a un array global","Appends a variable at the end of a global array variable.":"A\xF1ade una variable al final de una variable array de la escena.","Global variables/Collections/Arrays":"Variables globales/Colecciones/Arrays","Remove variable from a global array (by index)":"Elimina una variable de un array global (por \xEDndice)","Removes a variable at the specified index of a global array variable.":"Elimina una variable en el \xEDndice especificado de una variable de array global.","Remove variable at index _PARAM1_ from global array variable _PARAM0_":"Remueve la variable del \xEDndice _PARAM1_ de la variable de arrastre global _PARAM0_","Append a string to a global array":"Anexar una cadena a un array global","Appends a string at the end of a global array variable.":"A\xF1ade una cadena al final de una variable array global.","Append a number to a global array":"Anexar un n\xFAmero a un array global","Appends a number at the end of a global array variable.":"A\xF1ade un n\xFAmero al final de una variable array global.","Append a boolean to a global array":"Anexar un booleano a un array global","Appends a boolean at the end of a global array variable.":"Agregar un booleano al final de una variable array global.","Number of children of a global variable":"N\xFAmero de hijos de una variable global","Number of children of a scene variable":"N\xFAmero de hijos de una variable de escena","Name of the global variable":"Nombre de la variable global","Event functions":"Funciones de eventos","Advanced control features for functions made with events.":"Caracter\xEDsticas de control avanzadas para funciones hechas con eventos.","Set number return value":"Establecer valor de retorno de n\xFAmero","Set the return value of the events function to the specified number (to be used with \"Expression\" functions).":"Establece el valor de retorno de la funci\xF3n de eventos al n\xFAmero especificado (para ser usado con funciones de \"Expresi\xF3n\").","Set return value to number _PARAM0_":"Establecer valor de retorno al n\xFAmero _PARAM0_","Set text return value":"Establecer valor de retorno de texto","Set the return value of the events function to the specified text (to be used with \"String Expression\" functions).":"Establece el valor de retorno de la funci\xF3n de eventos al texto especificado (para ser usado con las funciones de \"Expresi\xF3n de cadena\").","Set return value to text _PARAM0_":"Establecer valor de retorno al texto _PARAM0_","Set condition return value":"Establecer valor de condici\xF3n devuelto","Set the return value of the Condition events function to either true (condition will pass) or false.":"Establecer el valor de retorno de la funci\xF3n de eventos de la condici\xF3n a true (condici\xF3n pasar\xE1) o falso.","Set return value of the condition to _PARAM0_":"Establecer el valor de retorno de la condici\xF3n a _PARAM0_","Check if a function parameter is set to true (or yes)":"Eval\xFAa si el par\xE1metro de una funci\xF3n est\xE1 configurado a verdadero (o s\xED)","Check if the specified function parameter (also called \"argument\") is set to True or Yes. If the argument is a string, an empty string is considered as \"false\". If it's a number, 0 is considered as \"false\".":"Eval\xFAa si el par\xE1metro de funci\xF3n especificado (tambi\xE9n llamado \"argumento\") est\xE1 establecido en True o S\xED. Si el argumento es una cadena, una cadena vac\xEDa se considera \"false\". Si es un n\xFAmero, 0 se considera \"false\".","Parameter _PARAM0_ is true":"El par\xE1metro _PARAM0_ es verdadero","Get function parameter value":"Obtener valor del par\xE1metro de funci\xF3n","Get function parameter (also called \"argument\") value":"Obtener valor del par\xE1metro de la funci\xF3n (tambi\xE9n llamado \"argumento\")","Get function parameter text":"Obtener texto del par\xE1metro de la funci\xF3n","Get function parameter (also called \"argument\") text ":"Obtener valor del par\xE1metro de la funci\xF3n (tambi\xE9n llamado \"argumento\") ","Layers and cameras":"Capas y c\xE1maras","Camera center X position":"Posici\xF3n X del centro de la c\xE1mara","the X position of the center of a camera":"la posici\xF3n X del centro de una c\xE1mara","the X position of camera _PARAM4_ (layer: _PARAM3_)":"la posici\xF3n X de la c\xE1mara _PARAM4_ (capa: _PARAM3_)","Layer (base layer if empty)":"Capa (capa base si se omite)","Camera number (default : 0)":"N\xFAmero de c\xE1mara (0 por defecto)","Camera center Y position":"Posici\xF3n Y del centro de la c\xE1mara","the Y position of the center of a camera":"la posici\xF3n Y del centro de una c\xE1mara","the Y position of camera _PARAM4_ (layer: _PARAM3_)":"la posici\xF3n Y de la c\xE1mara _PARAM4_ (capa: _PARAM3_)","Width of a camera":"Ancho de una c\xE1mara","the width of a camera of a layer":"el ancho de una c\xE1mara de una capa","the width of camera _PARAM2_ of layer _PARAM1_":"el ancho de la c\xE1mara _PARAM2_ de la capa _PARAM1_","Camera number":"N\xFAmero de la c\xE1mara","Height of a camera":"Alto de una c\xE1mara","the height of a camera of a layer":"la altura de una c\xE1mara de una capa","the height of camera _PARAM2_ of layer _PARAM1_":"la altura de la c\xE1mara _PARAM2_ de la capa _PARAM1_","Angle of a camera of a layer":"\xC1ngulo de una c\xE1mara","the angle of rotation of a camera":"el \xE1ngulo de rotaci\xF3n de una c\xE1mara","the angle of camera (layer: _PARAM3_, camera: _PARAM4_)":"el \xE1ngulo de la c\xE1mara (capa: _PARAM3_, c\xE1mara: _PARAM4_)","Add a camera to a layer":"Agregar una c\xE1mara a una capa","This action adds a camera to a layer":"Esta acci\xF3n agrega una c\xE1mara a una capa.","Add a camera to layer _PARAM1_":"Agregar una c\xE1mara a la capa _PARAM1_","Render zone: Top left side: X Position (between 0 and 1)":"Zona de renderizado: Punto superior-izquierdo: Posici\xF3n X (entre 0 y 1)","Render zone: Top left side: Y Position (between 0 and 1)":"Zona de renderizado: Punto superior-izquierdo: Posici\xF3n Y (entre 0 y 1)","Render zone: Bottom right side: X Position (between 0 and 1)":"Zona de renderizado: Punto inferior-derecho: Posici\xF3n X (entre 0 y 1)","Render zone: Bottom right side: Y Position (between 0 and 1)":"Zona de renderizado: Punto inferior-derecho: Posici\xF3n Y (entre 0 y 1)","Delete a camera of a layer":"Eliminar una c\xE1mara","Remove the specified camera from a layer":"Elimina la c\xE1mara especificada de una capa.","Delete camera _PARAM2_ from layer _PARAM1_":"Borrar la c\xE1mara _PARAM2_ de la capa _PARAM1_","Modify the size of a camera":"Modificar el tama\xF1o de una c\xE1mara","This action modifies the size of a camera of the specified layer. The zoom will be reset.":"Esta acci\xF3n modifica el tama\xF1o de la c\xE1mara especificada de la capa. El valor de aumento ser\xE1 restablecido.","Change the size of camera _PARAM2_ of _PARAM1_ to _PARAM3_*_PARAM4_":"Cambiar el tama\xF1o de la c\xE1mara _PARAM2_ de la capa _PARAM1_ a _PARAM3_*_PARAM4_","Modify the render zone of a camera":"Modificar la zona de renderizado de una c\xE1mara","This action modifies the render zone of a camera of the specified layer.":"Esta acci\xF3n modifica la zona de renderizado de una c\xE1mara especificada de la capa, expresado como factor de la ventana.","Set the render zone of camera _PARAM2_ from layer _PARAM1_ to _PARAM3_;_PARAM4_ _PARAM5_;_PARAM6_":"Establecer la zona de renderizado de la c\xE1mara _PARAM2_ de la capa _PARAM1_ a _PARAM3_;_PARAM4_ _PARAM5_;_PARAM6_","Change camera zoom":"Cambiar zoom de la c\xE1mara","Change camera zoom.":"Cambiar el aumento.","Change camera zoom to _PARAM1_ (layer: _PARAM2_, camera: _PARAM3_)":"Cambiar zoom de la c\xE1mara a _PARAM1_ (capa: _PARAM2_, c\xE1mara: _PARAM3_)","Value (1:Initial zoom, 2:Zoom x2, 0.5:Unzoom x2...)":"Valor (1: Aumento inicial, 2: Aumento x2, 0.5: Disminuci\xF3n x2...)","Center the camera on an object within limits":"Centrar la c\xE1mara en un objeto ( L\xEDmites )","Center the camera on the specified object, without leaving the specified limits.":"Centra la c\xE1mara en el objeto especificado, dentro de los l\xEDmites dados.\nEs preferible llamar esta acci\xF3n al final de los eventos, cuando todas las acciones\nde desplazamiento y posici\xF3n de objetos se hayan efectuado.","Center the camera on _PARAM1_ (limit : from _PARAM2_;_PARAM3_ to _PARAM4_;_PARAM5_) (layer: _PARAM7_, camera: _PARAM8_)":"Centrar la c\xE1mara en _PARAM1_ (l\xEDmite: de _PARAM2_;_PARAM3_ a _PARAM4_;_PARAM5_) (capa: _PARAM7_, c\xE1mara: _PARAM8_)","Top left side of the boundary: X Position":"Esquina superior-izquierda del l\xEDmite : Posici\xF3n X","Top left side of the boundary: Y Position":"Esquina superior-izquierda del l\xEDmite : Posici\xF3n Y","Bottom right side of the boundary: X Position":"Esquina inferior-derecha del l\xEDmite : Posici\xF3n X","Bottom right side of the boundary: Y Position":"Esquina inferior-derecha del l\xEDmite : Posici\xF3n Y","Anticipate the movement of the object (yes by default)":"Anticipar el movimiento de los objetos (s\xED por defecto)","Enforce camera boundaries":"Forzar l\xEDmites de la c\xE1mara","Enforce camera boundaries by moving the camera back inside specified boundaries.":"Forzar los l\xEDmites de la c\xE1mara moviendo la c\xE1mara hacia atr\xE1s dentro de los l\xEDmites especificados.","Enforce camera boundaries (left: _PARAM1_, top: _PARAM2_ right: _PARAM3_, bottom: _PARAM4_, layer: _PARAM5_)":"Forzar l\xEDmites de la c\xE1mara (izquierda: _PARAM1_, arriba: _PARAM2_ derecha: _PARAM3_, abajo: _PARAM4_, capa: _PARAM5_)","Left bound X Position":"Posici\xF3n X delimitada a la izquierda","Top bound Y Position":"Posici\xF3n Y delimitada por arriba","Right bound X Position":"Posici\xF3n X delimitada por la derecha","Bottom bound Y Position":"Posici\xF3n Y delimitada por abajo","Center the camera on an object":"Centrar la c\xE1mara en el objeto","Center the camera on the specified object.":"Centra la c\xE1mara en el objeto especificado.\nEs preferible llamar esta acci\xF3n al final de los eventos, cuando todas las acciones\nde desplazamiento y posici\xF3n de objetos se hayan efectuado.","Center camera on _PARAM1_ (layer: _PARAM3_)":"Centrar la c\xE1mara en _PARAM1_ (capa: _PARAM3_)","Show a layer":"Revelar una capa","Show a layer.":"Revela una capa (si estaba oculta).","Show layer _PARAM1_":"Revelar la capa _PARAM1_","Hide a layer":"Ocultar una capa","Hide a layer.":"Oculta una capa (la hace invisible).","Hide layer _PARAM1_":"Ocultar la capa _PARAM1_","Visibility of a layer":"Visibilidad de una capa","Test if a layer is set as visible.":"Prueba si una capa est\xE1 configurada como visible.","Layer _PARAM1_ is visible":"La capa _PARAM1_ es visible","Effect parameter (number)":"Par\xE1metro efecto (n\xFAmero)","Change the value of a parameter of an effect.":"Cambia el valor de un par\xE1metro de un efecto.","You can find the parameter names (and change the effect names) in the effects window.":"Puede encontrar los nombres de los par\xE1metros (y cambiar los nombres de los efectos) en la ventana de efectos.","Set _PARAM3_ to _PARAM4_ for effect _PARAM2_ of layer _PARAM1_":"Set _PARAM3_ para _PARAM4_ para _PARAM2_ de efecto de capa _PARAM1_","Effect name":"Nombre de efecto","Effect parameter (string)":"Par\xE1metro de efecto (string)","Change the value (string) of a parameter of an effect.":"Cambia el valor (string) de un par\xE1metro de un efecto.","Effect parameter (enable or disable)":"Par\xE1metro del efecto (activar o desactivar)","Enable or disable a parameter of an effect.":"Activar o desactivar un par\xE1metro de un efecto.","Enable _PARAM3_ for effect _PARAM2_ of layer _PARAM1_: _PARAM4_":"Habilitar _PARAM3_ para el efecto _PARAM2_ de la capa _PARAM1_: _PARAM4_","Enable this parameter":"Activar este par\xE1metro","Layer effect is enabled":"Efecto de capa habilitado","The effect on a layer is enabled":"El efecto sobre una capa est\xE1 habilitado","Effect _PARAM2_ on layer _PARAM1_ is enabled":"El efecto _PARAM2_ en la capa _PARAM1_ est\xE1 activado","Enable layer effect":"Activar efecto de capa","Enable an effect on a layer":"Activar un efecto en una capa","Enable effect _PARAM2_ on layer _PARAM1_: _PARAM3_":"Habilitar el efecto _PARAM2_ en la capa _PARAM1_: _PARAM3_","Enable":"Habilitar","Layer time scale":"Cambiar la escala de tiempo","Compare the time scale applied to the objects of the layer.":"Comparar la escala de tiempo aplicada a los objetos de la capa.","the time scale of layer _PARAM1_":"la escala de tiempo de la capa _PARAM1_","Change layer time scale":"Cambiar la escala de tiempo","Change the time scale applied to the objects of the layer.":"Comparar la escala de tiempo aplicada a los objetos de la capa.","Set the time scale of layer _PARAM1_ to _PARAM2_":"Establecer la escala de tiempo de la capa _PARAM1_ a _PARAM2_","Scale (1: Default, 2: 2x faster, 0.5: 2x slower...)":"Escala (1: Normal, 2: M\xE1s r\xE1pido, 0.5: M\xE1s lento...)","Layer default Z order":"Orden de la capa Z por defecto","Compare the default Z order set to objects when they are created on a layer.":"Comparar el orden Z por defecto establecido en los objetos cuando se crean en una capa.","the default Z order of objects created on _PARAM1_":"el orden en Z por defecto de los objetos creados en _PARAM1_","Change layer default Z order":"Cambiar el orden por defecto de la capa Z","Change the default Z order set to objects when they are created on a layer.":"Cambiar el orden Z por defecto establecido en los objetos cuando se crean en una capa.","Set the default Z order of objects created on _PARAM1_ to _PARAM2_":"Establecer el orden Z por defecto de los objetos creados en _PARAM1_ a _PARAM2_","New default Z order":"Nuevo orden Z por defecto","Set the ambient light color":"Establecer el color de la luz ambiental","Set the ambient light color of the lighting layer in format \"R;G;B\" string.":"Establecer el color de luz ambiental de la capa de iluminaci\xF3n con el formato de cadena \"R;G;B\".","Set the ambient color of the lighting layer _PARAM1_ to _PARAM2_":"Establecer el color ambiente de la capa de iluminaci\xF3n _PARAM1_ a _PARAM2_","Lighting":"Iluminaci\xF3n","X position of the top left side point of a render zone":"Posici\xF3n X del punto superior-izquierdo de la zona de renderizado de la c\xE1mara","Y position of the top left side point of a render zone":"Posici\xF3n Y del punto superior-izquierdo de la zona de renderizado de la c\xE1mara","X position of the bottom right side point of a render zone":"Posici\xF3n X del punto inferior-derecho de la zona de renderizado de la c\xE1mara","Y position of the bottom right side point of a render zone":"Posici\xF3n Y del punto inferior-derecho de la zona de renderizado de la c\xE1mara","Zoom of a camera of a layer":"Zoom de una c\xE1mara de una capa","Returns the time scale of the specified layer.":"Devuelve la escala de tiempo de la capa especificada.","Default Z Order for a layer":"Orden Z por defecto para una capa","Sounds and musics":"Sonidos y m\xFAsicas","GDevelop provides several conditions and actions to play audio files. They can be either long musics or short sound effects.":"GDevelop proporciona varias condiciones y acciones para reproducir archivos de audio. Pueden ser m\xFAsicos largos o efectos de sonido cortos.","Play a sound on a channel":"Reproducir un sonido en un canal","Play a sound (small audio file) on a specific channel,\nso you'll be able to manipulate it.":"Tocar un sonido (archivo peque\xF1o) en un canal espec\xEDfico,\nde modo que pueda manipularse.","Play the sound _PARAM1_ on the channel _PARAM2_, vol.: _PARAM4_, loop: _PARAM3_":"Reproducir el sonido _PARAM1_ en el canal _PARAM2_, vol.: _PARAM4_, bucle: _PARAM3_","Sounds on channels":"Sonidos en los canales","Audio file (or audio resource name)":"Archivo de audio (o nombre del recurso de audio)","Channel identifier":"Identificador del canal","Repeat the sound":"Repetir el sonido","From 0 to 100, 100 by default.":"De 0 a 100, 100 por defecto.","Pitch (speed)":"Tono (velocidad)","1 by default.":"1 por defecto.","Stop the sound of a channel":"Detener el sonido de un canal","Stop the sound on the specified channel.":"Detener el sonido en el canal especificado.","Stop the sound of channel _PARAM1_":"Detener el sonido del canal _PARAM1_","Pause the sound of a channel":"Pausar el sonido de un canal","Pause the sound played on the specified channel.":"Pausar el sonido en el canal espeificado.","Pause the sound of channel _PARAM1_":"Pausar el sonido del canal _PARAM1_","Play the sound of a channel":"Reproducir el sonido de un canal","Play the sound of the channel.":"Reproducir el sonido en el canal especificado.","Play the sound of channel _PARAM1_":"Reproducir el sonido del canal _PARAM1_","Play a music file on a channel":"Tocar un archivo de m\xFAsica en un canal","Play a music file on a specific channel,\nso you'll be able to interact with it later.":"Tocar un archivo de m\xFAsica en un canal espec\xEDfico,\npara poder interactuar con \xE9l luego.","Play the music _PARAM1_ on channel _PARAM2_, vol.: _PARAM4_, loop: _PARAM3_":"Reproducir la m\xFAsica _PARAM1_ en el canal _PARAM2_, vol.: _PARAM4_, bucle: _PARAM3_","Music on channels":"M\xFAsica en los canales","Stop the music on a channel":"Detener la m\xFAsica de un canal","Stop the music on the specified channel":"Detener la m\xFAsica en el canal especificado.","Stop the music of channel _PARAM1_":"Detener la m\xFAsica del canal _PARAM1_","Pause the music of a channel":"Pausar la m\xFAsica de un canal","Pause the music on the specified channel.":"Pausar la m\xFAsica en el canal especificado.","Pause the music of channel _PARAM1_":"Pausar la m\xFAsica del canal _PARAM1_","Play the music of a channel":"Reproducir la m\xFAsica de un canal","Play the music of the channel.":"Reproducir la m\xFAsica en el canal especificado.","Play the music of channel _PARAM1_":"Reproducir la m\xFAsica del canal _PARAM1_","Volume of the sound on a channel":"Volumen del sonido en un canal","This action modifies the volume of the sound on the specified channel. The volume is between 0 and 100.":"Esta acci\xF3n modifica el volumen del sonido en un canal espec\xEDfico. El volumen debe ser entre 0 y 100.","the volume of the sound on channel _PARAM1_":"el volumen del sonido en el canal _PARAM1_","Volume of the music on a channel":"Volumen de la m\xFAsica en un canal","This action modifies the volume of the music on the specified channel. The volume is between 0 and 100.":"Esta acci\xF3n modifica el volumen de la m\xFAsica en el canal especificado. El volumen va entre 0 y 100.","the volume of the music on channel _PARAM1_":"el volumen de la m\xFAsica en el canal _PARAM1_","Game global volume":"Volumen global del juego","This action modifies the global volume of the game. The volume is between 0 and 100.":"Esta acci\xF3n modifica el volumen global del juego. El volumen va de 0 a 100.","the global sound level":"el nivel de sonido global","Pitch of the sound of a channel":"Pitch del sonido de un canal","This action modifies the pitch (speed) of the sound on a channel.\n1 is the default pitch.":"Esta acci\xF3n modifica el \"pitch\" (velocidad) del sonido en un canal.\nEl valor por defecto es 1.","the pitch of the sound on channel _PARAM1_":"el tono del sonido en el canal _PARAM1_","Pitch of the music on a channel":"Pitch de la m\xFAsica de un canal","This action modifies the pitch of the music on the specified channel. 1 is the default pitch":"Esta acci\xF3n modifica el \"pitch\" (velocidad) de un sonido en un canal.\nUn pitch de 1 representa una velocidad normal","the pitch of the music on channel _PARAM1_":"el tono de la m\xFAsica en el canal _PARAM1_","Playing offset of the sound on a channel":"Posici\xF3n de lectura del sonido en un canal","This action modifies the playing offset of the sound on a channel":"Esta acci\xF3n modifica la posici\xF3n de lectura del sonido en un canal","the playing offset of the sound on channel _PARAM1_":"el desplazamiento de reproducci\xF3n del sonido en el canal _PARAM1_","Playing offset of the music on a channel":"Posici\xF3n de lectura de la m\xFAsica en un canal","This action modifies the playing offset of the music on the specified channel":"Esta acci\xF3n modifica la posici\xF3n de lectura de la m\xFAsica en un canal","the playing offset of the music on channel _PARAM1_":"el desplazamiento de reproducci\xF3n de la m\xFAsica en el canal _PARAM1_","Play a sound":"Reproducir un sonido","Play a sound.":"Reproducir un sonido.","Play the sound _PARAM1_, vol.: _PARAM3_, loop: _PARAM2_":"Reproducir el sonido _PARAM1_, vol.: _PARAM3_, bucle: _PARAM2_","Play a music file":"Reproducir un archivo de m\xFAsica","Play a music file.":"Reproducir un archivo de m\xFAsica.","Play the music _PARAM1_, vol.: _PARAM3_, loop: _PARAM2_":"Reproducir la m\xFAsica _PARAM1_, vol.: _PARAM3_, bucle: _PARAM2_","Preload a music file":"Precargar un archivo de m\xFAsica","Preload a music file in memory.":"Precargar un archivo de m\xFAsica en la memoria.","Preload the music file _PARAM1_":"Precargar el archivo de m\xFAsica _PARAM1_","Loading":"Cargando","Preload a sound file":"Precargar un archivo de sonido","Preload a sound file in memory.":"Precargar un archivo de sonido en la memoria.","Preload the sound file _PARAM1_":"Precargar el archivo de sonido _PARAM1_","Sound file (or sound resource name)":"Archivo de sonido (o nombre de recurso de sonido)","Unload a music file":"Descargar un archivo de m\xFAsica","Unload a music file from memory. Unloading a music file will cause any music playing it to stop.":"Descargue un archivo de m\xFAsica de la memoria. Descargando un archivo de m\xFAsica har\xE1 que se detenga cualquier reproducci\xF3n musical.","Unload the music file _PARAM1_":"Descargar el archivo de m\xFAsica _PARAM1_","Unload a sound file":"Descargar un archivo de sonido","Unload a sound file from memory. Unloading a sound file will cause any sounds playing it to stop.":"Descargue un archivo de sonido de la memoria. Descargando un archivo de sonido har\xE1 que se detenga cualquier sonido.","Unload the sound file _PARAM1_":"Descargar el archivo de sonido _PARAM1_","Unload all audio":"Descargar todo el audio","Unload all the audio in memory. This will cause every sound and music of the game to stop.":"Descarga todo el audio en la memoria. Esto har\xE1 que se detenga todo el sonido y la m\xFAsica del juego.","Unload all audio files":"Descargar todos los archivos de audio","Fade the volume of a sound played on a channel.":"Disminuye el volumen de un sonido reproducido en un canal.","Fade the volume of a sound played on a channel to the specified volume within the specified duration.":"Desvanece el volumen de un sonido reproducido en un canal hasta el volumen especificado dentro de la duraci\xF3n especificada.","Fade the sound on channel _PARAM1_ to volume _PARAM2_ within _PARAM3_ seconds":"Desvanece el sonido en el canal _PARAM1_ hasta el volumen _PARAM2_ en los siguientes _PARAM3_ segundos","Final volume (0-100)":"Volumen final (0-100)","Fading time in seconds":"Tiempo de desvanecimiento en segundos","Fade the volume of a music played on a channel.":"Desvanece el volumen de la m\xFAsica reproducida en un canal.","Fade the volume of a music played on a channel to the specified volume within the specified duration.":"Desvanece el volumen de una m\xFAsica reproducida en un canal hasta el volumen especificado dentro de la duraci\xF3n especificada.","Fade the music on channel _PARAM1_ to volume _PARAM2_ within _PARAM3_ seconds":"Desvanece la m\xFAsica en el canal _PARAM1_ hasta el volumen _PARAM2_ en _PARAM3_ segundos","A music file is being played":"Se est\xE1 reproduciendo un archivo de m\xFAsica","Test if the music on a channel is being played":"Eval\xFAa si la m\xFAsica en un canal es est\xE1 reproduciendo.","Music on channel _PARAM1_ is being played":"La m\xFAsica en el canal _PARAM1_ est\xE1 en reproducci\xF3n","A music file is paused":"Un archivo de m\xFAsica est\xE1 en pausa","Test if the music on the specified channel is paused.":"Eval\xFAa si la m\xFAsica en un canal est\xE1 en pausa.","Music on channel _PARAM1_ is paused":"La m\xFAsica en el canal _PARAM1_ est\xE1 en pausa","A music file is stopped":"Un archivo de m\xFAsica est\xE1 detenido","Test if the music on the specified channel is stopped.":"Eval\xFAa si la m\xFAsica en un canal est\xE1 detenida.","Music on channel _PARAM1_ is stopped":"La m\xFAsica en el canal _PARAM1_ est\xE1 detenida","A sound is being played":"Un sonido se est\xE1 reproduciendo","Test if the sound on a channel is being played.":"Eval\xFAa si el sonido en un canal se est\xE1 reproduciendo.","Sound on channel _PARAM1_ is being played":"El sonido en el canal _PARAM1_ est\xE1 en reproducci\xF3n","A sound is paused":"Un sonido est\xE1 en pausa","Test if the sound on the specified channel is paused.":"Eval\xFAa si el sonido en un canal est\xE1 en pausa.","Sound on channel _PARAM1_ is paused":"El sonido en el canal _PARAM1_ est\xE1 en pausa","A sound is stopped":"Un sonido est\xE1 detenido","Test if the sound on the specified channel is stopped.":"Eval\xFAa si el sonido en un canal est\xE1 detenido.","Sound on channel _PARAM1_ is stopped":"El sonido en el canal _PARAM1_ est\xE1 detenido","Test the volume of the sound on the specified channel. The volume is between 0 and 100.":"Eval\xFAa el volumen del sonido en el canal especificado. El volumen est\xE1 comprendido entre 0 y 100.","Test the volume of the music on a specified channel. The volume is between 0 and 100.":"Prueba el volumen de la m\xFAsica en el canal especificado. El volumen est\xE1 comprendido entre 0 y 100.","Global volume":"Volumen global","Test the global sound level. The volume is between 0 and 100.":"Eval\xFAa el volumen de sonido global. El volumen est\xE1 comprendido entre 0 y 100.","the global game volume":"el volumen global del juego","Test the pitch of the sound on the specified channel. 1 is the default pitch.":"Eval\xFAa el \"pitch\" ( velocidad ) del sonido en el canal especificado. Un pitch de 1 representa una velocidad normal.","Test the pitch (speed) of the music on a specified channel. 1 is the default pitch.":"Eval\xFAa el \"pitch\" (velocidad) de la m\xFAsica en el canal especificado.\nEl valor por defecto es 1.","Test the playing offset of the sound on the specified channel.":"Eval\xFAa la posici\xF3n de lectura del sonido en el canal especificado.","Test the playing offset of the music on the specified channel.":"Eval\xFAa la posici\xF3n de lectura de la m\xFAsica en el canal especificado.","Sound playing offset":"Posici\xF3n de lectura de un sonido","Sounds":"Sonidos","Music playing offset":"Posici\xF3n de lectura de una m\xFAsica","Music":"M\xFAsica","Sound volume":"Volumen de sonido","Music volume":"Volumen de m\xFAsica","Sound's pitch":"Pitch de sonido","Music's pitch":"Pitch de m\xFAsica","Global volume value":"Valor de volumen global","Sound level":"Volumen","Sprite":"Sprite ( imagen animada )","Sprite are animated object which can be used for most elements of a game.":"El Sprite es un objeto animado que puede ser utilizado para la mayor\xEDa de los elementos de un juego.","Animated object which can be used for most elements of a game":"Objeto animado que puede ser usado para la mayor\xEDa de elementos del juego","Change sprite opacity":"Cambiar la opacidad del sprite","Change the opacity of a Sprite. 0 is fully transparent, 255 is opaque (default).":"Cambiar la opacidad de un Sprite. 0 es totalmente transparente, 255 es opaco (por defecto).","Change the animation":"Cambiar la animaci\xF3n","Change the animation of the object, using the animation number in the animations list.":"Cambie la animaci\xF3n del objeto, usando el numero de la animaci\xF3n en la lista de animaciones.","the number of the animation":"el n\xFAmero de la animaci\xF3n","Animations and images":"Animaciones e im\xE1genes","Change the animation (by name)":"Cambie la animaci\xF3n (por nombre)","Change the animation of the object, using the name of the animation.":"Cambie la animaci\xF3n del objeto usando el nombre de la animaci\xF3n.","Set animation of _PARAM0_ to _PARAM1_":"Configurar animaci\xF3n de _PARAM0_ hacia _PARAM1_","Animation name":"Nombre de animaci\xF3n","Change the direction":"Cambiar la direcci\xF3n","Change the direction of the object.\nIf the object is set to automatically rotate, the direction is its angle.\nIf the object is in 8 directions mode, the valid directions are 0..7":"Modifica la direcci\xF3n del objeto.\nEn modo \"rotaci\xF3n autom\xE1tica\", la direcci\xF3n del objeto corresponde a su \xE1ngulo.\nEn modo \"8 direcciones\", el n\xFAmero de animaciones v\xE1lidas va de 0 a 7","the direction":"la direcci\xF3n","Current frame":"Fotograma actual","Modify the current frame of the object":"Modifica el fotograma (n\xFAmero de imagen actual en la animaci\xF3n) actual del objeto","the animation frame":"el fotograma de la animaci\xF3n","Pause the animation":"Pausar la animaci\xF3n","Pause the animation of the object":"Pausar la animaci\xF3n del objecto","Pause the animation of _PARAM0_":"Pausar la animaci\xF3n de _PARAM0_","Play the animation":"Reproducir la animaci\xF3n","Play the animation of the object":"Reproduce la animaci\xF3n del objeto","Play the animation of _PARAM0_":"Reproducir la animaci\xF3n de _PARAM0_","Modify the animation speed scale (1 = the default speed, >1 = faster and <1 = slower).":"Modifica la escala de la velocidad de animaci\xF3n (1 = velocidad por defecto, >1 = m\xE1s r\xE1pido y <1 = m\xE1s lento).","Object to be rotated":"Objeto a rotar","Angular speed (degrees per second)":"Velocidad angular ( grados por segundo )","Modify the scale of the width of an object.":"Modifica la escala horizontal (el ancho) de un objeto.","Modify the scale of the height of an object.":"Modifica la escala vertical (el alto) de un objeto.","Change the width of a Sprite object.":"Cambiar el ancho de un objeto Sprite.","Compare the width of a Sprite object.":"Compara el ancho de un objeto Sprite.","Change the height of a Sprite object.":"Cambiar la altura de un objeto Sprite.","Compare the height of a Sprite object.":"Compara la altura de un objeto Sprite.","Change the size of an object.":"Cambiar el tama\xF1o de un objeto.","Current animation":"Animaci\xF3n actual","Compare the number of the animation played by the object.":"Compare el n\xFAmero de la animaci\xF3n reproducida por el objeto.","Current animation name":"Nombre actual de la animaci\xF3n","Check the animation by played by the object.":"Revisa la animaci\xF3n reproducida por el objeto.","The animation of _PARAM0_ is _PARAM1_":"La animaci\xF3n de _PARAM0_ es _PARAM1_","Current direction":"Direcci\xF3n actual","Compare the direction of the object. If 8 direction mode is activated for the sprite, the value taken for direction will be from 0 to 7. Otherwise, the direction is in degrees.":"Eval\xFAa la direcci\xF3n del objeto. Si el modo de 8 direcciones est\xE1 activado para el sprite, el valor tomado para las direcciones ser\xE1 entre 0 y 7. De otro modo, la direcci\xF3n es en \xE1ngulos.","Compare the index of the current frame in the animation displayed by the specified object. The first frame in an animation starts at index 0.":"Compara el \xEDndice del fotograma actual en la animaci\xF3n mostrada por el objeto especificado. El primer fotograma en una animaci\xF3n comienza en el \xEDndice 0.","Animation paused":"Animaci\xF3n en pausa","Check if the animation of an object is paused.":"Eval\xFAa si la animaci\xF3n de un objeto est\xE1 pausada.","The animation of _PARAM0_ is paused":"La animaci\xF3n _PARAM0_ est\xE1 pausada","Animation finished":"Animaci\xF3n finalizada","Check if the animation being played by the Sprite object is finished.":"Verifica si la animaci\xF3n reproducida por el objeto Sprite se ha finalizado.","The animation of _PARAM0_ is finished":"La animaci\xF3n de _PARAM0_ ha finalizado","Compare the scale of the width of an object.":"Eval\xFAa la escala horizontal (en ancho) de un objeto.","Compare the scale of the height of an object.":"Eval\xFAa la escala vertical (en alto) de un objeto.","Compare the opacity of a Sprite, between 0 (fully transparent) to 255 (opaque).":"Comparar la opacidad de un objeto Sprite, entre 0 (totalmente transparente) a 255 (opaco).","Blend mode":"Modo visual","Compare the number of the blend mode currently used by an object":"Eval\xFAa el n\xFAmero del modo visual actualmente usado por el objeto","the number of the current blend mode":"el n\xFAmero del modo de mezcla actual","Change the tint of an object. The default color is white.":"Cambia el tinte de un objeto. El color predeterminado es blanco.","Change the number of the blend mode of an object.\nThe default blend mode is 0 (Normal).":"Cambia el n\xFAmero del modo de mezcla de un objeto.\nEl modo de mezcla por defecto es 0 (Normal).","Change Blend mode of _PARAM0_ to _PARAM1_":"Cambiar el n\xFAmero del modo visual de _PARAM0_ a _PARAM1_","X position of a point":"Posici\xF3n X de un punto","Name of the point":"Nombre del punto","Y position of a point":"Posici\xF3n Y de un punto","Direction of the object":"Direcci\xF3n del objeto","Animation of the object":"Animaci\xF3n del objeto","Name of the animation of the object":"Nombre de la animaci\xF3n del objeto","Animation frame of the object":"Fotograma del objeto","Scale of the width of an object":"Escala horizontal (en ancho) de un objeto","Scale of the height of an object":"Escala vertical (en alto) de un objeto","Collision (Pixel perfect)":"Colisi\xF3n ( Por p\xEDxel / Pixel perfect )","The condition is true if there is a collision between the two objects.\nThe test is pixel-perfect.":"Retorna verdad si hay una colisi\xF3n entre los dos objetos.\nLa colisi\xF3n se verifica por p\xEDxel.\n\xA1Atenci\xF3n! esta condici\xF3n es costosa para el ordenador en t\xE9rminos de rendimiento.","_PARAM0_ is in collision with _PARAM1_ (pixel perfect)":"_PARAM0_ est\xE1 en colisi\xF3n con _PARAM1_ (por p\xEDxel)","Animate even if hidden or far from the screen":"Animar a\xFAn si est\xE1 escondido o lejos de la pantalla","Keyboard":"Teclado","Allows your game to respond to keyboard input. Note that this does not work with on-screen keyboard on touch devices: use instead conditions related to touch when making a game for mobile/touchscreen devices.":"Permite que tu juego responda a la entrada del teclado. Tenga en cuenta que esto no funciona con el teclado en pantalla en dispositivos t\xE1ctiles: utilice en su lugar condiciones relacionadas con el toque al hacer un juego para dispositivos m\xF3viles/pantalla t\xE1ctil.","Key pressed":"Tecla presionada","Check if a key is pressed":"Comprueba si una tecla est\xE1 siendo presionada","_PARAM1_ key is pressed":"La tecla _PARAM1_ est\xE1 presionada","Key released":"Tecla soltada","Check if a key was just released":"Comprueba si una tecla acaba de ser soltada","_PARAM1_ key is released":"La tecla _PARAM1_ se suelta","Key pressed (text expression)":"Tecla presionada (expresi\xF3n textual)","Check if a key, retrieved from the result of the expression, is pressed":"Comprueba si una tecla, obtenida del resultado de una expresi\xF3n, est\xE1 siendo presionada","Expression generating the key to check":"Expresi\xF3n que genera la tecla a comprobar","Key released (text expression)":"Tecla soltada (expresi\xF3n textual)","Check if a key, retrieved from the result of the expression, was just released":"Comprueba si una tecla, obtenida a partir del resultado de una expresi\xF3n, acaba de ser liberada","Any key pressed":"Cualquier tecla presionada","Check if any key is pressed":"Comprueba si una tecla cualquiera est\xE1 siendo presionada","Any key is pressed":"Cualquier tecla es presionada","Any key released":"Cualquier tecla presionada","Check if any key is released":"Comprueba si una tecla es soltada","Any key is released":"Cualquier tecla es presionada","Last pressed key":"\xDAltima tecla presionada","Get the name of the latest key pressed on the keyboard":"Obtiene el nombre de la \xFAltima tecla presionada en el teclado","Text manipulation":"Manipulaci\xF3n de texto","Insert a new line":"Insertar una nueva l\xEDnea","Get character from code point":"Obtener car\xE1cter desde un punto de c\xF3digo","Code point":"Punto de c\xF3digo Unicode","Uppercase a text":"Convertir texto en may\xFAsculas","Lowercase a text":"Convertir texto en min\xFAsculas","Get a portion of a text":"Obtener una porci\xF3n de un texto","Start position of the portion (the first letter is at position 0)":"Posici\xF3n inicial de la porci\xF3n (la primer letra est\xE1 en la posici\xF3n 0)","Length of the portion":"Longitud de la porci\xF3n","Get a character from a text":"Obtener un car\xE1cter de un texto","Position of the character (the first letter is at position 0)":"Posici\xF3n del car\xE1cter (la primer letra est\xE1 en la posici\xF3n 0)","Repeat a text":"Leer un texto","Text to repeat":"Texto a evaluar","Repetition count":"Cuenta repetitiva","Length of a text":"Longitud de un texto","Search in a text":"Buscar en un texto","Search in a text (return the position of the result or -1 if not found)":"Busca en un texto (retorna la posici\xF3n del resultado o -1 si no se encuentra)","Text to search for":"Texto en el que buscar","Search the last occurence in a text":"Buscar la \xFAltima ocurrencia en un texto","Search the last occurence in a string (return the position of the result, from the beginning of the string, or -1 if not found)":"Busca la \xFAltima ocurrencia en una cadena (devuelve la posici\xF3n del resultado, desde el principio de la cadena, o -1 si no se encuentra)","Search in a text, starting from a position":"Buscar en un texto a partir de una posici\xF3n","Search in a text, starting from a position (return the position of the result or -1 if not found)":"Buscar en un texto, iniciando desde una posici\xF3n (retorna la posici\xF3n del resultado o -1 si no lo encuentra)","Position of the first character in the string to be considered in the search":"Posici\xF3n del primer car\xE1cter a ser considerado en la b\xFAsqueda ( Primer car\xE1cter : 0 )","Search the last occurence in a text, starting from a position":"Buscar la \xFAltima ocurrencia en un texto, comenzando desde una posici\xF3n","Search in a text the last occurence, starting from a position (return the position of the result, from the beginning of the string, or -1 if not found)":"Buscar en un texto la \xFAltima ocurrencia, comenzando desde una posici\xF3n (devuelve la posici\xF3n del resultado, desde el principio de la cadena, o -1 si no se encuentra)","Position of the last character in the string to be considered in the search":"Posici\xF3n del \xFAltimo car\xE1cter a ser considerado en la b\xFAsqueda ( Primer car\xE1cter : 0 )","Async functions":"Funciones asincr\xF3nicas","Functions that defer the execution of the events after it.":"Funciones que retrasan la ejecuci\xF3n de los eventos posteriores.","Async event":"Evento as\xEDncrono","Internal event for asynchronous actions":"Evento interno para acciones as\xEDncronas","Conversion":"Conversi\xF3n","Text > Number":"Texto > N\xFAmero","Convert the text to a number":"Convertir el texto en un n\xFAmero","Text to convert to a number":"Texto a convertir en n\xFAmero","Number > Text":"N\xFAmero > Texto","Convert the result of the expression to text":"Convertir el resultado de la expresi\xF3n en un texto","Expression to be converted to text":"Expresi\xF3n a ser convertida en texto","Number > Text ( without scientific notation )":"N\xFAmero > Texto ( si notaci\xF3n cient\xEDfica )","Convert the result of the expression to text, without using the scientific notation":"Convertir el resultado de la expresi\xF3n en un texto, sin utilizar la notaci\xF3n cient\xEDfica","Degrees > Radians":"Grados > Radianes","Converts the angle, expressed in degrees, into radians":"Convertir el \xE1ngulo, expresado en grados, a radianes","Radians > Degrees":"Radianes > Grados","Converts the angle, expressed in radians, into degrees":"Convertir el \xE1ngulo, expresado en radianes, en grados","Angle, in radians":"\xC1ngulo, en radianes","Convert scene variable to JSON":"Convertir variable de escena a JSON","Convert a scene variable to JSON":"Convertir una variable de escena a JSON","JSON":"JSON","Scene variable to be stringified":"Variable de escena a convertir en cadena de car\xE1cteres","Convert global variable to JSON":"Convierte una variable en JSON","Convert a global variable to JSON":"Convierte una variable en JSON","The global variable to be stringified":"La variable a convertir en cadena de car\xE1cteres","Convert object variable to JSON":"Convierte una variable en JSON","Convert an object variable to JSON":"Convierte una variable en JSON","The object with the variable":"El objeto con la variable","The object variable to be stringified":"La variable a convertir en cadena de car\xE1cteres","Convert JSON to a scene variable":"Convertir JSON en una variable de escena","Parse a JSON object and store it into a scene variable":"Analiza un objeto JSON y lo almacena en una variable de escena","Parse JSON string _PARAM0_ and store it into variable _PARAM1_":"Analizar la cadena JSON _PARAM0_ y almacenarla en la variable _PARAM1_","JSON string":"Cadena de car\xE1cteres JSON","Variable where store the JSON object":"Variable donde almacenar el objeto JSON","Convert JSON to global variable":"Convertir JSON en una variable","Parse a JSON object and store it into a global variable":"Analiza un objeto JSON y lo almacena en una variable","Parse JSON string _PARAM0_ and store it into global variable _PARAM1_":"Analizar la cadena JSON _PARAM0_ y almacenarla en la variable _PARAM1_","Global variable where store the JSON object":"Variable donde almacenar el objeto JSON","Convert JSON to object variable":"Convertir JSON en una variable","Parse a JSON object and store it into an object variable":"Analiza un objeto JSON y lo almacena en una variable","Parse JSON string _PARAM0_ and store it into variable _PARAM2_ of _PARAM1_":"Analizar cadena JSON _PARAM0_ y almacenarla en la variable _PARAM2_ de _PARAM1_","Object variable where store the JSON object":"Variable donde almacenar el objeto JSON","Existence of a group":"Existencia de un grupo","Check if an element (example : PlayerState/CurrentLevel) exists in the stored data.\nSpaces are forbidden in element names.":"Eval\xFAa si un elemento (por ejemplo: EstadoJugador/NivelActual) existe en el archivo.\nSe prohibe el uso de espacios en los nombres de los elementos.","_PARAM1_ exists in storage _PARAM0_":"_PARAM1_ existe en el almacenamiento _PARAM0_","Storage name":"Nombre de almacenamiento","Group":"Grupo","Load a storage in memory":"Cargar un almacenamiento en memoria","This action loads the specified storage in memory, so you can write and read it.\nYou can open and write without using this action, but it will be slower.\nIf you use this action, do not forget to unload the storage from memory.":"Esta acci\xF3n carga el almacenamiento especificado en memoria, as\xED que puedes escribir y leerlo.\nPuedes abrir y escribir sin usar esta acci\xF3n, pero ser\xE1 m\xE1s lento.\nSi usas esta acci\xF3n, no olvides descargar el almacenamiento de la memoria.","Load storage _PARAM0_ in memory":"Cargar el archivo almacenado _PARAM0_ en la memoria","Close a storage":"Cerrar almacenamiento","This action closes the structured data previously loaded in memory, saving all changes made.":"Esta acci\xF3n cierra los datos estructurados previamente cargados en memoria, guardando todos los cambios hechos.","Close structured data _PARAM0_":"Cerrar datos estructurados _PARAM0_","Write a value":"Escribir un valor","Write the result of the expression in the stored data, in the specified element.\nSpecify the structure leading to the element using / (example : Root/Level/Current)\nSpaces are forbidden in element names.":"Escribe el resultado de la expresi\xF3n en el archivo, en el elemento especificado.\nEspecifica la estructura que conduce al elemento usando \"/\" (por ejemplo: Base/Nivel/Actual)\nSe prohibe el uso de espacios en los nombres de los elementos.","Write _PARAM2_ in _PARAM1_ of storage _PARAM0_":"Escribir _PARAM2_ en _PARAM1_ del almacenamiento _PARAM0_","Write a text":"Escribir un texto","Write the text in the specified storage, in the specified element.\nSpecify the structure leading to the element using / (example : Root/Level/Current)\nSpaces are forbidden in element names.":"Escribe el texto en el archivo, en el elemento especificado.\nEspecifica la estructura que conduce al elemento usando \"/\" (por ejemplo: Base/Nivel/Actual)\nSe prohibe el uso de espacios en los nombres de los elementos.","Read a value":"Leer un valor","Read the value saved in the specified element and store it in a scene variable.\nSpecify the structure leading to the element using / (example : Root/Level/Current)\nSpaces are forbidden in element names.":"Lee el valor guardado en el elemento especificado y lo almacena en una variable de escena.\nEspecifica la estructura que conduce al elemento usando / (por ejemplo: Base/Nivel/Actual)\nLos espacios est\xE1n prohibidos en los nombres de los elementos.","Read _PARAM1_ from storage _PARAM0_ and store value in _PARAM3_":"Leer _PARAM1_ del almacenamiento _PARAM0_ y almacenar valor en _PARAM3_","Read a text":"Leer un texto","Read the text saved in the specified element and store it in a scene variable.\nSpecify the structure leading to the element using / (example : Root/Level/Current)\nSpaces are forbidden in element names.":"Lea el texto guardado en el elemento especificado y gu\xE1rdelo en una variable de escena. \n Especifique la estructura que conduce al elemento usando / (ejemplo: Ra\xEDz / Nivel / Actual) \n Los espacios est\xE1n prohibidos en los nombres de elementos.","Read _PARAM1_ from storage _PARAM0_ and store as text in _PARAM3_":"Leer _PARAM1_ del archivo _PARAM0_ y almacenarlo como texto en _PARAM3_","Delete an element":"Eliminar un elemento","This action deletes the specified element from the specified storage.\nSpecify the structure leading to the element using / (example : Root/Level/Current)\nSpaces are forbidden in element names.":"Esta acci\xF3n elimina el elemento especificado del archivo estructurado.\nEspecifica la estructura que conduce al elemento usando \"/\" (por ejemplo: Base/Nivel/Actual)\nSe prohibe el uso de espacios en los nombres de los elementos.","Delete _PARAM1_ from storage _PARAM0_":"Eliminar _PARAM1_ del almacenamiento _PARAM0_","Clear a storage":"Limpiar almacenamiento","Clear the specified storage, removing all data saved in it.":"Limpiar el almacenamiento especificado, eliminando todos los datos guardados en \xE9l.","Delete storage _PARAM0_":"Eliminar el almacenamiento _PARAM0_","A storage exists":"Existe un almacenamiento","Test if the specified storage exists.":"Comprueba si el almacenamiento especificado existe.","Storage _PARAM0_ exists":"El almacenamiento _PARAM0_ existe","Execute a command":"Ejecutar el comando","This action executes the specified command.":"Esta acci\xF3n ejecuta el comando especificado.","Execute _PARAM0_":"Ejecutar _PARAM0_","Network":"Red","Command":"Comando","Timers and time":"Cron\xF3metros y tiempo","Value of a scene timer":"Valor de un temporizador de escena","Test the elapsed time of a scene timer.":"Eval\xFAa el tiempo transcurrido de un temporizador de escena.","The timer _PARAM2_ is greater than _PARAM1_ seconds":"El cron\xF3metro _PARAM2_ es mayor a _PARAM1_ segundos","Time in seconds":"Tiempo en segundos","Timer's name":"Nombre del cron\xF3metro","Compare the elapsed time of a scene timer. This condition doesn't start the timer.":"Compara el tiempo transcurrido de un temporizador de escena. Esta condici\xF3n no inicia el temporizador.","The timer _PARAM1_ _PARAM2_ _PARAM3_ seconds":"El temporizador _PARAM1_ _PARAM2_ _PARAM3_ segundos","Time scale":"Escala de tiempo","Compare the time scale of the scene.":"Compara la escala de tiempo de la escena.","the time scale of the scene":"la escala de tiempo de la escena","Scene timer paused":"Temporizador de escena pausado","Test if the specified scene timer is paused.":"Eval\xFAa si el temporizador de escena especificado est\xE1 pausado.","The timer _PARAM1_ is paused":"El cron\xF3metro _PARAM1_ est\xE1 pausado","Start (or reset) a scene timer":"Iniciar (o reiniciar) un temporizador de escena","Reset the specified scene timer, if the timer doesn't exist it's created and started.":"Reiniciar el temporizador de escena especificado, si el temporizador no existe es creado e iniciado.","Start (or reset) the timer _PARAM1_":"Iniciar (o reiniciar) el temporizador _PARAM1_","Pause a scene timer":"Pausar un temporizador de escena","Pause a scene timer.":"Pausar un temporizador de escena.","Pause timer _PARAM1_":"Pausar el cron\xF3metro _PARAM1_","Unpause a scene timer":"Despausar un temporizador de escena","Unpause a scene timer.":"Despausar un temporizador de escena.","Unpause timer _PARAM1_":"Reanudar el cron\xF3metro _PARAM1_","Delete a scene timer":"Eliminar un temporizador de escena","Delete a scene timer from memory.":"Eliminar un temporizador de escena de la memoria.","Delete timer _PARAM1_ from memory":"Eliminar el cron\xF3metro _PARAM1_ de la memoria","Change time scale":"Cambiar la escala de tiempo","Change the time scale of the scene.":"Cambia la escala de tiempo de la escena.","Set the time scale of the scene to _PARAM1_":"Establecer la escala de tiempo de la escena a _PARAM1_","Wait X seconds (experimental)":"Espera X segundos (experimental)","Waits a number of seconds before running the next actions (and sub-events).":"Espera varios segundos antes de ejecutar las siguientes acciones (y subeventos).","Wait _PARAM0_ seconds":"Espera _PARAM0_ segundos","Time elapsed since the last frame":"Tiempo transcurrido desde el \xFAltimo fotograma","Time elapsed since the last frame rendered on screen":"Tiempo transcurrido desde el \xFAltimo fotograma procesado en pantalla","Scene timer value":"Valor del temporizador de escena","Time elapsed since the beginning of the scene":"Tiempo transcurrido desde el inicio de la escena","Returns the time scale of the scene.":"Devuelve la escala de tiempo de la escena.","Hour: hour - Minutes: min - Seconds: sec - Day of month: mday - Months since January: mon - Year since 1900: year - Days since Sunday: wday - Days since Jan 1st: yday - Timestamp (ms): timestamp\"":"Hora: hora - Minutos: min - Seconds: sec - D\xEDa del mes: mday - Meses desde enero: mon - A\xF1o desde 1900: a\xF1o - D\xEDas desde domingo: wday - D\xEDas desde el 1 de enero: yday - Timestamp (ms): timestamp\"","Actions and conditions to manipulate the scenes during the game.":"Acciones y condiciones para manipular las escenas durante el juego.","Current scene name":"Nombre de la escena actual","Name of the current scene":"Nombre de la escena actual","At the beginning of the scene":"Al comenzar la escena","Is true only when scene just begins.":"S\xF3lo es verdad cuando la escena acaba de comenzar.","Scene just resumed":"La escena acaba de reanudarse","The scene has just resumed after being paused.":"La escena acaba de reanudarse despu\xE9s de que ser pausada.","Change the scene":"Cambiar la escena","Stop this scene and start the specified one instead.":"Detiene esta escena y comienza la escena especificada en su lugar.","Change to scene _PARAM1_":"Ir a la escena _PARAM1_","Name of the new scene":"Nombre de la nueva escena","Stop any other paused scenes?":"\xBFDetener cualquier otra escena pausada?","Pause and start a new scene":"Pausar y comenzar una nueva escena","Pause this scene and start the specified one.\nLater, you can use the \"Stop and go back to previous scene\" action to go back to this scene.":"Detiene esta escena y comienza la especificada.\nLuego, puedes usar la acci\xF3n \"Detener y regresar a la escena anterior\" para regresar a esta escena.","Pause the scene and start _PARAM1_":"Pausar la escena y comenzar _PARAM1_","Stop and go back to previous scene":"Detener y regresar a la escena anterior","Stop this scene and go back to the previous paused one.\nTo pause a scene, use the \"Pause and start a new scene\" action.":"Detiene esta escena y regresa a la escena pausada anterior.\nPara pausar una escena, usa la acci\xF3n \"Pausar y comenzar una nueva escena\".","Stop the scene and go back to the previous paused one":"Detener la escena y regresar a la escena pausada anterior","Quit the game":"Quitar el juego.","Change background color":"Cambiar el color de fondo","Change the background color of the scene.":"Reemplaza el color de fondo de la escena.","Set background color to _PARAM1_":"Establecer el color de fondo a _PARAM1_","Disable input when focus is lost":"Desactivar las entradas cuando se pierde el foco","mouse buttons must be taken into account even\nif the window is not active.":"los botones del rat\xF3n se deben tener en cuenta incluso\nsi la ventana no est\xE1 activa.","Disable input when focus is lost: _PARAM1_":"Desactivar las entradas cuando se pierde el foco : _PARAM1_","Deactivate input when focus is lost":"Desactivar entradas cuando se pierde el foco","Mouse and touch":"Rat\xF3n y t\xE1ctil","The mouse wheel is scrolling up":"La rueda del rat\xF3n se desplaza hacia arriba","Check if the mouse wheel is scrolling up. Use MouseWheelDelta expression if you want to know the amount that was scrolled.":"Comprobar si la rueda del rat\xF3n se est\xE1 desplazando hacia arriba. Utilice la expresi\xF3n MouseWheelDelta si desea saber la cantidad que se ha desplazado.","The mouse wheel is scrolling down":"La rueda del rat\xF3n se desplaza hacia abajo","Check if the mouse wheel is scrolling down. Use MouseWheelDelta expression if you want to know the amount that was scrolled.":"Comprobar si la rueda del rat\xF3n se est\xE1 desplazando hacia abajo. Utilice la expresi\xF3n MouseWheelDelta si desea saber la cantidad que se ha desplazado.","De/activate moving the mouse cursor with touches":"Des/activar el movimiento del cursor con los toques t\xE1ctiles","When activated, any touch made on a touchscreen will also move the mouse cursor. When deactivated, mouse and touch positions will be completely independent.\nBy default, this is activated so that you can simply use the mouse conditions to also support touchscreens. If you want to have multitouch and differentiate mouse movement and touches, just deactivate it with this action.":"Si est\xE1 activado, cualquier toque en la pantalla t\xE1ctil tambi\xE9n mover\xE1 el cursor del rat\xF3n. Si est\xE1 desactivado, las posiciones del cursor y los toques ser\xE1n independientes.\nPor defecto, est\xE1 activado as\xED puedes usar las condiciones del mouse y dar soporte a pantallas t\xE1ctiles. Si quieres usar multit\xE1ctil (multitouch) y diferenciar mouse y toques t\xE1ctiles, simplemente desactiva la opci\xF3n con esta acci\xF3n.","Move mouse cursor when touching screen: _PARAM1_":"Mover el cursor cuando se toca la pantalla t\xE1ctil: _PARAM1_","Activate (yes by default when game is launched)":"Activar (s\xED por defecto cuando el juego es ejecutado)","Center cursor horizontally":"Centrar el cursor horizontalmente","Put the cursor in the middle of the screen horizontally.":"Ubica el cursor en el medio de la pantalla horizontalmente.","Center cursor vertically":"Centrar el cursor verticalmente","Put the cursor in the middle of the screen vertically.":"Ubica el cursor en el medio de la pantalla verticalmente.","Hide the cursor":"Ocultar el cursor","Hide the cursor.":"Oculta el cursor.","Show the cursor":"Revelar el cursor","Show the cursor.":"Revela el cursor ( si estaba oculto ).","Position the cursor of the mouse":"Posici\xF3n del cursor","Position the cursor at the given coordinates.":"Posiciona el cursor en las coordenadas dadas.","Position cursor at _PARAM1_;_PARAM2_":"Ubicar el cursor en _PARAM1_;_PARAM2_","Center the cursor":"Centrar el cursor","Center the cursor on the screen.":"Centra el cursor en la pantalla.","Cursor X position":"Posici\xF3n X del cursor","the X position of the cursor or of a touch":"la posici\xF3n X del cursor o de un toque","the cursor (or touch) X position":"la posici\xF3n X del cursor (o tocar)","Cursor Y position":"Posici\xF3n Y del cursor","the Y position of the cursor or of a touch":"la posici\xF3n Y del cursor o de un toque","the cursor (or touch) Y position":"el cursor (o tocar) posici\xF3n Y","Mouse cursor is inside the window":"El cursor del rat\xF3n est\xE1 dentro de la ventana","Check if the mouse cursor is inside the window.":"Comprueba si el cursor del rat\xF3n est\xE1 dentro de la ventana.","The mouse cursor is inside the window":"El cursor del rat\xF3n est\xE1 dentro de la ventana","Mouse button pressed or touch held":"Bot\xF3n del mouse presionado o toque","Check if the specified mouse button is pressed or if a touch is in contact with the screen.":"Compruebe si el bot\xF3n especificado del rat\xF3n est\xE1 presionado o si un toque est\xE1 en contacto con la pantalla.","Touch or _PARAM1_ mouse button is down":"Hay un toque o el bot\xF3n _PARAM1_ del rat\xF3n est\xE1 presionado","Button to check":"Bot\xF3n para comprobar","Mouse button released":"Bot\xF3n del rat\xF3n soltado","Check if the specified mouse button was released.":"Compruebe si el bot\xF3n especificado del rat\xF3n ha sido liberado.","_PARAM1_ mouse button was released":"El bot\xF3n _PARAM1_ del rat\xF3n se suelta","Mouse button pressed or touch held (text expression)":"Bot\xF3n del rat\xF3n o toque mantenido (expresi\xF3n de texto)","Check if a mouse button, retrieved from the result of the expression, is pressed.":"Comprueba si un bot\xF3n del rat\xF3n, recuperado del resultado de la expresi\xF3n, est\xE1 siendo presionado.","_PARAM1_ mouse button is pressed":"El bot\xF3n de rat\xF3n _PARAM1_ est\xE1 siendo presionado","Expression generating the mouse button to check":"Expresi\xF3n generando el bot\xF3n del rat\xF3n a comprobar","Possible values are Left, Right and Middle.":"Los valores posibles son Left, Right y Middle.","Mouse button released (text expression)":"Bot\xF3n del rat\xF3n liberado (expresi\xF3n textual)","Check if a mouse button, retrieved from the result of the expression, was just released.":"Comprueba si un bot\xF3n del rat\xF3n, recuperado del resultado de la expresi\xF3n, ha sido soltado.","_PARAM1_ mouse button is released":"El bot\xF3n _PARAM1_ del rat\xF3n es soltado","Touch X position":"Posici\xF3n X del toque","the X position of a specific touch":"la posici\xF3n X de un toque espec\xEDfico","the touch #_PARAM1_ X position":"la posici\xF3n X del toque #_PARAM1_","Multitouch":"Multit\xE1ctil","Touch identifier":"Identificador del toque","Touch Y position":"Posici\xF3n Y del toque","the Y position of a specific touch":"la posici\xF3n Y de un toque espec\xEDfico","the touch #_PARAM1_ Y position":"la posici\xF3n Y del toque #_PARAM1_","A new touch has started":"Un nuevo toque ha iniciado","Check if a touch has started. The touch identifier can be accessed using LastTouchId().\nAs more than one touch can be started, this condition is only true once for each touch: the next time you use it, it will be for a new touch, or it will return false if no more touches have just started.":"Comprueba si un toque t\xE1ctil ha comenzado. El identificador t\xE1ctil puede ser accedido usando LastTouchId().\nComo pueden iniciarse m\xE1s de un toque, esta condici\xF3n es cierta una vez por toque: la pr\xF3xima vez que la uses. ser\xE1 para un nuevo toque, o devolver\xE1 falso si no se han iniciado m\xE1s toques.","A touch has ended":"Un toque ha finalizado","Check if a touch has ended. The touch identifier can be accessed using LastEndedTouchId().\nAs more than one touch can be ended, this condition is only true once for each touch: the next time you use it, it will be for a new touch, or it will return false if no more touches have just ended.":"Compruebe si un toque t\xE1ctil ha terminado. El identificador t\xE1ctil puede ser accedido usando LastEndedTouchId().\nComo se pueden terminar m\xE1s de un toque, esta condici\xF3n solo es cierta una vez por toque: la pr\xF3xima vez que la uses ser\xE1 para un nuevo toque, o devolver\xE1 falso si no se acaban de terminar m\xE1s toques.","Check if a touch has just started on this frame. The touch identifiers can be accessed using StartedTouchId() and StartedTouchCount().":"Compruebe si un toque t\xE1ctil acaba de iniciarse en este fotograma. Se puede acceder a los identificadores t\xE1ctiles usando StartedTouchId() y StartedTouchCount().","Started touch count":"Conteo de toques iniciados","The number of touches that have just started on this frame. The touch identifiers can be accessed using StartedTouchId().":"El n\xFAmero de toques que acaban de comenzar en este fotograma. Los identificadores t\xE1ctiles pueden ser accedidos usando StartedTouchId().","Started touch identifier":"Identificador t\xE1ctil iniciado","The identifier of the touch that has just started on this frame. The touch number of touches can be accessed using StartedTouchCount().":"El identificador del toque que acaba de comenzar en este fotograma. Se puede acceder al n\xFAmero de toques usando StartedTouchCount().","Touch index":"\xCDndice t\xE1ctil","Check if a touch has ended.":"Comprueba si un toque ha terminado.","The touch with identifier _PARAM1_ has ended":"El toque con identificador _PARAM1_ ha terminado","Mouse wheel: Displacement":"Rueda del rat\xF3n: Desplazamiento","Mouse wheel displacement":"Desplazamiento de la rueda del rat\xF3n","Identifier of the last touch":"Identificador del \xFAltimo toque","Identifier of the last ended touch":"Identificador del \xFAltimo toque finalizado","Game window and resolution":"Ventana de juego y resoluci\xF3n","De/activate fullscreen":"Des/activar pantalla completa","This action activates or deactivates fullscreen.":"Esta acci\xF3n activa o desactiva la pantalla completa.","Activate fullscreen: _PARAM1_ (keep aspect ratio: _PARAM2_)":"Activar pantalla completa: _PARAM1_ (mantener la proporci\xF3n: _PARAM2_)","Activate fullscreen":"Activar pantalla completa","Keep aspect ratio (HTML5 games only, yes by default)":"Mantener la proporci\xF3n (s\xF3lo juegos HTML5, s\xED por defecto)","Fullscreen activated?":"Pantalla completa activada?","Check if the game is currently in fullscreen.":"Comprueba si el juego est\xE1 actualmente en pantalla completa.","The game is in fullscreen":"El juego est\xE1 en pantalla completa","Change the window's margins":"Modificar los m\xE1rgenes de la ventana","This action changes the margins, in pixels, between the game frame and the window borders.":"Esta acci\xF3n cambia los m\xE1rgenes, en p\xEDxeles, entre el marco del juego y los bordes de la ventana.","Set margins of game window to _PARAM1_;_PARAM2_;_PARAM3_;_PARAM4_":"Establecer los m\xE1rgenes de la ventana a _PARAM1_;_PARAM2_;_PARAM3_;_PARAM4_","Top":"Superior","Right":"Derecha","Bottom":"Inferior","Left":"Izquierda","Change the resolution of the game":"Cambiar la resoluci\xF3n del juego","Changes the resolution of the game, effectively changing the game area size. This won't change the size of the window in which the game is running.":"Cambia la resoluci\xF3n del juego, cambiando efectivamente el tama\xF1o del \xE1rea del juego. Esto no cambiar\xE1 el tama\xF1o de la ventana en la que se est\xE1 ejecutando el juego.","Set game resolution to _PARAM1_x_PARAM2_":"Establecer resoluci\xF3n del juego a _PARAM1_x_PARAM2_","Change the size of the game window":"Cambiar el tama\xF1o de la ventana del juego","This action changes the size of the game window. Note that this will only work on platform supporting this operation: games running in browsers or on mobile phones can not update their window size. Game resolution can still be updated.":"Esta acci\xF3n cambia el tama\xF1o de la ventana del juego. Tenga en cuenta que esto s\xF3lo funcionar\xE1 en la plataforma que soporta esta operaci\xF3n: los juegos que se ejecutan en los navegadores o en los tel\xE9fonos m\xF3viles no pueden actualizar su tama\xF1o de ventana. La resoluci\xF3n del juego todav\xEDa puede ser actualizada.","Set game window size to _PARAM1_x_PARAM2_ (also update game resolution: _PARAM3_)":"Configura el tama\xF1o de la ventana del juego a _PARAM1_x_PARAM2_ (tambi\xE9n actualiza la resoluci\xF3n del juego: _PARAM3_)","Also update the game resolution? If not, the game will be stretched or reduced to fit in the window.":"\xBFTambi\xE9n actualiza la resoluci\xF3n del juego? Si no, el juego se estirar\xE1 o reducir\xE1 para que encaje en la ventana.","Center the game window on the screen":"Centrar la ventana del juego en la pantalla","This action centers the game window on the screen. This only works on Windows, macOS and Linux (not when the game is executed in a web-browser or on iOS/Android).":"Esta acci\xF3n centra la ventana del juego en la pantalla. Esto s\xF3lo funciona en Windows, macOS y Linux (no cuando el juego se ejecuta en un navegador web o en iOS/Android).","Center the game window":"Centrar la ventana del juego","Change the game resolution resize mode":"Cambiar el modo de cambio de tama\xF1o de la resoluci\xF3n del juego","Set if the width or the height of the game resolution should be changed to fit the game window - or if the game resolution should not be updated automatically.":"Ajuste si el ancho o la altura de la resoluci\xF3n del juego deben ser cambiados para ajustarse a la ventana del juego - o si la resoluci\xF3n del juego no debe actualizarse autom\xE1ticamente.","Set game resolution resize mode to _PARAM1_":"Cambiar el tama\xF1o de la resoluci\xF3n del juego a _PARAM1_","Resize mode":"Modo de cambio de tama\xF1o","Empty to disable resizing. \"adaptWidth\" will update the game width to fit in the window or screen. \"adaptHeight\" will do the same but with the game height.":"Vacia para deshabilitar el cambio de tama\xF1o. \"Ancho de adaptaci\xF3n\" actualizar\xE1 el ancho del juego para caber en la ventana o pantalla. \"adaptHeight\" har\xE1 lo mismo pero con la altura del juego.","Automatically adapt the game resolution":"Adapta el tama\xF1o de la resoluci\xF3n del juego autom\xE1ticamente","Set if the game resolution should be automatically adapted when the game window or screen size change. This will only be the case if the game resolution resize mode is configured to adapt the width or the height of the game.":"Ajuste si la resoluci\xF3n del juego debe ser autom\xE1ticamente adaptada cuando la ventana del juego o el tama\xF1o de la pantalla cambian. Este solo ser\xE1 el caso si el modo de cambio de tama\xF1o de la resoluci\xF3n del juego est\xE1 configurado para adaptar el ancho o la altura del juego.","Automatically adapt the game resolution: _PARAM1_":"Adaptar autom\xE1ticamente la resoluci\xF3n del juego: _PARAM1_","Update resolution during the game to fit the screen or window size?":"\xBFActualizar resoluci\xF3n durante el juego para ajustar el tama\xF1o de la pantalla o ventana?","Change the window's icon":"Cambiar el \xEDcono de la ventana","This action changes the icon of the game's window.":"Esta acci\xF3n cambia el \xEDcono de la ventana del juego.","Use _PARAM1_ as the icon for the game's window.":"Utilizar _PARAM1_ como \xEDcono para la ventana del juego.","Name of the image to be used as the icon":"Nombre de la imagen a ser usada como \xEDcono","Change the window's title":"Cambiar el t\xEDtulo de la ventana","This action changes the title of the game's window.":"Esta acci\xF3n cambia el t\xEDtulo de la ventana del juego.","Change window title to _PARAM1_":"Cambiar el t\xEDtulo de la ventana a _PARAM1_","New title":"Nuevo t\xEDtulo","Width of the scene window":"Ancho de la ventana de la escena","Width of the scene window (or scene canvas for HTML5 games)":"Ancho de la ventana de la escena (o lienzo de la escena para juegos HTML5)","Height of the scene window":"Alto de la ventana de la escena","Height of the scene window (or scene canvas for HTML5 games)":"Alto de la ventana de la escena (o lienzo de la escena para juegos HTML5)","Width of the screen/page":"Alto de la pantalla/p\xE1gina","Width of the screen (or the page for HTML5 games in browser)":"Ancho de la pantalla (o de la p\xE1gina para juegos HTML5 en navegador)","Height of the screen/page":"Alto de la pantalla/p\xE1gina","Height of the screen (or the page for HTML5 games in browser)":"Alto de la pantalla (o de la p\xE1gina para juegos HTML5 en navegador)","Color depth":"Profundidad de color de la resoluci\xF3n actual","Window's title":"T\xEDtulo de la ventana","Events and control flow":"Eventos y control de flujo","Always":"Siempre","This condition always returns true (or always false, if the condition is inverted).":"Esta condici\xF3n siempre retorna verdad (o falso si se invierte).","Or":"O","Check if one of the sub conditions is true":"Comprobar si una de las sub-condiciones es verdadera","If one of these conditions is true:":"Si una de estas condiciones es verdad :","And":"Y","Check if all sub conditions are true":"Comprobar si todas las sub-condiciones son verdaderas","If all of these conditions are true:":"Si todas estas condiciones son verdad :","Not":"No","Return the contrary of the result of the sub conditions":"Retorna el valor contrario del resultado de la sub-condici\xF3n","Invert the logical result of these conditions:":"Invertir el resultado l\xF3gico de estas condiciones:","Trigger once while true":"Ejecutar una vez","Run actions only once, for each time the conditions have been met.":"Ejecuta las acciones una sola vez, por cada vez que las condiciones sean cumplidas.","Trigger once":"Ejecutar una vez","Compare two numbers":"Comparar dos n\xFAmeros","Compare the two numbers.":"Compare los dos n\xFAmeros.","_PARAM0_ _PARAM1_ _PARAM2_":"_PARAM0_ _PARAM1_ _PARAM2_","First expression":"Primera expresi\xF3n","Second expression":"Segunda expresi\xF3n","Compare two strings":"Comparar dos cadenas","Compare the two strings.":"Compare las dos cadenas.","First string expression":"Primera expresi\xF3n de cadena","Second string expression":"Expresi\xF3n de la segunda cadena","Standard event":"Evento est\xE1ndar","Standard event: Actions are run if conditions are fulfilled.":"Evento est\xE1ndar : Las acciones son efectuadas si las condiciones son cumplidas.","Link external events":"Vincular eventos externos","Link to external events.":"Vincular a eventos externos.","Comment":"Comentario","Event displaying a text in the events editor.":"Evento que muestra un texto en el editor de eventos.","While":"Siempre que","Repeat the event while the conditions are true.":"Repite el evento mientras las condiciones sean verdaderas.","Repeat":"Repetir","Repeat the event for a specified number of times.":"Repite el evento el n\xFAmero de veces indicado.","For each object":"Por cada objeto","Repeat the event for each specified object.":"El evento se repite por cada objeto especificado.","For each child variable (of a structure or array)":"Para cada variable hija (de una estructura o matriz)","Repeat the event for each child variable of a structure or array.":"Repita el evento para cada variable hijo de una estructura o matriz.","Event group":"Grupo de eventos","Group containing events.":"Grupo contenedor de eventos.","Features to send web requests, communicate with external \"APIs\" and other network related tasks.":"Caracter\xEDsticas para enviar solicitudes web, comunicarse con las APIs externas y otras tareas relacionadas con la red.","Send a request to a web page":"Enviar una solicitud a una p\xE1gina web","Send an asynchronous request to the specified web page.\n\nPlease note that for the web games, the game must be hosted on the same host as specified below, except if the server is configured to answer to all requests (cross-domain requests).":"Enviar una solicitud as\xEDncrona a la p\xE1gina web especificada.\n\nTenga en cuenta que para los juegos web, el juego debe estar alojado en el mismo host como se especifica a continuaci\xF3n, excepto si el servidor est\xE1 configurado para responder a todas las peticiones (peticiones entre dominios).","Send a _PARAM2_ request to _PARAM0_ with body: _PARAM1_, and store the result in _PARAM4_ (or in _PARAM5_ in case of error)":"Enviar una petici\xF3n _PARAM2_ a _PARAM0_ con el cuerpo: _PARAM1_, y almacenar el resultado en _PARAM4_ (o en _PARAM5_ en caso de error)","URL (API or web-page address)":"URL (API o direcci\xF3n de p\xE1gina web)","Example: \"https://example.com/user/123\". Using *https* is highly recommended.":"Ejemplo: \"https://example.com/user/123\". Usar *https* es altamente recomendable.","Request body content":"Contenido (\"body\") de la solicitud","Request method":"M\xE9todo de solicitud","If empty, \"GET\" will be used.":"Si est\xE1 vac\xEDo, se utilizar\xE1 \"GET\".","Content type":"Tipo de contenido","If empty, \"application/x-www-form-urlencoded\" will be used.":"Si est\xE1 vac\xEDo, se utilizar\xE1 \"application/x-www-form-urlencoded\".","Variable where to store the response":"Variable d\xF3nde almacenar la respuesta","The response of the server will be stored, as a string, in this variable. If the server returns *JSON*, you may want to use the action \"Convert JSON to a scene variable\" afterwards, to explore the results with a *structure variable*.":"La respuesta del servidor se almacenar\xE1, como una cadena, en esta variable. Si el servidor devuelve *JSON*, puede que desee utilizar la acci\xF3n \"Convertir JSON a una variable de escena\" despu\xE9s, para explorar los resultados con una *variable de estructura*.","Variable where to store the error message":"Variable d\xF3nde guardar el mensaje de error","Optional, only used if an error occurs. This will contain the [\"status code\"](https://en.wikipedia.org/wiki/List_of_HTTP_status_codes) if the server returns a status >= 400. If the request was not sent at all (e.g. no internet or CORS issues), the variable will be set to \"REQUEST_NOT_SENT\".":"Opcional, solo se usa si se produce un error. Esto contendr\xE1 \xE9l [\"c\xF3digo de estado\"](https://en.wikipedia.org/wiki/List_of_HTTP_status_codes)Si el servidor devuelve un estado >= 400 Si la solicitud no se envi\xF3 en absoluto (por ejemplo, sin problemas de Internet o CORS), la variable se establecer\xE1 en \"REQUEST_NOT_SENT\".","Open a URL (web page) or a file":"Abrir una URL (p\xE1gina web) o un archivo","This action launches the specified file or URL, in a browser (or in a new tab if the game is using the Web platform and is launched inside a browser).":"Esta acci\xF3n abre el archivo o URL especificado, en un navegador (o en una nueva pesta\xF1a si el juego est\xE1 usando la plataforma Web).","Open URL _PARAM0_ in a browser (or new tab)":"Abrir URL _PARAM0_ en un navegador (o pesta\xF1a nueva)","URL (or filename)":"URL (o nombre de archivo)","Download a file":"Descargar un archivo","Download a file from a web site":"Descarga un archivo desde un sitio web","Download file _PARAM1_ from _PARAM0_ under the name of _PARAM2_":"Descargar el archivo _PARAM1_ desde _PARAM0_ con el nombre de _PARAM2_","Host (for example : http://www.website.com)":"Servidor (por ejemplo: http://www.sitioweb.com)","Path to file (for example : /folder/file.txt)":"Ruta al archivo (por ejemplo: /carpeta/archivo.txt)","Save as":"Guardar como","Enable (or disable) metrics collection":"Activar (o desactivar) la colecci\xF3n de m\xE9tricas","Enable, or disable, the sending of anonymous data used to compute the number of sessions and other metrics from your game players.\nBe sure to only send metrics if in accordance with the terms of service of your game and if they player gave their consent, depending on how your game/company handles this.":"Habilita, o desactiva, el env\xEDo de datos an\xF3nimos utilizados para calcular el n\xFAmero de sesiones y otras m\xE9tricas de tus jugadores de juego.\nAseg\xFArate de enviar m\xE9tricas solo si est\xE1n de acuerdo con las condiciones de servicio de tu juego y si el jugador dio su consentimiento, dependiendo de c\xF3mo su juego/empresa maneje esto.","Enable analytics metrics: _PARAM1_":"Habilitar m\xE9tricas de analytic: _PARAM1_","Enable the metrics?":"\xBFHabilitar las m\xE9tricas?","Create objects from an external layout":"Crear objetos desde un dise\xF1o externo","Create objects from an external layout.":"Crea objetos desde el dise\xF1o externo especificado.","Create objects from the external layout named _PARAM1_":"Crear objetos desde el dise\xF1o externo _PARAM1_","X position of the origin":"Posici\xF3n X del origen","Y position of the origin":"Posici\xF3n Y del origen","Mathematical tools":"Herramientas matem\xE1ticas","Random integer":"Entero aleatorio","Maximum value":"Valor m\xE1ximo","Random integer in range":"Entero aleatorio en el rango","Minimum value":"Valor m\xEDnimo","Random float":"Float aleatorio","Random float in range":"Float aleatorio en rango","Random value in steps":"Valor aleatorio en pasos","Step":"Paso","Normalize a value between `min` and `max` to a value between 0 and 1.":"Normaliza un valor entre `min` y `max` a un valor entre 0 y 1.","Remap a value between 0 and 1.":"Restringir 'valor' entre 0 y 1.","Min":"Min","Max":"Max","Clamp (restrict a value to a given range)":"Abrazadera (restringir un valor a un rango dado)","Restrict a value to a given range":"Restringir un valor a un rango dado","Difference between two angles":"Diferencia entre dos \xE1ngulos","First angle":"Primer \xE1ngulo","Second angle":"Segundo \xE1ngulo","Angle between two positions":"Distancia entre dos posiciones","Compute the angle between two positions.":"Calcula la distancia entre dos posiciones.","First point X position":"Posici\xF3n X del primer punto","First point Y position":"Posici\xF3n Y del primer punto","Second point X position":"Posici\xF3n X del segundo punto","Second point Y position":"Posici\xF3n Y del segundo punto","Distance between two positions":"Distancia entre dos posiciones","Compute the distance between two positions.":"Calcula la distancia entre dos posiciones.","Modulo":"M\xF3dulo","x mod y":"x mod y","x (as in x mod y)":"x (en x mod y)","y (as in x mod y)":"y (en x mod y)","Minimum of two numbers":"M\xEDnimo de dos n\xFAmeros","Maximum of two numbers":"M\xE1ximo de dos n\xFAmeros","Absolute value":"Valor absoluto","Arccosine":"Arcocoseno","Hyperbolic arccosine":"Arcocoseno hiperb\xF3lico","Arcsine":"Arcoseno","Arctangent":"Arcotangente","2 argument arctangent":"Arcotangente de 2 argumentos","2 argument arctangent (atan2)":"Arcotangente de 2 argumentos (atan2)","Hyperbolic arctangent":"Arcotangente hiperb\xF3lico","Cube root":"Ra\xEDz c\xFAbica","Ceil (round up)":"Ceil (redondeo por exceso)","Round number up to an integer":"Redondea el n\xFAmero al entero superior","Ceil (round up) to a decimal point":"Techo (redondeado hacia arriba) a un punto decimal","Round number up to the Nth decimal place":"Redondea el n\xFAmero hasta el decimal N\xBA","Floor (round down)":"Floor (redondeo por defecto)","Round number down to an integer":"Redondea el n\xFAmero al entero inferior","Floor (round down) to a decimal point":"Piso (redondear hacia abajo) a un punto decimal","Round number down to the Nth decimal place":"Redondea el n\xFAmero hacia abajo al decimal N\xBA","Cosine":"Coseno","Cosine of a number":"Coseno de un n\xFAmero","Hyperbolic cosine":"Coseno hiperb\xF3lico","Cotangent":"Cotangente","Cotangent of a number":"Cotangente de un n\xFAmero","Cosecant":"Cosecante","Cosecant of a number":"Cosecante de un n\xFAmero","Round":"Redondear","Round a number":"Redondeo de un n\xFAmero","Round to a decimal point":"Redondear a un punto decimal","Round a number to the Nth decimal place":"Redondea un n\xFAmero al decimal N\xBA","Exponential":"Exponencial","Exponential of a number":"Exponencial de un n\xFAmero","Logarithm":"Logaritmo","Base-2 logarithm":"Logaritmo en base 2","Base 2 Logarithm":"Logaritmo ( Base 2 ) de un n\xFAmero","Base-10 logarithm":"Logaritmo ( Base 10 ) de un n\xFAmero","Nth root":"Ra\xEDz n-\xE9sima","Nth root of a number":"Ra\xEDz n-\xE9sima de un n\xFAmero","N":"N","Power":"Potencia","Raise a number to power n":"Eleva un n\xFAmero a la potencia n","The exponent (n in x^n)":"El exponente (n en x^n)","Secant":"Secante","Sign of a number":"Signo de un n\xFAmero","Return the sign of a number (1,-1 or 0)":"Retorna el signo de un n\xFAmero (1, -1 \xF3 0)","Sine":"Seno","Sine of a number":"Seno de un n\xFAmero","Hyperbolic sine":"Seno hiperb\xF3lico","Square root":"Ra\xEDz cuadrada","Square root of a number":"Ra\xEDz cuadrada de un n\xFAmero","Tangent":"Tangente","Tangent of a number":"Tangente de un n\xFAmero","Hyperbolic tangent":"Tangente hiperb\xF3lica","Truncation":"Truncar","Truncate a number":"Truncar un n\xFAmero","Lerp (Linear interpolation)":"Lerp (Interpolaci\xF3n lineal)","Linearly interpolate a to b by x":"Interpolaci\xF3n lineal entre a y b por el factor x","a (in a+(b-a)*x)":"a (en a+(b-a)*x)","b (in a+(b-a)*x)":"b (en a+(b-a)*x)","x (in a+(b-a)*x)":"x (en a+(b-a)*x)","X position from angle and distance":"Posici\xF3n X del \xE1ngulo y la distancia","Compute the X position when given an angle and distance relative to the origin (0;0). This is also known as getting the cartesian coordinates of a 2D vector, using its polar coordinates.":"Calcula la posici\xF3n X cuando se le da un \xE1ngulo y distancia relativos al origen (0;0). Esto tambi\xE9n es conocido como obtener las coordenadas cartesianas de un vector 2D, usando sus coordenadas polares.","Y position from angle and distance":"Posici\xF3n Y del \xE1ngulo y distancia","Compute the Y position when given an angle and distance relative to the origin (0;0). This is also known as getting the cartesian coordinates of a 2D vector, using its polar coordinates.":"Calcula cuando la posici\xF3n Y da un \xE1ngulo y distancia relativa del origen (0;0). Tambi\xE9n conocido como obtener las coordenadas cartesianas de un Vector 2D, usando sus coordenadas polares.","Common features that can be used for all objects in GDevelop.":"Caracter\xEDsticas comunes que pueden ser utilizadas para todos los objetos en GDevelop.","Movement using forces":"Movimiento usando fuerzas","Base object":"Objeto base","Compare the X position of the object.":"Eval\xFAa la posici\xF3n X de un objeto.","the X position":"la posici\xF3n X","Change the X position of an object.":"Cambia la posici\xF3n x de un objeto.","Compare the Y position of an object.":"Eval\xFAa la posici\xF3n Y de un objeto.","the Y position":"la posici\xF3n Y","Change the Y position of an object.":"Cambia la posici\xF3n Y de un objeto.","Change the position of an object.":"Cambia la posici\xF3n de un objeto.","Change the position of _PARAM0_: _PARAM1_ _PARAM2_ (x axis), _PARAM3_ _PARAM4_ (y axis)":"Cambia la posici\xF3n de _PARAM0_: _PARAM1_ _PARAM2_ (eje x), _PARAM3_ _PARAM4_ (eje y)","Center position":"Posici\xF3n central","Change the position of an object, using its center.":"Cambiar la posici\xF3n de un objeto, usando su centro.","Change the position of the center of _PARAM0_: _PARAM1_ _PARAM2_ (x axis), _PARAM3_ _PARAM4_ (y axis)":"Cambiar la posici\xF3n del centro de _PARAM0_: _PARAM1_ _PARAM2_ (eje x), _PARAM3_ _PARAM4_ (eje y)","Position/Center":"Posici\xF3n / Centro","Center X position":"Posici\xF3n del centro X","the X position of the center of rotation":"la posici\xF3n X del centro de rotaci\xF3n","the X position of the center":"la posici\xF3n X del centro","Center Y position":"Posici\xF3n del centro Y","the Y position of the center of rotation":"la posici\xF3n Y del centro de rotaci\xF3n","the Y position of the center":"la posici\xF3n Y del centro","Bounding box left position":"Posici\xF3n izquierda del recuadro delimitador","the bounding box (the area encapsulating the object) left position":"la posici\xF3n izquierda del recuadro delimitador (el \xE1rea que encapsula el objeto)","the bounding box left position":"la posici\xF3n izquierda del recuadro delimitador","Position/Bounding Box":"Posici\xF3n / Recuadro delimitador","Bounding box top position":"Posici\xF3n superior del recuadro delimitador","the bounding box (the area encapsulating the object) top position":"la posici\xF3n superior del recuadro delimitador (el \xE1rea que encapsula el objeto)","the bounding box top position":"la posici\xF3n superior del recuadro delimitador","Bounding box right position":"Posici\xF3n derecha del recuadro delimitador","the bounding box (the area encapsulating the object) right position":"la posici\xF3n derecha del recuadro delimitador (el \xE1rea que encapsula el objeto)","the bounding box right position":"la posici\xF3n derecha del recuadro delimitador","Bounding box bottom position":"Posici\xF3n inferior del recuadro delimitador","the bounding box (the area encapsulating the object) bottom position":"la posici\xF3n inferior del recuadro delimitador (el \xE1rea que encapsula el objeto)","the bounding box bottom position":"la posici\xF3n inferior del recuadro delimitador","Bounding box center X position":"Posici\xF3n X del centro del recuadro delimitador","the bounding box (the area encapsulating the object) center X position":"la posici\xF3n X del centro del recuadro delimitador (el \xE1rea que encapsula el objeto)","the bounding box center X position":"la posici\xF3n X del centro del recuadro delimitador","Bounding box center Y position":"Posici\xF3n Y del centro del recuadro delimitador","the bounding box (the area encapsulating the object) center Y position":"la posici\xF3n Y del centro del recuadro delimitador (\xE1rea que encapsula el objeto)","the bounding box center Y position":"la posici\xF3n Y del centro del cuadro delimitador","Put around a position":"Pone alrededor una posici\xF3n","Position the center of the given object around a position, using the specified angle and distance.":"Coloca el centro del objeto dado alrededor de una posici\xF3n, usando el \xE1ngulo y distancia especificados.","Put _PARAM0_ around _PARAM1_;_PARAM2_, with an angle of _PARAM4_ degrees and _PARAM3_ pixels distance.":"Colocar _PARAM0_ alrededor de _PARAM1_;_PARAM2_ a _PARAM4_ grados y a _PARAM3_ p\xEDxeles de distancia","Change the angle of rotation of an object.":"Modifica el \xE1ngulo de rotaci\xF3n de un objeto.","Rotate":"Rotar","Rotate an object, clockwise if the speed is positive, counterclockwise otherwise.":"Rota un objeto, en sentido horario si la velocidad es positiva, antihorario de otra forma.","Rotate _PARAM0_ at speed _PARAM1_ deg/second":"Rotar _PARAM0_ a _PARAM1_ grados/segundo","Angular speed (in degrees per second)":"Velocidad angular (en grados por segundos)","Rotate toward angle":"Rotar hacia un \xE1ngulo","Rotate an object towards an angle with the specified speed.":"Rota un objeto en torno a un \xE1ngulo con la velocidad especificada.","Rotate _PARAM0_ towards _PARAM1_ at speed _PARAM2_ deg/second":"Rotar _PARAM0_ hacia _PARAM1_ a _PARAM2_ grados/segundo","Angle to rotate towards (in degrees)":"\xC1ngulo hacia el cual rotar (en grados)","Enter 0 for an immediate rotation.":"Introduzca 0 para una rotaci\xF3n inmediata.","Rotate toward position":"Rotar hacia una posici\xF3n","Rotate an object towards a position, with the specified speed.":"Rota un objeto en torno a una posici\xF3n, con la velocidad especificada.","Rotate _PARAM0_ towards _PARAM1_;_PARAM2_ at speed _PARAM3_ deg/second":"Girar _PARAM0_ hacia _PARAM1_;_PARAM2_ a _PARAM3_ grados/segundo","Add a force to an object. The object will move according to all of the forces it has.":"Agrega una fuerza a un objeto. El objeto se mover\xE1 de acuerdo a todas las fuerzas que posea.","Add to _PARAM0_ _PARAM3_ force of _PARAM1_ p/s on X axis and _PARAM2_ p/s on Y axis":"A\xF1adir a _PARAM0_ _PARAM3_ una fuerza de _PARAM1_ p/s en el eje X y _PARAM2_ p/s en el eje Y","Speed on X axis (in pixels per second)":"Velocidad en el eje X (en p\xEDxeles por segundo)","Speed on Y axis (in pixels per second)":"Velocidad en el eje Y (en p\xEDxeles por segundo)","Force multiplier":"Multiplicador de fuerza","Add a force (angle)":"Agregar una fuerza (\xE1ngulo)","Add a force to an object. The object will move according to all of the forces it has. This action creates the force using the specified angle and length.":"Agrega una fuerza a un objeto. El objeto se mover\xE1 de acuerdo a todas las fuerzas que act\xFAen sobre \xE9l. Esta acci\xF3n crea una fuerza a partir del \xE1ngulo y la longitud especificados.","Add to _PARAM0_ _PARAM3_ force, angle: _PARAM1_ degrees and length: _PARAM2_ pixels":"A\xF1adir a _PARAM0_ _PARAM3_ fuerza, \xE1ngulo: _PARAM1_ grados y longitud: _PARAM2_ p\xEDxeles","Speed (in pixels per second)":"Velocidad (en pixels por segundo)","Add a force to move toward a position":"Agregar una fuerza para mover hacia una posici\xF3n","Add a force to an object to make it move toward a position.":"Agrega una fuerza a un objeto para moverlo hacia una posici\xF3n.","Move _PARAM0_ toward _PARAM1_;_PARAM2_ with _PARAM4_ force of _PARAM3_ pixels":"Mueve _PARAM0_ hacia _PARAM1_;_PARAM2_ con _PARAM4_ fuerza de _PARAM3_ pixeles","Stop the object":"Detener el objeto","Stop the object by deleting all of its forces.":"Detener el objeto eliminando todas las fuerzas que act\xFAan sobre \xE9l.","Stop _PARAM0_ (remove all forces)":"Detener _PARAM0_ (eliminar todas las fuerzas)","Delete the object":"Elimina el objeto","Delete the specified object.":"Elimina el objeto especificado.","Delete _PARAM0_":"Eliminar _PARAM0_","Z order":"Plano (Z)","Modify the Z-order of an object":"Modifica el valor del plano (orden-Z) de un objeto","the z-order":"el z-order","Move the object to a different layer.":"Mover el objeto a una capa diferente.","Put _PARAM0_ on the layer _PARAM1_":"Colocar _PARAM0_ en la capa _PARAM1_","Move it to this layer (base layer if empty)":"Mover a \xE9sta capa (capa base si est\xE1 vac\xEDa)","Value of an object variable":"Valor de una variable de objeto","Change the value of an object variable.":"Cambiar el valor de una variable de objeto.","the variable _PARAM1_":"la variable _PARAM1_","Text of an object variable":"Texto de una variable de objeto","Change the text of an object variable.":"Cambiar el texto de una variable de objeto.","the text of variable _PARAM1_":"el texto de la variable _PARAM1_","Boolean value of an object variable":"Valor booleano de una variable de objeto","Change the boolean value of an object variable.":"Cambiar el valor booleano de una variable de objeto.","Set the boolean value of variable _PARAM1_ of _PARAM0_ to _PARAM2_":"Establecer el valor booleano de la variable _PARAM1_ de _PARAM0_ a _PARAM2_","Toggle the boolean value of an object variable":"Alternar el valor booleano de una variable de objeto","Toggles the boolean value of an object variable.":"Alternar el valor booleano de una variable de objeto.","Toggle the boolean value of variable _PARAM1_ of _PARAM0_":"Cambiar el valor booleano de la variable _PARAM1_ de _PARAM0_","Check if the specified child of the variable exists.":"Comprobar si el hijo especificado de la variable existe.","Child _PARAM2_ of variable _PARAM1_ of _PARAM0_ exists":"Hijo _PARAM2_ de la variable _PARAM1_ de _PARAM0_ existe","Variables/Collections/Structures":"Variables/Colecciones/Estructuras","Remove a child from an object variable.":"Eliminar un hijo de una variable de objeto.","Remove child _PARAM2_ from variable _PARAM1_ of _PARAM0_":"Eliminar hijo _PARAM2_ de la variable _PARAM1_ de _PARAM0_","Clear variable":"Borrar variable","Remove all the children from the object variable.":"Remover todos los hijos de la variable del objeto.","Clear children from variable _PARAM1_ of _PARAM0_":"Eliminar hijo de la variable _PARAM1_ de _PARAM0_","Variables/Collections":"Variables/Colecciones","Hide the specified object.":"Oculta el objeto especificado.","Hide _PARAM0_":"Ocultar _PARAM0_","Show":"Visible","Show the specified object.":"Muestra el objeto espec\xEDfico.","Show _PARAM0_":"Show _PARAM0_","Compare the angle of the specified object.":"Comparar el \xE1ngulo del objeto especificado.","the angle (in degrees)":"el \xE1ngulo (en grados)","Z-order":"Orden-Z","Compare the Z-order of the specified object.":"Comparar el plano (orden Z) del objeto especificado.","the Z-order":"el Orden-Z","Current layer":"Capa actual","Check if the object is on the specified layer.":"Verificar si el objeto est\xE1 en la capa especificada.","_PARAM0_ is on layer _PARAM1_":"_PARAM0_ est\xE1 en la capa _PARAM1_","Check if an object is visible.":"Verificar si el objeto est\xE1 visible.","_PARAM0_ is visible (not marked as hidden)":"_PARAM0_ es visible (no marcado como oculto)","Object is stopped (no forces applied on it)":"El objeto se detiene (no se aplican fuerzas sobre \xE9l)","Check if an object is not moving":"Verificar si un objeto no se est\xE1 moviendo","_PARAM0_ is stopped":"El objeto _PARAM0_ est\xE1 detenido","Speed (from forces)":"Velocidad (de las fuerzas)","Compare the overall speed of an object":"Eval\xFAa la velocidad global de un objeto","the overall speed":"la velocidad total","Angle of movement (using forces)":"\xC1ngulo del movimiento (usando fuerzas)","Compare the angle of movement of an object according to the forces applied on it.":"Compara el \xE1ngulo de movimiento de un objeto seg\xFAn las fuerzas aplicadas sobre \xE9l.","Angle of movement of _PARAM0_ is _PARAM1_ (tolerance: _PARAM2_ degrees)":"El \xE1ngulo de movimiento de _PARAM0_ es _PARAM1_ (tolerancia: _PARAM2_ grados)","Compare the value of an object variable.":"Comparar el valor de una variable de objeto.","Compare the text of an object variable.":"Comparar el texto de una variable de objeto.","Compare the boolean value of an object variable.":"Compara el valor booleano de una variable de objeto.","The boolean value of variable _PARAM1_ of object _PARAM0_ is _PARAM2_":"El valor booleano de la variable _PARAM1_ del objeto _PARAM0_ es _PARAM2_","Append variable to an object array":"Anexar una variable a un array de objetos","Appends a variable to the end of an object array variable.":"Agrega una variable al final de una variable de array de objetos.","Append variable _PARAM2_ to array variable _PARAM1_ of _PARAM0_":"Anexar la variable _PARAM2_ a la variable array _PARAM1_ de _PARAM0_","Variables/Collections/Arrays":"Variables/Colecciones/Arreglos","Append a string to an object array":"Anexar una cadena a un array de objetos","Appends a string to the end of an object array variable.":"Agrega una cadena al final de una variable de array de objetos.","Append string _PARAM2_ to array variable _PARAM1_ of _PARAM0_":"Anexar la cadena _PARAM2_ a la variable array _PARAM1_ de _PARAM0_","Append a number to an object array":"Anexar un n\xFAmero a un array de objetos","Appends a number to the end of an object array variable.":"Agrega un n\xFAmero al final de una variable de array de objetos.","Append number _PARAM2_ to array variable _PARAM1_ of _PARAM0_":"Anexar el n\xFAmero _PARAM2_ a la variable array _PARAM1_ de _PARAM0_","Append a boolean to an object array":"Anexar un booleano a un array de objetos","Appends a boolean to the end of an object array variable.":"Agrega un booleano al final de una variable de array de objetos.","Append boolean _PARAM2_ to array variable _PARAM1_ of _PARAM0_":"A\xF1adir _PARAM2_ booleano a la variable array _PARAM1_ de _PARAM0_","Remove variable from an object array (by index)":"Remueve la variable de un array de objetos (por \xEDndice)","Removes a variable at the specified index of an object array variable.":"Elimina una variable en el \xEDndice especificado de una variable de array de objetos.","Remove variable at index _PARAM2_ from array variable _PARAM1_ of _PARAM0_":"Eliminar variable en \xEDndice _PARAM2_ de la variable de arrastre _PARAM1_ de _PARAM0_","Behavior activated":"Comportamiento activo","Check if the behavior is activated for the object.":"Compruebe si el comportamiento est\xE1 activado para el objeto.","Behavior _PARAM1_ of _PARAM0_ is activated":"El comportamiento _PARAM1_ de _PARAM0_ est\xE1 activo","De/activate a behavior":"Des/activar comportamiento","De/activate the behavior for the object.":"Des/activa el comportamiento especificado para el objeto.","Activate behavior _PARAM1_ of _PARAM0_: _PARAM2_":"Activar comportamiento _PARAM1_ de _PARAM0_: _PARAM2_","Activate?":"\xBFActivar?","Add a force to move toward an object":"Agregar una fuerza para mover hacia un objeto","Add a force to an object to make it move toward another.":"Agrega una fuerza a un objeto para moverlo hacia otro.","Move _PARAM0_ toward _PARAM1_ with _PARAM3_ force of _PARAM2_ pixels":"Mueve _PARAM0_ hacia _PARAM1_ con _PARAM3_ fuerza de _PARAM2_ pixeles","Target Object":"Objetivo","Add a force to move around an object":"Agregar una fuerza para mover alrededor de un objeto","Add a force to an object to make it rotate around another.\nNote that the movement is not precise, especially if the speed is high.\nTo position an object around a position more precisely, use the actions in category \"Position\".":"Agregar una fuerza a un objeto para hacer que rote sobre otro.\nObservar que el movimiento no es preciso, especialmente si la velocidad es alta.\nPara posicionar un objeto alrededor de una posici\xF3n m\xE1s precisamente, usar las acciones disponibles en la categor\xEDa \"Posici\xF3n\".","Rotate _PARAM0_ around _PARAM1_ at _PARAM2_ deg/sec and _PARAM3_ pixels away":"Rotar _PARAM0_ alrededor de_PARAM1_ a _PARAM2_ \xB0/segundo y _PARAM3_ p\xEDxeles de distancia","Rotate around this object":"Rotar alrededor de este objeto","Speed (in degrees per second)":"Velocidad (en grados por segundo)","Distance (in pixels)":"Distancia (en p\xEDxeles)","Put the object around another":"Pon el objeto alrededor de otro","Position an object around another, with the specified angle and distance. The center of the objects are used for positioning them.":"Coloca un objeto alrededor de otro, con el \xE1ngulo y distancia especificados. El centro de los objetos se utiliza para posicionarlos.","Put _PARAM0_ around _PARAM1_, with an angle of _PARAM3_ degrees and _PARAM2_ pixels distance.":"Colocar _PARAM0_ alrededor de _PARAM1_ a _PARAM3_\xB0 y a _PARAM2_ p\xEDxeles de distancia","\"Center\" Object":"Objeto sobre el qu\xE9 rotar","Separate objects":"Separar objetos","Move an object away from another using their collision masks.\nBe sure to call this action on a reasonable number of objects\nto avoid slowing down the game.":"Mueve un objeto lejos de otro usando sus m\xE1scaras de colisi\xF3n.\nAseg\xFArate de realizar esta acci\xF3n s\xF3lo en un n\xFAmero razonable de objetos\npara evitar ralentizar el juego.","Move _PARAM0_ away from _PARAM1_ (only _PARAM0_ will move)":"Alejar _PARAM0_ de _PARAM1_ (s\xF3lo _PARAM0_ se mover\xE1)","Objects (won't move)":"Objetos (no se mover\xE1n)","Ignore objects that are touching each other on their edges, but are not overlapping (default: no)":"Ignorar objetos cuyos bordes se tocan entre s\xED, pero no se superponen (por defecto: no)","Point inside object":"Punto dentro del objeto","Test if a point is inside the object collision masks.":"Comprobar si un punto est\xE1 dentro de las m\xE1scaras de colisi\xF3n del objeto.","_PARAM1_;_PARAM2_ is inside _PARAM0_":"_PARAM1_;_PARAM2_ est\xE1 dentro de _PARAM0_","X position of the point":"Posici\xF3n X del punto","Y position of the point":"Posici\xF3n Y del punto","The cursor/touch is on an object":"El cursor/toque est\xE1 sobre un objeto","Test if the cursor is over an object, or if the object is being touched.":"Eval\xFAa si el cursor est\xE1 sobre un objeto, o si el objeto est\xE1 siendo tocado con el t\xE1ctil.","The cursor/touch is on _PARAM0_":"El cursor/toque est\xE1 sobre _PARAM0_","Accurate test (yes by default)":"Evaluaci\xF3n precisa (s\xED por defecto)","Value of an object timer":"Valor de un temporizador de objeto","Test the elapsed time of an object timer.":"Eval\xFAa el tiempo transcurrido de un temporizador de un objeto.","The timer _PARAM1_ of _PARAM0_ is greater than _PARAM2_ seconds":"El temporizador _PARAM1_ de _PARAM0_ es mayor que _PARAM2_ segundos","Timers":"Temporizadores","Compare the elapsed time of an object timer. This condition doesn't start the timer.":"Compare el tiempo transcurrido de un temporizador de objetos. Esta condici\xF3n no inicia el temporizador.","The timer _PARAM1_ of _PARAM0_ _PARAM2_ _PARAM3_ seconds":"El temporizador _PARAM1_ de _PARAM0_ _PARAM2_ _PARAM3_ segundos","Object timer paused":"Temporizador de objeto pausado","Test if specified object timer is paused.":"Eval\xFAa si el temporizador del objeto especificado est\xE1 en pausa.","The timer _PARAM1_ of _PARAM0_ is paused":"El temporizador _PARAM1_ de _PARAM0_ est\xE1 pausado","Start (or reset) an object timer":"Iniciar (o reiniciar) un temporizador de objeto","Reset the specified object timer, if the timer doesn't exist it's created and started.":"Restablecer el temporizador de objeto especificado, si el temporizador no existe se crea y se inicia.","Start (or reset) the timer _PARAM1_ of _PARAM0_":"Empezar (o restablecer) el temporizador PARAM1_de_PARAM0_","Pause an object timer":"Pausar un temporizador de objeto","Pause an object timer.":"Pausa un temporizador de objeto.","Pause timer _PARAM1_ of _PARAM0_":"Pausar temporizador _PARAM1_ de _PARAM0_","Unpause an object timer":"Reanudar temporizador de objeto","Unpause an object timer.":"Reanudar un temporizador de objeto.","Unpause timer _PARAM1_ of _PARAM0_":"Despausar temporizador _PARAM1_ de _PARAM0_","Delete an object timer":"Eliminar un temporizador de objeto","Delete an object timer from memory.":"Eliminar un temporizador de objeto de la memoria.","Delete timer _PARAM1_ of _PARAM0_ from memory":"Eliminar temporizador _PARAM1_ de _PARAM0_ de memoria","X position of the object":"Posici\xF3n X del objeto","Y position of the object":"Posici\xF3n Y del objeto","Current angle, in degrees, of the object":"\xC1ngulo actual, en grados, del objeto","X coordinate of the sum of forces":"Coordenada X de la suma de fuerzas","Y coordinate of the sum of forces":"Coordenada Y de la suma de fuerzas","Angle of the sum of forces":"\xC1ngulo de la suma de fuerzas","Length of the sum of forces":"Longitud de la suma de fuerzas","Width of the object":"Ancho del objeto","Height of the object":"Alto del objeto","Z-order of an object":"Orden-Z de un objeto","Distance between two objects":"Distancia entre dos objetos","Square distance between two objects":"Distancia cuadrada entre dos objetos (D\xB2)","Distance between an object and a position":"Distancia entre un objeto y una posici\xF3n","Target X position":"Target X position","Target Y position":"Target Y position","Square distance between an object and a position":"Distancia cuadrada entre un objeto y una posici\xF3n","Number of children of an object variable":"N\xFAmero de hijos de una variable de un objeto","Object timer value":"Valor del temporizador del objeto","Object timers":"Temporizadores de objeto","Angle between two objects":"\xC1ngulo entre dos objetos","Compute the angle between two objects. If you need the angle to an arbitrary position, use AngleToPosition.":"Calcula el \xE1ngulo entre dos objetos. Si necesita el \xE1ngulo a una posici\xF3n arbitraria, utilice AngleToPosition.","Compute the X position when given an angle and distance relative to the starting object. This is also known as getting the cartesian coordinates of a 2D vector, using its polar coordinates.":"Calcula la posici\xF3n X cuando da un angulo y distancia relativa al objeto inicial. Tambi\xE9n conocido como obtener las coordenadas cartesianas de un Vector 2D, usando sus coordenadas polares.","Compute the Y position when given an angle and distance relative to the starting object. This is also known as getting the cartesian coordinates of a 2D vector, using its polar coordinates.":"Calcula la posici\xF3n Y cuando da un \xE1ngulo y distancia relativa al objeto inicial. Tambi\xE9n conocido como obtener las coordenadas cartesianas de un Vector 2D, usando sus coordenadas polares.","Angle between an object and a position":"\xC1ngulo entre un objeto y una posici\xF3n","Compute the angle between the object center and a \"target\" position. If you need the angle between two objects, use AngleToObject.":"Calcula el \xE1ngulo entre el centro del objeto y una posici\xF3n de \"objetivo\". Si necesita el \xE1ngulo entre dos objetos, utilice AngleToObject.","Enable an object effect":"Activar un efecto de objeto","Enable an effect on the object":"Activa un efecto en el objeto","Enable effect _PARAM1_ on _PARAM0_: _PARAM2_":"Activar efecto _PARAM1_ en _PARAM0_: _PARAM2_","Set _PARAM2_ to _PARAM3_ for effect _PARAM1_ of _PARAM0_":"Establecer _PARAM2_ a _PARAM3_ para efecto _PARAM1_ de _PARAM0_","Enable _PARAM2_ for effect _PARAM1_ of _PARAM0_: _PARAM3_":"Habilitar _PARAM2_ para el efecto _PARAM1_ de _PARAM0_: _PARAM3_","Effect is enabled":"Efecto habilitado","Check if the effect on an object is enabled.":"Comprueba si el efecto de un objeto est\xE1 habilitado.","Effect _PARAM1_ of _PARAM0_ is enabled":"El efecto _PARAM1_ de _PARAM0_ est\xE1 activado","Create an object":"Crear un objeto","Create an object at specified position":"Crea un objeto en la posici\xF3n especificada","Create object _PARAM1_ at position _PARAM2_;_PARAM3_ (layer: _PARAM4_)":"Crear objeto _PARAM1_ en la posici\xF3n _PARAM2_;_PARAM3_ (capa: _PARAM4_)","Object to create":"Objeto a crear","Create an object from its name":"Crear un objeto a partir de su nombre","Among the objects of the specified group, this action will create the object with the specified name.":"Entre los objetos del grupo especificado, la acci\xF3n crear\xE1 el objeto con el nombre especificado.","Among objects _PARAM1_, create object named _PARAM2_ at position _PARAM3_;_PARAM4_ (layer: _PARAM5_)":"Entre objetos _PARAM1_, crear objeto llamado _PARAM2_ en la posici\xF3n _PARAM3_;_PARAM4_ (capa: _PARAM5_)","Group of potential objects":"Grupo de objetos potenciales","Group containing objects that can be created by the action.":"Grupo que contiene objetos que pueden ser creados por la acci\xF3n.","Name of the object to create":"Nombre del objeto a crear","Text representing the name of the object to create. If no objects with this name are found in the group, no object will be created.":"Texto que representa el nombre del objeto a crear. Si no se encuentran objetos con este nombre en el grupo, no se crear\xE1 ning\xFAn objeto.","Pick all instances":"Elegir todas las instancias","Pick all instances of the specified object(s). When you pick all instances, the next conditions and actions of this event work on all of them.":"Escoge todas las instancias del objeto(s) especificado. Cuando elijas todas las instancias, las siguientes condiciones y acciones de este evento funcionan en todas ellas.","Pick all instances of _PARAM1_":"Elegir todas las instancias de _PARAM1_","Pick a random object":"Tomar un objeto al azar","Pick one object from all the specified objects. When an object is picked, the next conditions and actions of this event work only on that object.":"Elige un objeto de todos los especificados. Cuando se escoge un objeto, las siguientes condiciones y acciones de este evento s\xF3lo funcionan en dicho objeto.","Pick a random _PARAM1_":"Tomar un _PARAM1_ al azar","Apply movement to all objects":"Aplicar movimiento a todos los objetos","Moves all objects according to the forces they have. GDevelop calls this action at the end of the events by default.":"Mueve los objetos en funci\xF3n de las fuerzas que poseen.\nGDevelop llama esta acci\xF3n al final de los eventos por defecto.","An object is moving toward another (using forces)":"Un objeto se est\xE1 moviendo hacia otro (usando fuerzas)","Check if an object moves toward another.\nThe first object must move.":"Eval\xFAa si un objeto se est\xE1 moviendo hacia otro.\nEl primer objeto debe moverse.","_PARAM0_ is moving toward _PARAM1_":"_PARAM0_ se mueve hacia _PARAM1_","Compare the distance between two objects.\nIf condition is inverted, only objects that have a distance greater than specified to any other object will be picked.":"Compara la distancia entre dos objetos.\nSi la condici\xF3n se invierte, s\xF3lo los objetos que est\xE9n a una distancia mayor que la especificada a cualquier otro objeto ser\xE1n seleccionados.","_PARAM0_ distance to _PARAM1_ is below _PARAM2_ pixels":"La distancia de _PARAM0_ a _PARAM1_ es menor a _PARAM2_ p\xEDxeles","Pick all objects":"Tomar todos los objetos","Pick all the specified objects. When you pick all objects, the next conditions and actions of this event work on all of them.":"Elige todos los objetos especificados. Cuando elijas los objetos, las siguientes condiciones y acciones de este evento funcionan en todos ellos.","Pick all _PARAM1_ objects":"Elegir todos los objetos _PARAM1_","Pick nearest object":"Seleccionar el objeto m\xE1s cercano","Pick the object of this type that is nearest to the specified position. If the condition is inverted, the object farthest from the specified position is picked instead.":"Elige el objeto de este tipo m\xE1s cercano a la posici\xF3n especificada. Si la condici\xF3n se invierte, el objeto m\xE1s alejado de la posici\xF3n especificada se elige en su lugar.","Pick the _PARAM0_ that is nearest to _PARAM1_;_PARAM2_":"Elige el _PARAM0_ m\xE1s cercano a _PARAM1_;_PARAM2_","Number of objects":"N\xFAmero de objetos","Count how many of the specified objects are currently picked, and compare that number to a value. If previous conditions on the objects have not been used, this condition counts how many of these objects exist in the current scene.":"Contar cu\xE1ntos de los objetos especificados son seleccionados actualmente, y comparar ese n\xFAmero a un valor. Si las condiciones anteriores en los objetos no se han utilizado, esta condici\xF3n cuenta cu\xE1ntos de estos objetos existen en la escena actual.","the number of _PARAM0_ objects":"el n\xFAmero de objetos _PARAM0_","Number of object instances on the scene":"N\xFAmero de instancias de objetos en la escena","the number of instances of the specified objects living on the scene":"el n\xFAmero de instancias de los objetos especificados que viven en la escena","the number of _PARAM1_ living on the scene":"el n\xFAmero de _PARAM1_ que viven en la escena","Number of object instances currently picked":"N\xFAmero de instancias de objeto seleccionadas actualmente","the number of instances picked by the previous conditions (or actions)":"el n\xFAmero de instancias recogidas por las condiciones (o acciones) anteriores","the number of _PARAM0_ currently picked":"el n\xFAmero de _PARAM0_ seleccionado actualmente","Test the collision between two objects using their collision masks.":"Pruebe la colisi\xF3n entre dos objetos usando sus m\xE1scaras de colisi\xF3n.","_PARAM0_ is in collision with _PARAM1_":"_PARAM0_ est\xE1 en colisi\xF3n con _PARAM1_","An object is turned toward another":"Un objeto est\xE1 girado hacia otro","Check if an object is turned toward another":"Eval\xFAa si un objeto est\xE1 girado hacia otro","_PARAM0_ is rotated towards _PARAM1_":"L'objet _PARAM0_ est\xE1 girado hacia _PARAM1_","Name of the object":"Nombre del objeto","Name of the second object":"Nombre del segundo objeto","Angle of tolerance, in degrees (0: minimum tolerance)":"\xC1ngulo de tolerancia, en grados ( 0 : tolerancia m\xEDnima )","Raycast":"Emisi\xF3n de rayos","Sends a ray from the given source position and angle, intersecting the closest object.\nThe instersected object will become the only one taken into account.\nIf the condition is inverted, the object to be intersected will be the farthest one within the ray radius.":"Env\xEDa un rayo desde la posici\xF3n de origen y el \xE1ngulo, interseccionando el objeto m\xE1s cercano.\nEl objeto instruido se convertir\xE1 en el \xFAnico que se tenga en cuenta.\nSi la condici\xF3n es invertida, el objeto que se interese ser\xE1 el m\xE1s lejano dentro del radio de rayos.","Cast a ray from _PARAM1_;_PARAM2_, angle: _PARAM3_ and max distance: _PARAM4_px, against _PARAM0_, and save the result in _PARAM5_, _PARAM6_":"Emite un rayo desde _PARAM1_;_PARAM2_, \xE1ngulo: _PARAM3_ y distancia m\xE1xima: _PARAM4_px, contra _PARAM0_, y guarda el resultado en _PARAM5_, _PARAM6_","Objects to test against the ray":"Objetos a probar contra el rayo","Ray source X position":"Posici\xF3n X de fuente de rayos","Ray source Y position":"Posici\xF3n Y fuente de rayos","Ray angle (in degrees)":"\xC1ngulo de rayo (en grados)","Ray maximum distance (in pixels)":"Distancia m\xE1xima de rayos (en p\xEDxeles)","Result X position scene variable":"Variable de posici\xF3n X resultante","Scene variable where to store the X position of the intersection. If no intersection is found, the variable won't be changed.":"Variable de escena donde almacenar la posici\xF3n X de la intersecci\xF3n. Si no se encuentra ninguna intersecci\xF3n, la variable no se cambiar\xE1.","Result Y position scene variable":"Variable de posici\xF3n Y resultante","Scene variable where to store the Y position of the intersection. If no intersection is found, the variable won't be changed.":"Variable de escena donde almacenar la posici\xF3n Y de la intersecci\xF3n. Si no se encuentra ninguna intersecci\xF3n, la variable no se cambiar\xE1.","Raycast to position":"Emisi\xF3n de rayos a la posici\xF3n","Sends a ray from the given source position to the final point, intersecting the closest object.\nThe instersected object will become the only one taken into account.\nIf the condition is inverted, the object to be intersected will be the farthest one within the ray radius.":"Env\xEDa un rayo desde la posici\xF3n de origen dada al punto final, interseccionando el objeto m\xE1s cercano.\nEl objeto instruido se convertir\xE1 en el \xFAnico que se tenga en cuenta.\nSi la condici\xF3n se invierte, el objeto a ser intersectado ser\xE1 el m\xE1s lejano dentro del radio de rayos.","Cast a ray from from _PARAM1_;_PARAM2_ to _PARAM3_;_PARAM4_ against _PARAM0_, and save the result in _PARAM5_, _PARAM6_":"Emite un rayo de _PARAM1_;_PARAM2_ a _PARAM3_;_PARAM4_ contra _PARAM0_, y guarda el resultado en _PARAM5_, _PARAM6_","Ray target X position":"Posici\xF3n X de fuente de rayos","Ray target Y position":"Posici\xF3n Y fuente de rayos","Count the number of the specified objects being currently picked in the event":"Contar el n\xFAmero de objetos especificados que est\xE1n siendo seleccionados en el evento","Return the name of the object":"Devolver el nombre del objeto","Object layer":"Capa de objeto","Return the name of the layer the object is on":"Devuelve el nombre de la capa en la que est\xE1 el objeto","The expression has extra character at the end that should be removed (or completed if your expression is not finished).":"La expresi\xF3n tiene un car\xE1cter extra al final que debe ser eliminada (o completada si su expresi\xF3n no est\xE1 terminada).","You entered a text, but a number was expected.":"Ha introducido un texto, pero se esperaba un n\xFAmero.","You entered a text, but this type was expected:":"Ha introducido un texto, pero se esperaba este tipo:","You entered a number, but a text was expected (in quotes).":"Ha introducido un n\xFAmero, pero se esperaba un texto (en comillas).","You entered a number, but this type was expected:":"Ha introducido un n\xFAmero, pero se esperaba este tipo:","Missing a closing parenthesis. Add a closing parenthesis for each opening parenthesis.":"Falta un par\xE9ntesis de cierre. Agrega un par\xE9ntesis de cierre para cada par\xE9ntesis de apertura.","You must wrap your text inside double quotes (example: \"Hello world\").":"Debes envolver tu texto dentro de comillas dobles (ejemplo: \"Hola mundo\").","You must enter a number.":"Debes introducir un n\xFAmero.","You must enter a number or a text, wrapped inside double quotes (example: \"Hello world\").":"Debe introducir un n\xFAmero o un texto, envuelto dentro de comillas dobles (por ejemplo: \"Hola mundo\").","You've entered a name, but this type was expected:":"Has introducido un nombre, pero se esperaba este tipo:","Missing a closing bracket. Add a closing bracket for each opening bracket.":"Falta un corchete de cierre. Agrega un corchete de cierre para cada corchete de apertura.","This expression exists, but it can't be used on this object.":"Esta expresi\xF3n existe, pero no puede ser usada en este objeto.","An opening parenthesis (for an object expression), or double colon (::) was expected (for a behavior expression).":"Un par\xE9ntesis de apertura (para una expresi\xF3n de objeto), o doble dos puntos (:) se esperaba que (por una expresi\xF3n de comportamiento).","An opening parenthesis was expected here to call a function.":"Se esperaba que los padres de apertura llamaran una funci\xF3n.","An object name was expected but something else was written. Enter just the name of the object for this parameter.":"Se esperaba un nombre de objeto pero se escribi\xF3 algo m\xE1s. Introduzca s\xF3lo el nombre del objeto para este par\xE1metro.","This function is improperly set up. Reach out to the extension developer or a GDevelop maintainer to fix this issue":"Esta funci\xF3n est\xE1 configurada incorrectamente. Alcanza el desarrollador de extensi\xF3n o un mantenedor de GDevelop para solucionar este problema","This parameter was not expected by this expression. Remove it or verify that you've entered the proper expression name.":"Este par\xE1metro no fue esperado por esta expresi\xF3n. Quita o verifica que has introducido el nombre de expresi\xF3n adecuado.","The list of parameters is not terminated. Add a closing parenthesis to end the parameters.":"La lista de par\xE1metros no est\xE1 terminada. Agrega un par\xE9ntesis de cierre para terminar los par\xE1metros.","You've used an operator that is not supported. Operator should be either +, -, / or *.":"Has usado un operador que no es compatible. El operador debe ser +, -, / o *.","You've used an operator that is not supported. Only + can be used to concatenate texts.":"Has usado un operador que no es compatible. Solo + puede ser usado para concatenar textos.","Operators (+, -, /, *) can't be used with an object name. Remove the operator.":"Los operadores (+, -, /, *) no pueden ser usados con un nombre de objeto. Quite el operador.","Operators (+, -, /, *) can't be used in variable names. Remove the operator from the variable name.":"Los operadores (+, -, /, *) no pueden ser usados en los nombres de variables. Quite el operador del nombre de la variable.","You've used an \"unary\" operator that is not supported. Operator should be either + or -.":"Ha utilizado un operador \"unary\" que no est\xE1 soportado. El operador debe ser + o -.","You've used an operator that is not supported. Only + can be used to concatenate texts, and must be placed between two texts (or expressions).":"Has usado un operador que no es compatible. Solo + puede ser utilizado para concatenar textos, y debe ser colocado entre dos textos (o expresiones).","Operators (+, -) can't be used with an object name. Remove the operator.":"Los operadores (+, -) no pueden ser usados en un nombre de objeto. Quite el operador.","Operators (+, -) can't be used in variable names. Remove the operator from the variable name.":"Los operadores (+, -) no pueden ser usados en los nombres de las variables. Quite el operador del nombre de la variable.","You must enter a number or a valid expression call.":"Debe introducir un n\xFAmero o una llamada de expresi\xF3n v\xE1lida.","You must enter a text (between quotes) or a valid expression call.":"Debe introducir un texto (entre comillas) o una llamada de expresi\xF3n v\xE1lida.","You must enter a variable name.":"Debe introducir un nombre de variable.","You must enter a valid object name.":"Debe introducir un nombre de objeto v\xE1lido.","You must enter a valid expression.":"Debes introducir una expresi\xF3n v\xE1lida."}}; |
/*
Copyright (c) 2020, salesforce.com, inc.
All rights reserved.
SPDX-License-Identifier: BSD-3-Clause
For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/
import { LightningElement, wire } from 'lwc';
import { useQuery, useMutation } from '@lwce/apollo-client';
import { routeParams } from '@lwce/router';
import { canAddToBasket } from './product.helper.js';
import QUERY from './gqlQuery';
import { dispatchErrorEvent } from 'commerce/helpers';
import { ADD_TO_BASKET } from '../basket/gql.js';
/**
* A product detail component is an interactive component which fetches and displays details about a product.
* Such information may include the product name and description, any images, any pricing or promotions and more.
* The product detail component is interactive and will allow a user to select any variations and add the product to
* the current storefront shopping basket.
*/
export default class ProductDetail extends LightningElement {
masterPid;
product = {
images: [],
productPromotions: [],
};
selectedQty;
variables = {
productId: '',
selectedColor: '',
};
productId;
quantity;
addToBasketSucceed = false;
showToast = false;
headerQuantity;
@wire(routeParams) params(params) {
this.pid = params.pid;
}
set pid(val) {
this.variables = { ...this.variables, productId: val };
}
get pid() {
return this.variables.productId;
}
set selectedColor(val) {
this.variables = { ...this.variables, selectedColor: val };
}
get selectedColor() {
return this.variables.selectedColor;
}
@wire(useQuery, {
query: QUERY,
lazy: false,
variables: '$variables',
})
updateProduct(response) {
if (response.initialized) {
if (response.error) {
dispatchErrorEvent.call(this, response.error);
} else {
this.product = { ...this.product, ...response.data.product };
this.masterPid = response.data.product.masterId;
}
}
}
/**
* Handle the update product event
* @param e event contains the detail object from update product event
*/
updateProductDetails(e) {
this.selectedQty = e.detail.qty;
const colorVariants = [];
const sizeVariants = [];
let variationPid = this.pid;
if (e.detail.allVariationsSelected) {
this.product.variants.forEach(variant => {
if (e.detail.hasColor) {
variant.variationValues.forEach(variationValue => {
if (
variationValue.key === 'color' &&
variationValue.value === e.detail.selectedColor
) {
colorVariants.push(variant);
}
});
this.selectedColor = e.detail.selectedColor;
}
if (e.detail.hasSize) {
variant.variationValues.forEach(variationValue => {
if (
variationValue.key === 'size' &&
variationValue.value === e.detail.selectedSize
) {
sizeVariants.push(variant);
}
});
}
});
if (colorVariants.length > 0 && sizeVariants.length > 0) {
colorVariants.forEach(colorVariant => {
sizeVariants.forEach(sizeVariant => {
if (colorVariant.id === sizeVariant.id) {
variationPid = colorVariant.id || sizeVariant.id;
}
});
});
} else if (!e.detail.hasColor && e.detail.hasSize) {
variationPid = sizeVariants[0].id;
} else if (!e.detail.hasSize && e.detail.hasColor) {
variationPid = colorVariants[0].id;
this.selectedColor = e.detail.selectedColor;
} else {
variationPid = this.masterPid;
}
} else {
variationPid = this.masterPid;
this.selectedColor = e.detail.selectedColor;
}
this.pid = variationPid;
}
/**
* Checks if the product is ready to be added to basket
*/
get readyToAddToBasket() {
return canAddToBasket(this.product, this.selectedQty);
}
@wire(useMutation, { mutation: ADD_TO_BASKET }) addToBasket;
/**
* Add product to basket when user clicks `Add to Basket` button
*/
addToBasketHandler() {
if (this.readyToAddToBasket) {
this.productId = this.pid;
this.quantity = this.selectedQty;
const variables = {
productId: this.productId,
quantity: this.quantity,
};
this.addToBasket.mutate({ variables }).then(() => {
this.showToast = true;
if (this.addToBasket.error) {
this.addToBasketSucceed = false;
} else {
this.addToBasketSucceed = true;
this.headerQuantity = this.addToBasket.data.addProductToBasket.totalProductsQuantity;
this.dispatchEvent(
new CustomEvent('headerbasketcount', {
bubbles: true,
composed: true,
detail: {
quantity: this.headerQuantity,
},
}),
);
}
});
}
}
toastMessageDisplayed() {
this.showToast = false;
}
}
|
if ('serviceWorker' in navigator) {
window.addEventListener('load', () => {
navigator.serviceWorker.register('/src/serviceworker/worker.js').then(() => {}).catch(() => {});
});
}
|
import React, { useEffect, useRef, useState } from 'react';
import { useTranslation } from 'react-i18next';
import {
Alert,
KeyboardAvoidingView,
StatusBar,
StyleSheet,
TextInput,
View,
Platform,
} from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
import { Button } from '../../components/Button';
import { IconButton } from '../../components/IconButton';
import { Typography } from '../../components/Typography';
import exitWarningAlert from './exitWarningAlert';
import exportCodeApi from '../../api/export/exportCodeApi';
import { Screens } from '../../navigation';
import { Icons } from '../../assets';
import { Colors } from '../../styles';
import { FeatureFlagOption } from '../../store/types';
import { useDispatch, useSelector } from 'react-redux';
import getHealthcareAuthorities from '../../store/actions/healthcareAuthorities/getHealthcareAuthoritiesAction';
import selectedHealthcareAuthoritiesSelector from '../../store/selectors/selectedHealthcareAuthoritiesSelector';
const CODE_LENGTH = 6;
const CodeInput = ({ code, length, setCode }) => {
const [currentIndex, setCurrentIndex] = useState(0);
let characters = [];
for (let i = 0; i < length; i++) characters.push(code[i]);
const characterRefs = useRef([]);
useEffect(() => {
characterRefs.current = characterRefs.current.slice(0, length);
}, [length]);
const focus = (i) => {
characterRefs.current[i].focus();
};
// Focus on mount
useEffect(() => {
setTimeout(() => {
focus(0);
}, 0); // allow waiting for transition to end & first paint
}, []);
const onFocus = (i) => {
if (i > currentIndex) {
// prohibit skipping forward
focus(currentIndex);
} else {
// restart at clicked character
setCurrentIndex(i);
setCode(code.slice(0, i));
}
};
// Adding characters
const onChangeCharacter = (d) => {
if (d.length) {
setCode(code.slice(0, currentIndex) + d);
const nextIndex = currentIndex + 1;
if (nextIndex < length) {
setCurrentIndex(nextIndex);
focus(nextIndex);
}
}
};
// Removing characters
const onKeyPress = (e) => {
if (e.nativeEvent.key === 'Backspace') {
// go to previous
if (!code[currentIndex]) {
const newIndex = currentIndex - 1;
if (newIndex >= 0) {
setCurrentIndex(newIndex);
setCode(code.slice(0, newIndex));
focus(newIndex);
}
}
// clear current (used for last character)
else {
setCode(code.slice(0, currentIndex));
}
}
};
return (
<View style={{ flexDirection: 'row', flexShrink: 1 }}>
{characters.map((character, i) => (
<TextInput
ref={(ref) => (characterRefs.current[i] = ref)}
key={`${i}CodeCharacter`}
value={character}
style={[
styles.characterInput,
{
borderColor: character
? Colors.primaryBorder
: Colors.quaternaryViolet,
},
]}
maxLength={1}
keyboardType={'number-pad'}
returnKeyType={'done'}
onChangeText={onChangeCharacter}
onKeyPress={onKeyPress}
onFocus={() => onFocus(i)}
/>
))}
</View>
);
};
export const ExportSelectHA = ({ route, navigation }) => {
const { t } = useTranslation();
const [code, setCode] = useState('');
const [isCheckingCode, setIsCheckingCode] = useState(false);
const [codeInvalid, setCodeInvalid] = useState(false);
const featureFlags = useSelector((state) => state.featureFlags?.flags || {});
const bypassApi = !!featureFlags[FeatureFlagOption.BYPASS_EXPORT_API];
const dispatch = useDispatch();
// const { selectedAuthority } = route.params;
useEffect(() => {
dispatch(getHealthcareAuthorities());
}, [dispatch]);
const authorities = useSelector(selectedHealthcareAuthoritiesSelector);
const selectedAuthority = authorities[0];
const navigateToNextScreen = () => {
navigation.navigate(Screens.ExportLocationConsent, {
selectedAuthority,
code,
});
};
const validateCode = async () => {
if (bypassApi) {
navigateToNextScreen();
return;
}
setIsCheckingCode(true);
setCodeInvalid(false);
try {
const { valid } = await exportCodeApi(selectedAuthority, code);
if (valid) {
navigateToNextScreen();
} else {
setCodeInvalid(true);
}
setIsCheckingCode(false);
} catch (e) {
Alert.alert(t('common.something_went_wrong'), e.message);
setIsCheckingCode(false);
}
};
return (
<View style={{ flex: 1 }}>
<StatusBar
barStyle='dark-content'
backgroundColor={Colors.primaryBackgroundFaintShade}
translucent={false}
/>
<SafeAreaView style={styles.wrapper}>
<KeyboardAvoidingView behavior={'padding'} style={styles.container}>
<View style={styles.headerIcons}>
<IconButton
icon={Icons.BackArrow}
size={27}
color={Colors.primaryViolet}
onPress={() => navigation.goBack()}
/>
<IconButton
icon={Icons.Close}
size={22}
color={Colors.primaryViolet}
onPress={() => exitWarningAlert(navigation, Screens.ExportStart)}
/>
</View>
<View style={{ flex: 1, marginBottom: 20 }}>
<Typography use='headline2'>
{t('export.code_input_title')}
</Typography>
<View style={{ height: 8 }} />
<Typography use='body1'>
{t('export.code_input_body', {
name: selectedAuthority.name,
})}
</Typography>
{/* These flex grows allow for a lot of flexibility across device sizes */}
<View style={{ maxHeight: 60, flexGrow: 1 }} />
{/* there's a flex end bug on android, this is a hack to ensure some spacing */}
<View
style={{
flexGrow: 1,
marginVertical: Platform.OS === 'ios' ? 0 : 10,
}}>
<CodeInput code={code} length={CODE_LENGTH} setCode={setCode} />
{codeInvalid && (
<Typography style={styles.errorSubtitle} use='body2'>
{t('export.code_input_error')}
</Typography>
)}
</View>
<Button
invert
disabled={code.length < CODE_LENGTH}
loading={isCheckingCode}
label={t('common.next')}
onPress={validateCode}
/>
</View>
</KeyboardAvoidingView>
</SafeAreaView>
</View>
);
};
const styles = StyleSheet.create({
errorSubtitle: {
marginTop: 8,
color: Colors.errorText,
},
headerIcons: {
flexDirection: 'row',
justifyContent: 'space-between',
padding: 12,
paddingLeft: 0,
},
wrapper: {
flex: 1,
paddingBottom: 44,
backgroundColor: Colors.primaryBackgroundFaintShade,
},
container: {
paddingHorizontal: 24,
paddingBottom: 20,
flex: 1,
},
characterInput: {
fontSize: 20,
color: Colors.violetTextDark,
textAlign: 'center',
flexGrow: 1,
aspectRatio: 1,
borderWidth: 2,
borderRadius: 10,
marginRight: 6,
},
});
export default ExportSelectHA;
|
###########################################################################
#
# Copyright 2020 Google LLC
#
# 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
#
# https://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.
#
###########################################################################
#
# This code generated (see starthinker/scripts for possible source):
# - Command: "python starthinker_ui/manage.py airflow"
#
###########################################################################
'''
--------------------------------------------------------------
Before running this Airflow module...
Install StarThinker in cloud composer ( recommended ):
From Release: pip install starthinker
From Open Source: pip install git+https://github.com/google/starthinker
Or push local code to the cloud composer plugins directory ( if pushing local code changes ):
source install/deploy.sh
4) Composer Menu
l) Install All
--------------------------------------------------------------
If any recipe task has "auth" set to "user" add user credentials:
1. Ensure an RECIPE['setup']['auth']['user'] = [User Credentials JSON]
OR
1. Visit Airflow UI > Admin > Connections.
2. Add an Entry called "starthinker_user", fill in the following fields. Last step paste JSON from authentication.
- Conn Type: Google Cloud Platform
- Project: Get from https://github.com/google/starthinker/blob/master/tutorials/cloud_project.md
- Keyfile JSON: Get from: https://github.com/google/starthinker/blob/master/tutorials/deploy_commandline.md#optional-setup-user-credentials
--------------------------------------------------------------
If any recipe task has "auth" set to "service" add service credentials:
1. Ensure an RECIPE['setup']['auth']['service'] = [Service Credentials JSON]
OR
1. Visit Airflow UI > Admin > Connections.
2. Add an Entry called "starthinker_service", fill in the following fields. Last step paste JSON from authentication.
- Conn Type: Google Cloud Platform
- Project: Get from https://github.com/google/starthinker/blob/master/tutorials/cloud_project.md
- Keyfile JSON: Get from: https://github.com/google/starthinker/blob/master/tutorials/cloud_service.md
--------------------------------------------------------------
CM360 Campaign Auditor
A tool for rapidly bulk checking Campaign Manager campaigns
- All Bulkdozer Lite related tools and instructions on how to use them can be found at: <a href="https://github.com/google/bulkdozer-lite#installation">Bulkdozer Lite</a>
--------------------------------------------------------------
This StarThinker DAG can be extended with any additional tasks from the following sources:
- https://google.github.io/starthinker/
- https://github.com/google/starthinker/tree/master/dags
'''
from starthinker.airflow.factory import DAG_Factory
INPUTS = {
'recipe_name':'', # Name of document to deploy to.
}
RECIPE = {
'setup':{
'day':[
],
'hour':[
]
},
'tasks':[
{
'drive':{
'auth':'user',
'hour':[
],
'copy':{
'source':'https://docs.google.com/spreadsheets/d/1tt597dMsAaxYXaJdifwKYNVzJrIl6E9Pe8GysfVrWOs/',
'destination':{'field':{'name':'recipe_name','prefix':'CM User Editor For ','kind':'string','order':1,'description':'Name of document to deploy to.','default':''}}
}
}
}
]
}
dag_maker = DAG_Factory('cm_campaign_audit', RECIPE, INPUTS)
dag = dag_maker.generate()
if __name__ == "__main__":
dag_maker.print_commandline()
|
import actionTypes from '../actiontypes';
import states from './states';
export default function filter_details(state = states.filter_details, action) {
switch (action.type) {
case actionTypes.FILTERS_LOADING:
return {
...state,
loaders: {
...state.loaders,
filters_loading: true,
filters_loaded: false
}
};
case actionTypes.FILTERS_RECEIVED: {
return {
...state,
filters: [...action.payload],
loaders: {
...state.loaders,
filters_loading: false,
filters_loaded: true
}
};
}
case actionTypes.FILTERS_ERROR:
return {
...state,
loaders: {
...state.loaders,
filters_loading: false,
filters_loaded: false
}
};
default:
return state;
}
}
|
var Validator={isEmail:function(s){return this.test(s,'^[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+@[-!#$%&\'*+\\/0-9=?A-Z^_`a-z{|}~]+\.[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+$');},isAbsUrl:function(s){return this.test(s,'^(news|telnet|nttp|file|http|ftp|https)://[-A-Za-z0-9\\.]+\\/?.*$');},isSize:function(s){return this.test(s,'^[0-9]+(%|in|cm|mm|em|ex|pt|pc|px)?$');},isId:function(s){return this.test(s,'^[A-Za-z_]([A-Za-z0-9_])*$');},isEmpty:function(s){var nl,i;if(s.nodeName=='SELECT'&&s.selectedIndex<1)
return true;if(s.type=='checkbox'&&!s.checked)
return true;if(s.type=='radio'){for(i=0,nl=s.form.elements;i<nl.length;i++){if(nl[i].type=="radio"&&nl[i].name==s.name&&nl[i].checked)
return false;}
return true;}
return new RegExp('^\\s*$').test(s.nodeType==1?s.value:s);},isNumber:function(s,d){return!isNaN(s.nodeType==1?s.value:s)&&(!d||!this.test(s,'^-?[0-9]*\\.[0-9]*$'));},test:function(s,p){s=s.nodeType==1?s.value:s;return s==''||new RegExp(p).test(s);}};var AutoValidator={settings:{id_cls:'id',int_cls:'int',url_cls:'url',number_cls:'number',email_cls:'email',size_cls:'size',required_cls:'required',invalid_cls:'invalid',min_cls:'min',max_cls:'max'},init:function(s){var n;for(n in s)
this.settings[n]=s[n];},validate:function(f){var i,nl,s=this.settings,c=0;nl=this.tags(f,'label');for(i=0;i<nl.length;i++)
this.removeClass(nl[i],s.invalid_cls);c+=this.validateElms(f,'input');c+=this.validateElms(f,'select');c+=this.validateElms(f,'textarea');return c==3;},invalidate:function(n){this.mark(n.form,n);},reset:function(e){var t=['label','input','select','textarea'];var i,j,nl,s=this.settings;if(e==null)
return;for(i=0;i<t.length;i++){nl=this.tags(e.form?e.form:e,t[i]);for(j=0;j<nl.length;j++)
this.removeClass(nl[j],s.invalid_cls);}},validateElms:function(f,e){var nl,i,n,s=this.settings,st=true,va=Validator,v;nl=this.tags(f,e);for(i=0;i<nl.length;i++){n=nl[i];this.removeClass(n,s.invalid_cls);if(this.hasClass(n,s.required_cls)&&va.isEmpty(n))
st=this.mark(f,n);if(this.hasClass(n,s.number_cls)&&!va.isNumber(n))
st=this.mark(f,n);if(this.hasClass(n,s.int_cls)&&!va.isNumber(n,true))
st=this.mark(f,n);if(this.hasClass(n,s.url_cls)&&!va.isAbsUrl(n))
st=this.mark(f,n);if(this.hasClass(n,s.email_cls)&&!va.isEmail(n))
st=this.mark(f,n);if(this.hasClass(n,s.size_cls)&&!va.isSize(n))
st=this.mark(f,n);if(this.hasClass(n,s.id_cls)&&!va.isId(n))
st=this.mark(f,n);if(this.hasClass(n,s.min_cls,true)){v=this.getNum(n,s.min_cls);if(isNaN(v)||parseInt(n.value)<parseInt(v))
st=this.mark(f,n);}
if(this.hasClass(n,s.max_cls,true)){v=this.getNum(n,s.max_cls);if(isNaN(v)||parseInt(n.value)>parseInt(v))
st=this.mark(f,n);}}
return st;},hasClass:function(n,c,d){return new RegExp('\\b'+c+(d?'[0-9]+':'')+'\\b','g').test(n.className);},getNum:function(n,c){c=n.className.match(new RegExp('\\b'+c+'([0-9]+)\\b','g'))[0];c=c.replace(/[^0-9]/g,'');return c;},addClass:function(n,c,b){var o=this.removeClass(n,c);n.className=b?c+(o!=''?(' '+o):''):(o!=''?(o+' '):'')+c;},removeClass:function(n,c){c=n.className.replace(new RegExp("(^|\\s+)"+c+"(\\s+|$)"),' ');return n.className=c!=' '?c:'';},tags:function(f,s){return f.getElementsByTagName(s);},mark:function(f,n){var s=this.settings;this.addClass(n,s.invalid_cls);this.markLabels(f,n,s.invalid_cls);return false;},markLabels:function(f,n,ic){var nl,i;nl=this.tags(f,"label");for(i=0;i<nl.length;i++){if(nl[i].getAttribute("for")==n.id||nl[i].htmlFor==n.id)
this.addClass(nl[i],ic);}
return null;}}; |
function t(t,e,i,s){var n,o=arguments.length,r=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,s);else for(var l=t.length-1;l>=0;l--)(n=t[l])&&(r=(o<3?n(r):o>3?n(e,i,r):n(e,i))||r);return o>3&&r&&Object.defineProperty(e,i,r),r}const e=window.ShadowRoot&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,i=Symbol();class s{constructor(t,e){if(e!==i)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t}get styleSheet(){return e&&void 0===this.t&&(this.t=new CSSStyleSheet,this.t.replaceSync(this.cssText)),this.t}toString(){return this.cssText}}const n=new Map,o=t=>{let e=n.get(t);return void 0===e&&n.set(t,e=new s(t,i)),e},r=(t,...e)=>{const i=1===t.length?t[0]:e.reduce(((e,i,n)=>e+(t=>{if(t instanceof s)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[n+1]),t[0]);return o(i)},l=e?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return(t=>o("string"==typeof t?t:t+""))(e)})(t):t;var a,h,c,d;const u={toAttribute(t,e){switch(e){case Boolean:t=t?"":null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},p=(t,e)=>e!==t&&(e==e||t==t),v={attribute:!0,type:String,converter:u,reflect:!1,hasChanged:p};class f extends HTMLElement{constructor(){super(),this.Πi=new Map,this.Πo=void 0,this.Πl=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this.Πh=null,this.u()}static addInitializer(t){var e;null!==(e=this.v)&&void 0!==e||(this.v=[]),this.v.push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((e,i)=>{const s=this.Πp(i,e);void 0!==s&&(this.Πm.set(s,i),t.push(s))})),t}static createProperty(t,e=v){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const i="symbol"==typeof t?Symbol():"__"+t,s=this.getPropertyDescriptor(t,i,e);void 0!==s&&Object.defineProperty(this.prototype,t,s)}}static getPropertyDescriptor(t,e,i){return{get(){return this[e]},set(s){const n=this[t];this[e]=s,this.requestUpdate(t,n,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||v}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),this.elementProperties=new Map(t.elementProperties),this.Πm=new Map,this.hasOwnProperty("properties")){const t=this.properties,e=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const i of e)this.createProperty(i,t[i])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(l(t))}else void 0!==t&&e.push(l(t));return e}static"Πp"(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}u(){var t;this.Πg=new Promise((t=>this.enableUpdating=t)),this.L=new Map,this.Π_(),this.requestUpdate(),null===(t=this.constructor.v)||void 0===t||t.forEach((t=>t(this)))}addController(t){var e,i;(null!==(e=this.ΠU)&&void 0!==e?e:this.ΠU=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(i=t.hostConnected)||void 0===i||i.call(t))}removeController(t){var e;null===(e=this.ΠU)||void 0===e||e.splice(this.ΠU.indexOf(t)>>>0,1)}"Π_"(){this.constructor.elementProperties.forEach(((t,e)=>{this.hasOwnProperty(e)&&(this.Πi.set(e,this[e]),delete this[e])}))}createRenderRoot(){var t;const i=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return((t,i)=>{e?t.adoptedStyleSheets=i.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):i.forEach((e=>{const i=document.createElement("style");i.textContent=e.cssText,t.appendChild(i)}))})(i,this.constructor.elementStyles),i}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this.ΠU)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostConnected)||void 0===e?void 0:e.call(t)})),this.Πl&&(this.Πl(),this.Πo=this.Πl=void 0)}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this.ΠU)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)})),this.Πo=new Promise((t=>this.Πl=t))}attributeChangedCallback(t,e,i){this.K(t,i)}"Πj"(t,e,i=v){var s,n;const o=this.constructor.Πp(t,i);if(void 0!==o&&!0===i.reflect){const r=(null!==(n=null===(s=i.converter)||void 0===s?void 0:s.toAttribute)&&void 0!==n?n:u.toAttribute)(e,i.type);this.Πh=t,null==r?this.removeAttribute(o):this.setAttribute(o,r),this.Πh=null}}K(t,e){var i,s,n;const o=this.constructor,r=o.Πm.get(t);if(void 0!==r&&this.Πh!==r){const t=o.getPropertyOptions(r),l=t.converter,a=null!==(n=null!==(s=null===(i=l)||void 0===i?void 0:i.fromAttribute)&&void 0!==s?s:"function"==typeof l?l:null)&&void 0!==n?n:u.fromAttribute;this.Πh=r,this[r]=a(e,t.type),this.Πh=null}}requestUpdate(t,e,i){let s=!0;void 0!==t&&(((i=i||this.constructor.getPropertyOptions(t)).hasChanged||p)(this[t],e)?(this.L.has(t)||this.L.set(t,e),!0===i.reflect&&this.Πh!==t&&(void 0===this.Πk&&(this.Πk=new Map),this.Πk.set(t,i))):s=!1),!this.isUpdatePending&&s&&(this.Πg=this.Πq())}async"Πq"(){this.isUpdatePending=!0;try{for(await this.Πg;this.Πo;)await this.Πo}catch(t){Promise.reject(t)}const t=this.performUpdate();return null!=t&&await t,!this.isUpdatePending}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this.Πi&&(this.Πi.forEach(((t,e)=>this[e]=t)),this.Πi=void 0);let e=!1;const i=this.L;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),null===(t=this.ΠU)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)})),this.update(i)):this.Π$()}catch(t){throw e=!1,this.Π$(),t}e&&this.E(i)}willUpdate(t){}E(t){var e;null===(e=this.ΠU)||void 0===e||e.forEach((t=>{var e;return null===(e=t.hostUpdated)||void 0===e?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}"Π$"(){this.L=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this.Πg}shouldUpdate(t){return!0}update(t){void 0!==this.Πk&&(this.Πk.forEach(((t,e)=>this.Πj(e,this[e],t))),this.Πk=void 0),this.Π$()}updated(t){}firstUpdated(t){}}var g,y,m,b;f.finalized=!0,f.elementProperties=new Map,f.elementStyles=[],f.shadowRootOptions={mode:"open"},null===(h=(a=globalThis).reactiveElementPlatformSupport)||void 0===h||h.call(a,{ReactiveElement:f}),(null!==(c=(d=globalThis).reactiveElementVersions)&&void 0!==c?c:d.reactiveElementVersions=[]).push("1.0.0-rc.2");const S=globalThis.trustedTypes,w=S?S.createPolicy("lit-html",{createHTML:t=>t}):void 0,$=`lit$${(Math.random()+"").slice(9)}$`,P="?"+$,C=`<${P}>`,x=document,E=(t="")=>x.createComment(t),U=t=>null===t||"object"!=typeof t&&"function"!=typeof t,k=Array.isArray,O=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,H=/-->/g,A=/>/g,_=/>|[ \n\r](?:([^\s"'>=/]+)([ \n\r]*=[ \n\r]*(?:[^ \n\r"'`<>=]|("|')|))|$)/g,T=/'/g,R=/"/g,N=/^(?:script|style|textarea)$/i,M=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),I=Symbol.for("lit-noChange"),L=Symbol.for("lit-nothing"),j=new WeakMap,z=x.createTreeWalker(x,129,null,!1),D=(t,e)=>{const i=t.length-1,s=[];let n,o=2===e?"<svg>":"",r=O;for(let e=0;e<i;e++){const i=t[e];let l,a,h=-1,c=0;for(;c<i.length&&(r.lastIndex=c,a=r.exec(i),null!==a);)c=r.lastIndex,r===O?"!--"===a[1]?r=H:void 0!==a[1]?r=A:void 0!==a[2]?(N.test(a[2])&&(n=RegExp("</"+a[2],"g")),r=_):void 0!==a[3]&&(r=_):r===_?">"===a[0]?(r=null!=n?n:O,h=-1):void 0===a[1]?h=-2:(h=r.lastIndex-a[2].length,l=a[1],r=void 0===a[3]?_:'"'===a[3]?R:T):r===R||r===T?r=_:r===H||r===A?r=O:(r=_,n=void 0);const d=r===_&&t[e+1].startsWith("/>")?" ":"";o+=r===O?i+C:h>=0?(s.push(l),i.slice(0,h)+"$lit$"+i.slice(h)+$+d):i+$+(-2===h?(s.push(void 0),e):d)}const l=o+(t[i]||"<?>")+(2===e?"</svg>":"");return[void 0!==w?w.createHTML(l):l,s]};class B{constructor({strings:t,_$litType$:e},i){let s;this.parts=[];let n=0,o=0;const r=t.length-1,l=this.parts,[a,h]=D(t,e);if(this.el=B.createElement(a,i),z.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(s=z.nextNode())&&l.length<r;){if(1===s.nodeType){if(s.hasAttributes()){const t=[];for(const e of s.getAttributeNames())if(e.endsWith("$lit$")||e.startsWith($)){const i=h[o++];if(t.push(e),void 0!==i){const t=s.getAttribute(i.toLowerCase()+"$lit$").split($),e=/([.?@])?(.*)/.exec(i);l.push({type:1,index:n,name:e[2],strings:t,ctor:"."===e[1]?K:"?"===e[1]?Z:"@"===e[1]?Y:J})}else l.push({type:6,index:n})}for(const e of t)s.removeAttribute(e)}if(N.test(s.tagName)){const t=s.textContent.split($),e=t.length-1;if(e>0){s.textContent=S?S.emptyScript:"";for(let i=0;i<e;i++)s.append(t[i],E()),z.nextNode(),l.push({type:2,index:++n});s.append(t[e],E())}}}else if(8===s.nodeType)if(s.data===P)l.push({type:2,index:n});else{let t=-1;for(;-1!==(t=s.data.indexOf($,t+1));)l.push({type:7,index:n}),t+=$.length-1}n++}}static createElement(t,e){const i=x.createElement("template");return i.innerHTML=t,i}}function q(t,e,i=t,s){var n,o,r,l;if(e===I)return e;let a=void 0!==s?null===(n=i.Σi)||void 0===n?void 0:n[s]:i.Σo;const h=U(e)?void 0:e._$litDirective$;return(null==a?void 0:a.constructor)!==h&&(null===(o=null==a?void 0:a.O)||void 0===o||o.call(a,!1),void 0===h?a=void 0:(a=new h(t),a.T(t,i,s)),void 0!==s?(null!==(r=(l=i).Σi)&&void 0!==r?r:l.Σi=[])[s]=a:i.Σo=a),void 0!==a&&(e=q(t,a.S(t,e.values),a,s)),e}class V{constructor(t,e){this.l=[],this.N=void 0,this.D=t,this.M=e}u(t){var e;const{el:{content:i},parts:s}=this.D,n=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:x).importNode(i,!0);z.currentNode=n;let o=z.nextNode(),r=0,l=0,a=s[0];for(;void 0!==a;){if(r===a.index){let e;2===a.type?e=new W(o,o.nextSibling,this,t):1===a.type?e=new a.ctor(o,a.name,a.strings,this,t):6===a.type&&(e=new F(o,this,t)),this.l.push(e),a=s[++l]}r!==(null==a?void 0:a.index)&&(o=z.nextNode(),r++)}return n}v(t){let e=0;for(const i of this.l)void 0!==i&&(void 0!==i.strings?(i.I(t,i,e),e+=i.strings.length-2):i.I(t[e])),e++}}class W{constructor(t,e,i,s){this.type=2,this.N=void 0,this.A=t,this.B=e,this.M=i,this.options=s}setConnected(t){var e;null===(e=this.P)||void 0===e||e.call(this,t)}get parentNode(){return this.A.parentNode}get startNode(){return this.A}get endNode(){return this.B}I(t,e=this){t=q(this,t,e),U(t)?t===L||null==t||""===t?(this.H!==L&&this.R(),this.H=L):t!==this.H&&t!==I&&this.m(t):void 0!==t._$litType$?this._(t):void 0!==t.nodeType?this.$(t):(t=>{var e;return k(t)||"function"==typeof(null===(e=t)||void 0===e?void 0:e[Symbol.iterator])})(t)?this.g(t):this.m(t)}k(t,e=this.B){return this.A.parentNode.insertBefore(t,e)}$(t){this.H!==t&&(this.R(),this.H=this.k(t))}m(t){const e=this.A.nextSibling;null!==e&&3===e.nodeType&&(null===this.B?null===e.nextSibling:e===this.B.previousSibling)?e.data=t:this.$(x.createTextNode(t)),this.H=t}_(t){var e;const{values:i,_$litType$:s}=t,n="number"==typeof s?this.C(t):(void 0===s.el&&(s.el=B.createElement(s.h,this.options)),s);if((null===(e=this.H)||void 0===e?void 0:e.D)===n)this.H.v(i);else{const t=new V(n,this),e=t.u(this.options);t.v(i),this.$(e),this.H=t}}C(t){let e=j.get(t.strings);return void 0===e&&j.set(t.strings,e=new B(t)),e}g(t){k(this.H)||(this.H=[],this.R());const e=this.H;let i,s=0;for(const n of t)s===e.length?e.push(i=new W(this.k(E()),this.k(E()),this,this.options)):i=e[s],i.I(n),s++;s<e.length&&(this.R(i&&i.B.nextSibling,s),e.length=s)}R(t=this.A.nextSibling,e){var i;for(null===(i=this.P)||void 0===i||i.call(this,!1,!0,e);t&&t!==this.B;){const e=t.nextSibling;t.remove(),t=e}}}class J{constructor(t,e,i,s,n){this.type=1,this.H=L,this.N=void 0,this.V=void 0,this.element=t,this.name=e,this.M=s,this.options=n,i.length>2||""!==i[0]||""!==i[1]?(this.H=Array(i.length-1).fill(L),this.strings=i):this.H=L}get tagName(){return this.element.tagName}I(t,e=this,i,s){const n=this.strings;let o=!1;if(void 0===n)t=q(this,t,e,0),o=!U(t)||t!==this.H&&t!==I,o&&(this.H=t);else{const s=t;let r,l;for(t=n[0],r=0;r<n.length-1;r++)l=q(this,s[i+r],e,r),l===I&&(l=this.H[r]),o||(o=!U(l)||l!==this.H[r]),l===L?t=L:t!==L&&(t+=(null!=l?l:"")+n[r+1]),this.H[r]=l}o&&!s&&this.W(t)}W(t){t===L?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class K extends J{constructor(){super(...arguments),this.type=3}W(t){this.element[this.name]=t===L?void 0:t}}class Z extends J{constructor(){super(...arguments),this.type=4}W(t){t&&t!==L?this.element.setAttribute(this.name,""):this.element.removeAttribute(this.name)}}class Y extends J{constructor(){super(...arguments),this.type=5}I(t,e=this){var i;if((t=null!==(i=q(this,t,e,0))&&void 0!==i?i:L)===I)return;const s=this.H,n=t===L&&s!==L||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,o=t!==L&&(s===L||n);n&&this.element.removeEventListener(this.name,this,s),o&&this.element.addEventListener(this.name,this,t),this.H=t}handleEvent(t){var e,i;"function"==typeof this.H?this.H.call(null!==(i=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==i?i:this.element,t):this.H.handleEvent(t)}}class F{constructor(t,e,i){this.element=t,this.type=6,this.N=void 0,this.V=void 0,this.M=e,this.options=i}I(t){q(this,t)}}var G,Q,X,tt,et,it;null===(y=(g=globalThis).litHtmlPlatformSupport)||void 0===y||y.call(g,B,W),(null!==(m=(b=globalThis).litHtmlVersions)&&void 0!==m?m:b.litHtmlVersions=[]).push("2.0.0-rc.3"),(null!==(G=(it=globalThis).litElementVersions)&&void 0!==G?G:it.litElementVersions=[]).push("3.0.0-rc.2");class st extends f{constructor(){super(...arguments),this.renderOptions={host:this},this.Φt=void 0}createRenderRoot(){var t,e;const i=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=i.firstChild),i}update(t){const e=this.render();super.update(t),this.Φt=((t,e,i)=>{var s,n;const o=null!==(s=null==i?void 0:i.renderBefore)&&void 0!==s?s:e;let r=o._$litPart$;if(void 0===r){const t=null!==(n=null==i?void 0:i.renderBefore)&&void 0!==n?n:null;o._$litPart$=r=new W(e.insertBefore(E(),t),t,void 0,i)}return r.I(t),r})(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this.Φt)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this.Φt)||void 0===t||t.setConnected(!1)}render(){return I}}st.finalized=!0,st._$litElement$=!0,null===(X=(Q=globalThis).litElementHydrateSupport)||void 0===X||X.call(Q,{LitElement:st}),null===(et=(tt=globalThis).litElementPlatformSupport)||void 0===et||et.call(tt,{LitElement:st});const nt=(t,e)=>"method"===e.kind&&e.descriptor&&!("value"in e.descriptor)?{...e,finisher(i){i.createProperty(e.key,t)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:e.key,initializer(){"function"==typeof e.initializer&&(this[e.key]=e.initializer.call(this))},finisher(i){i.createProperty(e.key,t)}};function ot(t){return(e,i)=>void 0!==i?((t,e,i)=>{e.constructor.createProperty(i,t)})(t,e,i):nt(t,e)}function rt(){return document.querySelector("hc-main")?document.querySelector("hc-main").hass:document.querySelector("home-assistant")?document.querySelector("home-assistant").hass:void 0}const lt="lovelace-player-device-id";function at(){if(!localStorage[lt]){const t=()=>Math.floor(1e5*(1+Math.random())).toString(16).substring(1);window.fully&&"function"==typeof fully.getDeviceId?localStorage[lt]=fully.getDeviceId():localStorage[lt]=`${t()}${t()}-${t()}${t()}`}return localStorage[lt]}let ht=at();const ct=new URLSearchParams(window.location.search);var dt;function ut(t){return!!String(t).includes("{%")||(!!String(t).includes("{{")||void 0)}function pt(t,e={}){return customElements.whenDefined("long-press").then((()=>{document.body.querySelector("long-press").bind(t)})),customElements.whenDefined("action-handler").then((()=>{document.body.querySelector("action-handler").bind(t,e)})),t}ct.get("deviceID")&&null!==(dt=ct.get("deviceID"))&&("clear"===dt?localStorage.removeItem(lt):localStorage[lt]=dt,ht=at());var vt="1.2.3";window.cardMod_template_cache=window.cardMod_template_cache||{};const ft=window.cardMod_template_cache;async function gt(t,e,i){const s=rt().connection,n=JSON.stringify([e,i]);let o=ft[n];o?(o.callbacks.has(t)||yt(t),t(o.value),o.callbacks.add(t)):(yt(t),t(""),i=Object.assign({user:rt().user.name,browser:ht,hash:location.hash.substr(1)||""},i),ft[n]=o={template:e,variables:i,value:"",callbacks:new Set([t]),unsubscribe:s.subscribeMessage((t=>function(t,e){const i=ft[t];i&&(i.value=e.result,i.callbacks.forEach((t=>t(e.result))))}(n,t)),{type:"render_template",template:e,variables:i})})}async function yt(t){let e;for(const[i,s]of Object.entries(ft))if(s.callbacks.has(t)){s.callbacks.delete(t),0==s.callbacks.size&&(e=s.unsubscribe,delete ft[i]);break}e&&await(await e)()}const mt=["icon","active","name","secondary","state","condition","image","entity","color"],bt=/_\([^)]*\)/g;class St extends st{setConfig(t){this.config=Object.assign({},t),this.state=Object.assign({},this.config);let e=this.config.entity_ids;e||!this.config.entity||ut(this.config.entity)||(e=[this.config.entity]);for(const e of mt)this.config[e]&&ut(this.config[e])&>((t=>{const i=Object.assign({},this.state);"string"==typeof t&&(t=t.replace(bt,(t=>rt().localize(t.substring(2,t.length-1))||t))),i[e]=t,this.state=i}),this.config[e],{config:t})}async firstUpdated(){var t,e;const i=this.shadowRoot.querySelector("#staging hui-generic-entity-row");if(!i)return;await i.updateComplete,this._action=i._handleAction;const s={hasHold:void 0!==(null===(t=this.config.hold_action)||void 0===t?void 0:t.action),hasDoubleClick:void 0!==(null===(e=this.config.hold_action)||void 0===e?void 0:e.action)};pt(this.shadowRoot.querySelector("state-badge"),s),pt(this.shadowRoot.querySelector(".info"),s)}_actionHandler(t){if(this._action)return this._action(t)}render(){var t,e;const i=this.hass.states[this.state.entity],s=i&&JSON.parse(JSON.stringify(i))||{entity_id:"light.",attributes:{icon:"no:icon"}},n=void 0!==this.state.icon?this.state.icon||"no:icon":void 0,o=this.state.image,r=void 0!==this.state.name?this.state.name:(null===(t=null==i?void 0:i.attributes)||void 0===t?void 0:t.friendly_name)||(null==i?void 0:i.entity_id),l=this.state.secondary,a=void 0!==this.state.state?this.state.state:null==s?void 0:s.state,h=this.state.active;void 0!==h&&(s.attributes.brightness=255);const c=window.getComputedStyle(this),d=void 0!==this.state.color||void 0!==h?null!==(e=this.state.color)&&void 0!==e?e:void 0!==h&&h?c.getPropertyValue("--paper-item-icon-active-color"):c.getPropertyValue("--paper-item-icon-color"):void 0;return M`
<div
id="wrapper"
class="${void 0!==this.state.condition&&"true"!==String(this.state.condition).toLowerCase()?"hidden":""}"
>
<state-badge
.hass=${this.hass}
.stateObj=${s}
@action=${this._actionHandler}
style="${d?`--paper-item-icon-color: ${d}; --paper-item-icon-active-color: ${d};`:""}"
.overrideIcon=${n}
.overrideImage=${o}
class="pointer"
></state-badge>
<div class="info pointer" @action="${this._actionHandler}">
${r}
<div class="secondary">${l}</div>
</div>
<div class="state">${a}</div>
</div>
<div id="staging">
<hui-generic-entity-row .hass=${this.hass} .config=${this.config}>
</hui-generic-entity-row>
</div>
`}static get styles(){return[customElements.get("hui-generic-entity-row").styles,r`
:host {
display: inline;
}
#wrapper {
display: flex;
align-items: center;
flex-direction: row;
}
.state {
text-align: right;
}
#wrapper {
min-height: 40px;
}
#wrapper.hidden {
display: none;
}
#staging {
display: none;
}
`]}}t([ot()],St.prototype,"config",void 0),t([ot()],St.prototype,"hass",void 0),t([ot()],St.prototype,"state",void 0),t([ot()],St.prototype,"_action",void 0),customElements.get("template-entity-row")||(customElements.define("template-entity-row",St),console.info(`%cTEMPLATE-ENTITY-ROW ${vt} IS INSTALLED`,"color: green; font-weight: bold",""));
|
// This file is required by the index.html file and will
// be executed in the renderer process for that window.
// All of the Node.js APIs are available in this process.
console.log("Link established!")
const BrowserWindow = require('electron').remote.BrowserWindow
const newWindowBtn = document.getElementById('frameless-window')
const path = require('path')
newWindowBtn.addEventListener('click', function (event) {
const modalPath = path.join('file://', __dirname, '../../sections/windows/modal.html')
let win = new BrowserWindow({ frame: false })
win.on('close', function () { win = null })
win.loadURL(modalPath)
win.show()
})
|
const nodemailer = require('nodemailer');
const fs = require('fs');
const pug = require('pug');
class AuthInfo {
constructor(username, password) {
this.user = username;
this.pass = password;
}
}
class Emailer {
static sendMail(destinationEmail, subject, template, data) {
return new Promise((resolve, reject) => {
const mailOptions = {
from: 'OverDB',
to: destinationEmail,
subject: subject,
html: pug.renderFile(__dirname + '/templates/' + template, data)
};
Emailer.transporter.sendMail(mailOptions, (error, info) => {
if (error) {
reject(error);
} else {
resolve(info.messageId);
}
});
});
}
static getAuthInformation() {
const emailAuthFile = __dirname + '/email_auth.json';
if (!fs.existsSync(emailAuthFile)) {
const authInfo = new AuthInfo('[email protected]', '[password]');
fs.writeFileSync(emailAuthFile, JSON.stringify(authInfo, null, 2));
}
const authInformation = JSON.parse(fs.readFileSync(emailAuthFile, 'utf8'));
if (authInformation.pass === '[password]') {
throw new Error(`Update the password here: ${emailAuthFile}`);
}
return authInformation;
}
}
Emailer.authInfo = Emailer.getAuthInformation();
Emailer.transporter = nodemailer.createTransport({
host: "smtp-mail.outlook.com",
secure: false,
port: 587,
auth: Emailer.authInfo
});
module.exports = Emailer; |
#!/usr/bin/python
"""
fastascan() - Coursera Python for Genomic Science Final Project
Ian Waring, Software Enabled Services Ltd, Monday 28th Sep 2015
Usage: fastascan('Filename')
where Filename is the FASTA format file to be analysed
"""
import sys
import operator
# First some support functions
def has_stop_codon(dna,frame=0) :
"""
This function checks if a given DNA sequence contains in frame stop codons
dna is the dna sequence to be analysed
frame is the offset (0,1 or 2) from start of the sequence to scan triplets
"""
stop_codons-['tga','tag','taa']
stop_codon_found = False
for i in range(frame, len(dna),3):
codon=dna[i:i+3].lower()
if codon in stop_codons :
stop_codon_found=True
break
return stop_codon_found
def orfs(dna,frame=0) :
"""
This function outputs a list of all ORFs found in string 'dna', using
triplet boundaries defined by frame position 'frame'
dna is the dna sequence to be analysed
frame is the offset (0,1 or 2) from start of the sequence to scan triplets
"""
orfs=[]
orf=''
start_codons=['atg']
stop_codons=['tga','tag','taa']
start_codon_active = False
for i in range(frame, len(dna),3):
codon=dna[i:i+3].lower()
if start_codon_active == False and codon in start_codons :
start_codon_active = True
if start_codon_active and codon in stop_codons :
orfs.append(orf+codon)
orf=''
start_codon_active = False
else:
if start_codon_active:
orf=orf+codon
return orfs
def complememt(dna) :
"""
This function returns the reverse complement of a DNA sequence string
dna is the dna sequence to be translated. Assumes already in lower case
"""
basecomplement={'a':'t','c':'g','g':'c','t':'a','n':'n'}
letters = list(dna[::-1]) #blow the string backwards into a letters list
letters = [basecomplement[base] for base in letters] #convert all
return ''.join(letters) #turn letters back to string
filename = 'dna3.fasta'
try:
f=open(filename,'r')
except IOError:
print ("File %s does not exist!!!" % filename)
seqs={} #seqs will contain our dictionary of sequences read in
num_headers=0
for line in f:
line=line.rstrip() #remove carriage control characters
# Test for Header
if line[0] == ">":
words=line.split()
name=words[0][1:]
seqs[name]=''
num_headers+=1
else:
# Sequence, not a header
seqs[name]=seqs[name]+line.lower()
f.close()
# Question 1:
print("\nQ1: Number of records in file is %d \n" % num_headers)
# Question 2:
print "\nQuestion 2: Lengths of sequences in file, longest, shortest + ids\n"
i2 = 0
for k in sorted(seqs, key=lambda k: len(seqs[k]), reverse=False):
i2 += 1
print i2, k, len(seqs[k])
# Question 3: Length of the Largest ORF in the file, and which Identifier its in
# Question 3: For each identifier, longest length ORF in place
# Question 3: For each identifier, position of the largest ORF inside it
print "\nQuestion 3: Longest ORFs per id per frame with ids\n"
i2 = 0
for k in seqs:
i2+=1
for f in range(0,3):
allorfs=orfs(seqs[k],f)
if len(allorfs)>0:
longestorf=max(allorfs, key=len)
longestorflen=len(longestorf)
longestorfpos=seqs[k].find(longestorf)+1
print i2, f+1, k, longestorflen, longestorfpos
# Question 4: find all repeats of supplied length in FASTA file sequences
print "\nQuestion 4: all repeats in Fasta file of specified length\n"
length = int(raw_input("Length of Repeats to find: "))
repeats={}
for k in seqs:
seq=seqs[k]
for i in range(0,len(seq)-1):
item=seq[i:i+length]
if len(item)<>length: #Ignore any sub-size superfluos content at end
pass
else:
if item in repeats:
repeats[item]+=1
else:
repeats[item]=1
mostrepeatedkey=max(repeats.iteritems(), key=operator.itemgetter(1))[0]
print "Most Repeated Sequence is:",mostrepeatedkey, "at ",repeats[mostrepeatedkey],"times\n"
for k in repeats:
if repeats[k] == 8:
print k,repeats[k]
print "End of Project :-)\n"
|
"""
WSGI config for DjangoNationalGeographic project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.2/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'DjangoNationalGeographic.settings')
application = get_wsgi_application()
|
""" Black Code Collective Meetup Api """
import os
import requests
import logging as log
class MEETUP(object):
def __init__(self):
self.base_url = 'https://api.meetup.com'
self.key = "key={}".format(os.environ.get('MEETUP_API'))
self.group_urlname = 'Black-Code-Collective'
self.events = []
def get_events(self):
url = "{}/{}/events?{}".format(self.base_url, self.group_urlname, self.key)
self.events = requests.get(url).json()
log.info('updated meetup events')
|
# Copyright 2017 AT&T Intellectual Property. All other 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.
from datetime import datetime
import json
import logging
import os
from unittest import mock
from unittest.mock import patch
import falcon
from falcon import testing
from oslo_config import cfg
import pytest
import responses
import yaml
from shipyard_airflow.common.notes.notes import NotesManager
from shipyard_airflow.common.notes.notes_helper import NotesHelper
from shipyard_airflow.common.notes.storage_impl_mem import (
MemoryNotesStorage
)
from shipyard_airflow.control.action import actions_api
from shipyard_airflow.control.action.actions_api import ActionsResource
from shipyard_airflow.control.base import ShipyardRequestContext
from shipyard_airflow.control.helpers.configdocs_helper import (
ConfigdocsHelper
)
from shipyard_airflow.errors import ApiError
from shipyard_airflow.policy import ShipyardPolicy
DATE_ONE = datetime(2017, 9, 13, 11, 13, 3, 57000)
DATE_TWO = datetime(2017, 9, 13, 11, 13, 5, 57000)
DATE_ONE_STR = DATE_ONE.strftime('%Y-%m-%dT%H:%M:%S')
DATE_TWO_STR = DATE_TWO.strftime('%Y-%m-%dT%H:%M:%S')
DESIGN_VERSION = 1
CONF = cfg.CONF
LOG = logging.getLogger(__name__)
def _get_actions_list():
dir_path = os.path.dirname(os.path.realpath(__file__))
a_path = dir_path.split('src/bin')[0] + "src/bin/supported_actions.yaml"
with open(a_path, 'r') as stream:
try:
action_list = yaml.safe_load(stream)['actions']
if not action_list:
raise FileNotFoundError("Action list is empty")
except Exception as e:
print(e)
print("This test requires that the file at '{}' is a valid yaml "
"file containing a list of action names at a key of "
"'actions'".format(a_path))
assert False
return action_list
def get_token():
"""Stub method to use for NotesHelper/NotesManager"""
return "token"
# Notes helper that can be mocked into various objects to prevent database
# dependencies
nh = NotesHelper(NotesManager(MemoryNotesStorage(), get_token))
def create_req(ctx, body):
'''creates a falcon request'''
env = testing.create_environ(
path='/',
query_string='',
protocol='HTTP/1.1',
scheme='http',
host='falconframework.org',
port=None,
headers={'Content-Type': 'application/json'},
app='',
body=body,
method='POST',
wsgierrors=None,
file_wrapper=None)
req = falcon.Request(env)
req.context = ctx
return req
def create_resp():
'''creates a falcon response'''
resp = falcon.Response()
return resp
def actions_db():
"""
replaces the actual db call
"""
return [
{
'id': 'aaaaaa',
'name': 'dag_it',
'parameters': None,
'dag_id': 'did1',
'dag_execution_date': DATE_ONE_STR,
'user': 'robot1',
'timestamp': DATE_ONE,
'context_marker': '8-4-4-4-12a'
},
{
'id': 'bbbbbb',
'name': 'dag2',
'parameters': {
'p1': 'p1val'
},
'dag_id': 'did2',
'dag_execution_date': DATE_ONE_STR,
'user': 'robot2',
'timestamp': DATE_ONE,
'context_marker': '8-4-4-4-12b'
},
]
def dag_runs_db():
"""
replaces the actual db call
"""
return [
{
'dag_id': 'did2',
'execution_date': DATE_ONE,
'state': 'SUCCESS',
'run_id': '12345',
'external_trigger': 'something',
'start_date': DATE_ONE,
'end_date': DATE_TWO
},
{
'dag_id': 'did1',
'execution_date': DATE_ONE,
'state': 'FAILED',
'run_id': '99',
'external_trigger': 'something',
'start_date': DATE_ONE,
'end_date': DATE_ONE
},
]
def tasks_db():
"""
replaces the actual db call
"""
return [
{
'task_id': '1a',
'dag_id': 'did2',
'execution_date': DATE_ONE,
'state': 'SUCCESS',
'run_id': '12345',
'external_trigger': 'something',
'start_date': DATE_ONE,
'end_date': DATE_TWO,
'duration': '20mins',
'try_number': '1',
'operator': 'smooth',
'queued_dttm': DATE_TWO
},
{
'task_id': '1b',
'dag_id': 'did2',
'execution_date': DATE_ONE,
'state': 'SUCCESS',
'run_id': '12345',
'external_trigger': 'something',
'start_date': DATE_ONE,
'end_date': DATE_TWO,
'duration': '1minute',
'try_number': '1',
'operator': 'smooth',
'queued_dttm': DATE_TWO
},
{
'task_id': '1c',
'dag_id': 'did2',
'execution_date': DATE_ONE,
'state': 'SUCCESS',
'run_id': '12345',
'external_trigger': 'something',
'start_date': DATE_ONE,
'end_date': DATE_TWO,
'duration': '1day',
'try_number': '3',
'operator': 'smooth',
'queued_dttm': DATE_TWO
},
{
'task_id': '2a',
'dag_id': 'did1',
'execution_date': DATE_ONE,
'state': 'FAILED',
'start_date': DATE_ONE,
'end_date': DATE_ONE,
'duration': '1second',
'try_number': '2',
'operator': 'smooth',
'queued_dttm': DATE_TWO
},
]
def airflow_stub(**kwargs):
"""
asserts that the airflow invocation method was called with the right
parameters
"""
assert kwargs['dag_id']
assert kwargs['action']
return '2017-09-06 14:10:08.528402'
def insert_action_stub(**kwargs):
"""
asserts that the insert action was called with the right parameters
"""
assert kwargs['action']
def audit_control_command_db(action_audit):
"""
Stub for inserting the invoke record
"""
assert action_audit['command'] == 'invoke'
@pytest.fixture(scope='function')
def conf_fixture(request):
def set_override(name, override, group):
CONF = cfg.CONF
CONF.set_override(name, override, group=group)
request.addfinalizer(CONF.clear_override(name, group=group))
return set_override
context = ShipyardRequestContext()
def test_actions_all_in_list():
"""Test that all actions are in alignment with supported list
Compares the action mappings structure with the externalized list of
supported actions, allowing for better alignment with the client
"""
mappings = actions_api._action_mappings()
actions = _get_actions_list()
for action in actions:
assert action in mappings
for action in mappings.keys():
assert action in actions
@mock.patch.object(ShipyardPolicy, 'authorize', return_value=True)
@mock.patch.object(
ActionsResource,
'get_all_actions',
return_value={'id': 'test_id',
'name': 'test_name'})
def test_on_get(mock_get_all_actions, mock_authorize):
act_resource = ActionsResource()
context.policy_engine = ShipyardPolicy()
req = create_req(context, None)
resp = create_resp()
act_resource.on_get(req, resp)
mock_authorize.assert_called_once_with(
'workflow_orchestrator:list_actions', context)
assert mock_get_all_actions.call_count == 1
assert resp.body is not None
assert resp.status == '200 OK'
@mock.patch('shipyard_airflow.control.action.actions_api.notes_helper',
new=nh)
@mock.patch.object(ShipyardPolicy, 'authorize', return_value=True)
@mock.patch.object(
ActionsResource,
'create_action',
return_value={'id': 'test_id',
'name': 'test_name'})
@patch('logging.Logger.info')
def test_on_post(mock_info, mock_create_action, mock_authorize, *args):
act_resource = ActionsResource()
context.policy_engine = ShipyardPolicy()
json_body = json.dumps({
'user': "test_user",
'req_id': "test_req_id",
'external_ctx': "test_ext_ctx",
'name': "test_name"
}).encode('utf-8')
req = create_req(context, json_body)
resp = create_resp()
act_resource.on_post(req, resp)
mock_authorize.assert_called_once_with(
'workflow_orchestrator:create_action', context)
mock_create_action.assert_called_once_with(
action=json.loads(json_body.decode('utf-8')),
context=context,
allow_intermediate_commits=None)
mock_info.assert_called_with("Id %s generated for action %s", 'test_id',
'test_name')
assert resp.status == '201 Created'
assert resp.body is not None
assert '/api/v1.0/actions/' in resp.location
@mock.patch('shipyard_airflow.control.action.actions_api.notes_helper',
new=nh)
def test_get_all_actions(*args):
"""
Tests the main response from get all actions
"""
action_resource = ActionsResource()
action_resource.get_all_actions_db = actions_db
action_resource.get_all_dag_runs_db = dag_runs_db
action_resource.get_all_tasks_db = tasks_db
result = action_resource.get_all_actions(verbosity=1)
assert len(result) == len(actions_db())
for action in result:
if action['name'] == 'dag_it':
assert len(action['steps']) == 1
assert action['dag_status'] == 'FAILED'
if action['name'] == 'dag2':
assert len(action['steps']) == 3
assert action['dag_status'] == 'SUCCESS'
@mock.patch('shipyard_airflow.control.action.actions_api.notes_helper',
new=nh)
def test_get_all_actions_notes(*args):
"""
Tests the main response from get all actions
"""
action_resource = ActionsResource()
action_resource.get_all_actions_db = actions_db
action_resource.get_all_dag_runs_db = dag_runs_db
action_resource.get_all_tasks_db = tasks_db
# inject some notes
nh.make_action_note('aaaaaa', "hello from aaaaaa1")
nh.make_action_note('aaaaaa', "hello from aaaaaa2")
nh.make_action_note('bbbbbb', "hello from bbbbbb")
result = action_resource.get_all_actions(verbosity=1)
assert len(result) == len(actions_db())
for action in result:
if action['id'] == 'aaaaaa':
assert len(action['notes']) == 2
if action['id'] == 'bbbbbb':
assert len(action['notes']) == 1
assert action['notes'][0]['note_val'] == 'hello from bbbbbb'
def _gen_action_resource_stubbed():
# TODO(bryan-strassner): mabye subclass this instead?
action_resource = ActionsResource()
action_resource.get_all_actions_db = actions_db
action_resource.get_all_dag_runs_db = dag_runs_db
action_resource.get_all_tasks_db = tasks_db
action_resource.invoke_airflow_dag = airflow_stub
action_resource.insert_action = insert_action_stub
action_resource.audit_control_command_db = audit_control_command_db
action_resource.get_committed_design_version = lambda: DESIGN_VERSION
return action_resource
@mock.patch('shipyard_airflow.control.action.actions_api.notes_helper',
new=nh)
@mock.patch('shipyard_airflow.control.action.action_validators'
'.validate_deployment_action_basic')
@mock.patch('shipyard_airflow.control.action.action_validators'
'.validate_deployment_action_full')
@mock.patch('shipyard_airflow.control.action.action_validators'
'.validate_intermediate_commits')
def test_create_action_invalid_input(ic_val, full_val, basic_val, *args):
action_resource = _gen_action_resource_stubbed()
# with invalid input. fail.
with pytest.raises(ApiError):
action = action_resource.create_action(
action={'name': 'broken',
'parameters': {
'a': 'aaa'
}},
context=context,
allow_intermediate_commits=False)
assert not ic_val.called
assert not full_val.called
assert not basic_val.called
@mock.patch('shipyard_airflow.control.action.actions_api.notes_helper',
new=nh)
@mock.patch('shipyard_airflow.policy.check_auth')
@mock.patch('shipyard_airflow.control.action.action_validators'
'.validate_deployment_action_basic')
@mock.patch('shipyard_airflow.control.action.action_validators'
'.validate_deployment_action_full')
@mock.patch('shipyard_airflow.control.action.action_validators'
'.validate_intermediate_commits')
def test_create_action_valid_input_and_params(ic_val, full_val, *args):
action_resource = _gen_action_resource_stubbed()
# with valid input and some parameters
try:
action = action_resource.create_action(
action={'name': 'deploy_site',
'parameters': {
'a': 'aaa'
}},
context=context,
allow_intermediate_commits=False)
assert action['timestamp']
assert action['id']
assert len(action['id']) == 26
assert action['dag_execution_date'] == '2017-09-06 14:10:08.528402'
assert action['dag_status'] == 'SCHEDULED'
assert action['committed_rev_id'] == 1
except ApiError:
assert False, 'Should not raise an ApiError'
full_val.assert_called_once_with(
action=action, configdocs_helper=action_resource.configdocs_helper)
ic_val.assert_called_once_with(
action=action, configdocs_helper=action_resource.configdocs_helper)
@mock.patch('shipyard_airflow.control.action.actions_api.notes_helper',
new=nh)
@mock.patch('shipyard_airflow.policy.check_auth')
@mock.patch('shipyard_airflow.control.action.action_validators'
'.validate_deployment_action_basic')
@mock.patch('shipyard_airflow.control.action.action_validators'
'.validate_deployment_action_full')
@mock.patch('shipyard_airflow.control.action.action_validators'
'.validate_intermediate_commits')
def test_create_action_valid_input_no_params(ic_val, full_val, *args):
action_resource = _gen_action_resource_stubbed()
# with valid input and no parameters
try:
action = action_resource.create_action(
action={'name': 'deploy_site'},
context=context,
allow_intermediate_commits=False)
assert action['timestamp']
assert action['id']
assert len(action['id']) == 26
assert action['dag_execution_date'] == '2017-09-06 14:10:08.528402'
assert action['dag_status'] == 'SCHEDULED'
assert action['committed_rev_id'] == 1
except ApiError:
assert False, 'Should not raise an ApiError'
full_val.assert_called_once_with(
action=action, configdocs_helper=action_resource.configdocs_helper)
ic_val.assert_called_once_with(
action=action, configdocs_helper=action_resource.configdocs_helper)
@mock.patch('shipyard_airflow.control.action.actions_api.notes_helper',
new=nh)
@mock.patch('shipyard_airflow.policy.check_auth')
@mock.patch('shipyard_airflow.control.action.action_validators'
'.validate_deployment_action_basic')
@mock.patch('shipyard_airflow.control.action.action_validators'
'.validate_deployment_action_full',
side_effect=ApiError(title='bad'))
@mock.patch('shipyard_airflow.control.action.action_validators'
'.validate_intermediate_commits')
def test_create_action_validator_error(*args):
action_resource = _gen_action_resource_stubbed()
# with valid input and some parameters
with pytest.raises(ApiError) as apie:
action = action_resource.create_action(
action={'name': 'deploy_site',
'parameters': {
'a': 'aaa'
}},
context=context,
allow_intermediate_commits=False)
assert action['timestamp']
assert action['id']
assert len(action['id']) == 26
assert action['dag_execution_date'] == '2017-09-06 14:10:08.528402'
assert action['dag_status'] == 'SCHEDULED'
assert action['committed_rev_id'] == 1
assert apie.value.title == 'bad'
@mock.patch('shipyard_airflow.control.action.actions_api.notes_helper',
new=nh)
@mock.patch('shipyard_airflow.policy.check_auth')
@mock.patch('shipyard_airflow.control.action.action_validators'
'.validate_deployment_action_basic')
def test_create_targeted_action_valid_input_and_params(basic_val, *args):
action_resource = _gen_action_resource_stubbed()
# with valid input and some parameters
try:
action = action_resource.create_action(
action={'name': 'redeploy_server',
'parameters': {
'target_nodes': ['node1']
}},
context=context,
allow_intermediate_commits=False)
assert action['timestamp']
assert action['id']
assert len(action['id']) == 26
assert action['dag_execution_date'] == '2017-09-06 14:10:08.528402'
assert action['dag_status'] == 'SCHEDULED'
assert action['committed_rev_id'] == 1
except ApiError:
assert False, 'Should not raise an ApiError'
basic_val.assert_called_once_with(
action=action, configdocs_helper=action_resource.configdocs_helper)
@mock.patch('shipyard_airflow.control.action.actions_api.notes_helper',
new=nh)
@mock.patch('shipyard_airflow.policy.check_auth')
@mock.patch('shipyard_airflow.control.action.action_validators'
'.validate_deployment_action_basic')
def test_create_targeted_action_valid_input_missing_target(basic_val, *args):
action_resource = _gen_action_resource_stubbed()
# with valid input and some parameters
with pytest.raises(ApiError) as apie:
action = action_resource.create_action(
action={'name': 'redeploy_server',
'parameters': {
'target_nodes': []
}},
context=context,
allow_intermediate_commits=False)
assert action['timestamp']
assert action['id']
assert len(action['id']) == 26
assert action['dag_execution_date'] == '2017-09-06 14:10:08.528402'
assert action['dag_status'] == 'SCHEDULED'
assert action['committed_rev_id'] == 1
assert apie.value.title == 'Invalid target_nodes parameter'
assert not basic_val.called
@mock.patch('shipyard_airflow.control.action.actions_api.notes_helper',
new=nh)
@mock.patch('shipyard_airflow.policy.check_auth')
@mock.patch('shipyard_airflow.control.action.action_validators'
'.validate_deployment_action_basic')
def test_create_targeted_action_valid_input_missing_param(basic_val, *args):
action_resource = _gen_action_resource_stubbed()
# with valid input and some parameters
with pytest.raises(ApiError) as apie:
action = action_resource.create_action(
action={'name': 'redeploy_server'},
context=context,
allow_intermediate_commits=False)
assert action['timestamp']
assert action['id']
assert len(action['id']) == 26
assert action['dag_execution_date'] == '2017-09-06 14:10:08.528402'
assert action['dag_status'] == 'SCHEDULED'
assert action['committed_rev_id'] == 1
assert apie.value.title == 'Invalid target_nodes parameter'
assert not basic_val.called
@mock.patch('shipyard_airflow.control.action.actions_api.notes_helper',
new=nh)
@mock.patch('shipyard_airflow.policy.check_auth')
@mock.patch('shipyard_airflow.control.action.action_validators'
'.validate_deployment_action_basic')
def test_create_targeted_action_no_committed(basic_val, *args):
action_resource = _gen_action_resource_stubbed()
action_resource.get_committed_design_version = lambda: None
# with valid input and some parameters
with pytest.raises(ApiError) as apie:
action = action_resource.create_action(
action={'name': 'redeploy_server',
'parameters': {
'target_nodes': ['node1']
}},
context=context,
allow_intermediate_commits=False)
assert action['timestamp']
assert action['id']
assert len(action['id']) == 26
assert action['dag_execution_date'] == '2017-09-06 14:10:08.528402'
assert action['dag_status'] == 'SCHEDULED'
assert action['committed_rev_id'] == 1
assert apie.value.title == 'No committed configdocs'
assert not basic_val.called
# Purposefully raising Exception to test only the value passed to auth
@mock.patch('shipyard_airflow.control.action.actions_api.notes_helper',
new=nh)
@mock.patch('shipyard_airflow.control.action.action_validators'
'.validate_deployment_action_basic',
side_effect=Exception('purposeful'))
@mock.patch('shipyard_airflow.control.action.action_validators'
'.validate_deployment_action_full',
side_effect=Exception('purposeful'))
@mock.patch('shipyard_airflow.control.action.action_validators'
'.validate_intermediate_commits',
side_effect=Exception('purposeful'))
@mock.patch('shipyard_airflow.control.action.action_validators'
'.validate_target_nodes',
side_effect=Exception('purposeful'))
@mock.patch('shipyard_airflow.policy.check_auth')
def test_auth_alignment(auth, *args):
action_resource = _gen_action_resource_stubbed()
for action_name, action_cfg in actions_api._action_mappings().items():
# Only test if validate returns
if action_cfg['validators']:
with pytest.raises(Exception) as ex:
action = action_resource.create_action(
action={'name': action_name},
context=context,
allow_intermediate_commits=False)
assert 'purposeful' in str(ex)
assert auth.called_with(action_cfg['rbac_policy'])
assert (action_cfg['rbac_policy'] ==
'workflow_orchestrator:action_{}'.format(action_name))
@patch('shipyard_airflow.db.shipyard_db.ShipyardDbAccess.'
'get_all_submitted_actions')
def test_get_all_actions_db(mock_get_all_submitted_actions):
act_resource = ActionsResource()
act_resource.get_all_actions_db()
assert mock_get_all_submitted_actions.called
@patch('shipyard_airflow.db.airflow_db.AirflowDbAccess.get_all_dag_runs')
def test_get_all_dag_runs_db(mock_get_all_dag_runs):
act_resource = ActionsResource()
act_resource.get_all_dag_runs_db()
assert mock_get_all_dag_runs.called
@patch('shipyard_airflow.db.airflow_db.AirflowDbAccess.get_all_tasks')
def test_get_all_tasks_db(mock_get_all_tasks):
act_resource = ActionsResource()
act_resource.get_all_tasks_db()
assert mock_get_all_tasks.called
@patch('shipyard_airflow.db.shipyard_db.ShipyardDbAccess.insert_action')
def test_insert_action(mock_insert_action):
act_resource = ActionsResource()
action = 'test_action'
act_resource.insert_action(action)
mock_insert_action.assert_called_with(action)
@patch('shipyard_airflow.db.shipyard_db.ShipyardDbAccess.'
'insert_action_command_audit')
def test_audit_control_command_db(mock_insert_action_audit):
act_resource = ActionsResource()
action_audit = 'test_action_audit'
act_resource.audit_control_command_db(action_audit)
mock_insert_action_audit.assert_called_with(action_audit)
@responses.activate
@mock.patch.object(
ActionsResource,
'_exhume_date',
return_value=datetime(2017, 9, 22, 22, 16, 14))
@patch('logging.Logger.info')
def test_invoke_airflow_dag_success(mock_info, mock_exhume_date):
act_resource = ActionsResource()
dag_id = 'test_dag_id'
action = {'id': '123', 'user': 'unittester'}
CONF = cfg.CONF
web_server_url = CONF.base.web_server
conf_value = {'action': action}
log_string = 'Created <DagRun deploy_site @ 2017-09-22 22:16:14: man'
responses.add(
method='POST',
url='{}api/experimental/dags/{}/dag_runs'.format(
web_server_url, dag_id),
body=json.dumps({'message': log_string}),
status=200,
content_type='application/json')
result = act_resource.invoke_airflow_dag(dag_id, action, context)
mock_exhume_date.assert_called_with(dag_id, log_string)
assert result == '2017-09-22T22:16:14'
@responses.activate
@patch('logging.Logger.info')
def test_invoke_airflow_dag_errors(mock_info):
act_resource = ActionsResource()
dag_id = 'test_dag_id'
action = {'id': '123', 'user': 'unittester'}
web_server_url = CONF.base.web_server
conf_value = {'action': action}
responses.add(
method='POST',
url='{}api/experimental/dags/{}/dag_runs'.format(
web_server_url, dag_id),
body=json.dumps({
"error": "not found"
}),
status=404,
content_type='application/json')
with pytest.raises(ApiError) as expected_exc:
act_resource.invoke_airflow_dag(dag_id, action, context)
mock_info.assert_called_with('Response code from Airflow trigger_dag: %s',
404)
assert 'Unable to complete request to Airflow' in str(expected_exc)
assert 'Airflow could not be contacted properly by Shipyard' in str(
expected_exc)
with mock.patch.object(actions_api, 'CONF') as mock_conf:
mock_conf.base.web_server = 'Error'
with pytest.raises(ApiError) as expected_exc:
act_resource.invoke_airflow_dag(dag_id, action, context)
assert 'Unable to invoke workflow' in str(expected_exc)
assert ('Airflow URL not found by Shipyard. Shipyard configuration is '
'missing web_server value') in str(expected_exc)
def test_exhume_date():
act_resource = ActionsResource()
dag_id = 'test_dag_id'
log_string = 'test_log_string'
with pytest.raises(ApiError) as expected_exc:
act_resource._exhume_date(dag_id, log_string)
assert 'Unable to determine if workflow has started' in str(expected_exc)
assert ('Airflow has not responded with parseable output. Shipyard is '
'unable to determine run timestamp') in str(expected_exc)
dag_id = 'deploy_site'
log_string = 'Created <DagRun deploy_site @ 2017-09-22 22:16:14: man'
result = act_resource._exhume_date(dag_id, log_string)
assert result == datetime(2017, 9, 22, 22, 16, 14)
log_string = 'Created <DagRun deploy_site @ test'
with pytest.raises(ApiError) as expected_exc:
act_resource._exhume_date(dag_id, log_string)
assert 'Unable to determine if workflow has started' in str(expected_exc)
assert (
'Airflow has not responded with parseable output. Shipyard is unable '
'to determine run timestamp') in str(expected_exc)
@mock.patch.object(ConfigdocsHelper, 'get_revision_id', return_value=7)
def test_get_committed_design_version(*args):
act_resource = ActionsResource()
act_resource.configdocs_helper = ConfigdocsHelper(ShipyardRequestContext())
assert act_resource.get_committed_design_version() == 7
@mock.patch.object(ConfigdocsHelper, 'get_revision_id', return_value=None)
def test_get_committed_design_version_missing(*args):
act_resource = ActionsResource()
act_resource.configdocs_helper = ConfigdocsHelper(
ShipyardRequestContext()
)
assert act_resource.get_committed_design_version() is None
|
import itertools
import logging
import random
import string
from pyinsect.documentModel.comparators import SimilarityHPG, SimilarityVS
from pyinsect.documentModel.representations.DocumentNGramGraph import DocumentNGramGraph
logger = logging.getLogger(__name__)
class HPGTestCaseMixin(object):
graph_type = None
def _construct_graph(
self, data, window_size, number_of_levels, similarity_metric, *args, **kwargs
):
return self.graph_type(
data, window_size, number_of_levels, similarity_metric
).as_graph(DocumentNGramGraph, *args, **kwargs)
def setUp(self):
super().setUp()
random.seed(1234)
self.data = self.generate_random_2d_int_array(5)
self.array_graph_metric = SimilarityVS()
self.hpg_metric = SimilarityHPG(self.array_graph_metric)
def test_same_similarity(self):
graph1 = self._construct_graph(self.data, 3, 3, self.array_graph_metric)
graph2 = self._construct_graph(self.data, 3, 3, self.array_graph_metric)
value = self.hpg_metric(graph1, graph2)
self.assertEqual(value, 1.0)
def test_equality(self):
graph1 = self._construct_graph(self.data, 3, 3, self.array_graph_metric)
graph2 = self._construct_graph(self.data, 3, 3, self.array_graph_metric)
self.assertEqual(graph1, graph2)
def test_diff_similarity(self):
for permutation_index, permutation in enumerate(
itertools.permutations(self.data)
):
if permutation == tuple(self.data):
continue
logger.info("Permutation: %02d", permutation_index)
with self.subTest(permutation=permutation):
graph1 = self._construct_graph(
permutation, 3, 3, self.array_graph_metric
)
graph2 = self._construct_graph(self.data, 3, 3, self.array_graph_metric)
value = self.hpg_metric(graph1, graph2)
self.assertNotEqual(value, 1.0)
def test_commutativity(self):
data1 = self.generate_random_2d_int_array(5)
data2 = self.generate_random_2d_int_array(5)
graph1 = self._construct_graph(data1, 3, 3, self.array_graph_metric)
graph2 = self._construct_graph(data2, 3, 3, self.array_graph_metric)
value1 = self.hpg_metric(graph1, graph2)
value2 = self.hpg_metric(graph2, graph1)
self.assertEqual(value1, value2)
def test_combinations(self):
for combination_index in range(10):
logger.info("Combination: %02d", combination_index)
length1 = random.randint(1, 5)
length2 = random.randint(1, 5)
data1 = self.generate_random_2d_int_array(length1)
data2 = self.generate_random_2d_int_array(length2)
levels_1, window_size_1 = (
random.randint(1, 4),
random.randint(1, 10),
)
levels2, window_size_2 = (
random.randint(1, 4),
random.randint(1, 10),
)
logger.info("Configuration #1: (%02d, %02d)", levels_1, window_size_1)
logger.info("Configuration #2: (%02d, %02d)", levels2, window_size_2)
with self.subTest(
config1=(levels_1, window_size_1, data1),
config2=(levels2, window_size_2, data2),
):
graph1 = self._construct_graph(
data1, window_size_1, levels_1, self.array_graph_metric
)
graph2 = self._construct_graph(
data2, window_size_2, levels2, self.array_graph_metric
)
value = self.hpg_metric(graph1, graph2)
self.assertTrue(0.0 <= value <= 1.0)
@classmethod
def generate_random_2d_int_array(cls, size):
return [
[ord(random.choice(string.ascii_letters)) for _ in range(size)]
for _ in range(size)
]
|
import React from "react"
import newsletter from "./newsletter.module.scss"
import NewsletterForm from "../forms/newsletterForm"
const Newsletter = ({ path }) => (
<section id={newsletter.newsletter}>
<h2 className="screen_reader_text">Newsletter</h2>
<div>
<div className={newsletter.heading}>
<p className="heading-2">Want to know what's happening online?</p>
</div>
<div className={newsletter.newsletterForm}>
<NewsletterForm path={path} />
</div>
<div className={newsletter.subHeading}>
<p>Get thoughtful, informative web and tech ideas you can put to use.</p>
</div>
</div>
</section>
)
export default Newsletter |
import {push} from 'react-router-redux';
import * as con from 'app/constants/dialogs';
import API from 'app/utils/API';
/**
* Simply redirects user.
* @param {String} location - Url, where to redirect
* @return {Function} dispatch - Function for the reducer
*/
export function redirectTo(location) {
return dispatch => {
dispatch(push(location));
}
}
/**
* @typedef {Object} saveDialogPayload
* @param {Array} dialogs - List of dialogs
* @param {Array} users - List of all users (both from single conversations and chats)
*/
/**
* Puts list of dialogs and users into store
* @param {Array} dialogs - list of dialogs
* @param {Array} users - list of all users (both from single conversations and chats)
* @return {saveDialogPayload} object for the reducer
*/
function saveDialogsList(dialogs, users) {
return {
type: con.SAVE_DIALOGS_LIST,
payload: { dialogs, users }
};
}
function updateDialogsList(dialogs) {
return {
type: con.UPDATE_DIALOGS_LIST,
payload: { dialogs }
}
}
/**
* Creating list of users, list of dialogs and saves it into store.
* @param {string} access_token - token for the vk.com API
* @return {Function} dispatch - function for the reducer
*/
export function initDialogsList(access_token) {
return async dispatch => {
const rawDialogs = await API.getDialogsList(API.GET_REQUEST, access_token);
rawDialogs.splice(0, 1); // because the first element is a length of response
const users = await getUsers(access_token, rawDialogs);
const preDialogs = constructDialogs(rawDialogs, users);
const dialogs = new Map();
preDialogs.map(item => {
dialogs.set(item.id, item);
}).sort((a, b) => a[1].date - b[1].date);
// const dialogs = new Map([...oldDialogs].sort((a, b) => b[1].date - a[1].date));
dispatch(saveDialogsList(dialogs, users));
}
}
export function updateDialogBody(dialogID, messageBody, dialogsList, date) {
return dispatch => {
const newDialog = {
...dialogsList.get(dialogID),
body: messageBody,
date: date
};
const newDialogsList = dialogsList.set(dialogID, newDialog);
const sortedDialogsList = new Map([...newDialogsList].sort((a, b) => b[1].date - a[1].date));
dispatch(updateDialogsList(sortedDialogsList));
}
}
/**
* Collects user ids from every dialog (both single and chat),
* fetch information for every id (first name, last name, etc)
* and creates an object where
* every key is a user id and every value is an information about user.
* So we can easily get data about user while creating dialogs.
* @param {string} access_token - token for the vk.com API
* @param {Array} dialogs - list of raw dialogs
* @return {object} resultUsers - object of users
*/
async function getUsers(access_token, dialogs) {
const resultUsers = {},
usersBuffer = [], // contains info about single users
chatsBuffer = [], // contains chat's ids
chatUsers = []; // contains info about chat users
Promise.all(dialogs.map(async item => {
if (item.chat_id) {
// If this is a chat
chatsBuffer.push(item.chat_id);
}
else {
// If this is a dialog with a single person
usersBuffer.push(item.uid);
}
}));
// Because stupid API of vk.com doesn't return info about last user, we have to add last user one more time lol
// usersBuffer.push(usersBuffer[length - 1]);
const singleUsers = await API.getUserInfo(API.GET_REQUEST, access_token, usersBuffer.join(','), 'photo_50');
const rawChatsUsers = await API.getDialogUsers(API.GET_REQUEST, access_token, chatsBuffer.join(','), 'photo_50');
for (const key in rawChatsUsers) {
chatUsers.push(...rawChatsUsers[key]);
}
chatUsers.map(user => {
resultUsers[user.id] = user;
});
singleUsers.map(user => {
resultUsers[user.uid] = user;
});
return resultUsers;
}
/**
* Here we create actual list of dialogs. We take every dialog,
* and if it's a chat we can take chat's title,
* but if it's a single, then our title will be equal to
* the first name and the last name of the person.
* That's why we need that users object.
* @param {Array} dialogs - list of dialogs
* @param {Array} users - list of users
* @return {Array} result - list of dialogs with title, body, avatars, etc...
*/
function constructDialogs(dialogs, users) {
const result = [];
dialogs.map(item => {
if (item.chat_id) {
result.push({
type: 'chat',
title: item.title,
body: item.body,
date: item.date,
id: +2000000000 + +item.chat_id
});
}
else {
const user = users[item.uid];
const title = user.first_name + ' ' + user.last_name;
result.push({
type: 'single',
title: title,
body: item.body,
date: item.date,
id: item.uid,
avatar: user.photo_50
});
}
});
return result;
}
|
function compute()
{
var principal = document.getElementById("principal").value;
var rate = document.getElementById("rate").value;
var years = document.getElementById("years").value;
var interest = principal * years * rate /100;
var year = new Date().getFullYear()+parseInt(years);
if (principal <= 0)
{
alert("Enter a positive number");
return 0;
}
document.getElementById("result").innerHTML = "If you deposit: <mark>"+principal+"</mark><br>At an interest rate of :<mark>"+rate+"</mark><br>You will receive an amount of :<mark>"+interest+"</mark>,<br>In the year :<mark>"+year+"</mark><br>";
}
function updateRate(){
var rateval = document.getElementById("rate").value;
document.getElementById("rate_val").innerText = rateval;
}
|
/*
* The MIT License (MIT)
*
* Copyright (c) 2020 Looker Data Sciences, Inc.
*
* 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.
*/
const jwt = require('jsonwebtoken')
const dotenv = require('dotenv')
const express = require('express')
const cors = require('cors')
const bodyParser = require('body-parser')
const app = express()
const port = 3000
app.get('/', (req, res) => res.send('Hello World!'))
/**
* A test server that serves up test json data and that can
* protect that data if needed. A request must have an Authorization
* header to access the data.
*
* User can sign in and an authorization token will be created.
* The token will last for one hour after which the user has to
* log in again. It does not automatically extend.
*
* The user can sign in using a google access token and expiration
* (obtained by using the OAUTH2 implicit flow in the web client).
* If the token is valid (determined by calling the google token
* info server) a server token is created using the expiration as the
* length of the token.
*/
// Provide access to values in .env file
dotenv.config()
// Key for signing JWT tokens. DO NOT DO THIS IN A PRODUCTION APP.
const JWT_KEY = process.env.JWT_TOKEN_SECRET
if (!JWT_KEY || JWT_KEY.trim() === '') {
console.error('JWT_TOKEN_SECRET not defined. Please add to .env file.')
process.exit(-1)
}
// Cors required
app.use(cors())
// Body parser middleware
app.use(bodyParser.json())
/**
* Middleware to validate the JWT token. If valid user data gets stored
* on the request object.
* With the advent of the SameSite attribute of cookies, added support
* for the token in the Authorization header instead of cookies.
*/
app.use((req, res, next) => {
const authHeader = req.headers.authorization
if (authHeader) {
const token = authHeader.split(' ')[1]
try {
const payload = jwt.verify(token, JWT_KEY)
req.currentUser = payload
} catch (err) {
// most likely token has expires. Could also be tampering with
// token but this is a test application so it does not really
// matter.
}
}
next()
})
/**
* Access check
*/
app.post('/access_check', async (req, res) => {
const { name, email, access_key } = req.body
// validate the access key. Simple in memory check for demo
// purposes.
if (access_key !== process.env.ACCESS_KEY) {
res.status(401).send()
return
}
// In theory the email could be used to check if the user is
// authorized to access the data server. As this is just
// sample code we just grant access.
console.log(`${email}/${name} allowed to use the JSON server`)
// Create the JWT token for the session.
const options = {
expiresIn: 3600,
}
const userJwt = jwt.sign({ ...req.body }, JWT_KEY, options)
res.set('Content-Type', 'application/json')
// IMPORTANT - NEVER RETURN THE ACCESS KEY IN THE RESPONSE!
// THE LOOKER SERVER WILL NOT DETECT AND REMOVE THE ACCESS FROM
// THE RESPONSE. THIS MEANS THAT THE KEY WILL BE EXPOSED IN THE
// BROWSER WHICH IS INSECURE.
res.status(200).send({ jwt_token: userJwt })
})
/**
* All data requests go through this guard first.
* If currentUser is not found on the request (see
* above for how that happens), the user is not logged in
* and a 401 response is returned.
*/
app.use((req, res, next) => {
// If currentUser is present, user is authorized
if (req.currentUser) {
next()
} else {
res.sendStatus(401)
}
})
/**
* Ping to validate a jwt token
*/
app.get('/ping', async (req, res) => {
res.status(200).send({})
})
/**
* Listen
*/
app.listen(port, () => console.log(`Listening on http://localhost:${port}`))
|
import Document, { Head, Main, NextScript } from 'next/document'
import { ServerStyleSheet, injectGlobal } from 'styled-components'
export default class MyDocument extends Document {
static getInitialProps ({ renderPage }) {
const sheet = new ServerStyleSheet()
const page = renderPage(App => props => sheet.collectStyles(<App {...props} />))
const styleTags = sheet.getStyleElement()
return { ...page, styleTags }
}
render () {
return (
<html>
<Head>
{this.props.styleTags}
</Head>
<body>
<Main />
<NextScript />
</body>
</html>
)
}
}
// Global style
// eslint-disable-next-line
injectGlobal`
html{box-sizing:border-box;} *,*:before,*:after{box-sizing:inherit;}
body{margin:0;font-family:'Nunito',sans-serif;line-height:1.6;}
button,input[type=submit]{cursor:pointer;font-family:inherit;}
p{line-height:1.5;}
select{padding:8px;}
h1,h2,h3,h4,h5,h6,.h1,.h2,.h3,.h4,.h5,.h6{text-rendering:optimizelegibility;margin:0;}
input,select,textarea{padding:4px;border-radius:4px;border:solid 1px rgba(0,0,0,.1);font-size:16px;font-family:inherit;background:#fff;}
select{-webkit-appearance:menulist;height:32px;}
table{border-collapse:collapse;}
.ReactModalPortal > div {opacity:0;}
.ReactModalPortal .ReactModal__Overlay {
transition: opacity 200ms ease-in-out;
&--after-open {opacity:1;}
&--before-close {opacity:0;}
}
.ReactModalPortal .ReactModal__Content {
transition: margin-top 200ms ease-in-out;
background: rgba(0, 0, 0, 0.15);
&--after-open {margin-top:-20px;}
&--before-close {margin-top:200px;}
}
`
|
// ************************************************************************* //
// Strict mode should not be used, as the roll20 script depends on this file //
// Do not use classes //
// ************************************************************************* //
// in deployment, `IS_DEPLOYED = "<version number>";` should be set below.
IS_DEPLOYED = undefined;
VERSION_NUMBER = /* 5ETOOLS_VERSION__OPEN */"1.89.1"/* 5ETOOLS_VERSION__CLOSE */;
DEPLOYED_STATIC_ROOT = ""; // "https://static.5etools.com/"; // FIXME re-enable this when we have a CDN again
// for the roll20 script to set
IS_VTT = false;
IMGUR_CLIENT_ID = `abdea4de492d3b0`;
HASH_PART_SEP = ",";
HASH_LIST_SEP = "_";
HASH_SUB_LIST_SEP = "~";
HASH_SUB_KV_SEP = ":";
HASH_START = "#";
HASH_SUBCLASS = "sub:";
HASH_BLANK = "blankhash";
HASH_SUB_NONE = "null";
CLSS_NON_STANDARD_SOURCE = "spicy-sauce";
CLSS_HOMEBREW_SOURCE = "refreshing-brew";
CLSS_SUBCLASS_FEATURE = "subclass-feature";
CLSS_HASH_FEATURE_KEY = "f";
CLSS_HASH_FEATURE = `${CLSS_HASH_FEATURE_KEY}:`;
MON_HASH_SCALED = "scaled";
ATB_DATA_LIST_SEP = "||";
ATB_DATA_PART_SEP = "::";
ATB_DATA_SC = "data-subclass";
ATB_DATA_SRC = "data-source";
STR_CANTRIP = "Cantrip";
STR_NONE = "None";
STR_ANY = "Any";
STR_SPECIAL = "Special";
HOMEBREW_STORAGE = "HOMEBREW_STORAGE";
HOMEBREW_META_STORAGE = "HOMEBREW_META_STORAGE";
EXCLUDES_STORAGE = "EXCLUDES_STORAGE";
DMSCREEN_STORAGE = "DMSCREEN_STORAGE";
ROLLER_MACRO_STORAGE = "ROLLER_MACRO_STORAGE";
ENCOUNTER_STORAGE = "ENCOUNTER_STORAGE";
POINTBUY_STORAGE = "POINTBUY_STORAGE";
JSON_HOMEBREW_INDEX = `homebrew/index.json`;
// STRING ==============================================================================================================
String.prototype.uppercaseFirst = String.prototype.uppercaseFirst || function () {
const str = this.toString();
if (str.length === 0) return str;
if (str.length === 1) return str.charAt(0).toUpperCase();
return str.charAt(0).toUpperCase() + str.slice(1);
};
String.prototype.lowercaseFirst = String.prototype.lowercaseFirst || function () {
const str = this.toString();
if (str.length === 0) return str;
if (str.length === 1) return str.charAt(0).toLowerCase();
return str.charAt(0).toLowerCase() + str.slice(1);
};
String.prototype.toTitleCase = String.prototype.toTitleCase || function () {
let str;
str = this.replace(/([^\W_]+[^\s-/]*) */g, function (txt) {
return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();
});
if (!StrUtil._TITLE_LOWER_WORDS_RE) {
StrUtil._TITLE_LOWER_WORDS_RE = StrUtil.TITLE_LOWER_WORDS.map(it => new RegExp(`\\s${it}\\s`, 'g'));
}
for (let i = 0; i < StrUtil.TITLE_LOWER_WORDS.length; i++) {
str = str.replace(
StrUtil._TITLE_LOWER_WORDS_RE[i],
(txt) => {
return txt.toLowerCase();
});
}
if (!StrUtil._TITLE_UPPER_WORDS_RE) {
StrUtil._TITLE_UPPER_WORDS_RE = StrUtil.TITLE_UPPER_WORDS.map(it => new RegExp(`\\b${it}\\b`, 'g'));
}
for (let i = 0; i < StrUtil.TITLE_UPPER_WORDS.length; i++) {
str = str.replace(
StrUtil._TITLE_UPPER_WORDS_RE[i],
StrUtil.TITLE_UPPER_WORDS[i].toUpperCase()
);
}
return str;
};
String.prototype.toSentenceCase = String.prototype.toSentenceCase || function () {
const out = [];
const re = /([^.!?]+)([.!?]\s*|$)/gi;
let m;
do {
m = re.exec(this);
if (m) {
out.push(m[0].toLowerCase().uppercaseFirst());
}
} while (m);
return out.join("");
};
String.prototype.toSpellCase = String.prototype.toSpellCase || function () {
return this.toLowerCase().replace(/(^|of )(bigby|otiluke|mordenkainen|evard|hadar|agatys|abi-dalzim|aganazzar|drawmij|leomund|maximilian|melf|nystul|otto|rary|snilloc|tasha|tenser|jim)('s|$| )/g, (...m) => `${m[1]}${m[2].toTitleCase()}${m[3]}`);
};
String.prototype.toCamelCase = String.prototype.toCamelCase || function () {
return this.split(" ").map((word, index) => {
if (index === 0) return word.toLowerCase();
return `${word.charAt(0).toUpperCase()}${word.slice(1).toLowerCase()}`;
}).join("");
};
String.prototype.escapeQuotes = String.prototype.escapeQuotes || function () {
return this.replace(/'/g, `'`).replace(/"/g, `"`);
};
String.prototype.unescapeQuotes = String.prototype.unescapeQuotes || function () {
return this.replace(/'/g, `'`).replace(/"/g, `"`);
};
String.prototype.encodeApos = String.prototype.encodeApos || function () {
return this.replace(/'/g, `%27`);
};
/**
* Calculates the Damerau-Levenshtein distance between two strings.
* https://gist.github.com/IceCreamYou/8396172
*/
String.prototype.distance = String.prototype.distance || function (target) {
let source = this; let i; let j;
if (!source) return target ? target.length : 0;
else if (!target) return source.length;
const m = source.length; const n = target.length; const INF = m + n; const score = new Array(m + 2); const sd = {};
for (i = 0; i < m + 2; i++) score[i] = new Array(n + 2);
score[0][0] = INF;
for (i = 0; i <= m; i++) {
score[i + 1][1] = i;
score[i + 1][0] = INF;
sd[source[i]] = 0;
}
for (j = 0; j <= n; j++) {
score[1][j + 1] = j;
score[0][j + 1] = INF;
sd[target[j]] = 0;
}
for (i = 1; i <= m; i++) {
let DB = 0;
for (j = 1; j <= n; j++) {
const i1 = sd[target[j - 1]]; const j1 = DB;
if (source[i - 1] === target[j - 1]) {
score[i + 1][j + 1] = score[i][j];
DB = j;
} else {
score[i + 1][j + 1] = Math.min(score[i][j], Math.min(score[i + 1][j], score[i][j + 1])) + 1;
}
score[i + 1][j + 1] = Math.min(score[i + 1][j + 1], score[i1] ? score[i1][j1] + (i - i1 - 1) + 1 + (j - j1 - 1) : Infinity);
}
sd[source[i - 1]] = i;
}
return score[m + 1][n + 1];
};
String.prototype.isNumeric = String.prototype.isNumeric || function () {
return !isNaN(parseFloat(this)) && isFinite(this);
};
String.prototype.last = String.prototype.last || function () {
return this[this.length - 1];
};
String.prototype.escapeRegexp = String.prototype.escapeRegexp || function () {
return this.replace(/[-/\\^$*+?.()|[\]{}]/g, '\\$&');
};
Array.prototype.joinConjunct = Array.prototype.joinConjunct || function (joiner, lastJoiner, nonOxford) {
if (this.length === 0) return "";
if (this.length === 1) return this[0];
if (this.length === 2) return this.join(lastJoiner);
else {
let outStr = "";
for (let i = 0; i < this.length; ++i) {
outStr += this[i];
if (i < this.length - 2) outStr += joiner;
else if (i === this.length - 2) outStr += `${(!nonOxford && this.length > 2 ? joiner.trim() : "")}${lastJoiner}`;
}
return outStr;
}
};
StrUtil = {
COMMAS_NOT_IN_PARENTHESES_REGEX: /,\s?(?![^(]*\))/g,
COMMA_SPACE_NOT_IN_PARENTHESES_REGEX: /, (?![^(]*\))/g,
uppercaseFirst: function (string) {
return string.uppercaseFirst();
},
// Certain minor words should be left lowercase unless they are the first or last words in the string
TITLE_LOWER_WORDS: ["A", "An", "The", "And", "But", "Or", "For", "Nor", "As", "At", "By", "For", "From", "In", "Into", "Near", "Of", "On", "Onto", "To", "With"],
// Certain words such as initialisms or acronyms should be left uppercase
TITLE_UPPER_WORDS: ["Id", "Tv", "Dm"],
padNumber: (n, len, padder) => {
return String(n).padStart(len, padder);
},
elipsisTruncate(str, atLeastPre = 5, atLeastSuff = 0, maxLen = 20) {
if (maxLen >= str.length) return str;
maxLen = Math.max(atLeastPre + atLeastSuff + 3, maxLen);
let out = "";
let remain = maxLen - (3 + atLeastPre + atLeastSuff);
for (let i = 0; i < str.length - atLeastSuff; ++i) {
const c = str[i];
if (i < atLeastPre) out += c;
else if ((remain--) > 0) out += c;
}
if (remain < 0) out += "...";
out += str.substring(str.length - atLeastSuff, str.length);
return out;
},
toTitleCase(str) {
return str.toTitleCase();
}
};
// PARSING =============================================================================================================
Parser = {};
Parser._parse_aToB = function (abMap, a, fallback) {
if (a === undefined || a === null) throw new TypeError("undefined or null object passed to parser");
if (typeof a === "string") a = a.trim();
if (abMap[a] !== undefined) return abMap[a];
return fallback || a;
};
Parser._parse_bToA = function (abMap, b) {
if (b === undefined || b === null) throw new TypeError("undefined or null object passed to parser");
if (typeof b === "string") b = b.trim();
for (const v in abMap) {
if (!abMap.hasOwnProperty(v)) continue;
if (abMap[v] === b) return v;
}
return b;
};
Parser.attrChooseToFull = function (attList) {
if (attList.length === 1) return `${Parser.attAbvToFull(attList[0])} modifier`;
else {
const attsTemp = [];
for (let i = 0; i < attList.length; ++i) {
attsTemp.push(Parser.attAbvToFull(attList[i]));
}
return `${attsTemp.join(" or ")} modifier (your choice)`;
}
};
Parser.numberToText = function (number) {
if (number == null) throw new TypeError(`undefined or null object passed to parser`);
if (Math.abs(number) >= 100) return `${number}`;
function getAsText(num) {
const abs = Math.abs(num);
switch (abs) {
case 0: return "zero";
case 1: return "one";
case 2: return "two";
case 3: return "three";
case 4: return "four";
case 5: return "five";
case 6: return "six";
case 7: return "seven";
case 8: return "eight";
case 9: return "nine";
case 10: return "ten";
case 11: return "eleven";
case 12: return "twelve";
case 13: return "thirteen";
case 14: return "fourteen";
case 15: return "fifteen";
case 16: return "sixteen";
case 17: return "seventeen";
case 18: return "eighteen";
case 19: return "nineteen";
case 20: return "twenty";
case 30: return "thirty";
case 40: return "forty";
case 50: return "fiddy"; // :^)
case 60: return "sixty";
case 70: return "seventy";
case 80: return "eighty";
case 90: return "ninety";
default: {
const str = String(abs);
return `${getAsText(Number(`${str[0]}0`))}-${getAsText(Number(str[1]))}`;
}
}
}
return `${number < 0 ? "negative " : ""}${getAsText(number)}`;
};
Parser.numberToVulgar = function (number) {
const spl = `${number}`.split(".");
if (spl.length === 1) return number;
if (spl[1] === "5") return `${spl[0]}½`;
if (spl[1] === "25") return `${spl[0]}¼`;
if (spl[1] === "75") return `${spl[0]}¾`;
return Parser.numberToFractional(number);
};
Parser._greatestCommonDivisor = function (a, b) {
if (b < Number.EPSILON) return a;
return Parser._greatestCommonDivisor(b, Math.floor(a % b));
};
Parser.numberToFractional = function (number) {
const len = number.toString().length - 2;
let denominator = Math.pow(10, len);
let numerator = number * denominator;
const divisor = Parser._greatestCommonDivisor(numerator, denominator);
numerator = Math.floor(numerator / divisor);
denominator = Math.floor(denominator / divisor);
return denominator === 1 ? String(numerator) : `${Math.floor(numerator)}/${Math.floor(denominator)}`;
};
Parser.ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
Parser.attAbvToFull = function (abv) {
return Parser._parse_aToB(Parser.ATB_ABV_TO_FULL, abv);
};
Parser.attFullToAbv = function (full) {
return Parser._parse_bToA(Parser.ATB_ABV_TO_FULL, full);
};
Parser.sizeAbvToFull = function (abv) {
return Parser._parse_aToB(Parser.SIZE_ABV_TO_FULL, abv);
};
Parser.getAbilityModNumber = function (abilityScore) {
return Math.floor((abilityScore - 10) / 2);
};
Parser.getAbilityModifier = function (abilityScore) {
let modifier = Parser.getAbilityModNumber(abilityScore);
if (modifier >= 0) modifier = "+" + modifier;
return modifier;
};
Parser.getSpeedString = (it) => {
function procSpeed(propName) {
function addSpeed(s) {
stack.push(`${propName === "walk" ? "" : `${propName} `}${getVal(s)} ft.${getCond(s)}`);
}
if (it.speed[propName] || propName === "walk") addSpeed(it.speed[propName] || 0);
if (it.speed.alternate && it.speed.alternate[propName]) it.speed.alternate[propName].forEach(addSpeed);
}
function getVal(speedProp) {
return speedProp.number || speedProp;
}
function getCond(speedProp) {
return speedProp.condition ? ` ${Renderer.get().render(speedProp.condition)}` : "";
}
const stack = [];
if (typeof it.speed === "object") {
let joiner = ", ";
procSpeed("walk");
procSpeed("burrow");
procSpeed("climb");
procSpeed("fly");
procSpeed("swim");
if (it.speed.choose) {
joiner = "; ";
stack.push(`${it.speed.choose.from.sort().joinConjunct(", ", " or ")} ${it.speed.choose.amount} ft.${it.speed.choose.note ? ` ${it.speed.choose.note}` : ""}`);
}
return stack.join(joiner);
} else {
return it.speed + (it.speed === "Varies" ? "" : " ft. ");
}
};
Parser.SPEED_TO_PROGRESSIVE = {
"walk": "walking",
"burrow": "burrowing",
"climb": "climbing",
"fly": "flying",
"swim": "swimming"
};
Parser.speedToProgressive = function (prop) {
return Parser._parse_aToB(Parser.SPEED_TO_PROGRESSIVE, prop);
};
Parser._addCommas = function (intNum) {
return (intNum + "").replace(/(\d)(?=(\d{3})+$)/g, "$1,");
};
Parser.crToXp = function (cr) {
if (cr != null && cr.xp) return Parser._addCommas(cr.xp);
const toConvert = cr ? (cr.cr || cr) : null;
if (toConvert === "Unknown" || toConvert == null) return "Unknown";
if (toConvert === "0") return "0 or 10";
if (toConvert === "1/8") return "25";
if (toConvert === "1/4") return "50";
if (toConvert === "1/2") return "100";
return Parser._addCommas(Parser.XP_CHART[parseInt(toConvert) - 1]);
};
Parser.crToXpNumber = function (cr) {
if (cr != null && cr.xp) return cr.xp;
const toConvert = cr ? (cr.cr || cr) : cr;
if (toConvert === "Unknown" || toConvert == null) return null;
return Parser.XP_CHART_ALT[toConvert];
};
LEVEL_TO_XP_EASY = [0, 25, 50, 75, 125, 250, 300, 350, 450, 550, 600, 800, 1000, 1100, 1250, 1400, 1600, 2000, 2100, 2400, 2800];
LEVEL_TO_XP_MEDIUM = [0, 50, 100, 150, 250, 500, 600, 750, 900, 1100, 1200, 1600, 2000, 2200, 2500, 2800, 3200, 3900, 4100, 4900, 5700];
LEVEL_TO_XP_HARD = [0, 75, 150, 225, 375, 750, 900, 1100, 1400, 1600, 1900, 2400, 3000, 3400, 3800, 4300, 4800, 5900, 6300, 7300, 8500];
LEVEL_TO_XP_DEADLY = [0, 100, 200, 400, 500, 1100, 1400, 1700, 2100, 2400, 2800, 3600, 4500, 5100, 5700, 6400, 7200, 8800, 9500, 10900, 12700];
LEVEL_TO_XP_DAILY = [0, 300, 600, 1200, 1700, 3500, 4000, 5000, 6000, 7500, 9000, 10500, 11500, 13500, 15000, 18000, 20000, 25000, 27000, 30000, 40000];
Parser.CRS = ["0", "1/8", "1/4", "1/2", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30"];
Parser.levelToXpThreshold = function (level) {
return [LEVEL_TO_XP_EASY[level], LEVEL_TO_XP_MEDIUM[level], LEVEL_TO_XP_HARD[level], LEVEL_TO_XP_DEADLY[level]];
};
Parser.isValidCr = function (cr) {
return Parser.CRS.includes(cr);
};
Parser.crToNumber = function (cr) {
if (cr === "Unknown" || cr === "\u2014" || cr == null) return 100;
if (cr.cr) return Parser.crToNumber(cr.cr);
const parts = cr.trim().split("/");
if (parts.length === 1) return Number(parts[0]);
else if (parts.length === 2) return Number(parts[0]) / Number(parts[1]);
else return 0;
};
Parser.numberToCr = function (number, safe) {
// avoid dying if already-converted number is passed in
if (safe && typeof number === "string" && Parser.CRS.includes(number)) return number;
if (number == null) return "Unknown";
return Parser.numberToFractional(number);
};
Parser.crToPb = function (cr) {
if (cr === "Unknown" || cr == null) return 0;
cr = cr.cr || cr;
if (Parser.crToNumber(cr) < 5) return 2;
return Math.ceil(cr / 4) + 1;
};
Parser.levelToPb = function (level) {
if (!level) return 2;
return Math.ceil(level / 4) + 1;
};
Parser.SKILL_TO_ATB_ABV = {
"athletics": "str",
"acrobatics": "dex",
"sleight of hand": "dex",
"stealth": "dex",
"arcana": "int",
"history": "int",
"investigation": "int",
"nature": "int",
"religion": "int",
"animal handling": "wis",
"insight": "wis",
"medicine": "wis",
"perception": "wis",
"survival": "wis",
"deception": "cha",
"intimidation": "cha",
"performance": "cha",
"persuasion": "cha"
};
Parser.skillToAbilityAbv = function (skill) {
return Parser._parse_aToB(Parser.SKILL_TO_ATB_ABV, skill);
};
Parser.SKILL_TO_SHORT = {
"athletics": "ath",
"acrobatics": "acro",
"sleight of hand": "soh",
"stealth": "slth",
"arcana": "arc",
"history": "hist",
"investigation": "invn",
"nature": "natr",
"religion": "reli",
"animal handling": "hndl",
"insight": "ins",
"medicine": "med",
"perception": "perp",
"survival": "surv",
"deception": "decp",
"intimidation": "intm",
"performance": "perf",
"persuasion": "pers"
};
Parser.skillToShort = function (skill) {
return Parser._parse_aToB(Parser.SKILL_TO_SHORT, skill);
};
Parser.LANGUAGES_STANDARD = [
"Common",
"Dwarvish",
"Elvish",
"Giant",
"Gnomish",
"Goblin",
"Halfling",
"Orc"
];
Parser.LANGUAGES_EXOTIC = [
"Abyssal",
"Celestial",
"Draconic",
"Deep",
"Infernal",
"Primordial",
"Sylvan",
"Undercommon"
];
Parser.LANGUAGES_SECRET = [
"Druidic",
"Thieves' cant"
];
Parser.LANGUAGES_ALL = [
...Parser.LANGUAGES_STANDARD,
...Parser.LANGUAGES_EXOTIC,
...Parser.LANGUAGES_SECRET
].sort();
Parser.dragonColorToFull = function (c) {
return Parser._parse_aToB(Parser.DRAGON_COLOR_TO_FULL, c);
};
Parser.DRAGON_COLOR_TO_FULL = {
B: "black",
U: "blue",
G: "green",
R: "red",
W: "white",
A: "brass",
Z: "bronze",
C: "copper",
O: "gold",
S: "silver"
};
Parser.acToFull = function (ac) {
if (typeof ac === "string") return ac; // handle classic format
const renderer = Renderer.get();
let stack = "";
for (let i = 0; i < ac.length; ++i) {
const cur = ac[i];
const nxt = ac[i + 1];
if (cur.ac) {
if (i === 0 && cur.braces) stack += "(";
stack += cur.ac;
if (cur.from) stack += ` (${cur.from.map(it => renderer.render(it)).join(", ")})`;
if (cur.condition) stack += ` ${renderer.render(cur.condition)}`;
if (cur.braces) stack += ")";
} else {
stack += cur;
}
if (nxt) {
if (nxt.braces) stack += " (";
else stack += ", ";
}
}
return stack.trim();
};
MONSTER_COUNT_TO_XP_MULTIPLIER = [1, 1.5, 2, 2, 2, 2, 2.5, 2.5, 2.5, 2.5, 3, 3, 3, 3, 4];
Parser.numMonstersToXpMult = function (num, playerCount = 3) {
const baseVal = (() => {
if (num >= MONSTER_COUNT_TO_XP_MULTIPLIER.length) return 4;
return MONSTER_COUNT_TO_XP_MULTIPLIER[num - 1];
})();
if (playerCount < 3) return baseVal >= 3 ? baseVal + 1 : baseVal + 0.5;
else if (playerCount > 5) {
return baseVal === 4 ? 3 : baseVal - 0.5;
} else return baseVal;
};
Parser.armorFullToAbv = function (armor) {
return Parser._parse_bToA(Parser.ARMOR_ABV_TO_FULL, armor);
};
Parser._getSourceStringFromSource = function (source) {
if (source && source.source) return source.source;
return source;
};
Parser.hasSourceFull = function (source) {
return !!Parser.SOURCE_JSON_TO_FULL[source];
};
Parser.hasSourceAbv = function (source) {
return !!Parser.SOURCE_JSON_TO_ABV[source];
};
Parser.sourceJsonToFull = function (source) {
source = Parser._getSourceStringFromSource(source);
if (Parser.hasSourceFull(source)) return Parser._parse_aToB(Parser.SOURCE_JSON_TO_FULL, source).replace(/'/g, "\u2019");
if (BrewUtil.hasSourceJson(source)) return BrewUtil.sourceJsonToFull(source).replace(/'/g, "\u2019");
return Parser._parse_aToB(Parser.SOURCE_JSON_TO_FULL, source).replace(/'/g, "\u2019");
};
Parser.sourceJsonToFullCompactPrefix = function (source) {
return Parser.sourceJsonToFull(source)
.replace(UA_PREFIX, UA_PREFIX_SHORT)
.replace(AL_PREFIX, AL_PREFIX_SHORT)
.replace(PS_PREFIX, PS_PREFIX_SHORT);
};
Parser.sourceJsonToAbv = function (source) {
source = Parser._getSourceStringFromSource(source);
if (Parser.hasSourceAbv(source)) return Parser._parse_aToB(Parser.SOURCE_JSON_TO_ABV, source);
if (BrewUtil.hasSourceJson(source)) return BrewUtil.sourceJsonToAbv(source);
return Parser._parse_aToB(Parser.SOURCE_JSON_TO_ABV, source);
};
Parser.sourceJsonToColor = function (source) {
return `source${Parser.sourceJsonToAbv(source)}`;
};
Parser.stringToSlug = function (str) {
return str.trim().toLowerCase().replace(/[^\w ]+/g, "").replace(/ +/g, "-");
};
Parser.stringToCasedSlug = function (str) {
return str.replace(/[^\w ]+/g, "").replace(/ +/g, "-");
};
Parser.itemTypeToFull = function (type) {
return Parser._parse_aToB(Parser.ITEM_TYPE_JSON_TO_ABV, type);
};
Parser.itemValueToFull = function (item, isShortForm) {
if (item.value) {
const { coin, mult } = Parser.getItemCurrencyAndMultiplier(item.value, item.valueConversion);
return `${(item.value * mult).toLocaleString()} ${coin}`;
} else if (item.valueMult) return isShortForm ? `×${item.valueMult}` : `base value ×${item.valueMult}`;
return "";
};
Parser._ITEM_PRICE_CONVERSION_TABLE = [
{
coin: "cp",
mult: 1
},
{
coin: "sp",
mult: 0.1
},
{
coin: "gp",
mult: 0.01,
isFallback: true
}
];
Parser.getItemCurrencyAndMultiplier = function (value, valueConversionId) {
const fromBrew = valueConversionId ? MiscUtil.get(BrewUtil.homebrewMeta, "itemValueConversions", valueConversionId) : null;
const conversionTable = fromBrew && fromBrew.length ? fromBrew : Parser._ITEM_PRICE_CONVERSION_TABLE;
if (conversionTable !== Parser._ITEM_PRICE_CONVERSION_TABLE) conversionTable.sort((a, b) => SortUtil.ascSort(b.mult, a.mult));
if (!value) return conversionTable.find(it => it.isFallback) || conversionTable[0];
if (conversionTable.length === 1) return conversionTable[0];
if (!Number.isInteger(value) && value < conversionTable[0].mult) return conversionTable[0];
for (let i = conversionTable.length - 1; i >= 0; --i) {
if (Number.isInteger(value * conversionTable[i].mult)) return conversionTable[i];
}
return conversionTable.last();
};
Parser.COIN_ABVS = ["cp", "sp", "ep", "gp", "pp"];
Parser.COIN_ABV_TO_FULL = {
"cp": "copper pieces",
"sp": "silver pieces",
"ep": "electrum pieces",
"gp": "gold pieces",
"pp": "platinum pieces"
};
Parser.COIN_CONVERSIONS = [1, 10, 50, 100, 1000];
Parser.coinAbvToFull = function (coin) {
return Parser._parse_aToB(Parser.COIN_ABV_TO_FULL, coin);
};
Parser.itemWeightToFull = function (item, isShortForm) {
return item.weight
? `${item.weight} lb.${(item.weightNote ? ` ${item.weightNote}` : "")}`
: item.weightMult ? isShortForm ? `×${item.weightMult}` : `base weight ×${item.weightMult}` : "";
};
Parser._decimalSeparator = (0.1).toLocaleString().substring(1, 2);
Parser._numberCleanRegexp = Parser._decimalSeparator === "." ? new RegExp(/[\s,]*/g, "g") : new RegExp(/[\s.]*/g, "g");
Parser._costSplitRegexp = Parser._decimalSeparator === "." ? new RegExp(/(\d+(\.\d+)?)([csegp]p)/) : new RegExp(/(\d+(,\d+)?)([csegp]p)/);
Parser.weightValueToNumber = function (value) {
if (!value) return 0;
if (Number(value)) return Number(value);
else throw new Error(`Badly formatted value ${value}`);
};
Parser.dmgTypeToFull = function (dmgType) {
return Parser._parse_aToB(Parser.DMGTYPE_JSON_TO_FULL, dmgType);
};
Parser.skillToExplanation = function (skillType) {
const fromBrew = MiscUtil.get(BrewUtil.homebrewMeta, "skills", skillType);
if (fromBrew) return fromBrew;
return Parser._parse_aToB(Parser.SKILL_JSON_TO_FULL, skillType);
};
Parser.senseToExplanation = function (senseType) {
senseType = senseType.toLowerCase();
const fromBrew = MiscUtil.get(BrewUtil.homebrewMeta, "senses", senseType);
if (fromBrew) return fromBrew;
return Parser._parse_aToB(Parser.SENSE_JSON_TO_FULL, senseType, ["No explanation available."]);
};
// sp-prefix functions are for parsing spell data, and shared with the roll20 script
Parser.spSchoolAndSubschoolsAbvsToFull = function (school, subschools) {
if (!subschools || !subschools.length) return Parser.spSchoolAbvToFull(school);
else return `${Parser.spSchoolAbvToFull(school)} (${subschools.map(sub => Parser.spSchoolAbvToFull(sub)).join(", ")})`;
};
Parser.spSchoolAbvToFull = function (schoolOrSubschool) {
const out = Parser._parse_aToB(Parser.SP_SCHOOL_ABV_TO_FULL, schoolOrSubschool);
if (Parser.SP_SCHOOL_ABV_TO_FULL[schoolOrSubschool]) return out;
if (BrewUtil.homebrewMeta && BrewUtil.homebrewMeta.spellSchools && BrewUtil.homebrewMeta.spellSchools[schoolOrSubschool]) return BrewUtil.homebrewMeta.spellSchools[schoolOrSubschool].full;
return out;
};
Parser.spSchoolAndSubschoolsAbvsShort = function (school, subschools) {
if (!subschools || !subschools.length) return Parser.spSchoolAbvToShort(school);
else return `${Parser.spSchoolAbvToShort(school)} (${subschools.map(sub => Parser.spSchoolAbvToShort(sub)).join(", ")})`;
};
Parser.spSchoolAbvToShort = function (school) {
const out = Parser._parse_aToB(Parser.SP_SCHOOL_ABV_TO_SHORT, school);
if (Parser.SP_SCHOOL_ABV_TO_SHORT[school]) return out;
if (BrewUtil.homebrewMeta && BrewUtil.homebrewMeta.spellSchools && BrewUtil.homebrewMeta.spellSchools[school]) return BrewUtil.homebrewMeta.spellSchools[school].short;
return out;
};
Parser.getOrdinalForm = function (i) {
i = Number(i);
if (isNaN(i)) return "";
const j = i % 10; const k = i % 100;
if (j === 1 && k !== 11) return `${i}st`;
if (j === 2 && k !== 12) return `${i}nd`;
if (j === 3 && k !== 13) return `${i}rd`;
return `${i}th`;
};
Parser.spLevelToFull = function (level) {
if (level === 0) return STR_CANTRIP;
else return Parser.getOrdinalForm(level);
};
Parser.getArticle = function (str) {
return /^[aeiou]/.test(str) ? "an" : "a";
};
Parser.spLevelToFullLevelText = function (level, dash) {
return `${Parser.spLevelToFull(level)}${(level === 0 ? "s" : `${dash ? "-" : " "}level`)}`;
};
Parser.spMetaToFull = function (meta) {
if (!meta) return "";
const metaTags = Object.entries(meta)
.filter(([_, v]) => v)
.sort(SortUtil.ascSort)
.map(([k]) => k);
if (metaTags.length) return ` (${metaTags.join(", ")})`;
return "";
};
Parser.spLevelSchoolMetaToFull = function (level, school, meta, subschools) {
const levelPart = level === 0 ? Parser.spLevelToFull(level).toLowerCase() : Parser.spLevelToFull(level) + "-level";
let levelSchoolStr = level === 0 ? `${Parser.spSchoolAndSubschoolsAbvsToFull(school, subschools)} ${levelPart}` : `${levelPart} ${Parser.spSchoolAndSubschoolsAbvsToFull(school, subschools).toLowerCase()}`;
return levelSchoolStr + Parser.spMetaToFull(meta);
};
Parser.spTimeListToFull = function (times, isStripTags) {
return times.map(t => `${Parser.getTimeToFull(t)}${t.condition ? `, ${isStripTags ? Renderer.stripTags(t.condition) : Renderer.get().render(t.condition)}` : ""}`).join(" or ");
};
Parser.getTimeToFull = function (time) {
return `${time.number} ${time.unit === "bonus" ? "bonus action" : time.unit}${time.number > 1 ? "s" : ""}`;
};
RNG_SPECIAL = "special";
RNG_POINT = "point";
RNG_LINE = "line";
RNG_CUBE = "cube";
RNG_CONE = "cone";
RNG_RADIUS = "radius";
RNG_SPHERE = "sphere";
RNG_HEMISPHERE = "hemisphere";
RNG_CYLINDER = "cylinder"; // homebrew only
RNG_SELF = "self";
RNG_SIGHT = "sight";
RNG_UNLIMITED = "unlimited";
RNG_UNLIMITED_SAME_PLANE = "plane";
RNG_TOUCH = "touch";
Parser.SP_RANGE_TYPE_TO_FULL = {
[RNG_SPECIAL]: "Special",
[RNG_POINT]: "Point",
[RNG_LINE]: "Line",
[RNG_CUBE]: "Cube",
[RNG_CONE]: "Cone",
[RNG_RADIUS]: "Radius",
[RNG_SPHERE]: "Sphere",
[RNG_HEMISPHERE]: "Hemisphere",
[RNG_CYLINDER]: "Cylinder",
[RNG_SELF]: "Self",
[RNG_SIGHT]: "Sight",
[RNG_UNLIMITED]: "Unlimited",
[RNG_UNLIMITED_SAME_PLANE]: "Unlimited on the same plane",
[RNG_TOUCH]: "Touch"
};
Parser.spRangeTypeToFull = function (range) {
return Parser._parse_aToB(Parser.SP_RANGE_TYPE_TO_FULL, range);
};
UNT_FEET = "feet";
UNT_MILES = "miles";
Parser.SP_DIST_TYPE_TO_FULL = {
[UNT_FEET]: "Feet",
[UNT_MILES]: "Miles",
[RNG_SELF]: Parser.SP_RANGE_TYPE_TO_FULL[RNG_SELF],
[RNG_TOUCH]: Parser.SP_RANGE_TYPE_TO_FULL[RNG_TOUCH],
[RNG_SIGHT]: Parser.SP_RANGE_TYPE_TO_FULL[RNG_SIGHT],
[RNG_UNLIMITED]: Parser.SP_RANGE_TYPE_TO_FULL[RNG_UNLIMITED],
[RNG_UNLIMITED_SAME_PLANE]: Parser.SP_RANGE_TYPE_TO_FULL[RNG_UNLIMITED_SAME_PLANE]
};
Parser.spDistanceTypeToFull = function (range) {
return Parser._parse_aToB(Parser.SP_DIST_TYPE_TO_FULL, range);
};
Parser.SP_RANGE_TO_ICON = {
[RNG_SPECIAL]: "fa-star",
[RNG_POINT]: "",
[RNG_LINE]: "fa-grip-lines-vertical",
[RNG_CUBE]: "fa-cube",
[RNG_CONE]: "fa-traffic-cone",
[RNG_RADIUS]: "fa-hockey-puck",
[RNG_SPHERE]: "fa-globe",
[RNG_HEMISPHERE]: "fa-globe",
[RNG_CYLINDER]: "fa-database",
[RNG_SELF]: "fa-street-view",
[RNG_SIGHT]: "fa-eye",
[RNG_UNLIMITED_SAME_PLANE]: "fa-globe-americas",
[RNG_UNLIMITED]: "fa-infinity",
[RNG_TOUCH]: "fa-hand-paper"
};
Parser.spRangeTypeToIcon = function (range) {
return Parser._parse_aToB(Parser.SP_RANGE_TO_ICON, range);
};
Parser.spRangeToShortHtml = function (range) {
switch (range.type) {
case RNG_SPECIAL: return `<span class="fas ${Parser.spRangeTypeToIcon(range.type)} help--subtle" title="Special"/>`;
case RNG_POINT: return Parser.spRangeToShortHtml._renderPoint(range);
case RNG_LINE:
case RNG_CUBE:
case RNG_CONE:
case RNG_RADIUS:
case RNG_SPHERE:
case RNG_HEMISPHERE:
case RNG_CYLINDER:
return Parser.spRangeToShortHtml._renderArea(range);
}
};
Parser.spRangeToShortHtml._renderPoint = function (range) {
const dist = range.distance;
switch (dist.type) {
case RNG_SELF:
case RNG_SIGHT:
case RNG_UNLIMITED:
case RNG_UNLIMITED_SAME_PLANE:
case RNG_SPECIAL:
case RNG_TOUCH: return `<span class="fas ${Parser.spRangeTypeToIcon(dist.type)} help--subtle" title="${Parser.spRangeTypeToFull(dist.type)}"/>`;
case UNT_FEET:
case UNT_MILES:
default:
return `${dist.amount} <span class="small">${Parser.getSingletonUnit(dist.type, true)}</span>`;
}
};
Parser.spRangeToShortHtml._renderArea = function (range) {
const size = range.distance;
return `<span class="fas ${Parser.spRangeTypeToIcon(RNG_SELF)} help--subtle" title="Self"/> ${size.amount}<span class="small">-${Parser.getSingletonUnit(size.type, true)}</span> ${Parser.spRangeToShortHtml._getAreaStyleString(range)}`;
};
Parser.spRangeToShortHtml._getAreaStyleString = function (range) {
return `<span class="fas ${Parser.spRangeTypeToIcon(range.type)} help--subtle" title="${Parser.spRangeTypeToFull(range.type)}"/>`
};
Parser.spRangeToFull = function (range) {
switch (range.type) {
case RNG_SPECIAL: return Parser.spRangeTypeToFull(range.type);
case RNG_POINT: return Parser.spRangeToFull._renderPoint(range);
case RNG_LINE:
case RNG_CUBE:
case RNG_CONE:
case RNG_RADIUS:
case RNG_SPHERE:
case RNG_HEMISPHERE:
case RNG_CYLINDER:
return Parser.spRangeToFull._renderArea(range);
}
};
Parser.spRangeToFull._renderPoint = function (range) {
const dist = range.distance;
switch (dist.type) {
case RNG_SELF:
case RNG_SIGHT:
case RNG_UNLIMITED:
case RNG_UNLIMITED_SAME_PLANE:
case RNG_SPECIAL:
case RNG_TOUCH: return Parser.spRangeTypeToFull(dist.type);
case UNT_FEET:
case UNT_MILES:
default:
return `${dist.amount} ${dist.amount === 1 ? Parser.getSingletonUnit(dist.type) : dist.type}`;
}
};
Parser.spRangeToFull._renderArea = function (range) {
const size = range.distance;
return `Self (${size.amount}-${Parser.getSingletonUnit(size.type)}${Parser.spRangeToFull._getAreaStyleString(range)}${range.type === RNG_CYLINDER ? `, ${size.amountSecondary}-${Parser.getSingletonUnit(size.typeSecondary)}-high cylinder` : ""})`;
};
Parser.spRangeToFull._getAreaStyleString = function (range) {
switch (range.type) {
case RNG_SPHERE: return " radius";
case RNG_HEMISPHERE: return `-radius ${range.type}`;
case RNG_CYLINDER: return "-radius";
default: return ` ${range.type}`;
}
};
Parser.getSingletonUnit = function (unit, isShort) {
switch (unit) {
case UNT_FEET:
return isShort ? "ft." : "foot";
case UNT_MILES:
return isShort ? "mi." : "mile";
default: {
const fromBrew = MiscUtil.get(BrewUtil.homebrewMeta, "spellDistanceUnits", unit, "singular");
if (fromBrew) return fromBrew;
if (unit.charAt(unit.length - 1) === "s") return unit.slice(0, -1);
return unit;
}
}
};
Parser.RANGE_TYPES = [
{ type: RNG_POINT, hasDistance: true, isRequireAmount: false },
{ type: RNG_LINE, hasDistance: true, isRequireAmount: true },
{ type: RNG_CUBE, hasDistance: true, isRequireAmount: true },
{ type: RNG_CONE, hasDistance: true, isRequireAmount: true },
{ type: RNG_RADIUS, hasDistance: true, isRequireAmount: true },
{ type: RNG_SPHERE, hasDistance: true, isRequireAmount: true },
{ type: RNG_HEMISPHERE, hasDistance: true, isRequireAmount: true },
{ type: RNG_CYLINDER, hasDistance: true, isRequireAmount: true },
{ type: RNG_SPECIAL, hasDistance: false, isRequireAmount: false }
];
Parser.DIST_TYPES = [
{ type: RNG_SELF, hasAmount: false },
{ type: RNG_TOUCH, hasAmount: false },
{ type: UNT_FEET, hasAmount: true },
{ type: UNT_MILES, hasAmount: true },
{ type: RNG_SIGHT, hasAmount: false },
{ type: RNG_UNLIMITED_SAME_PLANE, hasAmount: false },
{ type: RNG_UNLIMITED, hasAmount: false }
];
Parser.spComponentsToFull = function (comp, level) {
if (!comp) return "None";
const out = [];
if (comp.v) out.push("V");
if (comp.s) out.push("S");
if (comp.m != null) out.push(`M${comp.m !== true ? ` (${comp.m.text != null ? comp.m.text : comp.m})` : ""}`);
if (comp.r) out.push(`R (${level} gp)`);
return out.join(", ") || "None";
};
Parser.SP_END_TYPE_TO_FULL = {
"dispel": "dispelled",
"trigger": "triggered",
"discharge": "discharged"
};
Parser.spEndTypeToFull = function (type) {
return Parser._parse_aToB(Parser.SP_END_TYPE_TO_FULL, type);
};
Parser.spDurationToFull = function (dur) {
return dur.map(d => {
switch (d.type) {
case "special":
return "Special";
case "instant":
return `Instantaneous${d.condition ? ` (${d.condition})` : ""}`;
case "timed":
return `${d.concentration ? "Concentration, " : ""}${d.concentration ? "u" : d.duration.upTo ? "U" : ""}${d.concentration || d.duration.upTo ? "p to " : ""}${d.duration.amount} ${d.duration.amount === 1 ? d.duration.type : `${d.duration.type}s`}`;
case "permanent":
if (d.ends) {
return `Until ${d.ends.map(m => Parser.spEndTypeToFull(m)).join(" or ")}`;
} else {
return "Permanent";
}
}
}).join(" or ") + (dur.length > 1 ? " (see below)" : "");
};
Parser.DURATION_TYPES = [
{ type: "instant", full: "Instantaneous" },
{ type: "timed", hasAmount: true },
{ type: "permanent", hasEnds: true },
{ type: "special" }
];
Parser.DURATION_AMOUNT_TYPES = [
"turn",
"round",
"minute",
"hour",
"day",
"week",
"year"
];
Parser.spClassesToFull = function (classes, textOnly) {
const fromSubclasses = Parser.spSubclassesToFull(classes, textOnly);
return Parser.spMainClassesToFull(classes, textOnly) + (fromSubclasses ? ", " + fromSubclasses : "");
};
Parser.spMainClassesToFull = function (classes, textOnly = false, prop = "fromClassList") {
if (!classes) return "";
return (classes[prop] || [])
.sort((a, b) => SortUtil.ascSort(a.name, b.name))
.map(c => textOnly ? c.name : `<a title="Source: ${Parser.sourceJsonToFull(c.source)}" href="${UrlUtil.PG_CLASSES}#${UrlUtil.URL_TO_HASH_BUILDER[UrlUtil.PG_CLASSES](c)}">${c.name}</a>`)
.join(", ");
};
Parser.spSubclassesToFull = function (classes, textOnly) {
if (!classes || !classes.fromSubclass) return "";
return classes.fromSubclass
.sort((a, b) => {
const byName = SortUtil.ascSort(a.class.name, b.class.name);
return byName || SortUtil.ascSort(a.subclass.name, b.subclass.name);
})
.map(c => Parser._spSubclassItem(c, textOnly))
.join(", ");
};
Parser._spSubclassItem = function (fromSubclass, textOnly, subclassLookup) {
const c = fromSubclass.class;
const sc = fromSubclass.subclass;
const text = `${sc.name}${sc.subSubclass ? ` (${sc.subSubclass})` : ""}`;
if (textOnly) return text;
const classPart = `<a href="${UrlUtil.PG_CLASSES}#${UrlUtil.URL_TO_HASH_BUILDER[UrlUtil.PG_CLASSES](c)}" title="Source: ${Parser.sourceJsonToFull(c.source)}">${c.name}</a>`;
const fromLookup = subclassLookup ? MiscUtil.get(subclassLookup, c.source, c.name, sc.source, sc.name) : null;
if (fromLookup) return `<a class="italic" href="${UrlUtil.PG_CLASSES}#${UrlUtil.URL_TO_HASH_BUILDER[UrlUtil.PG_CLASSES](c)}${HASH_PART_SEP}${HASH_SUBCLASS}${UrlUtil.encodeForHash(fromLookup)}${HASH_SUB_LIST_SEP}${UrlUtil.encodeForHash(sc.source)}" title="Source: ${Parser.sourceJsonToFull(fromSubclass.subclass.source)}">${text}</a> ${classPart}`;
else return `<span class="italic" title="Source: ${Parser.sourceJsonToFull(fromSubclass.subclass.source)}">${text}</span> ${classPart}`;
};
Parser.SPELL_ATTACK_TYPE_TO_FULL = {};
Parser.SPELL_ATTACK_TYPE_TO_FULL["M"] = "Melee";
Parser.SPELL_ATTACK_TYPE_TO_FULL["R"] = "Ranged";
Parser.SPELL_ATTACK_TYPE_TO_FULL["O"] = "Other/Unknown";
Parser.spAttackTypeToFull = function (type) {
return Parser._parse_aToB(Parser.SPELL_ATTACK_TYPE_TO_FULL, type);
};
Parser.SPELL_AREA_TYPE_TO_FULL = {
ST: "Single Target",
MT: "Multiple Targets",
C: "Cube",
N: "Cone",
Y: "Cylinder",
S: "Sphere",
R: "Circle",
Q: "Square",
L: "Line",
H: "Hemisphere",
W: "Wall"
};
Parser.spAreaTypeToFull = function (type) {
return Parser._parse_aToB(Parser.SPELL_AREA_TYPE_TO_FULL, type);
};
Parser.SP_MISC_TAG_TO_FULL = {
HL: "Healing",
SGT: "Requires Sight",
PRM: "Permanent Effects",
SCL: "Scaling Effects",
SMN: "Summons Creature"
};
Parser.spMiscTagToFull = function (type) {
return Parser._parse_aToB(Parser.SP_MISC_TAG_TO_FULL, type);
};
Parser.SP_CASTER_PROGRESSION_TO_FULL = {
full: "Full",
"1/2": "Half",
"1/3": "One-Third"
};
Parser.spCasterProgressionToFull = function (type) {
return Parser._parse_aToB(Parser.SP_CASTER_PROGRESSION_TO_FULL, type);
};
// mon-prefix functions are for parsing monster data, and shared with the roll20 script
Parser.monTypeToFullObj = function (type) {
const out = { type: "", tags: [], asText: "" };
if (typeof type === "string") {
// handles e.g. "fey"
out.type = type;
out.asText = type;
return out;
}
const tempTags = [];
if (type.tags) {
for (const tag of type.tags) {
if (typeof tag === "string") {
// handles e.g. "fiend (devil)"
out.tags.push(tag);
tempTags.push(tag);
} else {
// handles e.g. "humanoid (Chondathan human)"
out.tags.push(tag.tag);
tempTags.push(`${tag.prefix} ${tag.tag}`);
}
}
}
out.type = type.type;
if (type.swarmSize) {
out.tags.push("swarm");
out.asText = `swarm of ${Parser.sizeAbvToFull(type.swarmSize).toLowerCase()} ${Parser.monTypeToPlural(type.type)}`;
} else {
out.asText = `${type.type}`;
}
if (tempTags.length) out.asText += ` (${tempTags.join(", ")})`;
return out;
};
Parser.monTypeToPlural = function (type) {
return Parser._parse_aToB(Parser.MON_TYPE_TO_PLURAL, type);
};
Parser.monCrToFull = function (cr, xp) {
if (cr == null) return "";
if (typeof cr === "string") return `${cr} (${xp != null ? Parser._addCommas(xp) : Parser.crToXp(cr)} XP)`;
else {
const stack = [Parser.monCrToFull(cr.cr, cr.xp)];
if (cr.lair) stack.push(`${Parser.monCrToFull(cr.lair)} when encountered in lair`);
if (cr.coven) stack.push(`${Parser.monCrToFull(cr.coven)} when part of a coven`);
return stack.join(" or ");
}
};
Parser.monImmResToFull = function (toParse) {
const outerLen = toParse.length;
let maxDepth = 0;
if (outerLen === 1 && (toParse[0].immune || toParse[0].resist)) {
return toParse.map(it => toString(it, -1)).join(maxDepth ? "; " : ", ");
}
function toString(it, depth = 0) {
maxDepth = Math.max(maxDepth, depth);
if (typeof it === "string") {
return it;
} else if (it.special) {
return it.special;
} else {
let stack = it.preNote ? `${it.preNote} ` : "";
const prop = it.immune ? "immune" : it.resist ? "resist" : it.vulnerable ? "vulnerable" : null;
if (prop) {
const toJoin = it[prop].map(nxt => toString(nxt, depth + 1));
stack += depth ? toJoin.join(maxDepth ? "; " : ", ") : toJoin.joinConjunct(", ", " and ");
}
if (it.note) stack += ` ${it.note}`;
return stack;
}
}
function serialJoin(arr) {
if (arr.length <= 1) return arr.join("");
let out = "";
for (let i = 0; i < arr.length - 1; ++i) {
const it = arr[i];
const nxt = arr[i + 1];
out += it;
out += (it.includes(",") || nxt.includes(",")) ? "; " : ", ";
}
out += arr.last();
return out;
}
return serialJoin(toParse.map(it => toString(it)));
};
Parser.monCondImmToFull = function (condImm, isPlainText) {
function render(condition) {
return isPlainText ? condition : Renderer.get().render(`{@condition ${condition}}`);
}
return condImm.map(it => {
if (it.special) return it.special;
if (it.conditionImmune) return `${it.preNote ? `${it.preNote} ` : ""}${it.conditionImmune.map(render).join(", ")}${it.note ? ` ${it.note}` : ""}`;
return render(it);
}).join(", ");
};
Parser.MON_SENSE_TAG_TO_FULL = {
"B": "blindsight",
"D": "darkvision",
"SD": "superior darkvision",
"T": "tremorsense",
"U": "truesight"
};
Parser.monSenseTagToFull = function (tag) {
return Parser._parse_aToB(Parser.MON_SENSE_TAG_TO_FULL, tag);
};
Parser.MON_SPELLCASTING_TAG_TO_FULL = {
"P": "Psionics",
"I": "Innate",
"F": "Form Only",
"S": "Shared",
"CB": "Class, Bard",
"CC": "Class, Cleric",
"CD": "Class, Druid",
"CP": "Class, Paladin",
"CR": "Class, Ranger",
"CS": "Class, Sorcerer",
"CL": "Class, Warlock",
"CW": "Class, Wizard"
};
Parser.monSpellcastingTagToFull = function (tag) {
return Parser._parse_aToB(Parser.MON_SPELLCASTING_TAG_TO_FULL, tag);
};
Parser.MON_MISC_TAG_TO_FULL = {
"AOE": "Has Areas of Effect",
"MW": "Has Melee Weapon Attacks",
"RW": "Has Ranged Weapon Attacks",
"RNG": "Has Ranged Weapons",
"RCH": "Has Reach Attacks",
"THW": "Has Thrown Weapons"
};
Parser.monMiscTagToFull = function (tag) {
return Parser._parse_aToB(Parser.MON_MISC_TAG_TO_FULL, tag);
};
Parser.ENVIRONMENTS = ["arctic", "coastal", "desert", "forest", "grassland", "hill", "mountain", "swamp", "underdark", "underwater", "urban"];
// psi-prefix functions are for parsing psionic data, and shared with the roll20 script
Parser.PSI_ABV_TYPE_TALENT = "T";
Parser.PSI_ABV_TYPE_DISCIPLINE = "D";
Parser.PSI_ORDER_NONE = "None";
Parser.psiTypeToFull = (type) => {
if (type === Parser.PSI_ABV_TYPE_TALENT) return "Talent";
else if (type === Parser.PSI_ABV_TYPE_DISCIPLINE) return "Discipline";
else return type;
};
Parser.psiOrderToFull = (order) => {
return order === undefined ? Parser.PSI_ORDER_NONE : order;
};
Parser.prereqSpellToFull = function (spell) {
if (spell) {
const [text, suffix] = spell.split("#");
if (!suffix) return Renderer.get().render(`{@spell ${spell}}`);
else if (suffix === "c") return Renderer.get().render(`{@spell ${text}} cantrip`);
else if (suffix === "x") return Renderer.get().render("{@spell hex} spell or a warlock feature that curses");
} else return STR_NONE;
};
Parser.prereqPactToFull = function (pact) {
if (pact === "Chain") return "Pact of the Chain";
if (pact === "Tome") return "Pact of the Tome";
if (pact === "Blade") return "Pact of the Blade";
if (pact === "Talisman") return "Pact of the Talisman";
return pact;
};
Parser.prereqPatronToShort = function (patron) {
if (patron === STR_ANY) return STR_ANY;
const mThe = /^The (.*?)$/.exec(patron);
if (mThe) return mThe[1];
return patron;
};
// NOTE: These need to be reflected in omnidexer.js to be indexed
Parser.OPT_FEATURE_TYPE_TO_FULL = {
AI: "Artificer Infusion",
ED: "Elemental Discipline",
EI: "Eldritch Invocation",
MM: "Metamagic",
"MV": "Maneuver",
"MV:B": "Maneuver, Battle Master",
"MV:C2-UA": "Maneuver, Cavalier V2 (UA)",
"AS:V1-UA": "Arcane Shot, V1 (UA)",
"AS:V2-UA": "Arcane Shot, V2 (UA)",
"AS": "Arcane Shot",
OTH: "Other",
"FS:F": "Fighting Style; Fighter",
"FS:B": "Fighting Style; Bard",
"FS:P": "Fighting Style; Paladin",
"FS:R": "Fighting Style; Ranger",
"PB": "Pact Boon",
"SHP:H": "Ship Upgrade, Hull",
"SHP:M": "Ship Upgrade, Movement",
"SHP:W": "Ship Upgrade, Weapon",
"SHP:F": "Ship Upgrade, Figurehead",
"SHP:O": "Ship Upgrade, Miscellaneous",
"IWM:W": "Infernal War Machine Variant, Weapon",
"IWM:A": "Infernal War Machine Upgrade, Armor",
"IWM:G": "Infernal War Machine Upgrade, Gadget",
"OR": "Onomancy Resonant",
"RN": "Rune Knight Rune",
"AF": "Alchemical Formula"
};
Parser.optFeatureTypeToFull = function (type) {
if (Parser.OPT_FEATURE_TYPE_TO_FULL[type]) return Parser.OPT_FEATURE_TYPE_TO_FULL[type];
if (BrewUtil.homebrewMeta && BrewUtil.homebrewMeta.optionalFeatureTypes && BrewUtil.homebrewMeta.optionalFeatureTypes[type]) return BrewUtil.homebrewMeta.optionalFeatureTypes[type];
return type;
};
Parser.alignmentAbvToFull = function (alignment) {
if (!alignment) return null; // used in sidekicks
if (typeof alignment === "object") {
if (alignment.special != null) {
// use in MTF Sacred Statue
return alignment.special;
} else {
// e.g. `{alignment: ["N", "G"], chance: 50}` or `{alignment: ["N", "G"]}`
return `${alignment.alignment.map(a => Parser.alignmentAbvToFull(a)).join(" ")}${alignment.chance ? ` (${alignment.chance}%)` : ""}`;
}
} else {
alignment = alignment.toUpperCase();
switch (alignment) {
case "L":
return "Lawful";
case "N":
return "Neutral";
case "NX":
return "Neutral (Law/Chaos axis)";
case "NY":
return "Neutral (Good/Evil axis)";
case "C":
return "Chaotic";
case "G":
return "Good";
case "E":
return "Evil";
// "special" values
case "U":
return "Unaligned";
case "A":
return "Any alignment";
}
return alignment;
}
};
Parser.alignmentListToFull = function (alignList) {
if (alignList.some(it => typeof it !== "string")) {
if (alignList.some(it => typeof it === "string")) throw new Error(`Mixed alignment types: ${JSON.stringify(alignList)}`);
// filter out any nonexistent alignments, as we don't care about "alignment does not exist" if there are other alignments
alignList = alignList.filter(it => it.alignment === undefined || it.alignment != null);
return alignList.map(it => it.special != null || it.chance != null ? Parser.alignmentAbvToFull(it) : Parser.alignmentListToFull(it.alignment)).join(" or ");
} else {
// assume all single-length arrays can be simply parsed
if (alignList.length === 1) return Parser.alignmentAbvToFull(alignList[0]);
// a pair of abv's, e.g. "L" "G"
if (alignList.length === 2) {
return alignList.map(a => Parser.alignmentAbvToFull(a)).join(" ");
}
if (alignList.length === 3) {
if (alignList.includes("NX") && alignList.includes("NY") && alignList.includes("N")) return "Any Neutral Alignment";
}
// longer arrays should have a custom mapping
if (alignList.length === 5) {
if (!alignList.includes("G")) return "Any Non-Good Alignment";
if (!alignList.includes("E")) return "Any Non-Evil Alignment";
if (!alignList.includes("L")) return "Any Non-Lawful Alignment";
if (!alignList.includes("C")) return "Any Non-Chaotic Alignment";
}
if (alignList.length === 4) {
if (!alignList.includes("L") && !alignList.includes("NX")) return "Any Chaotic Alignment";
if (!alignList.includes("G") && !alignList.includes("NY")) return "Any Evil Alignment";
if (!alignList.includes("C") && !alignList.includes("NX")) return "Any Lawful Alignment";
if (!alignList.includes("E") && !alignList.includes("NY")) return "Any Good Alignment";
}
throw new Error(`Unmapped alignment: ${JSON.stringify(alignList)}`);
}
};
Parser.weightToFull = function (lbs, isSmallUnit) {
const tons = Math.floor(lbs / 2000);
lbs = lbs - (2000 * tons);
return [
tons ? `${tons}${isSmallUnit ? `<span class="small ml-1">` : " "}ton${tons === 1 ? "" : "s"}${isSmallUnit ? `</span>` : ""}` : null,
lbs ? `${lbs}${isSmallUnit ? `<span class="small ml-1">` : " "}lb.${isSmallUnit ? `</span>` : ""}` : null
].filter(Boolean).join(", ");
};
Parser.ITEM_RARITIES = ["None", "Common", "Uncommon", "Rare", "Very Rare", "Legendary", "Artifact", "Unknown", "Unknown (Magic)", "Other"];
Parser.CAT_ID_CREATURE = 1;
Parser.CAT_ID_SPELL = 2;
Parser.CAT_ID_BACKGROUND = 3;
Parser.CAT_ID_ITEM = 4;
Parser.CAT_ID_CLASS = 5;
Parser.CAT_ID_CONDITION = 6;
Parser.CAT_ID_FEAT = 7;
Parser.CAT_ID_ELDRITCH_INVOCATION = 8;
Parser.CAT_ID_PSIONIC = 9;
Parser.CAT_ID_RACE = 10;
Parser.CAT_ID_OTHER_REWARD = 11;
Parser.CAT_ID_VARIANT_OPTIONAL_RULE = 12;
Parser.CAT_ID_ADVENTURE = 13;
Parser.CAT_ID_DEITY = 14;
Parser.CAT_ID_OBJECT = 15;
Parser.CAT_ID_TRAP = 16;
Parser.CAT_ID_HAZARD = 17;
Parser.CAT_ID_QUICKREF = 18;
Parser.CAT_ID_CULT = 19;
Parser.CAT_ID_BOON = 20;
Parser.CAT_ID_DISEASE = 21;
Parser.CAT_ID_METAMAGIC = 22;
Parser.CAT_ID_MANEUVER_BATTLEMASTER = 23;
Parser.CAT_ID_TABLE = 24;
Parser.CAT_ID_TABLE_GROUP = 25;
Parser.CAT_ID_MANEUVER_CAVALIER = 26;
Parser.CAT_ID_ARCANE_SHOT = 27;
Parser.CAT_ID_OPTIONAL_FEATURE_OTHER = 28;
Parser.CAT_ID_FIGHTING_STYLE = 29;
Parser.CAT_ID_CLASS_FEATURE = 30;
Parser.CAT_ID_VEHICLE = 31;
Parser.CAT_ID_PACT_BOON = 32;
Parser.CAT_ID_ELEMENTAL_DISCIPLINE = 33;
Parser.CAT_ID_ARTIFICER_INFUSION = 34;
Parser.CAT_ID_SHIP_UPGRADE = 35;
Parser.CAT_ID_INFERNAL_WAR_MACHINE_UPGRADE = 36;
Parser.CAT_ID_ONOMANCY_RESONANT = 37;
Parser.CAT_ID_RUNE_KNIGHT_RUNE = 37;
Parser.CAT_ID_ALCHEMICAL_FORMULA = 38;
Parser.CAT_ID_MANEUVER = 39;
Parser.CAT_ID_SUBCLASS = 40;
Parser.CAT_ID_SUBCLASS_FEATURE = 41;
Parser.CAT_ID_ACTION = 42;
Parser.CAT_ID_TO_FULL = {};
Parser.CAT_ID_TO_FULL[Parser.CAT_ID_CREATURE] = "Bestiary";
Parser.CAT_ID_TO_FULL[Parser.CAT_ID_SPELL] = "Spell";
Parser.CAT_ID_TO_FULL[Parser.CAT_ID_BACKGROUND] = "Background";
Parser.CAT_ID_TO_FULL[Parser.CAT_ID_ITEM] = "Item";
Parser.CAT_ID_TO_FULL[Parser.CAT_ID_CLASS] = "Class";
Parser.CAT_ID_TO_FULL[Parser.CAT_ID_CONDITION] = "Condition";
Parser.CAT_ID_TO_FULL[Parser.CAT_ID_FEAT] = "Feat";
Parser.CAT_ID_TO_FULL[Parser.CAT_ID_ELDRITCH_INVOCATION] = "Eldritch Invocation";
Parser.CAT_ID_TO_FULL[Parser.CAT_ID_PSIONIC] = "Psionic";
Parser.CAT_ID_TO_FULL[Parser.CAT_ID_RACE] = "Race";
Parser.CAT_ID_TO_FULL[Parser.CAT_ID_OTHER_REWARD] = "Other Reward";
Parser.CAT_ID_TO_FULL[Parser.CAT_ID_VARIANT_OPTIONAL_RULE] = "Variant/Optional Rule";
Parser.CAT_ID_TO_FULL[Parser.CAT_ID_ADVENTURE] = "Adventure";
Parser.CAT_ID_TO_FULL[Parser.CAT_ID_DEITY] = "Deity";
Parser.CAT_ID_TO_FULL[Parser.CAT_ID_OBJECT] = "Object";
Parser.CAT_ID_TO_FULL[Parser.CAT_ID_TRAP] = "Trap";
Parser.CAT_ID_TO_FULL[Parser.CAT_ID_HAZARD] = "Hazard";
Parser.CAT_ID_TO_FULL[Parser.CAT_ID_QUICKREF] = "Quick Reference";
Parser.CAT_ID_TO_FULL[Parser.CAT_ID_CULT] = "Cult";
Parser.CAT_ID_TO_FULL[Parser.CAT_ID_BOON] = "Boon";
Parser.CAT_ID_TO_FULL[Parser.CAT_ID_DISEASE] = "Disease";
Parser.CAT_ID_TO_FULL[Parser.CAT_ID_METAMAGIC] = "Metamagic";
Parser.CAT_ID_TO_FULL[Parser.CAT_ID_MANEUVER_BATTLEMASTER] = "Maneuver; Battlemaster";
Parser.CAT_ID_TO_FULL[Parser.CAT_ID_TABLE] = "Table";
Parser.CAT_ID_TO_FULL[Parser.CAT_ID_TABLE_GROUP] = "Table";
Parser.CAT_ID_TO_FULL[Parser.CAT_ID_MANEUVER_CAVALIER] = "Maneuver; Cavalier";
Parser.CAT_ID_TO_FULL[Parser.CAT_ID_ARCANE_SHOT] = "Arcane Shot";
Parser.CAT_ID_TO_FULL[Parser.CAT_ID_OPTIONAL_FEATURE_OTHER] = "Optional Feature";
Parser.CAT_ID_TO_FULL[Parser.CAT_ID_FIGHTING_STYLE] = "Fighting Style";
Parser.CAT_ID_TO_FULL[Parser.CAT_ID_CLASS_FEATURE] = "Class Feature";
Parser.CAT_ID_TO_FULL[Parser.CAT_ID_VEHICLE] = "Vehicle";
Parser.CAT_ID_TO_FULL[Parser.CAT_ID_PACT_BOON] = "Pact Boon";
Parser.CAT_ID_TO_FULL[Parser.CAT_ID_ELEMENTAL_DISCIPLINE] = "Elemental Discipline";
Parser.CAT_ID_TO_FULL[Parser.CAT_ID_ARTIFICER_INFUSION] = "Infusion";
Parser.CAT_ID_TO_FULL[Parser.CAT_ID_SHIP_UPGRADE] = "Ship Upgrade";
Parser.CAT_ID_TO_FULL[Parser.CAT_ID_INFERNAL_WAR_MACHINE_UPGRADE] = "Infernal War Machine Upgrade";
Parser.CAT_ID_TO_FULL[Parser.CAT_ID_ONOMANCY_RESONANT] = "Onomancy Resonant";
Parser.CAT_ID_TO_FULL[Parser.CAT_ID_RUNE_KNIGHT_RUNE] = "Rune Knight Rune";
Parser.CAT_ID_TO_FULL[Parser.CAT_ID_ALCHEMICAL_FORMULA] = "Alchemical Formula";
Parser.CAT_ID_TO_FULL[Parser.CAT_ID_MANEUVER] = "Maneuver";
Parser.CAT_ID_TO_FULL[Parser.CAT_ID_SUBCLASS] = "Subclass";
Parser.CAT_ID_TO_FULL[Parser.CAT_ID_SUBCLASS_FEATURE] = "Subclass Feature";
Parser.CAT_ID_TO_FULL[Parser.CAT_ID_ACTION] = "Action";
Parser.pageCategoryToFull = function (catId) {
return Parser._parse_aToB(Parser.CAT_ID_TO_FULL, catId);
};
Parser.CAT_ID_TO_PROP = {};
Parser.CAT_ID_TO_PROP[Parser.CAT_ID_CREATURE] = "monster";
Parser.CAT_ID_TO_PROP[Parser.CAT_ID_SPELL] = "spell";
Parser.CAT_ID_TO_PROP[Parser.CAT_ID_BACKGROUND] = "background";
Parser.CAT_ID_TO_PROP[Parser.CAT_ID_ITEM] = "item";
Parser.CAT_ID_TO_PROP[Parser.CAT_ID_CLASS] = "class";
Parser.CAT_ID_TO_PROP[Parser.CAT_ID_CONDITION] = "condition";
Parser.CAT_ID_TO_PROP[Parser.CAT_ID_FEAT] = "feat";
Parser.CAT_ID_TO_PROP[Parser.CAT_ID_PSIONIC] = "psionic";
Parser.CAT_ID_TO_PROP[Parser.CAT_ID_RACE] = "race";
Parser.CAT_ID_TO_PROP[Parser.CAT_ID_OTHER_REWARD] = "reward";
Parser.CAT_ID_TO_PROP[Parser.CAT_ID_VARIANT_OPTIONAL_RULE] = "variantrule";
Parser.CAT_ID_TO_PROP[Parser.CAT_ID_ADVENTURE] = "adventure";
Parser.CAT_ID_TO_PROP[Parser.CAT_ID_DEITY] = "deity";
Parser.CAT_ID_TO_PROP[Parser.CAT_ID_OBJECT] = "object";
Parser.CAT_ID_TO_PROP[Parser.CAT_ID_TRAP] = "trap";
Parser.CAT_ID_TO_PROP[Parser.CAT_ID_HAZARD] = "hazard";
Parser.CAT_ID_TO_PROP[Parser.CAT_ID_CULT] = "cult";
Parser.CAT_ID_TO_PROP[Parser.CAT_ID_BOON] = "boon";
Parser.CAT_ID_TO_PROP[Parser.CAT_ID_DISEASE] = "condition";
Parser.CAT_ID_TO_PROP[Parser.CAT_ID_TABLE] = "table";
Parser.CAT_ID_TO_PROP[Parser.CAT_ID_TABLE_GROUP] = "tableGroup";
Parser.CAT_ID_TO_PROP[Parser.CAT_ID_VEHICLE] = "vehicle";
Parser.CAT_ID_TO_PROP[Parser.CAT_ID_ELDRITCH_INVOCATION] = "optionalfeature";
Parser.CAT_ID_TO_PROP[Parser.CAT_ID_MANEUVER_CAVALIER] = "optionalfeature";
Parser.CAT_ID_TO_PROP[Parser.CAT_ID_ARCANE_SHOT] = "optionalfeature";
Parser.CAT_ID_TO_PROP[Parser.CAT_ID_OPTIONAL_FEATURE_OTHER] = "optionalfeature";
Parser.CAT_ID_TO_PROP[Parser.CAT_ID_FIGHTING_STYLE] = "optionalfeature";
Parser.CAT_ID_TO_PROP[Parser.CAT_ID_METAMAGIC] = "optionalfeature";
Parser.CAT_ID_TO_PROP[Parser.CAT_ID_MANEUVER_BATTLEMASTER] = "optionalfeature";
Parser.CAT_ID_TO_PROP[Parser.CAT_ID_PACT_BOON] = "optionalfeature";
Parser.CAT_ID_TO_PROP[Parser.CAT_ID_ELEMENTAL_DISCIPLINE] = "optionalfeature";
Parser.CAT_ID_TO_PROP[Parser.CAT_ID_ARTIFICER_INFUSION] = "optionalfeature";
Parser.CAT_ID_TO_PROP[Parser.CAT_ID_SHIP_UPGRADE] = "optionalfeature";
Parser.CAT_ID_TO_PROP[Parser.CAT_ID_INFERNAL_WAR_MACHINE_UPGRADE] = "optionalfeature";
Parser.CAT_ID_TO_PROP[Parser.CAT_ID_ONOMANCY_RESONANT] = "optionalfeature";
Parser.CAT_ID_TO_PROP[Parser.CAT_ID_RUNE_KNIGHT_RUNE] = "optionalfeature";
Parser.CAT_ID_TO_PROP[Parser.CAT_ID_ALCHEMICAL_FORMULA] = "optionalfeature";
Parser.CAT_ID_TO_PROP[Parser.CAT_ID_MANEUVER] = "optionalfeature";
Parser.CAT_ID_TO_PROP[Parser.CAT_ID_QUICKREF] = null;
Parser.CAT_ID_TO_PROP[Parser.CAT_ID_CLASS_FEATURE] = "class";
Parser.CAT_ID_TO_PROP[Parser.CAT_ID_SUBCLASS] = "subclass";
Parser.CAT_ID_TO_PROP[Parser.CAT_ID_SUBCLASS_FEATURE] = "subclass";
Parser.CAT_ID_TO_PROP[Parser.CAT_ID_ACTION] = "action";
Parser.pageCategoryToProp = function (catId) {
return Parser._parse_aToB(Parser.CAT_ID_TO_PROP, catId);
};
Parser.ABIL_ABVS = ["str", "dex", "con", "int", "wis", "cha"];
Parser.spClassesToCurrentAndLegacy = function (classes) {
const current = [];
const legacy = [];
classes.fromClassList.forEach(cls => {
if ((cls.name === "Artificer" && cls.source === "UAArtificer") || (cls.name === "Artificer (Revisited)" && cls.source === "UAArtificerRevisited")) legacy.push(cls);
else current.push(cls);
});
return [current, legacy];
}
/**
* Build a pair of strings; one with all current subclasses, one with all legacy subclasses
*
* @param classes a spell.classes JSON item
* @returns {*[]} A two-element array. First item is a string of all the current subclasses, second item a string of
* all the legacy/superceded subclasses
*/
Parser.spSubclassesToCurrentAndLegacyFull = function (classes, subclassLookup) {
const out = [[], []];
if (!classes.fromSubclass) return out;
const curNames = new Set();
const toCheck = [];
classes.fromSubclass
.sort((a, b) => {
const byName = SortUtil.ascSort(a.subclass.name, b.subclass.name);
return byName || SortUtil.ascSort(a.class.name, b.class.name);
})
.forEach(c => {
const nm = c.subclass.name;
const src = c.subclass.source;
const toAdd = Parser._spSubclassItem(c, false, subclassLookup);
if (SourceUtil.hasBeenReprinted(nm, src)) {
out[1].push(toAdd);
} else if (Parser.sourceJsonToFull(src).startsWith(UA_PREFIX) || Parser.sourceJsonToFull(src).startsWith(PS_PREFIX)) {
const cleanName = mapClassShortNameToMostRecent(nm.split("(")[0].trim().split(/v\d+/)[0].trim());
toCheck.push({ "name": cleanName, "ele": toAdd });
} else {
out[0].push(toAdd);
curNames.add(nm);
}
});
toCheck.forEach(n => {
if (curNames.has(n.name)) {
out[1].push(n.ele);
} else {
out[0].push(n.ele);
}
});
return [out[0].join(", "), out[1].join(", ")];
/**
* Get the most recent iteration of a subclass name
*/
function mapClassShortNameToMostRecent(shortName) {
switch (shortName) {
case "Favored Soul":
return "Divine Soul";
case "Undying Light":
return "Celestial";
case "Deep Stalker":
return "Gloom Stalker";
}
return shortName;
}
};
Parser.attackTypeToFull = function (attackType) {
return Parser._parse_aToB(Parser.ATK_TYPE_TO_FULL, attackType);
};
Parser.trapHazTypeToFull = function (type) {
return Parser._parse_aToB(Parser.TRAP_HAZARD_TYPE_TO_FULL, type);
};
Parser.TRAP_HAZARD_TYPE_TO_FULL = {
MECH: "Mechanical trap",
MAG: "Magical trap",
SMPL: "Simple trap",
CMPX: "Complex trap",
HAZ: "Hazard",
WTH: "Weather",
ENV: "Environmental Hazard",
WLD: "Wilderness Hazard",
GEN: "Generic"
};
Parser.tierToFullLevel = function (tier) {
return Parser._parse_aToB(Parser.TIER_TO_FULL_LEVEL, tier);
};
Parser.TIER_TO_FULL_LEVEL = {};
Parser.TIER_TO_FULL_LEVEL[1] = "level 1\u20144";
Parser.TIER_TO_FULL_LEVEL[2] = "level 5\u201410";
Parser.TIER_TO_FULL_LEVEL[3] = "level 11\u201416";
Parser.TIER_TO_FULL_LEVEL[4] = "level 17\u201420";
Parser.threatToFull = function (threat) {
return Parser._parse_aToB(Parser.THREAT_TO_FULL, threat);
};
Parser.THREAT_TO_FULL = {};
Parser.THREAT_TO_FULL[1] = "moderate";
Parser.THREAT_TO_FULL[2] = "dangerous";
Parser.THREAT_TO_FULL[3] = "deadly";
Parser.trapInitToFull = function (init) {
return Parser._parse_aToB(Parser.TRAP_INIT_TO_FULL, init);
};
Parser.TRAP_INIT_TO_FULL = {};
Parser.TRAP_INIT_TO_FULL[1] = "initiative count 10";
Parser.TRAP_INIT_TO_FULL[2] = "initiative count 20";
Parser.TRAP_INIT_TO_FULL[3] = "initiative count 20 and initiative count 10";
Parser.ATK_TYPE_TO_FULL = {};
Parser.ATK_TYPE_TO_FULL["MW"] = "Melee Weapon Attack";
Parser.ATK_TYPE_TO_FULL["RW"] = "Ranged Weapon Attack";
Parser.bookOrdinalToAbv = (ordinal, preNoSuff) => {
if (ordinal === undefined) return "";
switch (ordinal.type) {
case "part": return `${preNoSuff ? " " : ""}Part ${ordinal.identifier}${preNoSuff ? "" : " \u2014 "}`;
case "chapter": return `${preNoSuff ? " " : ""}Ch. ${ordinal.identifier}${preNoSuff ? "" : ": "}`;
case "episode": return `${preNoSuff ? " " : ""}Ep. ${ordinal.identifier}${preNoSuff ? "" : ": "}`;
case "appendix": return `${preNoSuff ? " " : ""}App. ${ordinal.identifier}${preNoSuff ? "" : ": "}`;
case "level": return `${preNoSuff ? " " : ""}Level ${ordinal.identifier}${preNoSuff ? "" : ": "}`;
default: throw new Error(`Unhandled ordinal type "${ordinal.type}"`);
}
};
Parser.nameToTokenName = function (name) {
return name
.normalize("NFD") // replace diactrics with their individual graphemes
.replace(/[\u0300-\u036f]/g, "") // remove accent graphemes
.replace(/Æ/g, "AE").replace(/æ/g, "ae")
.replace(/"/g, "");
};
SKL_ABV_ABJ = "A";
SKL_ABV_EVO = "V";
SKL_ABV_ENC = "E";
SKL_ABV_ILL = "I";
SKL_ABV_DIV = "D";
SKL_ABV_NEC = "N";
SKL_ABV_TRA = "T";
SKL_ABV_CON = "C";
SKL_ABV_PSI = "P";
Parser.SKL_ABVS = [
SKL_ABV_ABJ,
SKL_ABV_EVO,
SKL_ABV_ENC,
SKL_ABV_ILL,
SKL_ABV_DIV,
SKL_ABV_NEC,
SKL_ABV_TRA,
SKL_ABV_CON,
SKL_ABV_PSI
];
Parser.SP_TM_ACTION = "action";
Parser.SP_TM_B_ACTION = "bonus";
Parser.SP_TM_REACTION = "reaction";
Parser.SP_TM_ROUND = "round";
Parser.SP_TM_MINS = "minute";
Parser.SP_TM_HRS = "hour";
Parser.SP_TIME_SINGLETONS = [Parser.SP_TM_ACTION, Parser.SP_TM_B_ACTION, Parser.SP_TM_REACTION, Parser.SP_TM_ROUND];
Parser.SP_TIME_TO_FULL = {
[Parser.SP_TM_ACTION]: "Action",
[Parser.SP_TM_B_ACTION]: "Bonus Action",
[Parser.SP_TM_REACTION]: "Reaction",
[Parser.SP_TM_ROUND]: "Rounds",
[Parser.SP_TM_MINS]: "Minutes",
[Parser.SP_TM_HRS]: "Hours"
};
Parser.spTimeUnitToFull = function (timeUnit) {
return Parser._parse_aToB(Parser.SP_TIME_TO_FULL, timeUnit);
};
Parser.SP_TIME_TO_ABV = {
[Parser.SP_TM_ACTION]: "A",
[Parser.SP_TM_B_ACTION]: "BA",
[Parser.SP_TM_REACTION]: "R",
[Parser.SP_TM_ROUND]: "rnd",
[Parser.SP_TM_MINS]: "min",
[Parser.SP_TM_HRS]: "hr"
};
Parser.spTimeUnitToAbv = function (timeUnit) {
return Parser._parse_aToB(Parser.SP_TIME_TO_ABV, timeUnit);
};
Parser.spTimeToShort = function (time, isHtml) {
if (!time) return "";
return (time.number === 1 && Parser.SP_TIME_SINGLETONS.includes(time.unit))
? `${Parser.spTimeUnitToAbv(time.unit).uppercaseFirst()}${time.condition ? "*" : ""}`
: `${time.number} ${isHtml ? `<span class="small">` : ""}${Parser.spTimeUnitToAbv(time.unit)}${isHtml ? `</span>` : ""}${time.condition ? "*" : ""}`;
};
SKL_ABJ = "Abjuration";
SKL_EVO = "Evocation";
SKL_ENC = "Enchantment";
SKL_ILL = "Illusion";
SKL_DIV = "Divination";
SKL_NEC = "Necromancy";
SKL_TRA = "Transmutation";
SKL_CON = "Conjuration";
SKL_PSI = "Psionic";
Parser.SP_SCHOOL_ABV_TO_FULL = {};
Parser.SP_SCHOOL_ABV_TO_FULL[SKL_ABV_ABJ] = SKL_ABJ;
Parser.SP_SCHOOL_ABV_TO_FULL[SKL_ABV_EVO] = SKL_EVO;
Parser.SP_SCHOOL_ABV_TO_FULL[SKL_ABV_ENC] = SKL_ENC;
Parser.SP_SCHOOL_ABV_TO_FULL[SKL_ABV_ILL] = SKL_ILL;
Parser.SP_SCHOOL_ABV_TO_FULL[SKL_ABV_DIV] = SKL_DIV;
Parser.SP_SCHOOL_ABV_TO_FULL[SKL_ABV_NEC] = SKL_NEC;
Parser.SP_SCHOOL_ABV_TO_FULL[SKL_ABV_TRA] = SKL_TRA;
Parser.SP_SCHOOL_ABV_TO_FULL[SKL_ABV_CON] = SKL_CON;
Parser.SP_SCHOOL_ABV_TO_FULL[SKL_ABV_PSI] = SKL_PSI;
Parser.SP_SCHOOL_ABV_TO_SHORT = {};
Parser.SP_SCHOOL_ABV_TO_SHORT[SKL_ABV_ABJ] = "Abj.";
Parser.SP_SCHOOL_ABV_TO_SHORT[SKL_ABV_EVO] = "Evoc.";
Parser.SP_SCHOOL_ABV_TO_SHORT[SKL_ABV_ENC] = "Ench.";
Parser.SP_SCHOOL_ABV_TO_SHORT[SKL_ABV_ILL] = "Illu.";
Parser.SP_SCHOOL_ABV_TO_SHORT[SKL_ABV_DIV] = "Divin.";
Parser.SP_SCHOOL_ABV_TO_SHORT[SKL_ABV_NEC] = "Necro.";
Parser.SP_SCHOOL_ABV_TO_SHORT[SKL_ABV_TRA] = "Trans.";
Parser.SP_SCHOOL_ABV_TO_SHORT[SKL_ABV_CON] = "Conj.";
Parser.SP_SCHOOL_ABV_TO_SHORT[SKL_ABV_PSI] = "Psi.";
Parser.ATB_ABV_TO_FULL = {
"str": "Strength",
"dex": "Dexterity",
"con": "Constitution",
"int": "Intelligence",
"wis": "Wisdom",
"cha": "Charisma"
};
TP_ABERRATION = "aberration";
TP_BEAST = "beast";
TP_CELESTIAL = "celestial";
TP_CONSTRUCT = "construct";
TP_DRAGON = "dragon";
TP_ELEMENTAL = "elemental";
TP_FEY = "fey";
TP_FIEND = "fiend";
TP_GIANT = "giant";
TP_HUMANOID = "humanoid";
TP_MONSTROSITY = "monstrosity";
TP_OOZE = "ooze";
TP_PLANT = "plant";
TP_UNDEAD = "undead";
Parser.MON_TYPES = [TP_ABERRATION, TP_BEAST, TP_CELESTIAL, TP_CONSTRUCT, TP_DRAGON, TP_ELEMENTAL, TP_FEY, TP_FIEND, TP_GIANT, TP_HUMANOID, TP_MONSTROSITY, TP_OOZE, TP_PLANT, TP_UNDEAD];
Parser.MON_TYPE_TO_PLURAL = {};
Parser.MON_TYPE_TO_PLURAL[TP_ABERRATION] = "aberrations";
Parser.MON_TYPE_TO_PLURAL[TP_BEAST] = "beasts";
Parser.MON_TYPE_TO_PLURAL[TP_CELESTIAL] = "celestials";
Parser.MON_TYPE_TO_PLURAL[TP_CONSTRUCT] = "constructs";
Parser.MON_TYPE_TO_PLURAL[TP_DRAGON] = "dragons";
Parser.MON_TYPE_TO_PLURAL[TP_ELEMENTAL] = "elementals";
Parser.MON_TYPE_TO_PLURAL[TP_FEY] = "fey";
Parser.MON_TYPE_TO_PLURAL[TP_FIEND] = "fiends";
Parser.MON_TYPE_TO_PLURAL[TP_GIANT] = "giants";
Parser.MON_TYPE_TO_PLURAL[TP_HUMANOID] = "humanoids";
Parser.MON_TYPE_TO_PLURAL[TP_MONSTROSITY] = "monstrosities";
Parser.MON_TYPE_TO_PLURAL[TP_OOZE] = "oozes";
Parser.MON_TYPE_TO_PLURAL[TP_PLANT] = "plants";
Parser.MON_TYPE_TO_PLURAL[TP_UNDEAD] = "undead";
SZ_FINE = "F";
SZ_DIMINUTIVE = "D";
SZ_TINY = "T";
SZ_SMALL = "S";
SZ_MEDIUM = "M";
SZ_LARGE = "L";
SZ_HUGE = "H";
SZ_GARGANTUAN = "G";
SZ_COLOSSAL = "C";
SZ_VARIES = "V";
Parser.SIZE_ABVS = [SZ_TINY, SZ_SMALL, SZ_MEDIUM, SZ_LARGE, SZ_HUGE, SZ_GARGANTUAN, SZ_VARIES];
Parser.SIZE_ABV_TO_FULL = {};
Parser.SIZE_ABV_TO_FULL[SZ_FINE] = "Fine";
Parser.SIZE_ABV_TO_FULL[SZ_DIMINUTIVE] = "Diminutive";
Parser.SIZE_ABV_TO_FULL[SZ_TINY] = "Tiny";
Parser.SIZE_ABV_TO_FULL[SZ_SMALL] = "Small";
Parser.SIZE_ABV_TO_FULL[SZ_MEDIUM] = "Medium";
Parser.SIZE_ABV_TO_FULL[SZ_LARGE] = "Large";
Parser.SIZE_ABV_TO_FULL[SZ_HUGE] = "Huge";
Parser.SIZE_ABV_TO_FULL[SZ_GARGANTUAN] = "Gargantuan";
Parser.SIZE_ABV_TO_FULL[SZ_COLOSSAL] = "Colossal";
Parser.SIZE_ABV_TO_FULL[SZ_VARIES] = "Varies";
Parser.XP_CHART = [200, 450, 700, 1100, 1800, 2300, 2900, 3900, 5000, 5900, 7200, 8400, 10000, 11500, 13000, 15000, 18000, 20000, 22000, 25000, 30000, 41000, 50000, 62000, 75000, 90000, 105000, 120000, 135000, 155000];
Parser.XP_CHART_ALT = {
"0": 10,
"1/8": 25,
"1/4": 50,
"1/2": 100,
"1": 200,
"2": 450,
"3": 700,
"4": 1100,
"5": 1800,
"6": 2300,
"7": 2900,
"8": 3900,
"9": 5000,
"10": 5900,
"11": 7200,
"12": 8400,
"13": 10000,
"14": 11500,
"15": 13000,
"16": 15000,
"17": 18000,
"18": 20000,
"19": 22000,
"20": 25000,
"21": 30000,
"22": 41000,
"23": 50000,
"24": 62000,
"25": 75000,
"26": 90000,
"27": 105000,
"28": 120000,
"29": 135000,
"30": 155000
};
Parser.ARMOR_ABV_TO_FULL = {
"l.": "light",
"m.": "medium",
"h.": "heavy"
};
SRC_CoS = "CoS";
SRC_DMG = "DMG";
SRC_EEPC = "EEPC";
SRC_EET = "EET";
SRC_HotDQ = "HotDQ";
SRC_LMoP = "LMoP";
SRC_Mag = "Mag";
SRC_MM = "MM";
SRC_OotA = "OotA";
SRC_PHB = "PHB";
SRC_PotA = "PotA";
SRC_RoT = "RoT";
SRC_RoTOS = "RoTOS";
SRC_SCAG = "SCAG";
SRC_SKT = "SKT";
SRC_ToA = "ToA";
SRC_ToD = "ToD";
SRC_TTP = "TTP";
SRC_TYP = "TftYP";
SRC_TYP_AtG = "TftYP-AtG";
SRC_TYP_DiT = "TftYP-DiT";
SRC_TYP_TFoF = "TftYP-TFoF";
SRC_TYP_THSoT = "TftYP-THSoT";
SRC_TYP_TSC = "TftYP-TSC";
SRC_TYP_ToH = "TftYP-ToH";
SRC_TYP_WPM = "TftYP-WPM";
SRC_VGM = "VGM";
SRC_XGE = "XGE";
SRC_OGA = "OGA";
SRC_MTF = "MTF";
SRC_WDH = "WDH";
SRC_WDMM = "WDMM";
SRC_GGR = "GGR";
SRC_KKW = "KKW";
SRC_LLK = "LLK";
SRC_GoS = "GoS";
SRC_AI = "AI";
SRC_OoW = "OoW";
SRC_DIP = "DIP";
SRC_HftT = "HftT";
SRC_DC = "DC";
SRC_SLW = "SLW";
SRC_SDW = "SDW";
SRC_BGDIA = "BGDIA";
SRC_LR = "LR";
SRC_AL = "AL";
SRC_SAC = "SAC";
SRC_ERLW = "ERLW";
SRC_SCREEN = "Screen";
SRC_AL_PREFIX = "AL";
SRC_ALCoS = SRC_AL_PREFIX + "CurseOfStrahd";
SRC_ALEE = SRC_AL_PREFIX + "ElementalEvil";
SRC_ALRoD = SRC_AL_PREFIX + "RageOfDemons";
SRC_PS_PREFIX = "PS";
SRC_PSA = SRC_PS_PREFIX + "A";
SRC_PSI = SRC_PS_PREFIX + "I";
SRC_PSK = SRC_PS_PREFIX + "K";
SRC_PSZ = SRC_PS_PREFIX + "Z";
SRC_PSX = SRC_PS_PREFIX + "X";
SRC_PSD = SRC_PS_PREFIX + "D";
SRC_UA_PREFIX = "UA";
SRC_UAA = SRC_UA_PREFIX + "Artificer";
SRC_UAEAG = SRC_UA_PREFIX + "EladrinAndGith";
SRC_UAEBB = SRC_UA_PREFIX + "Eberron";
SRC_UAFFR = SRC_UA_PREFIX + "FeatsForRaces";
SRC_UAFFS = SRC_UA_PREFIX + "FeatsForSkills";
SRC_UAFO = SRC_UA_PREFIX + "FiendishOptions";
SRC_UAFT = SRC_UA_PREFIX + "Feats";
SRC_UAGH = SRC_UA_PREFIX + "GothicHeroes";
SRC_UAMDM = SRC_UA_PREFIX + "ModernMagic";
SRC_UASSP = SRC_UA_PREFIX + "StarterSpells";
SRC_UATMC = SRC_UA_PREFIX + "TheMysticClass";
SRC_UATOBM = SRC_UA_PREFIX + "ThatOldBlackMagic";
SRC_UATRR = SRC_UA_PREFIX + "TheRangerRevised";
SRC_UAWA = SRC_UA_PREFIX + "WaterborneAdventures";
SRC_UAVR = SRC_UA_PREFIX + "VariantRules";
SRC_UALDR = SRC_UA_PREFIX + "LightDarkUnderdark";
SRC_UARAR = SRC_UA_PREFIX + "RangerAndRogue";
SRC_UAATOSC = SRC_UA_PREFIX + "ATrioOfSubclasses";
SRC_UABPP = SRC_UA_PREFIX + "BarbarianPrimalPaths";
SRC_UARSC = SRC_UA_PREFIX + "RevisedSubclasses";
SRC_UAKOO = SRC_UA_PREFIX + "KitsOfOld";
SRC_UABBC = SRC_UA_PREFIX + "BardBardColleges";
SRC_UACDD = SRC_UA_PREFIX + "ClericDivineDomains";
SRC_UAD = SRC_UA_PREFIX + "Druid";
SRC_UARCO = SRC_UA_PREFIX + "RevisedClassOptions";
SRC_UAF = SRC_UA_PREFIX + "Fighter";
SRC_UAM = SRC_UA_PREFIX + "Monk";
SRC_UAP = SRC_UA_PREFIX + "Paladin";
SRC_UAMC = SRC_UA_PREFIX + "ModifyingClasses";
SRC_UAS = SRC_UA_PREFIX + "Sorcerer";
SRC_UAWAW = SRC_UA_PREFIX + "WarlockAndWizard";
SRC_UATF = SRC_UA_PREFIX + "TheFaithful";
SRC_UAWR = SRC_UA_PREFIX + "WizardRevisited";
SRC_UAESR = SRC_UA_PREFIX + "ElfSubraces";
SRC_UAMAC = SRC_UA_PREFIX + "MassCombat";
SRC_UA3PE = SRC_UA_PREFIX + "ThreePillarExperience";
SRC_UAGHI = SRC_UA_PREFIX + "GreyhawkInitiative";
SRC_UATSC = SRC_UA_PREFIX + "ThreeSubclasses";
SRC_UAOD = SRC_UA_PREFIX + "OrderDomain";
SRC_UACAM = SRC_UA_PREFIX + "CentaursMinotaurs";
SRC_UAGSS = SRC_UA_PREFIX + "GiantSoulSorcerer";
SRC_UARoE = SRC_UA_PREFIX + "RacesOfEberron";
SRC_UARoR = SRC_UA_PREFIX + "RacesOfRavnica";
SRC_UAWGE = SRC_UA_PREFIX + "WGE";
SRC_UAOSS = SRC_UA_PREFIX + "OfShipsAndSea";
SRC_UASIK = SRC_UA_PREFIX + "Sidekicks";
SRC_UAAR = SRC_UA_PREFIX + "ArtificerRevisited";
SRC_UABAM = SRC_UA_PREFIX + "BarbarianAndMonk";
SRC_UASAW = SRC_UA_PREFIX + "SorcererAndWarlock";
SRC_UABAP = SRC_UA_PREFIX + "BardAndPaladin";
SRC_UACDW = SRC_UA_PREFIX + "ClericDruidWizard";
SRC_UAFRR = SRC_UA_PREFIX + "FighterRangerRogue";
SRC_UACFV = SRC_UA_PREFIX + "ClassFeatureVariants";
SRC_3PP_SUFFIX = " 3pp";
SRC_STREAM = "Stream";
SRC_TWITTER = "Twitter";
AL_PREFIX = "Adventurers League: ";
AL_PREFIX_SHORT = "AL: ";
PS_PREFIX = "Plane Shift: ";
PS_PREFIX_SHORT = "PS: ";
UA_PREFIX = "Unearthed Arcana: ";
UA_PREFIX_SHORT = "UA: ";
TftYP_NAME = "Tales from the Yawning Portal";
Parser.SOURCE_JSON_TO_FULL = {};
Parser.SOURCE_JSON_TO_FULL[SRC_CoS] = "Curse of Strahd";
Parser.SOURCE_JSON_TO_FULL[SRC_DMG] = "Dungeon Master's Guide";
Parser.SOURCE_JSON_TO_FULL[SRC_EEPC] = "Elemental Evil Player's Companion";
Parser.SOURCE_JSON_TO_FULL[SRC_EET] = "Elemental Evil: Trinkets";
Parser.SOURCE_JSON_TO_FULL[SRC_HotDQ] = "Hoard of the Dragon Queen";
Parser.SOURCE_JSON_TO_FULL[SRC_LMoP] = "Lost Mine of Phandelver";
Parser.SOURCE_JSON_TO_FULL[SRC_Mag] = "Dragon Magazine";
Parser.SOURCE_JSON_TO_FULL[SRC_MM] = "Monster Manual";
Parser.SOURCE_JSON_TO_FULL[SRC_OotA] = "Out of the Abyss";
Parser.SOURCE_JSON_TO_FULL[SRC_PHB] = "Player's Handbook";
Parser.SOURCE_JSON_TO_FULL[SRC_PotA] = "Princes of the Apocalypse";
Parser.SOURCE_JSON_TO_FULL[SRC_RoT] = "The Rise of Tiamat";
Parser.SOURCE_JSON_TO_FULL[SRC_RoTOS] = "The Rise of Tiamat Online Supplement";
Parser.SOURCE_JSON_TO_FULL[SRC_SCAG] = "Sword Coast Adventurer's Guide";
Parser.SOURCE_JSON_TO_FULL[SRC_SKT] = "Storm King's Thunder";
Parser.SOURCE_JSON_TO_FULL[SRC_ToA] = "Tomb of Annihilation";
Parser.SOURCE_JSON_TO_FULL[SRC_ToD] = "Tyranny of Dragons";
Parser.SOURCE_JSON_TO_FULL[SRC_TTP] = "The Tortle Package";
Parser.SOURCE_JSON_TO_FULL[SRC_TYP] = TftYP_NAME;
Parser.SOURCE_JSON_TO_FULL[SRC_TYP_AtG] = TftYP_NAME;
Parser.SOURCE_JSON_TO_FULL[SRC_TYP_DiT] = TftYP_NAME;
Parser.SOURCE_JSON_TO_FULL[SRC_TYP_TFoF] = TftYP_NAME;
Parser.SOURCE_JSON_TO_FULL[SRC_TYP_THSoT] = TftYP_NAME;
Parser.SOURCE_JSON_TO_FULL[SRC_TYP_TSC] = TftYP_NAME;
Parser.SOURCE_JSON_TO_FULL[SRC_TYP_ToH] = TftYP_NAME;
Parser.SOURCE_JSON_TO_FULL[SRC_TYP_WPM] = TftYP_NAME;
Parser.SOURCE_JSON_TO_FULL[SRC_VGM] = "Volo's Guide to Monsters";
Parser.SOURCE_JSON_TO_FULL[SRC_XGE] = "Xanathar's Guide to Everything";
Parser.SOURCE_JSON_TO_FULL[SRC_OGA] = "One Grung Above";
Parser.SOURCE_JSON_TO_FULL[SRC_MTF] = "Mordenkainen's Tome of Foes";
Parser.SOURCE_JSON_TO_FULL[SRC_WDH] = "Waterdeep: Dragon Heist";
Parser.SOURCE_JSON_TO_FULL[SRC_WDMM] = "Waterdeep: Dungeon of the Mad Mage";
Parser.SOURCE_JSON_TO_FULL[SRC_GGR] = "Guildmasters' Guide to Ravnica";
Parser.SOURCE_JSON_TO_FULL[SRC_KKW] = "Krenko's Way";
Parser.SOURCE_JSON_TO_FULL[SRC_LLK] = "Lost Laboratory of Kwalish";
Parser.SOURCE_JSON_TO_FULL[SRC_GoS] = "Ghosts of Saltmarsh";
Parser.SOURCE_JSON_TO_FULL[SRC_AI] = "Acquisitions Incorporated";
Parser.SOURCE_JSON_TO_FULL[SRC_OoW] = "The Orrery of the Wanderer";
Parser.SOURCE_JSON_TO_FULL[SRC_DIP] = "Dragon of Icespire Peak";
Parser.SOURCE_JSON_TO_FULL[SRC_HftT] = "Hunt for the Thessalhydra";
Parser.SOURCE_JSON_TO_FULL[SRC_DC] = "Divine Contention";
Parser.SOURCE_JSON_TO_FULL[SRC_SLW] = "Storm Lord's Wrath";
Parser.SOURCE_JSON_TO_FULL[SRC_SDW] = "Sleeping Dragon's Wake";
Parser.SOURCE_JSON_TO_FULL[SRC_BGDIA] = "Baldur's Gate: Descent Into Avernus";
Parser.SOURCE_JSON_TO_FULL[SRC_LR] = "Locathah Rising";
Parser.SOURCE_JSON_TO_FULL[SRC_AL] = "Adventurers' League";
Parser.SOURCE_JSON_TO_FULL[SRC_SAC] = "Sage Advice Compendium";
Parser.SOURCE_JSON_TO_FULL[SRC_ERLW] = "Eberron: Rising from the Last War";
Parser.SOURCE_JSON_TO_FULL[SRC_SCREEN] = "Dungeon Master's Screen";
Parser.SOURCE_JSON_TO_FULL[SRC_ALCoS] = AL_PREFIX + "Curse of Strahd";
Parser.SOURCE_JSON_TO_FULL[SRC_ALEE] = AL_PREFIX + "Elemental Evil";
Parser.SOURCE_JSON_TO_FULL[SRC_ALRoD] = AL_PREFIX + "Rage of Demons";
Parser.SOURCE_JSON_TO_FULL[SRC_PSA] = PS_PREFIX + "Amonkhet";
Parser.SOURCE_JSON_TO_FULL[SRC_PSI] = PS_PREFIX + "Innistrad";
Parser.SOURCE_JSON_TO_FULL[SRC_PSK] = PS_PREFIX + "Kaladesh";
Parser.SOURCE_JSON_TO_FULL[SRC_PSZ] = PS_PREFIX + "Zendikar";
Parser.SOURCE_JSON_TO_FULL[SRC_PSX] = PS_PREFIX + "Ixalan";
Parser.SOURCE_JSON_TO_FULL[SRC_PSD] = PS_PREFIX + "Dominaria";
Parser.SOURCE_JSON_TO_FULL[SRC_UAA] = UA_PREFIX + "Artificer";
Parser.SOURCE_JSON_TO_FULL[SRC_UAEAG] = UA_PREFIX + "Eladrin and Gith";
Parser.SOURCE_JSON_TO_FULL[SRC_UAEBB] = UA_PREFIX + "Eberron";
Parser.SOURCE_JSON_TO_FULL[SRC_UAFFR] = UA_PREFIX + "Feats for Races";
Parser.SOURCE_JSON_TO_FULL[SRC_UAFFS] = UA_PREFIX + "Feats for Skills";
Parser.SOURCE_JSON_TO_FULL[SRC_UAFO] = UA_PREFIX + "Fiendish Options";
Parser.SOURCE_JSON_TO_FULL[SRC_UAFT] = UA_PREFIX + "Feats";
Parser.SOURCE_JSON_TO_FULL[SRC_UAGH] = UA_PREFIX + "Gothic Heroes";
Parser.SOURCE_JSON_TO_FULL[SRC_UAMDM] = UA_PREFIX + "Modern Magic";
Parser.SOURCE_JSON_TO_FULL[SRC_UASSP] = UA_PREFIX + "Starter Spells";
Parser.SOURCE_JSON_TO_FULL[SRC_UATMC] = UA_PREFIX + "The Mystic Class";
Parser.SOURCE_JSON_TO_FULL[SRC_UATOBM] = UA_PREFIX + "That Old Black Magic";
Parser.SOURCE_JSON_TO_FULL[SRC_UATRR] = UA_PREFIX + "The Ranger, Revised";
Parser.SOURCE_JSON_TO_FULL[SRC_UAWA] = UA_PREFIX + "Waterborne Adventures";
Parser.SOURCE_JSON_TO_FULL[SRC_UAVR] = UA_PREFIX + "Variant Rules";
Parser.SOURCE_JSON_TO_FULL[SRC_UALDR] = UA_PREFIX + "Light, Dark, Underdark!";
Parser.SOURCE_JSON_TO_FULL[SRC_UARAR] = UA_PREFIX + "Ranger and Rogue";
Parser.SOURCE_JSON_TO_FULL[SRC_UAATOSC] = UA_PREFIX + "A Trio of Subclasses";
Parser.SOURCE_JSON_TO_FULL[SRC_UABPP] = UA_PREFIX + "Barbarian Primal Paths";
Parser.SOURCE_JSON_TO_FULL[SRC_UARSC] = UA_PREFIX + "Revised Subclasses";
Parser.SOURCE_JSON_TO_FULL[SRC_UAKOO] = UA_PREFIX + "Kits of Old";
Parser.SOURCE_JSON_TO_FULL[SRC_UABBC] = UA_PREFIX + "Bard: Bard Colleges";
Parser.SOURCE_JSON_TO_FULL[SRC_UACDD] = UA_PREFIX + "Cleric: Divine Domains";
Parser.SOURCE_JSON_TO_FULL[SRC_UAD] = UA_PREFIX + "Druid";
Parser.SOURCE_JSON_TO_FULL[SRC_UARCO] = UA_PREFIX + "Revised Class Options";
Parser.SOURCE_JSON_TO_FULL[SRC_UAF] = UA_PREFIX + "Fighter";
Parser.SOURCE_JSON_TO_FULL[SRC_UAM] = UA_PREFIX + "Monk";
Parser.SOURCE_JSON_TO_FULL[SRC_UAP] = UA_PREFIX + "Paladin";
Parser.SOURCE_JSON_TO_FULL[SRC_UAMC] = UA_PREFIX + "Modifying Classes";
Parser.SOURCE_JSON_TO_FULL[SRC_UAS] = UA_PREFIX + "Sorcerer";
Parser.SOURCE_JSON_TO_FULL[SRC_UAWAW] = UA_PREFIX + "Warlock and Wizard";
Parser.SOURCE_JSON_TO_FULL[SRC_UATF] = UA_PREFIX + "The Faithful";
Parser.SOURCE_JSON_TO_FULL[SRC_UAWR] = UA_PREFIX + "Wizard Revisited";
Parser.SOURCE_JSON_TO_FULL[SRC_UAESR] = UA_PREFIX + "Elf Subraces";
Parser.SOURCE_JSON_TO_FULL[SRC_UAMAC] = UA_PREFIX + "Mass Combat";
Parser.SOURCE_JSON_TO_FULL[SRC_UA3PE] = UA_PREFIX + "Three-Pillar Experience";
Parser.SOURCE_JSON_TO_FULL[SRC_UAGHI] = UA_PREFIX + "Greyhawk Initiative";
Parser.SOURCE_JSON_TO_FULL[SRC_UATSC] = UA_PREFIX + "Three Subclasses";
Parser.SOURCE_JSON_TO_FULL[SRC_UAOD] = UA_PREFIX + "Order Domain";
Parser.SOURCE_JSON_TO_FULL[SRC_UACAM] = UA_PREFIX + "Centaurs and Minotaurs";
Parser.SOURCE_JSON_TO_FULL[SRC_UAGSS] = UA_PREFIX + "Giant Soul Sorcerer";
Parser.SOURCE_JSON_TO_FULL[SRC_UARoE] = UA_PREFIX + "Races of Eberron";
Parser.SOURCE_JSON_TO_FULL[SRC_UARoR] = UA_PREFIX + "Races of Ravnica";
Parser.SOURCE_JSON_TO_FULL[SRC_UAWGE] = "Wayfinder's Guide to Eberron";
Parser.SOURCE_JSON_TO_FULL[SRC_UAOSS] = UA_PREFIX + "Of Ships and the Sea";
Parser.SOURCE_JSON_TO_FULL[SRC_UASIK] = UA_PREFIX + "Sidekicks";
Parser.SOURCE_JSON_TO_FULL[SRC_UAAR] = UA_PREFIX + "Artificer Revisited";
Parser.SOURCE_JSON_TO_FULL[SRC_UABAM] = UA_PREFIX + "Barbarian and Monk";
Parser.SOURCE_JSON_TO_FULL[SRC_UASAW] = UA_PREFIX + "Sorcerer and Warlock";
Parser.SOURCE_JSON_TO_FULL[SRC_UABAP] = UA_PREFIX + "Bard and Paladin";
Parser.SOURCE_JSON_TO_FULL[SRC_UACDW] = UA_PREFIX + "Cleric, Druid, and Wizard";
Parser.SOURCE_JSON_TO_FULL[SRC_UAFRR] = UA_PREFIX + "Fighter, Ranger, and Rogue";
Parser.SOURCE_JSON_TO_FULL[SRC_UACFV] = UA_PREFIX + "Class Feature Variants";
Parser.SOURCE_JSON_TO_FULL[SRC_STREAM] = "Livestream";
Parser.SOURCE_JSON_TO_FULL[SRC_TWITTER] = "Twitter";
Parser.SOURCE_JSON_TO_ABV = {};
Parser.SOURCE_JSON_TO_ABV[SRC_CoS] = "CoS";
Parser.SOURCE_JSON_TO_ABV[SRC_DMG] = "DMG";
Parser.SOURCE_JSON_TO_ABV[SRC_EEPC] = "EEPC";
Parser.SOURCE_JSON_TO_ABV[SRC_EET] = "EET";
Parser.SOURCE_JSON_TO_ABV[SRC_HotDQ] = "HotDQ";
Parser.SOURCE_JSON_TO_ABV[SRC_LMoP] = "LMoP";
Parser.SOURCE_JSON_TO_ABV[SRC_Mag] = "Mag";
Parser.SOURCE_JSON_TO_ABV[SRC_MM] = "MM";
Parser.SOURCE_JSON_TO_ABV[SRC_OotA] = "OotA";
Parser.SOURCE_JSON_TO_ABV[SRC_PHB] = "PHB";
Parser.SOURCE_JSON_TO_ABV[SRC_PotA] = "PotA";
Parser.SOURCE_JSON_TO_ABV[SRC_RoT] = "RoT";
Parser.SOURCE_JSON_TO_ABV[SRC_RoTOS] = "RoTOS";
Parser.SOURCE_JSON_TO_ABV[SRC_SCAG] = "SCAG";
Parser.SOURCE_JSON_TO_ABV[SRC_SKT] = "SKT";
Parser.SOURCE_JSON_TO_ABV[SRC_ToA] = "ToA";
Parser.SOURCE_JSON_TO_ABV[SRC_ToD] = "ToD";
Parser.SOURCE_JSON_TO_ABV[SRC_TTP] = "TTP";
Parser.SOURCE_JSON_TO_ABV[SRC_TYP] = "TftYP";
Parser.SOURCE_JSON_TO_ABV[SRC_TYP_AtG] = "TftYP";
Parser.SOURCE_JSON_TO_ABV[SRC_TYP_DiT] = "TftYP";
Parser.SOURCE_JSON_TO_ABV[SRC_TYP_TFoF] = "TftYP";
Parser.SOURCE_JSON_TO_ABV[SRC_TYP_THSoT] = "TftYP";
Parser.SOURCE_JSON_TO_ABV[SRC_TYP_TSC] = "TftYP";
Parser.SOURCE_JSON_TO_ABV[SRC_TYP_ToH] = "TftYP";
Parser.SOURCE_JSON_TO_ABV[SRC_TYP_WPM] = "TftYP";
Parser.SOURCE_JSON_TO_ABV[SRC_VGM] = "VGM";
Parser.SOURCE_JSON_TO_ABV[SRC_XGE] = "XGE";
Parser.SOURCE_JSON_TO_ABV[SRC_OGA] = "OGA";
Parser.SOURCE_JSON_TO_ABV[SRC_MTF] = "MTF";
Parser.SOURCE_JSON_TO_ABV[SRC_WDH] = "WDH";
Parser.SOURCE_JSON_TO_ABV[SRC_WDMM] = "WDMM";
Parser.SOURCE_JSON_TO_ABV[SRC_GGR] = "GGR";
Parser.SOURCE_JSON_TO_ABV[SRC_KKW] = "KKW";
Parser.SOURCE_JSON_TO_ABV[SRC_LLK] = "LLK";
Parser.SOURCE_JSON_TO_ABV[SRC_GoS] = "GoS";
Parser.SOURCE_JSON_TO_ABV[SRC_AI] = "AI";
Parser.SOURCE_JSON_TO_ABV[SRC_OoW] = "OoW";
Parser.SOURCE_JSON_TO_ABV[SRC_DIP] = "DIP";
Parser.SOURCE_JSON_TO_ABV[SRC_HftT] = "HftT";
Parser.SOURCE_JSON_TO_ABV[SRC_DC] = "DC";
Parser.SOURCE_JSON_TO_ABV[SRC_SLW] = "SLW";
Parser.SOURCE_JSON_TO_ABV[SRC_SDW] = "SDW";
Parser.SOURCE_JSON_TO_ABV[SRC_BGDIA] = "BGDIA";
Parser.SOURCE_JSON_TO_ABV[SRC_LR] = "LR";
Parser.SOURCE_JSON_TO_ABV[SRC_AL] = "AL";
Parser.SOURCE_JSON_TO_ABV[SRC_SAC] = "SAC";
Parser.SOURCE_JSON_TO_ABV[SRC_ERLW] = "ERLW";
Parser.SOURCE_JSON_TO_ABV[SRC_SCREEN] = "Screen";
Parser.SOURCE_JSON_TO_ABV[SRC_ALCoS] = "ALCoS";
Parser.SOURCE_JSON_TO_ABV[SRC_ALEE] = "ALEE";
Parser.SOURCE_JSON_TO_ABV[SRC_ALRoD] = "ALRoD";
Parser.SOURCE_JSON_TO_ABV[SRC_PSA] = "PSA";
Parser.SOURCE_JSON_TO_ABV[SRC_PSI] = "PSI";
Parser.SOURCE_JSON_TO_ABV[SRC_PSK] = "PSK";
Parser.SOURCE_JSON_TO_ABV[SRC_PSZ] = "PSZ";
Parser.SOURCE_JSON_TO_ABV[SRC_PSX] = "PSX";
Parser.SOURCE_JSON_TO_ABV[SRC_PSD] = "PSD";
Parser.SOURCE_JSON_TO_ABV[SRC_UAA] = "UAA";
Parser.SOURCE_JSON_TO_ABV[SRC_UAEAG] = "UAEaG";
Parser.SOURCE_JSON_TO_ABV[SRC_UAEBB] = "UAEB";
Parser.SOURCE_JSON_TO_ABV[SRC_UAFFR] = "UAFFR";
Parser.SOURCE_JSON_TO_ABV[SRC_UAFFS] = "UAFFS";
Parser.SOURCE_JSON_TO_ABV[SRC_UAFO] = "UAFO";
Parser.SOURCE_JSON_TO_ABV[SRC_UAFT] = "UAFT";
Parser.SOURCE_JSON_TO_ABV[SRC_UAGH] = "UAGH";
Parser.SOURCE_JSON_TO_ABV[SRC_UAMDM] = "UAMM";
Parser.SOURCE_JSON_TO_ABV[SRC_UASSP] = "UASS";
Parser.SOURCE_JSON_TO_ABV[SRC_UATMC] = "UAM";
Parser.SOURCE_JSON_TO_ABV[SRC_UATOBM] = "UAOBM";
Parser.SOURCE_JSON_TO_ABV[SRC_UATRR] = "UATRR";
Parser.SOURCE_JSON_TO_ABV[SRC_UAWA] = "UAWA";
Parser.SOURCE_JSON_TO_ABV[SRC_UAVR] = "UAVR";
Parser.SOURCE_JSON_TO_ABV[SRC_UALDR] = "UALDU";
Parser.SOURCE_JSON_TO_ABV[SRC_UARAR] = "UARAR";
Parser.SOURCE_JSON_TO_ABV[SRC_UAATOSC] = "UAATOSC";
Parser.SOURCE_JSON_TO_ABV[SRC_UABPP] = "UABPP";
Parser.SOURCE_JSON_TO_ABV[SRC_UARSC] = "UARSC";
Parser.SOURCE_JSON_TO_ABV[SRC_UAKOO] = "UAKoO";
Parser.SOURCE_JSON_TO_ABV[SRC_UABBC] = "UABBC";
Parser.SOURCE_JSON_TO_ABV[SRC_UACDD] = "UACDD";
Parser.SOURCE_JSON_TO_ABV[SRC_UAD] = "UAD";
Parser.SOURCE_JSON_TO_ABV[SRC_UARCO] = "UARCO";
Parser.SOURCE_JSON_TO_ABV[SRC_UAF] = "UAF";
Parser.SOURCE_JSON_TO_ABV[SRC_UAM] = "UAM";
Parser.SOURCE_JSON_TO_ABV[SRC_UAP] = "UAP";
Parser.SOURCE_JSON_TO_ABV[SRC_UAMC] = "UAMC";
Parser.SOURCE_JSON_TO_ABV[SRC_UAS] = "UAS";
Parser.SOURCE_JSON_TO_ABV[SRC_UAWAW] = "UAWAW";
Parser.SOURCE_JSON_TO_ABV[SRC_UATF] = "UATF";
Parser.SOURCE_JSON_TO_ABV[SRC_UAWR] = "UAWR";
Parser.SOURCE_JSON_TO_ABV[SRC_UAESR] = "UAESR";
Parser.SOURCE_JSON_TO_ABV[SRC_UAMAC] = "UAMAC";
Parser.SOURCE_JSON_TO_ABV[SRC_UA3PE] = "UA3PE";
Parser.SOURCE_JSON_TO_ABV[SRC_UAGHI] = "UAGHI";
Parser.SOURCE_JSON_TO_ABV[SRC_UATSC] = "UATSC";
Parser.SOURCE_JSON_TO_ABV[SRC_UAOD] = "UAOD";
Parser.SOURCE_JSON_TO_ABV[SRC_UACAM] = "UACAM";
Parser.SOURCE_JSON_TO_ABV[SRC_UAGSS] = "UAGSS";
Parser.SOURCE_JSON_TO_ABV[SRC_UARoE] = "UARoE";
Parser.SOURCE_JSON_TO_ABV[SRC_UARoR] = "UARoR";
Parser.SOURCE_JSON_TO_ABV[SRC_UAWGE] = "WGE";
Parser.SOURCE_JSON_TO_ABV[SRC_UAOSS] = "UAOSS";
Parser.SOURCE_JSON_TO_ABV[SRC_UASIK] = "UASIK";
Parser.SOURCE_JSON_TO_ABV[SRC_UAAR] = "UAAR";
Parser.SOURCE_JSON_TO_ABV[SRC_UABAM] = "UABAM";
Parser.SOURCE_JSON_TO_ABV[SRC_UASAW] = "UASAW";
Parser.SOURCE_JSON_TO_ABV[SRC_UABAP] = "UABAP";
Parser.SOURCE_JSON_TO_ABV[SRC_UACDW] = "UACDW";
Parser.SOURCE_JSON_TO_ABV[SRC_UAFRR] = "UAFRR";
Parser.SOURCE_JSON_TO_ABV[SRC_UACFV] = "UACFV";
Parser.SOURCE_JSON_TO_ABV[SRC_STREAM] = "Stream";
Parser.SOURCE_JSON_TO_ABV[SRC_TWITTER] = "Twitter";
Parser.ITEM_TYPE_JSON_TO_ABV = {
"A": "Ammunition",
"AF": "Ammunition",
"AT": "Artisan Tool",
"EM": "Eldritch Machine",
"EXP": "Explosive",
"G": "Adventuring Gear",
"GS": "Gaming Set",
"HA": "Heavy Armor",
"INS": "Instrument",
"LA": "Light Armor",
"M": "Melee Weapon",
"MA": "Medium Armor",
"MNT": "Mount",
"GV": "Generic Variant",
"P": "Potion",
"R": "Ranged Weapon",
"RD": "Rod",
"RG": "Ring",
"S": "Shield",
"SC": "Scroll",
"SCF": "Spellcasting Focus",
"OTH": "Other",
"T": "Tool",
"TAH": "Tack and Harness",
"TG": "Trade Good",
"$": "Treasure",
"VEH": "Vehicle (land)",
"SHP": "Vehicle (water)",
"AIR": "Vehicle (air)",
"WD": "Wand"
};
Parser.DMGTYPE_JSON_TO_FULL = {
"A": "acid",
"B": "bludgeoning",
"C": "cold",
"F": "fire",
"O": "force",
"L": "lightning",
"N": "necrotic",
"P": "piercing",
"I": "poison",
"Y": "psychic",
"R": "radiant",
"S": "slashing",
"T": "thunder"
};
Parser.DMG_TYPES = ["acid", "bludgeoning", "cold", "fire", "force", "lightning", "necrotic", "piercing", "poison", "psychic", "radiant", "slashing", "thunder"];
Parser.CONDITIONS = ["blinded", "charmed", "deafened", "exhaustion", "frightened", "grappled", "incapacitated", "invisible", "paralyzed", "petrified", "poisoned", "prone", "restrained", "stunned", "unconscious"];
Parser.SKILL_JSON_TO_FULL = {
"Acrobatics": [
"Your Dexterity (Acrobatics) check covers your attempt to stay on your feet in a tricky situation, such as when you're trying to run across a sheet of ice, balance on a tightrope, or stay upright on a rocking ship's deck. The DM might also call for a Dexterity (Acrobatics) check to see if you can perform acrobatic stunts, including dives, rolls, somersaults, and flips."
],
"Animal Handling": [
"When there is any question whether you can calm down a domesticated animal, keep a mount from getting spooked, or intuit an animal's intentions, the DM might call for a Wisdom (Animal Handling) check. You also make a Wisdom (Animal Handling) check to control your mount when you attempt a risky maneuver."
],
"Arcana": [
"Your Intelligence (Arcana) check measures your ability to recall lore about spells, magic items, eldritch symbols, magical traditions, the planes of existence, and the inhabitants of those planes."
],
"Athletics": [
"Your Strength (Athletics) check covers difficult situations you encounter while climbing, jumping, or swimming. Examples include the following activities:",
{
"type": "list",
"items": [
"You attempt to climb a sheer or slippery cliff, avoid hazards while scaling a wall, or cling to a surface while something is trying to knock you off.",
"You try to jump an unusually long distance or pull off a stunt mid jump.",
"You struggle to swim or stay afloat in treacherous currents, storm-tossed waves, or areas of thick seaweed. Or another creature tries to push or pull you underwater or otherwise interfere with your swimming."
]
}
],
"Deception": [
"Your Charisma (Deception) check determines whether you can convincingly hide the truth, either verbally or through your actions. This deception can encompass everything from misleading others through ambiguity to telling outright lies. Typical situations include trying to fast-talk a guard, con a merchant, earn money through gambling, pass yourself off in a disguise, dull someone's suspicions with false assurances, or maintain a straight face while telling a blatant lie."
],
"History": [
"Your Intelligence (History) check measures your ability to recall lore about historical events, legendary people, ancient kingdoms, past disputes, recent wars, and lost civilizations."
],
"Insight": [
"Your Wisdom (Insight) check decides whether you can determine the true intentions of a creature, such as when searching out a lie or predicting someone's next move. Doing so involves gleaning clues from body language, speech habits, and changes in mannerisms."
],
"Intimidation": [
"When you attempt to influence someone through overt threats, hostile actions, and physical violence, the DM might ask you to make a Charisma (Intimidation) check. Examples include trying to pry information out of a prisoner, convincing street thugs to back down from a confrontation, or using the edge of a broken bottle to convince a sneering vizier to reconsider a decision."
],
"Investigation": [
"When you look around for clues and make deductions based on those clues, you make an Intelligence (Investigation) check. You might deduce the location of a hidden object, discern from the appearance of a wound what kind of weapon dealt it, or determine the weakest point in a tunnel that could cause it to collapse. Poring through ancient scrolls in search of a hidden fragment of knowledge might also call for an Intelligence (Investigation) check."
],
"Medicine": [
"A Wisdom (Medicine) check lets you try to stabilize a dying companion or diagnose an illness."
],
"Nature": [
"Your Intelligence (Nature) check measures your ability to recall lore about terrain, plants and animals, the weather, and natural cycles."
],
"Perception": [
"Your Wisdom (Perception) check lets you spot, hear, or otherwise detect the presence of something. It measures your general awareness of your surroundings and the keenness of your senses.", "For example, you might try to hear a conversation through a closed door, eavesdrop under an open window, or hear monsters moving stealthily in the forest. Or you might try to spot things that are obscured or easy to miss, whether they are orcs lying in ambush on a road, thugs hiding in the shadows of an alley, or candlelight under a closed secret door."
],
"Performance": [
"Your Charisma (Performance) check determines how well you can delight an audience with music, dance, acting, storytelling, or some other form of entertainment."
],
"Persuasion": [
"When you attempt to influence someone or a group of people with tact, social graces, or good nature, the DM might ask you to make a Charisma (Persuasion) check. Typically, you use persuasion when acting in good faith, to foster friendships, make cordial requests, or exhibit proper etiquette. Examples of persuading others include convincing a chamberlain to let your party see the king, negotiating peace between warring tribes, or inspiring a crowd of townsfolk."
],
"Religion": [
"Your Intelligence (Religion) check measures your ability to recall lore about deities, rites and prayers, religious hierarchies, holy symbols, and the practices of secret cults."
],
"Sleight of Hand": [
"Whenever you attempt an act of legerdemain or manual trickery, such as planting something on someone else or concealing an object on your person, make a Dexterity (Sleight of Hand) check. The DM might also call for a Dexterity (Sleight of Hand) check to determine whether you can lift a coin purse off another person or slip something out of another person's pocket."
],
"Stealth": [
"Make a Dexterity (Stealth) check when you attempt to conceal yourself from enemies, slink past guards, slip away without being noticed, or sneak up on someone without being seen or heard."
],
"Survival": [
"The DM might ask you to make a Wisdom (Survival) check to follow tracks, hunt wild game, guide your group through frozen wastelands, identify signs that owlbears live nearby, predict the weather, or avoid quicksand and other natural hazards."
]
};
Parser.SENSE_JSON_TO_FULL = {
"blindsight": [
"A creature with blindsight can perceive its surroundings without relying on sight, within a specific radius. Creatures without eyes, such as oozes, and creatures with echolocation or heightened senses, such as bats and true dragons, have this sense."
],
"darkvision": [
"Many creatures in fantasy gaming worlds, especially those that dwell underground, have darkvision. Within a specified range, a creature with darkvision can see in dim light as if it were bright light and in darkness as if it were dim light, so areas of darkness are only lightly obscured as far as that creature is concerned. However, the creature can't discern color in that darkness, only shades of gray."
],
"tremorsense": [
"A creature with tremorsense can detect and pinpoint the origin of vibrations within a specific radius, provided that the creature and the source of the vibrations are in contact with the same ground or substance. Tremorsense can't be used to detect flying or incorporeal creatures. Many burrowing creatures, such as ankhegs and umber hulks, have this special sense."
],
"truesight": [
"A creature with truesight can, out to a specific range, see in normal and magical darkness, see invisible creatures and objects, automatically detect visual illusions and succeed on saving throws against them, and perceives the original form of a shapechanger or a creature that is transformed by magic. Furthermore, the creature can see into the Ethereal Plane."
]
};
Parser.NUMBERS_ONES = ['', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine'];
Parser.NUMBERS_TENS = ['', '', 'twenty', 'thirty', 'forty', 'fifty', 'sixty', 'seventy', 'eighty', 'ninety'];
Parser.NUMBERS_TEENS = ['ten', 'eleven', 'twelve', 'thirteen', 'fourteen', 'fifteen', 'sixteen', 'seventeen', 'eighteen', 'nineteen'];
// SOURCES =============================================================================================================
SourceUtil = {
hasBeenReprinted(shortName, source) {
return (shortName !== undefined && shortName !== null && source !== undefined && source !== null)
&& (
(shortName === "Sun Soul" && source === SRC_SCAG)
|| (shortName === "Mastermind" && source === SRC_SCAG)
|| (shortName === "Swashbuckler" && source === SRC_SCAG)
|| (shortName === "Storm" && source === SRC_SCAG)
|| (shortName === "Deep Stalker Conclave" && source === SRC_UATRR)
);
},
isNonstandardSource(source) {
return (source !== undefined && source !== null) && !BrewUtil.hasSourceJson(source) && SourceUtil._isNonstandardSourceWiz(source);
},
_isNonstandardSourceWiz(source) {
return source.startsWith(SRC_UA_PREFIX) || source.startsWith(SRC_PS_PREFIX) || source.startsWith(SRC_AL_PREFIX) || source === SRC_OGA || source === SRC_Mag || source === SRC_STREAM || source === SRC_TWITTER || source === SRC_LLK || source === SRC_LR || source === SRC_TTP;
},
getFilterGroup(source) {
if (BrewUtil.hasSourceJson(source.item)) return 2;
return Number(SourceUtil.isNonstandardSource(source.item));
}
};
// CONVENIENCE/ELEMENTS ================================================================================================
Math.sum = Math.sum || function (...values) {
return values.reduce((a, b) => a + b, 0);
};
Math.mean = Math.mean || function (...values) {
return Math.sum(...values) / values.length;
};
Math.meanAbsoluteDeviation = Math.meanAbsoluteDeviation || function (...values) {
const mean = Math.mean(...values);
return Math.mean(...(values.map(num => Math.abs(num - mean))));
};
Math.seed = Math.seed || function (s) {
return function () {
s = Math.sin(s) * 10000;
return s - Math.floor(s);
};
};
function xor(a, b) {
return !a !== !b;
}
/**
* > implying
*/
function implies(a, b) {
return (!a) || b;
}
function noModifierKeys(e) {
return !e.ctrlKey && !e.altKey && !e.metaKey;
}
function isObject(obj) {
const type = typeof obj;
return (type === 'function' || type === 'object') && !!obj;
}
function isString(str) {
return typeof str === 'string';
}
function isNumber(obj) {
return toString.call(obj) === '[object Number]';
}
function isEmpty(obj) {
if (obj == null) {
return true;
}
if (Array.isArray(obj) || isString(obj)) {
return obj.length === 0;
}
return Object.keys(obj).length === 0;
}
JqueryUtil = {
_isEnhancementsInit: false,
initEnhancements() {
if (JqueryUtil._isEnhancementsInit) return;
JqueryUtil._isEnhancementsInit = true;
JqueryUtil.addSelectors();
/**
* Template strings which can contain jQuery objects.
* Usage: $$`<div>Press this button: ${$btn}</div>`
*/
window.$$ = function (parts, ...args) {
if (parts instanceof jQuery) {
return (...passed) => {
const parts2 = [...passed[0]];
const args2 = passed.slice(1);
parts2[0] = `<div>${parts2[0]}`;
parts2.last(`${parts2.last()}</div>`);
const $temp = $$(parts2, ...args2);
$temp.children().each((i, e) => $(e).appendTo(parts));
};
} else {
const $eles = [];
let ixArg = 0;
const handleArg = (arg) => {
if (arg instanceof $) {
$eles.push(arg);
return `<${arg.tag()} data-r="true"/>`;
} else if (arg instanceof HTMLElement) {
return handleArg($(arg));
} else return arg
};
const raw = parts.reduce((html, p) => {
const myIxArg = ixArg++;
if (args[myIxArg] == null) return `${html}${p}`;
if (args[myIxArg] instanceof Array) return `${html}${args[myIxArg].map(arg => handleArg(arg)).join("")}${p}`;
else return `${html}${handleArg(args[myIxArg])}${p}`;
});
const $res = $(raw);
$res.find(`[data-r=true]`).replaceWith(i => $eles[i]);
return $res;
}
};
$.fn.extend({
disableSpellcheck: function () { return this.attr("autocomplete", "off").attr("autocapitalize", "off").attr("spellcheck", "false"); },
tag: function () {
return this.prop("tagName").toLowerCase();
},
title: function (title) { return this.attr("title", title); }
});
$.event.special.destroyed = {
remove: function (o) {
if (o.handler) o.handler();
}
}
},
addSelectors() {
// Add a selector to match exact text (case insensitive) to jQuery's arsenal
// Note that the search text should be `trim().toLowerCase()`'d before being passed in
$.expr[':'].textEquals = (el, i, m) => $(el).text().toLowerCase().trim() === m[3];
// Add a selector to match contained text (case insensitive)
$.expr[':'].containsInsensitive = (el, i, m) => {
const searchText = m[3];
const textNode = $(el).contents().filter((i, e) => e.nodeType === 3)[0];
if (!textNode) return false;
const match = textNode.nodeValue.toLowerCase().trim().match(`${searchText.toLowerCase().trim().escapeRegexp()}`);
return match && match.length > 0;
};
},
showCopiedEffect($ele, text = "Copied!", bubble) {
const $temp = $(`<div class="copied-tip"><span>${text}</span></div>`).appendTo($(`body`));
const offset = $temp.width() / 2;
const top = $(window).scrollTop();
const pos = $ele.offset();
const animationOptions = {
top: "-=8",
opacity: 0
};
if (bubble) {
animationOptions.left = `${Math.random() > 0.5 ? "-" : "+"}=${~~(Math.random() * 17)}`;
}
const seed = Math.random();
const duration = bubble ? 250 + seed * 200 : 250;
$temp.css({
top: bubble ? (pos.top - 5) - top : (pos.top - 17) - top,
left: pos.left - offset + ($ele.width() / 2)
}).animate(
animationOptions,
{
easing: "linear",
duration,
complete: () => $temp.remove(),
progress: (_, progress) => { // progress is 0..1
if (bubble) {
const diffProgress = 0.5 - progress;
animationOptions.top = `${diffProgress > 0 ? "-" : "+"}=40`;
$temp.css("transform", `rotate(${seed > 0.5 ? "-" : ""}${seed * 500 * progress}deg)`);
}
}
}
);
},
_dropdownInit: false,
bindDropdownButton($ele) {
if (!JqueryUtil._dropdownInit) {
JqueryUtil._dropdownInit = true;
document.addEventListener("click", () => [...document.querySelectorAll(`.open`)].filter(ele => !(ele.className || "").split(" ").includes(`dropdown--navbar`)).forEach(ele => ele.classList.remove("open")));
}
$ele.click(() => setTimeout(() => $ele.parent().addClass("open"), 1)); // defer to allow the above to complete
},
_ACTIVE_TOAST: [],
/**
* @param {Object|string} options
* @param {(jQuery|string)} options.content Toast contents. Supports jQuery objects.
* @param {string} options.type Toast type. Can be any Bootstrap alert type ("success", "info", "warning", or "danger").
*/
doToast(options) {
if (typeof options === "string") {
options = {
content: options,
type: "info"
};
}
options.type = options.type || "info";
const doCleanup = ($toast) => {
$toast.removeClass("toast--animate");
setTimeout(() => $toast.remove(), 85);
JqueryUtil._ACTIVE_TOAST.splice(JqueryUtil._ACTIVE_TOAST.indexOf($toast), 1);
};
const $btnToastDismiss = $(`<button class="btn toast__btn-close"><span class="glyphicon glyphicon-remove"/></button>`)
.click(() => doCleanup($toast));
const $toast = $$`
<div class="toast toast--type-${options.type}">
<div class="toast__wrp-content">${options.content}</div>
<div class="toast__wrp-control">${$btnToastDismiss}</div>
</div>`.prependTo($(`body`)).data("pos", 0);
setTimeout(() => $toast.addClass(`toast--animate`), 5);
setTimeout(() => doCleanup($toast), 5000);
if (JqueryUtil._ACTIVE_TOAST.length) {
JqueryUtil._ACTIVE_TOAST.forEach($oldToast => {
const pos = $oldToast.data("pos");
$oldToast.data("pos", pos + 1);
if (pos === 2) doCleanup($oldToast);
});
}
JqueryUtil._ACTIVE_TOAST.push($toast);
}
};
if (typeof window !== "undefined") window.addEventListener("load", JqueryUtil.initEnhancements);
ObjUtil = {
mergeWith(source, target, fnMerge, options = { depth: 1 }) {
if (!source || !target || typeof fnMerge !== "function") throw new Error("Must include a source, target and a fnMerge to handle merging");
const recursive = function (deepSource, deepTarget, depth = 1) {
if (depth > options.depth || !deepSource || !deepTarget) return;
for (let prop of Object.keys(deepSource)) {
deepTarget[prop] = fnMerge(deepSource[prop], deepTarget[prop], source, target);
recursive(source[prop], deepTarget[prop], depth + 1);
}
};
recursive(source, target, 1);
},
async pForEachDeep(source, pCallback, options = { depth: Infinity, callEachLevel: false }) {
const path = [];
const pDiveDeep = async function (val, path, depth = 0) {
if (options.callEachLevel || typeof val !== "object" || options.depth === depth) {
await pCallback(val, path, depth);
}
if (options.depth !== depth && typeof val === "object") {
for (const key of Object.keys(val)) {
path.push(key);
await pDiveDeep(val[key], path, depth + 1);
}
}
path.pop();
};
await pDiveDeep(source, path);
}
};
// TODO refactor other misc utils into this
MiscUtil = {
COLOR_HEALTHY: "#00bb20",
COLOR_HURT: "#c5ca00",
COLOR_BLOODIED: "#f7a100",
COLOR_DEFEATED: "#cc0000",
STR_SEE_CONSOLE: "See the console (CTRL+SHIFT+J) for more information.",
copy(obj) {
return JSON.parse(JSON.stringify(obj));
},
async pCopyTextToClipboard(text) {
function doCompatabilityCopy() {
const $temp = $(`<textarea id="copy-temp" style="position: fixed; top: -1000px; left: -1000px; width: 1px; height: 1px;">${text}</textarea>`);
$(`body`).append($temp);
$temp.select();
document.execCommand("Copy");
$temp.remove();
}
if (navigator && navigator.permissions) {
try {
const access = await navigator.permissions.query({ name: "clipboard-write" });
if (access.state === "granted" || access.state === "prompt") {
await navigator.clipboard.writeText(text);
} else doCompatabilityCopy();
} catch (e) { doCompatabilityCopy(); }
} else doCompatabilityCopy();
},
checkProperty(object, ...path) {
for (let i = 0; i < path.length; ++i) {
object = object[path[i]];
if (object == null) return false;
}
return true;
},
get(object, ...path) {
if (object == null) return null;
for (let i = 0; i < path.length; ++i) {
object = object[path[i]];
if (object == null) return object;
}
return object;
},
mix: (superclass) => new MiscUtil._MixinBuilder(superclass),
_MixinBuilder: function (superclass) {
this.superclass = superclass;
this.with = function (...mixins) {
return mixins.reduce((c, mixin) => mixin(c), this.superclass);
};
},
clearSelection() {
if (document.getSelection) {
document.getSelection().removeAllRanges();
document.getSelection().addRange(document.createRange());
} else if (window.getSelection) {
if (window.getSelection().removeAllRanges) {
window.getSelection().removeAllRanges();
window.getSelection().addRange(document.createRange());
} else if (window.getSelection().empty) {
window.getSelection().empty();
}
} else if (document.selection) {
document.selection.empty();
}
},
randomColor() {
let r; let g; let b;
const h = RollerUtil.randomise(30, 0) / 30;
const i = ~~(h * 6);
const f = h * 6 - i;
const q = 1 - f;
switch (i % 6) {
case 0: r = 1; g = f; b = 0; break;
case 1: r = q; g = 1; b = 0; break;
case 2: r = 0; g = 1; b = f; break;
case 3: r = 0; g = q; b = 1; break;
case 4: r = f; g = 0; b = 1; break;
case 5: r = 1; g = 0; b = q; break;
}
return `#${("00" + (~~(r * 255)).toString(16)).slice(-2)}${("00" + (~~(g * 255)).toString(16)).slice(-2)}${("00" + (~~(b * 255)).toString(16)).slice(-2)}`;
},
/**
* @param hex Original hex color.
* @param [opts] Options object.
* @param [opts.bw] True if the color should be returnes as black/white depending on contrast ratio.
* @param [opts.dark] Color to return if a "dark" color would contrast best.
* @param [opts.light] Color to return if a "light" color would contrast best.
*/
invertColor(hex, opts) {
opts = opts || {};
hex = hex.slice(1); // remove #
let r = parseInt(hex.slice(0, 2), 16);
let g = parseInt(hex.slice(2, 4), 16);
let b = parseInt(hex.slice(4, 6), 16);
// http://stackoverflow.com/a/3943023/112731
const isDark = (r * 0.299 + g * 0.587 + b * 0.114) > 186;
if (opts.dark && opts.light) return isDark ? opts.dark : opts.light;
else if (opts.bw) return isDark ? "#000000" : "#FFFFFF";
r = (255 - r).toString(16); g = (255 - g).toString(16); b = (255 - b).toString(16);
return `#${[r, g, b].map(it => it.padStart(2, "0")).join("")}`;
},
scrollPageTop() {
document.body.scrollTop = document.documentElement.scrollTop = 0;
},
isInInput(event) {
return event.target.nodeName === "INPUT" || event.target.nodeName === "TEXTAREA"
|| event.target.getAttribute("contenteditable") === "true";
},
expEval(str) {
// eslint-disable-next-line no-new-func
return new Function(`return ${str.replace(/[^-()\d/*+.]/g, "")}`)();
},
parseNumberRange(input, min = Number.MIN_SAFE_INTEGER, max = Number.MAX_SAFE_INTEGER) {
function errInvalid(input) {
throw new Error(`Could not parse range input "${input}"`);
}
function errOutOfRange() {
throw new Error(`Number was out of range! Range was ${min}-${max} (inclusive).`);
}
function isOutOfRange(num) {
return num < min || num > max;
}
function addToRangeVal(range, num) {
range.add(num);
}
function addToRangeLoHi(range, lo, hi) {
for (let i = lo; i <= hi; ++i) range.add(i);
}
while (true) {
if (input && input.trim()) {
const clean = input.replace(/\s*/g, "");
if (/^((\d+-\d+|\d+),)*(\d+-\d+|\d+)$/.exec(clean)) {
const parts = clean.split(",");
const out = new Set();
for (const part of parts) {
if (part.includes("-")) {
const spl = part.split("-");
const numLo = Number(spl[0]);
const numHi = Number(spl[1]);
if (isNaN(numLo) || isNaN(numHi) || numLo === 0 || numHi === 0 || numLo > numHi) errInvalid();
if (isOutOfRange(numLo) || isOutOfRange(numHi)) errOutOfRange();
if (numLo === numHi) addToRangeVal(out, numLo);
else addToRangeLoHi(out, numLo, numHi);
} else {
const num = Number(part);
if (isNaN(num) || num === 0) errInvalid();
else {
if (isOutOfRange(num)) errOutOfRange();
addToRangeVal(out, num);
}
}
}
return out;
} else errInvalid();
} else return null;
}
},
MONTH_NAMES: [
"January", "February", "March", "April", "May", "June",
"July", "August", "September", "October", "November", "December"
],
dateToStr(date, short) {
const month = MiscUtil.MONTH_NAMES[date.getMonth()];
return `${short ? month.substring(0, 3) : month} ${date.getDate()}, ${date.getFullYear()}`;
},
findCommonPrefix(strArr) {
let prefix = null;
strArr.forEach(s => {
if (prefix == null) {
prefix = s;
} else {
const minLen = Math.min(s.length, prefix.length);
for (let i = 0; i < minLen; ++i) {
const cp = prefix[i];
const cs = s[i];
if (cp !== cs) {
prefix = prefix.substring(0, i);
break;
}
}
}
});
return prefix;
},
/**
* @param fgHexTarget Target/resultant color for the foreground item
* @param fgOpacity Desired foreground transparency (0-1 inclusive)
* @param bgHex Background color
*/
calculateBlendedColor(fgHexTarget, fgOpacity, bgHex) {
const fgDcTarget = CryptUtil.hex2Dec(fgHexTarget);
const bgDc = CryptUtil.hex2Dec(bgHex);
return ((fgDcTarget - ((1 - fgOpacity) * bgDc)) / fgOpacity).toString(16);
},
/**
* Borrowed from lodash.
*
* @param func The function to debounce.
* @param wait Minimum duration between calls.
* @param options Options object.
* @return {Function} The debounced function.
*/
debounce(func, wait, options) {
let lastArgs; let lastThis; let maxWait; let result; let timerId; let lastCallTime; let lastInvokeTime = 0; let leading = false; let maxing = false; let trailing = true;
wait = Number(wait) || 0;
if (typeof options === "object") {
leading = !!options.leading;
maxing = "maxWait" in options;
maxWait = maxing ? Math.max(Number(options.maxWait) || 0, wait) : maxWait;
trailing = "trailing" in options ? !!options.trailing : trailing;
}
function invokeFunc(time) {
let args = lastArgs; let thisArg = lastThis;
lastArgs = lastThis = undefined;
lastInvokeTime = time;
result = func.apply(thisArg, args);
return result;
}
function leadingEdge(time) {
lastInvokeTime = time;
timerId = setTimeout(timerExpired, wait);
return leading ? invokeFunc(time) : result;
}
function remainingWait(time) {
let timeSinceLastCall = time - lastCallTime; let timeSinceLastInvoke = time - lastInvokeTime; let result = wait - timeSinceLastCall;
return maxing ? Math.min(result, maxWait - timeSinceLastInvoke) : result;
}
function shouldInvoke(time) {
let timeSinceLastCall = time - lastCallTime; let timeSinceLastInvoke = time - lastInvokeTime;
return (lastCallTime === undefined || (timeSinceLastCall >= wait) || (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
}
function timerExpired() {
const time = Date.now();
if (shouldInvoke(time)) {
return trailingEdge(time);
}
// Restart the timer.
timerId = setTimeout(timerExpired, remainingWait(time));
}
function trailingEdge(time) {
timerId = undefined;
if (trailing && lastArgs) return invokeFunc(time);
lastArgs = lastThis = undefined;
return result;
}
function cancel() {
if (timerId !== undefined) clearTimeout(timerId);
lastInvokeTime = 0;
lastArgs = lastCallTime = lastThis = timerId = undefined;
}
function flush() {
return timerId === undefined ? result : trailingEdge(Date.now());
}
function debounced() {
let time = Date.now(); let isInvoking = shouldInvoke(time);
lastArgs = arguments;
lastThis = this;
lastCallTime = time;
if (isInvoking) {
if (timerId === undefined) return leadingEdge(lastCallTime);
if (maxing) {
// Handle invocations in a tight loop.
timerId = setTimeout(timerExpired, wait);
return invokeFunc(lastCallTime);
}
}
if (timerId === undefined) timerId = setTimeout(timerExpired, wait);
return result;
}
debounced.cancel = cancel;
debounced.flush = flush;
return debounced;
},
// from lodash
throttle(func, wait, options) {
let leading = true; let trailing = true;
if (typeof options === "object") {
leading = "leading" in options ? !!options.leading : leading;
trailing = "trailing" in options ? !!options.trailing : trailing;
}
return this.debounce(func, wait, { leading, maxWait: wait, trailing });
},
pDelay(msecs) {
return new Promise(resolve => setTimeout(() => resolve(), msecs));
},
getWalker(keyBlacklist = new Set()) {
function applyHandlers(handlers, ident, obj, lastKey) {
if (!(handlers instanceof Array)) handlers = [handlers];
handlers.forEach(h => obj = h(ident, obj, lastKey));
return obj;
}
const fn = (ident, obj, primitiveHandlers, lastKey) => {
if (obj == null) {
if (primitiveHandlers.null) return applyHandlers(primitiveHandlers.null, ident, obj, lastKey);
return obj;
}
const to = typeof obj;
switch (to) {
case undefined:
if (primitiveHandlers.undefined) return applyHandlers(primitiveHandlers.undefined, ident, obj, lastKey);
return obj;
case "boolean":
if (primitiveHandlers.boolean) return applyHandlers(primitiveHandlers.boolean, ident, obj, lastKey);
return obj;
case "number":
if (primitiveHandlers.number) return applyHandlers(primitiveHandlers.number, ident, obj, lastKey);
return obj;
case "string":
if (primitiveHandlers.string) return applyHandlers(primitiveHandlers.string, ident, obj, lastKey);
return obj;
case "object": {
if (obj instanceof Array) {
if (primitiveHandlers.array) obj = applyHandlers(primitiveHandlers.array, ident, obj, lastKey);
return obj.map(it => fn(ident, it, primitiveHandlers, lastKey));
} else {
if (primitiveHandlers.object) obj = applyHandlers(primitiveHandlers.object, ident, obj, lastKey);
Object.keys(obj).forEach(k => {
const v = obj[k];
if (!keyBlacklist.has(k)) obj[k] = fn(ident, v, primitiveHandlers, k);
});
return obj;
}
}
default: throw new Error(`Unhandled type "${to}"`);
}
};
return { walk: fn };
}
};
// EVENT HANDLERS ======================================================================================================
EventUtil = {
getClientX(evt) { return evt.touches && evt.touches.length ? evt.touches[0].clientX : evt.clientX; },
getClientY(evt) { return evt.touches && evt.touches.length ? evt.touches[0].clientY : evt.clientY; }
};
// CONTEXT MENUS =======================================================================================================
ContextUtil = {
_ctxInit: {},
_ctxClick: {},
_ctxOpenRefsNextId: 1,
_ctxOpenRefs: {},
_handlePreInitContextMenu: (menuId) => {
if (ContextUtil._ctxInit[menuId]) return;
ContextUtil._ctxInit[menuId] = true;
const clickId = `click.${menuId}`;
$("body").off(clickId).on(clickId, (evt) => {
if ($(evt.target).data("ctx-id") != null) return; // ignore clicks on context menus
Object.entries(ContextUtil._ctxOpenRefs[menuId] || {}).forEach(([k, v]) => {
v(false);
delete ContextUtil._ctxOpenRefs[menuId][k];
});
$(`#${menuId}`).hide();
});
},
_getMenuPosition: (menuId, mouse, direction, scrollDir) => {
const win = $(window)[direction]();
const scroll = $(window)[scrollDir]();
const menu = $(`#${menuId}`)[direction]();
let position = mouse + scroll;
// opening menu would pass the side of the page
if (mouse + menu > win && menu < mouse) position -= menu;
return position;
},
_lastMenuId: 1,
getNextGenericMenuId() { return `contextMenu_${ContextUtil._lastMenuId++}`; },
doInitContextMenu: (menuId, clickFn, labels) => {
ContextUtil._ctxClick[menuId] = clickFn;
ContextUtil._handlePreInitContextMenu(menuId);
let tempString = `<ul id="${menuId}" class="dropdown-menu ui-ctx" role="menu">`;
let i = 0;
labels.forEach(it => {
if (it === null) tempString += `<li class="divider"/>`;
else if (typeof it === "object") {
if (it.disabled) tempString += `<li class="disabled"><span>${it.text}</span></li>`;
else {
tempString += `<li><span data-ctx-id="${i}" ${it.title ? `title="${it.title.escapeQuotes()}"` : ""}>${it.text}</span></li>`;
i++;
}
} else {
tempString += `<li><span data-ctx-id="${i}">${it}</span></li>`;
i++;
}
});
tempString += `</ul>`;
$(`#${menuId}`).remove();
$("body").append(tempString);
},
doTeardownContextMenu(menuId) {
delete ContextUtil._ctxInit[menuId];
delete ContextUtil._ctxClick[menuId];
delete ContextUtil._ctxOpenRefs[menuId];
$(`#${menuId}`).remove();
},
handleOpenContextMenu: (evt, ele, menuId, closeHandler, data) => {
// anything specified in "data" is passed through to the final handler(s)
evt.preventDefault();
evt.stopPropagation();
const thisId = ContextUtil._ctxOpenRefsNextId++;
(ContextUtil._ctxOpenRefs[menuId] = ContextUtil._ctxOpenRefs[menuId] || {})[thisId] = closeHandler || (() => { });
const $menu = $(`#${menuId}`)
.show()
.css({
position: "absolute",
left: ContextUtil._getMenuPosition(menuId, evt.clientX, "width", "scrollLeft"),
top: ContextUtil._getMenuPosition(menuId, evt.clientY, "height", "scrollTop")
})
.off("click")
.on("click", "span", function (e) {
$menu.hide();
if (ContextUtil._ctxOpenRefs[menuId][thisId]) ContextUtil._ctxOpenRefs[menuId][thisId](true);
delete ContextUtil._ctxOpenRefs[menuId][thisId];
const $invokedOn = $(evt.target).closest(`li.row`);
const $selectedMenu = $(e.target);
const invokedOnId = Number($selectedMenu.data("ctx-id"));
ContextUtil._ctxClick[menuId](e, ele, $invokedOn, $selectedMenu, isNaN(invokedOnId) ? null : invokedOnId, data);
});
}
};
// LIST AND SEARCH =====================================================================================================
SearchUtil = {
removeStemmer(elasticSearch) {
const stemmer = elasticlunr.Pipeline.getRegisteredFunction("stemmer");
elasticSearch.pipeline.remove(stemmer);
}
};
ListUtil = {
SUB_HASH_PREFIX: "sublistselected",
bindEscapeKey(list, $iptSearch, forceRebind) {
// Bind "ESC" when in search input to "clear input"
if (!list._isBoundEscape || forceRebind) {
if (forceRebind) $iptSearch.off("keydown.search5e");
list._isBoundEscape = true;
$iptSearch.on("keydown.search5e", (e) => {
if (e.which === 27) {
setTimeout(() => {
$iptSearch.blur().val("");
list.search($iptSearch.val());
}, 0);
}
});
}
},
_firstInit: true,
initList(listOpts) {
const $iptSearch = $("#search");
const $wrpList = $(`ul.list.${listOpts.listClass}`);
const list = new List({ $iptSearch, $wrpList, ...listOpts });
$("#reset").click(function () {
$iptSearch.val("");
list.reset();
});
ListUtil.bindEscapeKey(list, $iptSearch);
if (ListUtil._firstInit) {
ListUtil._firstInit = false;
const $headDesc = $(`.page__subtitle`);
$headDesc.html(`${$headDesc.html()} Press J/K to navigate rows.`);
ListUtil._initList_bindWindowHandlers();
}
return list;
},
_initList_scrollToItem() {
const toShow = Hist.getSelectedListElementWithLocation();
if (toShow) {
const $li = $(toShow.item.ele);
const $wrpList = $li.parent();
const parentScroll = $wrpList.scrollTop();
const parentHeight = $wrpList.height();
const posInParent = $li.position().top;
const height = $li.height();
if (posInParent < 0) {
$li[0].scrollIntoView();
} else if (posInParent + height > parentHeight) {
$wrpList.scrollTop(parentScroll + (posInParent - parentHeight + height));
}
}
},
_initList_bindWindowHandlers() {
$(window).on("keypress", (e) => {
// K up; J down
if (noModifierKeys(e)) {
if (e.key === "k" || e.key === "j") {
// don't switch if the user is typing somewhere else
if (MiscUtil.isInInput(e)) return;
const it = Hist.getSelectedListElementWithLocation();
if (it) {
if (e.key === "k") {
const prevLink = $(it.item.ele).prev().find("a").attr("href");
if (prevLink !== undefined) {
window.location.hash = prevLink;
ListUtil._initList_scrollToItem();
} else {
const lists = ListUtil.getPrimaryLists();
let x = it.x;
while (--x >= 0) {
const l = lists[x];
if (l.visibleItems.length) {
const goTo = $(l.visibleItems[l.visibleItems.length - 1].ele).find("a").attr("href");
if (goTo) {
window.location.hash = goTo;
ListUtil._initList_scrollToItem();
}
return;
}
}
}
const fromPrevSibling = $(it.item.ele).closest(`ul`).parent().prev(`li`).find(`ul li`).last().find("a").attr("href");
if (fromPrevSibling) {
window.location.hash = fromPrevSibling;
}
} else if (e.key === "j") {
const nextLink = $(it.item.ele).next().find("a").attr("href");
if (nextLink !== undefined) {
window.location.hash = nextLink;
ListUtil._initList_scrollToItem();
} else {
const lists = ListUtil.getPrimaryLists();
let x = it.x;
while (++x < lists.length) {
const l = lists[x];
if (l.visibleItems.length) {
const goTo = $(l.visibleItems[0].ele).find("a").attr("href");
if (goTo) {
window.location.hash = goTo;
ListUtil._initList_scrollToItem();
}
return;
}
}
}
const fromNxtSibling = $(it.item.ele).closest(`ul`).parent().next(`li`).find(`ul li`).first().find("a").attr("href");
if (fromNxtSibling) {
window.location.hash = fromNxtSibling;
}
}
}
}
}
});
},
updateSelected() {
const curSelectedItem = Hist.getSelectedListItem();
ListUtil._primaryLists.forEach(l => l.updateSelected(curSelectedItem));
},
openContextMenu(evt, list, listItem) {
const listsWithSelections = ListUtil._primaryLists.map(l => ({ l, selected: l.getSelected() }));
let selection;
if (listsWithSelections.some(it => it.selected.length)) {
const isItemInSelection = listsWithSelections.some(it => it.selected.some(li => li === listItem));
if (isItemInSelection) {
selection = listsWithSelections.map(it => it.selected).flat();
// trigger a context menu event with all the selected items
} else {
ListUtil._primaryLists.forEach(l => l.deselectAll());
list.doSelect(listItem);
selection = [listItem]
}
} else {
list.doSelect(listItem);
selection = [listItem]
}
ContextUtil.handleOpenContextMenu(evt, listItem.ele, "list", null, selection);
},
openSubContextMenu(evt, listItem) {
ContextUtil.handleOpenContextMenu(evt, listItem.ele, "listSub", null, [listItem]);
},
$sublistContainer: null,
sublist: null,
_sublistChangeFn: null,
_pUidHandler: null,
_allItems: null,
_primaryLists: [],
_pinned: {},
initSublist(options) {
if (options.itemList !== undefined) ListUtil._allItems = options.itemList; delete options.itemList;
if (options.getSublistRow !== undefined) ListUtil._getSublistRow = options.getSublistRow; delete options.getSublistRow;
if (options.onUpdate !== undefined) ListUtil._sublistChangeFn = options.onUpdate; delete options.onUpdate;
if (options.primaryLists !== undefined) ListUtil._primaryLists = options.primaryLists; delete options.primaryLists;
if (options.uidHandler !== undefined) ListUtil._pUidHandler = options.uidHandler; delete options.uidHandler;
if (options.uidUnpacker !== undefined) ListUtil._uidUnpackFn = options.uidUnpacker; delete options.uidUnpacker;
ListUtil.$sublistContainer = $("#sublistcontainer");
const $wrpSublist = $(`ul.${options.listClass}`);
const sublist = new List({ ...options, $wrpList: $wrpSublist, isUseJquery: true });
ListUtil.sublist = sublist;
if (ListUtil.$sublistContainer.hasClass(`sublist--resizable`)) ListUtil._pBindSublistResizeHandlers(ListUtil.$sublistContainer);
return sublist;
},
setOptions(options) {
if (options.itemList !== undefined) ListUtil._allItems = options.itemList;
if (options.getSublistRow !== undefined) ListUtil._getSublistRow = options.getSublistRow;
if (options.onUpdate !== undefined) ListUtil._sublistChangeFn = options.onUpdate;
if (options.primaryLists !== undefined) ListUtil._primaryLists = options.primaryLists;
if (options.uidHandler !== undefined) ListUtil._pUidHandler = options.uidHandler;
if (options.uidUnpacker !== undefined) ListUtil._uidUnpackFn = options.uidUnpacker;
},
getPrimaryLists() { return this._primaryLists; },
__mouseMoveId: 1,
async _pBindSublistResizeHandlers($ele) {
const STORAGE_KEY = "SUBLIST_RESIZE";
const BORDER_SIZE = 3;
const MOUSE_MOVE_ID = ListUtil.__mouseMoveId++;
const $doc = $(document);
let mousePos;
function resize(evt) {
const dx = evt.clientY - mousePos;
mousePos = evt.clientY;
$ele.css("height", parseInt($ele.css("height")) + dx);
}
$ele.on("mousedown", (evt) => {
if (evt.which === 1 && evt.target === $ele[0]) {
evt.preventDefault();
if (evt.offsetY > $ele.height() - BORDER_SIZE) {
mousePos = evt.clientY;
$doc.on(`mousemove.sublist_resize-${MOUSE_MOVE_ID}`, resize);
}
}
});
$doc.on("mouseup", (evt) => {
if (evt.which === 1) {
$(document).off(`mousemove.sublist_resize-${MOUSE_MOVE_ID}`);
StorageUtil.pSetForPage(STORAGE_KEY, $ele.css("height"));
}
});
const storedHeight = await StorageUtil.pGetForPage(STORAGE_KEY);
if (storedHeight) $ele.css("height", storedHeight);
},
getOrTabRightButton: (id, icon) => {
let $btn = $(`#${id}`);
if (!$btn.length) {
$btn = $(`<button class="stat-tab btn btn-default" id="${id}"><span class="glyphicon glyphicon-${icon}"></span></button>`).appendTo($(`#tabs-right`));
}
return $btn;
},
bindPinButton: () => {
ListUtil.getOrTabRightButton(`btn-pin`, `pushpin`)
.off("click")
.on("click", () => {
if (!ListUtil.isSublisted(Hist.lastLoadedId)) ListUtil.pDoSublistAdd(Hist.lastLoadedId, true);
else ListUtil.pDoSublistRemove(Hist.lastLoadedId);
})
.attr("title", "Pin (Toggle)");
},
genericAddButtonHandler(evt, options = {}) {
if (evt.shiftKey) ListUtil.pDoSublistAdd(Hist.lastLoadedId, true, options.shiftCount || 20);
else ListUtil.pDoSublistAdd(Hist.lastLoadedId, true);
},
bindAddButton: (handlerGenerator, options = {}) => {
ListUtil.getOrTabRightButton(`btn-sublist-add`, `plus`)
.off("click")
.attr("title", `Add (SHIFT for ${options.shiftCount || 20})`)
.on("click", handlerGenerator ? handlerGenerator() : ListUtil.genericAddButtonHandler);
},
genericSubtractButtonHandler(evt, options = {}) {
if (evt.shiftKey) ListUtil.pDoSublistSubtract(Hist.lastLoadedId, options.shiftCount || 20);
else ListUtil.pDoSublistSubtract(Hist.lastLoadedId);
},
bindSubtractButton: (handlerGenerator, options = {}) => {
ListUtil.getOrTabRightButton(`btn-sublist-subtract`, `minus`)
.off("click")
.attr("title", `Subtract (SHIFT for ${options.shiftCount || 20})`)
.on("click", handlerGenerator ? handlerGenerator() : ListUtil.genericSubtractButtonHandler);
},
bindDownloadButton: () => {
const $btn = ListUtil.getOrTabRightButton(`btn-sublist-download`, `download`);
$btn.off("click")
.on("click", async evt => {
if (evt.shiftKey) {
const toEncode = JSON.stringify(ListUtil.getExportableSublist());
const parts = [window.location.href, (UrlUtil.packSubHash(ListUtil.SUB_HASH_PREFIX, [toEncode], { isEncodeBoth: true }))];
await MiscUtil.pCopyTextToClipboard(parts.join(HASH_PART_SEP));
JqueryUtil.showCopiedEffect($btn);
} else {
DataUtil.userDownload(ListUtil._getDownloadName(), JSON.stringify(ListUtil.getExportableSublist(), null, "\t"));
}
})
.attr("title", "Download List (SHIFT for Link)");
},
bindImageDownloadButton(listName) {
const $btn = ListUtil.getOrTabRightButton('btn-download-image', 'download-alt');
$btn.off('click')
.on('click', async evt => {
let name = listName + '---' + decodeURIComponent(window.location.href.split('#')[1]).replace(/\s/g, '');
ListUtil._downloadRenderedHTMLImageFromSelector('#pagecontent', name);
})
.attr('title', 'Download Item Card Image');
},
doJsonLoad(json, additive, funcPreload) {
const funcOnload = () => {
ListUtil._pLoadSavedSublist(json.items, additive).then(() => {
ListUtil._pFinaliseSublist();
});
};
if (funcPreload) funcPreload(json, funcOnload);
else funcOnload();
},
bindUploadButton: (funcPreload) => {
const $btn = ListUtil.getOrTabRightButton(`btn-sublist-upload`, `upload`);
$btn.off("click")
.on("click", (evt) => {
function loadSaved(event, additive) {
const input = event.target;
const reader = new FileReader();
reader.onload = () => {
const text = reader.result;
const json = JSON.parse(text);
$iptAdd.remove();
ListUtil.doJsonLoad(json, additive, funcPreload);
};
reader.readAsText(input.files[0]);
}
const additive = evt.shiftKey;
const $iptAdd = $(`<input type="file" accept=".json" style="position: fixed; top: -100px; left: -100px; display: none;">`).on("change", (evt) => {
loadSaved(evt, additive);
}).appendTo($(`body`));
$iptAdd.click();
})
.attr("title", "Upload List (SHIFT for Add Only)");
},
setFromSubHashes: (subHashes, funcPreload) => {
function funcOnload(json) {
ListUtil._pLoadSavedSublist(json.items, false).then(async () => {
await ListUtil._pFinaliseSublist();
const [link, ...sub] = Hist._getHashParts();
const outSub = [];
Object.keys(unpacked)
.filter(k => k !== ListUtil.SUB_HASH_PREFIX)
.forEach(k => {
outSub.push(`${k}${HASH_SUB_KV_SEP}${unpacked[k].join(HASH_SUB_LIST_SEP)}`);
});
Hist.setSuppressHistory(true);
window.location.hash = `#${link}${outSub.length ? `${HASH_PART_SEP}${outSub.join(HASH_PART_SEP)}` : ""}`;
});
}
const unpacked = {};
subHashes.forEach(s => Object.assign(unpacked, UrlUtil.unpackSubHash(s, true)));
const setFrom = unpacked[ListUtil.SUB_HASH_PREFIX];
if (setFrom) {
const json = JSON.parse(setFrom);
if (funcPreload) funcPreload(json, () => funcOnload(json));
else funcOnload(json);
}
},
_getPinnedCount(index, data) {
const base = ListUtil._pinned[index];
if (!base) return null;
if (data && data.uniqueId) return base[data.uniqueId];
return base._;
},
_setPinnedCount(index, count, data) {
const base = ListUtil._pinned[index];
const key = data && data.uniqueId ? data.uniqueId : "_";
if (base) base[key] = count;
else (ListUtil._pinned[index] = {})[key] = count;
},
_deletePinnedCount(index, data) {
const base = ListUtil._pinned[index];
if (base) {
if (data && data.uniqueId) delete base[data.uniqueId];
else delete base._;
}
},
async pDoSublistAdd(index, doFinalise, addCount, data) {
if (index == null) {
return JqueryUtil.doToast({
content: "Please first view something from the list.",
type: "danger"
});
}
const count = ListUtil._getPinnedCount(index, data) || 0;
addCount = addCount || 1;
ListUtil._setPinnedCount(index, count + addCount, data);
if (count !== 0) {
ListUtil._setViewCount(index, count + addCount, data);
if (doFinalise) await ListUtil._pFinaliseSublist();
} else {
const listItem = await ListUtil._getSublistRow(ListUtil._allItems[index], index, addCount, data);
ListUtil.sublist.addItem(listItem);
if (doFinalise) await ListUtil._pFinaliseSublist();
}
},
async pDoSublistSubtract(index, subtractCount, data) {
const count = ListUtil._getPinnedCount(index, data);
subtractCount = subtractCount || 1;
if (count > subtractCount) {
ListUtil._setPinnedCount(index, count - subtractCount, data);
ListUtil._setViewCount(index, count - subtractCount, data);
ListUtil.sublist.update();
await ListUtil._pSaveSublist();
ListUtil._handleCallUpdateFn();
} else if (count) await ListUtil.pDoSublistRemove(index, data);
},
getSublisted() {
const cpy = MiscUtil.copy(ListUtil._pinned);
const out = {};
Object.keys(cpy).filter(k => Object.keys(cpy[k]).length).forEach(k => out[k] = cpy[k]);
return out;
},
getSublistedIds() {
return Object.keys(ListUtil._pinned).filter(k => Object.keys(ListUtil._pinned[k]).length).map(it => Number(it));
},
_setViewCount: (index, newCount, data) => {
let foundItem;
if (data && data.uniqueId != null) {
foundItem = ListUtil.sublist.items.find(it => it.values.uniqueId === data.uniqueId);
} else {
foundItem = ListUtil.sublist.items.find(it => it.ix === index);
}
foundItem.values.count = newCount;
foundItem.data.$elesCount.forEach($ele => {
if ($ele.is("input")) $ele.val(newCount);
else $ele.text(newCount);
})
},
async _pFinaliseSublist(noSave) {
ListUtil.sublist.update();
ListUtil._updateSublistVisibility();
if (!noSave) await ListUtil._pSaveSublist();
ListUtil._handleCallUpdateFn();
},
getExportableSublist: () => {
const sources = new Set();
const toSave = ListUtil.sublist.items
.map(it => {
sources.add(ListUtil._allItems[it.ix].source);
return { h: it.values.hash.split(HASH_PART_SEP)[0], c: it.values.count || undefined, uniqueId: it.values.uniqueId };
});
return { items: toSave, sources: Array.from(sources) };
},
async _pSaveSublist() {
await StorageUtil.pSetForPage("sublist", ListUtil.getExportableSublist());
},
_updateSublistVisibility: () => {
if (ListUtil.sublist.items.length) ListUtil.$sublistContainer.addClass("sublist--visible");
else ListUtil.$sublistContainer.removeClass("sublist--visible");
},
async pDoSublistRemove(index, data) {
ListUtil._deletePinnedCount(index, data);
if (data && data.uniqueId) ListUtil.sublist.removeItemBy("uniqueId", data.uniqueId);
else ListUtil.sublist.removeItem(index);
ListUtil.sublist.update();
ListUtil._updateSublistVisibility();
await ListUtil._pSaveSublist();
ListUtil._handleCallUpdateFn();
},
async pDoSublistRemoveAll(noSave) {
ListUtil._pinned = {};
ListUtil.sublist.removeAllItems();
ListUtil.sublist.update();
ListUtil._updateSublistVisibility();
if (!noSave) await ListUtil._pSaveSublist();
ListUtil._handleCallUpdateFn();
},
isSublisted: (index, data) => {
return ListUtil._getPinnedCount(index, data);
},
mapSelectedWithDeslect(list, mapFunc) {
return list.getSelected()
.map(it => {
it.isSelected = false;
mapFunc(it.ix);
});
},
_handleCallUpdateFn: () => {
if (ListUtil._sublistChangeFn) ListUtil._sublistChangeFn();
},
_hasLoadedState: false,
async pLoadState() {
if (ListUtil._hasLoadedState) return;
ListUtil._hasLoadedState = true;
try {
const store = await StorageUtil.pGetForPage("sublist");
if (store && store.items) {
ListUtil._pLoadSavedSublist(store.items);
}
} catch (e) {
setTimeout(() => { throw e });
await StorageUtil.pRemoveForPage("sublist");
}
},
async _pLoadSavedSublist(items, additive) {
if (!additive) await ListUtil.pDoSublistRemoveAll(true);
const toLoad = items.map(it => {
const item = Hist._getListItem(it.h);
if (item != null) {
const out = { index: item.ix, addCount: Number(it.c) };
if (ListUtil._uidUnpackFn && it.uniqueId) out.data = ListUtil._uidUnpackFn(it.uniqueId);
return out;
}
return null;
}).filter(it => it);
await Promise.all(toLoad.map(it => ListUtil.pDoSublistAdd(it.index, false, it.addCount, it.data)));
await ListUtil._pFinaliseSublist(true);
},
async pGetSelectedSources() {
let store;
try {
store = await StorageUtil.pGetForPage("sublist");
} catch (e) {
setTimeout(() => { throw e });
}
if (store && store.sources) return store.sources;
},
initGenericPinnable() {
ContextUtil.doInitContextMenu(
"list",
ListUtil.handleGenericContextMenuClick,
[
"Popout",
"Pin"
]
);
ContextUtil.doInitContextMenu(
"listSub",
ListUtil.handleGenericSubContextMenuClick,
[
"Popout",
"Unpin",
"Clear Pins",
null,
"Roll on List",
null,
"Download JSON Data"
]
);
},
initGenericAddable() {
ContextUtil.doInitContextMenu(
"list",
ListUtil.handleGenericMultiContextMenuClick,
[
"Popout",
"Add"
]
);
ContextUtil.doInitContextMenu(
"listSub",
ListUtil.handleGenericMultiSubContextMenuClick,
[
"Popout",
"Remove",
"Clear List",
null,
"Roll on List",
null,
"Download JSON Data"
]
);
},
handleGenericContextMenuClick: (evt, ele, $invokedOn, $selectedMenu, _, selection) => {
switch (Number($selectedMenu.data("ctx-id"))) {
case 0: ListUtil._handleGenericContextMenuClick_pDoMassPopout(evt, ele, $invokedOn, selection); break;
case 1:
Promise.all(ListUtil._primaryLists.map(l => Promise.all(ListUtil.mapSelectedWithDeslect(l, (it) => ListUtil.isSublisted(it) ? Promise.resolve() : ListUtil.pDoSublistAdd(it)))))
.then(async () => ListUtil._pFinaliseSublist());
break;
}
},
handleGenericSubContextMenuClick: (evt, ele, $invokedOn, $selectedMenu, _, selection) => {
switch (Number($selectedMenu.data("ctx-id"))) {
case 0: ListUtil._handleGenericContextMenuClick_pDoMassPopout(evt, ele, $invokedOn, selection); break;
case 1: selection.forEach(item => ListUtil.pDoSublistRemove(item.ix)); break;
case 2:
ListUtil.pDoSublistRemoveAll();
break;
case 3:
ListUtil._rollSubListed();
break;
case 4:
ListUtil._handleJsonDownload();
break;
}
},
handleGenericMultiContextMenuClick: (evt, ele, $invokedOn, $selectedMenu, _, selection) => {
switch (Number($selectedMenu.data("ctx-id"))) {
case 0: ListUtil._handleGenericContextMenuClick_pDoMassPopout(evt, ele, $invokedOn, selection); break;
case 1:
Promise.all(ListUtil._primaryLists.map(l => Promise.all(ListUtil.mapSelectedWithDeslect(l, (it) => ListUtil.pDoSublistAdd(it)))))
.then(async () => {
await ListUtil._pFinaliseSublist();
ListUtil.updateSelected();
});
break;
}
},
handleGenericMultiSubContextMenuClick: (evt, ele, $invokedOn, $selectedMenu, _, selection) => {
switch (Number($selectedMenu.data("ctx-id"))) {
case 0: ListUtil._handleGenericContextMenuClick_pDoMassPopout(evt, ele, $invokedOn, selection); break;
case 1: {
selection.forEach(item => {
if (item.values.uniqueId) ListUtil.pDoSublistRemove(item.ix, { uniqueId: item.values.uniqueId });
else ListUtil.pDoSublistRemove(item.ix);
});
break;
}
case 2:
ListUtil.pDoSublistRemoveAll();
break;
case 3:
ListUtil._rollSubListed();
break;
case 4:
ListUtil._handleJsonDownload();
break;
}
},
async _handleGenericContextMenuClick_pDoMassPopout(evt, ele, $invokedOn, selection) {
const page = UrlUtil.getCurrentPage();
const elePos = ele.getBoundingClientRect();
// do this in serial to have a "window cascade" effect
for (let i = 0; i < selection.length; ++i) {
const listItem = selection[i];
const toRender = ListUtil._allItems[listItem.ix];
const hash = UrlUtil.autoEncodeHash(toRender);
const posOffset = Renderer.hover._BAR_HEIGHT * i;
Renderer.hover.getShowWindow(
Renderer.hover.$getHoverContent_stats(UrlUtil.getCurrentPage(), toRender),
{ mode: "exact", x: elePos.x + posOffset, y: elePos.y + posOffset },
{
title: toRender.name,
isPermanent: true,
pageUrl: `${page}#${hash}`
}
);
}
},
_isRolling: false,
_rollSubListed() {
const timerMult = RollerUtil.randomise(125, 75);
const timers = [0, 1, 1, 1, 1, 1, 1.5, 1.5, 1.5, 2, 2, 2, 2.5, 3, 4, -1] // last element is always sliced off
.map(it => it * timerMult)
.slice(0, -RollerUtil.randomise(4, 1));
function generateSequence(array, length) {
const out = [RollerUtil.rollOnArray(array)];
for (let i = 0; i < length; ++i) {
let next = RollerUtil.rollOnArray(array);
while (next === out.last()) {
next = RollerUtil.rollOnArray(array);
}
out.push(next);
}
return out;
}
if (!ListUtil._isRolling) {
ListUtil._isRolling = true;
const $eles = ListUtil.sublist.items
.map(it => $(it.ele).find(`a`));
if ($eles.length <= 1) {
JqueryUtil.doToast({
content: "Not enough entries to roll!",
type: "danger"
});
return ListUtil._isRolling = false;
}
const $sequence = generateSequence($eles, timers.length);
let total = 0;
timers.map((it, i) => {
total += it;
setTimeout(() => {
$sequence[i][0].click();
if (i === timers.length - 1) ListUtil._isRolling = false;
}, total);
});
}
},
/// Takes in a css selector and an optional name parameter.
/// It will generate a canvas, convert it into an image, prompt the user to download and then remove the canvas from the DOM.
_downloadRenderedHTMLImageFromSelector(selector, name) {
html2canvas(document.querySelector(selector)).then(canvas => {
let canvasImage = canvas.toDataURL('image/png');
// this can be used to download any image from webpage to local disk
let xhr = new XMLHttpRequest();
xhr.responseType = 'blob';
xhr.onload = function () {
let a = document.createElement('a');
a.href = window.URL.createObjectURL(xhr.response);
a.download = name ? name + '.png' : '5e-tools-image' + Date.now() + '.png';
a.style.display = 'none';
document.body.appendChild(a);
a.click();
a.remove();
canvas.remove();
};
xhr.open('GET', canvasImage); // This is to download the canvas Image
xhr.send();
});
},
_getDownloadName() {
return `${UrlUtil.getCurrentPage().replace(".html", "")}-sublist`;
},
genericPinKeyMapper(pMapUid = ListUtil._pUidHandler) {
return Object.entries(ListUtil.getSublisted()).map(([id, it]) => {
return Object.keys(it).map(k => {
const it = ListUtil._allItems[id];
return k === "_" ? Promise.resolve(MiscUtil.copy(it)) : pMapUid(it, k);
}).reduce((a, b) => a.concat(b), []);
}).reduce((a, b) => a.concat(b), []);
},
_handleJsonDownload() {
if (ListUtil._pUidHandler) {
const promises = ListUtil.genericPinKeyMapper();
Promise.all(promises).then(data => {
data.forEach(cpy => DataUtil.cleanJson(cpy));
DataUtil.userDownload(`${ListUtil._getDownloadName()}-data`, data);
});
} else {
const out = ListUtil.getSublistedIds().map(id => {
const cpy = JSON.parse(JSON.stringify(ListUtil._allItems[id]));
DataUtil.cleanJson(cpy);
return cpy;
});
DataUtil.userDownload(`${ListUtil._getDownloadName()}-data`, out);
}
},
getCompleteFilterSources(it) {
return it.otherSources ? [it.source].concat(it.otherSources.map(src => new FilterItem({ item: src.source, isIgnoreRed: true }))) : it.source;
},
bindShowTableButton(id, title, dataList, colTransforms, filter, sorter) {
$(`#${id}`).click("click", () => ListUtil.showTable(title, dataList, colTransforms, filter, sorter));
},
basicFilterGenerator() {
const slIds = ListUtil.getSublistedIds();
if (slIds.length) {
const slIdSet = new Set(slIds);
return slIdSet.has.bind(slIdSet);
} else {
const visibleIds = new Set(ListUtil.getVisibleIds());
return visibleIds.has.bind(visibleIds);
}
},
getVisibleIds() {
return ListUtil._primaryLists.map(l => l.visibleItems.map(it => it.ix)).flat();
},
// FIXME move this out
showTable(title, dataList, colTransforms, filter, sorter) {
const $modal = $(`<div class="modal__outer dropdown-menu"/>`);
const $wrpModal = $(`<div class="modal__wrp">`).appendTo($(`body`)).click(() => $wrpModal.remove());
$modal.appendTo($wrpModal);
const $modalInner = $(`<div class="modal__inner"/>`).appendTo($modal).click((evt) => evt.stopPropagation());
const $pnlControl = $(`<div class="split my-3"/>`).appendTo($modalInner);
const $pnlCols = $(`<div class="flex" style="align-items: center;"/>`).appendTo($pnlControl);
Object.values(colTransforms).forEach((c, i) => {
const $wrpCb = $(`<label class="flex-${c.flex || 1} px-2 mr-2 no-wrap inline-flex">${c.name} </label>`).appendTo($pnlCols);
const $cbToggle = $(`<input type="checkbox" class="ml-1" data-name="${c.name}" checked>`)
.click(() => {
const toToggle = $modalInner.find(`.col_${i}`);
if ($cbToggle.prop("checked")) {
toToggle.show();
} else {
toToggle.hide();
}
})
.appendTo($wrpCb);
});
const $pnlBtns = $(`<div/>`).appendTo($pnlControl);
function getAsCsv() {
const headers = $pnlCols.find(`input:checked`).map((i, e) => $(e).data("name")).get();
const rows = $modalInner.find(`.data-row`).map((i, e) => $(e)).get().map($e => {
return $e.children().filter(`td:visible`).map((j, d) => $(d).text().trim()).get();
});
return DataUtil.getCsv(headers, rows);
}
const $btnCsv = $(`<button class="btn btn-primary mr-3">Download CSV</button>`).click(() => {
DataUtil.userDownloadText(`${title}.csv`, getAsCsv());
}).appendTo($pnlBtns);
const $btnCopy = $(`<button class="btn btn-primary">Copy CSV to Clipboard</button>`).click(async () => {
await MiscUtil.pCopyTextToClipboard(getAsCsv());
JqueryUtil.showCopiedEffect($btnCopy);
}).appendTo($pnlBtns);
$modalInner.append(`<hr>`);
if (typeof filter === "object" && filter.generator) filter = filter.generator();
let temp = `<table class="table-striped stats stats--book stats--book-large" style="width: 100%;"><thead><tr>${Object.values(colTransforms).map((c, i) => `<th class="col_${i} px-2" colspan="${c.flex || 1}">${c.name}</th>`).join("")}</tr></thead><tbody>`;
const listCopy = JSON.parse(JSON.stringify(dataList)).filter((it, i) => filter ? filter(i) : it);
if (sorter) listCopy.sort(sorter);
listCopy.forEach(it => {
temp += `<tr class="data-row">`;
temp += Object.keys(colTransforms).map((k, i) => {
const c = colTransforms[k];
return `<td class="col_${i} px-2" colspan="${c.flex || 1}">${c.transform === true ? it[k] : c.transform(k[0] === "_" ? it : it[k])}</td>`;
}).join("");
temp += `</tr>`;
});
temp += `</tbody></table>`;
$modalInner.append(temp);
},
addListShowHide() {
$(`#filter-search-input-group`).find(`#reset`).before(`<button class="btn btn-default" id="hidesearch">Hide</button>`);
$(`#contentwrapper`).prepend(`<div class="col-12" id="showsearch"><button class="btn btn-block btn-default btn-xs" type="button">Show Search</button><br></div>`);
const $wrpList = $(`#listcontainer`);
const $wrpBtnShowSearch = $("div#showsearch");
const $btnHideSearch = $("button#hidesearch");
$btnHideSearch.attr("title", "Hide Search Bar and Entry List");
// collapse/expand search button
$btnHideSearch.click(function () {
$wrpList.hide();
$wrpBtnShowSearch.show();
$btnHideSearch.hide();
});
$wrpBtnShowSearch.find("button").click(function () {
$wrpList.show();
$wrpBtnShowSearch.hide();
$btnHideSearch.show();
});
}
};
/**
* Generic source filter
* deselected. If there are more items to be deselected than selected, it is advisable to set this to "true"
* @param options overrides for the default filter options
* @returns {*} a `Filter`
*/
function getSourceFilter(options = {}) {
const baseOptions = {
header: FilterBox.SOURCE_HEADER,
displayFn: (item) => Parser.sourceJsonToFullCompactPrefix(item.item || item),
selFn: defaultSourceSelFn,
groupFn: SourceUtil.getFilterGroup
};
Object.assign(baseOptions, options);
return new Filter(baseOptions);
}
function defaultSourceSelFn(val) {
return !SourceUtil.isNonstandardSource(val);
}
function getAsiFilter(options) {
const baseOptions = {
header: "Ability Bonus",
items: [
"str",
"dex",
"con",
"int",
"wis",
"cha"
],
displayFn: Parser.attAbvToFull,
itemSortFn: null
};
return getFilterWithMergedOptions(baseOptions, options);
}
function getFilterWithMergedOptions(baseOptions, addOptions) {
if (addOptions) Object.assign(baseOptions, addOptions); // merge in anything we get passed
return new Filter(baseOptions);
}
/**
* @param opts Options object.
* @param opts.filters Array of filters to be included in this box.
* @param [opts.isCompact] True if this box should have a compact/reduced UI.
*/
async function pInitFilterBox(opts) {
opts.$wrpFormTop = $(`#filter-search-input-group`).attr("title", "Hotkey: f");
opts.$btnReset = $(`#reset`);
const filterBox = new FilterBox(opts);
await filterBox.pDoLoadState();
return filterBox;
}
// ENCODING/DECODING ===================================================================================================
UrlUtil = {
encodeForHash(toEncode) {
if (toEncode instanceof Array) {
return toEncode.map(i => encodeForHashHelper(i)).join(HASH_LIST_SEP);
} else {
return encodeForHashHelper(toEncode);
}
function encodeForHashHelper(part) {
return encodeURIComponent(part).toLowerCase();
}
},
autoEncodeHash(obj) {
const curPage = UrlUtil.getCurrentPage();
const encoder = UrlUtil.URL_TO_HASH_BUILDER[curPage];
if (!encoder) throw new Error(`No encoder found for page ${curPage}`);
return encoder(obj);
},
getCurrentPage() {
const pSplit = window.location.pathname.split("/");
let out = pSplit[pSplit.length - 1];
if (!out.toLowerCase().endsWith(".html")) out += ".html";
return out;
},
/**
* All internal URL construction should pass through here, to ensure `static.5etools.com` is used when required.
*
* @param href the link
*/
link(href) {
function addGetParam(curr) {
if (href.includes("?")) return `${curr}&v=${VERSION_NUMBER}`;
else return `${curr}?v=${VERSION_NUMBER}`;
}
if (!IS_VTT && IS_DEPLOYED) return addGetParam(`${DEPLOYED_STATIC_ROOT}${href}`);
else if (IS_DEPLOYED) return addGetParam(href);
return href;
},
unpackSubHash(subHash, unencode) {
// format is "key:value~list~sep~with~tilde"
if (subHash.includes(HASH_SUB_KV_SEP)) {
const keyValArr = subHash.split(HASH_SUB_KV_SEP).map(s => s.trim());
const out = {};
let k = keyValArr[0].toLowerCase();
if (unencode) k = decodeURIComponent(k);
let v = keyValArr[1].toLowerCase();
if (unencode) v = decodeURIComponent(v);
out[k] = v.split(HASH_SUB_LIST_SEP).map(s => s.trim());
if (out[k].length === 1 && out[k] === HASH_SUB_NONE) out[k] = [];
return out;
} else {
throw new Error(`Badly formatted subhash ${subHash}`)
}
},
/**
* @param key The subhash key.
* @param values The subhash values.
* @param [opts] Options object.
* @param [opts.isEncodeBoth] If both the key and values should be URl encoded.
* @param [opts.isEncodeKey] If the key should be URL encoded.
* @param [opts.isEncodeValues] If the values should be URL encoded.
* @returns {string}
*/
packSubHash(key, values, opts) {
opts = opts || {};
if (opts.isEncodeBoth || opts.isEncodeKey) key = UrlUtil.pack(key);
if (opts.isEncodeBoth || opts.isEncodeValues) values = values.map(it => UrlUtil.pack(it));
return `${key}${HASH_SUB_KV_SEP}${values.join(HASH_SUB_LIST_SEP)}`;
},
pack(part) {
return encodeURIComponent(part.toLowerCase());
},
categoryToPage(category) {
return UrlUtil.CAT_TO_PAGE[category];
},
bindLinkExportButton(filterBox) {
const $btn = ListUtil.getOrTabRightButton(`btn-link-export`, `magnet`);
$btn.addClass("btn-copy-effect")
.off("click")
.on("click", async evt => {
let url = window.location.href;
const parts = filterBox.getSubHashes();
parts.unshift(url);
if (evt.shiftKey) {
const toEncode = JSON.stringify(ListUtil.getExportableSublist());
const part2 = UrlUtil.packSubHash(ListUtil.SUB_HASH_PREFIX, [toEncode], { isEncodeBoth: true });
parts.push(part2);
}
await MiscUtil.pCopyTextToClipboard(parts.join(HASH_PART_SEP));
JqueryUtil.showCopiedEffect($btn);
})
.attr("title", "Get Link to Filters (SHIFT adds List)")
},
class: {
getIndexedEntries(cls) {
const out = [];
let scFeatureI = 0;
(cls.classFeatures || []).forEach((lvlFeatureList, i) => {
// class features
lvlFeatureList
.filter(feature => !feature.gainSubclassFeature && feature.name !== "Ability Score Improvement") // don't add "you gain a subclass feature" or ASI's
.forEach(feature => {
const name = Renderer.findName(feature);
if (!name) { // tolerate missing names in homebrew
if (BrewUtil.hasSourceJson(cls.source)) return;
else throw new Error("Class feature had no name!");
}
out.push({
_type: "classFeature",
source: cls.source.source || cls.source,
name,
hash: `${UrlUtil.URL_TO_HASH_BUILDER[UrlUtil.PG_CLASSES](cls)}${HASH_PART_SEP}${CLSS_HASH_FEATURE}${UrlUtil.encodeForHash(`${feature.name} ${i + 1}`)}`,
entry: feature,
level: i + 1
})
});
// subclass features
const gainSubclassFeatures = lvlFeatureList.filter(feature => feature.gainSubclassFeature);
if (gainSubclassFeatures.length === 1) {
const gainFeatureHash = `${CLSS_HASH_FEATURE}${UrlUtil.encodeForHash(`${gainSubclassFeatures[0].name} ${i + 1}`)}`;
cls.subclasses.forEach(sc => {
const features = ((sc.subclassFeatures || [])[scFeatureI] || []);
sc.source = sc.source || cls.source; // default to class source if required
const tempStack = [];
features.forEach(feature => {
const baseSubclassUrl = `${UrlUtil.URL_TO_HASH_BUILDER[UrlUtil.PG_CLASSES](cls)}${HASH_PART_SEP}${HASH_SUBCLASS}${UrlUtil.encodeForHash(sc.name)}${HASH_SUB_LIST_SEP}${UrlUtil.encodeForHash(sc.source)}`;
const name = Renderer.findName(feature);
if (!name) { // tolerate missing names in homebrew
if (BrewUtil.hasSourceJson(sc.source)) return;
else throw new Error("Subclass feature had no name!");
}
const subclassFeatureHash = `${baseSubclassUrl}${HASH_PART_SEP}${gainFeatureHash}`;
tempStack.push({
_type: "subclassFeature",
name,
subclassName: sc.name,
subclassShortName: sc.shortName,
source: sc.source.source || sc.source,
hash: subclassFeatureHash,
entry: feature,
level: i + 1
});
if (feature.entries) {
const namedFeatureParts = feature.entries.filter(it => it.name);
namedFeatureParts.forEach(it => {
const lvl = i + 1;
if (tempStack.find(existing => it.name === existing.name && lvl === existing.level)) return;
tempStack.push({
_type: "subclassFeaturePart",
name: it.name,
subclassName: sc.name,
subclassShortName: sc.shortName,
source: sc.source.source || sc.source,
hash: subclassFeatureHash,
entry: feature,
level: lvl
});
});
}
});
out.push(...tempStack);
});
scFeatureI++;
} else if (gainSubclassFeatures.length > 1) {
setTimeout(() => { throw new Error(`Multiple subclass features gained at level ${i + 1} for class "${cls.name}" from source "${cls.source}"!`) });
}
});
return out;
}
}
};
UrlUtil.PG_BESTIARY = "bestiary.html";
UrlUtil.PG_SPELLS = "spells.html";
UrlUtil.PG_BACKGROUNDS = "backgrounds.html";
UrlUtil.PG_ITEMS = "items.html";
UrlUtil.PG_CLASSES = "classes.html";
UrlUtil.PG_CONDITIONS_DISEASES = "conditionsdiseases.html";
UrlUtil.PG_FEATS = "feats.html";
UrlUtil.PG_OPT_FEATURES = "optionalfeatures.html";
UrlUtil.PG_PSIONICS = "psionics.html";
UrlUtil.PG_RACES = "races.html";
UrlUtil.PG_REWARDS = "rewards.html";
UrlUtil.PG_VARIATNRULES = "variantrules.html";
UrlUtil.PG_ADVENTURE = "adventure.html";
UrlUtil.PG_ADVENTURES = "adventures.html";
UrlUtil.PG_BOOK = "book.html";
UrlUtil.PG_BOOKS = "books.html";
UrlUtil.PG_DEITIES = "deities.html";
UrlUtil.PG_CULTS_BOONS = "cultsboons.html";
UrlUtil.PG_OBJECTS = "objects.html";
UrlUtil.PG_TRAPS_HAZARDS = "trapshazards.html";
UrlUtil.PG_QUICKREF = "quickreference.html";
UrlUtil.PG_MAKE_SHAPED = "makeshaped.html";
UrlUtil.PG_MANAGE_BREW = "managebrew.html";
UrlUtil.PG_DEMO = "demo.html";
UrlUtil.PG_TABLES = "tables.html";
UrlUtil.PG_VEHICLES = "vehicles.html";
UrlUtil.PG_CHARACTERS = "characters.html";
UrlUtil.PG_ACTIONS = "actions.html";
UrlUtil.URL_TO_HASH_BUILDER = {};
UrlUtil.URL_TO_HASH_BUILDER[UrlUtil.PG_BESTIARY] = (it) => UrlUtil.encodeForHash([it.name, it.source]);
UrlUtil.URL_TO_HASH_BUILDER[UrlUtil.PG_SPELLS] = (it) => UrlUtil.encodeForHash([it.name, it.source]);
UrlUtil.URL_TO_HASH_BUILDER[UrlUtil.PG_BACKGROUNDS] = (it) => UrlUtil.encodeForHash([it.name, it.source]);
UrlUtil.URL_TO_HASH_BUILDER[UrlUtil.PG_ITEMS] = (it) => UrlUtil.encodeForHash([it.name, it.source]);
UrlUtil.URL_TO_HASH_BUILDER[UrlUtil.PG_CLASSES] = (it) => UrlUtil.encodeForHash([it.name, it.source]);
UrlUtil.URL_TO_HASH_BUILDER[UrlUtil.PG_CONDITIONS_DISEASES] = (it) => UrlUtil.encodeForHash([it.name, it.source]);
UrlUtil.URL_TO_HASH_BUILDER[UrlUtil.PG_FEATS] = (it) => UrlUtil.encodeForHash([it.name, it.source]);
UrlUtil.URL_TO_HASH_BUILDER[UrlUtil.PG_OPT_FEATURES] = (it) => UrlUtil.encodeForHash([it.name, it.source]);
UrlUtil.URL_TO_HASH_BUILDER[UrlUtil.PG_PSIONICS] = (it) => UrlUtil.encodeForHash([it.name, it.source]);
UrlUtil.URL_TO_HASH_BUILDER[UrlUtil.PG_RACES] = (it) => UrlUtil.encodeForHash([it.name, it.source]);
UrlUtil.URL_TO_HASH_BUILDER[UrlUtil.PG_REWARDS] = (it) => UrlUtil.encodeForHash([it.name, it.source]);
UrlUtil.URL_TO_HASH_BUILDER[UrlUtil.PG_VARIATNRULES] = (it) => UrlUtil.encodeForHash([it.name, it.source]);
UrlUtil.URL_TO_HASH_BUILDER[UrlUtil.PG_ADVENTURE] = (it) => UrlUtil.encodeForHash(it.id);
UrlUtil.URL_TO_HASH_BUILDER[UrlUtil.PG_BOOK] = (it) => UrlUtil.encodeForHash(it.id);
UrlUtil.URL_TO_HASH_BUILDER[UrlUtil.PG_DEITIES] = (it) => UrlUtil.encodeForHash([it.name, it.pantheon, it.source]);
UrlUtil.URL_TO_HASH_BUILDER[UrlUtil.PG_CULTS_BOONS] = (it) => UrlUtil.encodeForHash([it.name, it.source]);
UrlUtil.URL_TO_HASH_BUILDER[UrlUtil.PG_OBJECTS] = (it) => UrlUtil.encodeForHash([it.name, it.source]);
UrlUtil.URL_TO_HASH_BUILDER[UrlUtil.PG_TRAPS_HAZARDS] = (it) => UrlUtil.encodeForHash([it.name, it.source]);
UrlUtil.URL_TO_HASH_BUILDER[UrlUtil.PG_TABLES] = (it) => UrlUtil.encodeForHash([it.name, it.source]);
UrlUtil.URL_TO_HASH_BUILDER[UrlUtil.PG_VEHICLES] = (it) => UrlUtil.encodeForHash([it.name, it.source]);
UrlUtil.URL_TO_HASH_BUILDER[UrlUtil.PG_ACTIONS] = (it) => UrlUtil.encodeForHash([it.name, it.source]);
UrlUtil.CAT_TO_PAGE = {};
UrlUtil.CAT_TO_PAGE[Parser.CAT_ID_CREATURE] = UrlUtil.PG_BESTIARY;
UrlUtil.CAT_TO_PAGE[Parser.CAT_ID_SPELL] = UrlUtil.PG_SPELLS;
UrlUtil.CAT_TO_PAGE[Parser.CAT_ID_BACKGROUND] = UrlUtil.PG_BACKGROUNDS;
UrlUtil.CAT_TO_PAGE[Parser.CAT_ID_ITEM] = UrlUtil.PG_ITEMS;
UrlUtil.CAT_TO_PAGE[Parser.CAT_ID_CLASS] = UrlUtil.PG_CLASSES;
UrlUtil.CAT_TO_PAGE[Parser.CAT_ID_CLASS_FEATURE] = UrlUtil.PG_CLASSES;
UrlUtil.CAT_TO_PAGE[Parser.CAT_ID_SUBCLASS] = UrlUtil.PG_CLASSES;
UrlUtil.CAT_TO_PAGE[Parser.CAT_ID_SUBCLASS_FEATURE] = UrlUtil.PG_CLASSES;
UrlUtil.CAT_TO_PAGE[Parser.CAT_ID_CONDITION] = UrlUtil.PG_CONDITIONS_DISEASES;
UrlUtil.CAT_TO_PAGE[Parser.CAT_ID_FEAT] = UrlUtil.PG_FEATS;
UrlUtil.CAT_TO_PAGE[Parser.CAT_ID_ELDRITCH_INVOCATION] = UrlUtil.PG_OPT_FEATURES;
UrlUtil.CAT_TO_PAGE[Parser.CAT_ID_METAMAGIC] = UrlUtil.PG_OPT_FEATURES;
UrlUtil.CAT_TO_PAGE[Parser.CAT_ID_MANEUVER_BATTLEMASTER] = UrlUtil.PG_OPT_FEATURES;
UrlUtil.CAT_TO_PAGE[Parser.CAT_ID_MANEUVER_CAVALIER] = UrlUtil.PG_OPT_FEATURES;
UrlUtil.CAT_TO_PAGE[Parser.CAT_ID_ARCANE_SHOT] = UrlUtil.PG_OPT_FEATURES;
UrlUtil.CAT_TO_PAGE[Parser.CAT_ID_OPTIONAL_FEATURE_OTHER] = UrlUtil.PG_OPT_FEATURES;
UrlUtil.CAT_TO_PAGE[Parser.CAT_ID_FIGHTING_STYLE] = UrlUtil.PG_OPT_FEATURES;
UrlUtil.CAT_TO_PAGE[Parser.CAT_ID_PSIONIC] = UrlUtil.PG_PSIONICS;
UrlUtil.CAT_TO_PAGE[Parser.CAT_ID_RACE] = UrlUtil.PG_RACES;
UrlUtil.CAT_TO_PAGE[Parser.CAT_ID_OTHER_REWARD] = UrlUtil.PG_REWARDS;
UrlUtil.CAT_TO_PAGE[Parser.CAT_ID_VARIANT_OPTIONAL_RULE] = UrlUtil.PG_VARIATNRULES;
UrlUtil.CAT_TO_PAGE[Parser.CAT_ID_ADVENTURE] = UrlUtil.PG_ADVENTURE;
UrlUtil.CAT_TO_PAGE[Parser.CAT_ID_DEITY] = UrlUtil.PG_DEITIES;
UrlUtil.CAT_TO_PAGE[Parser.CAT_ID_OBJECT] = UrlUtil.PG_OBJECTS;
UrlUtil.CAT_TO_PAGE[Parser.CAT_ID_TRAP] = UrlUtil.PG_TRAPS_HAZARDS;
UrlUtil.CAT_TO_PAGE[Parser.CAT_ID_HAZARD] = UrlUtil.PG_TRAPS_HAZARDS;
UrlUtil.CAT_TO_PAGE[Parser.CAT_ID_QUICKREF] = UrlUtil.PG_QUICKREF;
UrlUtil.CAT_TO_PAGE[Parser.CAT_ID_CULT] = UrlUtil.PG_CULTS_BOONS;
UrlUtil.CAT_TO_PAGE[Parser.CAT_ID_BOON] = UrlUtil.PG_CULTS_BOONS;
UrlUtil.CAT_TO_PAGE[Parser.CAT_ID_DISEASE] = UrlUtil.PG_CONDITIONS_DISEASES;
UrlUtil.CAT_TO_PAGE[Parser.CAT_ID_TABLE] = UrlUtil.PG_TABLES;
UrlUtil.CAT_TO_PAGE[Parser.CAT_ID_TABLE_GROUP] = UrlUtil.PG_TABLES;
UrlUtil.CAT_TO_PAGE[Parser.CAT_ID_VEHICLE] = UrlUtil.PG_VEHICLES;
UrlUtil.CAT_TO_PAGE[Parser.CAT_ID_PACT_BOON] = UrlUtil.PG_OPT_FEATURES;
UrlUtil.CAT_TO_PAGE[Parser.CAT_ID_ELEMENTAL_DISCIPLINE] = UrlUtil.PG_OPT_FEATURES;
UrlUtil.CAT_TO_PAGE[Parser.CAT_ID_ARTIFICER_INFUSION] = UrlUtil.PG_OPT_FEATURES;
UrlUtil.CAT_TO_PAGE[Parser.CAT_ID_SHIP_UPGRADE] = UrlUtil.PG_OPT_FEATURES;
UrlUtil.CAT_TO_PAGE[Parser.CAT_ID_INFERNAL_WAR_MACHINE_UPGRADE] = UrlUtil.PG_OPT_FEATURES;
UrlUtil.CAT_TO_PAGE[Parser.CAT_ID_ONOMANCY_RESONANT] = UrlUtil.PG_OPT_FEATURES;
UrlUtil.CAT_TO_PAGE[Parser.CAT_ID_RUNE_KNIGHT_RUNE] = UrlUtil.PG_OPT_FEATURES;
UrlUtil.CAT_TO_PAGE[Parser.CAT_ID_ALCHEMICAL_FORMULA] = UrlUtil.PG_OPT_FEATURES;
UrlUtil.CAT_TO_PAGE[Parser.CAT_ID_MANEUVER] = UrlUtil.PG_OPT_FEATURES;
UrlUtil.CAT_TO_PAGE[Parser.CAT_ID_ACTION] = UrlUtil.PG_ACTIONS;
if (!IS_DEPLOYED && !IS_VTT && typeof window !== "undefined") {
// for local testing, hotkey to get a link to the current page on the main site
window.addEventListener("keypress", (e) => {
if (noModifierKeys(e) && typeof d20 === "undefined") {
if (e.key === "#") {
const spl = window.location.href.split("/");
window.prompt("Copy to clipboard: Ctrl+C, Enter", `https://5e.tools/${spl[spl.length - 1]}`);
}
}
});
}
// SORTING =============================================================================================================
SortUtil = {
ascSort: (a, b) => {
if (typeof FilterItem !== "undefined") {
if (a instanceof FilterItem) a = a.item;
if (b instanceof FilterItem) b = b.item;
}
return SortUtil._ascSort(a, b);
},
ascSortProp: (prop, a, b) => { return SortUtil.ascSort(a[prop], b[prop]); },
ascSortLower: (a, b) => {
if (typeof FilterItem !== "undefined") {
if (a instanceof FilterItem) a = a.item;
if (b instanceof FilterItem) b = b.item;
}
return SortUtil._ascSort(a.toLowerCase(), b.toLowerCase());
},
ascSortLowerProp: (prop, a, b) => { return SortUtil.ascSortLower(a[prop], b[prop]); },
// warning: slow
ascSortNumericalSuffix(a, b) {
if (typeof FilterItem !== "undefined") {
if (a instanceof FilterItem) a = a.item;
if (b instanceof FilterItem) b = b.item;
}
function popEndNumber(str) {
const spl = str.split(" ");
return spl.last().isNumeric() ? [spl.slice(0, -1).join(" "), Number(spl.last().replace(Parser._numberCleanRegexp, ""))] : [spl.join(" "), 0];
}
const [aStr, aNum] = popEndNumber(a.item || a);
const [bStr, bNum] = popEndNumber(b.item || b);
const initialSort = SortUtil.ascSort(aStr, bStr);
if (initialSort) return initialSort;
return SortUtil.ascSort(aNum, bNum);
},
_ascSort: (a, b) => {
if (b === a) return 0;
return b < a ? 1 : -1;
},
ascSortDate(a, b) {
return b.getTime() - a.getTime();
},
compareListNames(a, b) { return SortUtil._ascSort(a.name.toLowerCase(), b.name.toLowerCase()); },
listSort(a, b, opts) {
if (opts.sortBy === "name") return SortUtil.compareListNames(a, b);
else return SortUtil._compareByOrDefault_compareByOrDefault(a, b, opts.sortBy);
},
_listSort_compareBy(a, b, sortBy) {
const aValue = typeof a.values[sortBy] === "string" ? a.values[sortBy].toLowerCase() : a.values[sortBy];
const bValue = typeof b.values[sortBy] === "string" ? b.values[sortBy].toLowerCase() : b.values[sortBy];
return SortUtil._ascSort(aValue, bValue);
},
_compareByOrDefault_compareByOrDefault(a, b, sortBy) {
return SortUtil._listSort_compareBy(a, b, sortBy) || SortUtil.compareListNames(a, b);
},
/**
* "Special Equipment" first, then alphabetical
*/
monTraitSort: (a, b) => {
if (!a && !b) return 0;
if (!a) return -1;
if (!b) return 1;
if (a.toLowerCase().trim() === "special equipment") return -1;
if (b.toLowerCase().trim() === "special equipment") return 1;
return SortUtil.ascSortLower(a, b);
},
_alignFirst: ["L", "C"],
_alignSecond: ["G", "E"],
alignmentSort: (a, b) => {
if (a === b) return 0;
if (SortUtil._alignFirst.includes(a)) return -1;
if (SortUtil._alignSecond.includes(a)) return 1;
if (SortUtil._alignFirst.includes(b)) return 1;
if (SortUtil._alignSecond.includes(b)) return -1;
return 0;
},
ascSortCr(a, b) {
if (typeof FilterItem !== "undefined") {
if (a instanceof FilterItem) a = a.item;
if (b instanceof FilterItem) b = b.item;
}
// always put unknown values last
if (a === "Unknown" || a === undefined) a = "999";
if (b === "Unknown" || b === undefined) b = "999";
return SortUtil.ascSort(Parser.crToNumber(a), Parser.crToNumber(b));
},
ascSortAtts(a, b) {
const aSpecial = a === "special";
const bSpecial = b === "special";
return aSpecial && bSpecial ? 0 : aSpecial ? 1 : bSpecial ? -1 : Parser.ABIL_ABVS.indexOf(a) - Parser.ABIL_ABVS.indexOf(b);
},
initBtnSortHandlers($wrpBtnsSort, list) {
function addCaret($btnSort, direction) {
$wrpBtnsSort.find(".caret").removeClass("caret");
$btnSort.find(".caret_wrp").addClass("caret").toggleClass("caret--reverse", direction === "asc");
}
const $btnSort = $wrpBtnsSort.find(`.sort[data-sort="${list.sortBy}"]`);
addCaret($btnSort, list.sortDir);
$wrpBtnsSort.find(".sort").each((i, e) => {
const $btnSort = $(e);
$btnSort.click(evt => {
evt.stopPropagation();
const direction = list.sortDir === "asc" ? "desc" : "asc";
addCaret($btnSort, direction);
list.sort($btnSort.data("sort"), direction);
});
});
}
};
// JSON LOADING ========================================================================================================
DataUtil = {
_loading: {},
_loaded: {},
_merging: {},
_merged: {},
async _pLoad(url) {
if (DataUtil._loading[url]) {
await DataUtil._loading[url];
return DataUtil._loaded[url];
}
DataUtil._loading[url] = new Promise((resolve, reject) => {
const request = new XMLHttpRequest();
request.open("GET", url, true);
request.overrideMimeType("application/json");
request.onload = function () {
try {
DataUtil._loaded[url] = JSON.parse(this.response);
resolve();
} catch (e) {
reject(new Error(`Could not parse JSON from ${url}: ${e.message}`));
}
};
request.onerror = (e) => reject(new Error(`Error during JSON request: ${e.target.status}`));
request.send();
});
await DataUtil._loading[url];
return DataUtil._loaded[url];
},
async loadJSON(url, ...otherData) {
const procUrl = UrlUtil.link(url);
let ident = procUrl;
let data;
try {
data = await DataUtil._pLoad(procUrl);
} catch (e) {
setTimeout(() => { throw e; })
}
// Fallback to the un-processed URL
if (!data) {
ident = url;
data = await DataUtil._pLoad(url);
}
await DataUtil.pDoMetaMerge(ident, data);
return data;
},
async pDoMetaMerge(ident, data, options) {
DataUtil._merging[ident] = DataUtil._merging[ident] || DataUtil._pDoMetaMerge(ident, data, options);
await DataUtil._merging[ident];
return DataUtil._merged[ident];
},
async _pDoMetaMerge(ident, data, options) {
if (data._meta) {
if (data._meta.dependencies) {
await Promise.all(Object.entries(data._meta.dependencies).map(async ([prop, sources]) => {
if (!data[prop]) return; // if e.g. monster dependencies are declared, but there are no monsters to merge with, bail out
const toLoads = await Promise.all(sources.map(async source => DataUtil.pGetLoadableByMeta(prop, source)));
const dependencyData = await Promise.all(toLoads.map(toLoad => DataUtil.loadJSON(toLoad)));
const flatDependencyData = dependencyData.map(dd => dd[prop]).flat();
await Promise.all(data[prop].map(async entry => {
if (entry._copy) {
switch (prop) {
case "monster": return DataUtil.monster.pMergeCopy(flatDependencyData, entry, options);
default: throw new Error(`No dependency _copy merge strategy specified for property "${prop}"`);
}
}
}));
}));
delete data._meta.dependencies;
}
if (data._meta.internalCopies) {
Promise.all(data._meta.internalCopies.map(async prop => {
if (!data[prop]) return;
await Promise.all(data[prop].map(async entry => {
if (entry._copy) {
switch (prop) {
case "monster": return DataUtil.monster.pMergeCopy(data[prop], entry, options);
case "item": return DataUtil.item.pMergeCopy(data[prop], entry, options);
case "background": return DataUtil.background.pMergeCopy(data[prop], entry, options);
case "race": return DataUtil.race.pMergeCopy(data[prop], entry, options);
default: throw new Error(`No internal _copy merge strategy specified for property "${prop}"`);
}
}
}));
}));
delete data._meta.internalCopies;
}
}
if (data._meta && data._meta.otherSources) {
await Promise.all(Object.entries(data._meta.otherSources).map(async ([prop, sources]) => {
const toLoads = await Promise.all(Object.entries(sources).map(async ([source, findWith]) => ({
findWith,
url: await DataUtil.pGetLoadableByMeta(prop, source)
})));
const additionalData = await Promise.all(toLoads.map(async ({ findWith, url }) => ({ findWith, sourceData: await DataUtil.loadJSON(url) })));
additionalData.forEach(dataAndSource => {
const findWith = dataAndSource.findWith;
const ad = dataAndSource.sourceData;
const toAppend = ad[prop].filter(it => it.otherSources && it.otherSources.find(os => os.source === findWith));
if (toAppend.length) data[prop] = (data[prop] || []).concat(toAppend);
});
}));
delete data._meta.otherSources;
}
DataUtil._merged[ident] = data;
},
userDownload: function (filename, data) {
if (typeof data !== "string") data = JSON.stringify(data, null, "\t");
const a = document.createElement("a");
const t = new Blob([data], { type: "text/json" });
a.href = URL.createObjectURL(t);
a.download = `${filename}.json`;
document.body.appendChild(a);
a.click();
document.body.removeChild(a);
},
getCleanFilename(filename) {
return filename.replace(/[^-_a-zA-Z0-9]/g, "_");
},
getCsv(headers, rows) {
function escapeCsv(str) {
return `"${str.replace(/"/g, `""`).replace(/ +/g, " ").replace(/\n\n+/gi, "\n\n")}"`;
}
function toCsv(row) {
return row.map(str => escapeCsv(str)).join(",");
}
return `${toCsv(headers)}\n${rows.map(r => toCsv(r)).join("\n")}`;
},
userDownloadText(filename, string) {
const $a = $(`<a href="data:text/plain;charset=utf-8,${encodeURIComponent(string)}" download="${filename}" style="display: none;">DL</a>`);
$(`body`).append($a);
$a[0].click();
$a.remove();
},
pUserUpload() {
return new Promise(resolve => {
const $iptAdd = $(`<input type="file" accept=".json" style="position: fixed; top: -100px; left: -100px; display: none;">`).on("change", (evt) => {
const input = evt.target;
const reader = new FileReader();
reader.onload = () => {
const text = reader.result;
const json = JSON.parse(text);
resolve(json);
};
reader.readAsText(input.files[0]);
}).appendTo($(`body`));
$iptAdd.click();
});
},
cleanJson(cpy) {
cpy.name = cpy._displayName || cpy.name;
DataUtil.__cleanJsonObject(cpy);
return cpy;
},
__cleanJsonObject(obj) {
if (obj == null) return obj;
if (typeof obj === "object") {
if (obj instanceof Array) {
obj.forEach(it => DataUtil.__cleanJsonObject(it));
} else {
Object.entries(obj).forEach(([k, v]) => {
if (k.startsWith("_") || k === "uniqueId") delete obj[k];
else DataUtil.__cleanJsonObject(v);
});
}
}
},
async pGetLoadableByMeta(key, value) {
// TODO in future, allow value to be e.g. a string (assumed to be an official data's source); an object e.g. `{type: external, url: <>}`,...
switch (key) {
case "monster": {
const index = await DataUtil.loadJSON(`${Renderer.get().baseUrl}data/bestiary/index.json`);
if (!index[value]) throw new Error(`Bestiary index did not contain source "${value}"`);
return `${Renderer.get().baseUrl}data/bestiary/${index[value]}`;
}
default: throw new Error(`Could not get loadable URL for \`${JSON.stringify({ key, value })}\``);
}
},
generic: {
async _pMergeCopy(impl, page, entryList, entry, options) {
if (entry._copy) {
const hash = UrlUtil.URL_TO_HASH_BUILDER[page](entry._copy);
const it = impl._mergeCache[hash] || DataUtil.generic._pMergeCopy_search(impl, page, entryList, entry);
if (!it) return;
return DataUtil.generic._pApplyCopy(impl, MiscUtil.copy(it), entry, options);
}
},
_pMergeCopy_search(impl, page, entryList, entry) {
return entryList.find(it => {
impl._mergeCache[UrlUtil.URL_TO_HASH_BUILDER[page](it)] = it;
return it.name === entry._copy.name && it.source === entry._copy.source;
});
},
async _pApplyCopy(impl, copyFrom, copyTo, options = {}) {
if (options.doKeepCopy) copyTo.__copy = MiscUtil.copy(copyFrom);
// convert everything to arrays
function normaliseMods(obj) {
Object.entries(obj._mod).forEach(([k, v]) => {
if (!(v instanceof Array)) obj._mod[k] = [v];
});
}
const copyMeta = copyTo._copy || {};
if (copyMeta._mod) normaliseMods(copyMeta);
// fetch and apply any external traits -- append them to existing copy mods where available
let racials = null;
if (copyMeta._trait) {
const traitData = await DataUtil.loadJSON(`${Renderer.get().baseUrl}data/bestiary/traits.json`);
racials = traitData.trait.find(t => t.name.toLowerCase() === copyMeta._trait.name.toLowerCase() && t.source.toLowerCase() === copyMeta._trait.source.toLowerCase());
if (!racials) throw new Error(`Could not find traits to apply with name "${copyMeta._trait.name}" and source "${copyMeta._trait.source}"`);
racials = MiscUtil.copy(racials);
if (racials.apply._mod) {
normaliseMods(racials.apply);
if (copyMeta._mod) {
Object.entries(racials.apply._mod).forEach(([k, v]) => {
if (copyMeta._mod[k]) copyMeta._mod[k] = copyMeta._mod[k].concat(v);
else copyMeta._mod[k] = v;
});
} else copyMeta._mod = racials.apply._mod;
}
delete copyMeta._trait;
}
// copy over required values
Object.keys(copyFrom).forEach(k => {
if (copyTo[k] === null) return delete copyTo[k];
if (copyTo[k] == null) {
if (impl._MERGE_REQUIRES_PRESERVE[k]) {
if (copyTo._copy._preserve && copyTo._copy._preserve[k]) copyTo[k] = copyFrom[k];
} else copyTo[k] = copyFrom[k];
}
});
// apply any root racial properties after doing base copy
if (racials && racials.apply._root) Object.entries(racials.apply._root).forEach(([k, v]) => copyTo[k] = v);
// mod helpers /////////////////
function doEnsureArray(obj, prop) {
if (!(obj[prop] instanceof Array)) obj[prop] = [obj[prop]];
}
function doMod_appendStr(modInfo, prop) {
if (copyTo[prop]) copyTo[prop] = `${copyTo[prop]}${modInfo.joiner || ""}${modInfo.str}`;
else copyTo[prop] = modInfo.str;
}
function doMod_replaceTxt(modInfo, prop) {
const re = new RegExp(modInfo.replace, `g${modInfo.flags || ""}`);
if (copyTo[prop]) {
copyTo[prop].forEach(it => {
if (it.entries) it.entries = JSON.parse(JSON.stringify(it.entries).replace(re, modInfo.with));
if (it.headerEntries) it.headerEntries = JSON.parse(JSON.stringify(it.headerEntries).replace(re, modInfo.with));
if (it.footerEntries) it.footerEntries = JSON.parse(JSON.stringify(it.footerEntries).replace(re, modInfo.with));
});
}
}
function doMod_prependArr(modInfo, prop) {
doEnsureArray(modInfo, "items");
copyTo[prop] = copyTo[prop] ? modInfo.items.concat(copyTo[prop]) : modInfo.items
}
function doMod_appendArr(modInfo, prop) {
doEnsureArray(modInfo, "items");
copyTo[prop] = copyTo[prop] ? copyTo[prop].concat(modInfo.items) : modInfo.items
}
function doMod_replaceArr(modInfo, prop, isThrow = true) {
doEnsureArray(modInfo, "items");
if (!copyTo[prop]) {
if (isThrow) throw new Error(`Could not find "${prop}" array`);
return false;
}
let ixOld;
if (modInfo.replace.regex) {
const re = new RegExp(modInfo.replace.regex, modInfo.replace.flags || "");
ixOld = copyTo[prop].findIndex(it => it.name ? re.test(it.name) : typeof it === "string" ? re.test(it) : false);
} else if (modInfo.replace.index != null) {
ixOld = modInfo.replace.index;
} else {
ixOld = copyTo[prop].findIndex(it => it.name ? it.name === modInfo.replace : it === modInfo.replace);
}
if (~ixOld) {
copyTo[prop].splice(ixOld, 1, ...modInfo.items);
return true;
} else if (isThrow) throw new Error(`Could not find "${prop}" item with name "${modInfo.replace}" to replace`);
return false;
}
function doMod_replaceOrAppendArr(modInfo, prop) {
const didReplace = doMod_replaceArr(modInfo, prop, false);
if (!didReplace) doMod_appendArr(modInfo, prop);
}
function doMod_insertArr(modInfo, prop) {
doEnsureArray(modInfo, "items");
if (!copyTo[prop]) throw new Error(`Could not find "${prop}" array`);
copyTo[prop].splice(modInfo.index, 0, ...modInfo.items);
}
function doMod_removeArr(modInfo, prop) {
if (modInfo.names) {
doEnsureArray(modInfo, "names");
modInfo.names.forEach(nameToRemove => {
const ixOld = copyTo[prop].findIndex(it => it.name === nameToRemove);
if (~ixOld) copyTo[prop].splice(ixOld, 1);
else throw new Error(`Could not find "${prop}" item with name "${nameToRemove}" to remove`);
});
} else if (modInfo.items) {
doEnsureArray(modInfo, "items");
modInfo.items.forEach(itemToRemove => {
const ixOld = copyTo[prop].findIndex(it => it === itemToRemove);
if (~ixOld) copyTo[prop].splice(ixOld, 1);
else throw new Error(`Could not find "${prop}" item "${itemToRemove}" to remove`);
});
} else throw new Error(`One of "names" or "items" must be provided!`)
}
function doMod_calculateProp(modInfo, prop) {
copyTo[prop] = copyTo[prop] || {};
const toExec = modInfo.formula.replace(/<\$([^$]+)\$>/g, (...m) => {
switch (m[1]) {
case "prof_bonus": return Parser.crToPb(copyTo.cr);
case "dex_mod": return Parser.getAbilityModNumber(copyTo.dex);
default: throw new Error(`Unknown variable "${m[1]}"`);
}
});
// eslint-disable-next-line no-eval
copyTo[prop][modInfo.prop] = eval(toExec);
}
function doMod_scalarAddProp(modInfo, prop) {
function applyTo(k) {
const out = Number(copyTo[prop][k]) + modInfo.scalar;
const isString = typeof copyTo[prop][k] === "string";
copyTo[prop][k] = isString ? `${out >= 0 ? "+" : ""}${out}` : out;
}
if (!copyTo[prop]) return;
if (modInfo.prop === "*") Object.keys(copyTo[prop]).forEach(k => applyTo(k));
else applyTo(modInfo.prop);
}
function doMod_scalarMultProp(modInfo, prop) {
function applyTo(k) {
let out = Number(copyTo[prop][k]) * modInfo.scalar;
if (modInfo.floor) out = Math.floor(out);
const isString = typeof copyTo[prop][k] === "string";
copyTo[prop][k] = isString ? `${out >= 0 ? "+" : ""}${out}` : out;
}
if (!copyTo[prop]) return;
if (modInfo.prop === "*") Object.keys(copyTo[prop]).forEach(k => applyTo(k));
else applyTo(modInfo.prop);
}
function doMod_addSenses(modInfo) {
doEnsureArray(modInfo, "senses");
copyTo.senses = copyTo.senses || [];
modInfo.senses.forEach(sense => {
let found = false;
for (let i = 0; i < copyTo.senses.length; ++i) {
const m = new RegExp(`${sense.type} (\\d+)`, "i").exec(copyTo.senses[i]);
if (m) {
found = true;
// if the creature already has a greater sense of this type, do nothing
if (Number(m[1]) < sense.type) {
copyTo.senses[i] = `${sense.type} ${sense.range} ft.`;
}
break;
}
}
if (!found) copyTo.senses.push(`${sense.type} ${sense.range} ft.`);
});
}
function doMod_addSkills(modInfo) {
copyTo.skill = copyTo.skill || [];
Object.entries(modInfo.skills).forEach(([skill, mode]) => {
// mode: 1 = proficient; 2 = expert
const total = mode * Parser.crToPb(copyTo.cr) + Parser.getAbilityModNumber(copyTo[Parser.skillToAbilityAbv(skill)]);
const asText = total >= 0 ? `+${total}` : `-${total}`;
if (copyTo.skill && copyTo.skill[skill]) {
// update only if ours is larger (prevent reduction in skill score)
if (Number(copyTo.skill[skill]) < total) copyTo.skill[skill] = asText;
} else copyTo.skill[skill] = asText;
});
}
function doMod_addSpells(modInfo) {
if (!copyTo.spellcasting) throw new Error(`Creature did not have a spellcasting property!`);
// TODO could accept a "position" or "name" parameter should spells need to be added to other spellcasting traits
const spellcasting = copyTo.spellcasting[0];
if (modInfo.spells) {
const spells = spellcasting.spells;
Object.keys(modInfo.spells).forEach(k => {
if (!spells[k]) spells[k] = modInfo.spells[k];
else {
// merge the objects
const spellCategoryNu = modInfo.spells[k];
const spellCategoryOld = spells[k];
Object.keys(spellCategoryNu).forEach(kk => {
if (!spellCategoryOld[kk]) spellCategoryOld[kk] = spellCategoryNu[kk];
else {
if (typeof spellCategoryOld[kk] === "object") {
if (spellCategoryOld[kk] instanceof Array) spellCategoryOld[kk] = spellCategoryOld[kk].concat(spellCategoryNu[kk]).sort(SortUtil.ascSortLower);
else throw new Error(`Object at key ${kk} not an array!`);
} else spellCategoryOld[kk] = spellCategoryNu[kk];
}
});
}
});
}
if (modInfo.will) {
modInfo.will.forEach(sp => (modInfo.will = modInfo.will || []).push(sp));
}
if (modInfo.daily) {
for (let i = 1; i <= 9; ++i) {
const e = `${i}e`;
spellcasting.daily = spellcasting.daily || {};
if (modInfo.daily[i]) {
modInfo.daily[i].forEach(sp => (spellcasting.daily[i] = spellcasting.daily[i] || []).push(sp));
}
if (modInfo.daily[e]) {
modInfo.daily[e].forEach(sp => (spellcasting.daily[e] = spellcasting.daily[e] || []).push(sp));
}
}
}
}
function doMod_replaceSpells(modInfo) {
if (!copyTo.spellcasting) throw new Error(`Creature did not have a spellcasting property!`);
// TODO could accept a "position" or "name" parameter should spells need to be added to other spellcasting traits
const spellcasting = copyTo.spellcasting[0];
const handleReplace = (curSpells, replaceMeta, k) => {
doEnsureArray(replaceMeta, "with");
const ix = curSpells[k].indexOf(replaceMeta.replace);
if (~ix) {
curSpells[k].splice(ix, 1, ...replaceMeta.with);
curSpells[k].sort(SortUtil.ascSortLower);
} else throw new Error(`Could not find spell "${replaceMeta.replace}" to replace`);
};
if (modInfo.spells) {
const trait0 = spellcasting.spells;
Object.keys(modInfo.spells).forEach(k => { // k is e.g. "4"
if (trait0[k]) {
const replaceMetas = modInfo.spells[k];
const curSpells = trait0[k];
replaceMetas.forEach(replaceMeta => handleReplace(curSpells, replaceMeta, "spells"));
}
});
}
// TODO should be extended to handle all non-slot-based spellcasters
if (modInfo.daily) {
for (let i = 1; i <= 9; ++i) {
const e = `${i}e`;
if (modInfo.daily[i]) {
modInfo.daily[i].forEach(replaceMeta => handleReplace(spellcasting.daily, replaceMeta, i));
}
if (modInfo.daily[e]) {
modInfo.daily[e].forEach(replaceMeta => handleReplace(spellcasting.daily, replaceMeta, e));
}
}
}
}
function doMod_scalarAddHit(modInfo, prop) {
if (!copyTo[prop]) return;
copyTo[prop] = JSON.parse(JSON.stringify(copyTo[prop]).replace(/{@hit ([-+]?\d+)}/g, (m0, m1) => `{@hit ${Number(m1) + modInfo.scalar}}`))
}
function doMod_scalarAddDc(modInfo, prop) {
if (!copyTo[prop]) return;
copyTo[prop] = JSON.parse(JSON.stringify(copyTo[prop]).replace(/{@dc (\d+)}/g, (m0, m1) => `{@dc ${Number(m1) + modInfo.scalar}}`));
}
function doMod_maxSize(modInfo) {
const ixCur = Parser.SIZE_ABVS.indexOf(copyTo.size);
const ixMax = Parser.SIZE_ABVS.indexOf(modInfo.max);
if (ixCur < 0 || ixMax < 0) throw new Error(`Unhandled size!`);
copyTo.size = Parser.SIZE_ABVS[Math.min(ixCur, ixMax)]
}
function doMod_scalarMultXp(modInfo) {
function getOutput(input) {
let out = input * modInfo.scalar;
if (modInfo.floor) out = Math.floor(out);
return out;
}
if (copyTo.cr.xp) copyTo.cr.xp = getOutput(copyTo.cr.xp);
else {
const curXp = Parser.crToXpNumber(copyTo.cr);
if (!copyTo.cr.cr) copyTo.cr = { cr: copyTo.cr };
copyTo.cr.xp = getOutput(curXp);
}
}
function doMod(modInfos, ...properties) {
function handleProp(prop) {
modInfos.forEach(modInfo => {
if (typeof modInfo === "string") {
switch (modInfo) {
case "remove": return delete copyTo[prop];
default: throw new Error(`Unhandled mode: ${modInfo}`);
}
} else {
switch (modInfo.mode) {
case "appendStr": return doMod_appendStr(modInfo, prop);
case "replaceTxt": return doMod_replaceTxt(modInfo, prop);
case "prependArr": return doMod_prependArr(modInfo, prop);
case "appendArr": return doMod_appendArr(modInfo, prop);
case "replaceArr": return doMod_replaceArr(modInfo, prop);
case "replaceOrAppendArr": return doMod_replaceOrAppendArr(modInfo, prop);
case "insertArr": return doMod_insertArr(modInfo, prop);
case "removeArr": return doMod_removeArr(modInfo, prop);
case "calculateProp": return doMod_calculateProp(modInfo, prop);
case "scalarAddProp": return doMod_scalarAddProp(modInfo, prop);
case "scalarMultProp": return doMod_scalarMultProp(modInfo, prop);
// bestiary specific
case "addSenses": return doMod_addSenses(modInfo);
case "addSkills": return doMod_addSkills(modInfo);
case "addSpells": return doMod_addSpells(modInfo);
case "replaceSpells": return doMod_replaceSpells(modInfo);
case "scalarAddHit": return doMod_scalarAddHit(modInfo, prop);
case "scalarAddDc": return doMod_scalarAddDc(modInfo, prop);
case "maxSize": return doMod_maxSize(modInfo);
case "scalarMultXp": return doMod_scalarMultXp(modInfo);
default: throw new Error(`Unhandled mode: ${modInfo.mode}`);
}
}
});
}
properties.forEach(prop => handleProp(prop));
// special case for "no property" modifications, i.e. underscore-key'd
if (!properties.length) handleProp();
}
// apply mods
if (copyMeta._mod) {
// pre-convert any dynamic text
Object.entries(copyMeta._mod).forEach(([k, v]) => {
copyMeta._mod[k] = JSON.parse(
JSON.stringify(v)
.replace(/<\$([^$]+)\$>/g, (...m) => {
const parts = m[1].split("__");
switch (parts[0]) {
case "name": return copyTo.name;
case "short_name":
case "title_name": {
return copyTo.isNpc ? copyTo.name.split(" ")[0] : `${parts[0] === "title_name" ? "The " : "the "}${copyTo.name.toLowerCase()}`;
}
case "spell_dc": {
if (!Parser.ABIL_ABVS.includes(parts[1])) throw new Error(`Unknown ability score "${parts[1]}"`);
return 8 + Parser.getAbilityModNumber(Number(copyTo[parts[1]])) + Parser.crToPb(copyTo.cr);
}
case "to_hit": {
if (!Parser.ABIL_ABVS.includes(parts[1])) throw new Error(`Unknown ability score "${parts[1]}"`);
const total = Parser.crToPb(copyTo.cr) + Parser.getAbilityModNumber(Number(copyTo[parts[1]]));
return total >= 0 ? `+${total}` : total;
}
case "damage_mod": {
if (!Parser.ABIL_ABVS.includes(parts[1])) throw new Error(`Unknown ability score "${parts[1]}"`);
const total = Parser.getAbilityModNumber(Number(copyTo[parts[1]]));
return total === 0 ? "" : total > 0 ? ` +${total}` : ` ${total}`;
}
case "damage_avg": {
const replaced = parts[1].replace(/(str|dex|con|int|wis|cha)/gi, (...m2) => Parser.getAbilityModNumber(Number(copyTo[m2[0]])));
const clean = replaced.replace(/[^-+/*0-9.,]+/g, "");
// eslint-disable-next-line no-eval
return Math.floor(eval(clean));
}
default: return m[0];
}
})
);
});
Object.entries(copyMeta._mod).forEach(([prop, modInfos]) => {
if (prop === "*") doMod(modInfos, "action", "reaction", "trait", "legendary", "variant", "spellcasting");
else if (prop === "_") doMod(modInfos);
else doMod(modInfos, prop);
});
}
// add filter tag
copyTo._isCopy = true;
// cleanup
delete copyTo._copy;
}
},
monster: {
_MERGE_REQUIRES_PRESERVE: {
legendaryGroup: true,
environment: true,
soundClip: true,
page: true,
altArt: true,
otherSources: true,
variant: true,
dragonCastingColor: true
},
_mergeCache: {},
async pMergeCopy(monList, mon, options) {
return DataUtil.generic._pMergeCopy(DataUtil.monster, UrlUtil.PG_BESTIARY, monList, mon, options);
},
async pLoadAll() {
const index = await DataUtil.loadJSON(`${Renderer.get().baseUrl}data/bestiary/index.json`);
const allData = await Promise.all(Object.entries(index).map(async ([source, file]) => {
const data = await DataUtil.loadJSON(`${Renderer.get().baseUrl}data/bestiary/${file}`);
return data.monster.filter(it => it.source === source);
}));
return allData.flat();
}
},
spell: {
async pLoadAll() {
const index = await DataUtil.loadJSON(`${Renderer.get().baseUrl}data/spells/index.json`);
const allData = await Promise.all(Object.entries(index).map(async ([source, file]) => {
const data = await DataUtil.loadJSON(`${Renderer.get().baseUrl}data/spells/${file}`);
return data.spell.filter(it => it.source === source);
}));
return allData.flat();
}
},
item: {
_MERGE_REQUIRES_PRESERVE: {
lootTables: true,
tier: true
},
_mergeCache: {},
async pMergeCopy(itemList, item, options) {
return DataUtil.generic._pMergeCopy(DataUtil.item, UrlUtil.PG_ITEMS, itemList, item, options);
}
},
background: {
_MERGE_REQUIRES_PRESERVE: {},
_mergeCache: {},
async pMergeCopy(bgList, bg, options) {
return DataUtil.generic._pMergeCopy(DataUtil.background, UrlUtil.PG_BACKGROUNDS, bgList, bg, options);
}
},
race: {
_MERGE_REQUIRES_PRESERVE: {
subraces: true
},
_mergeCache: {},
async pMergeCopy(raceList, race, options) {
return DataUtil.generic._pMergeCopy(DataUtil.race, UrlUtil.PG_RACES, raceList, race, options);
}
},
class: {
_pLoadingJson: null,
_loadedJson: null,
loadJSON: async function (baseUrl = "") {
if (DataUtil.class._loadedJson) return DataUtil.class._loadedJson;
DataUtil.class._pLoadingJson = (async () => {
const index = await DataUtil.loadJSON(`${baseUrl}data/class/index.json`);
const allData = await Promise.all(Object.values(index).map(it => DataUtil.loadJSON(`${baseUrl}data/class/${it}`)));
const out = allData.reduce((a, b) => ({ class: a.class.concat(b.class) }), { class: [] });
out.class.filter(cls => !cls._isEnhanced).forEach(cls => {
cls._isEnhanced = true;
cls.classFeatures.forEach((featArr, i) => {
const ixAsi = featArr.findIndex(it => it.name && it.name.toLowerCase().trim() === "ability score improvement");
if (~ixAsi) {
const toInsert = {
type: "entries",
name: "Proficiency Versatility",
entries: [
`{@i ${Parser.getOrdinalForm(i + 1)}-level feature (enhances Ability Score Improvement)}`,
"When you gain the Ability Score Improvement feature from your class, you can also replace one of your skill proficiencies with a skill proficiency offered by your class at 1st level (the proficiency you replace needn't be from the class).",
"This change represents one of your skills atrophying as you focus on a different skill."
],
source: "UAClassFeatureVariants"
};
featArr.splice(ixAsi + 1, 0, toInsert);
}
});
});
DataUtil.class._loadedJson = out;
})();
await DataUtil.class._pLoadingJson;
return DataUtil.class._loadedJson;
}
},
deity: {
doPostLoad: function (data) {
const PRINT_ORDER = [
SRC_PHB,
SRC_DMG,
SRC_SCAG,
SRC_MTF,
SRC_ERLW
];
const inSource = {};
PRINT_ORDER.forEach(src => {
inSource[src] = {};
data.deity.filter(it => it.source === src).forEach(it => inSource[src][it.reprintAlias || it.name] = it); // TODO need to handle similar names
});
const laterPrinting = [PRINT_ORDER.last()];
[...PRINT_ORDER].reverse().slice(1).forEach(src => {
laterPrinting.forEach(laterSrc => {
Object.keys(inSource[src]).forEach(name => {
const newer = inSource[laterSrc][name];
if (newer) {
const old = inSource[src][name];
old.reprinted = true;
if (!newer._isEnhanced) {
newer.previousVersions = newer.previousVersions || [];
newer.previousVersions.push(old);
}
}
});
});
laterPrinting.push(src);
});
data.deity.forEach(g => g._isEnhanced = true);
},
loadJSON: async function (baseUrl = "") {
const data = await DataUtil.loadJSON(`${baseUrl}data/deities.json`);
DataUtil.deity.doPostLoad(data);
return data;
}
},
table: {
async pLoadAll(baseUrl = "") {
const datas = await Promise.all([`${baseUrl}data/generated/gendata-tables.json`, `${baseUrl}data/tables.json`].map(url => DataUtil.loadJSON(url)));
const combined = {};
datas.forEach(data => {
Object.entries(data).forEach(([k, v]) => {
if (combined[k] && combined[k] instanceof Array && v instanceof Array) combined[k] = combined[k].concat(v);
else if (combined[k] == null) combined[k] = v;
else throw new Error(`Could not merge keys for key "${k}"`);
});
});
return combined;
}
},
brew: {
async pLoadTimestamps() {
return DataUtil.loadJSON(`https://raw.githubusercontent.com/TheGiddyLimit/homebrew/master/_generated/index-timestamps.json`);
},
async pLoadCollectionIndex() {
return DataUtil.loadJSON(`https://raw.githubusercontent.com/TheGiddyLimit/homebrew/master/collection/index.json`);
},
getDirUrl(dir) {
return `https://raw.githubusercontent.com/TheGiddyLimit/homebrew/master/_generated/index-dir-${dir}.json?t=${(new Date()).getTime()}`;
}
}
};
// ROLLING =============================================================================================================
RollerUtil = {
isCrypto: () => {
return typeof window !== "undefined" && typeof window.crypto !== "undefined";
},
randomise: (max, min = 1) => {
if (min > max) return 0;
if (max === min) return max;
if (RollerUtil.isCrypto()) {
return RollerUtil._randomise(min, max + 1);
} else {
return RollerUtil.roll(max) + min;
}
},
rollOnArray(array) {
return array[RollerUtil.randomise(array.length) - 1]
},
/**
* Cryptographically secure RNG
*/
_randomise: (min, max) => {
const range = max - min;
const bytesNeeded = Math.ceil(Math.log2(range) / 8);
const randomBytes = new Uint8Array(bytesNeeded);
const maximumRange = Math.pow(Math.pow(2, 8), bytesNeeded);
const extendedRange = Math.floor(maximumRange / range) * range;
let i;
let randomInteger;
while (true) {
window.crypto.getRandomValues(randomBytes);
randomInteger = 0;
for (i = 0; i < bytesNeeded; i++) {
randomInteger <<= 8;
randomInteger += randomBytes[i];
}
if (randomInteger < extendedRange) {
randomInteger %= range;
return min + randomInteger;
}
}
},
/**
* Result in range: 0 to (max-1); inclusive
* e.g. roll(20) gives results ranging from 0 to 19
* @param max range max (exclusive)
* @param fn funciton to call to generate random numbers
* @returns {number} rolled
*/
roll: (max, fn = Math.random) => {
return Math.floor(fn() * max);
},
addListRollButton: () => {
const $btnRoll = $(`<button class="btn btn-default" id="feelinglucky" title="Feeling Lucky?"><span class="glyphicon glyphicon-random"></span></button>`);
$btnRoll.on("click", () => {
const primaryLists = ListUtil.getPrimaryLists();
if (primaryLists && primaryLists.length) {
const allLists = primaryLists.filter(l => l.visibleItems.length);
if (allLists.length) {
const rollX = RollerUtil.roll(allLists.length);
const list = allLists[rollX];
const rollY = RollerUtil.roll(list.visibleItems.length);
window.location.hash = $(list.visibleItems[rollY].ele).find(`a`).prop("hash");
}
}
});
$(`#filter-search-input-group`).find(`#reset`).before($btnRoll);
},
isRollCol(colLabel) {
if (typeof colLabel !== "string") return false;
if (/^{@dice [^}]+}$/.test(colLabel.trim())) return true;
return !!Renderer.dice.parseToTree(colLabel);
},
_DICE_REGEX_STR: "((([1-9]\\d*)?d([1-9]\\d*)(\\s*?[-+×x*÷/]\\s*?(\\d,\\d|\\d)+(\\.\\d+)?)?))+?"
};
RollerUtil.DICE_REGEX = new RegExp(RollerUtil._DICE_REGEX_STR, "g");
RollerUtil.REGEX_DAMAGE_DICE = /(\d+)( \((?:{@dice |{@damage ))([-+0-9d ]*)(}\) [a-z]+( \([-a-zA-Z0-9 ]+\))?( or [a-z]+( \([-a-zA-Z0-9 ]+\))?)? damage)/gi;
RollerUtil.REGEX_DAMAGE_FLAT = /(Hit: |{@h})([0-9]+)( [a-z]+( \([-a-zA-Z0-9 ]+\))?( or [a-z]+( \([-a-zA-Z0-9 ]+\))?)? damage)/gi;
// STORAGE =============================================================================================================
// Dependency: localforage
StorageUtil = {
_init: false,
_initAsync: false,
_fakeStorage: {},
_fakeStorageAsync: {},
getSyncStorage: () => {
if (StorageUtil._init) {
if (StorageUtil.__fakeStorage) return StorageUtil._fakeStorage;
else return window.localStorage;
}
StorageUtil._init = true;
try {
return window.localStorage;
} catch (e) {
// if the user has disabled cookies, build a fake version
StorageUtil.__fakeStorage = true;
StorageUtil._fakeStorage = {
isSyncFake: true,
getItem: (k) => {
return StorageUtil.__fakeStorage[k];
},
removeItem: (k) => {
delete StorageUtil.__fakeStorage[k];
},
setItem: (k, v) => {
StorageUtil.__fakeStorage[k] = v;
}
};
return StorageUtil._fakeStorage;
}
},
async getAsyncStorage() {
if (StorageUtil._initAsync) {
if (StorageUtil.__fakeStorageAsync) return StorageUtil._fakeStorageAsync;
else return localforage;
}
StorageUtil._initAsync = true;
const getInitFakeStorage = () => {
StorageUtil.__fakeStorageAsync = {};
StorageUtil._fakeStorageAsync = {
pIsAsyncFake: true,
async setItem(k, v) {
StorageUtil.__fakeStorageAsync[k] = v;
},
async getItem(k) {
return StorageUtil.__fakeStorageAsync[k];
},
async removeItem(k) {
delete StorageUtil.__fakeStorageAsync[k];
}
};
return StorageUtil._fakeStorageAsync;
};
if (typeof window !== "undefined") {
try {
// check if IndexedDB is available (i.e. not in Firefox private browsing)
await new Promise((resolve, reject) => {
const request = window.indexedDB.open("_test_db", 1);
request.onerror = reject;
request.onsuccess = resolve;
});
await localforage.setItem("_storage_check", true);
return localforage;
} catch (e) {
return getInitFakeStorage();
}
} else return getInitFakeStorage();
},
// SYNC METHODS ////////////////////////////////////////////////////////////////////////////////////////////////////
// Synchronous localStorage access, which should only be used for small amounts of data (metadata, config, etc)
syncGet(key) {
const rawOut = StorageUtil.getSyncStorage().getItem(key);
if (rawOut && rawOut !== "undefined" && rawOut !== "null") return JSON.parse(rawOut);
return null;
},
syncSet(key, value) {
StorageUtil.getSyncStorage().setItem(key, JSON.stringify(value));
StorageUtil._syncTrackKey(key)
},
syncRemove(key) {
StorageUtil.getSyncStorage().removeItem(key);
StorageUtil._syncTrackKey(key, true);
},
syncGetForPage(key) { return StorageUtil.syncGet(`${key}_${UrlUtil.getCurrentPage()}`); },
syncSetForPage(key, value) { StorageUtil.syncSet(`${key}_${UrlUtil.getCurrentPage()}`, value); },
isSyncFake() {
return !!StorageUtil.getSyncStorage().isSyncFake
},
_syncTrackKey(key, isRemove) {
const meta = StorageUtil.syncGet(StorageUtil._META_KEY) || {};
if (isRemove) delete meta[key];
else meta[key] = 1;
StorageUtil.getSyncStorage().setItem(StorageUtil._META_KEY, JSON.stringify(meta));
},
syncGetDump() {
const out = {};
const meta = StorageUtil.syncGet(StorageUtil._META_KEY) || {};
Object.entries(meta).filter(([key, isPresent]) => isPresent).forEach(([key]) => out[key] = StorageUtil.syncGet(key));
return out;
},
syncSetFromDump(dump) {
Object.entries(dump).forEach(([k, v]) => StorageUtil.syncSet(k, v));
},
// END SYNC METHODS ////////////////////////////////////////////////////////////////////////////////////////////////
async pIsAsyncFake() {
const storage = await StorageUtil.getAsyncStorage();
return !!storage.pIsAsyncFake;
},
async pSet(key, value) {
StorageUtil._pTrackKey(key);
const storage = await StorageUtil.getAsyncStorage();
return storage.setItem(key, value);
},
async pGet(key) {
const storage = await StorageUtil.getAsyncStorage();
return storage.getItem(key);
},
async pRemove(key) {
StorageUtil._pTrackKey(key, true);
const storage = await StorageUtil.getAsyncStorage();
return storage.removeItem(key);
},
getPageKey(key, page) { return `${key}_${page || UrlUtil.getCurrentPage()}`; },
async pGetForPage(key) { return StorageUtil.pGet(StorageUtil.getPageKey(key)); },
async pSetForPage(key, value) { return StorageUtil.pSet(StorageUtil.getPageKey(key), value); },
async pRemoveForPage(key) { return StorageUtil.pRemove(StorageUtil.getPageKey(key)); },
async _pTrackKey(key, isRemove) {
const storage = await StorageUtil.getAsyncStorage();
const meta = (await StorageUtil.pGet(StorageUtil._META_KEY)) || {};
if (isRemove) delete meta[key];
else meta[key] = 1;
storage.setItem(StorageUtil._META_KEY, meta);
},
async pGetDump() {
const out = {};
const meta = (await StorageUtil.pGet(StorageUtil._META_KEY)) || {};
await Promise.all(Object.entries(meta).filter(([key, isPresent]) => isPresent).map(async ([key]) => out[key] = await StorageUtil.pGet(key)));
return out;
},
async pSetFromDump(dump) {
return Promise.all(Object.entries(dump).map(([k, v]) => StorageUtil.pSet(k, v)));
}
};
StorageUtil._META_KEY = "_STORAGE_META_STORAGE";
// TODO transition cookie-like storage items over to this
SessionStorageUtil = {
_fakeStorage: {},
__storage: null,
getStorage: () => {
try {
return window.sessionStorage;
} catch (e) {
// if the user has disabled cookies, build a fake version
if (SessionStorageUtil.__storage) return SessionStorageUtil.__storage;
else {
return SessionStorageUtil.__storage = {
isFake: true,
getItem: (k) => {
return SessionStorageUtil._fakeStorage[k];
},
removeItem: (k) => {
delete SessionStorageUtil._fakeStorage[k];
},
setItem: (k, v) => {
SessionStorageUtil._fakeStorage[k] = v;
}
};
}
}
},
isFake() {
return SessionStorageUtil.getStorage().isSyncFake
},
setForPage: (key, value) => {
SessionStorageUtil.set(`${key}_${UrlUtil.getCurrentPage()}`, value);
},
set(key, value) {
SessionStorageUtil.getStorage().setItem(key, JSON.stringify(value));
},
getForPage: (key) => {
return SessionStorageUtil.get(`${key}_${UrlUtil.getCurrentPage()}`);
},
get(key) {
const rawOut = SessionStorageUtil.getStorage().getItem(key);
if (rawOut && rawOut !== "undefined" && rawOut !== "null") return JSON.parse(rawOut);
return null;
},
removeForPage: (key) => {
SessionStorageUtil.remove(`${key}_${UrlUtil.getCurrentPage()}`)
},
remove(key) {
SessionStorageUtil.getStorage().removeItem(key);
}
};
// HOMEBREW ============================================================================================================
BrewUtil = {
homebrew: null,
homebrewMeta: null,
_lists: null,
_sourceCache: null,
_filterBox: null,
_sourceFilter: null,
_pHandleBrew: null,
/**
* @param options Options object.
* @param [options.list] List.
* @param [options.lists] Lists.
* @param [options.filterBox] Filter box.
* @param [options.sourceFilter] Source filter.
* @param [options.pHandleBrew] Brew handling function.
*/
bind(options) {
// provide ref to List.js instance
if (options.list) BrewUtil._lists = [options.list];
else if (options.lists) BrewUtil._lists = options.lists;
// provide ref to FilterBox and Filter instance
if (options.filterBox) BrewUtil._filterBox = options.filterBox;
if (options.sourceFilter) BrewUtil._sourceFilter = options.sourceFilter;
// allow external source for handleBrew
if (options.pHandleBrew !== undefined) this._pHandleBrew = options.pHandleBrew;
},
async pAddBrewData() {
if (BrewUtil.homebrew) {
return BrewUtil.homebrew;
} else {
try {
const homebrew = await StorageUtil.pGet(HOMEBREW_STORAGE) || {};
BrewUtil.homebrewMeta = StorageUtil.syncGet(HOMEBREW_META_STORAGE) || { sources: [] };
BrewUtil.homebrewMeta.sources = BrewUtil.homebrewMeta.sources || [];
BrewUtil.homebrew = homebrew;
BrewUtil._resetSourceCache();
return BrewUtil.homebrew;
} catch (e) {
BrewUtil.pPurgeBrew(e);
}
}
},
async pPurgeBrew(error) {
JqueryUtil.doToast({
content: "Error when loading homebrew! Purged homebrew data. (See the log for more information.)",
type: "danger"
});
await StorageUtil.pRemove(HOMEBREW_STORAGE);
StorageUtil.syncRemove(HOMEBREW_META_STORAGE);
BrewUtil.homebrew = null;
window.location.hash = "";
BrewUtil.homebrew = {};
BrewUtil.homebrewMeta = { sources: [] };
if (error) setTimeout(() => { throw error; });
},
async pAddLocalBrewData(callbackFn = async (d, page) => BrewUtil.pDoHandleBrewJson(d, page, null)) {
if (!IS_VTT && !IS_DEPLOYED) {
const data = await DataUtil.loadJSON(`${Renderer.get().baseUrl}${JSON_HOMEBREW_INDEX}`);
// auto-load from `homebrew/`, for custom versions of the site
if (data.toImport.length) {
const page = UrlUtil.getCurrentPage();
const allData = await Promise.all(data.toImport.map(it => DataUtil.loadJSON(`homebrew/${it}`)));
await Promise.all(allData.map(d => callbackFn(d, page)));
}
}
},
async _pRenderBrewScreen($appendTo, $overlay, $window, isModal, getBrewOnClose) {
const page = UrlUtil.getCurrentPage();
const $topBar = isModal
? $(`<h4 class="split no-shrink"><span>Manage Homebrew</span></h4>`).appendTo($window)
: $(`<div class="mb-3 text-center no-shrink"/>`).appendTo($window);
$window.append(`<hr class="manbrew__hr no-shrink">`);
const $brewList = $(`<div class="manbrew__current_brew flex-col h-100"/>`);
$window.append($brewList);
await BrewUtil._pRenderBrewScreen_pRefreshBrewList($appendTo, $overlay, $brewList);
const $iptAdd = $(`<input multiple type="file" accept=".json" style="display: none;">`)
.change(evt => {
const input = evt.target;
let readIndex = 0;
const reader = new FileReader();
reader.onload = async () => {
const text = reader.result;
const json = JSON.parse(text);
await DataUtil.pDoMetaMerge(CryptUtil.uid(), json);
await BrewUtil.pDoHandleBrewJson(json, page, BrewUtil._pRenderBrewScreen_pRefreshBrewList.bind(this, $appendTo, $overlay, $brewList));
if (input.files[readIndex]) reader.readAsText(input.files[readIndex++]);
else $(evt.target).val(""); // reset the input
};
reader.readAsText(input.files[readIndex++]);
});
const $btnLoadFromUrl = $(`<button class="btn btn-default btn-sm">Load from URL</button>`)
.click(() => {
const enteredUrl = window.prompt('Please enter the URL of the homebrew:');
if (!enteredUrl) return;
let parsedUrl;
try {
parsedUrl = new URL(enteredUrl);
} catch (e) {
JqueryUtil.doToast({
content: `The provided URL does not appear to be valid.`,
type: "danger"
});
return;
}
BrewUtil.addBrewRemote(null, parsedUrl.href).catch(() => {
JqueryUtil.doToast({
content: "Could not load homebrew from the provided URL.",
type: "danger"
});
});
});
const $btnGet = $(`<button class="btn btn-info btn-sm">Get Homebrew</button>`)
.click(async () => {
const $btnAll = $(`<button class="btn btn-default btn-xs manbrew__load_all" disabled title="(Excluding samples)">Add All</button>`);
const $ulRows = $$`<ul class="list"><li><section><span style="font-style: italic;">Loading...</span></section></li></ul>`;
const $iptSearch = $(`<input type="search" class="search manbrew__search form-control w-100" placeholder="Find homebrew...">`);
const $lst = $$`
<div class="listcontainer homebrew-window dropdown-menu flex-col">
<h4><span>Get Homebrew</span></h4>
<p><i>A list of homebrew available in the public repository. Click a name to load the homebrew, or view the source directly.<br>
Contributions are welcome; see the <a href="https://github.com/TheGiddyLimit/homebrew/blob/master/README.md" target="_blank" rel="noopener">README</a>, or stop by our <a href="https://discord.gg/nGvRCDs" target="_blank" rel="noopener">Discord</a>.</i></p>
<hr class="manbrew__hr">
<div class="manbrew__load_all_wrp">${$btnAll}</div>
${$iptSearch}
<div class="filtertools manbrew__filtertools sortlabel btn-group lst__form-bottom">
<button class="col-4 sort btn btn-default btn-xs" data-sort="name">Name</button>
<button class="col-3 sort btn btn-default btn-xs" data-sort="author">Author</button>
<button class="col-2 sort btn btn-default btn-xs" data-sort="category">Category</button>
<button class="col-2 sort btn btn-default btn-xs" data-sort="timestamp">Added</button>
<button class="sort btn btn-default btn-xs" disabled>Source</button>
</div>
${$ulRows}
</div>
`;
const $nxt = BrewUtil._pRenderBrewScreen_makeInnerOverlay($appendTo, $overlay, getBrewOnClose);
$nxt.append($lst);
$lst.on("click", (evt) => evt.stopPropagation());
// populate list
function getBrewDirs() {
switch (page) {
case UrlUtil.PG_SPELLS: return ["spell"];
case UrlUtil.PG_CLASSES: return ["class", "subclass"];
case UrlUtil.PG_BESTIARY: return ["creature"];
case UrlUtil.PG_BACKGROUNDS: return ["background"];
case UrlUtil.PG_FEATS: return ["feat"];
case UrlUtil.PG_OPT_FEATURES: return ["optionalfeature"];
case UrlUtil.PG_RACES: return ["race"];
case UrlUtil.PG_OBJECTS: return ["object"];
case UrlUtil.PG_TRAPS_HAZARDS: return ["trap", "hazard"];
case UrlUtil.PG_DEITIES: return ["deity"];
case UrlUtil.PG_ITEMS: return ["item", "magicvariant"];
case UrlUtil.PG_REWARDS: return ["reward"];
case UrlUtil.PG_PSIONICS: return ["psionic"];
case UrlUtil.PG_VARIATNRULES: return ["variantrule"];
case UrlUtil.PG_CONDITIONS_DISEASES: return ["condition", "disease"];
case UrlUtil.PG_ADVENTURES: return ["adventure"];
case UrlUtil.PG_BOOKS: return ["book"];
case UrlUtil.PG_TABLES: return ["table"];
case UrlUtil.PG_MAKE_SHAPED: return ["spell", "creature"];
case UrlUtil.PG_MANAGE_BREW:
case UrlUtil.PG_DEMO: return BrewUtil._DIRS;
case UrlUtil.PG_VEHICLES: return ["vehicle"];
case UrlUtil.PG_ACTIONS: return ["action"];
default: throw new Error(`No homebrew directories defined for category ${page}`);
}
}
let dataList;
function fnSort(a, b, o) {
a = dataList[a.ix];
b = dataList[b.ix];
if (o.sortBy === "name") return byName();
if (o.sortBy === "author") return orFallback(SortUtil.ascSortLower, "_brewAuthor");
if (o.sortBy === "category") return orFallback(SortUtil.ascSortLower, "_brewCat");
if (o.sortBy === "timestamp") return orFallback(SortUtil.ascSort, "_brewAdded");
function byName() { return SortUtil.ascSortLower(a._brewName, b._brewName); }
function orFallback(func, prop) { return func(a[prop], b[prop]) || byName(); }
}
const timestamps = await DataUtil.brew.pLoadTimestamps();
const collectionIndex = await DataUtil.brew.pLoadCollectionIndex();
const collectionFiles = (() => {
const dirs = new Set(getBrewDirs().map(dir => BrewUtil._pRenderBrewScreen_dirToCat(dir)));
return Object.keys(collectionIndex).filter(k => collectionIndex[k].find(it => dirs.has(it)));
})();
(async () => {
const toLoads = getBrewDirs().map(it => ({ url: DataUtil.brew.getDirUrl(it), _cat: BrewUtil._pRenderBrewScreen_dirToCat(it) }));
if (collectionFiles.length) toLoads.push({ url: DataUtil.brew.getDirUrl("collection"), _collection: true, _cat: "collection" });
const jsonStack = (await Promise.all(toLoads.map(async toLoad => {
const json = await DataUtil.loadJSON(toLoad.url);
if (toLoad._collection) json.filter(it => it.name === "index.json" || !collectionFiles.includes(it.name)).forEach(it => it._brewSkip = true);
json.forEach(it => it._cat = toLoad._cat);
return json;
}))).flat();
const all = jsonStack.flat();
all.forEach(it => {
const cleanFilename = it.name.trim().replace(/\.json$/, "");
const spl = cleanFilename.split(";").map(it => it.trim());
if (spl.length > 1) {
it._brewName = spl[1];
it._brewAuthor = spl[0];
} else {
it._brewName = cleanFilename;
it._brewAuthor = "";
}
});
all.sort((a, b) => SortUtil.ascSortLower(a._brewName, b._brewName));
const list = new List({
$iptSearch,
$wrpList: $ulRows,
fnSort
});
SortUtil.initBtnSortHandlers($lst.find(".manbrew__filtertools"), list);
dataList = all.filter(it => !it._brewSkip);
dataList.forEach((it, i) => {
it._brewAdded = timestamps[it.path] || 0;
it._brewCat = BrewUtil._pRenderBrewScreen_getDisplayCat(BrewUtil._pRenderBrewScreen_dirToCat(it._cat));
const timestamp = it._brewAdded ? MiscUtil.dateToStr(new Date(it._brewAdded * 1000), true) : "";
const eleLi = $(`<li class="not-clickable lst--border">
<section>
<span class="col-4 bold manbrew__load_from_url pl-0 clickable" onclick="BrewUtil.addBrewRemote(this, '${(it.download_url || "").encodeApos().escapeQuotes()}', true)">${it._brewName}</span>
<span class="col-3">${it._brewAuthor}</span>
<span class="col-2 text-center">${it._brewCat}</span>
<span class="col-2 text-center">${timestamp}</span>
<span class="col-1 manbrew__source text-center pr-0"><a href="${it.download_url}" target="_blank" rel="noopener">View Raw</a></span>
</section>
</li>`)[0];
const listItem = new ListItem(
i,
eleLi,
it._brewName,
{
author: it._brewAuthor,
category: it._brewCat,
timestamp
}
);
list.addItem(listItem);
});
list.init();
ListUtil.bindEscapeKey(list, $iptSearch, true);
// FIXME
$btnAll.prop("disabled", false).click(() => $lst.find(`.manbrew__load_from_url`).filter((i, e) => !$(e).siblings(`.author`).text().toLowerCase().trim().startsWith("sample -")).click());
})();
});
const $btnDelAll = $(`<button class="btn ${isModal ? "btn-xs" : "btn-sm"} btn-danger">Delete All</button>`)
.click(async () => {
if (!window.confirm("Are you sure?")) return;
await StorageUtil.pSet(HOMEBREW_STORAGE, {});
StorageUtil.syncSet(HOMEBREW_META_STORAGE, {});
window.location.hash = "";
location.reload();
});
if (isModal) $btnDelAll.appendTo($topBar);
const $btnWrp = isModal ? $(`<div class="text-center no-shrink"/>`).appendTo($window) : $topBar;
$$`<div ${isModal ? `class="text-center no-shrink"` : ""}>
${$btnGet}
<label role="button" class="btn btn-default btn-sm btn-file">Upload File${$iptAdd}</label>
${$btnLoadFromUrl}
<a href="https://github.com/TheGiddyLimit/homebrew" target="_blank" rel="noopener"><button class="btn btn-default btn-sm btn-file">Browse Source Repository</button></a>
${!isModal ? $btnDelAll : null}
</div>`.appendTo($btnWrp);
$overlay.append($window);
$appendTo.append($overlay);
BrewUtil.addBrewRemote = async (ele, jsonUrl, doUnescape) => {
const $ele = $(ele);
const cached = $ele.html();
$ele.text("Loading...");
if (doUnescape) jsonUrl = jsonUrl.unescapeQuotes();
const data = await DataUtil.loadJSON(`${jsonUrl}?${(new Date()).getTime()}`);
await BrewUtil.pDoHandleBrewJson(data, page, BrewUtil._pRenderBrewScreen_pRefreshBrewList.bind(this, $appendTo, $overlay, $brewList));
$ele.text("Done!");
setTimeout(() => $ele.html(cached), 500);
};
},
_pRenderBrewScreen_makeInnerOverlay($appendTo, $overlay, cbClose) {
$overlay.css("background", "transparent");
const $overlay2 = $(`<div class="homebrew-overlay"/>`);
$overlay2.on("click", () => {
$overlay2.remove();
$overlay.css("background", "");
if (cbClose) cbClose();
});
$appendTo.append($overlay2);
return $overlay2;
},
async _pRenderBrewScreen_pDeleteSource($appendTo, $overlay, $brewList, source, doConfirm, isAllSources) {
if (doConfirm && !window.confirm(`Are you sure you want to remove all homebrew${!isAllSources ? ` with${source ? ` source "${Parser.sourceJsonToFull(source)}"` : `out a source`}` : ""}?`)) return;
const vetoolsSourceSet = new Set(BrewUtil._getActiveVetoolsSources().map(it => it.json));
const isMatchingSource = (itSrc) => isAllSources || (itSrc === source || (source === undefined && !vetoolsSourceSet.has(itSrc) && !BrewUtil.hasSourceJson(itSrc)));
await Promise.all(BrewUtil._getBrewCategories().map(async k => {
const cat = BrewUtil.homebrew[k];
const pDeleteFn = BrewUtil._getPDeleteFunction(k);
const toDel = [];
cat.filter(it => isMatchingSource(it.source)).forEach(it => toDel.push(it.uniqueId));
await Promise.all(toDel.map(async uId => pDeleteFn(uId)));
}));
if (BrewUtil._lists) BrewUtil._lists.forEach(l => l.update());
await StorageUtil.pSet(HOMEBREW_STORAGE, BrewUtil.homebrew);
BrewUtil.removeJsonSource(source);
if (UrlUtil.getCurrentPage() === UrlUtil.PG_MAKE_SHAPED) removeBrewSource(source);
// remove the source from the filters and re-render the filter box
if (BrewUtil._sourceFilter) BrewUtil._sourceFilter.removeItem(source);
if (BrewUtil._filterBox) BrewUtil._filterBox.render();
await BrewUtil._pRenderBrewScreen_pRefreshBrewList($appendTo, $overlay, $brewList);
window.location.hash = "";
if (BrewUtil._filterBox) BrewUtil._filterBox.fireChangeEvent();
},
async _pRenderBrewScreen_pRefreshBrewList($appendTo, $overlay, $brewList) {
function showSourceManager(source, $overlay2, showAll) {
const $wrpBtnDel = $(`<h4 class="split"><span>View/Manage ${source ? `Source Contents: ${Parser.sourceJsonToFull(source)}` : showAll ? "Entries from All Sources" : `Entries with No Source`}</span></h4>`);
const $cbAll = $(`<input type="checkbox">`);
const $ulRows = $$`<ul class="list"/>`;
const $iptSearch = $(`<input type="search" class="search manbrew__search form-control w-100" placeholder="Search entries...">`);
const $lst = $$`
<div class="listcontainer homebrew-window dropdown-menu flex-col">
${$wrpBtnDel}
${$iptSearch}
<div class="filtertools manbrew__filtertools sortlabel btn-group">
<button class="col-6 sort btn btn-default btn-xs" data-sort="name">Name</button>
<button class="col-5 sort btn btn-default btn-xs" data-sort="category">Category</button>
<label class="col-1 wrp-cb-all">${$cbAll}</label>
</div>
${$ulRows}
</div>
`;
$overlay2.append($lst);
$lst.on("click", (evt) => evt.stopPropagation());
let list;
// populate list
function populateList() {
$ulRows.empty();
list = new List({
$iptSearch,
$wrpList: $ulRows,
fnSort: SortUtil.listSort
});
function mapCategoryEntry(cat, bru) {
const out = {};
out.name = bru.name;
out.uniqueId = bru.uniqueId;
out.extraInfo = "";
switch (cat) {
case "subclass":
out.extraInfo = ` (${bru.class})`;
break;
case "psionic":
out.extraInfo = ` (${Parser.psiTypeToFull(bru.type)})`;
break;
case "itemProperty": {
if (bru.entries) out.name = Renderer.findName(bru.entries);
if (!out.name) out.name = bru.abbreviation;
break;
}
case "adventureData":
case "bookData": {
const assocData = {
"adventureData": "adventure",
"bookData": "book"
};
out.name = (((BrewUtil.homebrew[assocData[cat]] || []).find(a => a.id === bru.id) || {}).name || bru.id);
}
}
out.name = out.name || `(Unknown)`;
return out;
}
const vetoolsSourceSet = new Set(BrewUtil._getActiveVetoolsSources().map(it => it.json));
const isMatchingSource = (itSrc) => showAll || (itSrc === source || (source === undefined && !vetoolsSourceSet.has(itSrc) && !BrewUtil.hasSourceJson(itSrc)));
BrewUtil._getBrewCategories().forEach(cat => {
BrewUtil.homebrew[cat]
.filter(it => isMatchingSource(it.source))
.map(it => mapCategoryEntry(cat, it))
.sort((a, b) => SortUtil.ascSort(a.name, b.name))
.forEach((it, i) => {
const dispCat = BrewUtil._pRenderBrewScreen_getDisplayCat(cat, true);
const eleLi = $(`<li class="lst--border"><label class="mb-0 flex-v-center row">
<span class="col-6 bold">${it.name}</span>
<span class="col-5 text-center">${dispCat}${it.extraInfo}</span>
<span class="pr-0 col-1 text-center"><input type="checkbox"></span>
</label></li>`)[0];
const listItem = new ListItem(
i,
eleLi,
it.name,
{
category: dispCat,
category_raw: cat,
uniqueId: it.uniqueId
}
);
list.addItem(listItem);
});
});
$ulRows.empty();
list.init();
if (!list.items.length) $ulRows.append(`<h5 class="text-center">No results found.</h5>`);
ListUtil.bindEscapeKey(list, $lst.find(`.search`), true);
}
populateList();
$cbAll.change(function () {
const val = this.checked;
list.items.forEach(it => $(it.ele).find(`input`).prop("checked", val));
});
$(`<button class="btn btn-danger btn-xs">Delete Selected</button>`).on("click", async () => {
const toDel = list.items.filter(it => $(it.ele).find(`input`).prop("checked")).map(it => it.values);
if (!toDel.length) return;
if (!window.confirm("Are you sure?")) return;
if (toDel.length === list.items.length) {
await BrewUtil._pRenderBrewScreen_pDeleteSource($appendTo, $overlay, $brewList, source, false, false);
$overlay2.click();
} else {
await Promise.all(toDel.map(async it => {
const pDeleteFn = BrewUtil._getPDeleteFunction(it.category_raw);
await pDeleteFn(it.uniqueId);
}));
BrewUtil._lists.forEach(l => l.update());
await StorageUtil.pSet(HOMEBREW_STORAGE, BrewUtil.homebrew);
populateList();
await BrewUtil._pRenderBrewScreen_pRefreshBrewList($appendTo, $overlay, $brewList);
window.location.hash = "";
}
}).appendTo($wrpBtnDel);
}
$brewList.empty();
if (BrewUtil.homebrew) {
const $iptSearch = $(`<input type="search" class="search manbrew__search form-control" placeholder="Search active homebrew...">`);
const $wrpList = $(`<ul class="list-display-only brew-list brew-list--target"></ul>`);
const $ulGroup = $(`<ul class="list-display-only brew-list brew-list--groups no-shrink" style="height: initial;"></ul>`);
const list = new List({ $iptSearch, $wrpList, isUseJquery: true });
const $lst = $$`
<div class="listcontainer flex-col h-100">
${$iptSearch}
<div class="filtertools manbrew__filtertools sortlabel btn-group lst__form-bottom">
<button class="col-5 sort btn btn-default btn-xs" data-sort="source">Source</button>
<button class="col-4 sort btn btn-default btn-xs" data-sort="authors">Authors</button>
<button class="col-1 btn btn-default btn-xs" disabled>Origin</button>
<button class="btn btn-default btn-xs" disabled> </button>
</div>
${$wrpList}
</div>
`.appendTo($brewList);
$ulGroup.appendTo($brewList);
SortUtil.initBtnSortHandlers($lst.find(".manbrew__filtertools"), list);
const createButtons = (src, $row) => {
const $btns = $(`<span class="col-2 text-right"/>`).appendTo($row);
$(`<button class="btn btn-sm btn-default">View/Manage</button>`)
.on("click", () => {
const $nxt = BrewUtil._pRenderBrewScreen_makeInnerOverlay($appendTo, $overlay);
showSourceManager(src.json, $nxt, src._all);
})
.appendTo($btns);
$btns.append(" ");
$(`<button class="btn btn-danger btn-sm"><span class="glyphicon glyphicon-trash"></span></button>`)
.on("click", () => BrewUtil._pRenderBrewScreen_pDeleteSource($appendTo, $overlay, $brewList, src.json, true, src._all))
.appendTo($btns);
};
const page = UrlUtil.getCurrentPage();
const isSourceRelevantForCurrentPage = (source) => {
const getPageCats = () => {
switch (page) {
case UrlUtil.PG_SPELLS: return ["spell"];
case UrlUtil.PG_CLASSES: return ["class", "subclass"];
case UrlUtil.PG_BESTIARY: return ["monster", "legendaryGroup", "monsterFluff"];
case UrlUtil.PG_BACKGROUNDS: return ["background"];
case UrlUtil.PG_FEATS: return ["feat"];
case UrlUtil.PG_OPT_FEATURES: return ["optionalfeature"];
case UrlUtil.PG_RACES: return ["race", "raceFluff"];
case UrlUtil.PG_OBJECTS: return ["object"];
case UrlUtil.PG_TRAPS_HAZARDS: return ["trap", "hazard"];
case UrlUtil.PG_DEITIES: return ["deity"];
case UrlUtil.PG_ITEMS: return ["item", "baseitem", "variant", "itemProperty", "itemType"];
case UrlUtil.PG_REWARDS: return ["reward"];
case UrlUtil.PG_PSIONICS: return ["psionic"];
case UrlUtil.PG_VARIATNRULES: return ["variantrule"];
case UrlUtil.PG_CONDITIONS_DISEASES: return ["condition", "disease"];
case UrlUtil.PG_ADVENTURES: return ["adventure", "adventureData"];
case UrlUtil.PG_BOOKS: return ["book", "bookData"];
case UrlUtil.PG_TABLES: return ["table", "tableGroup"];
case UrlUtil.PG_MAKE_SHAPED: return ["spell", "creature"];
case UrlUtil.PG_MANAGE_BREW:
case UrlUtil.PG_DEMO: return BrewUtil._STORABLE;
case UrlUtil.PG_VEHICLES: return ["vehicle"];
case UrlUtil.PG_ACTIONS: return ["action"];
default: throw new Error(`No homebrew properties defined for category ${page}`);
}
};
const cats = getPageCats();
return !!cats.find(cat => !!(BrewUtil.homebrew[cat] || []).some(entry => entry.source === source));
};
const allSources = MiscUtil.copy(BrewUtil.getJsonSources()).filter(src => isSourceRelevantForCurrentPage(src.json));
allSources.sort((a, b) => SortUtil.ascSort(a.full, b.full));
// add 5etools sources as required, so that any external data loaded with these sources is displayed in the right place
const vetoolsSources = BrewUtil._getActiveVetoolsSources();
allSources.concat(vetoolsSources).forEach((src, i) => {
const validAuthors = (!src.authors ? [] : !(src.authors instanceof Array) ? [] : src.authors).join(", ");
const isGroup = src._unknown || src._all;
const $row = $(`<li class="row manbrew__row lst--border">
<span class="col-5 manbrew__col--tall source manbrew__source">${isGroup ? "<i>" : ""}${src.full}${isGroup ? "</i>" : ""}</span>
<span class="col-4 manbrew__col--tall authors">${validAuthors}</span>
<${src.url ? "a" : "span"} class="col-1 manbrew__col--tall text-center" ${src.url ? `href="${src.url}" target="_blank" rel="noopener"` : ""}>${src.url ? "View Source" : ""}</${src.url ? "a" : "span"}>
<span class="hidden">${src.abbreviation}</span>
</li>`);
createButtons(src, $row);
const listItem = new ListItem(
i,
$row,
src.full,
{
authors: validAuthors,
abbreviation: src.abbreviation
}
);
list.addItem(listItem);
});
const createGroupRow = (fullText, modeProp) => {
const $row = $(`<li class="row manbrew__row">
<span class="col-10 manbrew__col--tall source manbrew__source text-right"><i>${fullText}</i></span>
</li>`);
createButtons({ [modeProp]: true }, $row);
$ulGroup.append($row);
};
createGroupRow("Entries From All Sources", "_all");
createGroupRow("Entries Without Sources", "_unknown");
list.init();
ListUtil.bindEscapeKey(list, $iptSearch, true);
}
},
_pRenderBrewScreen_dirToCat(dir) {
if (!dir) return "";
else if (BrewUtil._STORABLE.includes(dir)) return dir;
else {
switch (dir) {
case "creature": return "monster";
case "collection": return dir;
case "magicvariant": return "variant";
}
throw new Error(`Directory was not mapped to a category: "${dir}"`);
}
},
_pRenderBrewScreen_getDisplayCat(cat, isManager) {
if (cat === "variantrule") return "Variant Rule";
if (cat === "legendaryGroup") return "Legendary Group";
if (cat === "optionalfeature") return "Optional Feature";
if (cat === "adventure") return isManager ? "Adventure Contents/Info" : "Adventure";
if (cat === "adventureData") return "Adventure Text";
if (cat === "book") return isManager ? "Book Contents/Info" : "Book";
if (cat === "bookData") return "Book Text";
if (cat === "itemProperty") return "Item Property";
if (cat === "baseitem") return "Base Item";
if (cat === "variant") return "Magic Item Variant";
if (cat === "monsterFluff") return "Monster Fluff";
return cat.uppercaseFirst();
},
handleLoadbrewClick: async (ele, jsonUrl, name) => {
const $ele = $(ele);
if (!$ele.hasClass("rd__wrp-loadbrew--ready")) return; // an existing click is being handled
const cached = $ele.html();
const cachedTitle = $ele.attr("title");
$ele.attr("title", "");
$ele.removeClass("rd__wrp-loadbrew--ready").html(`${name}<span class="glyphicon glyphicon-refresh rd__loadbrew-icon rd__loadbrew-icon--active"/>`);
jsonUrl = jsonUrl.unescapeQuotes();
const data = await DataUtil.loadJSON(`${jsonUrl}?${(new Date()).getTime()}`);
await BrewUtil.pDoHandleBrewJson(data, UrlUtil.getCurrentPage());
$ele.html(`${name}<span class="glyphicon glyphicon-saved rd__loadbrew-icon"/>`);
setTimeout(() => $ele.html(cached).addClass("rd__wrp-loadbrew--ready").attr("title", cachedTitle), 500);
},
async _pDoRemove(arrName, uniqueId, isChild) {
function getIndex(arrName, uniqueId, isChild) {
return BrewUtil.homebrew[arrName].findIndex(it => isChild ? it.parentUniqueId : it.uniqueId === uniqueId);
}
const index = getIndex(arrName, uniqueId, isChild);
if (~index) {
BrewUtil.homebrew[arrName].splice(index, 1);
if (BrewUtil._lists) {
BrewUtil._lists.forEach(l => l.removeItemBy(isChild ? "parentuniqueId" : "uniqueId", uniqueId));
}
}
},
_getPDeleteFunction(category) {
switch (category) {
case "spell":
case "monster":
case "monsterFluff":
case "background":
case "feat":
case "optionalfeature":
case "race":
case "raceFluff":
case "object":
case "trap":
case "hazard":
case "deity":
case "item":
case "baseitem":
case "variant":
case "itemType":
case "itemProperty":
case "reward":
case "psionic":
case "variantrule":
case "legendaryGroup":
case "condition":
case "disease":
case "table":
case "tableGroup":
case "vehicle":
case "action": return BrewUtil._genPDeleteGenericBrew(category);
case "subclass": return BrewUtil._pDeleteSubclassBrew;
case "class": return BrewUtil._pDeleteClassBrew;
case "adventure":
case "book": return BrewUtil._genPDeleteGenericBookBrew(category);
case "adventureData":
case "bookData": return () => { }; // Do nothing, handled by deleting the associated book/adventure
default: throw new Error(`No homebrew delete function defined for category ${category}`);
}
},
async _pDeleteClassBrew(uniqueId) {
await BrewUtil._pDoRemove("class", uniqueId);
},
async _pDeleteSubclassBrew(uniqueId) {
let subClass;
let index = 0;
for (; index < BrewUtil.homebrew.subclass.length; ++index) {
if (BrewUtil.homebrew.subclass[index].uniqueId === uniqueId) {
subClass = BrewUtil.homebrew.subclass[index];
break;
}
}
if (subClass) {
const forClass = subClass.class;
BrewUtil.homebrew.subclass.splice(index, 1);
await StorageUtil.pSet(HOMEBREW_STORAGE, BrewUtil.homebrew);
if (typeof ClassData !== "undefined") {
const c = ClassData.classes.find(c => c.name.toLowerCase() === forClass.toLowerCase());
const indexInClass = c.subclasses.findIndex(it => it.uniqueId === uniqueId);
if (~indexInClass) {
c.subclasses.splice(indexInClass, 1);
c.subclasses = c.subclasses.sort((a, b) => SortUtil.ascSort(a.name, b.name));
}
}
}
},
_genPDeleteGenericBrew(category) {
return async (uniqueId) => {
await BrewUtil._pDoRemove(category, uniqueId);
};
},
_genPDeleteGenericBookBrew(category) {
return async (uniqueId) => {
await BrewUtil._pDoRemove(category, uniqueId);
await BrewUtil._pDoRemove(`${category}Data`, uniqueId, true);
};
},
manageBrew: () => {
const $body = $(`body`);
$body.css("overflow", "hidden");
const $overlay = $(`<div class="homebrew-overlay"/>`);
$overlay.on("click", () => {
$body.css("overflow", "");
$overlay.remove();
});
const $window = $(`<div class="homebrew-window dropdown-menu flex-col h-100"/>`);
$window.on("click", (evt) => evt.stopPropagation());
BrewUtil._pRenderBrewScreen($body, $overlay, $window, true);
},
async pAddEntry(prop, obj) {
BrewUtil._mutUniqueId(obj);
(BrewUtil.homebrew[prop] = BrewUtil.homebrew[prop] || []).push(obj);
await StorageUtil.pSet(HOMEBREW_STORAGE, BrewUtil.homebrew);
return BrewUtil.homebrew[prop].length - 1;
},
async pRemoveEntry(prop, obj) {
const ix = (BrewUtil.homebrew[prop] = BrewUtil.homebrew[prop] || []).findIndex(it => it.uniqueId === obj.uniqueId);
if (~ix) {
BrewUtil.homebrew[prop].splice(ix, 1);
return StorageUtil.pSet(HOMEBREW_STORAGE, BrewUtil.homebrew);
} else throw new Error(`Could not find object with ID "${obj.uniqueId}" in "${prop}" list`);
},
getEntryIxByName(prop, obj) {
return (BrewUtil.homebrew[prop] = BrewUtil.homebrew[prop] || []).findIndex(it => it.name === obj.name && it.source === obj.source);
},
async pUpdateEntryByIx(prop, ix, obj) {
if (~ix && ix < BrewUtil.homebrew[prop].length) {
BrewUtil._mutUniqueId(obj);
BrewUtil.homebrew[prop].splice(ix, 1, obj);
return StorageUtil.pSet(HOMEBREW_STORAGE, BrewUtil.homebrew);
} else throw new Error(`Index "${ix}" was not valid!`);
},
_mutUniqueId(obj) {
delete obj.uniqueId; // avoid basing the hash on the previous hash
obj.uniqueId = CryptUtil.md5(JSON.stringify(obj));
},
_DIRS: ["action", "adventure", "background", "book", "class", "condition", "creature", "deity", "disease", "feat", "hazard", "item", "magicvariant", "object", "optionalfeature", "psionic", "race", "reward", "spell", "subclass", "table", "trap", "variantrule", "vehicle"],
_STORABLE: ["class", "subclass", "spell", "monster", "legendaryGroup", "monsterFluff", "background", "feat", "optionalfeature", "race", "raceFluff", "deity", "item", "baseitem", "variant", "itemProperty", "itemType", "psionic", "reward", "object", "trap", "hazard", "variantrule", "condition", "disease", "adventure", "adventureData", "book", "bookData", "table", "tableGroup", "vehicle", "action"],
async pDoHandleBrewJson(json, page, pFuncRefresh) {
function storePrep(arrName) {
if (json[arrName]) {
json[arrName].forEach(it => BrewUtil._mutUniqueId(it));
} else json[arrName] = [];
}
// prepare for storage
if (json.race && json.race.length) json.race = Renderer.race.mergeSubraces(json.race);
BrewUtil._STORABLE.forEach(storePrep);
const bookPairs = [
["adventure", "adventureData"],
["book", "bookData"]
];
bookPairs.forEach(([bookMetaKey, bookDataKey]) => {
if (json[bookMetaKey] && json[bookDataKey]) {
json[bookMetaKey].forEach(book => {
const data = json[bookDataKey].find(it => it.id === book.id);
if (data) {
data.parentUniqueId = book.uniqueId;
}
});
}
});
// store
async function pCheckAndAdd(prop) {
if (!BrewUtil.homebrew[prop]) BrewUtil.homebrew[prop] = [];
if (IS_DEPLOYED) {
// in production mode, skip any existing brew
const areNew = [];
const existingIds = BrewUtil.homebrew[prop].map(it => it.uniqueId);
json[prop].forEach(it => {
if (!existingIds.find(id => it.uniqueId === id)) {
BrewUtil.homebrew[prop].push(it);
areNew.push(it);
}
});
return areNew;
} else {
// in development mode, replace any existing brew
const existing = {};
BrewUtil.homebrew[prop].forEach(it => {
existing[it.source] = (existing[it.source] || {});
existing[it.source][it.name] = it.uniqueId;
});
const pDeleteFn = BrewUtil._getPDeleteFunction(prop);
await Promise.all(json[prop].map(async it => {
// Handle magic variants
const itSource = it.inherits && it.inherits.source ? it.inherits.source : it.source;
if (existing[itSource] && existing[itSource][it.name]) {
await pDeleteFn(existing[itSource][it.name]);
}
BrewUtil.homebrew[prop].push(it);
}));
return json[prop];
}
}
function checkAndAddMetaGetNewSources() {
const areNew = [];
if (json._meta) {
if (!BrewUtil.homebrewMeta) BrewUtil.homebrewMeta = { sources: [] };
Object.keys(json._meta).forEach(k => {
switch (k) {
case "dateAdded": break;
case "sources": {
const existing = BrewUtil.homebrewMeta.sources.map(src => src.json);
json._meta.sources.forEach(src => {
if (!existing.find(it => it === src.json)) {
BrewUtil.homebrewMeta.sources.push(src);
areNew.push(src);
}
});
break;
}
default: {
BrewUtil.homebrewMeta[k] = BrewUtil.homebrewMeta[k] || {};
Object.assign(BrewUtil.homebrewMeta[k], json._meta[k]);
break;
}
}
});
}
return areNew;
}
let sourcesToAdd = json._meta ? json._meta.sources : [];
const toAdd = {};
BrewUtil._STORABLE.forEach(k => toAdd[k] = json[k]);
BrewUtil.homebrew = BrewUtil.homebrew || {};
sourcesToAdd = checkAndAddMetaGetNewSources(); // adding source(s) to Filter should happen in per-page addX functions
await Promise.all(BrewUtil._STORABLE.map(async k => toAdd[k] = await pCheckAndAdd(k))); // only add if unique ID not already present
BrewUtil._persistHomebrewDebounced(); // Debounce this for mass adds, e.g. "Add All"
StorageUtil.syncSet(HOMEBREW_META_STORAGE, BrewUtil.homebrewMeta);
// wipe old cache
BrewUtil._resetSourceCache();
// display on page
switch (page) {
case UrlUtil.PG_SPELLS:
case UrlUtil.PG_CLASSES:
case UrlUtil.PG_BESTIARY:
case UrlUtil.PG_BACKGROUNDS:
case UrlUtil.PG_FEATS:
case UrlUtil.PG_OPT_FEATURES:
case UrlUtil.PG_RACES:
case UrlUtil.PG_OBJECTS:
case UrlUtil.PG_TRAPS_HAZARDS:
case UrlUtil.PG_DEITIES:
case UrlUtil.PG_ITEMS:
case UrlUtil.PG_REWARDS:
case UrlUtil.PG_PSIONICS:
case UrlUtil.PG_VARIATNRULES:
case UrlUtil.PG_CONDITIONS_DISEASES:
case UrlUtil.PG_ADVENTURE:
case UrlUtil.PG_ADVENTURES:
case UrlUtil.PG_BOOK:
case UrlUtil.PG_BOOKS:
case UrlUtil.PG_MAKE_SHAPED:
case UrlUtil.PG_TABLES:
case UrlUtil.PG_VEHICLES:
case UrlUtil.PG_ACTIONS:
await (BrewUtil._pHandleBrew || handleBrew)(MiscUtil.copy(toAdd));
break;
case UrlUtil.PG_MANAGE_BREW:
case UrlUtil.PG_DEMO:
case "NO_PAGE":
break;
default:
throw new Error(`No homebrew add function defined for category ${page}`);
}
if (pFuncRefresh) await pFuncRefresh();
if (BrewUtil._filterBox && BrewUtil._sourceFilter) {
const cur = BrewUtil._filterBox.getValues();
if (cur.Source) {
const toSet = JSON.parse(JSON.stringify(cur.Source));
if (toSet._totals.yes || toSet._totals.no) {
if (page === UrlUtil.PG_CLASSES) toSet["Core"] = 1;
else sourcesToAdd.forEach(src => toSet[src.json] = 1);
BrewUtil._filterBox.setFromValues({ Source: toSet });
}
}
if (BrewUtil._filterBox) BrewUtil._filterBox.fireChangeEvent();
}
},
makeBrewButton: (id) => {
$(`#${id}`).on("click", () => BrewUtil.manageBrew());
},
_getBrewCategories() {
return Object.keys(BrewUtil.homebrew).filter(it => !it.startsWith("_"));
},
_buildSourceCache() {
function doBuild() {
if (BrewUtil.homebrewMeta && BrewUtil.homebrewMeta.sources) {
BrewUtil.homebrewMeta.sources.forEach(src => BrewUtil._sourceCache[src.json] = ({ ...src }));
}
}
if (!BrewUtil._sourceCache) {
BrewUtil._sourceCache = {};
if (!BrewUtil.homebrewMeta) {
const temp = StorageUtil.syncGet(HOMEBREW_META_STORAGE) || {};
temp.sources = temp.sources || [];
BrewUtil.homebrewMeta = temp;
doBuild();
} else {
doBuild();
}
}
},
_resetSourceCache() {
BrewUtil._sourceCache = null;
},
removeJsonSource(source) {
BrewUtil._resetSourceCache();
const ix = BrewUtil.homebrewMeta.sources.findIndex(it => it.json === source);
if (~ix) BrewUtil.homebrewMeta.sources.splice(ix, 1);
StorageUtil.syncSet(HOMEBREW_META_STORAGE, BrewUtil.homebrewMeta);
},
getJsonSources() {
BrewUtil._buildSourceCache();
return BrewUtil.homebrewMeta && BrewUtil.homebrewMeta.sources ? BrewUtil.homebrewMeta.sources : [];
},
hasSourceJson(source) {
BrewUtil._buildSourceCache();
return !!BrewUtil._sourceCache[source];
},
sourceJsonToFull(source) {
BrewUtil._buildSourceCache();
return BrewUtil._sourceCache[source] ? BrewUtil._sourceCache[source].full || source : source;
},
sourceJsonToAbv(source) {
BrewUtil._buildSourceCache();
return BrewUtil._sourceCache[source] ? BrewUtil._sourceCache[source].abbreviation || source : source;
},
sourceJsonToSource(source) {
BrewUtil._buildSourceCache();
return BrewUtil._sourceCache[source] ? BrewUtil._sourceCache[source] : null;
},
sourceJsonToStyle(source) {
BrewUtil._buildSourceCache();
if (BrewUtil._sourceCache[source] && BrewUtil._sourceCache[source].color) {
const validColor = BrewUtil.getValidColor(BrewUtil._sourceCache[source].color);
if (validColor.length) return `style="color: #${validColor};"`;
return "";
} else return "";
},
getValidColor(color) {
// Prevent any injection shenanigans
return color.replace(/[^a-fA-F0-9]/g, "").slice(0, 8);
},
addSource(source) {
BrewUtil._resetSourceCache();
const exists = BrewUtil.homebrewMeta.sources.some(it => it.json === source.json);
if (exists) throw new Error(`Source "${source.json}" already exists!`);
(BrewUtil.homebrewMeta.sources = BrewUtil.homebrewMeta.sources || []).push(source);
StorageUtil.syncSet(HOMEBREW_META_STORAGE, BrewUtil.homebrewMeta);
},
updateSource(source) {
BrewUtil._resetSourceCache();
const ix = BrewUtil.homebrewMeta.sources.findIndex(it => it.json === source.json);
if (!~ix) throw new Error(`Source "${source.json}" does not exist!`);
const json = BrewUtil.homebrewMeta.sources[ix].json;
BrewUtil.homebrewMeta.sources[ix] = {
...source,
json
};
StorageUtil.syncSet(HOMEBREW_META_STORAGE, BrewUtil.homebrewMeta);
},
_getActiveVetoolsSources() {
if (BrewUtil.homebrew === null) throw new Error(`Homebrew was not initialized!`);
const allActiveSources = new Set();
Object.keys(BrewUtil.homebrew).forEach(k => BrewUtil.homebrew[k].forEach(it => it.source && allActiveSources.add(it.source)));
return Object.keys(Parser.SOURCE_JSON_TO_FULL).map(k => ({
json: k,
full: Parser.SOURCE_JSON_TO_FULL[k],
abbreviation: Parser.SOURCE_JSON_TO_ABV[k]
})).sort((a, b) => SortUtil.ascSort(a.full, b.full)).filter(it => allActiveSources.has(it.json));
},
/**
* Get data in a format similar to the main search index
*/
async pGetSearchIndex() {
BrewUtil._buildSourceCache();
const indexer = new Omnidexer(Omnisearch.highestId + 1);
await BrewUtil.pAddBrewData();
if (BrewUtil.homebrew) {
const INDEX_DEFINITIONS = [Omnidexer.TO_INDEX__FROM_INDEX_JSON, Omnidexer.TO_INDEX];
// Run these in serial, to prevent any ID race condition antics
for (const IX_DEF of INDEX_DEFINITIONS) {
for (const arbiter of IX_DEF) {
if (!(BrewUtil.homebrew[arbiter.brewProp || arbiter.listProp] || []).length) continue;
if (arbiter.pFnPreProcBrew) {
const toProc = await arbiter.pFnPreProcBrew(arbiter, BrewUtil.homebrew);
indexer.addToIndex(arbiter, toProc)
} else {
indexer.addToIndex(arbiter, BrewUtil.homebrew)
}
}
}
}
return Omnidexer.decompressIndex(indexer.getIndex());
},
async pGetAdditionalSearchIndices(highestId, addiProp) {
BrewUtil._buildSourceCache();
const indexer = new Omnidexer(highestId + 1);
await BrewUtil.pAddBrewData();
if (BrewUtil.homebrew) {
const INDEX_DEFINITIONS = [Omnidexer.TO_INDEX__FROM_INDEX_JSON, Omnidexer.TO_INDEX];
await Promise.all(INDEX_DEFINITIONS.map(IXDEF => {
return Promise.all(IXDEF
.filter(ti => ti.additionalIndexes && (BrewUtil.homebrew[ti.listProp] || []).length)
.map(ti => {
return Promise.all(Object.entries(ti.additionalIndexes).filter(([prop]) => prop === addiProp).map(async ([prop, pGetIndex]) => {
const toIndex = await pGetIndex(indexer, { [ti.listProp]: BrewUtil.homebrew[ti.listProp] });
toIndex.forEach(add => indexer.pushToIndex(add));
}));
}));
}));
}
return Omnidexer.decompressIndex(indexer.getIndex());
},
async pGetAlternateSearchIndices(highestId, altProp) {
BrewUtil._buildSourceCache();
const indexer = new Omnidexer(highestId + 1);
await BrewUtil.pAddBrewData();
if (BrewUtil.homebrew) {
const INDEX_DEFINITIONS = [Omnidexer.TO_INDEX__FROM_INDEX_JSON, Omnidexer.TO_INDEX];
INDEX_DEFINITIONS.forEach(IXDEF => {
IXDEF
.filter(ti => ti.alternateIndexes && (BrewUtil.homebrew[ti.listProp] || []).length)
.forEach(ti => {
Object.entries(ti.alternateIndexes)
.filter(([prop]) => prop === altProp)
.map(async ([prop, pGetIndex]) => {
indexer.addToIndex(ti, BrewUtil.homebrew, { alt: ti.alternateIndexes[prop] })
});
});
});
}
return Omnidexer.decompressIndex(indexer.getIndex());
},
__pPersistHomebrewDebounced: null,
_persistHomebrewDebounced() {
if (BrewUtil.__pPersistHomebrewDebounced == null) {
BrewUtil.__pPersistHomebrewDebounced = MiscUtil.debounce(() => StorageUtil.pSet(HOMEBREW_STORAGE, BrewUtil.homebrew), 500);
}
BrewUtil.__pPersistHomebrewDebounced();
}
};
// ID GENERATION =======================================================================================================
CryptUtil = {
// region md5 internals
// stolen from http://www.myersdaily.org/joseph/javascript/md5.js
_md5cycle: (x, k) => {
let a = x[0];
let b = x[1];
let c = x[2];
let d = x[3];
a = CryptUtil._ff(a, b, c, d, k[0], 7, -680876936);
d = CryptUtil._ff(d, a, b, c, k[1], 12, -389564586);
c = CryptUtil._ff(c, d, a, b, k[2], 17, 606105819);
b = CryptUtil._ff(b, c, d, a, k[3], 22, -1044525330);
a = CryptUtil._ff(a, b, c, d, k[4], 7, -176418897);
d = CryptUtil._ff(d, a, b, c, k[5], 12, 1200080426);
c = CryptUtil._ff(c, d, a, b, k[6], 17, -1473231341);
b = CryptUtil._ff(b, c, d, a, k[7], 22, -45705983);
a = CryptUtil._ff(a, b, c, d, k[8], 7, 1770035416);
d = CryptUtil._ff(d, a, b, c, k[9], 12, -1958414417);
c = CryptUtil._ff(c, d, a, b, k[10], 17, -42063);
b = CryptUtil._ff(b, c, d, a, k[11], 22, -1990404162);
a = CryptUtil._ff(a, b, c, d, k[12], 7, 1804603682);
d = CryptUtil._ff(d, a, b, c, k[13], 12, -40341101);
c = CryptUtil._ff(c, d, a, b, k[14], 17, -1502002290);
b = CryptUtil._ff(b, c, d, a, k[15], 22, 1236535329);
a = CryptUtil._gg(a, b, c, d, k[1], 5, -165796510);
d = CryptUtil._gg(d, a, b, c, k[6], 9, -1069501632);
c = CryptUtil._gg(c, d, a, b, k[11], 14, 643717713);
b = CryptUtil._gg(b, c, d, a, k[0], 20, -373897302);
a = CryptUtil._gg(a, b, c, d, k[5], 5, -701558691);
d = CryptUtil._gg(d, a, b, c, k[10], 9, 38016083);
c = CryptUtil._gg(c, d, a, b, k[15], 14, -660478335);
b = CryptUtil._gg(b, c, d, a, k[4], 20, -405537848);
a = CryptUtil._gg(a, b, c, d, k[9], 5, 568446438);
d = CryptUtil._gg(d, a, b, c, k[14], 9, -1019803690);
c = CryptUtil._gg(c, d, a, b, k[3], 14, -187363961);
b = CryptUtil._gg(b, c, d, a, k[8], 20, 1163531501);
a = CryptUtil._gg(a, b, c, d, k[13], 5, -1444681467);
d = CryptUtil._gg(d, a, b, c, k[2], 9, -51403784);
c = CryptUtil._gg(c, d, a, b, k[7], 14, 1735328473);
b = CryptUtil._gg(b, c, d, a, k[12], 20, -1926607734);
a = CryptUtil._hh(a, b, c, d, k[5], 4, -378558);
d = CryptUtil._hh(d, a, b, c, k[8], 11, -2022574463);
c = CryptUtil._hh(c, d, a, b, k[11], 16, 1839030562);
b = CryptUtil._hh(b, c, d, a, k[14], 23, -35309556);
a = CryptUtil._hh(a, b, c, d, k[1], 4, -1530992060);
d = CryptUtil._hh(d, a, b, c, k[4], 11, 1272893353);
c = CryptUtil._hh(c, d, a, b, k[7], 16, -155497632);
b = CryptUtil._hh(b, c, d, a, k[10], 23, -1094730640);
a = CryptUtil._hh(a, b, c, d, k[13], 4, 681279174);
d = CryptUtil._hh(d, a, b, c, k[0], 11, -358537222);
c = CryptUtil._hh(c, d, a, b, k[3], 16, -722521979);
b = CryptUtil._hh(b, c, d, a, k[6], 23, 76029189);
a = CryptUtil._hh(a, b, c, d, k[9], 4, -640364487);
d = CryptUtil._hh(d, a, b, c, k[12], 11, -421815835);
c = CryptUtil._hh(c, d, a, b, k[15], 16, 530742520);
b = CryptUtil._hh(b, c, d, a, k[2], 23, -995338651);
a = CryptUtil._ii(a, b, c, d, k[0], 6, -198630844);
d = CryptUtil._ii(d, a, b, c, k[7], 10, 1126891415);
c = CryptUtil._ii(c, d, a, b, k[14], 15, -1416354905);
b = CryptUtil._ii(b, c, d, a, k[5], 21, -57434055);
a = CryptUtil._ii(a, b, c, d, k[12], 6, 1700485571);
d = CryptUtil._ii(d, a, b, c, k[3], 10, -1894986606);
c = CryptUtil._ii(c, d, a, b, k[10], 15, -1051523);
b = CryptUtil._ii(b, c, d, a, k[1], 21, -2054922799);
a = CryptUtil._ii(a, b, c, d, k[8], 6, 1873313359);
d = CryptUtil._ii(d, a, b, c, k[15], 10, -30611744);
c = CryptUtil._ii(c, d, a, b, k[6], 15, -1560198380);
b = CryptUtil._ii(b, c, d, a, k[13], 21, 1309151649);
a = CryptUtil._ii(a, b, c, d, k[4], 6, -145523070);
d = CryptUtil._ii(d, a, b, c, k[11], 10, -1120210379);
c = CryptUtil._ii(c, d, a, b, k[2], 15, 718787259);
b = CryptUtil._ii(b, c, d, a, k[9], 21, -343485551);
x[0] = CryptUtil._add32(a, x[0]);
x[1] = CryptUtil._add32(b, x[1]);
x[2] = CryptUtil._add32(c, x[2]);
x[3] = CryptUtil._add32(d, x[3]);
},
_cmn: (q, a, b, x, s, t) => {
a = CryptUtil._add32(CryptUtil._add32(a, q), CryptUtil._add32(x, t));
return CryptUtil._add32((a << s) | (a >>> (32 - s)), b);
},
_ff: (a, b, c, d, x, s, t) => {
return CryptUtil._cmn((b & c) | ((~b) & d), a, b, x, s, t);
},
_gg: (a, b, c, d, x, s, t) => {
return CryptUtil._cmn((b & d) | (c & (~d)), a, b, x, s, t);
},
_hh: (a, b, c, d, x, s, t) => {
return CryptUtil._cmn(b ^ c ^ d, a, b, x, s, t);
},
_ii: (a, b, c, d, x, s, t) => {
return CryptUtil._cmn(c ^ (b | (~d)), a, b, x, s, t);
},
_md51: (s) => {
let n = s.length;
let state = [1732584193, -271733879, -1732584194, 271733878];
let i;
for (i = 64; i <= s.length; i += 64) {
CryptUtil._md5cycle(state, CryptUtil._md5blk(s.substring(i - 64, i)));
}
s = s.substring(i - 64);
let tail = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
for (i = 0; i < s.length; i++) tail[i >> 2] |= s.charCodeAt(i) << ((i % 4) << 3);
tail[i >> 2] |= 0x80 << ((i % 4) << 3);
if (i > 55) {
CryptUtil._md5cycle(state, tail);
for (i = 0; i < 16; i++) tail[i] = 0;
}
tail[14] = n * 8;
CryptUtil._md5cycle(state, tail);
return state;
},
_md5blk: (s) => {
let md5blks = [];
for (let i = 0; i < 64; i += 4) {
md5blks[i >> 2] = s.charCodeAt(i) + (s.charCodeAt(i + 1) << 8) + (s.charCodeAt(i + 2) << 16) + (s.charCodeAt(i + 3) << 24);
}
return md5blks;
},
_hex_chr: '0123456789abcdef'.split(''),
_rhex: (n) => {
let s = '';
for (let j = 0; j < 4; j++) {
s += CryptUtil._hex_chr[(n >> (j * 8 + 4)) & 0x0F] + CryptUtil._hex_chr[(n >> (j * 8)) & 0x0F];
}
return s;
},
_add32: (a, b) => {
return (a + b) & 0xFFFFFFFF;
},
// endregion
hex: (x) => {
for (let i = 0; i < x.length; i++) {
x[i] = CryptUtil._rhex(x[i]);
}
return x.join('');
},
hex2Dec(hex) {
return parseInt(`0x${hex}`);
},
md5: (s) => {
return CryptUtil.hex(CryptUtil._md51(s));
},
/**
* Based on Java's implementation.
* @param obj An object to hash.
* @return {*} An integer hashcode for the object.
*/
hashCode(obj) {
if (typeof obj === "string") {
if (!obj) return 0;
let h = 0;
for (let i = 0; i < obj.length; ++i) h = 31 * h + obj.charCodeAt(i);
return h;
} else if (typeof obj === "number") return obj;
else throw new Error(`No hashCode implementation for ${obj}`);
},
uid() { // https://stackoverflow.com/questions/105034/create-guid-uuid-in-javascript
if (RollerUtil.isCrypto()) {
return ([1e7] + -1e3 + -4e3 + -8e3 + -1e11).replace(/[018]/g, c => (c ^ crypto.getRandomValues(new Uint8Array(1))[0] & 15 >> c / 4).toString(16));
} else {
let d = Date.now();
if (typeof performance !== "undefined" && typeof performance.now === "function") {
d += performance.now();
}
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (c) {
const r = (d + Math.random() * 16) % 16 | 0;
d = Math.floor(d / 16);
return (c === 'x' ? r : (r & 0x3 | 0x8)).toString(16);
});
}
}
};
// COLLECTIONS =========================================================================================================
CollectionUtil = {
ObjectSet: class ObjectSet {
constructor() {
this.map = new Map();
this[Symbol.iterator] = this.values;
}
// Each inserted element has to implement _toIdString() method that returns a string ID.
// Two objects are considered equal if their string IDs are equal.
add(item) {
this.map.set(item._toIdString(), item);
}
values() {
return this.map.values();
}
},
setEq(a, b) {
if (a.size !== b.size) return false;
for (const it of a) if (!b.has(it)) return false;
return true;
},
setDiff(set1, set2) {
return new Set([...set1].filter(it => !set2.has(it)));
},
deepEquals(a, b) {
if (CollectionUtil._eq_sameValueZeroEqual(a, b)) return true;
if (a && b && typeof a === "object" && typeof b === "object") {
if (CollectionUtil._eq_isPlainObject(a) && CollectionUtil._eq_isPlainObject(b)) return CollectionUtil._eq_areObjectsEqual(a, b);
const arrayA = Array.isArray(a);
const arrayB = Array.isArray(b);
if (arrayA || arrayB) return arrayA === arrayB && CollectionUtil._eq_areArraysEqual(a, b);
const setA = a instanceof Set;
const setB = b instanceof Set;
if (setA || setB) return setA === setB && CollectionUtil.setEq(a, b);
return CollectionUtil._eq_areObjectsEqual(a, b);
}
return false;
},
// This handles the NaN != NaN case; ignore linter complaints
// eslint-disable-next-line no-self-compare
_eq_sameValueZeroEqual: (a, b) => a === b || (a !== a && b !== b),
_eq_isPlainObject: (value) => value.constructor === Object || value.constructor == null,
_eq_areObjectsEqual(a, b) {
const keysA = Object.keys(a);
const { length } = keysA;
if (Object.keys(b).length !== length) return false;
for (let i = 0; i < length; i++) {
if (!b.hasOwnProperty(keysA[i])) return false;
if (!CollectionUtil.deepEquals(a[keysA[i]], b[keysA[i]])) return false;
}
return true;
},
_eq_areArraysEqual(a, b) {
const { length } = a;
if (b.length !== length) return false;
for (let i = 0; i < length; i++) if (!CollectionUtil.deepEquals(a[i], b[i])) return false;
return true;
}
};
Array.prototype.last = Array.prototype.last || function (arg) {
if (arg !== undefined) this[this.length - 1] = arg;
else return this[this.length - 1];
};
Array.prototype.filterIndex = Array.prototype.filterIndex || function (fnCheck) {
const out = [];
this.forEach((it, i) => {
if (fnCheck(it)) out.push(i);
});
return out;
};
Array.prototype.equals = Array.prototype.equals || function (array2) {
const array1 = this;
if (!array1 && !array2) return true;
else if ((!array1 && array2) || (array1 && !array2)) return false;
let temp = [];
if ((!array1[0]) || (!array2[0])) return false;
if (array1.length !== array2.length) return false;
let key;
// Put all the elements from array1 into a "tagged" array
for (let i = 0; i < array1.length; i++) {
key = (typeof array1[i]) + "~" + array1[i]; // Use "typeof" so a number 1 isn't equal to a string "1".
if (temp[key]) temp[key]++;
else temp[key] = 1;
}
// Go through array2 - if same tag missing in "tagged" array, not equal
for (let i = 0; i < array2.length; i++) {
key = (typeof array2[i]) + "~" + array2[i];
if (temp[key]) {
if (temp[key] === 0) return false;
else temp[key]--;
} else return false;
}
return true;
};
Array.prototype.partition = Array.prototype.partition || function (fnIsValid) {
return this.reduce(([pass, fail], elem) => fnIsValid(elem) ? [[...pass, elem], fail] : [pass, [...fail, elem]], [[], []]);
};
Array.prototype.getNext = Array.prototype.getNext || function (curVal) {
let ix = this.indexOf(curVal);
if (!~ix) throw new Error("Value was not in array!");
if (++ix >= this.length) ix = 0;
return this[ix];
};
// OVERLAY VIEW ========================================================================================================
/**
* Relies on:
* - page implementing HashUtil's `loadSubHash` with handling to show/hide the book view based on hashKey changes
* - page running no-argument `loadSubHash` when `hashchange` occurs
*
* @param hashKey to use in the URL so that forward/back can open/close the view
* @param $openBtn jQuery-selected button to bind click open/close
* @param noneVisibleMsg "error" message to display if user has not selected any viewable content
* @param popTblGetNumShown function which should populate the view with HTML content and return the number of items displayed
* @param doShowEmpty whether or not the empty table should be visible (useful if the population function is guaranteed to display something)
* @constructor
*/
function BookModeView(hashKey, $openBtn, noneVisibleMsg, pageTitle, popTblGetNumShown, doShowEmpty) {
this.hashKey = hashKey;
this.$openBtn = $openBtn;
this.noneVisibleMsg = noneVisibleMsg;
this.popTblGetNumShown = popTblGetNumShown;
this.active = false;
this._$body = null;
this._$wrpBook = null;
this.$openBtn.on("click", () => {
Hist.cleanSetHash(`${window.location.hash}${HASH_PART_SEP}${this.hashKey}${HASH_SUB_KV_SEP}true`);
});
this._doHashTeardown = () => {
Hist.cleanSetHash(window.location.hash.replace(`${this.hashKey}${HASH_SUB_KV_SEP}true`, ""));
};
// NOTE: Avoid using `flex` css, as it doesn't play nice with printing
this.pOpen = async () => {
if (this.active) return;
this.active = true;
document.title = `${pageTitle} - 5etools`;
this._$body = $(`body`);
this._$wrpBook = $(`<div class="bkmv"/>`);
this._$body.css("overflow", "hidden");
this._$body.addClass("bkmv-active");
const $btnClose = $(`<span class="delete-icon glyphicon glyphicon-remove"/>`)
.click(() => this._doHashTeardown());
const $dispName = $(`<div/>`); // pass this to the content function to allow it to set a main header
$$`<div class="bkmv__spacer-name split-v-center no-shrink">${$dispName}${$btnClose}</div>`.appendTo(this._$wrpBook);
// Optionally usable "controls" section at the top of the pane
const $wrpControls = $(`<div class="w-100 flex-col bkmv__wrp-controls"/>`).appendTo(this._$wrpBook);
const $wrpContent = $(`<div class="w-100 bkmv__wrp p-2"/>`);
$$`<div class="bkmv__scroller h-100 w-100 overflow-y-auto">${$wrpContent}</div>`.appendTo(this._$wrpBook);
const numShown = await this.popTblGetNumShown($wrpContent, $dispName, $wrpControls);
if (!numShown) {
const $btnClose = $(`<button class="btn btn-default">Close</button>`)
.click(() => this._doHashTeardown());
$$`<div class="w-100 flex-col no-shrink bkmv__footer mb-3">
<div class="mb-2 flex-vh-center"><span class="initial-message">${this.noneVisibleMsg}</span></div>
<div class="flex-vh-center">${$btnClose}</div>
</div>`.appendTo(this._$wrpBook);
}
this._$body.append(this._$wrpBook);
};
this.teardown = () => {
if (this.active) {
this._$body.css("overflow", "");
this._$body.removeClass("bkmv-active");
this._$wrpBook.remove();
this.active = false;
}
};
this.handleSub = (sub) => {
const bookViewHash = sub.find(it => it.startsWith(this.hashKey));
if (bookViewHash && UrlUtil.unpackSubHash(bookViewHash)[this.hashKey][0] === "true") this.pOpen();
else this.teardown();
};
}
// CONTENT EXCLUSION ===================================================================================================
ExcludeUtil = {
_excludes: null,
async pInitialise() {
try {
ExcludeUtil._excludes = await StorageUtil.pGet(EXCLUDES_STORAGE) || [];
} catch (e) {
JqueryUtil.doToast({
content: "Error when loading content blacklist! Purged blacklist data. (See the log for more information.)",
type: "danger"
});
try {
await StorageUtil.pRemove(EXCLUDES_STORAGE);
} catch (e) {
setTimeout(() => { throw e });
}
ExcludeUtil._excludes = null;
window.location.hash = "";
setTimeout(() => { throw e });
}
},
getList() {
return ExcludeUtil._excludes || [];
},
async pSetList(toSet) {
ExcludeUtil._excludes = toSet;
await ExcludeUtil._pSave();
},
_excludeCount: 0,
isExcluded(name, category, source) {
if (!ExcludeUtil._excludes || !ExcludeUtil._excludes.length) return false;
source = source.source || source;
const out = !!ExcludeUtil._excludes.find(row => (row.source === "*" || row.source === source) && (row.category === "*" || row.category === category) && (row.name === "*" || row.name === name));
if (out)++ExcludeUtil._excludeCount;
return out;
},
checkShowAllExcluded(list, $pagecontent) {
if ((!list.length && ExcludeUtil._excludeCount) || (list.length > 0 && list.length === ExcludeUtil._excludeCount)) {
$pagecontent.html(`
<tr><th class="border" colspan="6"></th></tr>
<tr><td colspan="6" class="initial-message">(Content <a href="blacklist.html">blacklisted</a>)</td></tr>
<tr><th class="border" colspan="6"></th></tr>
`);
}
},
async pAddExclude(name, category, source) {
if (!ExcludeUtil._excludes.find(row => row.source === source && row.category === category && row.name === name)) {
ExcludeUtil._excludes.push({ name, category, source });
await ExcludeUtil._pSave();
return true;
}
return false;
},
async pRemoveExclude(name, category, source) {
const ix = ExcludeUtil._excludes.findIndex(row => row.source === source && row.category === category && row.name === name);
if (~ix) {
ExcludeUtil._excludes.splice(ix, 1);
await ExcludeUtil._pSave();
}
},
async _pSave() {
return StorageUtil.pSet(EXCLUDES_STORAGE, ExcludeUtil._excludes);
},
async pResetExcludes() {
ExcludeUtil._excludes = [];
await ExcludeUtil._pSave();
}
};
// ENCOUNTERS ==========================================================================================================
EncounterUtil = {
async pGetInitialState() {
if (await EncounterUtil._pHasSavedStateLocal()) {
if (await EncounterUtil._hasSavedStateUrl()) {
return {
type: "url",
data: EncounterUtil._getSavedStateUrl()
};
} else {
return {
type: "local",
data: await EncounterUtil._pGetSavedStateLocal()
};
}
} else return null;
},
_hasSavedStateUrl() {
return window.location.hash.length && Hist.getSubHash(EncounterUtil.SUB_HASH_PREFIX) != null;
},
_getSavedStateUrl() {
let out = null;
try {
out = JSON.parse(decodeURIComponent(Hist.getSubHash(EncounterUtil.SUB_HASH_PREFIX)));
} catch (e) {
setTimeout(() => {
throw e;
});
}
Hist.setSubhash(EncounterUtil.SUB_HASH_PREFIX, null);
return out;
},
async _pHasSavedStateLocal() {
return !!StorageUtil.pGet(ENCOUNTER_STORAGE);
},
async _pGetSavedStateLocal() {
try {
return await StorageUtil.pGet(ENCOUNTER_STORAGE);
} catch (e) {
JqueryUtil.doToast({
content: "Error when loading encounters! Purged encounter data. (See the log for more information.)",
type: "danger"
});
await StorageUtil.pRemove(ENCOUNTER_STORAGE);
setTimeout(() => { throw e; });
}
},
async pDoSaveState(toSave) {
StorageUtil.pSet(ENCOUNTER_STORAGE, toSave);
},
async pGetSavedState() {
const saved = await StorageUtil.pGet(EncounterUtil.SAVED_ENCOUNTER_SAVE_LOCATION);
return saved || {};
},
getEncounterName(encounter) {
if (encounter.l && encounter.l.items && encounter.l.items.length) {
const largestCount = encounter.l.items.sort((a, b) => SortUtil.ascSort(Number(b.c), Number(a.c)))[0];
const name = decodeURIComponent(largestCount.h.split(HASH_LIST_SEP)[0]).toTitleCase();
return `Encounter with ${name} ×${largestCount.c}`;
} else return "(Unnamed Encounter)"
}
};
EncounterUtil.SUB_HASH_PREFIX = "encounter";
EncounterUtil.SAVED_ENCOUNTER_SAVE_LOCATION = "ENCOUNTER_SAVED_STORAGE";
// REACTOR =============================================================================================================
class Reactor {
constructor() {
this.rvents = {};
}
_registerEvent(eventName) {
this.rvents[eventName] = new ReactorEvent(eventName);
}
fire(eventName, eventArgs) {
if (this.rvents[eventName]) this.rvents[eventName].callbacks.forEach(callback => callback(eventArgs));
}
on(eventName, callback) {
if (!this.rvents[eventName]) this._registerEvent(eventName);
this.rvents[eventName]._registerCallback(callback);
}
off(eventName, callback) {
if (!this.rvents[eventName]) return;
this.rvents[eventName]._unregisterCallback(callback);
}
}
class ReactorEvent {
constructor(name) {
this.name = name;
this.callbacks = [];
}
_registerCallback(callback) {
this.callbacks.push(callback);
}
_unregisterCallback(callback) {
const ix = this.callbacks.indexOf(callback);
this.callbacks.splice(ix, 1);
}
}
// TOKENS ==============================================================================================================
class TokenUtil {
static imgError(x) {
if (x) $(x).parent().remove();
$(`.rnd-name`).find(`span.stats-source`).css("margin-right", "0");
}
static handleStatblockScroll(event, ele) {
$(`#token_image`)
.toggle(ele.scrollTop < 32)
.css({
opacity: (32 - ele.scrollTop) / 32,
top: -ele.scrollTop
})
}
}
// MISC WEBPAGE ONLOADS ================================================================================================
if (!IS_VTT && typeof window !== "undefined") {
// add an obnoxious banner
// TODO is this something we want? If so, uncomment
/*
window.addEventListener("load", async () => {
if (!StorageUtil.isSyncFake() && await StorageUtil.pGet("seenLegal")) return;
const $wrpBanner = $(`<div id="legal-notice"><span>Don't go posting this shit to Reddit</span></div>`);
$(`<button class="btn btn-sm btn-default">Whatever, kid</button>`).on("click", () => {
StorageUtil.pSet("seenLegal", true);
$wrpBanner.remove();
}).appendTo($wrpBanner);
$(`body`).append($wrpBanner);
});
*/
// Hack to lock the ad space at original size--prevents the screen from shifting around once loaded
setTimeout(() => {
const $wrp = $(`.cancer__wrp-leaderboard`);
// const w = $wrp.outerWidth();
const h = $wrp.outerHeight();
$wrp.css({
// width: w,
height: h
});
}, 5000);
}
_Donate = {
// TAG Disabled until further notice
/*
init () {
if (IS_DEPLOYED) {
DataUtil.loadJSON(`https://get.5etools.com/money.php`).then(dosh => {
const pct = Number(dosh.donated) / Number(dosh.Goal);
$(`#don-total`).text(`€${dosh.Goal}`);
if (isNaN(pct)) {
throw new Error(`Was not a number! Values were ${dosh.donated} and ${dosh.Goal}`);
} else {
const $bar = $(`.don__bar_inner`);
$bar.css("width", `${Math.min(Math.ceil(100 * pct), 100)}%`).html(pct !== 0 ? `€${dosh.donated} ` : "");
if (pct >= 1) $bar.css("background-color", "lightgreen");
}
}).catch(noDosh => {
$(`#don-wrapper`).remove();
throw noDosh;
});
}
},
async pNotDonating () {
const isFake = await StorageUtil.pIsAsyncFake();
const isNotDonating = await StorageUtil.pGet("notDonating");
return isFake || isNotDonating;
},
*/
// region Test code, please ignore
cycleLeader(ele) {
const modes = [{ width: 970, height: 90 }, { width: 970, height: 250 }, { width: 320, height: 50 }, { width: 728, height: 90 }];
_Donate._cycleMode(ele, modes);
},
cycleSide(ele) {
const modes = [{ width: 300, height: 250 }, { width: 300, height: 600 }];
_Donate._cycleMode(ele, modes);
},
_cycleMode(ele, modes) {
const $e = $(ele);
const pos = $e.data("pos") || 0;
const mode = modes[pos];
$e.css(mode);
$e.text(`${mode.width}*${mode.height}`);
$e.data("pos", (pos + 1) % modes.length)
}
// endregion
};
|
# Pyrogram - Telegram MTProto API Client Library for Python
# Copyright (C) 2017-2021 Dan <https://github.com/delivrance>
#
# This file is part of Pyrogram.
#
# Pyrogram is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Pyrogram 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 Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with Pyrogram. If not, see <http://www.gnu.org/licenses/>.
from .bool import Bool, BoolFalse, BoolTrue
from .bytes import Bytes
from .double import Double
from .int import Int, Long, Int128, Int256
from .string import String
from .vector import Vector
|
/**
* Column chart class factory
*/
(function() {
'use strict';
function ColumnChartFact(BaseChart) {
function ColumnChart($scope) {
BaseChart.apply(this, [$scope]);
this.setType('column');
$scope.item.isBtnZero = true;
$scope.item.isBtnValues = true;
if (this.desc.type.toLowerCase() === "columnchartstacked") this.enableStacking();
this.requestData();
}
return ColumnChart;
}
angular.module('widgets')
.factory('ColumnChart', ['BaseChart', ColumnChartFact]);
})(); |
import React, { Component } from 'react';
import { View, Text, StyleSheet, ListView } from 'react-native';
import StepIndicator from 'react-native-step-indicator';
import dummyData from './data';
const stepIndicatorStyles = {
stepIndicatorSize: 30,
currentStepIndicatorSize:40,
separatorStrokeWidth: 3,
currentStepStrokeWidth: 5,
stepStrokeCurrentColor: '#fe7013',
separatorFinishedColor: '#fe7013',
separatorUnFinishedColor: '#aaaaaa',
stepIndicatorFinishedColor: '#fe7013',
stepIndicatorUnFinishedColor: '#aaaaaa',
stepIndicatorCurrentColor: '#ffffff',
stepIndicatorLabelFontSize: 15,
currentStepIndicatorLabelFontSize: 15,
stepIndicatorLabelCurrentColor: '#000000',
stepIndicatorLabelFinishedColor: '#ffffff',
stepIndicatorLabelUnFinishedColor: 'rgba(255,255,255,0.5)',
labelColor: '#666666',
labelSize: 15,
currentStepLabelColor: '#fe7013'
}
export default class VerticalStepIndicator extends Component {
constructor() {
super();
const ds = new ListView.DataSource({rowHasChanged: (r1, r2) => r1 !== r2});
this.state = {
dataSource: ds.cloneWithRows(dummyData.data),
currentPage:0
};
}
render() {
return (
<View style={styles.container}>
<View style={styles.stepIndicator}>
<StepIndicator
customStyles={stepIndicatorStyles}
stepCount={6}
direction='vertical'
currentPosition={this.state.currentPage}
labels={dummyData.data.map(item => item.title)}
/>
</View>
<ListView
dataSource={this.state.dataSource}
renderRow={this.renderPage}
onChangeVisibleRows={this.getVisibleRows}
/>
</View>
);
}
renderPage = (rowData) => {
return (
<View style={styles.rowItem}>
<Text style={styles.title}>{rowData.title}</Text>
<Text style={styles.body}>{rowData.body}</Text>
</View>
)
}
getVisibleRows = (visibleRows) => {
const visibleRowNumbers = Object.keys(visibleRows.s1).map((row) => parseInt(row));
this.setState({currentPage:visibleRowNumbers[0]})
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
flexDirection:'row',
backgroundColor:'#ffffff'
},
stepIndicator: {
marginVertical:50,
paddingHorizontal:20
},
rowItem: {
flex:3,
paddingVertical:20
},
title: {
flex: 1,
fontSize:20,
color:'#333333',
paddingVertical:16,
fontWeight:'600'
},
body: {
flex: 1,
fontSize:15,
color:'#606060',
lineHeight:24,
marginRight:8
}
});
|
// Responsible for the managing the ui for a single attachment,
// used within AssetComposerView.
slices.AttachmentView = Backbone.View.extend({
events: {
'change' : 'update'
},
tagName: 'li',
template: Handlebars.compile(
'<div class="attachment-thumb"></div>' +
'<div class="attachment-fields"></div>' +
'<span data-action="remove" class="remove">Remove</span>'
),
// Initialize the view.
initialize: function() {
_.bindAll(this);
// Make view and model accessible from el.
$(this.el).data('view', this);
$(this.el).data('model', this.model);
},
// Render our template to this.el.
render: function() {
$(this.el).html(this.template(this));
this.renderAssetThumb();
this.renderFields();
return this;
},
// If this attachment has an asset, we can render an AssetThumbView.
// We make sure to switch of the selection functionality.
renderAssetThumb: function() {
if (!this.model.get('asset')) return;
this.assetThumb = new slices.AssetThumbView({
model: this.model.get('asset'),
selectable: false,
tagName: 'div'
});
this.$('.attachment-thumb').prepend(this.assetThumb.render().el);
},
// We don’t know what extra fields will come on the attachment, so we’ll
// render this template using the attachment model’s attributes, rather
// than `this`. Doesn’t provide the usual opportunities for overriding
// and proxying, but much more flexible.
renderFields: function() {
if (!_.isFunction(this.options.fields)) return;
this.$('.attachment-fields').
html(this.options.fields(this.model.attributes)).
applyDataValues().
initDataPlugins();
},
// Remove this view and unbind any event handlers.
remove: function() {
this.model.unbind('change', this.render);
$(this.el).remove();
},
// Write contents of fields to our model.
update: function() {
this.model.set(this.getValues());
},
// Retrieve values from our fields and return as an object.
getValues: function() {
var result = {};
this.$('[name]').each(function() {
var field = $(this);
result[field.attr('name')] = slices.getValue(field);
});
return result;
},
// Update the upload progress information, wrapped around the file.
updateFile: function(attrs) {
this.assetThumb.updateFile(attrs);
},
// Update the upload progress information so we see happy face, then
// wait for the thumbnail to load or happyTime, whichever is longer.
updateFileAndComplete: function(file) {
this.assetThumb.updateFileAndComplete(file);
},
// Returns the midpoint of the view, relative to the document.
midPoint: function() {
return {
x: $(this.el).offset().left + ($(this.el).width() / 2),
y: $(this.el).offset().top + ($(this.el).height() / 2)
}
}
});
|
const _ = require('lodash')
const path = require('path')
const got = require('got')
const { EthHdWallet } = require('eth-hd-wallet')
const { createLog } = require('./utils/log')
const { getMatchingNetwork, defaultGetTxParams, execCall } = require('./utils')
const { ADDRESS_ZERO } = require('../utils/constants')
const { getCurrentAcl, ensureAclIsDeployed, addMultisigAddressAsSystemAdmin } = require('./modules/acl')
const { getCurrentSettings, ensureSettingsIsDeployed } = require('./modules/settings')
const { getCurrentMarket, ensureMarketIsDeployed } = require('./modules/market')
const { getCurrentEtherToken, ensureEtherTokenIsDeployed } = require('./modules/etherToken')
const { getCurrentEntityDeployer, ensureEntityDeployerIsDeployed } = require('./modules/entityDeployer')
const { ensureEntityImplementationsAreDeployed } = require('./modules/entityImplementations')
const { ensurePolicyImplementationsAreDeployed } = require('./modules/policyImplementations')
const { updateDeployedAddressesJson } = require('./utils/postDeployment')
const getLiveGasPrice = async ({ log }) => {
let gwei
await log.task('Fetching live fast gas price', async task => {
const { body } = await got('https://www.ethgasstationapi.com/api/fast', { rejectUnauthorized: false })
const fast = parseFloat(body)
gwei = fast + 1
task.log(`${gwei} GWEI`)
})
return gwei
}
module.exports = async (deployer, network, accounts) => {
const log = createLog(console.log.bind(console))
const releaseConfig = require('../releaseConfig.json')
// check network
switch (network) {
case 'mainnet':
if (releaseConfig.deployNetwork !== 'mainnet') {
throw new Error('Release config does not allow Mainnet deployment')
}
break
case 'rinkeby':
if (releaseConfig.deployNetwork !== 'rinkeby') {
throw new Error('Release config does not allow Rinkeby deployment')
}
break
default:
// do nothing
}
let hdWallet
let multisig
// if trying to do multisig
if (releaseConfig.multisig && !releaseConfig.freshDeployment) {
if (!process.env.MNEMONIC) {
throw new Error('MNEMONIC env var must be set')
}
// generate HD wallet for use with multisig signing
hdWallet = EthHdWallet.fromMnemonic(process.env.MNEMONIC)
hdWallet.generateAddresses(1)
// multisig enabled
multisig = releaseConfig.multisig
}
const networkInfo = getMatchingNetwork({ name: network })
let getTxParams
if (!networkInfo.isLocal) {
/*
- On mainnet, use live gas price for max speed,
- do manual nonce tracking to avoid infura issues (https://ethereum.stackexchange.com/questions/44349/truffle-infura-on-mainnet-nonce-too-low-error)
*/
let gwei
if ('mainnet' === network) {
gwei = await getLiveGasPrice({ log })
} else {
gwei = 2
}
let nonce = await web3.eth.getTransactionCount(accounts[0])
getTxParams = (txParamsOverride = {}) => {
log.log(`Nonce: ${nonce}`)
nonce += 1
return defaultGetTxParams(Object.assign({
gasPrice: gwei * 1000000000,
nonce: nonce - 1,
}, txParamsOverride))
}
}
const cfg = {
web3,
deployer,
artifacts,
accounts,
log,
networkInfo,
getTxParams,
onlyDeployingUpgrades: !releaseConfig.freshDeployment,
multisig,
hdWallet,
}
if (!cfg.onlyDeployingUpgrades) {
if (networkInfo.isLocal) {
await deployer.deploy(artifacts.require("./Migrations"))
}
await log.task('Re-deploying all contracts', async () => {
cfg.acl = await ensureAclIsDeployed(cfg)
cfg.settings = await ensureSettingsIsDeployed(cfg)
;[ cfg.entityDeployer, cfg.market, cfg.etherToken ] = await Promise.all([
ensureEntityDeployerIsDeployed(cfg),
ensureMarketIsDeployed(cfg),
ensureEtherTokenIsDeployed(cfg),
])
})
} else {
await log.task('Deploying upgrades only', async () => {
;[ cfg.acl, cfg.settings, cfg.entityDeployer, cfg.market, cfg.etherToken ] = await Promise.all([
getCurrentAcl(cfg),
getCurrentSettings(cfg),
getCurrentEntityDeployer(cfg),
getCurrentMarket(cfg),
getCurrentEtherToken(cfg),
])
})
}
await ensureEntityImplementationsAreDeployed(cfg)
await ensurePolicyImplementationsAreDeployed(cfg)
if (releaseConfig.extractDeployedAddresses) {
await updateDeployedAddressesJson(cfg)
}
if (releaseConfig.freshDeployment && releaseConfig.multisig) {
await addMultisigAddressAsSystemAdmin(cfg, {
multisig: releaseConfig.multisig,
// on rinkeby we append, on mainnet we replace
replaceExisting: (releaseConfig.deployNetwork === 'mainnet'),
})
}
}
|
/*
* /MathJax/localization/kn/HelpDialog.js
*
* Copyright (c) 2009-2018 The MathJax Consortium
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
MathJax.Localization.addTranslation("kn","HelpDialog",{version:"2.7.3",isLoaded:true,strings:{Help:"\u0CAE\u0CBE\u0CA4\u0CCD \u0C9C\u0C95\u0CCD\u0CB7\u0CCD \u0CB8\u0CB9\u0CAF\u0CA4\u0CC6",MathJax:"\u0CAE\u0CBE\u0CA4\u0CCD \u0C9C\u0C95\u0CCD\u0CB7\u0CCD \u0CAA\u0CC1\u0C9F \u0CB2\u0CC7\u0C96\u0C95\u0CB0\u0CC1 \u0CA4\u0CAE\u0CCD\u0CAE \u0CB5\u0CC6\u0CAC\u0CCD \u0CAA\u0CC1\u0C9F\u0C97\u0CB3 \u0C92\u0CB3\u0C97\u0CC6 \u0C97\u0CA3\u0CBF\u0CA4 \u0CB8\u0CC7\u0CB0\u0CBF\u0CB8\u0CB2\u0CC1 \u0C85\u0CA8\u0CC1\u0CAE\u0CA4\u0CBF\u0CB8\u0CC1\u0CB5 \u0C92\u0C82\u0CA6\u0CC1 \u0C9C\u0CBE\u0CB5\u0CBE\u0CB8\u0CCD\u0C95\u0CCD\u0CB0\u0CBF\u0CAA\u0CCD\u0C9F\u0CCD \u0C97\u0CCD\u0CB0\u0C82\u0CA5\u0CBE\u0CB2\u0CAF. \u0C92\u0C82\u0CA6\u0CC1 \u0CB0\u0CC0\u0CA1\u0CB0\u0CCD, \u0CA8\u0CC0\u0CB5\u0CC1 \u0C89\u0C82\u0C9F\u0CBE\u0C97\u0CC1\u0CB5 \u0CAE\u0CBE\u0CA1\u0CB2\u0CC1 \u0C8F\u0CA8\u0CC1 \u0C85\u0C97\u0CA4\u0CCD\u0CAF\u0CB5\u0CBF\u0CB2\u0CCD\u0CB2.",Browsers:"*\u0CAC\u0CCD\u0CB0\u0CCC\u0CB8\u0CB0\u0CCD\u0C97\u0CB3\u0CC1*: \u0CAE\u0CA0 Jax \u0C87\u0C82\u0C9F\u0CB0\u0CCD\u0CA8\u0CC6\u0C9F\u0CCD \u0C8E\u0C95\u0CCD\u0CB8\u0CCD\u0CAA\u0CCD\u0CB2\u0CCB\u0CB0\u0CB0\u0CCD 6 +, \u0CAB\u0CC8\u0CB0\u0CCD\u0CAB\u0CBE\u0C95\u0CCD\u0CB8\u0CCD 3 + \u0C95\u0CCD\u0CB0\u0CCB\u0CAE\u0CCD 0.2 +, \u0CB8\u0CAB\u0CBE\u0CB0\u0CBF 2 + \u0C92\u0CAA\u0CC6\u0CB0\u0CBE 9.6 + \u0CAE\u0CA4\u0CCD\u0CA4\u0CC1 \u0C85\u0CA4\u0CCD\u0CAF\u0C82\u0CA4 \u0CAE\u0CCA\u0CAC\u0CC8\u0CB2\u0CCD \u0CAC\u0CCD\u0CB0\u0CCC\u0CB8\u0CB0\u0CCD \u0CB8\u0CC7\u0CB0\u0CBF\u0CA6\u0C82\u0CA4\u0CC6 \u0C8E\u0CB2\u0CCD\u0CB2 \u0C86\u0CA7\u0CC1\u0CA8\u0CBF\u0C95 \u0CAC\u0CCD\u0CB0\u0CCC\u0CB8\u0CB0\u0CCD\u0C97\u0CB3\u0CC1 \u0C95\u0CC6\u0CB2\u0CB8 \u0CAE\u0CBE\u0CA1\u0CC1\u0CA4\u0CCD\u0CA4\u0CA6\u0CC6.",Zoom:"\u0CAE\u0CBE\u0CA4\u0CCD \u0C9C\u0CC2\u0CAE\u0CCD: \u0C92\u0C82\u0CA6\u0CC1 \u0CAA\u0C95\u0CCD\u0CB7 \u0C92\u0C82\u0CA6\u0CC1 \u0C8E\u0C95\u0CBC\u0CC1\u0C85\u0CA4\u0CBF\u0C92\u0CA8\u0CCD \u0C85\u0CA8\u0CCD\u0CA8\u0CC1 \u0CA8\u0CCB\u0CA1\u0CB2\u0CBF\u0C95\u0CCD\u0C95\u0CC6 \u0CA8\u0CBF\u0CAE\u0C97\u0CC6 \u0C89\u0CAA\u0CCD\u0CAA\u0CA6\u0CCD\u0CA6\u0CB0 \u0C86\u0C97\u0CC1\u0CA4 \u0C87\u0CA6\u0CCD\u0CA6\u0CBE\u0CB0\u0CC6, \u0CAE\u0CBE\u0CA4\u0CCD \u0C9C\u0C95\u0CCD\u0CB7\u0CCD \u0C85\u0CA6\u0CCD\u0CA6\u0CA8\u0CC1 \u0CA8\u0CBF\u0CAE\u0C97\u0CC6 \u0CB8\u0CB0\u0CBF \u0CA8\u0CCB\u0CA1\u0CB2\u0CBF\u0C95\u0CCD\u0C95\u0CC6 \u0CB8\u0CB9\u0CAF\u0CA4\u0CC6 \u0CAE\u0CBE\u0CA1\u0CB2\u0CBF\u0C95\u0CCD\u0C95\u0CC6 \u0C85\u0CA6\u0CA8\u0CCD\u0CA8\u0CC1 \u0CA6\u0CCA\u0CA1\u0CCD\u0CA1\u0CA6\u0CC1 \u0CAE\u0CBE\u0CA1\u0CB2\u0CBF\u0C95\u0CCD\u0C95\u0CC6 \u0C86\u0C97\u0CC1\u0CA4\u0CA6\u0CC6.",Fonts:"* \u0CAB\u0CBE\u0C82\u0C9F\u0CCD\u0C97\u0CB3\u0CC1 *: \u0C85\u0CB5\u0CB0\u0CC1 \u0CA8\u0CBF\u0CAE\u0CCD\u0CAE \u0C95\u0C82\u0CAA\u0CCD\u0CAF\u0CC2\u0C9F\u0CB0\u0CCD\u0CA8\u0CB2\u0CCD\u0CB2\u0CBF \u0C87\u0CA8\u0CCD\u0CB8\u0CCD\u0C9F\u0CBE\u0CB2\u0CCD \u0CB5\u0CC7\u0CB3\u0CC6 \u0CAE\u0CBE\u0CA4\u0CCD \u0C9C\u0C95\u0CCD\u0CB7\u0CCD \u0C95\u0CC6\u0CB2\u0CB5\u0CC1 \u0C97\u0CA3\u0CBF\u0CA4 \u0CAB\u0CBE\u0C82\u0C9F\u0CCD\u0C97\u0CB3\u0CA8\u0CCD\u0CA8\u0CC1 \u0CAC\u0CB3\u0CB8\u0CC1\u0CA4\u0CCD\u0CA4\u0CA6\u0CC6; \u0C87\u0CB2\u0CCD\u0CB2\u0CA6\u0CBF\u0CA6\u0CCD\u0CA6\u0CB0\u0CC6, \u0C87\u0CA6\u0CC1 \u0CB5\u0CC6\u0CAC\u0CCD \u0C86\u0CA7\u0CBE\u0CB0\u0CBF\u0CA4 \u0CAB\u0CBE\u0C82\u0C9F\u0CCD\u0C97\u0CB3\u0CA8\u0CCD\u0CA8\u0CC1 \u0CAC\u0CB3\u0CB8\u0CC1\u0CA4\u0CCD\u0CA4\u0CA6\u0CC6. \u0C85\u0C97\u0CA4\u0CCD\u0CAF\u0CB5\u0CBF\u0CB2\u0CCD\u0CB2 \u0C86\u0CA6\u0CB0\u0CC2, \u0CB8\u0CCD\u0CA5\u0CB3\u0CC0\u0CAF\u0CB5\u0CBE\u0C97\u0CBF \u0C87\u0CA8\u0CCD\u0CB8\u0CCD\u0C9F\u0CBE\u0CB2\u0CCD \u0CAB\u0CBE\u0C82\u0C9F\u0CCD\u0C97\u0CB3\u0CC1 \u0C9F\u0CC8\u0CAA\u0CCD\u0CB8\u0CC6\u0C9F\u0CCD\u0C9F\u0CBF\u0C82\u0C97\u0CCD \u0CB5\u0CC7\u0C97\u0CB5\u0CA8\u0CCD\u0CA8\u0CC1. \u0CA8\u0CBE\u0CB5\u0CC1 [\u0CB8\u0CCD\u0C9F\u0CBF\u0C95\u0CCD\u0CB8\u0CCD \u0CAB\u0CBE\u0C82\u0C9F\u0CCD\u0C97\u0CB3\u0CC1](%1) \u0C85\u0CA8\u0CC1\u0CB8\u0CCD\u0CA5\u0CBE\u0CAA\u0CBF\u0CB8\u0CC1\u0CB5\u0CBE\u0C97 \u0CB8\u0CC2\u0C9A\u0CBF\u0CB8\u0CC1\u0CA4\u0CCD\u0CA4\u0CA6\u0CC6."}});MathJax.Ajax.loadComplete("[MathJax]/localization/kn/HelpDialog.js");
|
// page init
jQuery(function () {
"use strict";
initTabs();
initIsoTop();
initbackTop();
initLightbox();
initGoogleMap();
initNavOpener();
initPreLoader();
//initCountDown();
initSlickSlider();
initStickyHeader();
initCustomScroll();
new WOW().init();
});
jQuery(window).on('load', function () {
"use strict";
initPreLoader();
});
// PreLoader init
/*function initCountDown() {
jQuery("#countdown").countdown({
date: "10 december 2017 12:00:00",
format: "on"
});
}*/
// PreLoader init
function initPreLoader() {
jQuery('#pre-loader').delay(1200).fadeOut();
}
// NavOpener init
function initNavOpener() {
jQuery(".side-close , .side-opener , .mt-side-over").click(function () {
jQuery("body").toggleClass("side-col-active");
jQuery(".side-opener").toggleClass("active");
jQuery(".mt-side-over").toggleClass("active");
return false;
});
jQuery(".mobile-toggle").click(function () {
jQuery("body").toggleClass("mobile-active");
jQuery(".mobile-toggle").toggleClass("active");
return false;
});
jQuery(".cart-opener, .mt-mdropover").click(function () {
jQuery(this).parent().toggleClass("open");
return false;
});
jQuery(".search-close, .icon-magnifier, .fa-search").click(function () {
jQuery("body").toggleClass("search-active");
return false;
});
jQuery('.drop-link , #nav > ul > li.drop > a').click(function () {
jQuery(this).next().toggleClass("open");
return false;
});
jQuery('.mt-subopener').click(function () {
jQuery(this).parent().next().toggleClass("open");
return false;
});
}
// SlickSlider init
function initSlickSlider() {
jQuery(".banner-slider").slick({
dots: true,
arrows: false,
infinite: true,
adaptiveHeight: true,
autoplay: true,
autoplaySpeed: 2000,
});
jQuery('.tabs-slider').slick({
slidesToShow: 5,
slidesToScroll: 1,
responsive: [
{
breakpoint: 1200,
settings: {
slidesToShow: 3,
}
},
{
breakpoint: 1024,
settings: {
slidesToShow: 3,
}
},
{
breakpoint: 599,
settings: {
slidesToShow: 2,
}
},
{
breakpoint: 479,
settings: {
slidesToShow: 1,
}
}
]
});
jQuery('.tabs-sliderlg').slick({
slidesToShow: 4,
slidesToScroll: 1,
responsive: [
{
breakpoint: 1024,
settings: {
slidesToShow: 3,
}
},
{
breakpoint: 599,
settings: {
slidesToShow: 2,
}
},
{
breakpoint: 479,
settings: {
slidesToShow: 1,
}
}
]
});
jQuery('.bestseller-slider').slick({
slidesToShow: 4,
slidesToScroll: 1,
responsive: [
{
breakpoint: 1024,
settings: {
slidesToShow: 3,
}
},
{
breakpoint: 767,
settings: {
slidesToShow: 2,
}
},
{
breakpoint: 479,
settings: {
slidesToShow: 1,
}
}
]
});
jQuery('.patner-slider').slick({
autoplay: true,
slidesToShow: 6,
slidesToScroll: 1,
adaptiveHeight: true,
responsive: [
{
breakpoint: 1024,
settings: {
slidesToShow: 3,
}
},
{
breakpoint: 991,
settings: {
slidesToShow: 2,
}
},
{
breakpoint: 479,
settings: {
slidesToShow: 1,
}
}
]
});
jQuery('.work-slider').slick({
dots: true,
arrows: true,
slidesToShow: 1,
centerMode: true,
centerPadding: '18%',
responsive: [
{
breakpoint: 1840,
settings: {
arrows: false,
centerMode: true,
centerPadding: '10%',
slidesToShow: 1
}
},
{
breakpoint: 1380,
settings: {
arrows: false,
centerMode: true,
centerPadding: '5%',
slidesToShow: 1
}
},
{
breakpoint: 768,
settings: {
arrows: false,
centerMode: true,
centerPadding: '20%',
slidesToShow: 1
}
},
{
breakpoint: 480,
settings: {
dots: false,
arrows: false,
centerMode: true,
centerPadding: '20%',
slidesToShow: 1
}
}
]
});
jQuery(".centerslider-1").slick({
arrows: false,
infinite: true,
slidesToShow: 1,
centerMode: true,
slidesToScroll: 1,
adaptiveHeight: true,
centerPadding: '170px',
variableWidth: true,
responsive: [
{
breakpoint: 620,
settings: {
// centerPadding: '4%',
variableWidth: true
}
}
]
});
jQuery('.product-slider').slick({
slidesToShow: 1,
slidesToScroll: 1,
arrows: false,
fade: true,
centerPadding: '0',
asNavFor: '.pagg-slider'
});
jQuery('.pagg-slider').slick({
slidesToShow: 4,
slidesToScroll: 1,
centerPadding: '0',
asNavFor: '.product-slider',
focusOnSelect: true,
responsive: [
{
breakpoint: 1024,
settings: {
slidesToShow: 3,
}
}
]
});
}
// fancybox modal popup init
function initLightbox() {
jQuery('a.lightbox, a[rel*="lightbox"]').fancybox({
helpers: {
overlay: {
css: {
background: 'rgba(0, 0, 0, 0.65)'
}
}
},
afterLoad: function (current, previous) {
// handle custom close button in inline modal
if (current.href.indexOf('#') === 0) {
jQuery(current.href).find('a.close').off('click.fb').on('click.fb', function (e) {
e.preventDefault();
jQuery.fancybox.close();
});
}
},
padding: 0
});
jQuery("#newsletter-hiddenlink").fancybox().trigger('click');
}
// sticky header init
function initbackTop() {
var jQuerybackToTop = jQuery("#back-top");
jQuery(window).on('scroll', function () {
if (jQuery(this).scrollTop() > 100) {
jQuerybackToTop.addClass('active');
} else {
jQuerybackToTop.removeClass('active');
}
});
jQuerybackToTop.on('click', function (e) {
jQuery("html, body").animate({scrollTop: 0}, 500);
});
}
// IsoTop init
function initIsoTop() {
var isotopeHolder = jQuery('#product-masonry .masonry-list'),
win = jQuery(window);
isotopeHolder.isotope({transitionDuration: '0.75s'});
setTimeout(function () {
isotopeHolder.isotope('layout');
}, 100);
jQuery('#product-filter a').click(function (e) {
e.preventDefault();
jQuery('#product-filter li').removeClass('active');
jQuery(this).parent('li').addClass('active');
var selector = jQuery(this).attr('data-filter');
isotopeHolder.isotope({filter: selector});
});
jQuery('#product-shuffle').click(function () {
isotopeHolder.isotope('updateSortData').isotope({
sortBy: 'random'
});
});
jQuery('#blog-isotops').isotope({
// options
itemSelector: '.post-blog'
});
jQuery('#blog-isotop').isotope({
// options
itemSelector: '.img'
});
}
// GoogleMap init
function initGoogleMap() {
jQuery('.mt-map-holder').googleMapAPI({
marker: 'images/map-logo.png',
mapInfoContent: '.map-info',
streetViewControl: false,
mapTypeControl: false,
scrollwheel: false,
panControl: false,
zoomControl: false
});
}
// content tabs init
function initTabs() {
jQuery('ul.producttabs').tabset({
tabLinks: 'a',
defaultTab: false
});
jQuery('ul.mt-tabs').tabset({
tabLinks: 'a',
defaultTab: false
});
}
// sticky header init
function initStickyHeader() {
var win = jQuery(window),
stickyClass = 'sticky';
jQuery('#mt-header').each(function () {
var header = jQuery(this);
var headerOffset = header.offset().top || 400;
var flag = true;
jQuery(this).css('height', jQuery(this).innerHeight());
function scrollHandler() {
if (win.scrollTop() > headerOffset) {
if (flag) {
flag = false;
header.addClass(stickyClass);
}
} else {
if (!flag) {
flag = true;
header.removeClass(stickyClass);
}
}
ResponsiveHelper.addRange({
'..767': {
on: function () {
header.removeClass(stickyClass);
}
}
});
}
scrollHandler();
win.on('scroll resize orientationchange', scrollHandler);
});
}
function initCustomScroll() {
jQuery("#mt-productscrollbar").mCustomScrollbar({
axis: "x"
});
}
/*!
* Google Map module
*/
;(function ($) {
function GoogleMapAPI(options) {
this.options = $.extend({
mapTypeId: google.maps.MapTypeId.ROADMAP
}, options);
this.init();
}
GoogleMapAPI.prototype = {
init: function () {
this.findStructure();
this.getInfoWindowContent();
this.createMap();
this.createMarker();
this.createInfoWindow();
},
findStructure: function () {
this.container = $(this.options.container);
this.lat = parseFloat(this.container.attr('data-lat'));
this.lng = parseFloat(this.container.attr('data-lng'));
this.coords = new google.maps.LatLng(this.lat, this.lng);
this.zoom = parseInt(this.container.attr('data-zoom'));
this.infoWindowContent = this.container.find('.map-info');
this.mapOptions = {
mapTypeId: this.options.mapTypeId,
panControl: this.options.panControl,
zoomControl: this.options.zoomControl,
streetViewControl: this.options.streetViewControl,
mapTypeControl: this.options.mapTypeControl,
center: this.coords,
scrollwheel: this.options.scrollwheel,
zoom: this.zoom
};
},
getInfoWindowContent: function () {
this.infoWindowContent = this.container.find(this.options.mapInfoContent);
},
createMap: function () {
this.map = new google.maps.Map(this.container.get(0), this.mapOptions);
},
createMarker: function () {
this.marker = new google.maps.Marker({
icon: this.options.marker,
position: this.coords
});
this.marker.setMap(this.map);
},
createInfoWindow: function () {
var self = this;
this.infoWindow = new google.maps.InfoWindow({
content: this.infoWindowContent.get(0)
});
this.marker.addListener('click', function () {
self.infoWindow.open(self.map, self.marker);
})
}
};
$.fn.googleMapAPI = function (opt) {
return this.each(function () {
$(this).data('GoogleMapAPI', new GoogleMapAPI($.extend(opt, {container: this})));
});
};
}(jQuery));
/*
* Responsive Layout helper
*/
ResponsiveHelper = (function ($) {
// init variables
var handlers = [],
prevWinWidth,
win = $(window),
nativeMatchMedia = false;
// detect match media support
if (window.matchMedia) {
if (window.Window && window.matchMedia === Window.prototype.matchMedia) {
nativeMatchMedia = true;
} else if (window.matchMedia.toString().indexOf('native') > -1) {
nativeMatchMedia = true;
}
}
// prepare resize handler
function resizeHandler() {
var winWidth = win.width();
if (winWidth !== prevWinWidth) {
prevWinWidth = winWidth;
// loop through range groups
$.each(handlers, function (index, rangeObject) {
// disable current active area if needed
$.each(rangeObject.data, function (property, item) {
if (item.currentActive && !matchRange(item.range[0], item.range[1])) {
item.currentActive = false;
if (typeof item.disableCallback === 'function') {
item.disableCallback();
}
}
});
// enable areas that match current width
$.each(rangeObject.data, function (property, item) {
if (!item.currentActive && matchRange(item.range[0], item.range[1])) {
// make callback
item.currentActive = true;
if (typeof item.enableCallback === 'function') {
item.enableCallback();
}
}
});
});
}
}
win.bind('load resize orientationchange', resizeHandler);
// test range
function matchRange(r1, r2) {
var mediaQueryString = '';
if (r1 > 0) {
mediaQueryString += '(min-width: ' + r1 + 'px)';
}
if (r2 < Infinity) {
mediaQueryString += (mediaQueryString ? ' and ' : '') + '(max-width: ' + r2 + 'px)';
}
return matchQuery(mediaQueryString, r1, r2);
}
// media query function
function matchQuery(query, r1, r2) {
if (window.matchMedia && nativeMatchMedia) {
return matchMedia(query).matches;
} else if (window.styleMedia) {
return styleMedia.matchMedium(query);
} else if (window.media) {
return media.matchMedium(query);
} else {
return prevWinWidth >= r1 && prevWinWidth <= r2;
}
}
// range parser
function parseRange(rangeStr) {
var rangeData = rangeStr.split('..');
var x1 = parseInt(rangeData[0], 10) || -Infinity;
var x2 = parseInt(rangeData[1], 10) || Infinity;
return [x1, x2].sort(function (a, b) {
return a - b;
});
}
// export public functions
return {
addRange: function (ranges) {
// parse data and add items to collection
var result = {data: {}};
$.each(ranges, function (property, data) {
result.data[property] = {
range: parseRange(property),
enableCallback: data.on,
disableCallback: data.off
};
});
handlers.push(result);
// call resizeHandler to recalculate all events
prevWinWidth = null;
resizeHandler();
}
};
}(jQuery));
$(document).ready(function() {
$('#choosing_role').click(function() {
// $('.choose_role').show();
$('.choose_role').delay(500).queue(function(){
$(this).css("display", "block");
});
})
$('#buyProductOnline').click(function() {
let modal = $('#order_form');
let id = $(this).data('id');
let product_count = $('#product_count').val();
$('<input>').attr({
type: 'hidden',
name: 'product_count',
value: product_count
}).appendTo($(modal).find('form'));
$(modal).find('#product_id').val(id)
$(modal).modal();
})
$('#form_order').submit(function(e) {
e.preventDefault()
let formData = new FormData($(this)[0]);
// document.getElementById('ajax-loader').style.display='block';
// $('#ajax-loader').css('display', 'block')
$.ajax({
url: '/smartpay/create_order_product',
type: 'POST',
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
},
dataType: 'json',
data: $(this).serialize(),
cache : false,
processData: false,
beforeSend: function() {
$(this).parents('.modal').modal()
},
success: function (data) {
// document.getElementById('ajax-loader').style.display='none';
// $('#ajax-loader').css('display', 'none')
if (data.status == false) {
showError(data.message);
$(this).parents('.modal').modal()
return;
}
else {
// console.log(data)
$(this).parents('.modal').modal()
window.location.replace(data.url);
}
}
});
})
})
|
import React from 'react';
import ListViewComponent from '../ListViewComponent';
import renderer from 'react-test-renderer';
const props = {
"noOfChildren":3,
"btnChoices":["Male","Female","Other"],
"formProps":{
"initial":"Male",
}
};
const lvInst = new ListViewComponent(props);
beforeEach(() => {
});
// describe('while calling _getIndex',() => {
// it('correctly returns the index if value is present else it returns -1',() => {
// expect(rnInst._getIndex('Male')).toBe(0);
// expect(rnInst._getIndex('blah')).toBe(-1);
// });
// });
|
import { storiesOf } from '@storybook/react'
import React from 'react'
import { domain } from '../storyConsts'
import { FloatingPlainCaveHeader, PlainCaveHeader } from './PlainCaveHeader'
storiesOf(domain('PlainCaveHeader'), module)
.add('Default', () => (
<div
style={{
margin: 20
}}
>
<PlainCaveHeader />
</div>
))
.add('Floating', () => (
<div
style={{
width: '100vw',
height: '100vh'
}}
>
<FloatingPlainCaveHeader />
</div>
))
|
const INPUT_CHANGE_PREPAID = 'INPUT_CHANGE_PREPAID';
let initialState = {
value: 1,
placeholder: 'Минимальный аванс 1 месяц',
status: false,
width: 0,
prof: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12],
abon: ['Абонент 6 месяцев', 'Абонент 12 месяцев']
}
export const prepaidActionCreator = (value) => {
return {
type: INPUT_CHANGE_PREPAID,
value: value
}
}
const changePrepaid = (stateCome, action) => {
let state = {
...stateCome
}
state.value = action.value
return state
}
export const prepaidReducer = (state = initialState, action) => {
if (action.type === INPUT_CHANGE_PREPAID) {
return changePrepaid(state, action)
}
return state
} |
import request from '@/utils/request'
export function login(data) {
return request({
url: '/login',
method: 'post',
data
})
}
export function getInfo(token) {
return request({
url: '/user/logged_in',
method: 'get'
})
}
export function logout() {
return request({
url: '/user/logout',
method: 'put'
})
}
|
const { expect } = require('chai');
const feathers = require('@feathersjs/feathers');
const transactionManager = require('../lib/transaction-manager');
const adapter = require('../lib');
const mongoose = require('mongoose');
const {
Candidate,
Token,
Customer
} = require('./models');
const app = feathers()
.use('/candidates', adapter({ Model: Candidate }))
.use('/tokens', adapter({ Model: Token }))
.use('/customers', adapter({ Model: Customer }));
const candidate = app.service('candidates');
const token = app.service('tokens');
const customerService = app.service('customers');
const saveCandidateToken = async context => {
const newToken = context.data.token;
const tokenResult = await token.create({ token: newToken }, context.params);
context.data.token_id = tokenResult._id;
return context;
};
candidate.hooks({
before: {
create: [transactionManager.beginTransaction, saveCandidateToken],
remove: [transactionManager.beginTransaction]
},
after: {
create: [transactionManager.commitTransaction],
remove: [transactionManager.commitTransaction]
},
error: {
create: [transactionManager.rollbackTransaction],
remove: [transactionManager.rollbackTransaction]
}
});
token.hooks({
before: {
remove: [transactionManager.beginTransaction]
},
after: {
remove: [transactionManager.rollbackTransaction]
}
});
describe('transaction-manager', () => {
const newCandidate = { name: 'abcd', token: '123' };
it('Create transaction and commit session', async () => {
await Candidate.deleteMany();
await Token.deleteMany();
return candidate.create(newCandidate).then(result => {
expect(result.name).to.equal(newCandidate.name);
});
});
it('Create transaction and rollback session', async () => {
newCandidate.token = '456';
return candidate.create(newCandidate).then().catch(error => {
expect(error.name).to.equal('Conflict');
return token.find({ query: { token: '456' } }).then(result => {
expect(result).to.have.lengthOf(0);
});
});
});
});
// Start a transaction in a mongoose session.
const getTransaction = async () => {
try {
const client = mongoose.connections[0];
const session = await client.startSession();
await session.startTransaction();
const params = {};
params.mongoose = { session };
return params;
} catch (error) {
throw error;
}
};
describe('transaction-manager for find and get', () => {
const data = { name: 'Customer' };
it('Create with transaction and find without transaction', async () => {
const params = await getTransaction();
await customerService.create(data, params);
const customers = await customerService.find();
await params.mongoose.session.commitTransaction();
await Customer.deleteMany();
expect(0).to.equal(customers.length);
});
it('Create and find with transaction', async () => {
const params = await getTransaction();
await customerService.create(data, params);
const customers = await customerService.find(params);
await params.mongoose.session.commitTransaction();
await Customer.deleteMany();
expect(1).to.equal(customers.length);
});
it('Create with transaction and get without transaction', async () => {
const params = await getTransaction();
try {
const newCustomer = await customerService.create(data, params);
await customerService.get(newCustomer._id);
} catch (error) {
expect('not-found').to.equal(error.className);
} finally {
await params.mongoose.session.abortTransaction();
}
});
it('Create and get with transaction', async () => {
const params = await getTransaction();
const newCustomer = await customerService.create(data, params);
const customer = await customerService.get(newCustomer._id, params);
await params.mongoose.session.commitTransaction();
await Customer.deleteMany();
expect(newCustomer.name).to.equal(customer.name);
});
});
|
!function(i){var c,l='<svg><symbol id="iconchart" viewBox="0 0 1024 1024"><path d="M0 438.856h292.568V1024H0V438.856zM731.432 219.44H1024V1024H731.432V219.432zM365.712 0h292.576v1024H365.712V0z" ></path></symbol><symbol id="iconcomponent" viewBox="0 0 1024 1024"><path d="M0.004 0h438.856v438.856H0.004V0z m0 585.144h438.856V1024H0.004V585.144z m585.144 0H1024.004V1024H585.148V585.144z m219.424-146.288C925.764 438.856 1024.004 340.616 1024.004 219.44 1024.004 98.24 925.764 0 804.572 0 683.388 0 585.148 98.24 585.148 219.432c0 121.184 98.24 219.424 219.424 219.424z" ></path></symbol><symbol id="iconclipboard" viewBox="0 0 1024 1024"><path d="M438.856 950.856h512V585.144H713.144c-15.216 0-28.16-5.344-38.84-16.016-10.68-10.68-16.016-23.632-16.016-38.84V292.56H438.856v658.288zM585.144 128v-36.568a17.6 17.6 0 0 0-5.416-12.88 17.584 17.584 0 0 0-12.872-5.408H164.568c-4.968 0-9.264 1.8-12.872 5.408a17.584 17.584 0 0 0-5.408 12.88V128a17.6 17.6 0 0 0 5.408 12.88c3.608 3.6 7.904 5.408 12.88 5.408h402.28c4.976 0 9.264-1.808 12.88-5.416 3.6-3.6 5.408-7.896 5.408-12.872z m146.288 384h170.856L731.44 341.136V512zM1024 585.144v384c0 15.216-5.336 28.16-16.016 38.84-10.68 10.68-23.624 16.016-38.84 16.016H420.56c-15.208 0-28.16-5.336-38.832-16.016-10.68-10.68-16.024-23.624-16.024-38.84v-91.432H54.856c-15.216 0-28.16-5.336-38.84-16.016C5.336 851.016 0 838.072 0 822.856v-768c0-15.216 5.336-28.16 16.016-38.84C26.696 5.336 39.64 0 54.856 0h621.712c15.216 0 28.16 5.336 38.84 16.016 10.68 10.68 16.024 23.624 16.024 38.84V242.32c8 4.976 14.848 10.32 20.552 16.024l233.176 233.176c10.68 10.68 19.824 25.16 27.432 43.44 7.6 18.296 11.408 35.064 11.408 50.328v-0.144z" ></path></symbol><symbol id="iconexample" viewBox="0 0 1024 1024"><path d="M769.642871 459.444604h251.230533C997.806026 218.464462 802.968636 23.635068 561.988494 0.559694v251.238529a262.704255 262.704255 0 0 1 207.654377 207.646381z m-310.198267-207.646381V0.559694C218.464462 23.635068 23.635068 218.464462 0.559694 459.444604h251.238529a262.704255 262.704255 0 0 1 207.646381-207.646381z m102.54389 517.844648v251.230533c243.546738-23.067378 435.817532-217.904768 461.451506-461.44351H772.209467c-23.075374 107.669086-105.110486 189.704199-210.220973 210.212977zM251.798223 561.988494H0.559694c23.075374 243.546738 217.904768 435.817532 461.451505 461.451506V772.209467c-107.669086-23.075374-189.704199-105.110486-210.212976-210.220973z" ></path></symbol><symbol id="iconedit" viewBox="0 0 1024 1024"><path d="M848.937379 537.578518a38.363045 38.363045 0 0 0-38.387037 38.387037c0 1.495495 0.111962 2.879028 0.215927 4.262561h-0.215927V947.040246H76.934078V213.423982h400.92861c21.224833 0 38.387037-17.170202 38.387037-38.387037 0-21.224833-17.162204-38.387037-38.387037-38.387037H76.934078a76.72609 76.72609 0 0 0-76.774074 76.774074V947.040246c0 42.441668 34.332406 76.774074 76.774074 76.774074h733.616264c42.441668 0 76.774074-34.332406 76.774074-76.774074V580.228116h-0.20793c0.103965-1.383533 0.20793-2.767066 0.20793-4.262561 0-21.216835-17.162204-38.387037-38.387037-38.387037z" ></path><path d="M1001.101994 107.107885L916.546547 22.552438c-29.965881-29.965881-78.805388-29.749954-108.763271 0.215927l-423.536975 423.536975a34.100485 34.100485 0 0 0-7.25355 10.876327L270.572688 708.184906c-5.965985 14.075247-1.80739 28.262456 7.25355 37.427361 9.06094 9.172902 23.352114 13.331498 37.531326 7.357515l251.115201-106.308101c4.054631-1.703425 7.677407-4.158596 10.876327-7.25355l423.536975-423.536975c29.965881-29.957883 30.181808-78.797391 0.215927-108.763271zM528.837474 579.164475l-146.510525 62.059043 62.059043-146.510525L741.669602 197.429384l84.451481 84.451481L528.837474 579.164475z m417.666957-417.674955l-66.105677 66.113674-84.451481-84.451481 66.105677-66.113674 0.215927-0.20793 84.451481 84.451482-0.215927 0.207929z" ></path></symbol><symbol id="iconicon-test" viewBox="0 0 1024 1024"><path d="M973.557996 586.14612v79.591925c31.643248-60.647559 49.572023-128.348277 49.572022-199.87945C1023.130018 208.754206 794.070328 0.206249 511.664135 0.206249 229.26594 0.206249 0.206249 208.754206 0.206249 465.858595c0 3.222701 0.22391 6.445403 0.22391 9.6761l183.685976-207.540363h106.67701l-158.016321 217.408387h51.339311V430.192968l109.779759-155.753233v394.728927H184.116135V586.14612H17.463295c47.588822 162.206632 188.78792 289.547315 367.835765 331.058586-11.515359 26.389365-44.925895 90.067703-100.479508 101.351156-68.828263 14.106315 186.788726 3.422621 369.155233-105.381532 140.095543-36.87314 255.401075-126.740924 318.031836-244.005668h-108.004475V586.14612H680.09226V475.726618l183.909886-207.732286h104.02208l-155.369388 217.408387h51.347308v-59.440047l109.771763-155.153474v315.336922h-0.215913z m-625.667861 22.566905a84.094111 84.094111 0 0 1-7.96479-36.265385V356.446687c0-12.898802 2.65493-24.981932 7.96479-36.265385a93.242424 93.242424 0 0 1 21.695257-29.428141c9.068346-8.252674 19.911976-14.905993 32.306981-19.736047 12.395005-4.83805 25.669655-7.261074 39.839944-7.261074h90.29961c14.154296 0 27.436943 2.423024 39.831948 7.261074 12.171095 4.830054 22.790815 11.275456 31.875155 19.336208l-98.040491 130.371461v-23.174661a15.673684 15.673684 0 0 0-5.317857-12.091127c-3.542572-3.222701-7.96479-4.830054-13.27465-4.830053-5.317857 0-9.740075 1.607352-13.282647 4.830053a15.673684 15.673684 0 0 0-5.30986 12.091127v72.538768L354.97528 620.804153a84.413982 84.413982 0 0 1-7.085145-12.091128z m285.724855-36.265385c0 12.898802-2.65493 24.981932-7.972787 36.265385a93.242424 93.242424 0 0 1-21.68726 29.428141c-9.068346 8.252674-19.911976 14.905993-32.306981 19.744043-12.395005 4.830054-25.669655 7.253077-39.839944 7.253077H441.508408c-14.154296 0-27.436943-2.423024-39.831948-7.253077-12.395005-4.83805-23.238635-11.491369-32.314978-19.75204a99.879749 99.879749 0 0 1-11.06754-12.091127l109.771763-145.677293v50.979455c0 4.83805 1.775285 8.868426 5.317857 12.091128 3.534576 3.222701 7.96479 4.830054 13.274651 4.830053 5.30986 0 9.740075-1.607352 13.27465-4.830053a15.673684 15.673684 0 0 0 5.317857-12.091128V430.992645L607.721425 294.791533c7.301058 7.452996 13.27465 15.913587 17.704865 25.389769 5.30986 11.275456 7.96479 23.366583 7.96479 36.265385v216.000953h0.22391z" ></path></symbol><symbol id="icondocumentation" viewBox="0 0 1024 1024"><path d="M575.071927 358.559828H925.850762L575.071927 77.615662v280.944166zM128.650825 0.999609h510.20125l382.648941 306.480188v612.960375c0 27.093583-13.434967 53.076905-37.357515 72.238906-23.922548 19.162001-56.359766 29.921157-90.194794 29.921156H128.650825c-33.835029 0-66.272247-10.759156-90.194795-29.921156-23.922548-19.162001-37.357515-45.145322-37.357515-72.238906V103.159672C1.098515 46.464431 57.849668 0.999609 128.650825 0.999609z m573.981399 817.2805V716.120047h-573.981399v102.160062h573.981399z m191.316483-204.320125V511.799922H128.650825v102.160062h765.297882z" ></path></symbol><symbol id="iconemail" viewBox="0 0 1365 1024"><path d="M684.00064 607.733333L1282.005973 9.728A133.077333 133.077333 0 0 0 1232.00064 0h-1098.666667c-16.938667 0-33.205333 3.2-48.138666 8.938667l598.805333 598.794666z" ></path><path d="M684.00064 728.394667l-664.533333-664.533334A132.48 132.48 0 0 0 0.00064 133.333333v757.333334C0.00064 964.266667 59.733973 1024 133.333973 1024h1098.666667c73.6 0 133.333333-59.733333 133.333333-133.333333v-757.333334a133.013333 133.013333 0 0 0-18.528-67.733333L684.00064 728.394667z" ></path></symbol><symbol id="iconexcel" viewBox="0 0 1024 1024"><path d="M625.664 132.608v67.072h309.76v43.008h-309.76v69.632h309.76v43.008h-309.76v68.608h309.76v43.008h-309.76v68.608h309.76v43.008h-309.76v68.608h309.76v43.008h-309.76v68.096h309.76v43.008h-309.76v89.088H1024v-757.76H625.664zM0 914.944L577.024 1024V0L0 109.056v805.888z" ></path><path d="M229.376 660.48h-89.6l118.272-187.904-112.64-180.736h92.16l65.536 119.808 67.584-119.808h89.088l-112.64 177.664L466.944 660.48H373.248l-70.144-125.44z" ></path></symbol><symbol id="iconeducation" viewBox="0 0 1024 1024"><path d="M711.06488 956.52c-58.272 0-155.472 19.96-170.664 66v1.016c-33.856 1.04-41.776 0-56.864 0-15.16-46.08-112.36-66.048-170.664-66.048H0.00088V0h340.184c73.432 0 136.872 43.76 171.76 108.408C546.81688 43.8 610.36088 0 683.82488 0H1024.00088v956.56l-312.904-0.04h-0.032zM483.53688 198.104c0-77.208-71.824-132.056-142.216-132.056H56.86488V891.44H312.88088c56.432-1.12 145.416 0.656 170.664 48.96v-37.024c-1.072-45.776-0.032-108.176 0-110.656V219.304l0.032-21.24-0.032 0.04z m483.536-132.136h-284.4c-70.416 0-142.24 54.848-142.24 131.944v594.072c0.032 2.56 1.104 64.92 0 110.504v37.016c25.24-48.176 114.232-50.08 170.664-48.912h256V66l-0.024-0.04z" ></path></symbol><symbol id="iconbug" viewBox="0 0 1024 1024"><path d="M1021.632671 584.711228c0 11.280461-4.042431 21.051002-12.127294 29.311622-8.076874 8.252632-17.64769 12.382942-28.69647 12.382942h-142.899152c0 74.265697-14.244378 137.234955-42.741123 188.899785l132.689217 136.16443c8.076874 8.260621 12.119305 18.031162 12.119305 29.319611 0 11.280461-4.042431 21.051002-12.119305 29.303633-7.653457 8.252632-17.216284 12.382942-28.704459 12.382943-11.488175 0-21.051002-4.13031-28.704459-12.382943l-126.313998-128.327225a123.749531 123.749531 0 0 1-9.554838 8.468335c-4.250145 3.467224-13.181842 9.650706-26.7871 18.550446a400.280602 400.280602 0 0 1-41.478862 23.759271c-14.044653 6.950426-31.47664 13.245754-52.295961 18.885984-20.82731 5.64023-41.454895 8.468335-61.898733 8.468334V376.206449H470.471911v583.691947c-21.69811 0-43.276386-2.931961-64.758793-8.803872-21.474418-5.863922-39.968942-13.030051-55.483569-21.506374a533.417202 533.417202 0 0 1-42.086026-25.397015c-12.550711-8.444368-21.809956-15.49865-27.769746-21.170837L270.826928 873.888877l-116.727205 134.830267c-8.516269 9.107454-18.726204 13.66917-30.621817 13.669171-10.201947 0-19.349346-3.467224-27.434209-10.41765-8.084863-7.813237-12.438865-17.471932-13.062007-28.976084-0.631131-11.504153 2.660335-21.610231 9.874398-30.310247l128.854499-147.876296c-24.662027-49.507802-36.989047-109.001847-36.989046-178.490125H41.822388c-11.04878 0-20.611607-4.13031-28.696469-12.382942S0.998624 595.911798 0.998624 584.623349c0-11.280461 4.042431-21.051002 12.127295-29.303634 8.084863-8.260621 17.655679-12.382942 28.696469-12.382942h142.899153V351.40062L74.361565 238.707857c-8.084863-8.252632-12.119305-18.023173-12.119306-29.311622 0-11.280461 4.034442-21.051002 12.119306-29.303634 8.084863-8.260621 17.655679-12.382942 28.704459-12.382942s20.611607 4.122321 28.704458 12.382942l110.351987 112.692763h538.426302l110.359976-112.692763c8.084863-8.260621 17.655679-12.382942 28.69647-12.382942 11.056769 0 20.619596 4.122321 28.704459 12.382942 8.084863 8.252632 12.127294 18.023173 12.127294 29.303634 0 11.28845-4.042431 21.058991-12.127294 29.319611l-110.359976 112.684774v191.536153h142.899152c11.04878 0 20.611607 4.122321 28.704459 12.382942 8.076874 8.252632 12.119305 18.023173 12.119305 29.303634l-0.039945 0.07989zM715.430474 209.484114H307.160877c0-57.760433 19.884608-106.940686 59.645836-147.548748C406.57593 21.327305 454.733591 1.027269 511.295675 1.027269c56.562084 0 104.719746 20.300036 144.488963 60.908097 39.761228 40.608061 59.645836 89.796303 59.645836 147.548748z" ></path></symbol><symbol id="icondashboard" viewBox="0 0 1311 1024"><path d="M281.124852 651.431516c0-25.673186-9.14121-47.599807-27.423631-65.75939-18.282421-18.169819-40.33188-27.24961-66.168851-27.24961-25.836971 0-47.896666 9.079791-66.179087 27.24961-18.272184 18.159582-27.413395 40.086203-27.413395 65.75939 0 25.673186 9.14121 47.599807 27.413395 65.75939 18.282421 18.169819 40.33188 27.24961 66.179087 27.24961 25.836971 0 47.88643-9.079791 66.168851-27.24961 18.282421-18.169819 27.423631-40.086203 27.423631-65.75939z m140.383604-325.531501c0-25.673186-9.14121-47.599807-27.423631-65.75939-18.272184-18.169819-40.33188-27.24961-66.168851-27.24961-25.836971 0-47.896666 9.079791-66.16885 27.24961-18.282421 18.159582-27.423631 40.086203-27.423631 65.75939 0 25.673186 9.14121 47.599807 27.423631 65.75939 18.272184 18.159582 40.33188 27.24961 66.16885 27.24961 25.836971 0 47.896666-9.090028 66.168851-27.24961 18.282421-18.169819 27.423631-40.086203 27.423631-65.75939zM734.44904 675.40544l73.856475-277.573415c2.917408-12.590917 1.095307-24.342439-5.486773-35.24433-6.582081-10.891655-15.968968-18.036744-28.150424-21.435268-12.181456-3.378051-23.881796-1.811864-35.101019 4.729271-11.208987 6.541135-18.528097 16.102042-21.936858 28.703196l-73.846239 277.573415c-29.245731 2.426055-55.328378 12.959431-78.237705 31.610366-22.909327 18.650935-38.264103 42.502022-46.06433 71.573732-9.745165 37.301871-4.872582 72.658803 14.627984 106.09127 19.500566 33.42223 48.009268 54.9701 85.546579 64.664083 37.537311 9.693982 73.119446 4.852109 106.756643-14.535855 33.626961-19.367492 55.318142-47.702173 65.073544-85.01428 7.800227-29.07171 6.336404-57.396155-4.391466-85.01428-10.717634-27.607888-28.273262-49.647111-52.646411-66.127905z m482.580156-23.973924c0-25.673186-9.14121-47.599807-27.413395-65.75939-18.282421-18.169819-40.33188-27.24961-66.179087-27.24961-25.836971 0-47.88643 9.079791-66.168851 27.24961-18.282421 18.159582-27.423631 40.086203-27.423631 65.75939 0 25.673186 9.14121 47.599807 27.423631 65.75939 18.282421 18.169819 40.33188 27.24961 66.168851 27.24961 25.836971 0 47.896666-9.079791 66.179087-27.24961 18.272184-18.169819 27.413395-40.086203 27.413395-65.75939z m-467.952172-465.045001c0-25.683423-9.14121-47.599807-27.423631-65.769626C703.391445 102.467543 681.321513 93.377515 655.484542 93.377515c-25.836971 0-47.896666 9.079791-66.168851 27.239374-18.282421 18.169819-27.423631 40.086203-27.423631 65.769626 0 25.673186 9.14121 47.599807 27.423631 65.75939 18.272184 18.159582 40.33188 27.24961 66.168851 27.24961 25.836971 0 47.896666-9.090028 66.168851-27.24961 18.282421-18.169819 27.423631-40.086203 27.423631-65.75939z m327.568567 139.5135c0-25.673186-9.14121-47.599807-27.423631-65.75939-18.272184-18.169819-40.33188-27.24961-66.16885-27.24961-25.836971 0-47.896666 9.079791-66.168851 27.24961-18.282421 18.159582-27.423631 40.086203-27.423631 65.75939 0 25.673186 9.14121 47.599807 27.423631 65.75939 18.272184 18.159582 40.33188 27.24961 66.168851 27.24961 25.836971 0 47.896666-9.090028 66.16885-27.24961 18.282421-18.169819 27.423631-40.086203 27.423631-65.75939zM1310.621677 651.431516c0 126.431231-34.36399 243.424392-103.09197 350.969247-9.264049 14.044502-22.417974 21.066754-39.492485 21.066754H142.942099c-17.064275 0-30.228437-7.022251-39.492486-21.066754C34.711397 895.337024 0.347407 778.354099 0.347407 651.431516c0-88.167127 17.299715-172.454614 51.909381-252.872698C86.866455 318.150971 133.422137 248.870219 191.9136 190.747272c58.501699-58.143421 128.202148-104.402244 209.121821-138.796944C481.955093 17.555628 566.764643 0.358278 655.484542 0.358278c88.719899 0 173.529449 17.19735 254.449121 51.59205 80.919673 34.3947 150.620122 80.66376 209.121821 138.796944 58.491462 58.122948 105.047145 127.4037 139.656812 207.811546 34.59943 80.418083 51.909381 164.70557 51.909381 252.872698z" ></path></symbol><symbol id="iconguide" viewBox="0 0 1024 1024"><path d="M11.890619 560.841915l289.525612 129.392453 559.250499-523.687567-490.85963 564.544554 371.343547 149.824946c8.948712 3.398751 19.168956-1.3595 22.367781-10.899995v-0.67975L1023.646842 0.375862 10.61109 526.798424c-8.956709 4.774246-12.147536 15.666243-8.316944 25.198741 2.55906 4.086498 5.757884 7.493247 9.596473 8.852747z m357.276716 462.398088L513.610259 857.764808l-144.442924-62.648979v228.132171z" ></path></symbol><symbol id="icondrag" viewBox="0 0 1025 1024"><path d="M585.074876 232.47085h-73.618434 237.427243L511.120686 0.743459 275.188355 232.47085h163.800816v216.122744H218.149858v143.479602h220.839313v216.906175h146.085705V592.073196h219.120563V448.593594h-219.120563V232.47085z m-73.906225 790.04115l219.983936-213.532629H292.91146l218.257191 213.524635zM0.740049 519.478017l217.409809 216.07478V305.113993L0.740049 519.478017z m803.45539-214.364024V735.544803l219.120564-216.07478-219.120564-214.364024z" ></path></symbol><symbol id="iconinternational" viewBox="0 0 1024 1024"><path d="M666.296 824.08c-12.56-30.72-54.224-83.312-123.576-156.384-18.616-19.552-17.456-34.448-10.704-78.896v-5.12c4.424-30.48 12.104-48.4 114.504-64.696 52.128-8.144 65.624 12.56 84.712 41.424l6.28 9.544a101 101 0 0 0 51.44 41.656c9.072 4.192 20.24 9.312 35.368 17.92 36.768 20.24 36.768 43.28 36.768 94.024v5.816a215.28 215.28 0 0 1-41.424 139.632 472.44 472.44 0 0 1-152.2 88.208c27.92-52.368 6.512-114.504 0-132.424l-1.168-0.696zM512 40.96a468.016 468.016 0 0 1 203.872 46.544 434.504 434.504 0 0 0-102.872 82.616c-7.44 10.24-13.728 19.784-19.776 28.632-19.552 29.552-29.096 42.816-46.544 44.912a200.84 200.84 0 0 1-33.752 0c-34.208-2.32-80.752-5.12-95.648 35.376-9.544 25.84-11.168 95.648 19.552 131.96 5.28 8.616 6.224 19.2 2.56 28.624a56.08 56.08 0 0 1-16.528 25.832 151.504 151.504 0 0 1-23.272-23.28 151.28 151.28 0 0 0-66.56-52.824c-10-2.792-21.176-5.12-31.88-7.44-30.256-6.288-64.24-13.504-72.152-30.496a119.16 119.16 0 0 1-5.816-46.544 175.48 175.48 0 0 0-11.168-74 70.984 70.984 0 0 0-44.456-39.568A469.64 469.64 0 0 1 512 40.96zM0 512c0 282.768 229.232 512 512 512 282.768 0 512-229.232 512-512 0-282.768-229.232-512-512-512C229.232 0 0 229.232 0 512z" ></path></symbol><symbol id="iconeye" viewBox="0 0 2051 1024"><path d="M2030.777206 127.720528c21.888557-35.277324 14.603023-82.313756-14.603023-109.762325-32.848812-27.432593-76.641903-19.587862-102.189204 15.689462-3.658744 3.914377-408.788771 517.368795-890.560702 517.368795-467.168908 0-890.560701-517.368795-894.203468-521.283172-25.563278-31.362947-73.015113-35.277324-102.205181-7.828754C-2.17444 49.305173-5.833185 100.255981 19.714116 131.618928c7.301511 11.759108 94.90367 117.591079 233.584454 235.182159L67.165951 574.534676c-29.206045 31.362947-25.563278 82.313756 3.642768 109.762325 7.301511 15.657508 25.563278 23.502239 43.809067 23.502239s36.49158-7.828754 51.094603-23.518216l200.735641-223.407074c94.90367 70.554648 208.037153 137.194918 332.130891 184.215373l-76.641903 278.288237c-10.944278 43.122055 10.960255 86.228132 51.094602 97.98724h21.888557c32.864789 0 62.054858-23.518216 69.356369-58.79554L840.934426 684.297001c58.396113 11.759108 120.434994 19.603839 182.489851 19.603839 62.038881 0 124.093738-7.828754 182.489852-19.603839l76.641903 274.373859c7.301511 35.277324 40.150324 58.79554 69.340392 58.79554 7.301511 0 14.603023 0 18.261767-3.930354 40.150324-11.759108 62.038881-54.865186 51.094602-97.98724l-76.641903-274.357883c124.093738-47.036432 237.227221-113.660725 332.130891-184.215373l197.092874 219.492697c14.587046 15.673485 32.848812 23.518216 51.094602 23.518216s36.49158-7.828754 51.094602-23.518216c29.206045-31.362947 29.206045-78.383402 3.642767-109.762325l-186.132618-207.717612c149.641039-117.591079 237.243198-231.251805 237.243198-231.251805z" ></path></symbol><symbol id="iconeye-open" viewBox="0 0 1024 1024"><path d="M512 128q69.675 0 135.51 21.163t115.498 54.997 93.483 74.837 73.685 82.006 51.67 74.837 32.17 54.827L1024 512q-2.347 4.992-6.315 13.483T998.87 560.17t-31.658 51.669-44.331 59.99-56.832 64.34-69.504 60.16-82.347 51.5-94.848 34.687T512 896q-69.675 0-135.51-21.163t-115.498-54.826-93.483-74.326-73.685-81.493-51.67-74.496-32.17-54.997L0 513.707q2.347-4.992 6.315-13.483t18.816-34.816 31.658-51.84 44.331-60.33 56.832-64.683 69.504-60.331 82.347-51.84 94.848-34.816T512 128.085z m0 85.333q-46.677 0-91.648 12.331t-81.152 31.83-70.656 47.146-59.648 54.485-48.853 57.686-37.675 52.821-26.325 43.99q12.33 21.674 26.325 43.52t37.675 52.351 48.853 57.003 59.648 53.845T339.2 767.02t81.152 31.488T512 810.667t91.648-12.331 81.152-31.659 70.656-46.848 59.648-54.186 48.853-57.344 37.675-52.651T927.957 512q-12.33-21.675-26.325-43.648t-37.675-52.65-48.853-57.345-59.648-54.186-70.656-46.848-81.152-31.659T512 213.334z m0 128q70.656 0 120.661 50.006T682.667 512 632.66 632.661 512 682.667 391.339 632.66 341.333 512t50.006-120.661T512 341.333z m0 85.334q-35.328 0-60.33 25.002T426.666 512t25.002 60.33T512 597.334t60.33-25.002T597.334 512t-25.002-60.33T512 426.666z" ></path></symbol><symbol id="iconfullscreen" viewBox="0 0 1024 1024"><path d="M307.761596 416.00075L416.00075 307.697596l-189.182522-189.358521L345.673299 0.004H0.283998L0.004 345.097304l118.055078-118.919071L307.761596 416.00075z m598.179326 381.805017L716.206405 607.99925 607.99925 716.286404l189.182522 189.374521L678.3587 1023.996h345.389302L1023.996 678.902696l-118.055078 118.903071zM716.302404 416.00075l189.342521-189.182522L1023.996 345.6573V0.307998L678.926696 0.004 797.837767 118.083077 607.99925 307.777595 716.302404 416.00075zM307.681596 607.99925L118.339075 797.205772 0.004 678.3507v345.381302l345.093304 0.263998-118.919071-118.055078L416.00075 716.238404 307.681596 607.99925z" ></path></symbol><symbol id="iconmoney" viewBox="0 0 1024 1024"><path d="M432.799955 1022.928176v-229.346712H60.079562V698.116296h372.720393v-99.159666H60.079562v-102.83817h303.900386L0.791678 0.208176h180.726488l260.342104 360.413398c28.924235 41.135268 51.499052 76.856738 67.868394 107.036462 14.298184-24.390079 39.104094-62.206697 74.377746-113.441856L831.101942 0.208176h192.001902L658.812023 496.110463h306.595289v102.854163h-371.12904v99.159666h371.12904v95.457172h-371.12904v229.346712H432.807952z" ></path></symbol><symbol id="iconexit-fullscreen" viewBox="0 0 1024 1024"><path d="M393.012865 330.571535l-1.086002-281.402226c-0.479118-21.680109-18.382177-34.69616-40.102213-35.175278h-29.146371c-21.656153-0.479118-38.856505 18.390162-38.377387 40.054301l1.213767 153.030427-192.853154-189.970458a53.485588 53.485588 0 0 0-75.852433 0 53.980677 53.980677 0 0 0 0 76.068036l191.088401 189.35559-146.490461 0.590913c-21.656153-0.550986-41.747186 14.477362-45.037132 40.086242v27.645134c0.550986 21.728021 18.44606 39.686977 40.102213 40.166095l279.70934-1.652959c0.415236 0.039927 0.694722 0.199633 1.062046 0.199633l19.6199 0.431206a36.940031 36.940031 0 0 0 27.437515-11.019723c7.02707-6.979158 9.622295-16.737204 9.334825-27.645134l-2.092151-19.683782c0-0.383295 1.453326-0.64681 1.453326-1.086002h0.015971z m419.41229 408.943553l146.290828-0.582928c21.664138 0.479118 41.715245-12.848359 45.037132-38.449254v-27.645133c-0.543001-21.736006-18.501957-39.686977-40.094227-40.245949l-276.131923 1.676915c-0.423221 0-0.686736-0.167691-1.101973-0.167692l-19.571987-0.479118a37.051825 37.051825 0 0 0-27.509384 11.027709c-7.066997 6.931247-9.590354 16.721233-9.37475 27.629163l2.156033 19.643856c0.039927 0.479118-1.413399 0.758604-1.4134 1.125928l1.125928 277.066204c0.550986 21.664138 18.44606 34.640263 40.102213 35.111396l27.54931 0.047912c21.600256 0.495089 38.86449-18.44606 38.329475-40.134154l-1.221752-149.740481 192.853154 191.216166a53.421705 53.421705 0 0 0 75.812506 0 53.876868 53.876868 0 0 0 0-76.04408L812.425155 739.507102v0.007986zM384.292909 644.657623a37.019884 37.019884 0 0 0-27.445501-11.035694l-19.6199 0.479118c-0.399265 0-0.654795 0.175677-1.093987 0.175677l-279.685384-1.676914c-21.656153 0.558972-39.583168 18.509942-40.102213 40.245948v27.645133c3.265991 25.600895 23.357024 38.920387 44.981235 38.441269l148.15939 0.479119-192.701433 191.072431c-20.921505 20.969417-20.921505 55.018767 0 76.052065a53.453646 53.453646 0 0 0 75.828477 0l192.885095-189.970458-1.237722 150.650806c-0.479118 21.736006 16.721233 40.66917 38.33746 40.126168h29.146371c21.720036-0.550986 39.623094-13.455243 40.102213-35.183263l1.125928-279.134399c0-0.399265-1.453326-0.654795-1.453326-1.086002l2.092151-19.643855c0.239559-10.90793-2.283798-20.697916-9.310869-27.629163h-0.007985zM639.463401 379.026379a36.892119 36.892119 0 0 0 27.493413 10.971812l19.564002-0.431206c0.439192 0 0.702707-0.159706 1.141899-0.223589l280.124577 1.676915c21.656153-0.495089 39.551227-18.46203 40.094227-40.190051l0.071868-27.653119c-3.329873-25.640821-23.452847-40.597302-45.037133-40.126169l-148.646493-0.582927 190.984592-189.371561c21.001358-20.945461 21.001358-54.930928 0.063883-75.964227a53.42969 53.42969 0 0 0-75.812507 0L736.652575 208.292526l1.237722-154.212253c0.519045-21.664138-16.745189-40.605287-38.345445-40.126168h-27.54931c-21.664138 0.550986-39.559212 13.519125-40.102212 35.183263l-1.109958 281.458123c0 0.431207 1.437355 0.702707 1.437355 1.086002l-2.132077 19.683782c-0.223589 10.90793 2.299768 20.665975 9.374751 27.653119v0.007985z" ></path></symbol><symbol id="iconlock" viewBox="0 0 1024 1024"><path d="M957.4472 397.268945h-63.786146V316.176605C893.661054 142.220199 722.411986 1.19907 511.143839 1.19907 299.883679 1.19907 128.63461 142.220199 128.63461 316.176605v81.09234H64.848464c-35.203372 0-63.786145 23.479563-63.786145 52.525539v520.144189c0 29.045976 28.510898 52.525539 63.786145 52.525539H957.4472c35.195385 0 63.786145-23.479563 63.786145-52.525539v-520.144189c-0.06389-29.03799-28.59076-52.525539-63.786145-52.525539z m-191.294546 0H256.135024V316.176605c0-115.992234 114.211301-209.998334 255.008815-209.998333 140.797514 0 255.016801 94.054017 255.016801 209.998333v81.084354z" ></path></symbol><symbol id="iconlist" viewBox="0 0 1025 1024"><path d="M12.98964 96.615106c0 52.883721 31.765403 95.759822 70.956589 95.759821 39.183193 0 70.956589-42.8761 70.956589-95.759821 0-52.883721-31.773397-95.759822-70.956589-95.759822-39.191186 0-70.956589 42.8761-70.956589 95.759822zM1006.357907 0.855284H284.985901c-10.135514 0-16.897852 11.398456-16.897851 22.796912v145.917826c0 13.684542 8.448926 22.804906 16.897851 22.804905h721.372006c10.135514 0 16.897852-11.398456 16.897852-22.804905V23.66019c0-13.676549-8.448926-22.796912-16.897852-22.796913zM1.167538 502.459298c0 52.875728 31.765403 95.751828 70.948596 95.751829 39.191186 0 70.956589-42.8761 70.956589-95.759822 0-52.883721-31.765403-95.759822-70.956589-95.759822-39.183193 0-70.948596 42.8761-70.948596 95.759822zM992.849218 406.699477H271.461225c-10.135514 0-16.897852 11.390463-16.897851 22.788919v145.925818c0 13.676549 8.448926 22.796912 16.897851 22.796913h721.372006c10.135514 0 16.897852-11.398456 16.897852-22.796913V429.480402c0-11.398456-6.762338-22.796912-16.897852-22.796912zM1.167538 926.528232c0 52.883721 31.765403 95.759822 70.948596 95.759822 39.191186 0 70.956589-42.8761 70.956589-95.759822 0-52.883721-31.765403-95.759822-70.956589-95.759822-39.183193 0-70.948596 42.8761-70.948596 95.759822z m991.68168-95.759822H271.461225c-10.135514 0-16.897852 11.398456-16.897851 22.804906v145.917825c0 13.676549 8.448926 22.796912 16.897851 22.796913h721.372006c10.135514 0 16.897852-11.398456 16.897852-22.796913v-145.917825c0-11.40645-6.762338-22.804906-16.897852-22.804906z" ></path></symbol><symbol id="iconicon" viewBox="0 0 1024 1024"><path d="M920.722389 0.500598a103.948788 103.948788 0 0 1 39.500539 7.556277c12.393894 5.037518 23.244548 12.201988 32.535971 21.493411a105.132205 105.132205 0 0 1 22.077123 32.535971c5.421329 12.393894 8.131994 25.947217 8.131994 40.667964v817.996998c0 29.433499-9.491324 53.837476-28.465976 73.203935-18.974652 19.366459-42.794916 29.049688-71.460793 29.049688H103.884819c-30.984735 0-55.972424-10.075036-74.947076-30.217113-18.974652-20.134081-28.465976-45.313675-28.465975-75.522792V101.586796c0-27.106645 9.299418-50.735004 27.890259-70.869085C46.952868 10.559642 71.740656 0.500598 102.72539 0.500598h817.996999zM651.151198 871.951262c13.94513 0 24.01217-3.294377 30.209117-9.875135 6.196947-6.588754 9.299418-15.30446 9.299419-26.147118 0-10.075036-3.102472-18.590841-9.299419-25.563406-6.196947-6.972565-16.263987-10.450851-30.209117-10.450851H580.274117c0.775618-1.551236 1.159429-3.878089 1.159429-6.972565V216.618124h72.044506c13.937134 0 23.620363-3.486282 29.049688-10.458847 5.421329-6.972565 8.131994-15.496365 8.131994-25.563406 0-10.075036-2.718661-18.590841-8.131994-25.563406-5.429325-6.972565-15.112555-10.458847-29.049688-10.458847H369.961731c-13.937134 0-23.620363 3.486282-29.041692 10.458847-5.421329 6.972565-8.13999 15.496365-8.139989 25.563406 0 10.075036 2.718661 18.590841 8.139989 25.563406 5.421329 6.972565 15.104558 10.458847 29.041692 10.458847h65.071942v576.316067c0 1.54324 0.191905 2.710665 0.583712 3.486282 0.383811 0.767622 0.575716 1.935047 0.575716 3.486283H372.296581c-13.94513 0-24.01217 3.478286-30.209117 10.450851-6.196947 6.972565-9.299418 15.496365-9.299418 25.563406 0 10.842658 3.102472 19.558364 9.299418 26.147118 6.196947 6.580758 16.263987 9.875135 30.209117 9.875135h278.862613z" ></path></symbol><symbol id="iconlink" viewBox="0 0 1024 1024"><path d="M924.402464 1023.068211H0.679665V99.345412h461.861399v98.909208H99.596867v725.896389h725.896389V561.206811h98.909208z" ></path><path d="M930.805104 22.977336l69.965436 69.965436-453.492405 453.492404-69.965435-69.901489z" ></path><path d="M1022.464381 304.030081h-98.917201V99.345412H709.230573V0.428211h313.233808z" ></path></symbol><symbol id="iconnested" viewBox="0 0 1024 1024"><path d="M0.448215 73.56203c0 40.331183 28.625225 73.026307 63.950991 73.026307 35.31777 0 63.942995-32.695124 63.942995-73.026307 0-40.323187-28.625225-73.018311-63.942995-73.018311S0.448215 33.238844 0.448215 73.56203zM256.276167 0.527728h767.451874V146.56435H256.276167V0.527728z m0 365.163518c0 40.331183 28.625225 73.018311 63.950991 73.018311 35.31777 0 63.942995-32.687128 63.942996-73.018311 0-26.090533-12.18571-50.19809-31.9675-63.247355-19.789785-13.033273-44.169202-13.033273-63.950991 0-19.789785 13.049265-31.983491 37.156821-31.983492 63.247355zM512.10412 292.648947h511.623921v146.044618H512.10412V292.648947z m-255.827953 657.26075c0 40.323187 28.625225 73.018311 63.950991 73.018311 35.31777 0 63.942995-32.695124 63.942996-73.018311 0-40.331183-28.625225-73.026307-63.942996-73.026307s-63.950991 32.695124-63.950991 73.026307z m255.827953-73.010315h511.623921v146.044618H512.10412V876.907378z m0-219.1189c0 40.331183 28.625225 73.026307 63.950991 73.026307 35.31777 0 63.942995-32.695124 63.942995-73.026307 0-26.090533-12.18571-50.190094-31.967499-63.239359-19.789785-13.041269-44.169202-13.041269-63.950992 0-19.789785 13.049265-31.983491 37.148825-31.983491 63.247355z m255.827952-73.00232h255.795969V730.82278H767.932072V584.778162z" ></path></symbol><symbol id="iconpassword" viewBox="0 0 1024 1024"><path d="M870.4 354.576H716.8v-42.88c0-72.32-26.464-193.304-204.8-193.304-185.16 0-204.8 135.048-204.8 193.296v42.888H153.6v-42.88C153.6 122.248 294.384 0 512 0c217.616 0 358.4 122.248 358.4 311.688v42.888z m-256 314.848c0-43.52-46.104-78.656-102.4-78.656-56.296 0-102.4 35.136-102.4 78.656 0 29.456 20.536 54.464 51.256 67.816v89.64c0 21.744 23 39.696 51.2 39.696 28.192 0 51.2-17.952 51.2-39.696V737.24c30.664-13.352 51.144-38.36 51.144-67.816zM1024 512v393.608c0 65.264-69.16 118.392-153.6 118.392H153.6C69.208 1024 0 970.872 0 905.608V512c0-65.224 69.16-118.392 153.6-118.392h716.8c84.44 0 153.6 53.168 153.6 118.392z" ></path></symbol><symbol id="iconpdf" viewBox="0 0 1024 1024"><path d="M869.073 277.307H657.111V65.344l211.962 211.963z m-238.232 26.27V65.344l-476.498-0.054v416.957h714.73v-178.67H630.841z m-335.836 360.57c-5.07-3.064-10.944-5.133-17.61-6.201-6.67-1.064-13.603-1.6-20.81-1.6h-48.821v85.641h48.822c7.206 0 14.14-0.532 20.81-1.6 6.665-1.065 12.54-3.133 17.609-6.202 5.064-3.063 9.134-7.406 12.208-13.007 3.065-5.602 4.6-12.937 4.6-22.011 0-9.07-1.535-16.408-4.6-22.01-3.074-5.603-7.144-9.94-12.208-13.01zM35.82 541.805v416.904h952.358V541.805H35.821z m331.421 191.179c-3.6 11.071-9.343 20.879-17.209 29.413-7.874 8.542-18.078 15.408-30.617 20.61-12.544 5.206-27.747 7.807-45.621 7.807h-66.036v102.45h-62.831V607.517h128.867c17.874 0 33.077 2.6 45.62 7.802 12.541 5.207 22.745 12.076 30.618 20.615 7.866 8.538 13.604 18.277 17.21 29.212 3.6 10.943 5.401 22.278 5.401 34.018 0 11.477-1.8 22.752-5.402 33.819zM644.9 806.417c-5.343 17.61-13.408 32.818-24.212 45.627-10.807 12.803-24.283 22.879-40.423 30.213-16.146 7.343-35.155 11.007-57.03 11.007h-123.26V607.518h123.26c18.41 0 35.552 2.941 51.428 8.808 15.873 5.869 29.618 14.671 41.22 26.412 11.608 11.744 20.674 26.411 27.217 44.02 6.535 17.61 9.803 38.288 9.803 62.035 0 20.81-2.67 40.02-8.003 57.624z m245.362-146.07h-138.07v66.03h119.66v48.829h-119.66v118.058h-62.83V607.518h200.9v52.829h-0.001z m-318.2 25.611c-6.402-8.266-14.877-14.604-25.412-19.01-10.544-4.402-23.551-6.602-39.019-6.602h-44.825v180.088h56.029c9.07 0 17.872-1.463 26.415-4.401 8.535-2.932 16.14-7.802 22.812-14.609 6.665-6.8 12.007-15.667 16.007-26.61 4.003-10.94 6.003-24.275 6.003-40.021 0-14.408-1.4-27.416-4.202-39.019-2.8-11.607-7.406-21.542-13.808-29.816z m0 0" ></path></symbol><symbol id="iconpeople" viewBox="0 0 1024 1024"><path d="M833.40735 762.006606c65.281369 60.585846 105.14932 139.513829 105.149319 226.217023 0 12.062775-0.78392 23.981564-2.279768 35.724371h-86.263238c1.903807-11.71881 3.223673-23.581605 3.223673-35.716372 0-71.856701-34.876458-136.906094-91.342723-185.709137C687.942125 837.246964 602.790774 857.260931 511.96 857.260931c-90.742783 0-175.822141-19.957973-249.734634-54.634451-56.50626 48.787045-91.542702 113.732448-91.542701 185.605148 0 12.134767 1.319866 23.997563 3.223672 35.716372H87.643099a283.523202 283.523202 0 0 1-2.279768-35.716372c0-86.695194 39.787959-165.687171 105.005334-226.305014C74.356449 683.342596 0.035998 563.330786 0.035998 428.648466 0.035998 191.952508 229.236717 0.059999 511.96 0.059999s511.924002 191.88451 511.924002 428.596466c0 134.722316-74.384445 254.774122-190.476652 333.350141zM511.96 294.958046c-235.608069 0-426.596669-80.607812-426.596669 122.723534 0 203.323348 190.988601 368.146606 426.596669 368.146606 235.608069 0 426.596669-164.823258 426.596669-368.146606 0-203.331347-190.988601-122.723535-426.596669-122.723534z m199.083778 205.131164c-31.412809 0-56.882222-21.317835-56.882222-47.619163 0-26.301328 25.469413-47.627162 56.874223-47.627163 31.420808 0 56.882222 21.325834 56.882223 47.627163s-25.461414 47.619163-56.874224 47.619163z m-28.44511 130.962698c0 32.876661-76.392241 59.529953-170.638668 59.529953-94.238428 0-170.638668-26.653293-170.638668-59.529953 0-8.479139 5.247467-16.510323 14.398538-23.805582 26.357323 21.005866 86.311233 35.716372 156.24013 35.716372 69.936896 0 129.882807-14.718505 156.232131-35.716372 9.15907 7.295259 14.406537 15.326443 14.406537 23.805582z m-369.722446-130.962698c-31.412809 0-56.874223-21.317835-56.874224-47.619163 0-26.301328 25.461414-47.627162 56.874224-47.627163 31.412809 0 56.882222 21.325834 56.882222 47.627163s-25.469413 47.619163-56.874223 47.619163z" ></path></symbol><symbol id="iconpeoples" viewBox="0 0 1025 1024"><path d="M765.424796 949.226752c0 40.243148-28.477922 72.901241-63.7736 72.901241H64.72246c-35.295678 0-63.7736-32.658094-63.7736-72.901241C0.940867 803.416277 124.092092 667.149062 249.928858 613.438248c-72.725402-51.392937-121.61663-142.773256-121.61663-247.669199v-72.95719c0-161.132444 114.239386-291.876716 254.910567-291.876715s254.91856 130.744272 254.91856 291.876715v72.909234c0 104.999847-48.939184 196.268269-121.61663 247.717155 125.78881 53.758771 248.900071 189.978029 248.900071 335.788504z" ></path><path d="M848.420793 945.150484h126.819865c26.98329 0 48.763345-24.977127 48.763346-55.72497 0-111.553845-94.209728-215.674497-190.377663-256.748884 55.589095-39.315997 93.018819-109.180019 93.018818-189.458504v-55.828875c0-123.215166-87.344015-223.203603-194.941483-223.203603-13.379748 0-26.423803 1.542587-39.084209 4.483894 15.47383 37.669504 24.121911 79.718998 24.121911 124.094361v72.901241c0 104.999847-24.425632 184.718845-88.447006 247.717155 118.627368 35.247722 218.296097 187.188583 220.126421 331.768185z" ></path></symbol><symbol id="iconform" viewBox="0 0 1024 1024"><path d="M671.891093 190.746449c-8.147967 0-14.993856-2.556225-20.545657-7.668674a68.602683 68.602683 0 0 1-13.883496-17.869609 92.056045 92.056045 0 0 1-8.323707-20.937079c-1.853263-7.149441-2.779894-13.10864-2.779895-17.877597V0.755041h2.220721c6.662161 0 12.956864 0.678997 18.876122 2.04498 5.927246 1.357994 13.140593 4.593216 21.656017 9.697678 8.515424 5.11245 18.876122 12.261891 31.090084 21.456312 12.22195 9.186433 27.583263 21.280571 46.091929 36.266439 19.986483 16.335874 35.898982 30.123512 47.745486 41.362912 11.846504 11.231413 20.913114 20.769326 27.207817 28.597765 6.286715 7.828438 10.17697 14.474623 11.662776 19.922577 1.477817 5.447954 2.212732 10.208923 2.212732 14.298883v16.343862H671.891093zM1017.237062 671.843932c2.22072 5.447954 3.706526 12.261891 4.441441 20.433822 0.742903 8.171931-2.955635 16.00037-11.103602 23.485315-3.698538 3.410962-7.029618 6.646184-9.985253 9.705666-2.971611 3.06747-5.559789 5.623695-7.780509 7.668674a53.441075 53.441075 0 0 1-7.772521 6.126952l-94.3886-85.801283a354.125004 354.125004 0 0 0 14.993856-12.261891 247.857947 247.857947 0 0 1 13.875507-11.231413c8.882881-7.492934 18.508665-10.728156 28.877352-9.705666 10.360699 1.02249 18.876122 3.235222 25.538284 6.630208 7.405064 3.410962 15.361313 9.370162 23.876737 17.885586 8.507436 8.507436 14.985868 17.534104 19.427308 27.06403zM625.255966 766.839636c16.279957 0 29.971736-4.081971 41.083326-12.253903l-215.433833 206.33527H144.422094c-14.067225 0-29.428538-3.754455-46.091928-11.239401a196.102383 196.102383 0 0 1-46.635126-29.628243 170.731852 170.731852 0 0 1-36.090699-42.385402c-9.617796-16.00037-14.434682-32.511984-14.434682-49.542832V132.520441c0-14.298882 3.514809-29.276762 10.544427-44.941627A147.062808 147.062808 0 0 1 40.599427 45.185423a174.126838 174.126838 0 0 1 41.642499-31.665234C97.77898 5.012753 114.066925 0.755041 131.105761 0.755041h425.2919v127.683429c0 12.940888 2.22072 26.896278 6.662161 41.874157a133.434934 133.434934 0 0 0 20.545657 41.370901c9.258327 12.597395 21.28856 23.149811 36.090699 31.665234 14.802139 8.515424 32.57589 12.765148 53.305275 12.765148h162.120569v338.10067L682.994694 739.264361c8.147967-10.895908 12.213962-22.814306 12.213962-35.755195 0-17.701857-6.84589-32.855477-20.545657-45.452872-13.691779-12.597395-30.163453-18.900087-49.415021-18.900087H208.830971c-19.24358 0-35.531525 6.302692-48.855846 18.900087-13.324322 12.597395-19.986483 27.751015-19.986483 45.452872 0 17.709845 6.662161 32.687725 19.986483 44.941628 13.324322 12.261891 29.612267 18.388842 48.863834 18.388842h416.424996zM208.830971 383.797338c-19.251568 0-35.539513 6.302692-48.863835 18.900087-13.324322 12.597395-19.986483 27.743027-19.986482 45.452873 0 17.701857 6.662161 32.687725 19.986482 44.941627 13.324322 12.253903 29.612267 18.388842 48.863835 18.388842h416.424995c19.24358 0 35.707265-6.13494 49.407033-18.388842 13.699767-12.253903 20.545657-27.23977 20.545657-44.941627 0-17.709845-6.84589-32.855477-20.545657-45.452873-13.691779-12.597395-30.163453-18.900087-49.415021-18.900087H208.830971z m418.637728 511.748216l14.434681-13.284381 27.766992-25.530295a3832.340142 3832.340142 0 0 0 36.641885-34.221459 4000.148311 4000.148311 0 0 1 39.972965-37.280941c31.832987-29.28475 67.739957-61.972475 107.720911-98.063174l93.27824 85.801283-107.72091 99.085664-39.972966 36.769696-36.641884 33.710214a1433.562818 1433.562818 0 0 0-26.097458 24.507805c-7.029618 6.813937-10.919873 10.560404-11.662775 11.239401-3.698538 2.723977-7.772521 5.615706-12.213962 8.683176-4.441441 3.059482-8.882881 5.615706-13.324322 7.660686-4.441441 2.04498-11.28733 4.593216-20.545657 7.660687a667.014907 667.014907 0 0 1-28.318177 8.683176 576.748219 576.748219 0 0 1-27.759004 7.149441c-8.882881 2.04498-15.545042 3.402974-19.986483 4.081971-8.882881 1.357994-14.810127 0.343493-17.765762-3.059481-2.963623-3.402974-3.706526-9.194421-2.22072-17.366352 0.734915-4.081971 2.22072-10.216911 4.44144-18.388842 2.22072-8.171931 4.808898-16.511615 7.772521-25.019051l8.323707-24.004548c2.596166-7.492934 4.633157-12.597395 6.110975-15.321372a81.136173 81.136173 0 0 1 17.765763-23.493304z" ></path></symbol><symbol id="iconmessage" viewBox="0 0 1024 1024"><path d="M0 167.736v476.72c0 92.72 68.296 167.728 152.6 167.728h228.904l8 211.816L614.4 812.184h257c84.304 0 152.6-75.016 152.6-167.728v-476.72C1024 75.016 955.704 0 871.4 0h-718.8C68.304 0 0 75.016 0 167.736z m658.6 264.8c0-44.192 32.104-79.48 72.296-79.48 40.208 0 72.304 35.28 72.304 79.472 0 44.192-32.2 79.472-72.304 79.472-40.192 0-72.296-35.28-72.296-79.472z m-220.904 0c0-44.192 32.104-79.48 72.304-79.48s72.296 35.28 72.296 79.472c0 44.192-32.2 79.472-72.296 79.472-40.2 0-72.304-35.28-72.304-79.472z m-216.8 0c0-44.192 32.104-79.48 72.304-79.48s72.304 35.28 72.304 79.472c0 44.192-32.208 79.472-72.4 79.472-40.104 0-72.2-35.28-72.2-79.472z" ></path></symbol><symbol id="iconqq" viewBox="0 0 1025 1024"><path d="M147.488239 460.093312l-1.950734-5.948138-1.582972-7.738975-1.055315-4.237249v-17.436678l1.886775-6.867541 1.918755-7.259287 2.534354-7.619053 3.421778-8.474498 4.485088-8.818274 6.347879-8.82627v-6.179987l0.6156-5.788242 0.983362-7.866892 2.718235-8.842259 2.502375-9.545802 1.998702-4.381156 2.3105-4.085347 2.966074-4.549046 3.237898-3.381805v-21.825829l1.870785-11.248696 1.886775-13.055523 3.35782-15.629852 4.613005-16.269437 3.437768-8.938196 3.405789-9.729683 3.74157-9.074109 4.469099-9.721687 4.557041-10.649086 5.2366-9.969527 5.892174-10.641091 7.427178-10.633096 3.437768-6.092045 3.653628-4.988761 7.954835-11.240701 8.194679-11.216718 9.297963-11.544504 9.961532-11.232707 10.808982-11.064816 11.272681-11.376613 13.655134-12.280027 8.658378-7.467152 10.569138-8.058767 10.713044-7.11538 11.576484-6.835562 11.128774-6.076055 12.55185-5.03673 13.327347-6.195977 13.247399-4.253238 13.21542-4.413135 14.286723-4.381155 14.270735-3.333836 14.998262-2.774199L472.717074 5.468491l15.022247-1.958728 14.998262-2.014692 16.005608-0.84745h47.265311l15.749774 1.942739 15.837717 1.846801 16.14152 1.654925 14.982272 3.525711 15.821727 3.301856 14.846361 3.797534 16.269437 4.237249 14.886334 5.164647 14.24675 5.900169 15.222117 6.235951 13.878988 6.819572 13.503233 7.595069 13.231409 8.346581 11.392603 7.76296 5.292564 4.381155 5.540402 3.205918 10.577133 8.79429 8.914212 8.506477 8.890228 8.79429 8.658378 9.705699 7.147359 9.417885 8.506477 9.729683 5.916159 10.44122 6.012097 9.289968 6.379857 10.808982 5.284569 9.393901 8.898223 19.89908 4.365166 10.281325 3.421778 9.529812 3.421778 10.345283 3.070007 9.729683 2.134614 8.370565 2.774199 9.84161 4.852849 17.572591 3.101986 15.382012 2.022686 14.87834 1.734874 11.968229 2.734225 18.228165 0.6156 2.894121 2.190578 3.277872 5.892174 9.433875 3.781545 6.395847 3.35782 6.651681 4.269228 7.13137 3.77355 8.554446 2.454406 8.738326 2.670266 9.593771 2.014692 9.849605 0.919403 4.836859 0.84745 5.964128v5.180636l-0.84745 5.140663v6.395847l-1.535003 6.187982-2.798183 11.992214-3.221908 6.076055-2.390448 6.811577v1.702895l1.135263 2.110629 3.197923 4.980766 13.958937 20.226867 11.008852 15.190138 5.276574 10.129423 7.107386 11.10479 6.187982 12.15211 7.139364 13.007554 7.14736 14.614511 8.042778 16.54126 4.533056 10.137418 4.141312 9.905569 3.573679 10.449215 3.517716 9.393901 2.686256 9.873589 2.734225 9.273979 3.453757 18.076263 2.74222 18.46801 1.87878 16.389358v23.112993l-1.26318 8.19468-1.806827 14.134822-2.462401 12.711747-3.837508 11.512525-1.439066 4.700948-2.686256 5.65233-2.238546 3.941441-2.998054 4.852849-2.638287 3.062012-3.35782 3.949436-2.998053 3.197923-3.205918 2.718235-3.837509 1.654926-3.453757 1.654925-2.838158 0.911409h-4.341181l-2.766204-0.911409-5.276574-2.558339-2.414432-1.694899-2.534355-1.782843-2.774199-2.430422-2.798183-2.734224-4.628994-5.03673-5.46845-7.11538-4.309202-7.33124-4.301207-5.86819-4.20527-6.835562-5.924153-12.128125-6.659676-12.623804-0.783492-0.439714h-1.103283l-2.702246 1.974717-1.566982 3.317846-2.606308 4.125322-4.533057 12.256042-6.843557 17.444674-8.76231 20.994368-6.587723 10.457211-6.907515 10.920909-8.210669 12.280027-8.714342 12.016198-4.453109 5.43647-5.404491 5.940143-12.431928 11.96823 1.087294 1.079299 1.67891 1.710889 6.211967 3.565685 25.863207 12.184089 11.272681 6.227956 10.769008 6.044076 10.649086 7.619053 9.489838 7.850903 4.589021 3.5417 3.453757 4.085348 3.55769 4.740921 2.934095 5.140663 1.582972 4.261233 1.934744 5.116678 0.839455 4.429124 0.919403 5.172642-0.919403 3.461752v3.517716l-0.839455 3.629643-1.934744 3.317846-0.735522 2.598313-1.758858 3.149955-4.692953 6.26793-4.341181 5.012746-3.35782 3.75756-2.798183 2.782193-7.139365 5.100689-8.074757 4.445114-8.61041 4.253238-9.234004 4.085348-10.289319 3.95743-5.540403 1.654926-4.860844 1.335133-11.960235 2.734224-12.35198 2.598313-12.407944 2.582324-13.503232 2.158598-13.910968 0.575626-14.270734 1.67891h-44.283248l-15.973629-0.911408-14.870345-1.343128-16.029592-2.158598-15.90967-1.670915-16.749125-2.286516-16.229463-3.95743-15.837717-2.990059-15.733784-4.413135-16.14152-5.65233-15.829722-4.676963-8.346581-2.734225-7.411188-2.582323-4.684958-1.782843-4.652979-0.959377h-13.16745l-15.222117-1.04732-7.691006-0.767501-9.913564-1.0793-6.355873 5.636341-8.674368 5.316548-11.760364 5.604361-13.015549 6.995458-7.914861 3.797535-8.258638 3.006048-18.23616 7.307255-9.913563 2.438417-10.393252 2.74222-14.414641 2.750214-9.034134 0.687554-9.537808 0.79948-9.961532 1.0793-11.592473 0.423725h-47.377239l-26.750631-0.423725-25.98313-2.566334-13.143466-1.838806-12.703752-1.838806-12.359975-1.814822-12.36797-2.438417-11.528514-3.645633-11.464557-2.598313-10.345283-4.077352-9.777651-3.78954-9.130072-4.261233-7.914861-4.660974-7.866893-5.676314-2.686255-2.74222-3.517716-3.317846-2.670267-2.894121-2.398442-3.333835-2.222557-3.317846-1.718884-3.35782-2.486386-7.11538-0.871434-3.677612-1.103284-4.077353v-3.781544l1.103284-4.261234v-4.237248l0.871434-4.237249v-8.546451l0.41573-4.509073 2.070656-5.172641 1.718884-5.164647 3.117975-6.227956 2.286516-2.398443 1.886775-2.782193 4.916807-5.90017 3.917457-3.038027 3.709591-2.126619 3.421778-2.702246 5.404491-1.67891 4.341182-2.590318 5.404491-2.72623 6.156003-1.814821 6.195977-1.846801 7.171344-1.535004 6.795587-0.879429 8.058768-1.039325 8.738326-0.647579 2.270526-0.735523h0.503673l1.095289-0.919403v-1.039325l-1.598962-2.126619-4.636989-2.158599-11.592473-9.84161-7.794939-6.08405-9.01015-7.73098-9.082103-8.650383-9.44187-11.048827-10.87294-12.455912-4.061363-6.739624-5.372512-6.955484-4.636989-8.050773-4.173291-8.79429-5.628345-8.370565-3.669618-9.545802-4.37316-9.529813-4.365166-10.633096-3.173939-10.177392-3.022038-12.591825-0.895419-0.455704h-0.919403l-0.471694-0.903413h-1.119273l-1.838806 0.903413-0.911408 0.455704-1.26318 2.11063-0.455704 2.566334-0.951383 2.286515-1.64693 3.813524-5.308554 9.249994-2.758209 5.604362-4.365165 4.892823-4.63699 5.884179-5.124672 6.523765-5.412486 5.788241-6.355873 5.604362-5.86819 5.260584-6.507775 4.18928-7.11538 4.365166-6.835562 2.598313-8.058768 1.974718-7.914861 0.759506h-1.86279l-1.822817-0.759506-1.439065-3.070007-2.318495-1.503024-3.038027-7.291266-1.89477-3.941441-2.038676-5.65233-1.67891-5.86819-0.903414-5.788242-2.502375-13.175445-0.959377-7.770955v-25.463467l0.959377-19.019651 1.566983-9.705698 1.838806-10.009501 1.67891-10.769008 2.990058-10.025491 3.35782-11.536509 3.445763-11.248697 4.620999-11.576483 4.357171-11.032837 6.028086-11.192733 5.588372-12.15211 6.835562-11.392603 8.042778-12.296016 8.17869-11.048826 8.546451-12.296017 7.123375-8.56244 9.130072-9.809631 9.60976-9.889579 4.477093-4.716937 5.420481-5.292564 7.874887-6.683661 8.090747-6.819572 13.16745-11.560494 9.929553-7.107385z" ></path></symbol><symbol id="iconlanguage" viewBox="0 0 1024 1024"><path d="M677.676657 294.6142c19.165116 57.5433 44.715939 102.2992 89.431879 147.0551 38.322239-38.3622 63.873063-89.5118 83.038178-147.0551h-172.470057z m-421.56861 319.685h166.076358l-83.038179-223.7795-83.038179 223.7795z" ></path><path d="M894.854661 0.504H128.353929C58.095158 0.504 0.607803 58.0473 0.607803 128.378v767.244c0 70.3307 57.487355 127.874 127.746126 127.874h766.500733c70.258771 0 127.746126-57.5433 127.746126-127.874V128.378c0-70.3307-51.101647-127.874-127.746126-127.874zM581.867062 825.2913c-12.771416 12.7874-25.550824 12.7874-38.322239 12.7874-6.3937 0-19.165116 0-25.550824-6.3937-6.3937-6.3937-12.779408 0-12.779408-6.3937s-6.385708-12.7874-12.771415-25.5748c-6.3937-12.7874-6.3937-19.1811-12.779408-31.9685l-25.542832-70.3307H230.557224L205.0064 767.748c-12.771416 25.5748-19.165116 44.7559-25.550824 57.5433-6.3937 12.7874-19.165116 12.7874-38.322239 12.7874-12.779408 0-25.550824-6.3937-38.330231-12.7874-12.771416-12.7874-19.157124-19.1811-19.157124-31.9685 0-6.3937 0-12.7874 6.385708-25.5748 6.3937-12.7874 6.3937-19.1811 12.771416-31.9685l140.525533-358.0472c6.3937-12.7874 6.3937-25.5748 12.779408-38.3622 6.385708-12.7874 12.771416-25.5748 19.157124-31.9685 6.3937-6.3937 12.779408-19.1811 25.550823-25.5748 12.779408-6.3937 25.550824-6.3937 38.330232-6.3937 12.771416 0 25.542832 0 38.322239 6.3937 12.771416 6.3937 19.165116 12.7874 25.550824 25.5748 6.385708 6.3937 12.771416 19.1811 19.157124 31.9685 6.3937 12.7874 12.779408 25.5748 19.165115 44.7559l140.525534 351.6535c12.771416 25.5748 19.165116 44.7559 19.165116 57.5433-6.3937 6.3937-12.779408 19.1811-19.165116 31.9685zM933.176901 575.937c-70.258771-25.5748-121.360418-57.5433-166.076358-95.9055-44.707947 44.7559-102.195302 76.7244-172.462065 95.9055l-19.157124-31.9685c70.258771-19.1811 127.746126-44.7559 172.462066-89.5118C703.22748 409.7008 664.905241 352.1575 652.125833 288.2205h-63.873063v-25.5748h172.470058c-12.7874-19.1811-25.558816-44.7559-38.330232-63.937l19.157124-6.3937c12.779408 19.1811 31.944524 44.7559 44.715939 70.3307h159.682658v31.9685h-63.873063c-19.157124 63.937-51.093655 121.4803-89.423887 159.8425 44.715939 38.3622 95.809594 70.3307 166.076358 89.5118l-25.550824 31.9685z" ></path></symbol><symbol id="iconsearch" viewBox="0 0 1024 1024"><path d="M999.073 878.496L754.049 633.328c-2.856-2.856-6.056-5.032-9.032-7.312a402.928 402.928 0 0 0 65.488-220.72C810.617 181.512 629.249 0 405.361 0 181.481 0 0.001 181.504 0.001 405.304c0 223.912 181.48 405.304 405.248 405.304 81.488 0 157.144-24.24 220.8-65.608 2.288 3.08 4.456 6.168 7.2 8.912l245.024 245.056a85.064 85.064 0 0 0 60.344 25.032c21.824 0 43.656-8.344 60.344-24.92 33.368-33.256 33.368-87.32 0.112-120.584M405.369 682.704C252.457 682.704 128.001 558.24 128.001 405.304c0-152.816 124.456-277.288 277.36-277.288 152.92 0 277.256 124.472 277.256 277.4 0 152.816-124.456 277.288-277.248 277.288" ></path></symbol><symbol id="iconsize" viewBox="0 0 1024 1024"><path d="M0.56 438.936001h437.888535v146.127998H292.488354V1023.44H146.520181V585.063999H0.56V438.936001z m1021.737251-292.248003H735.235569V1023.44H579.57401V146.687998H292.512327V0.56h729.808898l-0.023974 146.127998z" ></path></symbol><symbol id="icontab" viewBox="0 0 1024 1024"><path d="M631.116335 0.419836H392.483493c-14.914053 0-25.573802 12.786901-25.573802 27.700954v53.266759c0 14.914053 12.794898 27.700954 25.573802 27.700954h238.624845c14.914053 0 25.573802-12.786901 25.573802-27.700954V28.12079C658.817289 13.19874 646.030388 0.419836 631.108338 0.419836z m364.358708 0H756.834204c-14.914053 0-27.700954 12.786901-27.700954 27.700954v53.266759c0 14.914053 12.786901 27.700954 27.700954 27.700954h238.640839c14.914053-2.127152 27.700954-12.786901 27.700954-27.700954V28.12079c0-14.914053-12.786901-27.700954-27.700954-27.700954z m0 178.984628H320.032383c-14.92205 0-27.700954-12.786901-27.700954-27.700954V28.12079c0-14.914053-12.786901-27.700954-27.700953-27.700954H28.116788C13.194738 0.419836 0.415834 13.206737 0.415834 28.12079V997.606196c0 12.778904 12.786901 25.565805 27.700954 25.565806h967.358255c14.914053 0 27.700954-12.786901 27.700954-27.700954V207.105418c0-14.914053-12.786901-27.700954-27.700954-27.700954z" ></path></symbol><symbol id="iconstar" viewBox="0 0 1024 1024"><path d="M565.228999 34.689634l112.062243 237.506364c8.702621 18.317097 25.411973 31.05108 44.816898 33.994614l250.736267 38.073966c48.688285 7.406826 68.213191 70.036902 32.930782 105.95921L824.307945 635.130487c-13.997782 14.237744-20.348775 34.810484-17.053298 54.927296l42.809217 261.086627c8.342678 50.687968-42.633244 89.441827-86.210339 65.50962l-224.276461-123.252469a57.030963 57.030963 0 0 0-55.271241 0l-224.276461 123.260467c-43.577095 23.91621-94.553017-14.82965-86.20234-65.509619l42.809216-261.094626c3.319474-20.116812-3.095509-40.697551-17.085293-54.927296L18.147691 450.223788C-17.126719 414.30148 2.326198 351.671404 51.070474 344.264578l250.704273-38.073966c19.348934-2.943534 36.074284-15.677516 44.752908-33.994614L458.63789 34.689634c21.820542-46.152687 84.826558-46.152687 106.58311 0z" ></path></symbol><symbol id="icontree-table" viewBox="0 0 1024 1024"><path d="M358.4 0h636.344C1014.24 0 1024 11.376 1024 34.136v187.728c0 22.76-9.752 34.136-29.256 34.136H358.4c-19.504 0-29.256-11.376-29.256-34.136V34.136C329.144 11.376 338.896 0 358.4 0z m182.856 384h453.488c19.504 0 29.256 11.376 29.256 34.136v187.728c0 22.76-9.752 34.136-29.256 34.136H541.256C521.76 640 512 628.624 512 605.864V418.136C512 395.376 521.752 384 541.256 384z m0 384h453.488c19.504 0 29.256 11.376 29.256 34.136v187.728c0 22.76-9.752 34.136-29.256 34.136H541.256C521.76 1024 512 1012.624 512 989.864v-187.728C512 779.376 521.752 768 541.256 768zM402.288 546.136c16.16 0 29.256-15.28 29.256-34.136 0-18.848-13.104-34.136-29.256-34.136H138.96V256h51.2c16.16 0 29.264-15.28 29.264-34.136V34.136C219.432 15.28 206.32 0 190.16 0H29.256C13.096 0 0 15.28 0 34.136v187.728C0 240.72 13.096 256 29.256 256h51.2v640c0 18.848 13.104 34.136 29.256 34.136h292.576c16.16 0 29.256-15.28 29.256-34.136 0-18.848-13.104-34.136-29.256-34.136H138.96V546.136h263.32z" ></path></symbol><symbol id="iconskill" viewBox="0 0 1025 1024"><path d="M254.037315 745.648h267.208c11.52 19.344 24.616 37.304 39.44 53.536h-306.64v-53.536z m0-84.688h231.312a358.4 358.4 0 0 1-10.112-53.504h-221.2v53.504z m0-138.16H475.941315c2.304-18.288 5.712-36.256 10.72-53.496H254.021315v53.496h0.024z m431.304 358.72v46.8c0 22.384-16.76 40.6-37.336 40.6h-560.56c-20.608 0-37.304-18.216-37.304-40.6V250.08l185.76-167.68v178H138.101315v53.504h147.12V53.504h362.784c20.608 0 37.336 18.216 37.336 40.528v160.072c15.896-5.4 32.424-9.024 49.36-11.56v-148.48C734.725315 42.24 695.813315 0 648.037315 0H250.021315L0.821315 224.944v703.336c0 51.84 38.872 94.072 86.656 94.072h560.56c47.792 0 86.696-42.16 86.696-94.072v-35.28c-16.936-2.496-33.464-6.12-49.36-11.48h-0.032zM187.053315 469.336h-63.68v53.504h63.68v-53.504z m-63.648 329.84h63.68v-53.528h-63.68v53.536z m63.648-191.68h-63.68v53.496h63.68v-53.504z m717.744-120.336l-39.168-32.56-99.576 140.904-89.52-74.44-30.096 42.488 128.728 107.04 129.632-183.432zM1024.821315 567.824c0-149.056-111.76-270.256-249.176-270.256-137.344 0-249.08 121.24-249.08 270.256 0 149.024 111.76 270.264 249.08 270.264 137.376 0 249.144-121.2 249.144-270.264H1024.821315z m-49.36 0c0 119.464-89.624 216.8-199.848 216.8-110.16 0-199.896-97.264-199.896-216.8 0-119.528 89.56-216.792 199.896-216.792 110.224 0 199.856 97.264 199.856 216.8z" ></path></symbol><symbol id="icontable" viewBox="0 0 1024 1024"><path d="M0.512208 0.511744h1023.391792v248.707522H0.512208V0.511744z m0 303.97586h307.014339v331.610029H0.512208V304.487604z m0 386.878367h307.014339v331.610029H0.512208V691.365971zM358.700934 304.487604h307.01434v331.610029H358.700934V304.487604z m0 386.878367h307.01434v331.610029H358.700934V691.365971zM716.889661 304.487604h307.014339v331.610029H716.889661z m0 386.878367h307.014339v331.610029H716.889661z" ></path><path d="M0.512208 0.511744h1023.391792v248.707522H0.512208V0.511744z m0 303.97586h307.014339v331.610029H0.512208V304.487604z m0 386.878367h307.014339v331.610029H0.512208V691.365971zM358.700934 304.487604h307.01434v331.610029H358.700934V304.487604z m0 386.878367h307.01434v331.610029H358.700934V691.365971zM716.889661 304.487604h307.014339v331.610029H716.889661z m0 386.878367h307.014339v331.610029H716.889661z" ></path></symbol><symbol id="icontheme" viewBox="0 0 1024 1024"><path d="M1003.996156 295.873688L762.686042 22.643823C749.878142 8.147936 732.518277 0.004 714.398419 0.004c-18.103859 0-35.463723 8.143936-48.263623 22.639823l-30.287764 34.287732c-12.7999 14.495887-30.159764 22.639823-48.255623 22.647823H436.42459c-18.103859 0-35.471723-8.143936-48.263623-22.639823L357.873204 22.643823C345.073304 8.147936 327.71344 0.004 309.609581 0.004c-18.103859 0-35.471723 8.143936-48.271623 22.639823L20.003844 295.873688C7.203944 310.369575 0.004 330.033422 0.004 350.521262c0 20.49584 7.191944 40.159686 19.999844 54.647573L116.52309 514.479981c17.423864 19.743846 42.935665 27.223787 66.639479 19.551847 10.799916-3.479973 21.671831 4.735963 21.671831 17.439864v395.252912c0 42.503668 30.71976 77.279396 68.255466 77.279396h477.804268c37.543707 0 68.255467-34.775728 68.255466-77.279396V551.471692c0-12.719901 10.879915-20.927837 21.679831-17.447864 23.695815 7.67994 49.199616 0.191999 66.631479-19.551847L1003.996156 405.168835c12.7999-14.487887 19.991844-34.151733 19.991844-54.639574 0-20.50384-7.191944-40.159686-19.999844-54.655573z" ></path></symbol><symbol id="iconuser" viewBox="0 0 1032 1024"><path d="M494.870476 507.635572c160.939766 0 291.404485-111.604041 291.404485-249.237064 0-137.664224-130.464718-249.229265-291.404485-249.229265-160.924166 0-291.412285 111.56504-291.396684 249.229265 0 137.633024 130.472518 249.237065 291.404485 249.237064zM628.455241 590.737994H385.59087c-207.888657 0-376.433535 144.122719-376.433535 321.910733v20.779506c0 72.665868 168.544878 72.736069 376.433535 72.736069H628.455241c207.865256 0 376.402334-2.683239 376.402334-72.736069v-20.771705c0-177.795814-168.521478-321.918533-376.402334-321.918534z" ></path></symbol><symbol id="iconshopping" viewBox="0 0 1024 1024"><path d="M343.373362 810.757112c13.130599 0 25.573481 2.654908 37.320648 7.964723a98.199607 98.199607 0 0 1 31.107205 22.166882c8.980306 9.468105 15.889464 20.647507 20.727474 33.530208 4.83801 12.890698 7.261013 26.533086 7.261013 40.927166 0 14.394079-2.423003 28.044464-7.261013 40.927165-4.83801 12.882701-11.747168 24.070099-20.735471 33.538205a106.356252 106.356252 0 0 1-31.099208 22.734648 84.621193 84.621193 0 0 1-37.320648 8.524494c-13.826313 0-26.437126-2.838832-37.840435-8.524494a108.787252 108.787252 0 0 1-30.587419-22.734648c-8.980306-9.476102-15.897461-20.655504-20.735471-33.538205a115.448512 115.448512 0 0 1-7.253016-40.927165c0-14.394079 2.415007-28.036468 7.253016-40.927166 4.83801-12.874704 11.755165-24.062102 20.735471-33.530208a100.078834 100.078834 0 0 1 30.587419-22.166882c11.403309-5.309816 24.014122-7.964724 37.840435-7.964723z m431.278601 2.279062c13.138596 0 25.749408 2.646911 37.848431 7.956727a91.050548 91.050548 0 0 1 31.099208 22.166882c8.636448 9.476102 15.553602 20.655504 20.735471 33.538205 5.181869 12.874704 7.772803 26.525089 7.772803 40.927165 0 14.394079-2.590934 28.036468-7.772803 40.919169-5.181869 12.882701-12.099023 24.070099-20.735471 33.538205a97.983696 97.983696 0 0 1-31.107204 22.734648 87.963818 87.963818 0 0 1-37.840435 8.524494 84.605199 84.605199 0 0 1-37.320649-8.524494 99.782956 99.782956 0 0 1-30.579422-22.734648c-8.636448-9.476102-15.553602-20.655504-20.735471-33.538205a108.603328 108.603328 0 0 1-7.780799-40.919169c0-14.402076 2.598931-28.044464 7.780799-40.927165 5.181869-12.882701 12.091027-24.070099 20.735471-33.538205a92.433979 92.433979 0 0 1 30.579422-22.166882 89.65912 89.65912 0 0 1 37.320649-7.956727z m174.176355-645.710398c19.35204 0 34.385856 2.838832 45.101449 8.524493 10.715592 5.677665 18.312467 12.69078 22.806619 21.031349a51.39486 51.39486 0 0 1 6.221441 26.709014c-0.351855 9.476102-1.559359 17.62475-3.630507 24.445945-2.079145 6.821194-6.397369 20.839428-12.954671 42.062698a4712.205718 4712.205718 0 0 1-22.29483 69.915242 9886.917192 9886.917192 0 0 0-24.365977 75.592906c-7.94873 25.013711-13.994244 44.717606-18.144537 59.119682-8.980306 30.307534-20.391612 51.338883-34.209928 63.094047-13.818316 11.747168-30.755349 17.616754-50.795107 17.616754H312.266157l15.553602 102.317913h522.52107c33.170356 0 49.763531 15.537609 49.763531 46.60483 0 15.161763-3.278651 28.228389-9.851947 39.223866-6.565299 10.98748-19.527968 16.481221-38.880008 16.481221H308.123861c-13.826313 0-25.397553-3.406599-34.729715-10.23579-9.332161-6.813198-17.112961-15.721533-23.326405-26.709014a170.146013 170.146013 0 0 1-15.033816-35.80927 352.87885 352.87885 0 0 1-8.812375-36.385034c-0.695714-4.542132-2.590934-15.529612-5.701655-32.962441-3.118717-17.432829-6.917155-39.215869-11.403309-65.365113l-15.033816-87.539992c-5.533724-32.202754-11.059451-64.605426-16.593175-97.192022-13.130599-76.544515-27.988487-161.805444-44.573665-255.782788H55.147918c-10.363737 0-19.008181-2.846829-25.909343-8.532491a72.162317 72.162317 0 0 1-17.112961-20.455586 83.293739 83.293739 0 0 1-9.332161-25.589474C1.07416 68.422458 0.210516 60.089885 0.210516 52.509003c0-15.161763 4.662082-27.668619 13.994243-37.504573C23.536921 5.128493 36.147733 0.210516 52.045194 0.210516h104.716927c13.818316 0 24.877767 2.271066 33.170356 6.821194 8.292589 4.550128 14.857888 10.23579 19.695898 17.048987a68.355883 68.355883 0 0 1 10.371734 21.599116c2.079145 7.580882 3.798438 14.026231 5.181869 19.328049 1.383431 6.061507 2.766862 14.593997 4.150292 25.581478 1.383431 10.98748 2.758865 22.166882 4.142297 33.530208 2.079145 13.642388 4.150293 28.044464 6.22144 43.206228h709.132311z" ></path></symbol><symbol id="iconwechat" viewBox="0 0 1193 1024"><path d="M806.287212 309.998684c13.642769 0 27.127442 1.050875 40.528417 2.631837C810.407012 133.842355 629.080008 1.032275 422.076327 1.032275 190.688636 1.032275 1.112733 167.275045 1.112733 378.379926c0 121.864245 63.061771 221.92052 168.465415 299.536438l-42.100079 133.470365 147.122433-77.783315c52.692523 10.992333 94.922799 22.27296 147.475825 22.27296 13.20568 0 26.309062-0.678884 39.310147-1.757657-8.2396-29.666281-13.001085-60.727528-13.001085-92.960546 0-193.8538 157.910172-351.159486 357.901823-351.159487z m-226.356512-120.301883c31.684332 0 52.683223 21.975367 52.683222 55.370858 0 33.255994-20.998891 55.519654-52.692522 55.519654-31.544835 0-63.191968-22.27296-63.191968-55.519654 0-33.39549 31.647133-55.370858 63.191968-55.370858zM285.323142 300.596612c-31.554135 0-63.405863-22.27296-63.405863-55.528953 0-33.39549 31.851728-55.370858 63.405863-55.370858 31.544835 0 52.543726 21.975367 52.543726 55.370858 0 33.255994-20.998891 55.519654-52.543726 55.519654z" ></path><path d="M1190.460898 655.8201c0-177.393199-168.400317-321.986094-357.557732-321.986094-200.289244 0-358.04132 144.592894-358.041319 321.986094 0 177.700092 157.752075 321.976794 358.041319 321.976794 41.923384 0 84.237358-11.159729 126.328138-22.27296l115.447401 66.651484-31.656433-110.881212c84.507051-66.80958 147.438625-155.417832 147.438626-255.474106z m-473.618918-55.519654c-20.961692 0-42.127979-21.966067-42.127978-44.387824 0-22.114864 21.166287-44.369224 42.127978-44.369224 31.823828 0 52.683223 22.25436 52.683223 44.369224 0 22.412457-20.859394 44.387824-52.683223 44.387824z m231.536487 0c-20.831495 0-41.830386-21.966067-41.830386-44.387824 0-22.114864 20.998891-44.369224 41.830386-44.369224 31.544835 0 52.683223 22.25436 52.683223 44.369224 0 22.412457-21.138388 44.387824-52.683223 44.387824z" ></path></symbol><symbol id="icontree" viewBox="0 0 1024 1024"><path d="M1013.672852 719.902588c6.861318 7.876921 10.291977 17.065329 10.291977 27.565225v236.331617c0 11.379552-3.430659 20.791872-10.291977 28.228965-6.861318 7.437093-15.250039 11.155639-25.158165 11.155639H782.651159c-9.156421 0-17.161292-3.718546-24.022609-11.155639-6.861318-7.437093-10.291977-16.849414-10.291977-28.228965V747.467813c0-6.997265 1.519406-13.562698 4.574212-19.688304 3.054806-6.125605 7.245168-10.939724 12.579083-14.442355a30.707996 30.707996 0 0 1 17.161291-5.253946h77.7696V551.840284a30.707996 30.707996 0 0 0-3.438656-14.442354 28.540843 28.540843 0 0 0-9.140427-10.499896 21.703516 21.703516 0 0 0-12.579083-3.934462h-291.645995v185.119636h77.7696c9.148424 0 17.153295 3.934462 24.02261 11.81938 6.861318 7.876921 10.291977 17.065329 10.291976 27.565225v236.331617c0 7.005262-1.527403 13.562698-4.582208 19.696301-3.038812 6.125605-7.237171 10.939724-12.579083 14.442354a30.707996 30.707996 0 0 1-17.153295 5.245949H415.522671a30.707996 30.707996 0 0 1-17.153295-5.245949c-5.341912-3.502631-9.724199-8.316749-13.154858-14.442354a39.664495 39.664495 0 0 1-5.149987-19.696301V747.467813c0-10.499896 3.438656-19.688304 10.299974-27.565225 6.861318-7.884918 15.250039-11.81938 25.158166-11.81938h76.626046v-185.127633h-303.081524c-7.621021 0-13.914561 2.846887-18.864626 8.540662-4.958062 5.685777-7.437093 12.475123-7.437093 20.344047v156.242924h77.777597c9.908127 0 18.104923 3.934462 24.58239 11.81938 6.477468 7.876921 9.724199 17.065329 9.724199 27.565225v236.331617c0 11.379552-3.238734 20.791872-9.724199 28.228965-6.477468 7.437093-14.674264 11.155639-24.58239 11.155639H34.671547c-3.806512 0-7.437093-0.655744-10.859755-1.967231a32.787183 32.787183 0 0 1-9.148424-5.253946 37.249439 37.249439 0 0 1-7.437093-8.532664 41.471789 41.471789 0 0 1-5.14199-11.15564 44.510601 44.510601 0 0 1-1.719328-12.475123V747.467813c0-3.494634 0.38385-6.997265 1.143553-10.499896a31.587652 31.587652 0 0 1 3.430659-9.196405c1.519406-2.622975 3.430659-5.245949 5.717765-7.868924 2.287106-2.630972 4.574212-4.814118 6.861318-6.565434 2.287106-1.759312 4.958062-3.062803 8.004871-3.942458 3.054806-0.879656 6.101615-1.311487 9.148424-1.311488h77.777596V492.759379c0-7.876921 2.479031-14.65827 7.437093-20.344048 4.950065-5.693774 10.859755-8.540661 17.721073-8.540661h354.541408V316.836148h-76.626046c-9.916124 0-18.296848-3.934462-25.158166-11.811383a40.704089 40.704089 0 0 1-10.291977-27.573222V41.103932c0-11.379552 3.430659-21.007788 10.291977-28.884709 6.861318-7.876921 15.250039-11.811383 25.158166-11.811382h205.863527c6.101615 0 11.81938 1.967231 17.153295 5.909689a41.343839 41.343839 0 0 1 12.579083 15.098099c3.054806 6.125605 4.582209 12.691039 4.582208 19.688303v236.331618c0 10.499896-3.438656 19.696301-10.291976 27.573221-6.869315 7.876921-14.874186 11.811383-24.02261 11.811383h-77.7696v147.054516h341.962326c7.629018 0 13.914561 2.83889 18.872623 8.532665 4.958062 5.685777 7.437093 12.475123 7.437093 20.352044v215.315832h76.626047c9.908127 0 18.296848 3.934462 25.158165 11.81938z" ></path></symbol><symbol id="iconzip" viewBox="0 0 1024 1024"><path d="M628.207818 934.314264c1.4239 0.063995 2.783804 0.191986 4.215703 0.191987h321.841339c37.685347-0.039997 68.235195-29.413929 68.267193-65.675376V151.185405c-0.031998-36.253447-30.581847-65.627379-68.267193-65.667376H632.423521c-1.431899 0-2.823801 0.127991-4.215703 0.191986V0.036048L0.036048 80.686369v859.187504l628.17177 82.730175v-88.289784z m0-810.838908c1.391902-0.191986 2.783804-0.415971 4.215703-0.41597h321.841339c16.142863 0 29.269939 12.623111 29.269939 28.158017v717.653469c-0.023998 15.534906-13.119076 28.134019-29.269939 28.150018H632.423521c-1.431899 0-2.823801-0.223984-4.215703-0.41597V123.475356zM242.115003 606.049378l-149.757456-3.679741V578.955286l90.393636-133.374609v-1.183917l-82.122218 1.311908v-36.07746l140.022141-3.519752v26.110161L149.593517 566.076192v1.151919l92.521486 1.407901v37.421365z m75.346695 1.84787l-46.580721-1.151919V405.375508l46.580721-1.151919v203.673659z m178.027465-93.049449c-17.342779 15.374917-42.820985 22.078445-72.15492 21.886459-5.615605 0.031998-11.21521-0.319977-16.774819-1.047926v74.41876l-47.972622-1.183916V405.951467c14.814957-2.815802 35.781481-5.175636 65.739371-5.943582 30.701838-0.767946 52.860278 4.311696 67.835224 15.302923 14.454982 10.447264 24.254292 27.998029 24.254292 48.892557s-7.407478 38.661278-20.894529 50.644434h-0.031997zM426.885993 435.605379c-6.847518-0.079994-13.679037 0.663953-20.326569 2.199845v61.451673c4.183705 0.927935 9.335343 1.215914 16.47884 1.215915 26.406141-0.031998 42.876981-12.911091 42.876981-34.509571 0-19.398634-14.175002-30.741835-38.997254-30.325864l-0.031998-0.031998z m318.753556-296.507123h76.506613v30.357863h-76.506613v-30.357863z m-76.538611 45.436801h76.506613v30.39786h-76.506613v-30.39786z m76.538611 49.724499h76.506613v30.38986h-76.506613V234.259556z m0 95.993241h76.506613v30.349863h-76.506613V330.252797z m-76.538611-48.764566h76.506613v30.357862h-76.506613v-30.357862z m75.770665 376.485491c20.094585 0 39.365228-7.679459 53.572228-21.358496 14.207-13.663038 22.182438-32.205732 22.174439-51.532372l-13.983016-122.095403c0-40.261165-19.934596-72.890868-61.795648-72.890868-41.853053 0-61.755652 32.629703-61.755652 72.890868l-14.015013 122.095403c-0.007999 19.334639 7.967439 37.877333 22.182438 51.548371 14.214999 13.679037 33.493642 21.350497 53.596226 21.342497h0.023998z m-25.078234-133.990566h50.156469v101.936823h-50.156469V523.999155z" ></path></symbol></svg>',h=(c=document.getElementsByTagName("script"))[c.length-1].getAttribute("data-injectcss");if(h&&!i.__iconfont__svg__cssinject__){i.__iconfont__svg__cssinject__=!0;try{document.write("<style>.svgfont {display: inline-block;width: 1em;height: 1em;fill: currentColor;vertical-align: -0.1em;font-size:16px;}</style>")}catch(c){console&&console.log(c)}}!function(c){if(document.addEventListener)if(~["complete","loaded","interactive"].indexOf(document.readyState))setTimeout(c,0);else{var h=function(){document.removeEventListener("DOMContentLoaded",h,!1),c()};document.addEventListener("DOMContentLoaded",h,!1)}else document.attachEvent&&(o=c,v=i.document,a=!1,(t=function(){try{v.documentElement.doScroll("left")}catch(c){return void setTimeout(t,50)}l()})(),v.onreadystatechange=function(){"complete"==v.readyState&&(v.onreadystatechange=null,l())});function l(){a||(a=!0,o())}var o,v,a,t}(function(){var c,h;(c=document.createElement("div")).innerHTML=l,l=null,(h=c.getElementsByTagName("svg")[0])&&(h.setAttribute("aria-hidden","true"),h.style.position="absolute",h.style.width=0,h.style.height=0,h.style.overflow="hidden",function(c,h){h.firstChild?function(c,h){h.parentNode.insertBefore(c,h)}(c,h.firstChild):h.appendChild(c)}(h,document.body))})}(window); |
// Copyright (c) 2021, Framras AS-Izmir and contributors
// For license information, please see license.txt
frappe.ui.form.on('UBL TR Temperature', {
// refresh: function(frm) {
// }
});
|
class Content extends React.Component {
static get propTypes() {
return {
children: React.PropTypes.object
};
}
constructor(props) {
super(props);
}
render() {
return (
<div className="content">
{ this.props.children && React.cloneElement(this.props.children, {})
}
</div>
);
}
}
export default Content;
|
import React from "react";
import { withStyles } from "@material-ui/styles";
import { withRouter } from "react-router-dom";
import AlertBox from "../../../../../common/AlertBox";
import StyledButton from "../../../../../common/StyledButton";
import { useStyles } from "./styles";
import MetamaskFlow from "./MetamaskFlow";
import Routes from "../../../../../../utility/constants/Routes";
const ExpiredSession = ({
classes,
handleComplete,
metamask,
groupInfo,
history,
handlePurchaseError,
isServiceAvailable,
}) => {
const handleAddPayment = () => {
history.push(`/${Routes.USER_PROFILE}`);
};
if (metamask) {
return (
<MetamaskFlow
handleContinue={handleComplete}
classes={classes}
groupInfo={groupInfo}
handlePurchaseError={handlePurchaseError}
isServiceAvailable={isServiceAvailable}
/>
);
}
return (
<div className={classes.ExpiredSessionContainer}>
<AlertBox
type="warning"
message="You have used all your free quota for this service. Please add a payment method to continue using this service. "
/>
<StyledButton type="blue" btnText="add payment" onClick={handleAddPayment} />
</div>
);
};
export default withRouter(withStyles(useStyles)(ExpiredSession));
|
// 全局 CSS
// 打包时会被自动抽取并整合到 extract.all.[hash].css
// 引用方法: 无需引用,会自动注入到模板中
import './global.less';
// Critical 过程
const doCricital = () => {
if (window && window.__IS_CLITICAL_INITED__) return true;
// 检查 UA / 客户端环境
{
let platform = 'not-specified';
const iOSversion = () => {
if (/iP(hone|od|ad)/.test(navigator.platform)) {
// supports iOS 2.0 and later: <http://bit.ly/TJjs1V>
var v = navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);
return [
parseInt(v[1], 10),
parseInt(v[2], 10),
parseInt(v[3] || 0, 10)
];
}
};
if (typeof navigator === 'object') {
const UA = navigator.userAgent;
if (/Android|HTC/i.test(UA)) {
window.isMobile = true;
platform = 'android';
} else if (/iPad/i.test(UA)) {
// iPad
window.isMobile = true;
window.isIOS = true;
platform = 'ios';
} else if (/iPod|iPhone/i.test(UA)) {
// iPhone
window.isMobile = true;
window.isIOS = true;
platform = 'ios';
} else if (/Mobile/i.test(UA) && /Safari/i.test(UA)) {
// general iOS
window.isMobile = true;
window.isIOS = true;
platform = 'ios';
}
if (/UCBrowser/.test(UA)) {
window.isUC = true;
}
const thisIOSversion = iOSversion();
window.iOSversion = Array.isArray(thisIOSversion)
? thisIOSversion[0]
: undefined;
if (Array.isArray(thisIOSversion) && thisIOSversion[0] < 10) {
window.isMobile = true;
window.isIOS = true;
window.isOldIOS = true;
}
window.isAlipay =
/AlipayChannelId/.test(UA) ||
/AlipayDefined/.test(UA) ||
/AliApp/.test(UA) ||
/AlipayClient/.test(UA);
window.isAliPay = window.isAlipay;
window.isWechat = /MicroMessenger/.test(UA);
window.isWeChat = window.isWechat;
window.isWX = window.isWechat;
window.isWx = window.isWechat;
}
// 根据 UA / 客户端环境,<HTML> 添加 class
if (__DEV__) document.documentElement.classList.add('is-dev');
if (window.isMobile)
document.documentElement.classList.add('is-mobile');
if (platform)
document.documentElement.classList.add('platform-' + platform);
}
// DOM ready 时
document.addEventListener('DOMContentLoaded', function() {
// 检查 WebP 支持
{
const canUseWebP = () => {
var elem = document.createElement('canvas');
if (elem.getContext && elem.getContext('2d')) {
// was able or not to get WebP representation
return (
elem
.toDataURL('image/webp')
.indexOf('data:image/webp') === 0
);
} else {
// very old browser like IE 8, canvas not supported
return false;
}
};
// 如果支持 webp,<HTML> 添加 class
if (canUseWebP()) document.documentElement.classList.add('webp');
}
// online / offline
{
const doOnline = () => {
// console.log('online')
document.documentElement.classList.remove('is-offline');
};
const doOffline = () => {
// console.log('offline')
document.documentElement.classList.add('is-offline');
};
window.addEventListener('online', doOnline);
window.addEventListener('offline', doOffline);
if (navigator.onLine === false) doOffline();
}
});
window.__IS_CLITICAL_INITED__ = true;
};
doCricital();
|
var searchData=
[
['unite_1407',['unite',['../class_qwt_interval.html#a5e67ab7a363a6eafce33899e7cb14aac',1,'QwtInterval']]],
['updateaxes_1408',['updateAxes',['../class_qwt_plot.html#a1fb2dbc3697a66024d48c08b1d18f8a5',1,'QwtPlot']]],
['updatecanvasmargins_1409',['updateCanvasMargins',['../class_qwt_plot.html#aef8e679c64cf3158466ab33e7774f264',1,'QwtPlot']]],
['updatedisplay_1410',['updateDisplay',['../class_qwt_picker.html#a03aa9bf28f991473d564a57d1bf3bdcc',1,'QwtPicker']]],
['updateinterval_1411',['updateInterval',['../class_qwt_slider.html#a8850367244c1cee2a054700672a223c6',1,'QwtSlider::updateInterval()'],['../class_qwt_wheel.html#a5990d998c1063306eef8a5bb488fafad',1,'QwtWheel::updateInterval()']]],
['updatelayout_1412',['updateLayout',['../class_qwt_plot.html#ad470068832406086d6823109d8d7f050',1,'QwtPlot']]],
['updatelegend_1413',['updateLegend',['../class_qwt_abstract_legend.html#aa9fc80c9e1dcbcfef51b96a3bff268ca',1,'QwtAbstractLegend::updateLegend()'],['../class_qwt_legend.html#a0a294317170adf5c271c1ce243f66a87',1,'QwtLegend::updateLegend()'],['../class_qwt_plot.html#a9c4242c89decd06f3d35b66568ad69c9',1,'QwtPlot::updateLegend()'],['../class_qwt_plot.html#a9bb681bc692ed8f35c32174ffe98dca9',1,'QwtPlot::updateLegend(const QwtPlotItem *)'],['../class_qwt_plot_item.html#af0c4272375b1ee95a1454c4c503ff324',1,'QwtPlotItem::updateLegend()'],['../class_qwt_plot_legend_item.html#a5bfda08242671a2d9d02b7bfc558926d',1,'QwtPlotLegendItem::updateLegend()']]],
['updateoverlay_1414',['updateOverlay',['../class_qwt_widget_overlay.html#a231231eebaf7655f8264d2ee2b03127c',1,'QwtWidgetOverlay']]],
['updatescalediv_1415',['updateScaleDiv',['../class_qwt_plot_grid.html#a2dfc8ae2a7b2f21326d432db3e3856da',1,'QwtPlotGrid::updateScaleDiv()'],['../class_qwt_plot_item.html#abf6a70847d3db952161ca4d4a952eea0',1,'QwtPlotItem::updateScaleDiv()'],['../class_qwt_plot_scale_item.html#a9c32bac1ff73c6527305698792a6edfe',1,'QwtPlotScaleItem::updateScaleDiv()'],['../class_qwt_plot_series_item.html#a890792d0f44e341812b5283c249608b2',1,'QwtPlotSeriesItem::updateScaleDiv()']]],
['updatescales_1416',['updateScales',['../class_qwt_plot_rescaler.html#aaead8df76bb22831577fd11ed6d46e5a',1,'QwtPlotRescaler']]],
['updatestate_1417',['updateState',['../class_qwt_graphic.html#aa63b1055a8c8a5f6989c926c71b9e5b4',1,'QwtGraphic::updateState()'],['../class_qwt_null_paint_device.html#a73244bfbecba932af1b105cfe3cf4f2d',1,'QwtNullPaintDevice::updateState()']]],
['updatestylesheetinfo_1418',['updateStyleSheetInfo',['../class_qwt_plot_canvas.html#a00cf0a23416a719cb8b742fca074c681',1,'QwtPlotCanvas']]],
['updatewidget_1419',['updateWidget',['../class_qwt_legend.html#a96d3546878914d04df4770699deb3cd3',1,'QwtLegend']]],
['upperbound_1420',['upperBound',['../class_qwt_abstract_scale.html#ae5696dae4e4cc4332a84453a0ce18cc8',1,'QwtAbstractScale::upperBound()'],['../class_qwt_scale_div.html#a5378d436a44ca78294e4d421228e5b6c',1,'QwtScaleDiv::upperBound()']]],
['uppermargin_1421',['upperMargin',['../class_qwt_scale_engine.html#a7d135f0cd49cf9e8616a4d3cf27cd7b3',1,'QwtScaleEngine']]],
['usedcolor_1422',['usedColor',['../class_qwt_text.html#a19bc6e3baa215dccab7993cd211ed975',1,'QwtText']]],
['usedfont_1423',['usedFont',['../class_qwt_text.html#affd35b4cd92e45659b895c5614e3eedd',1,'QwtText']]],
['usercurve_1424',['UserCurve',['../class_qwt_plot_curve.html#a15998aa80a11ba6ba80eebabaf773f70a7d8b49e6cead1de23860e1c68d17dee3',1,'QwtPlotCurve::UserCurve()'],['../class_qwt_plot_interval_curve.html#aaef834575b923e1b317f4a86b2d97cd2a0ba2b869afe22c1213d7e34590775b0e',1,'QwtPlotIntervalCurve::UserCurve()']]],
['userrubberband_1425',['UserRubberBand',['../class_qwt_picker.html#ab36c79d8ff20aba5b778d2823c1f7894a96f40f8cc50bd940f0338a68ba159b8e',1,'QwtPicker']]],
['userstyle_1426',['UserStyle',['../class_qwt_column_symbol.html#aaace508375eef3ee23ed6c47b1d65ef2aa9a5f984f62fb53ce3eeea35be3b0536',1,'QwtColumnSymbol::UserStyle()'],['../class_qwt_plot_histogram.html#a3ba21c3aef994daf7b848ccf71b0dbc5a586b4f119cfbfe62de143c836227c06e',1,'QwtPlotHistogram::UserStyle()'],['../class_qwt_symbol.html#a62f457952470c2076962e83ef2c24d2faed4c49ccbda1c85bdc6ea399e8d8cca8',1,'QwtSymbol::UserStyle()']]],
['usersymbol_1427',['UserSymbol',['../class_qwt_interval_symbol.html#a8fe960fd50b3ad08765ef8bb632ad77ea40c2cb30f61f7ad63ff20482efd0e7b0',1,'QwtIntervalSymbol::UserSymbol()'],['../class_qwt_plot_trading_curve.html#af1ca10dd8c3f1ef662d40fc8a113b44aadd5f8436afcc44afe7b6204a7e1329c1',1,'QwtPlotTradingCurve::UserSymbol()']]],
['utcoffset_1428',['utcOffset',['../class_qwt_date.html#aeadce3496f631eae3a7e54749078c7a4',1,'QwtDate::utcOffset()'],['../class_qwt_date_scale_draw.html#a33d3fabed24c377852c5fec278018236',1,'QwtDateScaleDraw::utcOffset()'],['../class_qwt_date_scale_engine.html#abf679a002385bc9c56f3411d2b7de207',1,'QwtDateScaleEngine::utcOffset()']]],
['utriangle_1429',['UTriangle',['../class_qwt_symbol.html#a62f457952470c2076962e83ef2c24d2fabf99d9afabd98be69e2ee377bbfa85bf',1,'QwtSymbol']]]
];
|
mycallback( {"CONTRIBUTOR OCCUPATION": "Communications Representative", "CONTRIBUTION AMOUNT (F3L Bundled)": "69.24", "ELECTION CODE": "", "MEMO CODE": "", "CONTRIBUTOR EMPLOYER": "INT'L ASSOCIATION OF MACHINISTS", "DONOR CANDIDATE STATE": "", "CONTRIBUTOR STREET 1": "2400 SOUTH GLEBE ROAD #708", "CONTRIBUTOR MIDDLE NAME": "S", "DONOR CANDIDATE FEC ID": "", "DONOR CANDIDATE MIDDLE NAME": "", "CONTRIBUTOR STATE": "VA", "DONOR CANDIDATE FIRST NAME": "", "CONTRIBUTOR FIRST NAME": "JOHN", "BACK REFERENCE SCHED NAME": "", "DONOR CANDIDATE DISTRICT": "", "CONTRIBUTION DATE": "20110430", "DONOR COMMITTEE NAME": "", "MEMO TEXT/DESCRIPTION": "P/R Deduction ($17.31 Weekly)", "Reference to SI or SL system code that identifies the Account": "", "FILER COMMITTEE ID NUMBER": "C00002469", "DONOR CANDIDATE LAST NAME": "", "CONTRIBUTOR LAST NAME": "LETT", "_record_type": "fec.version.v7_0.SA", "CONDUIT STREET2": "", "CONDUIT STREET1": "", "DONOR COMMITTEE FEC ID": "", "CONTRIBUTION PURPOSE DESCRIP": "", "CONTRIBUTOR ZIP": "22206", "CONTRIBUTOR STREET 2": "", "CONDUIT CITY": "", "ENTITY TYPE": "IND", "CONTRIBUTOR CITY": "ARLINGTON", "CONTRIBUTOR SUFFIX": "", "TRANSACTION ID": "PR969880225012", "DONOR CANDIDATE SUFFIX": "", "DONOR CANDIDATE OFFICE": "", "CONTRIBUTION PURPOSE CODE": "15", "ELECTION OTHER DESCRIPTION": "", "_src_file": "2011/20110504/727386.fec_2.yml", "CONDUIT STATE": "", "CONTRIBUTOR ORGANIZATION NAME": "", "BACK REFERENCE TRAN ID NUMBER": "", "DONOR CANDIDATE PREFIX": "", "CONTRIBUTOR PREFIX": "", "CONDUIT ZIP": "", "CONDUIT NAME": "", "CONTRIBUTION AGGREGATE F3L Semi-annual Bundled": "281.96", "FORM TYPE": "SA11ai"});
mycallback( {"CONTRIBUTOR OCCUPATION": "Communications Representative", "CONTRIBUTION AMOUNT (F3L Bundled)": "69.24", "ELECTION CODE": "", "MEMO CODE": "", "CONTRIBUTOR EMPLOYER": "INT'L ASSOCIATION OF MACHINISTS", "DONOR CANDIDATE STATE": "", "CONTRIBUTOR STREET 1": "2400 SOUTH GLEBE ROAD #708", "CONTRIBUTOR MIDDLE NAME": "S", "DONOR CANDIDATE FEC ID": "", "DONOR CANDIDATE MIDDLE NAME": "", "CONTRIBUTOR STATE": "VA", "DONOR CANDIDATE FIRST NAME": "", "CONTRIBUTOR FIRST NAME": "JOHN", "BACK REFERENCE SCHED NAME": "", "DONOR CANDIDATE DISTRICT": "", "CONTRIBUTION DATE": "20110430", "DONOR COMMITTEE NAME": "", "MEMO TEXT/DESCRIPTION": "P/R Deduction ($17.31 Weekly)", "Reference to SI or SL system code that identifies the Account": "", "FILER COMMITTEE ID NUMBER": "C00002469", "DONOR CANDIDATE LAST NAME": "", "CONTRIBUTOR LAST NAME": "LETT", "_record_type": "fec.version.v7_0.SA", "CONDUIT STREET2": "", "CONDUIT STREET1": "", "DONOR COMMITTEE FEC ID": "", "CONTRIBUTION PURPOSE DESCRIP": "", "CONTRIBUTOR ZIP": "22206", "CONTRIBUTOR STREET 2": "", "CONDUIT CITY": "", "ENTITY TYPE": "IND", "CONTRIBUTOR CITY": "ARLINGTON", "CONTRIBUTOR SUFFIX": "", "TRANSACTION ID": "PR969880225012", "DONOR CANDIDATE SUFFIX": "", "DONOR CANDIDATE OFFICE": "", "CONTRIBUTION PURPOSE CODE": "15", "ELECTION OTHER DESCRIPTION": "", "_src_file": "2011/20110504/727386.fec_2.yml", "CONDUIT STATE": "", "CONTRIBUTOR ORGANIZATION NAME": "", "BACK REFERENCE TRAN ID NUMBER": "", "DONOR CANDIDATE PREFIX": "", "CONTRIBUTOR PREFIX": "", "CONDUIT ZIP": "", "CONDUIT NAME": "", "CONTRIBUTION AGGREGATE F3L Semi-annual Bundled": "281.96", "FORM TYPE": "SA11ai"});
|
import _extends from "@babel/runtime/helpers/esm/extends";
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
import _createClass from "@babel/runtime/helpers/esm/createClass";
import _inherits from "@babel/runtime/helpers/esm/inherits";
import _possibleConstructorReturn from "@babel/runtime/helpers/esm/possibleConstructorReturn";
import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
var _excluded = ["theme", "className", "color"];
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
import React, { PureComponent } from 'react';
import PropTypes from 'prop-types';
import cx from 'classnames';
import { withTheme } from '../../theme';
import Text from './Text';
var Link = /*#__PURE__*/function (_PureComponent) {
_inherits(Link, _PureComponent);
var _super = _createSuper(Link);
function Link() {
_classCallCheck(this, Link);
return _super.apply(this, arguments);
}
_createClass(Link, [{
key: "render",
value: function render() {
var _this$props = this.props,
theme = _this$props.theme,
className = _this$props.className,
color = _this$props.color,
props = _objectWithoutProperties(_this$props, _excluded);
var themedClassName = theme.getLinkClassName(color);
return /*#__PURE__*/React.createElement(Text, _extends({
is: "a",
className: cx(className, themedClassName),
textDecoration: "underline",
color: null
}, props));
}
}]);
return Link;
}(PureComponent);
Link.displayName = "Link";
_defineProperty(Link, "propTypes", _objectSpread(_objectSpread({}, Text.propTypes), {}, {
/**
* This attribute names a relationship of the linked document to the current document.
* Common use case is: rel="noopener noreferrer".
*/
rel: PropTypes.string,
/**
* Specifies the URL of the linked resource. A URL might be absolute or relative.
*/
href: PropTypes.string,
/**
* Target atrribute, common use case is target="_blank."
*/
target: PropTypes.string,
/**
* The color (and styling) of the Link. Can be default, blue, green or neutral.
*/
color: PropTypes.string.isRequired,
/**
* Theme provided by ThemeProvider.
*/
theme: PropTypes.object.isRequired,
/**
* Class name passed to the link.
* Only use if you know what you are doing.
*/
className: PropTypes.string
}));
_defineProperty(Link, "defaultProps", {
color: 'default'
});
export default withTheme(Link);
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJSZWFjdCIsIlB1cmVDb21wb25lbnQiLCJQcm9wVHlwZXMiLCJjeCIsIndpdGhUaGVtZSIsIlRleHQiLCJMaW5rIiwicHJvcHMiLCJ0aGVtZSIsImNsYXNzTmFtZSIsImNvbG9yIiwidGhlbWVkQ2xhc3NOYW1lIiwiZ2V0TGlua0NsYXNzTmFtZSIsInByb3BUeXBlcyIsInJlbCIsInN0cmluZyIsImhyZWYiLCJ0YXJnZXQiLCJpc1JlcXVpcmVkIiwib2JqZWN0Il0sInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL3R5cG9ncmFwaHkvc3JjL0xpbmsuanMiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IFJlYWN0LCB7IFB1cmVDb21wb25lbnQgfSBmcm9tICdyZWFjdCdcbmltcG9ydCBQcm9wVHlwZXMgZnJvbSAncHJvcC10eXBlcydcbmltcG9ydCBjeCBmcm9tICdjbGFzc25hbWVzJ1xuaW1wb3J0IHsgd2l0aFRoZW1lIH0gZnJvbSAnLi4vLi4vdGhlbWUnXG5pbXBvcnQgVGV4dCBmcm9tICcuL1RleHQnXG5cbmNsYXNzIExpbmsgZXh0ZW5kcyBQdXJlQ29tcG9uZW50IHtcbiAgc3RhdGljIHByb3BUeXBlcyA9IHtcbiAgICAuLi5UZXh0LnByb3BUeXBlcyxcblxuICAgIC8qKlxuICAgICAqIFRoaXMgYXR0cmlidXRlIG5hbWVzIGEgcmVsYXRpb25zaGlwIG9mIHRoZSBsaW5rZWQgZG9jdW1lbnQgdG8gdGhlIGN1cnJlbnQgZG9jdW1lbnQuXG4gICAgICogQ29tbW9uIHVzZSBjYXNlIGlzOiByZWw9XCJub29wZW5lciBub3JlZmVycmVyXCIuXG4gICAgICovXG4gICAgcmVsOiBQcm9wVHlwZXMuc3RyaW5nLFxuXG4gICAgLyoqXG4gICAgICogU3BlY2lmaWVzIHRoZSBVUkwgb2YgdGhlIGxpbmtlZCByZXNvdXJjZS4gQSBVUkwgbWlnaHQgYmUgYWJzb2x1dGUgb3IgcmVsYXRpdmUuXG4gICAgICovXG4gICAgaHJlZjogUHJvcFR5cGVzLnN0cmluZyxcblxuICAgIC8qKlxuICAgICAqIFRhcmdldCBhdHJyaWJ1dGUsIGNvbW1vbiB1c2UgY2FzZSBpcyB0YXJnZXQ9XCJfYmxhbmsuXCJcbiAgICAgKi9cbiAgICB0YXJnZXQ6IFByb3BUeXBlcy5zdHJpbmcsXG5cbiAgICAvKipcbiAgICAgKiBUaGUgY29sb3IgKGFuZCBzdHlsaW5nKSBvZiB0aGUgTGluay4gQ2FuIGJlIGRlZmF1bHQsIGJsdWUsIGdyZWVuIG9yIG5ldXRyYWwuXG4gICAgICovXG4gICAgY29sb3I6IFByb3BUeXBlcy5zdHJpbmcuaXNSZXF1aXJlZCxcblxuICAgIC8qKlxuICAgICAqIFRoZW1lIHByb3ZpZGVkIGJ5IFRoZW1lUHJvdmlkZXIuXG4gICAgICovXG4gICAgdGhlbWU6IFByb3BUeXBlcy5vYmplY3QuaXNSZXF1aXJlZCxcblxuICAgIC8qKlxuICAgICAqIENsYXNzIG5hbWUgcGFzc2VkIHRvIHRoZSBsaW5rLlxuICAgICAqIE9ubHkgdXNlIGlmIHlvdSBrbm93IHdoYXQgeW91IGFyZSBkb2luZy5cbiAgICAgKi9cbiAgICBjbGFzc05hbWU6IFByb3BUeXBlcy5zdHJpbmdcbiAgfVxuXG4gIHN0YXRpYyBkZWZhdWx0UHJvcHMgPSB7XG4gICAgY29sb3I6ICdkZWZhdWx0J1xuICB9XG5cbiAgcmVuZGVyKCkge1xuICAgIGNvbnN0IHsgdGhlbWUsIGNsYXNzTmFtZSwgY29sb3IsIC4uLnByb3BzIH0gPSB0aGlzLnByb3BzXG5cbiAgICBjb25zdCB0aGVtZWRDbGFzc05hbWUgPSB0aGVtZS5nZXRMaW5rQ2xhc3NOYW1lKGNvbG9yKVxuXG4gICAgcmV0dXJuIChcbiAgICAgIDxUZXh0XG4gICAgICAgIGlzPVwiYVwiXG4gICAgICAgIGNsYXNzTmFtZT17Y3goY2xhc3NOYW1lLCB0aGVtZWRDbGFzc05hbWUpfVxuICAgICAgICB0ZXh0RGVjb3JhdGlvbj1cInVuZGVybGluZVwiXG4gICAgICAgIGNvbG9yPXtudWxsfVxuICAgICAgICB7Li4ucHJvcHN9XG4gICAgICAvPlxuICAgIClcbiAgfVxufVxuXG5leHBvcnQgZGVmYXVsdCB3aXRoVGhlbWUoTGluaylcbiJdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBQUEsT0FBT0EsS0FBUCxJQUFnQkMsYUFBaEIsUUFBcUMsT0FBckM7QUFDQSxPQUFPQyxTQUFQLE1BQXNCLFlBQXRCO0FBQ0EsT0FBT0MsRUFBUCxNQUFlLFlBQWY7QUFDQSxTQUFTQyxTQUFULFFBQTBCLGFBQTFCO0FBQ0EsT0FBT0MsSUFBUCxNQUFpQixRQUFqQjs7SUFFTUMsSTs7Ozs7Ozs7Ozs7OztXQXlDSixrQkFBUztNQUNQLGtCQUE4QyxLQUFLQyxLQUFuRDtNQUFBLElBQVFDLEtBQVIsZUFBUUEsS0FBUjtNQUFBLElBQWVDLFNBQWYsZUFBZUEsU0FBZjtNQUFBLElBQTBCQyxLQUExQixlQUEwQkEsS0FBMUI7TUFBQSxJQUFvQ0gsS0FBcEM7O01BRUEsSUFBTUksZUFBZSxHQUFHSCxLQUFLLENBQUNJLGdCQUFOLENBQXVCRixLQUF2QixDQUF4QjtNQUVBLG9CQUNFLG9CQUFDLElBQUQ7UUFDRSxFQUFFLEVBQUMsR0FETDtRQUVFLFNBQVMsRUFBRVAsRUFBRSxDQUFDTSxTQUFELEVBQVlFLGVBQVosQ0FGZjtRQUdFLGNBQWMsRUFBQyxXQUhqQjtRQUlFLEtBQUssRUFBRTtNQUpULEdBS01KLEtBTE4sRUFERjtJQVNEOzs7O0VBdkRnQk4sYTs7QUFBYkssSTs7Z0JBQUFBLEksK0NBRUNELElBQUksQ0FBQ1EsUztFQUVSO0FBQ0o7QUFDQTtBQUNBO0VBQ0lDLEdBQUcsRUFBRVosU0FBUyxDQUFDYSxNOztFQUVmO0FBQ0o7QUFDQTtFQUNJQyxJQUFJLEVBQUVkLFNBQVMsQ0FBQ2EsTTs7RUFFaEI7QUFDSjtBQUNBO0VBQ0lFLE1BQU0sRUFBRWYsU0FBUyxDQUFDYSxNOztFQUVsQjtBQUNKO0FBQ0E7RUFDSUwsS0FBSyxFQUFFUixTQUFTLENBQUNhLE1BQVYsQ0FBaUJHLFU7O0VBRXhCO0FBQ0o7QUFDQTtFQUNJVixLQUFLLEVBQUVOLFNBQVMsQ0FBQ2lCLE1BQVYsQ0FBaUJELFU7O0VBRXhCO0FBQ0o7QUFDQTtBQUNBO0VBQ0lULFNBQVMsRUFBRVAsU0FBUyxDQUFDYTs7O2dCQWxDbkJULEksa0JBcUNrQjtFQUNwQkksS0FBSyxFQUFFO0FBRGEsQzs7QUFxQnhCLGVBQWVOLFNBQVMsQ0FBQ0UsSUFBRCxDQUF4QiJ9 |
// const ZOOMRATIO = 2.5;
export default function (e, imageUrl) {
e.preventDefault();
// probably a lot faster to just set this as a state on style change
const i = new Image();
i.src = imageUrl;
// const imgWidth = i.width * ZOOMRATIO;
// const imgHeight = i.height * ZOOMRATIO;
const screenWidth = window.innerWidth;
const screenHeight = window.innerHeight;
const cursorX = e.clientX;
const cursorY = e.clientY;
// // this is key but each have to be really good
// let imgX = (screenWidth-imgWidth) * cursorX / (screenWidth);
// // this is key but each have to be really good
// let imgY = (screenWidth-imgWidth) * cursorY / (screenHeight);
const imgPctX = (100 * cursorX) / screenWidth;
const imgPctY = (100 * cursorY) / screenHeight;
const zoom = document.getElementById('zoom-photo');
zoom.style.backgroundImage = `url("${imageUrl}")`;
// zoom.style.backgroundSize = `${imgWidth-cursorX}px ${imgWidth-cursorY}px`;
zoom.style.backgroundPosition = `${imgPctX}% ${imgPctY}%`;
// console.log(`CursorXY: ${cursorX}, ${cursorY}`,
// `WidthHeight: ${imgWidth}, ${imgHeight}`,
// `ScreenXY: ${screenWidth}, ${screenHeight}`);
}
|
import {Apis} from "bitsharesjs-ws";
import idb_helper from "idb-helper";
import iDBRoot from "idb-root";
const DB_VERSION = 2; // Initial value was 1
const DB_PREFIX = "graphene_v2";
const WALLET_BACKUP_STORES = [
"wallet", "private_keys", "linked_accounts"
];
const MAIN_NET_CHAINID = "dfed6e6fb7a0a9d2211dad2f0bbce9196e72f61aee3999879d524f529612bb0c";
var current_wallet_name = "default";
var upgrade = function(db, oldVersion) {
// DEBUG console.log('... upgrade oldVersion',oldVersion)
if (oldVersion === 0) {
db.createObjectStore("wallet", { keyPath: "public_name" })
idb_helper.autoIncrement_unique(db, "private_keys", "pubkey")
db.createObjectStore("linked_accounts", { keyPath: "name" })
}
if (oldVersion < 2) {
// Cache only, do not backup...
db.createObjectStore("cached_properties", { keyPath: "name" })
}
}
/**
Everything in this class is scopped by the database name. This separates
data per-wallet and per-chain.
*/
var getDatabaseName = function(
current_wallet = current_wallet_name,
chain_id = __DEPRECATED__ ? MAIN_NET_CHAINID : Apis.instance().chain_id) {
return [
DB_PREFIX,
chain_id ? chain_id.substring(0, 6) : "",
current_wallet
].join("_")
}
var openDatabase = function(database_name = this.getDatabaseName()) {
return new Promise((resolve, reject) => {
var openRequest = iDB.impl.open(database_name, DB_VERSION);
openRequest.onupgradeneeded = function (e) {
// DEBUG console.log('... openRequest.onupgradeneeded ' + database_name)
// Don't resolve here, indexedDb will call onsuccess or onerror next
upgrade(e.target.result, e.oldVersion)
};
openRequest.onsuccess = function (e) {
// DEBUG console.log('... openRequest.onsuccess ' + database_name, e.target.result)
var db = e.target.result
iDB.database_name = database_name
idb_helper.set_graphene_db(db)
resolve(db);
};
openRequest.onerror = function (e) {
// DEBUG console.log("... openRequest.onerror " + database_name,e.target.error, e)
reject(e.target.error);
};
})
}
var iDB = (function () {
var _instance;
var idb;
/** Be carefull not to call twice especially for a new database
needing an upgrade...
*/
function openIndexedDB(chain_id) {
return iDB.root.getProperty("current_wallet", "default").then(current_wallet => {
current_wallet_name = current_wallet;
var database_name = getDatabaseName(current_wallet, chain_id);
return openDatabase(database_name);
});
}
function init(chain_id) {
let promise = openIndexedDB(chain_id);
promise.then(db => {
idb = db;
});
return {
init_promise: promise,
db: () => idb
};
}
return {
WALLET_BACKUP_STORES,
getDatabaseName: getDatabaseName,
getCurrentWalletName: ()=> current_wallet_name,
deleteDatabase: function(are_you_sure = false) {
if( ! are_you_sure) return "Are you sure?"
console.log("deleting", this.database_name)
var req = iDB.impl.deleteDatabase(this.database_name)
return req.result
},
set_impl: function(impl) {
this.impl = impl
this.root = new iDBRoot(this.impl)
},
set_chain_id: function(chain_id) {
this.chain_id = chain_id
var chain_substring = chain_id ? chain_id.substring(0, 6) : ""
this.root.setDbSuffix("_" + chain_substring)
},
init_instance: function (
indexedDBimpl,
chain_id = __DEPRECATED__ ? MAIN_NET_CHAINID : Apis.instance().chain_id
) {
if (!_instance) {
if(indexedDBimpl) {
this.set_impl( indexedDBimpl )
if("__useShim" in indexedDBimpl) {
this.impl.__useShim() //always use shim
}
}
this.set_chain_id(chain_id)
_instance = init(chain_id)
}
return _instance;
},
instance: function () {
if (!_instance) {
throw new Error("Internal Database instance is not initialized");
}
return _instance;
},
close: function () {
if (_instance && _instance.db()) _instance.db().close();
idb_helper.set_graphene_db(null);
_instance = undefined;
},
add_to_store: function (store_name, value) {
return new Promise((resolve, reject) => {
let transaction = this.instance().db().transaction([store_name], "readwrite");
let store = transaction.objectStore(store_name);
let request = store.add(value);
request.onsuccess = () => { resolve(value); };
request.onerror = (e) => {
console.log("ERROR!!! add_to_store - can't store value in db. ", e.target.error.message, value);
reject(e.target.error.message);
};
});
},
remove_from_store: function (store_name, value) {
return new Promise((resolve, reject) => {
let transaction = this.instance().db().transaction([store_name], "readwrite");
let store = transaction.objectStore(store_name);
let request = store.delete(value);
request.onsuccess = () => { resolve(); };
request.onerror = (e) => {
console.log("ERROR!!! remove_from_store - can't remove value from db. ", e.target.error.message, value);
reject(e.target.error.message);
};
});
},
clear_store: function (store_name){
return new Promise((resolve, reject) => {
let transaction = this.instance().db().transaction([store_name], "readwrite");
let store = transaction.objectStore(store_name);
let request = store.clear();
request.onsuccess = () => { resolve(); };
request.onerror = (e) => {
console.log("ERROR!!! clear_store - can't clear db. ", e.target.error.message, value);
reject(e.target.error.message);
};
});
},
load_data: function (store_name) {
return new Promise((resolve, reject) => {
let data = [];
let transaction = this.instance().db().transaction([store_name], "readonly");
let store = transaction.objectStore(store_name);
let request = store.openCursor();
//request.oncomplete = () => { resolve(data); };
request.onsuccess = e => {
let cursor = e.target.result;
if (cursor) {
data.push(cursor.value);
cursor.continue();
} else {
resolve(data);
}
};
request.onerror = (e) => {
console.log("ERROR!!! open_store - can't get '`${store_name}`' cursor. ", e.target.error.message);
reject(e.target.error.message);
};
});
},
/** Persisted to disk but not backed up.
@return promise
*/
getCachedProperty: function(name, default_value) {
var db = this.instance().db()
var transaction = db.transaction(["cached_properties"], "readonly")
var store = transaction.objectStore("cached_properties")
return idb_helper.on_request_end( store.get(name) ).then( event => {
var result = event.target.result
return result ? result.value : default_value
}).catch( error => { console.error(error); throw error })
},
/** Persisted to disk but not backed up. */
setCachedProperty: function(name, value) {
var db = this.instance().db()
var transaction = db.transaction(["cached_properties"], "readwrite")
var store = transaction.objectStore("cached_properties")
if(value && value["toJS"]) value = value.toJS() //Immutable-js
return idb_helper.on_request_end( store.put({name, value}) )
.catch( error => { console.error(error); throw error })
},
backup: function (store_names = WALLET_BACKUP_STORES) {
var promises = []
for (var store_name of store_names) {
promises.push(this.load_data(store_name))
}
//Add each store name
return Promise.all(promises).then( results => {
var obj = {}
for (let i = 0; i < store_names.length; i++) {
var store_name = store_names[i]
if( store_name === "wallet" ) {
var wallet_array = results[i]
// their should be only 1 wallet per database
for(let wallet of wallet_array)
wallet.backup_date = new Date().toISOString()
}
obj[store_name] = results[i]
}
return obj
})
},
restore: function(wallet_name, object) {
var database_name = getDatabaseName(wallet_name)
return openDatabase(database_name).then( db => {
var store_names = Object.keys(object)
var trx = db.transaction(store_names, "readwrite")
for(let store_name of store_names) {
var store = trx.objectStore(store_name)
var records = object[store_name]
for(let record of records) {
store.put(record)
}
}
return idb_helper.on_transaction_end(trx)
})
}
};
})();
export default iDB;
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.