code_text
stringlengths 604
999k
| repo_name
stringlengths 4
100
| file_path
stringlengths 4
873
| language
stringclasses 23
values | license
stringclasses 15
values | size
int32 1.02k
999k
|
---|---|---|---|---|---|
//-----------------------------------------------------------------------------
//
// <copyright file="CompressionOption.cs" company="Microsoft">
// Copyright (C) Microsoft Corporation. All rights reserved.
// </copyright>
//
// Description:
// CompressionOption enumeration is used as an aggregate mechanism to give users controls
// over Compression features.
//
// History:
// 07/14/2004: IgorBel: Initial creation. [Stubs Only]
//
//-----------------------------------------------------------------------------
namespace System.IO.Packaging
{
/// <summary>
/// This class is used to control Compression for package parts.
/// </summary>
public enum CompressionOption : int
{
/// <summary>
/// Compression is turned off in this mode.
/// </summary>
NotCompressed = -1,
/// <summary>
/// Compression is optimized for a resonable compromise between size and performance.
/// </summary>
Normal = 0,
/// <summary>
/// Compression is optimized for size.
/// </summary>
Maximum = 1,
/// <summary>
/// Compression is optimized for performance.
/// </summary>
Fast = 2 ,
/// <summary>
/// Compression is optimized for super performance.
/// </summary>
SuperFast = 3,
}
}
| mind0n/hive | Cache/Libs/net46/wpf/src/Base/System/IO/Packaging/CompressionOption.cs | C# | mit | 1,462 |
<?php
namespace SamIT\TransIP;
class ArrayOfTld implements \ArrayAccess, \Iterator, \Countable
{
/**
* @var Tld[] $ArrayOfTld
*/
protected $ArrayOfTld = null;
/**
* @param Tld[] $ArrayOfTld
*/
public function __construct(array $ArrayOfTld)
{
$this->ArrayOfTld = $ArrayOfTld;
}
/**
* @return Tld[]
*/
public function getArrayOfTld()
{
return $this->ArrayOfTld;
}
/**
* @param Tld[] $ArrayOfTld
* @return \SamIT\TransIP\ArrayOfTld
*/
public function setArrayOfTld(array $ArrayOfTld)
{
$this->ArrayOfTld = $ArrayOfTld;
return $this;
}
/**
* ArrayAccess implementation
*
* @param mixed $offset An offset to check for
* @return boolean true on success or false on failure
*/
public function offsetExists($offset)
{
return isset($this->ArrayOfTld[$offset]);
}
/**
* ArrayAccess implementation
*
* @param mixed $offset The offset to retrieve
* @return Tld
*/
public function offsetGet($offset)
{
return $this->ArrayOfTld[$offset];
}
/**
* ArrayAccess implementation
*
* @param mixed $offset The offset to assign the value to
* @param Tld $value The value to set
* @return void
*/
public function offsetSet($offset, $value)
{
if (!isset($offset)) {
$this->ArrayOfTld[] = $value;
} else {
$this->ArrayOfTld[$offset] = $value;
}
}
/**
* ArrayAccess implementation
*
* @param mixed $offset The offset to unset
* @return void
*/
public function offsetUnset($offset)
{
unset($this->ArrayOfTld[$offset]);
}
/**
* Iterator implementation
*
* @return Tld Return the current element
*/
public function current()
{
return current($this->ArrayOfTld);
}
/**
* Iterator implementation
* Move forward to next element
*
* @return void
*/
public function next()
{
next($this->ArrayOfTld);
}
/**
* Iterator implementation
*
* @return string|null Return the key of the current element or null
*/
public function key()
{
return key($this->ArrayOfTld);
}
/**
* Iterator implementation
*
* @return boolean Return the validity of the current position
*/
public function valid()
{
return $this->key() !== null;
}
/**
* Iterator implementation
* Rewind the Iterator to the first element
*
* @return void
*/
public function rewind()
{
reset($this->ArrayOfTld);
}
/**
* Countable implementation
*
* @return Tld Return count of elements
*/
public function count()
{
return count($this->ArrayOfTld);
}
}
| SAM-IT/transip-api | src/generated/ArrayOfTld.php | PHP | mit | 2,893 |
describe("the RegexLookup class", function() {
var regexLookup;
var string = "string";
var integer = 123;
beforeEach(function() {
regexLookup = new RegexLookup();
});
afterEach(function() {
delete regexLookup;
});
describe("the constructor function", function() {
/* Tests:
none - an empty dictionary member variable
*/
it("should create an empty lookup dictionary (js object) when called", function() {
expect(regexLookup._lookup instanceof Object).toEqual(true);
expect(Object.keys(regexLookup._lookup).length).toEqual(0);
});
});
describe("the add function", function() {
/* Tests:
string - RegExp
non-string (number) - RegExp
string (then overwrite with another string) - RegExp
*/
beforeEach(function() {
regexLookup = new RegexLookup();
});
afterEach(function() {
delete regexLookup;
});
it("should be able to add a string key to the lookup dict, and generate a RegExp", function() {
regexLookup.add(string);
var result = regexLookup._lookup[string];
expect(result).toEqual(new RegExp(string));
});
it("should be able to add a non-string key to the lookup dict, and generate a RegExp", function() {
regexLookup.add(integer);
var result = regexLookup._lookup[integer];
expect(result).toEqual(new RegExp(integer));
});
it("should overwrite a previous key with a new key, and generate an equivalent RegExp", function() {
var firstRegex = new RegExp(string);
var secondRegex = new RegExp(string);
regexLookup.add(string);
expect(regexLookup._lookup[string]).toEqual(firstRegex);
expect(Object.keys(regexLookup._lookup).length).toEqual(1);
regexLookup.add(string);
expect(regexLookup._lookup[string]).toEqual(secondRegex);
expect(Object.keys(regexLookup._lookup).length).toEqual(1);
expect(firstRegex).toEqual(secondRegex);
});
});
describe("the get function", function() {
/* Tests:
empty string - RegExp for the empty string
valid key - RegExp for the key
key not in lookup - RegExp for the key, and key added to lookup
*/
beforeEach(function() {
regexLookup = new RegexLookup();
});
afterEach(function() {
delete regexLookup;
});
it("should return the correct RegExp when given an empty key", function() {
var emptyString = "";
var result = regexLookup.get(emptyString);
expect(result).toEqual(regexLookup._lookup[emptyString]);
expect(result).not.toBeUndefined();
});
it("should return the correct RegExp when given a key for an element in the lookup dict", function() {
regexLookup.add(string);
var result = regexLookup._lookup[string];
expect(result).toEqual(regexLookup.get(string));
expect(result).not.toBeUndefined();
});
it("should return the correct RegExp when given a key for an element NOT in the lookup dict, and add the key to the lookup dict", function() {
var randomFloat = Math.random() * 100;
var result = regexLookup.get(randomFloat);
expect(result).toEqual(regexLookup._lookup[randomFloat]);
expect(result).not.toBeUndefined();
expect(randomFloat in regexLookup._lookup).toEqual(true);
});
});
describe("the remove function", function() {
/* Tests:
key present in lookup - lookup dict without key in it
key not in lookup - no changes/returns
*/
beforeEach(function() {
regexLookup = new RegexLookup();
});
afterEach(function() {
delete regexLookup;
});
it("should be able to remove a key from the lookup dict", function() {
regexLookup.add(string);
expect(regexLookup.get(string)).toEqual(regexLookup._lookup[string]);
expect(Object.keys(regexLookup._lookup).length).toEqual(1);
regexLookup.remove(string);
expect(regexLookup._lookup[string]).toBeUndefined();
expect(Object.keys(regexLookup._lookup).length).toEqual(0);
});
it("should have no effect when removing a key that isn't in the lookup dict", function() {
expect(Object.keys(regexLookup._lookup).length).toEqual(0);
regexLookup.remove(string);
expect(regexLookup._lookup[string]).toBeUndefined();
expect(Object.keys(regexLookup._lookup).length).toEqual(0);
});
});
}); | naschorr/Immobile | testing/spec/regex_lookup_test.js | JavaScript | mit | 4,144 |
using CacheCowDemo.Common;
using System;
using System.Collections.Generic;
using System.Linq;
namespace CacheCowDemo.Api.App
{
public class Db
{
private static readonly ICollection<Contact> contacts = new List<Contact>();
public IEnumerable<Contact> GetContacts(Func<IEnumerable<Contact>, IEnumerable<Contact>> query = null)
{
if (query != null)
{
return query(contacts);
}
return contacts;
}
public Contact GetContact(int id)
{
return contacts.FirstOrDefault(c => c.Id == id);
}
public void Store(Contact contact)
{
contact.Id = GetNextId();
contacts.Add(contact);
}
public void Delete(int id)
{
var contact = contacts.FirstOrDefault(c => c.Id == id);
if (contact != null)
{
contacts.Remove(contact);
}
}
private int GetNextId()
{
return contacts.Any() ? (contacts.Max(c => c.Id) + 1) : 1;
}
}
} | benfoster/CacheCowDemo | CacheCowDemo.Api/App/Db.cs | C# | mit | 1,134 |
# -*- coding: utf-8 -*-
#
# Horton documentation build configuration file, created by
# sphinx-quickstart on Thu May 30 14:24:56 2013.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a default; values that are commented out
# serve to show the default.
import sys, os
import sphinx_bootstrap_theme
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
sys.path.insert(0, os.path.abspath('..'))
# -- General configuration -----------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
#needs_sphinx = '1.0'
# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = ['sphinx.ext.autosummary']
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
# The suffix of source filenames.
source_suffix = '.rst'
# The encoding of source files.
#source_encoding = 'utf-8-sig'
# The master toctree document.
master_doc = 'index'
# General information about the project.
project = u'Horton'
copyright = u'2013, James King'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = '0'
# The full version, including alpha/beta/rc tags.
release = '0.1'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#language = None
# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
#today = ''
# Else, today_fmt is used as the format for a strftime call.
#today_fmt = '%B %d, %Y'
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
exclude_patterns = ['_build']
# The reST default role (used for this markup: `text`) to use for all documents.
#default_role = None
# If true, '()' will be appended to :func: etc. cross-reference text.
#add_function_parentheses = True
# If true, the current module name will be prepended to all description
# unit titles (such as .. function::).
#add_module_names = True
# If true, sectionauthor and moduleauthor directives will be shown in the
# output. They are ignored by default.
#show_authors = False
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
# A list of ignored prefixes for module index sorting.
#modindex_common_prefix = []
# If true, keep warnings as "system message" paragraphs in the built documents.
#keep_warnings = False
# -- Options for HTML output ---------------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = 'bootstrap'
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
#html_theme_options = {}
# Add any paths that contain custom themes here, relative to this directory.
html_theme_path = sphinx_bootstrap_theme.get_html_theme_path()
# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
#html_title = None
# A shorter title for the navigation bar. Default is the same as html_title.
#html_short_title = None
# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
#html_logo = None
# The name of an image file (within the static path) to use as favicon of the
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
#html_favicon = None
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
#html_last_updated_fmt = '%b %d, %Y'
# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
#html_use_smartypants = True
# Custom sidebar templates, maps document names to template names.
#html_sidebars = {}
# Additional templates that should be rendered to pages, maps page names to
# template names.
#html_additional_pages = {}
# If false, no module index is generated.
#html_domain_indices = True
# If false, no index is generated.
#html_use_index = True
# If true, the index is split into individual pages for each letter.
#html_split_index = False
# If true, links to the reST sources are added to the pages.
#html_show_sourcelink = True
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
#html_show_sphinx = True
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
#html_show_copyright = True
# If true, an OpenSearch description file will be output, and all pages will
# contain a <link> tag referring to it. The value of this option must be the
# base URL from which the finished HTML is served.
#html_use_opensearch = ''
# This is the file name suffix for HTML files (e.g. ".xhtml").
#html_file_suffix = None
# Output file base name for HTML help builder.
htmlhelp_basename = 'Hortondoc'
# -- Options for LaTeX output --------------------------------------------------
latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
#'papersize': 'letterpaper',
# The font size ('10pt', '11pt' or '12pt').
#'pointsize': '10pt',
# Additional stuff for the LaTeX preamble.
#'preamble': '',
}
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass [howto/manual]).
latex_documents = [
('index', 'Horton.tex', u'Horton Documentation',
u'James King', 'manual'),
]
# The name of an image file (relative to this directory) to place at the top of
# the title page.
#latex_logo = None
# For "manual" documents, if this is true, then toplevel headings are parts,
# not chapters.
#latex_use_parts = False
# If true, show page references after internal links.
#latex_show_pagerefs = False
# If true, show URL addresses after external links.
#latex_show_urls = False
# Documents to append as an appendix to all manuals.
#latex_appendices = []
# If false, no module index is generated.
#latex_domain_indices = True
# -- Options for manual page output --------------------------------------------
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
('index', 'horton', u'Horton Documentation',
[u'James King'], 1)
]
# If true, show URL addresses after external links.
#man_show_urls = False
# -- Options for Texinfo output ------------------------------------------------
# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
('index', 'Horton', u'Horton Documentation',
u'James King', 'Horton', 'One line description of project.',
'Miscellaneous'),
]
# Documents to append as an appendix to all manuals.
#texinfo_appendices = []
# If false, no module index is generated.
#texinfo_domain_indices = True
# How to display URL addresses: 'footnote', 'no', or 'inline'.
#texinfo_show_urls = 'footnote'
# If true, do not generate a @detailmenu in the "Top" node's menu.
#texinfo_no_detailmenu = False
| agentultra/Horton | doc/conf.py | Python | mit | 8,003 |
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MentorGroup
{
class Program
{
static void Main(string[] args)
{
List<Student> students = new List<Student>();
string input = Console.ReadLine();
while (input != "end of dates")
{
string[] arguments = input.Split(' ');
bool existingStudent = false;
string studentName = arguments[0];
foreach (Student student1 in students)
{
if (student1.Name == studentName)
{
existingStudent = true;
if (arguments.Length > 1)
{
string[] dates = arguments[1].Split(',');
foreach (string date in dates)
{
student1.Attendances.Add(DateTime.ParseExact(date, "dd/MM/yyyy",
CultureInfo.InvariantCulture));
}
}
}
}
if (!existingStudent)
{
Student student = new Student();
student.Attendances = new List<DateTime>();
student.Comments = new List<string>();
student.Name = studentName;
if (arguments.Length > 1)
{
string[] dates = arguments[1].Split(',');
foreach (string date in dates)
{
student.Attendances.Add(DateTime.ParseExact(date, "dd/MM/yyyy", CultureInfo.InvariantCulture));
}
}
students.Add(student);
}
input = Console.ReadLine();
}
input = Console.ReadLine();
while (input != "end of comments")
{
string[] arguments = input.Split('-');
string studentName = arguments[0];
if (arguments.Length > 1)
{
string comment = arguments[1];
foreach (Student student in students)
{
if (student.Name == studentName)
{
student.Comments.Add(comment);
}
}
}
input = Console.ReadLine();
}
foreach (Student student in students.OrderBy(x => x.Name))
{
Console.WriteLine(student.Name);
Console.WriteLine("Comments:");
foreach (string comment in student.Comments)
{
Console.WriteLine($"- {comment}");
}
Console.WriteLine("Dates attended:");
foreach (DateTime attendance in student.Attendances.OrderBy(x => x.Date))
{
Console.WriteLine($"-- {attendance.ToString("dd/MM/yyyy", CultureInfo.InvariantCulture)}");
}
}
}
}
class Student
{
public string Name { get; set; }
public List<string> Comments { get; set; }
public List<DateTime> Attendances { get; set; }
}
}
| MinorGlitch/Programming-Fundamentals | Objects and Classes - Exercises/MentorGroup/Program.cs | C# | mit | 3,567 |
/*!
* OOUI v0.37.1
* https://www.mediawiki.org/wiki/OOUI
*
* Copyright 2011–2020 OOUI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
* Date: 2020-03-26T02:05:08Z
*/
.oo-ui-icon-bookmarkOutline {
background-image: url('themes/wikimediaui/images/icons/bookmarkOutline.png');
background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/bookmarkOutline.svg');
}
.oo-ui-image-invert.oo-ui-icon-bookmarkOutline {
background-image: url('themes/wikimediaui/images/icons/bookmarkOutline-invert.png');
background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/bookmarkOutline-invert.svg');
}
.oo-ui-image-progressive.oo-ui-icon-bookmarkOutline {
background-image: url('themes/wikimediaui/images/icons/bookmarkOutline-progressive.png');
background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/bookmarkOutline-progressive.svg');
}
.oo-ui-icon-bookmark {
background-image: url('themes/wikimediaui/images/icons/bookmark.png');
background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/bookmark.svg');
}
.oo-ui-image-invert.oo-ui-icon-bookmark {
background-image: url('themes/wikimediaui/images/icons/bookmark-invert.png');
background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/bookmark-invert.svg');
}
.oo-ui-image-progressive.oo-ui-icon-bookmark {
background-image: url('themes/wikimediaui/images/icons/bookmark-progressive.png');
background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/bookmark-progressive.svg');
}
.oo-ui-icon-block {
background-image: url('themes/wikimediaui/images/icons/block.png');
background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/block.svg');
}
.oo-ui-image-destructive.oo-ui-icon-block {
background-image: url('themes/wikimediaui/images/icons/block-destructive.png');
background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/block-destructive.svg');
}
.oo-ui-image-invert.oo-ui-icon-block {
background-image: url('themes/wikimediaui/images/icons/block-invert.png');
background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/block-invert.svg');
}
.oo-ui-image-progressive.oo-ui-icon-block {
background-image: url('themes/wikimediaui/images/icons/block-progressive.png');
background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/block-progressive.svg');
}
.oo-ui-icon-unBlock {
background-image: url('themes/wikimediaui/images/icons/unBlock.png');
background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/unBlock.svg');
}
.oo-ui-image-invert.oo-ui-icon-unBlock {
background-image: url('themes/wikimediaui/images/icons/unBlock-invert.png');
background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/unBlock-invert.svg');
}
.oo-ui-image-progressive.oo-ui-icon-unBlock {
background-image: url('themes/wikimediaui/images/icons/unBlock-progressive.png');
background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/unBlock-progressive.svg');
}
.oo-ui-icon-flag {
background-image: url('themes/wikimediaui/images/icons/flag-rtl.png');
background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/flag-rtl.svg');
}
.oo-ui-image-invert.oo-ui-icon-flag {
background-image: url('themes/wikimediaui/images/icons/flag-rtl-invert.png');
background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/flag-rtl-invert.svg');
}
.oo-ui-image-progressive.oo-ui-icon-flag {
background-image: url('themes/wikimediaui/images/icons/flag-rtl-progressive.png');
background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/flag-rtl-progressive.svg');
}
.oo-ui-icon-unFlag {
background-image: url('themes/wikimediaui/images/icons/unFlag-rtl.png');
background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/unFlag-rtl.svg');
}
.oo-ui-image-invert.oo-ui-icon-unFlag {
background-image: url('themes/wikimediaui/images/icons/unFlag-rtl-invert.png');
background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/unFlag-rtl-invert.svg');
}
.oo-ui-image-progressive.oo-ui-icon-unFlag {
background-image: url('themes/wikimediaui/images/icons/unFlag-rtl-progressive.png');
background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/unFlag-rtl-progressive.svg');
}
.oo-ui-icon-lock {
background-image: url('themes/wikimediaui/images/icons/lock.png');
background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/lock.svg');
}
.oo-ui-image-destructive.oo-ui-icon-lock {
background-image: url('themes/wikimediaui/images/icons/lock-destructive.png');
background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/lock-destructive.svg');
}
.oo-ui-image-invert.oo-ui-icon-lock {
background-image: url('themes/wikimediaui/images/icons/lock-invert.png');
background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/lock-invert.svg');
}
.oo-ui-image-progressive.oo-ui-icon-lock {
background-image: url('themes/wikimediaui/images/icons/lock-progressive.png');
background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/lock-progressive.svg');
}
.oo-ui-icon-unLock {
background-image: url('themes/wikimediaui/images/icons/unLock.png');
background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/unLock.svg');
}
.oo-ui-image-destructive.oo-ui-icon-unLock {
background-image: url('themes/wikimediaui/images/icons/unLock-destructive.png');
background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/unLock-destructive.svg');
}
.oo-ui-image-invert.oo-ui-icon-unLock {
background-image: url('themes/wikimediaui/images/icons/unLock-invert.png');
background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/unLock-invert.svg');
}
.oo-ui-image-progressive.oo-ui-icon-unLock {
background-image: url('themes/wikimediaui/images/icons/unLock-progressive.png');
background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/unLock-progressive.svg');
}
.oo-ui-icon-restore {
background-image: url('themes/wikimediaui/images/icons/restore.png');
background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/restore.svg');
}
.oo-ui-image-invert.oo-ui-icon-restore {
background-image: url('themes/wikimediaui/images/icons/restore-invert.png');
background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/restore-invert.svg');
}
.oo-ui-image-progressive.oo-ui-icon-restore {
background-image: url('themes/wikimediaui/images/icons/restore-progressive.png');
background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/restore-progressive.svg');
}
.oo-ui-icon-star {
background-image: url('themes/wikimediaui/images/icons/star.png');
background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/star.svg');
}
.oo-ui-image-invert.oo-ui-icon-star {
background-image: url('themes/wikimediaui/images/icons/star-invert.png');
background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/star-invert.svg');
}
.oo-ui-image-progressive.oo-ui-icon-star {
background-image: url('themes/wikimediaui/images/icons/star-progressive.png');
background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/star-progressive.svg');
}
.oo-ui-icon-halfStar {
background-image: url('themes/wikimediaui/images/icons/halfStar-rtl.png');
background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/halfStar-rtl.svg');
}
.oo-ui-image-invert.oo-ui-icon-halfStar {
background-image: url('themes/wikimediaui/images/icons/halfStar-rtl-invert.png');
background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/halfStar-rtl-invert.svg');
}
.oo-ui-image-progressive.oo-ui-icon-halfStar {
background-image: url('themes/wikimediaui/images/icons/halfStar-rtl-progressive.png');
background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/halfStar-rtl-progressive.svg');
}
.oo-ui-icon-unStar {
background-image: url('themes/wikimediaui/images/icons/unStar.png');
background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/unStar.svg');
}
.oo-ui-image-invert.oo-ui-icon-unStar {
background-image: url('themes/wikimediaui/images/icons/unStar-invert.png');
background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/unStar-invert.svg');
}
.oo-ui-image-progressive.oo-ui-icon-unStar {
background-image: url('themes/wikimediaui/images/icons/unStar-progressive.png');
background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/unStar-progressive.svg');
}
.oo-ui-icon-trash {
background-image: url('themes/wikimediaui/images/icons/trash.png');
background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/trash.svg');
}
.oo-ui-image-destructive.oo-ui-icon-trash {
background-image: url('themes/wikimediaui/images/icons/trash-destructive.png');
background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/trash-destructive.svg');
}
.oo-ui-image-invert.oo-ui-icon-trash {
background-image: url('themes/wikimediaui/images/icons/trash-invert.png');
background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/trash-invert.svg');
}
.oo-ui-image-progressive.oo-ui-icon-trash {
background-image: url('themes/wikimediaui/images/icons/trash-progressive.png');
background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/trash-progressive.svg');
}
.oo-ui-icon-pushPin {
background-image: url('themes/wikimediaui/images/icons/pushPin.png');
background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/pushPin.svg');
}
.oo-ui-image-invert.oo-ui-icon-pushPin {
background-image: url('themes/wikimediaui/images/icons/pushPin-invert.png');
background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/pushPin-invert.svg');
}
.oo-ui-image-progressive.oo-ui-icon-pushPin {
background-image: url('themes/wikimediaui/images/icons/pushPin-progressive.png');
background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/pushPin-progressive.svg');
}
.oo-ui-icon-ongoingConversation {
background-image: url('themes/wikimediaui/images/icons/ongoingConversation-rtl.png');
background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/ongoingConversation-rtl.svg');
}
.oo-ui-image-invert.oo-ui-icon-ongoingConversation {
background-image: url('themes/wikimediaui/images/icons/ongoingConversation-rtl-invert.png');
background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/ongoingConversation-rtl-invert.svg');
}
.oo-ui-image-progressive.oo-ui-icon-ongoingConversation {
background-image: url('themes/wikimediaui/images/icons/ongoingConversation-rtl-progressive.png');
background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/ongoingConversation-rtl-progressive.svg');
}
| cdnjs/cdnjs | ajax/libs/oojs-ui/0.37.1/oojs-ui-wikimediaui-icons-moderation.rtl.css | CSS | mit | 12,732 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Date : 2015-04-27 14:23:01
# @Author : Damon Chen (zhenchentl@gmail.com)
# @Link : www.zhenchen.me
# @Version : $Id$
import os
import sys
sys.path.append('..')
from util.util import *
from util.param import *
import pickle
import random
class Citation():
def __init__(self):
self.redis = RedisHelper()
def recom(self):
targets = getTargetAuthor()
recom_result = dict()
recomlist = self.getRecomList()
for index, target in enumerate(targets):
print index
recom_result[target] = recomlist
resultsave = open(PATH_CITATION_RECOM_LIST, 'wb')
pickle.dump(recom_result, resultsave)
resultsave.close()
def getRecomList(self):
authors = self.redis.getAuthorList()
sim = dict()
for author in authors:
referedNum = 0
papers = self.redis.getAuthorPapers(author)
for paper in papers:
if int(self.redis.getPaperYear(paper)) < TEST_DATA_YEAR:
referedNum += len(self.redis.getPaperRefered(paper))
sim[author] = referedNum
return sorted(sim.iteritems(), key = lambda d:d[1], reverse = True)[:RECOM_TOP_N]
if __name__ == '__main__':
citation = Citation()
citation.recom()
| zhenchentl/MentorRec | citation/citation_recom.py | Python | mit | 1,340 |
<script type="text/javascript">
chart = google.charts.setOnLoadCallback(draw{{ $model->id }});
var {{ $model->id }};
function draw{{ $model->id }}() {
var data = google.visualization.arrayToDataTable([
[
'Element',
@for ($i = 0; $i < count($model->datasets); $i++)
"{{ $model->datasets[$i]['label'] }}",
@endfor
],
@for($l = 0; $l < count($model->labels); $l++)
[
"{{ $model->labels[$l] }}",
@for ($i = 0; $i < count($model->datasets); $i++)
{{ $model->datasets[$i]['values'][$l] }},
@endfor
],
@endfor
]);
var options = {
@include('charts::_partials.dimension.js')
fontSize: 12,
@include('charts::google.titles')
@include('charts::google.colors')
legend: {position: 'top', alignment: 'end'}
};
{{ $model->id }} = new google.visualization.AreaChart(document.getElementById("{{ $model->id }}"))
{{ $model->id }}.draw(data, options)
}
</script>
@if(!$model->customId)
@include('charts::_partials.container.div')
@endif
| shikakunhq/moonkaini | resources/views/vendor/charts/google/multi/area.blade.php | PHP | mit | 1,266 |
/*
@license textAngular
Author : Austin Anderson
License : 2013 MIT
Version 1.3.7
See README.md or https://github.com/fraywing/textAngular/wiki for requirements and use.
*/
angular.module('textAngularSetup', [])
// Here we set up the global display defaults, to set your own use a angular $provider#decorator.
.value('taOptions', {
toolbar: [
['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'p', 'pre', 'quote'],
['bold', 'italics', 'underline', 'strikeThrough', 'ul', 'ol', 'redo', 'undo', 'clear'],
['justifyLeft','justifyCenter','justifyRight','indent','outdent'],
['html', 'insertImage', 'insertLink', 'insertVideo', 'wordcount', 'charcount']
],
classes: {
focussed: "focussed",
toolbar: "btn-toolbar",
toolbarGroup: "btn-group",
toolbarButton: "btn btn-default",
toolbarButtonActive: "active",
disabled: "disabled",
textEditor: 'form-control',
htmlEditor: 'form-control'
},
setup: {
// wysiwyg mode
textEditorSetup: function($element){ /* Do some processing here */ },
// raw html
htmlEditorSetup: function($element){ /* Do some processing here */ }
},
defaultFileDropHandler:
/* istanbul ignore next: untestable image processing */
function(file, insertAction){
var reader = new FileReader();
if(file.type.substring(0, 5) === 'image'){
reader.onload = function() {
if(reader.result !== '') insertAction('insertImage', reader.result, true);
};
reader.readAsDataURL(file);
// NOTE: For async procedures return a promise and resolve it when the editor should update the model.
return true;
}
return false;
}
})
// This is the element selector string that is used to catch click events within a taBind, prevents the default and $emits a 'ta-element-select' event
// these are individually used in an angular.element().find() call. What can go here depends on whether you have full jQuery loaded or just jQLite with angularjs.
// div is only used as div.ta-insert-video caught in filter.
.value('taSelectableElements', ['a','img'])
// This is an array of objects with the following options:
// selector: <string> a jqLite or jQuery selector string
// customAttribute: <string> an attribute to search for
// renderLogic: <function(element)>
// Both or one of selector and customAttribute must be defined.
.value('taCustomRenderers', [
{
// Parse back out: '<div class="ta-insert-video" ta-insert-video src="' + urlLink + '" allowfullscreen="true" width="300" frameborder="0" height="250"></div>'
// To correct video element. For now only support youtube
selector: 'img',
customAttribute: 'ta-insert-video',
renderLogic: function(element){
var iframe = angular.element('<iframe></iframe>');
var attributes = element.prop("attributes");
// loop through element attributes and apply them on iframe
angular.forEach(attributes, function(attr) {
iframe.attr(attr.name, attr.value);
});
iframe.attr('src', iframe.attr('ta-insert-video'));
element.replaceWith(iframe);
}
}
])
.value('taTranslations', {
// moved to sub-elements
//toggleHTML: "Toggle HTML",
//insertImage: "Please enter a image URL to insert",
//insertLink: "Please enter a URL to insert",
//insertVideo: "Please enter a youtube URL to embed",
html: {
tooltip: 'Toggle html / Rich Text'
},
// tooltip for heading - might be worth splitting
heading: {
tooltip: 'Heading '
},
p: {
tooltip: 'Paragraph'
},
pre: {
tooltip: 'Preformatted text'
},
ul: {
tooltip: 'Unordered List'
},
ol: {
tooltip: 'Ordered List'
},
quote: {
tooltip: 'Quote/unquote selection or paragraph'
},
undo: {
tooltip: 'Undo'
},
redo: {
tooltip: 'Redo'
},
bold: {
tooltip: 'Bold'
},
italic: {
tooltip: 'Italic'
},
underline: {
tooltip: 'Underline'
},
strikeThrough:{
tooltip: 'Strikethrough'
},
justifyLeft: {
tooltip: 'Align text left'
},
justifyRight: {
tooltip: 'Align text right'
},
justifyCenter: {
tooltip: 'Center'
},
indent: {
tooltip: 'Increase indent'
},
outdent: {
tooltip: 'Decrease indent'
},
clear: {
tooltip: 'Clear formatting'
},
insertImage: {
dialogPrompt: 'Please enter an image URL to insert',
tooltip: 'Insert image',
hotkey: 'the - possibly language dependent hotkey ... for some future implementation'
},
insertVideo: {
tooltip: 'Insert video',
dialogPrompt: 'Please enter a youtube URL to embed'
},
insertLink: {
tooltip: 'Insert / edit link',
dialogPrompt: "Please enter a URL to insert"
},
editLink: {
reLinkButton: {
tooltip: "Relink"
},
unLinkButton: {
tooltip: "Unlink"
},
targetToggle: {
buttontext: "Open in New Window"
}
},
wordcount: {
tooltip: 'Display words Count'
},
charcount: {
tooltip: 'Display characters Count'
}
})
.run(['taRegisterTool', '$window', 'taTranslations', 'taSelection', function(taRegisterTool, $window, taTranslations, taSelection){
taRegisterTool("html", {
iconclass: 'fa fa-code',
tooltiptext: taTranslations.html.tooltip,
action: function(){
this.$editor().switchView();
},
activeState: function(){
return this.$editor().showHtml;
}
});
// add the Header tools
// convenience functions so that the loop works correctly
var _retActiveStateFunction = function(q){
return function(){ return this.$editor().queryFormatBlockState(q); };
};
var headerAction = function(){
return this.$editor().wrapSelection("formatBlock", "<" + this.name.toUpperCase() +">");
};
angular.forEach(['h1','h2','h3','h4','h5','h6'], function(h){
taRegisterTool(h.toLowerCase(), {
buttontext: h.toUpperCase(),
tooltiptext: taTranslations.heading.tooltip + h.charAt(1),
action: headerAction,
activeState: _retActiveStateFunction(h.toLowerCase())
});
});
taRegisterTool('p', {
buttontext: 'P',
tooltiptext: taTranslations.p.tooltip,
action: function(){
return this.$editor().wrapSelection("formatBlock", "<P>");
},
activeState: function(){ return this.$editor().queryFormatBlockState('p'); }
});
// key: pre -> taTranslations[key].tooltip, taTranslations[key].buttontext
taRegisterTool('pre', {
buttontext: 'pre',
tooltiptext: taTranslations.pre.tooltip,
action: function(){
return this.$editor().wrapSelection("formatBlock", "<PRE>");
},
activeState: function(){ return this.$editor().queryFormatBlockState('pre'); }
});
taRegisterTool('ul', {
iconclass: 'fa fa-list-ul',
tooltiptext: taTranslations.ul.tooltip,
action: function(){
return this.$editor().wrapSelection("insertUnorderedList", null);
},
activeState: function(){ return this.$editor().queryCommandState('insertUnorderedList'); }
});
taRegisterTool('ol', {
iconclass: 'fa fa-list-ol',
tooltiptext: taTranslations.ol.tooltip,
action: function(){
return this.$editor().wrapSelection("insertOrderedList", null);
},
activeState: function(){ return this.$editor().queryCommandState('insertOrderedList'); }
});
taRegisterTool('quote', {
iconclass: 'fa fa-quote-right',
tooltiptext: taTranslations.quote.tooltip,
action: function(){
return this.$editor().wrapSelection("formatBlock", "<BLOCKQUOTE>");
},
activeState: function(){ return this.$editor().queryFormatBlockState('blockquote'); }
});
taRegisterTool('undo', {
iconclass: 'fa fa-undo',
tooltiptext: taTranslations.undo.tooltip,
action: function(){
return this.$editor().wrapSelection("undo", null);
}
});
taRegisterTool('redo', {
iconclass: 'fa fa-repeat',
tooltiptext: taTranslations.redo.tooltip,
action: function(){
return this.$editor().wrapSelection("redo", null);
}
});
taRegisterTool('bold', {
iconclass: 'fa fa-bold',
tooltiptext: taTranslations.bold.tooltip,
action: function(){
return this.$editor().wrapSelection("bold", null);
},
activeState: function(){
return this.$editor().queryCommandState('bold');
},
commandKeyCode: 98
});
taRegisterTool('justifyLeft', {
iconclass: 'fa fa-align-left',
tooltiptext: taTranslations.justifyLeft.tooltip,
action: function(){
return this.$editor().wrapSelection("justifyLeft", null);
},
activeState: function(commonElement){
var result = false;
if(commonElement) result =
commonElement.css('text-align') === 'left' ||
commonElement.attr('align') === 'left' ||
(
commonElement.css('text-align') !== 'right' &&
commonElement.css('text-align') !== 'center' &&
commonElement.css('text-align') !== 'justify' &&
!this.$editor().queryCommandState('justifyRight') &&
!this.$editor().queryCommandState('justifyCenter')
) && !this.$editor().queryCommandState('justifyFull');
result = result || this.$editor().queryCommandState('justifyLeft');
return result;
}
});
taRegisterTool('justifyRight', {
iconclass: 'fa fa-align-right',
tooltiptext: taTranslations.justifyRight.tooltip,
action: function(){
return this.$editor().wrapSelection("justifyRight", null);
},
activeState: function(commonElement){
var result = false;
if(commonElement) result = commonElement.css('text-align') === 'right';
result = result || this.$editor().queryCommandState('justifyRight');
return result;
}
});
taRegisterTool('justifyCenter', {
iconclass: 'fa fa-align-center',
tooltiptext: taTranslations.justifyCenter.tooltip,
action: function(){
return this.$editor().wrapSelection("justifyCenter", null);
},
activeState: function(commonElement){
var result = false;
if(commonElement) result = commonElement.css('text-align') === 'center';
result = result || this.$editor().queryCommandState('justifyCenter');
return result;
}
});
taRegisterTool('indent', {
iconclass: 'fa fa-indent',
tooltiptext: taTranslations.indent.tooltip,
action: function(){
return this.$editor().wrapSelection("indent", null);
},
activeState: function(){
return this.$editor().queryFormatBlockState('blockquote');
}
});
taRegisterTool('outdent', {
iconclass: 'fa fa-outdent',
tooltiptext: taTranslations.outdent.tooltip,
action: function(){
return this.$editor().wrapSelection("outdent", null);
},
activeState: function(){
return false;
}
});
taRegisterTool('italics', {
iconclass: 'fa fa-italic',
tooltiptext: taTranslations.italic.tooltip,
action: function(){
return this.$editor().wrapSelection("italic", null);
},
activeState: function(){
return this.$editor().queryCommandState('italic');
},
commandKeyCode: 105
});
taRegisterTool('underline', {
iconclass: 'fa fa-underline',
tooltiptext: taTranslations.underline.tooltip,
action: function(){
return this.$editor().wrapSelection("underline", null);
},
activeState: function(){
return this.$editor().queryCommandState('underline');
},
commandKeyCode: 117
});
taRegisterTool('strikeThrough', {
iconclass: 'fa fa-strikethrough',
tooltiptext: taTranslations.strikeThrough.tooltip,
action: function(){
return this.$editor().wrapSelection("strikeThrough", null);
},
activeState: function(){
return document.queryCommandState('strikeThrough');
}
});
taRegisterTool('clear', {
iconclass: 'fa fa-ban',
tooltiptext: taTranslations.clear.tooltip,
action: function(deferred, restoreSelection){
var i;
this.$editor().wrapSelection("removeFormat", null);
var possibleNodes = angular.element(taSelection.getSelectionElement());
// remove lists
var removeListElements = function(list){
list = angular.element(list);
var prevElement = list;
angular.forEach(list.children(), function(liElem){
var newElem = angular.element('<p></p>');
newElem.html(angular.element(liElem).html());
prevElement.after(newElem);
prevElement = newElem;
});
list.remove();
};
angular.forEach(possibleNodes.find("ul"), removeListElements);
angular.forEach(possibleNodes.find("ol"), removeListElements);
if(possibleNodes[0].tagName.toLowerCase() === 'li'){
var _list = possibleNodes[0].parentNode.childNodes;
var _preLis = [], _postLis = [], _found = false;
for(i = 0; i < _list.length; i++){
if(_list[i] === possibleNodes[0]){
_found = true;
}else if(!_found) _preLis.push(_list[i]);
else _postLis.push(_list[i]);
}
var _parent = angular.element(possibleNodes[0].parentNode);
var newElem = angular.element('<p></p>');
newElem.html(angular.element(possibleNodes[0]).html());
if(_preLis.length === 0 || _postLis.length === 0){
if(_postLis.length === 0) _parent.after(newElem);
else _parent[0].parentNode.insertBefore(newElem[0], _parent[0]);
if(_preLis.length === 0 && _postLis.length === 0) _parent.remove();
else angular.element(possibleNodes[0]).remove();
}else{
var _firstList = angular.element('<'+_parent[0].tagName+'></'+_parent[0].tagName+'>');
var _secondList = angular.element('<'+_parent[0].tagName+'></'+_parent[0].tagName+'>');
for(i = 0; i < _preLis.length; i++) _firstList.append(angular.element(_preLis[i]));
for(i = 0; i < _postLis.length; i++) _secondList.append(angular.element(_postLis[i]));
_parent.after(_secondList);
_parent.after(newElem);
_parent.after(_firstList);
_parent.remove();
}
taSelection.setSelectionToElementEnd(newElem[0]);
}
// clear out all class attributes. These do not seem to be cleared via removeFormat
var $editor = this.$editor();
var recursiveRemoveClass = function(node){
node = angular.element(node);
if(node[0] !== $editor.displayElements.text[0]) node.removeAttr('class');
angular.forEach(node.children(), recursiveRemoveClass);
};
angular.forEach(possibleNodes, recursiveRemoveClass);
// check if in list. If not in list then use formatBlock option
if(possibleNodes[0].tagName.toLowerCase() !== 'li' &&
possibleNodes[0].tagName.toLowerCase() !== 'ol' &&
possibleNodes[0].tagName.toLowerCase() !== 'ul') this.$editor().wrapSelection("formatBlock", "default");
restoreSelection();
}
});
var imgOnSelectAction = function(event, $element, editorScope){
// setup the editor toolbar
// Credit to the work at http://hackerwins.github.io/summernote/ for this editbar logic/display
var finishEdit = function(){
editorScope.updateTaBindtaTextElement();
editorScope.hidePopover();
};
event.preventDefault();
editorScope.displayElements.popover.css('width', '375px');
var container = editorScope.displayElements.popoverContainer;
container.empty();
var buttonGroup = angular.element('<div class="btn-group" style="padding-right: 6px;">');
var fullButton = angular.element('<button type="button" class="btn btn-default btn-sm btn-small" unselectable="on" tabindex="-1">100% </button>');
fullButton.on('click', function(event){
event.preventDefault();
$element.css({
'width': '100%',
'height': ''
});
finishEdit();
});
var halfButton = angular.element('<button type="button" class="btn btn-default btn-sm btn-small" unselectable="on" tabindex="-1">50% </button>');
halfButton.on('click', function(event){
event.preventDefault();
$element.css({
'width': '50%',
'height': ''
});
finishEdit();
});
var quartButton = angular.element('<button type="button" class="btn btn-default btn-sm btn-small" unselectable="on" tabindex="-1">25% </button>');
quartButton.on('click', function(event){
event.preventDefault();
$element.css({
'width': '25%',
'height': ''
});
finishEdit();
});
var resetButton = angular.element('<button type="button" class="btn btn-default btn-sm btn-small" unselectable="on" tabindex="-1">Reset</button>');
resetButton.on('click', function(event){
event.preventDefault();
$element.css({
width: '',
height: ''
});
finishEdit();
});
buttonGroup.append(fullButton);
buttonGroup.append(halfButton);
buttonGroup.append(quartButton);
buttonGroup.append(resetButton);
container.append(buttonGroup);
buttonGroup = angular.element('<div class="btn-group" style="padding-right: 6px;">');
var floatLeft = angular.element('<button type="button" class="btn btn-default btn-sm btn-small" unselectable="on" tabindex="-1"><i class="fa fa-align-left"></i></button>');
floatLeft.on('click', function(event){
event.preventDefault();
// webkit
$element.css('float', 'left');
// firefox
$element.css('cssFloat', 'left');
// IE < 8
$element.css('styleFloat', 'left');
finishEdit();
});
var floatRight = angular.element('<button type="button" class="btn btn-default btn-sm btn-small" unselectable="on" tabindex="-1"><i class="fa fa-align-right"></i></button>');
floatRight.on('click', function(event){
event.preventDefault();
// webkit
$element.css('float', 'right');
// firefox
$element.css('cssFloat', 'right');
// IE < 8
$element.css('styleFloat', 'right');
finishEdit();
});
var floatNone = angular.element('<button type="button" class="btn btn-default btn-sm btn-small" unselectable="on" tabindex="-1"><i class="fa fa-align-justify"></i></button>');
floatNone.on('click', function(event){
event.preventDefault();
// webkit
$element.css('float', '');
// firefox
$element.css('cssFloat', '');
// IE < 8
$element.css('styleFloat', '');
finishEdit();
});
buttonGroup.append(floatLeft);
buttonGroup.append(floatNone);
buttonGroup.append(floatRight);
container.append(buttonGroup);
buttonGroup = angular.element('<div class="btn-group">');
var remove = angular.element('<button type="button" class="btn btn-default btn-sm btn-small" unselectable="on" tabindex="-1"><i class="fa fa-trash-o"></i></button>');
remove.on('click', function(event){
event.preventDefault();
$element.remove();
finishEdit();
});
buttonGroup.append(remove);
container.append(buttonGroup);
editorScope.showPopover($element);
editorScope.showResizeOverlay($element);
};
taRegisterTool('insertImage', {
iconclass: 'fa fa-picture-o',
tooltiptext: taTranslations.insertImage.tooltip,
action: function(){
var imageLink;
$('#myModal').modal('toggle');
//imageLink = $window.prompt(taTranslations.insertImage.dialogPrompt, 'http://');
if(imageLink && imageLink !== '' && imageLink !== 'http://'){
return this.$editor().wrapSelection('insertImage', imageLink, true);
}
},
onElementSelect: {
element: 'img',
action: imgOnSelectAction
}
});
taRegisterTool('insertVideo', {
iconclass: 'fa fa-youtube-play',
tooltiptext: taTranslations.insertVideo.tooltip,
action: function(){
var urlPrompt;
urlPrompt = $window.prompt(taTranslations.insertVideo.dialogPrompt, 'https://');
if (urlPrompt && urlPrompt !== '' && urlPrompt !== 'https://') {
// get the video ID
var ids = urlPrompt.match(/(\?|&)v=[^&]*/);
/* istanbul ignore else: if it's invalid don't worry - though probably should show some kind of error message */
if(ids && ids.length > 0){
// create the embed link
var urlLink = "https://www.youtube.com/embed/" + ids[0].substring(3);
// create the HTML
// for all options see: http://stackoverflow.com/questions/2068344/how-do-i-get-a-youtube-video-thumbnail-from-the-youtube-api
// maxresdefault.jpg seems to be undefined on some.
var embed = '<img class="ta-insert-video" src="https://img.youtube.com/vi/' + ids[0].substring(3) + '/hqdefault.jpg" ta-insert-video="' + urlLink + '" contenteditable="false" src="" allowfullscreen="true" frameborder="0" />';
// insert
return this.$editor().wrapSelection('insertHTML', embed, true);
}
}
},
onElementSelect: {
element: 'img',
onlyWithAttrs: ['ta-insert-video'],
action: imgOnSelectAction
}
});
taRegisterTool('insertLink', {
tooltiptext: taTranslations.insertLink.tooltip,
iconclass: 'fa fa-link',
action: function(){
var urlLink;
urlLink = $window.prompt(taTranslations.insertLink.dialogPrompt, 'http://');
if(urlLink && urlLink !== '' && urlLink !== 'http://'){
return this.$editor().wrapSelection('createLink', urlLink, true);
}
},
activeState: function(commonElement){
if(commonElement) return commonElement[0].tagName === 'A';
return false;
},
onElementSelect: {
element: 'a',
action: function(event, $element, editorScope){
// setup the editor toolbar
// Credit to the work at http://hackerwins.github.io/summernote/ for this editbar logic
event.preventDefault();
editorScope.displayElements.popover.css('width', '436px');
var container = editorScope.displayElements.popoverContainer;
container.empty();
container.css('line-height', '28px');
var link = angular.element('<a href="' + $element.attr('href') + '" target="_blank">' + $element.attr('href') + '</a>');
link.css({
'display': 'inline-block',
'max-width': '200px',
'overflow': 'hidden',
'text-overflow': 'ellipsis',
'white-space': 'nowrap',
'vertical-align': 'middle'
});
container.append(link);
var buttonGroup = angular.element('<div class="btn-group pull-right">');
var reLinkButton = angular.element('<button type="button" class="btn btn-default btn-sm btn-small" tabindex="-1" unselectable="on" title="' + taTranslations.editLink.reLinkButton.tooltip + '"><i class="fa fa-edit icon-edit"></i></button>');
reLinkButton.on('click', function(event){
event.preventDefault();
var urlLink = $window.prompt(taTranslations.insertLink.dialogPrompt, $element.attr('href'));
if(urlLink && urlLink !== '' && urlLink !== 'http://'){
$element.attr('href', urlLink);
editorScope.updateTaBindtaTextElement();
}
editorScope.hidePopover();
});
buttonGroup.append(reLinkButton);
var unLinkButton = angular.element('<button type="button" class="btn btn-default btn-sm btn-small" tabindex="-1" unselectable="on" title="' + taTranslations.editLink.unLinkButton.tooltip + '"><i class="fa fa-unlink icon-unlink"></i></button>');
// directly before this click event is fired a digest is fired off whereby the reference to $element is orphaned off
unLinkButton.on('click', function(event){
event.preventDefault();
$element.replaceWith($element.contents());
editorScope.updateTaBindtaTextElement();
editorScope.hidePopover();
});
buttonGroup.append(unLinkButton);
var targetToggle = angular.element('<button type="button" class="btn btn-default btn-sm btn-small" tabindex="-1" unselectable="on">' + taTranslations.editLink.targetToggle.buttontext + '</button>');
if($element.attr('target') === '_blank'){
targetToggle.addClass('active');
}
targetToggle.on('click', function(event){
event.preventDefault();
$element.attr('target', ($element.attr('target') === '_blank') ? '' : '_blank');
targetToggle.toggleClass('active');
editorScope.updateTaBindtaTextElement();
});
buttonGroup.append(targetToggle);
container.append(buttonGroup);
editorScope.showPopover($element);
}
}
});
taRegisterTool('wordcount', {
display: '<div id="toolbarWC" style="display:block; min-width:100px;">Words: <span ng-bind="wordcount"></span></div>',
disabled: true,
wordcount: 0,
activeState: function(){ // this fires on keyup
var textElement = this.$editor().displayElements.text;
/* istanbul ignore next: will default to '' when undefined */
var workingHTML = textElement[0].innerHTML || '';
var noOfWords = 0;
/* istanbul ignore if: will default to '' when undefined */
if (workingHTML.replace(/\s*<[^>]*?>\s*/g, '') !== '') {
noOfWords = workingHTML.replace(/<\/?(b|i|em|strong|span|u|strikethrough|a|img|small|sub|sup|label)( [^>*?])?>/gi, '') // remove inline tags without adding spaces
.replace(/(<[^>]*?>\s*<[^>]*?>)/ig, ' ') // replace adjacent tags with possible space between with a space
.replace(/(<[^>]*?>)/ig, '') // remove any singular tags
.replace(/\s+/ig, ' ') // condense spacing
.match(/\S+/g).length; // count remaining non-space strings
}
//Set current scope
this.wordcount = noOfWords;
//Set editor scope
this.$editor().wordcount = noOfWords;
return false;
}
});
taRegisterTool('charcount', {
display: '<div id="toolbarCC" style="display:block; min-width:120px;">Characters: <span ng-bind="charcount"></span></div>',
disabled: true,
charcount: 0,
activeState: function(){ // this fires on keyup
var textElement = this.$editor().displayElements.text;
var sourceText = textElement[0].innerText || textElement[0].textContent; // to cover the non-jquery use case.
// Caculate number of chars
var noOfChars = sourceText.replace(/(\r\n|\n|\r)/gm,"").replace(/^\s+/g,' ').replace(/\s+$/g, ' ').length;
//Set current scope
this.charcount = noOfChars;
//Set editor scope
this.$editor().charcount = noOfChars;
return false;
}
});
}]);
| tearf001/angular-SPA-StackOverFlow-Like-Web | AngularJSAuthentication.Web/app/components/textAngular/src/textAngularSetup.js | JavaScript | mit | 24,810 |
import { Emitter, EmitterImpl, Transport, TransportState } from "../../../src/api";
import { Logger } from "../../../src/core";
type ResolveFunction = () => void;
type RejectFunction = (reason: Error) => void;
export class TransportFake implements Transport {
public onConnect: (() => void) | undefined;
public onDisconnect: ((error?: Error) => void) | undefined;
public onMessage: ((message: string) => void) | undefined;
private _id = "";
private peers: Array<TransportFake> = [];
private waitingForSendPromise: Promise<void> | undefined;
private waitingForSendResolve: ResolveFunction | undefined;
private waitingForSendReject: RejectFunction | undefined;
private waitingForReceivePromise: Promise<void> | undefined;
private waitingForReceiveResolve: ResolveFunction | undefined;
private waitingForReceiveReject: RejectFunction | undefined;
private _receiveDropOnce = false;
private _state: TransportState = TransportState.Disconnected;
private _stateEventEmitter = new EmitterImpl<TransportState>();
constructor(private logger: Logger) {}
public set id(id: string) {
this._id = id;
}
public get protocol(): string {
return "FAKE";
}
public get state(): TransportState {
return this.state;
}
public get stateChange(): Emitter<TransportState> {
return this._stateEventEmitter;
}
public connect(): Promise<void> {
return this._connect();
}
public disconnect(): Promise<void> {
return this._disconnect();
}
public dispose(): Promise<void> {
return Promise.resolve();
}
public send(message: string): Promise<void> {
return this._send(message).then(() => {
return;
});
}
public isConnected(): boolean {
return this._state === TransportState.Connected;
}
public setConnected(connected: boolean): void {
this._state = connected ? TransportState.Connected : TransportState.Disconnected;
}
public addPeer(peer: TransportFake): void {
this.peers.push(peer);
}
public receive(msg: string): void {
/*
let message = "";
message += this._id ? `${this._id} ` : "";
message += `Receiving...\n${msg}`;
this.logger.log(message);
*/
if (this._receiveDropOnce) {
this._receiveDropOnce = false;
this.logger.warn((this._id ? `${this._id} ` : "") + "Dropped message");
} else if (this.onMessage) {
this.onMessage(msg);
}
this.receiveHappened();
}
public receiveDropOnce(): void {
this._receiveDropOnce = true;
}
public async waitSent(): Promise<void> {
if (this.waitingForSendPromise) {
throw new Error("Already waiting for send.");
}
this.waitingForSendPromise = new Promise<void>((resolve, reject) => {
this.waitingForSendResolve = resolve;
this.waitingForSendReject = reject;
});
return this.waitingForSendPromise;
}
public async waitReceived(): Promise<void> {
if (this.waitingForReceivePromise) {
throw new Error("Already waiting for receive.");
}
this.waitingForReceivePromise = new Promise<void>((resolve, reject) => {
this.waitingForReceiveResolve = resolve;
this.waitingForReceiveReject = reject;
});
return this.waitingForReceivePromise;
}
private _connect(): Promise<void> {
switch (this._state) {
case TransportState.Connecting:
this.transitionState(TransportState.Connected);
break;
case TransportState.Connected:
break;
case TransportState.Disconnecting:
this.transitionState(TransportState.Connecting);
this.transitionState(TransportState.Connected);
break;
case TransportState.Disconnected:
this.transitionState(TransportState.Connecting);
this.transitionState(TransportState.Connected);
break;
default:
throw new Error("Unknown state.");
}
return Promise.resolve();
}
private _disconnect(): Promise<void> {
switch (this._state) {
case TransportState.Connecting:
this.transitionState(TransportState.Disconnecting);
this.transitionState(TransportState.Disconnected);
break;
case TransportState.Connected:
this.transitionState(TransportState.Disconnecting);
this.transitionState(TransportState.Disconnected);
break;
case TransportState.Disconnecting:
this.transitionState(TransportState.Disconnected);
break;
case TransportState.Disconnected:
break;
default:
throw new Error("Unknown state.");
}
return Promise.resolve();
}
private _send(msg: string): Promise<{ msg: string; overrideEvent?: boolean }> {
if (!this.isConnected()) {
return Promise.resolve().then(() => {
this.sendHappened();
throw new Error("Not connected.");
});
}
let message = "";
message += this._id ? `${this._id} ` : "";
message += `Sending...\n${msg}`;
this.logger.log(message);
return Promise.resolve().then(() => {
this.peers.forEach((peer) => {
// console.warn("Passing");
peer.onReceived(msg);
});
this.sendHappened();
return { msg };
});
}
private onReceived(msg: string): void {
Promise.resolve().then(() => {
this.receive(msg);
});
}
private sendHappened(): void {
if (this.waitingForSendResolve) {
this.waitingForSendResolve();
}
this.waitingForSendPromise = undefined;
this.waitingForSendResolve = undefined;
this.waitingForSendReject = undefined;
}
private sendTimeout(): void {
if (this.waitingForSendReject) {
this.waitingForSendReject(new Error("Timed out waiting for send."));
}
this.waitingForSendPromise = undefined;
this.waitingForSendResolve = undefined;
this.waitingForSendReject = undefined;
}
private receiveHappened(): void {
if (this.waitingForReceiveResolve) {
this.waitingForReceiveResolve();
}
this.waitingForReceivePromise = undefined;
this.waitingForReceiveResolve = undefined;
this.waitingForReceiveReject = undefined;
}
private receiveTimeout(): void {
if (this.waitingForReceiveReject) {
this.waitingForReceiveReject(new Error("Timed out waiting for receive."));
}
this.waitingForReceivePromise = undefined;
this.waitingForReceiveResolve = undefined;
this.waitingForReceiveReject = undefined;
}
/**
* Transition transport state.
* @internal
*/
private transitionState(newState: TransportState, error?: Error): void {
const invalidTransition = (): void => {
throw new Error(`Invalid state transition from ${this._state} to ${newState}`);
};
// Validate state transition
switch (this._state) {
case TransportState.Connecting:
if (
newState !== TransportState.Connected &&
newState !== TransportState.Disconnecting &&
newState !== TransportState.Disconnected
) {
invalidTransition();
}
break;
case TransportState.Connected:
if (newState !== TransportState.Disconnecting && newState !== TransportState.Disconnected) {
invalidTransition();
}
break;
case TransportState.Disconnecting:
if (newState !== TransportState.Connecting && newState !== TransportState.Disconnected) {
invalidTransition();
}
break;
case TransportState.Disconnected:
if (newState !== TransportState.Connecting) {
invalidTransition();
}
break;
default:
throw new Error("Unknown state.");
}
// Update state
const oldState = this._state;
this._state = newState;
this.logger.log(`Transitioned from ${oldState} to ${this._state}`);
this._stateEventEmitter.emit(this._state);
// Transition to Connected
if (newState === TransportState.Connected) {
if (this.onConnect) {
this.onConnect();
}
}
// Transition from Connected
if (oldState === TransportState.Connected) {
if (this.onDisconnect) {
if (error) {
this.onDisconnect(error);
} else {
this.onDisconnect();
}
}
}
}
}
| onsip/SIP.js | test/support/api/transport-fake.ts | TypeScript | mit | 8,211 |
from ado.commands.survey import take_survey
from ado.commands.survey import record_metric
from ado.metric import Metric
from ado.recipe import Recipe
from ado.survey import Survey
import ado.commands
import sys
import ado.commands.recipe
def ok_command(debug=False):
c = ado.commands.conn()
surveys_due = bool(Survey.all_due(c))
metrics_due = bool(Metric.all_due(c))
recipes_due = bool(Recipe.all_due(c))
if debug:
print "Are surveys due?", surveys_due
print "Are metrics due?", metrics_due
print "Are recipes due?", recipes_due
ok = (not surveys_due) and (not metrics_due) and (not recipes_due)
if ok:
if debug:
print "nothing is due"
sys.exit(0)
else:
print "something is due"
sys.exit(1)
def due_command():
c = ado.commands.conn()
for survey in Survey.all_due(c):
take_survey(survey.id)
for metric in Metric.all_due(c):
record_metric(metric.id)
for recipe in Recipe.all_due(c):
ado.commands.recipe.do_command(recipe.id)
| ananelson/ado | ado/commands/status.py | Python | mit | 1,067 |
// Copyright (c) 2009-2012 The Bitcoin Developers
// Copyright (c) 2013-2014 The Slimcoin Developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <openssl/aes.h>
#include <openssl/evp.h>
#include <vector>
#include <string>
#ifdef WIN32
#include <windows.h>
#endif
#include "crypter.h"
bool CCrypter::SetKeyFromPassphrase(const SecureString& strKeyData, const std::vector<unsigned char>& chSalt, const unsigned int nRounds, const unsigned int nDerivationMethod)
{
if (nRounds < 1 || chSalt.size() != WALLET_CRYPTO_SALT_SIZE)
return false;
// Try to keep the keydata out of swap (and be a bit over-careful to keep the IV that we don't even use out of swap)
// Note that this does nothing about suspend-to-disk (which will put all our key data on disk)
// Note as well that at no point in this program is any attempt made to prevent stealing of keys by reading the memory of the running process.
mlock(&chKey[0], sizeof chKey);
mlock(&chIV[0], sizeof chIV);
int i = 0;
if (nDerivationMethod == 0)
i = EVP_BytesToKey(EVP_aes_256_cbc(), EVP_sha512(), &chSalt[0],
(unsigned char *)&strKeyData[0], strKeyData.size(), nRounds, chKey, chIV);
if (i != (int)WALLET_CRYPTO_KEY_SIZE)
{
memset(&chKey, 0, sizeof chKey);
memset(&chIV, 0, sizeof chIV);
return false;
}
fKeySet = true;
return true;
}
bool CCrypter::SetKey(const CKeyingMaterial& chNewKey, const std::vector<unsigned char>& chNewIV)
{
if (chNewKey.size() != WALLET_CRYPTO_KEY_SIZE || chNewIV.size() != WALLET_CRYPTO_KEY_SIZE)
return false;
// Try to keep the keydata out of swap
// Note that this does nothing about suspend-to-disk (which will put all our key data on disk)
// Note as well that at no point in this program is any attempt made to prevent stealing of keys by reading the memory of the running process.
mlock(&chKey[0], sizeof chKey);
mlock(&chIV[0], sizeof chIV);
memcpy(&chKey[0], &chNewKey[0], sizeof chKey);
memcpy(&chIV[0], &chNewIV[0], sizeof chIV);
fKeySet = true;
return true;
}
bool CCrypter::Encrypt(const CKeyingMaterial& vchPlaintext, std::vector<unsigned char> &vchCiphertext)
{
if (!fKeySet)
return false;
// max ciphertext len for a n bytes of plaintext is
// n + AES_BLOCK_SIZE - 1 bytes
int nLen = vchPlaintext.size();
int nCLen = nLen + AES_BLOCK_SIZE, nFLen = 0;
vchCiphertext = std::vector<unsigned char> (nCLen);
EVP_CIPHER_CTX ctx;
bool fOk = true;
EVP_CIPHER_CTX_init(&ctx);
if (fOk) fOk = EVP_EncryptInit_ex(&ctx, EVP_aes_256_cbc(), NULL, chKey, chIV);
if (fOk) fOk = EVP_EncryptUpdate(&ctx, &vchCiphertext[0], &nCLen, &vchPlaintext[0], nLen);
if (fOk) fOk = EVP_EncryptFinal_ex(&ctx, (&vchCiphertext[0])+nCLen, &nFLen);
EVP_CIPHER_CTX_cleanup(&ctx);
if (!fOk) return false;
vchCiphertext.resize(nCLen + nFLen);
return true;
}
bool CCrypter::Decrypt(const std::vector<unsigned char>& vchCiphertext, CKeyingMaterial& vchPlaintext)
{
if (!fKeySet)
return false;
// plaintext will always be equal to or lesser than length of ciphertext
int nLen = vchCiphertext.size();
int nPLen = nLen, nFLen = 0;
vchPlaintext = CKeyingMaterial(nPLen);
EVP_CIPHER_CTX ctx;
bool fOk = true;
EVP_CIPHER_CTX_init(&ctx);
if (fOk) fOk = EVP_DecryptInit_ex(&ctx, EVP_aes_256_cbc(), NULL, chKey, chIV);
if (fOk) fOk = EVP_DecryptUpdate(&ctx, &vchPlaintext[0], &nPLen, &vchCiphertext[0], nLen);
if (fOk) fOk = EVP_DecryptFinal_ex(&ctx, (&vchPlaintext[0])+nPLen, &nFLen);
EVP_CIPHER_CTX_cleanup(&ctx);
if (!fOk) return false;
vchPlaintext.resize(nPLen + nFLen);
return true;
}
bool EncryptSecret(CKeyingMaterial& vMasterKey, const CSecret &vchPlaintext, const uint256& nIV, std::vector<unsigned char> &vchCiphertext)
{
CCrypter cKeyCrypter;
std::vector<unsigned char> chIV(WALLET_CRYPTO_KEY_SIZE);
memcpy(&chIV[0], &nIV, WALLET_CRYPTO_KEY_SIZE);
if(!cKeyCrypter.SetKey(vMasterKey, chIV))
return false;
return cKeyCrypter.Encrypt((CKeyingMaterial)vchPlaintext, vchCiphertext);
}
bool DecryptSecret(const CKeyingMaterial& vMasterKey, const std::vector<unsigned char>& vchCiphertext, const uint256& nIV, CSecret& vchPlaintext)
{
CCrypter cKeyCrypter;
std::vector<unsigned char> chIV(WALLET_CRYPTO_KEY_SIZE);
memcpy(&chIV[0], &nIV, WALLET_CRYPTO_KEY_SIZE);
if(!cKeyCrypter.SetKey(vMasterKey, chIV))
return false;
return cKeyCrypter.Decrypt(vchCiphertext, *((CKeyingMaterial*)&vchPlaintext));
}
| lin0sspice/Slimcoin-slimcoin | src/crypter.cpp | C++ | mit | 4,751 |
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { Schemas } from 'vs/base/common/network';
import * as osPath from 'vs/base/common/path';
import * as platform from 'vs/base/common/platform';
import { URI } from 'vs/base/common/uri';
import { IFileService } from 'vs/platform/files/common/files';
import { IOpenerService } from 'vs/platform/opener/common/opener';
import { IWorkspaceFolder } from 'vs/platform/workspace/common/workspace';
import { IEditorService } from 'vs/workbench/services/editor/common/editorService';
import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService';
import { IPathService } from 'vs/workbench/services/path/common/pathService';
import { StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent';
import { KeyCode } from 'vs/base/common/keyCodes';
import { localize } from 'vs/nls';
import { ITunnelService } from 'vs/platform/remote/common/tunnel';
const CONTROL_CODES = '\\u0000-\\u0020\\u007f-\\u009f';
const WEB_LINK_REGEX = new RegExp('(?:[a-zA-Z][a-zA-Z0-9+.-]{2,}:\\/\\/|data:|www\\.)[^\\s' + CONTROL_CODES + '"]{2,}[^\\s' + CONTROL_CODES + '"\')}\\],:;.!?]', 'ug');
const WIN_ABSOLUTE_PATH = /(?:[a-zA-Z]:(?:(?:\\|\/)[\w\.-]*)+)/;
const WIN_RELATIVE_PATH = /(?:(?:\~|\.)(?:(?:\\|\/)[\w\.-]*)+)/;
const WIN_PATH = new RegExp(`(${WIN_ABSOLUTE_PATH.source}|${WIN_RELATIVE_PATH.source})`);
const POSIX_PATH = /((?:\~|\.)?(?:\/[\w\.-]*)+)/;
const LINE_COLUMN = /(?:\:([\d]+))?(?:\:([\d]+))?/;
const PATH_LINK_REGEX = new RegExp(`${platform.isWindows ? WIN_PATH.source : POSIX_PATH.source}${LINE_COLUMN.source}`, 'g');
const MAX_LENGTH = 2000;
type LinkKind = 'web' | 'path' | 'text';
type LinkPart = {
kind: LinkKind;
value: string;
captures: string[];
};
export class LinkDetector {
constructor(
@IEditorService private readonly editorService: IEditorService,
@IFileService private readonly fileService: IFileService,
@IOpenerService private readonly openerService: IOpenerService,
@IPathService private readonly pathService: IPathService,
@ITunnelService private readonly tunnelService: ITunnelService,
@IWorkbenchEnvironmentService private readonly environmentService: IWorkbenchEnvironmentService
) {
// noop
}
/**
* Matches and handles web urls, absolute and relative file links in the string provided.
* Returns <span/> element that wraps the processed string, where matched links are replaced by <a/>.
* 'onclick' event is attached to all anchored links that opens them in the editor.
* When splitLines is true, each line of the text, even if it contains no links, is wrapped in a <span>
* and added as a child of the returned <span>.
*/
linkify(text: string, splitLines?: boolean, workspaceFolder?: IWorkspaceFolder): HTMLElement {
if (splitLines) {
const lines = text.split('\n');
for (let i = 0; i < lines.length - 1; i++) {
lines[i] = lines[i] + '\n';
}
if (!lines[lines.length - 1]) {
// Remove the last element ('') that split added.
lines.pop();
}
const elements = lines.map(line => this.linkify(line, false, workspaceFolder));
if (elements.length === 1) {
// Do not wrap single line with extra span.
return elements[0];
}
const container = document.createElement('span');
elements.forEach(e => container.appendChild(e));
return container;
}
const container = document.createElement('span');
for (const part of this.detectLinks(text)) {
try {
switch (part.kind) {
case 'text':
container.appendChild(document.createTextNode(part.value));
break;
case 'web':
container.appendChild(this.createWebLink(part.value));
break;
case 'path': {
const path = part.captures[0];
const lineNumber = part.captures[1] ? Number(part.captures[1]) : 0;
const columnNumber = part.captures[2] ? Number(part.captures[2]) : 0;
container.appendChild(this.createPathLink(part.value, path, lineNumber, columnNumber, workspaceFolder));
break;
}
}
} catch (e) {
container.appendChild(document.createTextNode(part.value));
}
}
return container;
}
private createWebLink(url: string): Node {
const link = this.createLink(url);
const uri = URI.parse(url);
this.decorateLink(link, uri, async () => {
if (uri.scheme === Schemas.file) {
// Just using fsPath here is unsafe: https://github.com/microsoft/vscode/issues/109076
const fsPath = uri.fsPath;
const path = await this.pathService.path;
const fileUrl = osPath.normalize(((path.sep === osPath.posix.sep) && platform.isWindows) ? fsPath.replace(/\\/g, osPath.posix.sep) : fsPath);
const resolvedLink = await this.fileService.resolve(URI.parse(fileUrl));
if (!resolvedLink) {
return;
}
await this.editorService.openEditor({ resource: resolvedLink.resource, options: { pinned: true } });
return;
}
this.openerService.open(url, { allowTunneling: !!this.environmentService.remoteAuthority });
});
return link;
}
private createPathLink(text: string, path: string, lineNumber: number, columnNumber: number, workspaceFolder: IWorkspaceFolder | undefined): Node {
if (path[0] === '/' && path[1] === '/') {
// Most likely a url part which did not match, for example ftp://path.
return document.createTextNode(text);
}
const options = { selection: { startLineNumber: lineNumber, startColumn: columnNumber } };
if (path[0] === '.') {
if (!workspaceFolder) {
return document.createTextNode(text);
}
const uri = workspaceFolder.toResource(path);
const link = this.createLink(text);
this.decorateLink(link, uri, (preserveFocus: boolean) => this.editorService.openEditor({ resource: uri, options: { ...options, preserveFocus } }));
return link;
}
if (path[0] === '~') {
const userHome = this.pathService.resolvedUserHome;
if (userHome) {
path = osPath.join(userHome.fsPath, path.substring(1));
}
}
const link = this.createLink(text);
link.tabIndex = 0;
const uri = URI.file(osPath.normalize(path));
this.fileService.resolve(uri).then(stat => {
if (stat.isDirectory) {
return;
}
this.decorateLink(link, uri, (preserveFocus: boolean) => this.editorService.openEditor({ resource: uri, options: { ...options, preserveFocus } }));
}).catch(() => {
// If the uri can not be resolved we should not spam the console with error, remain quite #86587
});
return link;
}
private createLink(text: string): HTMLElement {
const link = document.createElement('a');
link.textContent = text;
return link;
}
private decorateLink(link: HTMLElement, uri: URI, onClick: (preserveFocus: boolean) => void) {
link.classList.add('link');
const followLink = this.tunnelService.canTunnel(uri) ? localize('followForwardedLink', "follow link using forwarded port") : localize('followLink', "follow link");
link.title = platform.isMacintosh ? localize('fileLinkMac', "Cmd + click to {0}", followLink) : localize('fileLink', "Ctrl + click to {0}", followLink);
link.onmousemove = (event) => { link.classList.toggle('pointer', platform.isMacintosh ? event.metaKey : event.ctrlKey); };
link.onmouseleave = () => link.classList.remove('pointer');
link.onclick = (event) => {
const selection = window.getSelection();
if (!selection || selection.type === 'Range') {
return; // do not navigate when user is selecting
}
if (!(platform.isMacintosh ? event.metaKey : event.ctrlKey)) {
return;
}
event.preventDefault();
event.stopImmediatePropagation();
onClick(false);
};
link.onkeydown = e => {
const event = new StandardKeyboardEvent(e);
if (event.keyCode === KeyCode.Enter || event.keyCode === KeyCode.Space) {
event.preventDefault();
event.stopPropagation();
onClick(event.keyCode === KeyCode.Space);
}
};
}
private detectLinks(text: string): LinkPart[] {
if (text.length > MAX_LENGTH) {
return [{ kind: 'text', value: text, captures: [] }];
}
const regexes: RegExp[] = [WEB_LINK_REGEX, PATH_LINK_REGEX];
const kinds: LinkKind[] = ['web', 'path'];
const result: LinkPart[] = [];
const splitOne = (text: string, regexIndex: number) => {
if (regexIndex >= regexes.length) {
result.push({ value: text, kind: 'text', captures: [] });
return;
}
const regex = regexes[regexIndex];
let currentIndex = 0;
let match;
regex.lastIndex = 0;
while ((match = regex.exec(text)) !== null) {
const stringBeforeMatch = text.substring(currentIndex, match.index);
if (stringBeforeMatch) {
splitOne(stringBeforeMatch, regexIndex + 1);
}
const value = match[0];
result.push({
value: value,
kind: kinds[regexIndex],
captures: match.slice(1)
});
currentIndex = match.index + value.length;
}
const stringAfterMatches = text.substring(currentIndex);
if (stringAfterMatches) {
splitOne(stringAfterMatches, regexIndex + 1);
}
};
splitOne(text, 0);
return result;
}
}
| eamodio/vscode | src/vs/workbench/contrib/debug/browser/linkDetector.ts | TypeScript | mit | 9,281 |
using UnityEngine;
using System.Collections;
/**
* class FreeFly: Gives keyboard control to the user to move the main camera around.
* Public variables control speed and sensitivity
*/
[AddComponentMenu("Camera-Control/Mouse Look")]
public class FreeFly : MonoBehaviour {
/* Public Declarations */
public enum RotationAxes { MouseXAndY = 0, MouseX = 1, MouseY = 2 }
public RotationAxes axes = RotationAxes.MouseXAndY;
public float sensitivityX = 15F;
public float sensitivityY = 15F;
public float minimumX = -360F;
public float maximumX = 360F;
public float minimumY = -60F;
public float maximumY = 60F;
public float moveSpeed = 10;
public bool rightClick = false;
/* Private Declarations */
float rotationY = 0F;
/**
* Default Update function, run every frame. Detects user keyboard input and moves the camera accordingly
* Params: None
* Returns: void
*/
void Update ()
{
if (Input.GetKeyDown(KeyCode.Q)) {
rightClick = !rightClick;
}
if (Input.GetKeyDown (KeyCode.W) || Input.GetKey (KeyCode.W)) {
transform.Translate (Vector3.forward * moveSpeed * Time.deltaTime);
}
if (Input.GetKeyDown (KeyCode.S) || Input.GetKey (KeyCode.S)) {
transform.Translate (Vector3.back * moveSpeed * Time.deltaTime);
}
if (Input.GetKeyDown (KeyCode.A) || Input.GetKey (KeyCode.A)) {
transform.Translate (Vector3.left * moveSpeed * Time.deltaTime);
}
if (Input.GetKeyDown (KeyCode.D) || Input.GetKey (KeyCode.D)) {
transform.Translate (Vector3.right * moveSpeed * Time.deltaTime);
}
if (rightClick) {
if (axes == RotationAxes.MouseXAndY)
{
float rotationX = transform.localEulerAngles.y + Input.GetAxis("Mouse X") * sensitivityX;
rotationY += Input.GetAxis("Mouse Y") * sensitivityY;
rotationY = Mathf.Clamp (rotationY, minimumY, maximumY);
transform.localEulerAngles = new Vector3(-rotationY, rotationX, 0);
}
else if (axes == RotationAxes.MouseX)
{
transform.Rotate(0, Input.GetAxis("Mouse X") * sensitivityX, 0);
}
else
{
rotationY += Input.GetAxis("Mouse Y") * sensitivityY;
rotationY = Mathf.Clamp (rotationY, minimumY, maximumY);
transform.localEulerAngles = new Vector3(-rotationY, transform.localEulerAngles.y, 0);
}
}
}
/**
* Default Start function, run at the initialisation of this object. Sets the object to not rotate
* Params: None
* Returns: void
*/
void Start ()
{
// Make the rigid body not change rotation
if (rigidbody)
rigidbody.freezeRotation = true;
}
} | craigknott/Unity3D_OpenBadges | Scripts/Movement/FreeFly.cs | C# | mit | 2,533 |
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a Codezu.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Collections.Generic;
namespace Mozu.Api.Urls.Platform
{
public partial class TenantDataUrl
{
/// <summary>
/// Get Resource Url for GetDBValue
/// </summary>
/// <param name="dbEntryQuery">The database entry string to create.</param>
/// <param name="responseFields">Use this field to include those fields which are not included by default.</param>
/// <returns>
/// String - Resource Url
/// </returns>
public static MozuUrl GetDBValueUrl(string dbEntryQuery, string responseFields = null)
{
var url = "/api/platform/tenantdata/{*dbEntryQuery}?responseFields={responseFields}";
var mozuUrl = new MozuUrl(url, MozuUrl.UrlLocation.TENANT_POD, false) ;
mozuUrl.FormatUrl( "dbEntryQuery", dbEntryQuery);
mozuUrl.FormatUrl( "responseFields", responseFields);
return mozuUrl;
}
/// <summary>
/// Get Resource Url for CreateDBValue
/// </summary>
/// <param name="dbEntryQuery">The database entry string to create.</param>
/// <returns>
/// String - Resource Url
/// </returns>
public static MozuUrl CreateDBValueUrl(string dbEntryQuery)
{
var url = "/api/platform/tenantdata/{*dbEntryQuery}";
var mozuUrl = new MozuUrl(url, MozuUrl.UrlLocation.TENANT_POD, false) ;
mozuUrl.FormatUrl( "dbEntryQuery", dbEntryQuery);
return mozuUrl;
}
/// <summary>
/// Get Resource Url for UpdateDBValue
/// </summary>
/// <param name="dbEntryQuery">The database entry string to create.</param>
/// <returns>
/// String - Resource Url
/// </returns>
public static MozuUrl UpdateDBValueUrl(string dbEntryQuery)
{
var url = "/api/platform/tenantdata/{*dbEntryQuery}";
var mozuUrl = new MozuUrl(url, MozuUrl.UrlLocation.TENANT_POD, false) ;
mozuUrl.FormatUrl( "dbEntryQuery", dbEntryQuery);
return mozuUrl;
}
/// <summary>
/// Get Resource Url for DeleteDBValue
/// </summary>
/// <param name="dbEntryQuery">The database entry string to create.</param>
/// <returns>
/// String - Resource Url
/// </returns>
public static MozuUrl DeleteDBValueUrl(string dbEntryQuery)
{
var url = "/api/platform/tenantdata/{*dbEntryQuery}";
var mozuUrl = new MozuUrl(url, MozuUrl.UrlLocation.TENANT_POD, false) ;
mozuUrl.FormatUrl( "dbEntryQuery", dbEntryQuery);
return mozuUrl;
}
}
}
| ezekielthao/mozu-dotnet | Mozu.Api/Urls/Platform/TenantDataUrl.cs | C# | mit | 2,863 |
module AGW
module HasComments
module Helpers
# Returns a Gravatar URL associated with the email parameter.
# See http://douglasfshearer.com/blog/gravatar-for-ruby-and-ruby-on-rails
def gravatar_url(email, options = {})
# Default highest rating.
# Rating can be one of G, PG, R X.
# If set to nil, the Gravatar default of X will be used.
options[:rating] ||= nil
# Default size of the image.
# If set to nil, the Gravatar default size of 80px will be used.
options[:size] ||= nil
# Default image url to be used when no gravatar is found
# or when an image exceeds the rating parameter.
options[:default] ||= nil
# Build the Gravatar url.
grav_url = 'http://www.gravatar.com/avatar.php?'
grav_url << "gravatar_id=#{Digest::MD5.new.update(email)}"
grav_url << "&rating=#{options[:rating]}" if options[:rating]
grav_url << "&size=#{options[:size]}" if options[:size]
grav_url << "&default=#{options[:default]}" if options[:default]
return grav_url
end
# Returns a Gravatar image tag associated with the email parameter.
#--
# TODO: make this work with associated users
def gravatar_for(comment, options = {})
email = comment.email || raise ArgumentError, 'Comment should have an e-mail for gravatars to work.'
image_tag gravatar_url(email, options), {
:alt => 'Gravatar',
:size => '',
:width => (options[:size] || '80'),
:height => (options[:size] || '80')
:class => 'gravatar'
end
# Shortcut method to a form_for with fields_for a new comment.
#--
# TODO: make this work with non-new objects too?
def comment_form_for(*args)
form_for(*args) do |f|
f.fields_for(:comments, Comment.new) do |g|
yield f, g
end
end
end
# Return either the name of the author of a given comment,
# or a link to that author's website with his name as link text
# if a URL was given.
#--
# TODO: do something with user_id.
def link_to_comment_author(comment)
if comment.url?
link_to h(comment.name), h(comment.url), :rel => 'external nofollow'
else
h(comment.name)
end
end
end
end
end | avdgaag/has_comments | lib/agw/has_comments/helpers.rb | Ruby | mit | 2,404 |
//
// StopDetailTableViewController.swift
// CorvallisBus
//
// Created by Rikki Gibson on 8/23/15.
// Copyright © 2015 Rikki Gibson. All rights reserved.
//
import Foundation
protocol StopDetailViewControllerDelegate : class {
func stopDetailViewController(_ viewController: StopDetailViewController, didSetFavoritedState favorite: Bool, forStopID stopID: Int)
func stopDetailViewController(_ viewController: StopDetailViewController, didSelectRouteNamed routeName: String)
func stopDetailViewController(_ viewController: StopDetailViewController, didSelectDetailsForRouteNamed routeName: String)
func reloadDetails()
}
final class StopDetailViewController : UITableViewController {
@IBOutlet weak var labelStopName: UILabel!
@IBOutlet weak var buttonFavorite: UIButton!
weak var delegate: StopDetailViewControllerDelegate?
private var viewModel = StopDetailViewModel.empty()
lazy var errorPlaceholder: TableViewPlaceholder = {
let view = Bundle.main.loadNibNamed(
"TableViewPlaceholder",
owner: nil,
options: nil)![0] as! TableViewPlaceholder
view.labelTitle.text = "Failed to load route details"
view.button.setTitle("Retry", for: .normal)
return view
}()
let CELL_IDENTIFIER = "BusRouteDetailCell"
override func viewDidLoad() {
let cellNib = UINib(nibName: CELL_IDENTIFIER, bundle: Bundle.main)
tableView.register(cellNib, forCellReuseIdentifier: CELL_IDENTIFIER)
tableView.contentInset = UIEdgeInsets.zero
updateStopDetails(.success(StopDetailViewModel.empty()))
errorPlaceholder.handler = { self.delegate?.reloadDetails() }
NotificationCenter.default.addObserver(self, selector: #selector(StopDetailViewController.onOrientationChanged), name: UIDevice.orientationDidChangeNotification, object: nil)
}
@objc func onOrientationChanged() {
// Simple workaround to get the label to show text at the right width
// when the screen orientation goes from landscape to portrait.
labelStopName.text = viewModel.stopName
}
func updateStopDetails(_ failable: Failable<StopDetailViewModel, BusError>) {
guard case .success(let viewModel) = failable else {
return
}
// If the previous route details are still pending, don't load them.
self.viewModel.routeDetails.cancel()
// Indicates whether this is just a reload of the same stop or a different stop was selected.
let didSelectDifferentStop = self.viewModel.stopID != viewModel.stopID
let selectedRouteName = self.viewModel.selectedRouteName
self.viewModel = viewModel
labelStopName.text = viewModel.stopName
setFavoriteButtonState(favorited: viewModel.isFavorite)
// stopID being nil indicates no stop is selected
buttonFavorite.isEnabled = viewModel.stopID != nil
viewModel.routeDetails.startOnMainThread { failable in
UIApplication.shared.isNetworkActivityIndicatorVisible = false
self.updateTableView()
if case .success(let routeDetails) = failable, !routeDetails.isEmpty {
let indexToSelect = didSelectDifferentStop
? IndexPath(row: 0, section: 0)
: IndexPath(row: routeDetails.firstIndex{ $0.routeName == selectedRouteName } ?? 0, section: 0)
self.tableView.selectRow(at: indexToSelect, animated: true, scrollPosition: .none)
self.tableView(self.tableView, didSelectRowAt: indexToSelect)
}
}
}
func clearTableIfDataUnavailable() {
switch viewModel.routeDetails.state {
case .finished: break
default:
updateTableView()
}
}
func updateTableView() {
if (tableView.numberOfSections > 0) {
tableView.beginUpdates()
tableView.reloadSections(IndexSet(integer: 0), with: .automatic)
tableView.endUpdates()
} else {
tableView.reloadData()
}
if case .finished(.error) = viewModel.routeDetails.state {
tableView.backgroundView = errorPlaceholder
tableView.separatorStyle = .none
} else {
tableView.backgroundView = nil
tableView.separatorStyle = .singleLine
}
}
// MARK: Table view data source
override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
if case .finished(.success(let routeDetails)) = viewModel.routeDetails.state {
return routeDetails.count
} else {
return 0
}
}
override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: CELL_IDENTIFIER) as! BusRouteDetailCell
if case .finished(.success(let routeDetails)) = viewModel.routeDetails.state {
cell.update(routeDetails[indexPath.row])
}
return cell
}
// MARK: Table view delegate
override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
guard case .finished(.success(let routeDetails)) = viewModel.routeDetails.state else {
return
}
let routeName = routeDetails[indexPath.row].routeName
viewModel.selectedRouteName = routeName
delegate?.stopDetailViewController(self, didSelectRouteNamed: routeName)
}
@IBAction func toggleFavorite() {
guard let stopID = viewModel.stopID else {
return
}
viewModel.isFavorite = !viewModel.isFavorite
setFavoriteButtonState(favorited: viewModel.isFavorite)
delegate?.stopDetailViewController(self, didSetFavoritedState: viewModel.isFavorite, forStopID: stopID)
}
override func tableView(_ tableView: UITableView, accessoryButtonTappedForRowWith indexPath: IndexPath) {
guard case .finished(.success(let routeDetails)) = viewModel.routeDetails.state else {
return
}
let routeName = routeDetails[indexPath.row].routeName
delegate?.stopDetailViewController(self, didSelectDetailsForRouteNamed: routeName)
}
func setFavoriteButtonState(favorited: Bool) {
UIView.animate(withDuration: 0.2, animations: {
self.buttonFavorite.isSelected = favorited
})
}
}
| RikkiGibson/Corvallis-Bus-iOS | CorvallisBus/View Controllers/StopDetailViewController.swift | Swift | mit | 6,618 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Rainbow.Diff;
using Rainbow.Filtering;
using Rainbow.Model;
using Sitecore;
using Sitecore.Configuration;
using Sitecore.Data;
using Sitecore.Data.Items;
using Sitecore.Diagnostics;
using Sitecore.Pipelines.Save;
using Unicorn.Configuration;
using Unicorn.Data;
using Unicorn.Predicates;
using ItemData = Rainbow.Storage.Sc.ItemData;
namespace Unicorn.UI.Pipelines.SaveUi
{
/// <summary>
/// Provides a saveUI pipeline implementation to prevent unintentionally overwriting a changed serialized item on disk.
///
/// For example, if user A changes an item, then user B pulls that change from SCM but does not sync it into Sitecore,
/// then user B changes that item, without this handler user A's changes would be overwritten.
///
/// This handler verifies that the pre-save state of the item matches the field values present in the serialized item on disk (if it's present).
/// If they dont match a sheer warning is shown.
/// </summary>
/// <remarks>
/// Note that this solution does NOT save you from every possible conflict situation. Some saves do not run the saveUI pipeline, for example:
/// - Renaming any item
/// - Moving items
/// - Changing template field values (source, type) in the template builder
///
/// This handler is here to attempt to keep you from shooting yourself in the foot, but you really need to sync Unicorn after every update pulled from SCM.
/// </remarks>
public class SerializationConflictProcessor : SaveUiConfirmProcessor
{
private readonly IConfiguration[] _configurations;
public SerializationConflictProcessor()
: this(UnicornConfigurationManager.Configurations)
{
}
protected SerializationConflictProcessor(IConfiguration[] configurations)
{
_configurations = configurations;
}
protected override string GetDialogText(SaveArgs args)
{
var results = new Dictionary<Item, IList<string>>();
foreach (var item in args.Items)
{
// we grab the existing item from the database. This will NOT include the changed values we're saving.
// this is because we want to verify that the base state of the item matches serialized, NOT the state we're saving.
// if the base state and the serialized state match we can be pretty sure that the changes we are writing won't clobber anything serialized but not synced
Item existingItem = Client.ContentDatabase.GetItem(item.ID, item.Language, item.Version);
Assert.IsNotNull(existingItem, "Existing item {0} did not exist! This should never occur.", item.ID);
var existingSitecoreItem = new ItemData(existingItem);
foreach (var configuration in _configurations)
{
// ignore conflicts on items that Unicorn is not managing
if (!configuration.Resolve<IPredicate>().Includes(existingSitecoreItem).IsIncluded) continue;
IItemData serializedItemData = configuration.Resolve<ITargetDataStore>().GetByPathAndId(existingSitecoreItem.Path, existingSitecoreItem.Id, existingSitecoreItem.DatabaseName);
// not having an existing serialized version means no possibility of conflict here
if (serializedItemData == null) continue;
var fieldFilter = configuration.Resolve<IFieldFilter>();
var itemComparer = configuration.Resolve<IItemComparer>();
var fieldIssues = GetFieldSyncStatus(existingSitecoreItem, serializedItemData, fieldFilter, itemComparer);
if (fieldIssues.Count == 0) continue;
results[existingItem] = fieldIssues;
}
}
// no problems
if (results.Count == 0) return null;
var sb = new StringBuilder();
if (About.Version.StartsWith("7") || About.Version.StartsWith("6"))
{
// older Sitecores used \n to format dialog text
sb.Append("CRITICAL MESSAGE FROM UNICORN:\n");
sb.Append("You need to run a Unicorn sync. The following fields did not match the serialized version:\n");
foreach (var item in results)
{
if (results.Count > 1)
sb.AppendFormat("\n{0}: {1}", item.Key.DisplayName, string.Join(", ", item.Value));
else
sb.AppendFormat("\n{0}", string.Join(", ", item.Value));
}
sb.Append("\n\nDo you want to overwrite anyway?\nTHIS MAY CAUSE LOST WORK.");
}
else
{
// Sitecore 8.x+ uses HTML to format dialog text
sb.Append("<p style=\"font-weight: bold; margin-bottom: 1em;\">CRITICAL MESSAGE FROM UNICORN:</p>");
sb.Append("<p>You need to run a Unicorn sync. The following fields did not match the serialized version:</p><ul style=\"margin: 1em 0\">");
foreach (var item in results)
{
if (results.Count > 1)
sb.AppendFormat("<li>{0}: {1}</li>", item.Key.DisplayName, string.Join(", ", item.Value));
else
sb.AppendFormat("<li>{0}</li>", string.Join(", ", item.Value));
}
sb.Append("</ul><p>Do you want to overwrite anyway?<br>THIS MAY CAUSE LOST WORK.</p>");
}
return sb.ToString();
}
private IList<string> GetFieldSyncStatus(IItemData itemData, IItemData serializedItemData, IFieldFilter fieldFilter, IItemComparer itemComparer)
{
var comparison = itemComparer.Compare(new FilteredItem(itemData, fieldFilter), new FilteredItem(serializedItemData, fieldFilter));
var db = Factory.GetDatabase(itemData.DatabaseName);
var changedFields = comparison.ChangedSharedFields
.Concat(comparison.ChangedVersions.SelectMany(version => version.ChangedFields))
.Select(field => db.GetItem(new ID((field.SourceField ?? field.TargetField).FieldId)))
.Where(field => field != null)
.Select(field => field.DisplayName)
.ToList();
if (comparison.IsMoved) changedFields.Add("Item has been moved");
if (comparison.IsRenamed) changedFields.Add("Item has been renamed");
if (comparison.IsTemplateChanged) changedFields.Add("Item's template has changed");
if (comparison.ChangedVersions.Any(version => version.SourceVersion == null || version.TargetVersion == null)) changedFields.Add("Item versions do not match");
return changedFields;
}
}
}
| GuitarRich/Unicorn | src/Unicorn/UI/Pipelines/SaveUi/SerializationConflictProcessor.cs | C# | mit | 6,041 |
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class Question : MonoBehaviour
{
[SerializeField]
private List<GameObject>questionsMarks = new List<GameObject>( );
[SerializeField]
private GameObject gui;
[SerializeField]
private GameObject wrong;
[SerializeField]
private GameObject right;
private int selectedAnswer;
public int rightAnswer;
void SelectAnswer( )
{
for ( int i = 0; i < questionsMarks.Count; i++ )
{
questionsMarks[ i ].renderer.enabled = false;
}
}
void ConfirmAnswer()
{
for ( int i = 0; i < questionsMarks.Count; i++ )
{
if ( questionsMarks[ i ].renderer.enabled )
{
selectedAnswer = i;
if ( selectedAnswer == rightAnswer )
{
this.gameObject.SetActive( false );
Time.timeScale = 1;
gui.SetActive( true );
right.SetActive( true );
Debug.Log( "certa" );
}
else
{
this.gameObject.SetActive( false );
Time.timeScale = 1;
GameManager.Instance.GrowTime( );
gui.SetActive( true );
wrong.SetActive( true );
Debug.Log( "errada" );
}
}
}
}
}
| arnaldoccn/diabetes-speed-race | Assets/Scripts/Questions/Question.cs | C# | mit | 1,490 |
/**
* At this time, CSS has margin-left and margin-right capabilities, but it does not
* have margin-right and margin-left capabilities. That is, it does not have the
* ability to vary the margin per direction of the text.
* https://www.w3.org/wiki/Dynamic_style_-_manipulating_CSS_with_JavaScript
*/
function DynamicCSS() {
}
DynamicCSS.prototype.setDirection = function(direction) {
document.body.setAttribute('style', 'direction: ' + direction);
var sheet = document.styleSheets[0];
if (direction === 'ltr') {
console.log('*************** setting ltr margins');
sheet.addRule("#codexRoot", "margin-left: 8%; margin-right: 6%;");
sheet.addRule("p.io, p.io1", "margin-left: 1.0rem; margin-right: 0;");
sheet.addRule("p.io2", "margin-left: 2.0rem; margin-right: 0;");
sheet.addRule("p.li, p.li1", "margin-left: 2.0rem; margin-right: 0;");
sheet.addRule("p.q, p.q1", "margin-left: 3.0rem; margin-right: 0;");
sheet.addRule("p.q2", "margin-left: 3.0rem; margin-right: 0;");
} else {
console.log('**************** setting rtl margins');
sheet.addRule("#codexRoot", "margin-right: 8%; margin-left: 6%;");
sheet.addRule("p.io, p.io1", "margin-right: 1.0rem; margin-left: 0;");
sheet.addRule("p.io2", "margin-right: 2.0rem; margin-left: 0;");
sheet.addRule("p.li, p.li1", "margin-right: 2.0rem; margin-left: 0;");
sheet.addRule("p.q, p.q1", "margin-right: 3.0rem; margin-left: 0;");
sheet.addRule("p.q2", "margin-right: 3.0rem; margin-left: 0;");
}
};
| garygriswold/Bible.js | Library/util/DynamicCSS.js | JavaScript | mit | 1,512 |
# I worked on this challenge [by myself, with: ].
# This challenge took me [#] hours.
# Pseudocode
# create method that takes array as argument
# iterate over array
# when element is divisible by 3 return fizz
# when element is divisible by 5 return buzz
# when element is divisible by 15 return fizzbuzz
# if element is not divisible by 3, 5, or 15 return element.
# Initial Solution
def super_fizzbuzz(array)
fizzbuzzed = Array.new
array.each do |num|
if num % 15 == 0
fizzbuzzed.push('FizzBuzz')
elsif num % 3 == 0
fizzbuzzed.push('Fizz')
elsif num % 5 == 0
fizzbuzzed.push('Buzz')
else
fizzbuzzed.push(num)
end
end
return fizzbuzzed
end
# Refactored Solution
def super_fizzbuzz(array)
fizzbuzzed = array.map {|num|
if num % 15 == 0
num = 'FizzBuzz'
elsif num % 3 == 0
num = 'Fizz'
elsif num % 5 == 0
num = 'Buzz'
else
num
end
}
return fizzbuzzed
end
# Reflection
# Q: What concepts did you review or learn in this challenge?
# A: this challenge helped me review how to iterate through arrays and return a new array.
# Q: What is still confusing to you about Ruby?
# A: I think I just need more experience with breaking down the logic to solve different kinds of problems. I'm getting a lot more comfortable with Ruby syntax and how to use different methods.
# Q: What are you going to study to get more prepared for Phase 1?
# A: I've been using the Ruby Monk site to practice all kinds of different challenges in Ruby. It's helped by giving me a slightly different approach to the language and providing me with all kinds of new challenges to work on logically breaking down problems. | drumguy16/phase-0 | week-8/ruby/ruby_review.rb | Ruby | mit | 1,712 |
<?PHP
// this will display a form to remove a news entry
$page = "view";
require('./../../variables.php');
require('./../../variablesdb.php');
require('./../../functions.php');
require('./../../top.php');
?>
<?= getOuterBoxTop($leaguename. " <span class='grey-small'>»</span> Player Status", "") ?>
<?php
$index = "<p><a href='view.php'>news index</a></p>";
if (!$isAdminFull) {
echo "<p>Access denied.</p>";
} else {
?>
<?php
if (isset($_GET['submit']))
{
$submit = mysql_real_escape_string($_GET['submit']);
}
else
{
$submit = 0;
}
if ($submit == 1) {
if(! empty($_POST['edit']))
{
$edit = mysql_real_escape_string($_POST['edit']);
}
else
{
$edit = '1';
}
$sql = "DELETE FROM $newstable WHERE news_id = '$edit'";
$result = mysql_query($sql);
echo "<p>News entry $edit deleted</p>".$index;
}
else {
if(! empty($_GET['edit']))
{
$edit = mysql_real_escape_string($_GET['edit']);
}
else
{
$edit = '1';
}
?>
<table width="50%"><tr><td>
<?= getBoxTop("Delete News Entry", "", false, null); ?>
<form name="form1" method="post" action="delete.php?submit=1">
<table>
<tr>
<td>Delete news?</td>
</tr>
<tr>
<td class="padding-button">
<input type='hidden' name='edit' value="<?php echo "$edit" ?>">
<input type="Submit" name="submit" value="delete" style="background-color: <?php echo"$color5" ?>; border: 1 solid <?php echo"$color1" ?>" class="text"><br>
</td>
</tr>
</table>
</form>
<?= getBoxBottom() ?>
</td></tr></table>
<?php
}
?>
<?php
}
?>
<?= getOuterBoxBottom() ?>
<?
require('./../../bottom.php');
?>
| IkeC/evo-league | http/Admin/News/delete.php | PHP | mit | 1,549 |
#!/usr/bin/env bash
# temp directory for ansible must be on same mount as templates
if [ ! -d ~/project/vagrantup/ansible/tmp ]; then
mkdir -p ~/project/vagrantup/ansible/tmp
fi
if [ -e ~/project/vagrantup/ansible/tmp/test ]; then
rm ~/project/vagrantup/ansible/tmp/test >/dev/null 2>&1
fi
ln -s ~/project/vagrantup/provisioning.xml ~/project/vagrantup/ansible/tmp/test >/dev/null 2>&1
if [ -h ~/project/vagrantup/ansible/tmp/test ]; then
rm ~/project/vagrantup/ansible/tmp/test >/dev/null 2>&1
exit 0
else
echo "************************************************************************"
echo "*** Symbol links disabled! Did you forgot run as Administrator? ***"
echo "*** ***"
echo "*** Using windows? Read this: ***"
echo "*** If your Windows user are privileged (usually you are), run ***"
echo "*** vagrant up as administrator. Or turn off UAC at all. ***"
echo "*** Also, you can create non-privileged user (not belong to group ***"
echo "*** Administrators), allow symlinks to this user and switch to this ***"
echo "*** account). Ask google for more :) ***"
echo "*** ***"
echo "*** You can remove this check in Vagrantfile ***"
echo "*** ***"
echo "*** Note: guest machine still running, use vagrant halt for stop ***"
echo "************************************************************************"
fi
| miksir/vagrant-debian-LNPP-template | vagrantup/symlinkcheck.sh | Shell | mit | 1,706 |
<?php
// include Database connection file
include("db_connection.php");
// Design initial table header
$data = '<table class="table table-bordered table-striped">
<tr>
<th>No.</th>
<th>ID</th>
<th>NAMA</th>
<th>NOMOR KAMAR</th>
<th>PEMAKAIAN LAUNDRY</th>
<th>QUOTA LAUNDRY</th>
<th>PEMAKAIAN LISTRIK</th>
<th>QUOTA LISTRIK</th>
<th>CHARGE</th>
<th>UPDATE</th>
<th>DELETE</th>
<th>RESET</th>
</tr>';
$query = "SELECT * FROM penghuni";
if (!$result = mysql_query($query)) {
exit(mysql_error());
}
// if query results contains rows then featch those rows
if(mysql_num_rows($result) > 0)
{
$number = 1;
while($row = mysql_fetch_assoc($result))
{
$data .= '<tr>
<td>'.$number.'</td>
<td>'.$row['id'].'</td>
<td>'.$row['nama'].'</td>
<td>'.$row['no_kamar'].'</td>
<td>'.$row['total_laundry'].' Kg</td>
<td>'.$row['sisa_laundry'].' Kg</td>
<td>'.$row['total_listrik'].' KWh</td>
<td>'.$row['sisa_listrik'].' KWh</td>
<td>Rp '.$row['charge'].'</td>
<td>
<button onclick="GetUserDetails('.$row['id'].')" class="btn btn-warning">Update</button>
</td>
<td>
<button onclick="DeleteUser('.$row['id'].')" class="btn btn-danger">Delete</button>
</td>
<td>
<button onclick="ResetUser('.$row['id'].')" class="btn btn-primary">Reset Quota</button>
</td>
</tr>';
$number++;
}
}
else
{
// records now found
$data .= '<tr><td colspan="6">Records not found!</td></tr>';
}
$data .= '</table>';
echo $data;
?>
| vanestorz/SmartReport | ajax/readRecords.php | PHP | mit | 1,665 |
################################################################################
#This file is part of Dedomenon.
#
#Dedomenon is free software: you can redistribute it and/or modify
#it under the terms of the GNU Affero General Public License as published by
#the Free Software Foundation, either version 3 of the License, or
#(at your option) any later version.
#
#Dedomenon 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 Affero General Public License for more details.
#
#You should have received a copy of the GNU Affero General Public License
#along with Dedomenon. If not, see <http://www.gnu.org/licenses/>.
#
#Copyright 2008 Raphaël Bauduin
################################################################################
# *Description*
# This controller handls the accounts on the system
# Questions:
# * Whether to expose this controller?
# * If so, how do we authenticate?
# * Do we allow deletion of accounts?
#
# Most probably, this controller would only be accessible to
# the SUPER USER.
#
# FIXME: If a record is not found, how to respond?
# FIXME: How to return the status codes?
class Rest::AccountsController < Rest::RestController
before_filter :validate_rest_call
before_filter :check_ids
before_filter :check_relationships
# GET accounts/1
# GET accounts/1.xml
# GET accounts/1.json
def show
begin
@resource = Account.find(params[:id])
render :response => :GET
rescue Exception => e
@error = process_exception(e)
render :response => :error
end
end
# GET accounts/
# GET accounts.xml
# GET accounts.json
def index
begin
@parcel = get_paginated_records_for(
:for => Account,
:start_index => params[:start_index],
:max_results => params[:max_results],
:order_by => params[:order_by],
:direction => params[:direction],
:conditions => params[:conditions]
)
render :response => :GETALL
rescue Exception => e
@error = process_exception(e)
render :response => :error
end
end
# POST accounts/
def create
begin
@resource = Account.new(params[:account])
@resource.save!
render :response => :POST
rescue Exception => e
@error = process_exception(e)
render :response => :error
end
end
# DONE!
# PUT accounts/id
# PUT accounts/id.xml
# PUT accounts/id.json
def update
begin
@resource = Account.find(params[:id])
@resource.update_attributes!(params[:account])
render :response => :PUT
rescue Exception => e
@error = process_exception(e)
render :response => :error
end
end
# DELETE accounts/id
# DELETE accounts/id.xml
# DELETE accounts/id.json
def destroy
begin
destroy_item(Account, params[:id], params[:lock_version])
render :response => :DELETE
rescue Exception => e
@error = process_exception(e)
render :response => :error
end
end
protected
def validate_rest_call
if %w{create update}.include? params[:action]
render :json => report_errors(nil, 'Provide account resource to be created/updated')[0],
:status => 400 and return false if !params[:account]
begin
params[:account] = JSON.parse(params[:account])
params[:account] = substitute_ids(params[:account])
check_id_conflict(params[:account], params[:id])
valid_account?(params[:account], params)
rescue MadbException => e
render :json => report_errors(nil, e)[0], :status => e.code and return false
rescue Exception => e
render :json => report_errors(nil, e)[0], :status => 400 and return false
end
end
if params[:action] == 'destroy'
render :json => report_errors(nil, 'Provide lock_version for update/delete operations')[0],
:status => 400 and return false if !params[:lock_version]
end
return true;
end
def check_ids
if params[:id]
render :json => report_errors(nil, "Account[#{params[:id]}] does not exists")[0],
:status => 404 and return false if !Account.exists?(params[:id].to_i)
end
if params[:account]
render :json => report_errors(nil,"AccountType[#{params[:account][:account_type_id]}] does not exists")[0],
:status => 404 and return false if !AccountType.exists?(params[:account][:account_type_id])
end
return true
end
def check_relationships
begin
belongs_to_user?(session['user'],
:account => params[:id])
rescue MadbException => e
render :json => report_errors(nil, e)[0], :status => 400 and return false
end
end
protected
# Overriden from LoginSystem in order to render custom message
def access_denied
render :json => %Q~{"errors": ["Please login to consume the REST API"]}~, :status => 401
end
end
| mohsinhijazee/rest_plugin | app/controllers/rest/accounts_controller.rb | Ruby | mit | 5,084 |
if defined?(ActiveRecord::Base)
Before('~@no-txn') do
@__cucumber_use_txn = Cucumber::Rails::World.use_transactional_fixtures
Cucumber::Rails::World.use_transactional_fixtures = true
end
Before('@no-txn') do
@__cucumber_use_txn = Cucumber::Rails::World.use_transactional_fixtures
Cucumber::Rails::World.use_transactional_fixtures = false
end
Before do
if Cucumber::Rails::World.use_transactional_fixtures
@__cucumber_ar_connection = ActiveRecord::Base.connection
if @__cucumber_ar_connection.respond_to?(:increment_open_transactions)
@__cucumber_ar_connection.increment_open_transactions
else
ActiveRecord::Base.__send__(:increment_open_transactions)
end
@__cucumber_ar_connection.begin_db_transaction
end
ActionMailer::Base.deliveries = [] if defined?(ActionMailer::Base)
end
After do
if Cucumber::Rails::World.use_transactional_fixtures
@__cucumber_ar_connection.rollback_db_transaction
if @__cucumber_ar_connection.respond_to?(:decrement_open_transactions)
@__cucumber_ar_connection.decrement_open_transactions
else
ActiveRecord::Base.__send__(:decrement_open_transactions)
end
end
Cucumber::Rails::World.use_transactional_fixtures = @__cucumber_use_txn
end
else
module Cucumber::Rails
def World.fixture_table_names; []; end # Workaround for projects that don't use ActiveRecord
end
end
| schacon/cucumber | lib/cucumber/rails/active_record.rb | Ruby | mit | 1,443 |
<table width="90%" border="0"><tr><td><script>function openfile(url) {fullwin = window.open(url, "fulltext", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes");}</script><div class="flayoutclass"><div class="flayoutclass_first"><table class="tableoutfmt2"><tr><th class="std1"><b>條目 </b></th><td class="std2">赭衣塞路</td></tr>
<tr><th class="std1"><b>注音 </b></th><td class="std2">ㄓㄜ<sup class="subfont">ˇ</sup> | ㄙㄜ<sup class="subfont">ˋ</sup> ㄌㄨ<sup class="subfont">ˋ</sup></td></tr>
<tr><th class="std1"><b>漢語拼音 </b></th><td class="std2"><font class="english_word">zhě yī sè lù</font></td></tr>
<tr><th class="std1"><b>釋義 </b></th><td class="std2">身穿紅色囚衣的罪犯充塞道路。形容罪犯很多。梁書˙卷二˙武帝本紀中:<img src=/cydic/dicword/fa40.gif border=0 alt=* class=fontimg valign=center>昔商俗未移,民散久矣,嬰網陷辟,日夜相尋,若悉加正法,則赭衣塞路。<img src=/cydic/dicword/fa41.gif border=0 alt=* class=fontimg valign=center>亦作<img src=/cydic/dicword/fa40.gif border=0 alt=* class=fontimg valign=center>赭衣半道<img src=/cydic/dicword/fa41.gif border=0 alt=* class=fontimg valign=center>、<img src=/cydic/dicword/fa40.gif border=0 alt=* class=fontimg valign=center>赭衣滿道<img src=/cydic/dicword/fa41.gif border=0 alt=* class=fontimg valign=center>。</td></tr>
<tr><th class="std1"><b><font class="fltypefont">附錄</font> </b></th><td class="std2">修訂本參考資料</td></tr>
</td></tr></table></div> <!-- flayoutclass_first --><div class="flayoutclass_second"></div> <!-- flayoutclass_second --></div> <!-- flayoutclass --></td></tr></table>
| BuzzAcademy/idioms-moe-unformatted-data | all-data/25000-25999/25549-22.html | HTML | mit | 1,754 |
require 'spec_helper'
describe 'consul_template' do
context 'on an unsupported arch' do
let(:facts) {{
architecture: 'foo',
}}
it { is_expected.to compile.and_raise_error(/Unsupported kernel architecture:/) }
end
context 'on Ubuntu 8.04' do
let(:facts) {{
operatingsystem: 'Ubuntu',
operatingsystemrelease: '8.04',
}}
it { is_expected.to contain_class('consul_template').with_init_style('debian') }
end
context 'on Ubuntu 14.04' do
let(:facts) {{
operatingsystem: 'Ubuntu',
operatingsystemrelease: '14.04',
}}
it { is_expected.to contain_class('consul_template').with_init_style('upstart') }
end
context 'on Ubuntu 16.04' do
let(:facts) {{
operatingsystem: 'Ubuntu',
operatingsystemrelease: '16.04',
}}
it { is_expected.to contain_class('consul_template').with_init_style('systemd') }
end
context 'on Fedora 11' do
let(:facts) {{
osfamily: 'RedHat',
operatingsystem: 'Fedora',
operatingsystemrelease: '11',
}}
it { is_expected.to contain_class('consul_template').with_init_style('init') }
end
context 'on Fedora 20' do
let(:facts) {{
osfamily: 'RedHat',
operatingsystem: 'Fedora',
operatingsystemrelease: '20',
}}
it { is_expected.to contain_class('consul_template').with_init_style('systemd') }
end
context 'on an Amazon based OS' do
let(:facts) {{
osfamily: 'RedHat',
operatingsystem: 'Amazon',
operatingsystemrelease: '3.10.34-37.137.amzn1.x86_64',
}}
it { is_expected.to contain_class('consul_template').with_init_style('redhat') }
end
context 'on a Redhat 6 based OS' do
let(:facts) {{
osfamily: 'RedHat',
operatingsystem: 'CentOS',
operatingsystemrelease: '6.5',
}}
it { is_expected.to contain_class('consul_template').with_init_style('redhat') }
end
context 'on a Redhat 7 based OS' do
let(:facts) {{
osfamily: 'RedHat',
operatingsystem: 'CentOS',
operatingsystemrelease: '7.0',
}}
it { is_expected.to contain_class('consul_template').with_init_style('systemd') }
end
context 'on Debian 7.1' do
let(:facts) {{
operatingsystem: 'Debian',
operatingsystemrelease: '7.1',
}}
it { is_expected.to contain_class('consul_template').with_init_style('debian') }
end
context 'on Debian 8.0' do
let(:facts) {{
operatingsystem: 'Debian',
operatingsystemrelease: '8.0',
}}
it { is_expected.to contain_class('consul_template').with_init_style('systemd') }
end
context 'on an Archlinux based OS' do
let(:facts) {{
operatingsystem: 'Archlinux',
}}
it { is_expected.to contain_class('consul_template').with_init_style('systemd') }
end
context 'on openSUSE' do
let(:facts) {{
:operatingsystem => 'OpenSuSE',
}}
it { is_expected.to contain_class('consul_template').with_init_style('systemd') }
end
context 'on SLED' do
let(:facts) {{
operatingsystem: 'SLED',
operatingsystemrelease: '7.1',
}}
it { is_expected.to contain_class('consul_template').with_init_style('sles') }
end
context 'on SLES' do
let(:facts) {{
operatingsystem: 'SLES',
operatingsystemrelease: '13.1',
}}
it { is_expected.to contain_class('consul_template').with_init_style('systemd') }
end
context 'on Darwin' do
let(:facts) {{
operatingsystem: 'Darwin',
}}
it { is_expected.to contain_class('consul_template').with_init_style('launchd') }
end
context 'on FreeBSD' do
let(:facts) {{
operatingsystem: 'FreeBSD',
}}
it { is_expected.to contain_class('consul_template').with_init_style('freebsd') }
end
context 'on an unsupported OS' do
let(:facts) {{ operatingsystem: 'foo' }}
it { is_expected.to compile.and_raise_error(/Cannot determine init_style, unsupported OS:/) }
end
context 'when requesting to install via a package with defaults' do
let(:params) {{
install_method: 'package',
}}
it { is_expected.to contain_package('consul-template').with_ensure('latest').that_notifies('Class[consul_template::run_service]') }
end
context 'when requesting to install via a custom package and version' do
let(:params) {{
install_method: 'package',
package_ensure: 'specific_release',
package_name: 'custom_consul_package',
}}
it { is_expected.to contain_package('custom_consul_package').with_ensure('specific_release').that_notifies('Class[consul_template::run_service]') }
end
context 'when installing via URL by default' do
it { is_expected.to contain_archive('/opt/consul-template/archives/consul-template-0.19.3.zip').with_source('https://releases.hashicorp.com/consul-template/0.19.3/consul-template_0.19.3_linux_amd64.zip') }
it { is_expected.to contain_file('/opt/consul-template/archives').with_ensure('directory') }
it { is_expected.to contain_file('/opt/consul-template/archives/consul-template-0.19.3').with_ensure('directory') }
it { is_expected.to contain_file('/usr/local/bin/consul-template').that_notifies('Class[consul_template::run_service]') }
end
context 'when installing via URL with a special archive_path' do
let(:params) {{
archive_path: '/usr/share/puppet-archive',
}}
it { is_expected.to contain_archive('/usr/share/puppet-archive/consul-template-0.19.3.zip').with_source('https://releases.hashicorp.com/consul-template/0.19.3/consul-template_0.19.3_linux_amd64.zip') }
it { is_expected.to contain_file('/usr/share/puppet-archive').with_ensure('directory') }
it { is_expected.to contain_file('/usr/share/puppet-archive/consul-template-0.19.3').with_ensure('directory') }
it { is_expected.to contain_file('/usr/local/bin/consul-template').that_notifies('Class[consul_template::run_service]') }
end
context 'when installing by archive via URL and current version is already installed' do
let(:facts) {{
consul_template_version: '0.19.3',
}}
it { is_expected.to contain_archive('/opt/consul-template/archives/consul-template-0.19.3.zip').with_source('https://releases.hashicorp.com/consul-template/0.19.3/consul-template_0.19.3_linux_amd64.zip') }
it { is_expected.to contain_file('/usr/local/bin/consul-template') }
it { is_expected.not_to contain_notify(['Class[consul_template::run_service]']) }
end
context 'when installing via URL by with a special version' do
let(:params) {{
version: '0.19.4',
}}
it { is_expected.to contain_archive('/opt/consul-template/archives/consul-template-0.19.4.zip').with_source('https://releases.hashicorp.com/consul-template/0.19.4/consul-template_0.19.4_linux_amd64.zip') }
it { is_expected.to contain_file('/usr/local/bin/consul-template').that_notifies('Class[consul_template::run_service]') }
end
context 'when installing via URL by with a custom url' do
let(:params) {{
download_url: 'http://myurl',
}}
it { is_expected.to contain_archive('/opt/consul-template/archives/consul-template-0.19.3.zip').with_source('http://myurl') }
it { is_expected.to contain_file('/usr/local/bin/consul-template').that_notifies('Class[consul_template::run_service]') }
end
context 'when requesting to not to install' do
let(:params) {{
install_method: 'none',
}}
it { is_expected.not_to contain_package('consul_template') }
it { is_expected.not_to contain_archive('/opt/consul-template/archives/consul-0.19.3.zip') }
end
context 'when asked to manage user' do
let(:params) {{
manage_user: true,
user: 'foo',
}}
it { is_expected.to contain_user('foo') }
end
context 'when asked to manage group' do
let(:params) {{
manage_group: true,
group: 'foo',
}}
it { is_expected.to contain_group('foo') }
end
context 'when asked not to manage the init system' do
let(:params) {{
init_style: 'unmanaged',
}}
it { is_expected.not_to contain_file('/etc/init.d/consul-template') }
it { is_expected.not_to contain_file('/etc/systemd/system/consul-template.service') }
it { is_expected.not_to contain_file('/Library/LaunchDaemons/com.hashicorp.consul-template.daemon.plist') }
it { is_expected.not_to contain_file('/usr/local/etc/rc.d/consul-template') }
end
context 'when using upstart init style' do
let(:params) {{
init_style: 'upstart',
}}
it { is_expected.to contain_file('/etc/init/consul-template.conf').with_content(/Consul Template \(Upstart unit\)/) }
it { is_expected.to contain_file('/etc/init.d/consul-template').with_ensure('link').with_target('/lib/init/upstart-job') }
end
context 'when using systemd init style' do
let(:params) {{
init_style: 'systemd',
}}
it { is_expected.to contain_file('/etc/systemd/system/consul-template.service').with_content(/Description=Consul Template/) }
it { is_expected.to contain_exec('consul-template-systemd-reload').with_command('systemctl daemon-reload').with_refreshonly(true) }
end
context 'when using init init style' do
let(:params) {{
init_style: 'init',
}}
it { is_expected.to contain_file('/etc/init.d/consul-template').with_content(/\. \/etc\/init\.d\/functions/) }
end
context 'when using redhat init style' do
let(:params) {{
init_style: 'redhat',
}}
it { is_expected.to contain_file('/etc/init.d/consul-template').with_content(/\. \/etc\/init\.d\/functions/) }
end
context 'when using debian init style' do
let(:params) {{
init_style: 'debian',
}}
it { is_expected.to contain_file('/etc/init.d/consul-template').with_content(/\. \/lib\/lsb\/init-functions/) }
end
context 'when using sles init style' do
let(:params) {{
init_style: 'sles',
}}
it { is_expected.to contain_file('/etc/init.d/consul-template').with_content(/\. \/etc\/rc.status/) }
end
context 'when using launchd init style' do
let(:params) {{
init_style: 'launchd',
}}
it { is_expected.to contain_file('/Library/LaunchDaemons/com.hashicorp.consul-template.daemon.plist').with_content(/com\.hashicorp\.consul-template/) }
end
context 'when using freebsd init style' do
let(:params) {{
init_style: 'freebsd',
}}
it { is_expected.to contain_file('/etc/rc.conf.d/consul-template').with_content(/consul_template_enable=/) }
it { is_expected.to contain_file('/usr/local/etc/rc.d/consul-template').with_content(/\. \/etc\/rc.subr/) }
end
context 'when using unsupported init style' do
let(:params) {{
init_style: 'foo',
}}
it { is_expected.to compile.and_raise_error(/Unsupported init style:/) }
end
context 'when configuring with default config dir, user, group and mode' do
it { is_expected.to contain_file('/etc/consul-template').with_ensure('directory').with_owner('root').with_group('root') }
it { is_expected.to contain_concat('consul-template/config.hcl').with_path('/etc/consul-template/config.hcl').with_owner('root').with_group('root').with_mode('0660') }
end
context 'when configuring with custom config dir, user, group and mode' do
let(:params) {{
config_dir: '/usr/local/etc/consul-template',
user: 'foo',
group: 'bar',
config_mode: '0666',
}}
it { is_expected.to contain_file('/usr/local/etc/consul-template').with_owner('foo').with_group('bar') }
it { is_expected.to contain_concat('consul-template/config.hcl').with_path('/usr/local/etc/consul-template/config.hcl').with_owner('foo').with_group('bar').with_mode('0666') }
end
context 'when asked not to purge config dir' do
let(:params) {{
purge_config_dir: false,
}}
it { is_expected.to contain_file('/etc/consul-template').with_purge(false).with_recurse(false) }
end
context 'when config_defaults is used to provide additional config and is overridden by config_hash' do
let(:params) {{
config_defaults: {
'consul' => {
'address' => '127.0.0.1:8500',
'token' => 'foo',
},
},
config_hash: {
'consul' => {
'token' => 'bar',
},
}
}}
it { is_expected.to contain_concat_fragment('consul-template/config.hcl').with_content(/address = "127\.0\.0\.1:8500"/) }
it { is_expected.to contain_concat_fragment('consul-template/config.hcl').with_content(/token = "bar"/) }
end
context 'when asked not to restart on change' do
let(:params) {{
restart_on_change: false
}}
it { is_expected.not_to contain_class('consul_template::config').that_notifies('Class[consul_template::run_service]') }
end
context 'when watches provided' do
let(:params) {{
watches: {
'watch1' => {
'destination' => 'destination1',
'source' => 'source1',
},
'watch2' => {
'destination' => 'destination2',
'source' => 'source2',
}
}
}}
it { is_expected.to contain_consul_template__watch('watch1').with_destination('destination1').with_source('source1') }
it { is_expected.to contain_consul_template__watch('watch2').with_destination('destination2').with_source('source2') }
end
end
| RiANOl/puppet-consul-template | spec/classes/init_spec.rb | Ruby | mit | 13,276 |
# encoding: utf-8
# This file is autogenerated. Do not edit it manually.
# If you want change the content of this file, edit
#
# /spec/fixtures/responses/whois.nic.tr/tr/status_invalid.expected
#
# and regenerate the tests with the following rake task
#
# $ rake spec:generate
#
require 'spec_helper'
require 'whois/record/parser/whois.nic.tr.rb'
describe Whois::Record::Parser::WhoisNicTr, "status_invalid.expected" do
subject do
file = fixture("responses", "whois.nic.tr/tr/status_invalid.txt")
part = Whois::Record::Part.new(body: File.read(file))
described_class.new(part)
end
describe "#disclaimer" do
it do
expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported)
end
end
describe "#domain" do
it do
expect { subject.domain }.to raise_error(Whois::AttributeNotSupported)
end
end
describe "#domain_id" do
it do
expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported)
end
end
describe "#status" do
it do
expect(subject.status).to eq(:invalid)
end
end
describe "#available?" do
it do
expect(subject.available?).to eq(false)
end
end
describe "#registered?" do
it do
expect(subject.registered?).to eq(false)
end
end
describe "#created_on" do
it do
expect(subject.created_on).to eq(nil)
end
end
describe "#updated_on" do
it do
expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported)
end
end
describe "#expires_on" do
it do
expect(subject.expires_on).to eq(nil)
end
end
describe "#registrar" do
it do
expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported)
end
end
describe "#registrant_contacts" do
it do
expect(subject.registrant_contacts).to be_a(Array)
expect(subject.registrant_contacts).to eq([])
end
end
describe "#admin_contacts" do
it do
expect(subject.admin_contacts).to be_a(Array)
expect(subject.admin_contacts).to eq([])
end
end
describe "#technical_contacts" do
it do
expect(subject.technical_contacts).to be_a(Array)
expect(subject.technical_contacts).to eq([])
end
end
describe "#nameservers" do
it do
expect(subject.nameservers).to be_a(Array)
expect(subject.nameservers).to eq([])
end
end
end
| linrock/whois | spec/whois/record/parser/responses/whois.nic.tr/tr/status_invalid_spec.rb | Ruby | mit | 2,384 |
<?php namespace app\src;
/**
* A generic pagination script that automatically generates navigation links as well as next/previous page links, given
* the total number of records and the number of records to be shown per page. Useful for breaking large sets of data
* into smaller chunks, reducing network traffic and, at the same time, improving readability, aesthetics and usability.
*
* Adheres to pagination best practices (provides large clickable areas, doesn't use underlines, the selected page is
* clearly highlighted, page links are spaced out, provides "previous page" and "next page" links, provides "first page"
* and "last page" links - as outlined in an article by Faruk Ates from 2007, which can now be found
* {@link https://gist.github.com/622561 here}), can generate links both in natural as well as in reverse order, can be
* easily, localized, supports different positions for next/previous page buttons, supports page propagation via GET or
* via URL rewriting, is SEO-friendly, and the appearance is easily customizable through CSS.
*
* Please note that this is a *generic* pagination script, meaning that it does not display any records and it does not
* have any dependencies on database connections or SQL queries, making it very flexible! It is up to the developer to
* fetch the actual data and display it based on the information returned by this pagination script. The advantage is
* that it can be used to paginate over records coming from any source like arrays or databases.
*
* The code is heavily commented and generates no warnings/errors/notices when PHP's error reporting level is set to
* E_ALL.
*
* Visit {@link http://stefangabos.ro/php-libraries/zebra-pagination/} for more information.
*
* For more resources visit {@link http://stefangabos.ro/}
*
* @author Stefan Gabos <contact@stefangabos.ro>
* @version 2.1.1 (last revision: July 15, 2013)
* @copyright (c) 2009 - 2013 Stefan Gabos
* @license http://www.gnu.org/licenses/lgpl-3.0.txt GNU LESSER GENERAL PUBLIC LICENSE
* @package Zebra_Pagination
*/
class Paginate
{
// set defaults and initialize some private variables
private $_properties = array(
// should the "previous page" and "next page" links be always visible
'always_show_navigation' => true,
// should we avoid duplicate content
'avoid_duplicate_content' => true,
// default method for page propagation
'method' => 'get',
// string for "next page"
'next' => 'Next page',
// by default, prefix page number with zeroes
'padding' => true,
// the default starting page
'page' => 1,
// a flag telling whether current page was set manually or determined from the URL
'page_set' => false,
'navigation_position' => 'outside',
// a flag telling whether query strings in base_url should be kept or not
'preserve_query_string' => 0,
// string for "previous page"
'previous' => 'Previous page',
// by default, we assume there are no records
// we expect this number to be set after the class is instantiated
'records' => '',
// records per page
'records_per_page' => '',
// should the links be displayed in reverse order
'reverse' => false,
// number of selectable pages
'selectable_pages' => 11,
// will be computed later on
'total_pages' => 0,
// trailing slashes are added to generated URLs
// (when "method" is "url")
'trailing_slash' => true,
// this is the variable name to be used in the URL for propagating the page number
'variable_name' => 'page',
);
/**
* Constructor of the class.
*
* Initializes the class and the default properties.
*
* @return void
*/
function __construct()
{
// set the default base url
$this->base_url();
}
/**
* By default, the "previous page" and "next page" links are always shown.
*
* By disabling this feature the "previous page" and "next page" links will only be shown if there are more pages
* than set through {@link selectable_pages()}.
*
* <code>
* // show "previous page" / "next page" only if there are more pages
* // than there are selectable pages
* $pagination->always_show_navigation(false);
* </code>
*
* @param boolean $show (Optional) If set to FALSE, the "previous page" and "next page" links will only be
* shown if there are more pages than set through {@link selectable_pages()}.
*
* Default is TRUE.
*
* @since 2.0
*
* @return void
*/
public function always_show_navigation($show = true)
{
// set property
$this->_properties['always_show_navigation'] = $show;
}
/**
* When you first access a page with navigation you have the same content as you have when you access the first page
* from navigation. For example http://www.mywebsite.com/list will have the same content as http://www.mywebsite.com/list?page=1.
*
* From a search engine's point of view these are 2 distinct URLs having the same content and your pages will be
* penalized for that.
*
* So, by default, in order to avoid this, the library will have for the first page (or last, if you are displaying
* links in {@link reverse() reverse} order) the same path as you have for when you are accessing the page for the
* first (unpaginated) time.
*
* If you want to disable this behaviour call this method with its argument set to FALSE.
*
* <code>
* // don't avoid duplicate content
* $pagination->avoid_duplicate_content(false);
* </code>
*
* @param boolean $avoid_duplicate_content (Optional) If set to FALSE, the library will have for the first
* page (or last, if you are displaying links in {@link reverse() reverse}
* order) a different path than the one you have when you are accessing
* the page for the first (unpaginated) time.
*
* Default is TRUE.
*
* @return void
*
* @since 2.0
*/
function avoid_duplicate_content($avoid_duplicate_content = true)
{
// set property
$this->_properties['avoid_duplicate_content'] = $avoid_duplicate_content;
}
/**
* The base URL to be used when generating the navigation links.
*
* This is helpful for the case when, for example, the URL where the records are paginated may have parameters that
* are needed only once and need to be removed for any subsequent requests generated by pagination.
*
* For example, suppose some records are paginated at <i>http://yourwebsite/mypage/</i>. When a record from the list
* is updated, the URL could become something like <i>http://youwebsite/mypage/?action=updated</i>. Based on the
* value of <i>action</i> a message would be shown to the user.
*
* Because of the way this script works, the pagination links would become:
*
* - <i>http://youwebsite/mypage/?action=updated&page=[page number]</i> when {@link method()} is "get" and
* {@link variable_name()} is "page";
*
* - <i>http://youwebsite/mypage/page[page number]/?action=updated</i> when {@link method()} is "url" and
* {@link variable_name()} is "page").
*
* Because of this, whenever the user would paginate, the message would be shown to him again and again because
* <i>action</i> will be preserved in the URL!
*
* The solution is to set the <i>base_url</i> to <i>http://youwebsite/mypage/</i> and in this way, regardless of
* however will the URL be changed, the pagination links will always be in the form of
*
* - <i>http://youwebsite/mypage/?page=[page number]</i> when {@link method()} is "get" and {@link variable_name()}
* is "page";
*
* - <i>http://youwebsite/mypage/page[page number]/</i> when {@link method()} is "url" and {@link variable_name()} is "page").
*
* Of course, you may still have query strings in the value of the $base_url if you wish so, and these will be
* preserved when paginating.
*
* <samp>If you want to preserve the hash in the URL, make sure you load the zebra_pagination.js file!</samp>
*
* @param string $base_url (Optional) The base URL to be used when generating the navigation
* links
*
* Defaults is whatever returned by
* {@link http://www.php.net/manual/en/reserved.variables.server.php $_SERVER['REQUEST_URI']}
*
* @param boolean $preserve_query_string (Optional) Indicates whether values in query strings, other than
* those set in $base_url, should be preserved
*
* Default is TRUE
*
* @return void
*/
public function base_url($base_url = '', $preserve_query_string = true)
{
// set the base URL
$base_url = ($base_url == '' ? $_SERVER['REQUEST_URI'] : $base_url);
// parse the URL
$parsed_url = parse_url($base_url);
// cache the "path" part of the URL (that is, everything *before* the "?")
$this->_properties['base_url'] = $parsed_url['path'];
// cache the "query" part of the URL (that is, everything *after* the "?")
$this->_properties['base_url_query'] = isset($parsed_url['query']) ? $parsed_url['query'] : '';
// store query string as an associative array
parse_str($this->_properties['base_url_query'], $this->_properties['base_url_query']);
// should query strings (other than those set in $base_url) be preserved?
$this->_properties['preserve_query_string'] = $preserve_query_string;
}
/**
* Returns the current page's number.
*
* <code>
* // echoes the current page
* echo $pagination->get_page();
* </code>
*
* @return integer Returns the current page's number
*/
public function get_page()
{
// unless page was not specifically set through the "set_page" method
if (!$this->_properties['page_set']) {
// if
if (
// page propagation is SEO friendly
$this->_properties['method'] == 'url' &&
// the current page is set in the URL
preg_match('/\b' . preg_quote($this->_properties['variable_name']) . '([0-9]+)\b/i', $_SERVER['REQUEST_URI'], $matches) > 0
)
// set the current page to whatever it is indicated in the URL
$this->set_page((int) $matches[1]);
// if page propagation is done through GET and the current page is set in $_GET
elseif (isset($_GET[$this->_properties['variable_name']]))
// set the current page to whatever it was set to
$this->set_page((int) $_GET[$this->_properties['variable_name']]);
}
// if showing records in reverse order we must know the total number of records and the number of records per page
// *before* calling the "get_page" method
if ($this->_properties['reverse'] && $this->_properties['records'] == '')
trigger_error('When showing records in reverse order you must specify the total number of records (by calling the "records" method) *before* the first use of the "get_page" method!', E_USER_ERROR);
if ($this->_properties['reverse'] && $this->_properties['records_per_page'] == '')
trigger_error('When showing records in reverse order you must specify the number of records per page (by calling the "records_per_page" method) *before* the first use of the "get_page" method!', E_USER_ERROR);
// get the total number of pages
$this->_properties['total_pages'] = $this->get_pages();
// if there are any pages
if ($this->_properties['total_pages'] > 0) {
// if current page is beyond the total number pages
/// make the current page be the last page
if ($this->_properties['page'] > $this->_properties['total_pages'])
$this->_properties['page'] = $this->_properties['total_pages'];
// if current page is smaller than 1
// make the current page 1
elseif ($this->_properties['page'] < 1)
$this->_properties['page'] = 1;
}
// if we're just starting and we have to display links in reverse order
// set the first to the last one rather then first
if (!$this->_properties['page_set'] && $this->_properties['reverse'])
$this->set_page($this->_properties['total_pages']);
// return the current page
return $this->_properties['page'];
}
/**
* Returns the total number of pages, based on the total number of records and the number of records to be shown
* per page.
*
* <code>
* // get the total number of pages
* echo $pagination->get_pages();
* </code>
*
* @since 2.1
*
* @return integer Returns the total number of pages, based on the total number of records and the number of
* records to be shown per page.
*/
public function get_pages()
{
// return the total number of pages based on the total number of records and number of records to be shown per page
return @ceil($this->_properties['records'] / $this->_properties['records_per_page']);
}
/**
* Change the labels for the "previous page" and "next page" links.
*
* <code>
* // change the default labels
* $pagination->labels('Previous', 'Next');
* </code>
*
* @param string $previous (Optional) The label for the "previous page" link.
*
* Default is "Previous page".
*
* @param string $next (Optional) The label for the "next page" link.
*
* Default is "Next page".
* @return void
*
* @since 2.0
*/
public function labels($previous = 'Previous page', $next = 'Next page')
{
// set the labels
$this->_properties['previous'] = $previous;
$this->_properties['next'] = $next;
}
/**
* Set the method to be used for page propagation.
*
* <code>
* // set the method to the SEO friendly way
* $pagination->method('url');
* </code>
*
* @param string $method (Optional) The method to be used for page propagation.
*
* Values can be:
*
* - <b>url</b> - page propagation is done in a SEO friendly way;
*
* This method requires the {@link http://httpd.apache.org/docs/current/mod/mod_rewrite.html mod_rewrite}
* module to be enabled on your Apache server (or the equivalent for other web servers);
*
* When using this method, the current page will be passed in the URL as
* <i>http://youwebsite.com/yourpage/[variable name][page number]/</i> where
* <i>[variable name]</i> is set by {@link variable_name()} and <i>[page number]</i>
* represents the current page.
*
* - <b>get</b> - page propagation is done through GET;
*
* When using this method, the current page will be passed in the URL as
* <i>http://youwebsite.com/yourpage?[variable name]=[page number]</i> where
* <i>[variable name]</i> is set by {@link variable_name()} and <i>[page number]</i>
* represents the current page.
*
* Default is "get".
*
* @returns void
*/
public function method($method = 'get')
{
// set the page propagation method
$this->_properties['method'] = (strtolower($method) == 'url' ? 'url' : 'get');
}
/**
* By default, next/previous page links are shown on the outside of the links to individual pages.
*
* These links can also be shown both on the left or on the right of the links to individual pages by setting the
* method's argument to "left" or "right" respectively.
*
* @param string $position Setting this argument to "left" or "right" will instruct the script to show next/previous
* page links on the left or on the right of the links to individual pages.
*
* Allowed values are "left", "right" and "outside".
*
* Default is "outside".
*
* @since 2.1
*
* @return void
*/
function navigation_position($position)
{
// set the positioning of next/previous page links
$this->_properties['navigation_position'] = (in_array(strtolower($position), array('left', 'right')) ? strtolower($position) : 'outside');
}
/**
* Sets whether page numbers should be prefixed by zeroes.
*
* This is useful to keep the layout consistent by having the same number of characters for each page number.
*
* <code>
* // disable padding numbers with zeroes
* $pagination->padding(false);
* </code>
*
* @param boolean $enabled (Optional) Setting this property to FALSE will disable padding rather than
* enabling it.
*
* Default is TRUE.
*
* @return void
*/
public function padding($enabled = true)
{
// set padding
$this->_properties['padding'] = $enabled;
}
/**
* Sets the total number of records that need to be paginated.
*
* Based on this and on the value of {@link records_per_page()}, the script will know how many pages there are.
*
* The total number of pages is given by the fraction between the total number records (set through {@link records()})
* and the number of records that are shown on a page (set through {@link records_per_page()}).
*
* <code>
* // tell the script that there are 100 total records
* $pagination->records(100);
* </code>
*
* @param integer $records The total number of records that need to be paginated
*
* @return void
*/
public function records($records)
{
// the number of records
// make sure we save it as an integer
$this->_properties['records'] = (int) $records;
}
/**
* Sets the number of records that are displayed on one page.
*
* Based on this and on the value of {@link records()}, the script will know how many pages there are: the total
* number of pages is given by the fraction between the total number of records and the number of records that are
* shown on one page.
*
* <code>
* // tell the class that there are 20 records displayed on one page
* $pagination->records_per_page(20);
* </code>
*
* @param integer $records_per_page The number of records displayed on one page.
*
* Default is 10.
*
* @return void
*/
public function records_per_page($records_per_page)
{
// the number of records displayed on one page
// make sure we save it as an integer
$this->_properties['records_per_page'] = (int) $records_per_page;
}
/**
* Generates the output.
*
* <i>Make sure your script references the CSS file!</i>
*
* <code>
* // generate output but don't echo it
* // but return it instead
* $output = $pagination->render(true);
* </code>
*
* @param boolean $return_output (Optional) Setting this argument to TRUE will instruct the script to
* return the generated output rather than outputting it to the screen.
*
* Default is FALSE.
*
* @return void
*/
public function render($return_output = false)
{
// get some properties of the class
$this->get_page();
// if there is a single page, or no pages at all, don't display anything
if ($this->_properties['total_pages'] <= 1)
return '';
// start building output
$output = '<div class="Zebra_Pagination"><ul>';
// if we're showing records in reverse order
if ($this->_properties['reverse']) {
// if "next page" and "previous page" links are to be shown to the left of the links to individual pages
if ($this->_properties['navigation_position'] == 'left')
// first show next/previous and then page links
$output .= $this->_show_next() . $this->_show_previous() . $this->_show_pages();
// if "next page" and "previous page" links are to be shown to the right of the links to individual pages
elseif ($this->_properties['navigation_position'] == 'right')
$output .= $this->_show_pages() . $this->_show_next() . $this->_show_previous();
// if "next page" and "previous page" links are to be shown on the outside of the links to individual pages
else
$output .= $this->_show_next() . $this->_show_pages() . $this->_show_previous();
// if we're showing records in natural order
} else {
// if "next page" and "previous page" links are to be shown to the left of the links to individual pages
if ($this->_properties['navigation_position'] == 'left')
// first show next/previous and then page links
$output .= $this->_show_previous() . $this->_show_next() . $this->_show_pages();
// if "next page" and "previous page" links are to be shown to the right of the links to individual pages
elseif ($this->_properties['navigation_position'] == 'right')
$output .= $this->_show_pages() . $this->_show_previous() . $this->_show_next();
// if "next page" and "previous page" links are to be shown on the outside of the links to individual pages
else
$output .= $this->_show_previous() . $this->_show_pages() . $this->_show_next();
}
// finish generating the output
$output .= '</ul></div>';
// if $return_output is TRUE
// return the generated content
if ($return_output)
return $output;
// if script gets this far, print generated content to the screen
echo $output;
}
/**
* By default, pagination links are shown in natural order, from 1 to the number of total pages.
*
* Calling this method with the argument set to TRUE will generate links in reverse order, from the number of total
* pages to 1.
*
* <code>
* // show pagination links in reverse order rather than in natural order
* $pagination->reverse(true);
* </code>
*
* @param boolean $reverse (Optional) Set it to TRUE to generate navigation links in reverse order.
*
* Default is FALSE.
*
* @return void
*
* @since 2.0
*/
public function reverse($reverse = false)
{
// set how the pagination links should be generated
$this->_properties['reverse'] = $reverse;
}
/**
* Sets the number of links to be displayed at once (besides the "previous page" and "next page" links)
*
* <code>
* // display links to 15 pages
* $pagination->selectable_pages(15);
* </code>
*
* @param integer $selectable_pages The number of links to be displayed at once (besides the "previous page"
* and "next page" links).
*
* <i>You should set this to an odd number so that the same number of links
* will be shown to the left and to the right of the current page.</i>
*
* Default is 11.
*
* @return void
*/
public function selectable_pages($selectable_pages)
{
// the number of selectable pages
// make sure we save it as an integer
$this->_properties['selectable_pages'] = (int) $selectable_pages;
}
/**
* Sets the current page.
*
* <code>
* // sets the fifth page as the current page
* $pagination->set_page(5);
* </code>
*
* @param integer $page The page's number.
*
* A number lower than <b>1</b> will be interpreted as <b>1</b>, while a number
* greater than the total number of pages will be interpreted as the last page.
*
* The total number of pages is given by the fraction between the total number
* records (set through {@link records()}) and the number of records that are
* shown on one page (set through {@link records_per_page()}).
*
* @return void
*/
public function set_page($page)
{
// set the current page
// make sure we save it as an integer
$this->_properties['page'] = (int) $page;
// if the number is lower than one
// make it '1'
if ($this->_properties['page'] < 1)
$this->_properties['page'] = 1;
// set a flag so that the "get_page" method doesn't change this value
$this->_properties['page_set'] = true;
}
/**
* Enables or disabled trailing slash on the generated URLs when {@link method} is "url".
*
* Read more on the subject on {@link http://googlewebmastercentral.blogspot.com/2010/04/to-slash-or-not-to-slash.html Google Webmasters's official blog}.
*
* <code>
* // disables trailing slashes on generated URLs
* $pagination->trailing_slash(false);
* </code>
*
* @param boolean $enabled (Optional) Setting this property to FALSE will disable trailing slashes on generated
* URLs when {@link method} is "url".
*
* Default is TRUE (trailing slashes are enabled by default).
*
* @return void
*/
public function trailing_slash($enabled)
{
// set the state of trailing slashes
$this->_properties['trailing_slash'] = $enabled;
}
/**
* Sets the variable name to be used for page propagation.
*
* <code>
* // sets the variable name to "foo"
* // now, in the URL, the current page will be passed either as "foo=[page number]" (if method is "get") or
* // as "/foo[page number]" (if method is "url")
* $pagination->variable_name('foo');
* </code>
*
* @param string $variable_name A string representing the variable name to be used for page propagation.
*
* Default is "page".
*
* @return void
*/
public function variable_name($variable_name)
{
// set the variable name
$this->_properties['variable_name'] = strtolower($variable_name);
}
/**
* Generate the link for the page given as argument.
*
* @access private
*
* @return void
*/
private function _build_uri($page)
{
// if page propagation method is through SEO friendly URLs
if ($this->_properties['method'] == 'url') {
// see if the current page is already set in the URL
if (preg_match('/\b' . $this->_properties['variable_name'] . '([0-9]+)\b/i', $this->_properties['base_url'], $matches) > 0) {
// build string
$url = str_replace('//', '/', preg_replace(
// replace the currently existing value
'/\b' . $this->_properties['variable_name'] . '([0-9]+)\b/i',
// if on the first page, remove it in order to avoid duplicate content
($page == 1 ? '' : $this->_properties['variable_name'] . $page), $this->_properties['base_url']
));
// if the current page is not yet in the URL, set it, unless we're on the first page
// case in which we don't set it in order to avoid duplicate content
} else
$url = rtrim($this->_properties['base_url'], '/') . '/' . ($this->_properties['variable_name'] . $page);
// handle trailing slash according to preferences
$url = rtrim($url, '/') . ($this->_properties['trailing_slash'] ? '/' : '');
// if values in the query string - other than those set through base_url() - are not to be preserved
// preserve only those set initially
if (!$this->_properties['preserve_query_string'])
$query = implode('&', $this->_properties['base_url_query']);
// otherwise, get the current query string
else
$query = $_SERVER['QUERY_STRING'];
// return the built string also appending the query string, if any
return $url . ($query != '' ? '?' . $query : '');
// if page propagation is to be done through GET
} else {
// if values in the query string - other than those set through base_url() - are not to be preserved
// preserve only those set initially
if (!$this->_properties['preserve_query_string'])
$query = $this->_properties['base_url_query'];
// otherwise, get the current query string, if any, and transform it to an array
else
parse_str($_SERVER['QUERY_STRING'], $query);
// if we are avoiding duplicate content and if not the first/last page (depending on whether the pagination links are shown in natural or reversed order)
if (!$this->_properties['avoid_duplicate_content'] || ($page != ($this->_properties['reverse'] ? $this->_properties['total_pages'] : 1)))
// add/update the page number
$query[$this->_properties['variable_name']] = $page;
// if we are avoiding duplicate content, don't use the "page" variable on the first/last page
elseif ($this->_properties['avoid_duplicate_content'] && $page == ($this->_properties['reverse'] ? $this->_properties['total_pages'] : 1))
unset($query[$this->_properties['variable_name']]);
// make sure the returned HTML is W3C compliant
return htmlspecialchars(html_entity_decode($this->_properties['base_url']) . (!empty($query) ? '?' . urldecode(http_build_query($query)) : ''));
}
}
/**
* Generates the "next page" link, depending on whether the pagination links are shown in natural or reversed order.
*
* @access private
*/
private function _show_next()
{
$output = '';
// if "always_show_navigation" is TRUE or
// if the total number of available pages is greater than the number of pages to be displayed at once
// it means we can show the "next page" link
if ($this->_properties['always_show_navigation'] || $this->_properties['total_pages'] > $this->_properties['selectable_pages'])
$output = '<li><a href="' .
// the href is different if we're on the last page
($this->_properties['page'] == $this->_properties['total_pages'] ? 'javascript:void(0)' : $this->_build_uri($this->_properties['page'] + 1)) .
// if we're on the last page, the link is disabled
// also different class if links are in reverse order
'" class="navigation ' . ($this->_properties['reverse'] ? 'previous' : 'next') . ($this->_properties['page'] == $this->_properties['total_pages'] ? ' disabled' : '') . '"' .
// good for SEO
// http://googlewebmastercentral.blogspot.de/2011/09/pagination-with-relnext-and-relprev.html
' rel="next"' .
'>' . $this->_properties['next'] . '</a></li>';
// return the resulting string
return $output;
}
/**
* Generates the pagination links (minus "next" and "previous"), depending on whether the pagination links are shown
* in natural or reversed order.
*
* @access private
*/
private function _show_pages()
{
$output = '';
// if the total number of pages is lesser than the number of selectable pages
if ($this->_properties['total_pages'] <= $this->_properties['selectable_pages']) {
// iterate ascendingly or descendingly depending on whether we're showing links in reverse order or not)
for (
$i = ($this->_properties['reverse'] ? $this->_properties['total_pages'] : 1); ($this->_properties['reverse'] ? $i >= 1 : $i <= $this->_properties['total_pages']); ($this->_properties['reverse'] ? $i-- : $i++)
)
// render the link for each page
$output .= '<li><a href="' . $this->_build_uri($i) . '" ' .
// make sure to highlight the currently selected page
($this->_properties['page'] == $i ? 'class="current"' : '') . '>' .
// apply padding if required
($this->_properties['padding'] ? str_pad($i, strlen($this->_properties['total_pages']), '0', STR_PAD_LEFT) : $i) .
'</a></li>';
// if the total number of pages is greater than the number of selectable pages
} else {
// start with a link to the first or last page, depending if we're displaying links in reverse order or not
$output .= '<li><a href="' . $this->_build_uri($this->_properties['reverse'] ? $this->_properties['total_pages'] : 1) . '" ' .
// highlight if the page is currently selected
($this->_properties['page'] == ($this->_properties['reverse'] ? $this->_properties['total_pages'] : 1) ? 'class="current"' : '') . '>' .
// if padding is required
($this->_properties['padding'] ?
// apply padding
str_pad(($this->_properties['reverse'] ? $this->_properties['total_pages'] : 1), strlen($this->_properties['total_pages']), '0', STR_PAD_LEFT) :
// show the page number
($this->_properties['reverse'] ? $this->_properties['total_pages'] : 1)) .
'</a></li>';
// compute the number of adjacent pages to display to the left and right of the currently selected page so
// that the currently selected page is always centered
$adjacent = floor(($this->_properties['selectable_pages'] - 3) / 2);
// this number must be at least 1
if ($adjacent == 0)
$adjacent = 1;
// find the page number after we need to show the first "..."
// (depending on whether we're showing links in reverse order or not)
$scroll_from = ($this->_properties['reverse'] ?
$this->_properties['total_pages'] - ($this->_properties['selectable_pages'] - $adjacent) + 1 :
$this->_properties['selectable_pages'] - $adjacent);
// get the page number from where we should start rendering
// if displaying links in natural order, then it's "2" because we have already rendered the first page
// if we're displaying links in reverse order, then it's total_pages - 1 because we have already rendered the last page
$starting_page = ($this->_properties['reverse'] ? $this->_properties['total_pages'] - 1 : 2);
// if the currently selected page is past the point from where we need to scroll,
// we need to adjust the value of $starting_page
if (
($this->_properties['reverse'] && $this->_properties['page'] <= $scroll_from) ||
(!$this->_properties['reverse'] && $this->_properties['page'] >= $scroll_from)
) {
// by default, the starting_page should be whatever the current page plus/minus $adjacent
// depending on whether we're showing links in reverse order or not
$starting_page = $this->_properties['page'] + ($this->_properties['reverse'] ? $adjacent : -$adjacent);
// but if that would mean displaying less navigation links than specified in $this->_properties['selectable_pages']
if (
($this->_properties['reverse'] && $starting_page < ($this->_properties['selectable_pages'] - 1)) ||
(!$this->_properties['reverse'] && $this->_properties['total_pages'] - $starting_page < ($this->_properties['selectable_pages'] - 2))
)
// adjust the value of $starting_page again
if ($this->_properties['reverse'])
$starting_page = $this->_properties['selectable_pages'] - 1;
else
$starting_page -= ($this->_properties['selectable_pages'] - 2) - ($this->_properties['total_pages'] - $starting_page);
// put the "..." after the link to the first/last page
// depending on whether we're showing links in reverse order or not
$output .= '<li><span>…</span></li>';
}
// get the page number where we should stop rendering
// by default, this value is the sum of the starting page plus/minus (depending on whether we're showing links
// in reverse order or not) whatever the number of $this->_properties['selectable_pages'] minus 3 (first page,
// last page and current page)
$ending_page = $starting_page + (($this->_properties['reverse'] ? -1 : 1) * ($this->_properties['selectable_pages'] - 3));
// if we're showing links in natural order and ending page would be greater than the total number of pages minus 1
// (minus one because we don't take into account the very last page which we output automatically)
// adjust the ending page
if ($this->_properties['reverse'] && $ending_page < 2)
$ending_page = 2;
// or, if we're showing links in reverse order, and ending page would be smaller than 2
// (2 because we don't take into account the very first page which we output automatically)
// adjust the ending page
elseif (!$this->_properties['reverse'] && $ending_page > $this->_properties['total_pages'] - 1)
$ending_page = $this->_properties['total_pages'] - 1;
// render pagination links
for ($i = $starting_page; $this->_properties['reverse'] ? $i >= $ending_page : $i <= $ending_page; $this->_properties['reverse'] ? $i-- : $i++)
$output .= '<li><a href="' . $this->_build_uri($i) . '" ' .
// highlight the currently selected page
($this->_properties['page'] == $i ? 'class="current"' : '') . '>' .
// apply padding if required
($this->_properties['padding'] ? str_pad($i, strlen($this->_properties['total_pages']), '0', STR_PAD_LEFT) : $i) .
'</a></li>';
// if we have to, place another "..." at the end, before the link to the last/first page (depending on whether
// we're showing links in reverse order or not)
if (
($this->_properties['reverse'] && $ending_page > 2) ||
(!$this->_properties['reverse'] && $this->_properties['total_pages'] - $ending_page > 1)
)
$output .= '<li><span>…</span></li>';
// put a link to the last/first page (depending on whether we're showing links in reverse order or not)
$output .= '<li><a href="' . $this->_build_uri($this->_properties['reverse'] ? 1 : $this->_properties['total_pages']) . '" ' .
// highlight if it is the currently selected page
($this->_properties['page'] == $i ? 'class="current"' : '') . '>' .
// also, apply padding if necessary
($this->_properties['padding'] ? str_pad(($this->_properties['reverse'] ? 1 : $this->_properties['total_pages']), strlen($this->_properties['total_pages']), '0', STR_PAD_LEFT) : ($this->_properties['reverse'] ? 1 : $this->_properties['total_pages'])) .
'</a></li>';
}
// return the resulting string
return $output;
}
/**
* Generates the "previous page" link, depending on whether the pagination links are shown in natural or reversed order.
*
* @access private
*/
private function _show_previous()
{
$output = '';
// if "always_show_navigation" is TRUE or
// if the number of total pages available is greater than the number of selectable pages
// it means we can show the "previous page" link
if ($this->_properties['always_show_navigation'] || $this->_properties['total_pages'] > $this->_properties['selectable_pages'])
$output = '<li><a href="' .
// the href is different if we're on the first page
($this->_properties['page'] == 1 ? 'javascript:void(0)' : $this->_build_uri($this->_properties['page'] - 1)) .
// if we're on the first page, the link is disabled
// also different class if links are in reverse order
'" class="navigation ' . ($this->_properties['reverse'] ? 'next' : 'previous') . ($this->_properties['page'] == 1 ? ' disabled' : '') . '"' .
// good for SEO
// http://googlewebmastercentral.blogspot.de/2011/09/pagination-with-relnext-and-relprev.html
' rel="prev"' .
'>' . $this->_properties['previous'] . '</a></li>';
// return the resulting string
return $output;
}
} | parkerj/Liten-Blog | app/src/Paginate.php | PHP | mit | 44,542 |
---
layout: default
title: Tag
---
{% comment%}
Here we generate all the tags.
{% endcomment%}
{% assign rawtags = "" %}
{% for post in site.posts %}
{% assign ttags = post.tags | join:'|' | append:'|' %}
{% assign rawtags = rawtags | append:ttags %}
{% endfor %}
{% assign rawtags = rawtags | split:'|' | sort %}
{% assign tags = "" %}
{% for tag in rawtags %}
{% if tag != "" %}
{% if tags == "" %}
{% assign tags = tag | split:'|' %}
{% endif %}
{% unless tags contains tag %}
{% assign tags = tags | join:'|' | append:'|' | append:tag | split:'|' %}
{% endunless %}
{% endif %}
{% endfor %}
<h1>
{{ page.title }}
</h1>
<br/>
<div class="posts">
<p>
{% for tag in tags %}
<a href="#{{ tag | slugify }}" class="codinfox-tag-mark"> {{ tag }} </a>
{% endfor %}
{% for tag in tags %}
<h2 id="{{ tag | slugify }}">{{ tag }}</h2>
<ul class="codinfox-category-list">
{% for post in site.posts %}
{% if post.tags contains tag %}
<li>
<h3>
<a href="{{ post.url }}">
{{ post.title }}
<small>{{ post.date | date_to_string }}</small>
</a>
{% for tag in post.tags %}
<a class="codinfox-tag-mark" href="/tag.html#{{ tag | slugify }}">{{ tag }}</a>
{% endfor %}
</h3>
</li>
{% endif %}
{% endfor %}
</ul>
{% endfor %}
</div>
| wantingchen/wantingchen.github.io | tag.html | HTML | mit | 1,310 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Microsoft.AspNet.Identity;
using Microsoft.AspNet.Identity.Owin;
namespace ASP.NETWebForms.Account
{
public partial class ManageLogins : System.Web.UI.Page
{
protected string SuccessMessage
{
get;
private set;
}
protected bool CanRemoveExternalLogins
{
get;
private set;
}
private bool HasPassword(ApplicationUserManager manager)
{
return manager.HasPassword(User.Identity.GetUserId());
}
protected void Page_Load(object sender, EventArgs e)
{
var manager = Context.GetOwinContext().GetUserManager<ApplicationUserManager>();
CanRemoveExternalLogins = manager.GetLogins(User.Identity.GetUserId()).Count() > 1;
SuccessMessage = String.Empty;
successMessage.Visible = !String.IsNullOrEmpty(SuccessMessage);
}
public IEnumerable<UserLoginInfo> GetLogins()
{
var manager = Context.GetOwinContext().GetUserManager<ApplicationUserManager>();
var accounts = manager.GetLogins(User.Identity.GetUserId());
CanRemoveExternalLogins = accounts.Count() > 1 || HasPassword(manager);
return accounts;
}
public void RemoveLogin(string loginProvider, string providerKey)
{
var manager = Context.GetOwinContext().GetUserManager<ApplicationUserManager>();
var signInManager = Context.GetOwinContext().Get<ApplicationSignInManager>();
var result = manager.RemoveLogin(User.Identity.GetUserId(), new UserLoginInfo(loginProvider, providerKey));
string msg = String.Empty;
if (result.Succeeded)
{
var user = manager.FindById(User.Identity.GetUserId());
signInManager.SignIn(user, isPersistent: false, rememberBrowser: false);
msg = "?m=RemoveLoginSuccess";
}
Response.Redirect("~/Account/ManageLogins" + msg);
}
}
} | todor-enikov/TelerikAcademy | ASP .NET Web Forms/1.Introduction to ASP.NET/1.Few Web applications/ASP.NETWebForms/Account/ManageLogins.aspx.cs | C# | mit | 2,201 |
<?php include(__DIR__."/../_header.php"); ?>
<div class="container" id="container" style="text-align:center;">
<h1><?=h($city)?> 路燈現況最新資料</h1>
<h2>路燈總覽</h2>
<table class="table table-bordered">
<tr>
<td>路燈狀態</td>
<td>數量</td>
</tr>
<?php
$count_status = ["0" => "正常運作" , "1" => "維修中" , "2" => "已停用"];
$report_status = ["0" => "待處理" , "1" => "已確認報修" , "2" => "無法確認問題"];
foreach($city_counts as $c_count){ ?>
<tr>
<td><?=h($count_status[$c_count->status])?></td>
<td><?=h($c_count->count)?></td>
</tr>
<?php } ?>
</table>
<p> </p>
<h2>報修情形</h2>
<p>尚未處理的報修紀錄</p>
<table class="table table-bordered">
<tr>
<td>報修時間</td>
<td>處理情形 </td>
<td>目前系統路燈狀態 </td>
<td>報修路燈編號</td>
<td>報修人</td>
<td>報修描述</td>
<td>處理結果</td>
</tr>
<?php
foreach($reports as $report){ ?>
<tr>
<td><?=_date_format_utc($report->ctime)?></td>
<td><?=h($report_status[$report->status])?></td>
<td><?=h($count_status[$report->light_status])?></td>
<td><?=h($report->light_name)?></td>
<td><?=h($report->name)?></td>
<td><?=h($report->comment)?></td>
<td>
<?php if($report->status =="0"){ ?>
<a href="<?=site_url("admin/light/set_report_status/".$report->id."/1")?>" class="btn btn-default">請廠商處理</a>
<a href="<?=site_url("admin/light/set_report_status/".$report->id."/0")?>" class="btn btn-default">設為無法確認問題</a>
<?php } ?>
</td>
</tr>
<?php } ?>
</table>
</div>
<?php function js_section(){ ?>
<?php } ?>
<?php include(__DIR__."/../_footer.php"); ?> | tw-chiayi/streetlight-manager | application/views/admin/light/index.php | PHP | mit | 1,874 |
// Portion that builds and runs tests. Assumes that this can be
// done via a call to `make build` and `make test`. Compiler failure
// is assumed to be communicated by return value. Tests are assumed
// to have the following output format:
//
// some test name: <PASS|FAIL>
//
// ...where each test result is on its own line. If multiple tests
// have the same name, then only the last test is recorded.
extern crate serialize;
use self::serialize::json::{ToJson, Json};
use std::collections::HashMap;
use std::io::{BufferedReader, ByRefReader, RefReader, IoResult,
IoError, OtherIoError};
use std::io::pipe::PipeStream;
use std::io::process::{Command, Process, ExitStatus, ExitSignal,
ProcessExit};
use util::MessagingUnwrapper;
use self::BuildResult::{SetupEnvFailure, BuildFailure, TestFailure, TestSuccess};
use self::TestResult::{Pass, Fail};
fn spawn_with_timeout(c: &Command, timeout: Option<u64>) -> IoResult<Process> {
let mut p = try!(c.spawn());
p.set_timeout(timeout);
Ok(p)
}
/// Runs the given command with the given timeout, ignoring the output.
/// If it returns non-zero, then it's a failure, as with a signal.
/// Takes what it should return on success.
pub fn run_command<A>(c: &Command, timeout: Option<u64>, on_success: A) -> IoResult<A> {
(try!(
(try!(
spawn_with_timeout(c, timeout)))
.wait())).if_ok(on_success)
}
// Runs the given chain of commands. Returns the first error.
pub fn run_commands<A>(commands: &Vec<Command>, timeout: Option<u64>, on_success: A) -> IoResult<A> {
for cmd in commands.iter() {
try!(run_command(cmd, timeout.clone(), ()));
}
Ok(on_success)
}
trait ErrorSimplifier {
fn if_ok<A>(&self, ret_this: A) -> IoResult<A>;
}
impl ErrorSimplifier for ProcessExit {
fn if_ok<A>(&self, ret_this: A) -> IoResult<A> {
match *self {
ExitStatus(0) => Ok(ret_this),
ExitStatus(x) => Err(
IoError {
kind: OtherIoError,
desc: "Non-zero exit code",
detail: Some(x.to_string())
}),
ExitSignal(x) => Err(
IoError {
kind: OtherIoError,
desc: "Exit signal",
detail: Some(x.to_string())
})
}
}
}
#[deriving(Show, PartialEq)]
pub enum TestResult {
Pass,
Fail
}
impl ToJson for TestResult {
fn to_json(&self) -> Json {
let as_bool =
match self {
&Pass => true,
&Fail => false
};
as_bool.to_json()
}
}
struct ProcessReader {
p: Process
}
impl ProcessReader {
fn new(cmd: &Command, timeout: Option<u64>) -> IoResult<ProcessReader> {
spawn_with_timeout(cmd, timeout).map(|p| ProcessReader { p: p })
}
fn output_reader<'a>(&'a mut self) -> BufferedReader<RefReader<'a, PipeStream>> {
// unwrap should be ok - the documentation says `Some` is the default,
// and we are not messing with any of the defaults
BufferedReader::new(
self.p.stdout.as_mut().unwrap_msg(line!()).by_ref())
}
}
fn parse_test_result(line: &str) -> IoResult<TestResult> {
match line {
"PASS" => Ok(Pass),
"FAIL" => Ok(Fail),
_ => Err(
IoError {
kind: OtherIoError,
desc: "Malformed test result",
detail: Some(line.to_string())
})
}
}
fn parse_line(line: &str) -> IoResult<(String, TestResult)> {
let results: Vec<&str> = line.split_str(":").collect();
if results.len() == 2 {
parse_test_result(results[1]).map(|res| {
(results[0].to_string(), res)
})
} else {
Err(
IoError {
kind: OtherIoError,
desc: "Malformed test string",
detail: Some(line.to_string())
})
}
}
#[deriving(Show)]
pub enum BuildResult {
SetupEnvFailure(IoError),
BuildFailure(IoError),
TestFailure(IoError),
TestSuccess(HashMap<String, TestResult>)
}
impl BuildResult {
// Unlike to_json, this consumes the argument. This avoids copying.
pub fn consume_to_json(self) -> Json {
fn error_to_json(error_name: &str, error_desc: &IoError) -> Json {
let mut map = HashMap::new();
map.insert("error".to_string(), error_name.to_string());
map.insert("description".to_string(), error_desc.to_string());
map.to_json()
}
match self {
SetupEnvFailure(ref e) =>
error_to_json("Environment setup", e),
BuildFailure(ref e) =>
error_to_json("Build failure", e),
TestFailure(ref e) =>
error_to_json("Testing execution failure", e),
TestSuccess(res) => {
let mut map = HashMap::new();
map.insert("success".to_string(), res);
map.to_json()
}
}
}
} // BuildResult
pub trait WholeBuildable {
// BEGIN FUNCTIONS TO IMPLEMENT
fn env_timeout(&self) -> Option<u64>;
fn env_commands(&self) -> Vec<Command>;
fn build_timeout(&self) -> Option<u64>;
fn build_commands(&self) -> Vec<Command>;
fn test_timeout(&self) -> Option<u64>;
fn test_command(&self) -> Command;
// END FUNCTIONS TO IMPLEMENT
/// Gets everything in order for testing to be performed.
/// After calling this, it is assumed that we are ready
/// to call make
fn setup_env(&self) -> IoResult<()> {
run_commands(&self.env_commands(), self.env_timeout(), ())
}
fn do_build(&self) -> IoResult<()> {
run_commands(&self.build_commands(), self.build_timeout(), ())
}
fn do_testing(&self) -> IoResult<HashMap<String, TestResult>> {
let mut reader =
try!(ProcessReader::new(&self.test_command(), self.test_timeout()));
let mut map = HashMap::new();
for op_line in reader.output_reader().lines() {
let (k, v) = try!(
parse_line(
try!(op_line).as_slice().trim()));
map.insert(k, v);
}
Ok(map)
}
fn whole_build(&self) -> BuildResult {
// Because we have different results for different kinds
// of failures, we cannot use `try!`
match self.setup_env() {
Ok(_) => {
match self.do_build() {
Ok(_) => {
match self.do_testing() {
Ok(res) => TestSuccess(res),
Err(e) => TestFailure(e)
}
},
Err(e) => BuildFailure(e)
}
},
Err(e) => SetupEnvFailure(e)
}
}
}
pub trait ToWholeBuildable<A : WholeBuildable> {
fn to_whole_buildable(&self) -> A;
}
pub mod github {
extern crate github;
use std::io::Command;
use std::rand;
use self::github::notification::PushNotification;
use self::github::clone_url::CloneUrl;
use super::{WholeBuildable, ToWholeBuildable, run_command};
use super::testing::TestingRequest;
use database::PendingBuild;
use util::MessagingUnwrapper;
pub struct GitHubRequest {
build_dir: Path,
branch: String,
clone_url: CloneUrl,
testing_req: TestingRequest,
}
impl GitHubRequest {
pub fn new(pn: &PushNotification, mut build_root: Path, makefile_loc: Path) -> GitHubRequest {
// Each build should be isolated in its own directory; simple
// hack is to use large random numbers to achieve this
build_root.push(rand::random::<u64>().to_string());
GitHubRequest {
build_dir: build_root.clone(),
branch: pn.branch.clone(),
clone_url: pn.clone_url.clone(),
testing_req: TestingRequest::new(build_root, makefile_loc)
}
}
}
impl WholeBuildable for GitHubRequest {
fn env_timeout(&self) -> Option<u64> { None }
fn build_timeout(&self) -> Option<u64> { None }
fn test_timeout(&self) -> Option<u64> { None }
fn env_commands(&self) -> Vec<Command> {
let mut mkdir = Command::new("mkdir");
mkdir.arg(self.build_dir.as_str().unwrap_msg(line!()));
let mut clone = Command::new("git");
clone.arg("clone").arg("-b").arg(self.branch.as_slice());
clone.arg(self.clone_url.url.serialize());
clone.arg(".");
clone.cwd(&self.build_dir);
let mut retval = vec!(mkdir, clone);
retval.push_all(self.testing_req.env_commands().as_slice());
retval
}
fn build_commands(&self) -> Vec<Command> {
self.testing_req.build_commands()
}
fn test_command(&self) -> Command {
self.testing_req.test_command()
}
}
impl ToWholeBuildable<GitHubRequest> for PendingBuild {
fn to_whole_buildable(&self) -> GitHubRequest {
PushNotification {
clone_url: self.clone_url.clone(),
branch: self.branch.clone()
}.to_whole_buildable()
}
}
impl ToWholeBuildable<GitHubRequest> for PushNotification {
fn to_whole_buildable(&self) -> GitHubRequest {
GitHubRequest::new(
self,
Path::new("build_test"),
Path::new("test/makefile"))
}
}
impl Drop for GitHubRequest {
#[allow(unused_must_use)]
fn drop(&mut self) {
let mut c = Command::new("rm");
c.arg("-rf");
c.arg(self.build_dir.as_str().unwrap_msg(line!()));
run_command(&c, None, ());
}
}
}
#[cfg(test)]
mod process_tests {
use std::io::process::Command;
use super::{run_command, ProcessReader};
use util::MessagingUnwrapper;
#[test]
fn echo_ok() {
assert!(run_command(&*Command::new("echo").arg("foobar"), None, ()).is_ok());
}
#[test]
fn false_ok() {
assert!(run_command(&Command::new("false"), None, ()).is_err());
}
fn output_from_command(cmd: &Command) -> Vec<String> {
let pr = ProcessReader::new(cmd, None);
assert!(pr.is_ok());
pr.unwrap_msg(line!()).output_reader().lines()
.map(|line| {
assert!(line.is_ok());
line.unwrap_msg(line!()).as_slice().trim().to_string()
}).collect()
}
#[test]
fn output_single_line_read() {
let lines = output_from_command(
&*Command::new("sh").arg("-c").arg("echo foobar"));
assert_eq!(lines.len(), 1);
assert_eq!(lines[0].as_slice(), "foobar");
}
#[test]
fn output_multi_line_read() {
let lines = output_from_command(
&*Command::new("sh").arg("-c").arg("echo foo; echo bar"));
assert_eq!(lines.len(), 2);
assert_eq!(lines[0].as_slice(), "foo");
assert_eq!(lines[1].as_slice(), "bar");
}
}
#[cfg(test)]
mod parse_tests {
use super::TestResult::{Pass, Fail};
use super::{parse_test_result, parse_line};
use util::MessagingUnwrapper;
#[test]
fn parse_test_pass() {
let res = parse_test_result("PASS");
assert!(res.is_ok());
assert_eq!(res.unwrap_msg(line!()), Pass);
}
#[test]
fn parse_test_fail() {
let res = parse_test_result("FAIL");
assert!(res.is_ok());
assert_eq!(res.unwrap_msg(line!()), Fail);
}
#[test]
fn parse_test_bad_test() {
let res = parse_test_result("foobar");
assert!(res.is_err());
}
#[test]
fn parse_valid_test_line() {
let res = parse_line("my test:PASS");
assert!(res.is_ok());
let (key, result) = res.unwrap_msg(line!());
assert_eq!(key.as_slice(), "my test");
assert_eq!(result, Pass);
}
#[test]
fn parse_invalid_test_line() {
assert!(parse_line("this:is:PASS").is_err());
}
}
pub mod testing {
use std::io::process::Command;
use super::{run_command, WholeBuildable};
use util::MessagingUnwrapper;
pub struct TestingRequest {
pub dir: Path, // directory where the build is to be performed
pub makefile_loc: Path // where the makefile is located
}
impl TestingRequest {
pub fn new(dir: Path, makefile_loc: Path) -> TestingRequest {
TestingRequest {
dir: dir,
makefile_loc: makefile_loc
}
}
fn make_with_arg<A : ToCStr>(&self, arg: A) -> Command {
let mut c = Command::new("make");
c.arg("-s").arg(arg).cwd(&self.dir);
c
}
}
impl Drop for TestingRequest {
/// Automatically deletes the copied-over makefile on test end,
/// along with any applicable executables (namely `a.out`)
#[allow(unused_must_use)]
fn drop(&mut self) {
let dir = self.dir.as_str().unwrap_msg(line!());
run_command(
&*Command::new("rm")
.arg(format!("{}/makefile", dir))
.arg(format!("{}/a.out", dir)),
None,
());
}
}
impl WholeBuildable for TestingRequest {
fn env_timeout(&self) -> Option<u64> { None }
fn env_commands(&self) -> Vec<Command> {
let mut c = Command::new("cp");
c.arg(self.makefile_loc.as_str().unwrap_msg(line!()));
c.arg(self.dir.as_str().unwrap_msg(line!()));
vec!(c)
}
fn build_timeout(&self) -> Option<u64> { None }
fn build_commands(&self) -> Vec<Command> {
vec!(self.make_with_arg("build"))
}
fn test_timeout(&self) -> Option<u64> { None }
fn test_command(&self) -> Command {
self.make_with_arg("test")
}
}
}
#[cfg(test)]
mod build_tests {
use super::BuildResult::TestSuccess;
use super::TestResult::{Pass, Fail};
use super::WholeBuildable;
use super::testing::TestingRequest;
use util::MessagingUnwrapper;
fn req(name: &str) -> TestingRequest {
TestingRequest::new(
Path::new(format!("test/{}", name).as_slice()),
Path::new("test/makefile"))
}
#[test]
fn makefile_copy_ok() {
assert!(req("compile_error").setup_env().is_ok());
}
#[test]
fn expected_compile_failure() {
let r = req("compile_error");
assert!(r.setup_env().is_ok());
assert!(r.do_build().is_err());
}
#[test]
fn expected_compile_success() {
let r = req("compile_success");
assert!(r.setup_env().is_ok());
assert!(r.do_build().is_ok());
}
#[test]
fn testing_parsing_empty_success() {
let r = req("testing_parsing_empty_success");
assert!(r.setup_env().is_ok());
assert!(r.do_build().is_ok());
let res = r.do_testing();
assert!(res.is_ok());
assert_eq!(res.unwrap_msg(line!()).len(), 0);
}
#[test]
fn testing_parsing_nonempty_success() {
let r = req("testing_parsing_nonempty_success");
assert!(r.setup_env().is_ok());
assert!(r.do_build().is_ok());
let res = r.do_testing();
assert!(res.is_ok());
let u = res.unwrap_msg(line!());
assert_eq!(u.len(), 2);
let t1 = u.get(&"test1".to_string());
assert!(t1.is_some());
assert_eq!(t1.unwrap_msg(line!()), &Pass);
let t2 = u.get(&"test2".to_string());
assert!(t2.is_some());
assert_eq!(t2.unwrap_msg(line!()), &Fail);
}
#[test]
fn test_whole_build() {
match req("test_whole_build").whole_build() {
TestSuccess(u) => {
let t1 = u.get(&"test1".to_string());
assert!(t1.is_some());
assert_eq!(t1.unwrap_msg(line!()), &Pass);
let t2 = u.get(&"test2".to_string());
assert!(t2.is_some());
assert_eq!(t2.unwrap_msg(line!()), &Fail);
},
_ => { assert!(false); }
};
}
}
| scalableinternetservicesarchive/GradrBackend | libgradr/src/builder.rs | Rust | mit | 16,529 |
<?php
namespace App\Notifications\Banking\Stripe;
use HMS\Entities\Banking\Stripe\Charge;
use Illuminate\Bus\Queueable;
use Illuminate\Notifications\Messages\MailMessage;
use Illuminate\Notifications\Notification;
use Stripe\Dispute;
class DisputeDonationFundsWithdrawn extends Notification
{
use Queueable;
/**
* @var Charge
*/
protected $charge;
/**
* @var Dispute
*/
protected $stripeDispute;
/**
* Create a new notification instance.
*
* @return void
*/
public function __construct(Charge $charge, Dispute $stripeDispute)
{
$this->charge = $charge;
$this->stripeDispute = $stripeDispute;
}
/**
* Get the notification's delivery channels.
*
* @param mixed $notifiable
*
* @return array
*/
public function via($notifiable)
{
return ['mail'];
}
/**
* Get the mail representation of the notification.
*
* @param mixed $notifiable
*
* @return \Illuminate\Notifications\Messages\MailMessage
*/
public function toMail($notifiable)
{
$amount = $this->stripeDispute->amount;
$amountString = money($amount, 'GBP');
return (new MailMessage)
->subject('Donation payment in dispute, funds withdrawn')
->greeting('Hello ' . $notifiable->getDisplayName())
->line(
$this->charge->getUser()->getFullname() .
'\'s Donation payment is in dispute and ' .
$amountString . ' has been withdrawn.'
);
}
}
| NottingHack/hms2 | app/Notifications/Banking/Stripe/DisputeDonationFundsWithdrawn.php | PHP | mit | 1,606 |
/*
* Copyright (c) 2014 Håkan Edling
*
* See the file LICENSE for copying permission.
*/
using System;
using System.Threading.Tasks;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace Goldfish.Tests
{
/// <summary>
/// Integration tests for the author repository.
/// </summary>
[TestClass]
public class AuthorTests
{
public AuthorTests() {
App.Init();
}
[TestMethod, TestCategory("Repositories")]
public async Task AuthorRepository() {
var id = Guid.Empty;
// Insert author
using (var api = new Api()) {
var author = new Models.Author() {
Name = "John Doe",
Email = "john@doe.com"
};
api.Authors.Add(author);
Assert.AreEqual(author.Id.HasValue, true);
Assert.IsTrue(api.SaveChanges() > 0);
id = author.Id.Value;
}
// Get by id
using (var api = new Api()) {
var author = await api.Authors.GetByIdAsync(id);
Assert.IsNotNull(author);
Assert.AreEqual(author.Name, "John Doe");
}
// Update param
using (var api = new Api()) {
var author = await api.Authors.GetByIdAsync(id);
Assert.IsNotNull(author);
author.Name = "John Moe";
api.Authors.Add(author);
Assert.IsTrue(api.SaveChanges() > 0);
}
// Get by id
using (var api = new Api()) {
var author = await api.Authors.GetByIdAsync(id);
Assert.IsNotNull(author);
Assert.AreEqual(author.Name, "John Moe");
}
// Remove author
using (var api = new Api()) {
api.Authors.Remove(id);
Assert.IsTrue(api.SaveChanges() > 0);
}
// Remove system param
using (var api = new Api()) {
var param = api.Params.GetByInternalId("ARCHIVE_PAGE_SIZE");
try {
api.Params.Remove(param);
// The above statement should throw an exception and this
// this assertion should not be reached.
Assert.IsTrue(false);
} catch (Exception ex) {
Assert.IsTrue(ex is UnauthorizedAccessException);
}
}
}
}
}
| ravindranathw/Goldfish | Core/Goldfish.Tests/AuthorTests.cs | C# | mit | 2,048 |
/*!
* # Semantic UI 2.1.7 - Popup
* http://github.com/semantic-org/semantic-ui/
*
*
* Copyright 2015 Contributors
* Released under the MIT license
* http://opensource.org/licenses/MIT
*
*/
;(function ($, window, document, undefined) {
"use strict";
var _module = module;
module.exports = function(parameters) {
var
$allModules = $(this),
$document = $(document),
$window = $(window),
$body = $('body'),
moduleSelector = $allModules.selector || '',
hasTouch = (true),
time = new Date().getTime(),
performance = [],
query = arguments[0],
methodInvoked = (typeof query == 'string'),
queryArguments = [].slice.call(arguments, 1),
returnedValue
;
$allModules
.each(function() {
var
settings = ( $.isPlainObject(parameters) )
? $.extend(true, {}, _module.exports.settings, parameters)
: $.extend({}, _module.exports.settings),
selector = settings.selector,
className = settings.className,
error = settings.error,
metadata = settings.metadata,
namespace = settings.namespace,
eventNamespace = '.' + settings.namespace,
moduleNamespace = 'module-' + namespace,
$module = $(this),
$context = $(settings.context),
$target = (settings.target)
? $(settings.target)
: $module,
$popup,
$offsetParent,
searchDepth = 0,
triedPositions = false,
openedWithTouch = false,
element = this,
instance = $module.data(moduleNamespace),
elementNamespace,
id,
module
;
module = {
// binds events
initialize: function() {
module.debug('Initializing', $module);
module.createID();
module.bind.events();
if( !module.exists() && settings.preserve) {
module.create();
}
module.instantiate();
},
instantiate: function() {
module.verbose('Storing instance', module);
instance = module;
$module
.data(moduleNamespace, instance)
;
},
refresh: function() {
if(settings.popup) {
$popup = $(settings.popup).eq(0);
}
else {
if(settings.inline) {
$popup = $target.nextAll(selector.popup).eq(0);
settings.popup = $popup;
}
}
if(settings.popup) {
$popup.addClass(className.loading);
$offsetParent = module.get.offsetParent();
$popup.removeClass(className.loading);
if(settings.movePopup && module.has.popup() && module.get.offsetParent($popup)[0] !== $offsetParent[0]) {
module.debug('Moving popup to the same offset parent as activating element');
$popup
.detach()
.appendTo($offsetParent)
;
}
}
else {
$offsetParent = (settings.inline)
? module.get.offsetParent($target)
: module.has.popup()
? module.get.offsetParent($popup)
: $body
;
}
if( $offsetParent.is('html') && $offsetParent[0] !== $body[0] ) {
module.debug('Setting page as offset parent');
$offsetParent = $body;
}
if( module.get.variation() ) {
module.set.variation();
}
},
reposition: function() {
module.refresh();
module.set.position();
},
destroy: function() {
module.debug('Destroying previous module');
// remove element only if was created dynamically
if($popup && !settings.preserve) {
module.removePopup();
}
// clear all timeouts
clearTimeout(module.hideTimer);
clearTimeout(module.showTimer);
// remove events
$window.off(elementNamespace);
$module
.off(eventNamespace)
.removeData(moduleNamespace)
;
},
event: {
start: function(event) {
var
delay = ($.isPlainObject(settings.delay))
? settings.delay.show
: settings.delay
;
clearTimeout(module.hideTimer);
if(!openedWithTouch) {
module.showTimer = setTimeout(module.show, delay);
}
},
end: function() {
var
delay = ($.isPlainObject(settings.delay))
? settings.delay.hide
: settings.delay
;
clearTimeout(module.showTimer);
module.hideTimer = setTimeout(module.hide, delay);
},
touchstart: function(event) {
openedWithTouch = true;
module.show();
},
resize: function() {
if( module.is.visible() ) {
module.set.position();
}
},
hideGracefully: function(event) {
// don't close on clicks inside popup
if(event && $(event.target).closest(selector.popup).length === 0) {
module.debug('Click occurred outside popup hiding popup');
module.hide();
}
else {
module.debug('Click was inside popup, keeping popup open');
}
}
},
// generates popup html from metadata
create: function() {
var
html = module.get.html(),
title = module.get.title(),
content = module.get.content()
;
if(html || content || title) {
module.debug('Creating pop-up html');
if(!html) {
html = settings.templates.popup({
title : title,
content : content
});
}
$popup = $('<div/>')
.addClass(className.popup)
.data(metadata.activator, $module)
.html(html)
;
if(settings.inline) {
module.verbose('Inserting popup element inline', $popup);
$popup
.insertAfter($module)
;
}
else {
module.verbose('Appending popup element to body', $popup);
$popup
.appendTo( $context )
;
}
module.refresh();
module.set.variation();
if(settings.hoverable) {
module.bind.popup();
}
settings.onCreate.call($popup, element);
}
else if($target.next(selector.popup).length !== 0) {
module.verbose('Pre-existing popup found');
settings.inline = true;
settings.popups = $target.next(selector.popup).data(metadata.activator, $module);
module.refresh();
if(settings.hoverable) {
module.bind.popup();
}
}
else if(settings.popup) {
$(settings.popup).data(metadata.activator, $module);
module.verbose('Used popup specified in settings');
module.refresh();
if(settings.hoverable) {
module.bind.popup();
}
}
else {
module.debug('No content specified skipping display', element);
}
},
createID: function() {
id = (Math.random().toString(16) + '000000000').substr(2,8);
elementNamespace = '.' + id;
module.verbose('Creating unique id for element', id);
},
// determines popup state
toggle: function() {
module.debug('Toggling pop-up');
if( module.is.hidden() ) {
module.debug('Popup is hidden, showing pop-up');
module.unbind.close();
module.show();
}
else {
module.debug('Popup is visible, hiding pop-up');
module.hide();
}
},
show: function(callback) {
callback = callback || function(){};
module.debug('Showing pop-up', settings.transition);
if(module.is.hidden() && !( module.is.active() && module.is.dropdown()) ) {
if( !module.exists() ) {
module.create();
}
if(settings.onShow.call($popup, element) === false) {
module.debug('onShow callback returned false, cancelling popup animation');
return;
}
else if(!settings.preserve && !settings.popup) {
module.refresh();
}
if( $popup && module.set.position() ) {
module.save.conditions();
if(settings.exclusive) {
module.hideAll();
}
module.animate.show(callback);
}
}
},
hide: function(callback) {
callback = callback || function(){};
if( module.is.visible() || module.is.animating() ) {
if(settings.onHide.call($popup, element) === false) {
module.debug('onHide callback returned false, cancelling popup animation');
return;
}
module.remove.visible();
module.unbind.close();
module.restore.conditions();
module.animate.hide(callback);
}
},
hideAll: function() {
$(selector.popup)
.filter('.' + className.visible)
.each(function() {
$(this)
.data(metadata.activator)
.popup('hide')
;
})
;
},
exists: function() {
if(!$popup) {
return false;
}
if(settings.inline || settings.popup) {
return ( module.has.popup() );
}
else {
return ( $popup.closest($context).length >= 1 )
? true
: false
;
}
},
removePopup: function() {
if( module.has.popup() && !settings.popup) {
module.debug('Removing popup', $popup);
$popup.remove();
$popup = undefined;
settings.onRemove.call($popup, element);
}
},
save: {
conditions: function() {
module.cache = {
title: $module.attr('title')
};
if (module.cache.title) {
$module.removeAttr('title');
}
module.verbose('Saving original attributes', module.cache.title);
}
},
restore: {
conditions: function() {
if(module.cache && module.cache.title) {
$module.attr('title', module.cache.title);
module.verbose('Restoring original attributes', module.cache.title);
}
return true;
}
},
animate: {
show: function(callback) {
callback = $.isFunction(callback) ? callback : function(){};
if(settings.transition && $.fn.transition !== undefined && $module.transition('is supported')) {
module.set.visible();
$popup
.transition({
animation : settings.transition + ' in',
queue : false,
debug : settings.debug,
verbose : settings.verbose,
duration : settings.duration,
onComplete : function() {
module.bind.close();
callback.call($popup, element);
settings.onVisible.call($popup, element);
}
})
;
}
else {
module.error(error.noTransition);
}
},
hide: function(callback) {
callback = $.isFunction(callback) ? callback : function(){};
module.debug('Hiding pop-up');
if(settings.onHide.call($popup, element) === false) {
module.debug('onHide callback returned false, cancelling popup animation');
return;
}
if(settings.transition && $.fn.transition !== undefined && $module.transition('is supported')) {
$popup
.transition({
animation : settings.transition + ' out',
queue : false,
duration : settings.duration,
debug : settings.debug,
verbose : settings.verbose,
onComplete : function() {
module.reset();
callback.call($popup, element);
settings.onHidden.call($popup, element);
}
})
;
}
else {
module.error(error.noTransition);
}
}
},
change: {
content: function(html) {
$popup.html(html);
}
},
get: {
html: function() {
$module.removeData(metadata.html);
return $module.data(metadata.html) || settings.html;
},
title: function() {
$module.removeData(metadata.title);
return $module.data(metadata.title) || settings.title;
},
content: function() {
$module.removeData(metadata.content);
return $module.data(metadata.content) || $module.attr('title') || settings.content;
},
variation: function() {
$module.removeData(metadata.variation);
return $module.data(metadata.variation) || settings.variation;
},
popup: function() {
return $popup;
},
popupOffset: function() {
return $popup.offset();
},
calculations: function() {
var
targetElement = $target[0],
targetPosition = (settings.inline || (settings.popup && settings.movePopup))
? $target.position()
: $target.offset(),
calculations = {},
screen
;
calculations = {
// element which is launching popup
target : {
element : $target[0],
width : $target.outerWidth(),
height : $target.outerHeight(),
top : targetPosition.top,
left : targetPosition.left,
margin : {}
},
// popup itself
popup : {
width : $popup.outerWidth(),
height : $popup.outerHeight()
},
// offset container (or 3d context)
parent : {
width : $offsetParent.outerWidth(),
height : $offsetParent.outerHeight()
},
// screen boundaries
screen : {
scroll: {
top : $window.scrollTop(),
left : $window.scrollLeft()
},
width : $window.width(),
height : $window.height()
}
};
// add in container calcs if fluid
if( settings.setFluidWidth && module.is.fluid() ) {
calculations.container = {
width: $popup.parent().outerWidth()
};
calculations.popup.width = calculations.container.width;
}
// add in margins if inline
calculations.target.margin.top = (settings.inline)
? parseInt( window.getComputedStyle(targetElement).getPropertyValue('margin-top'), 10)
: 0
;
calculations.target.margin.left = (settings.inline)
? module.is.rtl()
? parseInt( window.getComputedStyle(targetElement).getPropertyValue('margin-right'), 10)
: parseInt( window.getComputedStyle(targetElement).getPropertyValue('margin-left') , 10)
: 0
;
// calculate screen boundaries
screen = calculations.screen;
calculations.boundary = {
top : screen.scroll.top,
bottom : screen.scroll.top + screen.height,
left : screen.scroll.left,
right : screen.scroll.left + screen.width
};
return calculations;
},
id: function() {
return id;
},
startEvent: function() {
if(settings.on == 'hover') {
return 'mouseenter';
}
else if(settings.on == 'focus') {
return 'focus';
}
return false;
},
scrollEvent: function() {
return 'scroll';
},
endEvent: function() {
if(settings.on == 'hover') {
return 'mouseleave';
}
else if(settings.on == 'focus') {
return 'blur';
}
return false;
},
distanceFromBoundary: function(offset, calculations) {
var
distanceFromBoundary = {},
popup,
boundary
;
offset = offset || module.get.offset();
calculations = calculations || module.get.calculations();
// shorthand
popup = calculations.popup;
boundary = calculations.boundary;
if(offset) {
distanceFromBoundary = {
top : (offset.top - boundary.top),
left : (offset.left - boundary.left),
right : (boundary.right - (offset.left + popup.width) ),
bottom : (boundary.bottom - (offset.top + popup.height) )
};
module.verbose('Distance from boundaries determined', offset, distanceFromBoundary);
}
return distanceFromBoundary;
},
offsetParent: function($target) {
var
element = ($target !== undefined)
? $target[0]
: $module[0],
parentNode = element.parentNode,
$node = $(parentNode)
;
if(parentNode) {
var
is2D = ($node.css('transform') === 'none'),
isStatic = ($node.css('position') === 'static'),
isHTML = $node.is('html')
;
while(parentNode && !isHTML && isStatic && is2D) {
parentNode = parentNode.parentNode;
$node = $(parentNode);
is2D = ($node.css('transform') === 'none');
isStatic = ($node.css('position') === 'static');
isHTML = $node.is('html');
}
}
return ($node && $node.length > 0)
? $node
: $()
;
},
positions: function() {
return {
'top left' : false,
'top center' : false,
'top right' : false,
'bottom left' : false,
'bottom center' : false,
'bottom right' : false,
'left center' : false,
'right center' : false
};
},
nextPosition: function(position) {
var
positions = position.split(' '),
verticalPosition = positions[0],
horizontalPosition = positions[1],
opposite = {
top : 'bottom',
bottom : 'top',
left : 'right',
right : 'left'
},
adjacent = {
left : 'center',
center : 'right',
right : 'left'
},
backup = {
'top left' : 'top center',
'top center' : 'top right',
'top right' : 'right center',
'right center' : 'bottom right',
'bottom right' : 'bottom center',
'bottom center' : 'bottom left',
'bottom left' : 'left center',
'left center' : 'top left'
},
adjacentsAvailable = (verticalPosition == 'top' || verticalPosition == 'bottom'),
oppositeTried = false,
adjacentTried = false,
nextPosition = false
;
if(!triedPositions) {
module.verbose('All available positions available');
triedPositions = module.get.positions();
}
module.debug('Recording last position tried', position);
triedPositions[position] = true;
if(settings.prefer === 'opposite') {
nextPosition = [opposite[verticalPosition], horizontalPosition];
nextPosition = nextPosition.join(' ');
oppositeTried = (triedPositions[nextPosition] === true);
module.debug('Trying opposite strategy', nextPosition);
}
if((settings.prefer === 'adjacent') && adjacentsAvailable ) {
nextPosition = [verticalPosition, adjacent[horizontalPosition]];
nextPosition = nextPosition.join(' ');
adjacentTried = (triedPositions[nextPosition] === true);
module.debug('Trying adjacent strategy', nextPosition);
}
if(adjacentTried || oppositeTried) {
module.debug('Using backup position', nextPosition);
nextPosition = backup[position];
}
return nextPosition;
}
},
set: {
position: function(position, calculations) {
// exit conditions
if($target.length === 0 || $popup.length === 0) {
module.error(error.notFound);
return;
}
var
offset,
distanceAway,
target,
popup,
parent,
positioning,
popupOffset,
distanceFromBoundary
;
calculations = calculations || module.get.calculations();
position = position || $module.data(metadata.position) || settings.position;
offset = $module.data(metadata.offset) || settings.offset;
distanceAway = settings.distanceAway;
// shorthand
target = calculations.target;
popup = calculations.popup;
parent = calculations.parent;
if(target.width === 0 && target.height === 0 && !(target.element instanceof SVGGraphicsElement)) {
module.debug('Popup target is hidden, no action taken');
return false;
}
if(settings.inline) {
module.debug('Adding margin to calculation', target.margin);
if(position == 'left center' || position == 'right center') {
offset += target.margin.top;
distanceAway += -target.margin.left;
}
else if (position == 'top left' || position == 'top center' || position == 'top right') {
offset += target.margin.left;
distanceAway -= target.margin.top;
}
else {
offset += target.margin.left;
distanceAway += target.margin.top;
}
}
module.debug('Determining popup position from calculations', position, calculations);
if (module.is.rtl()) {
position = position.replace(/left|right/g, function (match) {
return (match == 'left')
? 'right'
: 'left'
;
});
module.debug('RTL: Popup position updated', position);
}
// if last attempt use specified last resort position
if(searchDepth == settings.maxSearchDepth && typeof settings.lastResort === 'string') {
position = settings.lastResort;
}
switch (position) {
case 'top left':
positioning = {
top : 'auto',
bottom : parent.height - target.top + distanceAway,
left : target.left + offset,
right : 'auto'
};
break;
case 'top center':
positioning = {
bottom : parent.height - target.top + distanceAway,
left : target.left + (target.width / 2) - (popup.width / 2) + offset,
top : 'auto',
right : 'auto'
};
break;
case 'top right':
positioning = {
bottom : parent.height - target.top + distanceAway,
right : parent.width - target.left - target.width - offset,
top : 'auto',
left : 'auto'
};
break;
case 'left center':
positioning = {
top : target.top + (target.height / 2) - (popup.height / 2) + offset,
right : parent.width - target.left + distanceAway,
left : 'auto',
bottom : 'auto'
};
break;
case 'right center':
positioning = {
top : target.top + (target.height / 2) - (popup.height / 2) + offset,
left : target.left + target.width + distanceAway,
bottom : 'auto',
right : 'auto'
};
break;
case 'bottom left':
positioning = {
top : target.top + target.height + distanceAway,
left : target.left + offset,
bottom : 'auto',
right : 'auto'
};
break;
case 'bottom center':
positioning = {
top : target.top + target.height + distanceAway,
left : target.left + (target.width / 2) - (popup.width / 2) + offset,
bottom : 'auto',
right : 'auto'
};
break;
case 'bottom right':
positioning = {
top : target.top + target.height + distanceAway,
right : parent.width - target.left - target.width - offset,
left : 'auto',
bottom : 'auto'
};
break;
}
if(positioning === undefined) {
module.error(error.invalidPosition, position);
}
module.debug('Calculated popup positioning values', positioning);
// tentatively place on stage
$popup
.css(positioning)
.removeClass(className.position)
.addClass(position)
.addClass(className.loading)
;
popupOffset = module.get.popupOffset();
// see if any boundaries are surpassed with this tentative position
distanceFromBoundary = module.get.distanceFromBoundary(popupOffset, calculations);
if( module.is.offstage(distanceFromBoundary, position) ) {
module.debug('Position is outside viewport', position);
if(searchDepth < settings.maxSearchDepth) {
searchDepth++;
position = module.get.nextPosition(position);
module.debug('Trying new position', position);
return ($popup)
? module.set.position(position, calculations)
: false
;
}
else {
if(settings.lastResort) {
module.debug('No position found, showing with last position');
}
else {
module.debug('Popup could not find a position to display', $popup);
module.error(error.cannotPlace, element);
module.remove.attempts();
module.remove.loading();
module.reset();
settings.onUnplaceable.call($popup, element);
return false;
}
}
}
module.debug('Position is on stage', position);
module.remove.attempts();
module.remove.loading();
if( settings.setFluidWidth && module.is.fluid() ) {
module.set.fluidWidth(calculations);
}
return true;
},
fluidWidth: function(calculations) {
calculations = calculations || module.get.calculations();
module.debug('Automatically setting element width to parent width', calculations.parent.width);
$popup.css('width', calculations.container.width);
},
variation: function(variation) {
variation = variation || module.get.variation();
if(variation && module.has.popup() ) {
module.verbose('Adding variation to popup', variation);
$popup.addClass(variation);
}
},
visible: function() {
$module.addClass(className.visible);
}
},
remove: {
loading: function() {
$popup.removeClass(className.loading);
},
variation: function(variation) {
variation = variation || module.get.variation();
if(variation) {
module.verbose('Removing variation', variation);
$popup.removeClass(variation);
}
},
visible: function() {
$module.removeClass(className.visible);
},
attempts: function() {
module.verbose('Resetting all searched positions');
searchDepth = 0;
triedPositions = false;
}
},
bind: {
events: function() {
module.debug('Binding popup events to module');
if(settings.on == 'click') {
$module
.on('click' + eventNamespace, module.toggle)
;
}
if(settings.on == 'hover' && hasTouch) {
$module
.on('touchstart' + eventNamespace, module.event.touchstart)
;
}
if( module.get.startEvent() ) {
$module
.on(module.get.startEvent() + eventNamespace, module.event.start)
.on(module.get.endEvent() + eventNamespace, module.event.end)
;
}
if(settings.target) {
module.debug('Target set to element', $target);
}
$window.on('resize' + elementNamespace, module.event.resize);
},
popup: function() {
module.verbose('Allowing hover events on popup to prevent closing');
if( $popup && module.has.popup() ) {
$popup
.on('mouseenter' + eventNamespace, module.event.start)
.on('mouseleave' + eventNamespace, module.event.end)
;
}
},
close: function() {
if(settings.hideOnScroll === true || (settings.hideOnScroll == 'auto' && settings.on != 'click')) {
$document
.one(module.get.scrollEvent() + elementNamespace, module.event.hideGracefully)
;
$context
.one(module.get.scrollEvent() + elementNamespace, module.event.hideGracefully)
;
}
if(settings.on == 'hover' && openedWithTouch) {
module.verbose('Binding popup close event to document');
$document
.on('touchstart' + elementNamespace, function(event) {
module.verbose('Touched away from popup');
module.event.hideGracefully.call(element, event);
})
;
}
if(settings.on == 'click' && settings.closable) {
module.verbose('Binding popup close event to document');
$document
.on('click' + elementNamespace, function(event) {
module.verbose('Clicked away from popup');
module.event.hideGracefully.call(element, event);
})
;
}
}
},
unbind: {
close: function() {
if(settings.hideOnScroll === true || (settings.hideOnScroll == 'auto' && settings.on != 'click')) {
$document
.off('scroll' + elementNamespace, module.hide)
;
$context
.off('scroll' + elementNamespace, module.hide)
;
}
if(settings.on == 'hover' && openedWithTouch) {
$document
.off('touchstart' + elementNamespace)
;
openedWithTouch = false;
}
if(settings.on == 'click' && settings.closable) {
module.verbose('Removing close event from document');
$document
.off('click' + elementNamespace)
;
}
}
},
has: {
popup: function() {
return ($popup && $popup.length > 0);
}
},
is: {
offstage: function(distanceFromBoundary, position) {
var
offstage = []
;
// return boundaries that have been surpassed
$.each(distanceFromBoundary, function(direction, distance) {
if(distance < -settings.jitter) {
module.debug('Position exceeds allowable distance from edge', direction, distance, position);
offstage.push(direction);
}
});
if(offstage.length > 0) {
return true;
}
else {
return false;
}
},
active: function() {
return $module.hasClass(className.active);
},
animating: function() {
return ($popup !== undefined && $popup.hasClass(className.animating) );
},
fluid: function() {
return ($popup !== undefined && $popup.hasClass(className.fluid));
},
visible: function() {
return ($popup !== undefined && $popup.hasClass(className.visible));
},
dropdown: function() {
return $module.hasClass(className.dropdown);
},
hidden: function() {
return !module.is.visible();
},
rtl: function () {
return $module.css('direction') == 'rtl';
}
},
reset: function() {
module.remove.visible();
if(settings.preserve) {
if($.fn.transition !== undefined) {
$popup
.transition('remove transition')
;
}
}
else {
module.removePopup();
}
},
setting: function(name, value) {
if( $.isPlainObject(name) ) {
$.extend(true, settings, name);
}
else if(value !== undefined) {
settings[name] = value;
}
else {
return settings[name];
}
},
internal: function(name, value) {
if( $.isPlainObject(name) ) {
$.extend(true, module, name);
}
else if(value !== undefined) {
module[name] = value;
}
else {
return module[name];
}
},
debug: function() {
if(settings.debug) {
if(settings.performance) {
module.performance.log(arguments);
}
else {
module.debug = Function.prototype.bind.call(console.info, console, settings.name + ':');
module.debug.apply(console, arguments);
}
}
},
verbose: function() {
if(settings.verbose && settings.debug) {
if(settings.performance) {
module.performance.log(arguments);
}
else {
module.verbose = Function.prototype.bind.call(console.info, console, settings.name + ':');
module.verbose.apply(console, arguments);
}
}
},
error: function() {
module.error = Function.prototype.bind.call(console.error, console, settings.name + ':');
module.error.apply(console, arguments);
},
performance: {
log: function(message) {
var
currentTime,
executionTime,
previousTime
;
if(settings.performance) {
currentTime = new Date().getTime();
previousTime = time || currentTime;
executionTime = currentTime - previousTime;
time = currentTime;
performance.push({
'Name' : message[0],
'Arguments' : [].slice.call(message, 1) || '',
'Element' : element,
'Execution Time' : executionTime
});
}
clearTimeout(module.performance.timer);
module.performance.timer = setTimeout(module.performance.display, 500);
},
display: function() {
var
title = settings.name + ':',
totalTime = 0
;
time = false;
clearTimeout(module.performance.timer);
$.each(performance, function(index, data) {
totalTime += data['Execution Time'];
});
title += ' ' + totalTime + 'ms';
if(moduleSelector) {
title += ' \'' + moduleSelector + '\'';
}
if( (console.group !== undefined || console.table !== undefined) && performance.length > 0) {
console.groupCollapsed(title);
if(console.table) {
console.table(performance);
}
else {
$.each(performance, function(index, data) {
console.log(data['Name'] + ': ' + data['Execution Time']+'ms');
});
}
console.groupEnd();
}
performance = [];
}
},
invoke: function(query, passedArguments, context) {
var
object = instance,
maxDepth,
found,
response
;
passedArguments = passedArguments || queryArguments;
context = element || context;
if(typeof query == 'string' && object !== undefined) {
query = query.split(/[\. ]/);
maxDepth = query.length - 1;
$.each(query, function(depth, value) {
var camelCaseValue = (depth != maxDepth)
? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)
: query
;
if( $.isPlainObject( object[camelCaseValue] ) && (depth != maxDepth) ) {
object = object[camelCaseValue];
}
else if( object[camelCaseValue] !== undefined ) {
found = object[camelCaseValue];
return false;
}
else if( $.isPlainObject( object[value] ) && (depth != maxDepth) ) {
object = object[value];
}
else if( object[value] !== undefined ) {
found = object[value];
return false;
}
else {
return false;
}
});
}
if ( $.isFunction( found ) ) {
response = found.apply(context, passedArguments);
}
else if(found !== undefined) {
response = found;
}
if($.isArray(returnedValue)) {
returnedValue.push(response);
}
else if(returnedValue !== undefined) {
returnedValue = [returnedValue, response];
}
else if(response !== undefined) {
returnedValue = response;
}
return found;
}
};
if(methodInvoked) {
if(instance === undefined) {
module.initialize();
}
module.invoke(query);
}
else {
if(instance !== undefined) {
instance.invoke('destroy');
}
module.initialize();
}
})
;
return (returnedValue !== undefined)
? returnedValue
: this
;
};
_module.exports.settings = {
name : 'Popup',
// module settings
debug : false,
verbose : false,
performance : true,
namespace : 'popup',
// callback only when element added to dom
onCreate : function(){},
// callback before element removed from dom
onRemove : function(){},
// callback before show animation
onShow : function(){},
// callback after show animation
onVisible : function(){},
// callback before hide animation
onHide : function(){},
// callback when popup cannot be positioned in visible screen
onUnplaceable: function(){},
// callback after hide animation
onHidden : function(){},
// when to show popup
on : 'hover',
// whether to add touchstart events when using hover
addTouchEvents : true,
// default position relative to element
position : 'top left',
// name of variation to use
variation : '',
// whether popup should be moved to context
movePopup : true,
// element which popup should be relative to
target : false,
// jq selector or element that should be used as popup
popup : false,
// popup should remain inline next to activator
inline : false,
// popup should be removed from page on hide
preserve : false,
// popup should not close when being hovered on
hoverable : false,
// explicitly set content
content : false,
// explicitly set html
html : false,
// explicitly set title
title : false,
// whether automatically close on clickaway when on click
closable : true,
// automatically hide on scroll
hideOnScroll : 'auto',
// hide other popups on show
exclusive : false,
// context to attach popups
context : 'body',
// position to prefer when calculating new position
prefer : 'opposite',
// specify position to appear even if it doesn't fit
lastResort : false,
// delay used to prevent accidental refiring of animations due to user error
delay : {
show : 50,
hide : 70
},
// whether fluid variation should assign width explicitly
setFluidWidth : true,
// transition settings
duration : 200,
transition : 'scale',
// distance away from activating element in px
distanceAway : 0,
// number of pixels an element is allowed to be "offstage" for a position to be chosen (allows for rounding)
jitter : 2,
// offset on aligning axis from calculated position
offset : 0,
// maximum times to look for a position before failing (9 positions total)
maxSearchDepth : 15,
error: {
invalidPosition : 'The position you specified is not a valid position',
cannotPlace : 'Popup does not fit within the boundaries of the viewport',
method : 'The method you called is not defined.',
noTransition : 'This module requires ui transitions <https://github.com/Semantic-Org/UI-Transition>',
notFound : 'The target or popup you specified does not exist on the page'
},
metadata: {
activator : 'activator',
content : 'content',
html : 'html',
offset : 'offset',
position : 'position',
title : 'title',
variation : 'variation'
},
className : {
active : 'active',
animating : 'animating',
dropdown : 'dropdown',
fluid : 'fluid',
loading : 'loading',
popup : 'ui popup',
position : 'top left center bottom right',
visible : 'visible'
},
selector : {
popup : '.ui.popup'
},
templates: {
escape: function(string) {
var
badChars = /[&<>"'`]/g,
shouldEscape = /[&<>"'`]/,
escape = {
"&": "&",
"<": "<",
">": ">",
'"': """,
"'": "'",
"`": "`"
},
escapedChar = function(chr) {
return escape[chr];
}
;
if(shouldEscape.test(string)) {
return string.replace(badChars, escapedChar);
}
return string;
},
popup: function(text) {
var
html = '',
escape = _module.exports.settings.templates.escape
;
if(typeof text !== undefined) {
if(typeof text.title !== undefined && text.title) {
text.title = escape(text.title);
html += '<div class="header">' + text.title + '</div>';
}
if(typeof text.content !== undefined && text.content) {
text.content = escape(text.content);
html += '<div class="content">' + text.content + '</div>';
}
}
return html;
}
}
};
})( require("jquery"), window, document );
| jalota16/cooklah | bower_components/semantic-ui-popup/index.js | JavaScript | mit | 46,604 |
//
// FSE+CGRectTests.swift
// FSHelpersTests
//
// Created by Timur Shafigullin on 05/01/2019.
// Copyright © 2019 FlatStack. All rights reserved.
//
import XCTest
@testable import FSHelpers
class FSE_CGRectTests: XCTestCase {
var rect: CGRect!
override func setUp() {
super.setUp()
self.rect = CGRect(x: 2, y: 15, width: 7, height: 8)
}
func testTop() {
// arrange
let expectedTop: CGFloat = 15
// assert
XCTAssertEqual(self.rect.fs_top, expectedTop)
}
func testBottom() {
// arrange
let expectedBottom: CGFloat = 23
// assert
XCTAssertEqual(self.rect.fs_bottom, expectedBottom)
}
func testLeft() {
// arrange
let expectedLeft: CGFloat = 2
// assert
XCTAssertEqual(self.rect.fs_left, expectedLeft)
}
func testRight() {
// arrange
let expectedRight: CGFloat = 9
// assert
XCTAssertEqual(self.rect.fs_right, expectedRight)
}
func testAdjusted() {
// arrange
let rect = CGRect(x: 1.2, y: 6.8, width: 9.2, height: 4.7)
let expectedRect = CGRect(x: 1, y: 6, width: 10, height: 5)
// act
let adjustedRect = rect.fs_adjusted
// assert
XCTAssertEqual(adjustedRect, expectedRect)
}
func testCGFloatInitializer() {
// arrange
let x: CGFloat = 2.3
let y: CGFloat = 6.5
let width: CGFloat = 3.2
let height: CGFloat = 9.7
let expectedRect = CGRect(x: x, y: y, width: width, height: height)
// act
let initializedRect = CGRect(x: x, y: y, size: CGSize(width: width, height: height))
// assert
XCTAssertEqual(initializedRect, expectedRect)
}
func testDoubleInitializer() {
// arrange
let x: Double = 2.3
let y: Double = 6.5
let width: Double = 3.2
let height: Double = 9.7
let expectedRect = CGRect(x: x, y: y, width: width, height: height)
// act
let initializedRect = CGRect(x: x, y: y, size: CGSize(width: width, height: height))
// assert
XCTAssertEqual(initializedRect, expectedRect)
}
func testIntInitializer() {
// arrange
let x: Int = 2
let y: Int = 6
let width: Int = 3
let height: Int = 9
let expectedRect = CGRect(x: x, y: y, width: width, height: height)
// act
let initializedRect = CGRect(x: x, y: y, size: CGSize(width: width, height: height))
// assert
XCTAssertEqual(initializedRect, expectedRect)
}
}
| fs/FSHelper | FSHelpersTests/Tests/Extensions/FSE+CGRectTests.swift | Swift | mit | 2,819 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>param-pi: Not compatible</title>
<link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
<link href="../../../../../bootstrap.min.css" rel="stylesheet">
<link href="../../../../../bootstrap-custom.css" rel="stylesheet">
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
<script src="../../../../../moment.min.js"></script>
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container">
<div class="navbar navbar-default" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a>
</div>
<div id="navbar" class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li><a href="../..">clean / extra-dev</a></li>
<li class="active"><a href="">dev / param-pi - 8.5.0</a></li>
</ul>
</div>
</div>
</div>
<div class="article">
<div class="row">
<div class="col-md-12">
<a href="../..">« Up</a>
<h1>
param-pi
<small>
8.5.0
<span class="label label-info">Not compatible</span>
</small>
</h1>
<p><em><script>document.write(moment("2021-04-06 20:47:58 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2021-04-06 20:47:58 UTC)</em><p>
<h2>Context</h2>
<pre># Packages matching: installed
# Name # Installed # Synopsis
base-bigarray base
base-threads base
base-unix base
conf-findutils 1 Virtual package relying on findutils
conf-gmp 3 Virtual package relying on a GMP lib system installation
coq dev Formal proof management system
num 1.4 The legacy Num library for arbitrary-precision integer and rational arithmetic
ocaml 4.10.1 The OCaml compiler (virtual package)
ocaml-base-compiler 4.10.1 Official release 4.10.1
ocaml-config 1 OCaml Switch Configuration
ocamlfind 1.9.1 A library manager for OCaml
zarith 1.12 Implements arithmetic and logical operations over arbitrary-precision integers
# opam file:
opam-version: "2.0"
maintainer: "matej.kosik@inria.fr"
homepage: "https://github.com/coq-contribs/param-pi"
license: "LGPL 2"
build: [make "-j%{jobs}%"]
install: [make "install"]
remove: ["rm" "-R" "%{lib}%/coq/user-contrib/ParamPi"]
depends: [
"ocaml"
"coq" {>= "8.5" & < "8.6~"}
]
tags: [
"keyword:pi-calculus"
"category:Computer Science/Lambda Calculi"
"date:1998-09-30"
]
authors: [ "Loïc Henry-Gréard <lhenrygr@cma.inria.fr>" ]
bug-reports: "https://github.com/coq-contribs/param-pi/issues"
dev-repo: "git+https://github.com/coq-contribs/param-pi.git"
synopsis: "Coding of a typed monadic pi-calculus using parameters for free names"
description: """
This development contains the specification for a monadic
pi-calculus using the same coding method for names than
J. Mc Kinna and R. Pollack used for PTS in LEGO:
"Some Lambda Calculus and Type Theory Formalized".
The basic, monadic calculus encoded here has a type system
restraining the direction of communication for processes' names.
A number of lemmas usefull for doing proofs on that coding
are included, and subject reduction properties for each kind
of transition is made as an example of actually using the
coding to mechanize proofs on the pi-calculus."""
flags: light-uninstall
url {
src: "https://github.com/coq-contribs/param-pi/archive/v8.5.0.tar.gz"
checksum: "md5=ac8b20571cba62795c908347bc6c5932"
}
</pre>
<h2>Lint</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
</dl>
<h2>Dry install</h2>
<p>Dry install with the current Coq version:</p>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>opam install -y --show-action coq-param-pi.8.5.0 coq.dev</code></dd>
<dt>Return code</dt>
<dd>5120</dd>
<dt>Output</dt>
<dd><pre>[NOTE] Package coq is already installed (current version is dev).
The following dependencies couldn't be met:
- coq-param-pi -> coq < 8.6~ -> ocaml < 4.06.0
base of this switch (use `--unlock-base' to force)
Your request can't be satisfied:
- No available version of coq satisfies the constraints
No solution found, exiting
</pre></dd>
</dl>
<p>Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:</p>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>opam remove -y coq; opam install -y --show-action --unlock-base coq-param-pi.8.5.0</code></dd>
<dt>Return code</dt>
<dd>0</dd>
</dl>
<h2>Install dependencies</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Install</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Installation size</h2>
<p>No files were installed.</p>
<h2>Uninstall</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Missing removes</dt>
<dd>
none
</dd>
<dt>Wrong removes</dt>
<dd>
none
</dd>
</dl>
</div>
</div>
</div>
<hr/>
<div class="footer">
<p class="text-center">
<small>Sources are on <a href="https://github.com/coq-bench">GitHub</a>. © Guillaume Claret.</small>
</p>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="../../../../../bootstrap.min.js"></script>
</body>
</html>
| coq-bench/coq-bench.github.io | clean/Linux-x86_64-4.10.1-2.0.6/extra-dev/dev/param-pi/8.5.0.html | HTML | mit | 7,489 |
const cd = require('../../../lib/continuous-delivery/index');
const path = require('path');
const projectDir = path.resolve(__dirname, '../data/projects/basic');
const configuration = require(projectDir + '/configuration.reference');
const deliveryTree = require(projectDir + '/deliveryTree.reference');
describe('Continuous delivery', function() {
it('reads configuration correctly', function(done) {
cd.readDefinitions(projectDir,
(err, result) => {
expect(err).toBeFalsy();
if(result) {
const pathBegin = new RegExp(projectDir.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'), 'g');
result = JSON.parse(JSON.stringify(result).replace(pathBegin, ''));
}
expect(result).toEqual(configuration);
done();
});
});
it('transforms configuration to delivery tree correctly', function() {
const errors = [];
const tree = cd.createDeliveryTree(configuration.domains, configuration.nodes,
configuration.solutions, configuration.services, errors);
expect(tree).toEqual(deliveryTree);
const badNodeError = {
level: 'error',
message: "Domain 'production' uses unknown node 'Morra'"
};
expect(errors).toEqual([badNodeError]);
});
it('can filter by node', function() {
const errors = [];
const filtered = cd.filterDeliveryTree(
'production', ['prod2'], [], [], [], deliveryTree, configuration, errors);
expect(errors).toEqual([]);
expect(filtered).toEqual({
prod2: {
CollectorService: {
name: 'CollectorService',
type: 'xUML',
repository: '/repositories/CollectorService.rep',
settings: {},
preferences: {},
deploymentOptions: {},
},
Worker1Service: {
name: 'Worker1Service',
type: 'xUML',
repository: '/repositories/Worker1Service.rep',
settings: {},
preferences: {},
deploymentOptions: {},
},
Worker2Service: {
name: 'Worker2Service',
type: 'xUML',
repository: '/repositories/Worker2Service.rep',
settings: {},
preferences: {},
deploymentOptions: {},
}
}
});
});
it('can filter by node and service', function() {
const errors = [];
const filtered = cd.filterDeliveryTree(
'production', ['prod3'], [], [], ['Worker1Service'], deliveryTree, configuration, errors);
expect(errors).toEqual([]);
expect(filtered).toEqual({
prod3: {
Worker1Service: {
name: 'Worker1Service',
type: 'xUML',
repository: '/repositories/Worker1Service.rep',
settings: {},
preferences: {},
deploymentOptions: {},
}
}
});
});
it('can filter by service', function() {
const errors = [];
const filtered = cd.filterDeliveryTree(
'production', [], [], [], ['Worker2Service'], deliveryTree, configuration, errors);
expect(errors).toEqual([]);
expect(filtered).toEqual({
prod2: {
Worker2Service: {
name: 'Worker2Service',
type: 'xUML',
repository: '/repositories/Worker2Service.rep',
settings: {},
preferences: {},
deploymentOptions: {},
}
},
prod3: {
Worker2Service: {
name: 'Worker2Service',
type: 'xUML',
repository: '/repositories/Worker2Service.rep',
settings: {},
preferences: {},
deploymentOptions: {},
}
}
});
});
it('can filter by solution and label', function() {
const errors = [];
const filtered = cd.filterDeliveryTree(
'production', [], ['slave'], ['solution1'], [], deliveryTree, configuration, errors);
expect(errors).toEqual([]);
expect(filtered).toEqual({
prod2: {
Worker1Service: {
name: 'Worker1Service',
type: 'xUML',
repository: '/repositories/Worker1Service.rep',
settings: {},
preferences: {},
deploymentOptions: {},
},
Worker2Service: {
name: 'Worker2Service',
type: 'xUML',
repository: '/repositories/Worker2Service.rep',
settings: {},
preferences: {},
deploymentOptions: {},
}
},
prod3: {
Worker1Service: {
name: 'Worker1Service',
type: 'xUML',
repository: '/repositories/Worker1Service.rep',
settings: {},
preferences: {},
deploymentOptions: {},
},
Worker2Service: {
name: 'Worker2Service',
type: 'xUML',
repository: '/repositories/Worker2Service.rep',
settings: {},
preferences: {},
deploymentOptions: {},
}
}
});
});
it('can filter by service', function() {
const errors = [];
const filtered = cd.filterDeliveryTree(
'production', [], [], [], ['CollectorService'], deliveryTree, configuration, errors);
expect(errors).toEqual([]);
expect(filtered).toEqual({
prod1: {
CollectorService: {
name: 'CollectorService',
type: 'xUML',
repository: '/repositories/CollectorService.rep',
settings: {},
preferences: {},
deploymentOptions: {},
}
},
prod2: {
CollectorService: {
name: 'CollectorService',
type: 'xUML',
repository: '/repositories/CollectorService.rep',
settings: {},
preferences: {},
deploymentOptions: {},
}
},
prod3: {
CollectorService: {
name: 'CollectorService',
type: 'xUML',
repository: '/repositories/CollectorService.rep',
settings: {},
preferences: {},
deploymentOptions: {},
}
}
});
});
it('errors when filtering by invalid domain', function() {
const errors = [];
const filtered = cd.filterDeliveryTree(
'gugus', [], [], [], [], deliveryTree, configuration, errors);
expect(errors).toEqual([{level: 'error', message: "domain 'gugus' is not defined in the configuration"}]);
expect(filtered).toEqual({});
});
it('errors when filtering by invalid node', function() {
const errors = [];
const filtered = cd.filterDeliveryTree(
'production', ['gugus'], [], [], [], deliveryTree, configuration, errors);
expect(errors).toEqual([{level: 'warn', message: "node 'gugus' is not a part of the 'production' domain"}]);
expect(filtered).toEqual({});
});
it('errors when filtering by invalid solution', function() {
const errors = [];
const filtered = cd.filterDeliveryTree(
'production', [], [], ['gugus'], [], deliveryTree, configuration, errors);
expect(errors).toEqual([{level: 'warn', message: "solution 'gugus' is not a part of the 'production' domain"}]);
expect(filtered).toEqual({});
});
it('errors when filtering by invalid service', function() {
const errors = [];
const filtered = cd.filterDeliveryTree(
'production', [], [], [], ['gugus'], deliveryTree, configuration, errors);
expect(errors).toEqual([{level: 'warn', message: "service 'gugus' is not a part of the 'production' domain"}]);
expect(filtered).toEqual({});
});
});
| e2ebridge/e2e-bridge-cli | test/continuous-delivery/deliveryTree/cd.deliveryTree.basic.spec.js | JavaScript | mit | 8,888 |
#! /usr/bin/env node
'use strict';
const defaultOption = require('../lib/defaultOption');
const fs = require('fs');
const globAll = require('glob-all');
const minimist = require('minimist');
const path = require('path');
const pkg = require('../package.json');
const thout = require('../lib/');
const existsSync = fs.existsSync || path.existsSync;
const argv = minimist(process.argv.slice(2), {
string: [
'require'
],
boolean: [
'help',
'version'
],
alias: {
h: 'help',
r: 'require',
t: 'timeout',
v: 'version'
},
default: {
help: false,
require: [],
timeout: 2000,
version: false
}
});
function main() {
const options = {};
const files = argv._;
let requires = [];
if (files.length > 0) {
options.files = files;
}
if (argv.t) {
options.timeout = argv.t;
}
if (argv.r) {
requires = argv.r;
if (!Array.isArray(argv.r)) {
requires = [argv.r];
}
}
thout.setup(Object.assign({}, defaultOption, options));
requires.forEach((mod) => {
const isLocalFile = existsSync(mod) || existsSync(mod + '.js');
const file = isLocalFile ? path.resolve(mod) : mod;
require(file);
});
globAll.sync(files)
.forEach((file) => {
require(path.resolve(file));
});
}
function showHelp() {
console.log(`
${pkg.description}
Usage
${Object.keys(pkg.bin)[0]} [options]
Options
-h, --help show help
-r, --require require module
-t, --timeout set test timeout [2000]
-v, --version print version
`);
}
function showVersion() {
console.log(pkg.version);
}
if (argv.help) {
showHelp();
}
if (argv.version) {
showVersion();
}
main();
| mkwtys/thout | bin/thout.js | JavaScript | mit | 1,682 |
/* global __dirname */
var path = require('path')
var webpack = require('webpack')
var HtmlWebpackPlugin = require('html-webpack-plugin')
var dir_js = path.resolve(__dirname, 'src/')
var dir_base = path.resolve(__dirname)
var dir_build = path.resolve(__dirname, 'build')
var dir_nodeModules = path.resolve(__dirname, 'node_modules')
var file_indexHtml = path.resolve(__dirname, 'src/index.html')
var file_favicon = path.resolve(__dirname, 'src/assets/favicon.ico')
module.exports = {
entry: [
path.resolve(dir_js, 'index.js')
],
output: {
path: dir_build,
filename: '[name].bundle.js',
sourceMapFilename: '[name].map',
publicPath: '/'
},
module: {
rules: [
{
test: /\.css$/,
use: [
'style-loader',
'css-loader'
]
},
{
loader: 'babel-loader',
exclude: dir_nodeModules,
test: /\.js$/
}
]
},
plugins: [
new webpack.NoEmitOnErrorsPlugin(),
new HtmlWebpackPlugin({
template: file_indexHtml,
hash: false,
favicon: file_favicon,
filename: 'index.html',
inject: 'body',
minify: {
collapseWhitespace: false
}
})
],
// make absolute import statements possible, also for local modules
resolve: {
modules: [
dir_base,
dir_js,
'node_modules'
]
},
stats: {
// Nice colored output
colors: true
}
}
| hoschi/yode | packages/demo/webpack.config.base.js | JavaScript | mit | 1,670 |
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("02.Stateless")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("02.Stateless")]
[assembly: AssemblyCopyright("Copyright © 2017")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("2bfc188e-46d2-4a67-95b2-a8732dd9ca8a")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
| toteva94/SoftUni | [01]ProgrammingFundamentals/25.StringsAndTextProcessing-MoreExercises/02.Stateless/Properties/AssemblyInfo.cs | C# | mit | 1,400 |
/*
* The MIT License (MIT)
*
* Copyright (c) Despector <https://despector.voxelgenesis.com>
* Copyright (c) contributors
*
* 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.
*/
package org.spongepowered.despector.emitter.java.statement;
import org.spongepowered.despector.ast.generic.ClassTypeSignature;
import org.spongepowered.despector.ast.insn.Instruction;
import org.spongepowered.despector.ast.insn.cst.IntConstant;
import org.spongepowered.despector.ast.insn.op.Operator;
import org.spongepowered.despector.ast.insn.var.InstanceFieldAccess;
import org.spongepowered.despector.ast.insn.var.LocalAccess;
import org.spongepowered.despector.ast.stmt.assign.FieldAssignment;
import org.spongepowered.despector.ast.stmt.assign.InstanceFieldAssignment;
import org.spongepowered.despector.ast.stmt.assign.StaticFieldAssignment;
import org.spongepowered.despector.emitter.StatementEmitter;
import org.spongepowered.despector.emitter.java.JavaEmitterContext;
/**
* An emitter for field assignments.
*/
public class FieldAssignmentEmitter implements StatementEmitter<JavaEmitterContext, FieldAssignment> {
@Override
public void emit(JavaEmitterContext ctx, FieldAssignment insn, boolean semicolon) {
if (insn.isInitializer()) {
return;
}
if (insn instanceof StaticFieldAssignment) {
if (ctx.getType() != null && !((StaticFieldAssignment) insn).getOwnerType().equals(ctx.getType().getDescriptor())) {
ctx.emitTypeName(((StaticFieldAssignment) insn).getOwnerName());
ctx.printString(".");
}
} else if (insn instanceof InstanceFieldAssignment) {
ctx.emit(((InstanceFieldAssignment) insn).getOwner(), ClassTypeSignature.of(insn.getOwnerType()));
ctx.printString(".");
}
ctx.printString(insn.getFieldName());
Instruction val = insn.getValue();
if (checkOperator(ctx, insn, val, semicolon)) {
return;
}
ctx.printString(" = ");
ctx.emit(val, insn.getFieldDescription());
if (semicolon) {
ctx.printString(";");
}
}
protected boolean checkOperator(JavaEmitterContext ctx, FieldAssignment insn, Instruction val, boolean semicolon) {
if (val instanceof Operator) {
Instruction left = ((Operator) val).getLeftOperand();
Instruction right = ((Operator) val).getRightOperand();
String op = " " + ((Operator) val).getOperator() + "= ";
if (left instanceof InstanceFieldAccess) {
InstanceFieldAccess left_field = (InstanceFieldAccess) left;
Instruction owner = left_field.getFieldOwner();
if (owner instanceof LocalAccess && ((LocalAccess) owner).getLocal().getIndex() == 0) {
// If the field assign is of the form 'field = field + x'
// where + is any operator then we collapse it to the '+='
// form of the assignment.
if (left_field.getFieldName().equals(insn.getFieldName())) {
ctx.printString(op);
if (insn.getFieldDescription().equals("Z")) {
if (val instanceof IntConstant) {
IntConstant cst = (IntConstant) insn.getValue();
if (cst.getConstant() == 1) {
ctx.printString("true");
} else {
ctx.printString("false");
}
if (semicolon) {
ctx.printString(";");
}
return true;
}
}
ctx.emit(right, insn.getFieldDescription());
if (semicolon) {
ctx.printString(";");
}
return true;
}
}
}
}
return false;
}
}
| Despector/Despector | src/main/java/org/spongepowered/despector/emitter/java/statement/FieldAssignmentEmitter.java | Java | mit | 5,194 |
/*
Styles to help with bootstrap files.
Fix styles broken by other styles
Make bootstrap work better
Customize bootstrap styles
*/
/*
Bs recommends h4 for the modal title, but this is overridden by the general
purpose kbase h4 style. Generally, I (Erik) do not like using semantic tags
in bootstrap anyway, especially header tags which inherently imply a specific
document structure which modal dialogs in no way can represent!)
*/
.modal .modal-title {
font-family: Oxygen, Arial, sans-serif;
font-size: 130%;
font-weight: bold;
color: #2e618d;
}
/*
Unset the global modal title color set above for alert modals, which
may set the color style based on the alert type.
*/
.modal.kb-modal-alert .modal-title {
color: unset;
}
/*
The BS checkbox appears too low, due to the top margin, when used with a label
in the recommended manner.
Note: I don't understand why BS handles checkbox styling as they do, turning
the checkbox into relatively posiioned and then pushing the label to checkbox
to the left and down (at the same time given the container extra margin to
accomodate this.) Anyway, we roll with it but try to patch up the styling
as it breaks.
*/
.modal input[type="checkbox"] {
margin-top: 1px;
}
.panel.kb-panel-light {
border: none;
margin-bottom: 10px;
}
/* colors copied shamelessly from peeking at bootstrap
http://getbootstrap.com/css/
*/
.panel-danger.kb-panel-light .panel-title {
color: #a94442;
}
.panel-success.kb-panel-light .panel-title {
color: #3c763d;
}
.panel-warning.kb-panel-light .panel-title {
color: #8a6d3b;
}
.panel-info.kb-panel-light .panel-title {
color: blue;
}
.panel.kb-panel-light > .panel-heading {
background-color: transparent;
font-weight: bold;
color: #666;
padding-left: 0;
padding-bottom: 2px;
border-bottom: 1px #ccc solid;
}
.panel.kb-panel-light .panel-body {
padding: 0;
}
.panel.kb-panel-container {
border: none;
}
.panel.kb-panel-container > .panel-heading {
background-color: transparent;
font-weight: bold;
padding-left: 0;
padding-bottom: 2px;
border-bottom: 2px #ccc solid;
margin-bottom: 10px;
}
.panel.kb-panel-container .panel-body {
padding-top: 0;
}
/*
The button bar in a cell widgetis located at the bottom of the inputs, but
above any outputs.
These styles attempt to help the button toolbar, which represents the actions
the user can take, be visually distinct from the other bits surrounding it.
*/
.btn-toolbar.kb-btn-toolbar-cell-widget {
margin-bottom: 20px;
background-color: #eee;
padding: 6px;
}
| briehl/narrative | kbase-extension/static/kbase/css/bootstrapHelper.css | CSS | mit | 2,620 |
<html>
<head>
<title>User agent detail - Mozilla/5.0 (Linux; Android 4.0.4; XT897 Build/7.7.1Q-6_SPR-125_ASA-10) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.169 Mobile Safari/537.22</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.3/css/materialize.min.css">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
</head>
<body>
<div class="container">
<div class="section">
<h1 class="header center orange-text">User agent detail</h1>
<div class="row center">
<h5 class="header light">
Mozilla/5.0 (Linux; Android 4.0.4; XT897 Build/7.7.1Q-6_SPR-125_ASA-10) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.169 Mobile Safari/537.22
</h5>
</div>
</div>
<div class="section">
<table class="striped"><tr><th></th><th colspan="3">General</th><th colspan="5">Device</th><th colspan="3">Bot</th><th colspan="2"></th></tr><tr><th>Provider</th><th>Browser</th><th>Engine</th><th>OS</th><th>Brand</th><th>Model</th><th>Type</th><th>Is mobile</th><th>Is touch</th><th>Is bot</th><th>Name</th><th>Type</th><th>Parse time</th><th>Actions</th></tr><tr><th colspan="14" class="green lighten-3">Source result (test suite)</th></tr><tr><td>ua-parser/uap-core<br /><small>vendor/thadafinser/uap-core/tests/test_device.yaml</small></td><td> </td><td> </td><td> </td><td style="border-left: 1px solid #555">Motorola</td><td>XT897</td><td></td><td></td><td></td><td style="border-left: 1px solid #555"></td><td></td><td></td><td></td><td>
<!-- Modal Trigger -->
<a class="modal-trigger btn waves-effect waves-light" href="#modal-test">Detail</a>
<!-- Modal Structure -->
<div id="modal-test" class="modal modal-fixed-footer">
<div class="modal-content">
<h4>Testsuite result detail</h4>
<p><pre><code class="php">Array
(
[user_agent_string] => Mozilla/5.0 (Linux; Android 4.0.4; XT897 Build/7.7.1Q-6_SPR-125_ASA-10) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.169 Mobile Safari/537.22
[family] => XT897
[brand] => Motorola
[model] => XT897
)
</code></pre></p>
</div>
<div class="modal-footer">
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a>
</div>
</div>
</td></tr><tr><th colspan="14" class="green lighten-3">Providers</th></tr><tr><td>BrowscapPhp<br /><small>6012</small></td><td>Chrome 25.0</td><td>WebKit </td><td>Android 4.0</td><td style="border-left: 1px solid #555"></td><td></td><td>Mobile Phone</td><td>yes</td><td>yes</td><td style="border-left: 1px solid #555"></td><td></td><td></td><td>0.03</td><td>
<!-- Modal Trigger -->
<a class="modal-trigger btn waves-effect waves-light" href="#modal-215ac98d-ccf8-4615-916e-5a819d6a59c9">Detail</a>
<!-- Modal Structure -->
<div id="modal-215ac98d-ccf8-4615-916e-5a819d6a59c9" class="modal modal-fixed-footer">
<div class="modal-content">
<h4>BrowscapPhp result detail</h4>
<p><pre><code class="php">stdClass Object
(
[browser_name_regex] => /^mozilla\/5\.0 \(.*linux.*android.4\.0.*\) applewebkit\/.* \(khtml, like gecko\) chrome\/25\..*safari\/.*$/
[browser_name_pattern] => mozilla/5.0 (*linux*android?4.0*) applewebkit/* (khtml, like gecko) chrome/25.*safari/*
[parent] => Chrome 25.0 for Android
[comment] => Chrome 25.0
[browser] => Chrome
[browser_type] => Browser
[browser_bits] => 32
[browser_maker] => Google Inc
[browser_modus] => unknown
[version] => 25.0
[majorver] => 25
[minorver] => 0
[platform] => Android
[platform_version] => 4.0
[platform_description] => Android OS
[platform_bits] => 32
[platform_maker] => Google Inc
[alpha] =>
[beta] =>
[win16] =>
[win32] =>
[win64] =>
[frames] => 1
[iframes] => 1
[tables] => 1
[cookies] => 1
[backgroundsounds] =>
[javascript] => 1
[vbscript] =>
[javaapplets] =>
[activexcontrols] =>
[ismobiledevice] => 1
[istablet] =>
[issyndicationreader] =>
[crawler] =>
[cssversion] => 3
[aolversion] => 0
[device_name] => general Mobile Phone
[device_maker] => unknown
[device_type] => Mobile Phone
[device_pointing_method] => touchscreen
[device_code_name] => general Mobile Phone
[device_brand_name] => unknown
[renderingengine_name] => WebKit
[renderingengine_version] => unknown
[renderingengine_description] => For Google Chrome, iOS (including both mobile Safari, WebViews within third-party apps, and web clips), Safari, Arora, Midori, OmniWeb, Shiira, iCab since version 4, Web, SRWare Iron, Rekonq, and in Maxthon 3.
[renderingengine_maker] => Apple Inc
)
</code></pre></p>
</div>
<div class="modal-footer">
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a>
</div>
</div>
</td></tr><tr><td>DonatjUAParser<br /><small>v0.5.0</small></td><td>Chrome 25.0.1364.169</td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td>0</td><td>
<!-- Modal Trigger -->
<a class="modal-trigger btn waves-effect waves-light" href="#modal-f1436016-fdf1-4aea-b4be-1d7c99ab0661">Detail</a>
<!-- Modal Structure -->
<div id="modal-f1436016-fdf1-4aea-b4be-1d7c99ab0661" class="modal modal-fixed-footer">
<div class="modal-content">
<h4>DonatjUAParser result detail</h4>
<p><pre><code class="php">Array
(
[platform] => Android
[browser] => Chrome
[version] => 25.0.1364.169
)
</code></pre></p>
</div>
<div class="modal-footer">
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a>
</div>
</div>
</td></tr><tr><td>NeutrinoApiCom<br /><small></small></td><td>Chrome Mobile 25.0.1364.169</td><td><i class="material-icons">close</i></td><td>Android 4.0.4</td><td style="border-left: 1px solid #555">Motorola</td><td>XT897</td><td>mobile-browser</td><td>yes</td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"></td><td></td><td><i class="material-icons">close</i></td><td>0.28203</td><td>
<!-- Modal Trigger -->
<a class="modal-trigger btn waves-effect waves-light" href="#modal-9b0fa449-ec1b-40c8-8b1c-9486eb3b9cbc">Detail</a>
<!-- Modal Structure -->
<div id="modal-9b0fa449-ec1b-40c8-8b1c-9486eb3b9cbc" class="modal modal-fixed-footer">
<div class="modal-content">
<h4>NeutrinoApiCom result detail</h4>
<p><pre><code class="php">stdClass Object
(
[mobile_screen_height] => 960
[is_mobile] => 1
[type] => mobile-browser
[mobile_brand] => Motorola
[mobile_model] => XT897
[version] => 25.0.1364.169
[is_android] => 1
[browser_name] => Chrome Mobile
[operating_system_family] => Android
[operating_system_version] => 4.0.4
[is_ios] =>
[producer] => Google Inc.
[operating_system] => Android 4.0.x Ice Cream Sandwich
[mobile_screen_width] => 540
[mobile_browser] => Chrome Mobile
)
</code></pre></p>
</div>
<div class="modal-footer">
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a>
</div>
</div>
</td></tr><tr><td>PiwikDeviceDetector<br /><small>3.5.2</small></td><td>Chrome Mobile 25.0</td><td>WebKit </td><td>Android 4.0</td><td style="border-left: 1px solid #555">Motorola</td><td>Photon Q</td><td>smartphone</td><td>yes</td><td></td><td style="border-left: 1px solid #555"></td><td></td><td></td><td>0.004</td><td>
<!-- Modal Trigger -->
<a class="modal-trigger btn waves-effect waves-light" href="#modal-21638055-738d-46ba-a1b1-f5114bc26475">Detail</a>
<!-- Modal Structure -->
<div id="modal-21638055-738d-46ba-a1b1-f5114bc26475" class="modal modal-fixed-footer">
<div class="modal-content">
<h4>PiwikDeviceDetector result detail</h4>
<p><pre><code class="php">Array
(
[client] => Array
(
[type] => browser
[name] => Chrome Mobile
[short_name] => CM
[version] => 25.0
[engine] => WebKit
)
[operatingSystem] => Array
(
[name] => Android
[short_name] => AND
[version] => 4.0
[platform] =>
)
[device] => Array
(
[brand] => MR
[brandName] => Motorola
[model] => Photon Q
[device] => 1
[deviceName] => smartphone
)
[bot] =>
[extra] => Array
(
[isBot] =>
[isBrowser] => 1
[isFeedReader] =>
[isMobileApp] =>
[isPIM] =>
[isLibrary] =>
[isMediaPlayer] =>
[isCamera] =>
[isCarBrowser] =>
[isConsole] =>
[isFeaturePhone] =>
[isPhablet] =>
[isPortableMediaPlayer] =>
[isSmartDisplay] =>
[isSmartphone] => 1
[isTablet] =>
[isTV] =>
[isDesktop] =>
[isMobile] => 1
[isTouchEnabled] =>
)
)
</code></pre></p>
</div>
<div class="modal-footer">
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a>
</div>
</div>
</td></tr><tr><td>SinergiBrowserDetector<br /><small>6.0.0</small></td><td>Chrome 25.0.1364.169</td><td><i class="material-icons">close</i></td><td>Android 4.0.4</td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td></td><td><i class="material-icons">close</i></td><td>yes</td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td>0.001</td><td>
<!-- Modal Trigger -->
<a class="modal-trigger btn waves-effect waves-light" href="#modal-5415e7f2-ef7b-434c-abe0-b71ba9f6707c">Detail</a>
<!-- Modal Structure -->
<div id="modal-5415e7f2-ef7b-434c-abe0-b71ba9f6707c" class="modal modal-fixed-footer">
<div class="modal-content">
<h4>SinergiBrowserDetector result detail</h4>
<p><pre><code class="php">Array
(
[browser] => Sinergi\BrowserDetector\Browser Object
(
[userAgent:Sinergi\BrowserDetector\Browser:private] => Sinergi\BrowserDetector\UserAgent Object
(
[userAgentString:Sinergi\BrowserDetector\UserAgent:private] => Mozilla/5.0 (Linux; Android 4.0.4; XT897 Build/7.7.1Q-6_SPR-125_ASA-10) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.169 Mobile Safari/537.22
)
[name:Sinergi\BrowserDetector\Browser:private] => Chrome
[version:Sinergi\BrowserDetector\Browser:private] => 25.0.1364.169
[isRobot:Sinergi\BrowserDetector\Browser:private] =>
[isChromeFrame:Sinergi\BrowserDetector\Browser:private] =>
)
[operatingSystem] => Sinergi\BrowserDetector\Os Object
(
[name:Sinergi\BrowserDetector\Os:private] => Android
[version:Sinergi\BrowserDetector\Os:private] => 4.0.4
[isMobile:Sinergi\BrowserDetector\Os:private] => 1
[userAgent:Sinergi\BrowserDetector\Os:private] => Sinergi\BrowserDetector\UserAgent Object
(
[userAgentString:Sinergi\BrowserDetector\UserAgent:private] => Mozilla/5.0 (Linux; Android 4.0.4; XT897 Build/7.7.1Q-6_SPR-125_ASA-10) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.169 Mobile Safari/537.22
)
)
[device] => Sinergi\BrowserDetector\Device Object
(
[name:Sinergi\BrowserDetector\Device:private] => unknown
[userAgent:Sinergi\BrowserDetector\Device:private] => Sinergi\BrowserDetector\UserAgent Object
(
[userAgentString:Sinergi\BrowserDetector\UserAgent:private] => Mozilla/5.0 (Linux; Android 4.0.4; XT897 Build/7.7.1Q-6_SPR-125_ASA-10) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.169 Mobile Safari/537.22
)
)
)
</code></pre></p>
</div>
<div class="modal-footer">
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a>
</div>
</div>
</td></tr><tr><td>UAParser<br /><small>v3.4.5</small></td><td>Chrome Mobile 25.0.1364</td><td><i class="material-icons">close</i></td><td>Android 4.0.4</td><td style="border-left: 1px solid #555">Motorola</td><td>XT897</td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"></td><td></td><td><i class="material-icons">close</i></td><td>0.001</td><td>
<!-- Modal Trigger -->
<a class="modal-trigger btn waves-effect waves-light" href="#modal-346c1a98-5fd3-454f-b6c8-350f2f505d8b">Detail</a>
<!-- Modal Structure -->
<div id="modal-346c1a98-5fd3-454f-b6c8-350f2f505d8b" class="modal modal-fixed-footer">
<div class="modal-content">
<h4>UAParser result detail</h4>
<p><pre><code class="php">UAParser\Result\Client Object
(
[ua] => UAParser\Result\UserAgent Object
(
[major] => 25
[minor] => 0
[patch] => 1364
[family] => Chrome Mobile
)
[os] => UAParser\Result\OperatingSystem Object
(
[major] => 4
[minor] => 0
[patch] => 4
[patchMinor] =>
[family] => Android
)
[device] => UAParser\Result\Device Object
(
[brand] => Motorola
[model] => XT897
[family] => XT897
)
[originalUserAgent] => Mozilla/5.0 (Linux; Android 4.0.4; XT897 Build/7.7.1Q-6_SPR-125_ASA-10) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.169 Mobile Safari/537.22
)
</code></pre></p>
</div>
<div class="modal-footer">
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a>
</div>
</div>
</td></tr><tr><td>UserAgentStringCom<br /><small></small></td><td>Android Webkit Browser </td><td><i class="material-icons">close</i></td><td>Android 4.0.4</td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"></td><td></td><td></td><td>0.04801</td><td>
<!-- Modal Trigger -->
<a class="modal-trigger btn waves-effect waves-light" href="#modal-9cdd8b45-a2eb-406b-bd27-7e48af38ffd4">Detail</a>
<!-- Modal Structure -->
<div id="modal-9cdd8b45-a2eb-406b-bd27-7e48af38ffd4" class="modal modal-fixed-footer">
<div class="modal-content">
<h4>UserAgentStringCom result detail</h4>
<p><pre><code class="php">stdClass Object
(
[agent_type] => Browser
[agent_name] => Android Webkit Browser
[agent_version] => --
[os_type] => Android
[os_name] => Android
[os_versionName] =>
[os_versionNumber] => 4.0.4
[os_producer] =>
[os_producerURL] =>
[linux_distibution] => Null
[agent_language] =>
[agent_languageTag] =>
)
</code></pre></p>
</div>
<div class="modal-footer">
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a>
</div>
</div>
</td></tr><tr><td>WhatIsMyBrowserCom<br /><small></small></td><td>Chrome 25.0.1364.169</td><td>WebKit 537.22</td><td>Android 4.0.4</td><td style="border-left: 1px solid #555"></td><td></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td>0.40404</td><td>
<!-- Modal Trigger -->
<a class="modal-trigger btn waves-effect waves-light" href="#modal-9795f66f-7271-430e-973a-a5c0e14dc35a">Detail</a>
<!-- Modal Structure -->
<div id="modal-9795f66f-7271-430e-973a-a5c0e14dc35a" class="modal modal-fixed-footer">
<div class="modal-content">
<h4>WhatIsMyBrowserCom result detail</h4>
<p><pre><code class="php">stdClass Object
(
[operating_system_name] => Android
[simple_sub_description_string] =>
[simple_browser_string] => Chrome 25 on Android (Ice Cream Sandwich)
[browser_version] => 25
[extra_info] => Array
(
)
[operating_platform] =>
[extra_info_table] => stdClass Object
(
[System Build] => 7
)
[layout_engine_name] => WebKit
[detected_addons] => Array
(
)
[operating_system_flavour_code] =>
[hardware_architecture] =>
[operating_system_flavour] =>
[operating_system_frameworks] => Array
(
)
[browser_name_code] => chrome
[operating_system_version] => Ice Cream Sandwich
[simple_operating_platform_string] =>
[is_abusive] =>
[layout_engine_version] => 537.22
[browser_capabilities] => Array
(
)
[operating_platform_vendor_name] =>
[operating_system] => Android (Ice Cream Sandwich)
[operating_system_version_full] => 4.0.4
[operating_platform_code] =>
[browser_name] => Chrome
[operating_system_name_code] => android
[user_agent] => Mozilla/5.0 (Linux; Android 4.0.4; XT897 Build/7.7.1Q-6_SPR-125_ASA-10) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.169 Mobile Safari/537.22
[browser_version_full] => 25.0.1364.169
[browser] => Chrome 25
)
</code></pre></p>
</div>
<div class="modal-footer">
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a>
</div>
</div>
</td></tr><tr><td>WhichBrowser<br /><small>2.0.10</small></td><td>Chrome 25</td><td>Webkit 537.22</td><td>Android 4.0.4</td><td style="border-left: 1px solid #555">Motorola</td><td>Photon Q</td><td>mobile:smart</td><td>yes</td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"></td><td></td><td><i class="material-icons">close</i></td><td>0.024</td><td>
<!-- Modal Trigger -->
<a class="modal-trigger btn waves-effect waves-light" href="#modal-342c8d32-4765-40a8-8a5c-af3a38d19ae4">Detail</a>
<!-- Modal Structure -->
<div id="modal-342c8d32-4765-40a8-8a5c-af3a38d19ae4" class="modal modal-fixed-footer">
<div class="modal-content">
<h4>WhichBrowser result detail</h4>
<p><pre><code class="php">Array
(
[browser] => Array
(
[name] => Chrome
[version] => 25
[type] => browser
)
[engine] => Array
(
[name] => Webkit
[version] => 537.22
)
[os] => Array
(
[name] => Android
[version] => 4.0.4
)
[device] => Array
(
[type] => mobile
[subtype] => smart
[manufacturer] => Motorola
[model] => Photon Q
)
)
</code></pre></p>
</div>
<div class="modal-footer">
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a>
</div>
</div>
</td></tr><tr><td>Woothee<br /><small>v1.2.0</small></td><td>Chrome 25.0.1364.169</td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td>smartphone</td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"></td><td></td><td><i class="material-icons">close</i></td><td>0</td><td>
<!-- Modal Trigger -->
<a class="modal-trigger btn waves-effect waves-light" href="#modal-3f285ff5-314b-4db4-9948-54572e92e7b6">Detail</a>
<!-- Modal Structure -->
<div id="modal-3f285ff5-314b-4db4-9948-54572e92e7b6" class="modal modal-fixed-footer">
<div class="modal-content">
<h4>Woothee result detail</h4>
<p><pre><code class="php">Array
(
[name] => Chrome
[vendor] => Google
[version] => 25.0.1364.169
[category] => smartphone
[os] => Android
[os_version] => 4.0.4
)
</code></pre></p>
</div>
<div class="modal-footer">
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a>
</div>
</div>
</td></tr><tr><td>Wurfl<br /><small>1.6.4</small></td><td>Chrome Mobile 18</td><td><i class="material-icons">close</i></td><td>Android 4.0</td><td style="border-left: 1px solid #555">Motorola</td><td>XT897</td><td>Smartphone</td><td>yes</td><td>yes</td><td style="border-left: 1px solid #555"></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td>0.06</td><td>
<!-- Modal Trigger -->
<a class="modal-trigger btn waves-effect waves-light" href="#modal-1a1aee36-7ce7-4111-a391-8e2c501f1532">Detail</a>
<!-- Modal Structure -->
<div id="modal-1a1aee36-7ce7-4111-a391-8e2c501f1532" class="modal modal-fixed-footer">
<div class="modal-content">
<h4>Wurfl result detail</h4>
<p><pre><code class="php">Array
(
[virtual] => Array
(
[is_android] => true
[is_ios] => false
[is_windows_phone] => false
[is_app] => false
[is_full_desktop] => false
[is_largescreen] => true
[is_mobile] => true
[is_robot] => false
[is_smartphone] => true
[is_touchscreen] => true
[is_wml_preferred] => false
[is_xhtmlmp_preferred] => false
[is_html_preferred] => true
[advertised_device_os] => Android
[advertised_device_os_version] => 4.0
[advertised_browser] => Chrome Mobile
[advertised_browser_version] => 18
[complete_device_name] => Motorola XT897 (Photon Q 4G LTE)
[form_factor] => Smartphone
[is_phone] => true
[is_app_webview] => false
)
[all] => Array
(
[brand_name] => Motorola
[model_name] => XT897
[unique] => true
[ununiqueness_handler] =>
[is_wireless_device] => true
[device_claims_web_support] => true
[has_qwerty_keyboard] => true
[can_skip_aligned_link_row] => true
[uaprof] =>
[uaprof2] =>
[uaprof3] =>
[nokia_series] => 0
[nokia_edition] => 0
[device_os] => Android
[mobile_browser] => Chrome Mobile
[mobile_browser_version] => 18
[device_os_version] => 4.0
[pointing_method] => touchscreen
[release_date] => 2012_august
[marketing_name] => Photon Q 4G LTE
[model_extra_info] => for Sprint
[nokia_feature_pack] => 0
[can_assign_phone_number] => true
[is_tablet] => false
[manufacturer_name] =>
[is_bot] => false
[is_google_glass] => false
[proportional_font] => false
[built_in_back_button_support] => false
[card_title_support] => true
[softkey_support] => false
[table_support] => true
[numbered_menus] => false
[menu_with_select_element_recommended] => false
[menu_with_list_of_links_recommended] => true
[icons_on_menu_items_support] => false
[break_list_of_links_with_br_element_recommended] => true
[access_key_support] => false
[wrap_mode_support] => false
[times_square_mode_support] => false
[deck_prefetch_support] => false
[elective_forms_recommended] => true
[wizards_recommended] => false
[image_as_link_support] => false
[insert_br_element_after_widget_recommended] => false
[wml_can_display_images_and_text_on_same_line] => false
[wml_displays_image_in_center] => false
[opwv_wml_extensions_support] => false
[wml_make_phone_call_string] => wtai://wp/mc;
[chtml_display_accesskey] => false
[emoji] => false
[chtml_can_display_images_and_text_on_same_line] => false
[chtml_displays_image_in_center] => false
[imode_region] => none
[chtml_make_phone_call_string] => tel:
[chtml_table_support] => false
[xhtml_honors_bgcolor] => true
[xhtml_supports_forms_in_table] => true
[xhtml_support_wml2_namespace] => false
[xhtml_autoexpand_select] => false
[xhtml_select_as_dropdown] => false
[xhtml_select_as_radiobutton] => false
[xhtml_select_as_popup] => false
[xhtml_display_accesskey] => false
[xhtml_supports_invisible_text] => false
[xhtml_supports_inline_input] => false
[xhtml_supports_monospace_font] => false
[xhtml_supports_table_for_layout] => true
[xhtml_supports_css_cell_table_coloring] => true
[xhtml_format_as_css_property] => false
[xhtml_format_as_attribute] => false
[xhtml_nowrap_mode] => false
[xhtml_marquee_as_css_property] => false
[xhtml_readable_background_color1] => #FFFFFF
[xhtml_readable_background_color2] => #FFFFFF
[xhtml_allows_disabled_form_elements] => true
[xhtml_document_title_support] => true
[xhtml_preferred_charset] => iso-8859-1
[opwv_xhtml_extensions_support] => false
[xhtml_make_phone_call_string] => tel:
[xhtmlmp_preferred_mime_type] => text/html
[xhtml_table_support] => true
[xhtml_send_sms_string] => sms:
[xhtml_send_mms_string] => mms:
[xhtml_file_upload] => supported
[cookie_support] => true
[accept_third_party_cookie] => true
[xhtml_supports_iframe] => full
[xhtml_avoid_accesskeys] => true
[xhtml_can_embed_video] => none
[ajax_support_javascript] => true
[ajax_manipulate_css] => true
[ajax_support_getelementbyid] => true
[ajax_support_inner_html] => true
[ajax_xhr_type] => standard
[ajax_manipulate_dom] => true
[ajax_support_events] => true
[ajax_support_event_listener] => true
[ajax_preferred_geoloc_api] => w3c_api
[xhtml_support_level] => 4
[preferred_markup] => html_web_4_0
[wml_1_1] => false
[wml_1_2] => false
[wml_1_3] => false
[html_wi_w3_xhtmlbasic] => true
[html_wi_oma_xhtmlmp_1_0] => true
[html_wi_imode_html_1] => false
[html_wi_imode_html_2] => false
[html_wi_imode_html_3] => false
[html_wi_imode_html_4] => false
[html_wi_imode_html_5] => false
[html_wi_imode_htmlx_1] => false
[html_wi_imode_htmlx_1_1] => false
[html_wi_imode_compact_generic] => false
[html_web_3_2] => true
[html_web_4_0] => true
[voicexml] => false
[multipart_support] => false
[total_cache_disable_support] => false
[time_to_live_support] => false
[resolution_width] => 540
[resolution_height] => 960
[columns] => 60
[max_image_width] => 320
[max_image_height] => 480
[rows] => 40
[physical_screen_width] => 54
[physical_screen_height] => 96
[dual_orientation] => true
[density_class] => 1.5
[wbmp] => true
[bmp] => false
[epoc_bmp] => false
[gif_animated] => false
[jpg] => true
[png] => true
[tiff] => false
[transparent_png_alpha] => true
[transparent_png_index] => true
[svgt_1_1] => true
[svgt_1_1_plus] => false
[greyscale] => false
[gif] => true
[colors] => 65536
[webp_lossy_support] => true
[webp_lossless_support] => false
[post_method_support] => true
[basic_authentication_support] => true
[empty_option_value_support] => true
[emptyok] => false
[nokia_voice_call] => false
[wta_voice_call] => false
[wta_phonebook] => false
[wta_misc] => false
[wta_pdc] => false
[https_support] => true
[phone_id_provided] => false
[max_data_rate] => 3600
[wifi] => true
[sdio] => false
[vpn] => false
[has_cellular_radio] => true
[max_deck_size] => 2000000
[max_url_length_in_requests] => 256
[max_url_length_homepage] => 0
[max_url_length_bookmark] => 0
[max_url_length_cached_page] => 0
[max_no_of_connection_settings] => 0
[max_no_of_bookmarks] => 0
[max_length_of_username] => 0
[max_length_of_password] => 0
[max_object_size] => 0
[downloadfun_support] => false
[directdownload_support] => true
[inline_support] => false
[oma_support] => true
[ringtone] => false
[ringtone_3gpp] => false
[ringtone_midi_monophonic] => false
[ringtone_midi_polyphonic] => false
[ringtone_imelody] => false
[ringtone_digiplug] => false
[ringtone_compactmidi] => false
[ringtone_mmf] => false
[ringtone_rmf] => false
[ringtone_xmf] => false
[ringtone_amr] => false
[ringtone_awb] => false
[ringtone_aac] => false
[ringtone_wav] => false
[ringtone_mp3] => false
[ringtone_spmidi] => false
[ringtone_qcelp] => false
[ringtone_voices] => 1
[ringtone_df_size_limit] => 0
[ringtone_directdownload_size_limit] => 0
[ringtone_inline_size_limit] => 0
[ringtone_oma_size_limit] => 0
[wallpaper] => false
[wallpaper_max_width] => 0
[wallpaper_max_height] => 0
[wallpaper_preferred_width] => 0
[wallpaper_preferred_height] => 0
[wallpaper_resize] => none
[wallpaper_wbmp] => false
[wallpaper_bmp] => false
[wallpaper_gif] => false
[wallpaper_jpg] => false
[wallpaper_png] => false
[wallpaper_tiff] => false
[wallpaper_greyscale] => false
[wallpaper_colors] => 2
[wallpaper_df_size_limit] => 0
[wallpaper_directdownload_size_limit] => 0
[wallpaper_inline_size_limit] => 0
[wallpaper_oma_size_limit] => 0
[screensaver] => false
[screensaver_max_width] => 0
[screensaver_max_height] => 0
[screensaver_preferred_width] => 0
[screensaver_preferred_height] => 0
[screensaver_resize] => none
[screensaver_wbmp] => false
[screensaver_bmp] => false
[screensaver_gif] => false
[screensaver_jpg] => false
[screensaver_png] => false
[screensaver_greyscale] => false
[screensaver_colors] => 2
[screensaver_df_size_limit] => 0
[screensaver_directdownload_size_limit] => 0
[screensaver_inline_size_limit] => 0
[screensaver_oma_size_limit] => 0
[picture] => false
[picture_max_width] => 0
[picture_max_height] => 0
[picture_preferred_width] => 0
[picture_preferred_height] => 0
[picture_resize] => none
[picture_wbmp] => false
[picture_bmp] => false
[picture_gif] => false
[picture_jpg] => false
[picture_png] => false
[picture_greyscale] => false
[picture_colors] => 2
[picture_df_size_limit] => 0
[picture_directdownload_size_limit] => 0
[picture_inline_size_limit] => 0
[picture_oma_size_limit] => 0
[video] => false
[oma_v_1_0_forwardlock] => false
[oma_v_1_0_combined_delivery] => false
[oma_v_1_0_separate_delivery] => false
[streaming_video] => true
[streaming_3gpp] => true
[streaming_mp4] => true
[streaming_mov] => false
[streaming_video_size_limit] => 0
[streaming_real_media] => none
[streaming_flv] => false
[streaming_3g2] => false
[streaming_vcodec_h263_0] => 10
[streaming_vcodec_h263_3] => -1
[streaming_vcodec_mpeg4_sp] => 2
[streaming_vcodec_mpeg4_asp] => -1
[streaming_vcodec_h264_bp] => 3.0
[streaming_acodec_amr] => nb
[streaming_acodec_aac] => lc
[streaming_wmv] => none
[streaming_preferred_protocol] => rtsp
[streaming_preferred_http_protocol] => apple_live_streaming
[wap_push_support] => false
[connectionless_service_indication] => false
[connectionless_service_load] => false
[connectionless_cache_operation] => false
[connectionoriented_unconfirmed_service_indication] => false
[connectionoriented_unconfirmed_service_load] => false
[connectionoriented_unconfirmed_cache_operation] => false
[connectionoriented_confirmed_service_indication] => false
[connectionoriented_confirmed_service_load] => false
[connectionoriented_confirmed_cache_operation] => false
[utf8_support] => true
[ascii_support] => false
[iso8859_support] => false
[expiration_date] => false
[j2me_cldc_1_0] => false
[j2me_cldc_1_1] => false
[j2me_midp_1_0] => false
[j2me_midp_2_0] => false
[doja_1_0] => false
[doja_1_5] => false
[doja_2_0] => false
[doja_2_1] => false
[doja_2_2] => false
[doja_3_0] => false
[doja_3_5] => false
[doja_4_0] => false
[j2me_jtwi] => false
[j2me_mmapi_1_0] => false
[j2me_mmapi_1_1] => false
[j2me_wmapi_1_0] => false
[j2me_wmapi_1_1] => false
[j2me_wmapi_2_0] => false
[j2me_btapi] => false
[j2me_3dapi] => false
[j2me_locapi] => false
[j2me_nokia_ui] => false
[j2me_motorola_lwt] => false
[j2me_siemens_color_game] => false
[j2me_siemens_extension] => false
[j2me_heap_size] => 0
[j2me_max_jar_size] => 0
[j2me_storage_size] => 0
[j2me_max_record_store_size] => 0
[j2me_screen_width] => 0
[j2me_screen_height] => 0
[j2me_canvas_width] => 0
[j2me_canvas_height] => 0
[j2me_bits_per_pixel] => 0
[j2me_audio_capture_enabled] => false
[j2me_video_capture_enabled] => false
[j2me_photo_capture_enabled] => false
[j2me_capture_image_formats] => none
[j2me_http] => false
[j2me_https] => false
[j2me_socket] => false
[j2me_udp] => false
[j2me_serial] => false
[j2me_gif] => false
[j2me_gif89a] => false
[j2me_jpg] => false
[j2me_png] => false
[j2me_bmp] => false
[j2me_bmp3] => false
[j2me_wbmp] => false
[j2me_midi] => false
[j2me_wav] => false
[j2me_amr] => false
[j2me_mp3] => false
[j2me_mp4] => false
[j2me_imelody] => false
[j2me_rmf] => false
[j2me_au] => false
[j2me_aac] => false
[j2me_realaudio] => false
[j2me_xmf] => false
[j2me_wma] => false
[j2me_3gpp] => false
[j2me_h263] => false
[j2me_svgt] => false
[j2me_mpeg4] => false
[j2me_realvideo] => false
[j2me_real8] => false
[j2me_realmedia] => false
[j2me_left_softkey_code] => 0
[j2me_right_softkey_code] => 0
[j2me_middle_softkey_code] => 0
[j2me_select_key_code] => 0
[j2me_return_key_code] => 0
[j2me_clear_key_code] => 0
[j2me_datefield_no_accepts_null_date] => false
[j2me_datefield_broken] => false
[receiver] => false
[sender] => false
[mms_max_size] => 0
[mms_max_height] => 0
[mms_max_width] => 0
[built_in_recorder] => false
[built_in_camera] => true
[mms_jpeg_baseline] => false
[mms_jpeg_progressive] => false
[mms_gif_static] => false
[mms_gif_animated] => false
[mms_png] => false
[mms_bmp] => false
[mms_wbmp] => false
[mms_amr] => false
[mms_wav] => false
[mms_midi_monophonic] => false
[mms_midi_polyphonic] => false
[mms_midi_polyphonic_voices] => 0
[mms_spmidi] => false
[mms_mmf] => false
[mms_mp3] => false
[mms_evrc] => false
[mms_qcelp] => false
[mms_ota_bitmap] => false
[mms_nokia_wallpaper] => false
[mms_nokia_operatorlogo] => false
[mms_nokia_3dscreensaver] => false
[mms_nokia_ringingtone] => false
[mms_rmf] => false
[mms_xmf] => false
[mms_symbian_install] => false
[mms_jar] => false
[mms_jad] => false
[mms_vcard] => false
[mms_vcalendar] => false
[mms_wml] => false
[mms_wbxml] => false
[mms_wmlc] => false
[mms_video] => false
[mms_mp4] => false
[mms_3gpp] => false
[mms_3gpp2] => false
[mms_max_frame_rate] => 0
[nokiaring] => false
[picturemessage] => false
[operatorlogo] => false
[largeoperatorlogo] => false
[callericon] => false
[nokiavcard] => false
[nokiavcal] => false
[sckl_ringtone] => false
[sckl_operatorlogo] => false
[sckl_groupgraphic] => false
[sckl_vcard] => false
[sckl_vcalendar] => false
[text_imelody] => false
[ems] => false
[ems_variablesizedpictures] => false
[ems_imelody] => false
[ems_odi] => false
[ems_upi] => false
[ems_version] => 0
[siemens_ota] => false
[siemens_logo_width] => 101
[siemens_logo_height] => 29
[siemens_screensaver_width] => 101
[siemens_screensaver_height] => 50
[gprtf] => false
[sagem_v1] => false
[sagem_v2] => false
[panasonic] => false
[sms_enabled] => true
[wav] => false
[mmf] => false
[smf] => false
[mld] => false
[midi_monophonic] => false
[midi_polyphonic] => false
[sp_midi] => false
[rmf] => false
[xmf] => false
[compactmidi] => false
[digiplug] => false
[nokia_ringtone] => false
[imelody] => false
[au] => false
[amr] => false
[awb] => false
[aac] => true
[mp3] => true
[voices] => 1
[qcelp] => false
[evrc] => false
[flash_lite_version] =>
[fl_wallpaper] => false
[fl_screensaver] => false
[fl_standalone] => false
[fl_browser] => false
[fl_sub_lcd] => false
[full_flash_support] => false
[css_supports_width_as_percentage] => true
[css_border_image] => webkit
[css_rounded_corners] => webkit
[css_gradient] => none
[css_spriting] => true
[css_gradient_linear] => none
[is_transcoder] => false
[transcoder_ua_header] => user-agent
[rss_support] => false
[pdf_support] => true
[progressive_download] => true
[playback_vcodec_h263_0] => 10
[playback_vcodec_h263_3] => -1
[playback_vcodec_mpeg4_sp] => 0
[playback_vcodec_mpeg4_asp] => -1
[playback_vcodec_h264_bp] => 3.0
[playback_real_media] => none
[playback_3gpp] => true
[playback_3g2] => false
[playback_mp4] => true
[playback_mov] => false
[playback_acodec_amr] => nb
[playback_acodec_aac] => none
[playback_df_size_limit] => 0
[playback_directdownload_size_limit] => 0
[playback_inline_size_limit] => 0
[playback_oma_size_limit] => 0
[playback_acodec_qcelp] => false
[playback_wmv] => none
[hinted_progressive_download] => true
[html_preferred_dtd] => html4
[viewport_supported] => true
[viewport_width] => device_width_token
[viewport_userscalable] => no
[viewport_initial_scale] =>
[viewport_maximum_scale] =>
[viewport_minimum_scale] =>
[mobileoptimized] => false
[handheldfriendly] => false
[canvas_support] => full
[image_inlining] => true
[is_smarttv] => false
[is_console] => false
[nfc_support] => true
[ux_full_desktop] => false
[jqm_grade] => A
[is_sencha_touch_ok] => false
[controlcap_is_smartphone] => default
[controlcap_is_ios] => default
[controlcap_is_android] => default
[controlcap_is_robot] => default
[controlcap_is_app] => default
[controlcap_advertised_device_os] => default
[controlcap_advertised_device_os_version] => default
[controlcap_advertised_browser] => default
[controlcap_advertised_browser_version] => default
[controlcap_is_windows_phone] => default
[controlcap_is_full_desktop] => default
[controlcap_is_largescreen] => default
[controlcap_is_mobile] => default
[controlcap_is_touchscreen] => default
[controlcap_is_wml_preferred] => default
[controlcap_is_xhtmlmp_preferred] => default
[controlcap_is_html_preferred] => default
[controlcap_form_factor] => default
[controlcap_complete_device_name] => default
)
)
</code></pre></p>
</div>
<div class="modal-footer">
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a>
</div>
</div>
</td></tr></table>
</div>
<div class="section">
<h1 class="header center orange-text">About this comparison</h1>
<div class="row center">
<h5 class="header light">
The primary goal of this project is simple<br />
I wanted to know which user agent parser is the most accurate in each part - device detection, bot detection and so on...<br />
<br />
The secondary goal is to provide a source for all user agent parsers to improve their detection based on this results.<br />
<br />
You can also improve this further, by suggesting ideas at <a href="https://github.com/ThaDafinser/UserAgentParserComparison">ThaDafinser/UserAgentParserComparison</a><br />
<br />
The comparison is based on the abstraction by <a href="https://github.com/ThaDafinser/UserAgentParser">ThaDafinser/UserAgentParser</a>
</h5>
</div>
</div>
<div class="card">
<div class="card-content">
Comparison created <i>2016-02-13 13:28:08</i> | by
<a href="https://github.com/ThaDafinser">ThaDafinser</a>
</div>
</div>
</div>
<script src="https://code.jquery.com/jquery-2.1.4.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.3/js/materialize.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/list.js/1.1.1/list.min.js"></script>
<script>
$(document).ready(function(){
// the "href" attribute of .modal-trigger must specify the modal ID that wants to be triggered
$('.modal-trigger').leanModal();
});
</script>
</body>
</html> | ThaDafinser/UserAgentParserComparison | v4/user-agent-detail/29/ed/29edae02-71e1-4aa0-af02-809a6e7165b9.html | HTML | mit | 46,679 |
require 'parser/ast/node'
require_relative 'api/ast_extension'
require_relative 'api/proxy'
require_relative 'api/args_node'
require_relative 'api/arg_node'
require_relative 'api/method_node'
require_relative 'api/send_node'
require_relative 'api/block_node'
require_relative 'api/variable_node'
module T34
class Rewriter
module API
NODES = [MethodNode, ArgsNode, ArgNode, SendNode, BlockNode, VariableNode]
# TODO
# it should enqueue traverse filter in a queue unless a block given
# and filter only if block_given? to allow
# methods(:meth).with(any_argument) # <- implementation of rspec expectation
def methods(*names)
methods = []
ast.traverse do |node|
if match?(:method, node, names)
methods << node
yield node if block_given?
end
end
methods
end
def blocks
blocks = []
ast.traverse do |node|
if node.type == :block
blocks << node
yield node if block_given?
end
end
blocks
end
def variables
variables = []
ast.traverse do |node|
if node.type == :lvasgn
variables << node
yield node if block_given?
end
end
variables
end
def sends(*names)
sends = []
ast.traverse do |node|
if match?(:send, node, names, :method_name)
sends << node
yield node if block_given?
end
end
sends
end
private
def match?(type, node, names = [], name_method = :name)
result = node.type == type
if node.respond_to?(name_method)
result = result &&
(names.empty? || names.include?(node.send(name_method)))
end
result
end
end
end
end
| gazay/T34 | lib/t34/rewriter/api.rb | Ruby | mit | 1,886 |
package io.craft.atom.protocol.http;
import static io.craft.atom.protocol.http.HttpConstants.EQUAL_SIGN;
import static io.craft.atom.protocol.http.HttpConstants.SEMICOLON;
import static io.craft.atom.protocol.http.HttpConstants.SP;
import io.craft.atom.protocol.AbstractProtocolCodec;
import io.craft.atom.protocol.ProtocolDecoder;
import io.craft.atom.protocol.ProtocolException;
import io.craft.atom.protocol.http.model.HttpCookie;
import java.nio.charset.Charset;
import java.util.ArrayList;
import java.util.List;
import lombok.ToString;
/**
* A {@link ProtocolDecoder} which decodes cookie string bytes into {@code Cookie} object, default charset is utf-8.
* <br>
* Only accept complete cookie bytes to decode, because this implementation is stateless and thread safe.
*
* @see HttpCookie
* @author mindwind
* @version 1.0, Mar 25, 2013
*/
@ToString(callSuper = true)
public class HttpCookieDecoder extends AbstractProtocolCodec implements ProtocolDecoder<HttpCookie> {
private static final int START = 0;
private static final int NAME = 1;
private static final int VALUE = 2;
private static final int ATTRIBUTE_START = 3;
private static final int ATTRIBUTE_NAME = 4;
private static final int DOMAIN_ATTRIBUTE_VALUE = 5;
private static final int PATH_ATTRIBUTE_VALUE = 6;
private static final int EXPIRES_ATTRIBUTE_VALUE = 7;
private static final int MAX_AGE_ATTRIBUTE_VALUE = 8;
private static final int EXTENSION_ATTRIBUTE_VALUE = 9;
private static final int END = -1;
private boolean setCookie = false;
// ~ ----------------------------------------------------------------------------------------------------------
public HttpCookieDecoder() {}
public HttpCookieDecoder(Charset charset) {
this.charset = charset;
}
public HttpCookieDecoder(Charset charset, boolean setCookie) {
this.charset = charset;
this.setCookie = setCookie;
}
// ~ ----------------------------------------------------------------------------------------------------------
@Override
public void reset() {}
@Override
public List<HttpCookie> decode(byte[] bytes) throws ProtocolException {
try {
if (setCookie) {
return decode4setCookie(bytes);
} else {
return decode4cookie(bytes);
}
} catch (Exception e) {
if (e instanceof ProtocolException) {
throw (ProtocolException) e;
}
throw new ProtocolException(e);
}
}
// Cookie: SID=31d4d96e407aad42; lang=en-US
// Cookie: test=test123
private List<HttpCookie> decode4cookie(byte[] bytes) throws ProtocolException {
List<HttpCookie> cookies = new ArrayList<HttpCookie>();
HttpCookie cookie = null;
int searchIndex = 0;
int stateIndex = 0;
int state = START;
int len = bytes.length;
int i = 0;
while (searchIndex < len) {
switch (state) {
case START:
// skip all OWS(Optional White Space)
for (; searchIndex < len && bytes[searchIndex] == SP; searchIndex++);
stateIndex = searchIndex;
state = NAME;
cookie = new HttpCookie();
break;
case NAME:
for (; searchIndex < len && bytes[searchIndex] != EQUAL_SIGN; searchIndex++, i++);
String name = new String(bytes, stateIndex, i, charset);
cookie.setName(name);
stateIndex = ++searchIndex;
i = 0;
state = VALUE;
break;
case VALUE:
for (; searchIndex < len && bytes[searchIndex] != SEMICOLON; searchIndex++, i++);
String value = new String(bytes, stateIndex, i, charset);
cookie.setValue(value);
cookies.add(cookie);
stateIndex = ++searchIndex;
i = 0;
if (searchIndex >= len) {
state = END;
} else {
state = START;
}
break;
case END:
// nothing to do
break;
}
}
return cookies;
}
// Set-Cookie: SID=31d4d96e407aad42; Domain=example.com; Path=/; HttpOnly; Secure; Expires=Wed, 09 Jun 2021 10:18:14 GMT; Max-Age=86400
// Set-Cookie: SID=31d4d96e407aad42; Domain=example.com; Path=/; HttpOnly; Secure; Expires=Wed, 09 Jun 2021 10:18:14 GMT; Max-Age=86400; test=extensionTest
private List<HttpCookie> decode4setCookie(byte[] bytes) throws ProtocolException {
List<HttpCookie> cookies = new ArrayList<HttpCookie>();
HttpCookie cookie = null;
int searchIndex = 0;
int stateIndex = 0;
int state = START;
int len = bytes.length;
int i = 0;
String extentionName = "";
while (searchIndex < len) {
switch (state) {
case START:
// skip all OWS(Optional White Space)
for (; searchIndex < len && bytes[searchIndex] == SP; searchIndex++);
stateIndex = searchIndex;
state = NAME;
cookie = new HttpCookie();
break;
case NAME:
for (; searchIndex < len && bytes[searchIndex] != EQUAL_SIGN; searchIndex++, i++);
String name = new String(bytes, stateIndex, i, charset);
cookie.setName(name);
stateIndex = ++searchIndex;
i = 0;
state = VALUE;
break;
case VALUE:
for (; searchIndex < len && bytes[searchIndex] != SEMICOLON; searchIndex++, i++);
String value = new String(bytes, stateIndex, i, charset);
cookie.setValue(value);
cookies.add(cookie);
stateIndex = ++searchIndex;
i = 0;
if (searchIndex >= len) {
state = END;
} else {
state = ATTRIBUTE_START;
}
break;
case ATTRIBUTE_START:
for (; searchIndex < len && bytes[searchIndex] == SP; searchIndex++);
stateIndex = searchIndex;
state = ATTRIBUTE_NAME;
break;
case ATTRIBUTE_NAME:
for (; searchIndex < len && bytes[searchIndex] != EQUAL_SIGN && bytes[searchIndex] != SEMICOLON; searchIndex++, i++);
String an = new String(bytes, stateIndex, i, charset);
if (HttpCookie.DOMAIN.equalsIgnoreCase(an)) {
state = DOMAIN_ATTRIBUTE_VALUE;
} else if (HttpCookie.PATH.equalsIgnoreCase(an)) {
state = PATH_ATTRIBUTE_VALUE;
} else if (HttpCookie.HTTP_ONLY.equalsIgnoreCase(an)) {
cookie.setHttpOnly(true);
if (searchIndex >= len) {
state = END;
} else {
state = ATTRIBUTE_START;
}
} else if (HttpCookie.SECURE.equalsIgnoreCase(an)) {
cookie.setSecure(true);
if (searchIndex >= len) {
state = END;
} else {
state = ATTRIBUTE_START;
}
} else if (HttpCookie.EXPIRES.equalsIgnoreCase(an)) {
state = EXPIRES_ATTRIBUTE_VALUE;
} else if (HttpCookie.MAX_AGE.equalsIgnoreCase(an)) {
state = MAX_AGE_ATTRIBUTE_VALUE;
} else {
extentionName = an;
state = EXTENSION_ATTRIBUTE_VALUE;
}
stateIndex = ++searchIndex;
i = 0;
break;
case DOMAIN_ATTRIBUTE_VALUE:
for (; searchIndex < len && bytes[searchIndex] != SEMICOLON; searchIndex++, i++);
String domain = new String(bytes, stateIndex, i, charset);
cookie.setDomain(domain);
stateIndex = ++searchIndex;
i = 0;
if (searchIndex >= len) {
state = END;
} else {
state = ATTRIBUTE_START;
}
break;
case PATH_ATTRIBUTE_VALUE:
for (; searchIndex < len && bytes[searchIndex] != SEMICOLON; searchIndex++, i++);
String path = new String(bytes, stateIndex, i, charset);
cookie.setPath(path);
stateIndex = ++searchIndex;
i = 0;
if (searchIndex >= len) {
state = END;
} else {
state = ATTRIBUTE_START;
}
break;
case EXPIRES_ATTRIBUTE_VALUE:
for (; searchIndex < len && bytes[searchIndex] != SEMICOLON; searchIndex++, i++);
String expires = new String(bytes, stateIndex, i, charset);
cookie.setExpires(HttpDates.parse(expires));
stateIndex = ++searchIndex;
i = 0;
if (searchIndex >= len) {
state = END;
} else {
state = ATTRIBUTE_START;
}
break;
case MAX_AGE_ATTRIBUTE_VALUE:
for (; searchIndex < len && bytes[searchIndex] != SEMICOLON; searchIndex++, i++);
String maxAge = new String(bytes, stateIndex, i, charset);
cookie.setMaxAge(Integer.parseInt(maxAge));
stateIndex = ++searchIndex;
i = 0;
if (searchIndex >= len) {
state = END;
} else {
state = ATTRIBUTE_START;
}
break;
case EXTENSION_ATTRIBUTE_VALUE:
for (; searchIndex < len && bytes[searchIndex] != SEMICOLON; searchIndex++, i++);
String extentionValue = new String(bytes, stateIndex, i, charset);
cookie.addExtensionAttribute(extentionName, extentionValue);
stateIndex = ++searchIndex;
i = 0;
if (searchIndex >= len) {
state = END;
} else {
state = ATTRIBUTE_START;
}
break;
case END:
// nothing to do
break;
}
}
return cookies;
}
}
| mindwind/craft-atom | craft-atom-protocol-http/src/main/java/io/craft/atom/protocol/http/HttpCookieDecoder.java | Java | mit | 8,579 |
body {
margin: 0;
padding: 0;
}
#guard-dog {
background: url(images/white_blur.png) 50% 0 no-repeat fixed;
color: white;
height: 720px;
margin: 0 auto;
padding: 120px 0 0 0;
}
.dog-button {
top: -25px;
}
#dog-info {
background-color: #FCFFF5;
color: white;
height: 720px;
margin: 0 auto;
padding: 90px 0 0 0;
}
#dog-data {
background: url(images/blur_2.png) 50% 0 no-repeat fixed;
color: white;
height: 720px;
margin: 0 auto;
padding: 120px 0 0 0;
}
#dog-pack {
background-color: #3E606F;
color: white;
height: 720px;
margin: 0 auto;
padding: 100px 0 0 0;
}
#dog-app {
background: url(images/blurred_2.png) 50% 0 no-repeat fixed;
color: white;
height: 720px;
margin: 0 auto;
padding: 120px 0 0 0;
}
#dog-footer {
background-color: #000000;
color: white;
height: 280px;
margin: 0 auto;
padding: 80px 0 0 0;
}
@font-face {
font-family:'hip';
src: url(fonts/_SIMPLIFICA-Typeface.ttf);
}
.mission-statement
{
position: relative;
top: -80px;
}
.team-buttom {
bottom: -120px;
}
.data-buttom {
bottom: -200px;
}
.smartphones {
position: relative;
}
.users {
position: relative;
}
.alarms {
position: relative;
}
.smartphones-nums h1 {
position: relative;
color: #FCFFF5;
font-weight: bold;
top: 20px;
left: 23px;
}
.users-nums h1 {
position: relative;
color: #FCFFF5;
font-weight: bold;
top: 20px;
left: 25px;
}
.alarms-nums h1 {
position: relative;
color: #FCFFF5;
font-weight: bold;
top: 20px;
left: 20px;
}
.smartphones-description h4 {
position: relative;
color: #FCFFF5;
top: 20px;
right: 30px;
}
.users-description h4 {
position: relative;
color: #FCFFF5;
top: 20px;
right: 28px;
}
.alarms-description h4 {
position: relative;
color: #FCFFF5;
top: 20px;
left: -2px;
}
.impact-header {
position: relative;
bottom: 90px;
}
.ace-in-the-hole {
position: relative;
bottom: 120px;
}
.pack-button {
position: relative;
bottom: 60px;
}
#dog-footer {
color: #000000;
}
.return-button a {
color: white;
top: 35px;
}
.steve {
position: relative;
}
.thomas {
position: relative;
}
.dan {
position: relative;
}
.steve-name h4 {
position: relative;
color: #FCFFF5;
}
.steve-bio h5 {
position: relative;
color: #FCFFF5;
}
.thomas-name h4 {
position: relative;
color: #FCFFF5;
font-weight: bold;
}
.thomas-bio h5 {
position: relative;
color: #FCFFF5;
font-style: italic;
}
.dan-name h4 {
position: relative;
color: #FCFFF5;
font-weight: bold;
}
.dan-bio h5 {
position: relative;
color: #FCFFF5;
font-style: italic;
}
.nathan {
position: relative;
}
.nathan-name h4 {
position: relative;
color: #FCFFF5;
font-weight: bold;
}
.nathan-bio h5 {
position: relative;
color: #FCFFF5;
font-style: italic;
}
.john {
position: relative;
}
.john-name h4 {
position: relative;
color: #FCFFF5;
font-weight: bold;
}
.john-bio h5 {
position: relative;
color: #FCFFF5;
font-style: italic;
}
.TheSquad {
position: relative;
bottom: 200px;
}
.footer-button {
position: relative;
bottom: 290px;
}
.company-name {
position: relative;
top: 30px;
}
.company-name h5 {
color: white;
} | BrambleLLC/H4H_2015 | styles.css | CSS | mit | 3,100 |
#!/bin/bash
function bamboo_prepare_db {
# Validate that all the configuration parameters have been provided to avoid bailing out and leaving Bamboo locked
if [ -z "${BACKUP_RDS_INSTANCE_ID}" ]; then
error "The RDS instance id must be set in ${BACKUP_VARS_FILE}"
bail "See bamboo.diy-aws-backup.vars.sh.example for the defaults."
fi
validate_rds_instance_id "${BACKUP_RDS_INSTANCE_ID}"
}
function bamboo_backup_db {
info "Performing backup of RDS instance ${BACKUP_RDS_INSTANCE_ID}"
snapshot_rds_instance "${BACKUP_RDS_INSTANCE_ID}"
}
function bamboo_prepare_db_restore {
local SNAPSHOT_TAG="${1}"
if [ -z "${RESTORE_RDS_INSTANCE_ID}" ]; then
error "The RDS instance id must be set in ${BACKUP_VARS_FILE}"
bail "See bamboo.diy-aws-backup.vars.sh.example for the defaults."
fi
if [ -z "${RESTORE_RDS_INSTANCE_CLASS}" ]; then
info "No restore instance class has been set in ${BACKUP_VARS_FILE}"
fi
if [ -z "${RESTORE_RDS_SUBNET_GROUP_NAME}" ]; then
info "No restore subnet group has been set in ${BACKUP_VARS_FILE}"
fi
if [ -z "${RESTORE_RDS_SECURITY_GROUP}" ]; then
info "No restore security group has been set in ${BACKUP_VARS_FILE}"
fi
validate_rds_snapshot "${SNAPSHOT_TAG}"
RESTORE_RDS_SNAPSHOT_ID="${SNAPSHOT_TAG}"
}
function bamboo_restore_db {
restore_rds_instance "${RESTORE_RDS_INSTANCE_ID}" "${RESTORE_RDS_SNAPSHOT_ID}"
info "Performed restore of ${RESTORE_RDS_SNAPSHOT_ID} to RDS instance ${RESTORE_RDS_INSTANCE_ID}"
}
function cleanup_old_db_snapshots {
for snapshot_id in $(list_old_rds_snapshot_ids); do
info "Deleting old snapshot ${snapshot_id}"
delete_rds_snapshot "${snapshot_id}"
done
}
| redmatter/atlassian-bamboo-diy-backup | bamboo.diy-backup.rds.sh | Shell | mit | 1,775 |
/*
* Copyright © 2014 - 2017 | Wurst-Imperium | All rights reserved.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
package zeonClient.utils;
import net.minecraft.client.Minecraft;
import net.minecraft.client.multiplayer.PlayerControllerMP;
import net.minecraft.inventory.ClickType;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumHand;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Vec3d;
public final class WPlayerController
{
private static PlayerControllerMP getPlayerController()
{
return Minecraft.getMinecraft().playerController;
}
public static ItemStack windowClick_PICKUP(int slot)
{
return getPlayerController().windowClick(0, slot, 0, ClickType.PICKUP,
WMinecraft.getPlayer());
}
public static ItemStack windowClick_QUICK_MOVE(int slot)
{
return getPlayerController().windowClick(0, slot, 0,
ClickType.QUICK_MOVE, WMinecraft.getPlayer());
}
public static ItemStack windowClick_THROW(int slot)
{
return getPlayerController().windowClick(0, slot, 1, ClickType.THROW,
WMinecraft.getPlayer());
}
public static void processRightClick()
{
getPlayerController().processRightClick(WMinecraft.getPlayer(),
WMinecraft.getWorld(), EnumHand.MAIN_HAND);
}
public static void processRightClickBlock(BlockPos pos, EnumFacing side,
Vec3d hitVec)
{
getPlayerController().processRightClickBlock(WMinecraft.getPlayer(),
WMinecraft.getWorld(), pos, side, hitVec, EnumHand.MAIN_HAND);
}
}
| A-D-I-T-Y-A/Zeon-Client | src/minecraft/zeonClient/utils/WPlayerController.java | Java | mit | 1,685 |
function const = declarations()
% const = declarations()
%
% Stores and records variable declarations and configuration
% options. Includes documentation for each variable to record meaning.
% const contains the constants needed for the function
% Creates sub-structure .opt with configurable options to be called by
% certain functions
%% Model Parameters
const.runoff = 0.85; %runoff coefficient, in dminesionless units
% see model parameters section
const.ffdisc = 2; %first-flush discard, in mm
% see model parameters subsection
const.vcmax = 16000; %cistern volume, in liters
% see model parameters subsection
const.dry_period = [150,365]; %start and finish days of dry season
const.latlim=[-17.93,-2.76]; %include only meteorological posts falling
% within this range (latitude)
const.lonlim=[-46.39,-34.50]; %as above (longitude)
const.data_begin=1950; %first year of downloaded data
const.data_end=2013; %last year of downloaded data
const.starting_volume=0.5*const.vcmax; %cisterns start half-full
%% Configurable options:
% Map Configuration
const.opt.dot_size=25; %dot size on maps
const.opt.mintick=0.5; %minimum value for map colorbar
const.opt.hist_bins=20; %number of bins for histogram
const.opt.figure_toggle=0; %determines which figures produced:
% 0 for no figures
% 1 to draw maps
const.opt.map_mar=0; %margin around maps (in degrees)
const.opt.mapcolor=1;
% 1 for color
% 0 for black_white
% Data Analysis and Sourcing
const.opt.nerrok = 7; %number of missing data values permitted in a year
% of data before the year's data is discarded
% see data used subsection
const.opt.minyrs = 15; %number of years with usable data required for a
% meteorological post to be considered
% see data used subsection
const.opt.roof_source = 1; %option for sourcing roof data
% 1 for 'default.txt'
% 2 for 'Milha.txt'
% 3 for 'paper2009.txt'
% 4 for command window specification of filename
% write filename as string; file must be readable using load()
% include the full path if needed
% Configurable Consumption Rules
const.opt.consumption_rule=0; %rule for consumption pattern
% 0 is the default assumption: all water is consumed during the
% dry period
% 1 is the secondary option: the same quantity of water is
% consumed evenly all year long
% 2 is the third option: there are two separate nonzero rules for
% water consumption during rainy and dry seasONS
% NOTE: the following consumption amounts are not in the .opt substructure
% (they are directly in const) but they are grouped here for clarity
const.cons_year=16000; %yearly consumption, in liters -- does not need
% to change for changing consumption_rule
const.cons_rainy=0.25*const.cons_year; %rainy season consumption for use
% with const.opt.consumption_rule=1
const.cons_yearround=5*3; %constant year-long consumption for use with
% const.opt.consumption_rule=2; multiplied by 5 to assume 5 ppl/family
% Data
const.data_path = '../data'
end
| jdossgollin/cisternas-brasil | code/declarations.m | Matlab | mit | 3,047 |
/*
* This file is part of the gina package.
* Copyright (c) 2016 Rhinostone <gina@rhinostone.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
//Imports.
var url = require('url')
, fs = require('fs')
, utils = require('./utils')
, console = utils.logger
, inherits = utils.inherits
, merge = utils.merge
, SuperController = require('./controller')
, Config = require('./config')
//get config instance
, config = new Config();
/**
* @class Router
*
*
* @package Gina
* @namespace
* @author Rhinostone <gina@rhinostone.com>
* @api Public
*/
function Router(env) {
this.name = 'Router';
var self = this
, local = {
conf : config.getInstance(),
bundle : null
};
/**
* Router Constructor
* @constructor
* */
var init = function(){
if ( typeof(Router.initialized) != "undefined" ) {
return self.getInstance()
} else {
Router.initialized = true
}
}
this.setMiddlewareInstance = function(instance) {
self.middlewareInstance = instance
}
this.getInstance = function() {
return self
}
/**
* Compare urls
*
* @param {object} request
* @param {object} params - Route params
* @param {string} urlRouting
*
* @return {object|false} routes
* */
this.compareUrls = function(request, params, urlRouting) {
if ( Array.isArray(urlRouting) ) {
var i = 0
, res = {
past : false,
request : request
};
while (i < urlRouting.length && !res.past) {
res = parseRouting(request, params, urlRouting[i]);
++i
}
return res
} else {
return parseRouting(request, params, urlRouting)
}
}
/**
* Check if rule has params
*
* @param {string} pathname
* @return {boolean} found
*
* @private
* */
var hasParams = function(pathname) {
return ( /:/.test(pathname) ) ? true : false
}
/**
* Parse routing for mathcing url
*
* @param {object} request
* @param {object} params
* @param {string} route
*
* @return
*
* */
var parseRouting = function(request, params, route) {
var uRe = params.url.split(/\//)
, uRo = route.split(/\//)
, maxLen = uRo.length
, score = 0
, r = {}
, i = 0;
//attaching routing description for this request
request.routing = params; // can be retried in controller with: req.routing
if (uRe.length === uRo.length) {
for (; i<maxLen; ++i) {
if (uRe[i] === uRo[i]) {
++score
} else if (score == i && hasParams(uRo[i]) && fitsWithRequirements(request, uRo[i], uRe[i], params)) {
++score
}
}
}
r.past = (score === maxLen) ? true : false;
r.request = request;
return r
}
/**
* Fits with requiremements
* http://en.wikipedia.org/wiki/Regular_expression
*
* @param {string} urlVar
* @param {string} urlVal
* @param {object} params
*
* @return {boolean} true|false - True if fits
*
* @private
* */
var fitsWithRequirements = function(request, urlVar, urlVal, params) {
var matched = -1
, _param = urlVar.match(/\:\w+/g)
, regex = null
, tested = false;
if (!_param.length) return false;
// if custom path, path rewrite
if (request.routing.param.path) {
regex = new RegExp(urlVar, 'g')
if ( regex.test(request.routing.param.path) ) {
request.routing.param.path = request.routing.param.path.replace(regex, urlVal);
}
}
// if custom file, file rewrite
if (request.routing.param.file) {
regex = new RegExp(urlVar, 'g')
if ( regex.test(request.routing.param.file) ) {
request.routing.param.file = request.routing.param.file.replace(regex, urlVal);
}
}
if (_param.length == 1) {// fast one
matched = ( _param.indexOf(urlVar) > -1 ) ? _param.indexOf(urlVar) : false;
if (matched === false) return matched;
// filter on method
if (params.method !== request.method) return false;
var key = _param[matched].substr(1);
regex = params.requirements[key];
if ( /^\//.test(regex) ) {
var re = regex.match(/\/(.*)\//).pop()
, flags = regex.replace('/'+ re +'/', '');
tested = new RegExp(re, flags).test( urlVal )
} else {
tested = new RegExp(params.requirements[key]).test( urlVal )
}
if (
typeof(params.param[key]) != 'undefined' &&
typeof(params.requirements) != 'undefined' &&
typeof(params.requirements[key]) != 'undefined' &&
tested
) {
request.params[key] = urlVal;
return true
}
} else { // slow one
// In order to support rules defined like :
// { params.url } => `/section/:name/page:number`
// { request.url } => `/section/plante/page4`
//
// with keys = [ ":name", ":number" ]
var keys = _param
, tplUrl = params.url
, url = request.url
, values = {}
, strVal = ''
, started = false
, i = 0;
for (var c = 0, posLen = url.length; c < posLen; ++c) {
if (url.charAt(c) == tplUrl.charAt(i) && !started) {
++i
continue
} else if (strVal == '') { // start
started = true;
strVal += url.charAt(c);
} else if ( c > (tplUrl.indexOf(keys[0]) + keys[0].length) ) {
regex = params.requirements[keys[0]];
urlVal = strVal.substr(0, strVal.length);
if ( /^\//.test(regex) ) {
var re = regex.match(/\/(.*)\//).pop()
, flags = regex.replace('/'+ re +'/', '');
tested = new RegExp(re, flags).test( urlVal )
} else {
tested = new RegExp(params.requirements[key]).test( urlVal )
}
if (tested) {
values[ keys[0].substr(1) ] = urlVal
} else {
return false
}
strVal = '';
started = false;
i = (tplUrl.indexOf(keys[0]) + keys[0].length);
c -= 1;
keys.splice(0,1)
} else {
strVal += url.charAt(c);
++i
}
if (c == posLen - 1 ) {
regex = params.requirements[keys[0]];
urlVal = strVal.substr(0, strVal.length);
if ( /^\//.test(regex) ) {
var re = regex.match(/\/(.*)\//).pop()
, flags = regex.replace('/'+ re +'/', '');
tested = new RegExp(re, flags).test( urlVal )
} else {
tested = new RegExp(params.requirements[key]).test( urlVal )
}
if (tested) {
values[ keys[0].substr(1) ] = urlVal
} else {
return false
}
}
}
if (values.count() == keys.length) {
for (var key in values) {
request.params[key] = values[key];
}
return true
}
}
return false
}
var refreshCore = function() {
//var corePath = getPath('gina.core');
var corePath = getPath('gina').core;
var core = new RegExp( corePath );
var excluded = [
_(corePath + '/gna.js', true)
];
for (var c in require.cache) {
if ( (core).test(c) && excluded.indexOf(c) < 0 ) {
require.cache[c].exports = require( _(c, true) )
}
}
//update utils
delete require.cache[_(corePath +'/utils/index.js', true)];
require.cache[_(corePath +'/utils/index.js', true)] = require( _(corePath +'/utils/index.js', true) );
require.cache[_(corePath + '/gna.js', true)].exports.utils = require.cache[_(corePath +'/utils/index.js', true)];
//update plugins
delete require.cache[_(corePath +'/plugins/index.js', true)];
require.cache[_(corePath +'/plugins/index.js', true)] = require( _(corePath +'/plugins/index.js', true) );
require.cache[_(corePath + '/gna.js', true)].exports.plugins = require.cache[_(corePath +'/plugins/index.js', true)];
// Super controller
delete require.cache[_(corePath +'/controller/index.js', true)];
require.cache[_(corePath +'/controller/index.js', true)] = require( _(corePath +'/controller/index.js', true) );
SuperController = require.cache[_(corePath +'/controller/index.js', true)];
}
/**
* Route on the fly
*
* @param {object} request
* @param {object} response
* @param {object} params - Route params
*
* @callback next
* */
this.route = function(request, response, next, params) {
//Routing.
var pathname = url.parse(request.url).pathname;
var bundle = local.bundle = params.bundle;
var conf = config.Env.getConf( bundle, env );
var bundles = conf.bundles;
local.request = request;
local.conf = conf;
local.isStandalone = config.Host.isStandalone();
// for libs/context etc..
var routerObj = {
response : response,
next : next,
hasViews : ( typeof(conf.content.views) != 'undefined' ) ? true : false,
isUsingTemplate : conf.template,
isProcessingXMLRequest : params.isXMLRequest
};
setContext('router', routerObj);
var action = request.action = params.param.action;
// more can be added ... but it will always start by `on`Something.
var reservedActions = [
"onReady",
"setup"
];
if (reservedActions.indexOf(action) > -1) throwError(response, 500, '[ '+action+' ] is reserved for the framework');
var middleware = params.middleware || [];
var actionFile = params.param.file; // matches rule name
var namespace = params.namespace;
var routeHasViews = ( typeof(conf.content.views) != 'undefined' ) ? true : false;
var isUsingTemplate = conf.template;
var hasSetup = false;
var hasNamespace = false;
local.routeHasViews = routeHasViews;
local.isUsingTemplate = isUsingTemplate;
local.next = next;
local.isXMLRequest = params.isXMLRequest;
var cacheless = (process.env.IS_CACHELESS == 'false') ? false : true;
local.cacheless = cacheless;
if (cacheless) refreshCore();
//Middleware Filters when declared.
var resHeaders = conf.server.response.header;
//TODO - to test
if ( resHeaders.count() > 0 ) {
for (var h in resHeaders) {
if (!response.headersSent)
response.setHeader(h, resHeaders[h])
}
}
//console.debug('ACTION ON ROUTING IS : ' + action);
//Getting superCleasses & extending it with super Models.
var controllerFile = {}
, setupFile = {}
, Controller = {};
// TODO - ?? merge all controllers into a single file while building for other env than `dev`
setupFile = conf.bundlesPath +'/'+ bundle + '/controllers/setup.js';
var filename = '';
if (namespace) {
filename = conf.bundlesPath +'/'+ bundle + '/controllers/controller.'+ namespace +'.js';
if ( !fs.existsSync(filename) ) {
filename = conf.bundlesPath +'/'+ bundle + '/controllers/controller.js';
console.warn('namespace found, but no `'+filename+'` to load: just ignore this message if this is ok with you')
}
} else {
filename = conf.bundlesPath +'/'+ bundle + '/controllers/controller.js';
}
controllerFile = filename
// default param setting
var options = {
file : actionFile,
namespace : namespace,
bundle : bundle,//module
bundlePath : conf.bundlesPath +'/'+ bundle,
rootPath : self.executionPath,
conf : conf,
instance : self.middlewareInstance,
views : ( routeHasViews ) ? conf.content.views : undefined,
isUsingTemplate : local.isUsingTemplate,
cacheless : cacheless,
rule : params.rule,
path : params.param.path || null, // user custom path : namespace should be ignored | left blank
isXMLRequest : params.isXMLRequest,
withCredentials : false
};
for (var p in params.param) {
options[p] = params.param[p]
}
try {
if ( fs.existsSync(_(setupFile, true)) )
hasSetup = true;
if (cacheless) {
delete require.cache[_(controllerFile, true)];
if ( hasSetup )
delete require.cache[_(setupFile, true)];
}
Controller = require(_(controllerFile, true));
} catch (err) {
// means that you have a syntax errors in you controller file
// TODO - increase `stack-trace` from 10 (default value) to 500 or more to get the exact error --stack-trace-limit=1000
// TODO - also check `stack-size` why not set it to at the same time => --stack-size=1024
throwError(response, 500, new Error('syntax error(s) found in `'+ controllerFile +'` \nTrace: ') + (err.stack || err.message) );
}
// about to contact Controller ...
try {
Controller = inherits(Controller, SuperController);
var controller = new Controller(options);
controller.setOptions(request, response, next, options);
if (hasSetup) { // adding setup
controller.setup = function(request, response, next) {
if (!this._setupDone) {
this._setupDone = true;
return function (request, response, next) { // getting rid of the controller context
var Setup = require(_(setupFile, true));
// TODO - loop on a defiend SuperController property like SuperController._allowedForExport
// inheriting SuperController functions & objects
// exporting config & common methods
Setup.engine = controller.engine;
Setup.getConfig = controller.getConfig;
Setup.getLocales = controller.getLocales;
Setup.getFormsRules = controller.getFormsRules;
Setup.throwError = controller.throwError;
Setup.redirect = controller.redirect;
Setup.render = controller.render;
Setup.renderJSON = controller.renderJSON;
Setup.renderWithoutLayout = controller.renderWithoutLayout
Setup.isXMLRequest = controller.isXMLRequest;
Setup.isWithCredentials = controller.isWithCredentials,
Setup.isCacheless = controller.isCacheless;
Setup.apply(Setup, arguments);
return Setup;
}(request, response, next)
}
}
}
// allowing another controller (public methods) to be required inside the current controller
/**
* requireController
* Allowing another controller (public methods) to be required inside the current controller
*
* @param {string} namespace - Controller namespace
* @param {object} [options] - Controller options
*
* @return {object} controllerInstance
* */
controller.requireController = function (namespace, options) {
var cacheless = (process.env.IS_CACHELESS == 'false') ? false : true;
var corePath = getPath('gina').core;
var config = getContext('gina').Config.instance;
var bundle = config.bundle;
var env = config.env;
var bundleConf = config.Env.getConf(bundle, env);
var filename = _(bundleConf.bundlesPath +'/'+ bundle + '/controllers/' + namespace + '.js', true);
try {
if (cacheless) {
// Super controller
delete require.cache[_(corePath +'/controller/index.js', true)];
require.cache[_(corePath +'/controller/index.js', true)] = require( _(corePath +'/controller/index.js', true) );
delete require.cache[filename];
}
var SuperController = require.cache[_(corePath +'/controller/index.js', true)];
var RequiredController = require(filename);
var RequiredController = inherits(RequiredController, SuperController)
if ( typeof(options) != 'undefined' ) {
var controller = new RequiredController( options );
controller.setOptions(request, response, next, options);
return controller
} else {
return new RequiredController();
}
} catch (err) {
throwError(response, 500, err );
}
}
if (middleware.length > 0) {
processMiddlewares(middleware, controller, action, request, response, next,
function onDone(action, request, response, next){
// handle superController events
for (var e=0; e<reservedActions.length; ++e) {
if ( typeof(controller[reservedActions[e]]) == 'function' ) {
controller[reservedActions[e]](request, response, next)
}
}
controller[action](request, response, next)
})
} else {
// handle superController events
// e.g.: inside your controller, you can defined: `this.onReady = function(){...}` which will always be called before the main action
for (var e=0; e<reservedActions.length; ++e) {
if ( typeof(controller[reservedActions[e]]) == 'function' ) {
controller[reservedActions[e]](request, response, next)
}
}
controller[action](request, response, next)
}
} catch (err) {
var superController = new SuperController(options);
superController.setOptions(request, response, next, options);
if ( typeof(controller) != 'undefined' && typeof(controller[action]) == 'undefined') {
superController.throwError(response, 500, (new Error('action not found: `'+ action+'`. Please, check your routing.json or the related control in your `'+controllerFile+'`.')).stack);
} else {
superController.throwError(response, 500, err.stack);
}
}
action = null
};//EO route()
var processMiddlewares = function(middlewares, controller, action, req, res, next, cb){
var filename = _(local.conf.bundlePath)
, middleware = null
, constructor = null
, re = new RegExp('^'+filename);
if ( middlewares.length > 0 ) {
for (var m=0; m<middlewares.length; ++m) {
constructor = middlewares[m].split(/\./g);
constructor = constructor
.splice(constructor.length-1,1)
.toString();
middleware = middlewares[m].split(/\./g);
middleware.splice(middleware.length-1);
middleware = middleware.join('/');
filename = _(filename +'/'+ middleware + '/index.js');
if ( !fs.existsSync( filename ) ) {
// no middleware found with this alias
throwError(res, 501, new Error('middleware not found '+ middleware).stack);
}
if (local.cacheless) delete require.cache[_(filename, true)];
var MiddlewareClass = function() {
return function () { // getting rid of the middleware context
var Middleware = require(_(filename, true));
// TODO - loop on a defiend SuperController property like SuperController._allowedForExport
// exporting config & common methods
//Middleware.engine = controller.engine;
Middleware.prototype.getConfig = controller.getConfig;
Middleware.prototype.getLocales = controller.getLocales;
Middleware.prototype.getFormsRules = controller.getFormsRules;
Middleware.prototype.throwError = controller.throwError;
Middleware.prototype.redirect = controller.redirect;
Middleware.prototype.render = controller.render;
Middleware.prototype.renderJSON = controller.renderJSON;
Middleware.prototype.renderWithoutLayout = controller.renderWithoutLayout
Middleware.prototype.isXMLRequest = controller.isXMLRequest;
Middleware.prototype.isWithCredentials = controller.isWithCredentials;
Middleware.prototype.isCacheless = controller.isCacheless;
return Middleware;
}()
}();
middleware = new MiddlewareClass();
if ( !middleware[constructor] ) {
throwError(res, 501, new Error('contructor [ '+constructor+' ] not found @'+ middlewares[m]).stack);
}
if ( typeof(middleware[constructor]) != 'undefined') {
middleware[constructor](req, res, next,
function onMiddlewareProcessed(req, res, next){
middlewares.splice(m, 1);
if (middlewares.length > 0) {
processMiddlewares(middlewares, controller, action, req, res, next, cb)
} else {
cb(action, req, res, next)
}
}
);
break
}
}
} else {
cb(action, req, res, next)
}
};
var hasViews = function() {
return local.routeHasViews;
};
var throwError = function(res, code, msg) {
if (arguments.length < 3) {
var msg = code || null
, code = res || 500
, res = local.res;
}
if (!res.headersSent) {
if (local.isXMLRequest || !hasViews() || !local.isUsingTemplate) {
// Internet Explorer override
if ( /msie/i.test(local.request.headers['user-agent']) ) {
res.writeHead(code, "Content-Type", "text/plain")
} else {
res.writeHead(code, { 'Content-Type': 'application/json'} )
}
console.error(res.req.method +' [ '+code+' ] '+ res.req.url)
var e = {
status: code,
error: msg
};
if ( typeof(msg) == 'object' && typeof(msg.stack) != 'undefined' ) {
e.error.stack = msg.stack;
e.error.message = msg.message;
}
res.end(JSON.stringify(err))
} else {
res.writeHead(code, { 'Content-Type': 'text/html'} );
console.error(res.req.method +' [ '+code+' ] '+ res.req.url);
res.end('<h1>Error '+ code +'.</h1><pre>'+ msg + '</pre>', local.next);
}
} else {
local.next()
}
};
init()
};
module.exports = Router | Rhinostone/gina | core/router.js | JavaScript | mit | 26,576 |
s := SolvableDBInitialize();
/*
Magma printing
*/
s`SolvableDBName := "256S377-8,2,32-g45-path2";
s`SolvableDBFilename := "256S377-8,2,32-g45-path2.m";
s`SolvableDBPassportName := "256S377-8,2,32-g45";
s`SolvableDBPathNumber := 2;
s`SolvableDBDegree := 256;
s`SolvableDBOrders := \[ 8, 2, 32 ];
s`SolvableDBType := "Hyperbolic";
s`SolvableDBGenus := 45;
s`SolvableDBGaloisOrbitSize := 1;
s`SolvableDBPassportSize := 2;
s`SolvableDBPointedPassportSize := 2;
s`SolvableDBLevel := 8;
s`SolvableDBBlocks := {@ PowerSet(IntegerRing()) |
{ IntegerRing() | 1, 5 },
{ IntegerRing() | 2, 11 },
{ IntegerRing() | 3, 10 },
{ IntegerRing() | 4, 19 },
{ IntegerRing() | 6, 17 },
{ IntegerRing() | 7, 13 },
{ IntegerRing() | 8, 29 },
{ IntegerRing() | 9, 28 },
{ IntegerRing() | 12, 31 },
{ IntegerRing() | 14, 34 },
{ IntegerRing() | 15, 35 },
{ IntegerRing() | 16, 49 },
{ IntegerRing() | 18, 56 },
{ IntegerRing() | 20, 54 },
{ IntegerRing() | 21, 51 },
{ IntegerRing() | 22, 52 },
{ IntegerRing() | 23, 39 },
{ IntegerRing() | 24, 40 },
{ IntegerRing() | 25, 41 },
{ IntegerRing() | 26, 76 },
{ IntegerRing() | 27, 75 },
{ IntegerRing() | 30, 78 },
{ IntegerRing() | 32, 81 },
{ IntegerRing() | 33, 82 },
{ IntegerRing() | 36, 85 },
{ IntegerRing() | 37, 86 },
{ IntegerRing() | 38, 87 },
{ IntegerRing() | 42, 92 },
{ IntegerRing() | 43, 93 },
{ IntegerRing() | 44, 94 },
{ IntegerRing() | 45, 95 },
{ IntegerRing() | 46, 96 },
{ IntegerRing() | 47, 123 },
{ IntegerRing() | 48, 122 },
{ IntegerRing() | 50, 124 },
{ IntegerRing() | 53, 135 },
{ IntegerRing() | 55, 142 },
{ IntegerRing() | 57, 140 },
{ IntegerRing() | 58, 137 },
{ IntegerRing() | 59, 138 },
{ IntegerRing() | 60, 129 },
{ IntegerRing() | 61, 130 },
{ IntegerRing() | 62, 131 },
{ IntegerRing() | 63, 132 },
{ IntegerRing() | 64, 133 },
{ IntegerRing() | 65, 103 },
{ IntegerRing() | 66, 104 },
{ IntegerRing() | 67, 105 },
{ IntegerRing() | 68, 106 },
{ IntegerRing() | 69, 107 },
{ IntegerRing() | 70, 108 },
{ IntegerRing() | 71, 109 },
{ IntegerRing() | 72, 110 },
{ IntegerRing() | 73, 170 },
{ IntegerRing() | 74, 169 },
{ IntegerRing() | 77, 146 },
{ IntegerRing() | 79, 111 },
{ IntegerRing() | 80, 172 },
{ IntegerRing() | 83, 151 },
{ IntegerRing() | 84, 163 },
{ IntegerRing() | 88, 176 },
{ IntegerRing() | 89, 134 },
{ IntegerRing() | 90, 117 },
{ IntegerRing() | 91, 177 },
{ IntegerRing() | 97, 154 },
{ IntegerRing() | 98, 145 },
{ IntegerRing() | 99, 127 },
{ IntegerRing() | 100, 180 },
{ IntegerRing() | 101, 181 },
{ IntegerRing() | 102, 143 },
{ IntegerRing() | 112, 189 },
{ IntegerRing() | 113, 165 },
{ IntegerRing() | 114, 161 },
{ IntegerRing() | 115, 190 },
{ IntegerRing() | 116, 191 },
{ IntegerRing() | 118, 178 },
{ IntegerRing() | 119, 192 },
{ IntegerRing() | 120, 215 },
{ IntegerRing() | 121, 158 },
{ IntegerRing() | 125, 217 },
{ IntegerRing() | 126, 218 },
{ IntegerRing() | 128, 219 },
{ IntegerRing() | 136, 194 },
{ IntegerRing() | 139, 231 },
{ IntegerRing() | 141, 234 },
{ IntegerRing() | 144, 153 },
{ IntegerRing() | 147, 225 },
{ IntegerRing() | 148, 162 },
{ IntegerRing() | 149, 166 },
{ IntegerRing() | 150, 200 },
{ IntegerRing() | 152, 226 },
{ IntegerRing() | 155, 156 },
{ IntegerRing() | 157, 199 },
{ IntegerRing() | 159, 201 },
{ IntegerRing() | 160, 202 },
{ IntegerRing() | 164, 203 },
{ IntegerRing() | 167, 204 },
{ IntegerRing() | 168, 205 },
{ IntegerRing() | 171, 182 },
{ IntegerRing() | 173, 195 },
{ IntegerRing() | 174, 206 },
{ IntegerRing() | 175, 187 },
{ IntegerRing() | 179, 213 },
{ IntegerRing() | 183, 253 },
{ IntegerRing() | 184, 197 },
{ IntegerRing() | 185, 227 },
{ IntegerRing() | 186, 228 },
{ IntegerRing() | 188, 239 },
{ IntegerRing() | 193, 221 },
{ IntegerRing() | 196, 243 },
{ IntegerRing() | 198, 232 },
{ IntegerRing() | 207, 254 },
{ IntegerRing() | 208, 255 },
{ IntegerRing() | 209, 223 },
{ IntegerRing() | 210, 244 },
{ IntegerRing() | 211, 230 },
{ IntegerRing() | 212, 249 },
{ IntegerRing() | 214, 246 },
{ IntegerRing() | 216, 236 },
{ IntegerRing() | 220, 247 },
{ IntegerRing() | 222, 240 },
{ IntegerRing() | 224, 235 },
{ IntegerRing() | 229, 256 },
{ IntegerRing() | 233, 252 },
{ IntegerRing() | 237, 245 },
{ IntegerRing() | 238, 248 },
{ IntegerRing() | 241, 242 },
{ IntegerRing() | 250, 251 }
@};
s`SolvableDBIsRamifiedAtEveryLevel := true;
s`SolvableDBGaloisOrbit := [ PowerSequence(PermutationGroup<256 |
\[ 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, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 1 ],
\[ 2, 1, 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, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256 ]:
Order := 857817775342842654119082271681232625157781520279485619859655650377269452553147589377440291360451408450375885342336584306157196834693696475322289288497426025679637332563368786442675207626794560187968867971521143307702077526646451464709187326100832876325702818980773671781454170250523018608495319068138257481070252817559459476987034665712738139286205234756808218860701203611083152093501947437109101726968262861606263662435022840944191408424615936000000000000000000000000000000000000000000000000000000000000000 >) |
[ PermutationGroup<256 |
\[ 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, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 1 ],
\[ 2, 1, 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, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256 ]:
Order := 857817775342842654119082271681232625157781520279485619859655650377269452553147589377440291360451408450375885342336584306157196834693696475322289288497426025679637332563368786442675207626794560187968867971521143307702077526646451464709187326100832876325702818980773671781454170250523018608495319068138257481070252817559459476987034665712738139286205234756808218860701203611083152093501947437109101726968262861606263662435022840944191408424615936000000000000000000000000000000000000000000000000000000000000000 > |
[ 11, 29, 7, 49, 2, 5, 39, 76, 12, 13, 8, 85, 23, 92, 10, 123, 1, 135, 16, 19, 129, 17, 103, 25, 108, 170, 30, 31, 26, 151, 36, 176, 28, 42, 3, 154, 38, 180, 65, 41, 70, 79, 161, 34, 90, 35, 215, 50, 47, 86, 60, 6, 81, 4, 231, 53, 56, 95, 54, 225, 94, 51, 226, 52, 155, 67, 98, 201, 40, 84, 72, 149, 133, 77, 78, 73, 59, 83, 206, 75, 88, 9, 62, 118, 97, 87, 100, 171, 194, 175, 82, 111, 114, 14, 117, 15, 63, 58, 219, 173, 102, 55, 156, 105, 145, 159, 24, 163, 110, 166, 174, 113, 71, 68, 230, 93, 187, 246, 96, 169, 66, 124, 120, 37, 247, 122, 128, 240, 147, 44, 21, 152, 22, 136, 32, 99, 45, 20, 217, 18, 198, 139, 142, 140, 137, 138, 172, 69, 248, 130, 131, 177, 57, 132, 192, 119, 150, 104, 241, 210, 106, 107, 178, 209, 109, 238, 168, 190, 146, 64, 236, 27, 188, 199, 158, 182, 33, 214, 116, 195, 143, 216, 184, 101, 202, 134, 121, 218, 165, 211, 43, 46, 229, 127, 239, 204, 181, 227, 200, 61, 242, 244, 223, 205, 115, 157, 221, 189, 235, 203, 254, 251, 191, 162, 74, 144, 220, 48, 222, 253, 256, 212, 224, 141, 80, 91, 160, 89, 243, 207, 125, 185, 213, 232, 234, 153, 255, 245, 126, 249, 233, 252, 167, 164, 208, 148, 183, 237, 250, 228, 186, 179, 197, 193, 112, 196 ],
[ 3, 9, 1, 17, 10, 19, 24, 27, 2, 5, 28, 37, 40, 35, 34, 48, 4, 54, 6, 56, 52, 51, 66, 7, 71, 74, 8, 11, 75, 70, 86, 82, 81, 15, 14, 67, 12, 101, 104, 13, 109, 112, 94, 93, 96, 95, 121, 16, 122, 127, 22, 21, 134, 18, 140, 20, 142, 138, 137, 148, 131, 130, 133, 132, 157, 23, 36, 107, 106, 30, 25, 167, 156, 26, 29, 169, 100, 108, 172, 111, 33, 32, 98, 179, 105, 31, 181, 183, 135, 177, 117, 189, 44, 43, 46, 45, 153, 83, 124, 77, 38, 141, 199, 39, 85, 69, 68, 78, 41, 204, 80, 42, 164, 160, 191, 190, 91, 192, 178, 182, 47, 49, 158, 99, 218, 217, 50, 223, 162, 62, 61, 64, 63, 53, 89, 193, 59, 58, 230, 55, 102, 57, 234, 154, 151, 180, 187, 60, 200, 166, 145, 239, 97, 144, 170, 73, 65, 123, 229, 114, 202, 129, 213, 113, 203, 150, 72, 249, 76, 155, 215, 79, 251, 242, 225, 253, 90, 119, 84, 146, 87, 120, 88, 196, 228, 227, 147, 226, 92, 116, 115, 118, 136, 221, 250, 184, 243, 248, 103, 149, 256, 161, 165, 110, 212, 241, 255, 254, 219, 220, 231, 205, 163, 245, 171, 222, 126, 125, 209, 210, 194, 216, 128, 233, 175, 188, 186, 185, 159, 139, 211, 238, 224, 143, 252, 240, 246, 232, 152, 236, 206, 174, 197, 247, 214, 237, 244, 198, 168, 195, 173, 235, 176, 208, 207, 201 ],
[ 4, 10, 14, 18, 19, 21, 1, 28, 32, 34, 3, 2, 5, 43, 45, 6, 51, 55, 56, 58, 61, 63, 40, 68, 7, 75, 79, 81, 9, 8, 11, 89, 90, 93, 95, 86, 99, 12, 24, 106, 13, 15, 115, 62, 59, 118, 122, 125, 17, 16, 130, 132, 20, 137, 141, 142, 97, 83, 100, 22, 149, 98, 153, 155, 104, 47, 23, 160, 60, 109, 164, 25, 169, 171, 111, 27, 26, 29, 112, 175, 134, 117, 108, 30, 37, 127, 31, 33, 185, 96, 188, 35, 190, 131, 138, 178, 105, 36, 193, 181, 196, 38, 66, 123, 39, 202, 129, 71, 203, 41, 189, 207, 42, 44, 212, 84, 46, 179, 73, 158, 147, 217, 48, 49, 211, 152, 221, 50, 52, 166, 145, 144, 156, 227, 54, 53, 151, 180, 57, 154, 233, 234, 87, 222, 85, 76, 162, 237, 167, 65, 70, 64, 240, 67, 157, 199, 241, 225, 69, 186, 94, 245, 78, 247, 92, 204, 197, 72, 182, 74, 183, 187, 77, 80, 177, 82, 239, 213, 235, 101, 243, 253, 244, 88, 238, 173, 91, 251, 254, 249, 163, 170, 208, 135, 146, 201, 176, 102, 242, 103, 107, 228, 220, 184, 110, 172, 139, 214, 113, 114, 116, 216, 224, 119, 121, 120, 230, 226, 124, 126, 255, 209, 165, 128, 148, 133, 248, 195, 136, 191, 140, 143, 206, 252, 219, 215, 198, 150, 250, 223, 229, 256, 159, 161, 232, 192, 218, 200, 236, 168, 205, 174, 210, 231, 246, 194 ]
]
];
s`SolvableDBPassport := [ PowerSequence(PermutationGroup<256 |
\[ 11, 29, 7, 49, 2, 5, 39, 76, 12, 13, 8, 85, 23, 92, 10, 123, 1, 135, 16, 19, 129, 17, 103, 25, 108, 170, 30, 31, 26, 151, 36, 176, 28, 42, 3, 154, 38, 180, 65, 41, 70, 79, 161, 34, 90, 35, 215, 50, 47, 86, 60, 6, 81, 4, 231, 53, 56, 95, 54, 225, 94, 51, 226, 52, 155, 67, 98, 201, 40, 84, 72, 149, 133, 77, 78, 73, 59, 83, 206, 75, 88, 9, 62, 118, 97, 87, 100, 171, 194, 175, 82, 111, 114, 14, 117, 15, 63, 58, 219, 173, 102, 55, 156, 105, 145, 159, 24, 163, 110, 166, 174, 113, 71, 68, 230, 93, 187, 246, 96, 169, 66, 124, 120, 37, 247, 122, 128, 240, 147, 44, 21, 152, 22, 136, 32, 99, 45, 20, 217, 18, 198, 139, 142, 140, 137, 138, 172, 69, 248, 130, 131, 177, 57, 132, 192, 119, 150, 104, 241, 210, 106, 107, 178, 209, 109, 238, 168, 190, 146, 64, 236, 27, 188, 199, 158, 182, 33, 214, 116, 195, 143, 216, 184, 101, 202, 134, 121, 218, 165, 211, 43, 46, 229, 127, 239, 204, 181, 227, 200, 61, 242, 244, 223, 205, 115, 157, 221, 189, 235, 203, 254, 251, 191, 162, 74, 144, 220, 48, 222, 253, 256, 212, 224, 141, 80, 91, 160, 89, 243, 207, 125, 185, 213, 232, 234, 153, 255, 245, 126, 249, 233, 252, 167, 164, 208, 148, 183, 237, 250, 228, 186, 179, 197, 193, 112, 196 ],
\[ 3, 9, 1, 17, 10, 19, 24, 27, 2, 5, 28, 37, 40, 35, 34, 48, 4, 54, 6, 56, 52, 51, 66, 7, 71, 74, 8, 11, 75, 70, 86, 82, 81, 15, 14, 67, 12, 101, 104, 13, 109, 112, 94, 93, 96, 95, 121, 16, 122, 127, 22, 21, 134, 18, 140, 20, 142, 138, 137, 148, 131, 130, 133, 132, 157, 23, 36, 107, 106, 30, 25, 167, 156, 26, 29, 169, 100, 108, 172, 111, 33, 32, 98, 179, 105, 31, 181, 183, 135, 177, 117, 189, 44, 43, 46, 45, 153, 83, 124, 77, 38, 141, 199, 39, 85, 69, 68, 78, 41, 204, 80, 42, 164, 160, 191, 190, 91, 192, 178, 182, 47, 49, 158, 99, 218, 217, 50, 223, 162, 62, 61, 64, 63, 53, 89, 193, 59, 58, 230, 55, 102, 57, 234, 154, 151, 180, 187, 60, 200, 166, 145, 239, 97, 144, 170, 73, 65, 123, 229, 114, 202, 129, 213, 113, 203, 150, 72, 249, 76, 155, 215, 79, 251, 242, 225, 253, 90, 119, 84, 146, 87, 120, 88, 196, 228, 227, 147, 226, 92, 116, 115, 118, 136, 221, 250, 184, 243, 248, 103, 149, 256, 161, 165, 110, 212, 241, 255, 254, 219, 220, 231, 205, 163, 245, 171, 222, 126, 125, 209, 210, 194, 216, 128, 233, 175, 188, 186, 185, 159, 139, 211, 238, 224, 143, 252, 240, 246, 232, 152, 236, 206, 174, 197, 247, 214, 237, 244, 198, 168, 195, 173, 235, 176, 208, 207, 201 ],
\[ 4, 10, 14, 18, 19, 21, 1, 28, 32, 34, 3, 2, 5, 43, 45, 6, 51, 55, 56, 58, 61, 63, 40, 68, 7, 75, 79, 81, 9, 8, 11, 89, 90, 93, 95, 86, 99, 12, 24, 106, 13, 15, 115, 62, 59, 118, 122, 125, 17, 16, 130, 132, 20, 137, 141, 142, 97, 83, 100, 22, 149, 98, 153, 155, 104, 47, 23, 160, 60, 109, 164, 25, 169, 171, 111, 27, 26, 29, 112, 175, 134, 117, 108, 30, 37, 127, 31, 33, 185, 96, 188, 35, 190, 131, 138, 178, 105, 36, 193, 181, 196, 38, 66, 123, 39, 202, 129, 71, 203, 41, 189, 207, 42, 44, 212, 84, 46, 179, 73, 158, 147, 217, 48, 49, 211, 152, 221, 50, 52, 166, 145, 144, 156, 227, 54, 53, 151, 180, 57, 154, 233, 234, 87, 222, 85, 76, 162, 237, 167, 65, 70, 64, 240, 67, 157, 199, 241, 225, 69, 186, 94, 245, 78, 247, 92, 204, 197, 72, 182, 74, 183, 187, 77, 80, 177, 82, 239, 213, 235, 101, 243, 253, 244, 88, 238, 173, 91, 251, 254, 249, 163, 170, 208, 135, 146, 201, 176, 102, 242, 103, 107, 228, 220, 184, 110, 172, 139, 214, 113, 114, 116, 216, 224, 119, 121, 120, 230, 226, 124, 126, 255, 209, 165, 128, 148, 133, 248, 195, 136, 191, 140, 143, 206, 252, 219, 215, 198, 150, 250, 223, 229, 256, 159, 161, 232, 192, 218, 200, 236, 168, 205, 174, 210, 231, 246, 194 ]:
Order := 256 >) |
[ PermutationGroup<256 |
\[ 11, 29, 7, 49, 2, 5, 39, 76, 12, 13, 8, 85, 23, 92, 10, 123, 1, 135, 16, 19, 129, 17, 103, 25, 108, 170, 30, 31, 26, 151, 36, 176, 28, 42, 3, 154, 38, 180, 65, 41, 70, 79, 161, 34, 90, 35, 215, 50, 47, 86, 60, 6, 81, 4, 231, 53, 56, 95, 54, 225, 94, 51, 226, 52, 155, 67, 98, 201, 40, 84, 72, 149, 133, 77, 78, 73, 59, 83, 206, 75, 88, 9, 62, 118, 97, 87, 100, 171, 194, 175, 82, 111, 114, 14, 117, 15, 63, 58, 219, 173, 102, 55, 156, 105, 145, 159, 24, 163, 110, 166, 174, 113, 71, 68, 230, 93, 187, 246, 96, 169, 66, 124, 120, 37, 247, 122, 128, 240, 147, 44, 21, 152, 22, 136, 32, 99, 45, 20, 217, 18, 198, 139, 142, 140, 137, 138, 172, 69, 248, 130, 131, 177, 57, 132, 192, 119, 150, 104, 241, 210, 106, 107, 178, 209, 109, 238, 168, 190, 146, 64, 236, 27, 188, 199, 158, 182, 33, 214, 116, 195, 143, 216, 184, 101, 202, 134, 121, 218, 165, 211, 43, 46, 229, 127, 239, 204, 181, 227, 200, 61, 242, 244, 223, 205, 115, 157, 221, 189, 235, 203, 254, 251, 191, 162, 74, 144, 220, 48, 222, 253, 256, 212, 224, 141, 80, 91, 160, 89, 243, 207, 125, 185, 213, 232, 234, 153, 255, 245, 126, 249, 233, 252, 167, 164, 208, 148, 183, 237, 250, 228, 186, 179, 197, 193, 112, 196 ],
\[ 3, 9, 1, 17, 10, 19, 24, 27, 2, 5, 28, 37, 40, 35, 34, 48, 4, 54, 6, 56, 52, 51, 66, 7, 71, 74, 8, 11, 75, 70, 86, 82, 81, 15, 14, 67, 12, 101, 104, 13, 109, 112, 94, 93, 96, 95, 121, 16, 122, 127, 22, 21, 134, 18, 140, 20, 142, 138, 137, 148, 131, 130, 133, 132, 157, 23, 36, 107, 106, 30, 25, 167, 156, 26, 29, 169, 100, 108, 172, 111, 33, 32, 98, 179, 105, 31, 181, 183, 135, 177, 117, 189, 44, 43, 46, 45, 153, 83, 124, 77, 38, 141, 199, 39, 85, 69, 68, 78, 41, 204, 80, 42, 164, 160, 191, 190, 91, 192, 178, 182, 47, 49, 158, 99, 218, 217, 50, 223, 162, 62, 61, 64, 63, 53, 89, 193, 59, 58, 230, 55, 102, 57, 234, 154, 151, 180, 187, 60, 200, 166, 145, 239, 97, 144, 170, 73, 65, 123, 229, 114, 202, 129, 213, 113, 203, 150, 72, 249, 76, 155, 215, 79, 251, 242, 225, 253, 90, 119, 84, 146, 87, 120, 88, 196, 228, 227, 147, 226, 92, 116, 115, 118, 136, 221, 250, 184, 243, 248, 103, 149, 256, 161, 165, 110, 212, 241, 255, 254, 219, 220, 231, 205, 163, 245, 171, 222, 126, 125, 209, 210, 194, 216, 128, 233, 175, 188, 186, 185, 159, 139, 211, 238, 224, 143, 252, 240, 246, 232, 152, 236, 206, 174, 197, 247, 214, 237, 244, 198, 168, 195, 173, 235, 176, 208, 207, 201 ],
\[ 4, 10, 14, 18, 19, 21, 1, 28, 32, 34, 3, 2, 5, 43, 45, 6, 51, 55, 56, 58, 61, 63, 40, 68, 7, 75, 79, 81, 9, 8, 11, 89, 90, 93, 95, 86, 99, 12, 24, 106, 13, 15, 115, 62, 59, 118, 122, 125, 17, 16, 130, 132, 20, 137, 141, 142, 97, 83, 100, 22, 149, 98, 153, 155, 104, 47, 23, 160, 60, 109, 164, 25, 169, 171, 111, 27, 26, 29, 112, 175, 134, 117, 108, 30, 37, 127, 31, 33, 185, 96, 188, 35, 190, 131, 138, 178, 105, 36, 193, 181, 196, 38, 66, 123, 39, 202, 129, 71, 203, 41, 189, 207, 42, 44, 212, 84, 46, 179, 73, 158, 147, 217, 48, 49, 211, 152, 221, 50, 52, 166, 145, 144, 156, 227, 54, 53, 151, 180, 57, 154, 233, 234, 87, 222, 85, 76, 162, 237, 167, 65, 70, 64, 240, 67, 157, 199, 241, 225, 69, 186, 94, 245, 78, 247, 92, 204, 197, 72, 182, 74, 183, 187, 77, 80, 177, 82, 239, 213, 235, 101, 243, 253, 244, 88, 238, 173, 91, 251, 254, 249, 163, 170, 208, 135, 146, 201, 176, 102, 242, 103, 107, 228, 220, 184, 110, 172, 139, 214, 113, 114, 116, 216, 224, 119, 121, 120, 230, 226, 124, 126, 255, 209, 165, 128, 148, 133, 248, 195, 136, 191, 140, 143, 206, 252, 219, 215, 198, 150, 250, 223, 229, 256, 159, 161, 232, 192, 218, 200, 236, 168, 205, 174, 210, 231, 246, 194 ]:
Order := 256 > |
[ 11, 29, 7, 49, 2, 5, 39, 76, 12, 13, 8, 85, 23, 92, 10, 123, 1, 135, 16, 19, 129, 17, 103, 25, 108, 170, 30, 31, 26, 151, 36, 176, 28, 42, 3, 154, 38, 180, 65, 41, 70, 79, 161, 34, 90, 35, 215, 50, 47, 86, 60, 6, 81, 4, 231, 53, 56, 95, 54, 225, 94, 51, 226, 52, 155, 67, 98, 201, 40, 84, 72, 149, 133, 77, 78, 73, 59, 83, 206, 75, 88, 9, 62, 118, 97, 87, 100, 171, 194, 175, 82, 111, 114, 14, 117, 15, 63, 58, 219, 173, 102, 55, 156, 105, 145, 159, 24, 163, 110, 166, 174, 113, 71, 68, 230, 93, 187, 246, 96, 169, 66, 124, 120, 37, 247, 122, 128, 240, 147, 44, 21, 152, 22, 136, 32, 99, 45, 20, 217, 18, 198, 139, 142, 140, 137, 138, 172, 69, 248, 130, 131, 177, 57, 132, 192, 119, 150, 104, 241, 210, 106, 107, 178, 209, 109, 238, 168, 190, 146, 64, 236, 27, 188, 199, 158, 182, 33, 214, 116, 195, 143, 216, 184, 101, 202, 134, 121, 218, 165, 211, 43, 46, 229, 127, 239, 204, 181, 227, 200, 61, 242, 244, 223, 205, 115, 157, 221, 189, 235, 203, 254, 251, 191, 162, 74, 144, 220, 48, 222, 253, 256, 212, 224, 141, 80, 91, 160, 89, 243, 207, 125, 185, 213, 232, 234, 153, 255, 245, 126, 249, 233, 252, 167, 164, 208, 148, 183, 237, 250, 228, 186, 179, 197, 193, 112, 196 ],
[ 3, 9, 1, 17, 10, 19, 24, 27, 2, 5, 28, 37, 40, 35, 34, 48, 4, 54, 6, 56, 52, 51, 66, 7, 71, 74, 8, 11, 75, 70, 86, 82, 81, 15, 14, 67, 12, 101, 104, 13, 109, 112, 94, 93, 96, 95, 121, 16, 122, 127, 22, 21, 134, 18, 140, 20, 142, 138, 137, 148, 131, 130, 133, 132, 157, 23, 36, 107, 106, 30, 25, 167, 156, 26, 29, 169, 100, 108, 172, 111, 33, 32, 98, 179, 105, 31, 181, 183, 135, 177, 117, 189, 44, 43, 46, 45, 153, 83, 124, 77, 38, 141, 199, 39, 85, 69, 68, 78, 41, 204, 80, 42, 164, 160, 191, 190, 91, 192, 178, 182, 47, 49, 158, 99, 218, 217, 50, 223, 162, 62, 61, 64, 63, 53, 89, 193, 59, 58, 230, 55, 102, 57, 234, 154, 151, 180, 187, 60, 200, 166, 145, 239, 97, 144, 170, 73, 65, 123, 229, 114, 202, 129, 213, 113, 203, 150, 72, 249, 76, 155, 215, 79, 251, 242, 225, 253, 90, 119, 84, 146, 87, 120, 88, 196, 228, 227, 147, 226, 92, 116, 115, 118, 136, 221, 250, 184, 243, 248, 103, 149, 256, 161, 165, 110, 212, 241, 255, 254, 219, 220, 231, 205, 163, 245, 171, 222, 126, 125, 209, 210, 194, 216, 128, 233, 175, 188, 186, 185, 159, 139, 211, 238, 224, 143, 252, 240, 246, 232, 152, 236, 206, 174, 197, 247, 214, 237, 244, 198, 168, 195, 173, 235, 176, 208, 207, 201 ],
[ 4, 10, 14, 18, 19, 21, 1, 28, 32, 34, 3, 2, 5, 43, 45, 6, 51, 55, 56, 58, 61, 63, 40, 68, 7, 75, 79, 81, 9, 8, 11, 89, 90, 93, 95, 86, 99, 12, 24, 106, 13, 15, 115, 62, 59, 118, 122, 125, 17, 16, 130, 132, 20, 137, 141, 142, 97, 83, 100, 22, 149, 98, 153, 155, 104, 47, 23, 160, 60, 109, 164, 25, 169, 171, 111, 27, 26, 29, 112, 175, 134, 117, 108, 30, 37, 127, 31, 33, 185, 96, 188, 35, 190, 131, 138, 178, 105, 36, 193, 181, 196, 38, 66, 123, 39, 202, 129, 71, 203, 41, 189, 207, 42, 44, 212, 84, 46, 179, 73, 158, 147, 217, 48, 49, 211, 152, 221, 50, 52, 166, 145, 144, 156, 227, 54, 53, 151, 180, 57, 154, 233, 234, 87, 222, 85, 76, 162, 237, 167, 65, 70, 64, 240, 67, 157, 199, 241, 225, 69, 186, 94, 245, 78, 247, 92, 204, 197, 72, 182, 74, 183, 187, 77, 80, 177, 82, 239, 213, 235, 101, 243, 253, 244, 88, 238, 173, 91, 251, 254, 249, 163, 170, 208, 135, 146, 201, 176, 102, 242, 103, 107, 228, 220, 184, 110, 172, 139, 214, 113, 114, 116, 216, 224, 119, 121, 120, 230, 226, 124, 126, 255, 209, 165, 128, 148, 133, 248, 195, 136, 191, 140, 143, 206, 252, 219, 215, 198, 150, 250, 223, 229, 256, 159, 161, 232, 192, 218, 200, 236, 168, 205, 174, 210, 231, 246, 194 ]
],
[ PermutationGroup<256 |
\[ 11, 29, 7, 49, 2, 5, 39, 76, 12, 13, 8, 85, 23, 92, 10, 123, 1, 135, 16, 19, 129, 17, 103, 25, 108, 170, 30, 31, 26, 151, 36, 176, 28, 42, 3, 154, 38, 180, 65, 41, 70, 79, 161, 34, 90, 35, 215, 50, 47, 86, 60, 6, 81, 4, 231, 53, 56, 95, 54, 225, 94, 51, 226, 52, 155, 67, 98, 201, 40, 84, 72, 149, 133, 77, 78, 73, 59, 83, 206, 75, 88, 9, 62, 118, 97, 87, 100, 171, 194, 175, 82, 111, 114, 14, 117, 15, 63, 58, 219, 173, 102, 55, 156, 105, 145, 159, 24, 163, 110, 166, 174, 113, 71, 68, 230, 93, 187, 246, 96, 169, 66, 124, 120, 37, 247, 122, 128, 240, 147, 44, 21, 152, 22, 136, 32, 99, 45, 20, 217, 18, 198, 139, 142, 140, 137, 138, 172, 69, 248, 130, 131, 177, 57, 132, 192, 119, 150, 104, 241, 210, 106, 107, 178, 209, 109, 238, 168, 190, 146, 64, 236, 27, 188, 199, 158, 182, 33, 214, 116, 195, 143, 216, 184, 101, 202, 134, 121, 218, 165, 211, 43, 46, 229, 127, 239, 204, 181, 227, 200, 61, 242, 244, 223, 205, 115, 157, 221, 189, 235, 203, 254, 251, 191, 162, 74, 144, 220, 48, 222, 253, 256, 212, 224, 141, 80, 91, 160, 89, 243, 207, 125, 185, 213, 232, 234, 153, 255, 245, 126, 249, 233, 252, 167, 164, 208, 148, 183, 237, 250, 228, 186, 179, 197, 193, 112, 196 ],
\[ 3, 9, 1, 17, 10, 19, 24, 27, 2, 5, 28, 37, 40, 35, 34, 48, 4, 54, 6, 56, 52, 51, 66, 7, 71, 74, 8, 11, 75, 70, 86, 82, 81, 15, 14, 67, 12, 101, 104, 13, 109, 112, 94, 93, 96, 95, 121, 16, 122, 127, 22, 21, 134, 18, 140, 20, 142, 138, 137, 148, 131, 130, 133, 132, 157, 23, 36, 107, 106, 30, 25, 167, 156, 26, 29, 169, 100, 108, 172, 111, 33, 32, 98, 179, 105, 31, 181, 183, 135, 177, 117, 189, 44, 43, 46, 45, 153, 83, 124, 77, 38, 141, 199, 39, 85, 69, 68, 78, 41, 204, 80, 42, 164, 160, 191, 190, 91, 192, 178, 182, 47, 49, 158, 99, 218, 217, 50, 223, 162, 62, 61, 64, 63, 53, 89, 193, 59, 58, 230, 55, 102, 57, 234, 154, 151, 180, 187, 60, 200, 166, 145, 239, 97, 144, 170, 73, 65, 123, 229, 114, 202, 129, 213, 113, 203, 150, 72, 249, 76, 155, 215, 79, 251, 242, 225, 253, 90, 119, 84, 146, 87, 120, 88, 196, 228, 227, 147, 226, 92, 116, 115, 118, 136, 221, 250, 184, 243, 248, 103, 149, 256, 161, 165, 110, 212, 241, 255, 254, 219, 220, 231, 205, 163, 245, 171, 222, 126, 125, 209, 210, 194, 216, 128, 233, 175, 188, 186, 185, 159, 139, 211, 238, 224, 143, 252, 240, 246, 232, 152, 236, 206, 174, 197, 247, 214, 237, 244, 198, 168, 195, 173, 235, 176, 208, 207, 201 ],
\[ 4, 10, 14, 18, 19, 21, 1, 28, 32, 34, 3, 2, 5, 43, 45, 6, 51, 55, 56, 58, 61, 63, 40, 68, 7, 75, 79, 81, 9, 8, 11, 89, 90, 93, 95, 86, 99, 12, 24, 106, 13, 15, 115, 62, 59, 118, 122, 125, 17, 16, 130, 132, 20, 137, 141, 142, 97, 83, 100, 22, 149, 98, 153, 155, 104, 47, 23, 160, 60, 109, 164, 25, 169, 171, 111, 27, 26, 29, 112, 175, 134, 117, 108, 30, 37, 127, 31, 33, 185, 96, 188, 35, 190, 131, 138, 178, 105, 36, 193, 181, 196, 38, 66, 123, 39, 202, 129, 71, 203, 41, 189, 207, 42, 44, 212, 84, 46, 179, 73, 158, 147, 217, 48, 49, 211, 152, 221, 50, 52, 166, 145, 144, 156, 227, 54, 53, 151, 180, 57, 154, 233, 234, 87, 222, 85, 76, 162, 237, 167, 65, 70, 64, 240, 67, 157, 199, 241, 225, 69, 186, 94, 245, 78, 247, 92, 204, 197, 72, 182, 74, 183, 187, 77, 80, 177, 82, 239, 213, 235, 101, 243, 253, 244, 88, 238, 173, 91, 251, 254, 249, 163, 170, 208, 135, 146, 201, 176, 102, 242, 103, 107, 228, 220, 184, 110, 172, 139, 214, 113, 114, 116, 216, 224, 119, 121, 120, 230, 226, 124, 126, 255, 209, 165, 128, 148, 133, 248, 195, 136, 191, 140, 143, 206, 252, 219, 215, 198, 150, 250, 223, 229, 256, 159, 161, 232, 192, 218, 200, 236, 168, 205, 174, 210, 231, 246, 194 ]:
Order := 256 > |
[ 76, 170, 65, 215, 26, 29, 155, 133, 97, 103, 73, 63, 156, 174, 23, 169, 8, 176, 120, 123, 172, 11, 119, 163, 178, 52, 131, 154, 64, 21, 132, 216, 36, 206, 39, 152, 195, 239, 192, 84, 118, 157, 159, 79, 158, 7, 77, 87, 74, 100, 80, 2, 171, 47, 247, 88, 81, 187, 49, 75, 92, 225, 82, 5, 46, 58, 95, 252, 70, 246, 248, 237, 17, 54, 62, 22, 4, 51, 150, 83, 236, 85, 60, 148, 226, 173, 188, 153, 128, 104, 12, 199, 201, 111, 121, 13, 91, 117, 212, 218, 231, 125, 96, 137, 45, 233, 108, 214, 238, 245, 200, 72, 149, 242, 221, 68, 66, 69, 10, 138, 98, 38, 146, 180, 184, 37, 249, 250, 27, 42, 147, 33, 1, 219, 182, 222, 175, 16, 253, 32, 160, 220, 217, 135, 90, 19, 30, 41, 255, 34, 129, 28, 53, 177, 35, 15, 44, 145, 213, 223, 241, 25, 162, 234, 166, 208, 211, 254, 20, 6, 57, 151, 48, 61, 105, 144, 31, 107, 114, 126, 139, 140, 102, 55, 164, 99, 67, 50, 110, 193, 106, 3, 167, 240, 122, 115, 142, 210, 94, 14, 179, 209, 141, 230, 207, 130, 196, 109, 232, 224, 229, 134, 161, 24, 59, 18, 197, 86, 251, 181, 204, 186, 198, 227, 78, 9, 203, 127, 168, 256, 183, 244, 43, 202, 185, 56, 113, 189, 124, 228, 191, 116, 190, 235, 165, 40, 101, 112, 89, 194, 136, 93, 143, 243, 71, 205 ],
[ 112, 183, 48, 162, 189, 89, 229, 242, 24, 122, 253, 223, 256, 177, 202, 210, 134, 46, 148, 211, 188, 43, 182, 9, 128, 222, 37, 40, 241, 167, 209, 225, 221, 91, 160, 157, 27, 72, 171, 28, 219, 136, 22, 139, 237, 18, 111, 3, 244, 159, 239, 93, 161, 230, 133, 96, 248, 251, 130, 254, 138, 198, 118, 142, 235, 71, 101, 175, 220, 74, 66, 38, 166, 70, 86, 240, 141, 204, 123, 164, 147, 193, 153, 102, 199, 75, 110, 165, 6, 125, 34, 194, 52, 231, 245, 56, 205, 179, 158, 156, 67, 84, 224, 109, 181, 187, 247, 169, 104, 87, 47, 1, 176, 135, 192, 173, 217, 63, 190, 196, 127, 10, 79, 201, 90, 208, 121, 25, 207, 59, 232, 178, 55, 17, 114, 42, 250, 61, 44, 238, 77, 64, 163, 151, 213, 234, 81, 19, 170, 249, 144, 227, 83, 168, 180, 100, 36, 99, 50, 35, 53, 4, 143, 80, 88, 73, 30, 154, 108, 149, 39, 203, 116, 197, 68, 113, 14, 132, 98, 155, 105, 23, 2, 206, 226, 214, 106, 21, 5, 119, 195, 115, 82, 92, 191, 120, 174, 62, 85, 212, 124, 15, 172, 78, 97, 184, 129, 126, 31, 16, 20, 200, 145, 186, 243, 233, 117, 255, 41, 69, 33, 26, 12, 103, 32, 185, 152, 246, 7, 54, 94, 131, 216, 146, 65, 252, 45, 140, 51, 76, 29, 8, 215, 49, 95, 228, 107, 57, 150, 137, 58, 236, 11, 60, 218, 13 ],
[ 55, 93, 115, 141, 142, 149, 18, 134, 185, 190, 43, 34, 56, 212, 100, 61, 166, 233, 234, 108, 167, 240, 202, 186, 4, 189, 207, 227, 89, 81, 14, 238, 178, 249, 180, 221, 208, 10, 160, 228, 19, 59, 216, 36, 181, 235, 230, 116, 130, 21, 204, 222, 83, 70, 206, 252, 39, 71, 243, 153, 197, 86, 223, 241, 48, 217, 106, 173, 63, 220, 218, 1, 253, 244, 254, 112, 111, 32, 139, 239, 248, 118, 164, 28, 193, 255, 3, 96, 150, 213, 205, 138, 236, 85, 101, 224, 24, 127, 214, 159, 107, 2, 122, 125, 68, 195, 132, 247, 126, 5, 231, 57, 45, 98, 120, 8, 179, 219, 182, 148, 245, 191, 211, 51, 84, 155, 246, 6, 144, 184, 37, 209, 242, 200, 151, 58, 109, 196, 105, 23, 172, 174, 11, 113, 99, 79, 232, 102, 176, 123, 203, 157, 165, 40, 229, 256, 136, 237, 22, 77, 145, 143, 9, 226, 95, 88, 82, 7, 210, 183, 161, 188, 75, 177, 250, 46, 168, 128, 124, 201, 69, 114, 94, 90, 65, 26, 251, 110, 140, 215, 29, 171, 119, 137, 27, 129, 117, 12, 194, 47, 52, 146, 152, 33, 13, 91, 97, 73, 15, 62, 30, 158, 50, 169, 162, 225, 163, 156, 17, 64, 192, 42, 35, 16, 198, 199, 103, 76, 20, 78, 67, 31, 187, 80, 49, 147, 38, 104, 72, 92, 53, 135, 60, 131, 87, 74, 133, 66, 121, 25, 41, 175, 44, 154, 170, 54 ]
]
];
s`SolvableDBPointedPassport := [ PowerSequence(PermutationGroup<256 |
\[ 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, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 1 ],
\[ 2, 1, 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, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256 ]:
Order := 857817775342842654119082271681232625157781520279485619859655650377269452553147589377440291360451408450375885342336584306157196834693696475322289288497426025679637332563368786442675207626794560187968867971521143307702077526646451464709187326100832876325702818980773671781454170250523018608495319068138257481070252817559459476987034665712738139286205234756808218860701203611083152093501947437109101726968262861606263662435022840944191408424615936000000000000000000000000000000000000000000000000000000000000000 >) |
[ PermutationGroup<256 |
\[ 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, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 1 ],
\[ 2, 1, 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, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256 ]:
Order := 857817775342842654119082271681232625157781520279485619859655650377269452553147589377440291360451408450375885342336584306157196834693696475322289288497426025679637332563368786442675207626794560187968867971521143307702077526646451464709187326100832876325702818980773671781454170250523018608495319068138257481070252817559459476987034665712738139286205234756808218860701203611083152093501947437109101726968262861606263662435022840944191408424615936000000000000000000000000000000000000000000000000000000000000000 > |
[ 79, 171, 123, 147, 111, 32, 241, 199, 39, 47, 182, 240, 242, 175, 106, 253, 81, 117, 225, 125, 91, 14, 169, 29, 224, 144, 85, 23, 157, 149, 222, 158, 127, 187, 68, 155, 76, 168, 74, 8, 235, 229, 60, 207, 148, 4, 75, 11, 183, 243, 177, 34, 244, 217, 226, 90, 227, 188, 51, 189, 95, 237, 46, 56, 179, 108, 180, 80, 203, 170, 103, 102, 130, 151, 36, 153, 55, 166, 104, 71, 121, 99, 63, 198, 156, 26, 205, 223, 16, 48, 10, 256, 129, 254, 162, 19, 251, 118, 120, 133, 154, 116, 213, 70, 100, 172, 164, 73, 65, 143, 66, 7, 197, 194, 246, 186, 122, 22, 93, 101, 86, 2, 27, 196, 33, 193, 215, 72, 112, 45, 245, 96, 18, 49, 210, 113, 239, 21, 114, 185, 173, 152, 191, 137, 178, 142, 28, 5, 192, 190, 132, 134, 58, 250, 138, 59, 98, 37, 128, 92, 136, 1, 232, 174, 184, 119, 84, 140, 83, 61, 105, 109, 211, 167, 24, 209, 3, 52, 62, 64, 97, 67, 12, 233, 218, 208, 40, 6, 13, 214, 228, 43, 176, 165, 230, 216, 252, 44, 145, 115, 219, 42, 206, 163, 57, 204, 107, 220, 87, 50, 53, 248, 131, 160, 181, 141, 82, 221, 110, 159, 88, 77, 38, 200, 9, 89, 126, 255, 25, 135, 161, 94, 212, 195, 150, 234, 15, 231, 17, 146, 78, 30, 236, 124, 35, 202, 201, 139, 238, 54, 20, 249, 31, 69, 247, 41 ],
[ 68, 99, 81, 14, 106, 125, 164, 109, 111, 32, 127, 196, 203, 4, 207, 221, 217, 51, 34, 227, 56, 237, 86, 123, 197, 181, 182, 79, 71, 235, 243, 10, 244, 19, 254, 108, 39, 233, 37, 47, 184, 247, 95, 186, 93, 188, 40, 225, 193, 165, 18, 245, 208, 185, 137, 21, 191, 142, 178, 202, 132, 190, 130, 250, 204, 242, 222, 1, 136, 85, 29, 236, 213, 157, 171, 101, 205, 224, 28, 256, 3, 210, 180, 249, 70, 23, 252, 201, 117, 134, 162, 220, 45, 228, 43, 239, 234, 166, 2, 151, 76, 200, 167, 241, 240, 5, 194, 36, 8, 216, 9, 187, 124, 126, 131, 140, 89, 138, 232, 209, 183, 147, 24, 113, 6, 114, 11, 206, 160, 63, 115, 61, 251, 90, 255, 69, 55, 118, 246, 116, 154, 58, 150, 155, 149, 168, 122, 177, 145, 143, 100, 230, 156, 141, 144, 153, 74, 253, 176, 129, 218, 91, 212, 7, 50, 98, 103, 146, 199, 179, 75, 229, 248, 219, 189, 159, 148, 59, 170, 83, 26, 27, 121, 41, 54, 44, 112, 46, 175, 62, 57, 198, 49, 107, 238, 12, 25, 192, 169, 102, 88, 60, 13, 65, 77, 128, 15, 53, 120, 82, 226, 163, 73, 231, 223, 110, 17, 161, 174, 92, 16, 67, 215, 78, 48, 211, 20, 94, 172, 152, 214, 119, 38, 97, 30, 72, 22, 195, 96, 105, 104, 66, 31, 33, 52, 139, 42, 173, 84, 64, 133, 87, 158, 35, 135, 80 ],
[ 91, 147, 148, 188, 177, 46, 187, 47, 48, 162, 225, 121, 175, 237, 22, 117, 96, 251, 239, 133, 118, 138, 79, 189, 172, 23, 24, 122, 123, 66, 158, 125, 6, 245, 52, 171, 253, 215, 111, 112, 80, 60, 198, 192, 63, 130, 32, 134, 90, 82, 178, 59, 226, 64, 205, 250, 77, 156, 153, 95, 179, 170, 180, 83, 8, 9, 27, 254, 35, 241, 256, 206, 36, 37, 40, 39, 67, 104, 68, 1, 217, 17, 199, 103, 182, 183, 120, 16, 211, 21, 56, 129, 232, 119, 132, 61, 26, 74, 210, 240, 209, 236, 29, 28, 75, 207, 15, 242, 229, 174, 106, 160, 69, 246, 102, 200, 51, 166, 98, 2, 3, 89, 81, 33, 227, 20, 244, 176, 45, 213, 73, 100, 151, 230, 152, 218, 155, 144, 173, 146, 110, 168, 216, 181, 169, 105, 14, 93, 235, 30, 157, 58, 101, 76, 108, 70, 71, 10, 92, 231, 214, 43, 65, 194, 107, 224, 219, 233, 86, 85, 99, 5, 154, 7, 4, 49, 18, 149, 204, 222, 223, 127, 193, 50, 116, 140, 19, 142, 202, 143, 150, 145, 114, 126, 97, 113, 124, 249, 109, 78, 42, 139, 136, 128, 252, 13, 186, 44, 159, 255, 248, 38, 167, 62, 11, 12, 185, 54, 88, 53, 161, 243, 201, 197, 34, 137, 191, 57, 247, 238, 195, 212, 41, 72, 184, 31, 190, 84, 55, 196, 164, 203, 165, 208, 115, 131, 135, 163, 87, 141, 234, 25, 221, 228, 94, 220 ]
],
[ PermutationGroup<256 |
\[ 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, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 1 ],
\[ 2, 1, 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, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256 ]:
Order := 857817775342842654119082271681232625157781520279485619859655650377269452553147589377440291360451408450375885342336584306157196834693696475322289288497426025679637332563368786442675207626794560187968867971521143307702077526646451464709187326100832876325702818980773671781454170250523018608495319068138257481070252817559459476987034665712738139286205234756808218860701203611083152093501947437109101726968262861606263662435022840944191408424615936000000000000000000000000000000000000000000000000000000000000000 > |
[ 70, 100, 85, 23, 108, 37, 166, 178, 151, 36, 180, 142, 149, 29, 109, 222, 86, 2, 39, 127, 47, 24, 63, 98, 115, 239, 59, 83, 118, 43, 55, 76, 181, 8, 71, 21, 58, 185, 132, 145, 190, 224, 13, 164, 111, 28, 155, 67, 240, 234, 123, 40, 196, 99, 16, 11, 193, 32, 3, 242, 1, 106, 147, 48, 237, 130, 56, 103, 204, 95, 131, 186, 148, 96, 138, 188, 89, 93, 170, 213, 26, 101, 4, 207, 51, 137, 227, 168, 31, 182, 75, 235, 7, 203, 79, 9, 125, 14, 154, 117, 54, 208, 245, 61, 18, 65, 167, 45, 62, 228, 73, 78, 249, 184, 42, 220, 171, 175, 112, 250, 144, 105, 156, 141, 215, 209, 97, 116, 241, 5, 68, 225, 122, 12, 243, 252, 81, 10, 165, 221, 53, 49, 255, 17, 34, 134, 169, 66, 60, 160, 19, 183, 6, 217, 91, 177, 22, 153, 102, 41, 197, 104, 254, 84, 212, 129, 44, 218, 46, 162, 133, 179, 244, 198, 157, 205, 27, 187, 15, 90, 20, 64, 146, 248, 88, 159, 199, 158, 30, 92, 247, 189, 87, 233, 210, 173, 238, 107, 52, 202, 143, 25, 163, 94, 126, 232, 174, 128, 57, 236, 124, 114, 35, 256, 251, 211, 120, 223, 191, 72, 38, 226, 140, 246, 74, 253, 176, 201, 200, 50, 113, 69, 139, 135, 214, 230, 172, 136, 121, 152, 119, 192, 195, 216, 80, 229, 110, 194, 161, 82, 33, 231, 77, 206, 219, 150 ],
[ 194, 113, 244, 254, 136, 161, 124, 184, 256, 210, 165, 41, 50, 217, 135, 107, 114, 237, 207, 44, 227, 139, 243, 253, 31, 252, 209, 229, 197, 87, 25, 106, 42, 125, 53, 224, 241, 78, 196, 183, 12, 33, 188, 20, 186, 211, 203, 189, 69, 13, 185, 231, 35, 94, 178, 245, 131, 191, 232, 218, 250, 140, 190, 238, 216, 219, 110, 81, 49, 240, 171, 105, 212, 204, 223, 233, 163, 38, 127, 88, 68, 92, 168, 146, 235, 242, 30, 80, 162, 208, 160, 82, 239, 54, 228, 230, 150, 143, 111, 149, 199, 145, 236, 128, 72, 32, 16, 222, 182, 67, 99, 122, 2, 17, 132, 137, 255, 142, 195, 174, 201, 112, 164, 7, 34, 129, 79, 104, 126, 251, 57, 115, 248, 148, 15, 5, 116, 198, 22, 62, 155, 118, 98, 179, 102, 84, 193, 134, 100, 97, 205, 246, 213, 200, 141, 234, 181, 159, 158, 91, 6, 89, 77, 123, 11, 180, 169, 83, 167, 249, 71, 176, 192, 120, 220, 172, 202, 55, 144, 166, 157, 109, 40, 8, 51, 45, 247, 43, 48, 63, 58, 173, 147, 1, 119, 39, 29, 138, 101, 154, 121, 177, 47, 74, 151, 215, 19, 90, 27, 10, 46, 73, 153, 226, 206, 65, 14, 60, 66, 175, 225, 108, 75, 36, 221, 214, 21, 95, 28, 96, 52, 59, 76, 156, 85, 103, 18, 64, 93, 70, 37, 86, 23, 3, 56, 152, 187, 133, 170, 61, 130, 26, 24, 4, 117, 9 ],
[ 250, 237, 232, 168, 251, 213, 239, 125, 230, 198, 245, 148, 188, 143, 144, 178, 179, 72, 205, 157, 224, 181, 254, 139, 177, 68, 202, 211, 217, 48, 162, 191, 130, 102, 153, 210, 161, 225, 207, 231, 91, 132, 87, 169, 222, 167, 227, 238, 118, 96, 235, 101, 155, 199, 25, 110, 27, 241, 209, 100, 128, 182, 243, 109, 32, 134, 189, 57, 59, 194, 53, 175, 99, 221, 160, 106, 24, 122, 228, 56, 116, 61, 229, 123, 244, 114, 147, 51, 163, 166, 141, 63, 38, 74, 240, 204, 79, 253, 94, 113, 92, 158, 81, 89, 112, 140, 138, 136, 135, 187, 186, 195, 52, 73, 31, 104, 149, 197, 37, 14, 93, 248, 185, 46, 150, 151, 44, 90, 180, 219, 171, 196, 71, 84, 156, 64, 242, 223, 76, 75, 7, 41, 121, 201, 183, 40, 190, 212, 50, 9, 256, 70, 159, 111, 203, 164, 220, 43, 45, 97, 170, 249, 47, 20, 22, 124, 16, 80, 193, 127, 255, 18, 39, 19, 142, 21, 234, 184, 176, 165, 42, 208, 246, 17, 78, 105, 55, 233, 173, 12, 66, 86, 131, 133, 23, 35, 6, 120, 247, 28, 95, 154, 54, 49, 172, 4, 146, 145, 129, 119, 65, 11, 88, 85, 34, 3, 200, 83, 117, 137, 62, 107, 60, 33, 115, 108, 30, 67, 152, 103, 26, 215, 1, 13, 82, 10, 216, 29, 252, 69, 126, 218, 15, 192, 236, 36, 58, 8, 2, 174, 206, 5, 214, 77, 98, 226 ]
]
];
s`SolvableDBMonodromyGroup := PermutationGroup<256 |
\[ 11, 29, 7, 49, 2, 5, 39, 76, 12, 13, 8, 85, 23, 92, 10, 123, 1, 135, 16, 19, 129, 17, 103, 25, 108, 170, 30, 31, 26, 151, 36, 176, 28, 42, 3, 154, 38, 180, 65, 41, 70, 79, 161, 34, 90, 35, 215, 50, 47, 86, 60, 6, 81, 4, 231, 53, 56, 95, 54, 225, 94, 51, 226, 52, 155, 67, 98, 201, 40, 84, 72, 149, 133, 77, 78, 73, 59, 83, 206, 75, 88, 9, 62, 118, 97, 87, 100, 171, 194, 175, 82, 111, 114, 14, 117, 15, 63, 58, 219, 173, 102, 55, 156, 105, 145, 159, 24, 163, 110, 166, 174, 113, 71, 68, 230, 93, 187, 246, 96, 169, 66, 124, 120, 37, 247, 122, 128, 240, 147, 44, 21, 152, 22, 136, 32, 99, 45, 20, 217, 18, 198, 139, 142, 140, 137, 138, 172, 69, 248, 130, 131, 177, 57, 132, 192, 119, 150, 104, 241, 210, 106, 107, 178, 209, 109, 238, 168, 190, 146, 64, 236, 27, 188, 199, 158, 182, 33, 214, 116, 195, 143, 216, 184, 101, 202, 134, 121, 218, 165, 211, 43, 46, 229, 127, 239, 204, 181, 227, 200, 61, 242, 244, 223, 205, 115, 157, 221, 189, 235, 203, 254, 251, 191, 162, 74, 144, 220, 48, 222, 253, 256, 212, 224, 141, 80, 91, 160, 89, 243, 207, 125, 185, 213, 232, 234, 153, 255, 245, 126, 249, 233, 252, 167, 164, 208, 148, 183, 237, 250, 228, 186, 179, 197, 193, 112, 196 ],
\[ 3, 9, 1, 17, 10, 19, 24, 27, 2, 5, 28, 37, 40, 35, 34, 48, 4, 54, 6, 56, 52, 51, 66, 7, 71, 74, 8, 11, 75, 70, 86, 82, 81, 15, 14, 67, 12, 101, 104, 13, 109, 112, 94, 93, 96, 95, 121, 16, 122, 127, 22, 21, 134, 18, 140, 20, 142, 138, 137, 148, 131, 130, 133, 132, 157, 23, 36, 107, 106, 30, 25, 167, 156, 26, 29, 169, 100, 108, 172, 111, 33, 32, 98, 179, 105, 31, 181, 183, 135, 177, 117, 189, 44, 43, 46, 45, 153, 83, 124, 77, 38, 141, 199, 39, 85, 69, 68, 78, 41, 204, 80, 42, 164, 160, 191, 190, 91, 192, 178, 182, 47, 49, 158, 99, 218, 217, 50, 223, 162, 62, 61, 64, 63, 53, 89, 193, 59, 58, 230, 55, 102, 57, 234, 154, 151, 180, 187, 60, 200, 166, 145, 239, 97, 144, 170, 73, 65, 123, 229, 114, 202, 129, 213, 113, 203, 150, 72, 249, 76, 155, 215, 79, 251, 242, 225, 253, 90, 119, 84, 146, 87, 120, 88, 196, 228, 227, 147, 226, 92, 116, 115, 118, 136, 221, 250, 184, 243, 248, 103, 149, 256, 161, 165, 110, 212, 241, 255, 254, 219, 220, 231, 205, 163, 245, 171, 222, 126, 125, 209, 210, 194, 216, 128, 233, 175, 188, 186, 185, 159, 139, 211, 238, 224, 143, 252, 240, 246, 232, 152, 236, 206, 174, 197, 247, 214, 237, 244, 198, 168, 195, 173, 235, 176, 208, 207, 201 ],
\[ 4, 10, 14, 18, 19, 21, 1, 28, 32, 34, 3, 2, 5, 43, 45, 6, 51, 55, 56, 58, 61, 63, 40, 68, 7, 75, 79, 81, 9, 8, 11, 89, 90, 93, 95, 86, 99, 12, 24, 106, 13, 15, 115, 62, 59, 118, 122, 125, 17, 16, 130, 132, 20, 137, 141, 142, 97, 83, 100, 22, 149, 98, 153, 155, 104, 47, 23, 160, 60, 109, 164, 25, 169, 171, 111, 27, 26, 29, 112, 175, 134, 117, 108, 30, 37, 127, 31, 33, 185, 96, 188, 35, 190, 131, 138, 178, 105, 36, 193, 181, 196, 38, 66, 123, 39, 202, 129, 71, 203, 41, 189, 207, 42, 44, 212, 84, 46, 179, 73, 158, 147, 217, 48, 49, 211, 152, 221, 50, 52, 166, 145, 144, 156, 227, 54, 53, 151, 180, 57, 154, 233, 234, 87, 222, 85, 76, 162, 237, 167, 65, 70, 64, 240, 67, 157, 199, 241, 225, 69, 186, 94, 245, 78, 247, 92, 204, 197, 72, 182, 74, 183, 187, 77, 80, 177, 82, 239, 213, 235, 101, 243, 253, 244, 88, 238, 173, 91, 251, 254, 249, 163, 170, 208, 135, 146, 201, 176, 102, 242, 103, 107, 228, 220, 184, 110, 172, 139, 214, 113, 114, 116, 216, 224, 119, 121, 120, 230, 226, 124, 126, 255, 209, 165, 128, 148, 133, 248, 195, 136, 191, 140, 143, 206, 252, 219, 215, 198, 150, 250, 223, 229, 256, 159, 161, 232, 192, 218, 200, 236, 168, 205, 174, 210, 231, 246, 194 ] >;
s`SolvableDBAutomorphismGroup := PermutationGroup<256 |
\[ 133, 52, 63, 156, 64, 170, 226, 17, 21, 132, 22, 129, 152, 153, 154, 192, 73, 199, 155, 65, 74, 76, 177, 188, 218, 5, 4, 51, 6, 49, 60, 61, 62, 144, 97, 225, 162, 107, 91, 239, 126, 140, 240, 216, 67, 85, 96, 118, 119, 246, 169, 26, 150, 103, 242, 157, 206, 104, 23, 146, 171, 120, 27, 29, 82, 90, 175, 251, 195, 122, 125, 247, 11, 10, 19, 1, 13, 16, 18, 20, 130, 131, 123, 124, 147, 148, 69, 44, 149, 98, 151, 57, 222, 236, 105, 36, 172, 158, 245, 40, 68, 201, 33, 117, 187, 250, 173, 48, 217, 220, 56, 55, 231, 212, 223, 219, 145, 37, 31, 35, 45, 178, 46, 214, 179, 163, 237, 255, 77, 182, 215, 75, 8, 166, 200, 238, 66, 39, 233, 174, 256, 241, 159, 111, 121, 7, 59, 180, 183, 176, 47, 78, 79, 80, 9, 28, 32, 95, 228, 205, 249, 100, 50, 211, 139, 253, 244, 164, 3, 2, 34, 54, 41, 53, 58, 94, 83, 86, 99, 24, 106, 14, 93, 114, 167, 110, 137, 70, 142, 209, 128, 12, 232, 248, 25, 160, 161, 196, 81, 88, 186, 168, 230, 210, 203, 135, 141, 143, 254, 115, 235, 165, 127, 87, 15, 92, 213, 84, 208, 191, 198, 189, 207, 221, 138, 30, 204, 72, 185, 224, 252, 243, 194, 229, 193, 42, 101, 197, 108, 112, 89, 134, 202, 190, 181, 38, 116, 184, 113, 71, 109, 136, 43, 234, 102, 227 ],
\[ 169, 77, 76, 182, 74, 215, 73, 138, 100, 26, 146, 173, 170, 27, 29, 236, 120, 253, 171, 88, 121, 123, 64, 156, 119, 54, 58, 180, 59, 95, 195, 181, 38, 75, 8, 239, 251, 186, 133, 155, 192, 78, 79, 80, 9, 11, 144, 240, 216, 249, 158, 47, 184, 176, 210, 183, 247, 33, 32, 104, 147, 175, 48, 49, 22, 132, 152, 199, 65, 46, 178, 214, 19, 18, 137, 20, 135, 45, 83, 145, 101, 87, 90, 35, 188, 250, 228, 102, 243, 12, 86, 30, 111, 172, 28, 2, 218, 177, 205, 89, 227, 160, 52, 63, 226, 157, 103, 96, 118, 246, 151, 108, 163, 174, 112, 92, 31, 3, 5, 57, 154, 222, 153, 212, 223, 219, 168, 190, 66, 225, 187, 122, 16, 196, 197, 204, 82, 81, 164, 220, 114, 244, 202, 217, 91, 53, 67, 39, 162, 60, 117, 124, 125, 126, 17, 6, 51, 97, 150, 242, 206, 23, 15, 213, 84, 148, 245, 208, 56, 4, 55, 98, 194, 131, 85, 143, 37, 10, 14, 134, 185, 142, 141, 198, 159, 256, 36, 127, 70, 189, 42, 1, 110, 167, 136, 248, 232, 68, 21, 129, 200, 241, 179, 237, 255, 62, 71, 41, 191, 252, 165, 207, 34, 13, 140, 139, 209, 128, 115, 235, 72, 230, 116, 93, 105, 50, 201, 229, 166, 113, 203, 106, 44, 161, 43, 231, 24, 69, 99, 211, 130, 61, 238, 233, 40, 7, 224, 107, 254, 193, 221, 94, 234, 109, 25, 149 ]:
Order := 256 >;
s`SolvableDBPointedAutomorphismGroup := PermutationGroup<256 |
\[ 76, 170, 169, 27, 26, 29, 146, 133, 155, 74, 73, 192, 77, 182, 215, 78, 8, 79, 75, 80, 9, 11, 59, 180, 195, 52, 63, 156, 64, 226, 119, 157, 103, 171, 120, 96, 118, 246, 138, 100, 173, 236, 253, 88, 121, 123, 151, 108, 30, 163, 28, 2, 174, 172, 112, 111, 92, 175, 147, 31, 32, 33, 3, 5, 20, 137, 45, 101, 87, 188, 250, 228, 17, 21, 132, 22, 129, 152, 153, 154, 199, 65, 177, 218, 46, 178, 214, 200, 241, 66, 39, 216, 183, 176, 158, 47, 35, 90, 179, 162, 237, 255, 54, 58, 95, 181, 38, 239, 251, 186, 144, 240, 249, 184, 210, 247, 104, 48, 49, 62, 145, 70, 83, 84, 71, 41, 213, 191, 12, 81, 82, 10, 1, 242, 206, 252, 187, 225, 165, 42, 207, 189, 208, 34, 117, 60, 85, 86, 89, 53, 91, 13, 14, 15, 19, 4, 56, 98, 143, 196, 197, 37, 126, 168, 212, 134, 185, 202, 51, 6, 61, 97, 107, 140, 67, 150, 23, 122, 125, 148, 245, 130, 149, 248, 229, 201, 105, 24, 222, 244, 220, 16, 235, 233, 69, 198, 238, 221, 18, 135, 102, 243, 205, 227, 160, 57, 223, 219, 190, 204, 164, 114, 217, 124, 131, 44, 109, 25, 116, 110, 224, 93, 115, 230, 36, 7, 256, 159, 234, 203, 113, 193, 139, 254, 211, 94, 127, 136, 40, 43, 142, 55, 232, 167, 99, 50, 72, 194, 161, 106, 68, 231, 166, 209, 128, 141 ]:
Order := 8 >;
s`SolvableDBPathToPP1 := [ Strings() | "PP1", "2T1-1,2,2-g0-path1", "4T2-2,2,2-g0-path1", "8T4-4,2,2-g0-path1", "16T10-4,2,4-g1-path5", "32S9-4,2,8-g3-path2", "64S41-4,2,16-g7-path1", "128S65-8,2,16-g21-path1", "256S377-8,2,32-g45-path2" ];
s`SolvableDBChild := "128S65-8,2,16-g21-path1";
/*
Return for eval
*/
return s;
| michaelmusty/SolvableDessins | SolvableDB/256/256S377-8,2,32-g45-path2.m | Matlab | mit | 54,936 |
//-----------------------------------------------------------------------------
// All code is property of Dictator Developers Inc
// Contact at Loesby.dev@gmail.com for permission to use
// Or to discuss ideas
// (c) 2018
// Systems/UnitDeath.cpp
// Runs through units that have health, kills the ones that don't have any left.
#include "../Core/typedef.h"
#include "UnitDeath.h"
void UnitDeath::ProgramInit() {}
void UnitDeath::SetupGameplay() {}
void UnitDeath::Operate(GameLoopPhase phase, const timeuS& frameDuration)
{
switch (phase)
{
case GameLoopPhase::PREPARATION:
case GameLoopPhase::INPUT:
case GameLoopPhase::ACTION:
case GameLoopPhase::ACTION_RESPONSE:
case GameLoopPhase::RENDER:
return;
case GameLoopPhase::CLEANUP:
KillDyingUnits();
break;
}
}
void UnitDeath::KillDyingUnits()
{
m_managerRef.forEntitiesMatching<ECS_Core::Signatures::S_Living>(
[&manager =m_managerRef](ecs::EntityIndex mI,
const ECS_Core::Components::C_Health& health)
{
if (health.m_currentHealth <= 0)
{
manager.kill(mI);
}
return ecs::IterationBehavior::CONTINUE;
});
m_managerRef.forEntitiesMatching<ECS_Core::Signatures::S_Dead>(
[&manager = m_managerRef](ecs::EntityIndex mI)
{
manager.kill(mI);
return ecs::IterationBehavior::CONTINUE;
});
}
bool UnitDeath::ShouldExit()
{
return false;
}
DEFINE_SYSTEM_INSTANTIATION(UnitDeath);
| Agaanii/Dictator | MPLECS/Systems/UnitDeath.cpp | C++ | mit | 1,375 |
import { Injectable } from '@angular/core';
import { Http, Headers, Response, RequestOptions } from '@angular/http';
import { Observable } from 'rxjs/Observable';
import { ErrorHandler } from './../errorHandler';
const loginUrl = 'http://awesomenews4000api.herokuapp.com/user/login';
@Injectable()
export class AuthenticationService {
constructor(
private http: Http,
private errorHandler: ErrorHandler
) { }
login(username: string, password: string) {
return this.http.post(loginUrl, JSON.stringify({ username: username, password: password }), this.setHeaders())
.map((response: Response) => {
let apiResponse = response.json();
if (apiResponse && apiResponse.user.token) {
localStorage.setItem('currentUser', JSON.stringify(apiResponse));
}
})
.catch(this.errorHandler.handleError);
}
logout() {
localStorage.removeItem('currentUser');
}
checkIfUserIsLoggedIn() {
return localStorage.getItem('currentUser');
}
private setHeaders() {
let headers = new Headers({ 'Content-Type': 'application/json' });
return new RequestOptions({ headers: headers });
}
} | TeamG3000/Awesome-News-System-4000-Client | Awesome-News-System-4000/app/core/services/authentication.service.ts | TypeScript | mit | 1,263 |
<?php
namespace Nova\Auth\Reminders;
use Nova\Mail\Mailer;
use Nova\Auth\UserProviderInterface;
use Closure;
class PasswordBroker
{
/**
* Constant representing a successfully sent reminder.
*
* @var int
*/
const REMINDER_SENT = 'reminders.sent';
/**
* Constant representing a successfully reset password.
*
* @var int
*/
const PASSWORD_RESET = 'reminders.reset';
/**
* Constant representing the user not found response.
*
* @var int
*/
const INVALID_USER = 'reminders.user';
/**
* Constant representing an invalid password.
*
* @var int
*/
const INVALID_PASSWORD = 'reminders.password';
/**
* Constant representing an invalid token.
*
* @var int
*/
const INVALID_TOKEN = 'reminders.token';
/**
* The password reminder repository.
*
* @var \Nova\Auth\Reminders\ReminderRepositoryInterface $reminders
*/
protected $reminders;
/**
* The user provider implementation.
*
* @var \Nova\Auth\UserProviderInterface
*/
protected $users;
/**
* The mailer instance.
*
* @var \Mail\Mailer
*/
protected $mailer;
/**
* The view of the password reminder e-mail.
*
* @var string
*/
protected $reminderView;
/**
* The custom password validator callback.
*
* @var \Closure
*/
protected $passwordValidator;
/**
* Create a new password broker instance.
*
* @param \Auth\Reminders\ReminderRepositoryInterface $reminders
* @param \Auth\UserProviderInterface $users
* @param \Nova\Mail\Mailer $mailer
* @param string $reminderView
* @return void
*/
public function __construct(ReminderRepositoryInterface $reminders,
UserProviderInterface $users,
Mailer $mailer,
$reminderView)
{
$this->users = $users;
$this->mailer = $mailer;
$this->reminders = $reminders;
$this->reminderView = $reminderView;
}
/**
* Send a password reminder to a user.
*
* @param array $credentials
* @param \Closure $callback
* @return string
*/
public function remind(array $credentials, Closure $callback = null)
{
// First we will check to see if we found a user at the given credentials and
// if we did not we will redirect back to this current URI with a piece of
// "flash" data in the session to indicate to the developers the errors.
$user = $this->getUser($credentials);
if (is_null($user)) {
return self::INVALID_USER;
}
// Once we have the reminder token, we are ready to send a message out to the
// user with a link to reset their password. We will then redirect back to
// the current URI having nothing set in the session to indicate errors.
$token = $this->reminders->create($user);
$this->sendReminder($user, $token, $callback);
return self::REMINDER_SENT;
}
/**
* Send the password reminder e-mail.
*
* @param \Auth\Reminders\RemindableInterface $user
* @param string $token
* @param \Closure $callback
* @return int
*/
public function sendReminder(RemindableInterface $user, $token, Closure $callback = null)
{
// We will use the reminder view that was given to the broker to display the
// password reminder e-mail. We'll pass a "token" variable into the views
// so that it may be displayed for an user to click for password reset.
$view = $this->reminderView;
return $this->mailer->send($view, compact('token', 'user'), function($m) use ($user, $token, $callback)
{
$m->to($user->getReminderEmail());
if (! is_null($callback)) call_user_func($callback, $m, $user, $token);
});
}
/**
* Reset the password for the given token.
*
* @param array $credentials
* @param \Closure $callback
* @return mixed
*/
public function reset(array $credentials, Closure $callback)
{
// If the responses from the validate method is not a user instance, we will
// assume that it is a redirect and simply return it from this method and
// the user is properly redirected having an error message on the post.
$user = $this->validateReset($credentials);
if (! $user instanceof RemindableInterface) {
return $user;
}
$pass = $credentials['password'];
// Once we have called this callback, we will remove this token row from the
// table and return the response from this callback so the user gets sent
// to the destination given by the developers from the callback return.
call_user_func($callback, $user, $pass);
$this->reminders->delete($credentials['token']);
return self::PASSWORD_RESET;
}
/**
* Validate a password reset for the given credentials.
*
* @param array $credentials
* @return \Nova\Auth\Reminders\RemindableInterface
*/
protected function validateReset(array $credentials)
{
if (is_null($user = $this->getUser($credentials))) {
return self::INVALID_USER;
}
if (! $this->validNewPasswords($credentials)) {
return self::INVALID_PASSWORD;
}
if (! $this->reminders->exists($user, $credentials['token'])) {
return self::INVALID_TOKEN;
}
return $user;
}
/**
* Set a custom password validator.
*
* @param \Closure $callback
* @return void
*/
public function validator(Closure $callback)
{
$this->passwordValidator = $callback;
}
/**
* Determine if the passwords match for the request.
*
* @param array $credentials
* @return bool
*/
protected function validNewPasswords(array $credentials)
{
list($password, $confirm) = array($credentials['password'], $credentials['password_confirmation']);
if (isset($this->passwordValidator)) {
return call_user_func($this->passwordValidator, $credentials) && $password === $confirm;
}
return $this->validatePasswordWithDefaults($credentials);
}
/**
* Determine if the passwords are valid for the request.
*
* @param array $credentials
* @return bool
*/
protected function validatePasswordWithDefaults(array $credentials)
{
list($password, $confirm) = [$credentials['password'], $credentials['password_confirmation']];
return $password === $confirm && mb_strlen($password) >= 6;
}
/**
* Get the user for the given credentials.
*
* @param array $credentials
* @return \Nova\Auth\Reminders\RemindableInterface
*
* @throws \UnexpectedValueException
*/
public function getUser(array $credentials)
{
$credentials = array_except($credentials, array('token'));
$user = $this->users->retrieveByCredentials($credentials);
if ($user && ! $user instanceof RemindableInterface) {
throw new \UnexpectedValueException("User must implement Remindable interface.");
}
return $user;
}
/**
* Get the password reminder repository implementation.
*
* @return \Nova\Auth\Reminders\ReminderRepositoryInterface
*/
protected function getRepository()
{
return $this->reminders;
}
}
| ignazas/ma2016 | vendor/nova-framework/system/src/Auth/Reminders/PasswordBroker.php | PHP | mit | 7,720 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>User agent detail - Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Tjusig 2.40.164; Avant Browser; .NET CLR 1.1.4322; .NET CLR 2.0.50727)</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.3/css/materialize.min.css">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link href="../circle.css" rel="stylesheet">
</head>
<body>
<div class="container">
<div class="section">
<h1 class="header center orange-text">User agent detail</h1>
<div class="row center">
<h5 class="header light">
Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Tjusig 2.40.164; Avant Browser; .NET CLR 1.1.4322; .NET CLR 2.0.50727)
</h5>
</div>
</div>
<div class="section">
<table class="striped"><tr><th></th><th colspan="3">General</th><th colspan="5">Device</th><th colspan="3">Bot</th><th colspan="2"></th></tr><tr><th>Provider</th><th>Browser</th><th>Engine</th><th>OS</th><th>Brand</th><th>Model</th><th>Type</th><th>Is mobile</th><th>Is touch</th><th>Is bot</th><th>Name</th><th>Type</th><th>Parse time</th><th>Actions</th></tr><tr><th colspan="14" class="green lighten-3">Test suite</th></tr><tr><td>Zsxsoft<br /><small>1.3</small><br /><small>vendor/zsxsoft/php-useragent/tests/UserAgentList.php</small></td><td>Tjusig 2.40.164</td><td><i class="material-icons">close</i></td><td>Windows 98</td><td style="border-left: 1px solid #555"></td><td></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td></td><td><i class="material-icons">close</i></td><td>0</td><td>
<!-- Modal Trigger -->
<a class="modal-trigger btn waves-effect waves-light" href="#modal-cc0b14fd-de64-41b9-a57c-c778ee172802">Detail</a>
<!-- Modal Structure -->
<div id="modal-cc0b14fd-de64-41b9-a57c-c778ee172802" class="modal modal-fixed-footer">
<div class="modal-content">
<h4>Zsxsoft result detail</h4>
<p><pre><code class="php">Array
(
[0] => img/16/browser/tjusig.png
[1] => img/16/os/win-1.png
[2] => Tjusig
[3] => 2.40.164
[4] => Tjusig 2.40.164
[5] => Windows
[6] => 98
[7] => Windows 98
[8] =>
[9] => os
)
</code></pre></p>
</div>
<div class="modal-footer">
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a>
</div>
</div>
</td></tr><tr><th colspan="14" class="green lighten-3">Providers</th></tr><tr><td>BrowscapFull<br /><small>6014</small><br /></td><td>Avant </td><td>Trident </td><td>Win98 98</td><td style="border-left: 1px solid #555"></td><td></td><td>Desktop</td><td></td><td></td><td style="border-left: 1px solid #555"></td><td></td><td></td><td>0.024</td><td>
<!-- Modal Trigger -->
<a class="modal-trigger btn waves-effect waves-light" href="#modal-47a9cd06-e213-4882-bc34-db6aed664223">Detail</a>
<!-- Modal Structure -->
<div id="modal-47a9cd06-e213-4882-bc34-db6aed664223" class="modal modal-fixed-footer">
<div class="modal-content">
<h4>BrowscapFull result detail</h4>
<p><pre><code class="php">stdClass Object
(
[browser_name_regex] => /^mozilla\/4\.0 \(compatible; msie 6\..*; .*windows 98.*avant browser.*$/
[browser_name_pattern] => mozilla/4.0 (compatible; msie 6.*; *windows 98*avant browser*
[parent] => Avant/IE 6.0
[comment] => Avant/IE 6.0
[browser] => Avant
[browser_type] => Browser
[browser_bits] => 32
[browser_maker] => Avant Force
[browser_modus] => unknown
[version] => 0.0
[majorver] => 0
[minorver] => 0
[platform] => Win98
[platform_version] => 98
[platform_description] => Windows 98
[platform_bits] => 32
[platform_maker] => Microsoft Corporation
[alpha] =>
[beta] =>
[win16] =>
[win32] => 1
[win64] =>
[frames] => 1
[iframes] => 1
[tables] => 1
[cookies] => 1
[backgroundsounds] => 1
[javascript] => 1
[vbscript] => 1
[javaapplets] => 1
[activexcontrols] => 1
[ismobiledevice] =>
[istablet] =>
[issyndicationreader] =>
[crawler] =>
[isfake] =>
[isanonymized] =>
[ismodified] =>
[cssversion] => 1
[aolversion] => 0
[device_name] => Windows Desktop
[device_maker] => Various
[device_type] => Desktop
[device_pointing_method] => mouse
[device_code_name] => Windows Desktop
[device_brand_name] => unknown
[renderingengine_name] => Trident
[renderingengine_version] => unknown
[renderingengine_description] => For Internet Explorer since version 4.0 and embedded WebBrowser controls (such as Internet Explorer shells, Maxthon and some media players).
[renderingengine_maker] => Microsoft Corporation
)
</code></pre></p>
</div>
<div class="modal-footer">
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a>
</div>
</div>
</td></tr><tr><td>BrowscapLite<br /><small>6014</small><br /></td><td>IE 6.0</td><td><i class="material-icons">close</i></td><td>Win32 </td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td>Desktop</td><td></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td>0.006</td><td>
<!-- Modal Trigger -->
<a class="modal-trigger btn waves-effect waves-light" href="#modal-42bb56ba-b834-47c5-bea0-c0270e9ab371">Detail</a>
<!-- Modal Structure -->
<div id="modal-42bb56ba-b834-47c5-bea0-c0270e9ab371" class="modal modal-fixed-footer">
<div class="modal-content">
<h4>BrowscapLite result detail</h4>
<p><pre><code class="php">stdClass Object
(
[browser_name_regex] => /^mozilla\/4\.0 \(compatible; msie 6\.0.*; .*windows.*$/
[browser_name_pattern] => mozilla/4.0 (compatible; msie 6.0*; *windows*
[parent] => IE 6.0 for Desktop
[comment] => IE 6.0
[browser] => IE
[browser_type] => unknown
[browser_bits] => 0
[browser_maker] => unknown
[browser_modus] => unknown
[version] => 6.0
[majorver] => 0
[minorver] => 0
[platform] => Win32
[platform_version] => unknown
[platform_description] => unknown
[platform_bits] => 0
[platform_maker] => unknown
[alpha] => false
[beta] => false
[win16] => false
[win32] => false
[win64] => false
[frames] => false
[iframes] => false
[tables] => false
[cookies] => false
[backgroundsounds] => false
[javascript] => false
[vbscript] => false
[javaapplets] => false
[activexcontrols] => false
[ismobiledevice] =>
[istablet] =>
[issyndicationreader] => false
[crawler] => false
[isfake] => false
[isanonymized] => false
[ismodified] => false
[cssversion] => 0
[aolversion] => 0
[device_name] => unknown
[device_maker] => unknown
[device_type] => Desktop
[device_pointing_method] => unknown
[device_code_name] => unknown
[device_brand_name] => unknown
[renderingengine_name] => unknown
[renderingengine_version] => unknown
[renderingengine_description] => unknown
[renderingengine_maker] => unknown
)
</code></pre></p>
</div>
<div class="modal-footer">
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a>
</div>
</div>
</td></tr><tr><td>BrowscapPhp<br /><small>6014</small><br /></td><td>IE 6.0</td><td><i class="material-icons">close</i></td><td>Win32 </td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td>Desktop</td><td></td><td></td><td style="border-left: 1px solid #555"></td><td></td><td><i class="material-icons">close</i></td><td>0.015</td><td>
<!-- Modal Trigger -->
<a class="modal-trigger btn waves-effect waves-light" href="#modal-ad0041a2-b0f4-43f6-a70d-cad1443caa68">Detail</a>
<!-- Modal Structure -->
<div id="modal-ad0041a2-b0f4-43f6-a70d-cad1443caa68" class="modal modal-fixed-footer">
<div class="modal-content">
<h4>BrowscapPhp result detail</h4>
<p><pre><code class="php">stdClass Object
(
[browser_name_regex] => /^mozilla\/4\.0 \(compatible; msie 6\.0.*; .*windows.*$/
[browser_name_pattern] => mozilla/4.0 (compatible; msie 6.0*; *windows*
[parent] => IE 6.0 for Desktop
[comment] => IE 6.0
[browser] => IE
[browser_type] => unknown
[browser_bits] => 0
[browser_maker] => Microsoft Corporation
[browser_modus] => unknown
[version] => 6.0
[majorver] => 6
[minorver] => 0
[platform] => Win32
[platform_version] => unknown
[platform_description] => unknown
[platform_bits] => 0
[platform_maker] => unknown
[alpha] => false
[beta] => false
[win16] => false
[win32] => false
[win64] => false
[frames] => false
[iframes] => false
[tables] => false
[cookies] => false
[backgroundsounds] => false
[javascript] => false
[vbscript] => false
[javaapplets] => false
[activexcontrols] => false
[ismobiledevice] =>
[istablet] =>
[issyndicationreader] => false
[crawler] =>
[isfake] => false
[isanonymized] => false
[ismodified] => false
[cssversion] => 0
[aolversion] => 0
[device_name] => unknown
[device_maker] => unknown
[device_type] => Desktop
[device_pointing_method] => mouse
[device_code_name] => unknown
[device_brand_name] => unknown
[renderingengine_name] => unknown
[renderingengine_version] => unknown
[renderingengine_description] => unknown
[renderingengine_maker] => unknown
)
</code></pre></p>
</div>
<div class="modal-footer">
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a>
</div>
</div>
</td></tr><tr><td>DonatjUAParser<br /><small>v0.5.1</small><br /></td><td>MSIE 6.0</td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td>0</td><td>
<!-- Modal Trigger -->
<a class="modal-trigger btn waves-effect waves-light" href="#modal-15fbc1f0-2615-4d42-b5d9-a30dd647b050">Detail</a>
<!-- Modal Structure -->
<div id="modal-15fbc1f0-2615-4d42-b5d9-a30dd647b050" class="modal modal-fixed-footer">
<div class="modal-content">
<h4>DonatjUAParser result detail</h4>
<p><pre><code class="php">Array
(
[platform] => Windows
[browser] => MSIE
[version] => 6.0
)
</code></pre></p>
</div>
<div class="modal-footer">
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a>
</div>
</div>
</td></tr><tr><td>JenssegersAgent<br /><small>v2.3.3</small><br /></td><td>IE 6.0</td><td><i class="material-icons">close</i></td><td>Windows </td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"></td><td></td><td><i class="material-icons">close</i></td><td>0.002</td><td>
<!-- Modal Trigger -->
<a class="modal-trigger btn waves-effect waves-light" href="#modal-b85a2b91-6a55-4436-a82c-1ea0d46e2e51">Detail</a>
<!-- Modal Structure -->
<div id="modal-b85a2b91-6a55-4436-a82c-1ea0d46e2e51" class="modal modal-fixed-footer">
<div class="modal-content">
<h4>JenssegersAgent result detail</h4>
<p><pre><code class="php">Array
(
[browserName] => IE
[browserVersion] => 6.0
[osName] => Windows
[osVersion] =>
[deviceModel] =>
[isMobile] =>
[isRobot] =>
[botName] =>
)
</code></pre></p>
</div>
<div class="modal-footer">
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a>
</div>
</div>
</td></tr><tr><td>NeutrinoApiCom<br /><small></small><br /></td><td>Tjusig 2.40.164</td><td><i class="material-icons">close</i></td><td>Windows 98</td><td style="border-left: 1px solid #555"></td><td></td><td>desktop-browser</td><td></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"></td><td></td><td><i class="material-icons">close</i></td><td>0.22201</td><td>
<!-- Modal Trigger -->
<a class="modal-trigger btn waves-effect waves-light" href="#modal-8c2a7a4e-3fbf-4df2-8d61-5e730422f67b">Detail</a>
<!-- Modal Structure -->
<div id="modal-8c2a7a4e-3fbf-4df2-8d61-5e730422f67b" class="modal modal-fixed-footer">
<div class="modal-content">
<h4>NeutrinoApiCom result detail</h4>
<p><pre><code class="php">stdClass Object
(
[mobile_screen_height] => 0
[is_mobile] =>
[type] => desktop-browser
[mobile_brand] =>
[mobile_model] =>
[version] => 2.40.164
[is_android] =>
[browser_name] => Tjusig
[operating_system_family] => Windows
[operating_system_version] => 98
[is_ios] =>
[producer] => Lukáš Ingr
[operating_system] => Windows 98
[mobile_screen_width] => 0
[mobile_browser] =>
)
</code></pre></p>
</div>
<div class="modal-footer">
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a>
</div>
</div>
</td></tr><tr><td>PiwikDeviceDetector<br /><small>3.6.1</small><br /></td><td>Avant Browser </td><td> </td><td>Windows 98</td><td style="border-left: 1px solid #555"></td><td></td><td>desktop</td><td></td><td></td><td style="border-left: 1px solid #555"></td><td></td><td></td><td>0.007</td><td>
<!-- Modal Trigger -->
<a class="modal-trigger btn waves-effect waves-light" href="#modal-4a941d34-a8d3-4914-9724-346f60ad7046">Detail</a>
<!-- Modal Structure -->
<div id="modal-4a941d34-a8d3-4914-9724-346f60ad7046" class="modal modal-fixed-footer">
<div class="modal-content">
<h4>PiwikDeviceDetector result detail</h4>
<p><pre><code class="php">Array
(
[client] => Array
(
[type] => browser
[name] => Avant Browser
[short_name] => AA
[version] =>
[engine] =>
)
[operatingSystem] => Array
(
[name] => Windows
[short_name] => WIN
[version] => 98
[platform] =>
)
[device] => Array
(
[brand] =>
[brandName] =>
[model] =>
[device] => 0
[deviceName] => desktop
)
[bot] =>
[extra] => Array
(
[isBot] =>
[isBrowser] => 1
[isFeedReader] =>
[isMobileApp] =>
[isPIM] =>
[isLibrary] =>
[isMediaPlayer] =>
[isCamera] =>
[isCarBrowser] =>
[isConsole] =>
[isFeaturePhone] =>
[isPhablet] =>
[isPortableMediaPlayer] =>
[isSmartDisplay] =>
[isSmartphone] =>
[isTablet] =>
[isTV] =>
[isDesktop] => 1
[isMobile] =>
[isTouchEnabled] =>
)
)
</code></pre></p>
</div>
<div class="modal-footer">
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a>
</div>
</div>
</td></tr><tr><td>SinergiBrowserDetector<br /><small>6.0.1</small><br /></td><td>Internet Explorer 6.0</td><td><i class="material-icons">close</i></td><td>Windows 98</td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td></td><td><i class="material-icons">close</i></td><td></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td>0</td><td>
<!-- Modal Trigger -->
<a class="modal-trigger btn waves-effect waves-light" href="#modal-ec1cd248-02b0-457e-8a9d-35bb99af008c">Detail</a>
<!-- Modal Structure -->
<div id="modal-ec1cd248-02b0-457e-8a9d-35bb99af008c" class="modal modal-fixed-footer">
<div class="modal-content">
<h4>SinergiBrowserDetector result detail</h4>
<p><pre><code class="php">Array
(
[browser] => Sinergi\BrowserDetector\Browser Object
(
[userAgent:Sinergi\BrowserDetector\Browser:private] => Sinergi\BrowserDetector\UserAgent Object
(
[userAgentString:Sinergi\BrowserDetector\UserAgent:private] => Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Tjusig 2.40.164; Avant Browser; .NET CLR 1.1.4322; .NET CLR 2.0.50727)
)
[name:Sinergi\BrowserDetector\Browser:private] => Internet Explorer
[version:Sinergi\BrowserDetector\Browser:private] => 6.0
[isRobot:Sinergi\BrowserDetector\Browser:private] =>
[isChromeFrame:Sinergi\BrowserDetector\Browser:private] =>
[isFacebookWebView:Sinergi\BrowserDetector\Browser:private] =>
[isCompatibilityMode:Sinergi\BrowserDetector\Browser:private] =>
)
[operatingSystem] => Sinergi\BrowserDetector\Os Object
(
[name:Sinergi\BrowserDetector\Os:private] => Windows
[version:Sinergi\BrowserDetector\Os:private] => 98
[isMobile:Sinergi\BrowserDetector\Os:private] =>
[userAgent:Sinergi\BrowserDetector\Os:private] => Sinergi\BrowserDetector\UserAgent Object
(
[userAgentString:Sinergi\BrowserDetector\UserAgent:private] => Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Tjusig 2.40.164; Avant Browser; .NET CLR 1.1.4322; .NET CLR 2.0.50727)
)
)
[device] => Sinergi\BrowserDetector\Device Object
(
[name:Sinergi\BrowserDetector\Device:private] => unknown
[userAgent:Sinergi\BrowserDetector\Device:private] => Sinergi\BrowserDetector\UserAgent Object
(
[userAgentString:Sinergi\BrowserDetector\UserAgent:private] => Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Tjusig 2.40.164; Avant Browser; .NET CLR 1.1.4322; .NET CLR 2.0.50727)
)
)
)
</code></pre></p>
</div>
<div class="modal-footer">
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a>
</div>
</div>
</td></tr><tr><td>UAParser<br /><small>v3.4.5</small><br /></td><td>Avant 1</td><td><i class="material-icons">close</i></td><td>Windows 98 </td><td style="border-left: 1px solid #555"></td><td></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"></td><td></td><td><i class="material-icons">close</i></td><td>0.001</td><td>
<!-- Modal Trigger -->
<a class="modal-trigger btn waves-effect waves-light" href="#modal-3160e405-8a8f-46dd-8f47-5115f06462d2">Detail</a>
<!-- Modal Structure -->
<div id="modal-3160e405-8a8f-46dd-8f47-5115f06462d2" class="modal modal-fixed-footer">
<div class="modal-content">
<h4>UAParser result detail</h4>
<p><pre><code class="php">UAParser\Result\Client Object
(
[ua] => UAParser\Result\UserAgent Object
(
[major] => 1
[minor] =>
[patch] =>
[family] => Avant
)
[os] => UAParser\Result\OperatingSystem Object
(
[major] =>
[minor] =>
[patch] =>
[patchMinor] =>
[family] => Windows 98
)
[device] => UAParser\Result\Device Object
(
[brand] =>
[model] =>
[family] => Other
)
[originalUserAgent] => Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Tjusig 2.40.164; Avant Browser; .NET CLR 1.1.4322; .NET CLR 2.0.50727)
)
</code></pre></p>
</div>
<div class="modal-footer">
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a>
</div>
</div>
</td></tr><tr><td>UserAgentApiCom<br /><small></small><br /></td><td>Internet Explorer 6.0</td><td> </td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td>Desktop</td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"></td><td></td><td><i class="material-icons">close</i></td><td>0.15001</td><td>
<!-- Modal Trigger -->
<a class="modal-trigger btn waves-effect waves-light" href="#modal-afeb05fb-26b9-4509-b8ac-0c604a9e97d6">Detail</a>
<!-- Modal Structure -->
<div id="modal-afeb05fb-26b9-4509-b8ac-0c604a9e97d6" class="modal modal-fixed-footer">
<div class="modal-content">
<h4>UserAgentApiCom result detail</h4>
<p><pre><code class="php">stdClass Object
(
[platform_name] => Windows 98
[platform_version] => Windows 98
[platform_type] => Desktop
[browser_name] => Internet Explorer
[browser_version] => 6.0
)
</code></pre></p>
</div>
<div class="modal-footer">
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a>
</div>
</div>
</td></tr><tr><td>UserAgentStringCom<br /><small></small><br /></td><td>Avant Browser </td><td><i class="material-icons">close</i></td><td>Windows 98 </td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"></td><td></td><td></td><td>0.074</td><td>
<!-- Modal Trigger -->
<a class="modal-trigger btn waves-effect waves-light" href="#modal-08a9ddfb-838f-48d7-9ede-1d132306b2ee">Detail</a>
<!-- Modal Structure -->
<div id="modal-08a9ddfb-838f-48d7-9ede-1d132306b2ee" class="modal modal-fixed-footer">
<div class="modal-content">
<h4>UserAgentStringCom result detail</h4>
<p><pre><code class="php">stdClass Object
(
[agent_type] => Browser
[agent_name] => Avant Browser
[agent_version] => --
[os_type] => Windows
[os_name] => Windows 98
[os_versionName] =>
[os_versionNumber] =>
[os_producer] =>
[os_producerURL] =>
[linux_distibution] => Null
[agent_language] =>
[agent_languageTag] =>
)
</code></pre></p>
</div>
<div class="modal-footer">
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a>
</div>
</div>
</td></tr><tr><td>WhatIsMyBrowserCom<br /><small></small><br /></td><td>Avant Browser </td><td> </td><td>Windows </td><td style="border-left: 1px solid #555"></td><td></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td>0.23501</td><td>
<!-- Modal Trigger -->
<a class="modal-trigger btn waves-effect waves-light" href="#modal-5fc1ff22-a74d-481b-9ad1-fcfde73ded9c">Detail</a>
<!-- Modal Structure -->
<div id="modal-5fc1ff22-a74d-481b-9ad1-fcfde73ded9c" class="modal modal-fixed-footer">
<div class="modal-content">
<h4>WhatIsMyBrowserCom result detail</h4>
<p><pre><code class="php">stdClass Object
(
[operating_system_name] => Windows
[simple_sub_description_string] =>
[simple_browser_string] => Avant Browser on Windows 98
[browser_version] =>
[extra_info] => Array
(
)
[operating_platform] =>
[extra_info_table] => Array
(
)
[layout_engine_name] =>
[detected_addons] => Array
(
)
[operating_system_flavour_code] =>
[hardware_architecture] =>
[operating_system_flavour] =>
[operating_system_frameworks] => Array
(
[0] => stdClass Object
(
[code] => microsoft-dotnet
[name] => Microsoft .Net
[versions] => Array
(
[0] => stdClass Object
(
[simple] => 1.1
[full] => 1.1.4322
)
[1] => stdClass Object
(
[simple] => 2.0
[full] => 2.0.50727
)
)
)
)
[browser_name_code] => avant-browser
[operating_system_version] => 98
[simple_operating_platform_string] =>
[is_abusive] =>
[layout_engine_version] =>
[browser_capabilities] => Array
(
)
[operating_platform_vendor_name] =>
[operating_system] => Windows 98
[operating_system_version_full] =>
[operating_platform_code] =>
[browser_name] => Avant Browser
[operating_system_name_code] => windows
[user_agent] => Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Tjusig 2.40.164; Avant Browser; .NET CLR 1.1.4322; .NET CLR 2.0.50727)
[browser_version_full] =>
[browser] => Avant Browser
)
</code></pre></p>
</div>
<div class="modal-footer">
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a>
</div>
</div>
</td></tr><tr><td>WhichBrowser<br /><small>v2.0.18</small><br /></td><td>Avant Browser </td><td> </td><td>Windows 98</td><td style="border-left: 1px solid #555"></td><td></td><td>desktop</td><td></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"></td><td></td><td><i class="material-icons">close</i></td><td>0.001</td><td>
<!-- Modal Trigger -->
<a class="modal-trigger btn waves-effect waves-light" href="#modal-083a336f-5d73-4505-84f3-c5fc9bb78652">Detail</a>
<!-- Modal Structure -->
<div id="modal-083a336f-5d73-4505-84f3-c5fc9bb78652" class="modal modal-fixed-footer">
<div class="modal-content">
<h4>WhichBrowser result detail</h4>
<p><pre><code class="php">Array
(
[browser] => Array
(
[name] => Avant Browser
[type] => browser
)
[os] => Array
(
[name] => Windows
[version] => Array
(
[value] => 4.1
[alias] => 98
)
)
[device] => Array
(
[type] => desktop
)
)
</code></pre></p>
</div>
<div class="modal-footer">
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a>
</div>
</div>
</td></tr><tr><td>Woothee<br /><small>v1.2.0</small><br /></td><td>Internet Explorer 6.0</td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td>pc</td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"></td><td></td><td><i class="material-icons">close</i></td><td>0.001</td><td>
<!-- Modal Trigger -->
<a class="modal-trigger btn waves-effect waves-light" href="#modal-f00e7198-0e22-49fe-bad0-dbb3a9cde9b9">Detail</a>
<!-- Modal Structure -->
<div id="modal-f00e7198-0e22-49fe-bad0-dbb3a9cde9b9" class="modal modal-fixed-footer">
<div class="modal-content">
<h4>Woothee result detail</h4>
<p><pre><code class="php">Array
(
[name] => Internet Explorer
[vendor] => Microsoft
[version] => 6.0
[category] => pc
[os] => Windows 98
[os_version] => 98
)
</code></pre></p>
</div>
<div class="modal-footer">
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a>
</div>
</div>
</td></tr><tr><td>Wurfl<br /><small>1.7.1.0</small><br /></td><td>IE 6.0</td><td><i class="material-icons">close</i></td><td>Windows 98 </td><td style="border-left: 1px solid #555"></td><td></td><td>Desktop</td><td></td><td></td><td style="border-left: 1px solid #555"></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td>0.016</td><td>
<!-- Modal Trigger -->
<a class="modal-trigger btn waves-effect waves-light" href="#modal-a2bedf8c-4a95-42a7-96c5-aaf233b2ac50">Detail</a>
<!-- Modal Structure -->
<div id="modal-a2bedf8c-4a95-42a7-96c5-aaf233b2ac50" class="modal modal-fixed-footer">
<div class="modal-content">
<h4>Wurfl result detail</h4>
<p><pre><code class="php">Array
(
[virtual] => Array
(
[is_android] => false
[is_ios] => false
[is_windows_phone] => false
[is_app] => false
[is_full_desktop] => true
[is_largescreen] => true
[is_mobile] => false
[is_robot] => false
[is_smartphone] => false
[is_touchscreen] => false
[is_wml_preferred] => false
[is_xhtmlmp_preferred] => false
[is_html_preferred] => true
[advertised_device_os] => Windows 98
[advertised_device_os_version] =>
[advertised_browser] => IE
[advertised_browser_version] => 6.0
[complete_device_name] => Microsoft Internet Explorer
[device_name] => Microsoft Internet Explorer
[form_factor] => Desktop
[is_phone] => false
[is_app_webview] => false
)
[all] => Array
(
[brand_name] => Microsoft
[model_name] => Internet Explorer
[unique] => true
[ununiqueness_handler] =>
[is_wireless_device] => false
[device_claims_web_support] => true
[has_qwerty_keyboard] => true
[can_skip_aligned_link_row] => true
[uaprof] =>
[uaprof2] =>
[uaprof3] =>
[nokia_series] => 0
[nokia_edition] => 0
[device_os] => Desktop
[mobile_browser] => MSIE
[mobile_browser_version] => 6.0
[device_os_version] =>
[pointing_method] => mouse
[release_date] => 2001_august
[marketing_name] =>
[model_extra_info] =>
[nokia_feature_pack] => 0
[can_assign_phone_number] => false
[is_tablet] => false
[manufacturer_name] =>
[is_bot] => false
[is_google_glass] => false
[proportional_font] => false
[built_in_back_button_support] => false
[card_title_support] => false
[softkey_support] => false
[table_support] => false
[numbered_menus] => false
[menu_with_select_element_recommended] => false
[menu_with_list_of_links_recommended] => false
[icons_on_menu_items_support] => false
[break_list_of_links_with_br_element_recommended] => false
[access_key_support] => false
[wrap_mode_support] => false
[times_square_mode_support] => false
[deck_prefetch_support] => false
[elective_forms_recommended] => false
[wizards_recommended] => false
[image_as_link_support] => false
[insert_br_element_after_widget_recommended] => false
[wml_can_display_images_and_text_on_same_line] => false
[wml_displays_image_in_center] => false
[opwv_wml_extensions_support] => false
[wml_make_phone_call_string] => none
[chtml_display_accesskey] => false
[emoji] => false
[chtml_can_display_images_and_text_on_same_line] => false
[chtml_displays_image_in_center] => false
[imode_region] => none
[chtml_make_phone_call_string] => tel:
[chtml_table_support] => true
[xhtml_honors_bgcolor] => true
[xhtml_supports_forms_in_table] => true
[xhtml_support_wml2_namespace] => false
[xhtml_autoexpand_select] => false
[xhtml_select_as_dropdown] => true
[xhtml_select_as_radiobutton] => true
[xhtml_select_as_popup] => true
[xhtml_display_accesskey] => false
[xhtml_supports_invisible_text] => false
[xhtml_supports_inline_input] => false
[xhtml_supports_monospace_font] => false
[xhtml_supports_table_for_layout] => false
[xhtml_supports_css_cell_table_coloring] => false
[xhtml_format_as_css_property] => false
[xhtml_format_as_attribute] => false
[xhtml_nowrap_mode] => false
[xhtml_marquee_as_css_property] => false
[xhtml_readable_background_color1] => #FFFFFF
[xhtml_readable_background_color2] => #FFFFFF
[xhtml_allows_disabled_form_elements] => false
[xhtml_document_title_support] => true
[xhtml_preferred_charset] => utf8
[opwv_xhtml_extensions_support] => false
[xhtml_make_phone_call_string] => none
[xhtmlmp_preferred_mime_type] => text/html
[xhtml_table_support] => false
[xhtml_send_sms_string] => none
[xhtml_send_mms_string] => none
[xhtml_file_upload] => supported
[cookie_support] => true
[accept_third_party_cookie] => true
[xhtml_supports_iframe] => full
[xhtml_avoid_accesskeys] => true
[xhtml_can_embed_video] => play_and_stop
[ajax_support_javascript] => true
[ajax_manipulate_css] => true
[ajax_support_getelementbyid] => true
[ajax_support_inner_html] => true
[ajax_xhr_type] => standard
[ajax_manipulate_dom] => true
[ajax_support_events] => true
[ajax_support_event_listener] => true
[ajax_preferred_geoloc_api] => none
[xhtml_support_level] => 4
[preferred_markup] => html_web_4_0
[wml_1_1] => false
[wml_1_2] => false
[wml_1_3] => false
[html_wi_w3_xhtmlbasic] => true
[html_wi_oma_xhtmlmp_1_0] => false
[html_wi_imode_html_1] => false
[html_wi_imode_html_2] => false
[html_wi_imode_html_3] => false
[html_wi_imode_html_4] => false
[html_wi_imode_html_5] => false
[html_wi_imode_htmlx_1] => false
[html_wi_imode_htmlx_1_1] => false
[html_wi_imode_compact_generic] => false
[html_web_3_2] => true
[html_web_4_0] => true
[voicexml] => false
[multipart_support] => false
[total_cache_disable_support] => false
[time_to_live_support] => false
[resolution_width] => 800
[resolution_height] => 600
[columns] => 120
[max_image_width] => 800
[max_image_height] => 600
[rows] => 200
[physical_screen_width] => 400
[physical_screen_height] => 400
[dual_orientation] => false
[density_class] => 1.0
[wbmp] => false
[bmp] => true
[epoc_bmp] => false
[gif_animated] => true
[jpg] => true
[png] => true
[tiff] => false
[transparent_png_alpha] => false
[transparent_png_index] => false
[svgt_1_1] => false
[svgt_1_1_plus] => false
[greyscale] => false
[gif] => true
[colors] => 65536
[webp_lossy_support] => false
[webp_lossless_support] => false
[post_method_support] => true
[basic_authentication_support] => true
[empty_option_value_support] => true
[emptyok] => false
[nokia_voice_call] => false
[wta_voice_call] => false
[wta_phonebook] => false
[wta_misc] => false
[wta_pdc] => false
[https_support] => true
[phone_id_provided] => false
[max_data_rate] => 3200
[wifi] => true
[sdio] => false
[vpn] => false
[has_cellular_radio] => false
[max_deck_size] => 100000
[max_url_length_in_requests] => 128
[max_url_length_homepage] => 0
[max_url_length_bookmark] => 0
[max_url_length_cached_page] => 0
[max_no_of_connection_settings] => 0
[max_no_of_bookmarks] => 0
[max_length_of_username] => 0
[max_length_of_password] => 0
[max_object_size] => 0
[downloadfun_support] => false
[directdownload_support] => false
[inline_support] => false
[oma_support] => false
[ringtone] => false
[ringtone_3gpp] => false
[ringtone_midi_monophonic] => false
[ringtone_midi_polyphonic] => false
[ringtone_imelody] => false
[ringtone_digiplug] => false
[ringtone_compactmidi] => false
[ringtone_mmf] => false
[ringtone_rmf] => false
[ringtone_xmf] => false
[ringtone_amr] => false
[ringtone_awb] => false
[ringtone_aac] => false
[ringtone_wav] => false
[ringtone_mp3] => false
[ringtone_spmidi] => false
[ringtone_qcelp] => false
[ringtone_voices] => 1
[ringtone_df_size_limit] => 0
[ringtone_directdownload_size_limit] => 0
[ringtone_inline_size_limit] => 0
[ringtone_oma_size_limit] => 0
[wallpaper] => false
[wallpaper_max_width] => 0
[wallpaper_max_height] => 0
[wallpaper_preferred_width] => 0
[wallpaper_preferred_height] => 0
[wallpaper_resize] => none
[wallpaper_wbmp] => false
[wallpaper_bmp] => false
[wallpaper_gif] => false
[wallpaper_jpg] => false
[wallpaper_png] => false
[wallpaper_tiff] => false
[wallpaper_greyscale] => false
[wallpaper_colors] => 2
[wallpaper_df_size_limit] => 0
[wallpaper_directdownload_size_limit] => 0
[wallpaper_inline_size_limit] => 0
[wallpaper_oma_size_limit] => 0
[screensaver] => false
[screensaver_max_width] => 0
[screensaver_max_height] => 0
[screensaver_preferred_width] => 0
[screensaver_preferred_height] => 0
[screensaver_resize] => none
[screensaver_wbmp] => false
[screensaver_bmp] => false
[screensaver_gif] => false
[screensaver_jpg] => false
[screensaver_png] => false
[screensaver_greyscale] => false
[screensaver_colors] => 2
[screensaver_df_size_limit] => 0
[screensaver_directdownload_size_limit] => 0
[screensaver_inline_size_limit] => 0
[screensaver_oma_size_limit] => 0
[picture] => false
[picture_max_width] => 0
[picture_max_height] => 0
[picture_preferred_width] => 0
[picture_preferred_height] => 0
[picture_resize] => none
[picture_wbmp] => false
[picture_bmp] => false
[picture_gif] => false
[picture_jpg] => false
[picture_png] => false
[picture_greyscale] => false
[picture_colors] => 2
[picture_df_size_limit] => 0
[picture_directdownload_size_limit] => 0
[picture_inline_size_limit] => 0
[picture_oma_size_limit] => 0
[video] => false
[oma_v_1_0_forwardlock] => false
[oma_v_1_0_combined_delivery] => false
[oma_v_1_0_separate_delivery] => false
[streaming_video] => false
[streaming_3gpp] => false
[streaming_mp4] => false
[streaming_mov] => false
[streaming_video_size_limit] => 0
[streaming_real_media] => none
[streaming_flv] => false
[streaming_3g2] => false
[streaming_vcodec_h263_0] => -1
[streaming_vcodec_h263_3] => -1
[streaming_vcodec_mpeg4_sp] => -1
[streaming_vcodec_mpeg4_asp] => -1
[streaming_vcodec_h264_bp] => -1
[streaming_acodec_amr] => none
[streaming_acodec_aac] => none
[streaming_wmv] => none
[streaming_preferred_protocol] => rtsp
[streaming_preferred_http_protocol] => none
[wap_push_support] => false
[connectionless_service_indication] => false
[connectionless_service_load] => false
[connectionless_cache_operation] => false
[connectionoriented_unconfirmed_service_indication] => false
[connectionoriented_unconfirmed_service_load] => false
[connectionoriented_unconfirmed_cache_operation] => false
[connectionoriented_confirmed_service_indication] => false
[connectionoriented_confirmed_service_load] => false
[connectionoriented_confirmed_cache_operation] => false
[utf8_support] => true
[ascii_support] => false
[iso8859_support] => false
[expiration_date] => false
[j2me_cldc_1_0] => false
[j2me_cldc_1_1] => false
[j2me_midp_1_0] => false
[j2me_midp_2_0] => false
[doja_1_0] => false
[doja_1_5] => false
[doja_2_0] => false
[doja_2_1] => false
[doja_2_2] => false
[doja_3_0] => false
[doja_3_5] => false
[doja_4_0] => false
[j2me_jtwi] => false
[j2me_mmapi_1_0] => false
[j2me_mmapi_1_1] => false
[j2me_wmapi_1_0] => false
[j2me_wmapi_1_1] => false
[j2me_wmapi_2_0] => false
[j2me_btapi] => false
[j2me_3dapi] => false
[j2me_locapi] => false
[j2me_nokia_ui] => false
[j2me_motorola_lwt] => false
[j2me_siemens_color_game] => false
[j2me_siemens_extension] => false
[j2me_heap_size] => 0
[j2me_max_jar_size] => 0
[j2me_storage_size] => 0
[j2me_max_record_store_size] => 0
[j2me_screen_width] => 0
[j2me_screen_height] => 0
[j2me_canvas_width] => 0
[j2me_canvas_height] => 0
[j2me_bits_per_pixel] => 0
[j2me_audio_capture_enabled] => false
[j2me_video_capture_enabled] => false
[j2me_photo_capture_enabled] => false
[j2me_capture_image_formats] => none
[j2me_http] => false
[j2me_https] => false
[j2me_socket] => false
[j2me_udp] => false
[j2me_serial] => false
[j2me_gif] => false
[j2me_gif89a] => false
[j2me_jpg] => false
[j2me_png] => false
[j2me_bmp] => false
[j2me_bmp3] => false
[j2me_wbmp] => false
[j2me_midi] => false
[j2me_wav] => false
[j2me_amr] => false
[j2me_mp3] => false
[j2me_mp4] => false
[j2me_imelody] => false
[j2me_rmf] => false
[j2me_au] => false
[j2me_aac] => false
[j2me_realaudio] => false
[j2me_xmf] => false
[j2me_wma] => false
[j2me_3gpp] => false
[j2me_h263] => false
[j2me_svgt] => false
[j2me_mpeg4] => false
[j2me_realvideo] => false
[j2me_real8] => false
[j2me_realmedia] => false
[j2me_left_softkey_code] => 0
[j2me_right_softkey_code] => 0
[j2me_middle_softkey_code] => 0
[j2me_select_key_code] => 0
[j2me_return_key_code] => 0
[j2me_clear_key_code] => 0
[j2me_datefield_no_accepts_null_date] => false
[j2me_datefield_broken] => false
[receiver] => false
[sender] => false
[mms_max_size] => 0
[mms_max_height] => 0
[mms_max_width] => 0
[built_in_recorder] => false
[built_in_camera] => false
[mms_jpeg_baseline] => false
[mms_jpeg_progressive] => false
[mms_gif_static] => false
[mms_gif_animated] => false
[mms_png] => false
[mms_bmp] => false
[mms_wbmp] => false
[mms_amr] => false
[mms_wav] => false
[mms_midi_monophonic] => false
[mms_midi_polyphonic] => false
[mms_midi_polyphonic_voices] => 0
[mms_spmidi] => false
[mms_mmf] => false
[mms_mp3] => false
[mms_evrc] => false
[mms_qcelp] => false
[mms_ota_bitmap] => false
[mms_nokia_wallpaper] => false
[mms_nokia_operatorlogo] => false
[mms_nokia_3dscreensaver] => false
[mms_nokia_ringingtone] => false
[mms_rmf] => false
[mms_xmf] => false
[mms_symbian_install] => false
[mms_jar] => false
[mms_jad] => false
[mms_vcard] => false
[mms_vcalendar] => false
[mms_wml] => false
[mms_wbxml] => false
[mms_wmlc] => false
[mms_video] => false
[mms_mp4] => false
[mms_3gpp] => false
[mms_3gpp2] => false
[mms_max_frame_rate] => 0
[nokiaring] => false
[picturemessage] => false
[operatorlogo] => false
[largeoperatorlogo] => false
[callericon] => false
[nokiavcard] => false
[nokiavcal] => false
[sckl_ringtone] => false
[sckl_operatorlogo] => false
[sckl_groupgraphic] => false
[sckl_vcard] => false
[sckl_vcalendar] => false
[text_imelody] => false
[ems] => false
[ems_variablesizedpictures] => false
[ems_imelody] => false
[ems_odi] => false
[ems_upi] => false
[ems_version] => 0
[siemens_ota] => false
[siemens_logo_width] => 101
[siemens_logo_height] => 29
[siemens_screensaver_width] => 101
[siemens_screensaver_height] => 50
[gprtf] => false
[sagem_v1] => false
[sagem_v2] => false
[panasonic] => false
[sms_enabled] => false
[wav] => false
[mmf] => false
[smf] => false
[mld] => false
[midi_monophonic] => false
[midi_polyphonic] => false
[sp_midi] => false
[rmf] => false
[xmf] => false
[compactmidi] => false
[digiplug] => false
[nokia_ringtone] => false
[imelody] => false
[au] => false
[amr] => false
[awb] => false
[aac] => false
[mp3] => false
[voices] => 1
[qcelp] => false
[evrc] => false
[flash_lite_version] =>
[fl_wallpaper] => false
[fl_screensaver] => false
[fl_standalone] => false
[fl_browser] => false
[fl_sub_lcd] => false
[full_flash_support] => true
[css_supports_width_as_percentage] => true
[css_border_image] => none
[css_rounded_corners] => none
[css_gradient] => none
[css_spriting] => false
[css_gradient_linear] => none
[is_transcoder] => false
[transcoder_ua_header] => user-agent
[rss_support] => false
[pdf_support] => true
[progressive_download] => true
[playback_vcodec_h263_0] => -1
[playback_vcodec_h263_3] => -1
[playback_vcodec_mpeg4_sp] => -1
[playback_vcodec_mpeg4_asp] => -1
[playback_vcodec_h264_bp] => -1
[playback_real_media] => none
[playback_3gpp] => false
[playback_3g2] => false
[playback_mp4] => false
[playback_mov] => false
[playback_acodec_amr] => none
[playback_acodec_aac] => none
[playback_df_size_limit] => 0
[playback_directdownload_size_limit] => 0
[playback_inline_size_limit] => 0
[playback_oma_size_limit] => 0
[playback_acodec_qcelp] => false
[playback_wmv] => none
[hinted_progressive_download] => false
[html_preferred_dtd] => html4
[viewport_supported] => false
[viewport_width] => width_equals_max_image_width
[viewport_userscalable] =>
[viewport_initial_scale] =>
[viewport_maximum_scale] =>
[viewport_minimum_scale] =>
[mobileoptimized] => false
[handheldfriendly] => false
[canvas_support] => none
[image_inlining] => false
[is_smarttv] => false
[is_console] => false
[nfc_support] => false
[ux_full_desktop] => true
[jqm_grade] => A
[is_sencha_touch_ok] => true
)
)
</code></pre></p>
</div>
<div class="modal-footer">
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a>
</div>
</div>
</td></tr><tr><td>Zsxsoft<br /><small>1.3</small><br /></td><td>Tjusig 2.40.164</td><td><i class="material-icons">close</i></td><td>Windows 98</td><td style="border-left: 1px solid #555"></td><td></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td>0</td><td>
<!-- Modal Trigger -->
<a class="modal-trigger btn waves-effect waves-light" href="#modal-5d43e024-b46c-44f6-8914-529b05569bc2">Detail</a>
<!-- Modal Structure -->
<div id="modal-5d43e024-b46c-44f6-8914-529b05569bc2" class="modal modal-fixed-footer">
<div class="modal-content">
<h4>Zsxsoft result detail</h4>
<p><pre><code class="php">Array
(
[browser] => Array
(
[link] => http://www.tjusig.cz/
[title] => Tjusig 2.40.164
[code] => tjusig
[version] => 2.40.164
[name] => Tjusig
[image] => img/16/browser/tjusig.png
)
[os] => Array
(
[link] => http://www.microsoft.com/windows/
[name] => Windows
[version] => 98
[code] => win-1
[x64] =>
[title] => Windows 98
[type] => os
[dir] => os
[image] => img/16/os/win-1.png
)
[device] => Array
(
[link] =>
[title] =>
[model] =>
[brand] =>
[code] => null
[dir] => device
[type] => device
[image] => img/16/device/null.png
)
[platform] => Array
(
[link] => http://www.microsoft.com/windows/
[name] => Windows
[version] => 98
[code] => win-1
[x64] =>
[title] => Windows 98
[type] => os
[dir] => os
[image] => img/16/os/win-1.png
)
)
</code></pre></p>
</div>
<div class="modal-footer">
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a>
</div>
</div>
</td></tr></table>
</div>
<div class="section">
<h1 class="header center orange-text">About this comparison</h1>
<div class="row center">
<h5 class="header light">
The primary goal of this project is simple<br />
I wanted to know which user agent parser is the most accurate in each part - device detection, bot detection and so on...<br />
<br />
The secondary goal is to provide a source for all user agent parsers to improve their detection based on this results.<br />
<br />
You can also improve this further, by suggesting ideas at <a href="https://github.com/ThaDafinser/UserAgentParserComparison">ThaDafinser/UserAgentParserComparison</a><br />
<br />
The comparison is based on the abstraction by <a href="https://github.com/ThaDafinser/UserAgentParser">ThaDafinser/UserAgentParser</a>
</h5>
</div>
</div>
<div class="card">
<div class="card-content">
Comparison created <i>2016-05-10 07:56:31</i> | by
<a href="https://github.com/ThaDafinser">ThaDafinser</a>
</div>
</div>
</div>
<script src="https://code.jquery.com/jquery-2.1.4.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.3/js/materialize.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/list.js/1.2.0/list.min.js"></script>
<script>
$(document).ready(function(){
// the "href" attribute of .modal-trigger must specify the modal ID that wants to be triggered
$('.modal-trigger').leanModal();
});
</script>
</body>
</html> | ThaDafinser/UserAgentParserComparison | v5/user-agent-detail/49/e8/49e82de8-51d9-4ad7-ba18-ba818abe095f.html | HTML | mit | 55,931 |
//
// ViewController.m
// BlockImagePicker
//
// Created by Wipoo Shinsirikul on 4/12/56 BE.
// Copyright (c) 2556 Wipoo Shinsirikul. All rights reserved.
//
/***********************************************************************************
*
* Copyright (c) 2556 Wipoo Shinsirikul
*
* 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.
*
***********************************************************************************
*
* Referencing this project in your AboutBox is appreciated.
* Please tell me if you use this class so we can cross-reference our projects.
*
***********************************************************************************/
#import "ViewController.h"
#import "BlockImagePickerController.h"
@interface ViewController ()
@end
@implementation ViewController
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
}
- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
#pragma mark - Action
- (void)cameraButtonDidSelect:(id)sender
{
void (^finishingBlock)(UIImagePickerController *picker, NSDictionary *info, UIImage *originalImage, UIImage *editedImage) = ^(UIImagePickerController *picker, NSDictionary *info, UIImage *originalImage, UIImage *editedImage)
{
[self.imageView setImage:originalImage];
[picker dismissViewControllerAnimated:YES completion:^{
;
}];
};
void (^cancelingBlock)(UIImagePickerController *picker) = ^(UIImagePickerController *picker)
{
void (^completionBlock)() = ^()
{
};
[picker dismissViewControllerAnimated:YES completion:completionBlock];
};
BlockImagePickerController *blockImagePickerController = [[BlockImagePickerController alloc] initWithCameraSourceType:UIImagePickerControllerSourceTypeCamera
onFinishingBlock:finishingBlock
onCancelingBlock:cancelingBlock];
void (^completionBlock)() = ^()
{
};
[self presentViewController:blockImagePickerController animated:YES completion:completionBlock];
}
- (void)libraryButtonDidSelect:(id)sender
{
void (^finishingBlock)(UIImagePickerController *picker, NSDictionary *info, UIImage *originalImage, UIImage *editedImage) = ^(UIImagePickerController *picker, NSDictionary *info, UIImage *originalImage, UIImage *editedImage)
{
[self.imageView setImage:originalImage];
[picker dismissViewControllerAnimated:YES completion:^{
;
}];
};
void (^cancelingBlock)(UIImagePickerController *picker) = ^(UIImagePickerController *picker)
{
void (^completionBlock)() = ^()
{
};
[picker dismissViewControllerAnimated:YES completion:completionBlock];
};
BlockImagePickerController *blockImagePickerController = [[BlockImagePickerController alloc] initWithCameraSourceType:UIImagePickerControllerSourceTypePhotoLibrary
onFinishingBlock:finishingBlock
onCancelingBlock:cancelingBlock];
void (^completionBlock)() = ^()
{
};
[self presentViewController:blockImagePickerController animated:YES completion:completionBlock];
}
@end
| mylifeasdog/BlockImagePicker | BlockImagePicker/ViewController.m | Matlab | mit | 4,695 |
class EmacsImePatch < Formula
desc "GNU Emacs text editor in IME patch"
homepage "https://www.gnu.org/software/emacs/"
url "https://ftp.gnu.org/gnu/emacs/emacs-26.3.tar.xz"
mirror "https://ftpmirror.gnu.org/emacs/emacs-26.3.tar.xz"
sha256 "4d90e6751ad8967822c6e092db07466b9d383ef1653feb2f95c93e7de66d3485"
patch :p1 do
url "https://gist.githubusercontent.com/takaxp/5294b6c52782d0be0b25342be62e4a77/raw/9c9325288ff03a50ee26e4e32c8ca57c0dd81ace/emacs-25.2-inline-googleime.patch"
sha256 "72a33289b78aaec186c05442e7228554a5339ac3aa2a8ff93449384e9bfa1ebb"
end
head do
url "https://github.com/emacs-mirror/emacs.git"
depends_on "autoconf" => :build
depends_on "gnu-sed" => :build
depends_on "texinfo" => :build
end
depends_on "pkg-config" => :build
depends_on "gnutls"
depends_on "ctags"
def install
ENV.prepend_path "PATH", "/usr/local/bin"
args = %W[
--disable-ns-self-contained
--disable-dependency-tracking
--disable-silent-rules
--enable-locallisppath=#{HOMEBREW_PREFIX}/share/emacs/site-lisp
--infodir=#{info}/emacs
--prefix=#{prefix}
--with-gnutls
--without-x
--with-xml2
--without-dbus
--with-modules
--with-ns
--with-imagemagick
]
if build.head?
ENV.prepend_path "PATH", Formula["gnu-sed"].opt_libexec/"gnubin"
system "./autogen.sh"
end
system "./configure", *args
system "make"
system "make", "install"
prefix.install "nextstep/Emacs.app"
(bin/"emacs").unlink # Kill the existing symlink
(bin/"emacs").write <<~EOS
#!/bin/bash
exec #{prefix}/Emacs.app/Contents/MacOS/Emacs "$@"
EOS
end
plist_options :manual => "emacs"
def plist; <<~EOS
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>KeepAlive</key>
<true/>
<key>Label</key>
<string>#{plist_name}</string>
<key>ProgramArguments</key>
<array>
<string>#{opt_bin}/emacs</string>
<string>--fg-daemon</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
EOS
end
test do
assert_equal "4", shell_output("#{bin}/emacs --batch --eval=\"(print (+ 2 2))\"").strip
end
end
| Alfr0475/homebrew-formula | emacs-ime-patch.rb | Ruby | mit | 2,382 |
---
layout: post
title: "Parsear y validar XML desde java al estilo SAX"
date: 2013-06-01 23:21:59
categories: Java, xml, parsing
---
<h2>
Parsear XML con java</h2>
<p>
De esto se pueden encontrar miles de ejemplos por la red. En mi caso tenía hecho alguno, el problema es que el código era del año 2001. Y sigue funcionando pero tirando de un fichero jar que contiene unas librerías que vete a saber tú. El caso es que he tratado de hacer un ejemplo de esto con material más actualizado tal y como se cuenta en la web oficial de oracle-java (quién lo diría en el 2001). Bueno, al lío:</p>
<p>
Este sería el fichero XML:</p>
<p>
<?xml version="1.0" encoding="UTF-8"?><br />
<!DOCTYPE PROPERTIES SYSTEM "properties.dtd"><br />
<PROPERTIES><br />
<PROPERTY NAME="system_version" >1.0.01 </PROPERTY><br />
<PROPERTY NAME="loglevel" >1</PROPERTY><br />
<PROPERTY NAME="logfile" >Data/log/output.log</PROPERTY><br />
<PROPERTY NAME="multiuser_y_n" >y</PROPERTY><br />
<PROPERTY NAME="server_y_n" >y</PROPERTY><br />
<PROPERTY NAME="language" >en</PROPERTY><br />
<PROPERTY NAME="db_type" >sql</PROPERTY><br />
<PROPERTY NAME="jdbc_driver" >sun.jdbc.odbc.JdbcOdbcDriver</PROPERTY><br />
<PROPERTY NAME="jdbc_url" >jdbc:odbc:pruebas</PROPERTY><br />
<PROPERTY NAME="jdbc_user" ></PROPERTY><br />
<PROPERTY NAME="jdbc_password" ></PROPERTY><br />
<PROPERTY NAME="init.d" >Data/etc/init.d</PROPERTY><br />
</PROPERTIES></p>
<p>
Y como se puede ver debe seguir los dictados de un fichero DTD, que en este caso es muy sencillo y es este:</p>
<p>
<?xml version="1.0" encoding="UTF-8"?><br />
<!-- P. Al. --><br />
<!-- Generic properties file--><br />
<!ELEMENT PROPERTIES (PROPERTY*)><br />
<!ELEMENT PROPERTY (#PCDATA)><br />
<!ATTLIST PROPERTY<br />
NAME CDATA #REQUIRED<br />
></p>
<p>
Como ya sabrás a estas alturas de siglo existen dos formas básicas de leer un fichero XML desde un programa: una es cargando todo el fichero de golpe.</p>
<p>
En este caso he hecho un parser de SAX usando las librerías más simples y menos exóticas posible. Ojo!! para que valida el tema del uso del DTD hay que meter los métodos de error (error, fatalError, warning), porque si no es así no nos empanaremos.</p>
<p>
import java.io.File;<br />
import java.io.IOException;<br />
<br />
import javax.xml.parsers.ParserConfigurationException;<br />
import javax.xml.parsers.SAXParser;<br />
import javax.xml.parsers.SAXParserFactory;<br />
<br />
import org.xml.sax.Attributes;<br />
import org.xml.sax.SAXException;<br />
import org.xml.sax.SAXParseException;<br />
import org.xml.sax.helpers.DefaultHandler;<br />
<br />
/**<br />
* Simple XML parser using SAX.<br />
* SAX is somehow an event-driven parser, instead of loading the whole<br />
* document in some data structure it discovers elements as it reads the<br />
* XML file. In this class we can set validation to control if the document<br />
* follows a DTD or not.<br />
* In many examples you will see that an inner private class is defined as<br />
* a extension of the DefaultHandler. In this implementation I tried to<br />
* develop a simple class.<br />
* ATTENTION! if you want to get DTD validation errors, when you extend the DefaultHandler<br />
* you have to add error, faltalError and warning methods<br />
* @author Pello Altadill<br />
* @greetz keeper of the orthody<br />
*/<br />
public class XMLSAXParser extends DefaultHandler {<br />
<br />
private String filename; // The filename of the XML document<br />
private boolean validation = true; // If we want validation or not<br />
private String element = ""; // The element we are looking for<br />
private boolean found = false; // A flag to control if element is found or not<br />
<br />
/**<br />
* constructor<br />
* @param filename of XML file to be parsed<br />
* @param element we look for<br />
*/<br />
public XMLSAXParser (String filename,String element) {<br />
this.filename = filename;<br />
this.element = element;<br />
}<br />
<br />
/**<br />
* @return the validation<br />
*/<br />
public boolean isValidation() {<br />
return validation;<br />
}<br />
<br />
/**<br />
* @param validation the validation to set<br />
*/<br />
public void setValidation(boolean validation) {<br />
this.validation = validation;<br />
}<br />
<br />
/**<br />
* inits XML parse<br />
*/<br />
public void parse () {<br />
File file = new File(filename);<br />
SAXParserFactory saxParserFactory = SAXParserFactory.newInstance();<br />
saxParserFactory.setValidating(validation);<br />
SAXParser parser;<br />
try {<br />
parser = saxParserFactory.newSAXParser();<br />
// I am the handler. Me, myself and I<br />
DefaultHandler handler = this;<br />
parser.parse(file,handler);<br />
} catch (ParserConfigurationException e) {<br />
System.err.println("ParserConfigurationException" + e);<br />
} catch (SAXException e) {<br />
System.err.println("SAXException: " + e);<br />
} catch (IOException e) {<br />
System.err.println("IOException: " + e);<br />
} catch (Exception e) {<br />
System.err.println("Exception: " + e);<br />
}<br />
<br />
}<br />
<br />
<br />
/**<br />
* handles warning<br />
* @param e SAXParseException<br />
*/<br />
public void warning(SAXParseException e) throws SAXException {<br />
System.out.println("Warning: " + e);<br />
}<br />
<br />
/**<br />
* handles error in document<br />
* @param e SAXParseException<br />
*/<br />
public void error(SAXParseException e) throws SAXException {<br />
System.out.println("Error: " + e);<br />
}<br />
<br />
/**<br />
* handles fatal error in document<br />
* @param e SAXParseException<br />
*/<br />
public void fatalError(SAXParseException e) throws SAXException {<br />
System.out.println("Fatal error: " + e);<br />
}<br />
<br />
/**<br />
* method called when a XML element is found<br />
* @param uri<br />
* @param localName<br />
* @param qName<br />
* @param attributes<br />
*/<br />
public void startElement(String uri, String localName,<br />
String qName, Attributes attributes)<br />
throws SAXException {<br />
// Have we found the element we wanted?<br />
if (qName.equalsIgnoreCase(element)) {<br />
found = true;<br />
}<br />
}<br />
<br />
/**<br />
* Method called when characters inside the element are found<br />
* @param ch[]<br />
* @param start<br />
* @param length<br />
*/<br />
public void characters(char ch[], int start, int length)<br />
throws SAXException {<br />
// Show characters only when we are in the element<br />
// we wanted<br />
if (found) {<br />
System.out.println("ELEMENT found: " + new String(ch, start, length));<br />
found = false;<br />
}<br />
}<br />
<br />
/**<br />
* called when whitespaces are found<br />
*/<br />
public void ignorableWhitespace(char buf[], int offset, int len)<br />
throws SAXException {<br />
//System.out.println("white space, ignore it: " + offset + ": " + len);<br />
}<br />
<br />
/**<br />
* called when parsed document begins<br />
*/<br />
public void startDocument() throws SAXException {<br />
System.out.println("Start of document parsing.");<br />
}<br />
<br />
/**<br />
* called when parsed document ends<br />
*/<br />
public void endDocument() throws SAXException {<br />
System.out.println("End of document parsing");<br />
}<br />
<br />
/**<br />
*<br />
* @param args<br />
*/<br />
public static void main(String args[]) {<br />
XMLSAXParser xmlSaxParser = new XMLSAXParser("properties.xml", "PROPERTY");<br />
xmlSaxParser.parse();<br />
}<br />
}</p>
<p>
</p>
| pxai/pxai.github.io | _posts/2013-06-01-parsear-y-validar-xml-desde-java-al-estilo-sax.html | HTML | mit | 12,525 |
<div class="item">
<h3><a href="http://onestopapp.nola.gov/Redirect.aspx?SearchString={{item.data.RefCode}}">{{item.data.Location}}{{' ('~item.data.Name~') ' if item.data.Name != item.data.Location else ''}}</a> <span class="small">(Ref. Code: {{item.data.RefCode}})<br />
<strong>{{item.displayname}}</strong></span></h3>
<div class="meta">
<p><strong>Docket Number:</strong> {{item.data.DocketNum}}<br />
<strong>Type:</strong> {{item.data.Type}}<br />
<strong>Status:</strong> {{item.data.Status}}<br />
<strong>Supporting Documents Available:</strong> {% if item.data.DocsPublic == 0 %}No{% else %}Yes{% endif %}<br />
{% if item.data.Comment != ' ' %}<strong>Comment:</strong> {{item.data.Comment}}</p>{% else %}</p>{% endif %}
</div>
<div class="detail" >
<h4>Description</h4>
<p>{{item.data.Descr}}</p>
<p><a href="http://noticeme.nola.gov/about#whatnext" target="_blank" >What Happens Now?</a></p>
</div>
</div>
| CityOfNewOrleans/NoticeMe | Backend/bza_hearingresults.html | HTML | mit | 1,185 |
package de.mm.android.longitude.model;
import android.os.Parcel;
import android.os.Parcelable;
/**
* Created by Max on 03.05.2015.
*/
public class SimpleContactData implements Parcelable {
protected int person_id;
protected String email;
protected String name;
public SimpleContactData(int person_id, String email, String name) {
this.person_id = person_id;
this.email = email;
this.name = name;
}
public String getEmail() {
return email;
}
public String getName() {
return name;
}
public int getPerson_id() {
return person_id;
}
@Override
public String toString() {
return "SimpleContactData{" +
"person_id=" + person_id +
", email='" + email + '\'' +
", name='" + name + '\'' +
'}';
}
/* Parcelable */
@Override
public int describeContents() {
return 0;
}
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeInt(person_id);
dest.writeString(email);
dest.writeString(name);
}
public static final Parcelable.Creator<SimpleContactData> CREATOR = new Parcelable.Creator<SimpleContactData>() {
public SimpleContactData createFromParcel(Parcel in) {
return new SimpleContactData(in);
}
public SimpleContactData[] newArray(int size) {
return new SimpleContactData[size];
}
};
protected SimpleContactData(Parcel in) {
person_id = in.readInt();
email = in.readString();
name = in.readString();
}
} | maiktheknife/Scout | app/src/main/java/de/mm/android/longitude/model/SimpleContactData.java | Java | mit | 1,658 |
/*
Copyright (C) 2014 Kano Computing Ltd.
License: http://www.gnu.org/licenses/gpl-2.0.txt GNU General Public License v2
*/
var profanity = require('profanity-util'),
mongoose = require('mongoose');
var flagSchema = new mongoose.Schema({
author: {
type: mongoose.Schema.Types.Mixed,
default: null
},
reason: String
});
function profanityPlugin (schema, options) {
options = options || {};
var flagsToBlacklist = typeof options.maxFlags !== 'undefined' ? options.maxFlags : 3;
if (flagsToBlacklist) {
schema.add({
flags: {
type: [ flagSchema ]
},
blackListed: {
type: Boolean,
default: false
}
});
}
schema.pre('save', function (next) {
var entry = this,
result = profanity.purify(entry._doc, options),
matched = result[1];
matched.forEach(function () {
entry.flags.push({ author: null, reason: 'Inappropriate language' });
});
if (flagsToBlacklist && entry.flags.length >= flagsToBlacklist) {
entry.blackListed = true;
}
next();
});
}
module.exports = profanityPlugin;
| KanoComputing/mongoose-profanity | lib/plugin.js | JavaScript | mit | 1,247 |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// <auto-generated/>
#nullable disable
using System;
using System.Collections.Generic;
using System.Linq;
namespace Azure.Search.Documents.Indexes.Models
{
/// <summary> Matches single or multi-word synonyms in a token stream. This token filter is implemented using Apache Lucene. </summary>
public partial class SynonymTokenFilter : TokenFilter
{
/// <summary> Initializes a new instance of SynonymTokenFilter. </summary>
/// <param name="name"> The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. </param>
/// <param name="synonyms"> A list of synonyms in following one of two formats: 1. incredible, unbelievable, fabulous => amazing - all terms on the left side of => symbol will be replaced with all terms on its right side; 2. incredible, unbelievable, fabulous, amazing - comma separated list of equivalent words. Set the expand option to change how this list is interpreted. </param>
public SynonymTokenFilter(string name, IEnumerable<string> synonyms) : base(name)
{
if (name == null)
{
throw new ArgumentNullException(nameof(name));
}
if (synonyms == null)
{
throw new ArgumentNullException(nameof(synonyms));
}
Synonyms = synonyms.ToArray();
ODataType = "#Microsoft.Azure.Search.SynonymTokenFilter";
}
/// <summary> Initializes a new instance of SynonymTokenFilter. </summary>
/// <param name="oDataType"> Identifies the concrete type of the token filter. </param>
/// <param name="name"> The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. </param>
/// <param name="synonyms"> A list of synonyms in following one of two formats: 1. incredible, unbelievable, fabulous => amazing - all terms on the left side of => symbol will be replaced with all terms on its right side; 2. incredible, unbelievable, fabulous, amazing - comma separated list of equivalent words. Set the expand option to change how this list is interpreted. </param>
/// <param name="ignoreCase"> A value indicating whether to case-fold input for matching. Default is false. </param>
/// <param name="expand"> A value indicating whether all words in the list of synonyms (if => notation is not used) will map to one another. If true, all words in the list of synonyms (if => notation is not used) will map to one another. The following list: incredible, unbelievable, fabulous, amazing is equivalent to: incredible, unbelievable, fabulous, amazing => incredible, unbelievable, fabulous, amazing. If false, the following list: incredible, unbelievable, fabulous, amazing will be equivalent to: incredible, unbelievable, fabulous, amazing => incredible. Default is true. </param>
internal SynonymTokenFilter(string oDataType, string name, IList<string> synonyms, bool? ignoreCase, bool? expand) : base(oDataType, name)
{
Synonyms = synonyms;
IgnoreCase = ignoreCase;
Expand = expand;
ODataType = oDataType ?? "#Microsoft.Azure.Search.SynonymTokenFilter";
}
/// <summary> A list of synonyms in following one of two formats: 1. incredible, unbelievable, fabulous => amazing - all terms on the left side of => symbol will be replaced with all terms on its right side; 2. incredible, unbelievable, fabulous, amazing - comma separated list of equivalent words. Set the expand option to change how this list is interpreted. </summary>
public IList<string> Synonyms { get; set; }
/// <summary> A value indicating whether to case-fold input for matching. Default is false. </summary>
public bool? IgnoreCase { get; set; }
/// <summary> A value indicating whether all words in the list of synonyms (if => notation is not used) will map to one another. If true, all words in the list of synonyms (if => notation is not used) will map to one another. The following list: incredible, unbelievable, fabulous, amazing is equivalent to: incredible, unbelievable, fabulous, amazing => incredible, unbelievable, fabulous, amazing. If false, the following list: incredible, unbelievable, fabulous, amazing will be equivalent to: incredible, unbelievable, fabulous, amazing => incredible. Default is true. </summary>
public bool? Expand { get; set; }
}
}
| hyonholee/azure-sdk-for-net | sdk/search/Azure.Search.Documents/src/Generated/Models/SynonymTokenFilter.cs | C# | mit | 4,785 |
var assert = require('assert');
var httpHelper = require('./helpers/httpHelper.js');
var appHelper = require('./helpers/appHelper');
var path = require('path');
var fs = require('fs');
describe('CORS and CSRF ::', function() {
var appName = 'testApp';
beforeEach(function(done) {
appHelper.lift({
silly: false
}, function(err, sails) {
if (err) {
throw new Error(err);
}
sailsprocess = sails;
sailsprocess.once('hook:http:listening', done);
});
});
afterEach(function(done) {
sailsprocess.kill(done);
});
describe('CORS config ::', function() {
before(function(done) {
this.timeout(5000);
appHelper.build(done);
});
after(function() {
// console.log('before `chdir ../`' + ', cwd was :: ' + process.cwd());
process.chdir('../');
// console.log('after `chdir ../`' + ', cwd was :: ' + process.cwd());
appHelper.teardown();
});
describe('with "allRoutes: true" and origin "*"', function () {
before(function() {
fs.writeFileSync(path.resolve('../', appName, 'config/cors.js'), "module.exports.cors = { 'origin': '*', 'allRoutes': true};");
var routeConfig = {
'GET /test/find': {controller: 'TestController', action: 'find', cors: false},
'GET /test/update': {controller: 'TestController', action: 'update', cors: 'http://www.example.com'},
'GET /test2': {controller: 'TestController', action: 'find', cors: {'exposeHeaders': 'x-custom-header'}},
'PUT /test': {controller: 'TestController', action: 'update', cors: 'http://www.example.com'},
'POST /test': {controller: 'TestController', action: 'create', cors: 'http://www.different.com'},
'DELETE /test': {controller: 'TestController', action: 'delete', cors: false},
'POST /test2': {controller: 'TestController', action: 'create', cors: true},
'OPTIONS /test2': {controller: 'TestController', action: 'index'},
'PUT /test2': {controller: 'TestController', action: 'update'},
'GET /test/patch': {controller: 'TestController', action: 'update', cors: 'http://www.example.com:1338'},
'GET /test/create': {controller: 'TestController', action: 'create', cors: 'http://www.different.com'},
'GET /test/destroy': {controller: 'TestController', action: 'destroy', cors: {origin: 'http://www.example.com', credentials: false}},
};
fs.writeFileSync(path.resolve('../', appName, 'config/routes.js'), "module.exports.routes = " + JSON.stringify(routeConfig));
});
describe('an OPTIONS request with origin "http://www.example.com"', function() {
it('for a PUT route with {cors: http://example.com} and an Access-Control-Request-Method header set to "PUT" should respond with correct Access-Control-Allow-* headers', function(done) {
httpHelper.testRoute('options', {
url: 'test',
headers: {
'Access-Control-Request-Method': 'PUT',
'Origin': 'http://www.example.com'
},
}, function(err, response) {
if (err) return done(new Error(err));
assert.equal(response.statusCode, 200);
assert.equal(response.headers['access-control-allow-origin'], 'http://www.example.com');
assert.equal(response.headers['access-control-allow-methods'], 'put');
assert.equal(response.headers['access-control-allow-headers'], 'content-type');
done();
});
});
it('for a route without a custom OPTIONS handler should use the default Express handler', function(done) {
httpHelper.testRoute('options', {
url: 'test',
}, function(err, response) {
if (err) return done(new Error(err));
body = response.body.split(',').sort().join(',');
assert.equal(response.statusCode, 200);
// Should be a string with some methods in it
assert(response.body.match(/GET/));
assert(response.body.match(/POST/));
assert(response.body.match(/PUT/));
assert(response.body.match(/DELETE/));
assert(response.body.match(/HEAD/));
done();
});
});
it('for a route with a custom OPTIONS handler should use the custom handler', function(done) {
httpHelper.testRoute('options', {
url: 'test2',
}, function(err, response) {
if (err) return done(new Error(err));
assert.equal(response.statusCode, 200);
assert.equal(response.body, "index");
done();
});
});
it('for a POST route with {cors: http://www.different.com} with an Access-Control-Request-Method header set to "POST" should respond with blank Access-Control-Allow-Origin and correct Access-Control-Allow-Method headers', function(done) {
httpHelper.testRoute('options', {
url: 'test',
headers: {
'Access-Control-Request-Method': 'POST',
'Origin': 'http://www.example.com'
},
}, function(err, response) {
if (err) return done(new Error(err));
assert.equal(response.statusCode, 200);
assert.equal(response.headers['access-control-allow-origin'], '');
assert.equal(response.headers['access-control-allow-methods'], 'post');
done();
});
});
it('for a DELETE route with {cors: false} and an Access-Control-Request-Method header set to "DELETE" should respond with correct Access-Control-Allow-Origin and Access-Control-Allow-Method headers', function(done) {
httpHelper.testRoute('options', {
url: 'test',
headers: {
'Access-Control-Request-Method': 'DELETE',
'Origin': 'http://www.example.com'
},
}, function(err, response) {
if (err) return done(new Error(err));
assert.equal(response.statusCode, 200);
assert.equal(response.headers['access-control-allow-origin'], '');
assert.equal(response.headers['access-control-allow-methods'], '');
done();
});
});
it('for a POST route with {cors: true} and an Access-Control-Request-Method header set to "POST" should respond with correct Access-Control-Allow-Origin and Access-Control-Allow-Method headers', function(done) {
httpHelper.testRoute('options', {
url: 'test2',
headers: {
'Access-Control-Request-Method': 'POST',
'Origin': 'http://www.example.com'
},
}, function(err, response) {
if (err) return done(new Error(err));
assert.equal(response.statusCode, 200);
assert.equal(response.headers['access-control-allow-origin'], 'http://www.example.com');
assert.equal(response.headers['access-control-allow-methods'].toLowerCase(), 'get, post, put, delete, options, head');
done();
});
});
it('for a PUT route with no CORS settings and an Access-Control-Request-Method header set to "PUT" should respond with correct Access-Control-Allow-Origin and Access-Control-Allow-Method headers', function(done) {
httpHelper.testRoute('options', {
url: 'test2',
headers: {
'Access-Control-Request-Method': 'PUT',
'Origin': 'http://www.example.com'
},
}, function(err, response) {
if (err) return done(new Error(err));
assert.equal(response.statusCode, 200);
assert.equal(response.headers['access-control-allow-origin'], 'http://www.example.com');
assert.equal(response.headers['access-control-allow-methods'].toLowerCase(), 'get, post, put, delete, options, head');
done();
});
});
});
describe('a GET request with origin "http://www.example.com"', function() {
it('to a route without a CORS config should result in a 200 response with a correct Access-Control-Allow-Origin and Access-Control-Expose-Headers header', function(done) {
httpHelper.testRoute('get', {
url: 'test',
headers: {
'Origin': 'http://www.example.com'
},
}, function(err, response) {
if (err) return done(new Error(err));
assert.equal(response.statusCode, 200);
assert.equal(response.headers['access-control-allow-origin'], 'http://www.example.com');
assert.equal(response.headers['access-control-expose-headers'], '');
done();
});
});
it('to a route with "exposeHeaders" configured should result in a 200 response with a correct Access-Control-Allow-Origin and Access-Control-Expose-Headers header', function(done) {
httpHelper.testRoute('get', {
url: 'test2',
headers: {
'Origin': 'http://www.example.com'
},
}, function(err, response) {
if (err) return done(new Error(err));
assert.equal(response.statusCode, 200);
assert.equal(response.headers['access-control-allow-origin'], 'http://www.example.com');
assert.equal(response.headers['access-control-expose-headers'], 'x-custom-header');
done();
});
});
it('to a route configured with {cors: false} should result in a 200 response with an empty Access-Control-Allow-Origin header', function(done) {
httpHelper.testRoute('get', {
url: 'test/find',
headers: {
'Origin': 'http://www.example.com'
},
}, function(err, response) {
if (err) return done(new Error(err));
assert.equal(response.statusCode, 200);
assert.equal(response.headers['access-control-allow-origin'], '');
done();
});
});
it('to a route with config {cors: "http://www.example.com"} should result in a 200 response with a correct Access-Control-Allow-Origin header', function(done) {
httpHelper.testRoute('get', {
url: 'test/update',
headers: {
'Origin': 'http://www.example.com'
},
}, function(err, response) {
if (err) return done(new Error(err));
assert.equal(response.statusCode, 200);
assert.equal(response.headers['access-control-allow-origin'], 'http://www.example.com');
done();
});
});
it('to a route with config {cors: "http://www.example.com:1338"} should result in a 200 response with an empty Access-Control-Allow-Origin header', function(done) {
httpHelper.testRoute('get', {
url: 'test/patch',
headers: {
'Origin': 'http://www.example.com'
},
}, function(err, response) {
if (err) return done(new Error(err));
assert.equal(response.statusCode, 200);
assert.equal(response.headers['access-control-allow-origin'], '');
done();
});
});
it('to a route with config {cors: {origin: "http://www.example.com"}} should result in a 200 response with a correct Access-Control-Allow-Origin header', function(done) {
httpHelper.testRoute('get', {
url: 'test/destroy',
headers: {
'Origin': 'http://www.example.com'
},
}, function(err, response) {
if (err) return done(new Error(err));
assert.equal(response.statusCode, 200);
assert.equal(response.headers['access-control-allow-origin'], 'http://www.example.com');
done();
});
});
it('to a route with config {cors: "http://www.different.com"} should result in a 200 response with an empty Access-Control-Allow-Origin header', function(done) {
httpHelper.testRoute('get', {
url: 'test/create',
headers: {
'Origin': 'http://www.example.com'
},
}, function(err, response) {
if (err) return done(new Error(err));
assert.equal(response.statusCode, 200);
assert.equal(response.headers['access-control-allow-origin'], '');
done();
});
});
});
describe('a request with origin "http://www.example.com:1338"', function() {
it('to a route with config {cors: "http://www.example.com:1338"} should result in a 200 response with a correct Access-Control-Allow-Origin header', function(done) {
httpHelper.testRoute('get', {
url: 'test/patch',
headers: {
'Origin': 'http://www.example.com:1338'
},
}, function(err, response) {
if (err) return done(new Error(err));
assert.equal(response.statusCode, 200);
assert.equal(response.headers['access-control-allow-origin'], 'http://www.example.com:1338');
done();
});
});
it('to a route with config {cors: "http://www.example.com"} should result in a 200 response with an empty Access-Control-Allow-Origin header', function(done) {
httpHelper.testRoute('get', {
url: 'test/update',
headers: {
'Origin': 'http://www.example.com:1338'
},
}, function(err, response) {
if (err) return done(new Error(err));
assert.equal(response.statusCode, 200);
assert.equal(response.headers['access-control-allow-origin'], '');
done();
});
});
});
describe('a request with the same origin as the server (http://localhost:1342)"', function() {
it('to a route with config {cors: "http://www.example.com:1338"} should result in a 200 response with an empty Access-Control-Allow-Origin header', function(done) {
httpHelper.testRoute('get', {
url: 'test/patch',
headers: {
'Origin': 'http://localhost:1342'
},
}, function(err, response) {
if (err) return done(new Error(err));
assert.equal(response.statusCode, 200);
assert.equal(response.headers['access-control-allow-origin'], '');
done();
});
});
it('to a route with config {cors: "http://www.example.com"} should result in a 200 response with an empty Access-Control-Allow-Origin header', function(done) {
httpHelper.testRoute('get', {
url: 'test/update',
headers: {
'Origin': 'http://localhost:1342'
},
}, function(err, response) {
if (err) return done(new Error(err));
assert.equal(response.statusCode, 200);
assert.equal(response.headers['access-control-allow-origin'], '');
done();
});
});
});
});
describe('with "allRoutes: false" and origin "*"', function () {
before(function() {
fs.writeFileSync(path.resolve('../', appName, 'config/cors.js'), "module.exports.cors = { 'origin': '*', 'allRoutes': false };");
var routeConfig = {
'GET /test/find': {controller: 'TestController', action: 'find', cors: true},
'GET /test/update': {controller: 'TestController', action: 'update', cors: 'http://www.example.com'},
'GET /test/create': {controller: 'TestController', action: 'create', cors: 'http://www.different.com'},
'GET /test/destroy': {controller: 'TestController', action: 'destroy', cors: {origin: 'http://www.example.com'}}
};
fs.writeFileSync(path.resolve('../', appName, 'config/routes.js'), "module.exports.routes = " + JSON.stringify(routeConfig));
});
describe('a request with origin "http://www.example.com"', function() {
it('to a route with no CORS should result in a 200 response with a blank Access-Control-Allow-Origin header', function(done) {
httpHelper.testRoute('get', {
url: 'test',
headers: {
'Origin': 'http://www.example.com'
},
}, function(err, response) {
if (err) return done(new Error(err));
assert.equal(response.statusCode, 200);
assert.equal(response.headers['access-control-allow-origin'], '');
done();
});
});
it('to a route with {cors: true} should result in a 200 response and a correct Access-Control-Allow-Origin header', function(done) {
httpHelper.testRoute('get', {
url: 'test/find',
headers: {
'Origin': 'http://www.example.com'
},
}, function(err, response) {
if (err) return done(new Error(err));
assert.equal(response.statusCode, 200);
assert.equal(response.headers['access-control-allow-origin'], 'http://www.example.com');
done();
});
});
it('to a route with config {cors: "http://www.example.com"} should result in a 200 response with a correct Access-Control-Allow-Origin header', function(done) {
httpHelper.testRoute('get', {
url: 'test/update',
headers: {
'Origin': 'http://www.example.com'
},
}, function(err, response) {
if (err) return done(new Error(err));
assert.equal(response.statusCode, 200);
assert.equal(response.headers['access-control-allow-origin'], 'http://www.example.com');
done();
});
});
it('to a route with config {cors: {origin: "http://www.example.com"}} should result in a 200 response with a correct Access-Control-Allow-Origin header', function(done) {
httpHelper.testRoute('get', {
url: 'test/destroy',
headers: {
'Origin': 'http://www.example.com'
},
}, function(err, response) {
if (err) return done(new Error(err));
assert.equal(response.statusCode, 200);
assert.equal(response.headers['access-control-allow-origin'], 'http://www.example.com');
done();
});
});
it('to a route with config {cors: "http://www.different.com"} should result in a 200 response with an empty Access-Control-Allow-Origin header', function(done) {
httpHelper.testRoute('get', {
url: 'test/create',
headers: {
'Origin': 'http://www.example.com'
},
}, function(err, response) {
if (err) return done(new Error(err));
assert.equal(response.statusCode, 200);
assert.equal(response.headers['access-control-allow-origin'], '');
done();
});
});
});
it('a request with no origin header to a route with no CORS should return successfully', function(done) {
httpHelper.testRoute('get', {
url: 'test',
}, function(err, response) {
if (err) return done(new Error(err));
assert.equal(response.statusCode, 200);
done();
});
});
it('a request with a non-http origin header to a route with no CORS should return successfully', function(done) {
httpHelper.testRoute('get', {
url: 'test',
headers: {
'Origin': 'chrome-extension://abc123'
},
}, function(err, response) {
if (err) return done(new Error(err));
assert.equal(response.statusCode, 200);
done();
});
});
});
describe('with "allRoutes: true" and origin "http://www.example.com", a request', function () {
before(function() {
fs.writeFileSync(path.resolve('../', appName, 'config/cors.js'), "module.exports.cors = { 'origin': 'http://www.example.com', 'allRoutes': true };");
var routeConfig = {
'GET /test/find': {controller: 'TestController', action: 'find', cors: false},
'GET /test/update': {controller: 'TestController', action: 'update', cors: 'http://www.example.com'},
'GET /test/create': {controller: 'TestController', action: 'create', cors: 'http://www.different.com'},
'GET /test/destroy': {controller: 'TestController', action: 'destroy', cors: {origin: 'http://www.example.com'}}
};
fs.writeFileSync(path.resolve('../', appName, 'config/routes.js'), "module.exports.routes = " + JSON.stringify(routeConfig));
});
describe('with origin "http://www.example.com"', function() {
it('to a route without a CORS config should result in a 200 response with a correct Access-Control-Allow-Origin header', function(done) {
httpHelper.testRoute('get', {
url: 'test',
headers: {
'Origin': 'http://www.example.com'
},
}, function(err, response) {
if (err) return done(new Error(err));
assert.equal(response.statusCode, 200);
assert.equal(response.headers['access-control-allow-origin'], 'http://www.example.com');
done();
});
});
it('to a route configured with {cors: false} should result in a 200 response with an empty Access-Control-Allow-Origin header', function(done) {
httpHelper.testRoute('get', {
url: 'test/find',
headers: {
'Origin': 'http://www.example.com'
},
}, function(err, response) {
if (err) return done(new Error(err));
assert.equal(response.statusCode, 200);
assert.equal(response.headers['access-control-allow-origin'], '');
done();
});
});
it('to a route with config {cors: "http://www.example.com"} should result in a 200 response with a correct Access-Control-Allow-Origin header', function(done) {
httpHelper.testRoute('get', {
url: 'test/update',
headers: {
'Origin': 'http://www.example.com'
},
}, function(err, response) {
if (err) return done(new Error(err));
assert.equal(response.statusCode, 200);
assert.equal(response.headers['access-control-allow-origin'], 'http://www.example.com');
done();
});
});
it('to a route with config {cors: "http://www.different.com"} should result in a 200 response with an empty Access-Control-Allow-Origin header', function(done) {
httpHelper.testRoute('get', {
url: 'test/create',
headers: {
'Origin': 'http://www.example.com'
},
}, function(err, response) {
if (err) return done(new Error(err));
assert.equal(response.statusCode, 200);
assert.equal(response.headers['access-control-allow-origin'], '');
done();
});
});
});
describe('with origin "http://www.different.com"', function() {
it('to a route without a CORS config should result in a 200 response with an empty Access-Control-Allow-Origin header', function(done) {
httpHelper.testRoute('get', {
url: 'test',
headers: {
'Origin': 'http://www.different.com'
},
}, function(err, response) {
if (err) return done(new Error(err));
assert.equal(response.statusCode, 200);
assert.equal(response.headers['access-control-allow-origin'], '');
done();
});
});
it('to a route with config {cors: "http://www.different.com"} should result in a 200 response with a correct Access-Control-Allow-Origin header', function(done) {
httpHelper.testRoute('get', {
url: 'test/create',
headers: {
'Origin': 'http://www.different.com'
},
}, function(err, response) {
if (err) return done(new Error(err));
assert.equal(response.statusCode, 200);
assert.equal(response.headers['access-control-allow-origin'], 'http://www.different.com');
done();
});
});
it('to a route with config {cors: {origin: "http://www.example.com"}} should result in a 200 response with an empty Access-Control-Allow-Origin header', function(done) {
httpHelper.testRoute('get', {
url: 'test/destroy',
headers: {
'Origin': 'http://www.different.com'
},
}, function(err, response) {
if (err) return done(new Error(err));
assert.equal(response.statusCode, 200);
assert.equal(response.headers['access-control-allow-origin'], '');
done();
});
});
});
});
describe('with "credentials: true", a request', function() {
before(function() {
fs.writeFileSync(path.resolve('../', appName, 'config/cors.js'), "module.exports.cors = { 'origin': '*', 'allRoutes': true, 'credentials': true};");
var routeConfig = {
'GET /test/destroy': {controller: 'TestController', action: 'destroy', cors: {origin: 'http://www.example.com', credentials: false}}
};
fs.writeFileSync(path.resolve('../', appName, 'config/routes.js'), "module.exports.routes = " + JSON.stringify(routeConfig));
});
it('to a route without a CORS config should result in a 200 response with an Access-Control-Allow-Credentials header with value "true"', function(done) {
httpHelper.testRoute('get', {
url: 'test',
headers: {
'Origin': 'http://www.example.com'
},
}, function(err, response) {
if (err) return done(new Error(err));
assert.equal(response.statusCode, 200);
assert.equal(response.headers['access-control-allow-credentials'], 'true');
done();
});
});
it('to a route with {cors: {credentials: false}} should result in a 200 response with an Access-Control-Allow-Credentials header with value "false"', function(done) {
httpHelper.testRoute('get', {
url: 'test/destroy',
headers: {
'Origin': 'http://www.example.com'
},
}, function(err, response) {
if (err) return done(new Error(err));
assert.equal(response.statusCode, 200);
assert.equal(response.headers['access-control-allow-credentials'], 'false');
done();
});
});
});
describe('with "credentials: false", a request', function() {
before(function() {
fs.writeFileSync(path.resolve('../', appName, 'config/cors.js'), "module.exports.cors = { 'origin': '*', 'allRoutes': true, 'credentials': false};");
var routeConfig = {
'GET /test/destroy': {controller: 'TestController', action: 'destroy', cors: {origin: 'http://www.example.com', credentials: true}}
};
fs.writeFileSync(path.resolve('../', appName, 'config/routes.js'), "module.exports.routes = " + JSON.stringify(routeConfig));
});
it('to a route without a CORS config should result in a 200 response with an Access-Control-Allow-Credentials header with value "false"', function(done) {
httpHelper.testRoute('get', {
url: 'test',
headers: {
'Origin': 'http://www.example.com'
},
}, function(err, response) {
if (err) return done(new Error(err));
assert.equal(response.statusCode, 200);
assert.equal(response.headers['access-control-allow-credentials'], 'false');
done();
});
});
it('to a route with {cors: {credentials: true}} should result in a 200 response with an Access-Control-Allow-Credentials header with value "true"', function(done) {
httpHelper.testRoute('get', {
url: 'test/destroy',
headers: {
'Origin': 'http://www.example.com'
},
}, function(err, response) {
if (err) return done(new Error(err));
assert.equal(response.statusCode, 200);
assert.equal(response.headers['access-control-allow-credentials'], 'true');
done();
});
});
});
});
describe("CSRF config ::", function () {
before(function(done) {
this.timeout(5000);
appHelper.build(done);
});
after(function() {
// console.log('before `chdir ../`' + ', cwd was :: ' + process.cwd());
process.chdir('../');
// console.log('after `chdir ../`' + ', cwd was :: ' + process.cwd());
appHelper.teardown();
});
describe("with CSRF set to 'false'", function() {
it("no CSRF token should be present in view locals", function(done) {
httpHelper.testRoute("get", 'viewtest/csrf', function (err, response) {
if (err) return done(new Error(err));
assert(response.body.indexOf('csrf=null') !== -1, response.body);
done();
});
});
it("a request to /csrfToken should result in a 404 error", function(done) {
httpHelper.testRoute("get", '/csrfToken', function (err, response) {
if (err) return done(new Error(err));
assert(response.statusCode == 404);
done();
});
});
});
describe("with CSRF set to 'true'", function() {
before(function() {
fs.writeFileSync(path.resolve('../', appName, 'config/csrf.js'), "module.exports.csrf = true;");
});
it("a CSRF token should be present in view locals", function(done) {
httpHelper.testRoute("get", 'viewtest/csrf', function (err, response) {
if (err) return done(new Error(err));
assert(response.body.match(/csrf=.{36}(?!.)/), response.body);
done();
});
});
it("a request to /csrfToken should respond with a _csrf token", function(done) {
httpHelper.testRoute("get", 'csrftoken', function (err, response) {
if (err) return done(new Error(err));
try {
var body = JSON.parse(response.body);
assert(body._csrf, response.body);
done();
} catch (e) {
done(new Error('Unexpected response: '+response.body));
}
});
});
it("a POST request without a CSRF token should result in a 403 response", function (done) {
httpHelper.testRoute("post", 'user', function (err, response) {
if (err) return done(new Error(err));
assert.equal(response.statusCode, 403);
done();
});
});
it("a POST request with a valid CSRF token should result in a 201 response", function (done) {
httpHelper.testRoute("get", 'csrftoken', function (err, response) {
if (err) return done(new Error(err));
try {
var body = JSON.parse(response.body);
var sid = response.headers['set-cookie'][0].split(';')[0].substr(10);
httpHelper.testRoute("post", {
url: 'user',
headers: {
'Content-type': 'application/json',
'cookie': 'sails.sid='+sid
},
body: '{"_csrf":"'+body._csrf+'"}'
}, function (err, response) {
if (err) return done(new Error(err));
assert.equal(response.statusCode, 201);
done();
});
} catch (e) {
done(e);
}
});
});
});
describe("with CSRF set to {route: '/anotherCsrf'}", function() {
before(function() {
fs.writeFileSync(path.resolve('../', appName, 'config/csrf.js'), "module.exports.csrf = {route: '/anotherCsrf'};");
});
it("a request to /csrfToken should respond with a 404", function(done) {
httpHelper.testRoute("get", 'csrftoken', function (err, response) {
if (err) return done(new Error(err));
assert.equal(response.statusCode, 404);
done();
});
});
it("a request to /anotherCsrf should respond with a _csrf token", function(done) {
httpHelper.testRoute("get", 'anotherCsrf', function (err, response) {
if (err) return done(new Error(err));
try {
var body = JSON.parse(response.body);
assert(body._csrf, response.body);
done();
} catch (e) {
done(new Error('Unexpected response: '+response.body));
}
});
});
it("a POST request without a CSRF token should result in a 403 response", function (done) {
httpHelper.testRoute("post", 'user', function (err, response) {
if (err) return done(new Error(err));
assert.equal(response.statusCode, 403);
done();
});
});
it("a POST request with a valid CSRF token should result in a 201 response", function (done) {
httpHelper.testRoute("get", 'anotherCsrf', function (err, response) {
if (err) return done(new Error(err));
try {
var body = JSON.parse(response.body);
var sid = response.headers['set-cookie'][0].split(';')[0].substr(10);
httpHelper.testRoute("post", {
url: 'user',
headers: {
'Content-type': 'application/json',
'cookie': 'sails.sid='+sid
},
body: '{"_csrf":"'+body._csrf+'"}'
}, function (err, response) {
if (err) return done(new Error(err));
assert.equal(response.statusCode, 201);
done();
});
} catch (e) {
done(e);
}
});
});
});
describe("with CSRF set to {protectionEnabled: true, grantTokenViaAjax: false}", function() {
before(function() {
fs.writeFileSync(path.resolve('../', appName, 'config/csrf.js'), "module.exports.csrf = {protectionEnabled: true, grantTokenViaAjax: false};");
});
it("a request to /csrfToken should respond with a 404", function(done) {
httpHelper.testRoute("get", 'csrftoken', function (err, response) {
if (err) return done(new Error(err));
assert.equal(response.statusCode, 404);
done();
});
});
});
describe("with CSRF set to {protectionEnabled: true, routesDisabled: '/foo, /user'}", function() {
before(function() {
fs.writeFileSync(path.resolve('../', appName, 'config/csrf.js'), "module.exports.csrf = {protectionEnabled: true, routesDisabled: '/user'};");
});
it("a POST request on /user without a CSRF token should result in a 201 response", function (done) {
httpHelper.testRoute("post", 'user', function (err, response) {
if (err) return done(new Error(err));
assert.equal(response.statusCode, 201);
done();
});
});
it("a POST request on /test without a CSRF token should result in a 403 response", function (done) {
httpHelper.testRoute("post", 'test', function (err, response) {
if (err) return done(new Error(err));
assert.equal(response.statusCode, 403);
done();
});
});
});
});
describe("CORS+CSRF ::", function () {
before(function(done) {
this.timeout(5000);
appHelper.build(function() {
// Add a CORS config that should be IGNORED by the CSRF hook, which does its own CORS handling
// If this isn't being ignored properly, then errors should occur when requesting /csrfToken from a different origin
fs.writeFileSync(path.resolve('../', appName, 'config/cors.js'), "module.exports.cors = { 'origin': 'http://www.example.com,http://www.someplace.com,http://www.different.com', 'allRoutes': true, 'credentials': false};");
done();
});
});
after(function() {
// console.log('before `chdir ../`' + ', cwd was :: ' + process.cwd());
process.chdir('../');
// console.log('after `chdir ../`' + ', cwd was :: ' + process.cwd());
appHelper.teardown();
});
describe("with CSRF set to true (no origin set)", function() {
before(function() {
fs.writeFileSync(path.resolve('../', appName, 'config/csrf.js'), "module.exports.csrf = true;");
});
it("a request to /csrfToken should result in a 200 response and a null token", function(done) {
httpHelper.testRoute("get", {
url: 'csrfToken',
headers: {
origin: "http://www.example.com"
}
}, function (err, response) {
if (err) return done(new Error(err));
assert(response.statusCode == 200);
assert(JSON.parse(response.body)._csrf === null, response.body);
done();
});
});
});
describe("with CSRF set to {origin: 'http://www.example.com,http://www.someplace.com', credentials: false}", function() {
before(function() {
fs.writeFileSync(path.resolve('../', appName, 'config/cors.js'), "module.exports.cors = { 'origin': '*', 'allRoutes': false, 'credentials': false};");
fs.writeFileSync(path.resolve('../', appName, 'config/csrf.js'), "module.exports.csrf = {origin: ' http://www.example.com, http://www.someplace.com '};");
fs.writeFileSync(path.resolve('../', appName, 'config/routes.js'), "module.exports.routes = {\"/viewtest/csrf\":{\"cors\":true}}");
});
describe("when the request origin header is 'http://www.example.com'", function() {
it("a CSRF token should be present in view locals", function(done) {
httpHelper.testRoute("get", {
url: 'viewtest/csrf',
headers: {
origin: "http://www.someplace.com"
}
}, function (err, response) {
if (err) return done(new Error(err));
assert(response.body.match(/csrf=.{36}(?!.)/));
done();
});
});
it("a request to /csrfToken should respond with a _csrf token", function(done) {
httpHelper.testRoute("get", {
url: 'csrfToken',
headers: {
origin: "http://www.example.com"
}
}, function (err, response) {
if (err) return done(new Error(err));
assert.equal(response.headers['access-control-allow-origin'], 'http://www.example.com');
assert.equal(response.headers['access-control-allow-credentials'], 'true');
try {
var body = JSON.parse(response.body);
assert(body._csrf, response.body);
done();
} catch (e) {
done(new Error('Unexpected response: '+response.body));
}
});
});
});
describe("when the request origin header is 'http://www.someplace.com'", function() {
it("a CSRF token should be present in view locals", function(done) {
httpHelper.testRoute("get", {
url: 'viewtest/csrf',
headers: {
origin: "http://www.someplace.com"
}
}, function (err, response) {
if (err) return done(new Error(err));
assert(response.body.match(/csrf=.{36}(?!.)/));
done();
});
});
it("a request to /csrfToken should respond with a _csrf token", function(done) {
httpHelper.testRoute("get", {
url: 'csrfToken',
headers: {
origin: "http://www.someplace.com"
}
}, function (err, response) {
if (err) return done(new Error(err));
assert.equal(response.headers['access-control-allow-origin'], 'http://www.someplace.com');
try {
var body = JSON.parse(response.body);
assert(body._csrf, response.body);
done();
} catch (e) {
done(new Error('Unexpected response: '+response.body));
}
});
});
});
describe("when the request origin header is 'http://www.different.com'", function() {
it("no CSRF token should be present in view locals", function(done) {
httpHelper.testRoute("get", {
url: 'viewtest/csrf',
headers: {
origin: "http://www.different.com"
}
}, function (err, response) {
if (err) return done(new Error(err));
assert(response.body.indexOf('csrf=null') !== -1, response.body);
done();
});
});
it("a request to /csrfToken should result in a 200 response and a null token", function(done) {
httpHelper.testRoute("get", {
url: 'csrfToken',
headers: {
origin: "http://www.different.com"
}
}, function (err, response) {
if (err) return done(new Error(err));
assert(JSON.parse(response.body)._csrf === null, response.body);
assert(response.statusCode == 200);
done();
});
});
});
describe("when the request origin header is 'chrome-extension://postman'", function() {
it("a CSRF token should be present in view locals", function(done) {
httpHelper.testRoute("get", {
url: 'viewtest/csrf',
headers: {
origin: "chrome-extension://postman"
}
}, function (err, response) {
if (err) return done(new Error(err));
assert(response.body.match(/csrf=.{36}(?!.)/));
done();
});
});
it("a request to /csrfToken should respond with a _csrf token", function(done) {
httpHelper.testRoute("get", {
url: 'csrfToken',
headers: {
origin: "chrome-extension://postman"
}
}, function (err, response) {
if (err) return done(new Error(err));
try {
var body = JSON.parse(response.body);
assert(body._csrf, response.body);
done();
} catch (e) {
done(new Error('Unexpected response: '+response.body));
}
});
});
});
describe("when the request is from the same origin (http://localhost:1342)", function() {
it("a CSRF token should be present in view locals", function(done) {
httpHelper.testRoute("get", {
url: 'viewtest/csrf',
headers: {
origin: "http://localhost:1342"
}
}, function (err, response) {
if (err) return done(new Error(err));
assert(response.body.match(/csrf=.{36}(?!.)/));
done();
});
});
it("a request to /csrfToken should respond with a _csrf token", function(done) {
httpHelper.testRoute("get", {
url: 'csrfToken',
headers: {
origin: "http://localhost:1342"
}
}, function (err, response) {
if (err) return done(new Error(err));
try {
var body = JSON.parse(response.body);
assert(body._csrf, response.body);
done();
} catch (e) {
done(new Error('Unexpected response: '+response.body));
}
});
});
});
});
});
});
| erkstruwe/sails | test/integration/hook.cors_csrf.test.js | JavaScript | mit | 44,011 |
//
// RootViewController.m
// IanScrollView
//
// Created by ian on 15/3/6.
// Copyright (c) 2015年 ian. All rights reserved.
//
#import "RootViewController.h"
#import "IanScrollView.h"
@interface RootViewController ()
@end
@implementation RootViewController
- (void)viewDidLoad {
[super viewDidLoad];
IanScrollView *scrollView = [[IanScrollView alloc] initWithFrame:CGRectMake(0, 20, self.view.frame.size.width, 130)];
NSMutableArray *array = [NSMutableArray array];
for (NSInteger i = 1; i < 7; i ++) {
[array addObject:[NSString stringWithFormat:@"http://childmusic.qiniudn.com/huandeng/%ld.png", (long)i]];
}
scrollView.slideImagesArray = array;
scrollView.ianEcrollViewSelectAction = ^(NSInteger i){
NSLog(@"点击了%ld张图片",(long)i);
};
scrollView.ianCurrentIndex = ^(NSInteger index){
NSLog(@"测试一下:%ld",(long)index);
};
scrollView.PageControlPageIndicatorTintColor = [UIColor colorWithRed:255/255.0f green:244/255.0f blue:227/255.0f alpha:1];
scrollView.pageControlCurrentPageIndicatorTintColor = [UIColor colorWithRed:67/255.0f green:174/255.0f blue:168/255.0f alpha:1];
scrollView.autoTime = [NSNumber numberWithFloat:4.0f];
NSLog(@"%@",scrollView.slideImagesArray);
[scrollView startLoading];
[self.view addSubview:scrollView];
// Do any additional setup after loading the view.
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
/*
#pragma mark - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
// Get the new view controller using [segue destinationViewController].
// Pass the selected object to the new view controller.
}
*/
@end
| ianisme/IanScrollView | IanScrollView/RootViewController.m | Matlab | mit | 1,905 |
///<reference path="../typings/tsd.d.ts"/>
import express = require('express');
import mongoose = require('mongoose');
import bodyParser = require('body-parser');
import AirportController = require('./controllers/airport_controller');
import ConnectionController = require('./controllers/connection_controller');
import SeedController = require('./controllers/seed_controller');
import config = require('./config');
/* APP */
var app = express();
app.use(bodyParser.urlencoded( {extended: false} ));
app.use(bodyParser.json());
app.use(logRequestMiddleware);
app.use('/airport', AirportController.router);
app.use('/connect', ConnectionController.router);
app.use('/seed', SeedController.router);
/* DB */
var env = process.env.NODE_ENV || 'dev';
var dbName = config.envs[env].db;
mongoose.connect(dbName, function(err: any) {
err ?
console.error("Connecting to %s => %s", dbName, err.toString()) :
console.info("Connected to %s", dbName);
});
/* SERVER */
var server = app.listen(3000, function() {
console.info('App listening at port %s', server.address().port);
});
/* aux */
function logRequestMiddleware(req: express.Request, res: express.Response, next: Function) {
console.info("%s at: %s", req.method, req.path);
console.info(" Headers: %s", JSON.stringify(req.headers));
console.info(" Body: %s", JSON.stringify(req.body));
res.type('json');
next();
};
| manutero/tripping-octo-ironman | src/app.ts | TypeScript | mit | 1,415 |
#include "sendcoinsdialog.h"
#include "ui_sendcoinsdialog.h"
#include "init.h"
#include "walletmodel.h"
#include "addresstablemodel.h"
#include "bitcoinunits.h"
#include "addressbookpage.h"
#include "optionsmodel.h"
#include "sendcoinsentry.h"
#include "guiutil.h"
#include "askpassphrasedialog.h"
#include "coincontrol.h"
#include "coincontroldialog.h"
#include <QMessageBox>
#include <QTextDocument>
#include <QScrollBar>
#include <QClipboard>
SendCoinsDialog::SendCoinsDialog(QWidget *parent) :
QDialog(parent),
ui(new Ui::SendCoinsDialog),
model(0)
{
ui->setupUi(this);
#ifdef Q_OS_MAC // Icons on push buttons are very uncommon on Mac
ui->addButton->setIcon(QIcon());
ui->clearButton->setIcon(QIcon());
ui->sendButton->setIcon(QIcon());
#endif
#if QT_VERSION >= 0x040700
/* Do not move this to the XML file, Qt before 4.7 will choke on it */
ui->lineEditCoinControlChange->setPlaceholderText(tr("Enter a MasterMold address (e.g. Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)"));
#endif
addEntry();
connect(ui->addButton, SIGNAL(clicked()), this, SLOT(addEntry()));
connect(ui->clearButton, SIGNAL(clicked()), this, SLOT(clear()));
// Coin Control
ui->lineEditCoinControlChange->setFont(GUIUtil::bitcoinAddressFont());
connect(ui->pushButtonCoinControl, SIGNAL(clicked()), this, SLOT(coinControlButtonClicked()));
connect(ui->checkBoxCoinControlChange, SIGNAL(stateChanged(int)), this, SLOT(coinControlChangeChecked(int)));
connect(ui->lineEditCoinControlChange, SIGNAL(textEdited(const QString &)), this, SLOT(coinControlChangeEdited(const QString &)));
// Coin Control: clipboard actions
QAction *clipboardQuantityAction = new QAction(tr("Copy quantity"), this);
QAction *clipboardAmountAction = new QAction(tr("Copy amount"), this);
QAction *clipboardFeeAction = new QAction(tr("Copy fee"), this);
QAction *clipboardAfterFeeAction = new QAction(tr("Copy after fee"), this);
QAction *clipboardBytesAction = new QAction(tr("Copy bytes"), this);
QAction *clipboardPriorityAction = new QAction(tr("Copy priority"), this);
QAction *clipboardLowOutputAction = new QAction(tr("Copy low output"), this);
QAction *clipboardChangeAction = new QAction(tr("Copy change"), this);
connect(clipboardQuantityAction, SIGNAL(triggered()), this, SLOT(coinControlClipboardQuantity()));
connect(clipboardAmountAction, SIGNAL(triggered()), this, SLOT(coinControlClipboardAmount()));
connect(clipboardFeeAction, SIGNAL(triggered()), this, SLOT(coinControlClipboardFee()));
connect(clipboardAfterFeeAction, SIGNAL(triggered()), this, SLOT(coinControlClipboardAfterFee()));
connect(clipboardBytesAction, SIGNAL(triggered()), this, SLOT(coinControlClipboardBytes()));
connect(clipboardPriorityAction, SIGNAL(triggered()), this, SLOT(coinControlClipboardPriority()));
connect(clipboardLowOutputAction, SIGNAL(triggered()), this, SLOT(coinControlClipboardLowOutput()));
connect(clipboardChangeAction, SIGNAL(triggered()), this, SLOT(coinControlClipboardChange()));
ui->labelCoinControlQuantity->addAction(clipboardQuantityAction);
ui->labelCoinControlAmount->addAction(clipboardAmountAction);
ui->labelCoinControlFee->addAction(clipboardFeeAction);
ui->labelCoinControlAfterFee->addAction(clipboardAfterFeeAction);
ui->labelCoinControlBytes->addAction(clipboardBytesAction);
ui->labelCoinControlPriority->addAction(clipboardPriorityAction);
ui->labelCoinControlLowOutput->addAction(clipboardLowOutputAction);
ui->labelCoinControlChange->addAction(clipboardChangeAction);
fNewRecipientAllowed = true;
}
void SendCoinsDialog::setModel(WalletModel *model)
{
this->model = model;
for(int i = 0; i < ui->entries->count(); ++i)
{
SendCoinsEntry *entry = qobject_cast<SendCoinsEntry*>(ui->entries->itemAt(i)->widget());
if(entry)
{
entry->setModel(model);
}
}
if(model && model->getOptionsModel())
{
setBalance(model->getBalance(), model->getUnconfirmedBalance(), model->getImmatureBalance());
connect(model, SIGNAL(balanceChanged(qint64, qint64, qint64)), this, SLOT(setBalance(qint64, qint64, qint64)));
connect(model->getOptionsModel(), SIGNAL(displayUnitChanged(int)), this, SLOT(updateDisplayUnit()));
// Coin Control
connect(model->getOptionsModel(), SIGNAL(displayUnitChanged(int)), this, SLOT(coinControlUpdateLabels()));
connect(model->getOptionsModel(), SIGNAL(coinControlFeaturesChanged(bool)), this, SLOT(coinControlFeatureChanged(bool)));
connect(model->getOptionsModel(), SIGNAL(transactionFeeChanged(qint64)), this, SLOT(coinControlUpdateLabels()));
ui->frameCoinControl->setVisible(model->getOptionsModel()->getCoinControlFeatures());
coinControlUpdateLabels();
}
}
SendCoinsDialog::~SendCoinsDialog()
{
delete ui;
}
void SendCoinsDialog::on_sendButton_clicked()
{
QList<SendCoinsRecipient> recipients;
bool valid = true;
if(!model)
return;
for(int i = 0; i < ui->entries->count(); ++i)
{
SendCoinsEntry *entry = qobject_cast<SendCoinsEntry*>(ui->entries->itemAt(i)->widget());
if(entry)
{
if(entry->validate())
{
recipients.append(entry->getValue());
}
else
{
valid = false;
}
}
}
if(!valid || recipients.isEmpty())
{
return;
}
// Format confirmation message
QStringList formatted;
foreach(const SendCoinsRecipient &rcp, recipients)
{
#if QT_VERSION < 0x050000
formatted.append(tr("<b>%1</b> to %2 (%3)").arg(BitcoinUnits::formatWithUnit(BitcoinUnits::BTC, rcp.amount), Qt::escape(rcp.label), rcp.address));
#else
formatted.append(tr("<b>%1</b> to %2 (%3)").arg(BitcoinUnits::formatWithUnit(BitcoinUnits::BTC, rcp.amount), rcp.label.toHtmlEscaped(), rcp.address));
#endif
}
fNewRecipientAllowed = false;
QMessageBox::StandardButton retval = QMessageBox::question(this, tr("Confirm send coins"),
tr("Are you sure you want to send %1?").arg(formatted.join(tr(" and "))),
QMessageBox::Yes|QMessageBox::Cancel,
QMessageBox::Cancel);
if(retval != QMessageBox::Yes)
{
fNewRecipientAllowed = true;
return;
}
WalletModel::UnlockContext ctx(model->requestUnlock());
if(!ctx.isValid())
{
// Unlock wallet was cancelled
fNewRecipientAllowed = true;
return;
}
WalletModel::SendCoinsReturn sendstatus;
if (!model->getOptionsModel() || !model->getOptionsModel()->getCoinControlFeatures())
sendstatus = model->sendCoins(recipients);
else
sendstatus = model->sendCoins(recipients, CoinControlDialog::coinControl);
switch(sendstatus.status)
{
case WalletModel::InvalidAddress:
QMessageBox::warning(this, tr("Send Coins"),
tr("The recipient address is not valid, please recheck."),
QMessageBox::Ok, QMessageBox::Ok);
break;
case WalletModel::InvalidAmount:
QMessageBox::warning(this, tr("Send Coins"),
tr("The amount to pay must be larger than 0."),
QMessageBox::Ok, QMessageBox::Ok);
break;
case WalletModel::AmountExceedsBalance:
QMessageBox::warning(this, tr("Send Coins"),
tr("The amount exceeds your balance."),
QMessageBox::Ok, QMessageBox::Ok);
break;
case WalletModel::AmountWithFeeExceedsBalance:
QMessageBox::warning(this, tr("Send Coins"),
tr("The total exceeds your balance when the %1 transaction fee is included.").
arg(BitcoinUnits::formatWithUnit(BitcoinUnits::BTC, sendstatus.fee)),
QMessageBox::Ok, QMessageBox::Ok);
break;
case WalletModel::DuplicateAddress:
QMessageBox::warning(this, tr("Send Coins"),
tr("Duplicate address found, can only send to each address once per send operation."),
QMessageBox::Ok, QMessageBox::Ok);
break;
case WalletModel::TransactionCreationFailed:
QMessageBox::warning(this, tr("Send Coins"),
tr("Error: Transaction creation failed!"),
QMessageBox::Ok, QMessageBox::Ok);
break;
case WalletModel::TransactionCommitFailed:
QMessageBox::warning(this, tr("Send Coins"),
tr("Error: The transaction was rejected. This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here."),
QMessageBox::Ok, QMessageBox::Ok);
break;
case WalletModel::Aborted: // User aborted, nothing to do
break;
case WalletModel::OK:
accept();
CoinControlDialog::coinControl->UnSelectAll();
coinControlUpdateLabels();
break;
}
fNewRecipientAllowed = true;
}
void SendCoinsDialog::clear()
{
// Remove entries until only one left
while(ui->entries->count())
{
ui->entries->takeAt(0)->widget()->deleteLater();
}
addEntry();
updateRemoveEnabled();
ui->sendButton->setDefault(true);
}
void SendCoinsDialog::reject()
{
clear();
}
void SendCoinsDialog::accept()
{
clear();
}
SendCoinsEntry *SendCoinsDialog::addEntry()
{
SendCoinsEntry *entry = new SendCoinsEntry(this);
entry->setModel(model);
ui->entries->addWidget(entry);
connect(entry, SIGNAL(removeEntry(SendCoinsEntry*)), this, SLOT(removeEntry(SendCoinsEntry*)));
connect(entry, SIGNAL(payAmountChanged()), this, SLOT(coinControlUpdateLabels()));
updateRemoveEnabled();
// Focus the field, so that entry can start immediately
entry->clear();
entry->setFocus();
ui->scrollAreaWidgetContents->resize(ui->scrollAreaWidgetContents->sizeHint());
qApp->processEvents();
QScrollBar* bar = ui->scrollArea->verticalScrollBar();
if(bar)
bar->setSliderPosition(bar->maximum());
return entry;
}
void SendCoinsDialog::updateRemoveEnabled()
{
// Remove buttons are enabled as soon as there is more than one send-entry
bool enabled = (ui->entries->count() > 1);
for(int i = 0; i < ui->entries->count(); ++i)
{
SendCoinsEntry *entry = qobject_cast<SendCoinsEntry*>(ui->entries->itemAt(i)->widget());
if(entry)
{
entry->setRemoveEnabled(enabled);
}
}
setupTabChain(0);
coinControlUpdateLabels();
}
void SendCoinsDialog::removeEntry(SendCoinsEntry* entry)
{
entry->deleteLater();
updateRemoveEnabled();
}
QWidget *SendCoinsDialog::setupTabChain(QWidget *prev)
{
for(int i = 0; i < ui->entries->count(); ++i)
{
SendCoinsEntry *entry = qobject_cast<SendCoinsEntry*>(ui->entries->itemAt(i)->widget());
if(entry)
{
prev = entry->setupTabChain(prev);
}
}
QWidget::setTabOrder(prev, ui->addButton);
QWidget::setTabOrder(ui->addButton, ui->sendButton);
return ui->sendButton;
}
void SendCoinsDialog::setAddress(const QString &address)
{
SendCoinsEntry *entry = 0;
// Replace the first entry if it is still unused
if(ui->entries->count() == 1)
{
SendCoinsEntry *first = qobject_cast<SendCoinsEntry*>(ui->entries->itemAt(0)->widget());
if(first->isClear())
{
entry = first;
}
}
if(!entry)
{
entry = addEntry();
}
entry->setAddress(address);
}
void SendCoinsDialog::pasteEntry(const SendCoinsRecipient &rv)
{
if(!fNewRecipientAllowed)
return;
SendCoinsEntry *entry = 0;
// Replace the first entry if it is still unused
if(ui->entries->count() == 1)
{
SendCoinsEntry *first = qobject_cast<SendCoinsEntry*>(ui->entries->itemAt(0)->widget());
if(first->isClear())
{
entry = first;
}
}
if(!entry)
{
entry = addEntry();
}
entry->setValue(rv);
}
bool SendCoinsDialog::handleURI(const QString &uri)
{
SendCoinsRecipient rv;
// URI has to be valid
if (GUIUtil::parseBitcoinURI(uri, &rv))
{
CBitcoinAddress address(rv.address.toStdString());
if (!address.IsValid())
return false;
pasteEntry(rv);
return true;
}
return false;
}
void SendCoinsDialog::setBalance(qint64 balance, qint64 unconfirmedBalance, qint64 immatureBalance)
{
Q_UNUSED(unconfirmedBalance);
Q_UNUSED(immatureBalance);
if(!model || !model->getOptionsModel())
return;
int unit = model->getOptionsModel()->getDisplayUnit();
ui->labelBalance->setText(BitcoinUnits::formatWithUnit(unit, balance));
}
void SendCoinsDialog::updateDisplayUnit()
{
if(model && model->getOptionsModel())
{
// Update labelBalance with the current balance and the current unit
ui->labelBalance->setText(BitcoinUnits::formatWithUnit(model->getOptionsModel()->getDisplayUnit(), model->getBalance()));
}
}
// Coin Control: copy label "Quantity" to clipboard
void SendCoinsDialog::coinControlClipboardQuantity()
{
GUIUtil::setClipboard(ui->labelCoinControlQuantity->text());
}
// Coin Control: copy label "Amount" to clipboard
void SendCoinsDialog::coinControlClipboardAmount()
{
GUIUtil::setClipboard(ui->labelCoinControlAmount->text().left(ui->labelCoinControlAmount->text().indexOf(" ")));
}
// Coin Control: copy label "Fee" to clipboard
void SendCoinsDialog::coinControlClipboardFee()
{
GUIUtil::setClipboard(ui->labelCoinControlFee->text().left(ui->labelCoinControlFee->text().indexOf(" ")));
}
// Coin Control: copy label "After fee" to clipboard
void SendCoinsDialog::coinControlClipboardAfterFee()
{
GUIUtil::setClipboard(ui->labelCoinControlAfterFee->text().left(ui->labelCoinControlAfterFee->text().indexOf(" ")));
}
// Coin Control: copy label "Bytes" to clipboard
void SendCoinsDialog::coinControlClipboardBytes()
{
GUIUtil::setClipboard(ui->labelCoinControlBytes->text());
}
// Coin Control: copy label "Priority" to clipboard
void SendCoinsDialog::coinControlClipboardPriority()
{
GUIUtil::setClipboard(ui->labelCoinControlPriority->text());
}
// Coin Control: copy label "Low output" to clipboard
void SendCoinsDialog::coinControlClipboardLowOutput()
{
GUIUtil::setClipboard(ui->labelCoinControlLowOutput->text());
}
// Coin Control: copy label "Change" to clipboard
void SendCoinsDialog::coinControlClipboardChange()
{
GUIUtil::setClipboard(ui->labelCoinControlChange->text().left(ui->labelCoinControlChange->text().indexOf(" ")));
}
// Coin Control: settings menu - coin control enabled/disabled by user
void SendCoinsDialog::coinControlFeatureChanged(bool checked)
{
ui->frameCoinControl->setVisible(checked);
if (!checked && model) // coin control features disabled
CoinControlDialog::coinControl->SetNull();
}
// Coin Control: button inputs -> show actual coin control dialog
void SendCoinsDialog::coinControlButtonClicked()
{
CoinControlDialog dlg;
dlg.setModel(model);
dlg.exec();
coinControlUpdateLabels();
}
// Coin Control: checkbox custom change address
void SendCoinsDialog::coinControlChangeChecked(int state)
{
if (model)
{
if (state == Qt::Checked)
CoinControlDialog::coinControl->destChange = CBitcoinAddress(ui->lineEditCoinControlChange->text().toStdString()).Get();
else
CoinControlDialog::coinControl->destChange = CNoDestination();
}
ui->lineEditCoinControlChange->setEnabled((state == Qt::Checked));
ui->labelCoinControlChangeLabel->setVisible((state == Qt::Checked));
}
// Coin Control: custom change address changed
void SendCoinsDialog::coinControlChangeEdited(const QString & text)
{
if (model)
{
CoinControlDialog::coinControl->destChange = CBitcoinAddress(text.toStdString()).Get();
// label for the change address
ui->labelCoinControlChangeLabel->setStyleSheet("QLabel{color:black;}");
if (text.isEmpty())
ui->labelCoinControlChangeLabel->setText("");
else if (!CBitcoinAddress(text.toStdString()).IsValid())
{
ui->labelCoinControlChangeLabel->setStyleSheet("QLabel{color:red;}");
ui->labelCoinControlChangeLabel->setText(tr("Warning: Invalid Bitcoin address"));
}
else
{
QString associatedLabel = model->getAddressTableModel()->labelForAddress(text);
if (!associatedLabel.isEmpty())
ui->labelCoinControlChangeLabel->setText(associatedLabel);
else
{
CPubKey pubkey;
CKeyID keyid;
CBitcoinAddress(text.toStdString()).GetKeyID(keyid);
if (model->getPubKey(keyid, pubkey))
ui->labelCoinControlChangeLabel->setText(tr("(no label)"));
else
{
ui->labelCoinControlChangeLabel->setStyleSheet("QLabel{color:red;}");
ui->labelCoinControlChangeLabel->setText(tr("Warning: Unknown change address"));
}
}
}
}
}
// Coin Control: update labels
void SendCoinsDialog::coinControlUpdateLabels()
{
if (!model || !model->getOptionsModel() || !model->getOptionsModel()->getCoinControlFeatures())
return;
// set pay amounts
CoinControlDialog::payAmounts.clear();
for(int i = 0; i < ui->entries->count(); ++i)
{
SendCoinsEntry *entry = qobject_cast<SendCoinsEntry*>(ui->entries->itemAt(i)->widget());
if(entry)
CoinControlDialog::payAmounts.append(entry->getValue().amount);
}
if (CoinControlDialog::coinControl->HasSelected())
{
// actual coin control calculation
CoinControlDialog::updateLabels(model, this);
// show coin control stats
ui->labelCoinControlAutomaticallySelected->hide();
ui->widgetCoinControl->show();
}
else
{
// hide coin control stats
ui->labelCoinControlAutomaticallySelected->show();
ui->widgetCoinControl->hide();
ui->labelCoinControlInsuffFunds->hide();
}
}
| TotalPanda/MasterMold | src/qt/sendcoinsdialog.cpp | C++ | mit | 18,353 |
package scalalab;
import java.io.File;
import java.net.URL;
import scala.tools.nsc.Settings;
import scalaExec.Interpreter.GlobalValues;
public class JavaUtilities {
public static boolean pathsDetected = false; // avoid detecting paths multiple times since they do not change for single execution
static URL jarPathOfClass(String className) {
try {
return Class.forName(className).getProtectionDomain().getCodeSource().getLocation();
} catch (ClassNotFoundException ex) {
System.out.println("error in jarPathOfClass" + className + ")");
ex.printStackTrace();
return null;
}
}
public static void setByUser(Settings set) {
set.classpath().setByUser_$eq(true);
}
public static void useJavaCP(Settings set) {
set.usejavacp();
}
static public void detectPaths() {
if (pathsDetected == false) {
boolean hostIsUnix = true;
if (File.pathSeparatorChar == ';')
hostIsUnix = false; // Windows host
if (hostIsUnix) {
JavaGlobals.jarFilePath = jarPathOfClass("scalaSci.RichDouble2DArray").toString().replace("file:/", "/");
JavaGlobals.compFile = jarPathOfClass("scala.tools.nsc.ScriptRunner").toString().replace("file:/", "/");
JavaGlobals.libFile = jarPathOfClass("scala.io.Source").toString().replace("file:/", "/");
JavaGlobals.reflectFile = jarPathOfClass("scala.reflect.api.Names").toString().replace("file:/", "/");
JavaGlobals.scalaActorsFile = jarPathOfClass("scala.actors.Actor").toString().replace("file:/", "/");
JavaGlobals.akkaActorsFile = jarPathOfClass("akka.actor.dsl.Inbox").toString().replace("file:/", "/");
JavaGlobals.actorsMigrationFile = jarPathOfClass("scala.actors.migration.ActorDSL").toString().replace("file:/", "/");
JavaGlobals.parserCombinatorsFile = jarPathOfClass("scala.util.parsing.combinator.RegexParsers").toString().replace("file:/", "/");
JavaGlobals.xmlScalaFile = jarPathOfClass("scala.xml.factory.XMLLoader").toString().replace("file:/", "/");
JavaGlobals.swingFile = jarPathOfClass("scala.swing.Swing").toString().replace("file:/", "/");
JavaGlobals.jfreechartFile = jarPathOfClass("org.jfree.chart.ChartFactory").toString().replace("file:/", "/");
JavaGlobals.jsciFile = jarPathOfClass("JSci.maths.wavelet.Cascades").toString().replace("file:/", "/");
if (GlobalValues.hostIsLinux64 || GlobalValues.hostIsWin64) {
JavaGlobals.javacppFile = jarPathOfClass("org.bytedeco.javacpp.DoublePointer").toString().replace("file:/", "/");
JavaGlobals.gslFile = jarPathOfClass("org.bytedeco.javacpp.presets.gsl").toString().replace("file:/", "/");
} else {
JavaGlobals.javacppFile = ".";
JavaGlobals.gslFile = ".";
}
JavaGlobals.mtjColtSGTFile = jarPathOfClass("no.uib.cipr.matrix.AbstractMatrix").toString().replace("file:/", "/");
JavaGlobals.ApacheCommonsFile = jarPathOfClass("org.apache.commons.math3.ode.nonstiff.ThreeEighthesIntegrator").toString().replace("file:/", "/");
JavaGlobals.ejmlFile = jarPathOfClass("org.ejml.EjmlParameters").toString().replace("file:/", "/");
JavaGlobals.rsyntaxTextAreaFile = jarPathOfClass("org.fife.ui.rsyntaxtextarea.RSyntaxTextArea").toString().replace("file:/", "/");
JavaGlobals.matlabScilabFile = jarPathOfClass("matlabcontrol.MatlabConnector").toString().replace("file:/", "/");
JavaGlobals.jblasFile = jarPathOfClass("org.jblas.NativeBlas").toString().replace("file:/", "/");
JavaGlobals.numalFile = jarPathOfClass("numal.Linear_algebra").toString().replace("file:/", "/");
JavaGlobals.LAPACKFile = jarPathOfClass("org.netlib.lapack.LAPACK").toString().replace("file:/", "/");
JavaGlobals.ARPACKFile = jarPathOfClass("org.netlib.lapack.Dgels").toString().replace("file:/", "/");
JavaGlobals.javacFile = jarPathOfClass("com.sun.tools.javac.Main").toString().replace("file:/", "/");
JavaGlobals.JASFile = jarPathOfClass("org.matheclipse.core.eval.EvalEngine").toString().replace("file:/", "/");
} else {
JavaGlobals.jarFilePath = jarPathOfClass("scalaSci.RichDouble2DArray").toString().replace("file:/", "");
JavaGlobals.compFile = jarPathOfClass("scala.tools.nsc.ScriptRunner").toString().replace("file:/", "");
JavaGlobals.libFile = jarPathOfClass("scala.io.Source").toString().replace("file:/", "");
JavaGlobals.reflectFile = jarPathOfClass("scala.reflect.api.Names").toString().replace("file:/", "");
JavaGlobals.scalaActorsFile = jarPathOfClass("scala.actors.Actor").toString().replace("file:/", "");
JavaGlobals.swingFile = jarPathOfClass("scala.swing.Swing").toString().replace("file:/", "");
JavaGlobals.akkaActorsFile = jarPathOfClass("akka.actor.dsl.Inbox").toString().replace("file:/", "");
JavaGlobals.actorsMigrationFile = jarPathOfClass("scala.actors.migration.ActorDSL").toString().replace("file:/", "");
JavaGlobals.parserCombinatorsFile = jarPathOfClass("scala.util.parsing.combinator.RegexParsers").toString().replace("file:/", "");
JavaGlobals.xmlScalaFile = jarPathOfClass("scala.xml.factory.XMLLoader").toString().replace("file:/", "");
JavaGlobals.jfreechartFile = jarPathOfClass("org.jfree.chart.ChartFactory").toString().replace("file:/", "");
JavaGlobals.jsciFile = jarPathOfClass("JSci.maths.wavelet.Cascades").toString().replace("file:/", "");
if (GlobalValues.hostIsLinux64 || GlobalValues.hostIsWin64) {
JavaGlobals.javacppFile = jarPathOfClass("org.bytedeco.javacpp.DoublePointer").toString().replace("file:/", "");
JavaGlobals.gslFile = jarPathOfClass("org.bytedeco.javacpp.presets.gsl").toString().replace("file:/", "");
} else {
JavaGlobals.javacppFile = ".";
JavaGlobals.gslFile = ".";
}
JavaGlobals.mtjColtSGTFile = jarPathOfClass("no.uib.cipr.matrix.AbstractMatrix").toString().replace("file:/", "");
JavaGlobals.ApacheCommonsFile = jarPathOfClass("org.apache.commons.math3.ode.nonstiff.ThreeEighthesIntegrator").toString().replace("file:/", "");
JavaGlobals.ejmlFile = jarPathOfClass("org.ejml.EjmlParameters").toString().replace("file:/", "");
JavaGlobals.rsyntaxTextAreaFile = jarPathOfClass("org.fife.ui.rsyntaxtextarea.RSyntaxTextArea").toString().replace("file:/", "");
JavaGlobals.matlabScilabFile = jarPathOfClass("matlabcontrol.MatlabConnector").toString().replace("file:/", "");
JavaGlobals.jblasFile = jarPathOfClass("org.jblas.NativeBlas").toString().replace("file:/", "");
JavaGlobals.numalFile = jarPathOfClass("numal.Linear_algebra").toString().replace("file:/", "");
JavaGlobals.LAPACKFile = jarPathOfClass("org.netlib.lapack.LAPACK").toString().replace("file:/", "");
JavaGlobals.ARPACKFile = jarPathOfClass("org.netlib.lapack.Dgels").toString().replace("file:/", "");
JavaGlobals.javacFile = jarPathOfClass("com.sun.tools.javac.Main").toString().replace("file:/", "");
JavaGlobals.JASFile = jarPathOfClass("org.matheclipse.core.eval.EvalEngine").toString().replace("file:/", "");
}
System.out.println("jarFile =" + JavaGlobals.jarFilePath);
System.out.println("compFile = " + JavaGlobals.compFile);
System.out.println("libFile = " + JavaGlobals.libFile);
System.out.println("reflectFile= " + JavaGlobals.reflectFile);
System.out.println("swingFile = " + JavaGlobals.swingFile);
System.out.println("Scala Actors File = " + JavaGlobals.scalaActorsFile);
System.out.println("Actors migration file = " + JavaGlobals.actorsMigrationFile);
System.out.println("Scala Parser Combinators File = " + JavaGlobals.parserCombinatorsFile);
System.out.println("Scala XML file = " + JavaGlobals.xmlScalaFile);
System.out.println("MTJColtSGTFile = " + JavaGlobals.mtjColtSGTFile);
System.out.println("JBLAS File = " + JavaGlobals.jblasFile);
System.out.println("Apache Common Maths File = " + JavaGlobals.ApacheCommonsFile);
System.out.println("EJMLFile = " + JavaGlobals.ejmlFile);
System.out.println("RSyntaxTextArea file = " + JavaGlobals.rsyntaxTextAreaFile);
System.out.println("MATLAB - SciLab connection file = " + JavaGlobals.matlabScilabFile);
System.out.println("NUMALFile = " + JavaGlobals.numalFile);
System.out.println("JFreeChartFile = " + JavaGlobals.jfreechartFile);
System.out.println("Java Algebra System = " + JavaGlobals.JASFile);
System.out.println("LAPACK library = " + JavaGlobals.LAPACKFile);
System.out.println("ARPACK library = " + JavaGlobals.ARPACKFile);
System.out.println("Scala actors library = " + JavaGlobals.scalaActorsFile);
System.out.println("Java Compiler = " + JavaGlobals.javacFile);
pathsDetected = true; // paths are detected. Avoid the redundant job to rediscover them
}
}
static public void detectBasicPaths() {
detectPaths(); // use the same paths for now
}
}
| scalalab/scalalab | source/src/main/java/scalalab/JavaUtilities.java | Java | mit | 9,843 |
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Windows.Forms;
namespace DiceBot
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main(string[] args)
{
try
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
//Application.Run(new cLogin());
Application.Run(new cDiceBot(args));
}
catch (Exception e)
{
try
{
using (StreamWriter sw = File.AppendText("DICEBOTLOG.txt"))
{
sw.WriteLine("########################################################################################\r\n\r\nFATAL CRASH\r\n");
sw.WriteLine(e.ToString());
sw.WriteLine("########################################################################################");
}
}
catch { }
throw e;
}
}
}
}
| Seuntjie900/DiceBot | DiceBot/Program.cs | C# | mit | 1,288 |
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
from django.contrib.auth.decorators import login_required
from django.shortcuts import render_to_response, get_object_or_404, get_list_or_404
from rpg_base.models import Encounter, Campaign
@login_required
def index(request, campaign_pk):
campaign = get_object_or_404(Campaign, pk=campaign_pk, user=request.user)
if "search" in request.GET:
search_value = request.GET["search"]
encounters = get_list_or_404(Encounter, campaign=campaign_pk, name__contains=request.GET["search"])
else:
search_value = ""
encounters = get_list_or_404(Encounter, campaign=campaign_pk)
paginator = Paginator(encounters, 25)
page = request.GET.get('page')
try:
encounters = paginator.page(page)
except PageNotAnInteger:
encounters = paginator.page(1)
except EmptyPage:
encounters = paginator.page(paginator.num_pages)
context = {
"campaign": campaign,
"encounters": encounters,
"search_value": search_value,
}
return render_to_response("encounter/index.html", context)
@login_required
def view(request, campaign_pk, encounter_pk):
encounter = get_object_or_404(Encounter, pk=encounter_pk, campaign=campaign_pk)
context = {
"encounter": encounter,
}
return render_to_response("encounter/view.html", context)
| ncphillips/django_rpg | rpg_base/views/encounter.py | Python | mit | 1,419 |
<!-- HTML header for doxygen 1.8.10-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>SideCar: /Users/howes/src/sidecar/GUI/ESScope/DataContainer.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="DoxygenStyleSheet.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">SideCar
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="pages.html"><span>Related Pages</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><a href="annotated.html"><span>Data Structures</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File List</span></a></li>
<li><a href="globals.html"><span>Globals</span></a></li>
</ul>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_16861240cd43450fd06793f5fadb1278.html">sidecar</a></li><li class="navelem"><a class="el" href="dir_f4a3f8116077ff33be38eb7fcab102f6.html">GUI</a></li><li class="navelem"><a class="el" href="dir_7336acc93a9ca2cfb2156d11ecff565d.html">ESScope</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">DataContainer.h</div> </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="preprocessor">#ifndef SIDECAR_GUI_ESSCOPE_DATACONTAINER_H // -*- C++ -*-</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="preprocessor">#define SIDECAR_GUI_ESSCOPE_DATACONTAINER_H</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span> </div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="preprocessor">#include "<a class="code" href="Video_8h.html">Messages/Video.h</a>"</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span> </div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="keyword">namespace </span><a class="code" href="namespaceSideCar.html">SideCar</a> {</div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="keyword">namespace </span>GUI {</div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="keyword">namespace </span>ESScope {</div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span> </div><div class="line"><a name="l00010"></a><span class="lineno"><a class="line" href="classSideCar_1_1GUI_1_1ESScope_1_1DataContainer.html"> 10</a></span> <span class="keyword">class </span><a class="code" href="classSideCar_1_1GUI_1_1ESScope_1_1DataContainer.html">DataContainer</a> </div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span> {</div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="keyword">public</span>:</div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span>  <span class="keyword">using</span> DatumType = Messages::Video::DatumType;</div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span>  <span class="keyword">using</span> Container = Messages::Video::Container;</div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span> </div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span>  <span class="keyword">static</span> DatumType GetMinValue();</div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span> </div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span>  <a class="code" href="classSideCar_1_1GUI_1_1ESScope_1_1DataContainer.html">DataContainer</a>() : data_() {}</div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span> </div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span>  <a class="code" href="classSideCar_1_1GUI_1_1ESScope_1_1DataContainer.html">DataContainer</a>(<span class="keywordtype">size_t</span> count)</div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span>  : data_(count, GetMinValue()) {}</div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span> </div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span>  <a class="code" href="classSideCar_1_1GUI_1_1ESScope_1_1DataContainer.html">DataContainer</a>(<span class="keywordtype">size_t</span> count, DatumType init)</div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span>  : data_(count, init) {}</div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span> </div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span>  <span class="keyword">virtual</span> ~<a class="code" href="classSideCar_1_1GUI_1_1ESScope_1_1DataContainer.html">DataContainer</a>() {}</div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span> </div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span>  <span class="keywordtype">void</span> resize(<span class="keywordtype">size_t</span> size)</div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span>  { data_.resize(size, GetMinValue()); }</div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span> </div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span>  <span class="keywordtype">void</span> resize(<span class="keywordtype">size_t</span> size, <span class="keyword">const</span> DatumType& init)</div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span>  { data_.resize(size, init); }</div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span> </div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span>  <span class="keyword">const</span> Container& getValues()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> data_; }</div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span> </div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span> clear();</div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span> </div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span>  DatumType& operator[](<span class="keywordtype">size_t</span> index) { <span class="keywordflow">return</span> data_[index]; }</div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span> </div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span>  <span class="keyword">const</span> DatumType& operator[](<span class="keywordtype">size_t</span> index)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> data_[index]; }</div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span> </div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span>  <span class="keywordtype">size_t</span> size()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> data_.size(); }</div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span> </div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span>  <span class="keywordtype">bool</span> empty()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> data_.empty(); }</div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span> </div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span> <span class="keyword">protected</span>:</div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span> </div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span>  Container data_;</div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span> </div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span> <span class="keyword">private</span>:</div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span>  <span class="keyword">static</span> <span class="keyword">const</span> DatumType minValue_;</div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span> };</div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span> </div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span> } <span class="comment">// end namespace ESScope</span></div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span> } <span class="comment">// end namespace GUI</span></div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span> } <span class="comment">// end namespace SideCar</span></div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span> </div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span> <span class="preprocessor">#endif</span></div><div class="ttc" id="Video_8h_html"><div class="ttname"><a href="Video_8h.html">Video.h</a></div></div>
<div class="ttc" id="namespaceSideCar_html"><div class="ttname"><a href="namespaceSideCar.html">SideCar</a></div><div class="ttdoc">Namespace for all entities specific to the 331 SideCar project. </div><div class="ttdef"><b>Definition:</b> <a href="ABTracker_8h_source.html#l00010">ABTracker.h:10</a></div></div>
<div class="ttc" id="classSideCar_1_1GUI_1_1ESScope_1_1DataContainer_html"><div class="ttname"><a href="classSideCar_1_1GUI_1_1ESScope_1_1DataContainer.html">SideCar::GUI::ESScope::DataContainer</a></div><div class="ttdef"><b>Definition:</b> <a href="DataContainer_8h_source.html#l00010">DataContainer.h:10</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- HTML footer for doxygen 1.8.10-->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by  <a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.11
</small></address>
</body>
</html>
| bradhowes/sidecar | docs/DataContainer_8h_source.html | HTML | mit | 11,517 |
import { Observable } from '../Observable';
import { FindValueOperator } from './find';
/**
* Emits only the index of the first value emitted by the source Observable that
* meets some condition.
*
* <span class="informal">It's like {@link find}, but emits the index of the
* found value, not the value itself.</span>
*
* <img src="./img/findIndex.png" width="100%">
*
* `findIndex` searches for the first item in the source Observable that matches
* the specified condition embodied by the `predicate`, and returns the
* (zero-based) index of the first occurrence in the source. Unlike
* {@link first}, the `predicate` is required in `findIndex`, and does not emit
* an error if a valid value is not found.
*
* @example <caption>Emit the index of first click that happens on a DIV element</caption>
* var clicks = Rx.Observable.fromEvent(document, 'click');
* var result = clicks.findIndex(ev => ev.target.tagName === 'DIV');
* result.subscribe(x => console.log(x));
*
* @see {@link filter}
* @see {@link find}
* @see {@link first}
* @see {@link take}
*
* @param {function(value: T, index: number, source: Observable<T>): boolean} predicate
* A function called with each item to test for condition matching.
* @param {any} [thisArg] An optional argument to determine the value of `this`
* in the `predicate` function.
* @return {Observable} An Observable of the index of the first item that
* matches the condition.
* @method find
* @owner Observable
*/
export function findIndex<T>(this: Observable<T>, predicate: (value: T, index: number, source: Observable<T>) => boolean,
thisArg?: any): Observable<number> {
return <any>this.lift<any>(new FindValueOperator(predicate, this, true, thisArg));
}
| 12mo2525/angularMail | node_modules/angular2-clipboard/node_modules/rxjs/src/operator/findIndex.ts | TypeScript | mit | 1,764 |
// CommonJS require()
function require(p){
var path = require.resolve(p)
, mod = require.modules[path];
if (!mod) throw new Error('failed to require "' + p + '"');
if (!mod.exports) {
mod.exports = {};
mod.call(mod.exports, mod, mod.exports, require.relative(path));
}
return mod.exports;
}
require.modules = {};
require.resolve = function (path){
var orig = path
, reg = path + '.js'
, index = path + '/index.js';
return require.modules[reg] && reg
|| require.modules[index] && index
|| orig;
};
require.register = function (path, fn){
require.modules[path] = fn;
};
require.relative = function (parent) {
return function(p){
if ('.' != p[0]) return require(p);
var path = parent.split('/')
, segs = p.split('/');
path.pop();
for (var i = 0; i < segs.length; i++) {
var seg = segs[i];
if ('..' == seg) path.pop();
else if ('.' != seg) path.push(seg);
}
return require(path.join('/'));
};
};
require.register("compiler.js", function(module, exports, require){
/*!
* Jade - Compiler
* Copyright(c) 2010 TJ Holowaychuk <tj@vision-media.ca>
* MIT Licensed
*/
/**
* Module dependencies.
*/
var nodes = require('./nodes')
, filters = require('./filters')
, doctypes = require('./doctypes')
, selfClosing = require('./self-closing')
, inlineTags = require('./inline-tags')
, utils = require('./utils');
if (!Object.keys) {
Object.keys = function(obj){
var arr = [];
for (var key in obj) {
if (obj.hasOwnProperty(key)) {
arr.push(obj);
}
}
return arr;
}
}
if (!String.prototype.trimLeft) {
String.prototype.trimLeft = function(){
return this.replace(/^\s+/, '');
}
}
/**
* Initialize `Compiler` with the given `node`.
*
* @param {Node} node
* @param {Object} options
* @api public
*/
var Compiler = module.exports = function Compiler(node, options) {
this.options = options = options || {};
this.node = node;
this.hasCompiledDoctype = false;
this.hasCompiledTag = false;
this.pp = options.pretty || false;
this.debug = false !== options.compileDebug;
this.indents = 0;
if (options.doctype) this.setDoctype(options.doctype);
};
/**
* Compiler prototype.
*/
Compiler.prototype = {
/**
* Compile parse tree to JavaScript.
*
* @api public
*/
compile: function(){
this.buf = ['var interp;'];
this.lastBufferedIdx = -1
this.visit(this.node);
return this.buf.join('\n');
},
/**
* Sets the default doctype `name`. Sets terse mode to `true` when
* html 5 is used, causing self-closing tags to end with ">" vs "/>",
* and boolean attributes are not mirrored.
*
* @param {string} name
* @api public
*/
setDoctype: function(name){
var doctype = doctypes[(name || 'default').toLowerCase()];
if (!doctype) throw new Error('unknown doctype "' + name + '"');
this.doctype = doctype;
this.terse = '5' == name || 'html' == name;
this.xml = 0 == this.doctype.indexOf('<?xml');
},
/**
* Buffer the given `str` optionally escaped.
*
* @param {String} str
* @param {Boolean} esc
* @api public
*/
buffer: function(str, esc){
if (esc) str = utils.escape(str);
if (this.lastBufferedIdx == this.buf.length) {
this.lastBuffered += str;
this.buf[this.lastBufferedIdx - 1] = "buf.push('" + this.lastBuffered + "');"
} else {
this.buf.push("buf.push('" + str + "');");
this.lastBuffered = str;
this.lastBufferedIdx = this.buf.length;
}
},
/**
* Buffer the given `node`'s lineno.
*
* @param {Node} node
* @api public
*/
line: function(node){
if (false === node.instrumentLineNumber) return;
this.buf.push('__.lineno = ' + node.line + ';');
},
/**
* Visit `node`.
*
* @param {Node} node
* @api public
*/
visit: function(node){
if (this.debug) this.line(node);
return this.visitNode(node);
},
/**
* Visit `node`.
*
* @param {Node} node
* @api public
*/
visitNode: function(node){
var name = node.constructor.name
|| node.constructor.toString().match(/function ([^(\s]+)()/)[1];
return this['visit' + name](node);
},
/**
* Visit literal `node`.
*
* @param {Literal} node
* @api public
*/
visitLiteral: function(node){
var str = node.str.replace(/\n/g, '\\\\n');
this.buffer(str);
},
/**
* Visit all nodes in `block`.
*
* @param {Block} block
* @api public
*/
visitBlock: function(block){
var len = block.nodes.length;
for (var i = 0; i < len; ++i) {
this.visit(block.nodes[i]);
}
},
/**
* Visit `doctype`. Sets terse mode to `true` when html 5
* is used, causing self-closing tags to end with ">" vs "/>",
* and boolean attributes are not mirrored.
*
* @param {Doctype} doctype
* @api public
*/
visitDoctype: function(doctype){
if (doctype && (doctype.val || !this.doctype)) {
this.setDoctype(doctype.val || 'default');
}
if (this.doctype) this.buffer(this.doctype);
this.hasCompiledDoctype = true;
},
/**
* Visit `mixin`, generating a function that
* may be called within the template.
*
* @param {Mixin} mixin
* @api public
*/
visitMixin: function(mixin){
var name = mixin.name.replace(/-/g, '_') + '_mixin'
, args = mixin.args || '';
if (mixin.block) {
this.buf.push('var ' + name + ' = function(' + args + '){');
this.visit(mixin.block);
this.buf.push('}');
} else {
this.buf.push(name + '(' + args + ');');
}
},
/**
* Visit `tag` buffering tag markup, generating
* attributes, visiting the `tag`'s code and block.
*
* @param {Tag} tag
* @api public
*/
visitTag: function(tag){
this.indents++;
var name = tag.name;
if (!this.hasCompiledTag) {
if (!this.hasCompiledDoctype && 'html' == name) {
this.visitDoctype();
}
this.hasCompiledTag = true;
}
// pretty print
if (this.pp && inlineTags.indexOf(name) == -1) {
this.buffer('\\n' + Array(this.indents).join(' '));
}
if (~selfClosing.indexOf(name) && !this.xml) {
this.buffer('<' + name);
this.visitAttributes(tag.attrs);
this.terse
? this.buffer('>')
: this.buffer('/>');
} else {
// Optimize attributes buffering
if (tag.attrs.length) {
this.buffer('<' + name);
if (tag.attrs.length) this.visitAttributes(tag.attrs);
this.buffer('>');
} else {
this.buffer('<' + name + '>');
}
if (tag.code) this.visitCode(tag.code);
if (tag.text) this.buffer(utils.text(tag.text.nodes[0].trimLeft()));
this.escape = 'pre' == tag.name;
this.visit(tag.block);
// pretty print
if (this.pp && !~inlineTags.indexOf(name) && !tag.textOnly) {
this.buffer('\\n' + Array(this.indents).join(' '));
}
this.buffer('</' + name + '>');
}
this.indents--;
},
/**
* Visit `filter`, throwing when the filter does not exist.
*
* @param {Filter} filter
* @api public
*/
visitFilter: function(filter){
var fn = filters[filter.name];
// unknown filter
if (!fn) {
if (filter.isASTFilter) {
throw new Error('unknown ast filter "' + filter.name + ':"');
} else {
throw new Error('unknown filter ":' + filter.name + '"');
}
}
if (filter.isASTFilter) {
this.buf.push(fn(filter.block, this, filter.attrs));
} else {
var text = filter.block.nodes.join('');
this.buffer(utils.text(fn(text, filter.attrs)));
}
},
/**
* Visit `text` node.
*
* @param {Text} text
* @api public
*/
visitText: function(text){
text = utils.text(text.nodes.join(''));
if (this.escape) text = escape(text);
this.buffer(text);
this.buffer('\\n');
},
/**
* Visit a `comment`, only buffering when the buffer flag is set.
*
* @param {Comment} comment
* @api public
*/
visitComment: function(comment){
if (!comment.buffer) return;
if (this.pp) this.buffer('\\n' + Array(this.indents + 1).join(' '));
this.buffer('<!--' + utils.escape(comment.val) + '-->');
},
/**
* Visit a `BlockComment`.
*
* @param {Comment} comment
* @api public
*/
visitBlockComment: function(comment){
if (!comment.buffer) return;
if (0 == comment.val.indexOf('if')) {
this.buffer('<!--[' + comment.val + ']>');
this.visit(comment.block);
this.buffer('<![endif]-->');
} else {
this.buffer('<!--' + comment.val);
this.visit(comment.block);
this.buffer('-->');
}
},
/**
* Visit `code`, respecting buffer / escape flags.
* If the code is followed by a block, wrap it in
* a self-calling function.
*
* @param {Code} code
* @api public
*/
visitCode: function(code){
// Wrap code blocks with {}.
// we only wrap unbuffered code blocks ATM
// since they are usually flow control
// Buffer code
if (code.buffer) {
var val = code.val.trimLeft();
this.buf.push('var __val__ = ' + val);
val = 'null == __val__ ? "" : __val__';
if (code.escape) val = 'escape(' + val + ')';
this.buf.push("buf.push(" + val + ");");
} else {
this.buf.push(code.val);
}
// Block support
if (code.block) {
if (!code.buffer) this.buf.push('{');
this.visit(code.block);
if (!code.buffer) this.buf.push('}');
}
},
/**
* Visit `each` block.
*
* @param {Each} each
* @api public
*/
visitEach: function(each){
this.buf.push(''
+ '// iterate ' + each.obj + '\n'
+ '(function(){\n'
+ ' if (\'number\' == typeof ' + each.obj + '.length) {\n'
+ ' for (var ' + each.key + ' = 0, $$l = ' + each.obj + '.length; ' + each.key + ' < $$l; ' + each.key + '++) {\n'
+ ' var ' + each.val + ' = ' + each.obj + '[' + each.key + '];\n');
this.visit(each.block);
this.buf.push(''
+ ' }\n'
+ ' } else {\n'
+ ' for (var ' + each.key + ' in ' + each.obj + ') {\n'
+ ' if (' + each.obj + '.hasOwnProperty(' + each.key + ')){'
+ ' var ' + each.val + ' = ' + each.obj + '[' + each.key + '];\n');
this.visit(each.block);
this.buf.push(' }\n');
this.buf.push(' }\n }\n}).call(this);\n');
},
/**
* Visit `attrs`.
*
* @param {Array} attrs
* @api public
*/
visitAttributes: function(attrs){
var buf = []
, classes = [];
if (this.terse) buf.push('terse: true');
attrs.forEach(function(attr){
if (attr.name == 'class') {
classes.push('(' + attr.val + ')');
} else {
var pair = "'" + attr.name + "':(" + attr.val + ')';
buf.push(pair);
}
});
if (classes.length) {
classes = classes.join(" + ' ' + ");
buf.push("class: " + classes);
}
buf = buf.join(', ').replace('class:', '"class":');
this.buf.push("buf.push(attrs({ " + buf + " }));");
}
};
/**
* Escape the given string of `html`.
*
* @param {String} html
* @return {String}
* @api private
*/
function escape(html){
return String(html)
.replace(/&(?!\w+;)/g, '&')
.replace(/</g, '<')
.replace(/>/g, '>')
.replace(/"/g, '"');
}
}); // module: compiler.js
require.register("doctypes.js", function(module, exports, require){
/*!
* Jade - doctypes
* Copyright(c) 2010 TJ Holowaychuk <tj@vision-media.ca>
* MIT Licensed
*/
module.exports = {
'5': '<!DOCTYPE html>'
, 'html': '<!DOCTYPE html>'
, 'xml': '<?xml version="1.0" encoding="utf-8" ?>'
, 'default': '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">'
, 'transitional': '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">'
, 'strict': '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">'
, 'frameset': '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">'
, '1.1': '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">'
, 'basic': '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.1//EN" "http://www.w3.org/TR/xhtml-basic/xhtml-basic11.dtd">'
, 'mobile': '<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.2//EN" "http://www.openmobilealliance.org/tech/DTD/xhtml-mobile12.dtd">'
};
}); // module: doctypes.js
require.register("filters.js", function(module, exports, require){
/*!
* Jade - filters
* Copyright(c) 2010 TJ Holowaychuk <tj@vision-media.ca>
* MIT Licensed
*/
module.exports = {
/**
* Wrap text with CDATA block.
*/
cdata: function(str){
return '<![CDATA[\\n' + str + '\\n]]>';
},
/**
* Transform sass to css, wrapped in style tags.
*/
sass: function(str){
str = str.replace(/\\n/g, '\n');
var sass = require('sass').render(str).replace(/\n/g, '\\n');
return '<style>' + sass + '</style>';
},
/**
* Transform stylus to css, wrapped in style tags.
*/
stylus: function(str, options){
var ret;
str = str.replace(/\\n/g, '\n');
var stylus = require('stylus');
stylus(str, options).render(function(err, css){
if (err) throw err;
ret = css.replace(/\n/g, '\\n');
});
return '<style>' + ret + '</style>';
},
/**
* Transform sass to css, wrapped in style tags.
*/
less: function(str){
var ret;
str = str.replace(/\\n/g, '\n');
require('less').render(str, function(err, css){
if (err) throw err;
ret = '<style>' + css.replace(/\n/g, '\\n') + '</style>';
});
return ret;
},
/**
* Transform markdown to html.
*/
markdown: function(str){
var md;
// support markdown / discount
try {
md = require('markdown');
} catch (err){
try {
md = require('discount');
} catch (err) {
try {
md = require('markdown-js');
} catch (err) {
throw new Error('Cannot find markdown library, install markdown or discount');
}
}
}
str = str.replace(/\\n/g, '\n');
return md.parse(str).replace(/\n/g, '\\n').replace(/'/g,''');
},
/**
* Transform coffeescript to javascript.
*/
coffeescript: function(str){
str = str.replace(/\\n/g, '\n');
var js = require('coffee-script').compile(str).replace(/\n/g, '\\n');
return '<script type="text/javascript">\\n' + js + '</script>';
}
};
}); // module: filters.js
require.register("inline-tags.js", function(module, exports, require){
/*!
* Jade - inline tags
* Copyright(c) 2010 TJ Holowaychuk <tj@vision-media.ca>
* MIT Licensed
*/
module.exports = [
'a'
, 'abbr'
, 'acronym'
, 'b'
, 'br'
, 'code'
, 'em'
, 'font'
, 'i'
, 'img'
, 'ins'
, 'kbd'
, 'map'
, 'samp'
, 'small'
, 'span'
, 'strong'
, 'sub'
, 'sup'
];
}); // module: inline-tags.js
require.register("jade.js", function(module, exports, require){
/*!
* Jade
* Copyright(c) 2010 TJ Holowaychuk <tj@vision-media.ca>
* MIT Licensed
*/
/**
* Module dependencies.
*/
var Parser = require('./parser')
, Compiler = require('./compiler')
, runtime = require('./runtime')
/**
* Library version.
*/
exports.version = '0.15.3';
/**
* Intermediate JavaScript cache.
*/
var cache = exports.cache = {};
/**
* Expose self closing tags.
*/
exports.selfClosing = require('./self-closing');
/**
* Default supported doctypes.
*/
exports.doctypes = require('./doctypes');
/**
* Text filters.
*/
exports.filters = require('./filters');
/**
* Utilities.
*/
exports.utils = require('./utils');
/**
* Expose `Compiler`.
*/
exports.Compiler = Compiler;
/**
* Expose `Parser`.
*/
exports.Parser = Parser;
/**
* Nodes.
*/
exports.nodes = require('./nodes');
/**
* Jade runtime helpers.
*/
exports.runtime = runtime;
/**
* Parse the given `str` of jade and return a function body.
*
* @param {String} str
* @param {Object} options
* @return {String}
* @api private
*/
function parse(str, options){
var filename = options.filename;
try {
// Parse
var parser = new Parser(str, filename, options);
// Compile
var compiler = new (options.compiler || Compiler)(parser.parse(), options)
, js = compiler.compile();
// Debug compiler
if (options.debug) {
console.log('\n\x1b[1mCompiled Function\x1b[0m:\n\n%s', js.replace(/^/gm, ' '));
}
try {
return ''
+ 'var buf = [];\n'
+ (options.self
? 'var self = locals || {};\n' + js
: 'with (locals || {}) {\n' + js + '\n}\n')
+ 'return buf.join("");';
} catch (err) {
process.compile(js, filename || 'Jade');
return;
}
} catch (err) {
runtime.rethrow(err, str, filename, parser.lexer.lineno);
}
}
/**
* Compile a `Function` representation of the given jade `str`.
*
* Options:
*
* - `compileDebug` when `false` debugging code is stripped from the compiled template
* - `client` when `true` the helper functions `escape()` etc will reference `jade.escape()`
* for use with the Jade client-side runtime.js
*
* @param {String} str
* @param {Options} options
* @return {Function}
* @api public
*/
exports.compile = function(str, options){
var options = options || {}
, input = JSON.stringify(str)
, client = options.client
, filename = options.filename
? JSON.stringify(options.filename)
: 'undefined'
, fn;
if (options.compileDebug !== false) {
fn = [
'var __ = { lineno: 1, input: ' + input + ', filename: ' + filename + ' };'
, 'try {'
, parse(String(str), options || {})
, '} catch (err) {'
, ' rethrow(err, __.input, __.filename, __.lineno);'
, '}'
].join('\n');
} else {
fn = parse(String(str), options || {});
}
if (client) {
fn = 'var attrs = jade.attrs, escape = jade.escape, rethrow = jade.rethrow;\n' + fn;
}
fn = new Function('locals, attrs, escape, rethrow', fn);
if (client) return fn;
return function(locals){
return fn(locals, runtime.attrs, runtime.escape, runtime.rethrow);
};
};
}); // module: jade.js
require.register("lexer.js", function(module, exports, require){
/*!
* Jade - Lexer
* Copyright(c) 2010 TJ Holowaychuk <tj@vision-media.ca>
* MIT Licensed
*/
/**
* Initialize `Lexer` with the given `str`.
*
* Options:
*
* - `colons` allow colons for attr delimiters
*
* @param {String} str
* @param {Object} options
* @api private
*/
var Lexer = module.exports = function Lexer(str, options) {
options = options || {};
this.input = str.replace(/\r\n|\r/g, '\n');
this.colons = options.colons;
this.deferredTokens = [];
this.lastIndents = 0;
this.lineno = 1;
this.stash = [];
this.indentStack = [];
this.indentRe = null;
this.pipeless = false;
};
/**
* Lexer prototype.
*/
Lexer.prototype = {
/**
* Construct a token with the given `type` and `val`.
*
* @param {String} type
* @param {String} val
* @return {Object}
* @api private
*/
tok: function(type, val){
return {
type: type
, line: this.lineno
, val: val
}
},
/**
* Consume the given `len` of input.
*
* @param {Number} len
* @api private
*/
consume: function(len){
this.input = this.input.substr(len);
},
/**
* Scan for `type` with the given `regexp`.
*
* @param {String} type
* @param {RegExp} regexp
* @return {Object}
* @api private
*/
scan: function(regexp, type){
var captures;
if (captures = regexp.exec(this.input)) {
this.consume(captures[0].length);
return this.tok(type, captures[1]);
}
},
/**
* Defer the given `tok`.
*
* @param {Object} tok
* @api private
*/
defer: function(tok){
this.deferredTokens.push(tok);
},
/**
* Lookahead `n` tokens.
*
* @param {Number} n
* @return {Object}
* @api private
*/
lookahead: function(n){
var fetch = n - this.stash.length;
while (fetch-- > 0) this.stash.push(this.next());
return this.stash[--n];
},
/**
* Return the indexOf `start` / `end` delimiters.
*
* @param {String} start
* @param {String} end
* @return {Number}
* @api private
*/
indexOfDelimiters: function(start, end){
var str = this.input
, nstart = 0
, nend = 0
, pos = 0;
for (var i = 0, len = str.length; i < len; ++i) {
if (start == str[i]) {
++nstart;
} else if (end == str[i]) {
if (++nend == nstart) {
pos = i;
break;
}
}
}
return pos;
},
/**
* Stashed token.
*/
stashed: function() {
return this.stash.length
&& this.stash.shift();
},
/**
* Deferred token.
*/
deferred: function() {
return this.deferredTokens.length
&& this.deferredTokens.shift();
},
/**
* end-of-source.
*/
eos: function() {
if (this.input.length) return;
if (this.indentStack.length) {
this.indentStack.shift();
return this.tok('outdent');
} else {
return this.tok('eos');
}
},
/**
* Comment.
*/
comment: function() {
var captures;
if (captures = /^ *\/\/(-)?([^\n]*)/.exec(this.input)) {
this.consume(captures[0].length);
var tok = this.tok('comment', captures[2]);
tok.buffer = '-' != captures[1];
return tok;
}
},
/**
* Tag.
*/
tag: function() {
var captures;
if (captures = /^(\w[-:\w]*)/.exec(this.input)) {
this.consume(captures[0].length);
var tok, name = captures[1];
if (':' == name[name.length - 1]) {
name = name.slice(0, -1);
tok = this.tok('tag', name);
this.deferredTokens.push(this.tok(':'));
while (' ' == this.input[0]) this.input = this.input.substr(1);
} else {
tok = this.tok('tag', name);
}
return tok;
}
},
/**
* Filter.
*/
filter: function() {
return this.scan(/^:(\w+)/, 'filter');
},
/**
* Doctype.
*/
doctype: function() {
return this.scan(/^(?:!!!|doctype) *(\w+)?/, 'doctype');
},
/**
* Id.
*/
id: function() {
return this.scan(/^#([\w-]+)/, 'id');
},
/**
* Class.
*/
className: function() {
return this.scan(/^\.([\w-]+)/, 'class');
},
/**
* Text.
*/
text: function() {
return this.scan(/^(?:\| ?)?([^\n]+)/, 'text');
},
/**
* Include.
*/
include: function() {
return this.scan(/^include +([^\n]+)/, 'include');
},
/**
* Mixin.
*/
mixin: function(){
var captures;
if (captures = /^mixin +([-\w]+)(?:\(([^\)]+)\))?/.exec(this.input)) {
this.consume(captures[0].length);
var tok = this.tok('mixin', captures[1]);
tok.args = captures[2];
return tok;
}
},
/**
* Conditional.
*/
conditional: function() {
var captures;
if (captures = /^(if|unless|else if|else)\b([^\n]*)/.exec(this.input)) {
this.consume(captures[0].length);
var type = captures[1]
, js = captures[2];
switch (type) {
case 'if': js = 'if (' + js + ')'; break;
case 'unless': js = 'if (!(' + js + '))'; break;
case 'else if': js = 'else if (' + js + ')'; break;
case 'else': js = 'else'; break;
}
return this.tok('code', js);
}
},
/**
* Each.
*/
each: function() {
var captures;
if (captures = /^(?:- *)?(?:each|for) +(\w+)(?: *, *(\w+))? * in *([^\n]+)/.exec(this.input)) {
this.consume(captures[0].length);
var tok = this.tok('each', captures[1]);
tok.key = captures[2] || 'index';
tok.code = captures[3];
return tok;
}
},
/**
* Code.
*/
code: function() {
var captures;
if (captures = /^(!?=|-)([^\n]+)/.exec(this.input)) {
this.consume(captures[0].length);
var flags = captures[1];
captures[1] = captures[2];
var tok = this.tok('code', captures[1]);
tok.escape = flags[0] === '=';
tok.buffer = flags[0] === '=' || flags[1] === '=';
return tok;
}
},
/**
* Attributes.
*/
attrs: function() {
if ('(' == this.input[0]) {
var index = this.indexOfDelimiters('(', ')')
, str = this.input.substr(1, index-1)
, tok = this.tok('attrs')
, len = str.length
, colons = this.colons
, states = ['key']
, key = ''
, val = ''
, quote
, c;
function state(){
return states[states.length - 1];
}
function interpolate(attr) {
return attr.replace(/#\{([^}]+)\}/g, function(_, expr){
return quote + " + (" + expr + ") + " + quote;
});
}
this.consume(index + 1);
tok.attrs = {};
function parse(c) {
var real = c;
// TODO: remove when people fix ":"
if (colons && ':' == c) c = '=';
switch (c) {
case ',':
case '\n':
switch (state()) {
case 'expr':
case 'array':
case 'string':
case 'object':
val += c;
break;
default:
states.push('key');
val = val.trim();
key = key.trim();
if ('' == key) return;
tok.attrs[key.replace(/^['"]|['"]$/g, '')] = '' == val
? true
: interpolate(val);
key = val = '';
}
break;
case '=':
switch (state()) {
case 'key char':
key += real;
break;
case 'val':
case 'expr':
case 'array':
case 'string':
case 'object':
val += real;
break;
default:
states.push('val');
}
break;
case '(':
if ('val' == state()) states.push('expr');
val += c;
break;
case ')':
if ('expr' == state()) states.pop();
val += c;
break;
case '{':
if ('val' == state()) states.push('object');
val += c;
break;
case '}':
if ('object' == state()) states.pop();
val += c;
break;
case '[':
if ('val' == state()) states.push('array');
val += c;
break;
case ']':
if ('array' == state()) states.pop();
val += c;
break;
case '"':
case "'":
switch (state()) {
case 'key':
states.push('key char');
break;
case 'key char':
states.pop();
break;
case 'string':
if (c == quote) states.pop();
val += c;
break;
default:
states.push('string');
val += c;
quote = c;
}
break;
case '':
break;
default:
switch (state()) {
case 'key':
case 'key char':
key += c;
break;
default:
val += c;
}
}
}
for (var i = 0; i < len; ++i) {
parse(str[i]);
}
parse(',');
return tok;
}
},
/**
* Indent | Outdent | Newline.
*/
indent: function() {
var captures, re;
// established regexp
if (this.indentRe) {
captures = this.indentRe.exec(this.input);
// determine regexp
} else {
// tabs
re = /^\n(\t*) */;
captures = re.exec(this.input);
// spaces
if (captures && !captures[1].length) {
re = /^\n( *)/;
captures = re.exec(this.input);
}
// established
if (captures && captures[1].length) this.indentRe = re;
}
if (captures) {
var tok
, indents = captures[1].length;
++this.lineno;
this.consume(indents + 1);
if (' ' == this.input[0] || '\t' == this.input[0]) {
throw new Error('Invalid indentation, you can use tabs or spaces but not both');
}
// blank line
if ('\n' == this.input[0]) return this.tok('newline');
// outdent
if (this.indentStack.length && indents < this.indentStack[0]) {
while (this.indentStack.length && this.indentStack[0] > indents) {
this.stash.push(this.tok('outdent'));
this.indentStack.shift();
}
tok = this.stash.pop();
// indent
} else if (indents && indents != this.indentStack[0]) {
this.indentStack.unshift(indents);
tok = this.tok('indent', indents);
// newline
} else {
tok = this.tok('newline');
}
return tok;
}
},
/**
* Pipe-less text consumed only when
* pipeless is true;
*/
pipelessText: function() {
if (this.pipeless) {
if ('\n' == this.input[0]) return;
var i = this.input.indexOf('\n');
if (-1 == i) i = this.input.length;
var str = this.input.substr(0, i);
this.consume(str.length);
return this.tok('text', str);
}
},
/**
* ':'
*/
colon: function() {
return this.scan(/^: */, ':');
},
/**
* Return the next token object, or those
* previously stashed by lookahead.
*
* @return {Object}
* @api private
*/
advance: function(){
return this.stashed()
|| this.next();
},
/**
* Return the next token object.
*
* @return {Object}
* @api private
*/
next: function() {
return this.deferred()
|| this.eos()
|| this.pipelessText()
|| this.doctype()
|| this.include()
|| this.mixin()
|| this.conditional()
|| this.each()
|| this.tag()
|| this.filter()
|| this.code()
|| this.id()
|| this.className()
|| this.attrs()
|| this.indent()
|| this.comment()
|| this.colon()
|| this.text();
}
};
}); // module: lexer.js
require.register("nodes/block-comment.js", function(module, exports, require){
/*!
* Jade - nodes - BlockComment
* Copyright(c) 2010 TJ Holowaychuk <tj@vision-media.ca>
* MIT Licensed
*/
/**
* Module dependencies.
*/
var Node = require('./node');
/**
* Initialize a `BlockComment` with the given `block`.
*
* @param {String} val
* @param {Block} block
* @param {Boolean} buffer
* @api public
*/
var BlockComment = module.exports = function BlockComment(val, block, buffer) {
this.block = block;
this.val = val;
this.buffer = buffer;
};
/**
* Inherit from `Node`.
*/
BlockComment.prototype = new Node;
BlockComment.prototype.constructor = BlockComment;
}); // module: nodes/block-comment.js
require.register("nodes/block.js", function(module, exports, require){
/*!
* Jade - nodes - Block
* Copyright(c) 2010 TJ Holowaychuk <tj@vision-media.ca>
* MIT Licensed
*/
/**
* Module dependencies.
*/
var Node = require('./node');
/**
* Initialize a new `Block` with an optional `node`.
*
* @param {Node} node
* @api public
*/
var Block = module.exports = function Block(node){
this.nodes = [];
if (node) this.push(node);
};
/**
* Inherit from `Node`.
*/
Block.prototype = new Node;
Block.prototype.constructor = Block;
/**
* Pust the given `node`.
*
* @param {Node} node
* @return {Number}
* @api public
*/
Block.prototype.push = function(node){
return this.nodes.push(node);
};
/**
* Unshift the given `node`.
*
* @param {Node} node
* @return {Number}
* @api public
*/
Block.prototype.unshift = function(node){
return this.nodes.unshift(node);
};
}); // module: nodes/block.js
require.register("nodes/code.js", function(module, exports, require){
/*!
* Jade - nodes - Code
* Copyright(c) 2010 TJ Holowaychuk <tj@vision-media.ca>
* MIT Licensed
*/
/**
* Module dependencies.
*/
var Node = require('./node');
/**
* Initialize a `Code` node with the given code `val`.
* Code may also be optionally buffered and escaped.
*
* @param {String} val
* @param {Boolean} buffer
* @param {Boolean} escape
* @api public
*/
var Code = module.exports = function Code(val, buffer, escape) {
this.val = val;
this.buffer = buffer;
this.escape = escape;
if (/^ *else/.test(val)) this.instrumentLineNumber = false;
};
/**
* Inherit from `Node`.
*/
Code.prototype = new Node;
Code.prototype.constructor = Code;
}); // module: nodes/code.js
require.register("nodes/comment.js", function(module, exports, require){
/*!
* Jade - nodes - Comment
* Copyright(c) 2010 TJ Holowaychuk <tj@vision-media.ca>
* MIT Licensed
*/
/**
* Module dependencies.
*/
var Node = require('./node');
/**
* Initialize a `Comment` with the given `val`, optionally `buffer`,
* otherwise the comment may render in the output.
*
* @param {String} val
* @param {Boolean} buffer
* @api public
*/
var Comment = module.exports = function Comment(val, buffer) {
this.val = val;
this.buffer = buffer;
};
/**
* Inherit from `Node`.
*/
Comment.prototype = new Node;
Comment.prototype.constructor = Comment;
}); // module: nodes/comment.js
require.register("nodes/doctype.js", function(module, exports, require){
/*!
* Jade - nodes - Doctype
* Copyright(c) 2010 TJ Holowaychuk <tj@vision-media.ca>
* MIT Licensed
*/
/**
* Module dependencies.
*/
var Node = require('./node');
/**
* Initialize a `Doctype` with the given `val`.
*
* @param {String} val
* @api public
*/
var Doctype = module.exports = function Doctype(val) {
this.val = val;
};
/**
* Inherit from `Node`.
*/
Doctype.prototype = new Node;
Doctype.prototype.constructor = Doctype;
}); // module: nodes/doctype.js
require.register("nodes/each.js", function(module, exports, require){
/*!
* Jade - nodes - Each
* Copyright(c) 2010 TJ Holowaychuk <tj@vision-media.ca>
* MIT Licensed
*/
/**
* Module dependencies.
*/
var Node = require('./node');
/**
* Initialize an `Each` node, representing iteration
*
* @param {String} obj
* @param {String} val
* @param {String} key
* @param {Block} block
* @api public
*/
var Each = module.exports = function Each(obj, val, key, block) {
this.obj = obj;
this.val = val;
this.key = key;
this.block = block;
};
/**
* Inherit from `Node`.
*/
Each.prototype = new Node;
Each.prototype.constructor = Each;
}); // module: nodes/each.js
require.register("nodes/filter.js", function(module, exports, require){
/*!
* Jade - nodes - Filter
* Copyright(c) 2010 TJ Holowaychuk <tj@vision-media.ca>
* MIT Licensed
*/
/**
* Module dependencies.
*/
var Node = require('./node')
, Block = require('./block');
/**
* Initialize a `Filter` node with the given
* filter `name` and `block`.
*
* @param {String} name
* @param {Block|Node} block
* @api public
*/
var Filter = module.exports = function Filter(name, block, attrs) {
this.name = name;
this.block = block;
this.attrs = attrs;
this.isASTFilter = block instanceof Block;
};
/**
* Inherit from `Node`.
*/
Filter.prototype = new Node;
Filter.prototype.constructor = Filter;
}); // module: nodes/filter.js
require.register("nodes/index.js", function(module, exports, require){
/*!
* Jade - nodes
* Copyright(c) 2010 TJ Holowaychuk <tj@vision-media.ca>
* MIT Licensed
*/
exports.Node = require('./node');
exports.Tag = require('./tag');
exports.Code = require('./code');
exports.Each = require('./each');
exports.Text = require('./text');
exports.Block = require('./block');
exports.Mixin = require('./mixin');
exports.Filter = require('./filter');
exports.Comment = require('./comment');
exports.Literal = require('./literal');
exports.BlockComment = require('./block-comment');
exports.Doctype = require('./doctype');
}); // module: nodes/index.js
require.register("nodes/literal.js", function(module, exports, require){
/*!
* Jade - nodes - Literal
* Copyright(c) 2010 TJ Holowaychuk <tj@vision-media.ca>
* MIT Licensed
*/
/**
* Module dependencies.
*/
var Node = require('./node');
/**
* Initialize a `Literal` node with the given `str.
*
* @param {String} str
* @api public
*/
var Literal = module.exports = function Literal(str) {
this.str = str;
};
/**
* Inherit from `Node`.
*/
Literal.prototype = new Node;
Literal.prototype.constructor = Literal;
}); // module: nodes/literal.js
require.register("nodes/mixin.js", function(module, exports, require){
/*!
* Jade - nodes - Mixin
* Copyright(c) 2010 TJ Holowaychuk <tj@vision-media.ca>
* MIT Licensed
*/
/**
* Module dependencies.
*/
var Node = require('./node');
/**
* Initialize a new `Mixin` with `name` and `block`.
*
* @param {String} name
* @param {String} args
* @param {Block} block
* @api public
*/
var Mixin = module.exports = function Mixin(name, args, block){
this.name = name;
this.args = args;
this.block = block;
};
/**
* Inherit from `Node`.
*/
Mixin.prototype = new Node;
Mixin.prototype.constructor = Mixin;
}); // module: nodes/mixin.js
require.register("nodes/node.js", function(module, exports, require){
/*!
* Jade - nodes - Node
* Copyright(c) 2010 TJ Holowaychuk <tj@vision-media.ca>
* MIT Licensed
*/
/**
* Initialize a `Node`.
*
* @api public
*/
var Node = module.exports = function Node(){};
}); // module: nodes/node.js
require.register("nodes/tag.js", function(module, exports, require){
/*!
* Jade - nodes - Tag
* Copyright(c) 2010 TJ Holowaychuk <tj@vision-media.ca>
* MIT Licensed
*/
/**
* Module dependencies.
*/
var Node = require('./node'),
Block = require('./block');
/**
* Initialize a `Tag` node with the given tag `name` and optional `block`.
*
* @param {String} name
* @param {Block} block
* @api public
*/
var Tag = module.exports = function Tag(name, block) {
this.name = name;
this.attrs = [];
this.block = block || new Block;
};
/**
* Inherit from `Node`.
*/
Tag.prototype = new Node;
Tag.prototype.constructor = Tag;
/**
* Set attribute `name` to `val`, keep in mind these become
* part of a raw js object literal, so to quote a value you must
* '"quote me"', otherwise or example 'user.name' is literal JavaScript.
*
* @param {String} name
* @param {String} val
* @return {Tag} for chaining
* @api public
*/
Tag.prototype.setAttribute = function(name, val){
this.attrs.push({ name: name, val: val });
return this;
};
/**
* Remove attribute `name` when present.
*
* @param {String} name
* @api public
*/
Tag.prototype.removeAttribute = function(name){
for (var i = 0, len = this.attrs.length; i < len; ++i) {
if (this.attrs[i] && this.attrs[i].name == name) {
delete this.attrs[i];
}
}
};
/**
* Get attribute value by `name`.
*
* @param {String} name
* @return {String}
* @api public
*/
Tag.prototype.getAttribute = function(name){
for (var i = 0, len = this.attrs.length; i < len; ++i) {
if (this.attrs[i] && this.attrs[i].name == name) {
return this.attrs[i].val;
}
}
};
}); // module: nodes/tag.js
require.register("nodes/text.js", function(module, exports, require){
/*!
* Jade - nodes - Text
* Copyright(c) 2010 TJ Holowaychuk <tj@vision-media.ca>
* MIT Licensed
*/
/**
* Module dependencies.
*/
var Node = require('./node');
/**
* Initialize a `Text` node with optional `line`.
*
* @param {String} line
* @api public
*/
var Text = module.exports = function Text(line) {
this.nodes = [];
if ('string' == typeof line) this.push(line);
};
/**
* Inherit from `Node`.
*/
Text.prototype = new Node;
Text.prototype.constructor = Text;
/**
* Push the given `node.`
*
* @param {Node} node
* @return {Number}
* @api public
*/
Text.prototype.push = function(node){
return this.nodes.push(node);
};
}); // module: nodes/text.js
require.register("parser.js", function(module, exports, require){
/*!
* Jade - Parser
* Copyright(c) 2010 TJ Holowaychuk <tj@vision-media.ca>
* MIT Licensed
*/
/**
* Module dependencies.
*/
var Lexer = require('./lexer')
, nodes = require('./nodes');
/**
* Initialize `Parser` with the given input `str` and `filename`.
*
* @param {String} str
* @param {String} filename
* @param {Object} options
* @api public
*/
var Parser = exports = module.exports = function Parser(str, filename, options){
this.input = str;
this.lexer = new Lexer(str, options);
this.filename = filename;
};
/**
* Tags that may not contain tags.
*/
var textOnly = exports.textOnly = ['code', 'script', 'textarea', 'style', 'title'];
/**
* Parser prototype.
*/
Parser.prototype = {
/**
* Return the next token object.
*
* @return {Object}
* @api private
*/
advance: function(){
return this.lexer.advance();
},
/**
* Skip `n` tokens.
*
* @param {Number} n
* @api private
*/
skip: function(n){
while (n--) this.advance();
},
/**
* Single token lookahead.
*
* @return {Object}
* @api private
*/
peek: function() {
return this.lookahead(1);
},
/**
* Return lexer lineno.
*
* @return {Number}
* @api private
*/
line: function() {
return this.lexer.lineno;
},
/**
* `n` token lookahead.
*
* @param {Number} n
* @return {Object}
* @api private
*/
lookahead: function(n){
return this.lexer.lookahead(n);
},
/**
* Parse input returning a string of js for evaluation.
*
* @return {String}
* @api public
*/
parse: function(){
var block = new nodes.Block;
block.line = this.line();
while ('eos' != this.peek().type) {
if ('newline' == this.peek().type) {
this.advance();
} else {
block.push(this.parseExpr());
}
}
return block;
},
/**
* Expect the given type, or throw an exception.
*
* @param {String} type
* @api private
*/
expect: function(type){
if (this.peek().type === type) {
return this.advance();
} else {
throw new Error('expected "' + type + '", but got "' + this.peek().type + '"');
}
},
/**
* Accept the given `type`.
*
* @param {String} type
* @api private
*/
accept: function(type){
if (this.peek().type === type) {
return this.advance();
}
},
/**
* tag
* | doctype
* | mixin
* | include
* | filter
* | comment
* | text
* | each
* | code
* | id
* | class
*/
parseExpr: function(){
switch (this.peek().type) {
case 'tag':
return this.parseTag();
case 'mixin':
return this.parseMixin();
case 'include':
return this.parseInclude();
case 'doctype':
return this.parseDoctype();
case 'filter':
return this.parseFilter();
case 'comment':
return this.parseComment();
case 'text':
return this.parseText();
case 'each':
return this.parseEach();
case 'code':
return this.parseCode();
case 'id':
case 'class':
var tok = this.advance();
this.lexer.defer(this.lexer.tok('tag', 'div'));
this.lexer.defer(tok);
return this.parseExpr();
default:
throw new Error('unexpected token "' + this.peek().type + '"');
}
},
/**
* Text
*/
parseText: function(){
var tok = this.expect('text')
, node = new nodes.Text(tok.val);
node.line = this.line();
return node;
},
/**
* code
*/
parseCode: function(){
var tok = this.expect('code')
, node = new nodes.Code(tok.val, tok.buffer, tok.escape)
, block
, i = 1;
node.line = this.line();
while (this.lookahead(i) && 'newline' == this.lookahead(i).type) ++i;
block = 'indent' == this.lookahead(i).type;
if (block) {
this.skip(i-1);
node.block = this.parseBlock();
}
return node;
},
/**
* comment
*/
parseComment: function(){
var tok = this.expect('comment')
, node;
if ('indent' == this.peek().type) {
node = new nodes.BlockComment(tok.val, this.parseBlock(), tok.buffer);
} else {
node = new nodes.Comment(tok.val, tok.buffer);
}
node.line = this.line();
return node;
},
/**
* doctype
*/
parseDoctype: function(){
var tok = this.expect('doctype')
, node = new nodes.Doctype(tok.val);
node.line = this.line();
return node;
},
/**
* filter attrs? text-block
*/
parseFilter: function(){
var block
, tok = this.expect('filter')
, attrs = this.accept('attrs');
this.lexer.pipeless = true;
block = this.parseTextBlock();
this.lexer.pipeless = false;
var node = new nodes.Filter(tok.val, block, attrs && attrs.attrs);
node.line = this.line();
return node;
},
/**
* tag ':' attrs? block
*/
parseASTFilter: function(){
var block
, tok = this.expect('tag')
, attrs = this.accept('attrs');
this.expect(':');
block = this.parseBlock();
var node = new nodes.Filter(tok.val, block, attrs && attrs.attrs);
node.line = this.line();
return node;
},
/**
* each block
*/
parseEach: function(){
var tok = this.expect('each')
, node = new nodes.Each(tok.code, tok.val, tok.key, this.parseBlock());
node.line = this.line();
return node;
},
/**
* include
*/
parseInclude: function(){
var path = require('path')
, fs = require('fs')
, dirname = path.dirname
, basename = path.basename
, join = path.join;
if (!this.filename)
throw new Error('the "filename" option is required to use includes');
var path = name = this.expect('include').val.trim()
, dir = dirname(this.filename);
// non-jade
if (~basename(path).indexOf('.')) {
var path = join(dir, path)
, str = fs.readFileSync(path, 'utf8');
return new nodes.Literal(str);
}
var path = join(dir, path + '.jade')
, str = fs.readFileSync(path, 'utf8')
, parser = new Parser(str, path)
, ast = parser.parse();
return ast;
},
/**
* mixin block
*/
parseMixin: function(){
var tok = this.expect('mixin')
, name = tok.val
, args = tok.args;
var block = 'indent' == this.peek().type
? this.parseBlock()
: null;
return new nodes.Mixin(name, args, block);
},
/**
* indent (text | newline)* outdent
*/
parseTextBlock: function(){
var text = new nodes.Text;
text.line = this.line();
var spaces = this.expect('indent').val;
if (null == this._spaces) this._spaces = spaces;
var indent = Array(spaces - this._spaces + 1).join(' ');
while ('outdent' != this.peek().type) {
switch (this.peek().type) {
case 'newline':
text.push('\\n');
this.advance();
break;
case 'indent':
text.push('\\n');
this.parseTextBlock().nodes.forEach(function(node){
text.push(node);
});
text.push('\\n');
break;
default:
text.push(indent + this.advance().val);
}
}
if (spaces == this._spaces) this._spaces = null;
this.expect('outdent');
return text;
},
/**
* indent expr* outdent
*/
parseBlock: function(){
var block = new nodes.Block;
block.line = this.line();
this.expect('indent');
while ('outdent' != this.peek().type) {
if ('newline' == this.peek().type) {
this.advance();
} else {
block.push(this.parseExpr());
}
}
this.expect('outdent');
return block;
},
/**
* tag (attrs | class | id)* (text | code | ':')? newline* block?
*/
parseTag: function(){
// ast-filter look-ahead
var i = 2;
if ('attrs' == this.lookahead(i).type) ++i;
if (':' == this.lookahead(i).type) {
if ('indent' == this.lookahead(++i).type) {
return this.parseASTFilter();
}
}
var name = this.advance().val
, tag = new nodes.Tag(name);
tag.line = this.line();
// (attrs | class | id)*
out:
while (true) {
switch (this.peek().type) {
case 'id':
case 'class':
var tok = this.advance();
tag.setAttribute(tok.type, "'" + tok.val + "'");
continue;
case 'attrs':
var obj = this.advance().attrs
, names = Object.keys(obj);
for (var i = 0, len = names.length; i < len; ++i) {
var name = names[i]
, val = obj[name];
tag.setAttribute(name, val);
}
continue;
default:
break out;
}
}
// check immediate '.'
if ('.' == this.peek().val) {
tag.textOnly = true;
this.advance();
}
// (text | code | ':')?
switch (this.peek().type) {
case 'text':
tag.text = this.parseText();
break;
case 'code':
tag.code = this.parseCode();
break;
case ':':
this.advance();
tag.block = new nodes.Block;
tag.block.push(this.parseTag());
break;
}
// newline*
while ('newline' == this.peek().type) this.advance();
tag.textOnly = tag.textOnly || ~textOnly.indexOf(tag.name);
// script special-case
if ('script' == tag.name) {
var type = tag.getAttribute('type');
if (!tag.textOnly && type && 'text/javascript' != type.replace(/^['"]|['"]$/g, '')) {
tag.textOnly = false;
}
}
// block?
if ('indent' == this.peek().type) {
if (tag.textOnly) {
this.lexer.pipeless = true;
tag.block = this.parseTextBlock();
this.lexer.pipeless = false;
} else {
var block = this.parseBlock();
if (tag.block) {
for (var i = 0, len = block.nodes.length; i < len; ++i) {
tag.block.push(block.nodes[i]);
}
} else {
tag.block = block;
}
}
}
return tag;
}
};
}); // module: parser.js
require.register("runtime.js", function(module, exports, require){
/*!
* Jade - runtime
* Copyright(c) 2010 TJ Holowaychuk <tj@vision-media.ca>
* MIT Licensed
*/
/**
* Lame Array.isArray() polyfill for now.
*/
if (!Array.isArray) {
Array.isArray = function(arr){
return '[object Array]' == toString.call(arr);
};
}
/**
* Lame Object.keys() polyfill for now.
*/
if (!Object.keys) {
Object.keys = function(obj){
var arr = [];
for (var key in obj) {
if (obj.hasOwnProperty(key)) {
arr.push(obj);
}
}
return arr;
}
}
/**
* Render the given attributes object.
*
* @param {Object} obj
* @return {String}
* @api private
*/
exports.attrs = function attrs(obj){
var buf = []
, terse = obj.terse;
delete obj.terse;
var keys = Object.keys(obj)
, len = keys.length;
if (len) {
buf.push('');
for (var i = 0; i < len; ++i) {
var key = keys[i]
, val = obj[key];
if ('boolean' == typeof val || null == val) {
if (val) {
terse
? buf.push(key)
: buf.push(key + '="' + key + '"');
}
} else if ('class' == key && Array.isArray(val)) {
buf.push(key + '="' + exports.escape(val.join(' ')) + '"');
} else {
buf.push(key + '="' + exports.escape(val) + '"');
}
}
}
return buf.join(' ');
};
/**
* Escape the given string of `html`.
*
* @param {String} html
* @return {String}
* @api private
*/
exports.escape = function escape(html){
return String(html)
.replace(/&(?!\w+;)/g, '&')
.replace(/</g, '<')
.replace(/>/g, '>')
.replace(/"/g, '"');
};
/**
* Re-throw the given `err` in context to the
* `str` of jade, `filename`, and `lineno`.
*
* @param {Error} err
* @param {String} str
* @param {String} filename
* @param {String} lineno
* @api private
*/
exports.rethrow = function rethrow(err, str, filename, lineno){
var context = 3
, lines = str.split('\n')
, start = Math.max(lineno - context, 0)
, end = Math.min(lines.length, lineno + context);
// Error context
var context = lines.slice(start, end).map(function(line, i){
var curr = i + start + 1;
return (curr == lineno ? ' > ' : ' ')
+ curr
+ '| '
+ line;
}).join('\n');
// Alter exception message
err.path = filename;
err.message = (filename || 'Jade') + ':' + lineno
+ '\n' + context + '\n\n' + err.message;
throw err;
};
}); // module: runtime.js
require.register("self-closing.js", function(module, exports, require){
/*!
* Jade - self closing tags
* Copyright(c) 2010 TJ Holowaychuk <tj@vision-media.ca>
* MIT Licensed
*/
module.exports = [
'meta'
, 'img'
, 'link'
, 'input'
, 'area'
, 'base'
, 'col'
, 'br'
, 'hr'
];
}); // module: self-closing.js
require.register("utils.js", function(module, exports, require){
/*!
* Jade - utils
* Copyright(c) 2010 TJ Holowaychuk <tj@vision-media.ca>
* MIT Licensed
*/
/**
* Convert interpolation in the given string to JavaScript.
*
* @param {String} str
* @return {String}
* @api private
*/
var interpolate = exports.interpolate = function(str){
return str.replace(/(\\)?([#!]){(.*?)}/g, function(str, escape, flag, code){
return escape
? str
: "' + "
+ ('!' == flag ? '' : 'escape')
+ "((interp = " + code.replace(/\\'/g, "'")
+ ") == null ? '' : interp) + '";
});
};
/**
* Escape single quotes in `str`.
*
* @param {String} str
* @return {String}
* @api private
*/
var escape = exports.escape = function(str) {
return str.replace(/'/g, "\\'");
};
/**
* Interpolate, and escape the given `str`.
*
* @param {String} str
* @return {String}
* @api private
*/
exports.text = function(str){
return interpolate(escape(str));
};
}); // module: utils.js
| drewfreyling/cdnjs | ajax/libs/jade/0.15.3/jade.js | JavaScript | mit | 54,758 |
/*! angular-google-maps 2.0.18 2015-03-27
* AngularJS directives for Google Maps
* git: https://github.com/angular-ui/angular-google-maps.git
*/
!function(a,b,c){"use strict";(function(){b.module("uiGmapgoogle-maps.providers",[]),b.module("uiGmapgoogle-maps.wrapped",[]),b.module("uiGmapgoogle-maps.extensions",["uiGmapgoogle-maps.wrapped","uiGmapgoogle-maps.providers"]),b.module("uiGmapgoogle-maps.directives.api.utils",["uiGmapgoogle-maps.extensions"]),b.module("uiGmapgoogle-maps.directives.api.managers",[]),b.module("uiGmapgoogle-maps.directives.api.options",["uiGmapgoogle-maps.directives.api.utils"]),b.module("uiGmapgoogle-maps.directives.api.options.builders",[]),b.module("uiGmapgoogle-maps.directives.api.models.child",["uiGmapgoogle-maps.directives.api.utils","uiGmapgoogle-maps.directives.api.options","uiGmapgoogle-maps.directives.api.options.builders"]),b.module("uiGmapgoogle-maps.directives.api.models.parent",["uiGmapgoogle-maps.directives.api.managers","uiGmapgoogle-maps.directives.api.models.child","uiGmapgoogle-maps.providers"]),b.module("uiGmapgoogle-maps.directives.api",["uiGmapgoogle-maps.directives.api.models.parent"]),b.module("uiGmapgoogle-maps",["uiGmapgoogle-maps.directives.api","uiGmapgoogle-maps.providers"])}).call(this),function(){b.module("uiGmapgoogle-maps.providers").factory("uiGmapMapScriptLoader",["$q","uiGmapuuid",function(c,d){var e,f,g,h;return h=void 0,e=function(a){return a.china?"http://maps.google.cn/maps/api/js?":"https://maps.googleapis.com/maps/api/js?"},f=function(a){var b,c;return b=_.map(a,function(a,b){return b+"="+a}),h&&document.getElementById(h).remove(),b=b.join("&"),c=document.createElement("script"),c.id=h="ui_gmap_map_load_"+d.generate(),c.type="text/javascript",c.src=e(a)+b,document.body.appendChild(c)},g=function(){return b.isDefined(a.google)&&b.isDefined(a.google.maps)},{load:function(b){var d,e;return d=c.defer(),g()?(d.resolve(a.google.maps),d.promise):(e=b.callback="onGoogleMapsReady"+Math.round(1e3*Math.random()),a[e]=function(){a[e]=null,d.resolve(a.google.maps)},a.navigator.connection&&a.Connection&&a.navigator.connection.type===a.Connection.NONE?document.addEventListener("online",function(){return g()?void 0:f(b)}):f(b),d.promise)}}}]).provider("uiGmapGoogleMapApi",function(){return this.options={china:!1,v:"3.17",libraries:"",language:"en",sensor:"false"},this.configure=function(a){b.extend(this.options,a)},this.$get=["uiGmapMapScriptLoader",function(a){return function(b){return b.load(a.options)}}(this)],this})}.call(this),function(){b.module("uiGmapgoogle-maps.extensions").service("uiGmapExtendGWin",function(){return{init:_.once(function(){return google||("undefined"!=typeof google&&null!==google?google.maps:void 0)||null!=google.maps.InfoWindow?(google.maps.InfoWindow.prototype._open=google.maps.InfoWindow.prototype.open,google.maps.InfoWindow.prototype._close=google.maps.InfoWindow.prototype.close,google.maps.InfoWindow.prototype._isOpen=!1,google.maps.InfoWindow.prototype.open=function(a,b,c){null==c&&(this._isOpen=!0,this._open(a,b,!0))},google.maps.InfoWindow.prototype.close=function(a){null==a&&(this._isOpen=!1,this._close(!0))},google.maps.InfoWindow.prototype.isOpen=function(a){return null==a&&(a=void 0),null==a?this._isOpen:this._isOpen=a},a.InfoBox&&(a.InfoBox.prototype._open=a.InfoBox.prototype.open,a.InfoBox.prototype._close=a.InfoBox.prototype.close,a.InfoBox.prototype._isOpen=!1,a.InfoBox.prototype.open=function(a,b){this._isOpen=!0,this._open(a,b)},a.InfoBox.prototype.close=function(){this._isOpen=!1,this._close()},a.InfoBox.prototype.isOpen=function(a){return null==a&&(a=void 0),null==a?this._isOpen:this._isOpen=a}),a.MarkerLabel_?a.MarkerLabel_.prototype.setContent=function(){var a;a=this.marker_.get("labelContent"),a&&!_.isEqual(this.oldContent,a)&&("undefined"==typeof(null!=a?a.nodeType:void 0)?(this.labelDiv_.innerHTML=a,this.eventDiv_.innerHTML=this.labelDiv_.innerHTML,this.oldContent=a):(this.labelDiv_.innerHTML="",this.labelDiv_.appendChild(a),a=a.cloneNode(!0),this.labelDiv_.innerHTML="",this.eventDiv_.appendChild(a),this.oldContent=a))}:void 0):void 0})}})}.call(this),function(){b.module("uiGmapgoogle-maps.extensions").service("uiGmapLodash",function(){return this.intersectionObjects=function(a,b,c){var d;return null==c&&(c=void 0),d=_.map(a,function(){return function(a){return _.find(b,function(b){return null!=c?c(a,b):_.isEqual(a,b)})}}(this)),_.filter(d,function(a){return null!=a})},this.containsObject=_.includeObject=function(a,b,c){return null==c&&(c=void 0),null===a?!1:_.any(a,function(){return function(a){return null!=c?c(a,b):_.isEqual(a,b)}}(this))},this.differenceObjects=function(a,b,c){return null==c&&(c=void 0),_.filter(a,function(a){return function(d){return!a.containsObject(b,d,c)}}(this))},this.withoutObjects=this.differenceObjects,this.indexOfObject=function(a,b,c,d){var e,f;if(null==a)return-1;if(e=0,f=a.length,d){if("number"!=typeof d)return e=_.sortedIndex(a,b),a[e]===b?e:-1;e=0>d?Math.max(0,f+d):d}for(;f>e;){if(null!=c){if(c(a[e],b))return e}else if(_.isEqual(a[e],b))return e;e++}return-1},this["extends"]=function(a){return _.reduce(a,function(a,b){return _.extend(a,b)},{})},this.isNullOrUndefined=function(a){return _.isNull(a||_.isUndefined(a))},this})}.call(this),function(){b.module("uiGmapgoogle-maps.extensions").factory("uiGmapString",function(){return function(a){return this.contains=function(b,c){return-1!==a.indexOf(b,c)},this}})}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api.utils").service("uiGmap_sync",[function(){return{fakePromise:function(){var a;return a=void 0,{then:function(b){return a=b},resolve:function(){return a.apply(void 0,arguments)}}}}}]).service("uiGmap_async",["$timeout","uiGmapPromise","uiGmapLogger","$q","uiGmapDataStructures","uiGmapGmapUtil",function(a,c,d,e,f,g){var h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;return y=c.promiseTypes,r=c.isInProgress,x=c.promiseStatus,h=c.ExposedPromise,j=c.SniffedPromise,s=function(a,b){var c;return c=a.promise(),c.promiseType=a.promiseType,c.$$state&&d.debug("promiseType: "+c.promiseType+", state: "+x(c.$$state.status)),c.cancelCb=b,c},o=function(a,b){return a.promiseType===y.create&&b.promiseType!==y["delete"]&&b.promiseType!==y.init?(d.debug("lastPromise.promiseType "+b.promiseType+", newPromiseType: "+a.promiseType+", SKIPPED MUST COME AFTER DELETE ONLY"),!0):!1},w=function(a,b,c){var e;return b.promiseType===y["delete"]&&c.promiseType!==y["delete"]&&null!=c.cancelCb&&_.isFunction(c.cancelCb)&&r(c)&&(d.debug("promiseType: "+b.promiseType+", CANCELING LAST PROMISE type: "+c.promiseType),c.cancelCb("cancel safe"),e=a.peek(),null!=e&&r(e))?e.hasOwnProperty("cancelCb")&&_.isFunction(e.cancelCb)?(d.debug("promiseType: "+e.promiseType+", CANCELING FIRST PROMISE type: "+e.promiseType),e.cancelCb("cancel safe")):d.warn("first promise was not cancelable"):void 0},i=function(a,b,c){var d,e;if(a.existingPieces){if(d=_.last(a.existingPieces._content),o(b,d))return;return w(a.existingPieces,b,d),e=h(d["finally"](function(){return s(b,c)})),e.cancelCb=c,e.promiseType=b.promiseType,a.existingPieces.enqueue(e),d["finally"](function(){return a.existingPieces.dequeue()})}return a.existingPieces=new f.Queue,a.existingPieces.enqueue(s(b,c))},u=function(a,b,c,e,f){var g;return null==c&&(c=""),g=function(a){return d.debug(a+": "+a),null!=e&&_.isFunction(e)?e(a):void 0},i(a,j(f,b),g)},m=80,q={value:null},z=function(a,b,c){var d;try{return a.apply(b,c)}catch(e){return d=e,q.value=d,q}},t=function(a,b,c,e){var f,g;return g=z(a,b,e),g===q&&(f="error within chunking iterator: "+q.value,d.error(f),c.reject(f)),"cancel safe"===g?!1:!0},l=function(a,b,c){var d,e;return d=a===b,e=b[c],d?e:a[e]},k=function(a,c,d,e){var f;return b.isArray(a)?f=a:(f=c?c:Object.keys(_.omit(a,["length","forEach","map"])),c=f),null==e&&(e=d),b.isArray(f)&&(void 0===f||(null!=f?f.length:void 0)<=0)&&e!==d?d():e(f,c)},n=function(c,d,e,f,g,h,i,j){return k(c,j,function(j,k){var m,o,p,q;for(m=d&&d<j.length?d:j.length,o=i,p=!0;p&&m--&&o<(j?j.length:o+1);)q=l(c,j,o),p=b.isFunction(q)?!0:t(f,void 0,h,[q,o]),++o;if(j){if(!(p&&o<j.length))return h.resolve();if(i=o,d)return null!=g&&_.isFunction(g)&&t(g,void 0,h,[]),a(function(){return n(c,d,e,f,g,h,i,k)},e,!1)}})},p=function(a,b,e,f,g,h,i){var j,l,o;return null==e&&(e=m),null==g&&(g=0),null==h&&(h=1),o=void 0,l=c.defer(),o=l.promise,h?k(a,i,function(){return l.resolve(),o},function(c,d){return n(a,e,h,b,f,l,g,d),o}):(j="pause (delay) must be set from _async!",d.error(j),l.reject(j),o)},v=function(a,b,d,e,f,g,h){var i;return i=[],k(a,h,function(){return c.resolve(i)},function(c,h){return p(a,function(a){return i.push(b(a))},d,e,f,g,h).then(function(){return i})})},{each:p,map:v,managePromiseQueue:u,promiseLock:u,defaultChunkSize:m,chunkSizeFrom:function(a,b){return null==b&&(b=void 0),_.isNumber(a)&&(b=a),(g.isFalse(a)||a===!1)&&(b=!1),b}}}])}.call(this),function(){var a=[].indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(b in this&&this[b]===a)return b;return-1};b.module("uiGmapgoogle-maps.directives.api.utils").factory("uiGmapBaseObject",function(){var b,c;return c=["extended","included"],b=function(){function b(){}return b.extend=function(b){var d,e,f;for(d in b)f=b[d],a.call(c,d)<0&&(this[d]=f);return null!=(e=b.extended)&&e.apply(this),this},b.include=function(b){var d,e,f;for(d in b)f=b[d],a.call(c,d)<0&&(this.prototype[d]=f);return null!=(e=b.included)&&e.apply(this),this},b}()})}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api.utils").factory("uiGmapChildEvents",function(){return{onChildCreation:function(){}}})}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api.utils").service("uiGmapCtrlHandle",["$q",function(a){var b;return b={handle:function(c){return c.$on("$destroy",function(){return b.handle(c)}),c.deferred=a.defer(),{getScope:function(){return c}}},mapPromise:function(a,b){var c;return c=b.getScope(),c.deferred.promise.then(function(b){return a.map=b}),c.deferred.promise}}}])}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api.utils").service("uiGmapEventsHelper",["uiGmapLogger",function(){var a,c;return c=function(a){return b.isDefined(a.events)&&null!=a.events&&b.isObject(a.events)},a=function(a,b){return c(a)?a:c(b)?b:void 0},{setEvents:function(c,d,e,f){var g;return g=a(d,e),null!=g?_.compact(_.map(g.events,function(a,h){var i;return f&&(i=_(f).contains(h)),g.events.hasOwnProperty(h)&&b.isFunction(g.events[h])&&!i?google.maps.event.addListener(c,h,function(){return d.$evalAsync||(d.$evalAsync=function(){}),d.$evalAsync(a.apply(d,[c,h,e,arguments]))}):void 0})):void 0},removeEvents:function(a){return a?a.forEach(function(a){return a?google.maps.event.removeListener(a):void 0}):void 0}}}])}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api.utils").service("uiGmapFitHelper",["uiGmapLogger","uiGmap_async",function(){return{fit:function(a,b){var c,d;return b&&a&&a.length>0&&(c=new google.maps.LatLngBounds,d=!1,a.forEach(function(){return function(a){return a?(d||(d=!0),c.extend(a.getPosition())):void 0}}(this)),d)?b.fitBounds(c):void 0}}}])}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api.utils").service("uiGmapGmapUtil",["uiGmapLogger","$compile",function(a,c){var d,e,f,g,h,i;return e=function(a,b,c){return a===b||-1!==c.indexOf(a)},d=function(a){return e(a,!1,["false","FALSE",0,"n","N","no","NO"])},g=function(a){return Array.isArray(a)&&2===a.length?a[1]:b.isDefined(a.type)&&"Point"===a.type?a.coordinates[1]:a.latitude},h=function(a){return Array.isArray(a)&&2===a.length?a[0]:b.isDefined(a.type)&&"Point"===a.type?a.coordinates[0]:a.longitude},f=function(a){return a?Array.isArray(a)&&2===a.length?new google.maps.LatLng(a[1],a[0]):b.isDefined(a.type)&&"Point"===a.type?new google.maps.LatLng(a.coordinates[1],a.coordinates[0]):new google.maps.LatLng(a.latitude,a.longitude):void 0},i=function(a){if(b.isUndefined(a))return!1;if(_.isArray(a)){if(2===a.length)return!0}else if(null!=a&&(null!=a?a.type:void 0)&&"Point"===a.type&&_.isArray(a.coordinates)&&2===a.coordinates.length)return!0;return a&&b.isDefined((null!=a?a.latitude:void 0)&&b.isDefined(null!=a?a.longitude:void 0))?!0:!1},{setCoordsFromEvent:function(a,c){return a?(Array.isArray(a)&&2===a.length?(a[1]=c.lat(),a[0]=c.lng()):b.isDefined(a.type)&&"Point"===a.type?(a.coordinates[1]=c.lat(),a.coordinates[0]=c.lng()):(a.latitude=c.lat(),a.longitude=c.lng()),a):void 0},getLabelPositionPoint:function(a){var b,c;return void 0===a?void 0:(a=/^([-\d\.]+)\s([-\d\.]+)$/.exec(a),b=parseFloat(a[1]),c=parseFloat(a[2]),null!=b&&null!=c?new google.maps.Point(b,c):void 0)},createWindowOptions:function(d,e,g,h){var i;return null!=g&&null!=h&&null!=c?(i=b.extend({},h,{content:this.buildContent(e,h,g),position:null!=h.position?h.position:b.isObject(d)?d.getPosition():f(e.coords)}),null!=d&&null==(null!=i?i.pixelOffset:void 0)&&(null==i.boxClass||(i.pixelOffset={height:0,width:-2})),i):h?h:(a.error("infoWindow defaults not defined"),g?void 0:a.error("infoWindow content not defined"))},buildContent:function(a,b,d){var e,f;return null!=b.content?f=b.content:null!=c?(d=d.replace(/^\s+|\s+$/g,""),e=""===d?"":c(d)(a),e.length>0&&(f=e[0])):f=d,f},defaultDelay:50,isTrue:function(a){return e(a,!0,["true","TRUE",1,"y","Y","yes","YES"])},isFalse:d,isFalsy:function(a){return e(a,!1,[void 0,null])||d(a)},getCoords:f,validateCoords:i,equalCoords:function(a,b){return g(a)===g(b)&&h(a)===h(b)},validatePath:function(a){var c,d,e,f;if(d=0,b.isUndefined(a.type)){if(!Array.isArray(a)||a.length<2)return!1;for(;d<a.length;){if(!(b.isDefined(a[d].latitude)&&b.isDefined(a[d].longitude)||"function"==typeof a[d].lat&&"function"==typeof a[d].lng))return!1;d++}return!0}if(b.isUndefined(a.coordinates))return!1;if("Polygon"===a.type){if(a.coordinates[0].length<4)return!1;c=a.coordinates[0]}else if("MultiPolygon"===a.type){if(f={max:0,index:0},_.forEach(a.coordinates,function(a,b){return a[0].length>this.max?(this.max=a[0].length,this.index=b):void 0},f),e=a.coordinates[f.index],c=e[0],c.length<4)return!1}else{if("LineString"!==a.type)return!1;if(a.coordinates.length<2)return!1;c=a.coordinates}for(;d<c.length;){if(2!==c[d].length)return!1;d++}return!0},convertPathPoints:function(a){var c,d,e,f,g;if(d=0,f=new google.maps.MVCArray,b.isUndefined(a.type))for(;d<a.length;)b.isDefined(a[d].latitude)&&b.isDefined(a[d].longitude)?e=new google.maps.LatLng(a[d].latitude,a[d].longitude):"function"==typeof a[d].lat&&"function"==typeof a[d].lng&&(e=a[d]),f.push(e),d++;else for("Polygon"===a.type?c=a.coordinates[0]:"MultiPolygon"===a.type?(g={max:0,index:0},_.forEach(a.coordinates,function(a,b){return a[0].length>this.max?(this.max=a[0].length,this.index=b):void 0},g),c=a.coordinates[g.index][0]):"LineString"===a.type&&(c=a.coordinates);d<c.length;)f.push(new google.maps.LatLng(c[d][1],c[d][0])),d++;return f},extendMapBounds:function(a,b){var c,d;for(c=new google.maps.LatLngBounds,d=0;d<b.length;)c.extend(b.getAt(d)),d++;return a.fitBounds(c)},getPath:function(a,b){var c;return null!=b&&_.isString(b)?(c=a,_.each(b.split("."),function(a){return c?c=c[a]:void 0}),c):b},validateBoundPoints:function(a){return b.isUndefined(a.sw.latitude)||b.isUndefined(a.sw.longitude)||b.isUndefined(a.ne.latitude)||b.isUndefined(a.ne.longitude)?!1:!0},convertBoundPoints:function(a){var b;return b=new google.maps.LatLngBounds(new google.maps.LatLng(a.sw.latitude,a.sw.longitude),new google.maps.LatLng(a.ne.latitude,a.ne.longitude))},fitMapBounds:function(a,b){return a.fitBounds(b)}}}])}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api.utils").service("uiGmapIsReady",["$q","$timeout",function(a,b){var c,d,e;return c=0,e=[],d=function(){return a.all(e)},{spawn:function(){var b;return b=a.defer(),e.push(b.promise),c+=1,{instance:c,deferred:b}},promises:d,instances:function(){return c},promise:function(e){var f,g;return null==e&&(e=1),f=a.defer(),g=function(){return b(function(){return c!==e?g():f.resolve(d())})},g(),f.promise},reset:function(){return c=0,e.length=0}}}])}.call(this),function(){var a=function(a,b){function d(){this.constructor=a}for(var e in b)c.call(b,e)&&(a[e]=b[e]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a},c={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api.utils").factory("uiGmapLinked",["uiGmapBaseObject",function(b){var c;return c=function(b){function c(a,b,c,d){this.scope=a,this.element=b,this.attrs=c,this.ctrls=d}return a(c,b),c}(b)}])}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api.utils").service("uiGmapLogger",["$log",function(a){var b,c,d,e;return b={log:1,info:2,debug:3,warn:4,error:5,none:6},e=function(a,b,c){return a>=b?c():void 0},d=function(b,c){return null!=a?a[b](c):console[b](c)},new(c=function(){function c(){var a;this.doLog=!0,a={},["log","info","debug","warn","error"].forEach(function(c){return function(f){return a[f]=function(a){return c.doLog?e(b[f],c.currentLevel,function(){return d(f,a)}):void 0}}}(this)),this.LEVELS=b,this.currentLevel=b.error,this.log=a.log,this.info=a.info,this.debug=a.debug,this.warn=a.warn,this.error=a.error}return c.prototype.spawn=function(){return new c},c.prototype.setLog=function(b){return a=b},c}())}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},c=function(a,b){function c(){this.constructor=a}for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},d={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api.utils").factory("uiGmapModelKey",["uiGmapBaseObject","uiGmapGmapUtil","uiGmapPromise","$q","$timeout",function(d,e){var f;return f=function(d){function f(b){this.scope=b,this.modelsLength=a(this.modelsLength,this),this.updateChild=a(this.updateChild,this),this.destroy=a(this.destroy,this),this.onDestroy=a(this.onDestroy,this),this.setChildScope=a(this.setChildScope,this),this.getChanges=a(this.getChanges,this),this.getProp=a(this.getProp,this),this.setIdKey=a(this.setIdKey,this),this.modelKeyComparison=a(this.modelKeyComparison,this),f.__super__.constructor.call(this),this["interface"]={},this["interface"].scopeKeys=[],this.defaultIdKey="id",this.idKey=void 0}return c(f,d),f.prototype.evalModelHandle=function(a,b){return null!=a&&null!=b?"self"===b?a:(_.isFunction(b)&&(b=b()),e.getPath(a,b)):void 0},f.prototype.modelKeyComparison=function(a,b){var c,d,f;if(c=_.contains(this["interface"].scopeKeys,"coords"),(c&&null!=this.scope.coords||!c)&&(f=this.scope),null==f)throw"No scope set!";return c&&(d=e.equalCoords(this.evalModelHandle(a,f.coords),this.evalModelHandle(b,f.coords)),!d)?d:d=_.every(_.without(this["interface"].scopeKeys,"coords"),function(c){return function(d){return c.evalModelHandle(a,f[d])===c.evalModelHandle(b,f[d])}}(this))},f.prototype.setIdKey=function(a){return this.idKey=null!=a.idKey?a.idKey:this.defaultIdKey},f.prototype.setVal=function(a,b,c){var d;return d=this.modelOrKey(a,b),d=c,a},f.prototype.modelOrKey=function(a,b){return null!=b?"self"!==b?e.getPath(a,b):a:void 0},f.prototype.getProp=function(a,b){return this.modelOrKey(b,a)},f.prototype.getChanges=function(a,b,c){var d,e,f;c&&(b=_.pick(b,c),a=_.pick(a,c)),e={},f={},d={};for(f in a)b&&b[f]===a[f]||(_.isArray(a[f])?e[f]=a[f]:_.isObject(a[f])?(d=this.getChanges(a[f],b?b[f]:null),_.isEmpty(d)||(e[f]=d)):e[f]=a[f]);return e},f.prototype.scopeOrModelVal=function(a,b,c,d){var e,f,g,h;return null==d&&(d=!1),e=function(a,b,c){return null==c&&(c=!1),c?{isScope:a,value:b}:b},h=b[a],_.isFunction(h)?e(!0,h(c),d):_.isObject(h)?e(!0,h,d):_.isString(h)?(f=h,g=f?"self"===f?c:c[f]:c[a],_.isFunction(g)?e(!1,g(),d):e(!1,g,d)):e(!0,h,d)},f.prototype.setChildScope=function(a,b,c){return _.each(a,function(a){return function(d){var e,f;return e=a.scopeOrModelVal(d,b,c,!0),null!=(null!=e?e.value:void 0)&&(f=e.value,f!==b[d])?b[d]=f:void 0}}(this)),b.model=c},f.prototype.onDestroy=function(){},f.prototype.destroy=function(a){var b;return null==a&&(a=!1),null==this.scope||(null!=(b=this.scope)?b.$$destroyed:void 0)||!this.needToManualDestroy&&!a?this.clean():this.scope.$destroy()},f.prototype.updateChild=function(a,b){return null==b[this.idKey]?void this.$log.error("Model has no id to assign a child to. This is required for performance. Please assign id, or redirect id to a different key."):a.updateModel(b)},f.prototype.modelsLength=function(a){var c,d;return null==a&&(a=void 0),c=0,d=a?a:this.scope.models,null==d?c:c=b.isArray(d)||null!=d.length?d.length:Object.keys(d).length},f}(d)}])}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api.utils").factory("uiGmapModelsWatcher",["uiGmapLogger","uiGmap_async","$q","uiGmapPromise",function(a,b,c,d){return{didQueueInitPromise:function(a,c){return 0===c.models.length?(b.promiseLock(a,d.promiseTypes.init,null,null,function(){return function(){return d.resolve()}}(this)),!0):!1},figureOutState:function(b,c,d,e){var f,g,h,i,j;return f=[],h={},i=[],j=[],c.models.forEach(function(c){var g;return null==c[b]?a.error(" id missing for model #{m.toString()},\ncan not use do comparison/insertion"):(h[c[b]]={},null==d.get(c[b])?f.push(c):(g=d.get(c[b]),e(c,g.clonedModel)?void 0:j.push({model:c,child:g})))}),g=d.values(),g.forEach(function(c){var d;return null==c?void a.error("child undefined in ModelsWatcher."):null==c.model?void a.error("child.model undefined in ModelsWatcher."):(d=c.model[b],null==h[d]?i.push(c):void 0)}),{adds:f,removals:i,updates:j}}}}])}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api.utils").service("uiGmapPromise",["$q","$timeout","uiGmapLogger",function(a,b,c){var d,e,f,g,h,i,j,k,l,m,n;return l={create:"create",update:"update","delete":"delete",init:"init"},k={IN_PROGRESS:0,RESOLVED:1,REJECTED:2},n=function(){var a;return a={},a[""+k.IN_PROGRESS]="in-progress",a[""+k.RESOLVED]="resolved",a[""+k.REJECTED]="rejected",a}(),g=function(a){return a.$$state?a.$$state.status===k.IN_PROGRESS:a.hasOwnProperty("$$v")?void 0:!0},h=function(a){return a.$$state?a.$$state.status===k.RESOLVED:a.hasOwnProperty("$$v")?!0:void 0},j=function(a){return n[a]||"done w error"},d=function(b){var c,d,e;return c=a.defer(),d=a.all([b,c.promise]),e=a.defer(),b.then(c.resolve,function(){},function(a){return c.notify(a),e.notify(a)}),d.then(function(a){return e.resolve(a[0]||a[1])},function(a){return e.reject(a)}),e.promise.cancel=function(a){return null==a&&(a="canceled"),c.reject(a)},e.promise.notify=function(a){return null==a&&(a="cancel safe"),e.notify(a),b.hasOwnProperty("notify")?b.notify(a):void 0},null!=b.promiseType&&(e.promise.promiseType=b.promiseType),e.promise},e=function(a,b){return{promise:a,promiseType:b}},f=function(){return a.defer()},m=function(){var b;return b=a.defer(),b.resolve.apply(void 0,arguments),b.promise},i=function(d){var e;return _.isFunction(d)?(e=a.defer(),b(function(){var a;return a=d(),e.resolve(a)}),e.promise):void c.error("uiGmapPromise.promise() only accepts functions")},{defer:f,promise:i,resolve:m,promiseTypes:l,isInProgress:g,isResolved:h,promiseStatus:j,ExposedPromise:d,SniffedPromise:e}}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}};b.module("uiGmapgoogle-maps.directives.api.utils").factory("uiGmapPropMap",function(){var b;return b=function(){function b(){this.removeAll=a(this.removeAll,this),this.slice=a(this.slice,this),this.push=a(this.push,this),this.keys=a(this.keys,this),this.values=a(this.values,this),this.remove=a(this.remove,this),this.put=a(this.put,this),this.stateChanged=a(this.stateChanged,this),this.get=a(this.get,this),this.length=0,this.dict={},this.didValsStateChange=!1,this.didKeysStateChange=!1,this.allVals=[],this.allKeys=[]}return b.prototype.get=function(a){return this.dict[a]},b.prototype.stateChanged=function(){return this.didValsStateChange=!0,this.didKeysStateChange=!0},b.prototype.put=function(a,b){return null==this.get(a)&&this.length++,this.stateChanged(),this.dict[a]=b},b.prototype.remove=function(a,b){var c;return null==b&&(b=!1),b&&!this.get(a)?void 0:(c=this.dict[a],delete this.dict[a],this.length--,this.stateChanged(),c)},b.prototype.valuesOrKeys=function(a){var b,c;return null==a&&(a="Keys"),this["did"+a+"StateChange"]?(c=[],b=[],_.each(this.dict,function(a,d){return c.push(a),b.push(d)}),this.didKeysStateChange=!1,this.didValsStateChange=!1,this.allVals=c,this.allKeys=b,this["all"+a]):this["all"+a]},b.prototype.values=function(){return this.valuesOrKeys("Vals")},b.prototype.keys=function(){return this.valuesOrKeys()},b.prototype.push=function(a,b){return null==b&&(b="key"),this.put(a[b],a)},b.prototype.slice=function(){return this.keys().map(function(a){return function(b){return a.remove(b)}}(this))},b.prototype.removeAll=function(){return this.slice()},b.prototype.each=function(a){return _.each(this.dict,function(b){return a(b)})},b.prototype.map=function(a){return _.map(this.dict,function(b){return a(b)})},b}()})}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api.utils").factory("uiGmapPropertyAction",["uiGmapLogger",function(){var a;return a=function(a){return this.setIfChange=function(b,c){var d;return d=this.exp,_.isEqual(c,b)?void 0:a(d,b)},this.sic=this.setIfChange,this}}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}};b.module("uiGmapgoogle-maps.directives.api.managers").factory("uiGmapClustererMarkerManager",["uiGmapLogger","uiGmapFitHelper","uiGmapPropMap",function(c,d,e){var f;return f=function(){function f(b,d,g,h){null==d&&(d={}),this.opt_options=null!=g?g:{},this.opt_events=h,this.checkSync=a(this.checkSync,this),this.getGMarkers=a(this.getGMarkers,this),this.fit=a(this.fit,this),this.destroy=a(this.destroy,this),this.clear=a(this.clear,this),this.draw=a(this.draw,this),this.removeMany=a(this.removeMany,this),this.remove=a(this.remove,this),this.addMany=a(this.addMany,this),this.update=a(this.update,this),this.add=a(this.add,this),this.type=f.type,this.clusterer=new NgMapMarkerClusterer(b,d,this.opt_options),this.propMapGMarkers=new e,this.attachEvents(this.opt_events,"opt_events"),this.clusterer.setIgnoreHidden(!0),this.noDrawOnSingleAddRemoves=!0,c.info(this)}return f.type="ClustererMarkerManager",f.prototype.checkKey=function(a){var b;return null==a.key?(b="gMarker.key undefined and it is REQUIRED!!",c.error(b)):void 0},f.prototype.add=function(a){return this.checkKey(a),this.clusterer.addMarker(a,this.noDrawOnSingleAddRemoves),this.propMapGMarkers.put(a.key,a),this.checkSync()},f.prototype.update=function(a){return this.remove(a),this.add(a)},f.prototype.addMany=function(a){return a.forEach(function(a){return function(b){return a.add(b)}}(this))},f.prototype.remove=function(a){var b;return this.checkKey(a),b=this.propMapGMarkers.get(a.key),b&&(this.clusterer.removeMarker(a,this.noDrawOnSingleAddRemoves),this.propMapGMarkers.remove(a.key)),this.checkSync()},f.prototype.removeMany=function(a){return a.forEach(function(a){return function(b){return a.remove(b)}}(this))},f.prototype.draw=function(){return this.clusterer.repaint()},f.prototype.clear=function(){return this.removeMany(this.getGMarkers()),this.clusterer.repaint()},f.prototype.attachEvents=function(a,d){var e,f,g;if(b.isDefined(a)&&null!=a&&b.isObject(a)){g=[];for(f in a)e=a[f],a.hasOwnProperty(f)&&b.isFunction(a[f])?(c.info(d+": Attaching event: "+f+" to clusterer"),g.push(google.maps.event.addListener(this.clusterer,f,a[f]))):g.push(void 0);return g}},f.prototype.clearEvents=function(a,d){var e,f,g;if(b.isDefined(a)&&null!=a&&b.isObject(a)){g=[];for(f in a)e=a[f],a.hasOwnProperty(f)&&b.isFunction(a[f])?(c.info(d+": Clearing event: "+f+" to clusterer"),g.push(google.maps.event.clearListeners(this.clusterer,f))):g.push(void 0);return g}},f.prototype.destroy=function(){return this.clearEvents(this.opt_events,"opt_events"),this.clear()},f.prototype.fit=function(){return d.fit(this.getGMarkers(),this.clusterer.getMap())},f.prototype.getGMarkers=function(){return this.clusterer.getMarkers().values()},f.prototype.checkSync=function(){},f}()}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}};b.module("uiGmapgoogle-maps.directives.api.managers").factory("uiGmapMarkerManager",["uiGmapLogger","uiGmapFitHelper","uiGmapPropMap",function(b,c,d){var e;return e=function(){function e(c){this.getGMarkers=a(this.getGMarkers,this),this.fit=a(this.fit,this),this.handleOptDraw=a(this.handleOptDraw,this),this.clear=a(this.clear,this),this.draw=a(this.draw,this),this.removeMany=a(this.removeMany,this),this.remove=a(this.remove,this),this.addMany=a(this.addMany,this),this.update=a(this.update,this),this.add=a(this.add,this),this.type=e.type,this.gMap=c,this.gMarkers=new d,this.$log=b,this.$log.info(this)}return e.type="MarkerManager",e.prototype.add=function(a,c){var d,e;if(null==c&&(c=!0),null==a.key)throw e="gMarker.key undefined and it is REQUIRED!!",b.error(e),e;return d=this.gMarkers.get(a.key),d?void 0:(this.handleOptDraw(a,c,!0),this.gMarkers.put(a.key,a))},e.prototype.update=function(a,b){return null==b&&(b=!0),this.remove(a,b),this.add(a,b)},e.prototype.addMany=function(a){return a.forEach(function(a){return function(b){return a.add(b)}}(this))},e.prototype.remove=function(a,b){return null==b&&(b=!0),this.handleOptDraw(a,b,!1),this.gMarkers.get(a.key)?this.gMarkers.remove(a.key):void 0},e.prototype.removeMany=function(a){return a.forEach(function(a){return function(b){return a.remove(b)}}(this))},e.prototype.draw=function(){var a;return a=[],this.gMarkers.each(function(b){return function(c){return c.isDrawn?void 0:c.doAdd?(c.setMap(b.gMap),c.isDrawn=!0):a.push(c)}}(this)),a.forEach(function(a){return function(b){return b.isDrawn=!1,a.remove(b,!0)}}(this))},e.prototype.clear=function(){return this.gMarkers.each(function(a){return a.setMap(null)}),delete this.gMarkers,this.gMarkers=new d},e.prototype.handleOptDraw=function(a,b,c){return b===!0?(a.setMap(c?this.gMap:null),a.isDrawn=!0):(a.isDrawn=!1,a.doAdd=c)},e.prototype.fit=function(){return c.fit(this.getGMarkers(),this.gMap)},e.prototype.getGMarkers=function(){return this.gMarkers.values()},e}()}])}.call(this),function(){b.module("uiGmapgoogle-maps").factory("uiGmapadd-events",["$timeout",function(a){var c,d;return c=function(b,c,d){return google.maps.event.addListener(b,c,function(){return d.apply(this,arguments),a(function(){},!0)})},d=function(a,d,e){var f;return e?c(a,d,e):(f=[],b.forEach(d,function(b,d){return f.push(c(a,d,b))}),function(){return b.forEach(f,function(a){return google.maps.event.removeListener(a)}),f=null})}}])}.call(this),function(){b.module("uiGmapgoogle-maps").factory("uiGmaparray-sync",["uiGmapadd-events",function(a){return function(c,d,e,f){var g,h,i,j,k,l,m,n,o;return j=!1,n=d.$eval(e),d["static"]||(k={set_at:function(a){var b;if(!j&&(b=c.getAt(a)))return b.lng&&b.lat?(n[a].latitude=b.lat(),n[a].longitude=b.lng()):n[a]=b},insert_at:function(a){var b;if(!j&&(b=c.getAt(a)))return b.lng&&b.lat?n.splice(a,0,{latitude:b.lat(),longitude:b.lng()}):n.splice(a,0,b)},remove_at:function(a){return j?void 0:n.splice(a,1)}},"Polygon"===n.type?g=n.coordinates[0]:"LineString"===n.type&&(g=n.coordinates),h={set_at:function(a){var b;if(!j&&(b=c.getAt(a),b&&b.lng&&b.lat))return g[a][1]=b.lat(),g[a][0]=b.lng()},insert_at:function(a){var b;if(!j&&(b=c.getAt(a),b&&b.lng&&b.lat))return g.splice(a,0,[b.lng(),b.lat()])},remove_at:function(a){return j?void 0:g.splice(a,1)}},m=a(c,b.isUndefined(n.type)?k:h)),l=function(a){var b,d,e,g,h,i,k,l;if(j=!0,i=c,b=!1,a){for(d=0,k=i.getLength(),g=a.length,e=Math.min(k,g),h=void 0;e>d;)l=i.getAt(d),h=a[d],"function"==typeof h.equals?h.equals(l)||(i.setAt(d,h),b=!0):(l.lat()!==h.latitude||l.lng()!==h.longitude)&&(i.setAt(d,new google.maps.LatLng(h.latitude,h.longitude)),b=!0),d++;for(;g>d;)h=a[d],i.push("function"==typeof h.lat&&"function"==typeof h.lng?h:new google.maps.LatLng(h.latitude,h.longitude)),b=!0,d++;for(;k>d;)i.pop(),b=!0,d++}return j=!1,b?f(i):void 0},i=function(a){var b,d,e,g,h,i,k,l,m;if(j=!0,k=c,d=!1,a){for("Polygon"===n.type?b=a.coordinates[0]:"LineString"===n.type&&(b=a.coordinates),e=0,l=k.getLength(),h=b.length,g=Math.min(l,h),i=void 0;g>e;)m=k.getAt(e),
i=b[e],(m.lat()!==i[1]||m.lng()!==i[0])&&(k.setAt(e,new google.maps.LatLng(i[1],i[0])),d=!0),e++;for(;h>e;)i=b[e],k.push(new google.maps.LatLng(i[1],i[0])),d=!0,e++;for(;l>e;)k.pop(),d=!0,e++}return j=!1,d?f(k):void 0},d["static"]||(o=b.isUndefined(n.type)?d.$watchCollection(e,l):d.$watch(e,i,!0)),function(){return m&&(m(),m=null),o?(o(),o=null):void 0}}}])}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api.utils").factory("uiGmapChromeFixes",["$timeout",function(a){return{maybeRepaint:function(b){return b?(b.style.opacity=.9,a(function(){return b.style.opacity=1})):void 0}}}])}.call(this),function(){b.module("uiGmapgoogle-maps").service("uiGmapObjectIterators",function(){var a,b,c,d;return a=["length","forEach","map"],b=[],c=function(b){return b.forEach=function(c){return _.each(_.omit(b,a),function(a){return _.isFunction(a)?void 0:c(a)})},b},b.push(c),d=function(b){return b.map=function(c){return _.map(_.omit(b,a),function(a){return _.isFunction(a)?void 0:c(a)})},b},b.push(d),{slapMap:d,slapForEach:c,slapAll:function(a){return b.forEach(function(b){return b(a)}),a}}})}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},c=function(a,b){function c(){this.constructor=a}for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},d={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api.options.builders").service("uiGmapCommonOptionsBuilder",["uiGmapBaseObject","uiGmapLogger","uiGmapModelKey",function(d,e,f){var g;return g=function(d){function f(){return this.watchProps=a(this.watchProps,this),this.buildOpts=a(this.buildOpts,this),f.__super__.constructor.apply(this,arguments)}return c(f,d),f.prototype.props=["clickable","draggable","editable","visible",{prop:"stroke",isColl:!0}],f.prototype.getCorrectModel=function(a){return b.isDefined(null!=a?a.model:void 0)?a.model:a},f.prototype.buildOpts=function(a,c,d){var f,g,h;return null==a&&(a={}),null==d&&(d={}),this.scope?this.map?(f=this.getCorrectModel(this.scope),h=this.scopeOrModelVal("stroke",this.scope,f),g=b.extend(a,this.DEFAULTS,{map:this.map,strokeColor:null!=h?h.color:void 0,strokeOpacity:null!=h?h.opacity:void 0,strokeWeight:null!=h?h.weight:void 0}),b.forEach(b.extend(d,{clickable:!0,draggable:!1,editable:!1,"static":!1,fit:!1,visible:!0,zIndex:0,icons:[]}),function(a){return function(d,e){var h;return h=c?c[e]:a.scopeOrModelVal(e,a.scope,f),g[e]=b.isUndefined(h)?d:f[e]}}(this)),g["static"]&&(g.editable=!1),g):void e.error("this.map not defined in CommonOptionsBuilder can not buildOpts"):void e.error("this.scope not defined in CommonOptionsBuilder can not buildOpts")},f.prototype.watchProps=function(a){return null==a&&(a=this.props),a.forEach(function(a){return function(b){return null!=a.attrs[b]||null!=a.attrs[null!=b?b.prop:void 0]?(null!=b?b.isColl:void 0)?a.scope.$watchCollection(b.prop,a.setMyOptions):a.scope.$watch(b,a.setMyOptions):void 0}}(this))},f}(f)}])}.call(this),function(){var a=function(a,b){function d(){this.constructor=a}for(var e in b)c.call(b,e)&&(a[e]=b[e]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a},c={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api.options.builders").factory("uiGmapPolylineOptionsBuilder",["uiGmapCommonOptionsBuilder",function(b){var c;return c=function(b){function c(){return c.__super__.constructor.apply(this,arguments)}return a(c,b),c.prototype.buildOpts=function(a,b){return c.__super__.buildOpts.call(this,{path:a},b,{geodesic:!1})},c}(b)}]).factory("uiGmapShapeOptionsBuilder",["uiGmapCommonOptionsBuilder",function(c){var d;return d=function(c){function d(){return d.__super__.constructor.apply(this,arguments)}return a(d,c),d.prototype.buildOpts=function(a,c,e){var f,g;return g=this.getCorrectModel(this.scope),f=c?c.fill:this.scopeOrModelVal("fill",this.scope,g),a=b.extend(a,{fillColor:null!=f?f.color:void 0,fillOpacity:null!=f?f.opacity:void 0}),d.__super__.buildOpts.call(this,a,c,e)},d}(c)}]).factory("uiGmapPolygonOptionsBuilder",["uiGmapShapeOptionsBuilder",function(b){var c;return c=function(b){function c(){return c.__super__.constructor.apply(this,arguments)}return a(c,b),c.prototype.buildOpts=function(a,b){return c.__super__.buildOpts.call(this,{path:a},b,{geodesic:!1})},c}(b)}]).factory("uiGmapRectangleOptionsBuilder",["uiGmapShapeOptionsBuilder",function(b){var c;return c=function(b){function c(){return c.__super__.constructor.apply(this,arguments)}return a(c,b),c.prototype.buildOpts=function(a,b){return c.__super__.buildOpts.call(this,{bounds:a},b)},c}(b)}]).factory("uiGmapCircleOptionsBuilder",["uiGmapShapeOptionsBuilder",function(b){var c;return c=function(b){function c(){return c.__super__.constructor.apply(this,arguments)}return a(c,b),c.prototype.buildOpts=function(a,b,d){return c.__super__.buildOpts.call(this,{center:a,radius:b},d)},c}(b)}])}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api.options").service("uiGmapMarkerOptions",["uiGmapLogger","uiGmapGmapUtil",function(a,c){return _.extend(c,{createOptions:function(a,d,e,f){var g;return null==e&&(e={}),g=b.extend({},e,{position:null!=e.position?e.position:c.getCoords(a),visible:null!=e.visible?e.visible:c.validateCoords(a)}),(null!=e.icon||null!=d)&&(g=b.extend(g,{icon:null!=e.icon?e.icon:d})),null!=f&&(g.map=f),g},isLabel:function(a){return null==a?!1:null!=a.labelContent||null!=a.labelAnchor||null!=a.labelClass||null!=a.labelStyle||null!=a.labelVisible}})}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},c=function(a,b){function c(){this.constructor=a}for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},d={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapBasePolyChildModel",["uiGmapLogger","$timeout","uiGmaparray-sync","uiGmapGmapUtil","uiGmapEventsHelper",function(d,e,f,g,h){return function(d,e){var i;return i=function(d){function i(c,d,g,i,j){var k;this.scope=c,this.attrs=d,this.map=g,this.defaults=i,this.model=j,this.clean=a(this.clean,this),this.clonedModel=_.clone(this.model,!0),this.isDragging=!1,this.internalEvents={dragend:function(a){return function(){return _.defer(function(){return a.isDragging=!1})}}(this),dragstart:function(a){return function(){return a.isDragging=!0}}(this)},k=function(a){return function(){var c,d;if(!a.isDragging)return d=a.convertPathPoints(a.scope.path),null!=a.gObject&&a.clean(),null!=a.scope.model&&(c=a.scope),d.length>0&&(a.gObject=e(a.buildOpts(d,c))),a.gObject?(a.scope.fit&&a.extendMapBounds(map,d),f(a.gObject.getPath(),a.scope,"path",function(b){return a.scope.fit?a.extendMapBounds(map,b):void 0}),b.isDefined(a.scope.events)&&b.isObject(a.scope.events)&&(a.listeners=a.model?h.setEvents(a.gObject,a.scope,a.model):h.setEvents(a.gObject,a.scope,a.scope)),a.internalListeners=a.model?h.setEvents(a.gObject,{events:a.internalEvents},a.model):h.setEvents(a.gObject,{events:a.internalEvents},a.scope)):void 0}}(this),k(),this.scope.$watch("path",function(a){return function(b,c){return _.isEqual(b,c)&&a.gObject?void 0:k()}}(this),!0),!this.scope["static"]&&b.isDefined(this.scope.editable)&&this.scope.$watch("editable",function(a){return function(b,c){var d;return b!==c?(b=!a.isFalse(b),null!=(d=a.gObject)?d.setEditable(b):void 0):void 0}}(this),!0),b.isDefined(this.scope.draggable)&&this.scope.$watch("draggable",function(a){return function(b,c){var d;return b!==c?(b=!a.isFalse(b),null!=(d=a.gObject)?d.setDraggable(b):void 0):void 0}}(this),!0),b.isDefined(this.scope.visible)&&this.scope.$watch("visible",function(a){return function(b,c){var d;return b!==c&&(b=!a.isFalse(b)),null!=(d=a.gObject)?d.setVisible(b):void 0}}(this),!0),b.isDefined(this.scope.geodesic)&&this.scope.$watch("geodesic",function(a){return function(b,c){var d;return b!==c?(b=!a.isFalse(b),null!=(d=a.gObject)?d.setOptions(a.buildOpts(a.gObject.getPath())):void 0):void 0}}(this),!0),b.isDefined(this.scope.stroke)&&b.isDefined(this.scope.stroke.weight)&&this.scope.$watch("stroke.weight",function(a){return function(b,c){var d;return b!==c&&null!=(d=a.gObject)?d.setOptions(a.buildOpts(a.gObject.getPath())):void 0}}(this),!0),b.isDefined(this.scope.stroke)&&b.isDefined(this.scope.stroke.color)&&this.scope.$watch("stroke.color",function(a){return function(b,c){var d;return b!==c&&null!=(d=a.gObject)?d.setOptions(a.buildOpts(a.gObject.getPath())):void 0}}(this),!0),b.isDefined(this.scope.stroke)&&b.isDefined(this.scope.stroke.opacity)&&scope.$watch("stroke.opacity",function(a){return function(b,c){var d;return b!==c&&null!=(d=a.gObject)?d.setOptions(a.buildOpts(a.gObject.getPath())):void 0}}(this),!0),b.isDefined(this.scope.icons)&&this.scope.$watch("icons",function(a){return function(b,c){var d;return b!==c&&null!=(d=a.gObject)?d.setOptions(a.buildOpts(a.gObject.getPath())):void 0}}(this),!0),this.scope.$on("$destroy",function(a){return function(){return a.clean(),a.scope=null}}(this)),b.isDefined(this.scope.fill)&&b.isDefined(this.scope.fill.color)&&this.scope.$watch("fill.color",function(a){return function(b,c){return b!==c?a.gObject.setOptions(a.buildOpts(a.gObject.getPath())):void 0}}(this)),b.isDefined(this.scope.fill)&&b.isDefined(this.scope.fill.opacity)&&this.scope.$watch("fill.opacity",function(a){return function(b,c){return b!==c?a.gObject.setOptions(a.buildOpts(a.gObject.getPath())):void 0}}(this)),b.isDefined(this.scope.zIndex)&&this.scope.$watch("zIndex",function(a){return function(b,c){return b!==c?a.gObject.setOptions(a.buildOpts(a.gObject.getPath())):void 0}}(this))}return c(i,d),i.include(g),i.prototype.clean=function(){var a;return h.removeEvents(this.listeners),h.removeEvents(this.internalListeners),null!=(a=this.gObject)&&a.setMap(null),this.gObject=null},i}(d)}}])}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api.models.child").factory("uiGmapDrawFreeHandChildModel",["uiGmapLogger","$q",function(a,b){var c,d;return c=function(a,b,c){var d,e;return e=new google.maps.Polyline({map:a,clickable:!1}),d=google.maps.event.addListener(a,"mousemove",function(a){return e.getPath().push(a.latLng)}),void google.maps.event.addListenerOnce(a,"mouseup",function(){var f;return google.maps.event.removeListener(d),f=e.getPath(),e.setMap(null),b.push(new google.maps.Polygon({map:a,path:f})),e=null,google.maps.event.clearListeners(a.getDiv(),"mousedown"),c()})},d=function(d,e){var f,g;return this.map=d,e||(e={draggable:!0,zoomControl:!0,scrollwheel:!0,disableDoubleClickZoom:!0}),g=function(a){return function(){var b;return null!=(b=a.deferred)&&b.resolve(),_.defer(function(){return a.map.setOptions(_.extend(a.oldOptions,e))})}}(this),f=function(b){return function(){return a.info("disabling map move"),b.oldOptions=map.getOptions(),b.oldOptions.center=map.getCenter(),b.map.setOptions({draggable:!1,zoomControl:!1,scrollwheel:!1,disableDoubleClickZoom:!1})}}(this),this.engage=function(d){return function(e){return d.polys=e,d.deferred=b.defer(),f(),a.info("DrawFreeHandChildModel is engaged (drawing)."),google.maps.event.addDomListener(d.map.getDiv(),"mousedown",function(){return c(d.map,d.polys,g)}),d.deferred.promise}}(this),this}}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},c=function(a,b){function c(){this.constructor=a}for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},d={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api.models.child").factory("uiGmapMarkerChildModel",["uiGmapModelKey","uiGmapGmapUtil","uiGmapLogger","uiGmapEventsHelper","uiGmapPropertyAction","uiGmapMarkerOptions","uiGmapIMarker","uiGmapMarkerManager","uiGmapPromise",function(b,d,e,f,g,h,i,j,k){var l;return l=function(b){function l(b,c,d,f,h,i,j,n,o,p){var q;this.model=c,this.keys=d,this.gMap=f,this.defaults=h,this.doClick=i,this.gManager=j,this.doDrawSelf=null!=n?n:!0,this.trackModel=null!=o?o:!0,this.needRedraw=null!=p?p:!1,this.internalEvents=a(this.internalEvents,this),this.setLabelOptions=a(this.setLabelOptions,this),this.setOptions=a(this.setOptions,this),this.setIcon=a(this.setIcon,this),this.setCoords=a(this.setCoords,this),this.isNotValid=a(this.isNotValid,this),this.maybeSetScopeValue=a(this.maybeSetScopeValue,this),this.createMarker=a(this.createMarker,this),this.setMyScope=a(this.setMyScope,this),this.updateModel=a(this.updateModel,this),this.handleModelChanges=a(this.handleModelChanges,this),this.destroy=a(this.destroy,this),this.clonedModel=_.extend({},this.model),this.deferred=k.defer(),_.each(this.keys,function(a){return function(b,c){return a[c+"Key"]=_.isFunction(a.keys[c])?a.keys[c]():a.keys[c]}}(this)),this.idKey=this.idKeyKey||"id",null!=this.model[this.idKey]&&(this.id=this.model[this.idKey]),l.__super__.constructor.call(this,b),this.scope.getGMarker=function(a){return function(){return a.gObject}}(this),this.firstTime=!0,this.trackModel?(this.scope.model=this.model,this.scope.$watch("model",function(a){return function(b,c){return b!==c?a.handleModelChanges(b,c):void 0}}(this),!0)):(q=new g(function(a){return function(c){return a.firstTime?void 0:a.setMyScope(c,b)}}(this),!1),_.each(this.keys,function(a,c){return b.$watch(c,q.sic,!0)})),this.scope.$on("$destroy",function(a){return function(){return m(a)}}(this)),this.createMarker(this.model),e.info(this)}var m;return c(l,b),l.include(d),l.include(f),l.include(h),m=function(a){return null!=(null!=a?a.gObject:void 0)&&(a.removeEvents(a.externalListeners),a.removeEvents(a.internalListeners),null!=a?a.gObject:void 0)?(a.removeFromManager&&a.gManager.remove(a.gObject),a.gObject.setMap(null),a.gObject=null):void 0},l.prototype.destroy=function(a){return null==a&&(a=!0),this.removeFromManager=a,this.scope.$destroy()},l.prototype.handleModelChanges=function(a,b){var c,d,e;return c=this.getChanges(a,b,i.keys),this.firstTime?void 0:(d=0,e=_.keys(c).length,_.each(c,function(c){return function(f,g){var h;return d+=1,h=e===d,c.setMyScope(g,a,b,!1,!0,h),c.needRedraw=!0}}(this)))},l.prototype.updateModel=function(a){return this.clonedModel=_.extend({},a),this.setMyScope("all",a,this.model)},l.prototype.renderGMarker=function(a,b){var c;if(null==a&&(a=!0),c=this.getProp(this.coordsKey,this.model),null!=c){if(!this.validateCoords(c))return void e.debug("MarkerChild does not have coords yet. They may be defined later.");if(null!=b&&b(),a&&this.gObject)return this.gManager.add(this.gObject)}else if(a&&this.gObject)return this.gManager.remove(this.gObject)},l.prototype.setMyScope=function(a,b,c,d,e){var f;switch(null==c&&(c=void 0),null==d&&(d=!1),null==e&&(e=!0),null==b?b=this.model:this.model=b,this.gObject||(this.setOptions(this.scope,e),f=!0),a){case"all":return _.each(this.keys,function(a){return function(f,g){return a.setMyScope(g,b,c,d,e)}}(this));case"icon":return this.maybeSetScopeValue("icon",b,c,this.iconKey,this.evalModelHandle,d,this.setIcon,e);case"coords":return this.maybeSetScopeValue("coords",b,c,this.coordsKey,this.evalModelHandle,d,this.setCoords,e);case"options":if(!f)return this.createMarker(b,c,d,e)}},l.prototype.createMarker=function(a,b,c,d){return null==b&&(b=void 0),null==c&&(c=!1),null==d&&(d=!0),this.maybeSetScopeValue("options",a,b,this.optionsKey,this.evalModelHandle,c,this.setOptions,d),this.firstTime=!1},l.prototype.maybeSetScopeValue=function(a,b,c,d,e,f,g,h){return null==g&&(g=void 0),null==h&&(h=!0),null!=g?g(this.scope,h):void 0},l.doDrawSelf&&doDraw&&l.gManager.draw(),l.prototype.isNotValid=function(a,b){var c,d;return null==b&&(b=!0),d=b?void 0===this.gObject:!1,c=this.trackModel?!1:a.$id!==this.scope.$id,c||d},l.prototype.setCoords=function(a,b){return null==b&&(b=!0),this.isNotValid(a)||null==this.gObject?void 0:this.renderGMarker(b,function(a){return function(){var b,c,d;return c=a.getProp(a.coordsKey,a.model),b=a.getCoords(c),d=a.gObject.getPosition(),null==d||null==b||b.lng()!==d.lng()||b.lat()!==d.lat()?(a.gObject.setPosition(b),a.gObject.setVisible(a.validateCoords(c))):void 0}}(this))},l.prototype.setIcon=function(a,b){return null==b&&(b=!0),this.isNotValid(a)||null==this.gObject?void 0:this.renderGMarker(b,function(a){return function(){var b,c,d;return d=a.gObject.getIcon(),c=a.getProp(a.iconKey,a.model),d!==c?(a.gObject.setIcon(c),b=a.getProp(a.coordsKey,a.model),a.gObject.setPosition(a.getCoords(b)),a.gObject.setVisible(a.validateCoords(b))):void 0}}(this))},l.prototype.setOptions=function(a,b){var c;if(null==b&&(b=!0),!this.isNotValid(a,!1)){if(this.renderGMarker(b,function(a){return function(){var b,c,d;return c=a.getProp(a.coordsKey,a.model),d=a.getProp(a.iconKey,a.model),b=a.getProp(a.optionsKey,a.model),a.opts=a.createOptions(c,d,b),a.isLabel(a.gObject)!==a.isLabel(a.opts)&&null!=a.gObject&&(a.gManager.remove(a.gObject),a.gObject=void 0),null!=a.gObject&&a.gObject.setOptions(a.setLabelOptions(a.opts)),a.gObject||(a.gObject=a.isLabel(a.opts)?new MarkerWithLabel(a.setLabelOptions(a.opts)):new google.maps.Marker(a.opts),_.extend(a.gObject,{model:a.model})),a.externalListeners&&a.removeEvents(a.externalListeners),a.internalListeners&&a.removeEvents(a.internalListeners),a.externalListeners=a.setEvents(a.gObject,a.scope,a.model,["dragend"]),a.internalListeners=a.setEvents(a.gObject,{events:a.internalEvents(),$evalAsync:function(){}},a.model),null!=a.id?a.gObject.key=a.id:void 0}}(this)),this.gObject&&(this.gObject.getMap()||this.gManager.type!==j.type))this.deferred.resolve(this.gObject);else{if(!this.gObject)return this.deferred.reject("gObject is null");(null!=(c=this.gObject)?c.getMap():0)&&this.gManager.type===j.type||(e.debug("gObject has no map yet"),this.deferred.resolve(this.gObject))}return this.model[this.fitKey]?this.gManager.fit():void 0}},l.prototype.setLabelOptions=function(a){return a.labelAnchor=this.getLabelPositionPoint(a.labelAnchor),a},l.prototype.internalEvents=function(){return{dragend:function(a){return function(b,c,d,e){var f,g,h;return g=a.trackModel?a.scope.model:a.model,h=a.setCoordsFromEvent(a.modelOrKey(g,a.coordsKey),a.gObject.getPosition()),g=a.setVal(d,a.coordsKey,h),f=a.scope.events,null!=(null!=f?f.dragend:void 0)&&f.dragend(b,c,g,e),a.scope.$apply()}}(this),click:function(a){return function(b,c,d,e){var f;return f=_.isFunction(a.clickKey)?a.clickKey:a.getProp(a.clickKey,a.model),a.doClick&&null!=f?a.scope.$evalAsync(f(b,c,a.model,e)):void 0}}(this)}},l}(b)}])}.call(this),function(){var a=function(a,b){function d(){this.constructor=a}for(var e in b)c.call(b,e)&&(a[e]=b[e]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a},c={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapPolygonChildModel",["uiGmapBasePolyChildModel","uiGmapPolygonOptionsBuilder",function(b,c){var d,e,f;return f=function(a){return new google.maps.Polygon(a)},e=new b(c,f),d=function(b){function c(){return c.__super__.constructor.apply(this,arguments)}return a(c,b),c}(e)}])}.call(this),function(){var a=function(a,b){function d(){this.constructor=a}for(var e in b)c.call(b,e)&&(a[e]=b[e]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a},c={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapPolylineChildModel",["uiGmapBasePolyChildModel","uiGmapPolylineOptionsBuilder",function(b,c){var d,e,f;return f=function(a){return new google.maps.Polyline(a)},e=b(c,f),d=function(b){function c(){return c.__super__.constructor.apply(this,arguments)}return a(c,b),c}(e)}])}.call(this),function(){var c=function(a,b){return function(){return a.apply(b,arguments)}},d=function(a,b){function c(){this.constructor=a}for(var d in b)e.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},e={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api.models.child").factory("uiGmapWindowChildModel",["uiGmapBaseObject","uiGmapGmapUtil","uiGmapLogger","$compile","$http","$templateCache","uiGmapChromeFixes","uiGmapEventsHelper",function(e,f,g,h,i,j,k,l){var m;return m=function(e){function m(a,b,d,e,f,h,i,j,k){var l;this.model=a,this.scope=b,this.opts=d,this.isIconVisibleOnClick=e,this.mapCtrl=f,this.markerScope=h,this.element=i,this.needToManualDestroy=null!=j?j:!1,this.markerIsVisibleAfterWindowClose=null!=k?k:!0,this.updateModel=c(this.updateModel,this),this.destroy=c(this.destroy,this),this.remove=c(this.remove,this),this.getLatestPosition=c(this.getLatestPosition,this),this.hideWindow=c(this.hideWindow,this),this.showWindow=c(this.showWindow,this),this.handleClick=c(this.handleClick,this),this.watchOptions=c(this.watchOptions,this),this.watchCoords=c(this.watchCoords,this),this.createGWin=c(this.createGWin,this),this.watchElement=c(this.watchElement,this),this.watchAndDoShow=c(this.watchAndDoShow,this),this.doShow=c(this.doShow,this),this.clonedModel=_.clone(this.model,!0),this.getGmarker=function(){var a,b;return null!=(null!=(a=this.markerScope)?a.getGMarker:void 0)&&null!=(b=this.markerScope)?b.getGMarker():void 0},this.listeners=[],this.createGWin(),l=this.getGmarker(),null!=l&&l.setClickable(!0),this.watchElement(),this.watchOptions(),this.watchCoords(),this.watchAndDoShow(),this.scope.$on("$destroy",function(a){return function(){return a.destroy()}}(this)),g.info(this)}return d(m,e),m.include(f),m.include(l),m.prototype.doShow=function(a){return this.scope.show===!0||a?this.showWindow():this.hideWindow()},m.prototype.watchAndDoShow=function(){return null!=this.model.show&&(this.scope.show=this.model.show),this.scope.$watch("show",this.doShow,!0),this.doShow()},m.prototype.watchElement=function(){return this.scope.$watch(function(a){return function(){var b,c;if(a.element||a.html)return a.html!==a.element.html()&&a.gObject?(null!=(b=a.opts)&&(b.content=void 0),c=a.gObject.isOpen(),a.remove(),a.createGWin(c)):void 0}}(this))},m.prototype.createGWin=function(b){var c,d,e,f,g;return null==b&&(b=!1),e=this.getGmarker(),d={},null!=this.opts&&(this.scope.coords&&(this.opts.position=this.getCoords(this.scope.coords)),d=this.opts),this.element&&(this.html=_.isObject(this.element)?this.element.html():this.element),c=this.scope.options?this.scope.options:d,this.opts=this.createWindowOptions(e,this.markerScope||this.scope,this.html,c),null!=this.opts?(this.gObject||(this.gObject=this.opts.boxClass&&a.InfoBox&&"function"==typeof a.InfoBox?new a.InfoBox(this.opts):new google.maps.InfoWindow(this.opts),this.listeners.push(google.maps.event.addListener(this.gObject,"domready",function(){return k.maybeRepaint(this.content)})),this.listeners.push(google.maps.event.addListener(this.gObject,"closeclick",function(a){return function(){return e&&(e.setAnimation(a.oldMarkerAnimation),a.markerIsVisibleAfterWindowClose&&_.delay(function(){return e.setVisible(!1),e.setVisible(a.markerIsVisibleAfterWindowClose)},250)),a.gObject.close(),a.model.show=!1,null!=a.scope.closeClick?a.scope.$evalAsync(a.scope.closeClick()):a.scope.$evalAsync()}}(this)))),this.gObject.setContent(this.opts.content),this.handleClick((null!=(f=this.scope)&&null!=(g=f.options)?g.forceClick:void 0)||b),this.doShow(this.gObject.isOpen())):void 0},m.prototype.watchCoords=function(){var a;return a=null!=this.markerScope?this.markerScope:this.scope,a.$watch("coords",function(a){return function(b,c){var d;if(b!==c){if(null==b)a.hideWindow();else if(!a.validateCoords(b))return void g.error("WindowChildMarker cannot render marker as scope.coords as no position on marker: "+JSON.stringify(a.model));if(d=a.getCoords(b),a.gObject.setPosition(d),a.opts)return a.opts.position=d}}}(this),!0)},m.prototype.watchOptions=function(){return this.scope.$watch("options",function(a){return function(b,c){if(b!==c&&(a.opts=b,null!=a.gObject)){if(a.gObject.setOptions(a.opts),null!=a.opts.visible&&a.opts.visible)return a.showWindow();if(null!=a.opts.visible)return a.hideWindow()}}}(this),!0)},m.prototype.handleClick=function(a){var b,c;if(null!=this.gObject)return c=this.getGmarker(),b=function(a){return function(){return null==a.gObject&&a.createGWin(),a.showWindow(),null!=c?(a.initialMarkerVisibility=c.getVisible(),a.oldMarkerAnimation=c.getAnimation(),c.setVisible(a.isIconVisibleOnClick)):void 0}}(this),a&&b(),c?this.listeners=this.listeners.concat(this.setEvents(c,{events:{click:b}},this.model)):void 0},m.prototype.showWindow=function(){var a,c,d;return null!=this.gObject?(c=function(a){return function(){var b,c,d;if(!a.gObject.isOpen()){if(c=a.getGmarker(),null!=a.gObject&&null!=a.gObject.getPosition&&(d=a.gObject.getPosition()),c&&(d=c.getPosition()),!d)return;if(a.gObject.open(a.mapCtrl,c),b=a.gObject.isOpen(),a.model.show!==b)return a.model.show=b}}}(this),this.scope.templateUrl?i.get(this.scope.templateUrl,{cache:j}).then(function(a){return function(d){var e,f;return f=a.scope.$new(),b.isDefined(a.scope.templateParameter)&&(f.parameter=a.scope.templateParameter),e=h(d.data)(f),a.gObject.setContent(e[0]),c()}}(this)):this.scope.template?(d=this.scope.$new(),b.isDefined(this.scope.templateParameter)&&(d.parameter=this.scope.templateParameter),a=h(this.scope.template)(d),this.gObject.setContent(a[0]),c()):c()):void 0},m.prototype.hideWindow=function(){return null!=this.gObject&&this.gObject.isOpen()?this.gObject.close():void 0},m.prototype.getLatestPosition=function(a){var b;return b=this.getGmarker(),null==this.gObject||null==b||a?a?this.gObject.setPosition(a):void 0:this.gObject.setPosition(b.getPosition())},m.prototype.remove=function(){return this.hideWindow(),this.removeEvents(this.listeners),this.listeners.length=0,delete this.gObject,delete this.opts},m.prototype.destroy=function(a){var b;return null==a&&(a=!1),this.remove(),null==this.scope||(null!=(b=this.scope)?b.$$destroyed:void 0)||!this.needToManualDestroy&&!a?void 0:this.scope.$destroy()},m.prototype.updateModel=function(a){return this.clonedModel=_.extend({},a),_.extend(this.model,this.clonedModel)},m}(e)}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},c=function(a,b){function c(){this.constructor=a}for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},d={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api.models.parent").factory("uiGmapBasePolysParentModel",["$timeout","uiGmapLogger","uiGmapModelKey","uiGmapModelsWatcher","uiGmapPropMap","uiGmap_async","uiGmapPromise",function(d,e,f,g,h,i,j){return function(d,k,l){var m;return m=function(f){function m(b,c,f,g,i){this.element=c,this.attrs=f,this.gMap=g,this.defaults=i,this.createChild=a(this.createChild,this),this.pieceMeal=a(this.pieceMeal,this),this.createAllNew=a(this.createAllNew,this),this.watchIdKey=a(this.watchIdKey,this),this.createChildScopes=a(this.createChildScopes,this),this.watchDestroy=a(this.watchDestroy,this),this.onDestroy=a(this.onDestroy,this),this.rebuildAll=a(this.rebuildAll,this),this.doINeedToWipe=a(this.doINeedToWipe,this),this.watchModels=a(this.watchModels,this),m.__super__.constructor.call(this,b),this["interface"]=d,this.$log=e,this.plurals=new h,_.each(d.scopeKeys,function(a){return function(b){return a[b+"Key"]=void 0}}(this)),this.models=void 0,this.firstTime=!0,this.$log.info(this),this.createChildScopes()}return c(m,f),m.include(g),m.prototype.watchModels=function(a){return a.$watchCollection("models",function(b){return function(c,d){return c!==d?b.doINeedToWipe(c)||a.doRebuildAll?b.rebuildAll(a,!0,!0):b.createChildScopes(!1):void 0}}(this))},m.prototype.doINeedToWipe=function(a){var b;return b=null!=a?0===a.length:!0,this.plurals.length>0&&b},m.prototype.rebuildAll=function(a,b,c){return this.onDestroy(c).then(function(a){return function(){return b?a.createChildScopes():void 0}}(this))},m.prototype.onDestroy=function(){return m.__super__.onDestroy.call(this,this.scope),i.promiseLock(this,j.promiseTypes["delete"],void 0,void 0,function(a){return function(){return i.each(a.plurals.values(),function(a){return a.destroy(!0)},i.chunkSizeFrom(a.scope.cleanchunk,!1)).then(function(){var b;return null!=(b=a.plurals)?b.removeAll():void 0})}}(this))},m.prototype.watchDestroy=function(a){return a.$on("$destroy",function(b){return function(){return b.rebuildAll(a,!1,!0)}}(this))},m.prototype.createChildScopes=function(a){return null==a&&(a=!0),b.isUndefined(this.scope.models)?void this.$log.error("No models to create "+l+"s from! I Need direct models!"):null!=this.gMap&&null!=this.scope.models?(this.watchIdKey(this.scope),a?this.createAllNew(this.scope,!1):this.pieceMeal(this.scope,!1)):void 0},m.prototype.watchIdKey=function(a){return this.setIdKey(a),a.$watch("idKey",function(b){return function(c,d){return c!==d&&null==c?(b.idKey=c,b.rebuildAll(a,!0,!0)):void 0}}(this))},m.prototype.createAllNew=function(a,b){var c;return null==b&&(b=!1),this.models=a.models,this.firstTime&&(this.watchModels(a),this.watchDestroy(a)),this.didQueueInitPromise(this,a)?void 0:(c=null,i.promiseLock(this,j.promiseTypes.create,"createAllNew",function(a){return c=a},function(b){return function(){return i.each(a.models,function(a){var d;return d=b.createChild(a,b.gMap),c&&(e.debug("createNew should fall through safely"),d.isEnabled=!1),c},i.chunkSizeFrom(a.chunk)).then(function(){return b.firstTime=!1})}}(this)))},m.prototype.pieceMeal=function(a,b){var c,d;return null==b&&(b=!0),a.$$destroyed?void 0:(c=null,d=null,this.models=a.models,null!=a&&this.modelsLength()&&this.plurals.length?i.promiseLock(this,j.promiseTypes.update,"pieceMeal",function(a){return c=a},function(b){return function(){return j.promise(function(){return b.figureOutState(b.idKey,a,b.plurals,b.modelKeyComparison)}).then(function(f){return d=f,d.updates.length&&e.info("polygons updates: "+d.updates.length+" will be missed"),i.each(d.removals,function(a){return null!=a?(a.destroy(),b.plurals.remove(a.model[b.idKey]),c):void 0},i.chunkSizeFrom(a.chunk))}).then(function(){return i.each(d.adds,function(a){return c&&e.debug("pieceMeal should fall through safely"),b.createChild(a,b.gMap),c},i.chunkSizeFrom(a.chunk))})}}(this)):(this.inProgress=!1,this.rebuildAll(this.scope,!0,!0)))},m.prototype.createChild=function(a,b){var c,e;return e=this.scope.$new(!1),this.setChildScope(d.scopeKeys,e,a),e.$watch("model",function(a){return function(b,c){return b!==c?a.setChildScope(e,b):void 0}}(this),!0),e["static"]=this.scope["static"],c=new k(e,this.attrs,b,this.defaults,a),null==a[this.idKey]?void this.$log.error(l+" model has no id to assign a child to.\nThis is required for performance. Please assign id,\nor redirect id to a different key."):(this.plurals.put(a[this.idKey],c),c)},m}(f)}}])}.call(this),function(){var a=function(a,b){function d(){this.constructor=a}for(var e in b)c.call(b,e)&&(a[e]=b[e]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a},c={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api.models.parent").factory("uiGmapCircleParentModel",["uiGmapLogger","$timeout","uiGmapGmapUtil","uiGmapEventsHelper","uiGmapCircleOptionsBuilder",function(c,d,e,f,g){var h;return h=function(d){function g(a,d,f,g,h){var i,j,k;this.attrs=f,this.map=g,this.DEFAULTS=h,this.scope=a,k=null,i=function(a){return function(){return k=null,null!=a.listeners?(a.removeEvents(a.listeners),a.listeners=void 0):void 0}}(this),j=new google.maps.Circle(this.buildOpts(e.getCoords(a.center),a.radius)),this.setMyOptions=function(b){return function(c,d){return _.isEqual(c,d)?void 0:j.setOptions(b.buildOpts(e.getCoords(a.center),a.radius))}}(this),this.props=this.props.concat([{prop:"center",isColl:!0},{prop:"fill",isColl:!0},"radius","zIndex"]),this.watchProps(),i(),this.listeners=this.setEvents(j,a,a,["radius_changed"]),null!=this.listeners&&this.listeners.push(google.maps.event.addListener(j,"radius_changed",function(){var c,d;return c=j.getRadius(),c!==k?(k=c,d=function(){var b,d;return c!==a.radius&&(a.radius=c),(null!=(b=a.events)?b.radius_changed:void 0)&&_.isFunction(null!=(d=a.events)?d.radius_changed:void 0)?a.events.radius_changed(j,"radius_changed",a,arguments):void 0},
b.mock?d():a.$evalAsync(function(){return d()})):void 0})),null!=this.listeners&&this.listeners.push(google.maps.event.addListener(j,"center_changed",function(){return a.$evalAsync(function(){return b.isDefined(a.center.type)?(a.center.coordinates[1]=j.getCenter().lat(),a.center.coordinates[0]=j.getCenter().lng()):(a.center.latitude=j.getCenter().lat(),a.center.longitude=j.getCenter().lng())})})),a.$on("$destroy",function(){return function(){return i(),j.setMap(null)}}(this)),c.info(this)}return a(g,d),g.include(e),g.include(f),g}(g)}])}.call(this),function(){var a=function(a,b){function d(){this.constructor=a}for(var e in b)c.call(b,e)&&(a[e]=b[e]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a},c={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api.models.parent").factory("uiGmapDrawingManagerParentModel",["uiGmapLogger","$timeout","uiGmapBaseObject","uiGmapEventsHelper",function(b,c,d,e){var f;return f=function(b){function c(a,b,c,d){var e,f;this.scope=a,this.attrs=c,this.map=d,e=new google.maps.drawing.DrawingManager(this.scope.options),e.setMap(this.map),f=void 0,null!=this.scope.control&&(this.scope.control.getDrawingManager=function(){return e}),!this.scope["static"]&&this.scope.options&&this.scope.$watch("options",function(a){return null!=e?e.setOptions(a):void 0},!0),null!=this.scope.events&&(f=this.setEvents(e,this.scope,this.scope),scope.$watch("events",function(a){return function(b,c){return _.isEqual(b,c)?void 0:(null!=f&&a.removeEvents(f),f=a.setEvents(e,a.scope,a.scope))}}(this))),scope.$on("$destroy",function(a){return function(){return null!=f&&a.removeEvents(f),e.setMap(null),e=null}}(this))}return a(c,b),c.include(e),c}(d)}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},c=function(a,b){function c(){this.constructor=a}for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},d={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api.models.parent").factory("uiGmapIMarkerParentModel",["uiGmapModelKey","uiGmapLogger",function(d,e){var f;return f=function(d){function f(c,d,g,h){if(this.scope=c,this.element=d,this.attrs=g,this.map=h,this.onWatch=a(this.onWatch,this),this.watch=a(this.watch,this),this.validateScope=a(this.validateScope,this),f.__super__.constructor.call(this,this.scope),this.$log=e,!this.validateScope(this.scope))throw new String("Unable to construct IMarkerParentModel due to invalid scope");this.doClick=b.isDefined(this.attrs.click),null!=this.scope.options&&(this.DEFAULTS=this.scope.options),this.watch("coords",this.scope),this.watch("icon",this.scope),this.watch("options",this.scope),this.scope.$on("$destroy",function(a){return function(){return a.onDestroy(a.scope)}}(this))}return c(f,d),f.prototype.DEFAULTS={},f.prototype.validateScope=function(a){var b;return null==a?(this.$log.error(this.constructor.name+": invalid scope used"),!1):(b=null!=a.coords,b?b:(this.$log.error(this.constructor.name+": no valid coords attribute found"),!1))},f.prototype.watch=function(a,b,c){return null==c&&(c=!0),b.$watch(a,function(c){return function(d,e){return _.isEqual(d,e)?void 0:c.onWatch(a,b,d,e)}}(this),c)},f.prototype.onWatch=function(){},f}(d)}])}.call(this),function(){var a=function(a,b){function d(){this.constructor=a}for(var e in b)c.call(b,e)&&(a[e]=b[e]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a},c={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api.models.parent").factory("uiGmapIWindowParentModel",["uiGmapModelKey","uiGmapGmapUtil","uiGmapLogger",function(b,c,d){var e;return e=function(b){function e(a,b,c,f,g,h,i,j){e.__super__.constructor.call(this,a),this.$log=d,this.$timeout=g,this.$compile=h,this.$http=i,this.$templateCache=j,this.DEFAULTS={},null!=a.options&&(this.DEFAULTS=a.options)}return a(e,b),e.include(c),e.prototype.getItem=function(a,b,c){return"models"===b?a[b][c]:a[b].get(c)},e}(b)}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},c=function(a,b){function c(){this.constructor=a}for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},d={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api.models.parent").factory("uiGmapLayerParentModel",["uiGmapBaseObject","uiGmapLogger","$timeout",function(d,e){var f;return f=function(d){function f(c,d,f,g,h,i){return this.scope=c,this.element=d,this.attrs=f,this.gMap=g,this.onLayerCreated=null!=h?h:void 0,this.$log=null!=i?i:e,this.createGoogleLayer=a(this.createGoogleLayer,this),null==this.attrs.type?void this.$log.info("type attribute for the layer directive is mandatory. Layer creation aborted!!"):(this.createGoogleLayer(),this.doShow=!0,b.isDefined(this.attrs.show)&&(this.doShow=this.scope.show),this.doShow&&null!=this.gMap&&this.gObject.setMap(this.gMap),this.scope.$watch("show",function(a){return function(b,c){return b!==c?(a.doShow=b,a.gObject.setMap(b?a.gMap:null)):void 0}}(this),!0),this.scope.$watch("options",function(a){return function(b,c){return b!==c?(a.gObject.setMap(null),a.gObject=null,a.createGoogleLayer()):void 0}}(this),!0),void this.scope.$on("$destroy",function(a){return function(){return a.gObject.setMap(null)}}(this)))}return c(f,d),f.prototype.createGoogleLayer=function(){var a;return this.gObject=null==this.attrs.options?void 0===this.attrs.namespace?new google.maps[this.attrs.type]:new google.maps[this.attrs.namespace][this.attrs.type]:void 0===this.attrs.namespace?new google.maps[this.attrs.type](this.scope.options):new google.maps[this.attrs.namespace][this.attrs.type](this.scope.options),null!=this.gObject&&null!=this.onLayerCreated&&"function"==typeof(a=this.onLayerCreated(this.scope,this.gObject))?a(this.gObject):void 0},f}(d)}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},c=function(a,b){function c(){this.constructor=a}for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},d={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api.models.parent").factory("uiGmapMapTypeParentModel",["uiGmapBaseObject","uiGmapLogger",function(d,e){var f;return f=function(d){function f(c,d,f,g,h){return this.scope=c,this.element=d,this.attrs=f,this.gMap=g,this.$log=null!=h?h:e,this.hideOverlay=a(this.hideOverlay,this),this.showOverlay=a(this.showOverlay,this),this.refreshMapType=a(this.refreshMapType,this),this.createMapType=a(this.createMapType,this),null==this.attrs.options?void this.$log.info("options attribute for the map-type directive is mandatory. Map type creation aborted!!"):(this.id=this.gMap.overlayMapTypesCount=this.gMap.overlayMapTypesCount+1||0,this.doShow=!0,this.createMapType(),b.isDefined(this.attrs.show)&&(this.doShow=this.scope.show),this.doShow&&null!=this.gMap&&this.showOverlay(),this.scope.$watch("show",function(a){return function(b,c){return b!==c?(a.doShow=b,b?a.showOverlay():a.hideOverlay()):void 0}}(this),!0),this.scope.$watch("options",function(a){return function(b,c){return _.isEqual(b,c)?void 0:a.refreshMapType()}}(this),!0),b.isDefined(this.attrs.refresh)&&this.scope.$watch("refresh",function(a){return function(b,c){return _.isEqual(b,c)?void 0:a.refreshMapType()}}(this),!0),void this.scope.$on("$destroy",function(a){return function(){return a.hideOverlay(),a.mapType=null}}(this)))}return c(f,d),f.prototype.createMapType=function(){if(null!=this.scope.options.getTile)this.mapType=this.scope.options;else{if(null==this.scope.options.getTileUrl)return void this.$log.info("options should provide either getTile or getTileUrl methods. Map type creation aborted!!");this.mapType=new google.maps.ImageMapType(this.scope.options)}return this.attrs.id&&this.scope.id&&(this.gMap.mapTypes.set(this.scope.id,this.mapType),b.isDefined(this.attrs.show)||(this.doShow=!1)),this.mapType.layerId=this.id},f.prototype.refreshMapType=function(){return this.hideOverlay(),this.mapType=null,this.createMapType(),this.doShow&&null!=this.gMap?this.showOverlay():void 0},f.prototype.showOverlay=function(){return this.gMap.overlayMapTypes.push(this.mapType)},f.prototype.hideOverlay=function(){var a;return a=!1,this.gMap.overlayMapTypes.forEach(function(b){return function(c,d){a||c.layerId!==b.id||(a=!0,b.gMap.overlayMapTypes.removeAt(d))}}(this))},f}(d)}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},c=function(a,b){function c(){this.constructor=a}for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},d={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api.models.parent").factory("uiGmapMarkersParentModel",["uiGmapIMarkerParentModel","uiGmapModelsWatcher","uiGmapPropMap","uiGmapMarkerChildModel","uiGmap_async","uiGmapClustererMarkerManager","uiGmapMarkerManager","$timeout","uiGmapIMarker","uiGmapPromise","uiGmapGmapUtil","uiGmapLogger",function(d,e,f,g,h,i,j,k,l,m,n){var o,p;return p=function(a,b){return b.plurals=new f,b.scope.plurals=b.plurals,b},o=function(d){function k(b,c,d,e){this.onDestroy=a(this.onDestroy,this),this.newChildMarker=a(this.newChildMarker,this),this.pieceMeal=a(this.pieceMeal,this),this.rebuildAll=a(this.rebuildAll,this),this.createAllNew=a(this.createAllNew,this),this.createChildScopes=a(this.createChildScopes,this),this.validateScope=a(this.validateScope,this),this.onWatch=a(this.onWatch,this);var g;k.__super__.constructor.call(this,b,c,d,e),this["interface"]=l,g=this,p(new f,this),this.scope.pluralsUpdate={updateCtr:0},this.$log.info(this),this.doRebuildAll=null!=this.scope.doRebuildAll?this.scope.doRebuildAll:!1,this.setIdKey(b),this.scope.$watch("doRebuildAll",function(a){return function(b,c){return b!==c?a.doRebuildAll=b:void 0}}(this)),this.modelsLength()||(this.modelsRendered=!1),this.scope.$watch("models",function(a){return function(c,d){if(!_.isEqual(c,d)||!a.modelsRendered){if(0===c.length&&0===d.length)return;return a.modelsRendered=!0,a.onWatch("models",b,c,d)}}}(this),!this.isTrue(d.modelsbyref)),this.watch("doCluster",b),this.watch("clusterOptions",b),this.watch("clusterEvents",b),this.watch("fit",b),this.watch("idKey",b),this.gManager=void 0,this.createAllNew(b)}return c(k,d),k.include(n),k.include(e),k.prototype.onWatch=function(a,b,c,d){return"idKey"===a&&c!==d&&(this.idKey=c),this.doRebuildAll||"doCluster"===a?this.rebuildAll(b):this.pieceMeal(b)},k.prototype.validateScope=function(a){var c;return c=b.isUndefined(a.models)||void 0===a.models,c&&this.$log.error(this.constructor.name+": no valid models attribute found"),k.__super__.validateScope.call(this,a)||c},k.prototype.createChildScopes=function(a){return null!=this.gMap&&null!=this.scope.models?a?this.createAllNew(this.scope,!1):this.pieceMeal(this.scope,!1):void 0},k.prototype.createAllNew=function(a){var c,d,e,f,g;return null!=this.gManager&&(this.gManager.clear(),delete this.gManager),a.doCluster?(a.clusterEvents&&(g=this,this.origClusterEvents?b.extend(a.clusterEvents,this.origClusterEvents):this.origClusterEvents={click:null!=(d=a.clusterEvents)?d.click:void 0,mouseout:null!=(e=a.clusterEvents)?e.mouseout:void 0,mouseover:null!=(f=a.clusterEvents)?f.mouseover:void 0},b.extend(a.clusterEvents,{click:function(a){return g.maybeExecMappedEvent(a,"click")},mouseout:function(a){return g.maybeExecMappedEvent(a,"mouseout")},mouseover:function(a){return g.maybeExecMappedEvent(a,"mouseover")}})),this.gManager=new i(this.map,void 0,a.clusterOptions,a.clusterEvents)):this.gManager=new j(this.map),this.didQueueInitPromise(this,a)?void 0:(c=null,h.promiseLock(this,m.promiseTypes.create,"createAllNew",function(a){return c=a},function(b){return function(){return h.each(a.models,function(d){return b.newChildMarker(d,a),c},h.chunkSizeFrom(a.chunk)).then(function(){return b.modelsRendered=!0,a.fit&&b.gManager.fit(),b.gManager.draw(),b.scope.pluralsUpdate.updateCtr+=1},h.chunkSizeFrom(a.chunk))}}(this)))},k.prototype.rebuildAll=function(a){var b;if(a.doRebuild||void 0===a.doRebuild)return(null!=(b=this.scope.plurals)?b.length:void 0)?this.onDestroy(a).then(function(b){return function(){return b.createAllNew(a)}}(this)):this.createAllNew(a)},k.prototype.pieceMeal=function(a){var b,c;if(!a.$$destroyed)return b=null,c=null,this.modelsLength()&&this.scope.plurals.length?h.promiseLock(this,m.promiseTypes.update,"pieceMeal",function(a){return b=a},function(d){return function(){return m.promise(function(){return d.figureOutState(d.idKey,a,d.scope.plurals,d.modelKeyComparison)}).then(function(e){return c=e,h.each(c.removals,function(a){return null!=a?(null!=a.destroy&&a.destroy(),d.scope.plurals.remove(a.id),b):void 0},h.chunkSizeFrom(a.chunk))}).then(function(){return h.each(c.adds,function(c){return d.newChildMarker(c,a),b},h.chunkSizeFrom(a.chunk))}).then(function(){return h.each(c.updates,function(a){return d.updateChild(a.child,a.model),b},h.chunkSizeFrom(a.chunk))}).then(function(){return(c.adds.length>0||c.removals.length>0||c.updates.length>0)&&(a.plurals=d.scope.plurals,a.fit&&d.gManager.fit(),d.gManager.draw()),d.scope.pluralsUpdate.updateCtr+=1})}}(this)):(this.inProgress=!1,this.rebuildAll(a))},k.prototype.newChildMarker=function(a,b){var c,d,e,f;return null==a[this.idKey]?void this.$log.error("Marker model has no id to assign a child to. This is required for performance. Please assign id, or redirect id to a different key."):(this.$log.info("child",c,"markers",this.scope.plurals),d=b.$new(!0),d.events=b.events,f={},l.scopeKeys.forEach(function(a){return f[a]=b[a]}),c=new g(d,a,f,this.map,this.DEFAULTS,this.doClick,this.gManager,e=!1),this.scope.plurals.put(a[this.idKey],c),c)},k.prototype.onDestroy=function(a){return k.__super__.onDestroy.call(this,a),h.promiseLock(this,m.promiseTypes["delete"],void 0,void 0,function(a){return function(){return h.each(a.scope.plurals.values(),function(a){return null!=a?a.destroy(!1):void 0},h.chunkSizeFrom(a.scope.cleanchunk,!1)).then(function(){return null!=a.gManager&&a.gManager.clear(),a.plurals.removeAll(),a.plurals!==a.scope.plurals&&console.error("plurals out of sync for MarkersParentModel"),a.scope.pluralsUpdate.updateCtr+=1})}}(this))},k.prototype.maybeExecMappedEvent=function(a,b){var c,d;return _.isFunction(null!=(d=this.scope.clusterEvents)?d[b]:void 0)&&(c=this.mapClusterToPlurals(a),this.origClusterEvents[b])?this.origClusterEvents[b](c.cluster,c.mapped):void 0},k.prototype.mapClusterToPlurals=function(a){var b;return b=a.getMarkers().map(function(a){return function(b){return a.scope.plurals.get(b.key).model}}(this)),{cluster:a,mapped:b}},k.prototype.getItem=function(a,b,c){return"models"===b?a[b][c]:a[b].get(c)},k}(d)}])}.call(this),function(){["Polygon","Polyline"].forEach(function(a){return b.module("uiGmapgoogle-maps.directives.api.models.parent").factory("uiGmap"+a+"sParentModel",["uiGmapBasePolysParentModel","uiGmap"+a+"ChildModel","uiGmapI"+a,function(b,c,d){return b(d,c,a)}])})}.call(this),function(){var a=function(a,b){function d(){this.constructor=a}for(var e in b)c.call(b,e)&&(a[e]=b[e]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a},c={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api.models.parent").factory("uiGmapRectangleParentModel",["uiGmapLogger","uiGmapGmapUtil","uiGmapEventsHelper","uiGmapRectangleOptionsBuilder",function(b,c,d,e){var f;return f=function(e){function f(a,c,d,e,f){var g,h,i,j,k,l,m,n,o,p,q;this.scope=a,this.attrs=d,this.map=e,this.DEFAULTS=f,g=void 0,j=!1,o=[],n=void 0,k=function(a){return function(){return a.isTrue(a.attrs.fit)?a.fitMapBounds(a.map,g):void 0}}(this),i=function(a){return function(){var c,d,e;return null!=a.scope.bounds&&null!=(null!=(c=a.scope.bounds)?c.sw:void 0)&&null!=(null!=(d=a.scope.bounds)?d.ne:void 0)&&a.validateBoundPoints(a.scope.bounds)?(g=a.convertBoundPoints(a.scope.bounds),b.info("new new bounds created: "+JSON.stringify(g))):null!=a.scope.bounds.getNorthEast&&null!=a.scope.bounds.getSouthWest?g=a.scope.bounds:null!=a.scope.bounds?b.error("Invalid bounds for newValue: "+JSON.stringify(null!=(e=a.scope)?e.bounds:void 0)):void 0}}(this),i(),l=new google.maps.Rectangle(this.buildOpts(g)),b.info("gObject (rectangle) created: "+l),p=!1,q=function(a){return function(){var b,c,d;return b=l.getBounds(),c=b.getNorthEast(),d=b.getSouthWest(),p?void 0:a.scope.$evalAsync(function(a){return null!=a.bounds&&null!=a.bounds.sw&&null!=a.bounds.ne&&(a.bounds.ne={latitude:c.lat(),longitude:c.lng()},a.bounds.sw={latitude:d.lat(),longitude:d.lng()}),null!=a.bounds.getNorthEast&&null!=a.bounds.getSouthWest?a.bounds=b:void 0})}}(this),m=function(a){return function(){return k(),a.removeEvents(o),o.push(google.maps.event.addListener(l,"dragstart",function(){return j=!0})),o.push(google.maps.event.addListener(l,"dragend",function(){return j=!1,q()})),o.push(google.maps.event.addListener(l,"bounds_changed",function(){return j?void 0:q()}))}}(this),h=function(a){return function(){return a.removeEvents(o),null!=n&&a.removeEvents(n),l.setMap(null)}}(this),null!=g&&m(),this.scope.$watch("bounds",function(a,b){var c;if(!(_.isEqual(a,b)&&null!=g||j))return p=!0,null==a?void h():(null==g?c=!0:k(),i(),l.setBounds(g),p=!1,c&&null!=g?m():void 0)},!0),this.setMyOptions=function(a){return function(b,c){return _.isEqual(b,c)||null==g||null==b?void 0:l.setOptions(a.buildOpts(g))}}(this),this.props.push("bounds"),this.watchProps(this.props),null!=this.attrs.events&&(n=this.setEvents(l,this.scope,this.scope),this.scope.$watch("events",function(a){return function(b,c){return _.isEqual(b,c)?void 0:(null!=n&&a.removeEvents(n),n=a.setEvents(l,a.scope,a.scope))}}(this))),this.scope.$on("$destroy",function(){return function(){return h()}}(this)),b.info(this)}return a(f,e),f.include(c),f.include(d),f}(e)}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},c=function(a,b){function c(){this.constructor=a}for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},d={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api.models.parent").factory("uiGmapSearchBoxParentModel",["uiGmapBaseObject","uiGmapLogger","uiGmapEventsHelper","$timeout","$http","$templateCache",function(d,e,f){var g;return g=function(d){function g(c,d,f,g,h,i,j){var k;return this.scope=c,this.element=d,this.attrs=f,this.gMap=g,this.ctrlPosition=h,this.template=i,this.$log=null!=j?j:e,this.setVisibility=a(this.setVisibility,this),this.getBounds=a(this.getBounds,this),this.setBounds=a(this.setBounds,this),this.createSearchBox=a(this.createSearchBox,this),this.addToParentDiv=a(this.addToParentDiv,this),this.addAsMapControl=a(this.addAsMapControl,this),this.init=a(this.init,this),null==this.attrs.template?void this.$log.error("template attribute for the search-box directive is mandatory. Places Search Box creation aborted!!"):(b.isUndefined(this.scope.options)&&(this.scope.options={},this.scope.options.visible=!0),b.isUndefined(this.scope.options.visible)&&(this.scope.options.visible=!0),b.isUndefined(this.scope.options.autocomplete)&&(this.scope.options.autocomplete=!1),this.visible=this.scope.options.visible,this.autocomplete=this.scope.options.autocomplete,k=b.element("<div></div>"),k.append(this.template),this.input=k.find("input")[0],void this.init())}return c(g,d),g.include(f),g.prototype.init=function(){return this.createSearchBox(),this.scope.$watch("options",function(a){return function(c){return b.isObject(c)&&(null!=c.bounds&&a.setBounds(c.bounds),null!=c.visible&&a.visible!==c.visible)?a.setVisibility(c.visible):void 0}}(this),!0),null!=this.attrs.parentdiv?this.addToParentDiv():this.addAsMapControl(),this.listener=this.autocomplete?google.maps.event.addListener(this.gObject,"place_changed",function(a){return function(){return a.places=a.gObject.getPlace()}}(this)):google.maps.event.addListener(this.gObject,"places_changed",function(a){return function(){return a.places=a.gObject.getPlaces()}}(this)),this.listeners=this.setEvents(this.gObject,this.scope,this.scope),this.$log.info(this),this.scope.$on("$destroy",function(a){return function(){return a.gObject=null}}(this))},g.prototype.addAsMapControl=function(){return this.gMap.controls[google.maps.ControlPosition[this.ctrlPosition]].push(this.input)},g.prototype.addToParentDiv=function(){return this.parentDiv=b.element(document.getElementById(this.scope.parentdiv)),this.parentDiv.append(this.input)},g.prototype.createSearchBox=function(){return this.gObject=this.autocomplete?new google.maps.places.Autocomplete(this.input,this.scope.options):new google.maps.places.SearchBox(this.input,this.scope.options)},g.prototype.setBounds=function(a){if(b.isUndefined(a.isEmpty))this.$log.error("Error: SearchBoxParentModel setBounds. Bounds not an instance of LatLngBounds.");else if(a.isEmpty()===!1&&null!=this.gObject)return this.gObject.setBounds(a)},g.prototype.getBounds=function(){return this.gObject.getBounds()},g.prototype.setVisibility=function(a){return null!=this.attrs.parentdiv?a===!1?this.parentDiv.addClass("ng-hide"):this.parentDiv.removeClass("ng-hide"):a===!1?this.gMap.controls[google.maps.ControlPosition[this.ctrlPosition]].clear():this.gMap.controls[google.maps.ControlPosition[this.ctrlPosition]].push(this.input),this.visible=a},g}(d)}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},c=function(a,b){function c(){this.constructor=a}for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},d={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api.models.parent").factory("uiGmapWindowsParentModel",["uiGmapIWindowParentModel","uiGmapModelsWatcher","uiGmapPropMap","uiGmapWindowChildModel","uiGmapLinked","uiGmap_async","uiGmapLogger","$timeout","$compile","$http","$templateCache","$interpolate","uiGmapPromise","uiGmapIWindow","uiGmapGmapUtil",function(d,e,f,g,h,i,j,k,l,m,n,o,p,q,r){var s;return s=function(d){function s(b,c,d,e,g,i){this.gMap=g,this.markersScope=i,this.modelKeyComparison=a(this.modelKeyComparison,this),this.interpolateContent=a(this.interpolateContent,this),this.setChildScope=a(this.setChildScope,this),this.createWindow=a(this.createWindow,this),this.setContentKeys=a(this.setContentKeys,this),this.pieceMeal=a(this.pieceMeal,this),this.createAllNew=a(this.createAllNew,this),this.watchIdKey=a(this.watchIdKey,this),this.createChildScopes=a(this.createChildScopes,this),this.watchOurScope=a(this.watchOurScope,this),this.watchDestroy=a(this.watchDestroy,this),this.onDestroy=a(this.onDestroy,this),this.rebuildAll=a(this.rebuildAll,this),this.doINeedToWipe=a(this.doINeedToWipe,this),this.watchModels=a(this.watchModels,this),this.go=a(this.go,this),s.__super__.constructor.call(this,b,c,d,e,k,l,m,n),this["interface"]=q,this.plurals=new f,_.each(q.scopeKeys,function(a){return function(b){return a[b+"Key"]=void 0}}(this)),this.linked=new h(b,c,d,e),this.contentKeys=void 0,this.isIconVisibleOnClick=void 0,this.firstTime=!0,this.firstWatchModels=!0,this.$log.info(self),this.parentScope=void 0,this.go(b)}return c(s,d),s.include(e),s.prototype.go=function(a){return this.watchOurScope(a),this.doRebuildAll=null!=this.scope.doRebuildAll?this.scope.doRebuildAll:!1,a.$watch("doRebuildAll",function(a){return function(b,c){return b!==c?a.doRebuildAll=b:void 0}}(this)),this.createChildScopes()},s.prototype.watchModels=function(a){var b;return b=null!=this.markersScope?"pluralsUpdate":"models",a.$watch(b,function(b){return function(c,d){var e;return!_.isEqual(c,d)||b.firstWatchModels?(b.firstWatchModels=!1,b.doRebuildAll||b.doINeedToWipe(a.models)?b.rebuildAll(a,!0,!0):(e=0===b.plurals.length,null!=b.existingPieces?_.last(b.existingPieces._content).then(function(){return b.createChildScopes(e)}):b.createChildScopes(e))):void 0}}(this),!0)},s.prototype.doINeedToWipe=function(a){var b;return b=null!=a?0===a.length:!0,this.plurals.length>0&&b},s.prototype.rebuildAll=function(a,b,c){return this.onDestroy(c).then(function(a){return function(){return b?a.createChildScopes():void 0}}(this))},s.prototype.onDestroy=function(){return s.__super__.onDestroy.call(this,this.scope),i.promiseLock(this,p.promiseTypes["delete"],void 0,void 0,function(a){return function(){return i.each(a.plurals.values(),function(a){return a.destroy()},i.chunkSizeFrom(a.scope.cleanchunk,!1)).then(function(){var b;return null!=(b=a.plurals)?b.removeAll():void 0})}}(this))},s.prototype.watchDestroy=function(a){return a.$on("$destroy",function(b){return function(){return b.firstWatchModels=!0,b.firstTime=!0,b.rebuildAll(a,!1,!0)}}(this))},s.prototype.watchOurScope=function(a){return _.each(q.scopeKeys,function(b){return function(c){var d;return d=c+"Key",b[d]="function"==typeof a[c]?a[c]():a[c]}}(this))},s.prototype.createChildScopes=function(a){var c,d,e;return null==a&&(a=!0),this.isIconVisibleOnClick=!0,b.isDefined(this.linked.attrs.isiconvisibleonclick)&&(this.isIconVisibleOnClick=this.linked.scope.isIconVisibleOnClick),c=b.isUndefined(this.linked.scope.models),!c||void 0!==this.markersScope&&void 0!==(null!=(d=this.markersScope)?d.plurals:void 0)&&void 0!==(null!=(e=this.markersScope)?e.models:void 0)?null!=this.gMap?null!=this.linked.scope.models?(this.watchIdKey(this.linked.scope),a?this.createAllNew(this.linked.scope,!1):this.pieceMeal(this.linked.scope,!1)):(this.parentScope=this.markersScope,this.watchIdKey(this.parentScope),a?this.createAllNew(this.markersScope,!0,"plurals",!1):this.pieceMeal(this.markersScope,!0,"plurals",!1)):void 0:void this.$log.error("No models to create windows from! Need direct models or models derived from markers!")},s.prototype.watchIdKey=function(a){return this.setIdKey(a),a.$watch("idKey",function(b){return function(c,d){return c!==d&&null==c?(b.idKey=c,b.rebuildAll(a,!0,!0)):void 0}}(this))},s.prototype.createAllNew=function(a,b,c,d){var e;return null==c&&(c="models"),null==d&&(d=!1),this.firstTime&&(this.watchModels(a),this.watchDestroy(a)),this.setContentKeys(a.models),this.didQueueInitPromise(this,a)?void 0:(e=null,i.promiseLock(this,p.promiseTypes.create,"createAllNew",function(a){return e=a},function(d){return function(){return i.each(a.models,function(f){var g,h;return g=b&&null!=(h=d.getItem(a,c,f[d.idKey]))?h.gObject:void 0,e||(!g&&d.markersScope&&j.error("Unable to get gMarker from markersScope!"),d.createWindow(f,g,d.gMap)),e},i.chunkSizeFrom(a.chunk)).then(function(){return d.firstTime=!1})}}(this)))},s.prototype.pieceMeal=function(a,b,c,d){var e,f;return null==c&&(c="models"),null==d&&(d=!0),a.$$destroyed?void 0:(e=null,f=null,null!=a&&this.modelsLength()&&this.plurals.length?i.promiseLock(this,p.promiseTypes.update,"pieceMeal",function(a){return e=a},function(b){return function(){return p.promise(function(){return b.figureOutState(b.idKey,a,b.plurals,b.modelKeyComparison)}).then(function(c){return f=c,i.each(f.removals,function(a){return null!=a?(b.plurals.remove(a.id),null!=a.destroy&&a.destroy(!0),e):void 0},i.chunkSizeFrom(a.chunk))}).then(function(){return i.each(f.adds,function(d){var f,g;if(f=null!=(g=b.getItem(a,c,d[b.idKey]))?g.gObject:void 0,!f)throw"Gmarker undefined";return b.createWindow(d,f,b.gMap),e})}).then(function(){return i.each(f.updates,function(a){return b.updateChild(a.child,a.model),e},i.chunkSizeFrom(a.chunk))})}}(this)):(j.debug("pieceMeal: rebuildAll"),this.rebuildAll(this.scope,!0,!0)))},s.prototype.setContentKeys=function(a){return this.modelsLength(a)?this.contentKeys=Object.keys(a[0]):void 0},s.prototype.createWindow=function(a,b,c){var d,e,f,h,i,j;return e=this.linked.scope.$new(!1),this.setChildScope(e,a),e.$watch("model",function(a){return function(b,c){return b!==c?a.setChildScope(e,b):void 0}}(this),!0),f={html:function(b){return function(){return b.interpolateContent(b.linked.element.html(),a)}}(this)},this.DEFAULTS=this.scopeOrModelVal(this.optionsKey,this.scope,a)||{},h=this.createWindowOptions(b,e,f.html(),this.DEFAULTS),d=new g(a,e,h,this.isIconVisibleOnClick,c,null!=(i=this.markersScope)&&null!=(j=i.plurals.get(a[this.idKey]))?j.scope:void 0,f,!1,!0),null==a[this.idKey]?void this.$log.error("Window model has no id to assign a child to. This is required for performance. Please assign id, or redirect id to a different key."):(this.plurals.put(a[this.idKey],d),d)},s.prototype.setChildScope=function(a,b){return _.each(q.scopeKeys,function(c){return function(d){var e,f;return e=d+"Key",f="self"===c[e]?b:b[c[e]],f!==a[d]?a[d]=f:void 0}}(this)),a.model=b},s.prototype.interpolateContent=function(a,b){var c,d,e,f,g,h;if(void 0!==this.contentKeys&&0!==this.contentKeys.length){for(c=o(a),e={},h=this.contentKeys,d=0,g=h.length;g>d;d++)f=h[d],e[f]=b[f];return c(e)}},s.prototype.modelKeyComparison=function(a,b){var c,d;if(d=null!=this.scope.coords?this.scope:this.parentScope,null==d)throw"No scope or parentScope set!";return(c=r.equalCoords(this.evalModelHandle(a,d.coords),this.evalModelHandle(b,d.coords)))?c=_.every(_.without(this["interface"].scopeKeys,"coords"),function(c){return function(e){return c.evalModelHandle(a,d[e])===c.evalModelHandle(b,d[e])}}(this)):c},s}(d)}])}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapCircle",["uiGmapICircle","uiGmapCircleParentModel",function(a,b){return _.extend(a,{link:function(a,c,d,e){return e.getScope().deferred.promise.then(function(){return function(e){return new b(a,c,d,e)}}(this))}})}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},c=function(a,b){function c(){this.constructor=a}for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},d={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapControl",["uiGmapIControl","$http","$templateCache","$compile","$controller","uiGmapGoogleMapApi",function(d,e,f,g,h,i){var j;return j=function(j){function k(){this.link=a(this.link,this),k.__super__.constructor.call(this)}return c(k,j),k.prototype.link=function(a,c,j,k){return i.then(function(c){return function(i){var j,l;return b.isUndefined(a.template)?void c.$log.error("mapControl: could not find a valid template property"):(j=b.isDefined(a.index&&!isNaN(parseInt(a.index)))?parseInt(a.index):void 0,l=b.isDefined(a.position)?a.position.toUpperCase().replace(/-/g,"_"):"TOP_CENTER",i.ControlPosition[l]?d.mapPromise(a,k).then(function(d){var i,k;return i=void 0,k=b.element("<div></div>"),e.get(a.template,{cache:f}).success(function(c){var d,e;return e=a.$new(),k.append(c),b.isDefined(a.controller)&&(d=h(a.controller,{$scope:e}),k.children().data("$ngControllerController",d)),i=g(k.children())(e),j?i[0].index=j:void 0}).error(function(){return c.$log.error("mapControl: template could not be found")}).then(function(){return d.controls[google.maps.ControlPosition[l]].push(i[0])})}):void c.$log.error("mapControl: invalid position property"))}}(this))},k}(d)}])}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api").service("uiGmapDragZoom",["uiGmapCtrlHandle","uiGmapPropertyAction",function(a,b){return{restrict:"EMA",transclude:!0,template:'<div class="angular-google-map-dragzoom" ng-transclude style="display: none"></div>',require:"^uiGmapGoogleMap",scope:{keyboardkey:"=",options:"=",spec:"="},controller:["$scope","$element",function(b,c){return b.ctrlType="uiGmapDragZoom",_.extend(this,a.handle(b,c))}],link:function(c,d,e,f){return a.mapPromise(c,f).then(function(a){var d,e,f;return d=function(b){return a.enableKeyDragZoom(b),c.spec?c.spec.enableKeyDragZoom(b):void 0},e=new b(function(a,b){return b?d({key:b}):d()}),f=new b(function(a,b){return b?d(b):void 0}),c.$watch("keyboardkey",e.sic),e.sic(c.keyboardkey),c.$watch("options",f.sic),f.sic(c.options)})}}}])}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapDrawingManager",["uiGmapIDrawingManager","uiGmapDrawingManagerParentModel",function(a,b){return _.extend(a,{
link:function(a,c,d,e){return e.getScope().deferred.promise.then(function(e){return new b(a,c,d,e)})}})}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},c=function(a,b){function c(){this.constructor=a}for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},d={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapApiFreeDrawPolygons",["uiGmapLogger","uiGmapBaseObject","uiGmapCtrlHandle","uiGmapDrawFreeHandChildModel","uiGmapLodash",function(b,d,e,f,g){var h;return h=function(d){function h(){return this.link=a(this.link,this),h.__super__.constructor.apply(this,arguments)}return c(h,d),h.include(e),h.prototype.restrict="EMA",h.prototype.replace=!0,h.prototype.require="^uiGmapGoogleMap",h.prototype.scope={polygons:"=",draw:"=",revertmapoptions:"="},h.prototype.link=function(a,c,d,e){return this.mapPromise(a,e).then(function(){return function(c){var d,e;return a.polygons?_.isArray(a.polygons)?(d=new f(c,a.revertmapoptions),e=void 0,a.draw=function(){return"function"==typeof e&&e(),d.engage(a.polygons).then(function(){var b;return b=!0,e=a.$watchCollection("polygons",function(a,c){var d;return b||a===c?void(b=!1):(d=g.differenceObjects(c,a),d.forEach(function(a){return a.setMap(null)}))})})}):b.error("Free Draw Polygons must be of type Array!"):b.error("No polygons to bind to!")}}(this))},h}(d)}])}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api").service("uiGmapICircle",[function(){var a;return a={},{restrict:"EA",replace:!0,require:"^uiGmapGoogleMap",scope:{center:"=center",radius:"=radius",stroke:"=stroke",fill:"=fill",clickable:"=",draggable:"=",editable:"=",geodesic:"=",icons:"=icons",visible:"=",events:"=",zIndex:"=zindex"}}}])}.call(this),function(){var a=function(a,b){function d(){this.constructor=a}for(var e in b)c.call(b,e)&&(a[e]=b[e]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a},c={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapIControl",["uiGmapBaseObject","uiGmapLogger","uiGmapCtrlHandle",function(b,c,d){var e;return e=function(b){function e(){this.restrict="EA",this.replace=!0,this.require="^uiGmapGoogleMap",this.scope={template:"@template",position:"@position",controller:"@controller",index:"@index"},this.$log=c}return a(e,b),e.extend(d),e.prototype.link=function(){throw new Exception("Not implemented!!")},e}(b)}])}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api").service("uiGmapIDrawingManager",[function(){return{restrict:"EA",replace:!0,require:"^uiGmapGoogleMap",scope:{"static":"@",control:"=",options:"=",events:"="}}}])}.call(this),function(){var a=function(a,b){function d(){this.constructor=a}for(var e in b)c.call(b,e)&&(a[e]=b[e]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a},c={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapIMarker",["uiGmapBaseObject","uiGmapCtrlHandle",function(b,c){var d;return d=function(b){function d(){this.restrict="EMA",this.require="^uiGmapGoogleMap",this.priority=-1,this.transclude=!0,this.replace=!0,this.scope=_.extend(this.scope||{},d.scope)}return a(d,b),d.scope={coords:"=coords",icon:"=icon",click:"&click",options:"=options",events:"=events",fit:"=fit",idKey:"=idkey",control:"=control"},d.scopeKeys=_.keys(d.scope),d.keys=d.scopeKeys,d.extend(c),d}(b)}])}.call(this),function(){var a=function(a,b){function d(){this.constructor=a}for(var e in b)c.call(b,e)&&(a[e]=b[e]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a},c={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapIPolygon",["uiGmapGmapUtil","uiGmapBaseObject","uiGmapLogger","uiGmapCtrlHandle",function(b,c,d,e){var f;return f=function(c){function f(){}return a(f,c),f.scope={path:"=path",stroke:"=stroke",clickable:"=",draggable:"=",editable:"=",geodesic:"=",fill:"=",icons:"=icons",visible:"=","static":"=",events:"=",zIndex:"=zindex",fit:"=",control:"=control"},f.scopeKeys=_.keys(f.scope),f.include(b),f.extend(e),f.prototype.restrict="EMA",f.prototype.replace=!0,f.prototype.require="^uiGmapGoogleMap",f.prototype.scope=f.scope,f.prototype.DEFAULTS={},f.prototype.$log=d,f}(c)}])}.call(this),function(){var a=function(a,b){function d(){this.constructor=a}for(var e in b)c.call(b,e)&&(a[e]=b[e]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a},c={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapIPolyline",["uiGmapGmapUtil","uiGmapBaseObject","uiGmapLogger","uiGmapCtrlHandle",function(b,c,d,e){var f;return f=function(c){function f(){}return a(f,c),f.scope={path:"=",stroke:"=",clickable:"=",draggable:"=",editable:"=",geodesic:"=",icons:"=",visible:"=","static":"=",fit:"=",events:"=",zIndex:"=zindex"},f.scopeKeys=_.keys(f.scope),f.include(b),f.extend(e),f.prototype.restrict="EMA",f.prototype.replace=!0,f.prototype.require="^uiGmapGoogleMap",f.prototype.scope=f.scope,f.prototype.DEFAULTS={},f.prototype.$log=d,f}(c)}])}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api").service("uiGmapIRectangle",[function(){var a;return a={},{restrict:"EMA",require:"^uiGmapGoogleMap",replace:!0,scope:{bounds:"=",stroke:"=",clickable:"=",draggable:"=",editable:"=",fill:"=",visible:"=",events:"="}}}])}.call(this),function(){var a=function(a,b){function d(){this.constructor=a}for(var e in b)c.call(b,e)&&(a[e]=b[e]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a},c={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapIWindow",["uiGmapBaseObject","uiGmapChildEvents","uiGmapCtrlHandle",function(b,c,d){var e;return e=function(b){function e(){this.restrict="EMA",this.template=void 0,this.transclude=!0,this.priority=-100,this.require="^uiGmapGoogleMap",this.replace=!0,this.scope=_.extend(this.scope||{},e.scope)}return a(e,b),e.scope={coords:"=coords",template:"=template",templateUrl:"=templateurl",templateParameter:"=templateparameter",isIconVisibleOnClick:"=isiconvisibleonclick",closeClick:"&closeclick",options:"=options",control:"=control",show:"=show"},e.scopeKeys=_.keys(e.scope),e.include(c),e.extend(d),e}(b)}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},d=function(a,b){function c(){this.constructor=a}for(var d in b)e.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},e={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapMap",["$timeout","$q","uiGmapLogger","uiGmapGmapUtil","uiGmapBaseObject","uiGmapCtrlHandle","uiGmapIsReady","uiGmapuuid","uiGmapExtendGWin","uiGmapExtendMarkerClusterer","uiGmapGoogleMapsUtilV3","uiGmapGoogleMapApi","uiGmapEventsHelper",function(e,f,g,h,i,j,k,l,m,n,o,p,q){var r,s,t;return r=void 0,t=[o,m,n],s=function(f){function i(){this.link=a(this.link,this);var b,c;b=function(a){var b,c;return c=void 0,a.$on("$destroy",function(){return k.reset()}),b=j.handle(a),a.ctrlType="Map",a.deferred.promise.then(function(){return t.forEach(function(a){return a.init()})}),b.getMap=function(){return a.map},c=_.extend(this,b)},this.controller=["$scope",b],c=this}return d(i,f),i.include(h),i.prototype.restrict="EMA",i.prototype.transclude=!0,i.prototype.replace=!1,i.prototype.template='<div class="angular-google-map"><div class="angular-google-map-container"></div><div ng-transclude style="display: none"></div></div>',i.prototype.scope={center:"=",zoom:"=",dragging:"=",control:"=",options:"=",events:"=",eventOpts:"=",styles:"=",bounds:"=",update:"="},i.prototype.link=function(a,d,f){var h,i;return h=[],a.$on("$destroy",function(){return q.removeEvents(h)}),a.idleAndZoomChanged=!1,null==a.center?void(i=a.$watch("center",function(b){return function(){return a.center?(i(),b.link(a,d,f)):void 0}}(this))):p.then(function(i){return function(j){var m,n,o,p,s,t,u,v,w,x,y,z,A,B,C,D,E;if(r={mapTypeId:j.MapTypeId.ROADMAP},B=k.spawn(),z=function(){return B.deferred.resolve({instance:B.instance,map:m})},!i.validateCoords(a.center))return void g.error("angular-google-maps: could not find a valid center property");if(!b.isDefined(a.zoom))return void g.error("angular-google-maps: map zoom property not set");if(s=b.element(d),s.addClass("angular-google-map"),x={options:{}},f.options&&(x.options=a.options),f.styles&&(x.styles=a.styles),f.type&&(C=f.type.toUpperCase(),google.maps.MapTypeId.hasOwnProperty(C)?x.mapTypeId=google.maps.MapTypeId[f.type.toUpperCase()]:g.error("angular-google-maps: invalid map type '"+f.type+"'")),v=b.extend({},r,x,{center:i.getCoords(a.center),zoom:a.zoom,bounds:a.bounds}),m=new google.maps.Map(s.find("div")[1],v),m.uiGmap_id=l.generate(),p=!1,h.push(google.maps.event.addListenerOnce(m,"idle",function(){return a.deferred.resolve(m),z()})),o=f.events&&null!=(null!=(y=a.events)?y.blacklist:void 0)?a.events.blacklist:[],_.isString(o)&&(o=[o]),w=function(b,c,d){return _.contains(o,b)?void 0:(d&&d(),h.push(google.maps.event.addListener(m,b,function(){var b;return(null!=(b=a.update)?b.lazy:void 0)?void 0:c()})))},_.contains(o,"all")||(w("dragstart",function(){return p=!0,a.$evalAsync(function(a){return null!=a.dragging?a.dragging=p:void 0})}),w("dragend",function(){return p=!1,a.$evalAsync(function(a){return null!=a.dragging?a.dragging=p:void 0})}),D=function(c,d){if(null==c&&(c=m.center),null==d&&(d=a),!_.contains(o,"center"))if(b.isDefined(d.center.type)){if(d.center.coordinates[1]!==c.lat()&&(d.center.coordinates[1]=c.lat()),d.center.coordinates[0]!==c.lng())return d.center.coordinates[0]=c.lng()}else if(d.center.latitude!==c.lat()&&(d.center.latitude=c.lat()),d.center.longitude!==c.lng())return d.center.longitude=c.lng()},A=!1,w("idle",function(){var b,d,e;return b=m.getBounds(),d=b.getNorthEast(),e=b.getSouthWest(),A=!0,a.$evalAsync(function(b){return D(),null===b.bounds||b.bounds===c||void 0===b.bounds||_.contains(o,"bounds")||(b.bounds.northeast={latitude:d.lat(),longitude:d.lng()},b.bounds.southwest={latitude:e.lat(),longitude:e.lng()}),_.contains(o,"zoom")||(b.zoom=m.zoom,a.idleAndZoomChanged=!a.idleAndZoomChanged),A=!1})})),b.isDefined(a.events)&&null!==a.events&&b.isObject(a.events)){u=function(b){return function(){return a.events[b].apply(a,[m,b,arguments])}},n=[];for(t in a.events)a.events.hasOwnProperty(t)&&b.isFunction(a.events[t])&&n.push(google.maps.event.addListener(m,t,u(t)));h.concat(n)}return m.getOptions=function(){return v},a.map=m,null!=f.control&&null!=a.control&&(a.control.refresh=function(a){var b,c,d;if(null!=m)return null!=("undefined"!=typeof google&&null!==google&&null!=(c=google.maps)&&null!=(d=c.event)?d.trigger:void 0)&&null!=m&&google.maps.event.trigger(m,"resize"),null!=(null!=a?a.latitude:void 0)&&null!=(null!=a?a.longitude:void 0)?(b=i.getCoords(a),i.isTrue(f.pan)?m.panTo(b):m.setCenter(b)):void 0},a.control.getGMap=function(){return m},a.control.getMapOptions=function(){return v},a.control.getCustomEventListeners=function(){return n},a.control.removeEvents=function(a){return q.removeEvents(a)}),a.$watch("center",function(b,c){var d,e;if(b!==c&&!A&&(d=i.getCoords(a.center),d.lat()!==m.center.lat()||d.lng()!==m.center.lng()))return e=!0,p||(i.validateCoords(b)||g.error("Invalid center for newValue: "+JSON.stringify(b)),i.isTrue(f.pan)&&a.zoom===m.zoom?m.panTo(d):m.setCenter(d)),e=!1},!0),E=null,a.$watch("zoom",function(b,c){var d,f,g;if(null!=b&&!_.isEqual(b,c)&&(null!=m?m.getZoom():void 0)!==(null!=a?a.zoom:void 0)&&!A)return g=!0,null!=E&&e.cancel(E),E=e(function(){return m.setZoom(b),g=!1},(null!=(d=a.eventOpts)&&null!=(f=d.debounce)?f.zoomMs:void 0)+20,!1)}),a.$watch("bounds",function(a,b){var c,d,e,f,h,i,j;if(a!==b)return null==(null!=a&&null!=(e=a.northeast)?e.latitude:void 0)||null==(null!=a&&null!=(f=a.northeast)?f.longitude:void 0)||null==(null!=a&&null!=(h=a.southwest)?h.latitude:void 0)||null==(null!=a&&null!=(i=a.southwest)?i.longitude:void 0)?void g.error("Invalid map bounds for new value: "+JSON.stringify(a)):(d=new google.maps.LatLng(a.northeast.latitude,a.northeast.longitude),j=new google.maps.LatLng(a.southwest.latitude,a.southwest.longitude),c=new google.maps.LatLngBounds(j,d),m.fitBounds(c))}),["options","styles"].forEach(function(b){return a.$watch(b,function(a,b){var c;return c=this.exp,_.isEqual(a,b)?void 0:("options"===c?x.options=a:x.options[c]=a,null!=m?m.setOptions(x):void 0)},!0)})}}(this))},i}(i)}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},c=function(a,b){function c(){this.constructor=a}for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},d={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapMarker",["uiGmapIMarker","uiGmapMarkerChildModel","uiGmapMarkerManager","uiGmapLogger",function(b,d,e,f){var g;return g=function(g){function h(){this.link=a(this.link,this),h.__super__.constructor.call(this),this.template='<span class="angular-google-map-marker" ng-transclude></span>',f.info(this)}return c(h,g),h.prototype.controller=["$scope","$element",function(a,c){return a.ctrlType="Marker",_.extend(this,b.handle(a,c))}],h.prototype.link=function(a,c,f,g){var h;return h=b.mapPromise(a,g),h.then(function(){return function(c){var f,g,h,i,j,k;return h=new e(c),i=_.object(b.keys,b.keys),j=new d(a,a,i,c,{},f=!0,h,g=!1,k=!1),j.deferred.promise.then(function(b){return a.deferred.resolve(b)}),null!=a.control?a.control.getGMarkers=h.getGMarkers:void 0}}(this)),a.$on("$destroy",function(){return function(){var a;return"undefined"!=typeof a&&null!==a&&a.clear(),a=null}}(this))},h}(b)}])}.call(this),function(){var a=function(a,b){function d(){this.constructor=a}for(var e in b)c.call(b,e)&&(a[e]=b[e]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a},c={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapMarkers",["uiGmapIMarker","uiGmapPlural","uiGmapMarkersParentModel","uiGmap_sync","uiGmapLogger",function(b,c,d,e,f){var g;return g=function(e){function g(){g.__super__.constructor.call(this),this.template='<span class="angular-google-map-markers" ng-transclude></span>',c.extend(this,{doCluster:"=docluster",clusterOptions:"=clusteroptions",clusterEvents:"=clusterevents",modelsByRef:"=modelsbyref"}),f.info(this)}return a(g,e),g.prototype.controller=["$scope","$element",function(a,c){return a.ctrlType="Markers",_.extend(this,b.handle(a,c))}],g.prototype.link=function(a,e,f,g){var h,i;return h=void 0,i=function(){return a.deferred.resolve()},b.mapPromise(a,g).then(function(b){var j;return j=g.getScope(),j.$watch("idleAndZoomChanged",function(){return _.defer(h.gManager.draw)}),h=new d(a,e,f,b),c.link(a,h),null!=a.control&&(a.control.getGMarkers=function(){var a;return null!=(a=h.gManager)?a.getGMarkers():void 0},a.control.getChildMarkers=function(){return h.plurals}),_.last(h.existingPieces._content).then(function(){return i()})})},g}(b)}])}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api").service("uiGmapPlural",[function(){var a;return a=function(a,b){return null!=a.control?(a.control.updateModels=function(c){return a.models=c,b.createChildScopes(!1)},a.control.newModels=function(c){return a.models=c,b.rebuildAll(a,!0,!0)},a.control.clean=function(){return b.rebuildAll(a,!1,!0)},a.control.getPlurals=function(){return b.plurals},a.control.getManager=function(){return b.gManager},a.control.hasManager=function(){return null!=b.gManager==!0},a.control.managerDraw=function(){var b;return a.control.hasManager()&&null!=(b=a.control.getManager())?b.draw():void 0}):void 0},{extend:function(a,b){return _.extend(a.scope||{},b||{},{idKey:"=idkey",doRebuildAll:"=dorebuildall",models:"=models",chunk:"=chunk",cleanchunk:"=cleanchunk",control:"=control"})},link:function(b,c){return a(b,c)}}}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},c=function(a,b){function c(){this.constructor=a}for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},d={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapPolygon",["uiGmapIPolygon","$timeout","uiGmaparray-sync","uiGmapPolygonChildModel",function(b,d,e,f){var g;return g=function(d){function e(){return this.link=a(this.link,this),e.__super__.constructor.apply(this,arguments)}return c(e,d),e.prototype.link=function(a,c,d,e){var g,h;return g=[],h=b.mapPromise(a,e),null!=a.control&&(a.control.getInstance=this,a.control.polygons=g,a.control.promise=h),h.then(function(b){return function(c){return g.push(new f(a,d,c,b.DEFAULTS))}}(this))},e}(b)}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},c=function(a,b){function c(){this.constructor=a}for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},d={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapPolygons",["uiGmapIPolygon","$timeout","uiGmaparray-sync","uiGmapPolygonsParentModel","uiGmapPlural",function(d,e,f,g,h){var i;return i=function(d){function e(){this.link=a(this.link,this),e.__super__.constructor.call(this),h.extend(this),this.$log.info(this)}return c(e,d),e.prototype.link=function(a,c,d,e){return e.getScope().deferred.promise.then(function(e){return function(f){return(b.isUndefined(a.path)||null===a.path)&&e.$log.warn("polygons: no valid path attribute found"),a.models||e.$log.warn("polygons: no models found to create from"),h.link(a,new g(a,c,d,f,e.DEFAULTS))}}(this))},e}(d)}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},c=function(a,b){function c(){this.constructor=a}for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},d={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapPolyline",["uiGmapIPolyline","$timeout","uiGmaparray-sync","uiGmapPolylineChildModel",function(d,e,f,g){var h;return h=function(e){function f(){return this.link=a(this.link,this),f.__super__.constructor.apply(this,arguments)}return c(f,e),f.prototype.link=function(a,c,e,f){return d.mapPromise(a,f).then(function(c){return function(d){return(b.isUndefined(a.path)||null===a.path||!c.validatePath(a.path))&&c.$log.warn("polyline: no valid path attribute found"),new g(a,e,d,c.DEFAULTS)}}(this))},f}(d)}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},c=function(a,b){function c(){this.constructor=a}for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},d={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapPolylines",["uiGmapIPolyline","$timeout","uiGmaparray-sync","uiGmapPolylinesParentModel","uiGmapPlural",function(d,e,f,g,h){var i;return i=function(d){function e(){this.link=a(this.link,this),e.__super__.constructor.call(this),h.extend(this),this.$log.info(this)}return c(e,d),e.prototype.link=function(a,c,d,e){return e.getScope().deferred.promise.then(function(e){return function(f){return(b.isUndefined(a.path)||null===a.path)&&e.$log.warn("polylines: no valid path attribute found"),a.models||e.$log.warn("polylines: no models found to create from"),h.link(a,new g(a,c,d,f,e.DEFAULTS))}}(this))},e}(d)}])}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapRectangle",["uiGmapLogger","uiGmapGmapUtil","uiGmapIRectangle","uiGmapRectangleParentModel",function(a,b,c,d){return _.extend(c,{link:function(a,b,c,e){return e.getScope().deferred.promise.then(function(){return function(e){return new d(a,b,c,e)}}(this))}})}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},c=function(a,b){function c(){this.constructor=a}for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},d={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapWindow",["uiGmapIWindow","uiGmapGmapUtil","uiGmapWindowChildModel","uiGmapLodash","uiGmapLogger",function(d,e,f,g,h){var i;return i=function(i){function j(){this.link=a(this.link,this),j.__super__.constructor.call(this),this.require=["^uiGmapGoogleMap","^?uiGmapMarker"],this.template='<span class="angular-google-maps-window" ng-transclude></span>',h.debug(this),this.childWindows=[]}return c(j,i),j.include(e),j.prototype.link=function(a,c,e,f){var g,h;return g=f.length>1&&null!=f[1]?f[1]:void 0,h=null!=g?g.getScope():void 0,this.mapPromise=d.mapPromise(a,f[0]),this.mapPromise.then(function(d){return function(f){var i;return i=!0,b.isDefined(e.isiconvisibleonclick)&&(i=a.isIconVisibleOnClick),g?h.deferred.promise.then(function(){return d.init(a,c,i,f,h)}):void d.init(a,c,i,f)}}(this))},j.prototype.init=function(a,b,c,d,e){var h,i,j,k,l;return i=null!=a.options?a.options:{},k=null!=a&&this.validateCoords(a.coords),null!=(null!=e?e.getGMarker:void 0)&&(j=e.getGMarker()),l=k?this.createWindowOptions(j,a,b.html(),i):i,null!=d&&(h=new f({},a,l,c,d,e,b),this.childWindows.push(h),a.$on("$destroy",function(a){return function(){return a.childWindows=g.withoutObjects(a.childWindows,[h],function(a,b){return a.scope.$id===b.scope.$id}),a.childWindows.length=0}}(this))),null!=a.control&&(a.control.getGWindows=function(a){return function(){return a.childWindows.map(function(a){return a.gObject})}}(this),a.control.getChildWindows=function(a){return function(){return a.childWindows}}(this),a.control.getPlurals=a.control.getChildWindows,a.control.showWindow=function(a){return function(){return a.childWindows.map(function(a){return a.showWindow()})}}(this),a.control.hideWindow=function(a){return function(){return a.childWindows.map(function(a){return a.hideWindow()})}}(this)),null!=this.onChildCreation&&null!=h?this.onChildCreation(h):void 0},j}(d)}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},c=function(a,b){function c(){this.constructor=a}for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},d={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapWindows",["uiGmapIWindow","uiGmapPlural","uiGmapWindowsParentModel","uiGmapPromise","uiGmapLogger",function(b,d,e,f,g){var h;return h=function(b){function h(){this.init=a(this.init,this),this.link=a(this.link,this),h.__super__.constructor.call(this),this.require=["^uiGmapGoogleMap","^?uiGmapMarkers"],this.template='<span class="angular-google-maps-windows" ng-transclude></span>',d.extend(this),g.debug(this)}return c(h,b),h.prototype.link=function(a,b,c,d){var e,g,h;return e=d[0].getScope(),g=d.length>1&&null!=d[1]?d[1]:void 0,h=null!=g?g.getScope():void 0,e.deferred.promise.then(function(e){return function(g){var i,j;return i=(null!=h&&null!=(j=h.deferred)?j.promise:void 0)||f.resolve(),i.then(function(){var f,i;return f=null!=(i=e.parentModel)?i.existingPieces:void 0,f?f.then(function(){return e.init(a,b,c,d,g,h)}):e.init(a,b,c,d,g,h)})}}(this))},h.prototype.init=function(a,b,c,f,g,h){var i;return i=new e(a,b,c,f,g,h),d.link(a,i),null!=a.control?(a.control.getGWindows=function(){return function(){return i.plurals.map(function(a){return a.gObject})}}(this),a.control.getChildWindows=function(){return function(){return i.plurals}}(this)):void 0},h}(b)}])}.call(this),function(){b.module("uiGmapgoogle-maps").directive("uiGmapGoogleMap",["uiGmapMap",function(a){return new a}])}.call(this),function(){b.module("uiGmapgoogle-maps").directive("uiGmapMarker",["$timeout","uiGmapMarker",function(a,b){return new b(a)}])}.call(this),function(){b.module("uiGmapgoogle-maps").directive("uiGmapMarkers",["$timeout","uiGmapMarkers",function(a,b){return new b(a)}])}.call(this),function(){b.module("uiGmapgoogle-maps").directive("uiGmapPolygon",["uiGmapPolygon",function(a){return new a}])}.call(this),function(){b.module("uiGmapgoogle-maps").directive("uiGmapCircle",["uiGmapCircle",function(a){return a}])}.call(this),function(){b.module("uiGmapgoogle-maps").directive("uiGmapPolyline",["uiGmapPolyline",function(a){return new a}])}.call(this),function(){b.module("uiGmapgoogle-maps").directive("uiGmapPolylines",["uiGmapPolylines",function(a){return new a}])}.call(this),function(){b.module("uiGmapgoogle-maps").directive("uiGmapRectangle",["uiGmapLogger","uiGmapRectangle",function(a,b){return b}])}.call(this),function(){b.module("uiGmapgoogle-maps").directive("uiGmapWindow",["$timeout","$compile","$http","$templateCache","uiGmapWindow",function(a,b,c,d,e){return new e(a,b,c,d)}])}.call(this),function(){b.module("uiGmapgoogle-maps").directive("uiGmapWindows",["$timeout","$compile","$http","$templateCache","$interpolate","uiGmapWindows",function(a,b,c,d,e,f){return new f(a,b,c,d,e)}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}};b.module("uiGmapgoogle-maps").directive("uiGmapLayer",["$timeout","uiGmapLogger","uiGmapLayerParentModel",function(b,c,d){var e;return new(e=function(){function b(){this.link=a(this.link,this),this.$log=c,this.restrict="EMA",this.require="^uiGmapGoogleMap",this.priority=-1,this.transclude=!0,this.template="<span class='angular-google-map-layer' ng-transclude></span>",this.replace=!0,this.scope={show:"=show",type:"=type",namespace:"=namespace",options:"=options",onCreated:"&oncreated"}}return b.prototype.link=function(a,b,c,e){return e.getScope().deferred.promise.then(function(){return function(e){return null!=a.onCreated?new d(a,b,c,e,a.onCreated):new d(a,b,c,e)}}(this))},b}())}])}.call(this),function(){b.module("uiGmapgoogle-maps").directive("uiGmapMapControl",["uiGmapControl",function(a){return new a}])}.call(this),function(){b.module("uiGmapgoogle-maps").directive("uiGmapDragZoom",["uiGmapDragZoom",function(a){return a}])}.call(this),function(){b.module("uiGmapgoogle-maps").directive("uiGmapDrawingManager",["uiGmapDrawingManager",function(a){return a}])}.call(this),function(){b.module("uiGmapgoogle-maps").directive("uiGmapFreeDrawPolygons",["uiGmapApiFreeDrawPolygons",function(a){return new a}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}};b.module("uiGmapgoogle-maps").directive("uiGmapMapType",["$timeout","uiGmapLogger","uiGmapMapTypeParentModel",function(b,c,d){var e;return new(e=function(){function b(){this.link=a(this.link,this),this.$log=c,this.restrict="EMA",this.require="^uiGmapGoogleMap",this.priority=-1,this.transclude=!0,this.template='<span class="angular-google-map-layer" ng-transclude></span>',this.replace=!0,this.scope={show:"=show",options:"=options",refresh:"=refresh",id:"@"}}return b.prototype.link=function(a,b,c,e){return e.getScope().deferred.promise.then(function(){return function(e){return new d(a,b,c,e)}}(this))},b}())}])}.call(this),function(){b.module("uiGmapgoogle-maps").directive("uiGmapPolygons",["uiGmapPolygons",function(a){return new a}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}};b.module("uiGmapgoogle-maps").directive("uiGmapSearchBox",["uiGmapGoogleMapApi","uiGmapLogger","uiGmapSearchBoxParentModel","$http","$templateCache","$compile",function(c,d,e,f,g,h){var i;return new(i=function(){function i(){this.link=a(this.link,this),this.$log=d,this.restrict="EMA",this.require="^uiGmapGoogleMap",this.priority=-1,this.transclude=!0,this.template="<span class='angular-google-map-search' ng-transclude></span>",this.replace=!0,this.scope={template:"=template",events:"=events",position:"=?position",options:"=?options",parentdiv:"=?parentdiv",ngModel:"=?"}}return i.prototype.require="ngModel",i.prototype.link=function(a,d,i,j){return c.then(function(c){return function(k){return f.get(a.template,{cache:g}).success(function(f){return b.isUndefined(a.events)?void c.$log.error("searchBox: the events property is required"):j.getScope().deferred.promise.then(function(g){var j;return j=b.isDefined(a.position)?a.position.toUpperCase().replace(/-/g,"_"):"TOP_LEFT",k.ControlPosition[j]?new e(a,d,i,g,j,h(f)(a)):void c.$log.error("searchBox: invalid position property")})})}}(this))},i}())}])}.call(this),function(){b.module("uiGmapgoogle-maps").directive("uiGmapShow",["$animate","uiGmapLogger",function(a,c){return{scope:{uiGmapShow:"=",uiGmapAfterShow:"&",uiGmapAfterHide:"&"},link:function(d,e){var f,g,h;return f=function(b,c){return a[b](e,"ng-hide").then(function(){return c()})},g=function(b,c){return a[b](e,"ng-hide",c)},h=function(a,d){return b.version.major>1?c.error("uiGmapShow is not supported for Angular Major greater than 1.\nYour Major is "+b.version.major+'"'):1===b.version.major&&b.version.minor<3?g(a,d):f(a,d)},d.$watch("uiGmapShow",function(a){return a&&h("removeClass",d.uiGmapAfterShow),a?void 0:h("addClass",d.uiGmapAfterHide)})}}}])}.call(this),b.module("uiGmapgoogle-maps.wrapped").service("uiGmapuuid",function(){function a(){}return a.generate=function(){var b=a._gri,c=a._ha;return c(b(32),8)+"-"+c(b(16),4)+"-"+c(16384|b(12),4)+"-"+c(32768|b(14),4)+"-"+c(b(48),12)},a._gri=function(a){return 0>a?0/0:30>=a?0|Math.random()*(1<<a):53>=a?(0|1073741824*Math.random())+1073741824*(0|Math.random()*(1<<a-30)):0/0},a._ha=function(a,b){for(var c=a.toString(16),d=b-c.length,e="0";d>0;d>>>=1,e+=e)1&d&&(c=e+c);return c},a}),b.module("uiGmapgoogle-maps.wrapped").service("uiGmapGoogleMapsUtilV3",function(){return{init:_.once(function(){function b(a){a=a||{},google.maps.OverlayView.apply(this,arguments),this.content_=a.content||"",this.disableAutoPan_=a.disableAutoPan||!1,this.maxWidth_=a.maxWidth||0,this.pixelOffset_=a.pixelOffset||new google.maps.Size(0,0),this.position_=a.position||new google.maps.LatLng(0,0),this.zIndex_=a.zIndex||null,this.boxClass_=a.boxClass||"infoBox",this.boxStyle_=a.boxStyle||{},this.closeBoxMargin_=a.closeBoxMargin||"2px",this.closeBoxURL_=a.closeBoxURL||"http://www.google.com/intl/en_us/mapfiles/close.gif",""===a.closeBoxURL&&(this.closeBoxURL_=""),this.infoBoxClearance_=a.infoBoxClearance||new google.maps.Size(1,1),"undefined"==typeof a.visible&&(a.visible="undefined"==typeof a.isHidden?!0:!a.isHidden),this.isHidden_=!a.visible,this.alignBottom_=a.alignBottom||!1,this.pane_=a.pane||"floatPane",this.enableEventPropagation_=a.enableEventPropagation||!1,this.div_=null,this.closeListener_=null,this.moveListener_=null,this.contextListener_=null,this.eventListeners_=null,this.fixedWidthSet_=null}function d(a,b){a.getMarkerClusterer().extend(d,google.maps.OverlayView),this.cluster_=a,this.className_=a.getMarkerClusterer().getClusterClass(),this.styles_=b,this.center_=null,this.div_=null,this.sums_=null,this.visible_=!1,this.setMap(a.getMap())}function e(a){this.markerClusterer_=a,this.map_=a.getMap(),this.gridSize_=a.getGridSize(),this.minClusterSize_=a.getMinimumClusterSize(),this.averageCenter_=a.getAverageCenter(),this.markers_=[],this.center_=null,this.bounds_=null,this.clusterIcon_=new d(this,a.getStyles())}function f(a,b,d){this.extend(f,google.maps.OverlayView),b=b||[],d=d||{},this.markers_=[],this.clusters_=[],this.listeners_=[],this.activeMap_=null,this.ready_=!1,this.gridSize_=d.gridSize||60,this.minClusterSize_=d.minimumClusterSize||2,this.maxZoom_=d.maxZoom||null,this.styles_=d.styles||[],this.title_=d.title||"",this.zoomOnClick_=!0,d.zoomOnClick!==c&&(this.zoomOnClick_=d.zoomOnClick),this.averageCenter_=!1,d.averageCenter!==c&&(this.averageCenter_=d.averageCenter),this.ignoreHidden_=!1,d.ignoreHidden!==c&&(this.ignoreHidden_=d.ignoreHidden),this.enableRetinaIcons_=!1,d.enableRetinaIcons!==c&&(this.enableRetinaIcons_=d.enableRetinaIcons),this.imagePath_=d.imagePath||f.IMAGE_PATH,this.imageExtension_=d.imageExtension||f.IMAGE_EXTENSION,this.imageSizes_=d.imageSizes||f.IMAGE_SIZES,this.calculator_=d.calculator||f.CALCULATOR,this.batchSize_=d.batchSize||f.BATCH_SIZE,this.batchSizeIE_=d.batchSizeIE||f.BATCH_SIZE_IE,this.clusterClass_=d.clusterClass||"cluster",
-1!==navigator.userAgent.toLowerCase().indexOf("msie")&&(this.batchSize_=this.batchSizeIE_),this.setupStyles_(),this.addMarkers(b,!0),this.setMap(a)}function g(a,b){function c(){}c.prototype=b.prototype,a.superClass_=b.prototype,a.prototype=new c,a.prototype.constructor=a}function h(a,b){this.marker_=a,this.handCursorURL_=a.handCursorURL,this.labelDiv_=document.createElement("div"),this.labelDiv_.style.cssText="position: absolute; overflow: hidden;",this.eventDiv_=document.createElement("div"),this.eventDiv_.style.cssText=this.labelDiv_.style.cssText,this.eventDiv_.setAttribute("onselectstart","return false;"),this.eventDiv_.setAttribute("ondragstart","return false;"),this.crossDiv_=h.getSharedCross(b)}function i(a){a=a||{},a.labelContent=a.labelContent||"",a.labelAnchor=a.labelAnchor||new google.maps.Point(0,0),a.labelClass=a.labelClass||"markerLabels",a.labelStyle=a.labelStyle||{},a.labelInBackground=a.labelInBackground||!1,"undefined"==typeof a.labelVisible&&(a.labelVisible=!0),"undefined"==typeof a.raiseOnDrag&&(a.raiseOnDrag=!0),"undefined"==typeof a.clickable&&(a.clickable=!0),"undefined"==typeof a.draggable&&(a.draggable=!1),"undefined"==typeof a.optimized&&(a.optimized=!1),a.crossImage=a.crossImage||"http"+("https:"===document.location.protocol?"s":"")+"://maps.gstatic.com/intl/en_us/mapfiles/drag_cross_67_16.png",a.handCursor=a.handCursor||"http"+("https:"===document.location.protocol?"s":"")+"://maps.gstatic.com/intl/en_us/mapfiles/closedhand_8_8.cur",a.optimized=!1,this.label=new h(this,a.crossImage,a.handCursor),google.maps.Marker.apply(this,arguments)}b.prototype=new google.maps.OverlayView,b.prototype.createInfoBoxDiv_=function(){var a,b,c,d=this,e=function(a){a.cancelBubble=!0,a.stopPropagation&&a.stopPropagation()},f=function(a){a.returnValue=!1,a.preventDefault&&a.preventDefault(),d.enableEventPropagation_||e(a)};if(!this.div_){if(this.div_=document.createElement("div"),this.setBoxStyle_(),"undefined"==typeof this.content_.nodeType?this.div_.innerHTML=this.getCloseBoxImg_()+this.content_:(this.div_.innerHTML=this.getCloseBoxImg_(),this.div_.appendChild(this.content_)),this.getPanes()[this.pane_].appendChild(this.div_),this.addClickHandler_(),this.div_.style.width?this.fixedWidthSet_=!0:0!==this.maxWidth_&&this.div_.offsetWidth>this.maxWidth_?(this.div_.style.width=this.maxWidth_,this.div_.style.overflow="auto",this.fixedWidthSet_=!0):(c=this.getBoxWidths_(),this.div_.style.width=this.div_.offsetWidth-c.left-c.right+"px",this.fixedWidthSet_=!1),this.panBox_(this.disableAutoPan_),!this.enableEventPropagation_){for(this.eventListeners_=[],b=["mousedown","mouseover","mouseout","mouseup","click","dblclick","touchstart","touchend","touchmove"],a=0;a<b.length;a++)this.eventListeners_.push(google.maps.event.addDomListener(this.div_,b[a],e));this.eventListeners_.push(google.maps.event.addDomListener(this.div_,"mouseover",function(){this.style.cursor="default"}))}this.contextListener_=google.maps.event.addDomListener(this.div_,"contextmenu",f),google.maps.event.trigger(this,"domready")}},b.prototype.getCloseBoxImg_=function(){var a="";return""!==this.closeBoxURL_&&(a="<img",a+=" src='"+this.closeBoxURL_+"'",a+=" align=right",a+=" style='",a+=" position: relative;",a+=" cursor: pointer;",a+=" margin: "+this.closeBoxMargin_+";",a+="'>"),a},b.prototype.addClickHandler_=function(){var a;""!==this.closeBoxURL_?(a=this.div_.firstChild,this.closeListener_=google.maps.event.addDomListener(a,"click",this.getCloseClickHandler_())):this.closeListener_=null},b.prototype.getCloseClickHandler_=function(){var a=this;return function(b){b.cancelBubble=!0,b.stopPropagation&&b.stopPropagation(),google.maps.event.trigger(a,"closeclick"),a.close()}},b.prototype.panBox_=function(a){var b,c,d=0,e=0;if(!a&&(b=this.getMap(),b instanceof google.maps.Map)){b.getBounds().contains(this.position_)||b.setCenter(this.position_),c=b.getBounds();var f=b.getDiv(),g=f.offsetWidth,h=f.offsetHeight,i=this.pixelOffset_.width,j=this.pixelOffset_.height,k=this.div_.offsetWidth,l=this.div_.offsetHeight,m=this.infoBoxClearance_.width,n=this.infoBoxClearance_.height,o=this.getProjection().fromLatLngToContainerPixel(this.position_);if(o.x<-i+m?d=o.x+i-m:o.x+k+i+m>g&&(d=o.x+k+i+m-g),this.alignBottom_?o.y<-j+n+l?e=o.y+j-n-l:o.y+j+n>h&&(e=o.y+j+n-h):o.y<-j+n?e=o.y+j-n:o.y+l+j+n>h&&(e=o.y+l+j+n-h),0!==d||0!==e){{b.getCenter()}b.panBy(d,e)}}},b.prototype.setBoxStyle_=function(){var a,b;if(this.div_){this.div_.className=this.boxClass_,this.div_.style.cssText="",b=this.boxStyle_;for(a in b)b.hasOwnProperty(a)&&(this.div_.style[a]=b[a]);this.div_.style.WebkitTransform="translateZ(0)","undefined"!=typeof this.div_.style.opacity&&""!==this.div_.style.opacity&&(this.div_.style.MsFilter='"progid:DXImageTransform.Microsoft.Alpha(Opacity='+100*this.div_.style.opacity+')"',this.div_.style.filter="alpha(opacity="+100*this.div_.style.opacity+")"),this.div_.style.position="absolute",this.div_.style.visibility="hidden",null!==this.zIndex_&&(this.div_.style.zIndex=this.zIndex_)}},b.prototype.getBoxWidths_=function(){var a,b={top:0,bottom:0,left:0,right:0},c=this.div_;return document.defaultView&&document.defaultView.getComputedStyle?(a=c.ownerDocument.defaultView.getComputedStyle(c,""),a&&(b.top=parseInt(a.borderTopWidth,10)||0,b.bottom=parseInt(a.borderBottomWidth,10)||0,b.left=parseInt(a.borderLeftWidth,10)||0,b.right=parseInt(a.borderRightWidth,10)||0)):document.documentElement.currentStyle&&c.currentStyle&&(b.top=parseInt(c.currentStyle.borderTopWidth,10)||0,b.bottom=parseInt(c.currentStyle.borderBottomWidth,10)||0,b.left=parseInt(c.currentStyle.borderLeftWidth,10)||0,b.right=parseInt(c.currentStyle.borderRightWidth,10)||0),b},b.prototype.onRemove=function(){this.div_&&(this.div_.parentNode.removeChild(this.div_),this.div_=null)},b.prototype.draw=function(){this.createInfoBoxDiv_();var a=this.getProjection().fromLatLngToDivPixel(this.position_);this.div_.style.left=a.x+this.pixelOffset_.width+"px",this.alignBottom_?this.div_.style.bottom=-(a.y+this.pixelOffset_.height)+"px":this.div_.style.top=a.y+this.pixelOffset_.height+"px",this.div_.style.visibility=this.isHidden_?"hidden":"visible"},b.prototype.setOptions=function(a){"undefined"!=typeof a.boxClass&&(this.boxClass_=a.boxClass,this.setBoxStyle_()),"undefined"!=typeof a.boxStyle&&(this.boxStyle_=a.boxStyle,this.setBoxStyle_()),"undefined"!=typeof a.content&&this.setContent(a.content),"undefined"!=typeof a.disableAutoPan&&(this.disableAutoPan_=a.disableAutoPan),"undefined"!=typeof a.maxWidth&&(this.maxWidth_=a.maxWidth),"undefined"!=typeof a.pixelOffset&&(this.pixelOffset_=a.pixelOffset),"undefined"!=typeof a.alignBottom&&(this.alignBottom_=a.alignBottom),"undefined"!=typeof a.position&&this.setPosition(a.position),"undefined"!=typeof a.zIndex&&this.setZIndex(a.zIndex),"undefined"!=typeof a.closeBoxMargin&&(this.closeBoxMargin_=a.closeBoxMargin),"undefined"!=typeof a.closeBoxURL&&(this.closeBoxURL_=a.closeBoxURL),"undefined"!=typeof a.infoBoxClearance&&(this.infoBoxClearance_=a.infoBoxClearance),"undefined"!=typeof a.isHidden&&(this.isHidden_=a.isHidden),"undefined"!=typeof a.visible&&(this.isHidden_=!a.visible),"undefined"!=typeof a.enableEventPropagation&&(this.enableEventPropagation_=a.enableEventPropagation),this.div_&&this.draw()},b.prototype.setContent=function(a){this.content_=a,this.div_&&(this.closeListener_&&(google.maps.event.removeListener(this.closeListener_),this.closeListener_=null),this.fixedWidthSet_||(this.div_.style.width=""),"undefined"==typeof a.nodeType?this.div_.innerHTML=this.getCloseBoxImg_()+a:(this.div_.innerHTML=this.getCloseBoxImg_(),this.div_.appendChild(a)),this.fixedWidthSet_||(this.div_.style.width=this.div_.offsetWidth+"px","undefined"==typeof a.nodeType?this.div_.innerHTML=this.getCloseBoxImg_()+a:(this.div_.innerHTML=this.getCloseBoxImg_(),this.div_.appendChild(a))),this.addClickHandler_()),google.maps.event.trigger(this,"content_changed")},b.prototype.setPosition=function(a){this.position_=a,this.div_&&this.draw(),google.maps.event.trigger(this,"position_changed")},b.prototype.setZIndex=function(a){this.zIndex_=a,this.div_&&(this.div_.style.zIndex=a),google.maps.event.trigger(this,"zindex_changed")},b.prototype.setVisible=function(a){this.isHidden_=!a,this.div_&&(this.div_.style.visibility=this.isHidden_?"hidden":"visible")},b.prototype.getContent=function(){return this.content_},b.prototype.getPosition=function(){return this.position_},b.prototype.getZIndex=function(){return this.zIndex_},b.prototype.getVisible=function(){var a;return a="undefined"==typeof this.getMap()||null===this.getMap()?!1:!this.isHidden_},b.prototype.show=function(){this.isHidden_=!1,this.div_&&(this.div_.style.visibility="visible")},b.prototype.hide=function(){this.isHidden_=!0,this.div_&&(this.div_.style.visibility="hidden")},b.prototype.open=function(a,b){var c=this;b&&(this.position_=b.getPosition(),this.moveListener_=google.maps.event.addListener(b,"position_changed",function(){c.setPosition(this.getPosition())})),this.setMap(a),this.div_&&this.panBox_()},b.prototype.close=function(){var a;if(this.closeListener_&&(google.maps.event.removeListener(this.closeListener_),this.closeListener_=null),this.eventListeners_){for(a=0;a<this.eventListeners_.length;a++)google.maps.event.removeListener(this.eventListeners_[a]);this.eventListeners_=null}this.moveListener_&&(google.maps.event.removeListener(this.moveListener_),this.moveListener_=null),this.contextListener_&&(google.maps.event.removeListener(this.contextListener_),this.contextListener_=null),this.setMap(null)},function(){function b(a,b){var c=this,d=new google.maps.OverlayView;d.onAdd=function(){c.init_(a,b)},d.draw=function(){},d.onRemove=function(){},d.setMap(a),this.prjov_=d}var c=function(a){var b;switch(a){case"thin":b="2px";break;case"medium":b="4px";break;case"thick":b="6px";break;default:b=a}return b},d=function(a){var b,d={};if(document.defaultView&&document.defaultView.getComputedStyle){if(b=a.ownerDocument.defaultView.getComputedStyle(a,""))return d.top=parseInt(b.borderTopWidth,10)||0,d.bottom=parseInt(b.borderBottomWidth,10)||0,d.left=parseInt(b.borderLeftWidth,10)||0,d.right=parseInt(b.borderRightWidth,10)||0,d}else if(document.documentElement.currentStyle&&a.currentStyle)return d.top=parseInt(c(a.currentStyle.borderTopWidth),10)||0,d.bottom=parseInt(c(a.currentStyle.borderBottomWidth),10)||0,d.left=parseInt(c(a.currentStyle.borderLeftWidth),10)||0,d.right=parseInt(c(a.currentStyle.borderRightWidth),10)||0,d;return d.top=parseInt(a.style["border-top-width"],10)||0,d.bottom=parseInt(a.style["border-bottom-width"],10)||0,d.left=parseInt(a.style["border-left-width"],10)||0,d.right=parseInt(a.style["border-right-width"],10)||0,d},e={x:0,y:0},f=function(){e.x="undefined"!=typeof document.documentElement.scrollLeft?document.documentElement.scrollLeft:document.body.scrollLeft,e.y="undefined"!=typeof document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop};f();var g=function(b){var c=0,d=0;return b=b||a.event,"undefined"!=typeof b.pageX?(c=b.pageX,d=b.pageY):"undefined"!=typeof b.clientX&&(c=b.clientX+e.x,d=b.clientY+e.y),{left:c,top:d}},h=function(b){for(var c=b.offsetLeft,d=b.offsetTop,e=b.offsetParent;null!==e;){e!==document.body&&e!==document.documentElement&&(c-=e.scrollLeft,d-=e.scrollTop);var f=e,g=f.offsetLeft,h=f.offsetTop;if(!g&&!h&&a.getComputedStyle){var i=document.defaultView.getComputedStyle(f,null).MozTransform||document.defaultView.getComputedStyle(f,null).WebkitTransform;if(i&&"string"==typeof i){var j=i.split(",");g+=parseInt(j[4],10)||0,h+=parseInt(j[5],10)||0}}c+=g,d+=h,e=e.offsetParent}return{left:c,top:d}},i=function(a,b){if(a&&b)for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);return a},j=function(a,b){"undefined"!=typeof b&&(a.style.opacity=b),"undefined"!=typeof a.style.opacity&&""!==a.style.opacity&&(a.style.filter="alpha(opacity="+100*a.style.opacity+")")};b.prototype.init_=function(b,c){var e,g=this;for(this.map_=b,c=c||{},this.key_=c.key||"shift",this.key_=this.key_.toLowerCase(),this.borderWidths_=d(this.map_.getDiv()),this.veilDiv_=[],e=0;4>e;e++)this.veilDiv_[e]=document.createElement("div"),this.veilDiv_[e].onselectstart=function(){return!1},i(this.veilDiv_[e].style,{backgroundColor:"gray",opacity:.25,cursor:"crosshair"}),i(this.veilDiv_[e].style,c.paneStyle),i(this.veilDiv_[e].style,c.veilStyle),i(this.veilDiv_[e].style,{position:"absolute",overflow:"hidden",display:"none"}),"shift"===this.key_&&(this.veilDiv_[e].style.MozUserSelect="none"),j(this.veilDiv_[e]),"transparent"===this.veilDiv_[e].style.backgroundColor&&(this.veilDiv_[e].style.backgroundColor="white",j(this.veilDiv_[e],0)),this.map_.getDiv().appendChild(this.veilDiv_[e]);this.noZoom_=c.noZoom||!1,this.visualEnabled_=c.visualEnabled||!1,this.visualClass_=c.visualClass||"",this.visualPosition_=c.visualPosition||google.maps.ControlPosition.LEFT_TOP,this.visualPositionOffset_=c.visualPositionOffset||new google.maps.Size(35,0),this.visualPositionIndex_=c.visualPositionIndex||null,this.visualSprite_=c.visualSprite||"http"+("https:"===document.location.protocol?"s":"")+"://maps.gstatic.com/mapfiles/ftr/controls/dragzoom_btn.png",this.visualSize_=c.visualSize||new google.maps.Size(20,20),this.visualTips_=c.visualTips||{},this.visualTips_.off=this.visualTips_.off||"Turn on drag zoom mode",this.visualTips_.on=this.visualTips_.on||"Turn off drag zoom mode",this.boxDiv_=document.createElement("div"),i(this.boxDiv_.style,{border:"4px solid #736AFF"}),i(this.boxDiv_.style,c.boxStyle),i(this.boxDiv_.style,{position:"absolute",display:"none"}),j(this.boxDiv_),this.map_.getDiv().appendChild(this.boxDiv_),this.boxBorderWidths_=d(this.boxDiv_),this.listeners_=[google.maps.event.addDomListener(document,"keydown",function(a){g.onKeyDown_(a)}),google.maps.event.addDomListener(document,"keyup",function(a){g.onKeyUp_(a)}),google.maps.event.addDomListener(this.veilDiv_[0],"mousedown",function(a){g.onMouseDown_(a)}),google.maps.event.addDomListener(this.veilDiv_[1],"mousedown",function(a){g.onMouseDown_(a)}),google.maps.event.addDomListener(this.veilDiv_[2],"mousedown",function(a){g.onMouseDown_(a)}),google.maps.event.addDomListener(this.veilDiv_[3],"mousedown",function(a){g.onMouseDown_(a)}),google.maps.event.addDomListener(document,"mousedown",function(a){g.onMouseDownDocument_(a)}),google.maps.event.addDomListener(document,"mousemove",function(a){g.onMouseMove_(a)}),google.maps.event.addDomListener(document,"mouseup",function(a){g.onMouseUp_(a)}),google.maps.event.addDomListener(a,"scroll",f)],this.hotKeyDown_=!1,this.mouseDown_=!1,this.dragging_=!1,this.startPt_=null,this.endPt_=null,this.mapWidth_=null,this.mapHeight_=null,this.mousePosn_=null,this.mapPosn_=null,this.visualEnabled_&&(this.buttonDiv_=this.initControl_(this.visualPositionOffset_),null!==this.visualPositionIndex_&&(this.buttonDiv_.index=this.visualPositionIndex_),this.map_.controls[this.visualPosition_].push(this.buttonDiv_),this.controlIndex_=this.map_.controls[this.visualPosition_].length-1)},b.prototype.initControl_=function(a){var b,c,d=this;return b=document.createElement("div"),b.className=this.visualClass_,b.style.position="relative",b.style.overflow="hidden",b.style.height=this.visualSize_.height+"px",b.style.width=this.visualSize_.width+"px",b.title=this.visualTips_.off,c=document.createElement("img"),c.src=this.visualSprite_,c.style.position="absolute",c.style.left=-(2*this.visualSize_.width)+"px",c.style.top="0px",b.appendChild(c),b.onclick=function(a){d.hotKeyDown_=!d.hotKeyDown_,d.hotKeyDown_?(d.buttonDiv_.firstChild.style.left=-(0*d.visualSize_.width)+"px",d.buttonDiv_.title=d.visualTips_.on,d.activatedByControl_=!0,google.maps.event.trigger(d,"activate")):(d.buttonDiv_.firstChild.style.left=-(2*d.visualSize_.width)+"px",d.buttonDiv_.title=d.visualTips_.off,google.maps.event.trigger(d,"deactivate")),d.onMouseMove_(a)},b.onmouseover=function(){d.buttonDiv_.firstChild.style.left=-(1*d.visualSize_.width)+"px"},b.onmouseout=function(){d.hotKeyDown_?(d.buttonDiv_.firstChild.style.left=-(0*d.visualSize_.width)+"px",d.buttonDiv_.title=d.visualTips_.on):(d.buttonDiv_.firstChild.style.left=-(2*d.visualSize_.width)+"px",d.buttonDiv_.title=d.visualTips_.off)},b.ondragstart=function(){return!1},i(b.style,{cursor:"pointer",marginTop:a.height+"px",marginLeft:a.width+"px"}),b},b.prototype.isHotKeyDown_=function(b){var c;if(b=b||a.event,c=b.shiftKey&&"shift"===this.key_||b.altKey&&"alt"===this.key_||b.ctrlKey&&"ctrl"===this.key_,!c)switch(b.keyCode){case 16:"shift"===this.key_&&(c=!0);break;case 17:"ctrl"===this.key_&&(c=!0);break;case 18:"alt"===this.key_&&(c=!0)}return c},b.prototype.isMouseOnMap_=function(){var a=this.mousePosn_;if(a){var b=this.mapPosn_,c=this.map_.getDiv();return a.left>b.left&&a.left<b.left+c.offsetWidth&&a.top>b.top&&a.top<b.top+c.offsetHeight}return!1},b.prototype.setVeilVisibility_=function(){var a;if(this.map_&&this.hotKeyDown_&&this.isMouseOnMap_()){var b=this.map_.getDiv();if(this.mapWidth_=b.offsetWidth-(this.borderWidths_.left+this.borderWidths_.right),this.mapHeight_=b.offsetHeight-(this.borderWidths_.top+this.borderWidths_.bottom),this.activatedByControl_){var c=parseInt(this.buttonDiv_.style.left,10)+this.visualPositionOffset_.width,d=parseInt(this.buttonDiv_.style.top,10)+this.visualPositionOffset_.height,e=this.visualSize_.width,f=this.visualSize_.height;for(this.veilDiv_[0].style.top="0px",this.veilDiv_[0].style.left="0px",this.veilDiv_[0].style.width=c+"px",this.veilDiv_[0].style.height=this.mapHeight_+"px",this.veilDiv_[1].style.top="0px",this.veilDiv_[1].style.left=c+e+"px",this.veilDiv_[1].style.width=this.mapWidth_-(c+e)+"px",this.veilDiv_[1].style.height=this.mapHeight_+"px",this.veilDiv_[2].style.top="0px",this.veilDiv_[2].style.left=c+"px",this.veilDiv_[2].style.width=e+"px",this.veilDiv_[2].style.height=d+"px",this.veilDiv_[3].style.top=d+f+"px",this.veilDiv_[3].style.left=c+"px",this.veilDiv_[3].style.width=e+"px",this.veilDiv_[3].style.height=this.mapHeight_-(d+f)+"px",a=0;a<this.veilDiv_.length;a++)this.veilDiv_[a].style.display="block"}else{for(this.veilDiv_[0].style.left="0px",this.veilDiv_[0].style.top="0px",this.veilDiv_[0].style.width=this.mapWidth_+"px",this.veilDiv_[0].style.height=this.mapHeight_+"px",a=1;a<this.veilDiv_.length;a++)this.veilDiv_[a].style.width="0px",this.veilDiv_[a].style.height="0px";for(a=0;a<this.veilDiv_.length;a++)this.veilDiv_[a].style.display="block"}}else for(a=0;a<this.veilDiv_.length;a++)this.veilDiv_[a].style.display="none"},b.prototype.onKeyDown_=function(a){this.map_&&!this.hotKeyDown_&&this.isHotKeyDown_(a)&&(this.mapPosn_=h(this.map_.getDiv()),this.hotKeyDown_=!0,this.activatedByControl_=!1,this.setVeilVisibility_(),google.maps.event.trigger(this,"activate"))},b.prototype.getMousePoint_=function(a){var b=g(a),c=new google.maps.Point;return c.x=b.left-this.mapPosn_.left-this.borderWidths_.left,c.y=b.top-this.mapPosn_.top-this.borderWidths_.top,c.x=Math.min(c.x,this.mapWidth_),c.y=Math.min(c.y,this.mapHeight_),c.x=Math.max(c.x,0),c.y=Math.max(c.y,0),c},b.prototype.onMouseDown_=function(a){if(this.map_&&this.hotKeyDown_){this.mapPosn_=h(this.map_.getDiv()),this.dragging_=!0,this.startPt_=this.endPt_=this.getMousePoint_(a),this.boxDiv_.style.width=this.boxDiv_.style.height="0px";var b=this.prjov_.getProjection(),c=b.fromContainerPixelToLatLng(this.startPt_);google.maps.event.trigger(this,"dragstart",c)}},b.prototype.onMouseDownDocument_=function(){this.mouseDown_=!0},b.prototype.onMouseMove_=function(a){if(this.mousePosn_=g(a),this.dragging_){this.endPt_=this.getMousePoint_(a);var b=Math.min(this.startPt_.x,this.endPt_.x),c=Math.min(this.startPt_.y,this.endPt_.y),d=Math.abs(this.startPt_.x-this.endPt_.x),e=Math.abs(this.startPt_.y-this.endPt_.y),f=Math.max(0,d-(this.boxBorderWidths_.left+this.boxBorderWidths_.right)),i=Math.max(0,e-(this.boxBorderWidths_.top+this.boxBorderWidths_.bottom));this.veilDiv_[0].style.top="0px",this.veilDiv_[0].style.left="0px",this.veilDiv_[0].style.width=b+"px",this.veilDiv_[0].style.height=this.mapHeight_+"px",this.veilDiv_[1].style.top="0px",this.veilDiv_[1].style.left=b+d+"px",this.veilDiv_[1].style.width=this.mapWidth_-(b+d)+"px",this.veilDiv_[1].style.height=this.mapHeight_+"px",this.veilDiv_[2].style.top="0px",this.veilDiv_[2].style.left=b+"px",this.veilDiv_[2].style.width=d+"px",this.veilDiv_[2].style.height=c+"px",this.veilDiv_[3].style.top=c+e+"px",this.veilDiv_[3].style.left=b+"px",this.veilDiv_[3].style.width=d+"px",this.veilDiv_[3].style.height=this.mapHeight_-(c+e)+"px",this.boxDiv_.style.top=c+"px",this.boxDiv_.style.left=b+"px",this.boxDiv_.style.width=f+"px",this.boxDiv_.style.height=i+"px",this.boxDiv_.style.display="block",google.maps.event.trigger(this,"drag",new google.maps.Point(b,c+e),new google.maps.Point(b+d,c),this.prjov_.getProjection())}else this.mouseDown_||(this.mapPosn_=h(this.map_.getDiv()),this.setVeilVisibility_())},b.prototype.onMouseUp_=function(a){var b,c=this;if(this.mouseDown_=!1,this.dragging_){if(this.getMousePoint_(a).x===this.startPt_.x&&this.getMousePoint_(a).y===this.startPt_.y)return void this.onKeyUp_(a);var d=Math.min(this.startPt_.x,this.endPt_.x),e=Math.min(this.startPt_.y,this.endPt_.y),f=Math.abs(this.startPt_.x-this.endPt_.x),g=Math.abs(this.startPt_.y-this.endPt_.y),h=!0;h&&(d+=this.borderWidths_.left,e+=this.borderWidths_.top);var i=this.prjov_.getProjection(),j=i.fromContainerPixelToLatLng(new google.maps.Point(d,e+g)),k=i.fromContainerPixelToLatLng(new google.maps.Point(d+f,e)),l=new google.maps.LatLngBounds(j,k);if(this.noZoom_)this.boxDiv_.style.display="none";else{b=this.map_.getZoom(),this.map_.fitBounds(l),this.map_.getZoom()<b&&this.map_.setZoom(b);var m=i.fromLatLngToContainerPixel(j),n=i.fromLatLngToContainerPixel(k);h&&(m.x-=this.borderWidths_.left,m.y-=this.borderWidths_.top,n.x-=this.borderWidths_.left,n.y-=this.borderWidths_.top),this.boxDiv_.style.left=m.x+"px",this.boxDiv_.style.top=n.y+"px",this.boxDiv_.style.width=Math.abs(n.x-m.x)-(this.boxBorderWidths_.left+this.boxBorderWidths_.right)+"px",this.boxDiv_.style.height=Math.abs(n.y-m.y)-(this.boxBorderWidths_.top+this.boxBorderWidths_.bottom)+"px",setTimeout(function(){c.boxDiv_.style.display="none"},1e3)}this.dragging_=!1,this.onMouseMove_(a),google.maps.event.trigger(this,"dragend",l),this.isHotKeyDown_(a)||this.onKeyUp_(a)}},b.prototype.onKeyUp_=function(){var a,b,c,d,e,f,g,h,i=null;if(this.map_&&this.hotKeyDown_){for(this.hotKeyDown_=!1,this.dragging_&&(this.boxDiv_.style.display="none",this.dragging_=!1,b=Math.min(this.startPt_.x,this.endPt_.x),c=Math.min(this.startPt_.y,this.endPt_.y),d=Math.abs(this.startPt_.x-this.endPt_.x),e=Math.abs(this.startPt_.y-this.endPt_.y),f=this.prjov_.getProjection(),g=f.fromContainerPixelToLatLng(new google.maps.Point(b,c+e)),h=f.fromContainerPixelToLatLng(new google.maps.Point(b+d,c)),i=new google.maps.LatLngBounds(g,h)),a=0;a<this.veilDiv_.length;a++)this.veilDiv_[a].style.display="none";this.visualEnabled_&&(this.buttonDiv_.firstChild.style.left=-(2*this.visualSize_.width)+"px",this.buttonDiv_.title=this.visualTips_.off,this.buttonDiv_.style.display=""),google.maps.event.trigger(this,"deactivate",i)}},google.maps.Map.prototype.enableKeyDragZoom=function(a){this.dragZoom_=new b(this,a)},google.maps.Map.prototype.disableKeyDragZoom=function(){var a,b=this.dragZoom_;if(b){for(a=0;a<b.listeners_.length;++a)google.maps.event.removeListener(b.listeners_[a]);for(this.getDiv().removeChild(b.boxDiv_),a=0;a<b.veilDiv_.length;a++)this.getDiv().removeChild(b.veilDiv_[a]);b.visualEnabled_&&this.controls[b.visualPosition_].removeAt(b.controlIndex_),b.prjov_.setMap(null),this.dragZoom_=null}},google.maps.Map.prototype.keyDragZoomEnabled=function(){return null!==this.dragZoom_},google.maps.Map.prototype.getDragZoomObject=function(){return this.dragZoom_}}(),d.prototype.onAdd=function(){var a,b,c=this;this.div_=document.createElement("div"),this.div_.className=this.className_,this.visible_&&this.show(),this.getPanes().overlayMouseTarget.appendChild(this.div_),this.boundsChangedListener_=google.maps.event.addListener(this.getMap(),"bounds_changed",function(){b=a}),google.maps.event.addDomListener(this.div_,"mousedown",function(){a=!0,b=!1}),google.maps.event.addDomListener(this.div_,"click",function(d){if(a=!1,!b){var e,f,g=c.cluster_.getMarkerClusterer();google.maps.event.trigger(g,"click",c.cluster_),google.maps.event.trigger(g,"clusterclick",c.cluster_),g.getZoomOnClick()&&(f=g.getMaxZoom(),e=c.cluster_.getBounds(),g.getMap().fitBounds(e),setTimeout(function(){g.getMap().fitBounds(e),null!==f&&g.getMap().getZoom()>f&&g.getMap().setZoom(f+1)},100)),d.cancelBubble=!0,d.stopPropagation&&d.stopPropagation()}}),google.maps.event.addDomListener(this.div_,"mouseover",function(){var a=c.cluster_.getMarkerClusterer();google.maps.event.trigger(a,"mouseover",c.cluster_)}),google.maps.event.addDomListener(this.div_,"mouseout",function(){var a=c.cluster_.getMarkerClusterer();google.maps.event.trigger(a,"mouseout",c.cluster_)})},d.prototype.onRemove=function(){this.div_&&this.div_.parentNode&&(this.hide(),google.maps.event.removeListener(this.boundsChangedListener_),google.maps.event.clearInstanceListeners(this.div_),this.div_.parentNode.removeChild(this.div_),this.div_=null)},d.prototype.draw=function(){if(this.visible_){var a=this.getPosFromLatLng_(this.center_);this.div_.style.top=a.y+"px",this.div_.style.left=a.x+"px"}},d.prototype.hide=function(){this.div_&&(this.div_.style.display="none"),this.visible_=!1},d.prototype.show=function(){if(this.div_){var a="",b=this.backgroundPosition_.split(" "),c=parseInt(b[0].trim(),10),d=parseInt(b[1].trim(),10),e=this.getPosFromLatLng_(this.center_);this.div_.style.cssText=this.createCss(e),a="<img src='"+this.url_+"' style='position: absolute; top: "+d+"px; left: "+c+"px; ",this.cluster_.getMarkerClusterer().enableRetinaIcons_||(a+="clip: rect("+-1*d+"px, "+(-1*c+this.width_)+"px, "+(-1*d+this.height_)+"px, "+-1*c+"px);"),a+="'>",this.div_.innerHTML=a+"<div style='position: absolute;top: "+this.anchorText_[0]+"px;left: "+this.anchorText_[1]+"px;color: "+this.textColor_+";font-size: "+this.textSize_+"px;font-family: "+this.fontFamily_+";font-weight: "+this.fontWeight_+";font-style: "+this.fontStyle_+";text-decoration: "+this.textDecoration_+";text-align: center;width: "+this.width_+"px;line-height:"+this.height_+"px;'>"+this.sums_.text+"</div>",this.div_.title="undefined"==typeof this.sums_.title||""===this.sums_.title?this.cluster_.getMarkerClusterer().getTitle():this.sums_.title,this.div_.style.display=""}this.visible_=!0},d.prototype.useStyle=function(a){this.sums_=a;var b=Math.max(0,a.index-1);b=Math.min(this.styles_.length-1,b);var c=this.styles_[b];this.url_=c.url,this.height_=c.height,this.width_=c.width,this.anchorText_=c.anchorText||[0,0],this.anchorIcon_=c.anchorIcon||[parseInt(this.height_/2,10),parseInt(this.width_/2,10)],this.textColor_=c.textColor||"black",this.textSize_=c.textSize||11,this.textDecoration_=c.textDecoration||"none",this.fontWeight_=c.fontWeight||"bold",this.fontStyle_=c.fontStyle||"normal",this.fontFamily_=c.fontFamily||"Arial,sans-serif",this.backgroundPosition_=c.backgroundPosition||"0 0"},d.prototype.setCenter=function(a){this.center_=a},d.prototype.createCss=function(a){var b=[];return b.push("cursor: pointer;"),b.push("position: absolute; top: "+a.y+"px; left: "+a.x+"px;"),b.push("width: "+this.width_+"px; height: "+this.height_+"px;"),b.join("")},d.prototype.getPosFromLatLng_=function(a){var b=this.getProjection().fromLatLngToDivPixel(a);return b.x-=this.anchorIcon_[1],b.y-=this.anchorIcon_[0],b.x=parseInt(b.x,10),b.y=parseInt(b.y,10),b},e.prototype.getSize=function(){return this.markers_.length},e.prototype.getMarkers=function(){return this.markers_},e.prototype.getCenter=function(){return this.center_},e.prototype.getMap=function(){return this.map_},e.prototype.getMarkerClusterer=function(){return this.markerClusterer_},e.prototype.getBounds=function(){var a,b=new google.maps.LatLngBounds(this.center_,this.center_),c=this.getMarkers();for(a=0;a<c.length;a++)b.extend(c[a].getPosition());return b},e.prototype.remove=function(){this.clusterIcon_.setMap(null),this.markers_=[],delete this.markers_},e.prototype.addMarker=function(a){var b,c,d;if(this.isMarkerAlreadyAdded_(a))return!1;if(this.center_){if(this.averageCenter_){var e=this.markers_.length+1,f=(this.center_.lat()*(e-1)+a.getPosition().lat())/e,g=(this.center_.lng()*(e-1)+a.getPosition().lng())/e;this.center_=new google.maps.LatLng(f,g),this.calculateBounds_()}}else this.center_=a.getPosition(),this.calculateBounds_();if(a.isAdded=!0,this.markers_.push(a),c=this.markers_.length,d=this.markerClusterer_.getMaxZoom(),null!==d&&this.map_.getZoom()>d)a.getMap()!==this.map_&&a.setMap(this.map_);else if(c<this.minClusterSize_)a.getMap()!==this.map_&&a.setMap(this.map_);else if(c===this.minClusterSize_)for(b=0;c>b;b++)this.markers_[b].setMap(null);else a.setMap(null);return this.updateIcon_(),!0},e.prototype.isMarkerInClusterBounds=function(a){return this.bounds_.contains(a.getPosition())},e.prototype.calculateBounds_=function(){var a=new google.maps.LatLngBounds(this.center_,this.center_);this.bounds_=this.markerClusterer_.getExtendedBounds(a)},e.prototype.updateIcon_=function(){var a=this.markers_.length,b=this.markerClusterer_.getMaxZoom();if(null!==b&&this.map_.getZoom()>b)return void this.clusterIcon_.hide();if(a<this.minClusterSize_)return void this.clusterIcon_.hide();var c=this.markerClusterer_.getStyles().length,d=this.markerClusterer_.getCalculator()(this.markers_,c);this.clusterIcon_.setCenter(this.center_),this.clusterIcon_.useStyle(d),this.clusterIcon_.show()},e.prototype.isMarkerAlreadyAdded_=function(a){var b;if(this.markers_.indexOf)return-1!==this.markers_.indexOf(a);for(b=0;b<this.markers_.length;b++)if(a===this.markers_[b])return!0;return!1},f.prototype.onAdd=function(){var a=this;this.activeMap_=this.getMap(),this.ready_=!0,this.repaint(),this.listeners_=[google.maps.event.addListener(this.getMap(),"zoom_changed",function(){a.resetViewport_(!1),(this.getZoom()===(this.get("minZoom")||0)||this.getZoom()===this.get("maxZoom"))&&google.maps.event.trigger(this,"idle")}),google.maps.event.addListener(this.getMap(),"idle",function(){a.redraw_()})]},f.prototype.onRemove=function(){var a;for(a=0;a<this.markers_.length;a++)this.markers_[a].getMap()!==this.activeMap_&&this.markers_[a].setMap(this.activeMap_);for(a=0;a<this.clusters_.length;a++)this.clusters_[a].remove();for(this.clusters_=[],a=0;a<this.listeners_.length;a++)google.maps.event.removeListener(this.listeners_[a]);this.listeners_=[],this.activeMap_=null,this.ready_=!1},f.prototype.draw=function(){},f.prototype.setupStyles_=function(){var a,b;if(!(this.styles_.length>0))for(a=0;a<this.imageSizes_.length;a++)b=this.imageSizes_[a],this.styles_.push({url:this.imagePath_+(a+1)+"."+this.imageExtension_,height:b,width:b})},f.prototype.fitMapToMarkers=function(){var a,b=this.getMarkers(),c=new google.maps.LatLngBounds;for(a=0;a<b.length;a++)c.extend(b[a].getPosition());this.getMap().fitBounds(c)},f.prototype.getGridSize=function(){return this.gridSize_},f.prototype.setGridSize=function(a){this.gridSize_=a},f.prototype.getMinimumClusterSize=function(){return this.minClusterSize_},f.prototype.setMinimumClusterSize=function(a){this.minClusterSize_=a},f.prototype.getMaxZoom=function(){return this.maxZoom_},f.prototype.setMaxZoom=function(a){this.maxZoom_=a},f.prototype.getStyles=function(){return this.styles_},f.prototype.setStyles=function(a){this.styles_=a},f.prototype.getTitle=function(){return this.title_},f.prototype.setTitle=function(a){this.title_=a},f.prototype.getZoomOnClick=function(){return this.zoomOnClick_},f.prototype.setZoomOnClick=function(a){this.zoomOnClick_=a},f.prototype.getAverageCenter=function(){return this.averageCenter_},f.prototype.setAverageCenter=function(a){this.averageCenter_=a},f.prototype.getIgnoreHidden=function(){return this.ignoreHidden_},f.prototype.setIgnoreHidden=function(a){
this.ignoreHidden_=a},f.prototype.getEnableRetinaIcons=function(){return this.enableRetinaIcons_},f.prototype.setEnableRetinaIcons=function(a){this.enableRetinaIcons_=a},f.prototype.getImageExtension=function(){return this.imageExtension_},f.prototype.setImageExtension=function(a){this.imageExtension_=a},f.prototype.getImagePath=function(){return this.imagePath_},f.prototype.setImagePath=function(a){this.imagePath_=a},f.prototype.getImageSizes=function(){return this.imageSizes_},f.prototype.setImageSizes=function(a){this.imageSizes_=a},f.prototype.getCalculator=function(){return this.calculator_},f.prototype.setCalculator=function(a){this.calculator_=a},f.prototype.getBatchSizeIE=function(){return this.batchSizeIE_},f.prototype.setBatchSizeIE=function(a){this.batchSizeIE_=a},f.prototype.getClusterClass=function(){return this.clusterClass_},f.prototype.setClusterClass=function(a){this.clusterClass_=a},f.prototype.getMarkers=function(){return this.markers_},f.prototype.getTotalMarkers=function(){return this.markers_.length},f.prototype.getClusters=function(){return this.clusters_},f.prototype.getTotalClusters=function(){return this.clusters_.length},f.prototype.addMarker=function(a,b){this.pushMarkerTo_(a),b||this.redraw_()},f.prototype.addMarkers=function(a,b){var c;for(c in a)a.hasOwnProperty(c)&&this.pushMarkerTo_(a[c]);b||this.redraw_()},f.prototype.pushMarkerTo_=function(a){if(a.getDraggable()){var b=this;google.maps.event.addListener(a,"dragend",function(){b.ready_&&(this.isAdded=!1,b.repaint())})}a.isAdded=!1,this.markers_.push(a)},f.prototype.removeMarker=function(a,b){var c=this.removeMarker_(a);return!b&&c&&this.repaint(),c},f.prototype.removeMarkers=function(a,b){var c,d,e=!1;for(c=0;c<a.length;c++)d=this.removeMarker_(a[c]),e=e||d;return!b&&e&&this.repaint(),e},f.prototype.removeMarker_=function(a){var b,c=-1;if(this.markers_.indexOf)c=this.markers_.indexOf(a);else for(b=0;b<this.markers_.length;b++)if(a===this.markers_[b]){c=b;break}return-1===c?!1:(a.setMap(null),this.markers_.splice(c,1),!0)},f.prototype.clearMarkers=function(){this.resetViewport_(!0),this.markers_=[]},f.prototype.repaint=function(){var a=this.clusters_.slice();this.clusters_=[],this.resetViewport_(!1),this.redraw_(),setTimeout(function(){var b;for(b=0;b<a.length;b++)a[b].remove()},0)},f.prototype.getExtendedBounds=function(a){var b=this.getProjection(),c=new google.maps.LatLng(a.getNorthEast().lat(),a.getNorthEast().lng()),d=new google.maps.LatLng(a.getSouthWest().lat(),a.getSouthWest().lng()),e=b.fromLatLngToDivPixel(c);e.x+=this.gridSize_,e.y-=this.gridSize_;var f=b.fromLatLngToDivPixel(d);f.x-=this.gridSize_,f.y+=this.gridSize_;var g=b.fromDivPixelToLatLng(e),h=b.fromDivPixelToLatLng(f);return a.extend(g),a.extend(h),a},f.prototype.redraw_=function(){this.createClusters_(0)},f.prototype.resetViewport_=function(a){var b,c;for(b=0;b<this.clusters_.length;b++)this.clusters_[b].remove();for(this.clusters_=[],b=0;b<this.markers_.length;b++)c=this.markers_[b],c.isAdded=!1,a&&c.setMap(null)},f.prototype.distanceBetweenPoints_=function(a,b){var c=6371,d=(b.lat()-a.lat())*Math.PI/180,e=(b.lng()-a.lng())*Math.PI/180,f=Math.sin(d/2)*Math.sin(d/2)+Math.cos(a.lat()*Math.PI/180)*Math.cos(b.lat()*Math.PI/180)*Math.sin(e/2)*Math.sin(e/2),g=2*Math.atan2(Math.sqrt(f),Math.sqrt(1-f)),h=c*g;return h},f.prototype.isMarkerInBounds_=function(a,b){return b.contains(a.getPosition())},f.prototype.addToClosestCluster_=function(a){var b,c,d,f,g=4e4,h=null;for(b=0;b<this.clusters_.length;b++)d=this.clusters_[b],f=d.getCenter(),f&&(c=this.distanceBetweenPoints_(f,a.getPosition()),g>c&&(g=c,h=d));h&&h.isMarkerInClusterBounds(a)?h.addMarker(a):(d=new e(this),d.addMarker(a),this.clusters_.push(d))},f.prototype.createClusters_=function(a){var b,c,d,e=this;if(this.ready_){0===a&&(google.maps.event.trigger(this,"clusteringbegin",this),"undefined"!=typeof this.timerRefStatic&&(clearTimeout(this.timerRefStatic),delete this.timerRefStatic)),d=this.getMap().getZoom()>3?new google.maps.LatLngBounds(this.getMap().getBounds().getSouthWest(),this.getMap().getBounds().getNorthEast()):new google.maps.LatLngBounds(new google.maps.LatLng(85.02070771743472,-178.48388434375),new google.maps.LatLng(-85.08136444384544,178.00048865625));var f=this.getExtendedBounds(d),g=Math.min(a+this.batchSize_,this.markers_.length);for(b=a;g>b;b++)c=this.markers_[b],!c.isAdded&&this.isMarkerInBounds_(c,f)&&(!this.ignoreHidden_||this.ignoreHidden_&&c.getVisible())&&this.addToClosestCluster_(c);g<this.markers_.length?this.timerRefStatic=setTimeout(function(){e.createClusters_(g)},0):(delete this.timerRefStatic,google.maps.event.trigger(this,"clusteringend",this))}},f.prototype.extend=function(a,b){return function(a){var b;for(b in a.prototype)this.prototype[b]=a.prototype[b];return this}.apply(a,[b])},f.CALCULATOR=function(a,b){for(var c=0,d="",e=a.length.toString(),f=e;0!==f;)f=parseInt(f/10,10),c++;return c=Math.min(c,b),{text:e,index:c,title:d}},f.BATCH_SIZE=2e3,f.BATCH_SIZE_IE=500,f.IMAGE_PATH="http://google-maps-utility-library-v3.googlecode.com/svn/trunk/markerclustererplus/images/m",f.IMAGE_EXTENSION="png",f.IMAGE_SIZES=[53,56,66,78,90],g(h,google.maps.OverlayView),h.getSharedCross=function(a){var b;return"undefined"==typeof h.getSharedCross.crossDiv&&(b=document.createElement("img"),b.style.cssText="position: absolute; z-index: 1000002; display: none;",b.style.marginLeft="-8px",b.style.marginTop="-9px",b.src=a,h.getSharedCross.crossDiv=b),h.getSharedCross.crossDiv},h.prototype.onAdd=function(){var a,b,c,d,e,f,g,i=this,j=!1,k=!1,l=20,m="url("+this.handCursorURL_+")",n=function(a){a.preventDefault&&a.preventDefault(),a.cancelBubble=!0,a.stopPropagation&&a.stopPropagation()},o=function(){i.marker_.setAnimation(null)};this.getPanes().overlayImage.appendChild(this.labelDiv_),this.getPanes().overlayMouseTarget.appendChild(this.eventDiv_),"undefined"==typeof h.getSharedCross.processed&&(this.getPanes().overlayImage.appendChild(this.crossDiv_),h.getSharedCross.processed=!0),this.listeners_=[google.maps.event.addDomListener(this.eventDiv_,"mouseover",function(a){(i.marker_.getDraggable()||i.marker_.getClickable())&&(this.style.cursor="pointer",google.maps.event.trigger(i.marker_,"mouseover",a))}),google.maps.event.addDomListener(this.eventDiv_,"mouseout",function(a){!i.marker_.getDraggable()&&!i.marker_.getClickable()||k||(this.style.cursor=i.marker_.getCursor(),google.maps.event.trigger(i.marker_,"mouseout",a))}),google.maps.event.addDomListener(this.eventDiv_,"mousedown",function(a){k=!1,i.marker_.getDraggable()&&(j=!0,this.style.cursor=m),(i.marker_.getDraggable()||i.marker_.getClickable())&&(google.maps.event.trigger(i.marker_,"mousedown",a),n(a))}),google.maps.event.addDomListener(document,"mouseup",function(b){var c;if(j&&(j=!1,i.eventDiv_.style.cursor="pointer",google.maps.event.trigger(i.marker_,"mouseup",b)),k){if(e){c=i.getProjection().fromLatLngToDivPixel(i.marker_.getPosition()),c.y+=l,i.marker_.setPosition(i.getProjection().fromDivPixelToLatLng(c));try{i.marker_.setAnimation(google.maps.Animation.BOUNCE),setTimeout(o,1406)}catch(f){}}i.crossDiv_.style.display="none",i.marker_.setZIndex(a),d=!0,k=!1,b.latLng=i.marker_.getPosition(),google.maps.event.trigger(i.marker_,"dragend",b)}}),google.maps.event.addListener(i.marker_.getMap(),"mousemove",function(d){var h;j&&(k?(d.latLng=new google.maps.LatLng(d.latLng.lat()-b,d.latLng.lng()-c),h=i.getProjection().fromLatLngToDivPixel(d.latLng),e&&(i.crossDiv_.style.left=h.x+"px",i.crossDiv_.style.top=h.y+"px",i.crossDiv_.style.display="",h.y-=l),i.marker_.setPosition(i.getProjection().fromDivPixelToLatLng(h)),e&&(i.eventDiv_.style.top=h.y+l+"px"),google.maps.event.trigger(i.marker_,"drag",d)):(b=d.latLng.lat()-i.marker_.getPosition().lat(),c=d.latLng.lng()-i.marker_.getPosition().lng(),a=i.marker_.getZIndex(),f=i.marker_.getPosition(),g=i.marker_.getMap().getCenter(),e=i.marker_.get("raiseOnDrag"),k=!0,i.marker_.setZIndex(1e6),d.latLng=i.marker_.getPosition(),google.maps.event.trigger(i.marker_,"dragstart",d)))}),google.maps.event.addDomListener(document,"keydown",function(a){k&&27===a.keyCode&&(e=!1,i.marker_.setPosition(f),i.marker_.getMap().setCenter(g),google.maps.event.trigger(document,"mouseup",a))}),google.maps.event.addDomListener(this.eventDiv_,"click",function(a){(i.marker_.getDraggable()||i.marker_.getClickable())&&(d?d=!1:(google.maps.event.trigger(i.marker_,"click",a),n(a)))}),google.maps.event.addDomListener(this.eventDiv_,"dblclick",function(a){(i.marker_.getDraggable()||i.marker_.getClickable())&&(google.maps.event.trigger(i.marker_,"dblclick",a),n(a))}),google.maps.event.addListener(this.marker_,"dragstart",function(){k||(e=this.get("raiseOnDrag"))}),google.maps.event.addListener(this.marker_,"drag",function(){k||e&&(i.setPosition(l),i.labelDiv_.style.zIndex=1e6+(this.get("labelInBackground")?-1:1))}),google.maps.event.addListener(this.marker_,"dragend",function(){k||e&&i.setPosition(0)}),google.maps.event.addListener(this.marker_,"position_changed",function(){i.setPosition()}),google.maps.event.addListener(this.marker_,"zindex_changed",function(){i.setZIndex()}),google.maps.event.addListener(this.marker_,"visible_changed",function(){i.setVisible()}),google.maps.event.addListener(this.marker_,"labelvisible_changed",function(){i.setVisible()}),google.maps.event.addListener(this.marker_,"title_changed",function(){i.setTitle()}),google.maps.event.addListener(this.marker_,"labelcontent_changed",function(){i.setContent()}),google.maps.event.addListener(this.marker_,"labelanchor_changed",function(){i.setAnchor()}),google.maps.event.addListener(this.marker_,"labelclass_changed",function(){i.setStyles()}),google.maps.event.addListener(this.marker_,"labelstyle_changed",function(){i.setStyles()})]},h.prototype.onRemove=function(){var a;for(this.labelDiv_.parentNode.removeChild(this.labelDiv_),this.eventDiv_.parentNode.removeChild(this.eventDiv_),a=0;a<this.listeners_.length;a++)google.maps.event.removeListener(this.listeners_[a])},h.prototype.draw=function(){this.setContent(),this.setTitle(),this.setStyles()},h.prototype.setContent=function(){var a=this.marker_.get("labelContent");"undefined"==typeof a.nodeType?(this.labelDiv_.innerHTML=a,this.eventDiv_.innerHTML=this.labelDiv_.innerHTML):(this.labelDiv_.innerHTML="",this.labelDiv_.appendChild(a),a=a.cloneNode(!0),this.eventDiv_.innerHTML="",this.eventDiv_.appendChild(a))},h.prototype.setTitle=function(){this.eventDiv_.title=this.marker_.getTitle()||""},h.prototype.setStyles=function(){var a,b;this.labelDiv_.className=this.marker_.get("labelClass"),this.eventDiv_.className=this.labelDiv_.className,this.labelDiv_.style.cssText="",this.eventDiv_.style.cssText="",b=this.marker_.get("labelStyle");for(a in b)b.hasOwnProperty(a)&&(this.labelDiv_.style[a]=b[a],this.eventDiv_.style[a]=b[a]);this.setMandatoryStyles()},h.prototype.setMandatoryStyles=function(){this.labelDiv_.style.position="absolute",this.labelDiv_.style.overflow="hidden","undefined"!=typeof this.labelDiv_.style.opacity&&""!==this.labelDiv_.style.opacity&&(this.labelDiv_.style.MsFilter='"progid:DXImageTransform.Microsoft.Alpha(opacity='+100*this.labelDiv_.style.opacity+')"',this.labelDiv_.style.filter="alpha(opacity="+100*this.labelDiv_.style.opacity+")"),this.eventDiv_.style.position=this.labelDiv_.style.position,this.eventDiv_.style.overflow=this.labelDiv_.style.overflow,this.eventDiv_.style.opacity=.01,this.eventDiv_.style.MsFilter='"progid:DXImageTransform.Microsoft.Alpha(opacity=1)"',this.eventDiv_.style.filter="alpha(opacity=1)",this.setAnchor(),this.setPosition(),this.setVisible()},h.prototype.setAnchor=function(){var a=this.marker_.get("labelAnchor");this.labelDiv_.style.marginLeft=-a.x+"px",this.labelDiv_.style.marginTop=-a.y+"px",this.eventDiv_.style.marginLeft=-a.x+"px",this.eventDiv_.style.marginTop=-a.y+"px"},h.prototype.setPosition=function(a){var b=this.getProjection().fromLatLngToDivPixel(this.marker_.getPosition());"undefined"==typeof a&&(a=0),this.labelDiv_.style.left=Math.round(b.x)+"px",this.labelDiv_.style.top=Math.round(b.y-a)+"px",this.eventDiv_.style.left=this.labelDiv_.style.left,this.eventDiv_.style.top=this.labelDiv_.style.top,this.setZIndex()},h.prototype.setZIndex=function(){var a=this.marker_.get("labelInBackground")?-1:1;"undefined"==typeof this.marker_.getZIndex()?(this.labelDiv_.style.zIndex=parseInt(this.labelDiv_.style.top,10)+a,this.eventDiv_.style.zIndex=this.labelDiv_.style.zIndex):(this.labelDiv_.style.zIndex=this.marker_.getZIndex()+a,this.eventDiv_.style.zIndex=this.labelDiv_.style.zIndex)},h.prototype.setVisible=function(){this.labelDiv_.style.display=this.marker_.get("labelVisible")&&this.marker_.getVisible()?"block":"none",this.eventDiv_.style.display=this.labelDiv_.style.display},g(i,google.maps.Marker),i.prototype.setMap=function(a){google.maps.Marker.prototype.setMap.apply(this,arguments),this.label.setMap(a)},a.InfoBox=b,a.Cluster=e,a.ClusterIcon=d,a.MarkerClusterer=f,a.MarkerLabel_=h,a.MarkerWithLabel=i})}}),function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={exports:{},id:d,loaded:!1};return a[d].call(e.exports,e,e.exports,b),e.loaded=!0,e.exports}var c={};return b.m=a,b.c=c,b.p="",b(0)}([function(a,c,d){b.module("uiGmapgoogle-maps.wrapped").service("uiGmapDataStructures",function(){return{Graph:d(1).Graph,Queue:d(1).Queue}})},function(a,b,c){(function(){a.exports={Graph:c(2),Heap:c(3),LinkedList:c(4),Map:c(5),Queue:c(6),RedBlackTree:c(7),Trie:c(8)}}).call(this)},function(a){(function(){var b,c={}.hasOwnProperty;b=function(){function a(){this._nodes={},this.nodeSize=0,this.edgeSize=0}return a.prototype.addNode=function(a){return this._nodes[a]?void 0:(this.nodeSize++,this._nodes[a]={_outEdges:{},_inEdges:{}})},a.prototype.getNode=function(a){return this._nodes[a]},a.prototype.removeNode=function(a){var b,d,e,f,g;if(d=this._nodes[a]){f=d._outEdges;for(e in f)c.call(f,e)&&this.removeEdge(a,e);g=d._inEdges;for(b in g)c.call(g,b)&&this.removeEdge(b,a);return this.nodeSize--,delete this._nodes[a],d}},a.prototype.addEdge=function(a,b,c){var d,e,f;return null==c&&(c=1),!this.getEdge(a,b)&&(e=this._nodes[a],f=this._nodes[b],e&&f)?(d={weight:c},e._outEdges[b]=d,f._inEdges[a]=d,this.edgeSize++,d):void 0},a.prototype.getEdge=function(a,b){var c,d;return c=this._nodes[a],d=this._nodes[b],c&&d?c._outEdges[b]:void 0},a.prototype.removeEdge=function(a,b){var c,d,e;return d=this._nodes[a],e=this._nodes[b],(c=this.getEdge(a,b))?(delete d._outEdges[b],delete e._inEdges[a],this.edgeSize--,c):void 0},a.prototype.getInEdgesOf=function(a){var b,d,e,f;e=this._nodes[a],d=[],f=null!=e?e._inEdges:void 0;for(b in f)c.call(f,b)&&d.push(this.getEdge(b,a));return d},a.prototype.getOutEdgesOf=function(a){var b,d,e,f;b=this._nodes[a],d=[],f=null!=b?b._outEdges:void 0;for(e in f)c.call(f,e)&&d.push(this.getEdge(a,e));return d},a.prototype.getAllEdgesOf=function(a){var b,c,d,e,f,g,h;if(c=this.getInEdgesOf(a),d=this.getOutEdgesOf(a),0===c.length)return d;for(e=this.getEdge(a,a),b=f=0,g=c.length;g>=0?g>f:f>g;b=g>=0?++f:--f)if(c[b]===e){h=[c[c.length-1],c[b]],c[b]=h[0],c[c.length-1]=h[1],c.pop();break}return c.concat(d)},a.prototype.forEachNode=function(a){var b,d,e;e=this._nodes;for(b in e)c.call(e,b)&&(d=e[b],a(d,b))},a.prototype.forEachEdge=function(a){var b,d,e,f,g,h;g=this._nodes;for(d in g)if(c.call(g,d)){e=g[d],h=e._outEdges;for(f in h)c.call(h,f)&&(b=h[f],a(b))}},a}(),a.exports=b}).call(this)},function(a){(function(){var b,c,d,e;b=function(){function a(a){var b,c,d,e,f,g;for(null==a&&(a=[]),this._data=[void 0],d=0,f=a.length;f>d;d++)c=a[d],null!=c&&this._data.push(c);if(this._data.length>1)for(b=e=2,g=this._data.length;g>=2?g>e:e>g;b=g>=2?++e:--e)this._upHeap(b);this.size=this._data.length-1}return a.prototype.add=function(a){return null!=a?(this._data.push(a),this._upHeap(this._data.length-1),this.size++,a):void 0},a.prototype.removeMin=function(){var a;if(1!==this._data.length)return this.size--,2===this._data.length?this._data.pop():(a=this._data[1],this._data[1]=this._data.pop(),this._downHeap(),a)},a.prototype.peekMin=function(){return this._data[1]},a.prototype._upHeap=function(a){var b,c;for(b=this._data[a];this._data[a]<this._data[d(a)]&&a>1;)c=[this._data[d(a)],this._data[a]],this._data[a]=c[0],this._data[d(a)]=c[1],a=d(a)},a.prototype._downHeap=function(){var a,b,d;for(a=1;c(a<this._data.length)&&(b=c(a),b<this._data.length-1&&this._data[e(a)]<this._data[b]&&(b=e(a)),this._data[b]<this._data[a]);)d=[this._data[a],this._data[b]],this._data[b]=d[0],this._data[a]=d[1],a=b},a}(),d=function(a){return a>>1},c=function(a){return a<<1},e=function(a){return(a<<1)+1},a.exports=b}).call(this)},function(a){(function(){var b;b=function(){function a(a){var b,c,d;for(null==a&&(a=[]),this.head={prev:void 0,value:void 0,next:void 0},this.tail={prev:void 0,value:void 0,next:void 0},this.size=0,c=0,d=a.length;d>c;c++)b=a[c],this.add(b)}return a.prototype.at=function(a){var b,c,d,e,f;if(-this.size<=a&&a<this.size){if(a=this._adjust(a),2*a<this.size)for(b=this.head,c=d=1;a>=d;c=d+=1)b=b.next;else for(b=this.tail,c=e=1,f=this.size-a-1;f>=e;c=e+=1)b=b.prev;return b}},a.prototype.add=function(a,b){var c,d,e,f,g;return null==b&&(b=this.size),-this.size<=b&&b<=this.size?(d={value:a},b=this._adjust(b),0===this.size?this.head=d:0===b?(e=[d,this.head,d],this.head.prev=e[0],d.next=e[1],this.head=e[2]):(c=this.at(b-1),f=[c.next,d,d,c],d.next=f[0],null!=(g=c.next)?g.prev=f[1]:void 0,c.next=f[2],d.prev=f[3]),b===this.size&&(this.tail=d),this.size++,a):void 0},a.prototype.removeAt=function(a){var b,c,d;return null==a&&(a=this.size-1),-this.size<=a&&a<this.size&&0!==this.size?(a=this._adjust(a),1===this.size?(c=this.head.value,this.head.value=this.tail.value=void 0):0===a?(c=this.head.value,this.head=this.head.next,this.head.prev=void 0):(b=this.at(a),c=b.value,b.prev.next=b.next,null!=(d=b.next)&&(d.prev=b.prev),a===this.size-1&&(this.tail=b.prev)),this.size--,c):void 0},a.prototype.remove=function(a){var b;if(null!=a){for(b=this.head;b&&b.value!==a;)b=b.next;if(b)return 1===this.size?this.head.value=this.tail.value=void 0:b===this.head?(this.head=this.head.next,this.head.prev=void 0):b===this.tail?(this.tail=this.tail.prev,this.tail.next=void 0):(b.prev.next=b.next,b.next.prev=b.prev),this.size--,a}},a.prototype.indexOf=function(a,b){var c,d;if(null==b&&(b=0),null==this.head.value&&!this.head.next||b>=this.size)return-1;for(b=Math.max(0,this._adjust(b)),c=this.at(b),d=b;c&&c.value!==a;)c=c.next,d++;return d===this.size?-1:d},a.prototype._adjust=function(a){return 0>a?this.size+a:a},a}(),a.exports=b}).call(this)},function(a){(function(){var b,c,d,e,f={}.hasOwnProperty;c="_mapId_",b=function(){function a(b){var c,d;this._content={},this._itemId=0,this._id=a._newMapId(),this.size=0;for(c in b)f.call(b,c)&&(d=b[c],this.set(c,d))}return a._mapIdTracker=0,a._newMapId=function(){return this._mapIdTracker++},a.prototype.hash=function(a,b){var f,g;return null==b&&(b=!1),g=d(a),e(a)?(f=c+this._id,b&&!a[f]&&(a[f]=this._itemId++),f+"_"+a[f]):g+"_"+a},a.prototype.set=function(a,b){return this.has(a)||this.size++,this._content[this.hash(a,!0)]=[b,a],b},a.prototype.get=function(a){var b;return null!=(b=this._content[this.hash(a)])?b[0]:void 0},a.prototype.has=function(a){return this.hash(a)in this._content},a.prototype["delete"]=function(a){var b;return b=this.hash(a),b in this._content?(delete this._content[b],e(a)&&delete a[c+this._id],this.size--,!0):!1},a.prototype.forEach=function(a){var b,c,d;d=this._content;for(b in d)f.call(d,b)&&(c=d[b],a(c[1],c[0]))},a}(),e=function(a){var b,c,e,f,g;for(b=["Boolean","Number","String","Undefined","Null","RegExp","Function"],e=d(a),f=0,g=b.length;g>f;f++)if(c=b[f],e===c)return!1;return!0},d=function(a){return Object.prototype.toString.apply(a).match(/\[object (.+)\]/)[1]},a.exports=b}).call(this)},function(a){(function(){var b;b=function(){function a(a){null==a&&(a=[]),this._content=a,this._dequeueIndex=0,this.size=this._content.length}return a.prototype.enqueue=function(a){return this.size++,this._content.push(a),a},a.prototype.dequeue=function(){var a;if(0!==this.size)return this.size--,a=this._content[this._dequeueIndex],this._dequeueIndex++,2*this._dequeueIndex>this._content.length&&(this._content=this._content.slice(this._dequeueIndex),this._dequeueIndex=0),a},a.prototype.peek=function(){return this._content[this._dequeueIndex]},a}(),a.exports=b}).call(this)},function(a){(function(){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p;c=0,d=1,e=2,h=3,f=1,b=2,g=function(){function a(a){var b,c,d;for(null==a&&(a=[]),this._root,this.size=0,c=0,d=a.length;d>c;c++)b=a[c],null!=b&&this.add(b)}return a.prototype.add=function(a){var g,l,m,n;if(null!=a){if(this.size++,m={value:a,_color:f},this._root){if(l=i(this._root,function(b){return a===b.value?c:a<b.value?b._left?d:(m._parent=b,b._left=m,h):b._right?e:(m._parent=b,b._right=m,h)}),null!=l)return}else this._root=m;for(g=m;;){if(g===this._root){g._color=b;break}if(g._parent._color===b)break;{if((null!=(n=p(g))?n._color:void 0)!==f){!k(g)&&k(g._parent)?(this._rotateLeft(g._parent),g=g._left):k(g)&&!k(g._parent)&&(this._rotateRight(g._parent),g=g._right),g._parent._color=b,j(g)._color=f,k(g)?this._rotateRight(j(g)):this._rotateLeft(j(g));break}g._parent._color=b,p(g)._color=b,j(g)._color=f,g=j(g)}}return a}},a.prototype.has=function(a){var b;return b=i(this._root,function(b){return a===b.value?c:a<b.value?d:e}),b?!0:!1},a.prototype.peekMin=function(){var a;return null!=(a=n(this._root))?a.value:void 0},a.prototype.peekMax=function(){var a;return null!=(a=m(this._root))?a.value:void 0},a.prototype.remove=function(a){var b;return(b=i(this._root,function(b){return a===b.value?c:a<b.value?d:e}))?(this._removeNode(this._root,b),this.size--,a):void 0},a.prototype.removeMin=function(){var a,b;return(a=n(this._root))?(b=a.value,this._removeNode(this._root,a),b):void 0},a.prototype.removeMax=function(){var a,b;return(a=m(this._root))?(b=a.value,this._removeNode(this._root,a),b):void 0},a.prototype._removeNode=function(a,c){var d,e,g,h,i,j,m,p,q,r;if(c._left&&c._right&&(e=n(c._right),c.value=e.value,c=e),e=c._left||c._right,e||(e={color:b,_right:void 0,_left:void 0,isLeaf:!0}),e._parent=c._parent,null!=(g=c._parent)&&(g[l(c)]=e),c._color===b)if(e._color===f)e._color=b,e._parent||(this._root=e);else for(;;){if(!e._parent){this._root=e.isLeaf?void 0:e;break}if(d=o(e),(null!=d?d._color:void 0)===f&&(e._parent._color=f,d._color=b,k(e)?this._rotateLeft(e._parent):this._rotateRight(e._parent)),d=o(e),e._parent._color!==b||d&&(d._color!==b||d._left&&d._left._color!==b||d._right&&d._right._color!==b)){if(!(e._parent._color!==f||d&&(d._color!==b||d._left&&(null!=(h=d._left)?h._color:void 0)!==b||d._right&&(null!=(i=d._right)?i._color:void 0)!==b))){null!=d&&(d._color=f),e._parent._color=b;break}if((null!=d?d._color:void 0)===b){!k(e)||d._right&&d._right._color!==b||(null!=(j=d._left)?j._color:void 0)!==f?k(e)||d._left&&d._left._color!==b||(null!=(p=d._right)?p._color:void 0)!==f||(d._color=f,null!=(q=d._right)&&(q._color=b),this._rotateLeft(d)):(d._color=f,null!=(m=d._left)&&(m._color=b),this._rotateRight(d));break}d=o(e),d._color=e._parent._color,k(e)?(d._right._color=b,this._rotateRight(e._parent)):(d._left._color=b,this._rotateLeft(e._parent))}else null!=d&&(d._color=f),e.isLeaf&&(e._parent[l(e)]=void 0),e=e._parent}return e.isLeaf&&null!=(r=e._parent)?r[l(e)]=void 0:void 0},a.prototype._rotateLeft=function(a){var b,c;return null!=(b=a._parent)&&(b[l(a)]=a._right),a._right._parent=a._parent,a._parent=a._right,a._right=a._right._left,a._parent._left=a,null!=(c=a._right)&&(c._parent=a),null==a._parent._parent?this._root=a._parent:void 0},a.prototype._rotateRight=function(a){var b,c;return null!=(b=a._parent)&&(b[l(a)]=a._left),a._left._parent=a._parent,a._parent=a._left,a._left=a._left._right,a._parent._right=a,null!=(c=a._left)&&(c._parent=a),null==a._parent._parent?this._root=a._parent:void 0},a}(),k=function(a){return a===a._parent._left},l=function(a){return k(a)?"_left":"_right"},i=function(a,b){var f,g,i;for(g=a,i=void 0;g;){if(f=b(g),f===c){i=g;break}if(f===d)g=g._left;else if(f===e)g=g._right;else if(f===h)break}return i},n=function(a){return i(a,function(a){return a._left?d:c})},m=function(a){return i(a,function(a){return a._right?e:c})},j=function(a){var b;return null!=(b=a._parent)?b._parent:void 0},p=function(a){return j(a)?k(a._parent)?j(a)._right:j(a)._left:void 0},o=function(a){return k(a)?a._parent._right:a._parent._left},a.exports=g}).call(this)},function(a,b,c){(function(){var b,d,e,f,g={}.hasOwnProperty;b=c(6),e="end",d=function(){function a(a){var b,c,d;for(null==a&&(a=[]),this._root={},this.size=0,c=0,d=a.length;d>c;c++)b=a[c],this.add(b)}return a.prototype.add=function(a){var b,c,d,f;if(null!=a){for(this.size++,b=this._root,d=0,f=a.length;f>d;d++)c=a[d],null==b[c]&&(b[c]={}),b=b[c];return b[e]=!0,a}},a.prototype.has=function(a){var b,c,d,f;if(null==a)return!1;for(b=this._root,d=0,f=a.length;f>d;d++){if(c=a[d],null==b[c])return!1;b=b[c]}return b[e]?!0:!1},a.prototype.longestPrefixOf=function(a){var b,c,d,e,f;if(null==a)return"";for(b=this._root,d="",e=0,f=a.length;f>e&&(c=a[e],null!=b[c]);e++)d+=c,b=b[c];return d},a.prototype.wordsWithPrefix=function(a){var c,d,f,h,i,j,k,l,m,n;if(null==a)return[];for(null!=a||(a=""),k=[],d=this._root,l=0,m=a.length;m>l;l++)if(f=a[l],d=d[f],null==d)return[];for(i=new b,i.enqueue([d,""]);0!==i.size;){n=i.dequeue(),h=n[0],c=n[1],h[e]&&k.push(a+c);for(f in h)g.call(h,f)&&(j=h[f],i.enqueue([j,c+f]))}return k},a.prototype.remove=function(a){var b,c,d,g,h,i,j,k;if(null!=a){for(b=this._root,g=[],h=0,j=a.length;j>h;h++){if(d=a[h],null==b[d])return;b=b[d],g.push([d,b])}if(b[e]){if(this.size--,delete b[e],f(b,1))return a;for(c=i=k=g.length-1;(1>=k?1>=i:i>=1)&&!f(g[c][1],1);c=1>=k?++i:--i)delete g[c-1][1][g[c][0]];return f(this._root[g[0][0]],1)||delete this._root[g[0][0]],a}}},a}(),f=function(a,b){var c,d;if(0===b)return!0;d=0;for(c in a)if(g.call(a,c)&&(d++,d>=b))return!0;return!1},a.exports=d}).call(this)}]),b.module("uiGmapgoogle-maps.extensions").service("uiGmapExtendMarkerClusterer",["uiGmapLodash","uiGmapPropMap",function(b,c){return{init:_.once(function(){(function(){var d={}.hasOwnProperty,e=function(a,b){function c(){this.constructor=a}for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};a.NgMapCluster=function(a){function d(a){d.__super__.constructor.call(this,a),this.markers_=new c}return e(d,a),d.prototype.addMarker=function(a){var b,c;if(this.isMarkerAlreadyAdded_(a)){var d=this.markers_.get(a.key);if(d.getPosition().lat()==a.getPosition().lat()&&d.getPosition().lon()==a.getPosition().lon())return!1}if(this.center_){if(this.averageCenter_){var e=this.markers_.length+1,f=(this.center_.lat()*(e-1)+a.getPosition().lat())/e,g=(this.center_.lng()*(e-1)+a.getPosition().lng())/e;this.center_=new google.maps.LatLng(f,g),this.calculateBounds_()}}else this.center_=a.getPosition(),this.calculateBounds_();return a.isAdded=!0,this.markers_.push(a),b=this.markers_.length,c=this.markerClusterer_.getMaxZoom(),null!==c&&this.map_.getZoom()>c?a.getMap()!==this.map_&&a.setMap(this.map_):b<this.minClusterSize_?a.getMap()!==this.map_&&a.setMap(this.map_):b===this.minClusterSize_?this.markers_.each(function(a){a.setMap(null)}):a.setMap(null),!0},d.prototype.isMarkerAlreadyAdded_=function(a){return b.isNullOrUndefined(this.markers_.get(a.key))},d.prototype.getBounds=function(){var a=new google.maps.LatLngBounds(this.center_,this.center_);return this.getMarkers().each(function(b){a.extend(b.getPosition())}),a},d.prototype.remove=function(){this.clusterIcon_.setMap(null),this.markers_=new c,delete this.markers_},d}(Cluster),a.NgMapMarkerClusterer=function(a){function b(a,d,e){b.__super__.constructor.call(this,a,d,e),this.markers_=new c}return e(b,a),b.prototype.clearMarkers=function(){this.resetViewport_(!0),this.markers_=new c},b.prototype.removeMarker_=function(a){return this.markers_.get(a.key)?(a.setMap(null),this.markers_.remove(a.key),!0):!1},b.prototype.createClusters_=function(a){var b,c,d,e=this;if(this.ready_){0===a&&(google.maps.event.trigger(this,"clusteringbegin",this),"undefined"!=typeof this.timerRefStatic&&(clearTimeout(this.timerRefStatic),delete this.timerRefStatic)),d=this.getMap().getZoom()>3?new google.maps.LatLngBounds(this.getMap().getBounds().getSouthWest(),this.getMap().getBounds().getNorthEast()):new google.maps.LatLngBounds(new google.maps.LatLng(85.02070771743472,-178.48388434375),new google.maps.LatLng(-85.08136444384544,178.00048865625));var f=this.getExtendedBounds(d),g=Math.min(a+this.batchSize_,this.markers_.length),h=this.markers_.values();for(b=a;g>b;b++)c=h[b],!c.isAdded&&this.isMarkerInBounds_(c,f)&&(!this.ignoreHidden_||this.ignoreHidden_&&c.getVisible())&&this.addToClosestCluster_(c);if(g<this.markers_.length)this.timerRefStatic=setTimeout(function(){e.createClusters_(g)},0);else{for(b=0;b<this.clusters_.length;b++)this.clusters_[b].updateIcon_();delete this.timerRefStatic,google.maps.event.trigger(this,"clusteringend",this)}}},b.prototype.addToClosestCluster_=function(a){var b,c,d,e,f=4e4,g=null;for(b=0;b<this.clusters_.length;b++)d=this.clusters_[b],e=d.getCenter(),e&&(c=this.distanceBetweenPoints_(e,a.getPosition()),f>c&&(f=c,g=d));g&&g.isMarkerInClusterBounds(a)?g.addMarker(a):(d=new NgMapCluster(this),d.addMarker(a),this.clusters_.push(d))},b.prototype.redraw_=function(){this.createClusters_(0)},b.prototype.resetViewport_=function(a){var b;for(b=0;b<this.clusters_.length;b++)this.clusters_[b].remove();this.clusters_=[],this.markers_.each(function(b){b.isAdded=!1,a&&b.setMap(null)})},b.prototype.extend=function(a,b){return function(a){var b;for(b in a.prototype)"constructor"!==b&&(this.prototype[b]=a.prototype[b]);return this}.apply(a,[b])},ClusterIcon.prototype.show=function(){if(this.div_){var a="",b=this.backgroundPosition_.split(" "),c=parseInt(b[0].trim(),10),d=parseInt(b[1].trim(),10),e=this.getPosFromLatLng_(this.center_);this.div_.style.cssText=this.createCss(e),a="<img src='"+this.url_+"' style='position: absolute; top: "+d+"px; left: "+c+"px; ",a+=this.cluster_.getMarkerClusterer().enableRetinaIcons_?"width: "+this.width_+"px;height: "+this.height_+"px;":"clip: rect("+-1*d+"px, "+(-1*c+this.width_)+"px, "+(-1*d+this.height_)+"px, "+-1*c+"px);",a+="'>",this.div_.innerHTML=a+"<div style='position: absolute;top: "+this.anchorText_[0]+"px;left: "+this.anchorText_[1]+"px;color: "+this.textColor_+";font-size: "+this.textSize_+"px;font-family: "+this.fontFamily_+";font-weight: "+this.fontWeight_+";font-style: "+this.fontStyle_+";text-decoration: "+this.textDecoration_+";text-align: center;width: "+this.width_+"px;line-height:"+this.height_+"px;'>"+this.sums_.text+"</div>",this.div_.title="undefined"==typeof this.sums_.title||""===this.sums_.title?this.cluster_.getMarkerClusterer().getTitle():this.sums_.title,this.div_.style.display=""}this.visible_=!0},b}(MarkerClusterer)}).call(this)})}}])}(window,angular);
//# sourceMappingURL=angular-google-maps_dev_mapped.min.js.map | sufuf3/cdnjs | ajax/libs/angular-google-maps/2.0.18/angular-google-maps_dev_mapped.min.js | JavaScript | mit | 191,253 |
!function(e){if("object"==typeof exports)module.exports=e();else if("function"==typeof define&&define.amd)define(e);else{var n;"undefined"!=typeof window?n=window:"undefined"!=typeof global?n=global:"undefined"!=typeof self&&(n=self),n.jade=e()}}(function(){return function e(n,t,r){function i(a,s){if(!t[a]){if(!n[a]){var u="function"==typeof require&&require;if(!s&&u)return u(a,!0);if(o)return o(a,!0);throw new Error("Cannot find module '"+a+"'")}var c=t[a]={exports:{}};n[a][0].call(c.exports,function(e){var t=n[a][1][e];return i(t?t:e)},c,c.exports,e,n,t,r)}return t[a].exports}for(var o="function"==typeof require&&require,a=0;a<r.length;a++)i(r[a]);return i}({1:[function(e,n){"use strict";var t=(e("./nodes"),e("./filters")),r=e("./doctypes"),i=e("./self-closing"),o=e("./runtime"),a=(e("./utils"),e("character-parser").parseMax),s=e("constantinople"),u=e("constantinople").toConstant,c=n.exports=function(e,n){this.options=n=n||{},this.node=e,this.hasCompiledDoctype=!1,this.hasCompiledTag=!1,this.pp=n.pretty||!1,this.debug=!1!==n.compileDebug,this.indents=0,this.parentIndents=0,this.terse=!1,n.doctype&&this.setDoctype(n.doctype)};c.prototype={compile:function(){return this.buf=[],this.pp&&this.buf.push("jade.indent = [];"),this.lastBufferedIdx=-1,this.visit(this.node),this.buf.join("\n")},setDoctype:function(e){e=e||"default",this.doctype=r[e.toLowerCase()]||"<!DOCTYPE "+e+">",this.terse="<!doctype html>"==this.doctype.toLowerCase(),this.xml=0==this.doctype.indexOf("<?xml")},buffer:function(e,n){if(n){var t=/(\\)?([#!]){((?:.|\n)*)$/.exec(e);if(t){if(this.buffer(e.substr(0,t.index),!1),t[1])return this.buffer(t[2]+"{",!1),void this.buffer(t[3],!0);try{var r=t[3],i=a(r),o=("!"==t[2]?"":"jade.escape")+"((jade.interp = "+i.src+") == null ? '' : jade.interp)"}catch(s){throw s}return this.bufferExpression(o),void this.buffer(r.substr(i.end+1),!0)}}e=JSON.stringify(e),e=e.substr(1,e.length-2),this.lastBufferedIdx==this.buf.length?("code"===this.lastBufferedType&&(this.lastBuffered+=' + "'),this.lastBufferedType="text",this.lastBuffered+=e,this.buf[this.lastBufferedIdx-1]="buf.push("+this.bufferStartChar+this.lastBuffered+'");'):(this.buf.push('buf.push("'+e+'");'),this.lastBufferedType="text",this.bufferStartChar='"',this.lastBuffered=e,this.lastBufferedIdx=this.buf.length)},bufferExpression:function(e){var n=Function("","return ("+e+");");return s(e)?this.buffer(n(),!1):void(this.lastBufferedIdx==this.buf.length?("text"===this.lastBufferedType&&(this.lastBuffered+='"'),this.lastBufferedType="code",this.lastBuffered+=" + ("+e+")",this.buf[this.lastBufferedIdx-1]="buf.push("+this.bufferStartChar+this.lastBuffered+");"):(this.buf.push("buf.push("+e+");"),this.lastBufferedType="code",this.bufferStartChar="",this.lastBuffered="("+e+")",this.lastBufferedIdx=this.buf.length))},prettyIndent:function(e,n){e=e||0,n=n?"\n":"",this.buffer(n+Array(this.indents+e).join(" ")),this.parentIndents&&this.buf.push("buf.push.apply(buf, jade.indent);")},visit:function(e){var n=this.debug;n&&this.buf.push("jade_debug.unshift({ lineno: "+e.line+", filename: "+(e.filename?JSON.stringify(e.filename):"jade_debug[0].filename")+" });"),!1===e.debug&&this.debug&&(this.buf.pop(),this.buf.pop()),this.visitNode(e),n&&this.buf.push("jade_debug.shift();")},visitNode:function(e){return this["visit"+e.type](e)},visitCase:function(e){var n=this.withinCase;this.withinCase=!0,this.buf.push("switch ("+e.expr+"){"),this.visit(e.block),this.buf.push("}"),this.withinCase=n},visitWhen:function(e){this.buf.push("default"==e.expr?"default:":"case "+e.expr+":"),this.visit(e.block),this.buf.push(" break;")},visitLiteral:function(e){this.buffer(e.str)},visitBlock:function(e){var n=e.nodes.length,t=this.escape,r=this.pp;r&&n>1&&!t&&e.nodes[0].isText&&e.nodes[1].isText&&this.prettyIndent(1,!0);for(var i=0;n>i;++i)r&&i>0&&!t&&e.nodes[i].isText&&e.nodes[i-1].isText&&this.prettyIndent(1,!1),this.visit(e.nodes[i]),e.nodes[i+1]&&e.nodes[i].isText&&e.nodes[i+1].isText&&this.buffer("\n")},visitMixinBlock:function(){this.pp&&this.buf.push("jade.indent.push('"+Array(this.indents+1).join(" ")+"');"),this.buf.push("block && block();"),this.pp&&this.buf.push("jade.indent.pop();")},visitDoctype:function(e){!e||!e.val&&this.doctype||this.setDoctype(e.val||"default"),this.doctype&&this.buffer(this.doctype),this.hasCompiledDoctype=!0},visitMixin:function(e){var n="jade_mixins[",t=e.args||"",r=e.block,i=e.attrs,o=e.attributeBlocks,a=this.pp;if(n+=("#"==e.name[0]?e.name.substr(2,e.name.length-3):'"'+e.name+'"')+"]",e.call){if(a&&this.buf.push("jade.indent.push('"+Array(this.indents+1).join(" ")+"');"),r||i.length){if(this.buf.push(n+".call({"),r){this.buf.push("block: function(){"),this.parentIndents++;var s=this.indents;this.indents=0,this.visit(e.block),this.indents=s,this.parentIndents--,this.buf.push(i.length||o.length?"},":"}")}if(o.length){if(i.length){var u=this.attrs(i);o.unshift(u)}this.buf.push("attributes: jade.merge(["+o.join(",")+"])")}else if(i.length){var u=this.attrs(i);this.buf.push("attributes: "+u)}this.buf.push(t?"}, "+t+");":"});")}else this.buf.push(n+"("+t+");");a&&this.buf.push("jade.indent.pop();")}else this.buf.push(n+" = function("+t+"){"),this.buf.push("var block = (this && this.block), attributes = (this && this.attributes) || {};"),this.parentIndents++,this.visit(r),this.parentIndents--,this.buf.push("};")},visitTag:function(e){function n(){e.buffer?o.bufferExpression(t):o.buffer(t)}this.indents++;var t=e.name,r=this.pp,o=this;if("pre"==e.name&&(this.escape=!0),this.hasCompiledTag||(this.hasCompiledDoctype||"html"!=t||this.visitDoctype(),this.hasCompiledTag=!0),r&&!e.isInline()&&this.prettyIndent(0,!0),!~i.indexOf(t)&&!e.selfClosing||this.xml)this.buffer("<"),n(),this.visitAttributes(e.attrs,e.attributeBlocks),this.buffer(">"),e.code&&this.visitCode(e.code),this.visit(e.block),!r||e.isInline()||"pre"==e.name||e.canInline()||this.prettyIndent(0,!0),this.buffer("</"),n(),this.buffer(">");else if(this.buffer("<"),n(),this.visitAttributes(e.attrs,e.attributeBlocks),this.buffer(this.terse?">":"/>"),e.block&&("Block"!==e.block.type||0!==e.block.nodes.length)&&e.block.nodes.some(function(e){return"Text"!==e.type||!/^\s*$/.test(e.val)}))throw new Error(t+" is self closing and should not have content.");"pre"==e.name&&(this.escape=!1),this.indents--},visitFilter:function(e){var n=e.block.nodes.map(function(e){return e.val}).join("\n");e.attrs=e.attrs||{},e.attrs.filename=this.options.filename,this.buffer(t(e.name,n,e.attrs),!0)},visitText:function(e){this.buffer(e.val,!0)},visitComment:function(e){e.buffer&&(this.pp&&this.prettyIndent(1,!0),this.buffer("<!--"+e.val+"-->"))},visitBlockComment:function(e){e.buffer&&(this.pp&&this.prettyIndent(1,!0),this.buffer("<!--"+e.val),this.visit(e.block),this.pp&&this.prettyIndent(1,!0),this.buffer("-->"))},visitCode:function(e){if(e.buffer){var n=e.val.trimLeft();n="null == (jade.interp = "+n+') ? "" : jade.interp',e.escape&&(n="jade.escape("+n+")"),this.bufferExpression(n)}else this.buf.push(e.val);e.block&&(e.buffer||this.buf.push("{"),this.visit(e.block),e.buffer||this.buf.push("}"))},visitEach:function(e){this.buf.push("// iterate "+e.obj+"\n;(function(){\n var $$obj = "+e.obj+";\n if ('number' == typeof $$obj.length) {\n"),e.alternative&&this.buf.push(" if ($$obj.length) {"),this.buf.push(" for (var "+e.key+" = 0, $$l = $$obj.length; "+e.key+" < $$l; "+e.key+"++) {\n var "+e.val+" = $$obj["+e.key+"];\n"),this.visit(e.block),this.buf.push(" }\n"),e.alternative&&(this.buf.push(" } else {"),this.visit(e.alternative),this.buf.push(" }")),this.buf.push(" } else {\n var $$l = 0;\n for (var "+e.key+" in $$obj) {\n $$l++; var "+e.val+" = $$obj["+e.key+"];\n"),this.visit(e.block),this.buf.push(" }\n"),e.alternative&&(this.buf.push(" if ($$l === 0) {"),this.visit(e.alternative),this.buf.push(" }")),this.buf.push(" }\n}).call(this);\n")},visitAttributes:function(e,n){if(n.length){if(e.length){var t=this.attrs(e);n.unshift(t)}this.bufferExpression("jade.attrs(jade.merge(["+n.join(",")+"]), "+JSON.stringify(this.terse)+")")}else e.length&&this.attrs(e,!0)},attrs:function(e,n){var t=[],r=[],i=[];return e.forEach(function(e){var a=e.name,c=e.escaped;if("class"===a)r.push(e.val),i.push(e.escaped);else if(s(e.val))if(n)this.buffer(o.attr(a,u(e.val),c,this.terse));else{var l=u(e.val);!c||0===a.indexOf("data")&&"string"!=typeof l||(l=o.escape(l)),t.push(JSON.stringify(a)+": "+JSON.stringify(l))}else if(n)this.bufferExpression('jade.attr("'+a+'", '+e.val+", "+JSON.stringify(c)+", "+JSON.stringify(this.terse)+")");else{var l=e.val;c&&0!==a.indexOf("data")?l="jade.escape("+l+")":c&&(l="(typeof (jade.interp = "+l+') == "string" ? jade.escape(jade.interp) : jade.interp)"'),t.push(JSON.stringify(a)+": "+l)}}.bind(this)),n?r.every(s)?this.buffer(o.cls(r.map(u),i)):this.bufferExpression("jade.cls(["+r.join(",")+"], "+JSON.stringify(i)+")"):(r.every(s)?r=JSON.stringify(o.joinClasses(r.map(u).map(o.joinClasses).map(function(e,n){return i[n]?o.escape(e):e}))):r.length&&(r="(jade.interp = "+JSON.stringify(i)+", jade.joinClasses(["+r.join(",")+"].map(jade.joinClasses).map(function (cls, i) { return jade.interp[i] ? jade.escape(cls) : cls })))"),r.length&&t.push('"class": '+r)),"{"+t.join(",")+"}"}}},{"./doctypes":2,"./filters":3,"./nodes":16,"./runtime":24,"./self-closing":25,"./utils":26,"character-parser":33,constantinople:34}],2:[function(e,n){"use strict";n.exports={"default":"<!DOCTYPE html>",xml:'<?xml version="1.0" encoding="utf-8" ?>',transitional:'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">',strict:'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">',frameset:'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">',1.1:'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">',basic:'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.1//EN" "http://www.w3.org/TR/xhtml-basic/xhtml-basic11.dtd">',mobile:'<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.2//EN" "http://www.openmobilealliance.org/tech/DTD/xhtml-mobile12.dtd">'}},{}],3:[function(e,n){"use strict";function t(e,n,r){if("function"!=typeof t[e])throw new Error('unknown filter ":'+e+'"');var i=t[e](n,r);return i}n.exports=t,t.exists=function(e){return"function"==typeof t[e]}},{}],4:[function(e,n){"use strict";n.exports=["a","abbr","acronym","b","br","code","em","font","i","img","ins","kbd","map","samp","small","span","strong","sub","sup"]},{}],5:[function(e,n,t){"use strict";function r(e,n){try{var t=new(n.parser||i)(e,n.filename,n),r=new(n.compiler||a)(t.parse(),n),o=r.compile();n.debug&&console.error("\nCompiled Function:\n\n[90m%s[0m",o.replace(/^/gm," "));var c=n.globals&&Array.isArray(n.globals)?n.globals:[];return c.push("jade"),c.push("jade_mixins"),c.push("jade_debug"),c.push("buf"),"var buf = [];\nvar jade_mixins = {};\n"+(n.self?"var self = locals || {};\n"+o:u("locals || {}","\n"+o,c))+';return buf.join("");'}catch(l){t=t.context(),s.rethrow(l,t.filename,t.lexer.lineno,t.input)}}var i=e("./parser"),o=e("./lexer"),a=e("./compiler"),s=e("./runtime"),u=e("with"),c=e("fs");t.selfClosing=e("./self-closing"),t.doctypes=e("./doctypes"),t.filters=e("./filters"),t.utils=e("./utils"),t.Compiler=a,t.Parser=i,t.Lexer=o,t.nodes=e("./nodes"),t.runtime=s,t.cache={},t.compile=function(e,n){var i,n=n||{},o=n.filename?JSON.stringify(n.filename):"undefined";e=String(e),i=n.compileDebug!==!1?["var jade_debug = [{ lineno: 1, filename: "+o+" }];","try {",r(e,n),"} catch (err) {"," jade.rethrow(err, jade_debug[0].filename, jade_debug[0].lineno"+(n.compileDebug===!0?","+JSON.stringify(e):"")+");","}"].join("\n"):r(e,n),i=new Function("locals, jade",i);var a=function(e){return i(e,Object.create(s))};return n.client&&(a.toString=function(){var r=new Error("The `client` option is deprecated, use `jade.compileClient`");return console.error(r.stack||r.message),t.compileClient(e,n)}),a},t.compileClient=function(e,n){var t,n=n||{},i=n.filename?JSON.stringify(n.filename):"undefined";return e=String(e),n.compileDebug?(n.compileDebug=!0,t=["var jade_debug = [{ lineno: 1, filename: "+i+" }];","try {",r(e,n),"} catch (err) {"," jade.rethrow(err, jade_debug[0].filename, jade_debug[0].lineno, "+JSON.stringify(e)+");","}"].join("\n")):(n.compileDebug=!1,t=r(e,n)),"function template(locals) {\n"+t+"\n}"},t.render=function(e,n,r){if("function"==typeof n&&(r=n,n=void 0),"function"==typeof r){var i;try{i=t.render(e,n)}catch(o){return r(o)}return r(null,i)}if(n=n||{},n.cache&&!n.filename)throw new Error('the "filename" option is required for caching');var a=n.filename,s=n.cache?t.cache[a]||(t.cache[a]=t.compile(e,n)):t.compile(e,n);return s(n)},t.renderFile=function(e,n,r){if("function"==typeof n&&(r=n,n=void 0),"function"==typeof r){var i;try{i=t.renderFile(e,n)}catch(o){return r(o)}return r(null,i)}n=n||{};var a=e+":string";n.filename=e;var s=n.cache?t.cache[a]||(t.cache[a]=c.readFileSync(e,"utf8")):c.readFileSync(e,"utf8");return t.render(s,n)},t.compileFileClient=function(e,n){n=n||{};var r=e+":string";n.filename=e;var i=n.cache?t.cache[r]||(t.cache[r]=c.readFileSync(e,"utf8")):c.readFileSync(e,"utf8");return t.compileClient(i,n)},t.__express=t.renderFile},{"./compiler":1,"./doctypes":2,"./filters":3,"./lexer":6,"./nodes":16,"./parser":23,"./runtime":24,"./self-closing":25,"./utils":26,fs:27,"with":46}],6:[function(e,n){"use strict";function t(e){Function("","return ("+e+")")}function r(e){var n=i(e);if(n.isNesting())throw new Error("Nesting must match on expression `"+e+"`")}var i=(e("./utils"),e("character-parser")),o=n.exports=function(e){this.input=e.replace(/\r\n|\r/g,"\n"),this.deferredTokens=[],this.lastIndents=0,this.lineno=1,this.stash=[],this.indentStack=[],this.indentRe=null,this.pipeless=!1};o.prototype={tok:function(e,n){return{type:e,line:this.lineno,val:n}},consume:function(e){this.input=this.input.substr(e)},scan:function(e,n){var t;return(t=e.exec(this.input))?(this.consume(t[0].length),this.tok(n,t[1])):void 0},defer:function(e){this.deferredTokens.push(e)},lookahead:function(e){for(var n=e-this.stash.length;n-->0;)this.stash.push(this.next());return this.stash[--e]},bracketExpression:function(e){e=e||0;var n=this.input[e];if("("!=n&&"{"!=n&&"["!=n)throw new Error("unrecognized start character");var t={"(":")","{":"}","[":"]"}[n],r=i.parseMax(this.input,{start:e+1});if(this.input[r.end]!==t)throw new Error("start character "+n+" does not match end character "+this.input[r.end]);return r},stashed:function(){return this.stash.length&&this.stash.shift()},deferred:function(){return this.deferredTokens.length&&this.deferredTokens.shift()},eos:function(){return this.input.length?void 0:this.indentStack.length?(this.indentStack.shift(),this.tok("outdent")):this.tok("eos")},blank:function(){var e;return(e=/^\n *\n/.exec(this.input))?(this.consume(e[0].length-1),++this.lineno,this.pipeless?this.tok("text",""):this.next()):void 0},comment:function(){var e;if(e=/^\/\/(-)?([^\n]*)/.exec(this.input)){this.consume(e[0].length);var n=this.tok("comment",e[2]);return n.buffer="-"!=e[1],n}},interpolation:function(){if(/^#\{/.test(this.input)){var e;try{e=this.bracketExpression(1)}catch(n){return}return this.consume(e.end+1),this.tok("interpolation",e.src)}},tag:function(){var e;if(e=/^(\w[-:\w]*)(\/?)/.exec(this.input)){this.consume(e[0].length);var n,t=e[1];if(":"==t[t.length-1])for(t=t.slice(0,-1),n=this.tok("tag",t),this.defer(this.tok(":"));" "==this.input[0];)this.input=this.input.substr(1);else n=this.tok("tag",t);return n.selfClosing=!!e[2],n}},filter:function(){return this.scan(/^:([\w\-]+)/,"filter")},doctype:function(){if(this.scan(/^!!! *([^\n]+)?/,"doctype"))throw new Error("`!!!` is deprecated, you must now use `doctype`");var e=this.scan(/^(?:doctype) *([^\n]+)?/,"doctype");if(e&&e.val&&"5"===e.val.trim())throw new Error("`doctype 5` is deprecated, you must now use `doctype html`");return e},id:function(){return this.scan(/^#([\w-]+)/,"id")},className:function(){return this.scan(/^\.([\w-]+)/,"class")},text:function(){return this.scan(/^(?:\| ?| )([^\n]+)/,"text")||this.scan(/^(<[^\n]*)/,"text")},textFail:function(){var e;return(e=this.scan(/^([^\.\n][^\n]+)/,"text"))?(console.warn("Warning: missing space before text for line "+this.lineno+" of jade file."),e):void 0},dot:function(){return this.scan(/^\./,"dot")},"extends":function(){return this.scan(/^extends? +([^\n]+)/,"extends")},prepend:function(){var e;if(e=/^prepend +([^\n]+)/.exec(this.input)){this.consume(e[0].length);var n="prepend",t=e[1],r=this.tok("block",t);return r.mode=n,r}},append:function(){var e;if(e=/^append +([^\n]+)/.exec(this.input)){this.consume(e[0].length);var n="append",t=e[1],r=this.tok("block",t);return r.mode=n,r}},block:function(){var e;if(e=/^block\b *(?:(prepend|append) +)?([^\n]+)/.exec(this.input)){this.consume(e[0].length);var n=e[1]||"replace",t=e[2],r=this.tok("block",t);return r.mode=n,r}},mixinBlock:function(){var e;return(e=/^block\s*(\n|$)/.exec(this.input))?(this.consume(e[0].length-1),this.tok("mixin-block")):void 0},"yield":function(){return this.scan(/^yield */,"yield")},include:function(){return this.scan(/^include +([^\n]+)/,"include")},includeFiltered:function(){var e;if(e=/^include:([\w\-]+) +([^\n]+)/.exec(this.input)){this.consume(e[0].length);var n=e[1],t=e[2],r=this.tok("include",t);return r.filter=n,r}},"case":function(){return this.scan(/^case +([^\n]+)/,"case")},when:function(){return this.scan(/^when +([^:\n]+)/,"when")},"default":function(){return this.scan(/^default */,"default")},call:function(){var e,n;if(n=/^\+(([-\w]+)|(#\{))/.exec(this.input)){if(n[2])this.consume(n[0].length),e=this.tok("call",n[2]);else{var r;try{r=this.bracketExpression(2)}catch(i){return}this.consume(r.end+1),t(r.src),e=this.tok("call","#{"+r.src+"}")}if(n=/^ *\(/.exec(this.input))try{var o=this.bracketExpression(n[0].length-1);/^ *[-\w]+ *=/.test(o.src)||(this.consume(o.end+1),e.args=o.src)}catch(i){}return e}},mixin:function(){var e;if(e=/^mixin +([-\w]+)(?: *\((.*)\))? */.exec(this.input)){this.consume(e[0].length);var n=this.tok("mixin",e[1]);return n.args=e[2],n}},conditional:function(){var e;if(e=/^(if|unless|else if|else)\b([^\n]*)/.exec(this.input)){this.consume(e[0].length);var n=e[1],r=e[2];switch(n){case"if":t(r),r="if ("+r+")";break;case"unless":t(r),r="if (!("+r+"))";break;case"else if":t(r),r="else if ("+r+")";break;case"else":if(r&&r.trim())throw new Error("`else` cannot have a condition, perhaps you meant `else if`");r="else"}return this.tok("code",r)}},"while":function(){var e;return(e=/^while +([^\n]+)/.exec(this.input))?(this.consume(e[0].length),t(e[1]),this.tok("code","while ("+e[1]+")")):void 0},each:function(){var e;if(e=/^(?:- *)?(?:each|for) +([a-zA-Z_$][\w$]*)(?: *, *([a-zA-Z_$][\w$]*))? * in *([^\n]+)/.exec(this.input)){this.consume(e[0].length);var n=this.tok("each",e[1]);return n.key=e[2]||"$index",t(e[3]),n.code=e[3],n}},code:function(){var e;if(e=/^(!?=|-)[ \t]*([^\n]+)/.exec(this.input)){this.consume(e[0].length);var n=e[1];e[1]=e[2];var r=this.tok("code",e[1]);return r.escape="="===n.charAt(0),r.buffer="="===n.charAt(0)||"="===n.charAt(1),r.buffer&&t(e[1]),r}},attrs:function(){if("("==this.input.charAt(0)){var e=this.bracketExpression().end,n=this.input.substr(1,e-1),o=this.tok("attrs");r(n);var a="",s=function(e){return e.replace(/(\\)?#\{(.+)/g,function(e,n,r){if(n)return e;try{var o=i.parseMax(r);return"}"!==r[o.end]?e.substr(0,2)+s(e.substr(2)):(t(o.src),a+" + ("+o.src+") + "+a+s(r.substr(o.end+1)))}catch(u){return e.substr(0,2)+s(e.substr(2))}})};this.consume(e+1),o.attrs=[];for(var u=!0,c="",l="",f="",p=i.defaultState(),h="key",d=function(e){if(""===c.trim())return!1;if(e===n.length)return!0;if("key"===h){if(" "===n[e]||"\n"===n[e])for(var t=e;t<n.length;t++)if(" "!=n[t]&&"\n"!=n[t])return"="===n[t]||"!"===n[t]||","===n[t]?!1:!0;return","===n[e]}if("value"===h&&!p.isNesting())try{if(Function("","return ("+l+");")," "===n[e]||"\n"===n[e])for(var t=e;t<n.length;t++)if(" "!=n[t]&&"\n"!=n[t])return i.isPunctuator(n[t])&&'"'!=n[t]&&"'"!=n[t]?!1:!0;return","===n[e]}catch(r){return!1}},m=0;m<=n.length;m++)if(d(m))l=l.trim(),l&&t(l),c=c.trim(),c=c.replace(/^['"]|['"]$/g,""),o.attrs.push({name:c,val:""==l?!0:l,escaped:u}),c=l="",h="key",u=!1;else switch(h){case"key-char":if(n[m]===a){if(h="key",m+1<n.length&&-1===[" ",",","!","=","\n"].indexOf(n[m+1]))throw new Error("Unexpected character "+n[m+1]+" expected ` `, `\\n`, `,`, `!` or `=`")}else"key-char"===h&&(c+=n[m]);break;case"key":if(""!==c||'"'!==n[m]&&"'"!==n[m])if("!"===n[m]||"="===n[m]){if(u="!"!==n[m],"!"===n[m]&&m++,"="!==n[m])throw new Error("Unexpected character "+n[m]+" expected `=`");h="value",p=i.defaultState()}else c+=n[m];else h="key-char",a=n[m];break;case"value":p=i.parseChar(n[m],p),p.isString()?(h="string",a=n[m],f=n[m]):l+=n[m];break;case"string":p=i.parseChar(n[m],p),f+=n[m],p.isString()||(h="value",l+=s(f))}return"/"==this.input.charAt(0)&&(this.consume(1),o.selfClosing=!0),o}},attributesBlock:function(){if(/^&attributes\b/.test(this.input)){this.consume(11);var e=this.bracketExpression();return this.consume(e.end+1),this.tok("&attributes",e.src)}},indent:function(){var e,n;if(this.indentRe?e=this.indentRe.exec(this.input):(n=/^\n(\t*) */,e=n.exec(this.input),e&&!e[1].length&&(n=/^\n( *)/,e=n.exec(this.input)),e&&e[1].length&&(this.indentRe=n)),e){var t,r=e[1].length;if(++this.lineno,this.consume(r+1)," "==this.input[0]||" "==this.input[0])throw new Error("Invalid indentation, you can use tabs or spaces but not both");if("\n"==this.input[0])return this.tok("newline");if(this.indentStack.length&&r<this.indentStack[0]){for(;this.indentStack.length&&this.indentStack[0]>r;)this.stash.push(this.tok("outdent")),this.indentStack.shift();t=this.stash.pop()}else r&&r!=this.indentStack[0]?(this.indentStack.unshift(r),t=this.tok("indent",r)):t=this.tok("newline");return t}},pipelessText:function(){if(this.pipeless){if("\n"==this.input[0])return;var e=this.input.indexOf("\n");-1==e&&(e=this.input.length);var n=this.input.substr(0,e);return this.consume(n.length),this.tok("text",n)}},colon:function(){return this.scan(/^: */,":")},fail:function(){if(/^ ($|\n)/.test(this.input))return this.consume(1),this.next();throw new Error("unexpected text "+this.input.substr(0,5))},advance:function(){return this.stashed()||this.next()},next:function(){return this.deferred()||this.blank()||this.eos()||this.pipelessText()||this.yield()||this.doctype()||this.interpolation()||this["case"]()||this.when()||this["default"]()||this["extends"]()||this.append()||this.prepend()||this.block()||this.mixinBlock()||this.include()||this.includeFiltered()||this.mixin()||this.call()||this.conditional()||this.each()||this["while"]()||this.tag()||this.filter()||this.code()||this.id()||this.className()||this.attrs()||this.attributesBlock()||this.indent()||this.text()||this.comment()||this.colon()||this.dot()||this.textFail()||this.fail()}}},{"./utils":26,"character-parser":33}],7:[function(e,n){"use strict";var t=e("./node"),r=(e("./block"),n.exports=function(){this.attributeNames=[],this.attrs=[],this.attributeBlocks=[]});r.prototype=Object.create(t.prototype),r.prototype.constructor=r,r.prototype.type="Attrs",r.prototype.setAttribute=function(e,n,t){if(this.attributeNames=this.attributeNames||[],"class"!==e&&-1!==this.attributeNames.indexOf(e))throw new Error('Duplicate attribute "'+e+'" is not allowed.');return this.attributeNames.push(e),this.attrs.push({name:e,val:n,escaped:t}),this},r.prototype.removeAttribute=function(e){for(var n=0,t=this.attrs.length;t>n;++n)this.attrs[n]&&this.attrs[n].name==e&&delete this.attrs[n]},r.prototype.getAttribute=function(e){for(var n=0,t=this.attrs.length;t>n;++n)if(this.attrs[n]&&this.attrs[n].name==e)return this.attrs[n].val},r.prototype.addAttributes=function(e){this.attributeBlocks.push(e)}},{"./block":9,"./node":20}],8:[function(e,n){"use strict";var t=e("./node"),r=n.exports=function(e,n,t){this.block=n,this.val=e,this.buffer=t};r.prototype=Object.create(t.prototype),r.prototype.constructor=r,r.prototype.type="BlockComment"},{"./node":20}],9:[function(e,n){"use strict";var t=e("./node"),r=n.exports=function(e){this.nodes=[],e&&this.push(e)};r.prototype=Object.create(t.prototype),r.prototype.constructor=r,r.prototype.type="Block",r.prototype.isBlock=!0,r.prototype.replace=function(e){e.nodes=this.nodes},r.prototype.push=function(e){return this.nodes.push(e)},r.prototype.isEmpty=function(){return 0==this.nodes.length},r.prototype.unshift=function(e){return this.nodes.unshift(e)},r.prototype.includeBlock=function(){for(var e,n=this,t=0,r=this.nodes.length;r>t;++t){if(e=this.nodes[t],e.yield)return e;if(!e.textOnly&&(e.includeBlock?n=e.includeBlock():e.block&&!e.block.isEmpty()&&(n=e.block.includeBlock()),n.yield))return n}return n},r.prototype.clone=function(){for(var e=new r,n=0,t=this.nodes.length;t>n;++n)e.push(this.nodes[n].clone());return e}},{"./node":20}],10:[function(e,n,t){"use strict";var r=e("./node"),i=t=n.exports=function(e,n){this.expr=e,this.block=n};i.prototype=Object.create(r.prototype),i.prototype.constructor=i,i.prototype.type="Case";var o=t.When=function(e,n){this.expr=e,this.block=n,this.debug=!1};o.prototype=Object.create(r.prototype),o.prototype.constructor=o,o.prototype.type="When"},{"./node":20}],11:[function(e,n){"use strict";var t=e("./node"),r=n.exports=function(e,n,t){this.val=e,this.buffer=n,this.escape=t,e.match(/^ *else/)&&(this.debug=!1)};r.prototype=Object.create(t.prototype),r.prototype.constructor=r,r.prototype.type="Code"},{"./node":20}],12:[function(e,n){"use strict";var t=e("./node"),r=n.exports=function(e,n){this.val=e,this.buffer=n};r.prototype=Object.create(t.prototype),r.prototype.constructor=r,r.prototype.type="Comment"},{"./node":20}],13:[function(e,n){"use strict";var t=e("./node"),r=n.exports=function(e){this.val=e};r.prototype=Object.create(t.prototype),r.prototype.constructor=r,r.prototype.type="Doctype"},{"./node":20}],14:[function(e,n){"use strict";var t=e("./node"),r=n.exports=function(e,n,t,r){this.obj=e,this.val=n,this.key=t,this.block=r};r.prototype=Object.create(t.prototype),r.prototype.constructor=r,r.prototype.type="Each"},{"./node":20}],15:[function(e,n){"use strict";var t=e("./node"),r=(e("./block"),n.exports=function(e,n,t){this.name=e,this.block=n,this.attrs=t});r.prototype=Object.create(t.prototype),r.prototype.constructor=r,r.prototype.type="Filter"},{"./block":9,"./node":20}],16:[function(e,n,t){"use strict";t.Node=e("./node"),t.Tag=e("./tag"),t.Code=e("./code"),t.Each=e("./each"),t.Case=e("./case"),t.Text=e("./text"),t.Block=e("./block"),t.MixinBlock=e("./mixin-block"),t.Mixin=e("./mixin"),t.Filter=e("./filter"),t.Comment=e("./comment"),t.Literal=e("./literal"),t.BlockComment=e("./block-comment"),t.Doctype=e("./doctype")},{"./block":9,"./block-comment":8,"./case":10,"./code":11,"./comment":12,"./doctype":13,"./each":14,"./filter":15,"./literal":17,"./mixin":19,"./mixin-block":18,"./node":20,"./tag":21,"./text":22}],17:[function(e,n){"use strict";var t=e("./node"),r=n.exports=function(e){this.str=e};r.prototype=Object.create(t.prototype),r.prototype.constructor=r,r.prototype.type="Literal"},{"./node":20}],18:[function(e,n){"use strict";var t=e("./node"),r=n.exports=function(){};r.prototype=Object.create(t.prototype),r.prototype.constructor=r,r.prototype.type="MixinBlock"},{"./node":20}],19:[function(e,n){"use strict";var t=e("./attrs"),r=n.exports=function(e,n,t,r){this.name=e,this.args=n,this.block=t,this.attrs=[],this.attributeBlocks=[],this.call=r};r.prototype=Object.create(t.prototype),r.prototype.constructor=r,r.prototype.type="Mixin"},{"./attrs":7}],20:[function(e,n){"use strict";var t=n.exports=function(){};t.prototype.clone=function(){return this},t.prototype.type=""},{}],21:[function(e,n){"use strict";var t=e("./attrs"),r=e("./block"),i=e("../inline-tags"),o=n.exports=function(e,n){this.name=e,this.attrs=[],this.attributeBlocks=[],this.block=n||new r};o.prototype=Object.create(t.prototype),o.prototype.constructor=o,o.prototype.type="Tag",o.prototype.clone=function(){var e=new o(this.name,this.block.clone());return e.line=this.line,e.attrs=this.attrs,e.textOnly=this.textOnly,e},o.prototype.isInline=function(){return~i.indexOf(this.name)},o.prototype.canInline=function(){function e(n){return n.isBlock?n.nodes.every(e):n.isText||n.isInline&&n.isInline()}var n=this.block.nodes;if(!n.length)return!0;if(1==n.length)return e(n[0]);if(this.block.nodes.every(e)){for(var t=1,r=n.length;r>t;++t)if(n[t-1].isText&&n[t].isText)return!1;return!0}return!1}},{"../inline-tags":4,"./attrs":7,"./block":9}],22:[function(e,n){"use strict";var t=e("./node"),r=n.exports=function(e){this.val="","string"==typeof e&&(this.val=e)};r.prototype=Object.create(t.prototype),r.prototype.constructor=r,r.prototype.type="Text",r.prototype.isText=!0},{"./node":20}],23:[function(e,n,t){"use strict";var r=e("./lexer"),i=e("./nodes"),o=e("./utils"),a=e("./filters"),s=e("path"),u=e("constantinople"),c=e("character-parser").parseMax,l=(s.extname,t=n.exports=function(e,n,t){this.input=e.replace(/^\uFEFF/,""),this.lexer=new r(this.input),this.filename=n,this.blocks={},this.mixins={},this.options=t,this.contexts=[this],this.inMixin=!1});l.prototype={constructor:l,context:function(e){return e?void this.contexts.push(e):this.contexts.pop()},advance:function(){return this.lexer.advance()},skip:function(e){for(;e--;)this.advance()},peek:function(){return this.lookahead(1)},line:function(){return this.lexer.lineno},lookahead:function(e){return this.lexer.lookahead(e)},parse:function(){var e,n=new i.Block;for(n.line=0,n.filename=this.filename;"eos"!=this.peek().type;)if("newline"==this.peek().type)this.advance();else{var t=this.peek(),r=this.parseExpr();r.filename=this.options.filename,r.line=t.line,n.push(r)}if(e=this.extending){this.context(e);var o=e.parse();this.context();for(var a in this.mixins)o.unshift(this.mixins[a]);return o}return n},expect:function(e){if(this.peek().type===e)return this.advance();throw new Error('expected "'+e+'", but got "'+this.peek().type+'"')},accept:function(e){return this.peek().type===e?this.advance():void 0},parseExpr:function(){switch(this.peek().type){case"tag":return this.parseTag();case"mixin":return this.parseMixin();case"block":return this.parseBlock();case"mixin-block":return this.parseMixinBlock();case"case":return this.parseCase();case"when":return this.parseWhen();case"default":return this.parseDefault();case"extends":return this.parseExtends();case"include":return this.parseInclude();case"doctype":return this.parseDoctype();case"filter":return this.parseFilter();case"comment":return this.parseComment();case"text":return this.parseText();case"each":return this.parseEach();case"code":return this.parseCode();case"call":return this.parseCall();case"interpolation":return this.parseInterpolation();case"yield":this.advance();var e=new i.Block;return e.yield=!0,e;case"id":case"class":var n=this.advance();return this.lexer.defer(this.lexer.tok("tag","div")),this.lexer.defer(n),this.parseExpr();default:throw new Error('unexpected token "'+this.peek().type+'"')}},parseText:function(){var e=this.expect("text"),n=this.parseTextWithInlineTags(e.val);if(1===n.length)return n[0];for(var t=new i.Block,r=0;r<n.length;r++)t.push(n[r]);return t},parseBlockExpansion:function(){return":"==this.peek().type?(this.advance(),new i.Block(this.parseExpr())):this.block()},parseCase:function(){var e=this.expect("case").val,n=new i.Case(e);return n.line=this.line(),n.block=this.block(),n},parseWhen:function(){var e=this.expect("when").val;return new i.Case.When(e,this.parseBlockExpansion())},parseDefault:function(){return this.expect("default"),new i.Case.When("default",this.parseBlockExpansion())},parseCode:function(){var e,n=this.expect("code"),t=new i.Code(n.val,n.buffer,n.escape),r=1;
for(t.line=this.line();this.lookahead(r)&&"newline"==this.lookahead(r).type;)++r;return e="indent"==this.lookahead(r).type,e&&(this.skip(r-1),t.block=this.block()),t},parseComment:function(){var e,n=this.expect("comment");return"indent"==this.peek().type?(this.lexer.pipeless=!0,e=new i.BlockComment(n.val,this.parseTextBlock(),n.buffer),this.lexer.pipeless=!1):e=new i.Comment(n.val,n.buffer),e.line=this.line(),e},parseDoctype:function(){var e=this.expect("doctype"),n=new i.Doctype(e.val);return n.line=this.line(),n},parseFilter:function(){var e,n=this.expect("filter"),t=this.accept("attrs");"indent"==this.peek().type?(this.lexer.pipeless=!0,e=this.parseTextBlock(),this.lexer.pipeless=!1):e=new i.Block;var r={};t&&t.attrs.forEach(function(e){r[e.name]=u.toConstant(e.val)});var o=new i.Filter(n.val,e,r);return o.line=this.line(),o},parseEach:function(){var e=this.expect("each"),n=new i.Each(e.code,e.val,e.key);return n.line=this.line(),n.block=this.block(),"code"==this.peek().type&&"else"==this.peek().val&&(this.advance(),n.alternative=this.block()),n},resolvePath:function(n,t){var r=e("path"),i=r.dirname,o=r.basename,a=r.join;if("/"!==n[0]&&!this.filename)throw new Error('the "filename" option is required to use "'+t+'" with "relative" paths');if("/"===n[0]&&!this.options.basedir)throw new Error('the "basedir" option is required to use "'+t+'" with "absolute" paths');return n=a("/"===n[0]?this.options.basedir:i(this.filename),n),-1===o(n).indexOf(".")&&(n+=".jade"),n},parseExtends:function(){var n=e("fs"),t=this.resolvePath(this.expect("extends").val.trim(),"extends");".jade"!=t.substr(-5)&&(t+=".jade");var r=n.readFileSync(t,"utf8"),o=new this.constructor(r,t,this.options);return o.blocks=this.blocks,o.contexts=this.contexts,this.extending=o,new i.Literal("")},parseBlock:function(){var e=this.expect("block"),n=e.mode,t=e.val.trim();e="indent"==this.peek().type?this.block():new i.Block(new i.Literal(""));var r=this.blocks[t]||{prepended:[],appended:[]};if("replace"===r.mode)return this.blocks[t]=r;var o=r.prepended.concat(e.nodes).concat(r.appended);switch(n){case"append":r.appended=r.parser===this?r.appended.concat(e.nodes):e.nodes.concat(r.appended);break;case"prepend":r.prepended=r.parser===this?e.nodes.concat(r.prepended):r.prepended.concat(e.nodes)}return e.nodes=o,e.appended=r.appended,e.prepended=r.prepended,e.mode=n,e.parser=this,this.blocks[t]=e},parseMixinBlock:function(){this.expect("mixin-block");if(!this.inMixin)throw new Error("Anonymous blocks are not allowed unless they are part of a mixin.");return new i.MixinBlock},parseInclude:function(){var n=e("fs"),t=this.expect("include"),r=this.resolvePath(t.val.trim(),"include");if(t.filter){var s=n.readFileSync(r,"utf8").replace(/\r/g,"");return s=a(t.filter,s,{filename:r}),new i.Literal(s)}if(".jade"!=r.substr(-5)){var s=n.readFileSync(r,"utf8").replace(/\r/g,"");return new i.Literal(s)}var s=n.readFileSync(r,"utf8"),u=new this.constructor(s,r,this.options);u.blocks=o.merge({},this.blocks),u.mixins=this.mixins,this.context(u);var c=u.parse();return this.context(),c.filename=r,"indent"==this.peek().type&&c.includeBlock().push(this.block()),c},parseCall:function(){var e=this.expect("call"),n=e.val,t=e.args,r=new i.Mixin(n,t,new i.Block,!0);return this.tag(r),r.code&&(r.block.push(r.code),r.code=null),r.block.isEmpty()&&(r.block=null),r},parseMixin:function(){var e,n=this.expect("mixin"),t=n.val,r=n.args;return"indent"==this.peek().type?(this.inMixin=!0,e=new i.Mixin(t,r,this.block(),!1),this.mixins[t]=e,this.inMixin=!1,e):new i.Mixin(t,r,null,!0)},parseTextWithInlineTags:function(e){var n=this.line(),t=/(\\)?#\[((?:.|\n)*)$/.exec(e);if(t){if(t[1]){var r=new i.Text(e.substr(0,t.index)+"#[");r.line=n;var o=this.parseTextWithInlineTags(t[2]);return"Text"===o[0].type&&(r.val+=o[0].val,o.shift()),[r].concat(o)}var r=new i.Text(e.substr(0,t.index));r.line=n;var a=[r],o=t[2],s=c(o),u=new l(s.src,this.filename,this.options);return a.push(u.parse()),a.concat(this.parseTextWithInlineTags(o.substr(s.end+1)))}var r=new i.Text(e);return r.line=n,[r]},parseTextBlock:function(){var e=new i.Block;e.line=this.line();var n=this.expect("indent").val;null==this._spaces&&(this._spaces=n);for(var t=Array(n-this._spaces+1).join(" ");"outdent"!=this.peek().type;)switch(this.peek().type){case"newline":this.advance();break;case"indent":this.parseTextBlock(!0).nodes.forEach(function(n){e.push(n)});break;default:var r=this.parseTextWithInlineTags(t+this.advance().val);r.forEach(function(n){e.push(n)})}return n==this._spaces&&(this._spaces=null),this.expect("outdent"),e},block:function(){var e=new i.Block;for(e.line=this.line(),e.filename=this.filename,this.expect("indent");"outdent"!=this.peek().type;)if("newline"==this.peek().type)this.advance();else{var n=this.parseExpr();n.filename=this.filename,e.push(n)}return this.expect("outdent"),e},parseInterpolation:function(){var e=this.advance(),n=new i.Tag(e.val);return n.buffer=!0,this.tag(n)},parseTag:function(){var e=this.advance(),n=new i.Tag(e.val);return n.selfClosing=e.selfClosing,this.tag(n)},tag:function(e){e.line=this.line();var n=!1;e:for(;;)switch(this.peek().type){case"id":case"class":var t=this.advance();e.setAttribute(t.type,"'"+t.val+"'");continue;case"attrs":n&&console.warn("You should not have jade tags with multiple attributes."),n=!0;var t=this.advance(),r=t.attrs;t.selfClosing&&(e.selfClosing=!0);for(var o=0;o<r.length;o++)e.setAttribute(r[o].name,r[o].val,r[o].escaped);continue;case"&attributes":var t=this.advance();e.addAttributes(t.val);break;default:break e}if("dot"==this.peek().type&&(e.textOnly=!0,this.advance()),e.selfClosing&&-1===["newline","outdent","eos"].indexOf(this.peek().type)&&("text"!==this.peek().type||/^\s*$/.text(this.peek().val)))throw new Error(name+" is self closing and should not have content.");switch(this.peek().type){case"text":e.block.push(this.parseText());break;case"code":e.code=this.parseCode();break;case":":this.advance(),e.block=new i.Block,e.block.push(this.parseExpr());break;case"newline":case"indent":case"outdent":case"eos":break;default:throw new Error("Unexpected token `"+this.peek().type+"` expected `text`, `code`, `:`, `newline` or `eos`")}for(;"newline"==this.peek().type;)this.advance();if("indent"==this.peek().type)if(e.textOnly)this.lexer.pipeless=!0,e.block=this.parseTextBlock(),this.lexer.pipeless=!1;else{var a=this.block();if(e.block)for(var o=0,s=a.nodes.length;s>o;++o)e.block.push(a.nodes[o]);else e.block=a}return e}}},{"./filters":3,"./lexer":6,"./nodes":16,"./utils":26,"character-parser":33,constantinople:34,fs:27,path:30}],24:[function(e,n,t){"use strict";function r(e){return null!=e&&""!==e}function i(e){return Array.isArray(e)?e.map(i).filter(r).join(" "):e}t.merge=function o(e,n){if(1===arguments.length){for(var t=e[0],i=1;i<e.length;i++)t=o(t,e[i]);return t}var a=e["class"],s=n["class"];(a||s)&&(a=a||[],s=s||[],Array.isArray(a)||(a=[a]),Array.isArray(s)||(s=[s]),e["class"]=a.concat(s).filter(r));for(var u in n)"class"!=u&&(e[u]=n[u]);return e},t.joinClasses=i,t.cls=function(e,n){for(var r=[],o=0;o<e.length;o++)r.push(n&&n[o]?t.escape(i([e[o]])):i(e[o]));var a=i(r);return a.length?' class="'+a+'"':""},t.attr=function(e,n,r,i){return"boolean"==typeof n||null==n?n?" "+(i?e:e+'="'+e+'"'):"":0==e.indexOf("data")&&"string"!=typeof n?" "+e+"='"+JSON.stringify(n).replace(/'/g,"'")+"'":r?" "+e+'="'+t.escape(n)+'"':" "+e+'="'+n+'"'},t.attrs=function(e,n){var r=[],o=Object.keys(e);if(o.length)for(var a=0;a<o.length;++a){var s=o[a],u=e[s];"class"==s?(u=i(u))&&r.push(" "+s+'="'+u+'"'):r.push(t.attr(s,u,!1,n))}return r.join("")},t.escape=function(e){var n=String(e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""");return n===""+e?e:n},t.rethrow=function a(n,t,r,i){if(!(n instanceof Error))throw n;if(!("undefined"==typeof window&&t||i))throw n.message+=" on line "+r,n;try{i=i||e("fs").readFileSync(t,"utf8")}catch(o){a(n,null,r)}var s=3,u=i.split("\n"),c=Math.max(r-s,0),l=Math.min(u.length,r+s),s=u.slice(c,l).map(function(e,n){var t=n+c+1;return(t==r?" > ":" ")+t+"| "+e}).join("\n");throw n.path=t,n.message=(t||"Jade")+":"+r+"\n"+s+"\n\n"+n.message,n}},{fs:27}],25:[function(e,n){"use strict";n.exports=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"]},{}],26:[function(e,n,t){"use strict";t.merge=function(e,n){for(var t in n)e[t]=n[t];return e}},{}],27:[function(){},{}],28:[function(e,n){n.exports="function"==typeof Object.create?function(e,n){e.super_=n,e.prototype=Object.create(n.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:function(e,n){e.super_=n;var t=function(){};t.prototype=n.prototype,e.prototype=new t,e.prototype.constructor=e}},{}],29:[function(e,n){var t=n.exports={};t.nextTick=function(){var e="undefined"!=typeof window&&window.setImmediate,n="undefined"!=typeof window&&window.postMessage&&window.addEventListener;if(e)return function(e){return window.setImmediate(e)};if(n){var t=[];return window.addEventListener("message",function(e){var n=e.source;if((n===window||null===n)&&"process-tick"===e.data&&(e.stopPropagation(),t.length>0)){var r=t.shift();r()}},!0),function(e){t.push(e),window.postMessage("process-tick","*")}}return function(e){setTimeout(e,0)}}(),t.title="browser",t.browser=!0,t.env={},t.argv=[],t.binding=function(){throw new Error("process.binding is not supported")},t.cwd=function(){return"/"},t.chdir=function(){throw new Error("process.chdir is not supported")}},{}],30:[function(e,n,t){function r(e,n){for(var t=0,r=e.length-1;r>=0;r--){var i=e[r];"."===i?e.splice(r,1):".."===i?(e.splice(r,1),t++):t&&(e.splice(r,1),t--)}if(n)for(;t--;t)e.unshift("..");return e}function i(e,n){if(e.filter)return e.filter(n);for(var t=[],r=0;r<e.length;r++)n(e[r],r,e)&&t.push(e[r]);return t}var o=e("__browserify_process"),a=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,s=function(e){return a.exec(e).slice(1)};t.resolve=function(){for(var e="",n=!1,t=arguments.length-1;t>=-1&&!n;t--){var a=t>=0?arguments[t]:o.cwd();if("string"!=typeof a)throw new TypeError("Arguments to path.resolve must be strings");a&&(e=a+"/"+e,n="/"===a.charAt(0))}return e=r(i(e.split("/"),function(e){return!!e}),!n).join("/"),(n?"/":"")+e||"."},t.normalize=function(e){var n=t.isAbsolute(e),o="/"===u(e,-1);return e=r(i(e.split("/"),function(e){return!!e}),!n).join("/"),e||n||(e="."),e&&o&&(e+="/"),(n?"/":"")+e},t.isAbsolute=function(e){return"/"===e.charAt(0)},t.join=function(){var e=Array.prototype.slice.call(arguments,0);return t.normalize(i(e,function(e){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e}).join("/"))},t.relative=function(e,n){function r(e){for(var n=0;n<e.length&&""===e[n];n++);for(var t=e.length-1;t>=0&&""===e[t];t--);return n>t?[]:e.slice(n,t-n+1)}e=t.resolve(e).substr(1),n=t.resolve(n).substr(1);for(var i=r(e.split("/")),o=r(n.split("/")),a=Math.min(i.length,o.length),s=a,u=0;a>u;u++)if(i[u]!==o[u]){s=u;break}for(var c=[],u=s;u<i.length;u++)c.push("..");return c=c.concat(o.slice(s)),c.join("/")},t.sep="/",t.delimiter=":",t.dirname=function(e){var n=s(e),t=n[0],r=n[1];return t||r?(r&&(r=r.substr(0,r.length-1)),t+r):"."},t.basename=function(e,n){var t=s(e)[2];return n&&t.substr(-1*n.length)===n&&(t=t.substr(0,t.length-n.length)),t},t.extname=function(e){return s(e)[3]};var u="b"==="ab".substr(-1)?function(e,n,t){return e.substr(n,t)}:function(e,n,t){return 0>n&&(n=e.length+n),e.substr(n,t)}},{__browserify_process:29}],31:[function(e,n){n.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},{}],32:[function(e,n,t){function r(e,n){var r={seen:[],stylize:o};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),d(n)?r.showHidden=n:n&&t._extend(r,n),_(r.showHidden)&&(r.showHidden=!1),_(r.depth)&&(r.depth=2),_(r.colors)&&(r.colors=!1),_(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=i),s(r,e,r.depth)}function i(e,n){var t=r.styles[n];return t?"["+r.colors[t][0]+"m"+e+"["+r.colors[t][1]+"m":e}function o(e){return e}function a(e){var n={};return e.forEach(function(e){n[e]=!0}),n}function s(e,n,r){if(e.customInspect&&n&&x(n.inspect)&&n.inspect!==t.inspect&&(!n.constructor||n.constructor.prototype!==n)){var i=n.inspect(r,e);return b(i)||(i=s(e,i,r)),i}var o=u(e,n);if(o)return o;var d=Object.keys(n),m=a(d);if(e.showHidden&&(d=Object.getOwnPropertyNames(n)),S(n)&&(d.indexOf("message")>=0||d.indexOf("description")>=0))return c(n);if(0===d.length){if(x(n)){var v=n.name?": "+n.name:"";return e.stylize("[Function"+v+"]","special")}if(A(n))return e.stylize(RegExp.prototype.toString.call(n),"regexp");if(E(n))return e.stylize(Date.prototype.toString.call(n),"date");if(S(n))return c(n)}var g="",y=!1,_=["{","}"];if(h(n)&&(y=!0,_=["[","]"]),x(n)){var w=n.name?": "+n.name:"";g=" [Function"+w+"]"}if(A(n)&&(g=" "+RegExp.prototype.toString.call(n)),E(n)&&(g=" "+Date.prototype.toUTCString.call(n)),S(n)&&(g=" "+c(n)),0===d.length&&(!y||0==n.length))return _[0]+g+_[1];if(0>r)return A(n)?e.stylize(RegExp.prototype.toString.call(n),"regexp"):e.stylize("[Object]","special");e.seen.push(n);var k;return k=y?l(e,n,r,m,d):d.map(function(t){return f(e,n,r,m,t,y)}),e.seen.pop(),p(k,g,_)}function u(e,n){if(_(n))return e.stylize("undefined","undefined");if(b(n)){var t="'"+JSON.stringify(n).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(t,"string")}return g(n)?e.stylize(""+n,"number"):d(n)?e.stylize(""+n,"boolean"):m(n)?e.stylize("null","null"):void 0}function c(e){return"["+Error.prototype.toString.call(e)+"]"}function l(e,n,t,r,i){for(var o=[],a=0,s=n.length;s>a;++a)o.push(T(n,String(a))?f(e,n,t,r,String(a),!0):"");return i.forEach(function(i){i.match(/^\d+$/)||o.push(f(e,n,t,r,i,!0))}),o}function f(e,n,t,r,i,o){var a,u,c;if(c=Object.getOwnPropertyDescriptor(n,i)||{value:n[i]},c.get?u=c.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):c.set&&(u=e.stylize("[Setter]","special")),T(r,i)||(a="["+i+"]"),u||(e.seen.indexOf(c.value)<0?(u=m(t)?s(e,c.value,null):s(e,c.value,t-1),u.indexOf("\n")>-1&&(u=o?u.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+u.split("\n").map(function(e){return" "+e}).join("\n"))):u=e.stylize("[Circular]","special")),_(a)){if(o&&i.match(/^\d+$/))return u;a=JSON.stringify(""+i),a.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+u}function p(e,n,t){var r=0,i=e.reduce(function(e,n){return r++,n.indexOf("\n")>=0&&r++,e+n.replace(/\u001b\[\d\d?m/g,"").length+1},0);return i>60?t[0]+(""===n?"":n+"\n ")+" "+e.join(",\n ")+" "+t[1]:t[0]+n+" "+e.join(", ")+" "+t[1]}function h(e){return Array.isArray(e)}function d(e){return"boolean"==typeof e}function m(e){return null===e}function v(e){return null==e}function g(e){return"number"==typeof e}function b(e){return"string"==typeof e}function y(e){return"symbol"==typeof e}function _(e){return void 0===e}function A(e){return w(e)&&"[object RegExp]"===C(e)}function w(e){return"object"==typeof e&&null!==e}function E(e){return w(e)&&"[object Date]"===C(e)}function S(e){return w(e)&&("[object Error]"===C(e)||e instanceof Error)}function x(e){return"function"==typeof e}function k(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||"undefined"==typeof e}function C(e){return Object.prototype.toString.call(e)}function D(e){return 10>e?"0"+e.toString(10):e.toString(10)}function F(){var e=new Date,n=[D(e.getHours()),D(e.getMinutes()),D(e.getSeconds())].join(":");return[e.getDate(),R[e.getMonth()],n].join(" ")}function T(e,n){return Object.prototype.hasOwnProperty.call(e,n)}var B=e("__browserify_process"),O="undefined"!=typeof self?self:"undefined"!=typeof window?window:{},$=/%[sdj%]/g;t.format=function(e){if(!b(e)){for(var n=[],t=0;t<arguments.length;t++)n.push(r(arguments[t]));return n.join(" ")}for(var t=1,i=arguments,o=i.length,a=String(e).replace($,function(e){if("%%"===e)return"%";if(t>=o)return e;switch(e){case"%s":return String(i[t++]);case"%d":return Number(i[t++]);case"%j":try{return JSON.stringify(i[t++])}catch(n){return"[Circular]"}default:return e}}),s=i[t];o>t;s=i[++t])a+=m(s)||!w(s)?" "+s:" "+r(s);return a},t.deprecate=function(e,n){function r(){if(!i){if(B.throwDeprecation)throw new Error(n);B.traceDeprecation?console.trace(n):console.error(n),i=!0}return e.apply(this,arguments)}if(_(O.process))return function(){return t.deprecate(e,n).apply(this,arguments)};if(B.noDeprecation===!0)return e;var i=!1;return r};var M,j={};t.debuglog=function(e){if(_(M)&&(M=B.env.NODE_DEBUG||""),e=e.toUpperCase(),!j[e])if(new RegExp("\\b"+e+"\\b","i").test(M)){var n=B.pid;j[e]=function(){var r=t.format.apply(t,arguments);console.error("%s %d: %s",e,n,r)}}else j[e]=function(){};return j[e]},t.inspect=r,r.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},r.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=h,t.isBoolean=d,t.isNull=m,t.isNullOrUndefined=v,t.isNumber=g,t.isString=b,t.isSymbol=y,t.isUndefined=_,t.isRegExp=A,t.isObject=w,t.isDate=E,t.isError=S,t.isFunction=x,t.isPrimitive=k,t.isBuffer=e("./support/isBuffer");var R=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];t.log=function(){console.log("%s - %s",F(),t.format.apply(t,arguments))},t.inherits=e("inherits"),t._extend=function(e,n){if(!n||!w(n))return e;for(var t=Object.keys(n),r=t.length;r--;)e[t[r]]=n[t[r]];return e}},{"./support/isBuffer":31,__browserify_process:29,inherits:28}],33:[function(e,n,t){function r(e,n,r){r=r||{},n=n||t.defaultState();for(var i=r.start||0,o=r.end||e.length,a=i;o>a;){if(n.roundDepth<0||n.curlyDepth<0||n.squareDepth<0)throw new SyntaxError("Mismatched Bracket: "+e[a-1]);t.parseChar(e[a++],n)}return n}function i(e,n){n=n||{};for(var r=n.start||0,i=r,o=t.defaultState();o.roundDepth>=0&&o.curlyDepth>=0&&o.squareDepth>=0;){if(i>=e.length)throw new Error("The end of the string was reached with no closing bracket found.");t.parseChar(e[i++],o)}var a=i-1;return{start:r,end:a,src:e.substring(r,a)}}function o(e,n,r){r=r||{};for(var i=r.includeLineComment||!1,o=r.start||0,a=o,s=t.defaultState();s.isString()||s.regexp||s.blockComment||!i&&s.lineComment||!u(e,n,a);)t.parseChar(e[a++],s);var c=a;return{start:o,end:c,src:e.substring(o,c)}}function a(e,n){if(1!==e.length)throw new Error("Character must be a string of length 1");n=n||t.defaultState();var r=n.blockComment||n.lineComment,i=n.history?n.history[0]:"";return n.lineComment?"\n"===e&&(n.lineComment=!1):n.blockComment?"*"===n.lastChar&&"/"===e&&(n.blockComment=!1):n.singleQuote?"'"!==e||n.escaped?n.escaped="\\"!==e||n.escaped?!1:!0:n.singleQuote=!1:n.doubleQuote?'"'!==e||n.escaped?n.escaped="\\"!==e||n.escaped?!1:!0:n.doubleQuote=!1:n.regexp?"/"!==e||n.escaped?n.escaped="\\"!==e||n.escaped?!1:!0:n.regexp=!1:"/"===i&&"/"===e?(n.history=n.history.substr(1),n.lineComment=!0):"/"===i&&"*"===e?(n.history=n.history.substr(1),n.blockComment=!0):"/"===e&&f(n.history)?n.regexp=!0:"'"===e?n.singleQuote=!0:'"'===e?n.doubleQuote=!0:"("===e?n.roundDepth++:")"===e?n.roundDepth--:"{"===e?n.curlyDepth++:"}"===e?n.curlyDepth--:"["===e?n.squareDepth++:"]"===e&&n.squareDepth--,n.blockComment||n.lineComment||r||(n.history=e+n.history),n}function s(){this.lineComment=!1,this.blockComment=!1,this.singleQuote=!1,this.doubleQuote=!1,this.regexp=!1,this.escaped=!1,this.roundDepth=0,this.curlyDepth=0,this.squareDepth=0,this.history=""}function u(e,n,t){return e.substr(t||0,n.length)===n}function c(e){var n=e.charCodeAt(0);switch(n){case 46:case 40:case 41:case 59:case 44:case 123:case 125:case 91:case 93:case 58:case 63:case 126:case 37:case 38:case 42:case 43:case 45:case 47:case 60:case 62:case 94:case 124:case 33:case 61:return!0;default:return!1}}function l(e){return"if"===e||"in"===e||"do"===e||"var"===e||"for"===e||"new"===e||"try"===e||"let"===e||"this"===e||"else"===e||"case"===e||"void"===e||"with"===e||"enum"===e||"while"===e||"break"===e||"catch"===e||"throw"===e||"const"===e||"yield"===e||"class"===e||"super"===e||"return"===e||"typeof"===e||"delete"===e||"switch"===e||"export"===e||"import"===e||"default"===e||"finally"===e||"extends"===e||"function"===e||"continue"===e||"debugger"===e||"package"===e||"private"===e||"interface"===e||"instanceof"===e||"implements"===e||"protected"===e||"public"===e||"static"===e||"yield"===e||"let"===e}function f(e){return e=e.replace(/^\s*/,""),")"===e[0]?!1:"}"===e[0]?!0:c(e[0])?!0:/^\w+\b/.test(e)&&l(/^\w+\b/.exec(e)[0].split("").reverse().join(""))?!0:!1}t=n.exports=r,t.parse=r,t.parseMax=i,t.parseUntil=o,t.parseChar=a,t.defaultState=function(){return new s},s.prototype.isString=function(){return this.singleQuote||this.doubleQuote},s.prototype.isComment=function(){return this.lineComment||this.blockComment},s.prototype.isNesting=function(){return this.isString()||this.isComment()||this.regexp||this.roundDepth>0||this.curlyDepth>0||this.squareDepth>0},t.isPunctuator=c,t.isKeyword=l},{}],34:[function(e,n){"use strict";function t(e){if(e="("+e+")",a===e)return s;a=e;try{return s=0===i(e).length}catch(n){return s=!1}}function r(e){if(!t(e))throw new Error(JSON.stringify(e)+" is not constant.");return Function("return ("+e+")")()}function i(e){var n=o.parse(e.toString());n.figure_out_scope();var t=n.globals.map(function(e,n){return n});return t}var o=e("uglify-js"),a="(null)",s=!0;n.exports=t,t.isConstant=t,t.toConstant=r},{"uglify-js":45}],35:[function(e,n,t){t.SourceMapGenerator=e("./source-map/source-map-generator").SourceMapGenerator,t.SourceMapConsumer=e("./source-map/source-map-consumer").SourceMapConsumer,t.SourceNode=e("./source-map/source-node").SourceNode},{"./source-map/source-map-consumer":40,"./source-map/source-map-generator":41,"./source-map/source-node":42}],36:[function(e,n){if("function"!=typeof t)var t=e("amdefine")(n,e);t(function(e,n){function t(){this._array=[],this._set={}}var r=e("./util");t.fromArray=function(e,n){for(var r=new t,i=0,o=e.length;o>i;i++)r.add(e[i],n);return r},t.prototype.add=function(e,n){var t=this.has(e),i=this._array.length;(!t||n)&&this._array.push(e),t||(this._set[r.toSetString(e)]=i)},t.prototype.has=function(e){return Object.prototype.hasOwnProperty.call(this._set,r.toSetString(e))},t.prototype.indexOf=function(e){if(this.has(e))return this._set[r.toSetString(e)];throw new Error('"'+e+'" is not in the set.')},t.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)},t.prototype.toArray=function(){return this._array.slice()},n.ArraySet=t})},{"./util":43,amdefine:44}],37:[function(e,n){if("function"!=typeof t)var t=e("amdefine")(n,e);t(function(e,n){function t(e){return 0>e?(-e<<1)+1:(e<<1)+0}function r(e){var n=1===(1&e),t=e>>1;return n?-t:t}var i=e("./base64"),o=5,a=1<<o,s=a-1,u=a;n.encode=function(e){var n,r="",a=t(e);do n=a&s,a>>>=o,a>0&&(n|=u),r+=i.encode(n);while(a>0);return r},n.decode=function(e){var n,t,a=0,c=e.length,l=0,f=0;do{if(a>=c)throw new Error("Expected more digits in base 64 VLQ value.");t=i.decode(e.charAt(a++)),n=!!(t&u),t&=s,l+=t<<f,f+=o}while(n);return{value:r(l),rest:e.slice(a)}}})},{"./base64":38,amdefine:44}],38:[function(e,n){if("function"!=typeof t)var t=e("amdefine")(n,e);t(function(e,n){var t={},r={};"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("").forEach(function(e,n){t[e]=n,r[n]=e}),n.encode=function(e){if(e in r)return r[e];throw new TypeError("Must be between 0 and 63: "+e)},n.decode=function(e){if(e in t)return t[e];throw new TypeError("Not a valid base 64 digit: "+e)}})},{amdefine:44}],39:[function(e,n){if("function"!=typeof t)var t=e("amdefine")(n,e);t(function(e,n){function t(e,n,r,i,o){var a=Math.floor((n-e)/2)+e,s=o(r,i[a],!0);return 0===s?i[a]:s>0?n-a>1?t(a,n,r,i,o):i[a]:a-e>1?t(e,a,r,i,o):0>e?null:i[e]}n.search=function(e,n,r){return n.length>0?t(-1,n.length,e,n,r):null}})},{amdefine:44}],40:[function(e,n){if("function"!=typeof t)var t=e("amdefine")(n,e);t(function(e,n){function t(e){var n=e;"string"==typeof e&&(n=JSON.parse(e.replace(/^\)\]\}'/,"")));var t=r.getArg(n,"version"),i=r.getArg(n,"sources"),a=r.getArg(n,"names",[]),s=r.getArg(n,"sourceRoot",null),u=r.getArg(n,"sourcesContent",null),c=r.getArg(n,"mappings"),l=r.getArg(n,"file",null);if(t!=this._version)throw new Error("Unsupported version: "+t);this._names=o.fromArray(a,!0),this._sources=o.fromArray(i,!0),this.sourceRoot=s,this.sourcesContent=u,this._mappings=c,this.file=l}var r=e("./util"),i=e("./binary-search"),o=e("./array-set").ArraySet,a=e("./base64-vlq");t.fromSourceMap=function(e){var n=Object.create(t.prototype);return n._names=o.fromArray(e._names.toArray(),!0),n._sources=o.fromArray(e._sources.toArray(),!0),n.sourceRoot=e._sourceRoot,n.sourcesContent=e._generateSourcesContent(n._sources.toArray(),n.sourceRoot),n.file=e._file,n.__generatedMappings=e._mappings.slice().sort(r.compareByGeneratedPositions),n.__originalMappings=e._mappings.slice().sort(r.compareByOriginalPositions),n},t.prototype._version=3,Object.defineProperty(t.prototype,"sources",{get:function(){return this._sources.toArray().map(function(e){return this.sourceRoot?r.join(this.sourceRoot,e):e},this)}}),t.prototype.__generatedMappings=null,Object.defineProperty(t.prototype,"_generatedMappings",{get:function(){return this.__generatedMappings||(this.__generatedMappings=[],this.__originalMappings=[],this._parseMappings(this._mappings,this.sourceRoot)),this.__generatedMappings}}),t.prototype.__originalMappings=null,Object.defineProperty(t.prototype,"_originalMappings",{get:function(){return this.__originalMappings||(this.__generatedMappings=[],this.__originalMappings=[],this._parseMappings(this._mappings,this.sourceRoot)),this.__originalMappings}}),t.prototype._parseMappings=function(e){for(var n,t,i=1,o=0,s=0,u=0,c=0,l=0,f=/^[,;]/,p=e;p.length>0;)if(";"===p.charAt(0))i++,p=p.slice(1),o=0;else if(","===p.charAt(0))p=p.slice(1);else{if(n={},n.generatedLine=i,t=a.decode(p),n.generatedColumn=o+t.value,o=n.generatedColumn,p=t.rest,p.length>0&&!f.test(p.charAt(0))){if(t=a.decode(p),n.source=this._sources.at(c+t.value),c+=t.value,p=t.rest,0===p.length||f.test(p.charAt(0)))throw new Error("Found a source, but no line and column");if(t=a.decode(p),n.originalLine=s+t.value,s=n.originalLine,n.originalLine+=1,p=t.rest,0===p.length||f.test(p.charAt(0)))throw new Error("Found a source and line, but no column");t=a.decode(p),n.originalColumn=u+t.value,u=n.originalColumn,p=t.rest,p.length>0&&!f.test(p.charAt(0))&&(t=a.decode(p),n.name=this._names.at(l+t.value),l+=t.value,p=t.rest)}this.__generatedMappings.push(n),"number"==typeof n.originalLine&&this.__originalMappings.push(n)}this.__originalMappings.sort(r.compareByOriginalPositions)},t.prototype._findMapping=function(e,n,t,r,o){if(e[t]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[t]);if(e[r]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[r]);return i.search(e,n,o)},t.prototype.originalPositionFor=function(e){var n={generatedLine:r.getArg(e,"line"),generatedColumn:r.getArg(e,"column")},t=this._findMapping(n,this._generatedMappings,"generatedLine","generatedColumn",r.compareByGeneratedPositions);if(t){var i=r.getArg(t,"source",null);return i&&this.sourceRoot&&(i=r.join(this.sourceRoot,i)),{source:i,line:r.getArg(t,"originalLine",null),column:r.getArg(t,"originalColumn",null),name:r.getArg(t,"name",null)}}return{source:null,line:null,column:null,name:null}},t.prototype.sourceContentFor=function(e){if(!this.sourcesContent)return null;if(this.sourceRoot&&(e=r.relative(this.sourceRoot,e)),this._sources.has(e))return this.sourcesContent[this._sources.indexOf(e)];var n;if(this.sourceRoot&&(n=r.urlParse(this.sourceRoot))){var t=e.replace(/^file:\/\//,"");if("file"==n.scheme&&this._sources.has(t))return this.sourcesContent[this._sources.indexOf(t)];if((!n.path||"/"==n.path)&&this._sources.has("/"+e))return this.sourcesContent[this._sources.indexOf("/"+e)]}throw new Error('"'+e+'" is not in the SourceMap.')},t.prototype.generatedPositionFor=function(e){var n={source:r.getArg(e,"source"),originalLine:r.getArg(e,"line"),originalColumn:r.getArg(e,"column")};this.sourceRoot&&(n.source=r.relative(this.sourceRoot,n.source));var t=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",r.compareByOriginalPositions);return t?{line:r.getArg(t,"generatedLine",null),column:r.getArg(t,"generatedColumn",null)}:{line:null,column:null}},t.GENERATED_ORDER=1,t.ORIGINAL_ORDER=2,t.prototype.eachMapping=function(e,n,i){var o,a=n||null,s=i||t.GENERATED_ORDER;switch(s){case t.GENERATED_ORDER:o=this._generatedMappings;break;case t.ORIGINAL_ORDER:o=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var u=this.sourceRoot;o.map(function(e){var n=e.source;return n&&u&&(n=r.join(u,n)),{source:n,generatedLine:e.generatedLine,generatedColumn:e.generatedColumn,originalLine:e.originalLine,originalColumn:e.originalColumn,name:e.name}}).forEach(e,a)},n.SourceMapConsumer=t})},{"./array-set":36,"./base64-vlq":37,"./binary-search":39,"./util":43,amdefine:44}],41:[function(e,n){if("function"!=typeof t)var t=e("amdefine")(n,e);t(function(e,n){function t(e){this._file=i.getArg(e,"file"),this._sourceRoot=i.getArg(e,"sourceRoot",null),this._sources=new o,this._names=new o,this._mappings=[],this._sourcesContents=null}var r=e("./base64-vlq"),i=e("./util"),o=e("./array-set").ArraySet;t.prototype._version=3,t.fromSourceMap=function(e){var n=e.sourceRoot,r=new t({file:e.file,sourceRoot:n});return e.eachMapping(function(e){var t={generated:{line:e.generatedLine,column:e.generatedColumn}};e.source&&(t.source=e.source,n&&(t.source=i.relative(n,t.source)),t.original={line:e.originalLine,column:e.originalColumn},e.name&&(t.name=e.name)),r.addMapping(t)}),e.sources.forEach(function(n){var t=e.sourceContentFor(n);t&&r.setSourceContent(n,t)}),r},t.prototype.addMapping=function(e){var n=i.getArg(e,"generated"),t=i.getArg(e,"original",null),r=i.getArg(e,"source",null),o=i.getArg(e,"name",null);this._validateMapping(n,t,r,o),r&&!this._sources.has(r)&&this._sources.add(r),o&&!this._names.has(o)&&this._names.add(o),this._mappings.push({generatedLine:n.line,generatedColumn:n.column,originalLine:null!=t&&t.line,originalColumn:null!=t&&t.column,source:r,name:o})},t.prototype.setSourceContent=function(e,n){var t=e;this._sourceRoot&&(t=i.relative(this._sourceRoot,t)),null!==n?(this._sourcesContents||(this._sourcesContents={}),this._sourcesContents[i.toSetString(t)]=n):(delete this._sourcesContents[i.toSetString(t)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))},t.prototype.applySourceMap=function(e,n){n||(n=e.file);var t=this._sourceRoot;t&&(n=i.relative(t,n));var r=new o,a=new o;this._mappings.forEach(function(o){if(o.source===n&&o.originalLine){var s=e.originalPositionFor({line:o.originalLine,column:o.originalColumn});null!==s.source&&(o.source=t?i.relative(t,s.source):s.source,o.originalLine=s.line,o.originalColumn=s.column,null!==s.name&&null!==o.name&&(o.name=s.name))}var u=o.source;u&&!r.has(u)&&r.add(u);var c=o.name;c&&!a.has(c)&&a.add(c)},this),this._sources=r,this._names=a,e.sources.forEach(function(n){var r=e.sourceContentFor(n);r&&(t&&(n=i.relative(t,n)),this.setSourceContent(n,r))},this)},t.prototype._validateMapping=function(e,n,t,r){if(!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0&&!n&&!t&&!r||e&&"line"in e&&"column"in e&&n&&"line"in n&&"column"in n&&e.line>0&&e.column>=0&&n.line>0&&n.column>=0&&t))throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:t,orginal:n,name:r}))
},t.prototype._serializeMappings=function(){var e,n=0,t=1,o=0,a=0,s=0,u=0,c="";this._mappings.sort(i.compareByGeneratedPositions);for(var l=0,f=this._mappings.length;f>l;l++){if(e=this._mappings[l],e.generatedLine!==t)for(n=0;e.generatedLine!==t;)c+=";",t++;else if(l>0){if(!i.compareByGeneratedPositions(e,this._mappings[l-1]))continue;c+=","}c+=r.encode(e.generatedColumn-n),n=e.generatedColumn,e.source&&(c+=r.encode(this._sources.indexOf(e.source)-u),u=this._sources.indexOf(e.source),c+=r.encode(e.originalLine-1-a),a=e.originalLine-1,c+=r.encode(e.originalColumn-o),o=e.originalColumn,e.name&&(c+=r.encode(this._names.indexOf(e.name)-s),s=this._names.indexOf(e.name)))}return c},t.prototype._generateSourcesContent=function(e,n){return e.map(function(e){if(!this._sourcesContents)return null;n&&(e=i.relative(n,e));var t=i.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,t)?this._sourcesContents[t]:null},this)},t.prototype.toJSON=function(){var e={version:this._version,file:this._file,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._sourceRoot&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e},t.prototype.toString=function(){return JSON.stringify(this)},n.SourceMapGenerator=t})},{"./array-set":36,"./base64-vlq":37,"./util":43,amdefine:44}],42:[function(e,n){if("function"!=typeof t)var t=e("amdefine")(n,e);t(function(e,n){function t(e,n,t,r,i){this.children=[],this.sourceContents={},this.line=void 0===e?null:e,this.column=void 0===n?null:n,this.source=void 0===t?null:t,this.name=void 0===i?null:i,null!=r&&this.add(r)}var r=e("./source-map-generator").SourceMapGenerator,i=e("./util");t.fromStringWithSourceMap=function(e,n){function r(e,n){i.add(null===e||void 0===e.source?n:new t(e.originalLine,e.originalColumn,e.source,n,e.name))}var i=new t,o=e.split("\n"),a=1,s=0,u=null;return n.eachMapping(function(e){if(null===u){for(;a<e.generatedLine;)i.add(o.shift()+"\n"),a++;if(s<e.generatedColumn){var n=o[0];i.add(n.substr(0,e.generatedColumn)),o[0]=n.substr(e.generatedColumn),s=e.generatedColumn}}else if(a<e.generatedLine){var t="";do t+=o.shift()+"\n",a++,s=0;while(a<e.generatedLine);if(s<e.generatedColumn){var n=o[0];t+=n.substr(0,e.generatedColumn),o[0]=n.substr(e.generatedColumn),s=e.generatedColumn}r(u,t)}else{var n=o[0],t=n.substr(0,e.generatedColumn-s);o[0]=n.substr(e.generatedColumn-s),s=e.generatedColumn,r(u,t)}u=e},this),r(u,o.join("\n")),n.sources.forEach(function(e){var t=n.sourceContentFor(e);t&&i.setSourceContent(e,t)}),i},t.prototype.add=function(e){if(Array.isArray(e))e.forEach(function(e){this.add(e)},this);else{if(!(e instanceof t||"string"==typeof e))throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);e&&this.children.push(e)}return this},t.prototype.prepend=function(e){if(Array.isArray(e))for(var n=e.length-1;n>=0;n--)this.prepend(e[n]);else{if(!(e instanceof t||"string"==typeof e))throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);this.children.unshift(e)}return this},t.prototype.walk=function(e){for(var n,r=0,i=this.children.length;i>r;r++)n=this.children[r],n instanceof t?n.walk(e):""!==n&&e(n,{source:this.source,line:this.line,column:this.column,name:this.name})},t.prototype.join=function(e){var n,t,r=this.children.length;if(r>0){for(n=[],t=0;r-1>t;t++)n.push(this.children[t]),n.push(e);n.push(this.children[t]),this.children=n}return this},t.prototype.replaceRight=function(e,n){var r=this.children[this.children.length-1];return r instanceof t?r.replaceRight(e,n):"string"==typeof r?this.children[this.children.length-1]=r.replace(e,n):this.children.push("".replace(e,n)),this},t.prototype.setSourceContent=function(e,n){this.sourceContents[i.toSetString(e)]=n},t.prototype.walkSourceContents=function(e){for(var n=0,r=this.children.length;r>n;n++)this.children[n]instanceof t&&this.children[n].walkSourceContents(e);for(var o=Object.keys(this.sourceContents),n=0,r=o.length;r>n;n++)e(i.fromSetString(o[n]),this.sourceContents[o[n]])},t.prototype.toString=function(){var e="";return this.walk(function(n){e+=n}),e},t.prototype.toStringWithSourceMap=function(e){var n={code:"",line:1,column:0},t=new r(e),i=!1,o=null,a=null,s=null,u=null;return this.walk(function(e,r){n.code+=e,null!==r.source&&null!==r.line&&null!==r.column?((o!==r.source||a!==r.line||s!==r.column||u!==r.name)&&t.addMapping({source:r.source,original:{line:r.line,column:r.column},generated:{line:n.line,column:n.column},name:r.name}),o=r.source,a=r.line,s=r.column,u=r.name,i=!0):i&&(t.addMapping({generated:{line:n.line,column:n.column}}),o=null,i=!1),e.split("").forEach(function(e){"\n"===e?(n.line++,n.column=0):n.column++})}),this.walkSourceContents(function(e,n){t.setSourceContent(e,n)}),{code:n.code,map:t}},n.SourceNode=t})},{"./source-map-generator":41,"./util":43,amdefine:44}],43:[function(e,n){if("function"!=typeof t)var t=e("amdefine")(n,e);t(function(e,n){function t(e,n,t){if(n in e)return e[n];if(3===arguments.length)return t;throw new Error('"'+n+'" is a required argument.')}function r(e){var n=e.match(p);return n?{scheme:n[1],auth:n[3],host:n[4],port:n[6],path:n[7]}:null}function i(e){var n=e.scheme+"://";return e.auth&&(n+=e.auth+"@"),e.host&&(n+=e.host),e.port&&(n+=":"+e.port),e.path&&(n+=e.path),n}function o(e,n){var t;return n.match(p)||n.match(h)?n:"/"===n.charAt(0)&&(t=r(e))?(t.path=n,i(t)):e.replace(/\/$/,"")+"/"+n}function a(e){return"$"+e}function s(e){return e.substr(1)}function u(e,n){e=e.replace(/\/$/,"");var t=r(e);return"/"==n.charAt(0)&&t&&"/"==t.path?n.slice(1):0===n.indexOf(e+"/")?n.substr(e.length+1):n}function c(e,n){var t=e||"",r=n||"";return(t>r)-(r>t)}function l(e,n,t){var r;return(r=c(e.source,n.source))?r:(r=e.originalLine-n.originalLine)?r:(r=e.originalColumn-n.originalColumn,r||t?r:(r=c(e.name,n.name))?r:(r=e.generatedLine-n.generatedLine,r?r:e.generatedColumn-n.generatedColumn))}function f(e,n,t){var r;return(r=e.generatedLine-n.generatedLine)?r:(r=e.generatedColumn-n.generatedColumn,r||t?r:(r=c(e.source,n.source))?r:(r=e.originalLine-n.originalLine)?r:(r=e.originalColumn-n.originalColumn,r?r:c(e.name,n.name)))}n.getArg=t;var p=/([\w+\-.]+):\/\/((\w+:\w+)@)?([\w.]+)?(:(\d+))?(\S+)?/,h=/^data:.+\,.+/;n.urlParse=r,n.urlGenerate=i,n.join=o,n.toSetString=a,n.fromSetString=s,n.relative=u,n.compareByOriginalPositions=l,n.compareByGeneratedPositions=f})},{amdefine:44}],44:[function(e,n){function t(n,t){"use strict";function o(e){var n,t;for(n=0;e[n];n+=1)if(t=e[n],"."===t)e.splice(n,1),n-=1;else if(".."===t){if(1===n&&(".."===e[2]||".."===e[0]))break;n>0&&(e.splice(n-1,2),n-=2)}}function a(e,n){var t;return e&&"."===e.charAt(0)&&n&&(t=n.split("/"),t=t.slice(0,t.length-1),t=t.concat(e.split("/")),o(t),e=t.join("/")),e}function s(e){return function(n){return a(n,e)}}function u(e){function n(n){d[e]=n}return n.fromText=function(){throw new Error("amdefine does not implement load.fromText")},n}function c(e,r,o){var a,s,u,c;if(e)s=d[e]={},u={id:e,uri:i,exports:s},a=f(t,s,u,e);else{if(m)throw new Error("amdefine with no module ID cannot be called more than once per file.");m=!0,s=n.exports,u=n,a=f(t,s,u,n.id)}r&&(r=r.map(function(e){return a(e)})),c="function"==typeof o?o.apply(u.exports,r):o,void 0!==c&&(u.exports=c,e&&(d[e]=u.exports))}function l(e,n,t){Array.isArray(e)?(t=n,n=e,e=void 0):"string"!=typeof e&&(t=e,e=n=void 0),n&&!Array.isArray(n)&&(t=n,n=void 0),n||(n=["require","exports","module"]),e?h[e]=[e,n,t]:c(e,n,t)}var f,p,h={},d={},m=!1,v=e("path");return f=function(e,n,t,i){function o(o,a){return"string"==typeof o?p(e,n,t,o,i):(o=o.map(function(r){return p(e,n,t,r,i)}),void r.nextTick(function(){a.apply(null,o)}))}return o.toUrl=function(e){return 0===e.indexOf(".")?a(e,v.dirname(t.filename)):e},o},t=t||function(){return n.require.apply(n,arguments)},p=function(e,n,t,r,i){var o,l,m=r.indexOf("!"),v=r;if(-1===m){if(r=a(r,i),"require"===r)return f(e,n,t,i);if("exports"===r)return n;if("module"===r)return t;if(d.hasOwnProperty(r))return d[r];if(h[r])return c.apply(null,h[r]),d[r];if(e)return e(v);throw new Error("No module with ID: "+r)}return o=r.substring(0,m),r=r.substring(m+1,r.length),l=p(e,n,t,o,i),r=l.normalize?l.normalize(r,s(i)):a(r,i),d[r]?d[r]:(l.load(r,f(e,n,t,i),u(r),{}),d[r])},l.require=function(e){return d[e]?d[e]:h[e]?(c.apply(null,h[e]),d[e]):void 0},l.amd={},l}var r=e("__browserify_process"),i="/../node_modules/uglify-js/node_modules/source-map/node_modules/amdefine/amdefine.js";n.exports=t},{__browserify_process:29,path:30}],45:[function(e,n,t){function r(e){for(var n=Object.create(null),t=0;t<e.length;++t)n[e[t]]=!0;return n}function i(e,n){return Array.prototype.slice.call(e,n||0)}function o(e){return e.split("")}function a(e,n){for(var t=n.length;--t>=0;)if(n[t]==e)return!0;return!1}function s(e,n){for(var t=0,r=n.length;r>t;++t)if(e(n[t]))return n[t]}function u(e,n){if(0>=n)return"";if(1==n)return e;var t=u(e,n>>1);return t+=t,1&n&&(t+=e),t}function c(e,n){Error.call(this,e),this.msg=e,this.defs=n}function l(e,n,t){e===!0&&(e={});var r=e||{};if(t)for(var i in r)r.hasOwnProperty(i)&&!n.hasOwnProperty(i)&&c.croak("`"+i+"` is not a supported option",n);for(var i in n)n.hasOwnProperty(i)&&(r[i]=e&&e.hasOwnProperty(i)?e[i]:n[i]);return r}function f(e,n){for(var t in n)n.hasOwnProperty(t)&&(e[t]=n[t]);return e}function p(){}function h(e,n){e.indexOf(n)<0&&e.push(n)}function d(e,n){return e.replace(/\{(.+?)\}/g,function(e,t){return n[t]})}function m(e,n){for(var t=e.length;--t>=0;)e[t]===n&&e.splice(t,1)}function v(e,n){function t(e,t){for(var r=[],i=0,o=0,a=0;i<e.length&&o<t.length;)r[a++]=n(e[i],t[o])<=0?e[i++]:t[o++];return i<e.length&&r.push.apply(r,e.slice(i)),o<t.length&&r.push.apply(r,t.slice(o)),r}function r(e){if(e.length<=1)return e;var n=Math.floor(e.length/2),i=e.slice(0,n),o=e.slice(n);return i=r(i),o=r(o),t(i,o)}return e.length<2?e.slice():r(e)}function g(e,n){return e.filter(function(e){return n.indexOf(e)<0})}function b(e,n){return e.filter(function(e){return n.indexOf(e)>=0})}function y(e){function n(e){if(1==e.length)return t+="return str === "+JSON.stringify(e[0])+";";t+="switch(str){";for(var n=0;n<e.length;++n)t+="case "+JSON.stringify(e[n])+":";t+="return true}return false;"}e instanceof Array||(e=e.split(" "));var t="",r=[];e:for(var i=0;i<e.length;++i){for(var o=0;o<r.length;++o)if(r[o][0].length==e[i].length){r[o].push(e[i]);continue e}r.push([e[i]])}if(r.length>3){r.sort(function(e,n){return n.length-e.length}),t+="switch(str.length){";for(var i=0;i<r.length;++i){var a=r[i];t+="case "+a[0].length+":",n(a)}t+="}"}else n(e);return new Function("str",t)}function _(e,n){for(var t=e.length;--t>=0;)if(!n(e[t]))return!1;return!0}function A(){this._values=Object.create(null),this._size=0}function w(e,n,t,r){arguments.length<4&&(r=J),n=n?n.split(/\s+/):[];var i=n;r&&r.PROPS&&(n=n.concat(r.PROPS));for(var o="return function AST_"+e+"(props){ if (props) { ",a=n.length;--a>=0;)o+="this."+n[a]+" = props."+n[a]+";";var s=r&&new r;(s&&s.initialize||t&&t.initialize)&&(o+="this.initialize();"),o+="}}";var u=new Function(o)();if(s&&(u.prototype=s,u.BASE=r),r&&r.SUBCLASSES.push(u),u.prototype.CTOR=u,u.PROPS=n||null,u.SELF_PROPS=i,u.SUBCLASSES=[],e&&(u.prototype.TYPE=u.TYPE=e),t)for(a in t)t.hasOwnProperty(a)&&(/^\$/.test(a)?u[a.substr(1)]=t[a]:u.prototype[a]=t[a]);return u.DEFMETHOD=function(e,n){this.prototype[e]=n},u}function E(e,n){e.body instanceof K?e.body._walk(n):e.body.forEach(function(e){e._walk(n)})}function S(e){this.visit=e,this.stack=[]}function x(e){return e>=97&&122>=e||e>=65&&90>=e||e>=170&&Ht.letter.test(String.fromCharCode(e))}function k(e){return e>=48&&57>=e}function C(e){return k(e)||x(e)}function D(e){return Ht.non_spacing_mark.test(e)||Ht.space_combining_mark.test(e)}function F(e){return Ht.connector_punctuation.test(e)}function T(e){return!Bt(e)&&/^[a-z_$][a-z0-9_$]*$/i.test(e)}function B(e){return 36==e||95==e||x(e)}function O(e){var n=e.charCodeAt(0);return B(n)||k(n)||8204==n||8205==n||D(e)||F(e)}function $(e){var n=e.length;if(0==n)return!1;if(!B(e.charCodeAt(0)))return!1;for(;--n>=0;)if(!O(e.charAt(n)))return!1;return!0}function M(e){return Mt.test(e)?parseInt(e.substr(2),16):jt.test(e)?parseInt(e.substr(1),8):Rt.test(e)?parseFloat(e):void 0}function j(e,n,t,r){this.message=e,this.line=n,this.col=t,this.pos=r,this.stack=(new Error).stack}function R(e,n,t,r,i){throw new j(e,t,r,i)}function L(e,n,t){return e.type==n&&(null==t||e.value==t)}function N(e,n,t){function r(){return S.text.charAt(S.pos)}function i(e,n){var t=S.text.charAt(S.pos++);if(e&&!t)throw It;return"\n"==t?(S.newline_before=S.newline_before||!n,++S.line,S.col=0):++S.col,t}function o(e){for(;e-->0;)i()}function a(e){return S.text.substr(S.pos,e.length)==e}function s(e,n){var t=S.text.indexOf(e,S.pos);if(n&&-1==t)throw It;return t}function u(){S.tokline=S.line,S.tokcol=S.col,S.tokpos=S.pos}function c(e,t,r){S.regex_allowed="operator"==e&&!zt(t)||"keyword"==e&&Ot(t)||"punc"==e&&Vt(t),x="punc"==e&&"."==t;var i={type:e,value:t,line:S.tokline,col:S.tokcol,pos:S.tokpos,endpos:S.pos,nlb:S.newline_before,file:n};if(!r){i.comments_before=S.comments_before,S.comments_before=[];for(var o=0,a=i.comments_before.length;a>o;o++)i.nlb=i.nlb||i.comments_before[o].nlb}return S.newline_before=!1,new X(i)}function l(){for(;Nt(r());)i()}function f(e){for(var n,t="",o=0;(n=r())&&e(n,o++);)t+=i();return t}function p(e){R(e,n,S.tokline,S.tokcol,S.tokpos)}function h(e){var n=!1,t=!1,r=!1,i="."==e,o=f(function(o,a){var s=o.charCodeAt(0);switch(s){case 120:case 88:return r?!1:r=!0;case 101:case 69:return r?!0:n?!1:n=t=!0;case 45:return t||0==a&&!e;case 43:return t;case t=!1,46:return i||r||n?!1:i=!0}return C(s)});e&&(o=e+o);var a=M(o);return isNaN(a)?void p("Invalid syntax: "+o):c("num",a)}function d(e){var n=i(!0,e);switch(n.charCodeAt(0)){case 110:return"\n";case 114:return"\r";case 116:return" ";case 98:return"\b";case 118:return"";case 102:return"\f";case 48:return"\x00";case 120:return String.fromCharCode(m(2));case 117:return String.fromCharCode(m(4));case 10:return"";default:return n}}function m(e){for(var n=0;e>0;--e){var t=parseInt(i(!0),16);isNaN(t)&&p("Invalid hex-character pattern in string"),n=n<<4|t}return n}function v(e){var n,t=S.regex_allowed,r=s("\n");return-1==r?(n=S.text.substr(S.pos),S.pos=S.text.length):(n=S.text.substring(S.pos,r),S.pos=r),S.comments_before.push(c(e,n,!0)),S.regex_allowed=t,E()}function g(){for(var e,n,t=!1,o="",a=!1;null!=(e=r());)if(t)"u"!=e&&p("Expecting UnicodeEscapeSequence -- uXXXX"),e=d(),O(e)||p("Unicode char: "+e.charCodeAt(0)+" is not valid in identifier"),o+=e,t=!1;else if("\\"==e)a=t=!0,i();else{if(!O(e))break;o+=i()}return Ft(o)&&a&&(n=o.charCodeAt(0).toString(16).toUpperCase(),o="\\u"+"0000".substr(n.length)+n+o.slice(1)),o}function b(e){function n(e){if(!r())return e;var t=e+r();return Lt(t)?(i(),n(t)):e}return c("operator",n(e||i()))}function y(){switch(i(),r()){case"/":return i(),v("comment1");case"*":return i(),F()}return S.regex_allowed?T(""):b("/")}function _(){return i(),k(r().charCodeAt(0))?h("."):c("punc",".")}function A(){var e=g();return x?c("name",e):Tt(e)?c("atom",e):Ft(e)?Lt(e)?c("operator",e):c("keyword",e):c("name",e)}function w(e,n){return function(t){try{return n(t)}catch(r){if(r!==It)throw r;p(e)}}}function E(e){if(null!=e)return T(e);if(l(),u(),t){if(a("<!--"))return o(4),v("comment3");if(a("-->")&&S.newline_before)return o(3),v("comment4")}var n=r();if(!n)return c("eof");var s=n.charCodeAt(0);switch(s){case 34:case 39:return D();case 46:return _();case 47:return y()}return k(s)?h():Pt(n)?c("punc",i()):$t(n)?b():92==s||B(s)?A():void p("Unexpected character '"+n+"'")}var S={text:e.replace(/\r\n?|[\n\u2028\u2029]/g,"\n").replace(/\uFEFF/g,""),filename:n,pos:0,tokpos:0,line:1,tokline:0,col:0,tokcol:0,newline_before:!1,regex_allowed:!1,comments_before:[]},x=!1,D=w("Unterminated string constant",function(){for(var e=i(),n="";;){var t=i(!0);if("\\"==t){var r=0,o=null;t=f(function(e){if(e>="0"&&"7">=e){if(!o)return o=e,++r;if("3">=o&&2>=r)return++r;if(o>="4"&&1>=r)return++r}return!1}),t=r>0?String.fromCharCode(parseInt(t,8)):d(!0)}else if(t==e)break;n+=t}return c("string",n)}),F=w("Unterminated multiline comment",function(){var e=S.regex_allowed,n=s("*/",!0),t=S.text.substring(S.pos,n),r=t.split("\n"),i=r.length;S.pos=n+2,S.line+=i-1,i>1?S.col=r[i-1].length:S.col+=r[i-1].length,S.col+=2;var o=S.newline_before=S.newline_before||t.indexOf("\n")>=0;return S.comments_before.push(c("comment2",t,!0)),S.regex_allowed=e,S.newline_before=o,E()}),T=w("Unterminated regular expression",function(e){for(var n,t=!1,r=!1;n=i(!0);)if(t)e+="\\"+n,t=!1;else if("["==n)r=!0,e+=n;else if("]"==n&&r)r=!1,e+=n;else{if("/"==n&&!r)break;"\\"==n?t=!0:e+=n}var o=g();return c("regexp",new RegExp(e,o))});return E.context=function(e){return e&&(S=e),S},E}function V(e,n){function t(e,n){return L(H.token,e,n)}function r(){return H.peeked||(H.peeked=H.input())}function i(){return H.prev=H.token,H.peeked?(H.token=H.peeked,H.peeked=null):H.token=H.input(),H.in_directives=H.in_directives&&("string"==H.token.type||t("punc",";")),H.token}function o(){return H.prev}function a(e,n,t,r){var i=H.input.context();R(e,i.filename,null!=n?n:i.tokline,null!=t?t:i.tokcol,null!=r?r:i.tokpos)}function u(e,n){a(n,e.line,e.col)}function c(e){null==e&&(e=H.token),u(e,"Unexpected token: "+e.type+" ("+e.value+")")}function f(e,n){return t(e,n)?i():void u(H.token,"Unexpected token "+H.token.type+" «"+H.token.value+"», expected "+e+" «"+n+"»")}function p(e){return f("punc",e)}function h(){return!n.strict&&(H.token.nlb||t("eof")||t("punc","}"))}function d(){t("punc",";")?i():h()||c()}function m(){p("(");var e=vn(!0);return p(")"),e}function v(e){return function(){var n=H.token,t=e(),r=o();return t.start=n,t.end=r,t}}function g(){(t("operator","/")||t("operator","/="))&&(H.peeked=null,H.token=H.input(H.token.value.substr(1)))}function b(){var e=M(pt);s(function(n){return n.name==e.name},H.labels)&&a("Label "+e.name+" defined twice"),p(":"),H.labels.push(e);var n=I();return H.labels.pop(),n instanceof sn||e.references.forEach(function(n){n instanceof kn&&(n=n.label.start,a("Continue label `"+e.name+"` refers to non-IterationStatement.",n.line,n.col,n.pos))}),new an({body:n,label:e})}function y(e){return new en({body:(e=vn(!0),d(),e)})}function _(e){var n,t=null;h()||(t=M(dt,!0)),null!=t?(n=s(function(e){return e.name==t.name},H.labels),n||a("Undefined label "+t.name),t.thedef=n):0==H.in_loop&&a(e.TYPE+" not inside a loop or switch"),d();var r=new e({label:t});return n&&n.references.push(r),r}function A(){p("(");var e=null;return!t("punc",";")&&(e=t("keyword","var")?(i(),z(!0)):vn(!0,!0),t("operator","in"))?(e instanceof Rn&&e.definitions.length>1&&a("Only one variable declaration allowed in for..in loop"),i(),E(e)):w(e)}function w(e){p(";");var n=t("punc",";")?null:vn(!0);p(";");var r=t("punc",")")?null:vn(!0);return p(")"),new fn({init:e,condition:n,step:r,body:G(I)})}function E(e){var n=e instanceof Rn?e.definitions[0].name:null,t=vn(!0);return p(")"),new pn({init:e,name:n,object:t,body:G(I)})}function S(){var e=m(),n=I(),r=null;return t("keyword","else")&&(i(),r=I()),new Cn({condition:e,body:n,alternative:r})}function x(){p("{");for(var e=[];!t("punc","}");)t("eof")&&c(),e.push(I());return i(),e}function k(){p("{");for(var e,n=[],r=null,a=null;!t("punc","}");)t("eof")&&c(),t("keyword","case")?(a&&(a.end=o()),r=[],a=new Bn({start:(e=H.token,i(),e),expression:vn(!0),body:r}),n.push(a),p(":")):t("keyword","default")?(a&&(a.end=o()),r=[],a=new Tn({start:(e=H.token,i(),p(":"),e),body:r}),n.push(a)):(r||c(),r.push(I()));return a&&(a.end=o()),i(),n}function C(){var e=x(),n=null,r=null;if(t("keyword","catch")){var s=H.token;i(),p("(");var u=M(ft);p(")"),n=new $n({start:s,argname:u,body:x(),end:o()})}if(t("keyword","finally")){var s=H.token;i(),r=new Mn({start:s,body:x(),end:o()})}return n||r||a("Missing catch/finally blocks"),new On({body:e,bcatch:n,bfinally:r})}function D(e,n){for(var r=[];r.push(new Nn({start:H.token,name:M(n?st:at),value:t("operator","=")?(i(),vn(!1,e)):null,end:o()})),t("punc",",");)i();return r}function F(){var e,n=H.token;switch(n.type){case"name":case"keyword":e=$(ht);break;case"num":e=new bt({start:n,end:n,value:n.value});break;case"string":e=new gt({start:n,end:n,value:n.value});break;case"regexp":e=new yt({start:n,end:n,value:n.value});break;case"atom":switch(n.value){case"false":e=new Ct({start:n,end:n});break;case"true":e=new Dt({start:n,end:n});break;case"null":e=new At({start:n,end:n})}}return i(),e}function T(e,n,r){for(var o=!0,a=[];!t("punc",e)&&(o?o=!1:p(","),!n||!t("punc",e));)a.push(t("punc",",")&&r?new St({start:H.token,end:H.token}):vn(!1));return i(),a}function B(){var e=H.token;switch(i(),e.type){case"num":case"string":case"name":case"operator":case"keyword":case"atom":return e.value;default:c()}}function O(){var e=H.token;switch(i(),e.type){case"name":case"operator":case"keyword":case"atom":return e.value;default:c()}}function $(e){var n=H.token.value;return new("this"==n?mt:e)({name:String(n),start:H.token,end:H.token})}function M(e,n){if(!t("name"))return n||a("Name expected"),null;var r=$(e);return i(),r}function j(e,n,t){return"++"!=n&&"--"!=n||P(t)||a("Invalid use of "+n+" operator"),new e({operator:n,expression:t})}function V(e){return on(nn(!0),0,e)}function P(e){return n.strict?e instanceof mt?!1:e instanceof Hn||e instanceof rt:!0}function G(e){++H.in_loop;var n=e();return--H.in_loop,n}n=l(n,{strict:!1,filename:null,toplevel:null,expression:!1,html5_comments:!0});var H={input:"string"==typeof e?N(e,n.filename,n.html5_comments):e,token:null,prev:null,peeked:null,in_function:0,in_directives:!0,in_loop:0,labels:[]};H.token=i();var I=v(function(){var e;switch(g(),H.token.type){case"string":var n=H.in_directives,s=y();return n&&s.body instanceof gt&&!t("punc",",")?new Z({value:s.body.value}):s;case"num":case"regexp":case"operator":case"atom":return y();case"name":return L(r(),"punc",":")?b():y();case"punc":switch(H.token.value){case"{":return new tn({start:H.token,body:x(),end:o()});case"[":case"(":return y();case";":return i(),new rn;default:c()}case"keyword":switch(e=H.token.value,i(),e){case"break":return _(xn);case"continue":return _(kn);case"debugger":return d(),new Q;case"do":return new cn({body:G(I),condition:(f("keyword","while"),e=m(),d(),e)});case"while":return new ln({condition:m(),body:G(I)});case"for":return A();case"function":return q(yn);case"if":return S();case"return":return 0==H.in_function&&a("'return' outside of function"),new wn({value:t("punc",";")?(i(),null):h()?null:(e=vn(!0),d(),e)});case"switch":return new Dn({expression:m(),body:G(k)});case"throw":return H.token.nlb&&a("Illegal newline after 'throw'"),new En({value:(e=vn(!0),d(),e)});case"try":return C();case"var":return e=z(),d(),e;case"const":return e=U(),d(),e;case"with":return new hn({expression:m(),body:I()});default:c()}}}),q=function(e){var n=e===yn,r=t("name")?M(n?ct:lt):null;return n&&!r&&c(),p("("),new e({name:r,argnames:function(e,n){for(;!t("punc",")");)e?e=!1:p(","),n.push(M(ut));return i(),n}(!0,[]),body:function(e,n){++H.in_function,H.in_directives=!0,H.in_loop=0,H.labels=[];var t=x();return--H.in_function,H.in_loop=e,H.labels=n,t}(H.in_loop,H.labels)})},z=function(e){return new Rn({start:o(),definitions:D(e,!1),end:o()})},U=function(){return new Ln({start:o(),definitions:D(!1,!0),end:o()})},W=function(){var e=H.token;f("operator","new");var n,r=Y(!1);return t("punc","(")?(i(),n=T(")")):n=[],K(new Pn({start:e,expression:r,args:n,end:o()}),!0)},Y=function(e){if(t("operator","new"))return W();var n=H.token;if(t("punc")){switch(n.value){case"(":i();var r=vn(!0);return r.start=n,r.end=H.token,p(")"),K(r,e);case"[":return K(X(),e);case"{":return K(J(),e)}c()}if(t("keyword","function")){i();var a=q(bn);return a.start=n,a.end=o(),K(a,e)}return Xt[H.token.type]?K(F(),e):void c()},X=v(function(){return p("["),new Kn({elements:T("]",!n.strict,!0)})}),J=v(function(){p("{");for(var e=!0,r=[];!t("punc","}")&&(e?e=!1:p(","),n.strict||!t("punc","}"));){var a=H.token,s=a.type,u=B();if("name"==s&&!t("punc",":")){if("get"==u){r.push(new tt({start:a,key:F(),value:q(gn),end:o()}));continue}if("set"==u){r.push(new nt({start:a,key:F(),value:q(gn),end:o()}));continue}}p(":"),r.push(new et({start:a,key:u,value:vn(!1),end:o()}))}return i(),new Qn({properties:r})}),K=function(e,n){var r=e.start;if(t("punc","."))return i(),K(new In({start:r,expression:e,property:O(),end:o()}),n);if(t("punc","[")){i();var a=vn(!0);return p("]"),K(new qn({start:r,expression:e,property:a,end:o()}),n)}return n&&t("punc","(")?(i(),K(new Vn({start:r,expression:e,args:T(")"),end:o()}),!0)):e},nn=function(e){var n=H.token;if(t("operator")&&qt(n.value)){i(),g();var r=j(Un,n.value,nn(e));return r.start=n,r.end=o(),r}for(var a=Y(e);t("operator")&&zt(H.token.value)&&!H.token.nlb;)a=j(Wn,H.token.value,a),a.start=n,a.end=H.token,i();return a},on=function(e,n,r){var o=t("operator")?H.token.value:null;"in"==o&&r&&(o=null);var a=null!=o?Wt[o]:null;if(null!=a&&a>n){i();var s=on(nn(!0),a,r);return on(new Yn({start:e.start,left:e,operator:o,right:s,end:s.end}),n,r)}return e},un=function(e){var n=H.token,o=V(e);if(t("operator","?")){i();var a=vn(!1);return p(":"),new Xn({start:n,condition:o,consequent:a,alternative:vn(!1,e),end:r()})}return o},dn=function(e){var n=H.token,r=un(e),s=H.token.value;if(t("operator")&&Ut(s)){if(P(r))return i(),new Jn({start:n,left:r,operator:s,right:dn(e),end:o()});a("Invalid assignment")}return r},vn=function(e,n){var o=H.token,a=dn(n);return e&&t("punc",",")?(i(),new Gn({start:o,car:a,cdr:vn(!0,n),end:r()})):a};return n.expression?vn(!0):function(){for(var e=H.token,r=[];!t("eof");)r.push(I());var i=o(),a=n.toplevel;return a?(a.body=a.body.concat(r),a.end=i):a=new mn({start:e,body:r,end:i}),a}()}function P(e,n){S.call(this),this.before=e,this.after=n}function G(e,n,t){this.name=t.name,this.orig=[t],this.scope=e,this.references=[],this.global=!1,this.mangled_name=null,this.undeclared=!1,this.constant=!1,this.index=n}function H(e){function n(e,n){return e.replace(/[\u0080-\uffff]/g,function(e){var t=e.charCodeAt(0).toString(16);if(t.length<=2&&!n){for(;t.length<2;)t="0"+t;return"\\x"+t}for(;t.length<4;)t="0"+t;return"\\u"+t})}function t(t){var r=0,i=0;return t=t.replace(/[\\\b\f\n\r\t\x22\x27\u2028\u2029\0]/g,function(e){switch(e){case"\\":return"\\\\";case"\b":return"\\b";case"\f":return"\\f";case"\n":return"\\n";case"\r":return"\\r";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";case'"':return++r,'"';case"'":return++i,"'";case"\x00":return"\\x00"}return e}),e.ascii_only&&(t=n(t)),r>i?"'"+t.replace(/\x27/g,"\\'")+"'":'"'+t.replace(/\x22/g,'\\"')+'"'}function r(n){var r=t(n);return e.inline_script&&(r=r.replace(/<\x2fscript([>\/\t\n\f\r ])/gi,"<\\/script$1")),r}function i(t){return t=t.toString(),e.ascii_only&&(t=n(t,!0)),t}function o(n){return u(" ",e.indent_start+A-n*e.indent_level)}function a(){return D.charAt(D.length-1)}function s(){e.max_line_len&&w>e.max_line_len&&c("\n")}function c(n){n=String(n);var t=n.charAt(0);if(C&&(t&&!(";}".indexOf(t)<0)||/[;]$/.test(D)||(e.semicolons||F(t)?(x+=";",w++,S++):(x+="\n",S++,E++,w=0),e.beautify||(k=!1)),C=!1,s()),!e.beautify&&e.preserve_line&&L[L.length-1])for(var r=L[L.length-1].start.line;r>E;)x+="\n",S++,E++,w=0,k=!1;if(k){var i=a();(O(i)&&(O(t)||"\\"==t)||/^[\+\-\/]$/.test(t)&&t==i)&&(x+=" ",w++,S++),k=!1}var o=n.split(/\r?\n/),u=o.length-1;E+=u,0==u?w+=o[u].length:w=o[u].length,S+=n.length,D=n,x+=n}function f(){C=!1,c(";")}function h(){return A+e.indent_level}function d(e){var n;return c("{"),M(),$(h(),function(){n=e()}),B(),c("}"),n}function m(e){c("(");var n=e();return c(")"),n}function v(e){c("[");var n=e();return c("]"),n}function g(){c(","),T()}function b(){c(":"),e.space_colon&&T()}function _(){return x}e=l(e,{indent_start:0,indent_level:4,quote_keys:!1,space_colon:!0,ascii_only:!1,inline_script:!1,width:80,max_line_len:32e3,beautify:!1,source_map:null,bracketize:!1,semicolons:!0,comments:!1,preserve_line:!1,screw_ie8:!1,preamble:null},!0);var A=0,w=0,E=1,S=0,x="",k=!1,C=!1,D=null,F=y("( [ + * / - , ."),T=e.beautify?function(){c(" ")}:function(){k=!0},B=e.beautify?function(n){e.beautify&&c(o(n?.5:0))}:p,$=e.beautify?function(e,n){e===!0&&(e=h());var t=A;A=e;var r=n();return A=t,r}:function(e,n){return n()},M=e.beautify?function(){c("\n")}:p,j=e.beautify?function(){c(";")}:function(){C=!0},R=e.source_map?function(n,t){try{n&&e.source_map.add(n.file||"?",E,w,n.line,n.col,t||"name"!=n.type?t:n.value)}catch(r){J.warn("Couldn't figure out mapping for {file}:{line},{col} → {cline},{ccol} [{name}]",{file:n.file,line:n.line,col:n.col,cline:E,ccol:w,name:t||""})}}:p;e.preamble&&c(e.preamble.replace(/\r\n?|[\n\u2028\u2029]|\s*$/g,"\n"));var L=[];return{get:_,toString:_,indent:B,indentation:function(){return A},current_width:function(){return w-A},should_break:function(){return e.width&&this.current_width()>=e.width},newline:M,print:c,space:T,comma:g,colon:b,last:function(){return D},semicolon:j,force_semicolon:f,to_ascii:n,print_name:function(e){c(i(e))},print_string:function(e){c(r(e))},next_indent:h,with_indent:$,with_block:d,with_parens:m,with_square:v,add_mapping:R,option:function(n){return e[n]},line:function(){return E},col:function(){return w},pos:function(){return S},push_node:function(e){L.push(e)},pop_node:function(){return L.pop()},stack:function(){return L},parent:function(e){return L[L.length-2-(e||0)]}}}function I(e,n){return this instanceof I?(P.call(this,this.before,this.after),void(this.options=l(e,{sequences:!n,properties:!n,dead_code:!n,drop_debugger:!n,unsafe:!1,unsafe_comps:!1,conditionals:!n,comparisons:!n,evaluate:!n,booleans:!n,loops:!n,unused:!n,hoist_funs:!n,hoist_vars:!1,if_return:!n,join_vars:!n,cascade:!n,side_effects:!n,pure_getters:!1,pure_funcs:null,negate_iife:!n,screw_ie8:!1,drop_console:!1,warnings:!0,global_defs:{}},!0))):new I(e,n)}function q(e){function n(n,i,o,a,s,u){if(r){var c=r.originalPositionFor({line:a,column:s});n=c.source,a=c.line,s=c.column,u=c.name}t.addMapping({generated:{line:i+e.dest_line_diff,column:o},original:{line:a+e.orig_line_diff,column:s},source:n,name:u})}e=l(e,{file:null,root:null,orig:null,orig_line_diff:0,dest_line_diff:0});var t=new U.SourceMapGenerator({file:e.file,sourceRoot:e.root}),r=e.orig&&new U.SourceMapConsumer(e.orig);return{add:n,get:function(){return t},toString:function(){return t.toString()}}}var z=e("util"),U=e("source-map"),W=t;c.prototype=Object.create(Error.prototype),c.prototype.constructor=c,c.croak=function(e,n){throw new c(e,n)};var Y=function(){function e(e,o,a){function s(){var s=o(e[u],u),f=s instanceof r;return f&&(s=s.v),s instanceof n?(s=s.v,s instanceof t?l.push.apply(l,a?s.v.slice().reverse():s.v):l.push(s)):s!==i&&(s instanceof t?c.push.apply(c,a?s.v.slice().reverse():s.v):c.push(s)),f}var u,c=[],l=[];if(e instanceof Array)if(a){for(u=e.length;--u>=0&&!s(););c.reverse(),l.reverse()}else for(u=0;u<e.length&&!s();++u);else for(u in e)if(e.hasOwnProperty(u)&&s())break;return l.concat(c)}function n(e){this.v=e}function t(e){this.v=e}function r(e){this.v=e}e.at_top=function(e){return new n(e)},e.splice=function(e){return new t(e)},e.last=function(e){return new r(e)};var i=e.skip={};return e}();A.prototype={set:function(e,n){return this.has(e)||++this._size,this._values["$"+e]=n,this},add:function(e,n){return this.has(e)?this.get(e).push(n):this.set(e,[n]),this},get:function(e){return this._values["$"+e]},del:function(e){return this.has(e)&&(--this._size,delete this._values["$"+e]),this},has:function(e){return"$"+e in this._values},each:function(e){for(var n in this._values)e(this._values[n],n.substr(1))},size:function(){return this._size},map:function(e){var n=[];for(var t in this._values)n.push(e(this._values[t],t.substr(1)));return n}};var X=w("Token","type value line col pos endpos nlb comments_before file",{},null),J=w("Node","start end",{clone:function(){return new this.CTOR(this)
},$documentation:"Base class of all AST nodes",$propdoc:{start:"[AST_Token] The first token of this node",end:"[AST_Token] The last token of this node"},_walk:function(e){return e._visit(this)},walk:function(e){return this._walk(e)}},null);J.warn_function=null,J.warn=function(e,n){J.warn_function&&J.warn_function(d(e,n))};var K=w("Statement",null,{$documentation:"Base class of all statements"}),Q=w("Debugger",null,{$documentation:"Represents a debugger statement"},K),Z=w("Directive","value scope",{$documentation:'Represents a directive, like "use strict";',$propdoc:{value:"[string] The value of this directive as a plain string (it's not an AST_String!)",scope:"[AST_Scope/S] The scope that this directive affects"}},K),en=w("SimpleStatement","body",{$documentation:"A statement consisting of an expression, i.e. a = 1 + 2",$propdoc:{body:"[AST_Node] an expression node (should not be instanceof AST_Statement)"},_walk:function(e){return e._visit(this,function(){this.body._walk(e)})}},K),nn=w("Block","body",{$documentation:"A body of statements (usually bracketed)",$propdoc:{body:"[AST_Statement*] an array of statements"},_walk:function(e){return e._visit(this,function(){E(this,e)})}},K),tn=w("BlockStatement",null,{$documentation:"A block statement"},nn),rn=w("EmptyStatement",null,{$documentation:"The empty statement (empty block or simply a semicolon)",_walk:function(e){return e._visit(this)}},K),on=w("StatementWithBody","body",{$documentation:"Base class for all statements that contain one nested body: `For`, `ForIn`, `Do`, `While`, `With`",$propdoc:{body:"[AST_Statement] the body; this should always be present, even if it's an AST_EmptyStatement"},_walk:function(e){return e._visit(this,function(){this.body._walk(e)})}},K),an=w("LabeledStatement","label",{$documentation:"Statement with a label",$propdoc:{label:"[AST_Label] a label definition"},_walk:function(e){return e._visit(this,function(){this.label._walk(e),this.body._walk(e)})}},on),sn=w("IterationStatement",null,{$documentation:"Internal class. All loops inherit from it."},on),un=w("DWLoop","condition",{$documentation:"Base class for do/while statements",$propdoc:{condition:"[AST_Node] the loop condition. Should not be instanceof AST_Statement"},_walk:function(e){return e._visit(this,function(){this.condition._walk(e),this.body._walk(e)})}},sn),cn=w("Do",null,{$documentation:"A `do` statement"},un),ln=w("While",null,{$documentation:"A `while` statement"},un),fn=w("For","init condition step",{$documentation:"A `for` statement",$propdoc:{init:"[AST_Node?] the `for` initialization code, or null if empty",condition:"[AST_Node?] the `for` termination clause, or null if empty",step:"[AST_Node?] the `for` update clause, or null if empty"},_walk:function(e){return e._visit(this,function(){this.init&&this.init._walk(e),this.condition&&this.condition._walk(e),this.step&&this.step._walk(e),this.body._walk(e)})}},sn),pn=w("ForIn","init name object",{$documentation:"A `for ... in` statement",$propdoc:{init:"[AST_Node] the `for/in` initialization code",name:"[AST_SymbolRef?] the loop variable, only if `init` is AST_Var",object:"[AST_Node] the object that we're looping through"},_walk:function(e){return e._visit(this,function(){this.init._walk(e),this.object._walk(e),this.body._walk(e)})}},sn),hn=w("With","expression",{$documentation:"A `with` statement",$propdoc:{expression:"[AST_Node] the `with` expression"},_walk:function(e){return e._visit(this,function(){this.expression._walk(e),this.body._walk(e)})}},on),dn=w("Scope","directives variables functions uses_with uses_eval parent_scope enclosed cname",{$documentation:"Base class for all statements introducing a lexical scope",$propdoc:{directives:"[string*/S] an array of directives declared in this scope",variables:"[Object/S] a map of name -> SymbolDef for all variables/functions defined in this scope",functions:"[Object/S] like `variables`, but only lists function declarations",uses_with:"[boolean/S] tells whether this scope uses the `with` statement",uses_eval:"[boolean/S] tells whether this scope contains a direct call to the global `eval`",parent_scope:"[AST_Scope?/S] link to the parent scope",enclosed:"[SymbolDef*/S] a list of all symbol definitions that are accessed from this scope or any subscopes",cname:"[integer/S] current index for mangling variables (used internally by the mangler)"}},nn),mn=w("Toplevel","globals",{$documentation:"The toplevel scope",$propdoc:{globals:"[Object/S] a map of name -> SymbolDef for all undeclared names"},wrap_enclose:function(e){var n=this,t=[],r=[];e.forEach(function(e){var n=e.split(":");t.push(n[0]),r.push(n[1])});var i="(function("+r.join(",")+"){ '$ORIG'; })("+t.join(",")+")";return i=V(i),i=i.transform(new P(function(e){return e instanceof Z&&"$ORIG"==e.value?Y.splice(n.body):void 0}))},wrap_commonjs:function(e,n){var t=this,r=[];n&&(t.figure_out_scope(),t.walk(new S(function(e){e instanceof ot&&e.definition().global&&(s(function(n){return n.name==e.name},r)||r.push(e))})));var i="(function(exports, global){ global['"+e+"'] = exports; '$ORIG'; '$EXPORTS'; }({}, (function(){return this}())))";return i=V(i),i=i.transform(new P(function(e){if(e instanceof en&&(e=e.body,e instanceof gt))switch(e.getValue()){case"$ORIG":return Y.splice(t.body);case"$EXPORTS":var n=[];return r.forEach(function(e){n.push(new en({body:new Jn({left:new qn({expression:new ht({name:"exports"}),property:new gt({value:e.name})}),operator:"=",right:new ht(e)})}))}),Y.splice(n)}}))}},dn),vn=w("Lambda","name argnames uses_arguments",{$documentation:"Base class for functions",$propdoc:{name:"[AST_SymbolDeclaration?] the name of this function",argnames:"[AST_SymbolFunarg*] array of function arguments",uses_arguments:"[boolean/S] tells whether this function accesses the arguments array"},_walk:function(e){return e._visit(this,function(){this.name&&this.name._walk(e),this.argnames.forEach(function(n){n._walk(e)}),E(this,e)})}},dn),gn=w("Accessor",null,{$documentation:"A setter/getter function. The `name` property is always null."},vn),bn=w("Function",null,{$documentation:"A function expression"},vn),yn=w("Defun",null,{$documentation:"A function definition"},vn),_n=w("Jump",null,{$documentation:"Base class for “jumps” (for now that's `return`, `throw`, `break` and `continue`)"},K),An=w("Exit","value",{$documentation:"Base class for “exits” (`return` and `throw`)",$propdoc:{value:"[AST_Node?] the value returned or thrown by this statement; could be null for AST_Return"},_walk:function(e){return e._visit(this,this.value&&function(){this.value._walk(e)})}},_n),wn=w("Return",null,{$documentation:"A `return` statement"},An),En=w("Throw",null,{$documentation:"A `throw` statement"},An),Sn=w("LoopControl","label",{$documentation:"Base class for loop control statements (`break` and `continue`)",$propdoc:{label:"[AST_LabelRef?] the label, or null if none"},_walk:function(e){return e._visit(this,this.label&&function(){this.label._walk(e)})}},_n),xn=w("Break",null,{$documentation:"A `break` statement"},Sn),kn=w("Continue",null,{$documentation:"A `continue` statement"},Sn),Cn=w("If","condition alternative",{$documentation:"A `if` statement",$propdoc:{condition:"[AST_Node] the `if` condition",alternative:"[AST_Statement?] the `else` part, or null if not present"},_walk:function(e){return e._visit(this,function(){this.condition._walk(e),this.body._walk(e),this.alternative&&this.alternative._walk(e)})}},on),Dn=w("Switch","expression",{$documentation:"A `switch` statement",$propdoc:{expression:"[AST_Node] the `switch` “discriminant”"},_walk:function(e){return e._visit(this,function(){this.expression._walk(e),E(this,e)})}},nn),Fn=w("SwitchBranch",null,{$documentation:"Base class for `switch` branches"},nn),Tn=w("Default",null,{$documentation:"A `default` switch branch"},Fn),Bn=w("Case","expression",{$documentation:"A `case` switch branch",$propdoc:{expression:"[AST_Node] the `case` expression"},_walk:function(e){return e._visit(this,function(){this.expression._walk(e),E(this,e)})}},Fn),On=w("Try","bcatch bfinally",{$documentation:"A `try` statement",$propdoc:{bcatch:"[AST_Catch?] the catch block, or null if not present",bfinally:"[AST_Finally?] the finally block, or null if not present"},_walk:function(e){return e._visit(this,function(){E(this,e),this.bcatch&&this.bcatch._walk(e),this.bfinally&&this.bfinally._walk(e)})}},nn),$n=w("Catch","argname",{$documentation:"A `catch` node; only makes sense as part of a `try` statement",$propdoc:{argname:"[AST_SymbolCatch] symbol for the exception"},_walk:function(e){return e._visit(this,function(){this.argname._walk(e),E(this,e)})}},nn),Mn=w("Finally",null,{$documentation:"A `finally` node; only makes sense as part of a `try` statement"},nn),jn=w("Definitions","definitions",{$documentation:"Base class for `var` or `const` nodes (variable declarations/initializations)",$propdoc:{definitions:"[AST_VarDef*] array of variable definitions"},_walk:function(e){return e._visit(this,function(){this.definitions.forEach(function(n){n._walk(e)})})}},K),Rn=w("Var",null,{$documentation:"A `var` statement"},jn),Ln=w("Const",null,{$documentation:"A `const` statement"},jn),Nn=w("VarDef","name value",{$documentation:"A variable declaration; only appears in a AST_Definitions node",$propdoc:{name:"[AST_SymbolVar|AST_SymbolConst] name of the variable",value:"[AST_Node?] initializer, or null of there's no initializer"},_walk:function(e){return e._visit(this,function(){this.name._walk(e),this.value&&this.value._walk(e)})}}),Vn=w("Call","expression args",{$documentation:"A function call expression",$propdoc:{expression:"[AST_Node] expression to invoke as function",args:"[AST_Node*] array of arguments"},_walk:function(e){return e._visit(this,function(){this.expression._walk(e),this.args.forEach(function(n){n._walk(e)})})}}),Pn=w("New",null,{$documentation:"An object instantiation. Derives from a function call since it has exactly the same properties"},Vn),Gn=w("Seq","car cdr",{$documentation:"A sequence expression (two comma-separated expressions)",$propdoc:{car:"[AST_Node] first element in sequence",cdr:"[AST_Node] second element in sequence"},$cons:function(e,n){var t=new Gn(e);return t.car=e,t.cdr=n,t},$from_array:function(e){if(0==e.length)return null;if(1==e.length)return e[0].clone();for(var n=null,t=e.length;--t>=0;)n=Gn.cons(e[t],n);for(var r=n;r;){if(r.cdr&&!r.cdr.cdr){r.cdr=r.cdr.car;break}r=r.cdr}return n},to_array:function(){for(var e=this,n=[];e;){if(n.push(e.car),e.cdr&&!(e.cdr instanceof Gn)){n.push(e.cdr);break}e=e.cdr}return n},add:function(e){for(var n=this;n;){if(!(n.cdr instanceof Gn)){var t=Gn.cons(n.cdr,e);return n.cdr=t}n=n.cdr}},_walk:function(e){return e._visit(this,function(){this.car._walk(e),this.cdr&&this.cdr._walk(e)})}}),Hn=w("PropAccess","expression property",{$documentation:'Base class for property access expressions, i.e. `a.foo` or `a["foo"]`',$propdoc:{expression:"[AST_Node] the “container” expression",property:"[AST_Node|string] the property to access. For AST_Dot this is always a plain string, while for AST_Sub it's an arbitrary AST_Node"}}),In=w("Dot",null,{$documentation:"A dotted property access expression",_walk:function(e){return e._visit(this,function(){this.expression._walk(e)})}},Hn),qn=w("Sub",null,{$documentation:'Index-style property access, i.e. `a["foo"]`',_walk:function(e){return e._visit(this,function(){this.expression._walk(e),this.property._walk(e)})}},Hn),zn=w("Unary","operator expression",{$documentation:"Base class for unary expressions",$propdoc:{operator:"[string] the operator",expression:"[AST_Node] expression that this unary operator applies to"},_walk:function(e){return e._visit(this,function(){this.expression._walk(e)})}}),Un=w("UnaryPrefix",null,{$documentation:"Unary prefix expression, i.e. `typeof i` or `++i`"},zn),Wn=w("UnaryPostfix",null,{$documentation:"Unary postfix expression, i.e. `i++`"},zn),Yn=w("Binary","left operator right",{$documentation:"Binary expression, i.e. `a + b`",$propdoc:{left:"[AST_Node] left-hand side expression",operator:"[string] the operator",right:"[AST_Node] right-hand side expression"},_walk:function(e){return e._visit(this,function(){this.left._walk(e),this.right._walk(e)})}}),Xn=w("Conditional","condition consequent alternative",{$documentation:"Conditional expression using the ternary operator, i.e. `a ? b : c`",$propdoc:{condition:"[AST_Node]",consequent:"[AST_Node]",alternative:"[AST_Node]"},_walk:function(e){return e._visit(this,function(){this.condition._walk(e),this.consequent._walk(e),this.alternative._walk(e)})}}),Jn=w("Assign",null,{$documentation:"An assignment expression — `a = b + 5`"},Yn),Kn=w("Array","elements",{$documentation:"An array literal",$propdoc:{elements:"[AST_Node*] array of elements"},_walk:function(e){return e._visit(this,function(){this.elements.forEach(function(n){n._walk(e)})})}}),Qn=w("Object","properties",{$documentation:"An object literal",$propdoc:{properties:"[AST_ObjectProperty*] array of properties"},_walk:function(e){return e._visit(this,function(){this.properties.forEach(function(n){n._walk(e)})})}}),Zn=w("ObjectProperty","key value",{$documentation:"Base class for literal object properties",$propdoc:{key:"[string] the property name converted to a string for ObjectKeyVal. For setters and getters this is an arbitrary AST_Node.",value:"[AST_Node] property value. For setters and getters this is an AST_Function."},_walk:function(e){return e._visit(this,function(){this.value._walk(e)})}}),et=w("ObjectKeyVal",null,{$documentation:"A key: value object property"},Zn),nt=w("ObjectSetter",null,{$documentation:"An object setter property"},Zn),tt=w("ObjectGetter",null,{$documentation:"An object getter property"},Zn),rt=w("Symbol","scope name thedef",{$propdoc:{name:"[string] name of this symbol",scope:"[AST_Scope/S] the current scope (not necessarily the definition scope)",thedef:"[SymbolDef/S] the definition of this symbol"},$documentation:"Base class for all symbols"}),it=w("SymbolAccessor",null,{$documentation:"The name of a property accessor (setter/getter function)"},rt),ot=w("SymbolDeclaration","init",{$documentation:"A declaration symbol (symbol in var/const, function name or argument, symbol in catch)",$propdoc:{init:"[AST_Node*/S] array of initializers for this declaration."}},rt),at=w("SymbolVar",null,{$documentation:"Symbol defining a variable"},ot),st=w("SymbolConst",null,{$documentation:"A constant declaration"},ot),ut=w("SymbolFunarg",null,{$documentation:"Symbol naming a function argument"},at),ct=w("SymbolDefun",null,{$documentation:"Symbol defining a function"},ot),lt=w("SymbolLambda",null,{$documentation:"Symbol naming a function expression"},ot),ft=w("SymbolCatch",null,{$documentation:"Symbol naming the exception in catch"},ot),pt=w("Label","references",{$documentation:"Symbol naming a label (declaration)",$propdoc:{references:"[AST_LoopControl*] a list of nodes referring to this label"},initialize:function(){this.references=[],this.thedef=this}},rt),ht=w("SymbolRef",null,{$documentation:"Reference to some symbol (not definition/declaration)"},rt),dt=w("LabelRef",null,{$documentation:"Reference to a label symbol"},rt),mt=w("This",null,{$documentation:"The `this` symbol"},rt),vt=w("Constant",null,{$documentation:"Base class for all constants",getValue:function(){return this.value}}),gt=w("String","value",{$documentation:"A string literal",$propdoc:{value:"[string] the contents of this string"}},vt),bt=w("Number","value",{$documentation:"A number literal",$propdoc:{value:"[number] the numeric value"}},vt),yt=w("RegExp","value",{$documentation:"A regexp literal",$propdoc:{value:"[RegExp] the actual regexp"}},vt),_t=w("Atom",null,{$documentation:"Base class for atoms"},vt),At=w("Null",null,{$documentation:"The `null` atom",value:null},_t),wt=w("NaN",null,{$documentation:"The impossible value",value:0/0},_t),Et=w("Undefined",null,{$documentation:"The `undefined` value",value:void 0},_t),St=w("Hole",null,{$documentation:"A hole in an array",value:void 0},_t),xt=w("Infinity",null,{$documentation:"The `Infinity` value",value:1/0},_t),kt=w("Boolean",null,{$documentation:"Base class for booleans"},_t),Ct=w("False",null,{$documentation:"The `false` atom",value:!1},kt),Dt=w("True",null,{$documentation:"The `true` atom",value:!0},kt);S.prototype={_visit:function(e,n){this.stack.push(e);var t=this.visit(e,n?function(){n.call(e)}:p);return!t&&n&&n.call(e),this.stack.pop(),t},parent:function(e){return this.stack[this.stack.length-2-(e||0)]},push:function(e){this.stack.push(e)},pop:function(){return this.stack.pop()},self:function(){return this.stack[this.stack.length-1]},find_parent:function(e){for(var n=this.stack,t=n.length;--t>=0;){var r=n[t];if(r instanceof e)return r}},has_directive:function(e){return this.find_parent(dn).has_directive(e)},in_boolean_context:function(){for(var e=this.stack,n=e.length,t=e[--n];n>0;){var r=e[--n];if(r instanceof Cn&&r.condition===t||r instanceof Xn&&r.condition===t||r instanceof un&&r.condition===t||r instanceof fn&&r.condition===t||r instanceof Un&&"!"==r.operator&&r.expression===t)return!0;if(!(r instanceof Yn)||"&&"!=r.operator&&"||"!=r.operator)return!1;t=r}},loopcontrol_target:function(e){var n=this.stack;if(e)for(var t=n.length;--t>=0;){var r=n[t];if(r instanceof an&&r.label.name==e.name)return r.body}else for(var t=n.length;--t>=0;){var r=n[t];if(r instanceof Dn||r instanceof sn)return r}}};var Ft="break case catch const continue debugger default delete do else finally for function if in instanceof new return switch throw try typeof var void while with",Tt="false null true",Bt="abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized this throws transient volatile "+Tt+" "+Ft,Ot="return new delete throw else case";Ft=y(Ft),Bt=y(Bt),Ot=y(Ot),Tt=y(Tt);var $t=y(o("+-*&%=<>!?|~^")),Mt=/^0x[0-9a-f]+$/i,jt=/^0[0-7]+$/,Rt=/^\d*\.?\d*(?:e[+-]?\d*(?:\d\.?|\.?\d)\d*)?$/i,Lt=y(["in","instanceof","typeof","new","void","delete","++","--","+","-","!","~","&","|","^","*","/","%",">>","<<",">>>","<",">","<=",">=","==","===","!=","!==","?","=","+=","-=","/=","*=","%=",">>=","<<=",">>>=","|=","^=","&=","&&","||"]),Nt=y(o(" \n\r \f ")),Vt=y(o("[{(,.;:")),Pt=y(o("[]{}(),;:")),Gt=y(o("gmsiy")),Ht={letter:new RegExp("[\\u0041-\\u005A\\u0061-\\u007A\\u00AA\\u00B5\\u00BA\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u0523\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0621-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971\\u0972\\u097B-\\u097F\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C33\\u0C35-\\u0C39\\u0C3D\\u0C58\\u0C59\\u0C60\\u0C61\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D28\\u0D2A-\\u0D39\\u0D3D\\u0D60\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC\\u0EDD\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8B\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10D0-\\u10FA\\u10FC\\u1100-\\u1159\\u115F-\\u11A2\\u11A8-\\u11F9\\u1200-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u1676\\u1681-\\u169A\\u16A0-\\u16EA\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1877\\u1880-\\u18A8\\u18AA\\u1900-\\u191C\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19A9\\u19C1-\\u19C7\\u1A00-\\u1A16\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u2094\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2183\\u2184\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2C6F\\u2C71-\\u2C7D\\u2C80-\\u2CE4\\u2D00-\\u2D25\\u2D30-\\u2D65\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005\\u3006\\u3031-\\u3035\\u303B\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31B7\\u31F0-\\u31FF\\u3400\\u4DB5\\u4E00\\u9FC3\\uA000-\\uA48C\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA65F\\uA662-\\uA66E\\uA67F-\\uA697\\uA717-\\uA71F\\uA722-\\uA788\\uA78B\\uA78C\\uA7FB-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA90A-\\uA925\\uA930-\\uA946\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAC00\\uD7A3\\uF900-\\uFA2D\\uFA30-\\uFA6A\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]"),non_spacing_mark:new RegExp("[\\u0300-\\u036F\\u0483-\\u0487\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u0610-\\u061A\\u064B-\\u065E\\u0670\\u06D6-\\u06DC\\u06DF-\\u06E4\\u06E7\\u06E8\\u06EA-\\u06ED\\u0711\\u0730-\\u074A\\u07A6-\\u07B0\\u07EB-\\u07F3\\u0816-\\u0819\\u081B-\\u0823\\u0825-\\u0827\\u0829-\\u082D\\u0900-\\u0902\\u093C\\u0941-\\u0948\\u094D\\u0951-\\u0955\\u0962\\u0963\\u0981\\u09BC\\u09C1-\\u09C4\\u09CD\\u09E2\\u09E3\\u0A01\\u0A02\\u0A3C\\u0A41\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A70\\u0A71\\u0A75\\u0A81\\u0A82\\u0ABC\\u0AC1-\\u0AC5\\u0AC7\\u0AC8\\u0ACD\\u0AE2\\u0AE3\\u0B01\\u0B3C\\u0B3F\\u0B41-\\u0B44\\u0B4D\\u0B56\\u0B62\\u0B63\\u0B82\\u0BC0\\u0BCD\\u0C3E-\\u0C40\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C62\\u0C63\\u0CBC\\u0CBF\\u0CC6\\u0CCC\\u0CCD\\u0CE2\\u0CE3\\u0D41-\\u0D44\\u0D4D\\u0D62\\u0D63\\u0DCA\\u0DD2-\\u0DD4\\u0DD6\\u0E31\\u0E34-\\u0E3A\\u0E47-\\u0E4E\\u0EB1\\u0EB4-\\u0EB9\\u0EBB\\u0EBC\\u0EC8-\\u0ECD\\u0F18\\u0F19\\u0F35\\u0F37\\u0F39\\u0F71-\\u0F7E\\u0F80-\\u0F84\\u0F86\\u0F87\\u0F90-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u102D-\\u1030\\u1032-\\u1037\\u1039\\u103A\\u103D\\u103E\\u1058\\u1059\\u105E-\\u1060\\u1071-\\u1074\\u1082\\u1085\\u1086\\u108D\\u109D\\u135F\\u1712-\\u1714\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17B7-\\u17BD\\u17C6\\u17C9-\\u17D3\\u17DD\\u180B-\\u180D\\u18A9\\u1920-\\u1922\\u1927\\u1928\\u1932\\u1939-\\u193B\\u1A17\\u1A18\\u1A56\\u1A58-\\u1A5E\\u1A60\\u1A62\\u1A65-\\u1A6C\\u1A73-\\u1A7C\\u1A7F\\u1B00-\\u1B03\\u1B34\\u1B36-\\u1B3A\\u1B3C\\u1B42\\u1B6B-\\u1B73\\u1B80\\u1B81\\u1BA2-\\u1BA5\\u1BA8\\u1BA9\\u1C2C-\\u1C33\\u1C36\\u1C37\\u1CD0-\\u1CD2\\u1CD4-\\u1CE0\\u1CE2-\\u1CE8\\u1CED\\u1DC0-\\u1DE6\\u1DFD-\\u1DFF\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20F0\\u2CEF-\\u2CF1\\u2DE0-\\u2DFF\\u302A-\\u302F\\u3099\\u309A\\uA66F\\uA67C\\uA67D\\uA6F0\\uA6F1\\uA802\\uA806\\uA80B\\uA825\\uA826\\uA8C4\\uA8E0-\\uA8F1\\uA926-\\uA92D\\uA947-\\uA951\\uA980-\\uA982\\uA9B3\\uA9B6-\\uA9B9\\uA9BC\\uAA29-\\uAA2E\\uAA31\\uAA32\\uAA35\\uAA36\\uAA43\\uAA4C\\uAAB0\\uAAB2-\\uAAB4\\uAAB7\\uAAB8\\uAABE\\uAABF\\uAAC1\\uABE5\\uABE8\\uABED\\uFB1E\\uFE00-\\uFE0F\\uFE20-\\uFE26]"),space_combining_mark:new RegExp("[\\u0903\\u093E-\\u0940\\u0949-\\u094C\\u094E\\u0982\\u0983\\u09BE-\\u09C0\\u09C7\\u09C8\\u09CB\\u09CC\\u09D7\\u0A03\\u0A3E-\\u0A40\\u0A83\\u0ABE-\\u0AC0\\u0AC9\\u0ACB\\u0ACC\\u0B02\\u0B03\\u0B3E\\u0B40\\u0B47\\u0B48\\u0B4B\\u0B4C\\u0B57\\u0BBE\\u0BBF\\u0BC1\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCC\\u0BD7\\u0C01-\\u0C03\\u0C41-\\u0C44\\u0C82\\u0C83\\u0CBE\\u0CC0-\\u0CC4\\u0CC7\\u0CC8\\u0CCA\\u0CCB\\u0CD5\\u0CD6\\u0D02\\u0D03\\u0D3E-\\u0D40\\u0D46-\\u0D48\\u0D4A-\\u0D4C\\u0D57\\u0D82\\u0D83\\u0DCF-\\u0DD1\\u0DD8-\\u0DDF\\u0DF2\\u0DF3\\u0F3E\\u0F3F\\u0F7F\\u102B\\u102C\\u1031\\u1038\\u103B\\u103C\\u1056\\u1057\\u1062-\\u1064\\u1067-\\u106D\\u1083\\u1084\\u1087-\\u108C\\u108F\\u109A-\\u109C\\u17B6\\u17BE-\\u17C5\\u17C7\\u17C8\\u1923-\\u1926\\u1929-\\u192B\\u1930\\u1931\\u1933-\\u1938\\u19B0-\\u19C0\\u19C8\\u19C9\\u1A19-\\u1A1B\\u1A55\\u1A57\\u1A61\\u1A63\\u1A64\\u1A6D-\\u1A72\\u1B04\\u1B35\\u1B3B\\u1B3D-\\u1B41\\u1B43\\u1B44\\u1B82\\u1BA1\\u1BA6\\u1BA7\\u1BAA\\u1C24-\\u1C2B\\u1C34\\u1C35\\u1CE1\\u1CF2\\uA823\\uA824\\uA827\\uA880\\uA881\\uA8B4-\\uA8C3\\uA952\\uA953\\uA983\\uA9B4\\uA9B5\\uA9BA\\uA9BB\\uA9BD-\\uA9C0\\uAA2F\\uAA30\\uAA33\\uAA34\\uAA4D\\uAA7B\\uABE3\\uABE4\\uABE6\\uABE7\\uABE9\\uABEA\\uABEC]"),connector_punctuation:new RegExp("[\\u005F\\u203F\\u2040\\u2054\\uFE33\\uFE34\\uFE4D-\\uFE4F\\uFF3F]")};j.prototype.toString=function(){return this.message+" (line: "+this.line+", col: "+this.col+", pos: "+this.pos+")\n\n"+this.stack};var It={},qt=y(["typeof","void","delete","--","++","!","~","-","+"]),zt=y(["--","++"]),Ut=y(["=","+=","-=","/=","*=","%=",">>=","<<=",">>>=","|=","^=","&="]),Wt=function(e,n){for(var t=0;t<e.length;++t)for(var r=e[t],i=0;i<r.length;++i)n[r[i]]=t+1;return n}([["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"]],{}),Yt=r(["for","do","while","switch"]),Xt=r(["atom","num","string","regexp","name"]);P.prototype=new S,function(e){function n(n,t){n.DEFMETHOD("transform",function(n,r){var i,o;return n.push(this),n.before&&(i=n.before(this,t,r)),i===e&&(n.after?(n.stack[n.stack.length-1]=i=this.clone(),t(i,n),o=n.after(i,r),o!==e&&(i=o)):(i=this,t(i,n))),n.pop(),i})}function t(e,n){return Y(e,function(e){return e.transform(n,!0)})}n(J,p),n(an,function(e,n){e.label=e.label.transform(n),e.body=e.body.transform(n)}),n(en,function(e,n){e.body=e.body.transform(n)}),n(nn,function(e,n){e.body=t(e.body,n)}),n(un,function(e,n){e.condition=e.condition.transform(n),e.body=e.body.transform(n)}),n(fn,function(e,n){e.init&&(e.init=e.init.transform(n)),e.condition&&(e.condition=e.condition.transform(n)),e.step&&(e.step=e.step.transform(n)),e.body=e.body.transform(n)}),n(pn,function(e,n){e.init=e.init.transform(n),e.object=e.object.transform(n),e.body=e.body.transform(n)}),n(hn,function(e,n){e.expression=e.expression.transform(n),e.body=e.body.transform(n)}),n(An,function(e,n){e.value&&(e.value=e.value.transform(n))}),n(Sn,function(e,n){e.label&&(e.label=e.label.transform(n))}),n(Cn,function(e,n){e.condition=e.condition.transform(n),e.body=e.body.transform(n),e.alternative&&(e.alternative=e.alternative.transform(n))}),n(Dn,function(e,n){e.expression=e.expression.transform(n),e.body=t(e.body,n)}),n(Bn,function(e,n){e.expression=e.expression.transform(n),e.body=t(e.body,n)}),n(On,function(e,n){e.body=t(e.body,n),e.bcatch&&(e.bcatch=e.bcatch.transform(n)),e.bfinally&&(e.bfinally=e.bfinally.transform(n))}),n($n,function(e,n){e.argname=e.argname.transform(n),e.body=t(e.body,n)}),n(jn,function(e,n){e.definitions=t(e.definitions,n)}),n(Nn,function(e,n){e.name=e.name.transform(n),e.value&&(e.value=e.value.transform(n))}),n(vn,function(e,n){e.name&&(e.name=e.name.transform(n)),e.argnames=t(e.argnames,n),e.body=t(e.body,n)}),n(Vn,function(e,n){e.expression=e.expression.transform(n),e.args=t(e.args,n)}),n(Gn,function(e,n){e.car=e.car.transform(n),e.cdr=e.cdr.transform(n)}),n(In,function(e,n){e.expression=e.expression.transform(n)}),n(qn,function(e,n){e.expression=e.expression.transform(n),e.property=e.property.transform(n)}),n(zn,function(e,n){e.expression=e.expression.transform(n)}),n(Yn,function(e,n){e.left=e.left.transform(n),e.right=e.right.transform(n)}),n(Xn,function(e,n){e.condition=e.condition.transform(n),e.consequent=e.consequent.transform(n),e.alternative=e.alternative.transform(n)}),n(Kn,function(e,n){e.elements=t(e.elements,n)}),n(Qn,function(e,n){e.properties=t(e.properties,n)}),n(Zn,function(e,n){e.value=e.value.transform(n)})}(),G.prototype={unmangleable:function(e){return this.global&&!(e&&e.toplevel)||this.undeclared||!(e&&e.eval)&&(this.scope.uses_eval||this.scope.uses_with)},mangle:function(e){if(!this.mangled_name&&!this.unmangleable(e)){var n=this.scope;!e.screw_ie8&&this.orig[0]instanceof lt&&(n=n.parent_scope),this.mangled_name=n.next_mangled(e,this)}}},mn.DEFMETHOD("figure_out_scope",function(e){e=l(e,{screw_ie8:!1});var n=this,t=n.parent_scope=null,r=null,i=0,o=new S(function(n,a){if(e.screw_ie8&&n instanceof $n){var s=t;return t=new dn(n),t.init_scope_vars(i),t.parent_scope=s,a(),t=s,!0}if(n instanceof dn){n.init_scope_vars(i);var s=n.parent_scope=t,u=r;return r=t=n,++i,a(),--i,t=s,r=u,!0}if(n instanceof Z)return n.scope=t,h(t.directives,n.value),!0;if(n instanceof hn)for(var c=t;c;c=c.parent_scope)c.uses_with=!0;else if(n instanceof rt&&(n.scope=t),n instanceof lt)r.def_function(n);else if(n instanceof ct)(n.scope=r.parent_scope).def_function(n);else if(n instanceof at||n instanceof st){var l=r.def_variable(n);l.constant=n instanceof st,l.init=o.parent().value}else n instanceof ft&&(e.screw_ie8?t:r).def_variable(n)});n.walk(o);var a=null,s=n.globals=new A,o=new S(function(e,t){if(e instanceof vn){var r=a;return a=e,t(),a=r,!0}if(e instanceof ht){var i=e.name,u=e.scope.find_variable(i);if(u)e.thedef=u;else{var c;if(s.has(i)?c=s.get(i):(c=new G(n,s.size(),e),c.undeclared=!0,c.global=!0,s.set(i,c)),e.thedef=c,"eval"==i&&o.parent()instanceof Vn)for(var l=e.scope;l&&!l.uses_eval;l=l.parent_scope)l.uses_eval=!0;a&&"arguments"==i&&(a.uses_arguments=!0)}return e.reference(),!0}});n.walk(o)}),dn.DEFMETHOD("init_scope_vars",function(e){this.directives=[],this.variables=new A,this.functions=new A,this.uses_with=!1,this.uses_eval=!1,this.parent_scope=null,this.enclosed=[],this.cname=-1,this.nesting=e}),dn.DEFMETHOD("strict",function(){return this.has_directive("use strict")}),vn.DEFMETHOD("init_scope_vars",function(){dn.prototype.init_scope_vars.apply(this,arguments),this.uses_arguments=!1}),ht.DEFMETHOD("reference",function(){var e=this.definition();e.references.push(this);for(var n=this.scope;n&&(h(n.enclosed,e),n!==e.scope);)n=n.parent_scope;this.frame=this.scope.nesting-e.scope.nesting}),dn.DEFMETHOD("find_variable",function(e){return e instanceof rt&&(e=e.name),this.variables.get(e)||this.parent_scope&&this.parent_scope.find_variable(e)}),dn.DEFMETHOD("has_directive",function(e){return this.parent_scope&&this.parent_scope.has_directive(e)||(this.directives.indexOf(e)>=0?this:null)}),dn.DEFMETHOD("def_function",function(e){this.functions.set(e.name,this.def_variable(e))
}),dn.DEFMETHOD("def_variable",function(e){var n;return this.variables.has(e.name)?(n=this.variables.get(e.name),n.orig.push(e)):(n=new G(this,this.variables.size(),e),this.variables.set(e.name,n),n.global=!this.parent_scope),e.thedef=n}),dn.DEFMETHOD("next_mangled",function(e){var n=this.enclosed;e:for(;;){var t=Jt(++this.cname);if(T(t)&&!(e.except.indexOf(t)>=0)){for(var r=n.length;--r>=0;){var i=n[r],o=i.mangled_name||i.unmangleable(e)&&i.name;if(t==o)continue e}return t}}}),bn.DEFMETHOD("next_mangled",function(e,n){for(var t=n.orig[0]instanceof ut&&this.name&&this.name.definition();;){var r=vn.prototype.next_mangled.call(this,e,n);if(!t||t.mangled_name!=r)return r}}),dn.DEFMETHOD("references",function(e){return e instanceof rt&&(e=e.definition()),this.enclosed.indexOf(e)<0?null:e}),rt.DEFMETHOD("unmangleable",function(e){return this.definition().unmangleable(e)}),it.DEFMETHOD("unmangleable",function(){return!0}),pt.DEFMETHOD("unmangleable",function(){return!1}),rt.DEFMETHOD("unreferenced",function(){return 0==this.definition().references.length&&!(this.scope.uses_eval||this.scope.uses_with)}),rt.DEFMETHOD("undeclared",function(){return this.definition().undeclared}),dt.DEFMETHOD("undeclared",function(){return!1}),pt.DEFMETHOD("undeclared",function(){return!1}),rt.DEFMETHOD("definition",function(){return this.thedef}),rt.DEFMETHOD("global",function(){return this.definition().global}),mn.DEFMETHOD("_default_mangler_options",function(e){return l(e,{except:[],eval:!1,sort:!1,toplevel:!1,screw_ie8:!1})}),mn.DEFMETHOD("mangle_names",function(e){e=this._default_mangler_options(e);var n=-1,t=[],r=new S(function(i,o){if(i instanceof an){var a=n;return o(),n=a,!0}if(i instanceof dn){var s=(r.parent(),[]);return i.variables.each(function(n){e.except.indexOf(n.name)<0&&s.push(n)}),e.sort&&s.sort(function(e,n){return n.references.length-e.references.length}),void t.push.apply(t,s)}if(i instanceof pt){var u;do u=Jt(++n);while(!T(u));return i.mangled_name=u,!0}});this.walk(r),t.forEach(function(n){n.mangle(e)})}),mn.DEFMETHOD("compute_char_frequency",function(e){e=this._default_mangler_options(e);var n=new S(function(n){n instanceof vt?Jt.consider(n.print_to_string()):n instanceof wn?Jt.consider("return"):n instanceof En?Jt.consider("throw"):n instanceof kn?Jt.consider("continue"):n instanceof xn?Jt.consider("break"):n instanceof Q?Jt.consider("debugger"):n instanceof Z?Jt.consider(n.value):n instanceof ln?Jt.consider("while"):n instanceof cn?Jt.consider("do while"):n instanceof Cn?(Jt.consider("if"),n.alternative&&Jt.consider("else")):n instanceof Rn?Jt.consider("var"):n instanceof Ln?Jt.consider("const"):n instanceof vn?Jt.consider("function"):n instanceof fn?Jt.consider("for"):n instanceof pn?Jt.consider("for in"):n instanceof Dn?Jt.consider("switch"):n instanceof Bn?Jt.consider("case"):n instanceof Tn?Jt.consider("default"):n instanceof hn?Jt.consider("with"):n instanceof nt?Jt.consider("set"+n.key):n instanceof tt?Jt.consider("get"+n.key):n instanceof et?Jt.consider(n.key):n instanceof Pn?Jt.consider("new"):n instanceof mt?Jt.consider("this"):n instanceof On?Jt.consider("try"):n instanceof $n?Jt.consider("catch"):n instanceof Mn?Jt.consider("finally"):n instanceof rt&&n.unmangleable(e)?Jt.consider(n.name):n instanceof zn||n instanceof Yn?Jt.consider(n.operator):n instanceof In&&Jt.consider(n.property)});this.walk(n),Jt.sort()});var Jt=function(){function e(){r=Object.create(null),t=i.split("").map(function(e){return e.charCodeAt(0)}),t.forEach(function(e){r[e]=0})}function n(e){var n="",r=54;do n+=String.fromCharCode(t[e%r]),e=Math.floor(e/r),r=64;while(e>0);return n}var t,r,i="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_0123456789";return n.consider=function(e){for(var n=e.length;--n>=0;){var t=e.charCodeAt(n);t in r&&++r[t]}},n.sort=function(){t=v(t,function(e,n){return k(e)&&!k(n)?1:k(n)&&!k(e)?-1:r[n]-r[e]})},n.reset=e,e(),n.get=function(){return t},n.freq=function(){return r},n}();mn.DEFMETHOD("scope_warnings",function(e){e=l(e,{undeclared:!1,unreferenced:!0,assign_to_global:!0,func_arguments:!0,nested_defuns:!0,eval:!0});var n=new S(function(t){if(e.undeclared&&t instanceof ht&&t.undeclared()&&J.warn("Undeclared symbol: {name} [{file}:{line},{col}]",{name:t.name,file:t.start.file,line:t.start.line,col:t.start.col}),e.assign_to_global){var r=null;t instanceof Jn&&t.left instanceof ht?r=t.left:t instanceof pn&&t.init instanceof ht&&(r=t.init),r&&(r.undeclared()||r.global()&&r.scope!==r.definition().scope)&&J.warn("{msg}: {name} [{file}:{line},{col}]",{msg:r.undeclared()?"Accidental global?":"Assignment to global",name:r.name,file:r.start.file,line:r.start.line,col:r.start.col})}e.eval&&t instanceof ht&&t.undeclared()&&"eval"==t.name&&J.warn("Eval is used [{file}:{line},{col}]",t.start),e.unreferenced&&(t instanceof ot||t instanceof pt)&&t.unreferenced()&&J.warn("{type} {name} is declared but not referenced [{file}:{line},{col}]",{type:t instanceof pt?"Label":"Symbol",name:t.name,file:t.start.file,line:t.start.line,col:t.start.col}),e.func_arguments&&t instanceof vn&&t.uses_arguments&&J.warn("arguments used in function {name} [{file}:{line},{col}]",{name:t.name?t.name.name:"anonymous",file:t.start.file,line:t.start.line,col:t.start.col}),e.nested_defuns&&t instanceof yn&&!(n.parent()instanceof dn)&&J.warn('Function {name} declared in nested statement "{type}" [{file}:{line},{col}]',{name:t.name.name,type:n.parent().TYPE,file:t.start.file,line:t.start.line,col:t.start.col})});this.walk(n)}),function(){function e(e,n){e.DEFMETHOD("_codegen",n)}function n(e,n){e.DEFMETHOD("needs_parens",n)}function t(e){var n=e.parent();return n instanceof zn?!0:n instanceof Yn&&!(n instanceof Jn)?!0:n instanceof Vn&&n.expression===this?!0:n instanceof Xn&&n.condition===this?!0:n instanceof Hn&&n.expression===this?!0:void 0}function r(e,n,t){var r=e.length-1;e.forEach(function(e,i){e instanceof rn||(t.indent(),e.print(t),i==r&&n||(t.newline(),n&&t.newline()))})}function i(e,n){e.length>0?n.with_block(function(){r(e,!1,n)}):n.print("{}")}function o(e,n){if(n.option("bracketize"))return void h(e.body,n);if(!e.body)return n.force_semicolon();if(e.body instanceof cn&&!n.option("screw_ie8"))return void h(e.body,n);for(var t=e.body;;)if(t instanceof Cn){if(!t.alternative)return void h(e.body,n);t=t.alternative}else{if(!(t instanceof on))break;t=t.body}s(e.body,n)}function a(e,n,t){if(t)try{e.walk(new S(function(e){if(e instanceof Yn&&"in"==e.operator)throw n})),e.print(n)}catch(r){if(r!==n)throw r;e.print(n,!0)}else e.print(n)}function s(e,n){n.option("bracketize")?!e||e instanceof rn?n.print("{}"):e instanceof tn?e.print(n):n.with_block(function(){n.indent(),e.print(n),n.newline()}):!e||e instanceof rn?n.force_semicolon():e.print(n)}function u(e){for(var n=e.stack(),t=n.length,r=n[--t],i=n[--t];t>0;){if(i instanceof K&&i.body===r)return!0;if(!(i instanceof Gn&&i.car===r||i instanceof Vn&&i.expression===r&&!(i instanceof Pn)||i instanceof In&&i.expression===r||i instanceof qn&&i.expression===r||i instanceof Xn&&i.condition===r||i instanceof Yn&&i.left===r||i instanceof Wn&&i.expression===r))return!1;r=i,i=n[--t]}}function c(e,n){return 0==e.args.length&&!n.option("beautify")}function l(e){for(var n=e[0],t=n.length,r=1;r<e.length;++r)e[r].length<t&&(n=e[r],t=n.length);return n}function f(e){var n,t=e.toString(10),r=[t.replace(/^0\./,".").replace("e+","e")];return Math.floor(e)===e?(e>=0?r.push("0x"+e.toString(16).toLowerCase(),"0"+e.toString(8)):r.push("-0x"+(-e).toString(16).toLowerCase(),"-0"+(-e).toString(8)),(n=/^(.*?)(0+)$/.exec(e))&&r.push(n[1]+"e"+n[2].length)):(n=/^0?\.(0+)(.*)$/.exec(e))&&r.push(n[2]+"e-"+(n[1].length+n[2].length),t.substr(t.indexOf("."))),l(r)}function h(e,n){return e instanceof tn?void e.print(n):void n.with_block(function(){n.indent(),e.print(n),n.newline()})}function d(e,n){e.DEFMETHOD("add_source_map",function(e){n(this,e)})}function m(e,n){n.add_mapping(e.start)}J.DEFMETHOD("print",function(e,n){function t(){r.add_comments(e),r.add_source_map(e),i(r,e)}var r=this,i=r._codegen;e.push_node(r),n||r.needs_parens(e)?e.with_parens(t):t(),e.pop_node()}),J.DEFMETHOD("print_to_string",function(e){var n=H(e);return this.print(n),n.get()}),J.DEFMETHOD("add_comments",function(e){var n=e.option("comments"),t=this;if(n){var r=t.start;if(r&&!r._comments_dumped){r._comments_dumped=!0;var i=r.comments_before||[];t instanceof An&&t.value&&t.value.start.comments_before&&t.value.start.comments_before.length>0&&(i=i.concat(t.value.start.comments_before),t.value.start.comments_before=[]),n.test?i=i.filter(function(e){return n.test(e.value)}):"function"==typeof n&&(i=i.filter(function(e){return n(t,e)})),i.forEach(function(n){/comment[134]/.test(n.type)?(e.print("//"+n.value+"\n"),e.indent()):"comment2"==n.type&&(e.print("/*"+n.value+"*/"),r.nlb?(e.print("\n"),e.indent()):e.space())})}}}),n(J,function(){return!1}),n(bn,function(e){return u(e)}),n(Qn,function(e){return u(e)}),n(zn,function(e){var n=e.parent();return n instanceof Hn&&n.expression===this}),n(Gn,function(e){var n=e.parent();return n instanceof Vn||n instanceof zn||n instanceof Yn||n instanceof Nn||n instanceof In||n instanceof Kn||n instanceof Zn||n instanceof Xn}),n(Yn,function(e){var n=e.parent();if(n instanceof Vn&&n.expression===this)return!0;if(n instanceof zn)return!0;if(n instanceof Hn&&n.expression===this)return!0;if(n instanceof Yn){var t=n.operator,r=Wt[t],i=this.operator,o=Wt[i];if(r>o||r==o&&this===n.right)return!0}}),n(Hn,function(e){var n=e.parent();if(n instanceof Pn&&n.expression===this)try{this.walk(new S(function(e){if(e instanceof Vn)throw n}))}catch(t){if(t!==n)throw t;return!0}}),n(Vn,function(e){var n,t=e.parent();return t instanceof Pn&&t.expression===this?!0:this.expression instanceof bn&&t instanceof Hn&&t.expression===this&&(n=e.parent(1))instanceof Jn&&n.left===t}),n(Pn,function(e){var n=e.parent();return c(this,e)&&(n instanceof Hn||n instanceof Vn&&n.expression===this)?!0:void 0}),n(bt,function(e){var n=e.parent();return this.getValue()<0&&n instanceof Hn&&n.expression===this?!0:void 0}),n(wt,function(e){var n=e.parent();return n instanceof Hn&&n.expression===this?!0:void 0}),n(Jn,t),n(Xn,t),e(Z,function(e,n){n.print_string(e.value),n.semicolon()}),e(Q,function(e,n){n.print("debugger"),n.semicolon()}),on.DEFMETHOD("_do_print_body",function(e){s(this.body,e)}),e(K,function(e,n){e.body.print(n),n.semicolon()}),e(mn,function(e,n){r(e.body,!0,n),n.print("")}),e(an,function(e,n){e.label.print(n),n.colon(),e.body.print(n)}),e(en,function(e,n){e.body.print(n),n.semicolon()}),e(tn,function(e,n){i(e.body,n)}),e(rn,function(e,n){n.semicolon()}),e(cn,function(e,n){n.print("do"),n.space(),e._do_print_body(n),n.space(),n.print("while"),n.space(),n.with_parens(function(){e.condition.print(n)}),n.semicolon()}),e(ln,function(e,n){n.print("while"),n.space(),n.with_parens(function(){e.condition.print(n)}),n.space(),e._do_print_body(n)}),e(fn,function(e,n){n.print("for"),n.space(),n.with_parens(function(){e.init?(e.init instanceof jn?e.init.print(n):a(e.init,n,!0),n.print(";"),n.space()):n.print(";"),e.condition?(e.condition.print(n),n.print(";"),n.space()):n.print(";"),e.step&&e.step.print(n)}),n.space(),e._do_print_body(n)}),e(pn,function(e,n){n.print("for"),n.space(),n.with_parens(function(){e.init.print(n),n.space(),n.print("in"),n.space(),e.object.print(n)}),n.space(),e._do_print_body(n)}),e(hn,function(e,n){n.print("with"),n.space(),n.with_parens(function(){e.expression.print(n)}),n.space(),e._do_print_body(n)}),vn.DEFMETHOD("_do_print",function(e,n){var t=this;n||e.print("function"),t.name&&(e.space(),t.name.print(e)),e.with_parens(function(){t.argnames.forEach(function(n,t){t&&e.comma(),n.print(e)})}),e.space(),i(t.body,e)}),e(vn,function(e,n){e._do_print(n)}),An.DEFMETHOD("_do_print",function(e,n){e.print(n),this.value&&(e.space(),this.value.print(e)),e.semicolon()}),e(wn,function(e,n){e._do_print(n,"return")}),e(En,function(e,n){e._do_print(n,"throw")}),Sn.DEFMETHOD("_do_print",function(e,n){e.print(n),this.label&&(e.space(),this.label.print(e)),e.semicolon()}),e(xn,function(e,n){e._do_print(n,"break")}),e(kn,function(e,n){e._do_print(n,"continue")}),e(Cn,function(e,n){n.print("if"),n.space(),n.with_parens(function(){e.condition.print(n)}),n.space(),e.alternative?(o(e,n),n.space(),n.print("else"),n.space(),s(e.alternative,n)):e._do_print_body(n)}),e(Dn,function(e,n){n.print("switch"),n.space(),n.with_parens(function(){e.expression.print(n)}),n.space(),e.body.length>0?n.with_block(function(){e.body.forEach(function(e,t){t&&n.newline(),n.indent(!0),e.print(n)})}):n.print("{}")}),Fn.DEFMETHOD("_do_print_body",function(e){this.body.length>0&&(e.newline(),this.body.forEach(function(n){e.indent(),n.print(e),e.newline()}))}),e(Tn,function(e,n){n.print("default:"),e._do_print_body(n)}),e(Bn,function(e,n){n.print("case"),n.space(),e.expression.print(n),n.print(":"),e._do_print_body(n)}),e(On,function(e,n){n.print("try"),n.space(),i(e.body,n),e.bcatch&&(n.space(),e.bcatch.print(n)),e.bfinally&&(n.space(),e.bfinally.print(n))}),e($n,function(e,n){n.print("catch"),n.space(),n.with_parens(function(){e.argname.print(n)}),n.space(),i(e.body,n)}),e(Mn,function(e,n){n.print("finally"),n.space(),i(e.body,n)}),jn.DEFMETHOD("_do_print",function(e,n){e.print(n),e.space(),this.definitions.forEach(function(n,t){t&&e.comma(),n.print(e)});var t=e.parent(),r=t instanceof fn||t instanceof pn,i=r&&t.init===this;i||e.semicolon()}),e(Rn,function(e,n){e._do_print(n,"var")}),e(Ln,function(e,n){e._do_print(n,"const")}),e(Nn,function(e,n){if(e.name.print(n),e.value){n.space(),n.print("="),n.space();var t=n.parent(1),r=t instanceof fn||t instanceof pn;a(e.value,n,r)}}),e(Vn,function(e,n){e.expression.print(n),e instanceof Pn&&c(e,n)||n.with_parens(function(){e.args.forEach(function(e,t){t&&n.comma(),e.print(n)})})}),e(Pn,function(e,n){n.print("new"),n.space(),Vn.prototype._codegen(e,n)}),Gn.DEFMETHOD("_do_print",function(e){this.car.print(e),this.cdr&&(e.comma(),e.should_break()&&(e.newline(),e.indent()),this.cdr.print(e))}),e(Gn,function(e,n){e._do_print(n)}),e(In,function(e,n){var t=e.expression;t.print(n),t instanceof bt&&t.getValue()>=0&&(/[xa-f.]/i.test(n.last())||n.print(".")),n.print("."),n.add_mapping(e.end),n.print_name(e.property)}),e(qn,function(e,n){e.expression.print(n),n.print("["),e.property.print(n),n.print("]")}),e(Un,function(e,n){var t=e.operator;n.print(t),/^[a-z]/i.test(t)&&n.space(),e.expression.print(n)}),e(Wn,function(e,n){e.expression.print(n),n.print(e.operator)}),e(Yn,function(e,n){e.left.print(n),n.space(),n.print(e.operator),"<"==e.operator&&e.right instanceof Un&&"!"==e.right.operator&&e.right.expression instanceof Un&&"--"==e.right.expression.operator?n.print(" "):n.space(),e.right.print(n)}),e(Xn,function(e,n){e.condition.print(n),n.space(),n.print("?"),n.space(),e.consequent.print(n),n.space(),n.colon(),e.alternative.print(n)}),e(Kn,function(e,n){n.with_square(function(){var t=e.elements,r=t.length;r>0&&n.space(),t.forEach(function(e,t){t&&n.comma(),e.print(n),t===r-1&&e instanceof St&&n.comma()}),r>0&&n.space()})}),e(Qn,function(e,n){e.properties.length>0?n.with_block(function(){e.properties.forEach(function(e,t){t&&(n.print(","),n.newline()),n.indent(),e.print(n)}),n.newline()}):n.print("{}")}),e(et,function(e,n){var t=e.key;n.option("quote_keys")?n.print_string(t+""):("number"==typeof t||!n.option("beautify")&&+t+""==t)&&parseFloat(t)>=0?n.print(f(t)):(Bt(t)?n.option("screw_ie8"):$(t))?n.print_name(t):n.print_string(t),n.colon(),e.value.print(n)}),e(nt,function(e,n){n.print("set"),n.space(),e.key.print(n),e.value._do_print(n,!0)}),e(tt,function(e,n){n.print("get"),n.space(),e.key.print(n),e.value._do_print(n,!0)}),e(rt,function(e,n){var t=e.definition();n.print_name(t?t.mangled_name||t.name:e.name)}),e(Et,function(e,n){n.print("void 0")}),e(St,p),e(xt,function(e,n){n.print("1/0")}),e(wt,function(e,n){n.print("0/0")}),e(mt,function(e,n){n.print("this")}),e(vt,function(e,n){n.print(e.getValue())}),e(gt,function(e,n){n.print_string(e.getValue())}),e(bt,function(e,n){n.print(f(e.getValue()))}),e(yt,function(e,n){var t=e.getValue().toString();n.option("ascii_only")&&(t=n.to_ascii(t)),n.print(t);var r=n.parent();r instanceof Yn&&/^in/.test(r.operator)&&r.left===e&&n.print(" ")}),d(J,p),d(Z,m),d(Q,m),d(rt,m),d(_n,m),d(on,m),d(an,p),d(vn,m),d(Dn,m),d(Fn,m),d(tn,m),d(mn,p),d(Pn,m),d(On,m),d($n,m),d(Mn,m),d(jn,m),d(vt,m),d(Zn,function(e,n){n.add_mapping(e.start,e.key)})}(),I.prototype=new P,f(I.prototype,{option:function(e){return this.options[e]},warn:function(){this.options.warnings&&J.warn.apply(J,arguments)},before:function(e,n){if(e._squeezed)return e;var t=!1;return e instanceof dn&&(e=e.hoist_declarations(this),t=!0),n(e,this),e=e.optimize(this),t&&e instanceof dn&&(e.drop_unused(this),n(e,this)),e._squeezed=!0,e}}),function(){function e(e,n){e.DEFMETHOD("optimize",function(e){var t=this;if(t._optimized)return t;var r=n(t,e);return r._optimized=!0,r===t?r:r.transform(e)})}function n(e,n,t){return t||(t={}),n&&(t.start||(t.start=n.start),t.end||(t.end=n.end)),new e(t)}function t(e,t,r){if(t instanceof J)return t.transform(e);switch(typeof t){case"string":return n(gt,r,{value:t}).optimize(e);case"number":return n(isNaN(t)?wt:bt,r,{value:t}).optimize(e);case"boolean":return n(t?Dt:Ct,r).optimize(e);case"undefined":return n(Et,r).optimize(e);default:if(null===t)return n(At,r).optimize(e);if(t instanceof RegExp)return n(yt,r).optimize(e);throw new Error(d("Can't handle constant of type: {type}",{type:typeof t}))}}function r(e){if(null===e)return[];if(e instanceof tn)return e.body;if(e instanceof rn)return[];if(e instanceof K)return[e];throw new Error("Can't convert thing to statement array")}function i(e){return null===e?!0:e instanceof rn?!0:e instanceof tn?0==e.body.length:!1}function o(e){return e instanceof Dn?e:(e instanceof fn||e instanceof pn||e instanceof un)&&e.body instanceof tn?e.body:e}function u(e,t){function i(e){var n=[];return e.reduce(function(e,t){return t instanceof tn?(d=!0,e.push.apply(e,i(t.body))):t instanceof rn?d=!0:t instanceof Z?n.indexOf(t.value)<0?(e.push(t),n.push(t.value)):d=!0:e.push(t),e},[])}function a(e,t){var i=t.self(),a=i instanceof vn,s=[];e:for(var u=e.length;--u>=0;){var c=e[u];switch(!0){case a&&c instanceof wn&&!c.value&&0==s.length:d=!0;continue e;case c instanceof Cn:if(c.body instanceof wn){if((a&&0==s.length||s[0]instanceof wn&&!s[0].value)&&!c.body.value&&!c.alternative){d=!0;var l=n(en,c.condition,{body:c.condition});s.unshift(l);continue e}if(s[0]instanceof wn&&c.body.value&&s[0].value&&!c.alternative){d=!0,c=c.clone(),c.alternative=s[0],s[0]=c.transform(t);continue e}if((0==s.length||s[0]instanceof wn)&&c.body.value&&!c.alternative&&a){d=!0,c=c.clone(),c.alternative=s[0]||n(wn,c,{value:n(Et,c)}),s[0]=c.transform(t);continue e}if(!c.body.value&&a){d=!0,c=c.clone(),c.condition=c.condition.negate(t),c.body=n(tn,c,{body:r(c.alternative).concat(s)}),c.alternative=null,s=[c.transform(t)];continue e}if(1==s.length&&a&&s[0]instanceof en&&(!c.alternative||c.alternative instanceof en)){d=!0,s.push(n(wn,s[0],{value:n(Et,s[0])}).transform(t)),s=r(c.alternative).concat(s),s.unshift(c);continue e}}var p=f(c.body),h=p instanceof Sn?t.loopcontrol_target(p.label):null;if(p&&(p instanceof wn&&!p.value&&a||p instanceof kn&&i===o(h)||p instanceof xn&&h instanceof tn&&i===h)){p.label&&m(p.label.thedef.references,p),d=!0;var v=r(c.body).slice(0,-1);c=c.clone(),c.condition=c.condition.negate(t),c.body=n(tn,c,{body:s}),c.alternative=n(tn,c,{body:v}),s=[c.transform(t)];continue e}var p=f(c.alternative),h=p instanceof Sn?t.loopcontrol_target(p.label):null;if(p&&(p instanceof wn&&!p.value&&a||p instanceof kn&&i===o(h)||p instanceof xn&&h instanceof tn&&i===h)){p.label&&m(p.label.thedef.references,p),d=!0,c=c.clone(),c.body=n(tn,c.body,{body:r(c.body).concat(s)}),c.alternative=n(tn,c.alternative,{body:r(c.alternative).slice(0,-1)}),s=[c.transform(t)];continue e}s.unshift(c);break;default:s.unshift(c)}}return s}function s(e,n){var t=!1,r=e.length,i=n.self();return e=e.reduce(function(e,r){if(t)c(n,r,e);else{if(r instanceof Sn){var a=n.loopcontrol_target(r.label);r instanceof xn&&a instanceof tn&&o(a)===i||r instanceof kn&&o(a)===i?r.label&&m(r.label.thedef.references,r):e.push(r)}else e.push(r);f(r)&&(t=!0)}return e},[]),d=e.length!=r,e}function u(e,t){function r(){i=Gn.from_array(i),i&&o.push(n(en,i,{body:i})),i=[]}if(e.length<2)return e;var i=[],o=[];return e.forEach(function(e){e instanceof en?i.push(e.body):(r(),o.push(e))}),r(),o=l(o,t),d=o.length!=e.length,o}function l(e,t){function r(e){i.pop();var n=o.body;return n instanceof Gn?n.add(e):n=Gn.cons(n,e),n.transform(t)}var i=[],o=null;return e.forEach(function(e){if(o)if(e instanceof fn){var t={};try{o.body.walk(new S(function(e){if(e instanceof Yn&&"in"==e.operator)throw t})),!e.init||e.init instanceof jn?e.init||(e.init=o.body,i.pop()):e.init=r(e.init)}catch(a){if(a!==t)throw a}}else e instanceof Cn?e.condition=r(e.condition):e instanceof hn?e.expression=r(e.expression):e instanceof An&&e.value?e.value=r(e.value):e instanceof An?e.value=r(n(Et,e)):e instanceof Dn&&(e.expression=r(e.expression));i.push(e),o=e instanceof en?e:null}),i}function p(e){var n=null;return e.reduce(function(e,t){return t instanceof jn&&n&&n.TYPE==t.TYPE?(n.definitions=n.definitions.concat(t.definitions),d=!0):t instanceof fn&&n instanceof jn&&(!t.init||t.init.TYPE==n.TYPE)?(d=!0,e.pop(),t.init?t.init.definitions=n.definitions.concat(t.init.definitions):t.init=n,e.push(t),n=t):(n=t,e.push(t)),e},[])}function h(e){e.forEach(function(e){e instanceof en&&(e.body=function t(e){return e.transform(new P(function(e){if(e instanceof Vn&&e.expression instanceof bn)return n(Un,e,{operator:"!",expression:e});if(e instanceof Vn)e.expression=t(e.expression);else if(e instanceof Gn)e.car=t(e.car);else if(e instanceof Xn){var r=t(e.condition);if(r!==e.condition){e.condition=r;var i=e.consequent;e.consequent=e.alternative,e.alternative=i}}return e}))}(e.body))})}var d;do d=!1,e=i(e),t.option("dead_code")&&(e=s(e,t)),t.option("if_return")&&(e=a(e,t)),t.option("sequences")&&(e=u(e,t)),t.option("join_vars")&&(e=p(e,t));while(d);return t.option("negate_iife")&&h(e,t),e}function c(e,n,t){e.warn("Dropping unreachable code [{file}:{line},{col}]",n.start),n.walk(new S(function(n){return n instanceof jn?(e.warn("Declarations in unreachable code! [{file}:{line},{col}]",n.start),n.remove_initializers(),t.push(n),!0):n instanceof yn?(t.push(n),!0):n instanceof dn?!0:void 0}))}function l(e,n){return e.print_to_string().length>n.print_to_string().length?n:e}function f(e){return e&&e.aborts()}function g(e,t){function i(i){i=r(i),e.body instanceof tn?(e.body=e.body.clone(),e.body.body=i.concat(e.body.body.slice(1)),e.body=e.body.transform(t)):e.body=n(tn,e.body,{body:i}).transform(t),g(e,t)}var o=e.body instanceof tn?e.body.body[0]:e.body;o instanceof Cn&&(o.body instanceof xn&&t.loopcontrol_target(o.body.label)===e?(e.condition=e.condition?n(Yn,e.condition,{left:e.condition,operator:"&&",right:o.condition.negate(t)}):o.condition.negate(t),i(o.alternative)):o.alternative instanceof xn&&t.loopcontrol_target(o.alternative.label)===e&&(e.condition=e.condition?n(Yn,e.condition,{left:e.condition,operator:"&&",right:o.condition}):o.condition,i(o.body)))}function b(e,n){var t=n.option("pure_getters");n.options.pure_getters=!1;var r=e.has_side_effects(n);return n.options.pure_getters=t,r}function w(e,t){return t.option("booleans")&&t.in_boolean_context()?n(Dt,e):e}e(J,function(e){return e}),J.DEFMETHOD("equivalent_to",function(e){return this.print_to_string()==e.print_to_string()}),function(e){var n=["!","delete"],t=["in","instanceof","==","!=","===","!==","<","<=",">=",">"];e(J,function(){return!1}),e(Un,function(){return a(this.operator,n)}),e(Yn,function(){return a(this.operator,t)||("&&"==this.operator||"||"==this.operator)&&this.left.is_boolean()&&this.right.is_boolean()}),e(Xn,function(){return this.consequent.is_boolean()&&this.alternative.is_boolean()}),e(Jn,function(){return"="==this.operator&&this.right.is_boolean()}),e(Gn,function(){return this.cdr.is_boolean()}),e(Dt,function(){return!0}),e(Ct,function(){return!0})}(function(e,n){e.DEFMETHOD("is_boolean",n)}),function(e){e(J,function(){return!1}),e(gt,function(){return!0}),e(Un,function(){return"typeof"==this.operator}),e(Yn,function(e){return"+"==this.operator&&(this.left.is_string(e)||this.right.is_string(e))}),e(Jn,function(e){return("="==this.operator||"+="==this.operator)&&this.right.is_string(e)}),e(Gn,function(e){return this.cdr.is_string(e)}),e(Xn,function(e){return this.consequent.is_string(e)&&this.alternative.is_string(e)}),e(Vn,function(e){return e.option("unsafe")&&this.expression instanceof ht&&"String"==this.expression.name&&this.expression.undeclared()})}(function(e,n){e.DEFMETHOD("is_string",n)}),function(e){function n(e,n){if(!n)throw new Error("Compressor must be passed");return e._eval(n)}J.DEFMETHOD("evaluate",function(n){if(!n.option("evaluate"))return[this];try{var r=this._eval(n);return[l(t(n,r,this),this),r]}catch(i){if(i!==e)throw i;return[this]}}),e(K,function(){throw new Error(d("Cannot evaluate a statement [{file}:{line},{col}]",this.start))}),e(bn,function(){throw e}),e(J,function(){throw e}),e(vt,function(){return this.getValue()}),e(Un,function(t){var r=this.expression;switch(this.operator){case"!":return!n(r,t);case"typeof":if(r instanceof bn)return"function";if(r=n(r,t),r instanceof RegExp)throw e;return typeof r;case"void":return void n(r,t);case"~":return~n(r,t);case"-":if(r=n(r,t),0===r)throw e;return-r;case"+":return+n(r,t)}throw e}),e(Yn,function(t){var r=this.left,i=this.right;switch(this.operator){case"&&":return n(r,t)&&n(i,t);case"||":return n(r,t)||n(i,t);case"|":return n(r,t)|n(i,t);case"&":return n(r,t)&n(i,t);case"^":return n(r,t)^n(i,t);case"+":return n(r,t)+n(i,t);case"*":return n(r,t)*n(i,t);case"/":return n(r,t)/n(i,t);case"%":return n(r,t)%n(i,t);case"-":return n(r,t)-n(i,t);case"<<":return n(r,t)<<n(i,t);case">>":return n(r,t)>>n(i,t);case">>>":return n(r,t)>>>n(i,t);case"==":return n(r,t)==n(i,t);case"===":return n(r,t)===n(i,t);case"!=":return n(r,t)!=n(i,t);case"!==":return n(r,t)!==n(i,t);case"<":return n(r,t)<n(i,t);case"<=":return n(r,t)<=n(i,t);case">":return n(r,t)>n(i,t);case">=":return n(r,t)>=n(i,t);case"in":return n(r,t)in n(i,t);case"instanceof":return n(r,t)instanceof n(i,t)}throw e}),e(Xn,function(e){return n(this.condition,e)?n(this.consequent,e):n(this.alternative,e)}),e(ht,function(t){var r=this.definition();if(r&&r.constant&&r.init)return n(r.init,t);throw e})}(function(e,n){e.DEFMETHOD("_eval",n)}),function(e){function t(e){return n(Un,e,{operator:"!",expression:e})}e(J,function(){return t(this)}),e(K,function(){throw new Error("Cannot negate a statement")}),e(bn,function(){return t(this)}),e(Un,function(){return"!"==this.operator?this.expression:t(this)}),e(Gn,function(e){var n=this.clone();return n.cdr=n.cdr.negate(e),n}),e(Xn,function(e){var n=this.clone();return n.consequent=n.consequent.negate(e),n.alternative=n.alternative.negate(e),l(t(this),n)}),e(Yn,function(e){var n=this.clone(),r=this.operator;if(e.option("unsafe_comps"))switch(r){case"<=":return n.operator=">",n;case"<":return n.operator=">=",n;case">=":return n.operator="<",n;case">":return n.operator="<=",n}switch(r){case"==":return n.operator="!=",n;case"!=":return n.operator="==",n;case"===":return n.operator="!==",n;case"!==":return n.operator="===",n;case"&&":return n.operator="||",n.left=n.left.negate(e),n.right=n.right.negate(e),l(t(this),n);case"||":return n.operator="&&",n.left=n.left.negate(e),n.right=n.right.negate(e),l(t(this),n)}return t(this)})}(function(e,n){e.DEFMETHOD("negate",function(e){return n.call(this,e)})}),function(e){e(J,function(){return!0}),e(rn,function(){return!1}),e(vt,function(){return!1}),e(mt,function(){return!1}),e(Vn,function(e){var n=e.option("pure_funcs");return n?n.indexOf(this.expression.print_to_string())<0:!0}),e(nn,function(e){for(var n=this.body.length;--n>=0;)if(this.body[n].has_side_effects(e))return!0;return!1}),e(en,function(e){return this.body.has_side_effects(e)}),e(yn,function(){return!0}),e(bn,function(){return!1}),e(Yn,function(e){return this.left.has_side_effects(e)||this.right.has_side_effects(e)}),e(Jn,function(){return!0}),e(Xn,function(e){return this.condition.has_side_effects(e)||this.consequent.has_side_effects(e)||this.alternative.has_side_effects(e)}),e(zn,function(e){return"delete"==this.operator||"++"==this.operator||"--"==this.operator||this.expression.has_side_effects(e)}),e(ht,function(){return!1}),e(Qn,function(e){for(var n=this.properties.length;--n>=0;)if(this.properties[n].has_side_effects(e))return!0;return!1}),e(Zn,function(e){return this.value.has_side_effects(e)}),e(Kn,function(e){for(var n=this.elements.length;--n>=0;)if(this.elements[n].has_side_effects(e))return!0;return!1}),e(In,function(e){return e.option("pure_getters")?this.expression.has_side_effects(e):!0}),e(qn,function(e){return e.option("pure_getters")?this.expression.has_side_effects(e)||this.property.has_side_effects(e):!0}),e(Hn,function(e){return!e.option("pure_getters")}),e(Gn,function(e){return this.car.has_side_effects(e)||this.cdr.has_side_effects(e)})}(function(e,n){e.DEFMETHOD("has_side_effects",n)}),function(e){function n(){var e=this.body.length;return e>0&&f(this.body[e-1])}e(K,function(){return null}),e(_n,function(){return this}),e(tn,n),e(Fn,n),e(Cn,function(){return this.alternative&&f(this.body)&&f(this.alternative)})}(function(e,n){e.DEFMETHOD("aborts",n)}),e(Z,function(e){return e.scope.has_directive(e.value)!==e.scope?n(rn,e):e}),e(Q,function(e,t){return t.option("drop_debugger")?n(rn,e):e}),e(an,function(e,t){return e.body instanceof xn&&t.loopcontrol_target(e.body.label)===e.body?n(rn,e):0==e.label.references.length?e.body:e}),e(nn,function(e,n){return e.body=u(e.body,n),e}),e(tn,function(e,t){switch(e.body=u(e.body,t),e.body.length){case 1:return e.body[0];case 0:return n(rn,e)}return e}),dn.DEFMETHOD("drop_unused",function(e){var t=this;if(e.option("unused")&&!(t instanceof mn)&&!t.uses_eval){var r=[],i=new A,o=this,s=new S(function(n,a){if(n!==t){if(n instanceof yn)return i.add(n.name.name,n),!0;if(n instanceof jn&&o===t)return n.definitions.forEach(function(n){n.value&&(i.add(n.name.name,n.value),n.value.has_side_effects(e)&&n.value.walk(s))}),!0;if(n instanceof ht)return h(r,n.definition()),!0;if(n instanceof dn){var u=o;return o=n,a(),o=u,!0}}});t.walk(s);for(var u=0;u<r.length;++u)r[u].orig.forEach(function(e){var n=i.get(e.name);n&&n.forEach(function(e){var n=new S(function(e){e instanceof ht&&h(r,e.definition())});e.walk(n)})});var c=new P(function(i,o,s){if(i instanceof vn&&!(i instanceof gn))for(var u=i.argnames,l=u.length;--l>=0;){var f=u[l];if(!f.unreferenced())break;u.pop(),e.warn("Dropping unused function argument {name} [{file}:{line},{col}]",{name:f.name,file:f.start.file,line:f.start.line,col:f.start.col})}if(i instanceof yn&&i!==t)return a(i.name.definition(),r)?i:(e.warn("Dropping unused function {name} [{file}:{line},{col}]",{name:i.name.name,file:i.name.start.file,line:i.name.start.line,col:i.name.start.col}),n(rn,i));if(i instanceof jn&&!(c.parent()instanceof pn)){var p=i.definitions.filter(function(n){if(a(n.name.definition(),r))return!0;var t={name:n.name.name,file:n.name.start.file,line:n.name.start.line,col:n.name.start.col};return n.value&&n.value.has_side_effects(e)?(n._unused_side_effects=!0,e.warn("Side effects in initialization of unused variable {name} [{file}:{line},{col}]",t),!0):(e.warn("Dropping unused variable {name} [{file}:{line},{col}]",t),!1)});p=v(p,function(e,n){return!e.value&&n.value?-1:!n.value&&e.value?1:0});for(var h=[],l=0;l<p.length;){var d=p[l];d._unused_side_effects?(h.push(d.value),p.splice(l,1)):(h.length>0&&(h.push(d.value),d.value=Gn.from_array(h),h=[]),++l)}return h=h.length>0?n(tn,i,{body:[n(en,i,{body:Gn.from_array(h)})]}):null,0!=p.length||h?0==p.length?h:(i.definitions=p,h&&(h.body.unshift(i),i=h),i):n(rn,i)
}if(i instanceof fn&&(o(i,this),i.init instanceof tn)){var m=i.init.body.slice(0,-1);return i.init=i.init.body.slice(-1)[0].body,m.push(i),s?Y.splice(m):n(tn,i,{body:m})}return i instanceof dn&&i!==t?i:void 0});t.transform(c)}}),dn.DEFMETHOD("hoist_declarations",function(e){var t=e.option("hoist_funs"),r=e.option("hoist_vars"),i=this;if(t||r){var o=[],a=[],u=new A,c=0,l=0;i.walk(new S(function(e){return e instanceof dn&&e!==i?!0:e instanceof Rn?(++l,!0):void 0})),r=r&&l>1;var f=new P(function(e){if(e!==i){if(e instanceof Z)return o.push(e),n(rn,e);if(e instanceof yn&&t)return a.push(e),n(rn,e);if(e instanceof Rn&&r){e.definitions.forEach(function(e){u.set(e.name.name,e),++c});var s=e.to_assignments(),l=f.parent();return l instanceof pn&&l.init===e?null==s?e.definitions[0].name:s:l instanceof fn&&l.init===e?s:s?n(en,e,{body:s}):n(rn,e)}if(e instanceof dn)return e}});if(i=i.transform(f),c>0){var p=[];if(u.each(function(e,n){i instanceof vn&&s(function(n){return n.name==e.name.name},i.argnames)?u.del(n):(e=e.clone(),e.value=null,p.push(e),u.set(n,e))}),p.length>0){for(var h=0;h<i.body.length;){if(i.body[h]instanceof en){var d,v,g=i.body[h].body;if(g instanceof Jn&&"="==g.operator&&(d=g.left)instanceof rt&&u.has(d.name)){var b=u.get(d.name);if(b.value)break;b.value=g.right,m(p,b),p.push(b),i.body.splice(h,1);continue}if(g instanceof Gn&&(v=g.car)instanceof Jn&&"="==v.operator&&(d=v.left)instanceof rt&&u.has(d.name)){var b=u.get(d.name);if(b.value)break;b.value=v.right,m(p,b),p.push(b),i.body[h].body=g.cdr;continue}}if(i.body[h]instanceof rn)i.body.splice(h,1);else{if(!(i.body[h]instanceof tn))break;var y=[h,1].concat(i.body[h].body);i.body.splice.apply(i.body,y)}}p=n(Rn,i,{definitions:p}),a.push(p)}}i.body=o.concat(a,i.body)}return i}),e(en,function(e,t){return t.option("side_effects")&&!e.body.has_side_effects(t)?(t.warn("Dropping side-effect-free statement [{file}:{line},{col}]",e.start),n(rn,e)):e}),e(un,function(e,t){var r=e.condition.evaluate(t);if(e.condition=r[0],!t.option("loops"))return e;if(r.length>1){if(r[1])return n(fn,e,{body:e.body});if(e instanceof ln&&t.option("dead_code")){var i=[];return c(t,e.body,i),n(tn,e,{body:i})}}return e}),e(ln,function(e,t){return t.option("loops")?(e=un.prototype.optimize.call(e,t),e instanceof ln&&(g(e,t),e=n(fn,e,e).transform(t)),e):e}),e(fn,function(e,t){var r=e.condition;if(r&&(r=r.evaluate(t),e.condition=r[0]),!t.option("loops"))return e;if(r&&r.length>1&&!r[1]&&t.option("dead_code")){var i=[];return e.init instanceof K?i.push(e.init):e.init&&i.push(n(en,e.init,{body:e.init})),c(t,e.body,i),n(tn,e,{body:i})}return g(e,t),e}),e(Cn,function(e,t){if(!t.option("conditionals"))return e;var r=e.condition.evaluate(t);if(e.condition=r[0],r.length>1)if(r[1]){if(t.warn("Condition always true [{file}:{line},{col}]",e.condition.start),t.option("dead_code")){var o=[];return e.alternative&&c(t,e.alternative,o),o.push(e.body),n(tn,e,{body:o}).transform(t)}}else if(t.warn("Condition always false [{file}:{line},{col}]",e.condition.start),t.option("dead_code")){var o=[];return c(t,e.body,o),e.alternative&&o.push(e.alternative),n(tn,e,{body:o}).transform(t)}i(e.alternative)&&(e.alternative=null);var a=e.condition.negate(t),s=l(e.condition,a)===a;if(e.alternative&&s){s=!1,e.condition=a;var u=e.body;e.body=e.alternative||n(rn),e.alternative=u}if(i(e.body)&&i(e.alternative))return n(en,e.condition,{body:e.condition}).transform(t);if(e.body instanceof en&&e.alternative instanceof en)return n(en,e,{body:n(Xn,e,{condition:e.condition,consequent:e.body.body,alternative:e.alternative.body})}).transform(t);if(i(e.alternative)&&e.body instanceof en)return s?n(en,e,{body:n(Yn,e,{operator:"||",left:a,right:e.body.body})}).transform(t):n(en,e,{body:n(Yn,e,{operator:"&&",left:e.condition,right:e.body.body})}).transform(t);if(e.body instanceof rn&&e.alternative&&e.alternative instanceof en)return n(en,e,{body:n(Yn,e,{operator:"||",left:e.condition,right:e.alternative.body})}).transform(t);if(e.body instanceof An&&e.alternative instanceof An&&e.body.TYPE==e.alternative.TYPE)return n(e.body.CTOR,e,{value:n(Xn,e,{condition:e.condition,consequent:e.body.value||n(Et,e.body).optimize(t),alternative:e.alternative.value||n(Et,e.alternative).optimize(t)})}).transform(t);if(e.body instanceof Cn&&!e.body.alternative&&!e.alternative&&(e.condition=n(Yn,e.condition,{operator:"&&",left:e.condition,right:e.body.condition}).transform(t),e.body=e.body.body),f(e.body)&&e.alternative){var p=e.alternative;return e.alternative=null,n(tn,e,{body:[e,p]}).transform(t)}if(f(e.alternative)){var h=e.body;return e.body=e.alternative,e.condition=s?a:e.condition.negate(t),e.alternative=null,n(tn,e,{body:[e,h]}).transform(t)}return e}),e(Dn,function(e,t){if(0==e.body.length&&t.option("conditionals"))return n(en,e,{body:e.expression}).transform(t);for(;;){var r=e.body[e.body.length-1];if(r){var i=r.body[r.body.length-1];if(i instanceof xn&&o(t.loopcontrol_target(i.label))===e&&r.body.pop(),r instanceof Tn&&0==r.body.length){e.body.pop();continue}}break}var a=e.expression.evaluate(t);e:if(2==a.length)try{if(e.expression=a[0],!t.option("dead_code"))break e;var s=a[1],u=!1,c=!1,l=!1,p=!1,h=!1,d=new P(function(r,i,o){if(r instanceof vn||r instanceof en)return r;if(r instanceof Dn&&r===e)return r=r.clone(),i(r,this),h?r:n(tn,r,{body:r.body.reduce(function(e,n){return e.concat(n.body)},[])}).transform(t);if(r instanceof Cn||r instanceof On){var a=u;return u=!c,i(r,this),u=a,r}if(r instanceof on||r instanceof Dn){var a=c;return c=!0,i(r,this),c=a,r}if(r instanceof xn&&this.loopcontrol_target(r.label)===e)return u?(h=!0,r):c?r:(p=!0,o?Y.skip:n(rn,r));if(r instanceof Fn&&this.parent()===e){if(p)return Y.skip;if(r instanceof Bn){var d=r.expression.evaluate(t);if(d.length<2)throw e;return d[1]===s||l?(l=!0,f(r)&&(p=!0),i(r,this),r):Y.skip}return i(r,this),r}});d.stack=t.stack.slice(),e=e.transform(d)}catch(m){if(m!==e)throw m}return e}),e(Bn,function(e,n){return e.body=u(e.body,n),e}),e(On,function(e,n){return e.body=u(e.body,n),e}),jn.DEFMETHOD("remove_initializers",function(){this.definitions.forEach(function(e){e.value=null})}),jn.DEFMETHOD("to_assignments",function(){var e=this.definitions.reduce(function(e,t){if(t.value){var r=n(ht,t.name,t.name);e.push(n(Jn,t,{operator:"=",left:r,right:t.value}))}return e},[]);return 0==e.length?null:Gn.from_array(e)}),e(jn,function(e){return 0==e.definitions.length?n(rn,e):e}),e(bn,function(e,n){return e=vn.prototype.optimize.call(e,n),n.option("unused")&&e.name&&e.name.unreferenced()&&(e.name=null),e}),e(Vn,function(e,r){if(r.option("unsafe")){var i=e.expression;if(i instanceof ht&&i.undeclared())switch(i.name){case"Array":if(1!=e.args.length)return n(Kn,e,{elements:e.args}).transform(r);break;case"Object":if(0==e.args.length)return n(Qn,e,{properties:[]});break;case"String":if(0==e.args.length)return n(gt,e,{value:""});if(e.args.length<=1)return n(Yn,e,{left:e.args[0],operator:"+",right:n(gt,e,{value:""})}).transform(r);break;case"Number":if(0==e.args.length)return n(bt,e,{value:0});if(1==e.args.length)return n(Un,e,{expression:e.args[0],operator:"+"}).transform(r);case"Boolean":if(0==e.args.length)return n(Ct,e);if(1==e.args.length)return n(Un,e,{expression:n(Un,null,{expression:e.args[0],operator:"!"}),operator:"!"}).transform(r);break;case"Function":if(_(e.args,function(e){return e instanceof gt}))try{var o="(function("+e.args.slice(0,-1).map(function(e){return e.value}).join(",")+"){"+e.args[e.args.length-1].value+"})()",a=V(o);a.figure_out_scope({screw_ie8:r.option("screw_ie8")});var s=new I(r.options);a=a.transform(s),a.figure_out_scope({screw_ie8:r.option("screw_ie8")}),a.mangle_names();var u;try{a.walk(new S(function(e){if(e instanceof vn)throw u=e,a}))}catch(c){if(c!==a)throw c}var f=u.argnames.map(function(t,r){return n(gt,e.args[r],{value:t.print_to_string()})}),o=H();return tn.prototype._codegen.call(u,u,o),o=o.toString().replace(/^\{|\}$/g,""),f.push(n(gt,e.args[e.args.length-1],{value:o})),e.args=f,e}catch(c){if(!(c instanceof j))throw console.log(c),c;r.warn("Error parsing code passed to new Function [{file}:{line},{col}]",e.args[e.args.length-1].start),r.warn(c.toString())}}else{if(i instanceof In&&"toString"==i.property&&0==e.args.length)return n(Yn,e,{left:n(gt,e,{value:""}),operator:"+",right:i.expression}).transform(r);if(i instanceof In&&i.expression instanceof Kn&&"join"==i.property){var p=0==e.args.length?",":e.args[0].evaluate(r)[1];if(null!=p){var h=i.expression.elements.reduce(function(e,n){if(n=n.evaluate(r),0==e.length||1==n.length)e.push(n);else{var i=e[e.length-1];if(2==i.length){var o=""+i[1]+p+n[1];e[e.length-1]=[t(r,o,i[0]),o]}else e.push(n)}return e},[]);if(0==h.length)return n(gt,e,{value:""});if(1==h.length)return h[0][0];if(""==p){var d;return d=h[0][0]instanceof gt||h[1][0]instanceof gt?h.shift()[0]:n(gt,e,{value:""}),h.reduce(function(e,t){return n(Yn,t[0],{operator:"+",left:e,right:t[0]})},d).transform(r)}var m=e.clone();return m.expression=m.expression.clone(),m.expression.expression=m.expression.expression.clone(),m.expression.expression.elements=h.map(function(e){return e[0]}),l(e,m)}}}}return r.option("side_effects")&&e.expression instanceof bn&&0==e.args.length&&!nn.prototype.has_side_effects.call(e.expression,r)?n(Et,e).transform(r):r.option("drop_console")&&e.expression instanceof Hn&&e.expression.expression instanceof ht&&"console"==e.expression.expression.name&&e.expression.expression.undeclared()?n(Et,e).transform(r):e.evaluate(r)[0]}),e(Pn,function(e,t){if(t.option("unsafe")){var r=e.expression;if(r instanceof ht&&r.undeclared())switch(r.name){case"Object":case"RegExp":case"Function":case"Error":case"Array":return n(Vn,e,e).transform(t)}}return e}),e(Gn,function(e,n){if(!n.option("side_effects"))return e;if(!e.car.has_side_effects(n)){var t;if(!(e.cdr instanceof ht&&"eval"==e.cdr.name&&e.cdr.undeclared()&&(t=n.parent())instanceof Vn&&t.expression===e))return e.cdr}if(n.option("cascade")){if(e.car instanceof Jn&&!e.car.left.has_side_effects(n)){if(e.car.left.equivalent_to(e.cdr))return e.car;if(e.cdr instanceof Vn&&e.cdr.expression.equivalent_to(e.car.left))return e.cdr.expression=e.car,e.cdr}if(!e.car.has_side_effects(n)&&!e.cdr.has_side_effects(n)&&e.car.equivalent_to(e.cdr))return e.car}return e}),zn.DEFMETHOD("lift_sequences",function(e){if(e.option("sequences")&&this.expression instanceof Gn){var n=this.expression,t=n.to_array();return this.expression=t.pop(),t.push(this),n=Gn.from_array(t).transform(e)}return this}),e(Wn,function(e,n){return e.lift_sequences(n)}),e(Un,function(e,t){e=e.lift_sequences(t);var r=e.expression;if(t.option("booleans")&&t.in_boolean_context()){switch(e.operator){case"!":if(r instanceof Un&&"!"==r.operator)return r.expression;break;case"typeof":return t.warn("Boolean expression always true [{file}:{line},{col}]",e.start),n(Dt,e)}r instanceof Yn&&"!"==e.operator&&(e=l(e,r.negate(t)))}return e.evaluate(t)[0]}),Yn.DEFMETHOD("lift_sequences",function(e){if(e.option("sequences")){if(this.left instanceof Gn){var n=this.left,t=n.to_array();return this.left=t.pop(),t.push(this),n=Gn.from_array(t).transform(e)}if(this.right instanceof Gn&&this instanceof Jn&&!b(this.left,e)){var n=this.right,t=n.to_array();return this.right=t.pop(),t.push(this),n=Gn.from_array(t).transform(e)}}return this});var E=y("== === != !== * & | ^");e(Yn,function(e,t){var r=t.has_directive("use asm")?p:function(n,r){if(r||!e.left.has_side_effects(t)&&!e.right.has_side_effects(t)){n&&(e.operator=n);var i=e.left;e.left=e.right,e.right=i}};if(E(e.operator)&&(e.right instanceof vt&&!(e.left instanceof vt)&&(e.left instanceof Yn&&Wt[e.left.operator]>=Wt[e.operator]||r(null,!0)),/^[!=]==?$/.test(e.operator))){if(e.left instanceof ht&&e.right instanceof Xn){if(e.right.consequent instanceof ht&&e.right.consequent.definition()===e.left.definition()){if(/^==/.test(e.operator))return e.right.condition;if(/^!=/.test(e.operator))return e.right.condition.negate(t)}if(e.right.alternative instanceof ht&&e.right.alternative.definition()===e.left.definition()){if(/^==/.test(e.operator))return e.right.condition.negate(t);if(/^!=/.test(e.operator))return e.right.condition}}if(e.right instanceof ht&&e.left instanceof Xn){if(e.left.consequent instanceof ht&&e.left.consequent.definition()===e.right.definition()){if(/^==/.test(e.operator))return e.left.condition;if(/^!=/.test(e.operator))return e.left.condition.negate(t)}if(e.left.alternative instanceof ht&&e.left.alternative.definition()===e.right.definition()){if(/^==/.test(e.operator))return e.left.condition.negate(t);if(/^!=/.test(e.operator))return e.left.condition}}}if(e=e.lift_sequences(t),t.option("comparisons"))switch(e.operator){case"===":case"!==":(e.left.is_string(t)&&e.right.is_string(t)||e.left.is_boolean()&&e.right.is_boolean())&&(e.operator=e.operator.substr(0,2));case"==":case"!=":e.left instanceof gt&&"undefined"==e.left.value&&e.right instanceof Un&&"typeof"==e.right.operator&&t.option("unsafe")&&(e.right.expression instanceof ht&&e.right.expression.undeclared()||(e.right=e.right.expression,e.left=n(Et,e.left).optimize(t),2==e.operator.length&&(e.operator+="=")))}if(t.option("booleans")&&t.in_boolean_context())switch(e.operator){case"&&":var i=e.left.evaluate(t),o=e.right.evaluate(t);if(i.length>1&&!i[1]||o.length>1&&!o[1])return t.warn("Boolean && always false [{file}:{line},{col}]",e.start),n(Ct,e);if(i.length>1&&i[1])return o[0];if(o.length>1&&o[1])return i[0];break;case"||":var i=e.left.evaluate(t),o=e.right.evaluate(t);if(i.length>1&&i[1]||o.length>1&&o[1])return t.warn("Boolean || always true [{file}:{line},{col}]",e.start),n(Dt,e);if(i.length>1&&!i[1])return o[0];if(o.length>1&&!o[1])return i[0];break;case"+":var i=e.left.evaluate(t),o=e.right.evaluate(t);if(i.length>1&&i[0]instanceof gt&&i[1]||o.length>1&&o[0]instanceof gt&&o[1])return t.warn("+ in boolean context always true [{file}:{line},{col}]",e.start),n(Dt,e)}if(t.option("comparisons")){if(!(t.parent()instanceof Yn)||t.parent()instanceof Jn){var a=n(Un,e,{operator:"!",expression:e.negate(t)});e=l(e,a)}switch(e.operator){case"<":r(">");break;case"<=":r(">=")}}return"+"==e.operator&&e.right instanceof gt&&""===e.right.getValue()&&e.left instanceof Yn&&"+"==e.left.operator&&e.left.is_string(t)?e.left:(t.option("evaluate")&&"+"==e.operator&&(e.left instanceof vt&&e.right instanceof Yn&&"+"==e.right.operator&&e.right.left instanceof vt&&e.right.is_string(t)&&(e=n(Yn,e,{operator:"+",left:n(gt,null,{value:""+e.left.getValue()+e.right.left.getValue(),start:e.left.start,end:e.right.left.end}),right:e.right.right})),e.right instanceof vt&&e.left instanceof Yn&&"+"==e.left.operator&&e.left.right instanceof vt&&e.left.is_string(t)&&(e=n(Yn,e,{operator:"+",left:e.left.left,right:n(gt,null,{value:""+e.left.right.getValue()+e.right.getValue(),start:e.left.right.start,end:e.right.end})})),e.left instanceof Yn&&"+"==e.left.operator&&e.left.is_string(t)&&e.left.right instanceof vt&&e.right instanceof Yn&&"+"==e.right.operator&&e.right.left instanceof vt&&e.right.is_string(t)&&(e=n(Yn,e,{operator:"+",left:n(Yn,e.left,{operator:"+",left:e.left.left,right:n(gt,null,{value:""+e.left.right.getValue()+e.right.left.getValue(),start:e.left.right.start,end:e.right.left.end})}),right:e.right.right}))),e.right instanceof Yn&&e.right.operator==e.operator&&("*"==e.operator||"&&"==e.operator||"||"==e.operator)?(e.left=n(Yn,e.left,{operator:e.operator,left:e.left,right:e.right.left}),e.right=e.right.right,e.transform(t)):e.evaluate(t)[0])}),e(ht,function(e,r){if(e.undeclared()){var i=r.option("global_defs");if(i&&i.hasOwnProperty(e.name))return t(r,i[e.name],e);switch(e.name){case"undefined":return n(Et,e);case"NaN":return n(wt,e);case"Infinity":return n(xt,e)}}return e}),e(Et,function(e,t){if(t.option("unsafe")){var r=t.find_parent(dn),i=r.find_variable("undefined");if(i){var o=n(ht,e,{name:"undefined",scope:r,thedef:i});return o.reference(),o}}return e});var x=["+","-","/","*","%",">>","<<",">>>","|","^","&"];e(Jn,function(e,n){return e=e.lift_sequences(n),"="==e.operator&&e.left instanceof ht&&e.right instanceof Yn&&e.right.left instanceof ht&&e.right.left.name==e.left.name&&a(e.right.operator,x)&&(e.operator=e.right.operator+"=",e.right=e.right.right),e}),e(Xn,function(e,t){if(!t.option("conditionals"))return e;if(e.condition instanceof Gn){var r=e.condition.car;return e.condition=e.condition.cdr,Gn.cons(r,e)}var i=e.condition.evaluate(t);if(i.length>1)return i[1]?(t.warn("Condition always true [{file}:{line},{col}]",e.start),e.consequent):(t.warn("Condition always false [{file}:{line},{col}]",e.start),e.alternative);var o=i[0].negate(t);l(i[0],o)===o&&(e=n(Xn,e,{condition:o,consequent:e.alternative,alternative:e.consequent}));var a=e.consequent,s=e.alternative;return a instanceof Jn&&s instanceof Jn&&a.operator==s.operator&&a.left.equivalent_to(s.left)&&(e=n(Jn,e,{operator:a.operator,left:a.left,right:n(Xn,e,{condition:e.condition,consequent:a.right,alternative:s.right})})),e}),e(kt,function(e,t){if(t.option("booleans")){var r=t.parent();return r instanceof Yn&&("=="==r.operator||"!="==r.operator)?(t.warn("Non-strict equality against boolean: {operator} {value} [{file}:{line},{col}]",{operator:r.operator,value:e.value,file:r.start.file,line:r.start.line,col:r.start.col}),n(bt,e,{value:+e.value})):n(Un,e,{operator:"!",expression:n(bt,e,{value:1-e.value})})}return e}),e(qn,function(e,t){var r=e.property;return r instanceof gt&&t.option("properties")&&(r=r.getValue(),Bt(r)?t.option("screw_ie8"):$(r))?n(In,e,{expression:e.expression,property:r}):e}),e(Kn,w),e(Qn,w),e(yt,w)}(),function(){function e(e){var r="prefix"in e?e.prefix:"UnaryExpression"==e.type?!0:!1;return new(r?Un:Wn)({start:n(e),end:t(e),operator:e.operator,expression:i(e.argument)})}function n(e){return new X({file:e.loc&&e.loc.source,line:e.loc&&e.loc.start.line,col:e.loc&&e.loc.start.column,pos:e.start,endpos:e.start})}function t(e){return new X({file:e.loc&&e.loc.source,line:e.loc&&e.loc.end.line,col:e.loc&&e.loc.end.column,pos:e.end,endpos:e.end})}function r(e,r,a){var s="function From_Moz_"+e+"(M){\n";return s+="return new mytype({\nstart: my_start_token(M),\nend: my_end_token(M)",a&&a.split(/\s*,\s*/).forEach(function(e){var n=/([a-z0-9$_]+)(=|@|>|%)([a-z0-9$_]+)/i.exec(e);if(!n)throw new Error("Can't understand property map: "+e);var t="M."+n[1],r=n[2],i=n[3];if(s+=",\n"+i+": ","@"==r)s+=t+".map(from_moz)";else if(">"==r)s+="from_moz("+t+")";else if("="==r)s+=t;else{if("%"!=r)throw new Error("Can't understand operator in propmap: "+e);s+="from_moz("+t+").body"}}),s+="\n})}",s=new Function("mytype","my_start_token","my_end_token","from_moz","return("+s+")")(r,n,t,i),o[e]=s}function i(e){a.push(e);var n=null!=e?o[e.type](e):null;return a.pop(),n}var o={TryStatement:function(e){return new On({start:n(e),end:t(e),body:i(e.block).body,bcatch:i(e.handlers[0]),bfinally:e.finalizer?new Mn(i(e.finalizer)):null})},CatchClause:function(e){return new $n({start:n(e),end:t(e),argname:i(e.param),body:i(e.body).body})},ObjectExpression:function(e){return new Qn({start:n(e),end:t(e),properties:e.properties.map(function(e){var r=e.key,o="Identifier"==r.type?r.name:r.value,a={start:n(r),end:t(e.value),key:o,value:i(e.value)};switch(e.kind){case"init":return new et(a);case"set":return a.value.name=i(r),new nt(a);case"get":return a.value.name=i(r),new tt(a)}})})},SequenceExpression:function(e){return Gn.from_array(e.expressions.map(i))},MemberExpression:function(e){return new(e.computed?qn:In)({start:n(e),end:t(e),property:e.computed?i(e.property):e.property.name,expression:i(e.object)})},SwitchCase:function(e){return new(e.test?Bn:Tn)({start:n(e),end:t(e),expression:i(e.test),body:e.consequent.map(i)})},Literal:function(e){var r=e.value,i={start:n(e),end:t(e)};if(null===r)return new At(i);switch(typeof r){case"string":return i.value=r,new gt(i);case"number":return i.value=r,new bt(i);case"boolean":return new(r?Dt:Ct)(i);default:return i.value=r,new yt(i)}},UnaryExpression:e,UpdateExpression:e,Identifier:function(e){var r=a[a.length-2];return new("this"==e.name?mt:"LabeledStatement"==r.type?pt:"VariableDeclarator"==r.type&&r.id===e?"const"==r.kind?st:at:"FunctionExpression"==r.type?r.id===e?lt:ut:"FunctionDeclaration"==r.type?r.id===e?ct:ut:"CatchClause"==r.type?ft:"BreakStatement"==r.type||"ContinueStatement"==r.type?dt:ht)({start:n(e),end:t(e),name:e.name})}};r("Node",J),r("Program",mn,"body@body"),r("Function",bn,"id>name, params@argnames, body%body"),r("EmptyStatement",rn),r("BlockStatement",tn,"body@body"),r("ExpressionStatement",en,"expression>body"),r("IfStatement",Cn,"test>condition, consequent>body, alternate>alternative"),r("LabeledStatement",an,"label>label, body>body"),r("BreakStatement",xn,"label>label"),r("ContinueStatement",kn,"label>label"),r("WithStatement",hn,"object>expression, body>body"),r("SwitchStatement",Dn,"discriminant>expression, cases@body"),r("ReturnStatement",wn,"argument>value"),r("ThrowStatement",En,"argument>value"),r("WhileStatement",ln,"test>condition, body>body"),r("DoWhileStatement",cn,"test>condition, body>body"),r("ForStatement",fn,"init>init, test>condition, update>step, body>body"),r("ForInStatement",pn,"left>init, right>object, body>body"),r("DebuggerStatement",Q),r("FunctionDeclaration",yn,"id>name, params@argnames, body%body"),r("VariableDeclaration",Rn,"declarations@definitions"),r("VariableDeclarator",Nn,"id>name, init>value"),r("ThisExpression",mt),r("ArrayExpression",Kn,"elements@elements"),r("FunctionExpression",bn,"id>name, params@argnames, body%body"),r("BinaryExpression",Yn,"operator=operator, left>left, right>right"),r("AssignmentExpression",Jn,"operator=operator, left>left, right>right"),r("LogicalExpression",Yn,"operator=operator, left>left, right>right"),r("ConditionalExpression",Xn,"test>condition, consequent>consequent, alternate>alternative"),r("NewExpression",Pn,"callee>expression, arguments@args"),r("CallExpression",Vn,"callee>expression, arguments@args");var a=null;J.from_mozilla_ast=function(e){var n=a;a=[];var t=i(e);return a=n,t}}(),t.sys=z,t.MOZ_SourceMap=U,t.UglifyJS=W,t.array_to_hash=r,t.slice=i,t.characters=o,t.member=a,t.find_if=s,t.repeat_string=u,t.DefaultsError=c,t.defaults=l,t.merge=f,t.noop=p,t.MAP=Y,t.push_uniq=h,t.string_template=d,t.remove=m,t.mergeSort=v,t.set_difference=g,t.set_intersection=b,t.makePredicate=y,t.all=_,t.Dictionary=A,t.DEFNODE=w,t.AST_Token=X,t.AST_Node=J,t.AST_Statement=K,t.AST_Debugger=Q,t.AST_Directive=Z,t.AST_SimpleStatement=en,t.walk_body=E,t.AST_Block=nn,t.AST_BlockStatement=tn,t.AST_EmptyStatement=rn,t.AST_StatementWithBody=on,t.AST_LabeledStatement=an,t.AST_IterationStatement=sn,t.AST_DWLoop=un,t.AST_Do=cn,t.AST_While=ln,t.AST_For=fn,t.AST_ForIn=pn,t.AST_With=hn,t.AST_Scope=dn,t.AST_Toplevel=mn,t.AST_Lambda=vn,t.AST_Accessor=gn,t.AST_Function=bn,t.AST_Defun=yn,t.AST_Jump=_n,t.AST_Exit=An,t.AST_Return=wn,t.AST_Throw=En,t.AST_LoopControl=Sn,t.AST_Break=xn,t.AST_Continue=kn,t.AST_If=Cn,t.AST_Switch=Dn,t.AST_SwitchBranch=Fn,t.AST_Default=Tn,t.AST_Case=Bn,t.AST_Try=On,t.AST_Catch=$n,t.AST_Finally=Mn,t.AST_Definitions=jn,t.AST_Var=Rn,t.AST_Const=Ln,t.AST_VarDef=Nn,t.AST_Call=Vn,t.AST_New=Pn,t.AST_Seq=Gn,t.AST_PropAccess=Hn,t.AST_Dot=In,t.AST_Sub=qn,t.AST_Unary=zn,t.AST_UnaryPrefix=Un,t.AST_UnaryPostfix=Wn,t.AST_Binary=Yn,t.AST_Conditional=Xn,t.AST_Assign=Jn,t.AST_Array=Kn,t.AST_Object=Qn,t.AST_ObjectProperty=Zn,t.AST_ObjectKeyVal=et,t.AST_ObjectSetter=nt,t.AST_ObjectGetter=tt,t.AST_Symbol=rt,t.AST_SymbolAccessor=it,t.AST_SymbolDeclaration=ot,t.AST_SymbolVar=at,t.AST_SymbolConst=st,t.AST_SymbolFunarg=ut,t.AST_SymbolDefun=ct,t.AST_SymbolLambda=lt,t.AST_SymbolCatch=ft,t.AST_Label=pt,t.AST_SymbolRef=ht,t.AST_LabelRef=dt,t.AST_This=mt,t.AST_Constant=vt,t.AST_String=gt,t.AST_Number=bt,t.AST_RegExp=yt,t.AST_Atom=_t,t.AST_Null=At,t.AST_NaN=wt,t.AST_Undefined=Et,t.AST_Hole=St,t.AST_Infinity=xt,t.AST_Boolean=kt,t.AST_False=Ct,t.AST_True=Dt,t.TreeWalker=S,t.KEYWORDS=Ft,t.KEYWORDS_ATOM=Tt,t.RESERVED_WORDS=Bt,t.KEYWORDS_BEFORE_EXPRESSION=Ot,t.OPERATOR_CHARS=$t,t.RE_HEX_NUMBER=Mt,t.RE_OCT_NUMBER=jt,t.RE_DEC_NUMBER=Rt,t.OPERATORS=Lt,t.WHITESPACE_CHARS=Nt,t.PUNC_BEFORE_EXPRESSION=Vt,t.PUNC_CHARS=Pt,t.REGEXP_MODIFIERS=Gt,t.UNICODE=Ht,t.is_letter=x,t.is_digit=k,t.is_alphanumeric_char=C,t.is_unicode_combining_mark=D,t.is_unicode_connector_punctuation=F,t.is_identifier=T,t.is_identifier_start=B,t.is_identifier_char=O,t.is_identifier_string=$,t.parse_js_number=M,t.JS_Parse_Error=j,t.js_error=R,t.is_token=L,t.EX_EOF=It,t.tokenizer=N,t.UNARY_PREFIX=qt,t.UNARY_POSTFIX=zt,t.ASSIGNMENT=Ut,t.PRECEDENCE=Wt,t.STATEMENTS_WITH_LABELS=Yt,t.ATOMIC_START_TOKEN=Xt,t.parse=V,t.TreeTransformer=P,t.SymbolDef=G,t.base54=Jt,t.OutputStream=H,t.Compressor=I,t.SourceMap=q,t.AST_Node.warn_function=function(e){"undefined"!=typeof console&&"function"==typeof console.warn&&console.warn(e)},t.minify=function(e,n){n=W.defaults(n,{outSourceMap:null,sourceRoot:null,inSourceMap:null,fromString:!1,warnings:!1,mangle:{},output:null,compress:{}}),"string"==typeof e&&(e=[e]),W.base54.reset();var t=null;if(e.forEach(function(e){var r=n.fromString?e:fs.readFileSync(e,"utf8");t=W.parse(r,{filename:n.fromString?"?":e,toplevel:t})}),n.compress){var r={warnings:n.warnings};W.merge(r,n.compress),t.figure_out_scope();var i=W.Compressor(r);t=t.transform(i)}n.mangle&&(t.figure_out_scope(),t.compute_char_frequency(),t.mangle_names(n.mangle));var o=n.inSourceMap,a={};"string"==typeof n.inSourceMap&&(o=fs.readFileSync(n.inSourceMap,"utf8")),n.outSourceMap&&(a.source_map=W.SourceMap({file:n.outSourceMap,orig:o,root:n.sourceRoot})),n.output&&W.merge(a,n.output);var s=W.OutputStream(a);return t.print(s),{code:s+"",map:a.source_map+""}},t.describe_ast=function(){function e(t){n.print("AST_"+t.TYPE);var r=t.SELF_PROPS.filter(function(e){return!/^\$/.test(e)});r.length>0&&(n.space(),n.with_parens(function(){r.forEach(function(e,t){t&&n.space(),n.print(e)})})),t.documentation&&(n.space(),n.print_string(t.documentation)),t.SUBCLASSES.length>0&&(n.space(),n.with_block(function(){t.SUBCLASSES.forEach(function(t){n.indent(),e(t),n.newline()})}))}var n=W.OutputStream({beautify:!0});return e(W.AST_Node),n+""}},{"source-map":35,util:32}],46:[function(e,n){function t(e,n,t,i){i=i||["reservedVars","ecmaIdentifiers","nonstandard","node"],t=t||[],t=t.concat(r(e));var a=r("(function () {"+n+"}())").filter(function(e){for(var n=0;n<i.length;n++)if(e in o[i[n]])return!1;return-1===t.indexOf(e)});if(0===a.length)return n;var s="",u="locals";if(/^[a-zA-Z0-9$_]+$/.test(e))u=e;else{for(;-1!=a.indexOf(u)||-1!=t.indexOf(u);)u+="_";s=u+" = ("+e+"),"}return"var "+s+a.map(function(e){return e+" = "+u+"."+e}).join(",")+";"+n}function r(e){var n=i.parse(e.toString());n.figure_out_scope();var t=n.globals.map(function(e,n){return n});return t}var i=e("uglify-js"),o=e("./vars");n.exports=t},{"./vars":58,"uglify-js":57}],47:[function(e,n,t){arguments[4][35][0].apply(t,arguments)},{"./source-map/source-map-consumer":52,"./source-map/source-map-generator":53,"./source-map/source-node":54}],48:[function(e,n,t){arguments[4][36][0].apply(t,arguments)},{"./util":55,amdefine:56}],49:[function(e,n,t){arguments[4][37][0].apply(t,arguments)},{"./base64":50,amdefine:56}],50:[function(e,n,t){arguments[4][38][0].apply(t,arguments)},{amdefine:56}],51:[function(e,n,t){arguments[4][39][0].apply(t,arguments)},{amdefine:56}],52:[function(e,n,t){arguments[4][40][0].apply(t,arguments)},{"./array-set":48,"./base64-vlq":49,"./binary-search":51,"./util":55,amdefine:56}],53:[function(e,n,t){arguments[4][41][0].apply(t,arguments)},{"./array-set":48,"./base64-vlq":49,"./util":55,amdefine:56}],54:[function(e,n,t){arguments[4][42][0].apply(t,arguments)},{"./source-map-generator":53,"./util":55,amdefine:56}],55:[function(e,n,t){arguments[4][43][0].apply(t,arguments)},{amdefine:56}],56:[function(e,n){function t(n,t){"use strict";function o(e){var n,t;for(n=0;e[n];n+=1)if(t=e[n],"."===t)e.splice(n,1),n-=1;else if(".."===t){if(1===n&&(".."===e[2]||".."===e[0]))break;n>0&&(e.splice(n-1,2),n-=2)}}function a(e,n){var t;return e&&"."===e.charAt(0)&&n&&(t=n.split("/"),t=t.slice(0,t.length-1),t=t.concat(e.split("/")),o(t),e=t.join("/")),e}function s(e){return function(n){return a(n,e)}}function u(e){function n(n){d[e]=n}return n.fromText=function(){throw new Error("amdefine does not implement load.fromText")},n}function c(e,r,o){var a,s,u,c;if(e)s=d[e]={},u={id:e,uri:i,exports:s},a=f(t,s,u,e);else{if(m)throw new Error("amdefine with no module ID cannot be called more than once per file.");m=!0,s=n.exports,u=n,a=f(t,s,u,n.id)}r&&(r=r.map(function(e){return a(e)})),c="function"==typeof o?o.apply(u.exports,r):o,void 0!==c&&(u.exports=c,e&&(d[e]=u.exports))}function l(e,n,t){Array.isArray(e)?(t=n,n=e,e=void 0):"string"!=typeof e&&(t=e,e=n=void 0),n&&!Array.isArray(n)&&(t=n,n=void 0),n||(n=["require","exports","module"]),e?h[e]=[e,n,t]:c(e,n,t)}var f,p,h={},d={},m=!1,v=e("path");return f=function(e,n,t,i){function o(o,a){return"string"==typeof o?p(e,n,t,o,i):(o=o.map(function(r){return p(e,n,t,r,i)}),void r.nextTick(function(){a.apply(null,o)}))}return o.toUrl=function(e){return 0===e.indexOf(".")?a(e,v.dirname(t.filename)):e},o},t=t||function(){return n.require.apply(n,arguments)},p=function(e,n,t,r,i){var o,l,m=r.indexOf("!"),v=r;if(-1===m){if(r=a(r,i),"require"===r)return f(e,n,t,i);if("exports"===r)return n;if("module"===r)return t;if(d.hasOwnProperty(r))return d[r];if(h[r])return c.apply(null,h[r]),d[r];if(e)return e(v);throw new Error("No module with ID: "+r)}return o=r.substring(0,m),r=r.substring(m+1,r.length),l=p(e,n,t,o,i),r=l.normalize?l.normalize(r,s(i)):a(r,i),d[r]?d[r]:(l.load(r,f(e,n,t,i),u(r),{}),d[r])},l.require=function(e){return d[e]?d[e]:h[e]?(c.apply(null,h[e]),d[e]):void 0},l.amd={},l}var r=e("__browserify_process"),i="/../node_modules/with/node_modules/uglify-js/node_modules/source-map/node_modules/amdefine/amdefine.js";n.exports=t},{__browserify_process:29,path:30}],57:[function(e,n,t){function r(e){for(var n=Object.create(null),t=0;t<e.length;++t)n[e[t]]=!0;return n}function i(e,n){return Array.prototype.slice.call(e,n||0)}function o(e){return e.split("")}function a(e,n){for(var t=n.length;--t>=0;)if(n[t]==e)return!0;return!1}function s(e,n){for(var t=0,r=n.length;r>t;++t)if(e(n[t]))return n[t]}function u(e,n){if(0>=n)return"";if(1==n)return e;var t=u(e,n>>1);return t+=t,1&n&&(t+=e),t}function c(e,n){this.msg=e,this.defs=n}function l(e,n,t){e===!0&&(e={});var r=e||{};if(t)for(var i in r)if(r.hasOwnProperty(i)&&!n.hasOwnProperty(i))throw new c("`"+i+"` is not a supported option",n);for(var i in n)n.hasOwnProperty(i)&&(r[i]=e&&e.hasOwnProperty(i)?e[i]:n[i]);return r}function f(e,n){for(var t in n)n.hasOwnProperty(t)&&(e[t]=n[t]);return e}function p(){}function h(e,n){e.indexOf(n)<0&&e.push(n)}function d(e,n){return e.replace(/\{(.+?)\}/g,function(e,t){return n[t]})}function m(e,n){for(var t=e.length;--t>=0;)e[t]===n&&e.splice(t,1)}function v(e,n){function t(e,t){for(var r=[],i=0,o=0,a=0;i<e.length&&o<t.length;)r[a++]=n(e[i],t[o])<=0?e[i++]:t[o++];return i<e.length&&r.push.apply(r,e.slice(i)),o<t.length&&r.push.apply(r,t.slice(o)),r}function r(e){if(e.length<=1)return e;var n=Math.floor(e.length/2),i=e.slice(0,n),o=e.slice(n);return i=r(i),o=r(o),t(i,o)}return e.length<2?e.slice():r(e)}function g(e,n){return e.filter(function(e){return n.indexOf(e)<0})}function b(e,n){return e.filter(function(e){return n.indexOf(e)>=0})}function y(e){function n(e){if(1==e.length)return t+="return str === "+JSON.stringify(e[0])+";";t+="switch(str){";for(var n=0;n<e.length;++n)t+="case "+JSON.stringify(e[n])+":";t+="return true}return false;"}e instanceof Array||(e=e.split(" "));var t="",r=[];e:for(var i=0;i<e.length;++i){for(var o=0;o<r.length;++o)if(r[o][0].length==e[i].length){r[o].push(e[i]);continue e}r.push([e[i]])}if(r.length>3){r.sort(function(e,n){return n.length-e.length}),t+="switch(str.length){";for(var i=0;i<r.length;++i){var a=r[i];t+="case "+a[0].length+":",n(a)}t+="}"}else n(e);return new Function("str",t)}function _(e,n){for(var t=e.length;--t>=0;)if(!n(e[t]))return!1;
return!0}function A(){this._values=Object.create(null),this._size=0}function w(e,n,t,r){arguments.length<4&&(r=J),n=n?n.split(/\s+/):[];var i=n;r&&r.PROPS&&(n=n.concat(r.PROPS));for(var o="return function AST_"+e+"(props){ if (props) { ",a=n.length;--a>=0;)o+="this."+n[a]+" = props."+n[a]+";";var s=r&&new r;(s&&s.initialize||t&&t.initialize)&&(o+="this.initialize();"),o+="}}";var u=new Function(o)();if(s&&(u.prototype=s,u.BASE=r),r&&r.SUBCLASSES.push(u),u.prototype.CTOR=u,u.PROPS=n||null,u.SELF_PROPS=i,u.SUBCLASSES=[],e&&(u.prototype.TYPE=u.TYPE=e),t)for(a in t)t.hasOwnProperty(a)&&(/^\$/.test(a)?u[a.substr(1)]=t[a]:u.prototype[a]=t[a]);return u.DEFMETHOD=function(e,n){this.prototype[e]=n},u}function E(e,n){e.body instanceof K?e.body._walk(n):e.body.forEach(function(e){e._walk(n)})}function S(e){this.visit=e,this.stack=[]}function x(e){return e>=97&&122>=e||e>=65&&90>=e||e>=170&&Gt.letter.test(String.fromCharCode(e))}function k(e){return e>=48&&57>=e}function C(e){return k(e)||x(e)}function D(e){return Gt.non_spacing_mark.test(e)||Gt.space_combining_mark.test(e)}function F(e){return Gt.connector_punctuation.test(e)}function T(e){return!Tt(e)&&/^[a-z_$][a-z0-9_$]*$/i.test(e)}function B(e){return 36==e||95==e||x(e)}function O(e){var n=e.charCodeAt(0);return B(n)||k(n)||8204==n||8205==n||D(e)||F(e)}function $(e){var n=e.length;if(0==n)return!1;if(k(e.charCodeAt(0)))return!1;for(;--n>=0;)if(!O(e.charAt(n)))return!1;return!0}function M(e){return $t.test(e)?parseInt(e.substr(2),16):Mt.test(e)?parseInt(e.substr(1),8):jt.test(e)?parseFloat(e):void 0}function j(e,n,t,r){this.message=e,this.line=n,this.col=t,this.pos=r,this.stack=(new Error).stack}function R(e,n,t,r,i){throw new j(e,t,r,i)}function L(e,n,t){return e.type==n&&(null==t||e.value==t)}function N(e,n){function t(){return A.text.charAt(A.pos)}function r(e,n){var t=A.text.charAt(A.pos++);if(e&&!t)throw Ht;return"\n"==t?(A.newline_before=A.newline_before||!n,++A.line,A.col=0):++A.col,t}function i(e,n){var t=A.text.indexOf(e,A.pos);if(n&&-1==t)throw Ht;return t}function o(){A.tokline=A.line,A.tokcol=A.col,A.tokpos=A.pos}function a(e,t,r){A.regex_allowed="operator"==e&&!qt(t)||"keyword"==e&&Bt(t)||"punc"==e&&Nt(t);var i={type:e,value:t,line:A.tokline,col:A.tokcol,pos:A.tokpos,endpos:A.pos,nlb:A.newline_before,file:n};if(!r){i.comments_before=A.comments_before,A.comments_before=[];for(var o=0,a=i.comments_before.length;a>o;o++)i.nlb=i.nlb||i.comments_before[o].nlb}return A.newline_before=!1,new X(i)}function s(){for(;Lt(t());)r()}function u(e){for(var n,i="",o=0;(n=t())&&e(n,o++);)i+=r();return i}function c(e){R(e,n,A.tokline,A.tokcol,A.tokpos)}function l(e){var n=!1,t=!1,r=!1,i="."==e,o=u(function(o,a){var s=o.charCodeAt(0);switch(s){case 120:case 88:return r?!1:r=!0;case 101:case 69:return r?!0:n?!1:n=t=!0;case 45:return t||0==a&&!e;case 43:return t;case t=!1,46:return i||r||n?!1:i=!0}return C(s)});e&&(o=e+o);var s=M(o);return isNaN(s)?void c("Invalid syntax: "+o):a("num",s)}function f(e){var n=r(!0,e);switch(n.charCodeAt(0)){case 110:return"\n";case 114:return"\r";case 116:return" ";case 98:return"\b";case 118:return"";case 102:return"\f";case 48:return"\x00";case 120:return String.fromCharCode(p(2));case 117:return String.fromCharCode(p(4));case 10:return"";default:return n}}function p(e){for(var n=0;e>0;--e){var t=parseInt(r(!0),16);isNaN(t)&&c("Invalid hex-character pattern in string"),n=n<<4|t}return n}function h(){r();var e,n=i("\n");return-1==n?(e=A.text.substr(A.pos),A.pos=A.text.length):(e=A.text.substring(A.pos,n),A.pos=n),a("comment1",e,!0)}function d(){for(var e,n,i=!1,o="",a=!1;null!=(e=t());)if(i)"u"!=e&&c("Expecting UnicodeEscapeSequence -- uXXXX"),e=f(),O(e)||c("Unicode char: "+e.charCodeAt(0)+" is not valid in identifier"),o+=e,i=!1;else if("\\"==e)a=i=!0,r();else{if(!O(e))break;o+=r()}return Dt(o)&&a&&(n=o.charCodeAt(0).toString(16).toUpperCase(),o="\\u"+"0000".substr(n.length)+n+o.slice(1)),o}function m(e){function n(e){if(!t())return e;var i=e+t();return Rt(i)?(r(),n(i)):e}return a("operator",n(e||r()))}function v(){r();var e=A.regex_allowed;switch(t()){case"/":return A.comments_before.push(h()),A.regex_allowed=e,_();case"*":return A.comments_before.push(E()),A.regex_allowed=e,_()}return A.regex_allowed?S(""):m("/")}function g(){return r(),k(t().charCodeAt(0))?l("."):a("punc",".")}function b(){var e=d();return Ft(e)?a("atom",e):Dt(e)?Rt(e)?a("operator",e):a("keyword",e):a("name",e)}function y(e,n){return function(t){try{return n(t)}catch(r){if(r!==Ht)throw r;c(e)}}}function _(e){if(null!=e)return S(e);s(),o();var n=t();if(!n)return a("eof");var i=n.charCodeAt(0);switch(i){case 34:case 39:return w();case 46:return g();case 47:return v()}return k(i)?l():Vt(n)?a("punc",r()):Ot(n)?m():92==i||B(i)?b():void c("Unexpected character '"+n+"'")}var A={text:e.replace(/\r\n?|[\n\u2028\u2029]/g,"\n").replace(/\uFEFF/g,""),filename:n,pos:0,tokpos:0,line:1,tokline:0,col:0,tokcol:0,newline_before:!1,regex_allowed:!1,comments_before:[]},w=y("Unterminated string constant",function(){for(var e=r(),n="";;){var t=r(!0);if("\\"==t){var i=0,o=null;t=u(function(e){if(e>="0"&&"7">=e){if(!o)return o=e,++i;if("3">=o&&2>=i)return++i;if(o>="4"&&1>=i)return++i}return!1}),t=i>0?String.fromCharCode(parseInt(t,8)):f(!0)}else if(t==e)break;n+=t}return a("string",n)}),E=y("Unterminated multiline comment",function(){r();var e=i("*/",!0),n=A.text.substring(A.pos,e),t=n.split("\n"),o=t.length;return A.pos=e+2,A.line+=o-1,o>1?A.col=t[o-1].length:A.col+=t[o-1].length,A.col+=2,A.newline_before=A.newline_before||n.indexOf("\n")>=0,a("comment2",n,!0)}),S=y("Unterminated regular expression",function(e){for(var n,t=!1,i=!1;n=r(!0);)if(t)e+="\\"+n,t=!1;else if("["==n)i=!0,e+=n;else if("]"==n&&i)i=!1,e+=n;else{if("/"==n&&!i)break;"\\"==n?t=!0:e+=n}var o=d();return a("regexp",new RegExp(e,o))});return _.context=function(e){return e&&(A=e),A},_}function V(e,n){function t(e,n){return L(P.token,e,n)}function r(){return P.peeked||(P.peeked=P.input())}function i(){return P.prev=P.token,P.peeked?(P.token=P.peeked,P.peeked=null):P.token=P.input(),P.in_directives=P.in_directives&&("string"==P.token.type||t("punc",";")),P.token}function o(){return P.prev}function a(e,n,t,r){var i=P.input.context();R(e,i.filename,null!=n?n:i.tokline,null!=t?t:i.tokcol,null!=r?r:i.tokpos)}function u(e,n){a(n,e.line,e.col)}function c(e){null==e&&(e=P.token),u(e,"Unexpected token: "+e.type+" ("+e.value+")")}function f(e,n){return t(e,n)?i():void u(P.token,"Unexpected token "+P.token.type+" «"+P.token.value+"», expected "+e+" «"+n+"»")}function p(e){return f("punc",e)}function h(){return!n.strict&&(P.token.nlb||t("eof")||t("punc","}"))}function d(){t("punc",";")?i():h()||c()}function m(){p("(");var e=sn(!0);return p(")"),e}function v(e){return function(){var n=P.token,t=e(),r=o();return t.start=n,t.end=r,t}}function g(){var e=O(ft);s(function(n){return n.name==e.name},P.labels)&&a("Label "+e.name+" defined twice"),p(":"),P.labels.push(e);var n=G();return P.labels.pop(),new an({body:n,label:e})}function b(e){return new en({body:(e=sn(!0),d(),e)})}function y(e){var n=null;return h()||(n=O(ht,!0)),null!=n?s(function(e){return e.name==n.name},P.labels)||a("Undefined label "+n.name):0==P.in_loop&&a(e.TYPE+" not inside a loop or switch"),d(),new e({label:n})}function _(){p("(");var e=null;return!t("punc",";")&&(e=t("keyword","var")?(i(),I(!0)):sn(!0,!0),t("operator","in"))?(e instanceof jn&&e.definitions.length>1&&a("Only one variable declaration allowed in for..in loop"),i(),w(e)):A(e)}function A(e){p(";");var n=t("punc",";")?null:sn(!0);p(";");var r=t("punc",")")?null:sn(!0);return p(")"),new ln({init:e,condition:n,step:r,body:V(G)})}function w(e){var n=e instanceof jn?e.definitions[0].name:null,t=sn(!0);return p(")"),new fn({init:e,name:n,object:t,body:V(G)})}function E(){var e=m(),n=G(),r=null;return t("keyword","else")&&(i(),r=G()),new kn({condition:e,body:n,alternative:r})}function S(){p("{");for(var e=[];!t("punc","}");)t("eof")&&c(),e.push(G());return i(),e}function x(){p("{");for(var e,n=[],r=null,a=null;!t("punc","}");)t("eof")&&c(),t("keyword","case")?(a&&(a.end=o()),r=[],a=new Tn({start:(e=P.token,i(),e),expression:sn(!0),body:r}),n.push(a),p(":")):t("keyword","default")?(a&&(a.end=o()),r=[],a=new Fn({start:(e=P.token,i(),p(":"),e),body:r}),n.push(a)):(r||c(),r.push(G()));return a&&(a.end=o()),i(),n}function k(){var e=S(),n=null,r=null;if(t("keyword","catch")){var s=P.token;i(),p("(");var u=O(lt);p(")"),n=new On({start:s,argname:u,body:S(),end:o()})}if(t("keyword","finally")){var s=P.token;i(),r=new $n({start:s,body:S(),end:o()})}return n||r||a("Missing catch/finally blocks"),new Bn({body:e,bcatch:n,bfinally:r})}function C(e,n){for(var r=[];r.push(new Ln({start:P.token,name:O(n?at:ot),value:t("operator","=")?(i(),sn(!1,e)):null,end:o()})),t("punc",",");)i();return r}function D(){var e,n=P.token;switch(n.type){case"name":return O(pt);case"num":e=new gt({start:n,end:n,value:n.value});break;case"string":e=new vt({start:n,end:n,value:n.value});break;case"regexp":e=new bt({start:n,end:n,value:n.value});break;case"atom":switch(n.value){case"false":e=new kt({start:n,end:n});break;case"true":e=new Ct({start:n,end:n});break;case"null":e=new _t({start:n,end:n})}}return i(),e}function F(e,n,r){for(var o=!0,a=[];!t("punc",e)&&(o?o=!1:p(","),!n||!t("punc",e));)a.push(t("punc",",")&&r?new Et({start:P.token,end:P.token}):sn(!1));return i(),a}function T(){var e=P.token;switch(i(),e.type){case"num":case"string":case"name":case"operator":case"keyword":case"atom":return e.value;default:c()}}function B(){var e=P.token;switch(i(),e.type){case"name":case"operator":case"keyword":case"atom":return e.value;default:c()}}function O(e,n){if(!t("name"))return n||a("Name expected"),null;var r=P.token.value,o=new("this"==r?dt:e)({name:String(P.token.value),start:P.token,end:P.token});return i(),o}function $(e,n,t){return"++"!=n&&"--"!=n||j(t)||a("Invalid use of "+n+" operator"),new e({operator:n,expression:t})}function M(e){return K(J(!0),0,e)}function j(e){return n.strict?e instanceof dt?!1:e instanceof Gn||e instanceof tt:!0}function V(e){++P.in_loop;var n=e();return--P.in_loop,n}n=l(n,{strict:!1,filename:null,toplevel:null,expression:!1});var P={input:"string"==typeof e?N(e,n.filename):e,token:null,prev:null,peeked:null,in_function:0,in_directives:!0,in_loop:0,labels:[]};P.token=i();var G=v(function(){var e;switch((t("operator","/")||t("operator","/="))&&(P.peeked=null,P.token=P.input(P.token.value.substr(1))),P.token.type){case"string":var n=P.in_directives,s=b();return n&&s.body instanceof vt&&!t("punc",",")?new Z({value:s.body.value}):s;case"num":case"regexp":case"operator":case"atom":return b();case"name":return L(r(),"punc",":")?g():b();case"punc":switch(P.token.value){case"{":return new tn({start:P.token,body:S(),end:o()});case"[":case"(":return b();case";":return i(),new rn;default:c()}case"keyword":switch(e=P.token.value,i(),e){case"break":return y(Sn);case"continue":return y(xn);case"debugger":return d(),new Q;case"do":return new un({body:V(G),condition:(f("keyword","while"),e=m(),d(),e)});case"while":return new cn({condition:m(),body:V(G)});case"for":return _();case"function":return H(!0);case"if":return E();case"return":return 0==P.in_function&&a("'return' outside of function"),new An({value:t("punc",";")?(i(),null):h()?null:(e=sn(!0),d(),e)});case"switch":return new Cn({expression:m(),body:V(x)});case"throw":return P.token.nlb&&a("Illegal newline after 'throw'"),new wn({value:(e=sn(!0),d(),e)});case"try":return k();case"var":return e=I(),d(),e;case"const":return e=q(),d(),e;case"with":return new pn({expression:m(),body:G()});default:c()}}}),H=function(e,n){var r=n===vn,o=t("name")?O(e?ut:r?rt:ct):r&&(t("string")||t("num"))?D():null;return e&&!o&&c(),p("("),n||(n=e?bn:gn),new n({name:o,argnames:function(e,n){for(;!t("punc",")");)e?e=!1:p(","),n.push(O(st));return i(),n}(!0,[]),body:function(e,n){++P.in_function,P.in_directives=!0,P.in_loop=0,P.labels=[];var t=S();return--P.in_function,P.in_loop=e,P.labels=n,t}(P.in_loop,P.labels)})},I=function(e){return new jn({start:o(),definitions:C(e,!1),end:o()})},q=function(){return new Rn({start:o(),definitions:C(!1,!0),end:o()})},z=function(){var e=P.token;f("operator","new");var n,r=U(!1);return t("punc","(")?(i(),n=F(")")):n=[],X(new Vn({start:e,expression:r,args:n,end:o()}),!0)},U=function(e){if(t("operator","new"))return z();var n=P.token;if(t("punc")){switch(n.value){case"(":i();var r=sn(!0);return r.start=n,r.end=P.token,p(")"),X(r,e);case"[":return X(W(),e);case"{":return X(Y(),e)}c()}if(t("keyword","function")){i();var a=H(!1);return a.start=n,a.end=o(),X(a,e)}return Yt[P.token.type]?X(D(),e):void c()},W=v(function(){return p("["),new Jn({elements:F("]",!n.strict,!0)})}),Y=v(function(){p("{");for(var e=!0,r=[];!t("punc","}")&&(e?e=!1:p(","),n.strict||!t("punc","}"));){var a=P.token,s=a.type,u=T();if("name"==s&&!t("punc",":")){if("get"==u){r.push(new nt({start:a,key:u,value:H(!1,vn),end:o()}));continue}if("set"==u){r.push(new et({start:a,key:u,value:H(!1,vn),end:o()}));continue}}p(":"),r.push(new Zn({start:a,key:u,value:sn(!1),end:o()}))}return i(),new Kn({properties:r})}),X=function(e,n){var r=e.start;if(t("punc","."))return i(),X(new Hn({start:r,expression:e,property:B(),end:o()}),n);if(t("punc","[")){i();var a=sn(!0);return p("]"),X(new In({start:r,expression:e,property:a,end:o()}),n)}return n&&t("punc","(")?(i(),X(new Nn({start:r,expression:e,args:F(")"),end:o()}),!0)):e},J=function(e){var n=P.token;if(t("operator")&&It(n.value)){i();var r=$(zn,n.value,J(e));return r.start=n,r.end=o(),r}for(var a=U(e);t("operator")&&qt(P.token.value)&&!P.token.nlb;)a=$(Un,P.token.value,a),a.start=n,a.end=P.token,i();return a},K=function(e,n,r){var o=t("operator")?P.token.value:null;"in"==o&&r&&(o=null);var a=null!=o?Ut[o]:null;if(null!=a&&a>n){i();var s=K(J(!0),a,r);return K(new Wn({start:e.start,left:e,operator:o,right:s,end:s.end}),n,r)}return e},nn=function(e){var n=P.token,o=M(e);if(t("operator","?")){i();var a=sn(!1);return p(":"),new Yn({start:n,condition:o,consequent:a,alternative:sn(!1,e),end:r()})}return o},on=function(e){var n=P.token,r=nn(e),s=P.token.value;if(t("operator")&&zt(s)){if(j(r))return i(),new Xn({start:n,left:r,operator:s,right:on(e),end:o()});a("Invalid assignment")}return r},sn=function(e,n){var o=P.token,a=on(n);return e&&t("punc",",")?(i(),new Pn({start:o,car:a,cdr:sn(!0,n),end:r()})):a};return n.expression?sn(!0):function(){for(var e=P.token,r=[];!t("eof");)r.push(G());var i=o(),a=n.toplevel;return a?(a.body=a.body.concat(r),a.end=i):a=new dn({start:e,body:r,end:i}),a}()}function P(e,n){S.call(this),this.before=e,this.after=n}function G(e,n,t){this.name=t.name,this.orig=[t],this.scope=e,this.references=[],this.global=!1,this.mangled_name=null,this.undeclared=!1,this.constant=!1,this.index=n}function H(e){function n(e,n){return e.replace(/[\u0080-\uffff]/g,function(e){var t=e.charCodeAt(0).toString(16);if(t.length<=2&&!n){for(;t.length<2;)t="0"+t;return"\\x"+t}for(;t.length<4;)t="0"+t;return"\\u"+t})}function t(t){var r=0,i=0;return t=t.replace(/[\\\b\f\n\r\t\x22\x27\u2028\u2029\0]/g,function(e){switch(e){case"\\":return"\\\\";case"\b":return"\\b";case"\f":return"\\f";case"\n":return"\\n";case"\r":return"\\r";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";case'"':return++r,'"';case"'":return++i,"'";case"\x00":return"\\x00"}return e}),e.ascii_only&&(t=n(t)),r>i?"'"+t.replace(/\x27/g,"\\'")+"'":'"'+t.replace(/\x22/g,'\\"')+'"'}function r(n){var r=t(n);return e.inline_script&&(r=r.replace(/<\x2fscript([>\/\t\n\f\r ])/gi,"<\\/script$1")),r}function i(t){return t=t.toString(),e.ascii_only&&(t=n(t,!0)),t}function o(n){return u(" ",e.indent_start+A-n*e.indent_level)}function a(){return D.charAt(D.length-1)}function s(){e.max_line_len&&w>e.max_line_len&&c("\n")}function c(n){n=String(n);var t=n.charAt(0);if(C&&(t&&!(";}".indexOf(t)<0)||/[;]$/.test(D)||(e.semicolons||F(t)?(x+=";",w++,S++):(x+="\n",S++,E++,w=0),e.beautify||(k=!1)),C=!1,s()),!e.beautify&&e.preserve_line&&L[L.length-1])for(var r=L[L.length-1].start.line;r>E;)x+="\n",S++,E++,w=0,k=!1;if(k){var i=a();(O(i)&&(O(t)||"\\"==t)||/^[\+\-\/]$/.test(t)&&t==i)&&(x+=" ",w++,S++),k=!1}var o=n.split(/\r?\n/),u=o.length-1;E+=u,0==u?w+=o[u].length:w=o[u].length,S+=n.length,D=n,x+=n}function f(){C=!1,c(";")}function h(){return A+e.indent_level}function d(e){var n;return c("{"),M(),$(h(),function(){n=e()}),B(),c("}"),n}function m(e){c("(");var n=e();return c(")"),n}function v(e){c("[");var n=e();return c("]"),n}function g(){c(","),T()}function b(){c(":"),e.space_colon&&T()}function _(){return x}e=l(e,{indent_start:0,indent_level:4,quote_keys:!1,space_colon:!0,ascii_only:!1,inline_script:!1,width:80,max_line_len:32e3,beautify:!1,source_map:null,bracketize:!1,semicolons:!0,comments:!1,preserve_line:!1,screw_ie8:!1},!0);var A=0,w=0,E=1,S=0,x="",k=!1,C=!1,D=null,F=y("( [ + * / - , ."),T=e.beautify?function(){c(" ")}:function(){k=!0},B=e.beautify?function(n){e.beautify&&c(o(n?.5:0))}:p,$=e.beautify?function(e,n){e===!0&&(e=h());var t=A;A=e;var r=n();return A=t,r}:function(e,n){return n()},M=e.beautify?function(){c("\n")}:p,j=e.beautify?function(){c(";")}:function(){C=!0},R=e.source_map?function(n,t){try{n&&e.source_map.add(n.file||"?",E,w,n.line,n.col,t||"name"!=n.type?t:n.value)}catch(r){J.warn("Couldn't figure out mapping for {file}:{line},{col} → {cline},{ccol} [{name}]",{file:n.file,line:n.line,col:n.col,cline:E,ccol:w,name:t||""})}}:p,L=[];return{get:_,toString:_,indent:B,indentation:function(){return A},current_width:function(){return w-A},should_break:function(){return e.width&&this.current_width()>=e.width},newline:M,print:c,space:T,comma:g,colon:b,last:function(){return D},semicolon:j,force_semicolon:f,to_ascii:n,print_name:function(e){c(i(e))},print_string:function(e){c(r(e))},next_indent:h,with_indent:$,with_block:d,with_parens:m,with_square:v,add_mapping:R,option:function(n){return e[n]},line:function(){return E},col:function(){return w},pos:function(){return S},push_node:function(e){L.push(e)},pop_node:function(){return L.pop()},stack:function(){return L},parent:function(e){return L[L.length-2-(e||0)]}}}function I(e,n){return this instanceof I?(P.call(this,this.before,this.after),void(this.options=l(e,{sequences:!n,properties:!n,dead_code:!n,drop_debugger:!n,unsafe:!1,unsafe_comps:!1,conditionals:!n,comparisons:!n,evaluate:!n,booleans:!n,loops:!n,unused:!n,hoist_funs:!n,hoist_vars:!1,if_return:!n,join_vars:!n,cascade:!n,side_effects:!n,negate_iife:!n,screw_ie8:!1,warnings:!0,global_defs:{}},!0))):new I(e,n)}function q(e){function n(e,n,i,o,a,s){if(r){var u=r.originalPositionFor({line:o,column:a});e=u.source,o=u.line,a=u.column,s=u.name}t.addMapping({generated:{line:n,column:i},original:{line:o,column:a},source:e,name:s})}e=l(e,{file:null,root:null,orig:null});var t=new U.SourceMapGenerator({file:e.file,sourceRoot:e.root}),r=e.orig&&new U.SourceMapConsumer(e.orig);return{add:n,get:function(){return t},toString:function(){return t.toString()}}}var z=e("util"),U=e("source-map"),W=t,Y=function(){function e(e,o,a){function s(){var s=o(e[u],u),f=s instanceof r;return f&&(s=s.v),s instanceof n?(s=s.v,s instanceof t?l.push.apply(l,a?s.v.slice().reverse():s.v):l.push(s)):s!==i&&(s instanceof t?c.push.apply(c,a?s.v.slice().reverse():s.v):c.push(s)),f}var u,c=[],l=[];if(e instanceof Array)if(a){for(u=e.length;--u>=0&&!s(););c.reverse(),l.reverse()}else for(u=0;u<e.length&&!s();++u);else for(u in e)if(e.hasOwnProperty(u)&&s())break;return l.concat(c)}function n(e){this.v=e}function t(e){this.v=e}function r(e){this.v=e}e.at_top=function(e){return new n(e)},e.splice=function(e){return new t(e)},e.last=function(e){return new r(e)};var i=e.skip={};return e}();A.prototype={set:function(e,n){return this.has(e)||++this._size,this._values["$"+e]=n,this},add:function(e,n){return this.has(e)?this.get(e).push(n):this.set(e,[n]),this},get:function(e){return this._values["$"+e]},del:function(e){return this.has(e)&&(--this._size,delete this._values["$"+e]),this},has:function(e){return"$"+e in this._values},each:function(e){for(var n in this._values)e(this._values[n],n.substr(1))},size:function(){return this._size},map:function(e){var n=[];for(var t in this._values)n.push(e(this._values[t],t.substr(1)));return n}};var X=w("Token","type value line col pos endpos nlb comments_before file",{},null),J=w("Node","start end",{clone:function(){return new this.CTOR(this)},$documentation:"Base class of all AST nodes",$propdoc:{start:"[AST_Token] The first token of this node",end:"[AST_Token] The last token of this node"},_walk:function(e){return e._visit(this)},walk:function(e){return this._walk(e)}},null);J.warn_function=null,J.warn=function(e,n){J.warn_function&&J.warn_function(d(e,n))};var K=w("Statement",null,{$documentation:"Base class of all statements"}),Q=w("Debugger",null,{$documentation:"Represents a debugger statement"},K),Z=w("Directive","value scope",{$documentation:'Represents a directive, like "use strict";',$propdoc:{value:"[string] The value of this directive as a plain string (it's not an AST_String!)",scope:"[AST_Scope/S] The scope that this directive affects"}},K),en=w("SimpleStatement","body",{$documentation:"A statement consisting of an expression, i.e. a = 1 + 2",$propdoc:{body:"[AST_Node] an expression node (should not be instanceof AST_Statement)"},_walk:function(e){return e._visit(this,function(){this.body._walk(e)})}},K),nn=w("Block","body",{$documentation:"A body of statements (usually bracketed)",$propdoc:{body:"[AST_Statement*] an array of statements"},_walk:function(e){return e._visit(this,function(){E(this,e)})}},K),tn=w("BlockStatement",null,{$documentation:"A block statement"},nn),rn=w("EmptyStatement",null,{$documentation:"The empty statement (empty block or simply a semicolon)",_walk:function(e){return e._visit(this)}},K),on=w("StatementWithBody","body",{$documentation:"Base class for all statements that contain one nested body: `For`, `ForIn`, `Do`, `While`, `With`",$propdoc:{body:"[AST_Statement] the body; this should always be present, even if it's an AST_EmptyStatement"},_walk:function(e){return e._visit(this,function(){this.body._walk(e)})}},K),an=w("LabeledStatement","label",{$documentation:"Statement with a label",$propdoc:{label:"[AST_Label] a label definition"},_walk:function(e){return e._visit(this,function(){this.label._walk(e),this.body._walk(e)})}},on),sn=w("DWLoop","condition",{$documentation:"Base class for do/while statements",$propdoc:{condition:"[AST_Node] the loop condition. Should not be instanceof AST_Statement"},_walk:function(e){return e._visit(this,function(){this.condition._walk(e),this.body._walk(e)})}},on),un=w("Do",null,{$documentation:"A `do` statement"},sn),cn=w("While",null,{$documentation:"A `while` statement"},sn),ln=w("For","init condition step",{$documentation:"A `for` statement",$propdoc:{init:"[AST_Node?] the `for` initialization code, or null if empty",condition:"[AST_Node?] the `for` termination clause, or null if empty",step:"[AST_Node?] the `for` update clause, or null if empty"},_walk:function(e){return e._visit(this,function(){this.init&&this.init._walk(e),this.condition&&this.condition._walk(e),this.step&&this.step._walk(e),this.body._walk(e)})}},on),fn=w("ForIn","init name object",{$documentation:"A `for ... in` statement",$propdoc:{init:"[AST_Node] the `for/in` initialization code",name:"[AST_SymbolRef?] the loop variable, only if `init` is AST_Var",object:"[AST_Node] the object that we're looping through"},_walk:function(e){return e._visit(this,function(){this.init._walk(e),this.object._walk(e),this.body._walk(e)})}},on),pn=w("With","expression",{$documentation:"A `with` statement",$propdoc:{expression:"[AST_Node] the `with` expression"},_walk:function(e){return e._visit(this,function(){this.expression._walk(e),this.body._walk(e)})}},on),hn=w("Scope","directives variables functions uses_with uses_eval parent_scope enclosed cname",{$documentation:"Base class for all statements introducing a lexical scope",$propdoc:{directives:"[string*/S] an array of directives declared in this scope",variables:"[Object/S] a map of name -> SymbolDef for all variables/functions defined in this scope",functions:"[Object/S] like `variables`, but only lists function declarations",uses_with:"[boolean/S] tells whether this scope uses the `with` statement",uses_eval:"[boolean/S] tells whether this scope contains a direct call to the global `eval`",parent_scope:"[AST_Scope?/S] link to the parent scope",enclosed:"[SymbolDef*/S] a list of all symbol definitions that are accessed from this scope or any subscopes",cname:"[integer/S] current index for mangling variables (used internally by the mangler)"}},nn),dn=w("Toplevel","globals",{$documentation:"The toplevel scope",$propdoc:{globals:"[Object/S] a map of name -> SymbolDef for all undeclared names"},wrap_enclose:function(e){var n=this,t=[],r=[];e.forEach(function(e){var n=e.split(":");t.push(n[0]),r.push(n[1])});var i="(function("+r.join(",")+"){ '$ORIG'; })("+t.join(",")+")";return i=V(i),i=i.transform(new P(function(e){return e instanceof Z&&"$ORIG"==e.value?Y.splice(n.body):void 0}))},wrap_commonjs:function(e,n){var t=this,r=[];n&&(t.figure_out_scope(),t.walk(new S(function(e){e instanceof it&&e.definition().global&&(s(function(n){return n.name==e.name},r)||r.push(e))})));var i="(function(exports, global){ global['"+e+"'] = exports; '$ORIG'; '$EXPORTS'; }({}, (function(){return this}())))";return i=V(i),i=i.transform(new P(function(e){if(e instanceof en&&(e=e.body,e instanceof vt))switch(e.getValue()){case"$ORIG":return Y.splice(t.body);case"$EXPORTS":var n=[];return r.forEach(function(e){n.push(new en({body:new Xn({left:new In({expression:new pt({name:"exports"}),property:new vt({value:e.name})}),operator:"=",right:new pt(e)})}))}),Y.splice(n)}}))}},hn),mn=w("Lambda","name argnames uses_arguments",{$documentation:"Base class for functions",$propdoc:{name:"[AST_SymbolDeclaration?] the name of this function",argnames:"[AST_SymbolFunarg*] array of function arguments",uses_arguments:"[boolean/S] tells whether this function accesses the arguments array"},_walk:function(e){return e._visit(this,function(){this.name&&this.name._walk(e),this.argnames.forEach(function(n){n._walk(e)}),E(this,e)})}},hn),vn=w("Accessor",null,{$documentation:"A setter/getter function"},mn),gn=w("Function",null,{$documentation:"A function expression"},mn),bn=w("Defun",null,{$documentation:"A function definition"},mn),yn=w("Jump",null,{$documentation:"Base class for “jumps” (for now that's `return`, `throw`, `break` and `continue`)"},K),_n=w("Exit","value",{$documentation:"Base class for “exits” (`return` and `throw`)",$propdoc:{value:"[AST_Node?] the value returned or thrown by this statement; could be null for AST_Return"},_walk:function(e){return e._visit(this,this.value&&function(){this.value._walk(e)})}},yn),An=w("Return",null,{$documentation:"A `return` statement"},_n),wn=w("Throw",null,{$documentation:"A `throw` statement"},_n),En=w("LoopControl","label",{$documentation:"Base class for loop control statements (`break` and `continue`)",$propdoc:{label:"[AST_LabelRef?] the label, or null if none"},_walk:function(e){return e._visit(this,this.label&&function(){this.label._walk(e)})}},yn),Sn=w("Break",null,{$documentation:"A `break` statement"},En),xn=w("Continue",null,{$documentation:"A `continue` statement"},En),kn=w("If","condition alternative",{$documentation:"A `if` statement",$propdoc:{condition:"[AST_Node] the `if` condition",alternative:"[AST_Statement?] the `else` part, or null if not present"},_walk:function(e){return e._visit(this,function(){this.condition._walk(e),this.body._walk(e),this.alternative&&this.alternative._walk(e)})}},on),Cn=w("Switch","expression",{$documentation:"A `switch` statement",$propdoc:{expression:"[AST_Node] the `switch` “discriminant”"},_walk:function(e){return e._visit(this,function(){this.expression._walk(e),E(this,e)})}},nn),Dn=w("SwitchBranch",null,{$documentation:"Base class for `switch` branches"},nn),Fn=w("Default",null,{$documentation:"A `default` switch branch"},Dn),Tn=w("Case","expression",{$documentation:"A `case` switch branch",$propdoc:{expression:"[AST_Node] the `case` expression"},_walk:function(e){return e._visit(this,function(){this.expression._walk(e),E(this,e)})}},Dn),Bn=w("Try","bcatch bfinally",{$documentation:"A `try` statement",$propdoc:{bcatch:"[AST_Catch?] the catch block, or null if not present",bfinally:"[AST_Finally?] the finally block, or null if not present"},_walk:function(e){return e._visit(this,function(){E(this,e),this.bcatch&&this.bcatch._walk(e),this.bfinally&&this.bfinally._walk(e)})}},nn),On=w("Catch","argname",{$documentation:"A `catch` node; only makes sense as part of a `try` statement",$propdoc:{argname:"[AST_SymbolCatch] symbol for the exception"},_walk:function(e){return e._visit(this,function(){this.argname._walk(e),E(this,e)})}},nn),$n=w("Finally",null,{$documentation:"A `finally` node; only makes sense as part of a `try` statement"},nn),Mn=w("Definitions","definitions",{$documentation:"Base class for `var` or `const` nodes (variable declarations/initializations)",$propdoc:{definitions:"[AST_VarDef*] array of variable definitions"},_walk:function(e){return e._visit(this,function(){this.definitions.forEach(function(n){n._walk(e)})})}},K),jn=w("Var",null,{$documentation:"A `var` statement"},Mn),Rn=w("Const",null,{$documentation:"A `const` statement"},Mn),Ln=w("VarDef","name value",{$documentation:"A variable declaration; only appears in a AST_Definitions node",$propdoc:{name:"[AST_SymbolVar|AST_SymbolConst] name of the variable",value:"[AST_Node?] initializer, or null of there's no initializer"},_walk:function(e){return e._visit(this,function(){this.name._walk(e),this.value&&this.value._walk(e)})}}),Nn=w("Call","expression args",{$documentation:"A function call expression",$propdoc:{expression:"[AST_Node] expression to invoke as function",args:"[AST_Node*] array of arguments"},_walk:function(e){return e._visit(this,function(){this.expression._walk(e),this.args.forEach(function(n){n._walk(e)})})}}),Vn=w("New",null,{$documentation:"An object instantiation. Derives from a function call since it has exactly the same properties"},Nn),Pn=w("Seq","car cdr",{$documentation:"A sequence expression (two comma-separated expressions)",$propdoc:{car:"[AST_Node] first element in sequence",cdr:"[AST_Node] second element in sequence"},$cons:function(e,n){var t=new Pn(e);return t.car=e,t.cdr=n,t},$from_array:function(e){if(0==e.length)return null;if(1==e.length)return e[0].clone();for(var n=null,t=e.length;--t>=0;)n=Pn.cons(e[t],n);for(var r=n;r;){if(r.cdr&&!r.cdr.cdr){r.cdr=r.cdr.car;break}r=r.cdr}return n},to_array:function(){for(var e=this,n=[];e;){if(n.push(e.car),e.cdr&&!(e.cdr instanceof Pn)){n.push(e.cdr);break}e=e.cdr}return n},add:function(e){for(var n=this;n;){if(!(n.cdr instanceof Pn)){var t=Pn.cons(n.cdr,e);return n.cdr=t}n=n.cdr}},_walk:function(e){return e._visit(this,function(){this.car._walk(e),this.cdr&&this.cdr._walk(e)})}}),Gn=w("PropAccess","expression property",{$documentation:'Base class for property access expressions, i.e. `a.foo` or `a["foo"]`',$propdoc:{expression:"[AST_Node] the “container” expression",property:"[AST_Node|string] the property to access. For AST_Dot this is always a plain string, while for AST_Sub it's an arbitrary AST_Node"}}),Hn=w("Dot",null,{$documentation:"A dotted property access expression",_walk:function(e){return e._visit(this,function(){this.expression._walk(e)})}},Gn),In=w("Sub",null,{$documentation:'Index-style property access, i.e. `a["foo"]`',_walk:function(e){return e._visit(this,function(){this.expression._walk(e),this.property._walk(e)})}},Gn),qn=w("Unary","operator expression",{$documentation:"Base class for unary expressions",$propdoc:{operator:"[string] the operator",expression:"[AST_Node] expression that this unary operator applies to"},_walk:function(e){return e._visit(this,function(){this.expression._walk(e)})}}),zn=w("UnaryPrefix",null,{$documentation:"Unary prefix expression, i.e. `typeof i` or `++i`"},qn),Un=w("UnaryPostfix",null,{$documentation:"Unary postfix expression, i.e. `i++`"},qn),Wn=w("Binary","left operator right",{$documentation:"Binary expression, i.e. `a + b`",$propdoc:{left:"[AST_Node] left-hand side expression",operator:"[string] the operator",right:"[AST_Node] right-hand side expression"},_walk:function(e){return e._visit(this,function(){this.left._walk(e),this.right._walk(e)
})}}),Yn=w("Conditional","condition consequent alternative",{$documentation:"Conditional expression using the ternary operator, i.e. `a ? b : c`",$propdoc:{condition:"[AST_Node]",consequent:"[AST_Node]",alternative:"[AST_Node]"},_walk:function(e){return e._visit(this,function(){this.condition._walk(e),this.consequent._walk(e),this.alternative._walk(e)})}}),Xn=w("Assign",null,{$documentation:"An assignment expression — `a = b + 5`"},Wn),Jn=w("Array","elements",{$documentation:"An array literal",$propdoc:{elements:"[AST_Node*] array of elements"},_walk:function(e){return e._visit(this,function(){this.elements.forEach(function(n){n._walk(e)})})}}),Kn=w("Object","properties",{$documentation:"An object literal",$propdoc:{properties:"[AST_ObjectProperty*] array of properties"},_walk:function(e){return e._visit(this,function(){this.properties.forEach(function(n){n._walk(e)})})}}),Qn=w("ObjectProperty","key value",{$documentation:"Base class for literal object properties",$propdoc:{key:"[string] the property name; it's always a plain string in our AST, no matter if it was a string, number or identifier in original code",value:"[AST_Node] property value. For setters and getters this is an AST_Function."},_walk:function(e){return e._visit(this,function(){this.value._walk(e)})}}),Zn=w("ObjectKeyVal",null,{$documentation:"A key: value object property"},Qn),et=w("ObjectSetter",null,{$documentation:"An object setter property"},Qn),nt=w("ObjectGetter",null,{$documentation:"An object getter property"},Qn),tt=w("Symbol","scope name thedef",{$propdoc:{name:"[string] name of this symbol",scope:"[AST_Scope/S] the current scope (not necessarily the definition scope)",thedef:"[SymbolDef/S] the definition of this symbol"},$documentation:"Base class for all symbols"}),rt=w("SymbolAccessor",null,{$documentation:"The name of a property accessor (setter/getter function)"},tt),it=w("SymbolDeclaration","init",{$documentation:"A declaration symbol (symbol in var/const, function name or argument, symbol in catch)",$propdoc:{init:"[AST_Node*/S] array of initializers for this declaration."}},tt),ot=w("SymbolVar",null,{$documentation:"Symbol defining a variable"},it),at=w("SymbolConst",null,{$documentation:"A constant declaration"},it),st=w("SymbolFunarg",null,{$documentation:"Symbol naming a function argument"},ot),ut=w("SymbolDefun",null,{$documentation:"Symbol defining a function"},it),ct=w("SymbolLambda",null,{$documentation:"Symbol naming a function expression"},it),lt=w("SymbolCatch",null,{$documentation:"Symbol naming the exception in catch"},it),ft=w("Label","references",{$documentation:"Symbol naming a label (declaration)",$propdoc:{references:"[AST_LabelRef*] a list of nodes referring to this label"}},tt),pt=w("SymbolRef",null,{$documentation:"Reference to some symbol (not definition/declaration)"},tt),ht=w("LabelRef",null,{$documentation:"Reference to a label symbol"},tt),dt=w("This",null,{$documentation:"The `this` symbol"},tt),mt=w("Constant",null,{$documentation:"Base class for all constants",getValue:function(){return this.value}}),vt=w("String","value",{$documentation:"A string literal",$propdoc:{value:"[string] the contents of this string"}},mt),gt=w("Number","value",{$documentation:"A number literal",$propdoc:{value:"[number] the numeric value"}},mt),bt=w("RegExp","value",{$documentation:"A regexp literal",$propdoc:{value:"[RegExp] the actual regexp"}},mt),yt=w("Atom",null,{$documentation:"Base class for atoms"},mt),_t=w("Null",null,{$documentation:"The `null` atom",value:null},yt),At=w("NaN",null,{$documentation:"The impossible value",value:0/0},yt),wt=w("Undefined",null,{$documentation:"The `undefined` value",value:void 0},yt),Et=w("Hole",null,{$documentation:"A hole in an array",value:void 0},yt),St=w("Infinity",null,{$documentation:"The `Infinity` value",value:1/0},yt),xt=w("Boolean",null,{$documentation:"Base class for booleans"},yt),kt=w("False",null,{$documentation:"The `false` atom",value:!1},xt),Ct=w("True",null,{$documentation:"The `true` atom",value:!0},xt);S.prototype={_visit:function(e,n){this.stack.push(e);var t=this.visit(e,n?function(){n.call(e)}:p);return!t&&n&&n.call(e),this.stack.pop(),t},parent:function(e){return this.stack[this.stack.length-2-(e||0)]},push:function(e){this.stack.push(e)},pop:function(){return this.stack.pop()},self:function(){return this.stack[this.stack.length-1]},find_parent:function(e){for(var n=this.stack,t=n.length;--t>=0;){var r=n[t];if(r instanceof e)return r}},has_directive:function(e){return this.find_parent(hn).has_directive(e)},in_boolean_context:function(){for(var e=this.stack,n=e.length,t=e[--n];n>0;){var r=e[--n];if(r instanceof kn&&r.condition===t||r instanceof Yn&&r.condition===t||r instanceof sn&&r.condition===t||r instanceof ln&&r.condition===t||r instanceof zn&&"!"==r.operator&&r.expression===t)return!0;if(!(r instanceof Wn)||"&&"!=r.operator&&"||"!=r.operator)return!1;t=r}},loopcontrol_target:function(e){var n=this.stack;if(e)for(var t=n.length;--t>=0;){var r=n[t];if(r instanceof an&&r.label.name==e.name)return r.body}else for(var t=n.length;--t>=0;){var r=n[t];if(r instanceof Cn||r instanceof ln||r instanceof fn||r instanceof sn)return r}}};var Dt="break case catch const continue debugger default delete do else finally for function if in instanceof new return switch throw try typeof var void while with",Ft="false null true",Tt="abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized this throws transient volatile "+Ft+" "+Dt,Bt="return new delete throw else case";Dt=y(Dt),Tt=y(Tt),Bt=y(Bt),Ft=y(Ft);var Ot=y(o("+-*&%=<>!?|~^")),$t=/^0x[0-9a-f]+$/i,Mt=/^0[0-7]+$/,jt=/^\d*\.?\d*(?:e[+-]?\d*(?:\d\.?|\.?\d)\d*)?$/i,Rt=y(["in","instanceof","typeof","new","void","delete","++","--","+","-","!","~","&","|","^","*","/","%",">>","<<",">>>","<",">","<=",">=","==","===","!=","!==","?","=","+=","-=","/=","*=","%=",">>=","<<=",">>>=","|=","^=","&=","&&","||"]),Lt=y(o(" \n\r \f ")),Nt=y(o("[{(,.;:")),Vt=y(o("[]{}(),;:")),Pt=y(o("gmsiy")),Gt={letter:new RegExp("[\\u0041-\\u005A\\u0061-\\u007A\\u00AA\\u00B5\\u00BA\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u0523\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0621-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971\\u0972\\u097B-\\u097F\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C33\\u0C35-\\u0C39\\u0C3D\\u0C58\\u0C59\\u0C60\\u0C61\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D28\\u0D2A-\\u0D39\\u0D3D\\u0D60\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC\\u0EDD\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8B\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10D0-\\u10FA\\u10FC\\u1100-\\u1159\\u115F-\\u11A2\\u11A8-\\u11F9\\u1200-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u1676\\u1681-\\u169A\\u16A0-\\u16EA\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1877\\u1880-\\u18A8\\u18AA\\u1900-\\u191C\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19A9\\u19C1-\\u19C7\\u1A00-\\u1A16\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u2094\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2183\\u2184\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2C6F\\u2C71-\\u2C7D\\u2C80-\\u2CE4\\u2D00-\\u2D25\\u2D30-\\u2D65\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005\\u3006\\u3031-\\u3035\\u303B\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31B7\\u31F0-\\u31FF\\u3400\\u4DB5\\u4E00\\u9FC3\\uA000-\\uA48C\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA65F\\uA662-\\uA66E\\uA67F-\\uA697\\uA717-\\uA71F\\uA722-\\uA788\\uA78B\\uA78C\\uA7FB-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA90A-\\uA925\\uA930-\\uA946\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAC00\\uD7A3\\uF900-\\uFA2D\\uFA30-\\uFA6A\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]"),non_spacing_mark:new RegExp("[\\u0300-\\u036F\\u0483-\\u0487\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u0610-\\u061A\\u064B-\\u065E\\u0670\\u06D6-\\u06DC\\u06DF-\\u06E4\\u06E7\\u06E8\\u06EA-\\u06ED\\u0711\\u0730-\\u074A\\u07A6-\\u07B0\\u07EB-\\u07F3\\u0816-\\u0819\\u081B-\\u0823\\u0825-\\u0827\\u0829-\\u082D\\u0900-\\u0902\\u093C\\u0941-\\u0948\\u094D\\u0951-\\u0955\\u0962\\u0963\\u0981\\u09BC\\u09C1-\\u09C4\\u09CD\\u09E2\\u09E3\\u0A01\\u0A02\\u0A3C\\u0A41\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A70\\u0A71\\u0A75\\u0A81\\u0A82\\u0ABC\\u0AC1-\\u0AC5\\u0AC7\\u0AC8\\u0ACD\\u0AE2\\u0AE3\\u0B01\\u0B3C\\u0B3F\\u0B41-\\u0B44\\u0B4D\\u0B56\\u0B62\\u0B63\\u0B82\\u0BC0\\u0BCD\\u0C3E-\\u0C40\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C62\\u0C63\\u0CBC\\u0CBF\\u0CC6\\u0CCC\\u0CCD\\u0CE2\\u0CE3\\u0D41-\\u0D44\\u0D4D\\u0D62\\u0D63\\u0DCA\\u0DD2-\\u0DD4\\u0DD6\\u0E31\\u0E34-\\u0E3A\\u0E47-\\u0E4E\\u0EB1\\u0EB4-\\u0EB9\\u0EBB\\u0EBC\\u0EC8-\\u0ECD\\u0F18\\u0F19\\u0F35\\u0F37\\u0F39\\u0F71-\\u0F7E\\u0F80-\\u0F84\\u0F86\\u0F87\\u0F90-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u102D-\\u1030\\u1032-\\u1037\\u1039\\u103A\\u103D\\u103E\\u1058\\u1059\\u105E-\\u1060\\u1071-\\u1074\\u1082\\u1085\\u1086\\u108D\\u109D\\u135F\\u1712-\\u1714\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17B7-\\u17BD\\u17C6\\u17C9-\\u17D3\\u17DD\\u180B-\\u180D\\u18A9\\u1920-\\u1922\\u1927\\u1928\\u1932\\u1939-\\u193B\\u1A17\\u1A18\\u1A56\\u1A58-\\u1A5E\\u1A60\\u1A62\\u1A65-\\u1A6C\\u1A73-\\u1A7C\\u1A7F\\u1B00-\\u1B03\\u1B34\\u1B36-\\u1B3A\\u1B3C\\u1B42\\u1B6B-\\u1B73\\u1B80\\u1B81\\u1BA2-\\u1BA5\\u1BA8\\u1BA9\\u1C2C-\\u1C33\\u1C36\\u1C37\\u1CD0-\\u1CD2\\u1CD4-\\u1CE0\\u1CE2-\\u1CE8\\u1CED\\u1DC0-\\u1DE6\\u1DFD-\\u1DFF\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20F0\\u2CEF-\\u2CF1\\u2DE0-\\u2DFF\\u302A-\\u302F\\u3099\\u309A\\uA66F\\uA67C\\uA67D\\uA6F0\\uA6F1\\uA802\\uA806\\uA80B\\uA825\\uA826\\uA8C4\\uA8E0-\\uA8F1\\uA926-\\uA92D\\uA947-\\uA951\\uA980-\\uA982\\uA9B3\\uA9B6-\\uA9B9\\uA9BC\\uAA29-\\uAA2E\\uAA31\\uAA32\\uAA35\\uAA36\\uAA43\\uAA4C\\uAAB0\\uAAB2-\\uAAB4\\uAAB7\\uAAB8\\uAABE\\uAABF\\uAAC1\\uABE5\\uABE8\\uABED\\uFB1E\\uFE00-\\uFE0F\\uFE20-\\uFE26]"),space_combining_mark:new RegExp("[\\u0903\\u093E-\\u0940\\u0949-\\u094C\\u094E\\u0982\\u0983\\u09BE-\\u09C0\\u09C7\\u09C8\\u09CB\\u09CC\\u09D7\\u0A03\\u0A3E-\\u0A40\\u0A83\\u0ABE-\\u0AC0\\u0AC9\\u0ACB\\u0ACC\\u0B02\\u0B03\\u0B3E\\u0B40\\u0B47\\u0B48\\u0B4B\\u0B4C\\u0B57\\u0BBE\\u0BBF\\u0BC1\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCC\\u0BD7\\u0C01-\\u0C03\\u0C41-\\u0C44\\u0C82\\u0C83\\u0CBE\\u0CC0-\\u0CC4\\u0CC7\\u0CC8\\u0CCA\\u0CCB\\u0CD5\\u0CD6\\u0D02\\u0D03\\u0D3E-\\u0D40\\u0D46-\\u0D48\\u0D4A-\\u0D4C\\u0D57\\u0D82\\u0D83\\u0DCF-\\u0DD1\\u0DD8-\\u0DDF\\u0DF2\\u0DF3\\u0F3E\\u0F3F\\u0F7F\\u102B\\u102C\\u1031\\u1038\\u103B\\u103C\\u1056\\u1057\\u1062-\\u1064\\u1067-\\u106D\\u1083\\u1084\\u1087-\\u108C\\u108F\\u109A-\\u109C\\u17B6\\u17BE-\\u17C5\\u17C7\\u17C8\\u1923-\\u1926\\u1929-\\u192B\\u1930\\u1931\\u1933-\\u1938\\u19B0-\\u19C0\\u19C8\\u19C9\\u1A19-\\u1A1B\\u1A55\\u1A57\\u1A61\\u1A63\\u1A64\\u1A6D-\\u1A72\\u1B04\\u1B35\\u1B3B\\u1B3D-\\u1B41\\u1B43\\u1B44\\u1B82\\u1BA1\\u1BA6\\u1BA7\\u1BAA\\u1C24-\\u1C2B\\u1C34\\u1C35\\u1CE1\\u1CF2\\uA823\\uA824\\uA827\\uA880\\uA881\\uA8B4-\\uA8C3\\uA952\\uA953\\uA983\\uA9B4\\uA9B5\\uA9BA\\uA9BB\\uA9BD-\\uA9C0\\uAA2F\\uAA30\\uAA33\\uAA34\\uAA4D\\uAA7B\\uABE3\\uABE4\\uABE6\\uABE7\\uABE9\\uABEA\\uABEC]"),connector_punctuation:new RegExp("[\\u005F\\u203F\\u2040\\u2054\\uFE33\\uFE34\\uFE4D-\\uFE4F\\uFF3F]")};j.prototype.toString=function(){return this.message+" (line: "+this.line+", col: "+this.col+", pos: "+this.pos+")\n\n"+this.stack};var Ht={},It=y(["typeof","void","delete","--","++","!","~","-","+"]),qt=y(["--","++"]),zt=y(["=","+=","-=","/=","*=","%=",">>=","<<=",">>>=","|=","^=","&="]),Ut=function(e,n){for(var t=0,r=1;t<e.length;++t,++r)for(var i=e[t],o=0;o<i.length;++o)n[i[o]]=r;return n}([["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"]],{}),Wt=r(["for","do","while","switch"]),Yt=r(["atom","num","string","regexp","name"]);P.prototype=new S,function(e){function n(n,t){n.DEFMETHOD("transform",function(n,r){var i,o;return n.push(this),n.before&&(i=n.before(this,t,r)),i===e&&(n.after?(n.stack[n.stack.length-1]=i=this.clone(),t(i,n),o=n.after(i,r),o!==e&&(i=o)):(i=this,t(i,n))),n.pop(),i})}function t(e,n){return Y(e,function(e){return e.transform(n,!0)})}n(J,p),n(an,function(e,n){e.label=e.label.transform(n),e.body=e.body.transform(n)}),n(en,function(e,n){e.body=e.body.transform(n)}),n(nn,function(e,n){e.body=t(e.body,n)}),n(sn,function(e,n){e.condition=e.condition.transform(n),e.body=e.body.transform(n)}),n(ln,function(e,n){e.init&&(e.init=e.init.transform(n)),e.condition&&(e.condition=e.condition.transform(n)),e.step&&(e.step=e.step.transform(n)),e.body=e.body.transform(n)}),n(fn,function(e,n){e.init=e.init.transform(n),e.object=e.object.transform(n),e.body=e.body.transform(n)}),n(pn,function(e,n){e.expression=e.expression.transform(n),e.body=e.body.transform(n)}),n(_n,function(e,n){e.value&&(e.value=e.value.transform(n))}),n(En,function(e,n){e.label&&(e.label=e.label.transform(n))}),n(kn,function(e,n){e.condition=e.condition.transform(n),e.body=e.body.transform(n),e.alternative&&(e.alternative=e.alternative.transform(n))}),n(Cn,function(e,n){e.expression=e.expression.transform(n),e.body=t(e.body,n)}),n(Tn,function(e,n){e.expression=e.expression.transform(n),e.body=t(e.body,n)}),n(Bn,function(e,n){e.body=t(e.body,n),e.bcatch&&(e.bcatch=e.bcatch.transform(n)),e.bfinally&&(e.bfinally=e.bfinally.transform(n))}),n(On,function(e,n){e.argname=e.argname.transform(n),e.body=t(e.body,n)}),n(Mn,function(e,n){e.definitions=t(e.definitions,n)}),n(Ln,function(e,n){e.name=e.name.transform(n),e.value&&(e.value=e.value.transform(n))}),n(mn,function(e,n){e.name&&(e.name=e.name.transform(n)),e.argnames=t(e.argnames,n),e.body=t(e.body,n)}),n(Nn,function(e,n){e.expression=e.expression.transform(n),e.args=t(e.args,n)}),n(Pn,function(e,n){e.car=e.car.transform(n),e.cdr=e.cdr.transform(n)}),n(Hn,function(e,n){e.expression=e.expression.transform(n)}),n(In,function(e,n){e.expression=e.expression.transform(n),e.property=e.property.transform(n)}),n(qn,function(e,n){e.expression=e.expression.transform(n)}),n(Wn,function(e,n){e.left=e.left.transform(n),e.right=e.right.transform(n)}),n(Yn,function(e,n){e.condition=e.condition.transform(n),e.consequent=e.consequent.transform(n),e.alternative=e.alternative.transform(n)}),n(Jn,function(e,n){e.elements=t(e.elements,n)}),n(Kn,function(e,n){e.properties=t(e.properties,n)}),n(Qn,function(e,n){e.value=e.value.transform(n)})}(),G.prototype={unmangleable:function(e){return this.global&&!(e&&e.toplevel)||this.undeclared||!(e&&e.eval)&&(this.scope.uses_eval||this.scope.uses_with)},mangle:function(e){if(!this.mangled_name&&!this.unmangleable(e)){var n=this.scope;this.orig[0]instanceof ct&&!e.screw_ie8&&(n=n.parent_scope),this.mangled_name=n.next_mangled(e)}}},dn.DEFMETHOD("figure_out_scope",function(){var e=this,n=e.parent_scope=null,t=new A,r=0,i=new S(function(e,o){if(e instanceof hn){e.init_scope_vars(r);var a=e.parent_scope=n,s=t;return++r,n=e,t=new A,o(),t=s,n=a,--r,!0}if(e instanceof Z)return e.scope=n,h(n.directives,e.value),!0;if(e instanceof pn)for(var u=n;u;u=u.parent_scope)u.uses_with=!0;else{if(e instanceof an){var c=e.label;if(t.has(c.name))throw new Error(d("Label {name} defined twice",c));return t.set(c.name,c),o(),t.del(c.name),!0}if(e instanceof tt&&(e.scope=n),e instanceof ft&&(e.thedef=e,e.init_scope_vars()),e instanceof ct)n.def_function(e);else if(e instanceof ut)(e.scope=n.parent_scope).def_function(e);else if(e instanceof ot||e instanceof at){var l=n.def_variable(e);l.constant=e instanceof at,l.init=i.parent().value}else e instanceof lt&&n.def_variable(e);if(e instanceof ht){var f=t.get(e.name);if(!f)throw new Error(d("Undefined label {name} [{line},{col}]",{name:e.name,line:e.start.line,col:e.start.col}));e.thedef=f}}});e.walk(i);var o=null,a=e.globals=new A,i=new S(function(n,t){if(n instanceof mn){var r=o;return o=n,t(),o=r,!0}if(n instanceof ht)return n.reference(),!0;if(n instanceof pt){var s=n.name,u=n.scope.find_variable(s);if(u)n.thedef=u;else{var c;if(a.has(s)?c=a.get(s):(c=new G(e,a.size(),n),c.undeclared=!0,c.global=!0,a.set(s,c)),n.thedef=c,"eval"==s&&i.parent()instanceof Nn)for(var l=n.scope;l&&!l.uses_eval;l=l.parent_scope)l.uses_eval=!0;"arguments"==s&&(o.uses_arguments=!0)}return n.reference(),!0}});e.walk(i)}),hn.DEFMETHOD("init_scope_vars",function(e){this.directives=[],this.variables=new A,this.functions=new A,this.uses_with=!1,this.uses_eval=!1,this.parent_scope=null,this.enclosed=[],this.cname=-1,this.nesting=e}),hn.DEFMETHOD("strict",function(){return this.has_directive("use strict")}),mn.DEFMETHOD("init_scope_vars",function(){hn.prototype.init_scope_vars.apply(this,arguments),this.uses_arguments=!1}),pt.DEFMETHOD("reference",function(){var e=this.definition();e.references.push(this);for(var n=this.scope;n&&(h(n.enclosed,e),n!==e.scope);)n=n.parent_scope;this.frame=this.scope.nesting-e.scope.nesting}),ft.DEFMETHOD("init_scope_vars",function(){this.references=[]}),ht.DEFMETHOD("reference",function(){this.thedef.references.push(this)}),hn.DEFMETHOD("find_variable",function(e){return e instanceof tt&&(e=e.name),this.variables.get(e)||this.parent_scope&&this.parent_scope.find_variable(e)}),hn.DEFMETHOD("has_directive",function(e){return this.parent_scope&&this.parent_scope.has_directive(e)||(this.directives.indexOf(e)>=0?this:null)}),hn.DEFMETHOD("def_function",function(e){this.functions.set(e.name,this.def_variable(e))}),hn.DEFMETHOD("def_variable",function(e){var n;return this.variables.has(e.name)?(n=this.variables.get(e.name),n.orig.push(e)):(n=new G(this,this.variables.size(),e),this.variables.set(e.name,n),n.global=!this.parent_scope),e.thedef=n}),hn.DEFMETHOD("next_mangled",function(e){var n=this.enclosed;e:for(;;){var t=Xt(++this.cname);if(T(t)){for(var r=n.length;--r>=0;){var i=n[r],o=i.mangled_name||i.unmangleable(e)&&i.name;if(t==o)continue e}return t}}}),hn.DEFMETHOD("references",function(e){return e instanceof tt&&(e=e.definition()),this.enclosed.indexOf(e)<0?null:e}),tt.DEFMETHOD("unmangleable",function(e){return this.definition().unmangleable(e)}),rt.DEFMETHOD("unmangleable",function(){return!0}),ft.DEFMETHOD("unmangleable",function(){return!1}),tt.DEFMETHOD("unreferenced",function(){return 0==this.definition().references.length&&!(this.scope.uses_eval||this.scope.uses_with)}),tt.DEFMETHOD("undeclared",function(){return this.definition().undeclared}),ht.DEFMETHOD("undeclared",function(){return!1}),ft.DEFMETHOD("undeclared",function(){return!1}),tt.DEFMETHOD("definition",function(){return this.thedef}),tt.DEFMETHOD("global",function(){return this.definition().global}),dn.DEFMETHOD("_default_mangler_options",function(e){return l(e,{except:[],eval:!1,sort:!1,toplevel:!1,screw_ie8:!1})}),dn.DEFMETHOD("mangle_names",function(e){e=this._default_mangler_options(e);var n=-1,t=[],r=new S(function(i,o){if(i instanceof an){var a=n;return o(),n=a,!0}if(i instanceof hn){var s=(r.parent(),[]);return i.variables.each(function(n){e.except.indexOf(n.name)<0&&s.push(n)}),e.sort&&s.sort(function(e,n){return n.references.length-e.references.length}),void t.push.apply(t,s)}if(i instanceof ft){var u;do u=Xt(++n);while(!T(u));return i.mangled_name=u,!0}});this.walk(r),t.forEach(function(n){n.mangle(e)})}),dn.DEFMETHOD("compute_char_frequency",function(e){e=this._default_mangler_options(e);var n=new S(function(n){n instanceof mt?Xt.consider(n.print_to_string()):n instanceof An?Xt.consider("return"):n instanceof wn?Xt.consider("throw"):n instanceof xn?Xt.consider("continue"):n instanceof Sn?Xt.consider("break"):n instanceof Q?Xt.consider("debugger"):n instanceof Z?Xt.consider(n.value):n instanceof cn?Xt.consider("while"):n instanceof un?Xt.consider("do while"):n instanceof kn?(Xt.consider("if"),n.alternative&&Xt.consider("else")):n instanceof jn?Xt.consider("var"):n instanceof Rn?Xt.consider("const"):n instanceof mn?Xt.consider("function"):n instanceof ln?Xt.consider("for"):n instanceof fn?Xt.consider("for in"):n instanceof Cn?Xt.consider("switch"):n instanceof Tn?Xt.consider("case"):n instanceof Fn?Xt.consider("default"):n instanceof pn?Xt.consider("with"):n instanceof et?Xt.consider("set"+n.key):n instanceof nt?Xt.consider("get"+n.key):n instanceof Zn?Xt.consider(n.key):n instanceof Vn?Xt.consider("new"):n instanceof dt?Xt.consider("this"):n instanceof Bn?Xt.consider("try"):n instanceof On?Xt.consider("catch"):n instanceof $n?Xt.consider("finally"):n instanceof tt&&n.unmangleable(e)?Xt.consider(n.name):n instanceof qn||n instanceof Wn?Xt.consider(n.operator):n instanceof Hn&&Xt.consider(n.property)});this.walk(n),Xt.sort()});var Xt=function(){function e(){r=Object.create(null),t=i.split("").map(function(e){return e.charCodeAt(0)}),t.forEach(function(e){r[e]=0})}function n(e){var n="",r=54;do n+=String.fromCharCode(t[e%r]),e=Math.floor(e/r),r=64;while(e>0);return n}var t,r,i="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_0123456789";return n.consider=function(e){for(var n=e.length;--n>=0;){var t=e.charCodeAt(n);t in r&&++r[t]}},n.sort=function(){t=v(t,function(e,n){return k(e)&&!k(n)?1:k(n)&&!k(e)?-1:r[n]-r[e]})},n.reset=e,e(),n.get=function(){return t},n.freq=function(){return r},n}();dn.DEFMETHOD("scope_warnings",function(e){e=l(e,{undeclared:!1,unreferenced:!0,assign_to_global:!0,func_arguments:!0,nested_defuns:!0,eval:!0});var n=new S(function(t){if(e.undeclared&&t instanceof pt&&t.undeclared()&&J.warn("Undeclared symbol: {name} [{file}:{line},{col}]",{name:t.name,file:t.start.file,line:t.start.line,col:t.start.col}),e.assign_to_global){var r=null;t instanceof Xn&&t.left instanceof pt?r=t.left:t instanceof fn&&t.init instanceof pt&&(r=t.init),r&&(r.undeclared()||r.global()&&r.scope!==r.definition().scope)&&J.warn("{msg}: {name} [{file}:{line},{col}]",{msg:r.undeclared()?"Accidental global?":"Assignment to global",name:r.name,file:r.start.file,line:r.start.line,col:r.start.col})}e.eval&&t instanceof pt&&t.undeclared()&&"eval"==t.name&&J.warn("Eval is used [{file}:{line},{col}]",t.start),e.unreferenced&&(t instanceof it||t instanceof ft)&&t.unreferenced()&&J.warn("{type} {name} is declared but not referenced [{file}:{line},{col}]",{type:t instanceof ft?"Label":"Symbol",name:t.name,file:t.start.file,line:t.start.line,col:t.start.col}),e.func_arguments&&t instanceof mn&&t.uses_arguments&&J.warn("arguments used in function {name} [{file}:{line},{col}]",{name:t.name?t.name.name:"anonymous",file:t.start.file,line:t.start.line,col:t.start.col}),e.nested_defuns&&t instanceof bn&&!(n.parent()instanceof hn)&&J.warn('Function {name} declared in nested statement "{type}" [{file}:{line},{col}]',{name:t.name.name,type:n.parent().TYPE,file:t.start.file,line:t.start.line,col:t.start.col})});this.walk(n)}),function(){function e(e,n){e.DEFMETHOD("_codegen",n)}function n(e,n){e.DEFMETHOD("needs_parens",n)}function t(e){var n=e.parent();return n instanceof qn?!0:n instanceof Wn&&!(n instanceof Xn)?!0:n instanceof Nn&&n.expression===this?!0:n instanceof Yn&&n.condition===this?!0:n instanceof Gn&&n.expression===this?!0:void 0}function r(e,n,t){var r=e.length-1;e.forEach(function(e,i){e instanceof rn||(t.indent(),e.print(t),i==r&&n||(t.newline(),n&&t.newline()))})}function i(e,n){e.length>0?n.with_block(function(){r(e,!1,n)}):n.print("{}")}function o(e,n){if(n.option("bracketize"))return void h(e.body,n);if(!e.body)return n.force_semicolon();if(e.body instanceof un&&!n.option("screw_ie8"))return void h(e.body,n);for(var t=e.body;;)if(t instanceof kn){if(!t.alternative)return void h(e.body,n);t=t.alternative}else{if(!(t instanceof on))break;t=t.body}s(e.body,n)}function a(e,n,t){if(t)try{e.walk(new S(function(e){if(e instanceof Wn&&"in"==e.operator)throw n})),e.print(n)}catch(r){if(r!==n)throw r;e.print(n,!0)}else e.print(n)}function s(e,n){n.option("bracketize")?!e||e instanceof rn?n.print("{}"):e instanceof tn?e.print(n):n.with_block(function(){n.indent(),e.print(n),n.newline()}):!e||e instanceof rn?n.force_semicolon():e.print(n)}function u(e){for(var n=e.stack(),t=n.length,r=n[--t],i=n[--t];t>0;){if(i instanceof K&&i.body===r)return!0;if(!(i instanceof Pn&&i.car===r||i instanceof Nn&&i.expression===r&&!(i instanceof Vn)||i instanceof Hn&&i.expression===r||i instanceof In&&i.expression===r||i instanceof Yn&&i.condition===r||i instanceof Wn&&i.left===r||i instanceof Un&&i.expression===r))return!1;r=i,i=n[--t]}}function c(e,n){return 0==e.args.length&&!n.option("beautify")}function l(e){for(var n=e[0],t=n.length,r=1;r<e.length;++r)e[r].length<t&&(n=e[r],t=n.length);return n}function f(e){var n,t=e.toString(10),r=[t.replace(/^0\./,".").replace("e+","e")];return Math.floor(e)===e?(e>=0?r.push("0x"+e.toString(16).toLowerCase(),"0"+e.toString(8)):r.push("-0x"+(-e).toString(16).toLowerCase(),"-0"+(-e).toString(8)),(n=/^(.*?)(0+)$/.exec(e))&&r.push(n[1]+"e"+n[2].length)):(n=/^0?\.(0+)(.*)$/.exec(e))&&r.push(n[2]+"e-"+(n[1].length+n[2].length),t.substr(t.indexOf("."))),l(r)}function h(e,n){return e instanceof tn?void e.print(n):void n.with_block(function(){n.indent(),e.print(n),n.newline()})}function d(e,n){e.DEFMETHOD("add_source_map",function(e){n(this,e)})}function m(e,n){n.add_mapping(e.start)}J.DEFMETHOD("print",function(e,n){function t(){r.add_comments(e),r.add_source_map(e),i(r,e)}var r=this,i=r._codegen;e.push_node(r),n||r.needs_parens(e)?e.with_parens(t):t(),e.pop_node()}),J.DEFMETHOD("print_to_string",function(e){var n=H(e);return this.print(n),n.get()}),J.DEFMETHOD("add_comments",function(e){var n=e.option("comments"),t=this;if(n){var r=t.start;if(r&&!r._comments_dumped){r._comments_dumped=!0;var i=r.comments_before;t instanceof _n&&t.value&&t.value.start.comments_before.length>0&&(i=(i||[]).concat(t.value.start.comments_before),t.value.start.comments_before=[]),n.test?i=i.filter(function(e){return n.test(e.value)}):"function"==typeof n&&(i=i.filter(function(e){return n(t,e)})),i.forEach(function(n){"comment1"==n.type?(e.print("//"+n.value+"\n"),e.indent()):"comment2"==n.type&&(e.print("/*"+n.value+"*/"),r.nlb?(e.print("\n"),e.indent()):e.space())})}}}),n(J,function(){return!1}),n(gn,function(e){return u(e)}),n(Kn,function(e){return u(e)}),n(qn,function(e){var n=e.parent();return n instanceof Gn&&n.expression===this}),n(Pn,function(e){var n=e.parent();return n instanceof Nn||n instanceof qn||n instanceof Wn||n instanceof Ln||n instanceof Hn||n instanceof Jn||n instanceof Qn||n instanceof Yn}),n(Wn,function(e){var n=e.parent();if(n instanceof Nn&&n.expression===this)return!0;if(n instanceof qn)return!0;if(n instanceof Gn&&n.expression===this)return!0;if(n instanceof Wn){var t=n.operator,r=Ut[t],i=this.operator,o=Ut[i];if(r>o||r==o&&this===n.right&&(i!=t||"*"!=i&&"&&"!=i&&"||"!=i))return!0}}),n(Gn,function(e){var n=e.parent();if(n instanceof Vn&&n.expression===this)try{this.walk(new S(function(e){if(e instanceof Nn)throw n}))}catch(t){if(t!==n)throw t;return!0}}),n(Nn,function(e){var n=e.parent();return n instanceof Vn&&n.expression===this}),n(Vn,function(e){var n=e.parent();return c(this,e)&&(n instanceof Gn||n instanceof Nn&&n.expression===this)?!0:void 0}),n(gt,function(e){var n=e.parent();return this.getValue()<0&&n instanceof Gn&&n.expression===this?!0:void 0}),n(At,function(e){var n=e.parent();return n instanceof Gn&&n.expression===this?!0:void 0}),n(Xn,t),n(Yn,t),e(Z,function(e,n){n.print_string(e.value),n.semicolon()}),e(Q,function(e,n){n.print("debugger"),n.semicolon()}),on.DEFMETHOD("_do_print_body",function(e){s(this.body,e)}),e(K,function(e,n){e.body.print(n),n.semicolon()}),e(dn,function(e,n){r(e.body,!0,n),n.print("")}),e(an,function(e,n){e.label.print(n),n.colon(),e.body.print(n)}),e(en,function(e,n){e.body.print(n),n.semicolon()}),e(tn,function(e,n){i(e.body,n)}),e(rn,function(e,n){n.semicolon()}),e(un,function(e,n){n.print("do"),n.space(),e._do_print_body(n),n.space(),n.print("while"),n.space(),n.with_parens(function(){e.condition.print(n)}),n.semicolon()}),e(cn,function(e,n){n.print("while"),n.space(),n.with_parens(function(){e.condition.print(n)}),n.space(),e._do_print_body(n)}),e(ln,function(e,n){n.print("for"),n.space(),n.with_parens(function(){e.init?(e.init instanceof Mn?e.init.print(n):a(e.init,n,!0),n.print(";"),n.space()):n.print(";"),e.condition?(e.condition.print(n),n.print(";"),n.space()):n.print(";"),e.step&&e.step.print(n)}),n.space(),e._do_print_body(n)}),e(fn,function(e,n){n.print("for"),n.space(),n.with_parens(function(){e.init.print(n),n.space(),n.print("in"),n.space(),e.object.print(n)}),n.space(),e._do_print_body(n)}),e(pn,function(e,n){n.print("with"),n.space(),n.with_parens(function(){e.expression.print(n)}),n.space(),e._do_print_body(n)}),mn.DEFMETHOD("_do_print",function(e,n){var t=this;n||e.print("function"),t.name&&(e.space(),t.name.print(e)),e.with_parens(function(){t.argnames.forEach(function(n,t){t&&e.comma(),n.print(e)})}),e.space(),i(t.body,e)}),e(mn,function(e,n){e._do_print(n)}),_n.DEFMETHOD("_do_print",function(e,n){e.print(n),this.value&&(e.space(),this.value.print(e)),e.semicolon()}),e(An,function(e,n){e._do_print(n,"return")}),e(wn,function(e,n){e._do_print(n,"throw")}),En.DEFMETHOD("_do_print",function(e,n){e.print(n),this.label&&(e.space(),this.label.print(e)),e.semicolon()}),e(Sn,function(e,n){e._do_print(n,"break")}),e(xn,function(e,n){e._do_print(n,"continue")
}),e(kn,function(e,n){n.print("if"),n.space(),n.with_parens(function(){e.condition.print(n)}),n.space(),e.alternative?(o(e,n),n.space(),n.print("else"),n.space(),s(e.alternative,n)):e._do_print_body(n)}),e(Cn,function(e,n){n.print("switch"),n.space(),n.with_parens(function(){e.expression.print(n)}),n.space(),e.body.length>0?n.with_block(function(){e.body.forEach(function(e,t){t&&n.newline(),n.indent(!0),e.print(n)})}):n.print("{}")}),Dn.DEFMETHOD("_do_print_body",function(e){this.body.length>0&&(e.newline(),this.body.forEach(function(n){e.indent(),n.print(e),e.newline()}))}),e(Fn,function(e,n){n.print("default:"),e._do_print_body(n)}),e(Tn,function(e,n){n.print("case"),n.space(),e.expression.print(n),n.print(":"),e._do_print_body(n)}),e(Bn,function(e,n){n.print("try"),n.space(),i(e.body,n),e.bcatch&&(n.space(),e.bcatch.print(n)),e.bfinally&&(n.space(),e.bfinally.print(n))}),e(On,function(e,n){n.print("catch"),n.space(),n.with_parens(function(){e.argname.print(n)}),n.space(),i(e.body,n)}),e($n,function(e,n){n.print("finally"),n.space(),i(e.body,n)}),Mn.DEFMETHOD("_do_print",function(e,n){e.print(n),e.space(),this.definitions.forEach(function(n,t){t&&e.comma(),n.print(e)});var t=e.parent(),r=t instanceof ln||t instanceof fn,i=r&&t.init===this;i||e.semicolon()}),e(jn,function(e,n){e._do_print(n,"var")}),e(Rn,function(e,n){e._do_print(n,"const")}),e(Ln,function(e,n){if(e.name.print(n),e.value){n.space(),n.print("="),n.space();var t=n.parent(1),r=t instanceof ln||t instanceof fn;a(e.value,n,r)}}),e(Nn,function(e,n){e.expression.print(n),e instanceof Vn&&c(e,n)||n.with_parens(function(){e.args.forEach(function(e,t){t&&n.comma(),e.print(n)})})}),e(Vn,function(e,n){n.print("new"),n.space(),Nn.prototype._codegen(e,n)}),Pn.DEFMETHOD("_do_print",function(e){this.car.print(e),this.cdr&&(e.comma(),e.should_break()&&(e.newline(),e.indent()),this.cdr.print(e))}),e(Pn,function(e,n){e._do_print(n)}),e(Hn,function(e,n){var t=e.expression;t.print(n),t instanceof gt&&t.getValue()>=0&&(/[xa-f.]/i.test(n.last())||n.print(".")),n.print("."),n.add_mapping(e.end),n.print_name(e.property)}),e(In,function(e,n){e.expression.print(n),n.print("["),e.property.print(n),n.print("]")}),e(zn,function(e,n){var t=e.operator;n.print(t),/^[a-z]/i.test(t)&&n.space(),e.expression.print(n)}),e(Un,function(e,n){e.expression.print(n),n.print(e.operator)}),e(Wn,function(e,n){e.left.print(n),n.space(),n.print(e.operator),n.space(),e.right.print(n)}),e(Yn,function(e,n){e.condition.print(n),n.space(),n.print("?"),n.space(),e.consequent.print(n),n.space(),n.colon(),e.alternative.print(n)}),e(Jn,function(e,n){n.with_square(function(){var t=e.elements,r=t.length;r>0&&n.space(),t.forEach(function(e,t){t&&n.comma(),e.print(n),t===r-1&&e instanceof Et&&n.comma()}),r>0&&n.space()})}),e(Kn,function(e,n){e.properties.length>0?n.with_block(function(){e.properties.forEach(function(e,t){t&&(n.print(","),n.newline()),n.indent(),e.print(n)}),n.newline()}):n.print("{}")}),e(Zn,function(e,n){var t=e.key;n.option("quote_keys")?n.print_string(t+""):("number"==typeof t||!n.option("beautify")&&+t+""==t)&&parseFloat(t)>=0?n.print(f(t)):(Tt(t)?n.option("screw_ie8"):$(t))?n.print_name(t):n.print_string(t),n.colon(),e.value.print(n)}),e(et,function(e,n){n.print("set"),e.value._do_print(n,!0)}),e(nt,function(e,n){n.print("get"),e.value._do_print(n,!0)}),e(tt,function(e,n){var t=e.definition();n.print_name(t?t.mangled_name||t.name:e.name)}),e(wt,function(e,n){n.print("void 0")}),e(Et,p),e(St,function(e,n){n.print("1/0")}),e(At,function(e,n){n.print("0/0")}),e(dt,function(e,n){n.print("this")}),e(mt,function(e,n){n.print(e.getValue())}),e(vt,function(e,n){n.print_string(e.getValue())}),e(gt,function(e,n){n.print(f(e.getValue()))}),e(bt,function(e,n){var t=e.getValue().toString();n.option("ascii_only")&&(t=n.to_ascii(t)),n.print(t);var r=n.parent();r instanceof Wn&&/^in/.test(r.operator)&&r.left===e&&n.print(" ")}),d(J,p),d(Z,m),d(Q,m),d(tt,m),d(yn,m),d(on,m),d(an,p),d(mn,m),d(Cn,m),d(Dn,m),d(tn,m),d(dn,p),d(Vn,m),d(Bn,m),d(On,m),d($n,m),d(Mn,m),d(mt,m),d(Qn,function(e,n){n.add_mapping(e.start,e.key)})}(),I.prototype=new P,f(I.prototype,{option:function(e){return this.options[e]},warn:function(){this.options.warnings&&J.warn.apply(J,arguments)},before:function(e,n){if(e._squeezed)return e;if(e instanceof hn&&(e.drop_unused(this),e=e.hoist_declarations(this)),n(e,this),e=e.optimize(this),e instanceof hn){var t=this.options.warnings;this.options.warnings=!1,e.drop_unused(this),this.options.warnings=t}return e._squeezed=!0,e}}),function(){function e(e,n){e.DEFMETHOD("optimize",function(e){var t=this;if(t._optimized)return t;var r=n(t,e);return r._optimized=!0,r===t?r:r.transform(e)})}function n(e,n,t){return t||(t={}),n&&(t.start||(t.start=n.start),t.end||(t.end=n.end)),new e(t)}function t(e,t,r){if(t instanceof J)return t.transform(e);switch(typeof t){case"string":return n(vt,r,{value:t}).optimize(e);case"number":return n(isNaN(t)?At:gt,r,{value:t}).optimize(e);case"boolean":return n(t?Ct:kt,r).optimize(e);case"undefined":return n(wt,r).optimize(e);default:if(null===t)return n(_t,r).optimize(e);if(t instanceof RegExp)return n(bt,r).optimize(e);throw new Error(d("Can't handle constant of type: {type}",{type:typeof t}))}}function r(e){if(null===e)return[];if(e instanceof tn)return e.body;if(e instanceof rn)return[];if(e instanceof K)return[e];throw new Error("Can't convert thing to statement array")}function i(e){return null===e?!0:e instanceof rn?!0:e instanceof tn?0==e.body.length:!1}function o(e){return e instanceof Cn?e:(e instanceof ln||e instanceof fn||e instanceof sn)&&e.body instanceof tn?e.body:e}function u(e,t){function i(e){var n=[];return e.reduce(function(e,t){return t instanceof tn?(d=!0,e.push.apply(e,i(t.body))):t instanceof rn?d=!0:t instanceof Z?n.indexOf(t.value)<0?(e.push(t),n.push(t.value)):d=!0:e.push(t),e},[])}function a(e,t){var i=t.self(),a=i instanceof mn,s=[];e:for(var u=e.length;--u>=0;){var c=e[u];switch(!0){case a&&c instanceof An&&!c.value&&0==s.length:d=!0;continue e;case c instanceof kn:if(c.body instanceof An){if((a&&0==s.length||s[0]instanceof An&&!s[0].value)&&!c.body.value&&!c.alternative){d=!0;var l=n(en,c.condition,{body:c.condition});s.unshift(l);continue e}if(s[0]instanceof An&&c.body.value&&s[0].value&&!c.alternative){d=!0,c=c.clone(),c.alternative=s[0],s[0]=c.transform(t);continue e}if((0==s.length||s[0]instanceof An)&&c.body.value&&!c.alternative&&a){d=!0,c=c.clone(),c.alternative=s[0]||n(An,c,{value:n(wt,c)}),s[0]=c.transform(t);continue e}if(!c.body.value&&a){d=!0,c=c.clone(),c.condition=c.condition.negate(t),c.body=n(tn,c,{body:r(c.alternative).concat(s)}),c.alternative=null,s=[c.transform(t)];continue e}if(1==s.length&&a&&s[0]instanceof en&&(!c.alternative||c.alternative instanceof en)){d=!0,s.push(n(An,s[0],{value:n(wt,s[0])}).transform(t)),s=r(c.alternative).concat(s),s.unshift(c);continue e}}var p=f(c.body),h=p instanceof En?t.loopcontrol_target(p.label):null;if(p&&(p instanceof An&&!p.value&&a||p instanceof xn&&i===o(h)||p instanceof Sn&&h instanceof tn&&i===h)){p.label&&m(p.label.thedef.references,p.label),d=!0;var v=r(c.body).slice(0,-1);c=c.clone(),c.condition=c.condition.negate(t),c.body=n(tn,c,{body:s}),c.alternative=n(tn,c,{body:v}),s=[c.transform(t)];continue e}var p=f(c.alternative),h=p instanceof En?t.loopcontrol_target(p.label):null;if(p&&(p instanceof An&&!p.value&&a||p instanceof xn&&i===o(h)||p instanceof Sn&&h instanceof tn&&i===h)){p.label&&m(p.label.thedef.references,p.label),d=!0,c=c.clone(),c.body=n(tn,c.body,{body:r(c.body).concat(s)}),c.alternative=n(tn,c.alternative,{body:r(c.alternative).slice(0,-1)}),s=[c.transform(t)];continue e}s.unshift(c);break;default:s.unshift(c)}}return s}function s(e,n){var t=!1,r=e.length,i=n.self();return e=e.reduce(function(e,r){if(t)c(n,r,e);else{if(r instanceof En){var a=n.loopcontrol_target(r.label);r instanceof Sn&&a instanceof tn&&o(a)===i||r instanceof xn&&o(a)===i?r.label&&m(r.label.thedef.references,r.label):e.push(r)}else e.push(r);f(r)&&(t=!0)}return e},[]),d=e.length!=r,e}function u(e,t){function r(){i=Pn.from_array(i),i&&o.push(n(en,i,{body:i})),i=[]}if(e.length<2)return e;var i=[],o=[];return e.forEach(function(e){e instanceof en?i.push(e.body):(r(),o.push(e))}),r(),o=l(o,t),d=o.length!=e.length,o}function l(e,t){function r(e){i.pop();var n=o.body;return n instanceof Pn?n.add(e):n=Pn.cons(n,e),n.transform(t)}var i=[],o=null;return e.forEach(function(e){if(o)if(e instanceof ln){var t={};try{o.body.walk(new S(function(e){if(e instanceof Wn&&"in"==e.operator)throw t})),!e.init||e.init instanceof Mn?e.init||(e.init=o.body,i.pop()):e.init=r(e.init)}catch(a){if(a!==t)throw a}}else e instanceof kn?e.condition=r(e.condition):e instanceof pn?e.expression=r(e.expression):e instanceof _n&&e.value?e.value=r(e.value):e instanceof _n?e.value=r(n(wt,e)):e instanceof Cn&&(e.expression=r(e.expression));i.push(e),o=e instanceof en?e:null}),i}function p(e){var n=null;return e.reduce(function(e,t){return t instanceof Mn&&n&&n.TYPE==t.TYPE?(n.definitions=n.definitions.concat(t.definitions),d=!0):t instanceof ln&&n instanceof Mn&&(!t.init||t.init.TYPE==n.TYPE)?(d=!0,e.pop(),t.init?t.init.definitions=n.definitions.concat(t.init.definitions):t.init=n,e.push(t),n=t):(n=t,e.push(t)),e},[])}function h(e){e.forEach(function(e){e instanceof en&&(e.body=function t(e){return e.transform(new P(function(e){if(e instanceof Nn&&e.expression instanceof gn)return n(zn,e,{operator:"!",expression:e});if(e instanceof Nn)e.expression=t(e.expression);else if(e instanceof Pn)e.car=t(e.car);else if(e instanceof Yn){var r=t(e.condition);if(r!==e.condition){e.condition=r;var i=e.consequent;e.consequent=e.alternative,e.alternative=i}}return e}))}(e.body))})}var d;do d=!1,e=i(e),t.option("dead_code")&&(e=s(e,t)),t.option("if_return")&&(e=a(e,t)),t.option("sequences")&&(e=u(e,t)),t.option("join_vars")&&(e=p(e,t));while(d);return t.option("negate_iife")&&h(e,t),e}function c(e,n,t){e.warn("Dropping unreachable code [{file}:{line},{col}]",n.start),n.walk(new S(function(n){return n instanceof Mn?(e.warn("Declarations in unreachable code! [{file}:{line},{col}]",n.start),n.remove_initializers(),t.push(n),!0):n instanceof bn?(t.push(n),!0):n instanceof hn?!0:void 0}))}function l(e,n){return e.print_to_string().length>n.print_to_string().length?n:e}function f(e){return e&&e.aborts()}function g(e,t){function i(i){i=r(i),e.body instanceof tn?(e.body=e.body.clone(),e.body.body=i.concat(e.body.body.slice(1)),e.body=e.body.transform(t)):e.body=n(tn,e.body,{body:i}).transform(t),g(e,t)}var o=e.body instanceof tn?e.body.body[0]:e.body;o instanceof kn&&(o.body instanceof Sn&&t.loopcontrol_target(o.body.label)===e?(e.condition=e.condition?n(Wn,e.condition,{left:e.condition,operator:"&&",right:o.condition.negate(t)}):o.condition.negate(t),i(o.alternative)):o.alternative instanceof Sn&&t.loopcontrol_target(o.alternative.label)===e&&(e.condition=e.condition?n(Wn,e.condition,{left:e.condition,operator:"&&",right:o.condition}):o.condition,i(o.body)))}function b(e,t){return t.option("booleans")&&t.in_boolean_context()?n(Ct,e):e}e(J,function(e){return e}),J.DEFMETHOD("equivalent_to",function(e){return this.print_to_string()==e.print_to_string()}),function(e){var n=["!","delete"],t=["in","instanceof","==","!=","===","!==","<","<=",">=",">"];e(J,function(){return!1}),e(zn,function(){return a(this.operator,n)}),e(Wn,function(){return a(this.operator,t)||("&&"==this.operator||"||"==this.operator)&&this.left.is_boolean()&&this.right.is_boolean()}),e(Yn,function(){return this.consequent.is_boolean()&&this.alternative.is_boolean()}),e(Xn,function(){return"="==this.operator&&this.right.is_boolean()}),e(Pn,function(){return this.cdr.is_boolean()}),e(Ct,function(){return!0}),e(kt,function(){return!0})}(function(e,n){e.DEFMETHOD("is_boolean",n)}),function(e){e(J,function(){return!1}),e(vt,function(){return!0}),e(zn,function(){return"typeof"==this.operator}),e(Wn,function(e){return"+"==this.operator&&(this.left.is_string(e)||this.right.is_string(e))}),e(Xn,function(e){return("="==this.operator||"+="==this.operator)&&this.right.is_string(e)}),e(Pn,function(e){return this.cdr.is_string(e)}),e(Yn,function(e){return this.consequent.is_string(e)&&this.alternative.is_string(e)}),e(Nn,function(e){return e.option("unsafe")&&this.expression instanceof pt&&"String"==this.expression.name&&this.expression.undeclared()})}(function(e,n){e.DEFMETHOD("is_string",n)}),function(e){function n(e){return e._eval()}J.DEFMETHOD("evaluate",function(n){if(!n.option("evaluate"))return[this];try{var r=this._eval(),i=t(n,r,this);return[l(i,this),r]}catch(o){if(o!==e)throw o;return[this]}}),e(K,function(){throw new Error(d("Cannot evaluate a statement [{file}:{line},{col}]",this.start))}),e(gn,function(){throw e}),e(J,function(){throw e}),e(mt,function(){return this.getValue()}),e(zn,function(){var t=this.expression;switch(this.operator){case"!":return!n(t);case"typeof":if(t instanceof gn)return"function";if(t=n(t),t instanceof RegExp)throw e;return typeof t;case"void":return void n(t);case"~":return~n(t);case"-":if(t=n(t),0===t)throw e;return-t;case"+":return+n(t)}throw e}),e(Wn,function(){var t=this.left,r=this.right;switch(this.operator){case"&&":return n(t)&&n(r);case"||":return n(t)||n(r);case"|":return n(t)|n(r);case"&":return n(t)&n(r);case"^":return n(t)^n(r);case"+":return n(t)+n(r);case"*":return n(t)*n(r);case"/":return n(t)/n(r);case"%":return n(t)%n(r);case"-":return n(t)-n(r);case"<<":return n(t)<<n(r);case">>":return n(t)>>n(r);case">>>":return n(t)>>>n(r);case"==":return n(t)==n(r);case"===":return n(t)===n(r);case"!=":return n(t)!=n(r);case"!==":return n(t)!==n(r);case"<":return n(t)<n(r);case"<=":return n(t)<=n(r);case">":return n(t)>n(r);case">=":return n(t)>=n(r);case"in":return n(t)in n(r);case"instanceof":return n(t)instanceof n(r)}throw e}),e(Yn,function(){return n(n(this.condition)?this.consequent:this.alternative)}),e(pt,function(){var t=this.definition();if(t&&t.constant&&t.init)return n(t.init);throw e})}(function(e,n){e.DEFMETHOD("_eval",n)}),function(e){function t(e){return n(zn,e,{operator:"!",expression:e})}e(J,function(){return t(this)}),e(K,function(){throw new Error("Cannot negate a statement")}),e(gn,function(){return t(this)}),e(zn,function(){return"!"==this.operator?this.expression:t(this)}),e(Pn,function(e){var n=this.clone();return n.cdr=n.cdr.negate(e),n}),e(Yn,function(e){var n=this.clone();return n.consequent=n.consequent.negate(e),n.alternative=n.alternative.negate(e),l(t(this),n)}),e(Wn,function(e){var n=this.clone(),r=this.operator;if(e.option("unsafe_comps"))switch(r){case"<=":return n.operator=">",n;case"<":return n.operator=">=",n;case">=":return n.operator="<",n;case">":return n.operator="<=",n}switch(r){case"==":return n.operator="!=",n;case"!=":return n.operator="==",n;case"===":return n.operator="!==",n;case"!==":return n.operator="===",n;case"&&":return n.operator="||",n.left=n.left.negate(e),n.right=n.right.negate(e),l(t(this),n);case"||":return n.operator="&&",n.left=n.left.negate(e),n.right=n.right.negate(e),l(t(this),n)}return t(this)})}(function(e,n){e.DEFMETHOD("negate",function(e){return n.call(this,e)})}),function(e){e(J,function(){return!0}),e(rn,function(){return!1}),e(mt,function(){return!1}),e(dt,function(){return!1}),e(nn,function(){for(var e=this.body.length;--e>=0;)if(this.body[e].has_side_effects())return!0;return!1}),e(en,function(){return this.body.has_side_effects()}),e(bn,function(){return!0}),e(gn,function(){return!1}),e(Wn,function(){return this.left.has_side_effects()||this.right.has_side_effects()}),e(Xn,function(){return!0}),e(Yn,function(){return this.condition.has_side_effects()||this.consequent.has_side_effects()||this.alternative.has_side_effects()}),e(qn,function(){return"delete"==this.operator||"++"==this.operator||"--"==this.operator||this.expression.has_side_effects()}),e(pt,function(){return!1}),e(Kn,function(){for(var e=this.properties.length;--e>=0;)if(this.properties[e].has_side_effects())return!0;return!1}),e(Qn,function(){return this.value.has_side_effects()}),e(Jn,function(){for(var e=this.elements.length;--e>=0;)if(this.elements[e].has_side_effects())return!0;return!1}),e(Gn,function(){return!0}),e(Pn,function(){return this.car.has_side_effects()||this.cdr.has_side_effects()})}(function(e,n){e.DEFMETHOD("has_side_effects",n)}),function(e){function n(){var e=this.body.length;return e>0&&f(this.body[e-1])}e(K,function(){return null}),e(yn,function(){return this}),e(tn,n),e(Dn,n),e(kn,function(){return this.alternative&&f(this.body)&&f(this.alternative)})}(function(e,n){e.DEFMETHOD("aborts",n)}),e(Z,function(e){return e.scope.has_directive(e.value)!==e.scope?n(rn,e):e}),e(Q,function(e,t){return t.option("drop_debugger")?n(rn,e):e}),e(an,function(e,t){return e.body instanceof Sn&&t.loopcontrol_target(e.body.label)===e.body?n(rn,e):0==e.label.references.length?e.body:e}),e(nn,function(e,n){return e.body=u(e.body,n),e}),e(tn,function(e,t){switch(e.body=u(e.body,t),e.body.length){case 1:return e.body[0];case 0:return n(rn,e)}return e}),hn.DEFMETHOD("drop_unused",function(e){var t=this;if(e.option("unused")&&!(t instanceof dn)&&!t.uses_eval){var r=[],i=new A,o=this,s=new S(function(e,n){if(e!==t){if(e instanceof bn)return i.add(e.name.name,e),!0;if(e instanceof Mn&&o===t)return e.definitions.forEach(function(e){e.value&&(i.add(e.name.name,e.value),e.value.has_side_effects()&&e.value.walk(s))}),!0;if(e instanceof pt)return h(r,e.definition()),!0;if(e instanceof hn){var a=o;return o=e,n(),o=a,!0}}});t.walk(s);for(var u=0;u<r.length;++u)r[u].orig.forEach(function(e){var n=i.get(e.name);n&&n.forEach(function(e){var n=new S(function(e){e instanceof pt&&h(r,e.definition())});e.walk(n)})});var c=new P(function(i,o,s){if(i instanceof mn&&!(i instanceof vn))for(var u=i.argnames,l=u.length;--l>=0;){var f=u[l];if(!f.unreferenced())break;u.pop(),e.warn("Dropping unused function argument {name} [{file}:{line},{col}]",{name:f.name,file:f.start.file,line:f.start.line,col:f.start.col})}if(i instanceof bn&&i!==t)return a(i.name.definition(),r)?i:(e.warn("Dropping unused function {name} [{file}:{line},{col}]",{name:i.name.name,file:i.name.start.file,line:i.name.start.line,col:i.name.start.col}),n(rn,i));if(i instanceof Mn&&!(c.parent()instanceof fn)){var p=i.definitions.filter(function(n){if(a(n.name.definition(),r))return!0;var t={name:n.name.name,file:n.name.start.file,line:n.name.start.line,col:n.name.start.col};return n.value&&n.value.has_side_effects()?(n._unused_side_effects=!0,e.warn("Side effects in initialization of unused variable {name} [{file}:{line},{col}]",t),!0):(e.warn("Dropping unused variable {name} [{file}:{line},{col}]",t),!1)});p=v(p,function(e,n){return!e.value&&n.value?-1:!n.value&&e.value?1:0});for(var h=[],l=0;l<p.length;){var d=p[l];d._unused_side_effects?(h.push(d.value),p.splice(l,1)):(h.length>0&&(h.push(d.value),d.value=Pn.from_array(h),h=[]),++l)}return h=h.length>0?n(tn,i,{body:[n(en,i,{body:Pn.from_array(h)})]}):null,0!=p.length||h?0==p.length?h:(i.definitions=p,h&&(h.body.unshift(i),i=h),i):n(rn,i)}if(i instanceof ln&&i.init instanceof tn){o(i,this);var m=i.init.body.slice(0,-1);return i.init=i.init.body.slice(-1)[0].body,m.push(i),s?Y.splice(m):n(tn,i,{body:m})}return i instanceof hn&&i!==t?i:void 0});t.transform(c)}}),hn.DEFMETHOD("hoist_declarations",function(e){var t=e.option("hoist_funs"),r=e.option("hoist_vars"),i=this;if(t||r){var o=[],a=[],u=new A,c=0,l=0;i.walk(new S(function(e){return e instanceof hn&&e!==i?!0:e instanceof jn?(++l,!0):void 0})),r=r&&l>1;var f=new P(function(e){if(e!==i){if(e instanceof Z)return o.push(e),n(rn,e);if(e instanceof bn&&t)return a.push(e),n(rn,e);if(e instanceof jn&&r){e.definitions.forEach(function(e){u.set(e.name.name,e),++c});var s=e.to_assignments(),l=f.parent();return l instanceof fn&&l.init===e?null==s?e.definitions[0].name:s:l instanceof ln&&l.init===e?s:s?n(en,e,{body:s}):n(rn,e)}if(e instanceof hn)return e}});if(i=i.transform(f),c>0){var p=[];if(u.each(function(e,n){i instanceof mn&&s(function(n){return n.name==e.name.name},i.argnames)?u.del(n):(e=e.clone(),e.value=null,p.push(e),u.set(n,e))}),p.length>0){for(var h=0;h<i.body.length;){if(i.body[h]instanceof en){var d,v,g=i.body[h].body;if(g instanceof Xn&&"="==g.operator&&(d=g.left)instanceof tt&&u.has(d.name)){var b=u.get(d.name);if(b.value)break;b.value=g.right,m(p,b),p.push(b),i.body.splice(h,1);continue}if(g instanceof Pn&&(v=g.car)instanceof Xn&&"="==v.operator&&(d=v.left)instanceof tt&&u.has(d.name)){var b=u.get(d.name);if(b.value)break;b.value=v.right,m(p,b),p.push(b),i.body[h].body=g.cdr;continue}}if(i.body[h]instanceof rn)i.body.splice(h,1);else{if(!(i.body[h]instanceof tn))break;var y=[h,1].concat(i.body[h].body);i.body.splice.apply(i.body,y)}}p=n(jn,i,{definitions:p}),a.push(p)}}i.body=o.concat(a,i.body)}return i}),e(en,function(e,t){return t.option("side_effects")&&!e.body.has_side_effects()?(t.warn("Dropping side-effect-free statement [{file}:{line},{col}]",e.start),n(rn,e)):e}),e(sn,function(e,t){var r=e.condition.evaluate(t);if(e.condition=r[0],!t.option("loops"))return e;if(r.length>1){if(r[1])return n(ln,e,{body:e.body});if(e instanceof cn&&t.option("dead_code")){var i=[];return c(t,e.body,i),n(tn,e,{body:i})}}return e}),e(cn,function(e,t){return t.option("loops")?(e=sn.prototype.optimize.call(e,t),e instanceof cn&&(g(e,t),e=n(ln,e,e).transform(t)),e):e}),e(ln,function(e,t){var r=e.condition;if(r&&(r=r.evaluate(t),e.condition=r[0]),!t.option("loops"))return e;if(r&&r.length>1&&!r[1]&&t.option("dead_code")){var i=[];return e.init instanceof K?i.push(e.init):e.init&&i.push(n(en,e.init,{body:e.init})),c(t,e.body,i),n(tn,e,{body:i})}return g(e,t),e}),e(kn,function(e,t){if(!t.option("conditionals"))return e;var r=e.condition.evaluate(t);if(e.condition=r[0],r.length>1)if(r[1]){if(t.warn("Condition always true [{file}:{line},{col}]",e.condition.start),t.option("dead_code")){var o=[];return e.alternative&&c(t,e.alternative,o),o.push(e.body),n(tn,e,{body:o}).transform(t)}}else if(t.warn("Condition always false [{file}:{line},{col}]",e.condition.start),t.option("dead_code")){var o=[];return c(t,e.body,o),e.alternative&&o.push(e.alternative),n(tn,e,{body:o}).transform(t)}i(e.alternative)&&(e.alternative=null);var a=e.condition.negate(t),s=l(e.condition,a)===a;if(e.alternative&&s){s=!1,e.condition=a;var u=e.body;e.body=e.alternative||n(rn),e.alternative=u}if(i(e.body)&&i(e.alternative))return n(en,e.condition,{body:e.condition}).transform(t);if(e.body instanceof en&&e.alternative instanceof en)return n(en,e,{body:n(Yn,e,{condition:e.condition,consequent:e.body.body,alternative:e.alternative.body})}).transform(t);if(i(e.alternative)&&e.body instanceof en)return s?n(en,e,{body:n(Wn,e,{operator:"||",left:a,right:e.body.body})}).transform(t):n(en,e,{body:n(Wn,e,{operator:"&&",left:e.condition,right:e.body.body})}).transform(t);if(e.body instanceof rn&&e.alternative&&e.alternative instanceof en)return n(en,e,{body:n(Wn,e,{operator:"||",left:e.condition,right:e.alternative.body})}).transform(t);if(e.body instanceof _n&&e.alternative instanceof _n&&e.body.TYPE==e.alternative.TYPE)return n(e.body.CTOR,e,{value:n(Yn,e,{condition:e.condition,consequent:e.body.value||n(wt,e.body).optimize(t),alternative:e.alternative.value||n(wt,e.alternative).optimize(t)})}).transform(t);if(e.body instanceof kn&&!e.body.alternative&&!e.alternative&&(e.condition=n(Wn,e.condition,{operator:"&&",left:e.condition,right:e.body.condition}).transform(t),e.body=e.body.body),f(e.body)&&e.alternative){var p=e.alternative;return e.alternative=null,n(tn,e,{body:[e,p]}).transform(t)}if(f(e.alternative)){var h=e.body;return e.body=e.alternative,e.condition=s?a:e.condition.negate(t),e.alternative=null,n(tn,e,{body:[e,h]}).transform(t)}return e}),e(Cn,function(e,t){if(0==e.body.length&&t.option("conditionals"))return n(en,e,{body:e.expression}).transform(t);for(;;){var r=e.body[e.body.length-1];if(r){var i=r.body[r.body.length-1];if(i instanceof Sn&&o(t.loopcontrol_target(i.label))===e&&r.body.pop(),r instanceof Fn&&0==r.body.length){e.body.pop();continue}}break}var a=e.expression.evaluate(t);e:if(2==a.length)try{if(e.expression=a[0],!t.option("dead_code"))break e;var s=a[1],u=!1,c=!1,l=!1,p=!1,h=!1,d=new P(function(r,i,o){if(r instanceof mn||r instanceof en)return r;if(r instanceof Cn&&r===e)return r=r.clone(),i(r,this),h?r:n(tn,r,{body:r.body.reduce(function(e,n){return e.concat(n.body)},[])}).transform(t);if(r instanceof kn||r instanceof Bn){var a=u;return u=!c,i(r,this),u=a,r}if(r instanceof on||r instanceof Cn){var a=c;return c=!0,i(r,this),c=a,r}if(r instanceof Sn&&this.loopcontrol_target(r.label)===e)return u?(h=!0,r):c?r:(p=!0,o?Y.skip:n(rn,r));if(r instanceof Dn&&this.parent()===e){if(p)return Y.skip;if(r instanceof Tn){var d=r.expression.evaluate(t);if(d.length<2)throw e;return d[1]===s||l?(l=!0,f(r)&&(p=!0),i(r,this),r):Y.skip}return i(r,this),r}});d.stack=t.stack.slice(),e=e.transform(d)}catch(m){if(m!==e)throw m}return e}),e(Tn,function(e,n){return e.body=u(e.body,n),e}),e(Bn,function(e,n){return e.body=u(e.body,n),e}),Mn.DEFMETHOD("remove_initializers",function(){this.definitions.forEach(function(e){e.value=null})}),Mn.DEFMETHOD("to_assignments",function(){var e=this.definitions.reduce(function(e,t){if(t.value){var r=n(pt,t.name,t.name);e.push(n(Xn,t,{operator:"=",left:r,right:t.value}))}return e},[]);return 0==e.length?null:Pn.from_array(e)}),e(Mn,function(e){return 0==e.definitions.length?n(rn,e):e}),e(gn,function(e,n){return e=mn.prototype.optimize.call(e,n),n.option("unused")&&e.name&&e.name.unreferenced()&&(e.name=null),e}),e(Nn,function(e,t){if(t.option("unsafe")){var r=e.expression;if(r instanceof pt&&r.undeclared())switch(r.name){case"Array":if(1!=e.args.length)return n(Jn,e,{elements:e.args});break;case"Object":if(0==e.args.length)return n(Kn,e,{properties:[]});break;case"String":return 0==e.args.length?n(vt,e,{value:""}):n(Wn,e,{left:e.args[0],operator:"+",right:n(vt,e,{value:""})});case"Function":if(_(e.args,function(e){return e instanceof vt}))try{var i="(function("+e.args.slice(0,-1).map(function(e){return e.value}).join(",")+"){"+e.args[e.args.length-1].value+"})()",o=V(i);o.figure_out_scope();var a=new I(t.options);o=o.transform(a),o.figure_out_scope(),o.mangle_names();var s=o.body[0].body.expression,u=s.argnames.map(function(t,r){return n(vt,e.args[r],{value:t.print_to_string()})}),i=H();return tn.prototype._codegen.call(s,s,i),i=i.toString().replace(/^\{|\}$/g,""),u.push(n(vt,e.args[e.args.length-1],{value:i})),e.args=u,e}catch(c){c instanceof j?(t.warn("Error parsing code passed to new Function [{file}:{line},{col}]",e.args[e.args.length-1].start),t.warn(c.toString())):console.log(c)}}else if(r instanceof Hn&&"toString"==r.property&&0==e.args.length)return n(Wn,e,{left:n(vt,e,{value:""}),operator:"+",right:r.expression}).transform(t)}return t.option("side_effects")&&e.expression instanceof gn&&0==e.args.length&&!nn.prototype.has_side_effects.call(e.expression)?n(wt,e).transform(t):e}),e(Vn,function(e,t){if(t.option("unsafe")){var r=e.expression;if(r instanceof pt&&r.undeclared())switch(r.name){case"Object":case"RegExp":case"Function":case"Error":case"Array":return n(Nn,e,e).transform(t)}}return e}),e(Pn,function(e,n){if(!n.option("side_effects"))return e;if(!e.car.has_side_effects()){var t;if(!(e.cdr instanceof pt&&"eval"==e.cdr.name&&e.cdr.undeclared()&&(t=n.parent())instanceof Nn&&t.expression===e))return e.cdr}if(n.option("cascade")){if(e.car instanceof Xn&&!e.car.left.has_side_effects()&&e.car.left.equivalent_to(e.cdr))return e.car;if(!e.car.has_side_effects()&&!e.cdr.has_side_effects()&&e.car.equivalent_to(e.cdr))return e.car}return e}),qn.DEFMETHOD("lift_sequences",function(e){if(e.option("sequences")&&this.expression instanceof Pn){var n=this.expression,t=n.to_array();return this.expression=t.pop(),t.push(this),n=Pn.from_array(t).transform(e)}return this}),e(Un,function(e,n){return e.lift_sequences(n)}),e(zn,function(e,t){e=e.lift_sequences(t);var r=e.expression;if(t.option("booleans")&&t.in_boolean_context()){switch(e.operator){case"!":if(r instanceof zn&&"!"==r.operator)return r.expression;break;case"typeof":return t.warn("Boolean expression always true [{file}:{line},{col}]",e.start),n(Ct,e)}r instanceof Wn&&"!"==e.operator&&(e=l(e,r.negate(t)))}return e.evaluate(t)[0]}),Wn.DEFMETHOD("lift_sequences",function(e){if(e.option("sequences")){if(this.left instanceof Pn){var n=this.left,t=n.to_array();return this.left=t.pop(),t.push(this),n=Pn.from_array(t).transform(e)}if(this.right instanceof Pn&&"||"!=this.operator&&"&&"!=this.operator&&!this.left.has_side_effects()){var n=this.right,t=n.to_array();return this.right=t.pop(),t.push(this),n=Pn.from_array(t).transform(e)}}return this});var w=y("== === != !== * & | ^");e(Wn,function(e,t){var r=t.has_directive("use asm")?p:function(n,t){if(t||!e.left.has_side_effects()&&!e.right.has_side_effects()){n&&(e.operator=n);var r=e.left;e.left=e.right,e.right=r}};if(w(e.operator)&&e.right instanceof mt&&!(e.left instanceof mt)&&r(null,!0),e=e.lift_sequences(t),t.option("comparisons"))switch(e.operator){case"===":case"!==":(e.left.is_string(t)&&e.right.is_string(t)||e.left.is_boolean()&&e.right.is_boolean())&&(e.operator=e.operator.substr(0,2));case"==":case"!=":e.left instanceof vt&&"undefined"==e.left.value&&e.right instanceof zn&&"typeof"==e.right.operator&&t.option("unsafe")&&(e.right.expression instanceof pt&&e.right.expression.undeclared()||(e.right=e.right.expression,e.left=n(wt,e.left).optimize(t),2==e.operator.length&&(e.operator+="=")))}if(t.option("booleans")&&t.in_boolean_context())switch(e.operator){case"&&":var i=e.left.evaluate(t),o=e.right.evaluate(t);if(i.length>1&&!i[1]||o.length>1&&!o[1])return t.warn("Boolean && always false [{file}:{line},{col}]",e.start),n(kt,e);if(i.length>1&&i[1])return o[0];if(o.length>1&&o[1])return i[0];break;case"||":var i=e.left.evaluate(t),o=e.right.evaluate(t);if(i.length>1&&i[1]||o.length>1&&o[1])return t.warn("Boolean || always true [{file}:{line},{col}]",e.start),n(Ct,e);if(i.length>1&&!i[1])return o[0];if(o.length>1&&!o[1])return i[0];break;case"+":var i=e.left.evaluate(t),o=e.right.evaluate(t);if(i.length>1&&i[0]instanceof vt&&i[1]||o.length>1&&o[0]instanceof vt&&o[1])return t.warn("+ in boolean context always true [{file}:{line},{col}]",e.start),n(Ct,e)}var a=e.evaluate(t);if(a.length>1&&l(a[0],e)!==e)return a[0];if(t.option("comparisons")){if(!(t.parent()instanceof Wn)||t.parent()instanceof Xn){var s=n(zn,e,{operator:"!",expression:e.negate(t)});e=l(e,s)}switch(e.operator){case"<":r(">");break;case"<=":r(">=")}}return"+"==e.operator&&e.right instanceof vt&&""===e.right.getValue()&&e.left instanceof Wn&&"+"==e.left.operator&&e.left.is_string(t)?e.left:e}),e(pt,function(e,r){if(e.undeclared()){var i=r.option("global_defs");if(i&&i.hasOwnProperty(e.name))return t(r,i[e.name],e);switch(e.name){case"undefined":return n(wt,e);case"NaN":return n(At,e);case"Infinity":return n(St,e)}}return e}),e(wt,function(e,t){if(t.option("unsafe")){var r=t.find_parent(hn),i=r.find_variable("undefined");if(i){var o=n(pt,e,{name:"undefined",scope:r,thedef:i});return o.reference(),o}}return e});var E=["+","-","/","*","%",">>","<<",">>>","|","^","&"];e(Xn,function(e,n){return e=e.lift_sequences(n),"="==e.operator&&e.left instanceof pt&&e.right instanceof Wn&&e.right.left instanceof pt&&e.right.left.name==e.left.name&&a(e.right.operator,E)&&(e.operator=e.right.operator+"=",e.right=e.right.right),e}),e(Yn,function(e,t){if(!t.option("conditionals"))return e;if(e.condition instanceof Pn){var r=e.condition.car;return e.condition=e.condition.cdr,Pn.cons(r,e)}var i=e.condition.evaluate(t);if(i.length>1)return i[1]?(t.warn("Condition always true [{file}:{line},{col}]",e.start),e.consequent):(t.warn("Condition always false [{file}:{line},{col}]",e.start),e.alternative);var o=i[0].negate(t);l(i[0],o)===o&&(e=n(Yn,e,{condition:o,consequent:e.alternative,alternative:e.consequent}));var a=e.consequent,s=e.alternative;
return a instanceof Xn&&s instanceof Xn&&a.operator==s.operator&&a.left.equivalent_to(s.left)&&(e=n(Xn,e,{operator:a.operator,left:a.left,right:n(Yn,e,{condition:e.condition,consequent:a.right,alternative:s.right})})),e}),e(xt,function(e,t){if(t.option("booleans")){var r=t.parent();return r instanceof Wn&&("=="==r.operator||"!="==r.operator)?(t.warn("Non-strict equality against boolean: {operator} {value} [{file}:{line},{col}]",{operator:r.operator,value:e.value,file:r.start.file,line:r.start.line,col:r.start.col}),n(gt,e,{value:+e.value})):n(zn,e,{operator:"!",expression:n(gt,e,{value:1-e.value})})}return e}),e(In,function(e,t){var r=e.property;return r instanceof vt&&t.option("properties")&&(r=r.getValue(),Tt(r)?t.option("screw_ie8"):$(r))?n(Hn,e,{expression:e.expression,property:r}):e}),e(Jn,b),e(Kn,b),e(bt,b)}(),function(){function e(e){var r="prefix"in e?e.prefix:"UnaryExpression"==e.type?!0:!1;return new(r?zn:Un)({start:n(e),end:t(e),operator:e.operator,expression:i(e.argument)})}function n(e){return new X({file:e.loc&&e.loc.source,line:e.loc&&e.loc.start.line,col:e.loc&&e.loc.start.column,pos:e.start,endpos:e.start})}function t(e){return new X({file:e.loc&&e.loc.source,line:e.loc&&e.loc.end.line,col:e.loc&&e.loc.end.column,pos:e.end,endpos:e.end})}function r(e,r,a){var s="function From_Moz_"+e+"(M){\n";return s+="return new mytype({\nstart: my_start_token(M),\nend: my_end_token(M)",a&&a.split(/\s*,\s*/).forEach(function(e){var n=/([a-z0-9$_]+)(=|@|>|%)([a-z0-9$_]+)/i.exec(e);if(!n)throw new Error("Can't understand property map: "+e);var t="M."+n[1],r=n[2],i=n[3];if(s+=",\n"+i+": ","@"==r)s+=t+".map(from_moz)";else if(">"==r)s+="from_moz("+t+")";else if("="==r)s+=t;else{if("%"!=r)throw new Error("Can't understand operator in propmap: "+e);s+="from_moz("+t+").body"}}),s+="\n})}",s=new Function("mytype","my_start_token","my_end_token","from_moz","return("+s+")")(r,n,t,i),o[e]=s}function i(e){a.push(e);var n=null!=e?o[e.type](e):null;return a.pop(),n}var o={TryStatement:function(e){return new Bn({start:n(e),end:t(e),body:i(e.block).body,bcatch:i(e.handlers[0]),bfinally:e.finalizer?new $n(i(e.finalizer)):null})},CatchClause:function(e){return new On({start:n(e),end:t(e),argname:i(e.param),body:i(e.body).body})},ObjectExpression:function(e){return new Kn({start:n(e),end:t(e),properties:e.properties.map(function(e){var r=e.key,o="Identifier"==r.type?r.name:r.value,a={start:n(r),end:t(e.value),key:o,value:i(e.value)};switch(e.kind){case"init":return new Zn(a);case"set":return a.value.name=i(r),new et(a);case"get":return a.value.name=i(r),new nt(a)}})})},SequenceExpression:function(e){return Pn.from_array(e.expressions.map(i))},MemberExpression:function(e){return new(e.computed?In:Hn)({start:n(e),end:t(e),property:e.computed?i(e.property):e.property.name,expression:i(e.object)})},SwitchCase:function(e){return new(e.test?Tn:Fn)({start:n(e),end:t(e),expression:i(e.test),body:e.consequent.map(i)})},Literal:function(e){var r=e.value,i={start:n(e),end:t(e)};if(null===r)return new _t(i);switch(typeof r){case"string":return i.value=r,new vt(i);case"number":return i.value=r,new gt(i);case"boolean":return new(r?Ct:kt)(i);default:return i.value=r,new bt(i)}},UnaryExpression:e,UpdateExpression:e,Identifier:function(e){var r=a[a.length-2];return new("this"==e.name?dt:"LabeledStatement"==r.type?ft:"VariableDeclarator"==r.type&&r.id===e?"const"==r.kind?at:ot:"FunctionExpression"==r.type?r.id===e?ct:st:"FunctionDeclaration"==r.type?r.id===e?ut:st:"CatchClause"==r.type?lt:"BreakStatement"==r.type||"ContinueStatement"==r.type?ht:pt)({start:n(e),end:t(e),name:e.name})}};r("Node",J),r("Program",dn,"body@body"),r("Function",gn,"id>name, params@argnames, body%body"),r("EmptyStatement",rn),r("BlockStatement",tn,"body@body"),r("ExpressionStatement",en,"expression>body"),r("IfStatement",kn,"test>condition, consequent>body, alternate>alternative"),r("LabeledStatement",an,"label>label, body>body"),r("BreakStatement",Sn,"label>label"),r("ContinueStatement",xn,"label>label"),r("WithStatement",pn,"object>expression, body>body"),r("SwitchStatement",Cn,"discriminant>expression, cases@body"),r("ReturnStatement",An,"argument>value"),r("ThrowStatement",wn,"argument>value"),r("WhileStatement",cn,"test>condition, body>body"),r("DoWhileStatement",un,"test>condition, body>body"),r("ForStatement",ln,"init>init, test>condition, update>step, body>body"),r("ForInStatement",fn,"left>init, right>object, body>body"),r("DebuggerStatement",Q),r("FunctionDeclaration",bn,"id>name, params@argnames, body%body"),r("VariableDeclaration",jn,"declarations@definitions"),r("VariableDeclarator",Ln,"id>name, init>value"),r("ThisExpression",dt),r("ArrayExpression",Jn,"elements@elements"),r("FunctionExpression",gn,"id>name, params@argnames, body%body"),r("BinaryExpression",Wn,"operator=operator, left>left, right>right"),r("AssignmentExpression",Xn,"operator=operator, left>left, right>right"),r("LogicalExpression",Wn,"operator=operator, left>left, right>right"),r("ConditionalExpression",Yn,"test>condition, consequent>consequent, alternate>alternative"),r("NewExpression",Vn,"callee>expression, arguments@args"),r("CallExpression",Nn,"callee>expression, arguments@args");var a=null;J.from_mozilla_ast=function(e){var n=a;a=[];var t=i(e);return a=n,t}}(),t.sys=z,t.MOZ_SourceMap=U,t.UglifyJS=W,t.array_to_hash=r,t.slice=i,t.characters=o,t.member=a,t.find_if=s,t.repeat_string=u,t.DefaultsError=c,t.defaults=l,t.merge=f,t.noop=p,t.MAP=Y,t.push_uniq=h,t.string_template=d,t.remove=m,t.mergeSort=v,t.set_difference=g,t.set_intersection=b,t.makePredicate=y,t.all=_,t.Dictionary=A,t.DEFNODE=w,t.AST_Token=X,t.AST_Node=J,t.AST_Statement=K,t.AST_Debugger=Q,t.AST_Directive=Z,t.AST_SimpleStatement=en,t.walk_body=E,t.AST_Block=nn,t.AST_BlockStatement=tn,t.AST_EmptyStatement=rn,t.AST_StatementWithBody=on,t.AST_LabeledStatement=an,t.AST_DWLoop=sn,t.AST_Do=un,t.AST_While=cn,t.AST_For=ln,t.AST_ForIn=fn,t.AST_With=pn,t.AST_Scope=hn,t.AST_Toplevel=dn,t.AST_Lambda=mn,t.AST_Accessor=vn,t.AST_Function=gn,t.AST_Defun=bn,t.AST_Jump=yn,t.AST_Exit=_n,t.AST_Return=An,t.AST_Throw=wn,t.AST_LoopControl=En,t.AST_Break=Sn,t.AST_Continue=xn,t.AST_If=kn,t.AST_Switch=Cn,t.AST_SwitchBranch=Dn,t.AST_Default=Fn,t.AST_Case=Tn,t.AST_Try=Bn,t.AST_Catch=On,t.AST_Finally=$n,t.AST_Definitions=Mn,t.AST_Var=jn,t.AST_Const=Rn,t.AST_VarDef=Ln,t.AST_Call=Nn,t.AST_New=Vn,t.AST_Seq=Pn,t.AST_PropAccess=Gn,t.AST_Dot=Hn,t.AST_Sub=In,t.AST_Unary=qn,t.AST_UnaryPrefix=zn,t.AST_UnaryPostfix=Un,t.AST_Binary=Wn,t.AST_Conditional=Yn,t.AST_Assign=Xn,t.AST_Array=Jn,t.AST_Object=Kn,t.AST_ObjectProperty=Qn,t.AST_ObjectKeyVal=Zn,t.AST_ObjectSetter=et,t.AST_ObjectGetter=nt,t.AST_Symbol=tt,t.AST_SymbolAccessor=rt,t.AST_SymbolDeclaration=it,t.AST_SymbolVar=ot,t.AST_SymbolConst=at,t.AST_SymbolFunarg=st,t.AST_SymbolDefun=ut,t.AST_SymbolLambda=ct,t.AST_SymbolCatch=lt,t.AST_Label=ft,t.AST_SymbolRef=pt,t.AST_LabelRef=ht,t.AST_This=dt,t.AST_Constant=mt,t.AST_String=vt,t.AST_Number=gt,t.AST_RegExp=bt,t.AST_Atom=yt,t.AST_Null=_t,t.AST_NaN=At,t.AST_Undefined=wt,t.AST_Hole=Et,t.AST_Infinity=St,t.AST_Boolean=xt,t.AST_False=kt,t.AST_True=Ct,t.TreeWalker=S,t.KEYWORDS=Dt,t.KEYWORDS_ATOM=Ft,t.RESERVED_WORDS=Tt,t.KEYWORDS_BEFORE_EXPRESSION=Bt,t.OPERATOR_CHARS=Ot,t.RE_HEX_NUMBER=$t,t.RE_OCT_NUMBER=Mt,t.RE_DEC_NUMBER=jt,t.OPERATORS=Rt,t.WHITESPACE_CHARS=Lt,t.PUNC_BEFORE_EXPRESSION=Nt,t.PUNC_CHARS=Vt,t.REGEXP_MODIFIERS=Pt,t.UNICODE=Gt,t.is_letter=x,t.is_digit=k,t.is_alphanumeric_char=C,t.is_unicode_combining_mark=D,t.is_unicode_connector_punctuation=F,t.is_identifier=T,t.is_identifier_start=B,t.is_identifier_char=O,t.is_identifier_string=$,t.parse_js_number=M,t.JS_Parse_Error=j,t.js_error=R,t.is_token=L,t.EX_EOF=Ht,t.tokenizer=N,t.UNARY_PREFIX=It,t.UNARY_POSTFIX=qt,t.ASSIGNMENT=zt,t.PRECEDENCE=Ut,t.STATEMENTS_WITH_LABELS=Wt,t.ATOMIC_START_TOKEN=Yt,t.parse=V,t.TreeTransformer=P,t.SymbolDef=G,t.base54=Xt,t.OutputStream=H,t.Compressor=I,t.SourceMap=q,t.AST_Node.warn_function=function(e){"undefined"!=typeof console&&"function"==typeof console.warn&&console.warn(e)},t.minify=function(e,n){n=W.defaults(n,{outSourceMap:null,sourceRoot:null,inSourceMap:null,fromString:!1,warnings:!1,mangle:{},output:null,compress:{}}),"string"==typeof e&&(e=[e]),W.base54.reset();var t=null;if(e.forEach(function(e){var r=n.fromString?e:fs.readFileSync(e,"utf8");t=W.parse(r,{filename:n.fromString?"?":e,toplevel:t})}),n.compress){var r={warnings:n.warnings};W.merge(r,n.compress),t.figure_out_scope();var i=W.Compressor(r);t=t.transform(i)}n.mangle&&(t.figure_out_scope(),t.compute_char_frequency(),t.mangle_names(n.mangle));var o=n.inSourceMap,a={};"string"==typeof n.inSourceMap&&(o=fs.readFileSync(n.inSourceMap,"utf8")),n.outSourceMap&&(a.source_map=W.SourceMap({file:n.outSourceMap,orig:o,root:n.sourceRoot})),n.output&&W.merge(a,n.output);var s=W.OutputStream(a);return t.print(s),{code:s+"",map:a.source_map+""}},t.describe_ast=function(){function e(t){n.print("AST_"+t.TYPE);var r=t.SELF_PROPS.filter(function(e){return!/^\$/.test(e)});r.length>0&&(n.space(),n.with_parens(function(){r.forEach(function(e,t){t&&n.space(),n.print(e)})})),t.documentation&&(n.space(),n.print_string(t.documentation)),t.SUBCLASSES.length>0&&(n.space(),n.with_block(function(){t.SUBCLASSES.forEach(function(t){n.indent(),e(t),n.newline()})}))}var n=W.OutputStream({beautify:!0});return e(W.AST_Node),n+""}},{"source-map":47,util:32}],58:[function(e,n,t){"use strict";t.reservedVars={arguments:!1,NaN:!1},t.ecmaIdentifiers={Array:!1,Boolean:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,eval:!1,EvalError:!1,Function:!1,hasOwnProperty:!1,isFinite:!1,isNaN:!1,JSON:!1,Math:!1,Map:!1,Number:!1,Object:!1,parseInt:!1,parseFloat:!1,RangeError:!1,ReferenceError:!1,RegExp:!1,Set:!1,String:!1,SyntaxError:!1,TypeError:!1,URIError:!1,WeakMap:!1},t.browser={Audio:!1,Blob:!1,addEventListener:!1,applicationCache:!1,atob:!1,blur:!1,btoa:!1,clearInterval:!1,clearTimeout:!1,close:!1,closed:!1,CustomEvent:!1,DOMParser:!1,defaultStatus:!1,document:!1,Element:!1,ElementTimeControl:!1,event:!1,FileReader:!1,FormData:!1,focus:!1,frames:!1,getComputedStyle:!1,HTMLElement:!1,HTMLAnchorElement:!1,HTMLBaseElement:!1,HTMLBlockquoteElement:!1,HTMLBodyElement:!1,HTMLBRElement:!1,HTMLButtonElement:!1,HTMLCanvasElement:!1,HTMLDirectoryElement:!1,HTMLDivElement:!1,HTMLDListElement:!1,HTMLFieldSetElement:!1,HTMLFontElement:!1,HTMLFormElement:!1,HTMLFrameElement:!1,HTMLFrameSetElement:!1,HTMLHeadElement:!1,HTMLHeadingElement:!1,HTMLHRElement:!1,HTMLHtmlElement:!1,HTMLIFrameElement:!1,HTMLImageElement:!1,HTMLInputElement:!1,HTMLIsIndexElement:!1,HTMLLabelElement:!1,HTMLLayerElement:!1,HTMLLegendElement:!1,HTMLLIElement:!1,HTMLLinkElement:!1,HTMLMapElement:!1,HTMLMenuElement:!1,HTMLMetaElement:!1,HTMLModElement:!1,HTMLObjectElement:!1,HTMLOListElement:!1,HTMLOptGroupElement:!1,HTMLOptionElement:!1,HTMLParagraphElement:!1,HTMLParamElement:!1,HTMLPreElement:!1,HTMLQuoteElement:!1,HTMLScriptElement:!1,HTMLSelectElement:!1,HTMLStyleElement:!1,HTMLTableCaptionElement:!1,HTMLTableCellElement:!1,HTMLTableColElement:!1,HTMLTableElement:!1,HTMLTableRowElement:!1,HTMLTableSectionElement:!1,HTMLTextAreaElement:!1,HTMLTitleElement:!1,HTMLUListElement:!1,HTMLVideoElement:!1,history:!1,Image:!1,length:!1,localStorage:!1,location:!1,MessageChannel:!1,MessageEvent:!1,MessagePort:!1,MouseEvent:!1,moveBy:!1,moveTo:!1,MutationObserver:!1,name:!1,Node:!1,NodeFilter:!1,navigator:!1,onbeforeunload:!0,onblur:!0,onerror:!0,onfocus:!0,onload:!0,onresize:!0,onunload:!0,open:!1,openDatabase:!1,opener:!1,Option:!1,parent:!1,print:!1,removeEventListener:!1,resizeBy:!1,resizeTo:!1,screen:!1,scroll:!1,scrollBy:!1,scrollTo:!1,sessionStorage:!1,setInterval:!1,setTimeout:!1,SharedWorker:!1,status:!1,SVGAElement:!1,SVGAltGlyphDefElement:!1,SVGAltGlyphElement:!1,SVGAltGlyphItemElement:!1,SVGAngle:!1,SVGAnimateColorElement:!1,SVGAnimateElement:!1,SVGAnimateMotionElement:!1,SVGAnimateTransformElement:!1,SVGAnimatedAngle:!1,SVGAnimatedBoolean:!1,SVGAnimatedEnumeration:!1,SVGAnimatedInteger:!1,SVGAnimatedLength:!1,SVGAnimatedLengthList:!1,SVGAnimatedNumber:!1,SVGAnimatedNumberList:!1,SVGAnimatedPathData:!1,SVGAnimatedPoints:!1,SVGAnimatedPreserveAspectRatio:!1,SVGAnimatedRect:!1,SVGAnimatedString:!1,SVGAnimatedTransformList:!1,SVGAnimationElement:!1,SVGCSSRule:!1,SVGCircleElement:!1,SVGClipPathElement:!1,SVGColor:!1,SVGColorProfileElement:!1,SVGColorProfileRule:!1,SVGComponentTransferFunctionElement:!1,SVGCursorElement:!1,SVGDefsElement:!1,SVGDescElement:!1,SVGDocument:!1,SVGElement:!1,SVGElementInstance:!1,SVGElementInstanceList:!1,SVGEllipseElement:!1,SVGExternalResourcesRequired:!1,SVGFEBlendElement:!1,SVGFEColorMatrixElement:!1,SVGFEComponentTransferElement:!1,SVGFECompositeElement:!1,SVGFEConvolveMatrixElement:!1,SVGFEDiffuseLightingElement:!1,SVGFEDisplacementMapElement:!1,SVGFEDistantLightElement:!1,SVGFEFloodElement:!1,SVGFEFuncAElement:!1,SVGFEFuncBElement:!1,SVGFEFuncGElement:!1,SVGFEFuncRElement:!1,SVGFEGaussianBlurElement:!1,SVGFEImageElement:!1,SVGFEMergeElement:!1,SVGFEMergeNodeElement:!1,SVGFEMorphologyElement:!1,SVGFEOffsetElement:!1,SVGFEPointLightElement:!1,SVGFESpecularLightingElement:!1,SVGFESpotLightElement:!1,SVGFETileElement:!1,SVGFETurbulenceElement:!1,SVGFilterElement:!1,SVGFilterPrimitiveStandardAttributes:!1,SVGFitToViewBox:!1,SVGFontElement:!1,SVGFontFaceElement:!1,SVGFontFaceFormatElement:!1,SVGFontFaceNameElement:!1,SVGFontFaceSrcElement:!1,SVGFontFaceUriElement:!1,SVGForeignObjectElement:!1,SVGGElement:!1,SVGGlyphElement:!1,SVGGlyphRefElement:!1,SVGGradientElement:!1,SVGHKernElement:!1,SVGICCColor:!1,SVGImageElement:!1,SVGLangSpace:!1,SVGLength:!1,SVGLengthList:!1,SVGLineElement:!1,SVGLinearGradientElement:!1,SVGLocatable:!1,SVGMPathElement:!1,SVGMarkerElement:!1,SVGMaskElement:!1,SVGMatrix:!1,SVGMetadataElement:!1,SVGMissingGlyphElement:!1,SVGNumber:!1,SVGNumberList:!1,SVGPaint:!1,SVGPathElement:!1,SVGPathSeg:!1,SVGPathSegArcAbs:!1,SVGPathSegArcRel:!1,SVGPathSegClosePath:!1,SVGPathSegCurvetoCubicAbs:!1,SVGPathSegCurvetoCubicRel:!1,SVGPathSegCurvetoCubicSmoothAbs:!1,SVGPathSegCurvetoCubicSmoothRel:!1,SVGPathSegCurvetoQuadraticAbs:!1,SVGPathSegCurvetoQuadraticRel:!1,SVGPathSegCurvetoQuadraticSmoothAbs:!1,SVGPathSegCurvetoQuadraticSmoothRel:!1,SVGPathSegLinetoAbs:!1,SVGPathSegLinetoHorizontalAbs:!1,SVGPathSegLinetoHorizontalRel:!1,SVGPathSegLinetoRel:!1,SVGPathSegLinetoVerticalAbs:!1,SVGPathSegLinetoVerticalRel:!1,SVGPathSegList:!1,SVGPathSegMovetoAbs:!1,SVGPathSegMovetoRel:!1,SVGPatternElement:!1,SVGPoint:!1,SVGPointList:!1,SVGPolygonElement:!1,SVGPolylineElement:!1,SVGPreserveAspectRatio:!1,SVGRadialGradientElement:!1,SVGRect:!1,SVGRectElement:!1,SVGRenderingIntent:!1,SVGSVGElement:!1,SVGScriptElement:!1,SVGSetElement:!1,SVGStopElement:!1,SVGStringList:!1,SVGStylable:!1,SVGStyleElement:!1,SVGSwitchElement:!1,SVGSymbolElement:!1,SVGTRefElement:!1,SVGTSpanElement:!1,SVGTests:!1,SVGTextContentElement:!1,SVGTextElement:!1,SVGTextPathElement:!1,SVGTextPositioningElement:!1,SVGTitleElement:!1,SVGTransform:!1,SVGTransformList:!1,SVGTransformable:!1,SVGURIReference:!1,SVGUnitTypes:!1,SVGUseElement:!1,SVGVKernElement:!1,SVGViewElement:!1,SVGViewSpec:!1,SVGZoomAndPan:!1,TimeEvent:!1,top:!1,WebSocket:!1,window:!1,Worker:!1,XMLHttpRequest:!1,XMLSerializer:!1,XPathEvaluator:!1,XPathException:!1,XPathExpression:!1,XPathNamespace:!1,XPathNSResolver:!1,XPathResult:!1},t.devel={alert:!1,confirm:!1,console:!1,Debug:!1,opera:!1,prompt:!1},t.worker={importScripts:!0,postMessage:!0,self:!0},t.nonstandard={escape:!1,unescape:!1},t.couch={require:!1,respond:!1,getRow:!1,emit:!1,send:!1,start:!1,sum:!1,log:!1,exports:!1,module:!1,provides:!1},t.node={__filename:!1,__dirname:!1,Buffer:!1,console:!1,exports:!0,GLOBAL:!1,global:!1,module:!1,process:!1,require:!1,setTimeout:!1,clearTimeout:!1,setInterval:!1,clearInterval:!1,setImmediate:!1,clearImmediate:!1},t.phantom={phantom:!0,require:!0,WebPage:!0,console:!0,exports:!0},t.rhino={defineClass:!1,deserialize:!1,gc:!1,help:!1,importPackage:!1,java:!1,load:!1,loadClass:!1,print:!1,quit:!1,readFile:!1,readUrl:!1,runCommand:!1,seal:!1,serialize:!1,spawn:!1,sync:!1,toint32:!1,version:!1},t.shelljs={target:!1,echo:!1,exit:!1,cd:!1,pwd:!1,ls:!1,find:!1,cp:!1,rm:!1,mv:!1,mkdir:!1,test:!1,cat:!1,sed:!1,grep:!1,which:!1,dirs:!1,pushd:!1,popd:!1,env:!1,exec:!1,chmod:!1,config:!1,error:!1,tempdir:!1},t.typed={ArrayBuffer:!1,ArrayBufferView:!1,DataView:!1,Float32Array:!1,Float64Array:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1},t.wsh={ActiveXObject:!0,Enumerator:!0,GetObject:!0,ScriptEngine:!0,ScriptEngineBuildVersion:!0,ScriptEngineMajorVersion:!0,ScriptEngineMinorVersion:!0,VBArray:!0,WSH:!0,WScript:!0,XDomainRequest:!0},t.dojo={dojo:!1,dijit:!1,dojox:!1,define:!1,require:!1},t.jquery={$:!1,jQuery:!1},t.mootools={$:!1,$$:!1,Asset:!1,Browser:!1,Chain:!1,Class:!1,Color:!1,Cookie:!1,Core:!1,Document:!1,DomReady:!1,DOMEvent:!1,DOMReady:!1,Drag:!1,Element:!1,Elements:!1,Event:!1,Events:!1,Fx:!1,Group:!1,Hash:!1,HtmlTable:!1,Iframe:!1,IframeShim:!1,InputValidator:!1,instanceOf:!1,Keyboard:!1,Locale:!1,Mask:!1,MooTools:!1,Native:!1,Options:!1,OverText:!1,Request:!1,Scroller:!1,Slick:!1,Slider:!1,Sortables:!1,Spinner:!1,Swiff:!1,Tips:!1,Type:!1,typeOf:!1,URI:!1,Window:!1},t.prototypejs={$:!1,$$:!1,$A:!1,$F:!1,$H:!1,$R:!1,$break:!1,$continue:!1,$w:!1,Abstract:!1,Ajax:!1,Class:!1,Enumerable:!1,Element:!1,Event:!1,Field:!1,Form:!1,Hash:!1,Insertion:!1,ObjectRange:!1,PeriodicalExecuter:!1,Position:!1,Prototype:!1,Selector:!1,Template:!1,Toggle:!1,Try:!1,Autocompleter:!1,Builder:!1,Control:!1,Draggable:!1,Draggables:!1,Droppables:!1,Effect:!1,Sortable:!1,SortableObserver:!1,Sound:!1,Scriptaculous:!1},t.yui={YUI:!1,Y:!1,YUI_config:!1}},{}]},{},[5])(5)}); | froala/cdnjs | ajax/libs/jade/1.1.4/jade.min.js | JavaScript | mit | 306,778 |
!function(e){if("object"==typeof exports)module.exports=e();else if("function"==typeof define&&define.amd)define(e);else{var o;"undefined"!=typeof window?o=window:"undefined"!=typeof global?o=global:"undefined"!=typeof self&&(o=self),o.MojioClient=e()}}(function(){var define,module,exports;return function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s}({1:[function(_dereq_,module,exports){(function(){var HttpBrowserWrapper;module.exports=HttpBrowserWrapper=function(){function HttpBrowserWrapper(requester){if(requester==null){requester=null}if(requester!=null){this.requester=requester}}HttpBrowserWrapper.prototype.request=function(params,callback){var k,ref,url,v,xmlhttp;if(params.method==null){params.method="GET"}if(params.host==null&¶ms.hostname!=null){params.host=params.hostname}if(!(params.scheme!=null||(typeof window==="undefined"||window===null))){params.scheme=window.location.protocol.split(":")[0]}if(!params.scheme||params.scheme==="file"){params.scheme="https"}if(params.data==null){params.data={}}if(params.body!=null){params.data=params.body}if(params.headers==null){params.headers={}}url=params.scheme+"://"+params.host+":"+params.port+params.path;if(params.method==="GET"&¶ms.data!=null&¶ms.data.length>0){url+="?"+Object.keys(params.data).map(function(k){return encodeURIComponent(k)+"="+encodeURIComponent(params.data[k])}).join("&")}if(typeof XMLHttpRequest!=="undefined"&&XMLHttpRequest!==null){xmlhttp=new XMLHttpRequest}else{xmlhttp=this.requester}xmlhttp.open(params.method,url,true);ref=params.headers;for(k in ref){v=ref[k];xmlhttp.setRequestHeader(k,v)}xmlhttp.onreadystatechange=function(){if(xmlhttp.readyState===4){if(xmlhttp.status>=200&&xmlhttp.status<=299){return callback(null,JSON.parse(xmlhttp.responseText))}else{return callback(xmlhttp.statusText,null)}}};if(params.method==="GET"){return xmlhttp.send()}else{return xmlhttp.send(params.data)}};return HttpBrowserWrapper}()}).call(this)},{}],2:[function(_dereq_,module,exports){(function(){var Http,MojioClient,SignalR;Http=_dereq_("./HttpBrowserWrapper");SignalR=_dereq_("./SignalRBrowserWrapper");module.exports=MojioClient=function(){var App,Event,Mojio,Observer,Product,Subscription,Trip,User,Vehicle,defaults,mojio_models;defaults={hostname:"api.moj.io",port:"443",version:"v1",scheme:"https",signalr_scheme:"http",signalr_port:"80",signalr_hub:"ObserverHub",live:true};function MojioClient(options){var base,base1,base2,base3,base4,base5,base6,base7;this.options=options;if(this.options==null){this.options={hostname:this.defaults.hostname,port:this.defaults.port,version:this.defaults.version,scheme:this.defaults.scheme,live:this.defaults.live}}if((base=this.options).hostname==null){base.hostname=defaults.hostname}if((base1=this.options).port==null){base1.port=defaults.port}if((base2=this.options).version==null){base2.version=defaults.version}if((base3=this.options).scheme==null){base3.scheme=defaults.scheme}if((base4=this.options).signalr_port==null){base4.signalr_port=defaults.signalr_port}if((base5=this.options).signalr_scheme==null){base5.signalr_scheme=defaults.signalr_scheme}if((base6=this.options).signalr_hub==null){base6.signalr_hub=defaults.signalr_hub}this.options.application=this.options.application;this.options.secret=this.options.secret;this.options.observerTransport="SingalR";this.conn=null;this.hub=null;this.connStatus=null;this.auth_token=null;if((base7=this.options).tokenRequester==null){base7.tokenRequester=function(){return document.location.hash.match(/access_token=([0-9a-f-]{36})/)}}this.signalr=new SignalR(this.options.signalr_scheme+"://"+this.options.hostname+":"+this.options.signalr_port+"/v1/signalr",[this.options.signalr_hub],$)}MojioClient.prototype.getResults=function(type,results){var arrlength,i,j,len,len1,objects,ref,result;objects=[];if(results instanceof Array){arrlength=results.length;for(i=0,len=results.length;i<len;i++){result=results[i];objects.push(new type(result))}}else if(results.Data instanceof Array){arrlength=results.Data.length;ref=results.Data;for(j=0,len1=ref.length;j<len1;j++){result=ref[j];objects.push(new type(result))}}else if(result.Data!==null){objects.push(new type(result.Data))}else{objects.push(new type(result))}return objects};MojioClient._makeParameters=function(params){var property,query,value;if(params.length===0){""}query="?";for(property in params){value=params[property];query+=encodeURIComponent(property)+"="+encodeURIComponent(value)+"&"}return query.slice(0,-1)};MojioClient.prototype.getPath=function(resource,id,action,key){if(key&&id&&action&&id!==""&&action!==""){return"/"+encodeURIComponent(resource)+"/"+encodeURIComponent(id)+"/"+encodeURIComponent(action)+"/"+encodeURIComponent(key)}else if(id&&action&&id!==""&&action!==""){return"/"+encodeURIComponent(resource)+"/"+encodeURIComponent(id)+"/"+encodeURIComponent(action)}else if(id&&id!==""){return"/"+encodeURIComponent(resource)+"/"+encodeURIComponent(id)}else if(action&&action!==""){return"/"+encodeURIComponent(resource)+"/"+encodeURIComponent(action)}return"/"+encodeURIComponent(resource)};MojioClient.prototype.dataByMethod=function(data,method){switch(method.toUpperCase()){case"POST"||"PUT":return this.stringify(data);default:return data}};MojioClient.prototype.stringify=function(data){return JSON.stringify(data)};MojioClient.prototype.request=function(request,callback){var http,parts;parts={hostname:this.options.hostname,host:this.options.hostname,port:this.options.port,scheme:this.options.scheme,path:"/"+this.options.version,method:request.method,withCredentials:false};parts.path="/"+this.options.version+this.getPath(request.resource,request.id,request.action,request.key);if(request.parameters!=null&&Object.keys(request.parameters).length>0){parts.path+=MojioClient._makeParameters(request.parameters)}parts.headers={};if(this.getTokenId()!=null){parts.headers["MojioAPIToken"]=this.getTokenId()}if(request.headers!=null){parts.headers+=request.headers}parts.headers["Content-Type"]="application/json";if(request.body!=null){parts.body=request.body}http=new Http;return http.request(parts,callback)};MojioClient.prototype.login_resource="Login";MojioClient.prototype.authorize=function(redirect_url,scope){var parts,url;if(scope==null){scope="full"}parts={hostname:this.options.hostname,host:this.options.hostname,port:this.options.port,scheme:this.options.scheme,path:this.options.live?"/OAuth2/authorize":"/OAuth2Sandbox/authorize",method:"Get",withCredentials:false};parts.path+="?response_type=token";parts.path+="&client_id="+this.options.application;parts.path+="&redirect_uri="+redirect_url;parts.path+="&scope="+scope;parts.headers={};if(this.getTokenId()!=null){parts.headers["MojioAPIToken"]=this.getTokenId()}parts.headers["Content-Type"]="application/json";url=parts.scheme+"://"+parts.host+":"+parts.port+parts.path;return window.location=url};MojioClient.prototype.token=function(callback){var match,token;this.user=null;match=this.options.tokenRequester();token=!!match&&match[1];if(!token){return callback("token for authorization not found.",null)}else{return this.request({method:"GET",resource:this.login_resource,id:token},function(_this){return function(error,result){if(error){return callback(error,null)}else{_this.auth_token=result;return callback(null,_this.auth_token)}}}(this))}};MojioClient.prototype.unauthorize=function(redirect_url){var parts,url;parts={hostname:this.options.hostname,host:this.options.hostname,port:this.options.port,scheme:this.options.scheme,path:"/account/logout",method:"Get",withCredentials:false};parts.path+="?Guid="+this.getTokenId();parts.path+="&client_id="+this.options.application;parts.path+="&redirect_uri="+redirect_url;parts.headers={};if(this.getTokenId()!=null){parts.headers["MojioAPIToken"]=this.getTokenId()}parts.headers["Content-Type"]="application/json";url=parts.scheme+"://"+parts.host+":"+parts.port+parts.path;return window.location=url};MojioClient.prototype._login=function(username,password,callback){return this.request({method:"POST",resource:this.login_resource,id:this.options.application,parameters:{userOrEmail:username,password:password,secretKey:this.options.secret}},callback)};MojioClient.prototype.login=function(username,password,callback){return this._login(username,password,function(_this){return function(error,result){if(result!=null){_this.auth_token=result}return callback(error,result)}}(this))};MojioClient.prototype._logout=function(callback){return this.request({method:"DELETE",resource:this.login_resource,id:typeof mojio_token!=="undefined"&&mojio_token!==null?mojio_token:this.getTokenId()},callback)};MojioClient.prototype.logout=function(callback){return this._logout(function(_this){return function(error,result){_this.auth_token=null;return callback(error,result)}}(this))};mojio_models={};App=_dereq_("../models/App");mojio_models["App"]=App;Mojio=_dereq_("../models/Mojio");mojio_models["Mojio"]=Mojio;Trip=_dereq_("../models/Trip");mojio_models["Trip"]=Trip;User=_dereq_("../models/User");mojio_models["User"]=User;Vehicle=_dereq_("../models/Vehicle");mojio_models["Vehicle"]=Vehicle;Product=_dereq_("../models/Product");mojio_models["Product"]=Product;Subscription=_dereq_("../models/Subscription");mojio_models["Subscription"]=Subscription;Event=_dereq_("../models/Event");mojio_models["Event"]=Event;Observer=_dereq_("../models/Observer");mojio_models["Observer"]=Observer;MojioClient.prototype.model=function(type,json){var data,i,len,object,ref;if(json==null){json=null}if(json===null){return mojio_models[type]}else if(json.Data!=null&&json.Data instanceof Array){object=json;object.Objects=new Array;ref=json.Data;for(i=0,len=ref.length;i<len;i++){data=ref[i];object.Objects.push(new mojio_models[type](data))}}else if(json.Data!=null){object=new mojio_models[type](json.Data)}else{object=new mojio_models[type](json)}object._client=this;return object};MojioClient.prototype.query=function(model,parameters,callback){var property,query_criteria,ref,value;if(parameters instanceof Object){if(parameters.criteria instanceof Object){query_criteria="";ref=parameters.criteria;for(property in ref){value=ref[property];query_criteria+=property+"="+value+";"}parameters.criteria=query_criteria}return this.request({method:"GET",resource:model.resource(),parameters:parameters},function(_this){return function(error,result){return callback(error,_this.model(model.model(),result))}}(this))}else if(typeof parameters==="string"){return this.request({method:"GET",resource:model.resource(),parameters:{id:parameters}},function(_this){return function(error,result){return callback(error,_this.model(model.model(),result))}}(this))}else{return callback("criteria given is not in understood format, string or object.",null)}};MojioClient.prototype.get=function(model,criteria,callback){return this.query(model,criteria,callback)};MojioClient.prototype.save=function(model,callback){return this.request({method:"PUT",resource:model.resource(),body:model.stringify(),parameters:{id:model._id}},callback)};MojioClient.prototype.put=function(model,callback){return this.save(model,callback)};MojioClient.prototype.create=function(model,callback){return this.request({method:"POST",resource:model.resource(),body:model.stringify()},callback)};MojioClient.prototype.post=function(model,callback){return this.create(model,callback)};MojioClient.prototype["delete"]=function(model,callback){return this.request({method:"DELETE",resource:model.resource(),parameters:{id:model._id}},callback)};MojioClient.prototype._schema=function(callback){return this.request({method:"GET",resource:"Schema"},callback)};MojioClient.prototype.schema=function(callback){return this._schema(function(_this){return function(error,result){return callback(error,result)}}(this))};MojioClient.prototype.watch=function(observer,observer_callback,callback){return this.request({method:"POST",resource:Observer.resource(),body:observer.stringify()},function(_this){return function(error,result){if(error){return callback(error,null)}else{observer=new Observer(result);_this.signalr.subscribe(_this.options.signalr_hub,"Subscribe",observer.id(),observer.Subject,observer_callback,function(error,result){return callback(null,observer)});return observer}}}(this))};MojioClient.prototype.ignore=function(observer,observer_callback,callback){if(!observer){callback("Observer required.")}if(observer["subject"]!=null){if(observer.parent===null){return this.signalr.unsubscribe(this.options.signalr_hub,"Unsubscribe",observer.id(),observer.subject.id(),observer_callback,callback)}else{return this.signalr.unsubscribe(this.options.signalr_hub,"Unsubscribe",observer.id(),observer.subject.model(),observer_callback,callback)}}else{if(observer.parent===null){return this.signalr.unsubscribe(this.options.signalr_hub,"Unsubscribe",observer.id(),observer.SubjectId,observer_callback,callback)}else{return this.signalr.unsubscribe(this.options.signalr_hub,"Unsubscribe",observer.id(),observer.Subject,observer_callback,callback)}}};MojioClient.prototype.observe=function(subject,parent,observer_callback,callback){var observer;if(parent==null){parent=null}if(parent===null){observer=new Observer({ObserverType:"Generic",Status:"Approved",Name:"Test"+Math.random(),Subject:subject.model(),SubjectId:subject.id(),Transports:"SignalR"});return this.request({method:"PUT",resource:Observer.resource(),body:observer.stringify()},function(_this){return function(error,result){if(error){return callback(error,null)}else{observer=new Observer(result);return _this.signalr.subscribe(_this.options.signalr_hub,"Subscribe",observer.id(),observer.SubjectId,observer_callback,function(error,result){return callback(null,observer)})}}}(this))}else{observer=new Observer({ObserverType:"Generic",Status:"Approved",Name:"Test"+Math.random(),Subject:subject.model(),Parent:parent.model(),ParentId:parent.id(),Transports:"SignalR"});return this.request({method:"PUT",resource:Observer.resource(),body:observer.stringify()},function(_this){return function(error,result){if(error){return callback(error,null)}else{observer=new Observer(result);return _this.signalr.subscribe(_this.options.signalr_hub,"Subscribe",observer.id(),subject.model(),observer_callback,function(error,result){return callback(null,observer)})}}}(this))}};MojioClient.prototype.unobserve=function(observer,subject,parent,observer_callback,callback){if(!observer||subject==null){return callback("Observer and subject required.")}else if(parent===null){return this.signalr.unsubscribe(this.options.signalr_hub,"Unsubscribe",observer.id(),subject.id(),observer_callback,callback)}else{return this.signalr.unsubscribe(this.options.signalr_hub,"Unsubscribe",observer.id(),subject.model(),observer_callback,callback)}};MojioClient.prototype.store=function(model,key,value,callback){if(!model||!model._id){return callback("Storage requires an object with a valid id.")}else{return this.request({method:"PUT",resource:model.resource(),id:model.id(),action:"store",key:key,body:JSON.stringify(value)},function(_this){return function(error,result){if(error){return callback(error,null)}else{return callback(null,result)}}}(this))}};MojioClient.prototype.storage=function(model,key,callback){if(!model||!model._id){return callback("Get of storage requires an object with a valid id.")}else{return this.request({method:"GET",resource:model.resource(),id:model.id(),action:"store",key:key},function(_this){return function(error,result){if(error){return callback(error,null)}else{return callback(null,result)}}}(this))}};MojioClient.prototype.unstore=function(model,key,callback){if(!model||!model._id){return callback("Storage requires an object with a valid id.")}else{return this.request({method:"DELETE",resource:model.resource(),id:model.id(),action:"store",key:key},function(_this){return function(error,result){if(error){return callback(error,null)}else{return callback(null,result)}}}(this))}};MojioClient.prototype.getTokenId=function(){if(this.auth_token!=null){return this.auth_token._id}return null};MojioClient.prototype.getUserId=function(){if(this.auth_token!=null){return this.auth_token.UserId}return null};MojioClient.prototype.isLoggedIn=function(){return this.getUserId()!==null};MojioClient.prototype.getCurrentUser=function(callback){if(this.user!=null){callback(this.user)}else if(this.isLoggedIn()){get("users",this.getUserId()).done(function(user){if(!(user!=null)){return}if(this.getUserId()===this.user._id){this.user=user}return callback(this.user)})}else{return false}return true};return MojioClient}()}).call(this)},{"../models/App":4,"../models/Event":5,"../models/Mojio":6,"../models/Observer":8,"../models/Product":9,"../models/Subscription":10,"../models/Trip":11,"../models/User":12,"../models/Vehicle":13,"./HttpBrowserWrapper":1,"./SignalRBrowserWrapper":3}],3:[function(_dereq_,module,exports){(function(){var SignalRBrowserWrapper,bind=function(fn,me){return function(){return fn.apply(me,arguments)}};module.exports=SignalRBrowserWrapper=function(){SignalRBrowserWrapper.prototype.observer_callbacks={};SignalRBrowserWrapper.prototype.observer_registry=function(entity){var callback,i,j,len,len1,ref,ref1,results,results1;if(this.observer_callbacks[entity._id]){ref=this.observer_callbacks[entity._id];results=[];for(i=0,len=ref.length;i<len;i++){callback=ref[i];results.push(callback(entity))}return results}else if(this.observer_callbacks[entity.Type]){ref1=this.observer_callbacks[entity.Type];results1=[];for(j=0,len1=ref1.length;j<len1;j++){callback=ref1[j];results1.push(callback(entity))}return results1}};function SignalRBrowserWrapper(url,hubNames,jquery){this.observer_registry=bind(this.observer_registry,this);this.$=jquery;this.url=url;this.hubs={};this.signalr=null;this.connectionStatus=false}SignalRBrowserWrapper.prototype.getHub=function(which,callback){if(this.hubs[which]){return callback(null,this.hubs[which])}else{if(this.signalr==null){this.signalr=this.$.hubConnection(this.url,{useDefaultPath:false});this.signalr.error(function(error){console.log("Connection error"+error);return callback(error,null)})}this.hubs[which]=this.signalr.createHubProxy(which);this.hubs[which].on("error",function(data){return console.log("Hub '"+which+"' has error"+data)});this.hubs[which].on("UpdateEntity",this.observer_registry);if(this.hubs[which].connection.state!==1){if(!this.connectionStatus){return this.signalr.start().done(function(_this){return function(){_this.connectionStatus=true;return _this.hubs[which].connection.start().done(function(){return callback(null,_this.hubs[which])})}}(this))}else{return this.hubs[which].connection.start().done(function(_this){return function(){return callback(null,_this.hubs[which])}}(this))}}else{return callback(null,this.hubs[which])}}};SignalRBrowserWrapper.prototype.setCallback=function(id,futureCallback){if(this.observer_callbacks[id]==null){this.observer_callbacks[id]=[]}this.observer_callbacks[id].push(futureCallback)};SignalRBrowserWrapper.prototype.removeCallback=function(id,pastCallback){var callback,i,len,ref,temp;if(pastCallback===null){this.observer_callbacks[id]=[]}else{temp=[];ref=this.observer_callbacks[id];for(i=0,len=ref.length;i<len;i++){callback=ref[i];if(callback!==pastCallback){temp.push(callback)}}this.observer_callbacks[id]=temp}};SignalRBrowserWrapper.prototype.subscribe=function(hubName,method,observerId,subject,futureCallback,callback){this.setCallback(subject,futureCallback);return this.getHub(hubName,function(error,hub){if(error!=null){return callback(error,null)}else{if(hub!=null){hub.invoke(method,observerId)}return callback(null,hub)}})};SignalRBrowserWrapper.prototype.unsubscribe=function(hubName,method,observerId,subject,pastCallback,callback){this.removeCallback(subject,pastCallback);if(this.observer_callbacks[subject].length===0){return this.getHub(hubName,function(error,hub){if(error!=null){return callback(error,null)}else{if(hub!=null){hub.invoke(method,observerId)}return callback(null,hub)}})}else{return callback(null,true)}};return SignalRBrowserWrapper}()}).call(this)},{}],4:[function(_dereq_,module,exports){(function(){var App,MojioModel,extend=function(child,parent){for(var key in parent){if(hasProp.call(parent,key))child[key]=parent[key]}function ctor(){this.constructor=child}ctor.prototype=parent.prototype;child.prototype=new ctor;child.__super__=parent.prototype;return child},hasProp={}.hasOwnProperty;MojioModel=_dereq_("./MojioModel");module.exports=App=function(superClass){extend(App,superClass);App.prototype._schema={Type:"String",Name:"String",Description:"String",CreationDate:"String",Downloads:"Integer",RedirectUris:"String",ApplicationType:"String",_id:"String",_deleted:"Boolean"};App.prototype._resource="Apps";App.prototype._model="App";function App(json){App.__super__.constructor.call(this,json)}App._resource="Apps";App._model="App";App.resource=function(){return App._resource};App.model=function(){return App._model};return App}(MojioModel)}).call(this)},{"./MojioModel":7}],5:[function(_dereq_,module,exports){(function(){var Event,MojioModel,extend=function(child,parent){for(var key in parent){if(hasProp.call(parent,key))child[key]=parent[key]}function ctor(){this.constructor=child}ctor.prototype=parent.prototype;child.prototype=new ctor;child.__super__=parent.prototype;return child},hasProp={}.hasOwnProperty;MojioModel=_dereq_("./MojioModel");module.exports=Event=function(superClass){extend(Event,superClass);Event.prototype._schema={Type:"Integer",MojioId:"String",VehicleId:"String",OwnerId:"String",EventType:"Integer",Time:"String",Location:"Object",Accelerometer:"Object",TimeIsApprox:"Boolean",BatteryVoltage:"Float",ConnectionLost:"Boolean",_id:"String",_deleted:"Boolean",TripId:"String",Altitude:"Float",Heading:"Float",Distance:"Float",FuelLevel:"Float",FuelEfficiency:"Float",Speed:"Float",Acceleration:"Float",Deceleration:"Float",Odometer:"Float",RPM:"Integer",DTCs:"Array",MilStatus:"Boolean",Force:"Float",MaxSpeed:"Float",AverageSpeed:"Float",MovingTime:"Float",IdleTime:"Float",StopTime:"Float",MaxRPM:"Float",EventTypes:"Array",Timing:"Integer",Name:"String",ObserverType:"Integer",AppId:"String",Parent:"String",ParentId:"String",Subject:"String",SubjectId:"String",Transports:"Integer",Status:"Integer",Tokens:"Array"};Event.prototype._resource="Events";Event.prototype._model="Event";function Event(json){Event.__super__.constructor.call(this,json)}Event._resource="Events";Event._model="Event";Event.resource=function(){return Event._resource};Event.model=function(){return Event._model};return Event}(MojioModel)}).call(this)},{"./MojioModel":7}],6:[function(_dereq_,module,exports){(function(){var Mojio,MojioModel,extend=function(child,parent){for(var key in parent){if(hasProp.call(parent,key))child[key]=parent[key]}function ctor(){this.constructor=child}ctor.prototype=parent.prototype;child.prototype=new ctor;child.__super__=parent.prototype;return child},hasProp={}.hasOwnProperty;MojioModel=_dereq_("./MojioModel");module.exports=Mojio=function(superClass){extend(Mojio,superClass);Mojio.prototype._schema={Type:"Integer",OwnerId:"String",Name:"String",Imei:"String",LastContactTime:"String",VehicleId:"String",_id:"String",_deleted:"Boolean"};Mojio.prototype._resource="Mojios";Mojio.prototype._model="Mojio";function Mojio(json){Mojio.__super__.constructor.call(this,json)}Mojio._resource="Mojios";Mojio._model="Mojio";Mojio.resource=function(){return Mojio._resource};Mojio.model=function(){return Mojio._model};return Mojio}(MojioModel)}).call(this)},{"./MojioModel":7}],7:[function(_dereq_,module,exports){(function(){var MojioModel;module.exports=MojioModel=function(){MojioModel._resource="Schema";MojioModel._model="Model";function MojioModel(json){this._client=null;this.validate(json)}MojioModel.prototype.setField=function(field,value){this[field]=value;return this[field]};MojioModel.prototype.getField=function(field){return this[field]};MojioModel.prototype.validate=function(json){var field,results,value;results=[];for(field in json){value=json[field];results.push(this.setField(field,value))}return results};MojioModel.prototype.stringify=function(){return JSON.stringify(this,this.replacer)};MojioModel.prototype.replacer=function(key,value){if(key==="_client"||key==="_schema"||key==="_resource"||key==="_model"){return void 0}else{return value}};MojioModel.prototype.query=function(criteria,callback){var property,query_criteria,value;if(this._client===null){callback("No authorization set for model, use authorize(), passing in a mojio _client where login() has been called successfully.",null);return}if(criteria instanceof Object){if(criteria.criteria==null){query_criteria="";for(property in criteria){value=criteria[property];query_criteria+=property+"="+value+";"}criteria={criteria:query_criteria}}return this._client.request({method:"GET",resource:this.resource(),parameters:criteria},function(_this){return function(error,result){return callback(error,_this._client.model(_this.model(),result))}}(this))}else if(typeof criteria==="string"){return this._client.request({method:"GET",resource:this.resource(),parameters:{id:criteria}},function(_this){return function(error,result){return callback(error,_this._client.model(_this.model(),result))}}(this))}else{return callback("criteria given is not in understood format, string or object.",null)}};MojioModel.prototype.get=function(criteria,callback){return this.query(criteria,callback)};MojioModel.prototype.create=function(callback){if(this._client===null){callback("No authorization set for model, use authorize(), passing in a mojio _client where login() has been called successfully.",null);return}return this._client.request({method:"POST",resource:this.resource(),body:this.stringify()},callback)};MojioModel.prototype.post=function(callback){return this.create(callback)};MojioModel.prototype.save=function(callback){if(this._client===null){callback("No authorization set for model, use authorize(), passing in a mojio _client where login() has been called successfully.",null);return}return this._client.request({method:"PUT",resource:this.resource(),body:this.stringify(),parameters:{id:this._id}},callback)};MojioModel.prototype.put=function(callback){return this.save(callback)};MojioModel.prototype["delete"]=function(callback){return this._client.request({method:"DELETE",resource:this.resource(),parameters:{id:this._id}},callback)};MojioModel.prototype.observe=function(object,subject,observer_callback,callback){if(subject==null){subject=null}return this._client.observe(object,subject,observer_callback,callback)};MojioModel.prototype.unobserve=function(object,subject,observer_callback,callback){if(subject==null){subject=null}return this._client.observe(object,subject,observer_callback,callback)};MojioModel.prototype.store=function(model,key,value,callback){return this._client.store(model,key,value,callback)};MojioModel.prototype.storage=function(model,key,callback){return this._client.storage(model,key,callback)};MojioModel.prototype.unstore=function(model,key,callback){return this._client.unstore(model,key,callback)};MojioModel.prototype.statistic=function(expression,callback){return callback(null,true)};MojioModel.prototype.resource=function(){return this._resource};MojioModel.prototype.model=function(){return this._model};MojioModel.prototype.schema=function(){return this._schema};MojioModel.prototype.authorization=function(client){this._client=client;return this};MojioModel.prototype.id=function(){return this._id};MojioModel.prototype.mock=function(type,withid){var field,ref,value;if(withid==null){withid=false}ref=this.schema();for(field in ref){value=ref[field];if(field==="Type"){this.setField(field,this.model())}else if(field==="UserName"){this.setField(field,"Tester")}else if(field==="Email"){this.setField(field,"test@moj.io")}else if(field==="Password"){this.setField(field,"Password007!")}else if(field!=="_id"||withid){switch(value){case"Integer":this.setField(field,"0");break;case"Boolean":this.setField(field,false);break;case"String":this.setField(field,"test"+Math.random())}}}return this};return MojioModel}()}).call(this)},{}],8:[function(_dereq_,module,exports){(function(){var MojioModel,Observer,extend=function(child,parent){for(var key in parent){if(hasProp.call(parent,key))child[key]=parent[key]}function ctor(){this.constructor=child}ctor.prototype=parent.prototype;child.prototype=new ctor;child.__super__=parent.prototype;return child},hasProp={}.hasOwnProperty;MojioModel=_dereq_("./MojioModel");module.exports=Observer=function(superClass){extend(Observer,superClass);Observer.prototype._schema={Type:"String",Name:"String",ObserverType:"String",EventTypes:"Array",AppId:"String",OwnerId:"String",Parent:"String",ParentId:"String",Subject:"String",SubjectId:"String",Transports:"Integer",Status:"Integer",Tokens:"Array",_id:"String",_deleted:"Boolean"};Observer.prototype._resource="Observers";Observer.prototype._model="Observer";function Observer(json){Observer.__super__.constructor.call(this,json)}Observer._resource="Observers";Observer._model="Observer";Observer.resource=function(){return Observer._resource};Observer.model=function(){return Observer._model};return Observer}(MojioModel)}).call(this)},{"./MojioModel":7}],9:[function(_dereq_,module,exports){(function(){var MojioModel,Product,extend=function(child,parent){for(var key in parent){if(hasProp.call(parent,key))child[key]=parent[key]}function ctor(){this.constructor=child}ctor.prototype=parent.prototype;child.prototype=new ctor;child.__super__=parent.prototype;return child},hasProp={}.hasOwnProperty;MojioModel=_dereq_("./MojioModel");module.exports=Product=function(superClass){extend(Product,superClass);Product.prototype._schema={Type:"String",AppId:"String",Name:"String",Description:"String",Shipping:"Boolean",Taxable:"Boolean",Price:"Float",Discontinued:"Boolean",OwnerId:"String",CreationDate:"String",_id:"String",_deleted:"Boolean"};Product.prototype._resource="Products";Product.prototype._model="Product";function Product(json){Product.__super__.constructor.call(this,json)}Product._resource="Products";Product._model="Product";Product.resource=function(){return Product._resource};Product.model=function(){return Product._model};return Product}(MojioModel)}).call(this)},{"./MojioModel":7}],10:[function(_dereq_,module,exports){(function(){var MojioModel,Subscription,extend=function(child,parent){for(var key in parent){if(hasProp.call(parent,key))child[key]=parent[key]}function ctor(){this.constructor=child}ctor.prototype=parent.prototype;child.prototype=new ctor;child.__super__=parent.prototype;return child},hasProp={}.hasOwnProperty;MojioModel=_dereq_("./MojioModel");module.exports=Subscription=function(superClass){extend(Subscription,superClass);Subscription.prototype._schema={Type:"Integer",ChannelType:"Integer",ChannelTarget:"String",AppId:"String",OwnerId:"String",Event:"Integer",EntityType:"Integer",EntityId:"String",Interval:"Integer",LastMessage:"String",_id:"String",_deleted:"Boolean"};Subscription.prototype._resource="Subscriptions";Subscription.prototype._model="Subscription";function Subscription(json){Subscription.__super__.constructor.call(this,json)}Subscription._resource="Subscriptions";Subscription._model="Subscription";Subscription.resource=function(){return Subscription._resource};Subscription.model=function(){return Subscription._model};return Subscription}(MojioModel)}).call(this)},{"./MojioModel":7}],11:[function(_dereq_,module,exports){(function(){var MojioModel,Trip,extend=function(child,parent){for(var key in parent){if(hasProp.call(parent,key))child[key]=parent[key]}function ctor(){this.constructor=child}ctor.prototype=parent.prototype;
child.prototype=new ctor;child.__super__=parent.prototype;return child},hasProp={}.hasOwnProperty;MojioModel=_dereq_("./MojioModel");module.exports=Trip=function(superClass){extend(Trip,superClass);Trip.prototype._schema={Type:"Integer",MojioId:"String",VehicleId:"String",StartTime:"String",LastUpdatedTime:"String",EndTime:"String",MaxSpeed:"Float",MaxAcceleration:"Float",MaxDeceleration:"Float",MaxRPM:"Integer",FuelLevel:"Float",FuelEfficiency:"Float",Distance:"Float",StartLocation:"Object",LastKnownLocation:"Object",EndLocation:"Object",StartAddress:"Object",EndAddress:"Object",ForcefullyEnded:"Boolean",StartMilage:"Float",EndMilage:"Float",StartOdometer:"Float",_id:"String",_deleted:"Boolean"};Trip.prototype._resource="Trips";Trip.prototype._model="Trip";function Trip(json){Trip.__super__.constructor.call(this,json)}Trip._resource="Trips";Trip._model="Trip";Trip.resource=function(){return Trip._resource};Trip.model=function(){return Trip._model};return Trip}(MojioModel)}).call(this)},{"./MojioModel":7}],12:[function(_dereq_,module,exports){(function(){var MojioModel,User,extend=function(child,parent){for(var key in parent){if(hasProp.call(parent,key))child[key]=parent[key]}function ctor(){this.constructor=child}ctor.prototype=parent.prototype;child.prototype=new ctor;child.__super__=parent.prototype;return child},hasProp={}.hasOwnProperty;MojioModel=_dereq_("./MojioModel");module.exports=User=function(superClass){extend(User,superClass);User.prototype._schema={Type:"Integer",UserName:"String",FirstName:"String",LastName:"String",Email:"String",UserCount:"Integer",Credits:"Integer",CreationDate:"String",LastActivityDate:"String",LastLoginDate:"String",Locale:"String",_id:"String",_deleted:"Boolean"};User.prototype._resource="Users";User.prototype._model="User";function User(json){User.__super__.constructor.call(this,json)}User._resource="Users";User._model="User";User.resource=function(){return User._resource};User.model=function(){return User._model};return User}(MojioModel)}).call(this)},{"./MojioModel":7}],13:[function(_dereq_,module,exports){(function(){var MojioModel,Vehicle,extend=function(child,parent){for(var key in parent){if(hasProp.call(parent,key))child[key]=parent[key]}function ctor(){this.constructor=child}ctor.prototype=parent.prototype;child.prototype=new ctor;child.__super__=parent.prototype;return child},hasProp={}.hasOwnProperty;MojioModel=_dereq_("./MojioModel");module.exports=Vehicle=function(superClass){extend(Vehicle,superClass);Vehicle.prototype._schema={Type:"Integer",OwnerId:"String",MojioId:"String",Name:"String",VIN:"String",LicensePlate:"String",IgnitionOn:"Boolean",VehicleTime:"String",LastTripEvent:"String",LastLocationTime:"String",LastLocation:"Object",LastSpeed:"Float",FuelLevel:"Float",LastAcceleration:"Float",LastAccelerometer:"Object",LastAltitude:"Float",LastBatteryVoltage:"Float",LastDistance:"Float",LastHeading:"Float",LastVirtualOdometer:"Float",LastOdometer:"Float",LastRpm:"Float",LastFuelEfficiency:"Float",CurrentTrip:"String",LastTrip:"String",LastContactTime:"String",MilStatus:"Boolean",DiagnosticCodes:"Object",FaultsDetected:"Boolean",LastLocationTimes:"Array",LastLocations:"Array",LastSpeeds:"Array",LastHeadings:"Array",LastAltitudes:"Array",Viewers:"Array",_id:"String",_deleted:"Boolean"};Vehicle.prototype._resource="Vehicles";Vehicle.prototype._model="Vehicle";function Vehicle(json){Vehicle.__super__.constructor.call(this,json)}Vehicle._resource="Vehicles";Vehicle._model="Vehicle";Vehicle.resource=function(){return Vehicle._resource};Vehicle.model=function(){return Vehicle._model};return Vehicle}(MojioModel)}).call(this)},{"./MojioModel":7}]},{},[2])(2)}); | chrillep/cdnjs | ajax/libs/mojio-js/3.1.2/mojio-js.min.js | JavaScript | mit | 35,689 |
/*! p5.min.js v0.3.5 August 28, 2014 */
var shim=function(){window.requestDraw=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){window.setTimeout(t,1e3/60)}}()}({}),constants=function(){var t=Math.PI;return{ARROW:"default",CROSS:"crosshair",HAND:"pointer",MOVE:"move",TEXT:"text",WAIT:"wait",HALF_PI:t/2,PI:t,QUARTER_PI:t/4,TAU:2*t,TWO_PI:2*t,DEGREES:"degrees",RADIANS:"radians",CORNER:"corner",CORNERS:"corners",RADIUS:"radius",RIGHT:"right",LEFT:"left",CENTER:"center",POINTS:"points",LINES:"lines",TRIANGLES:"triangles",TRIANGLE_FAN:"triangles_fan",TRIANGLE_STRIP:"triangles_strip",QUADS:"quads",QUAD_STRIP:"quad_strip",CLOSE:"close",OPEN:"open",CHORD:"chord",PIE:"pie",PROJECT:"square",SQUARE:"butt",ROUND:"round",BEVEL:"bevel",MITER:"miter",RGB:"rgb",HSB:"hsb",AUTO:"auto",ALT:18,BACKSPACE:8,CONTROL:17,DELETE:46,DOWN_ARROW:40,ENTER:13,ESCAPE:27,LEFT_ARROW:37,OPTION:18,RETURN:13,RIGHT_ARROW:39,SHIFT:16,TAB:9,UP_ARROW:38,BLEND:"normal",ADDITIVE:"lighter",DARKEST:"darken",LIGHTEST:"lighten",DIFFERENCE:"difference",EXCLUSION:"exclusion",MULTIPLY:"multiply",SCREEN:"screen",REPLACE:"source-over",OVERLAY:"overlay",HARD_LIGHT:"hard-light",SOFT_LIGHT:"soft-light",DODGE:"color-dodge",BURN:"color-burn",NORMAL:"normal",ITALIC:"italic",BOLD:"bold",LINEAR:"linear",QUADRATIC:"quadratic",BEZIER:"bezier",CURVE:"curve"}}({}),core=function(t,e,r){"use strict";var r=r,o=function(t,e){this._setupDone=!1,this._pixelDensity=window.devicePixelRatio||1,this._startTime=(new Date).getTime(),this._userNode=e,this._curElement=null,this._elements=[],this._preloadCount=0,this._updateInterval=0,this._isGlobal=!1,this._loop=!0,this.styles=[],this._defaultCanvasSize={width:100,height:100},this._events={mousemove:null,mousedown:null,mouseup:null,click:null,mousewheel:null,mouseover:null,mouseout:null,keydown:null,keyup:null,keypress:null,touchstart:null,touchmove:null,touchend:null},this._start=function(){this._userNode&&"string"==typeof this._userNode&&(this._userNode=document.getElementById(this._userNode)),this.createCanvas(this._defaultCanvasSize.width,this._defaultCanvasSize.height,!0);var t=this.preload||window.preload,e=this._isGlobal?window:this;t?(this._preloadMethods.forEach(function(t){e[t]=function(r){return e._preload(t,r)}}),t(),0===this._preloadCount&&(this._setup(),this._runFrames(),this._draw())):(this._setup(),this._runFrames(),this._draw())}.bind(this),this._preload=function(t,e){var r=this._isGlobal?window:this;return r._setProperty("_preloadCount",r._preloadCount+1),o.prototype[t].call(r,e,function(){r._setProperty("_preloadCount",r._preloadCount-1),0===r._preloadCount&&(r._setup(),r._runFrames(),r._draw())})}.bind(this),this._setup=function(){var t=this._isGlobal?window:this;"function"==typeof t.preload&&this._preloadMethods.forEach(function(e){t[e]=o.prototype[e]}),"function"==typeof t.setup&&t.setup();for(var e=new RegExp(/(^|\s)p5_hidden(?!\S)/g),r=document.getElementsByClassName("p5_hidden"),n=0;n<r.length;n++){var i=r[n];i.style.visibility="",i.className=i.className.replace(e,"")}this._setupDone=!0}.bind(this),this._draw=function(){var t=this.setup||window.setup,e=(new Date).getTime();this._frameRate=1e3/(e-this._lastFrameTime),this._lastFrameTime=e;var r=this.draw||window.draw;this._loop&&(this._drawInterval&&clearInterval(this._drawInterval),this._drawInterval=setTimeout(function(){window.requestDraw(this._draw.bind(this))}.bind(this),1e3/this._targetFrameRate)),"function"==typeof r&&(this.push(),"undefined"==typeof t&&this.scale(this._pixelDensity,this._pixelDensity),this._registeredMethods.pre.forEach(function(t){t.call(this)}),r(),this._registeredMethods.post.forEach(function(t){t.call(this)}),this.pop())}.bind(this),this._runFrames=function(){this._updateInterval&&clearInterval(this._updateInterval),this._updateInterval=setInterval(function(){this._setProperty("frameCount",this.frameCount+1)}.bind(this),1e3/this._targetFrameRate)}.bind(this),this._setProperty=function(t,e){this[t]=e,this._isGlobal&&(window[t]=e)}.bind(this),this.remove=function(){if(this._curElement){this._loop=!1,this._drawInterval&&clearTimeout(this._drawInterval),this._updateInterval&&clearTimeout(this._updateInterval);for(var t in this._events)window.removeEventListener(t,this._events[t]);for(var e=0;e<this._elements.length;e++){var r=this._elements[e];r.elt.parentNode&&r.elt.parentNode.removeChild(r.elt);for(var n in r._events)r.elt.removeEventListener(n,r._events[n])}var i=this;if(this._registeredMethods.remove.forEach(function(t){"undefined"!=typeof t&&t.call(i)}),this._isGlobal){for(var s in o.prototype)try{delete window[s]}catch(a){window[s]=void 0}for(var u in this)if(this.hasOwnProperty(u))try{delete window[u]}catch(a){window[u]=void 0}}}}.bind(this);for(var n in r)o.prototype[n]=r[n];if(t)t(this);else{this._isGlobal=!0;for(var i in o.prototype)if("function"==typeof o.prototype[i]){var s=i.substring(2);this._events.hasOwnProperty(s)||(window[i]=o.prototype[i].bind(this))}else window[i]=o.prototype[i];for(var a in this)this.hasOwnProperty(a)&&(window[a]=this[a])}for(var u in this._events){var p=this["on"+u];if(p){var h=p.bind(this);window.addEventListener(u,h),this._events[u]=h}}var l=this;window.addEventListener("focus",function(){l._setProperty("focused",!0)}),window.addEventListener("blur",function(){l._setProperty("focused",!1)}),"complete"===document.readyState?this._start():window.addEventListener("load",this._start.bind(this),!1)};return o.prototype._preloadMethods=["loadJSON","loadImage","loadStrings","loadXML","loadShape","loadTable"],o.prototype._registeredMethods={pre:[],post:[],remove:[]},o.prototype.registerPreloadMethod=function(t){o.prototype._preloadMethods.push(t)}.bind(this),o.prototype.registerMethod=function(t,e){o.prototype._registeredMethods.hasOwnProperty(t)||(o.prototype._registeredMethods[t]=[]),o.prototype._registeredMethods[t].push(e)}.bind(this),o}({},shim,constants),p5Color=function(t,e,r){var o=e,r=r;return o.Color=function(t,e){if(e instanceof Array)this.rgba=e;else{var n=o.Color.getNormalizedColor.apply(t,e);t._colorMode===r.HSB?(this.hsba=n,this.rgba=o.Color.getRGB(this.hsba)):this.rgba=n}this.colorString=o.Color.getColorString(this.rgba)},o.Color.getNormalizedColor=function(){var t=this._colorMode===r.RGB,e=t?this._maxRGB:this._maxHSB;if(arguments[0]instanceof Array)return o.Color.getNormalizedColor.apply(this,arguments[0]);var n,i,s,a;return arguments.length>=3?(n=arguments[0],i=arguments[1],s=arguments[2],a="number"==typeof arguments[3]?arguments[3]:e[3]):(t?n=i=s=arguments[0]:(n=s=arguments[0],i=0),a="number"==typeof arguments[1]?arguments[1]:e[3]),n*=255/e[0],i*=255/e[1],s*=255/e[2],a*=255/e[3],[n,i,s,a]},o.Color.getRGB=function(t){var e=t[0],r=t[1],o=t[2];e/=255,r/=255,o/=255;var n=[];if(0===r)n=[Math.round(255*o),Math.round(255*o),Math.round(255*o),t[3]];else{var i=6*e;6===i&&(i=0);var s,a,u,p=Math.floor(i),h=o*(1-r),l=o*(1-r*(i-p)),c=o*(1-r*(1-(i-p)));0===p?(s=o,a=c,u=h):1===p?(s=l,a=o,u=h):2===p?(s=h,a=o,u=c):3===p?(s=h,a=l,u=o):4===p?(s=c,a=h,u=o):(s=o,a=h,u=l),n=[Math.round(255*s),Math.round(255*a),Math.round(255*u),t[3]]}return n},o.Color.getHSB=function(t){var e,r,o=t[0]/255,n=t[1]/255,i=t[2]/255,s=Math.min(o,n,i),a=Math.max(o,n,i),u=a-s,p=a;if(0===u)e=0,r=0;else{r=u/a;var h=((a-o)/6+u/2)/u,l=((a-n)/6+u/2)/u,c=((a-i)/6+u/2)/u;o===a?e=c-l:n===a?e=1/3+h-c:i===a&&(e=2/3+l-h),0>e&&(e+=1),e>1&&(e-=1)}return[Math.round(255*e),Math.round(255*r),Math.round(255*p),t[3]]},o.Color.getColorString=function(t){for(var e=0;3>e;e++)t[e]=Math.floor(t[e]);var r="undefined"!=typeof t[3]?t[3]/255:1;return"rgba("+t[0]+","+t[1]+","+t[2]+","+r+")"},o.Color.getColor=function(){if(arguments[0]instanceof o.Color)return arguments[0].colorString;if(arguments[0]instanceof Array)return o.Color.getColorString(arguments[0]);var t=o.Color.getNormalizedColor.apply(this,arguments);return this._colorMode===r.HSB&&(t=o.Color.getRGB(t)),o.Color.getColorString(t)},o.Color}({},core,constants),p5Element=function(t,e){function r(t,e,r){var o=r,n=function(t){e(t,o)};r.elt.addEventListener(t,n,!1),r._events[t]=n}var o=e;return o.Element=function(t,e){this.elt=t,this._pInst=e,this._events={},this.width=this.elt.offsetWidth,this.height=this.elt.offsetHeight},o.Element.prototype.parent=function(t){"string"==typeof t&&(t=document.getElementById(t)),t.appendChild(this.elt)},o.Element.prototype.id=function(t){this.elt.id=t},o.Element.prototype.class=function(t){this.elt.className+=" "+t},o.Element.prototype.mousePressed=function(t){r("mousedown",t,this)},o.Element.prototype.mouseWheel=function(t){r("mousewheel",t,this)},o.Element.prototype.mouseReleased=function(t){r("mouseup",t,this)},o.Element.prototype.mouseClicked=function(t){r("click",t,this)},o.Element.prototype.mouseMoved=function(t){r("mousemove",t,this)},o.Element.prototype.mouseOver=function(t){r("mouseover",t,this)},o.Element.prototype.mouseOut=function(t){r("mouseout",t,this)},o.Element.prototype._setProperty=function(t,e){this[t]=e},o.Element}({},core),p5Graphics=function(t,e,r){var o=e,r=r;return o.Graphics=function(t,e){o.Element.call(this,t,e),this.canvas=t,this.drawingContext=this.canvas.getContext("2d"),this._pInst?(this._pInst._setProperty("_curElement",this),this._pInst._setProperty("canvas",this.canvas),this._pInst._setProperty("drawingContext",this.drawingContext),this._pInst._setProperty("width",this.width),this._pInst._setProperty("height",this.height)):this.canvas.style.display="none",this.drawingContext.fillStyle="#FFFFFF",this.drawingContext.strokeStyle="#000000",this.drawingContext.lineCap=r.ROUND},o.Graphics.prototype=Object.create(o.Element.prototype),o.Graphics}({},core,constants),filters=function(){"use strict";function t(t){var e=3.5*t|0;if(e=1>e?1:248>e?e:248,o!==e){o=e,n=1+o<<1,i=new Int32Array(n),s=new Array(n);for(var r=0;n>r;r++)s[r]=new Int32Array(256);for(var a,u,p,h,l=1,c=e-1;e>l;l++){i[e+l]=i[c]=u=c*c,p=s[e+l],h=s[c--];for(var d=0;256>d;d++)p[d]=h[d]=u*d}a=i[e]=e*e,p=s[e];for(var f=0;256>f;f++)p[f]=a*f}}function e(e,a){for(var u=r._toPixels(e),p=e.width,h=e.height,l=p*h,c=new Int32Array(l),d=0;l>d;d++)c[d]=r._getARGB(u,d);var f,g,y,m,w,v,_,x,b,C=new Int32Array(l),R=new Int32Array(l),E=new Int32Array(l),S=0;t(a);var M,T,I,A;for(T=0;h>T;T++){for(M=0;p>M;M++){if(m=y=g=f=0,w=M-o,0>w)b=-w,w=0;else{if(w>=p)break;b=0}for(I=b;n>I&&!(w>=p);I++){var P=c[w+S];A=s[I],g+=A[(16711680&P)>>16],y+=A[(65280&P)>>8],m+=A[255&P],f+=i[I],w++}v=S+M,C[v]=g/f,R[v]=y/f,E[v]=m/f}S+=p}for(S=0,_=-o,x=_*p,T=0;h>T;T++){for(M=0;p>M;M++){if(m=y=g=f=0,0>_)b=v=-_,w=M;else{if(_>=h)break;b=0,v=_,w=M+x}for(I=b;n>I&&!(v>=h);I++)A=s[I],g+=A[C[w]],y+=A[R[w]],m+=A[E[w]],f+=i[I],v++,w+=p;c[M+S]=4278190080|g/f<<16|y/f<<8|m/f}S+=p,x+=p,_++}r._setPixels(u,c)}var r={};r._toPixels=function(t){return t instanceof ImageData?t.data:t.getContext("2d").getImageData(0,0,t.width,t.height).data},r._getARGB=function(t,e){var r=4*e;return t[r+3]<<24&4278190080|t[r]<<16&16711680|t[r+1]<<8&65280|255&t[r+2]},r._setPixels=function(t,e){for(var r=0,o=0,n=t.length;n>o;o++)r=4*o,t[r+0]=(16711680&e[o])>>>16,t[r+1]=(65280&e[o])>>>8,t[r+2]=255&e[o],t[r+3]=(4278190080&e[o])>>>24},r._toImageData=function(t){return t instanceof ImageData?t:t.getContext("2d").getImageData(0,0,t.width,t.height)},r._createImageData=function(t,e){return r._tmpCanvas=document.createElement("canvas"),r._tmpCtx=r._tmpCanvas.getContext("2d"),this._tmpCtx.createImageData(t,e)},r.apply=function(t,e,r){var o=t.getContext("2d"),n=o.getImageData(0,0,t.width,t.height),i=e(n,r);i instanceof ImageData?o.putImageData(i,0,0,0,0,t.width,t.height):o.putImageData(n,0,0,0,0,t.width,t.height)},r.threshold=function(t,e){var o=r._toPixels(t);void 0===e&&(e=.5);for(var n=Math.floor(255*e),i=0;i<o.length;i+=4){var s,a=o[i],u=o[i+1],p=o[i+2],h=.2126*a+.7152*u+.0722*p;s=h>=n?255:0,o[i]=o[i+1]=o[i+2]=s}},r.gray=function(t){for(var e=r._toPixels(t),o=0;o<e.length;o+=4){var n=e[o],i=e[o+1],s=e[o+2],a=.2126*n+.7152*i+.0722*s;e[o]=e[o+1]=e[o+2]=a}},r.opaque=function(t){for(var e=r._toPixels(t),o=0;o<e.length;o+=4)e[o+3]=255;return e},r.invert=function(t){for(var e=r._toPixels(t),o=0;o<e.length;o+=4)e[o]=255-e[o],e[o+1]=255-e[o+1],e[o+2]=255-e[o+2]},r.posterize=function(t,e){var o=r._toPixels(t);if(2>e||e>255)throw new Error("Level must be greater than 2 and less than 255 for posterize");for(var n=e-1,i=0;i<o.length;i+=4){var s=o[i],a=o[i+1],u=o[i+2];o[i]=255*(s*e>>8)/n,o[i+1]=255*(a*e>>8)/n,o[i+2]=255*(u*e>>8)/n}},r.dilate=function(t){for(var e,o,n,i,s,a,u,p,h,l,c,d,f,g,y,m,w,v=r._toPixels(t),_=0,x=v.length?v.length/4:0,b=new Int32Array(x);x>_;)for(e=_,o=_+t.width;o>_;)n=i=r._getARGB(v,_),u=_-1,a=_+1,p=_-t.width,h=_+t.width,e>u&&(u=_),a>=o&&(a=_),0>p&&(p=0),h>=x&&(h=_),d=r._getARGB(v,p),c=r._getARGB(v,u),f=r._getARGB(v,h),l=r._getARGB(v,a),s=77*(n>>16&255)+151*(n>>8&255)+28*(255&n),y=77*(c>>16&255)+151*(c>>8&255)+28*(255&c),g=77*(l>>16&255)+151*(l>>8&255)+28*(255&l),m=77*(d>>16&255)+151*(d>>8&255)+28*(255&d),w=77*(f>>16&255)+151*(f>>8&255)+28*(255&f),y>s&&(i=c,s=y),g>s&&(i=l,s=g),m>s&&(i=d,s=m),w>s&&(i=f,s=w),b[_++]=i;r._setPixels(v,b)},r.erode=function(t){for(var e,o,n,i,s,a,u,p,h,l,c,d,f,g,y,m,w,v=r._toPixels(t),_=0,x=v.length?v.length/4:0,b=new Int32Array(x);x>_;)for(e=_,o=_+t.width;o>_;)n=i=r._getARGB(v,_),u=_-1,a=_+1,p=_-t.width,h=_+t.width,e>u&&(u=_),a>=o&&(a=_),0>p&&(p=0),h>=x&&(h=_),d=r._getARGB(v,p),c=r._getARGB(v,u),f=r._getARGB(v,h),l=r._getARGB(v,a),s=77*(n>>16&255)+151*(n>>8&255)+28*(255&n),y=77*(c>>16&255)+151*(c>>8&255)+28*(255&c),g=77*(l>>16&255)+151*(l>>8&255)+28*(255&l),m=77*(d>>16&255)+151*(d>>8&255)+28*(255&d),w=77*(f>>16&255)+151*(f>>8&255)+28*(255&f),s>y&&(i=c,s=y),s>g&&(i=l,s=g),s>m&&(i=d,s=m),s>w&&(i=f,s=w),b[_++]=i;r._setPixels(v,b)};var o,n,i,s;return r.blur=function(t,r){e(t,r)},r}({}),p5Image=function(t,e,r){"use strict";var o=e,n=r;return o.Image=function(t,e){this.width=t,this.height=e,this.canvas=document.createElement("canvas"),this.canvas.width=this.width,this.canvas.height=this.height,this.drawingContext=this.canvas.getContext("2d"),this.pixels=[]},o.Image.prototype._setProperty=function(t,e){this[t]=e},o.Image.prototype.loadPixels=function(){o.prototype.loadPixels.call(this)},o.Image.prototype.updatePixels=function(t,e,r,n){o.prototype.updatePixels.call(this,t,e,r,n)},o.Image.prototype.get=function(t,e,r,n){return o.prototype.get.call(this,t,e,r,n)},o.Image.prototype.set=function(t,e,r){o.prototype.set.call(this,t,e,r)},o.Image.prototype.resize=function(t,e){var r=document.createElement("canvas");r.width=t,r.height=e,r.getContext("2d").drawImage(this.canvas,0,0,this.canvas.width,this.canvas.height,0,0,r.width,r.width),this.canvas.width=this.width=t,this.canvas.height=this.height=e,this.drawingContext.drawImage(r,0,0,t,e,0,0,t,e),this.pixels.length>0&&this.loadPixels()},o.Image.prototype.copy=function(){o.prototype.copy.apply(this,arguments)},o.Image.prototype.mask=function(t){void 0===t&&(t=this);var e=this.drawingContext.globalCompositeOperation,r=[t,0,0,t.width,t.height,0,0,this.width,this.height];this.drawingContext.globalCompositeOperation="destination-out",this.copy.apply(this,r),this.drawingContext.globalCompositeOperation=e},o.Image.prototype.filter=function(t,e){n.apply(this.canvas,n[t.toLowerCase()],e)},o.Image.prototype.blend=function(){o.prototype.blend.apply(this,arguments)},o.Image.prototype.save=function(t,e){var r;if(e)switch(e.toLowerCase()){case"png":r="image/png";break;case"jpeg":r="image/jpeg";break;case"jpg":r="image/jpeg";break;default:r="image/png"}else e="png",r="image/png";var n="image/octet-stream",i=this.canvas.toDataURL(r);i=i.replace(r,n),o.prototype.downloadFile(i,t,e)},o.Image}({},core,filters),polargeometry=function(){return{degreesToRadians:function(t){return 2*Math.PI*t/360},radiansToDegrees:function(t){return 360*t/(2*Math.PI)}}}({}),p5Vector=function(t,e,r,o){"use strict";var n=e,i=r,o=o;return n.Vector=function(){var t,e,r;arguments[0]instanceof n?(this.p5=arguments[0],t=arguments[1][0]||0,e=arguments[1][1]||0,r=arguments[1][2]||0):(t=arguments[0]||0,e=arguments[1]||0,r=arguments[2]||0),this.x=t,this.y=e,this.z=r},n.Vector.prototype.set=function(t,e,r){return t instanceof n.Vector?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this):t instanceof Array?(this.x=t[0]||0,this.y=t[1]||0,this.z=t[2]||0,this):(this.x=t||0,this.y=e||0,this.z=r||0,this)},n.Vector.prototype.get=function(){return this.p5?new n.Vector(this.p5,[this.x,this.y,this.z]):new n.Vector(this.x,this.y,this.z)},n.Vector.prototype.add=function(t,e,r){return t instanceof n.Vector?(this.x+=t.x||0,this.y+=t.y||0,this.z+=t.z||0,this):t instanceof Array?(this.x+=t[0]||0,this.y+=t[1]||0,this.z+=t[2]||0,this):(this.x+=t||0,this.y+=e||0,this.z+=r||0,this)},n.Vector.prototype.sub=function(t,e,r){return t instanceof n.Vector?(this.x-=t.x||0,this.y-=t.y||0,this.z-=t.z||0,this):t instanceof Array?(this.x-=t[0]||0,this.y-=t[1]||0,this.z-=t[2]||0,this):(this.x-=t||0,this.y-=e||0,this.z-=r||0,this)},n.Vector.prototype.mult=function(t){return this.x*=t||0,this.y*=t||0,this.z*=t||0,this},n.Vector.prototype.div=function(t){return this.x/=t,this.y/=t,this.z/=t,this},n.Vector.prototype.mag=function(){return Math.sqrt(this.magSq())},n.Vector.prototype.magSq=function(){var t=this.x,e=this.y,r=this.z;return t*t+e*e+r*r},n.Vector.prototype.dot=function(t,e,r){return t instanceof n.Vector?this.dot(t.x,t.y,t.z):this.x*(t||0)+this.y*(e||0)+this.z*(r||0)},n.Vector.prototype.cross=function(t){var e=this.y*t.z-this.z*t.y,r=this.z*t.x-this.x*t.z,o=this.x*t.y-this.y*t.x;return this.p5?new n.Vector(this.p5,[e,r,o]):new n.Vector(e,r,o)},n.Vector.prototype.dist=function(t){var e=t.get().sub(this);return e.mag()},n.Vector.prototype.normalize=function(){return this.div(this.mag())},n.Vector.prototype.limit=function(t){var e=this.magSq();return e>t*t&&(this.div(Math.sqrt(e)),this.mult(t)),this},n.Vector.prototype.setMag=function(t){return this.normalize().mult(t)},n.Vector.prototype.heading=function(){var t=Math.atan2(this.y,this.x);return this.p5?this.p5._angleMode===o.RADIANS?t:i.radiansToDegrees(t):t},n.Vector.prototype.rotate=function(t){this.p5&&this.p5._angleMode===o.DEGREES&&(t=i.degreesToRadians(t));var e=this.heading()+t,r=this.mag();return this.x=Math.cos(e)*r,this.y=Math.sin(e)*r,this},n.Vector.prototype.lerp=function(t,e,r,o){return t instanceof n.Vector?this.lerp(t.x,t.y,t.z,e):(this.x+=(t-this.x)*o||0,this.y+=(e-this.y)*o||0,this.z+=(r-this.z)*o||0,this)},n.Vector.prototype.array=function(){return[this.x||0,this.y||0,this.z||0]},n.Vector.fromAngle=function(t){return this.p5&&this.p5._angleMode===o.DEGREES&&(t=i.degreesToRadians(t)),this.p5?new n.Vector(this.p5,[Math.cos(t),Math.sin(t),0]):new n.Vector(Math.cos(t),Math.sin(t),0)},n.Vector.random2D=function(){var t;return t=this.p5?this.p5.random(this.p5._angleMode===o.DEGREES?360:o.TWO_PI):Math.random()*Math.PI*2,this.fromAngle(t)},n.Vector.random3D=function(){var t,e;this.p5?(t=this.p5.random(0,o.TWO_PI),e=this.p5.random(-1,1)):(t=Math.random()*Math.PI*2,e=2*Math.random()-1);var r=Math.sqrt(1-e*e)*Math.cos(t),i=Math.sqrt(1-e*e)*Math.sin(t);return this.p5?new n.Vector(this.p5,[r,i,e]):new n.Vector(r,i,e)},n.Vector.add=function(t,e){return t.get().add(e)},n.Vector.sub=function(t,e){return t.get().sub(e)},n.Vector.mult=function(t,e){return t.get().mult(e)},n.Vector.div=function(t,e){return t.get().div(e)},n.Vector.dot=function(t,e){return t.dot(e)},n.Vector.cross=function(t,e){return t.cross(e)},n.Vector.dist=function(t,e){return t.dist(e)},n.Vector.lerp=function(t,e,r){return t.get().lerp(e,r)},n.Vector.angleBetween=function(t,e){var r=Math.acos(t.dot(e)/(t.mag()*e.mag()));return this.p5&&this.p5._angleMode===o.DEGREES&&(r=i.radiansToDegrees(r)),r},n.Vector}({},core,polargeometry,constants),p5TableRow=function(t,e){"use strict";var r=e;return r.TableRow=function(t,e){var r=[],o={};t&&(e=e||",",r=t.split(e));for(var n=0;n<r.length;n++){var i=n,s=r[n];o[i]=s}this.arr=r,this.obj=o,this.table=null},r.TableRow.prototype.set=function(t,e){if("string"==typeof t){var r=this.table.columns.indexOf(t);if(!(r>=0))throw'This table has no column named "'+t+'"';this.obj[t]=e,this.arr[r]=e}else{if(!(t<this.table.columns.length))throw"Column #"+t+" is out of the range of this table";this.arr[t]=e;var o=this.table.columns[t];this.obj[o]=e}},r.TableRow.prototype.setNum=function(t,e){var r=parseFloat(e,10);this.set(t,r)},r.TableRow.prototype.setString=function(t,e){var r=e.toString();this.set(t,r)},r.TableRow.prototype.get=function(t){return"string"==typeof t?this.obj[t]:this.arr[t]},r.TableRow.prototype.getNum=function(t){var e;if(e="string"==typeof t?parseFloat(this.obj[t],10):parseFloat(this.arr[t],10),"NaN"===e.toString())throw"Error: "+this.obj[t]+" is NaN (Not a Number)";return e},r.TableRow.prototype.getString=function(t){return"string"==typeof t?this.obj[t].toString():this.arr[t].toString()},r.TableRow}({},core),p5Table=function(t,e){"use strict";var r=e;return r.Table=function(){this.columns=[],this.rows=[]},r.Table.prototype.addRow=function(t){var e=t||new r.TableRow;if("undefined"==typeof e.arr||"undefined"==typeof e.obj)throw"invalid TableRow: "+e;return e.table=this,this.rows.push(e),e},r.Table.prototype.removeRow=function(t){this.rows[t].table=null;var e=this.rows.splice(t+1,this.rows.length);this.rows.pop(),this.rows=this.rows.concat(e)},r.Table.prototype.getRow=function(t){return this.rows[t]},r.Table.prototype.getRows=function(){return this.rows},r.Table.prototype.findRow=function(t,e){if("string"==typeof e){for(var r=0;r<this.rows.length;r++)if(this.rows[r].obj[e]===t)return this.rows[r]}else for(var o=0;o<this.rows.length;o++)if(this.rows[o].arr[e]===t)return this.rows[o];return null},r.Table.prototype.findRows=function(t,e){var r=[];if("string"==typeof e)for(var o=0;o<this.rows.length;o++)this.rows[o].obj[e]===t&&r.push(this.rows[o]);else for(var n=0;n<this.rows.length;n++)this.rows[n].arr[e]===t&&r.push(this.rows[n]);return r},r.Table.prototype.matchRow=function(t,e){if("number"==typeof e){for(var r=0;r<this.rows.length;r++)if(this.rows[r].arr[e].match(t))return this.rows[r]}else for(var o=0;o<this.rows.length;o++)if(this.rows[o].obj[e].match(t))return this.rows[o];return null},r.Table.prototype.matchRows=function(t,e){var r=[];if("number"==typeof e)for(var o=0;o<this.rows.length;o++)this.rows[o].arr[e].match(t)&&r.push(this.rows[o]);else for(var n=0;n<this.rows.length;n++)this.rows[n].obj[e].match(t)&&r.push(this.rows[n]);return r},r.Table.prototype.getColumn=function(t){var e=[];if("string"==typeof t)for(var r=0;r<this.rows.length;r++)e.push(this.rows[r].obj[t]);else for(var o=0;o<this.rows.length;o++)e.push(this.rows[o].arr[t]);return e},r.Table.prototype.clearRows=function(){delete this.rows,this.rows=[]},r.Table.prototype.addColumn=function(t){var e=t||null;this.columns.push(e)},r.Table.prototype.getColumnCount=function(){return this.columns.length},r.Table.prototype.getRowCount=function(){return this.rows.length},r.Table.prototype.removeTokens=function(t,e){for(var r=function(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")},o=[],n=0;n<t.length;n++)o.push(r(t.charAt(n)));var i=new RegExp(o.join("|"),"g");if("undefined"==typeof e)for(var s=0;s<this.columns.length;s++)for(var a=0;a<this.rows.length;a++){var u=this.rows[a].arr[s];u=u.replace(i,""),this.rows[a].arr[s]=u,this.rows[a].obj[this.columns[s]]=u}else if("string"==typeof e)for(var p=0;p<this.rows.length;p++){var h=this.rows[p].obj[e];h=h.replace(i,""),this.rows[p].obj[e]=h;var l=this.columns.indexOf(e);this.rows[p].arr[l]=h}else for(var c=0;c<this.rows.length;c++){var d=this.rows[c].arr[e];d=d.replace(i,""),this.rows[c].arr[e]=d,this.rows[c].obj[this.columns[e]]=d}},r.Table.prototype.trim=function(t){var e=new RegExp(" ","g");if("undefined"==typeof t)for(var r=0;r<this.columns.length;r++)for(var o=0;o<this.rows.length;o++){var n=this.rows[o].arr[r];n=n.replace(e,""),this.rows[o].arr[r]=n,this.rows[o].obj[this.columns[r]]=n}else if("string"==typeof t)for(var i=0;i<this.rows.length;i++){var s=this.rows[i].obj[t];s=s.replace(e,""),this.rows[i].obj[t]=s;var a=this.columns.indexOf(t);this.rows[i].arr[a]=s}else for(var u=0;u<this.rows.length;u++){var p=this.rows[u].arr[t];p=p.replace(e,""),this.rows[u].arr[t]=p,this.rows[u].obj[this.columns[t]]=p}},r.Table.prototype.removeColumn=function(t){var e,r;"string"==typeof t?(e=t,r=this.columns.indexOf(t),console.log("string")):(r=t,e=this.columns[t]);var o=this.columns.splice(r+1,this.columns.length);this.columns.pop(),this.columns=this.columns.concat(o);for(var n=0;n<this.rows.length;n++){var i=this.rows[n].arr,s=i.splice(r+1,i.length);i.pop(),this.rows[n].arr=i.concat(s),delete this.rows[n].obj[e]}},r.Table}({},core),colorcreating_reading=function(t,e){"use strict";var r=e;return r.prototype.alpha=function(t){if(t instanceof r.Color)return t.rgba[3];if(t instanceof Array)return t[3];throw new Error("Needs p5.Color or pixel array as argument.")},r.prototype.blue=function(t){if(t instanceof Array)return t[2];if(t instanceof r.Color)return t.rgba[2];throw new Error("Needs p5.Color or pixel array as argument.")},r.prototype.brightness=function(t){if(!t instanceof r.Color)throw new Error("Needs p5.Color as argument.");return t.hsba||(t.hsba=r.Color.getRGB(t.rgba),t.hsba=t.hsba.concat(t.rgba[3])),t.hsba[2]},r.prototype.color=function(){return arguments[0]instanceof Array?new r.Color(this,arguments[0],!0):new r.Color(this,arguments)},r.prototype.green=function(t){if(t instanceof Array)return t[1];if(t instanceof r.Color)return t.rgba[1];throw new Error("Needs p5.Color or pixel array as argument.")},r.prototype.hue=function(t){if(!t instanceof r.Color)throw new Error("Needs p5.Color as argument.");return t.hsba||(t.hsba=r.Color.getRGB(t.rgba)),t.hsba[0]},r.prototype.lerpColor=function(t,e,o){if(t instanceof Array){for(var n=[],i=0;i<t.length;i++)n.push(r.prototype.lerp(t[i],e[i],o));return n}if(t instanceof r.Color){for(var s=[],a=0;4>a;a++)s.push(r.prototype.lerp(t.rgba[a],e.rgba[a],o));return new r.Color(this,s)}return r.prototype.lerp(t,e,o)},r.prototype.red=function(t){if(t instanceof Array)return t[0];if(t instanceof r.Color)return t.rgba[0];throw new Error("Needs p5.Color or pixel array as argument.")},r.prototype.saturation=function(t){if(!t instanceof r.Color)throw new Error("Needs p5.Color as argument.");return t.hsba||(t.hsba=r.Color.getRGB(t.rgba),t.hsba=t.hsba.concat(t.rgba[3])),t.hsba[1]},r}({},core,p5Color),colorsetting=function(t,e,r){"use strict";var o=e,r=r;return o.prototype._doStroke=!0,o.prototype._doFill=!0,o.prototype._colorMode=r.RGB,o.prototype._maxRGB=[255,255,255,255],o.prototype._maxHSB=[255,255,255,255],o.prototype.background=function(){if(arguments[0]instanceof o.Image)this.image(arguments[0],0,0,this.width,this.height);else{var t=this.drawingContext.fillStyle,e=this.drawingContext;e.fillStyle=o.Color.getColor.apply(this,arguments),e.fillRect(0,0,this.width,this.height),e.fillStyle=t}},o.prototype.clear=function(){this.drawingContext.clearRect(0,0,this.width,this.height)},o.prototype.colorMode=function(){if(arguments[0]===r.RGB||arguments[0]===r.HSB){this._colorMode=arguments[0];var t=this._colorMode===r.RGB,e=t?this._maxRGB:this._maxHSB;2===arguments.length?(e[0]=arguments[1],e[1]=arguments[1],e[2]=arguments[1]):arguments.length>2&&(e[0]=arguments[1],e[1]=arguments[2],e[2]=arguments[3]),5===arguments.length&&(e[3]=arguments[4])}},o.prototype.fill=function(){this._setProperty("_doFill",!0);var t=this.drawingContext;t.fillStyle=o.Color.getColor.apply(this,arguments)},o.prototype.noFill=function(){this._setProperty("_doFill",!1)},o.prototype.noStroke=function(){this._setProperty("_doStroke",!1)},o.prototype.stroke=function(){this._setProperty("_doStroke",!0);var t=this.drawingContext;t.strokeStyle=o.Color.getColor.apply(this,arguments)},o}({},core,constants,p5Color),dataarray_functions=function(t,e){"use strict";var r=e;return r.prototype.append=function(t,e){return t.push(e),t},r.prototype.arrayCopy=function(t,e,r,o,n){var i,s;"undefined"!=typeof n?(s=Math.min(n,t.length),i=o,t=t.slice(e,s+e)):("undefined"!=typeof r?(s=r,s=Math.min(s,t.length)):s=t.length,i=0,r=e,t=t.slice(0,s)),Array.prototype.splice.apply(r,[i,s].concat(t))},r.prototype.concat=function(t,e){return t.concat(e)},r.prototype.reverse=function(t){return t.reverse()},r.prototype.shorten=function(t){return t.pop(),t},r.prototype.sort=function(t,e){var r=e?t.slice(0,Math.min(e,t.length)):t,o=e?t.slice(Math.min(e,t.length)):[];return r="string"==typeof r[0]?r.sort():r.sort(function(t,e){return t-e}),r.concat(o)},r.prototype.splice=function(t,e,r){return Array.prototype.splice.apply(t,[r,0].concat(e)),t},r.prototype.subset=function(t,e,r){return"undefined"!=typeof r?t.slice(e,e+r):t.slice(e,t.length)},r}({},core),datastring_functions=function(t,e){"use strict";function r(){var t=arguments[0],e=0>t,r=e?t.toString().substring(1):t.toString(),o=r.indexOf("."),n=-1!==o?r.substring(0,o):r,i=-1!==o?r.substring(o+1):"",s=e?"-":"";if(3===arguments.length){for(var a=0;a<arguments[1]-n.length;a++)s+="0";s+=n,s+=".",s+=i;for(var u=0;u<arguments[2]-i.length;u++)s+="0";return s}for(var p=0;p<Math.max(arguments[1]-n.length,0);p++)s+="0";return s+=r}function o(){var t=arguments[0].toString(),e=t.indexOf("."),r=-1!==e?t.substring(e):"",o=-1!==e?t.substring(0,e):t;return o=o.toString().replace(/\B(?=(\d{3})+(?!\d))/g,","),arguments.length>1&&(r=r.substring(0,arguments[1]+1)),o+r}function n(){return parseFloat(arguments[0])>0?"+"+arguments[0].toString():arguments[0].toString()}function i(){return parseFloat(arguments[0])>0?" "+arguments[0].toString():arguments[0].toString()}var s=e;return s.prototype.join=function(t,e){return t.join(e)},s.prototype.match=function(t,e){return t.match(e)},s.prototype.matchAll=function(t,e){for(var r=new RegExp(e,"g"),o=r.exec(t),n=[];null!==o;)n.push(o),o=r.exec(t);return n},s.prototype.nf=function(){if(arguments[0]instanceof Array){var t=arguments[1],e=arguments[2];return arguments[0].map(function(o){return r(o,t,e)})}return r.apply(this,arguments)},s.prototype.nfc=function(){if(arguments[0]instanceof Array){var t=arguments[1];return arguments[0].map(function(e){return o(e,t)})}return o.apply(this,arguments)},s.prototype.nfp=function(){var t=this.nf(arguments);return t instanceof Array?t.map(n):n(t)},s.prototype.nfs=function(){var t=this.nf(arguments);return t instanceof Array?t.map(i):i(t)},s.prototype.split=function(t,e){return t.split(e)},s.prototype.splitTokens=function(){var t=arguments.length>0?arguments[1]:/\s/g;return arguments[0].split(t).filter(function(t){return t})},s.prototype.trim=function(t){return t instanceof Array?t.map(this.trim):t.trim()},s}({},core),environment=function(t,e,r){"use strict";function o(t){var e=document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled;if(!e)throw new Error("Fullscreen not enabled in this browser.");t.requestFullscreen?t.requestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.webkitRequestFullscreen?t.webkitRequestFullscreen():t.msRequestFullscreen&&t.msRequestFullscreen()}function n(){document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen&&document.webkitExitFullscreen()}var i=e,s=r,a=[s.ARROW,s.CROSS,s.HAND,s.MOVE,s.TEXT,s.WAIT];return i.prototype._frameRate=0,i.prototype._lastFrameTime=0,i.prototype._targetFrameRate=60,i.prototype.frameCount=0,i.prototype.focused=!0,i.prototype.cursor=function(t,e,r){var o="auto",n=this._curElement.elt;if(a.indexOf(t)>-1)o=t;else if("string"==typeof t){var i="";e&&r&&"number"==typeof e&&"number"==typeof r&&(i=e+" "+r),o="http://"!==t.substring(0,6)?"url("+t+") "+i+", auto":/\.(cur|jpg|jpeg|gif|png|CUR|JPG|JPEG|GIF|PNG)$/.test(t)?"url("+t+") "+i+", auto":t}n.style.cursor=o},i.prototype.frameRate=function(t){return"undefined"==typeof t?this._frameRate:(this._setProperty("_targetFrameRate",t),this._runFrames(),this)},i.prototype.getFrameRate=function(){return this.frameRate()
},i.prototype.setFrameRate=function(t){return this.frameRate(t)},i.prototype.noCursor=function(){this._curElement.elt.style.cursor="none"},i.prototype.displayWidth=screen.width,i.prototype.displayHeight=screen.height,i.prototype.windowWidth=window.innerWidth,i.prototype.windowHeight=window.innerHeight,window.addEventListener("resize",function(){this.windowWidth=window.innerWidth,this.windowHeight=window.innerHeight}),i.prototype.width=0,i.prototype.height=0,i.prototype.fullscreen=function(t){return"undefined"==typeof t?document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement:void(t?o(document.documentElement):n())},i}({},core,constants),imageimage=function(t,e,r){"use strict";var o=e,r=r;return o.prototype._imageMode=r.CORNER,o.prototype._tint=null,o.prototype.createImage=function(t,e){return new o.Image(t,e)},o}({},core,constants),canvas=function(t,e){var e=e;return{modeAdjust:function(t,r,o,n,i){return i===e.CORNER?{x:t,y:r,w:o,h:n}:i===e.CORNERS?{x:t,y:r,w:o-t,h:n-r}:i===e.RADIUS?{x:t-o,y:r-n,w:2*o,h:2*n}:i===e.CENTER?{x:t-.5*o,y:r-.5*n,w:o,h:n}:void 0},arcModeAdjust:function(t,r,o,n,i){return i===e.CORNER?{x:t+.5*o,y:r+.5*n,w:o,h:n}:i===e.CORNERS?{x:t,y:r,w:o+t,h:n+r}:i===e.RADIUS?{x:t,y:r,w:2*o,h:2*n}:i===e.CENTER?{x:t,y:r,w:o,h:n}:void 0}}}({},constants),imageloading_displaying=function(t,e,r,o,n){"use strict";var i=e,s=r,o=o,n=n;return i.prototype.loadImage=function(t,e){var r=new Image,o=new i.Image(1,1,this);return r.onload=function(){o.width=o.canvas.width=r.width,o.height=o.canvas.height=r.height,o.canvas.getContext("2d").drawImage(r,0,0),"undefined"!=typeof e&&e(o)},r.crossOrigin="Anonymous",r.src=t,o},i.prototype.image=function(t,e,r,n,i){var s=t.canvas?t.canvas:t.elt;void 0===n&&(n=t.width),void 0===i&&(i=t.height);var a=o.modeAdjust(e,r,n,i,this._imageMode);this._tint?this.drawingContext.drawImage(this._getTintedImageCanvas(t),a.x,a.y,a.w,a.h):this.drawingContext.drawImage(s,a.x,a.y,a.w,a.h)},i.prototype.tint=function(){var t=i.Color.getNormalizedColor.apply(this,arguments);this._tint=t},i.prototype.noTint=function(){this._tint=null},i.prototype._getTintedImageCanvas=function(t){if(!t.canvas)return t;var e=s._toPixels(t.canvas),r=document.createElement("canvas");r.width=t.canvas.width,r.height=t.canvas.height;for(var o=r.getContext("2d"),n=o.createImageData(t.canvas.width,t.canvas.height),i=n.data,a=0;a<e.length;a+=4){var u=e[a],p=e[a+1],h=e[a+2],l=e[a+3];i[a]=u*this._tint[0]/255,i[a+1]=p*this._tint[1]/255,i[a+2]=h*this._tint[2]/255,i[a+3]=l*this._tint[3]/255}return o.putImageData(n,0,0),r},i.prototype.imageMode=function(t){(t===n.CORNER||t===n.CORNERS||t===n.CENTER)&&(this._imageMode=t)},i}({},core,filters,canvas,constants),imagepixels=function(t,e,r){"use strict";var o=e,n=r;return o.prototype.pixels=[],o.prototype.blend=function(){var t=this.drawingContext.globalCompositeOperation,e=arguments[arguments.length-1],r=Array.prototype.slice.call(arguments,0,arguments.length-1);this.drawingContext.globalCompositeOperation=e,this.copy.apply(this,r),this.drawingContext.globalCompositeOperation=t},o.prototype.copy=function(){var t,e,r,o,n,i,s,a,u;if(9===arguments.length)t=arguments[0],e=arguments[1],r=arguments[2],o=arguments[3],n=arguments[4],i=arguments[5],s=arguments[6],a=arguments[7],u=arguments[8];else{if(8!==arguments.length)throw new Error("Signature not supported");e=arguments[0],r=arguments[1],o=arguments[2],n=arguments[3],i=arguments[4],s=arguments[5],a=arguments[6],u=arguments[7],t=this}this.drawingContext.drawImage(t.canvas,e,r,o,n,i,s,a,u)},o.prototype.filter=function(t,e){n.apply(this.canvas,n[t.toLowerCase()],e)},o.prototype.get=function(t,e,r,n){if(void 0===t&&void 0===e&&void 0===r&&void 0===n?(t=0,e=0,r=this.width,n=this.height):void 0===r&&void 0===n&&(r=1,n=1),t>this.width||e>this.height||0>t||0>e)return[0,0,0,255];var i=this.drawingContext.getImageData(t,e,r,n),s=i.data;if(1===r&&1===n){for(var a=[],u=0;u<s.length;u+=4)a.push(s[u],s[u+1],s[u+2],s[u+3]);return a}r=Math.min(r,this.width),n=Math.min(n,this.height);var p=new o.Image(r,n);return p.canvas.getContext("2d").putImageData(i,0,0,0,0,r,n),p},o.prototype.loadPixels=function(){var t=this.width,e=this.height,r=this.drawingContext.getImageData(0,0,t,e);this._setProperty("imageData",r),this._setProperty("pixels",r.data)},o.prototype.set=function(t,e,r){if(r instanceof o.Image)this.drawingContext.drawImage(r.canvas,t,e),this.loadPixels.call(this);else{var n=4*(e*this.width+t);if(this.imageData||this.loadPixels.call(this),"number"==typeof r)n<this.pixels.length&&(this.pixels[n]=r,this.pixels[n+1]=r,this.pixels[n+2]=r,this.pixels[n+3]=255);else if(r instanceof Array){if(r.length<4)throw new Error("pixel array must be of the form [R, G, B, A]");n<this.pixels.length&&(this.pixels[n]=r[0],this.pixels[n+1]=r[1],this.pixels[n+2]=r[2],this.pixels[n+3]=r[3])}else r instanceof o.Color&&n<this.pixels.length&&(this.pixels[n]=r.rgba[0],this.pixels[n+1]=r.rgba[1],this.pixels[n+2]=r.rgba[2],this.pixels[n+3]=r.rgba[3])}},o.prototype.updatePixels=function(t,e,r,o){void 0===t&&void 0===e&&void 0===r&&void 0===o&&(t=0,e=0,r=this.width,o=this.height),this.drawingContext.putImageData(this.imageData,t,e,0,0,r,o)},o}({},core,filters,p5Color);!function(t,e,r){"undefined"!=typeof module&&module.exports?module.exports=r():"function"==typeof define&&define.amd?define("reqwest",r):e[t]=r()}("reqwest",this,function(){function handleReadyState(t,e,r){return function(){return t._aborted?r(t.request):void(t.request&&4==t.request[readyState]&&(t.request.onreadystatechange=noop,twoHundo.test(t.request.status)?e(t.request):r(t.request)))}}function setHeaders(t,e){var r,o=e.headers||{};o.Accept=o.Accept||defaultHeaders.accept[e.type]||defaultHeaders.accept["*"],e.crossOrigin||o[requestedWith]||(o[requestedWith]=defaultHeaders.requestedWith),o[contentType]||(o[contentType]=e.contentType||defaultHeaders.contentType);for(r in o)o.hasOwnProperty(r)&&"setRequestHeader"in t&&t.setRequestHeader(r,o[r])}function setCredentials(t,e){"undefined"!=typeof e.withCredentials&&"undefined"!=typeof t.withCredentials&&(t.withCredentials=!!e.withCredentials)}function generalCallback(t){lastValue=t}function urlappend(t,e){return t+(/\?/.test(t)?"&":"?")+e}function handleJsonp(t,e,r,o){var n=uniqid++,i=t.jsonpCallback||"callback",s=t.jsonpCallbackName||reqwest.getcallbackPrefix(n),a=new RegExp("((^|\\?|&)"+i+")=([^&]+)"),u=o.match(a),p=doc.createElement("script"),h=0,l=-1!==navigator.userAgent.indexOf("MSIE 10.0");return u?"?"===u[3]?o=o.replace(a,"$1="+s):s=u[3]:o=urlappend(o,i+"="+s),win[s]=generalCallback,p.type="text/javascript",p.src=o,p.async=!0,"undefined"==typeof p.onreadystatechange||l||(p.event="onclick",p.htmlFor=p.id="_reqwest_"+n),p.onload=p.onreadystatechange=function(){return p[readyState]&&"complete"!==p[readyState]&&"loaded"!==p[readyState]||h?!1:(p.onload=p.onreadystatechange=null,p.onclick&&p.onclick(),e(lastValue),lastValue=void 0,head.removeChild(p),void(h=1))},head.appendChild(p),{abort:function(){p.onload=p.onreadystatechange=null,r({},"Request is aborted: timeout",{}),lastValue=void 0,head.removeChild(p),h=1}}}function getRequest(t,e){var r,o=this.o,n=(o.method||"GET").toUpperCase(),i="string"==typeof o?o:o.url,s=o.processData!==!1&&o.data&&"string"!=typeof o.data?reqwest.toQueryString(o.data):o.data||null,a=!1;return"jsonp"!=o.type&&"GET"!=n||!s||(i=urlappend(i,s),s=null),"jsonp"==o.type?handleJsonp(o,t,e,i):(r=o.xhr&&o.xhr(o)||xhr(o),r.open(n,i,o.async===!1?!1:!0),setHeaders(r,o),setCredentials(r,o),win[xDomainRequest]&&r instanceof win[xDomainRequest]?(r.onload=t,r.onerror=e,r.onprogress=function(){},a=!0):r.onreadystatechange=handleReadyState(this,t,e),o.before&&o.before(r),a?setTimeout(function(){r.send(s)},200):r.send(s),r)}function Reqwest(t,e){this.o=t,this.fn=e,init.apply(this,arguments)}function setType(t){var e=t.match(/\.(json|jsonp|html|xml)(\?|$)/);return e?e[1]:"js"}function init(o,fn){function complete(t){for(o.timeout&&clearTimeout(self.timeout),self.timeout=null;self._completeHandlers.length>0;)self._completeHandlers.shift()(t)}function success(resp){resp="jsonp"!==type?self.request:resp;var filteredResponse=globalSetupOptions.dataFilter(resp.responseText,type),r=filteredResponse;try{resp.responseText=r}catch(e){}if(r)switch(type){case"json":try{resp=win.JSON?win.JSON.parse(r):eval("("+r+")")}catch(err){return error(resp,"Could not parse JSON in response",err)}break;case"js":resp=eval(r);break;case"html":resp=r;break;case"xml":resp=resp.responseXML&&resp.responseXML.parseError&&resp.responseXML.parseError.errorCode&&resp.responseXML.parseError.reason?null:resp.responseXML}for(self._responseArgs.resp=resp,self._fulfilled=!0,fn(resp),self._successHandler(resp);self._fulfillmentHandlers.length>0;)resp=self._fulfillmentHandlers.shift()(resp);complete(resp)}function error(t,e,r){for(t=self.request,self._responseArgs.resp=t,self._responseArgs.msg=e,self._responseArgs.t=r,self._erred=!0;self._errorHandlers.length>0;)self._errorHandlers.shift()(t,e,r);complete(t)}this.url="string"==typeof o?o:o.url,this.timeout=null,this._fulfilled=!1,this._successHandler=function(){},this._fulfillmentHandlers=[],this._errorHandlers=[],this._completeHandlers=[],this._erred=!1,this._responseArgs={};var self=this,type=o.type||setType(this.url);fn=fn||function(){},o.timeout&&(this.timeout=setTimeout(function(){self.abort()},o.timeout)),o.success&&(this._successHandler=function(){o.success.apply(o,arguments)}),o.error&&this._errorHandlers.push(function(){o.error.apply(o,arguments)}),o.complete&&this._completeHandlers.push(function(){o.complete.apply(o,arguments)}),this.request=getRequest.call(this,success,error)}function reqwest(t,e){return new Reqwest(t,e)}function normalize(t){return t?t.replace(/\r?\n/g,"\r\n"):""}function serial(t,e){var r,o,n,i,s=t.name,a=t.tagName.toLowerCase(),u=function(t){t&&!t.disabled&&e(s,normalize(t.attributes.value&&t.attributes.value.specified?t.value:t.text))};if(!t.disabled&&s)switch(a){case"input":/reset|button|image|file/i.test(t.type)||(r=/checkbox/i.test(t.type),o=/radio/i.test(t.type),n=t.value,(!(r||o)||t.checked)&&e(s,normalize(r&&""===n?"on":n)));break;case"textarea":e(s,normalize(t.value));break;case"select":if("select-one"===t.type.toLowerCase())u(t.selectedIndex>=0?t.options[t.selectedIndex]:null);else for(i=0;t.length&&i<t.length;i++)t.options[i].selected&&u(t.options[i])}}function eachFormElement(){var t,e,r=this,o=function(t,e){var o,n,i;for(o=0;o<e.length;o++)for(i=t[byTag](e[o]),n=0;n<i.length;n++)serial(i[n],r)};for(e=0;e<arguments.length;e++)t=arguments[e],/input|select|textarea/i.test(t.tagName)&&serial(t,r),o(t,["input","select","textarea"])}function serializeQueryString(){return reqwest.toQueryString(reqwest.serializeArray.apply(null,arguments))}function serializeHash(){var t={};return eachFormElement.apply(function(e,r){e in t?(t[e]&&!isArray(t[e])&&(t[e]=[t[e]]),t[e].push(r)):t[e]=r},arguments),t}function buildParams(t,e,r,o){var n,i,s,a=/\[\]$/;if(isArray(e))for(i=0;e&&i<e.length;i++)s=e[i],r||a.test(t)?o(t,s):buildParams(t+"["+("object"==typeof s?i:"")+"]",s,r,o);else if(e&&"[object Object]"===e.toString())for(n in e)buildParams(t+"["+n+"]",e[n],r,o);else o(t,e)}var win=window,doc=document,twoHundo=/^(20\d|1223)$/,byTag="getElementsByTagName",readyState="readyState",contentType="Content-Type",requestedWith="X-Requested-With",head=doc[byTag]("head")[0],uniqid=0,callbackPrefix="reqwest_"+ +new Date,lastValue,xmlHttpRequest="XMLHttpRequest",xDomainRequest="XDomainRequest",noop=function(){},isArray="function"==typeof Array.isArray?Array.isArray:function(t){return t instanceof Array},defaultHeaders={contentType:"application/x-www-form-urlencoded",requestedWith:xmlHttpRequest,accept:{"*":"text/javascript, text/html, application/xml, text/xml, */*",xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript",js:"application/javascript, text/javascript"}},xhr=function(t){if(t.crossOrigin===!0){var e=win[xmlHttpRequest]?new XMLHttpRequest:null;if(e&&"withCredentials"in e)return e;if(win[xDomainRequest])return new XDomainRequest;throw new Error("Browser does not support cross-origin requests")}return win[xmlHttpRequest]?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP")},globalSetupOptions={dataFilter:function(t){return t}};return Reqwest.prototype={abort:function(){this._aborted=!0,this.request.abort()},retry:function(){init.call(this,this.o,this.fn)},then:function(t,e){return t=t||function(){},e=e||function(){},this._fulfilled?this._responseArgs.resp=t(this._responseArgs.resp):this._erred?e(this._responseArgs.resp,this._responseArgs.msg,this._responseArgs.t):(this._fulfillmentHandlers.push(t),this._errorHandlers.push(e)),this},always:function(t){return this._fulfilled||this._erred?t(this._responseArgs.resp):this._completeHandlers.push(t),this},fail:function(t){return this._erred?t(this._responseArgs.resp,this._responseArgs.msg,this._responseArgs.t):this._errorHandlers.push(t),this}},reqwest.serializeArray=function(){var t=[];return eachFormElement.apply(function(e,r){t.push({name:e,value:r})},arguments),t},reqwest.serialize=function(){if(0===arguments.length)return"";var t,e,r=Array.prototype.slice.call(arguments,0);return t=r.pop(),t&&t.nodeType&&r.push(t)&&(t=null),t&&(t=t.type),e="map"==t?serializeHash:"array"==t?reqwest.serializeArray:serializeQueryString,e.apply(null,r)},reqwest.toQueryString=function(t,e){var r,o,n=e||!1,i=[],s=encodeURIComponent,a=function(t,e){e="function"==typeof e?e():null==e?"":e,i[i.length]=s(t)+"="+s(e)};if(isArray(t))for(o=0;t&&o<t.length;o++)a(t[o].name,t[o].value);else for(r in t)t.hasOwnProperty(r)&&buildParams(r,t[r],n,a);return i.join("&").replace(/%20/g,"+")},reqwest.getcallbackPrefix=function(){return callbackPrefix},reqwest.compat=function(t,e){return t&&(t.type&&(t.method=t.type)&&delete t.type,t.dataType&&(t.type=t.dataType),t.jsonpCallback&&(t.jsonpCallbackName=t.jsonpCallback)&&delete t.jsonpCallback,t.jsonp&&(t.jsonpCallback=t.jsonp)),new Reqwest(t,e)},reqwest.ajaxSetup=function(t){t=t||{};for(var e in t)globalSetupOptions[e]=t[e]},reqwest});var inputfiles=function(t,e,r){"use strict";function o(t,e){var r={};if(e=e||[],"undefined"==typeof e)for(var o=0;o<t.length;o++)e[o.toString()]=o;for(var n=0;n<e.length;n++){var i=e[n],s=t[n];r[i]=s}return r}var n=e,r=r;return n.prototype.createInput=function(){throw"not yet implemented"},n.prototype.createReader=function(){throw"not yet implemented"},n.prototype.loadBytes=function(){throw"not yet implemented"},n.prototype.loadJSON=function(t,e){var o=[],n=-1===t.indexOf("http")?"json":"jsonp";return r({url:t,type:n,success:function(t){for(var r in t)o[r]=t[r];"undefined"!=typeof e&&e(o)}}),o},n.prototype.loadStrings=function(t,e){var r=[],o=new XMLHttpRequest;return o.open("GET",t,!0),o.onreadystatechange=function(){if(4===o.readyState&&(200===o.status||0===o.status)){var t=o.responseText.match(/[^\r\n]+/g);for(var n in t)r[n]=t[n];"undefined"!=typeof e&&e(r)}},o.send(null),r},n.prototype.loadTable=function(t){for(var e=null,r=[],i=!1,s=",",a=1;a<arguments.length;a++)"function"==typeof arguments[a]?e=arguments[a]:"string"==typeof arguments[a]&&(r.push(arguments[a]),"header"===arguments[a]&&(i=!0),"csv"===arguments[a]?s=",":"tsv"===arguments[a]&&(s=" "));var u=[],p=new n.Table,h=new XMLHttpRequest;return h.open("GET",t,!0),h.onreadystatechange=function(){if(4===h.readyState&&(200===h.status||0===h.status)){var t=h.responseText.match(/[^\r\n]+/g);for(var r in t)u[r]=t[r];if("undefined"!=typeof e){var a,l;if(i)for(p.columns=new n.TableRow(u[0]).arr,a=1;a<u.length;a++)l=new n.TableRow(u[a],s),l.obj=o(l.arr,p.columns),p.addRow(l);else{for(a=0;a<u[0].split(s).length;a++)p.columns[a]=a.toString();for(a=0;a<u.length;a++)l=new n.TableRow(u[a],s),p.addRow(l)}e(p)}}},h.send(null),p},n.prototype.loadXML=function(t,e){var o=[];return r({url:t,type:"xml",success:function(t){o[0]=t,"undefined"!=typeof e&&e(o)}}),o},n.prototype.parseXML=function(){throw"not yet implemented"},n.prototype.selectFolder=function(){throw"not yet implemented"},n.prototype.selectInput=function(){throw"not yet implemented"},n}({},core,reqwest),inputkeyboard=function(t,e){"use strict";var r=e;return r.prototype.isKeyPressed=!1,r.prototype.keyIsPressed=!1,r.prototype.key="",r.prototype.keyCode=0,r.prototype.onkeydown=function(t){this._setProperty("isKeyPressed",!0),this._setProperty("keyIsPressed",!0),this._setProperty("keyCode",t.which);var e=String.fromCharCode(t.which);e||(e=t.which),this._setProperty("key",e);var r=this.keyPressed||window.keyPressed;"function"!=typeof r||t.charCode||r(t)},r.prototype.onkeyup=function(t){var e=this.keyReleased||window.keyReleased;this._setProperty("isKeyPressed",!1),this._setProperty("keyIsPressed",!1),"function"==typeof e&&e(t)},r.prototype.onkeypress=function(t){this._setProperty("keyCode",t.which),this._setProperty("key",String.fromCharCode(t.which));var e=this.keyTyped||window.keyTyped;"function"==typeof e&&e(t)},r}({},core),inputmouse=function(t,e,r){"use strict";function o(t,e){var r=t.getBoundingClientRect();return{x:e.clientX-r.left,y:e.clientY-r.top}}var n=e,r=r;return n.prototype.mouseX=0,n.prototype.mouseY=0,n.prototype.pmouseX=0,n.prototype.pmouseY=0,n.prototype.winMouseX=0,n.prototype.winMouseY=0,n.prototype.pwinMouseX=0,n.prototype.pwinMouseY=0,n.prototype.mouseButton=0,n.prototype.mouseIsPressed=!1,n.prototype.isMousePressed=!1,n.prototype.updateMouseCoords=function(t){var e=o(this._curElement.elt,t);this._setProperty("pmouseX",this.mouseX),this._setProperty("pmouseY",this.mouseY),"touchstart"===t.type||"touchmove"===t.type?(this._setProperty("mouseX",this.touchX),this._setProperty("mouseY",this.touchY)):(this._setProperty("mouseX",e.x),this._setProperty("mouseY",e.y)),this._setProperty("pwinMouseX",this.winMouseX),this._setProperty("pwinMouseY",this.winMouseY),this._setProperty("winMouseX",t.pageX),this._setProperty("winMouseY",t.pageY)},n.prototype.setMouseButton=function(t){1===t.button?this._setProperty("mouseButton",r.CENTER):2===t.button?this._setProperty("mouseButton",r.RIGHT):(this._setProperty("mouseButton",r.LEFT),("touchstart"===t.type||"touchmove"===t.type)&&(this._setProperty("mouseX",this.touchX),this._setProperty("mouseY",this.touchY)))},n.prototype.onmousemove=function(t){var e=this._isGlobal?window:this;this.updateMouseCoords(t),this.isMousePressed?"function"==typeof e.mouseDragged?e.mouseDragged(t):"function"==typeof e.touchMoved&&(t.preventDefault(),this.setTouchPoints(t),e.touchMoved(t)):"function"==typeof e.mouseMoved&&e.mouseMoved(t)},n.prototype.onmousedown=function(t){var e=this._isGlobal?window:this;this._setProperty("isMousePressed",!0),this._setProperty("mouseIsPressed",!0),this.setMouseButton(t),"function"==typeof e.mousePressed?e.mousePressed(t):"function"==typeof e.touchStarted&&(t.preventDefault(),this.setTouchPoints(t),e.touchStarted(t))},n.prototype.onmouseup=function(t){var e=this._isGlobal?window:this;this._setProperty("isMousePressed",!1),this._setProperty("mouseIsPressed",!1),"function"==typeof e.mouseReleased?e.mouseReleased(t):"function"==typeof e.touchEnded&&(t.preventDefault(),this.setTouchPoints(t),e.touchEnded(t))},n.prototype.onclick=function(t){var e=this._isGlobal?window:this;"function"==typeof e.mouseClicked&&e.mouseClicked(t)},n.prototype.onmousewheel=function(t){var e=this._isGlobal?window:this;"function"==typeof e.mouseWheel&&(t.preventDefault(),e.mouseWheel(t))},n}({},core,constants),inputtime_date=function(t,e){"use strict";var r=e;return r.prototype.day=function(){return(new Date).getDate()},r.prototype.hour=function(){return(new Date).getHours()},r.prototype.minute=function(){return(new Date).getMinutes()},r.prototype.millis=function(){return(new Date).getTime()-this._startTime},r.prototype.month=function(){return(new Date).getMonth()+1},r.prototype.second=function(){return(new Date).getSeconds()},r.prototype.year=function(){return(new Date).getFullYear()},r}({},core),inputtouch=function(t,e){"use strict";var r=e;return r.prototype.touchX=0,r.prototype.touchY=0,r.prototype.touches=[],r.prototype.setTouchPoints=function(t){var e=this._isGlobal?window:this;if("mousedown"===t.type||"mousemove"===t.type)e._setProperty("touchX",e.mouseX),e._setProperty("touchY",e.mouseY);else{e._setProperty("touchX",t.changedTouches[0].pageX),e._setProperty("touchY",t.changedTouches[0].pageY);for(var r=[],o=0;o<t.changedTouches.length;o++){var n=t.changedTouches[o];r[o]={x:n.pageX,y:n.pageY}}e._setProperty("touches",r)}},r.prototype.ontouchstart=function(t){var e=this._isGlobal?window:this;this.setTouchPoints(t),"function"==typeof e.touchStarted?(t.preventDefault(),e.touchStarted(t)):"function"==typeof e.mousePressed&&(t.preventDefault(),this.setMouseButton(t),e.mousePressed(t))},r.prototype.ontouchmove=function(t){var e=this._isGlobal?window:this;this.setTouchPoints(t),"function"==typeof e.touchMoved?(t.preventDefault(),e.touchMoved(t)):"function"==typeof e.mouseDragged&&(t.preventDefault(),this.updateMouseCoords(t),e.mouseDragged(t))},r.prototype.ontouchend=function(t){var e=this._isGlobal?window:this;"function"==typeof e.touchEnded?(t.preventDefault(),e.touchEnded(t)):"function"==typeof e.mouseReleased&&(t.preventDefault(),this.updateMouseCoords(t),e.mouseReleased(t))},r}({},core),mathmath=function(t,e){"use strict";var r=e;return r.prototype.createVector=function(){return new r.Vector(this,arguments)},r}({},core),mathcalculation=function(t,e){"use strict";var r=e;return r.prototype.abs=Math.abs,r.prototype.ceil=Math.ceil,r.prototype.constrain=function(t,e,r){return Math.max(Math.min(t,r),e)},r.prototype.dist=function(t,e,r,o){return Math.sqrt((r-t)*(r-t)+(o-e)*(o-e))},r.prototype.exp=Math.exp,r.prototype.floor=Math.floor,r.prototype.lerp=function(t,e,r){return r*(e-t)+t},r.prototype.log=Math.log,r.prototype.mag=function(t,e){return Math.sqrt(t*t+e*e)},r.prototype.map=function(t,e,r,o,n){return(t-e)/(r-e)*(n-o)+o},r.prototype.max=function(){return arguments[0]instanceof Array?Math.max.apply(null,arguments[0]):Math.max.apply(null,arguments)},r.prototype.min=function(){return arguments[0]instanceof Array?Math.min.apply(null,arguments[0]):Math.min.apply(null,arguments)},r.prototype.norm=function(t,e,r){return this.map(t,e,r,0,1)},r.prototype.pow=Math.pow,r.prototype.round=Math.round,r.prototype.sq=function(t){return t*t},r.prototype.sqrt=Math.sqrt,r}({},core),mathrandom=function(t,e){"use strict";var r=e,o=!1,n=function(){var t,e,r=4294967296,o=1664525,n=1013904223;return{setSeed:function(o){e=t=o||Math.round(Math.random()*r)},getSeed:function(){return t},rand:function(){return e=(o*e+n)%r,e/r}}}();r.prototype.randomSeed=function(t){n.setSeed(t),o=!0},r.prototype.random=function(t,e){var r;if(r=o?n.rand():Math.random(),0===arguments.length)return r;if(1===arguments.length)return r*t;if(t>e){var i=t;t=e,e=i}return r*(e-t)+t};var i,s=!1;return r.prototype.randomGaussian=function(t,e){var r,o,n,a;if(s)r=i,s=!1;else{do o=this.random(2)-1,n=this.random(2)-1,a=o*o+n*n;while(a>=1);a=Math.sqrt(-2*Math.log(a)/a),r=o*a,i=n*a,s=!0}var u=t||0,p=e||1;return r*p+u},r}({},core),mathnoise=function(t,e){"use strict";for(var r=e,o=4,n=1<<o,i=8,s=1<<i,a=4095,u=4,p=.5,h=.5,l=Math.floor(360/h),c=new Array(l),d=new Array(l),f=Math.PI/180,g=0;l>g;g++)c[g]=Math.sin(g*f*h),d[g]=Math.cos(g*f*h);var y=l;y>>=1;var m;return r.prototype.noise=function(t,e,r){if(e=e||0,r=r||0,null==m){m=new Array(a+1);for(var h=0;a+1>h;h++)m[h]=Math.random()}0>t&&(t=-t),0>e&&(e=-e),0>r&&(r=-r);for(var c,f,g,w,v,_=Math.floor(t),x=Math.floor(e),b=Math.floor(r),C=t-_,R=e-x,E=r-b,S=0,M=.5,T=function(t){return.5*(1-d[Math.floor(t*y)%l])},I=0;u>I;I++){var A=_+(x<<o)+(b<<i);c=T(C),f=T(R),g=m[A&a],g+=c*(m[A+1&a]-g),w=m[A+n&a],w+=c*(m[A+n+1&a]-w),g+=f*(w-g),A+=s,w=m[A&a],w+=c*(m[A+1&a]-w),v=m[A+n&a],v+=c*(m[A+n+1&a]-v),w+=f*(v-w),g+=T(E)*(w-g),S+=g*M,M*=p,_<<=1,C*=2,x<<=1,R*=2,b<<=1,E*=2,C>=1&&(_++,C--),R>=1&&(x++,R--),E>=1&&(b++,E--)}return S},r.prototype.noiseDetail=function(t,e){t>0&&(u=t),e>0&&(p=e)},r.prototype.noiseSeed=function(t){var e=function(){var t,e,r=4294967296,o=1664525,n=1013904223;return{setSeed:function(o){e=t=o||Math.round(Math.random()*r)},getSeed:function(){return t},rand:function(){return e=(o*e+n)%r,e/r}}}();e.setSeed(t),m=new Array(a+1);for(var r=0;a+1>r;r++)m[r]=e.rand()},r}({},core),mathtrigonometry=function(t,e,r,o){"use strict";var n=e,i=r,o=o;return n.prototype._angleMode=o.RADIANS,n.prototype.acos=function(t){return this._angleMode===o.RADIANS?Math.acos(t):i.radiansToDegrees(Math.acos(t))},n.prototype.asin=function(t){return this._angleMode===o.RADIANS?Math.asin(t):i.radiansToDegrees(Math.asin(t))},n.prototype.atan=function(t){return this._angleMode===o.RADIANS?Math.atan(t):i.radiansToDegrees(Math.atan(t))},n.prototype.atan2=function(t,e){return this._angleMode===o.RADIANS?Math.atan2(t,e):i.radiansToDegrees(Math.atan2(t,e))},n.prototype.cos=function(t){return Math.cos(this._angleMode===o.RADIANS?t:this.radians(t))},n.prototype.sin=function(t){return Math.sin(this._angleMode===o.RADIANS?t:this.radians(t))},n.prototype.tan=function(t){return Math.tan(this._angleMode===o.RADIANS?t:this.radians(t))},n.prototype.degrees=function(t){return i.radiansToDegrees(t)},n.prototype.radians=function(t){return i.degreesToRadians(t)},n.prototype.angleMode=function(t){(t===o.DEGREES||t===o.RADIANS)&&(this._angleMode=t)},n}({},core,polargeometry,constants),outputfiles=function(t,e){"use strict";function r(t,e){e||(e="");var r="";return t?r=t.split(".").pop():t="untitled",e&&r!==e&&(r=e,t=t+"."+r),[t,r]}function o(t){document.body.removeChild(t.target)}var n=e;return window.URL=window.URL||window.webkitURL,n.prototype._pWriters=[],n.prototype.beginRaw=function(){throw"not yet implemented"},n.prototype.beginRecord=function(){throw"not yet implemented"},n.prototype.createOutput=function(){throw"not yet implemented"},n.prototype.createWriter=function(t,e){var r;for(var o in n.prototype._pWriters)if(n.prototype._pWriters[o].name===t)return r=new n.PrintWriter(t+window.millis(),e),n.prototype._pWriters.push(r),r;return r=new n.PrintWriter(t,e),n.prototype._pWriters.push(r),r},n.prototype.endRaw=function(){throw"not yet implemented"},n.prototype.endRecord=function(){throw"not yet implemented"},n.prototype.escape=function(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")},n.PrintWriter=function(t,e){var r=this;this.name=t,this.content="",this.print=function(t){this.content+=t},this.println=function(t){this.content+=t+"\n"},this.flush=function(){this.content=""},this.close=function(){var o=[];o.push(this.content),n.prototype.writeFile(o,t,e);for(var i in n.prototype._pWriters)n.prototype._pWriters[i].name===this.name&&n.prototype._pWriters.splice(i,1);r.flush(),r={}}},n.prototype.saveBytes=function(){throw"not yet implemented"},n.prototype.save=function(){var t=arguments,e=this._curElement.elt;if(0===t.length)return void n.prototype.saveCanvas(null,null,e);if("string"==typeof t[0])return void("object"==typeof t[2]?n.prototype.saveCanvas(t[0],t[1],t[2]):"string"==typeof t[1]?n.prototype.saveCanvas(t[0],t[1],e):n.prototype.saveCanvas(t[0],null,e));var o=r(t[1],t[2])[1];switch(o){case"json":n.prototype.saveJSON(t[0],t[1],t[2]);break;case"txt":n.prototype.saveStrings(t[0],t[1],t[2]);break;default:t[0]instanceof Array?n.prototype.saveStrings(t[0],t[1],t[2]):t[0]instanceof n.Table?n.prototype.saveTable(t[0],t[1],t[2],t[3]):t[0]instanceof n.Image?n.prototype.saveCanvas(t[1],t[2],t[0].canvas):t[0]instanceof n.SoundFile?n.prototype.saveSound(t[0],t[1],t[2],t[3]):t[0]instanceof Object&&n.prototype.saveJSON(t[0],t[1],t[2])}},n.prototype.saveJSON=function(t,e,r){var o;o=r?JSON.stringify(t):JSON.stringify(t,void 0,2),this.saveStrings(o.split("\n"),e,"json")},n.prototype.saveJSONObject=n.prototype.saveJSON,n.prototype.saveJSONArray=n.prototype.saveJSON,n.prototype.saveStream=function(){throw"not yet implemented"},n.prototype.saveStrings=function(t,e,r){var o=r||"txt",n=this.createWriter(e,o);for(var i in t)i<t.length-1?n.println(t[i]):n.print(t[i]);n.close(),n.flush()},n.prototype.saveXML=function(){throw"not yet implemented"},n.prototype.selectOutput=function(){throw"not yet implemented"},n.prototype.saveTable=function(t,e,r){var o=this.createWriter(e,r),i=t.columns,s=",";if("tsv"===r&&(s=" "),"html"!==r){if("0"!==i[0])for(var a=0;a<i.length;a++)a<i.length-1?o.print(i[a]+s):o.println(i[a]);for(var u=0;u<t.rows.length;u++){var p;for(p=0;p<t.rows[u].arr.length;p++)p<t.rows[u].arr.length-1?o.print(t.rows[u].arr[p]+s):u<t.rows.length-1?o.println(t.rows[u].arr[p]):o.print(t.rows[u].arr[p])}}else{o.println("<html>"),o.println("<head>");var h=' <meta http-equiv="content-type" content';if(h+='="text/html;charset=utf-8" />',o.println(h),o.println("</head>"),o.println("<body>"),o.println(" <table>"),"0"!==i[0]){o.println(" <tr>");for(var l=0;l<i.length;l++){var c=n.prototype.escape(i[l]);o.println(" <td>"+c),o.println(" </td>")}o.println(" </tr>")}for(var d=0;d<t.rows.length;d++){o.println(" <tr>");for(var f=0;f<t.columns.length;f++){var g=t.rows[d].getString(f),y=n.prototype.escape(g);o.println(" <td>"+y),o.println(" </td>")}o.println(" </tr>")}o.println(" </table>"),o.println("</body>"),o.print("</html>")}o.close(),o.flush()},n.prototype.writeFile=function(t,e,r){var o="application/octet-stream";n.prototype._isSafari()&&(o="text/plain");var i=new Blob(t,{type:o}),s=window.URL.createObjectURL(i);n.prototype.downloadFile(s,e,r)},n.prototype.downloadFile=function(t,e,i){var s=r(e,i),a=s[0],u=s[1],p=document.createElement("a");if(p.href=t,p.download=a,p.onclick=o,p.style.display="none",document.body.appendChild(p),n.prototype._isSafari()){var h="Hello, Safari user! To download this file...\n";h+="1. Go to File --> Save As.\n",h+='2. Choose "Page Source" as the Format.\n',h+='3. Name it with this extension: ."'+u+'"',alert(h)}p.click(),t=null},n.prototype._isSafari=function(){var t=Object.prototype.toString.call(window.HTMLElement);return t.indexOf("Constructor")>0},n}({},core),outputimage=function(t,e){"use strict";var r=e,o=[];return r.prototype.saveCanvas=function(t,e,o){var n;if(o?n=o:this._curElement&&this._curElement.elt&&(n=this._curElement.elt),r.prototype._isSafari()){var i="Hello, Safari user!\n";i+="Now capturing a screenshot...\n",i+="To save this image,\n",i+="go to File --> Save As.\n",alert(i),window.location.href=n.toDataURL()}else{var s;if(e)switch(e.toLowerCase()){case"png":s="image/png";break;case"jpeg":s="image/jpeg";break;case"jpg":s="image/jpeg";break;default:s="image/png"}else e="png",s="image/png";var a="image/octet-stream",u=n.toDataURL(s);u=u.replace(s,a),r.prototype.downloadFile(u,t,e)}},r.prototype.saveFrames=function(t,e,n,i,s){var a=n||3;a=r.prototype.constrain(a,0,15),a=1e3*a;var u=i||15;u=r.prototype.constrain(u,0,22);var p=0,h=r.prototype._makeFrame,l=this._curElement.elt,c=setInterval(function(){h(t+p,e,l),p++},1e3/u);setTimeout(function(){if(clearInterval(c),s)s(o);else for(var t=0;t<o.length;t++){var e=o[t];r.prototype.downloadFile(e.imageData,e.filename,e.ext)}o=[]},a+.01)},r.prototype._makeFrame=function(t,e,r){var n;n=this?this._curElement.elt:r;var i;if(e)switch(e.toLowerCase()){case"png":i="image/png";break;case"jpeg":i="image/jpeg";break;case"jpg":i="image/jpeg";break;default:i="image/png"}else e="png",i="image/png";var s="image/octet-stream",a=n.toDataURL(i);a=a.replace(i,s);var u={};u.imageData=a,u.filename=t,u.ext=e,o.push(u)},r}({},core),outputtext_area=function(t,e){"use strict";var r=e;return r.prototype.print=window.console&&console.log?console.log.bind(console):function(){},r.prototype.println=r.prototype.print,r}({},core),renderingrendering=function(t,e,r){var o=e,r=r;return o.prototype.createCanvas=function(t,e,r){var n;if(r)n=document.createElement("canvas"),n.id="defaultCanvas";else if(n=document.getElementById("defaultCanvas"))n.id="";else{var i="Warning: createCanvas more than once NOT recommended.";
i+=" Very unpredictable behavior may result.",console.log(i)}n.setAttribute("width",t*this._pixelDensity),n.setAttribute("height",e*this._pixelDensity),n.setAttribute("style","width:"+t+"px !important; height:"+e+"px !important;"),this._setupDone||(n.className+=" p5_hidden",n.style.visibility="hidden"),this._userNode?this._userNode.appendChild(n):document.body.appendChild(n);var s=new o.Graphics(n,this);return r&&this._elements.push(s),this.scale(this._pixelDensity,this._pixelDensity),s},o.prototype.createGraphics=function(t,e){var r=document.createElement("canvas");r.setAttribute("width",t*this._pixelDensity),r.setAttribute("height",e*this._pixelDensity),r.setAttribute("style","width:"+t+"px !important; height:"+e+"px !important;");var n=this._userNode||document.body;n.appendChild(r);var i=new o.Graphics(r);this._elements.push(i);for(var s in o.prototype)i.hasOwnProperty(s)||(i[s]="function"==typeof o.prototype[s]?o.prototype[s].bind(i):o.prototype[s]);return i.scale(this._pixelDensity,this._pixelDensity),i},o.prototype.blendMode=function(t){if(t!==r.BLEND&&t!==r.DARKEST&&t!==r.LIGHTEST&&t!==r.DIFFERENCE&&t!==r.MULTIPLY&&t!==r.EXCLUSION&&t!==r.SCREEN&&t!==r.REPLACE&&t!==r.OVERLAY&&t!==r.HARD_LIGHT&&t!==r.SOFT_LIGHT&&t!==r.DODGE&&t!==r.BURN)throw new Error("Mode "+t+" not recognized.");this.drawingContext.globalCompositeOperation=t},o}({},core,constants),shape2d_primitives=function(t,e,r,o){"use strict";var n=e,r=r,o=o;return n.prototype.arc=function(t,e,n,i,s,a,u){if(this._doStroke||this._doFill){var p=this.drawingContext,h=r.arcModeAdjust(t,e,n,i,this._ellipseMode),l=h.h>h.w?h.h/2:h.w/2,c=h.h>h.w?h.w/h.h:1,d=h.h>h.w?1:h.h/h.w;return p.scale(c,d),p.beginPath(),p.arc(h.x,h.y,l,s,a),this._doStroke&&p.stroke(),u===o.CHORD||u===o.OPEN?p.closePath():(u===o.PIE||void 0===u)&&(p.lineTo(h.x,h.y),p.closePath()),this._doFill&&p.fill(),this._doStroke&&u!==o.OPEN&&void 0!==u&&p.stroke(),this}},n.prototype.ellipse=function(t,e,o,n){if(this._doStroke||this._doFill){var i=this.drawingContext,s=r.modeAdjust(t,e,o,n,this._ellipseMode);if(i.beginPath(),o===n)i.arc(s.x+s.w/2,s.y+s.w/2,s.w/2,0,2*Math.PI,!1);else{var a=.5522848,u=s.w/2*a,p=s.h/2*a,h=s.x+s.w,l=s.y+s.h,c=s.x+s.w/2,d=s.y+s.h/2;i.moveTo(s.x,d),i.bezierCurveTo(s.x,d-p,c-u,s.y,c,s.y),i.bezierCurveTo(c+u,s.y,h,d-p,h,d),i.bezierCurveTo(h,d+p,c+u,l,c,l),i.bezierCurveTo(c-u,l,s.x,d+p,s.x,d),i.closePath()}return this._doFill&&i.fill(),this._doStroke&&i.stroke(),this}},n.prototype.line=function(t,e,r,o){if(this._doStroke){var n=this.drawingContext;if("rgba(0,0,0,0)"!==n.strokeStyle)return n.beginPath(),n.moveTo(t,e),n.lineTo(r,o),n.stroke(),this}},n.prototype.point=function(t,e){if(this._doStroke){var r=this.drawingContext,n=r.strokeStyle,i=r.fillStyle;if("rgba(0,0,0,0)"!==n)return t=Math.round(t),e=Math.round(e),r.fillStyle=n,r.lineWidth>1?(r.beginPath(),r.arc(t,e,r.lineWidth/2,0,o.TWO_PI,!1),r.fill()):r.fillRect(t,e,1,1),r.fillStyle=i,this}},n.prototype.quad=function(t,e,r,o,n,i,s,a){if(this._doStroke||this._doFill){var u=this.drawingContext;return u.beginPath(),u.moveTo(t,e),u.lineTo(r,o),u.lineTo(n,i),u.lineTo(s,a),u.closePath(),this._doFill&&u.fill(),this._doStroke&&u.stroke(),this}},n.prototype.rect=function(t,e,o,n){if(this._doStroke||this._doFill){var i=r.modeAdjust(t,e,o,n,this._rectMode),s=this.drawingContext;return this._doStroke&&s.lineWidth%2===1&&s.translate(.5,.5),s.beginPath(),s.rect(i.x,i.y,i.w,i.h),this._doFill&&s.fill(),this._doStroke&&s.stroke(),this._doStroke&&s.lineWidth%2===1&&s.translate(-.5,-.5),this}},n.prototype.triangle=function(t,e,r,o,n,i){if(this._doStroke||this._doFill){var s=this.drawingContext;return s.beginPath(),s.moveTo(t,e),s.lineTo(r,o),s.lineTo(n,i),s.closePath(),this._doFill&&s.fill(),this._doStroke&&s.stroke(),this}},n}({},core,canvas,constants),shapeattributes=function(t,e,r){"use strict";var o=e,r=r;return o.prototype._rectMode=r.CORNER,o.prototype._ellipseMode=r.CENTER,o.prototype.ellipseMode=function(t){return(t===r.CORNER||t===r.CORNERS||t===r.RADIUS||t===r.CENTER)&&(this._ellipseMode=t),this},o.prototype.noSmooth=function(){return this.drawingContext.mozImageSmoothingEnabled=!1,this.drawingContext.webkitImageSmoothingEnabled=!1,this},o.prototype.rectMode=function(t){return(t===r.CORNER||t===r.CORNERS||t===r.RADIUS||t===r.CENTER)&&(this._rectMode=t),this},o.prototype.smooth=function(){return this.drawingContext.mozImageSmoothingEnabled=!0,this.drawingContext.webkitImageSmoothingEnabled=!0,this},o.prototype.strokeCap=function(t){return(t===r.ROUND||t===r.SQUARE||t===r.PROJECT)&&(this.drawingContext.lineCap=t),this},o.prototype.strokeJoin=function(t){return(t===r.ROUND||t===r.BEVEL||t===r.MITER)&&(this.drawingContext.lineJoin=t),this},o.prototype.strokeWeight=function(t){return this.drawingContext.lineWidth="undefined"==typeof t||0===t?1e-4:t,this},o}({},core,constants),shapecurves=function(t,e){"use strict";var r=e;return r.prototype._bezierDetail=20,r.prototype._curveDetail=20,r.prototype.bezier=function(t,e,o,n,i,s,a,u){if(this._doStroke){var p=this.drawingContext;p.beginPath(),p.moveTo(t,e);for(var h=0;h<=this._bezierDetail;h++){var l=h/parseFloat(this._bezierDetail),c=r.prototype.bezierPoint(t,o,i,a,l),d=r.prototype.bezierPoint(e,n,s,u,l);p.lineTo(c,d)}return p.stroke(),this}},r.prototype.bezierDetail=function(t){return this._setProperty("_bezierDetail",t),this},r.prototype.bezierPoint=function(t,e,r,o,n){var i=1-n;return Math.pow(i,3)*t+3*Math.pow(i,2)*n*e+3*i*Math.pow(n,2)*r+Math.pow(n,3)*o},r.prototype.bezierTangent=function(t,e,r,o,n){var i=1-n;return 3*o*Math.pow(n,2)-3*r*Math.pow(n,2)+6*r*i*n-6*e*i*n+3*e*Math.pow(i,2)-3*t*Math.pow(i,2)},r.prototype.curve=function(t,e,o,n,i,s,a,u){if(this._doStroke){var p=this.drawingContext;p.moveTo(t,e),p.beginPath();for(var h=0;h<=this._curveDetail;h++){var l=parseFloat(h/this._curveDetail),c=r.prototype.curvePoint(t,o,i,a,l),d=r.prototype.curvePoint(e,n,s,u,l);p.lineTo(c,d)}return p.stroke(),p.closePath(),this}},r.prototype.curveDetail=function(t){return this._setProperty("_curveDetail",t),this},r.prototype.curvePoint=function(t,e,r,o,n){var i=n*n*n,s=n*n,a=-.5*i+s-.5*n,u=1.5*i-2.5*s+1,p=-1.5*i+2*s+.5*n,h=.5*i-.5*s;return t*a+e*u+r*p+o*h},r.prototype.curveTangent=function(t,e,r,o,n){var i=n*n,s=-3*i/2+2*n-.5,a=9*i/2-5*n,u=-9*i/2+4*n+.5,p=3*i/2-n;return t*s+e*a+r*u+o*p},r.prototype.curveTightness=function(){throw"not yet implemented"},r}({},core),shapevertex=function(t,e,r){"use strict";var o=e,r=r;return o.prototype._shapeKind=null,o.prototype._shapeInited=!1,o.prototype._contourInited=!1,o.prototype._contourVertices=[],o.prototype._curveVertices=[],o.prototype.beginContour=function(){return this._contourVertices=[],this._contourInited=!0,this},o.prototype.beginShape=function(t){return this._shapeKind=t===r.POINTS||t===r.LINES||t===r.TRIANGLES||t===r.TRIANGLE_FAN||t===r.TRIANGLE_STRIP||t===r.QUADS||t===r.QUAD_STRIP?t:null,this._shapeInited=!0,this.drawingContext.beginPath(),this},o.prototype.bezierVertex=function(t,e,o,n,i,s){if(this._contourInited){var a={};return a.x=t,a.y=e,a.x3=o,a.y3=n,a.x4=i,a.y4=s,a.type=r.BEZIER,this._contourVertices.push(a),this}return this.drawingContext.bezierCurveTo(t,e,o,n,i,s),this},o.prototype.curveVertex=function(t,e){var r={};return r.x=t,r.y=e,this._curveVertices.push(r),this._curveVertices.length>=4&&(this.curve(this._curveVertices[0].x,this._curveVertices[0].y,this._curveVertices[1].x,this._curveVertices[1].y,this._curveVertices[2].x,this._curveVertices[2].y,this._curveVertices[3].x,this._curveVertices[3].y),this._curveVertices.shift()),this},o.prototype.endContour=function(){this._contourVertices.reverse(),this.drawingContext.moveTo(this._contourVertices[0].x,this._contourVertices[0].y);var t=this.drawingContext;return this._contourVertices.slice(1).forEach(function(e){switch(e.type){case r.LINEAR:t.lineTo(e.x,e.y);break;case r.QUADRATIC:t.quadraticCurveTo(e.x,e.y,e.x3,e.y3);break;case r.BEZIER:t.bezierCurveTo(e.x,e.y,e.x3,e.y3,e.x4,e.y4);break;case r.CURVE:}}),this.drawingContext.closePath(),this._contourInited=!1,this},o.prototype.endShape=function(t){return t===r.CLOSE&&(this.drawingContext.closePath(),this._doFill&&this.drawingContext.fill()),this._doStroke&&this._curveVertices.length<=0?this.drawingContext.stroke():this._curveVertices=[],this},o.prototype.quadraticVertex=function(t,e,o,n){if(this._contourInited){var i={};return i.x=t,i.y=e,i.x3=o,i.y3=n,i.type=r.QUADRATIC,this._contourVertices.push(i),this}return this.drawingContext.quadraticCurveTo(t,e,o,n),this},o.prototype.vertex=function(t,e){if(this._contourInited){var o={};return o.x=t,o.y=e,o.type=r.LINEAR,this._contourVertices.push(o),this}return this._shapeInited?this.drawingContext.moveTo(t,e):this.drawingContext.lineTo(t,e),this._shapeInited=!1,this},o}({},core,constants),structure=function(t,e){"use strict";var r=e;return r.prototype.exit=function(){throw"exit() not implemented, see remove()"},r.prototype.noLoop=function(){this._loop=!1,this._drawInterval&&clearInterval(this._drawInterval)},r.prototype.loop=function(){this._loop=!0,this._draw()},r.prototype.push=function(){this.drawingContext.save(),this.styles.push({doStroke:this._doStroke,doFill:this._doFill,tint:this._tint,imageMode:this._imageMode,rectMode:this._rectMode,ellipseMode:this._ellipseMode,colorMode:this._colorMode,textFont:this.textFont,textLeading:this.textLeading,textSize:this.textSize,textStyle:this.textStyle})},r.prototype.pop=function(){this.drawingContext.restore();var t=this.styles.pop();this._doStroke=t.doStroke,this._doFill=t.doFill,this._tint=t.tint,this._imageMode=t.imageMode,this._rectMode=t.rectMode,this._ellipseMode=t.ellipseMode,this._colorMode=t.colorMode,this.textFont=t.textFont,this.textLeading=t.textLeading,this.textSize=t.textSize,this.textStyle=t.textStyle},r.prototype.pushStyle=function(){throw new Error("pushStyle() not used, see push()")},r.prototype.popStyle=function(){throw new Error("popStyle() not used, see pop()")},r.prototype.redraw=function(){var t=this._isGlobal?window:this;t.draw&&t.draw()},r.prototype.size=function(){throw"size() not implemented, see createCanvas()"},r}({},core),transform=function(t,e,r){"use strict";var o=e,r=r;return o.prototype.applyMatrix=function(t,e,r,o,n,i){return this.drawingContext.transform(t,e,r,o,n,i),this},o.prototype.popMatrix=function(){throw new Error("popMatrix() not used, see pop()")},o.prototype.printMatrix=function(){throw new Error("printMatrix() not implemented")},o.prototype.pushMatrix=function(){throw new Error("pushMatrix() not used, see push()")},o.prototype.resetMatrix=function(){return this.drawingContext.setTransform(),this},o.prototype.rotate=function(t){return this._angleMode===r.DEGREES&&(t=this.radians(t)),this.drawingContext.rotate(t),this},o.prototype.rotateX=function(){throw"not yet implemented"},o.prototype.rotateY=function(){throw"not yet implemented"},o.prototype.scale=function(){var t=1,e=1;return 1===arguments.length?t=e=arguments[0]:(t=arguments[0],e=arguments[1]),this.drawingContext.scale(t,e),this},o.prototype.shearX=function(t){return this._angleMode===r.DEGREES&&(t=this.radians(t)),this.drawingContext.transform(1,0,this.tan(t),1,0,0),this},o.prototype.shearY=function(t){return this._angleMode===r.DEGREES&&(t=this.radians(t)),this.drawingContext.transform(1,this.tan(t),0,1,0,0),this},o.prototype.translate=function(t,e){return this.drawingContext.translate(t,e),this},o}({},core,constants,outputtext_area),typographyattributes=function(t,e,r){"use strict";var o=e,r=r;return o.prototype._textLeading=15,o.prototype._textFont="sans-serif",o.prototype._textSize=12,o.prototype._textStyle=r.NORMAL,o.prototype.textAlign=function(t){(t===r.LEFT||t===r.RIGHT||t===r.CENTER)&&(this.drawingContext.textAlign=t)},o.prototype.textHeight=function(t){return this.drawingContext.measureText(t).height},o.prototype.textLeading=function(t){this._setProperty("_textLeading",t)},o.prototype.textSize=function(t){this._setProperty("_textSize",t)},o.prototype.textStyle=function(t){(t===r.NORMAL||t===r.ITALIC||t===r.BOLD)&&this._setProperty("_textStyle",t)},o.prototype.textWidth=function(t){return this.drawingContext.measureText(t).width},o}({},core,constants),typographyloading_displaying=function(t,e,r){"use strict";var o=e,r=r;return o.prototype.text=function(){var t=this._textStyle+" "+this._textSize+"px "+this._textFont;if(this.drawingContext.font=t,3===arguments.length)this._doFill&&this.drawingContext.fillText(arguments[0],arguments[1],arguments[2]),this._doStroke&&this.drawingContext.strokeText(arguments[0],arguments[1],arguments[2]);else if(5===arguments.length){for(var e=arguments[0].split(" "),o="",n=r.modeAdjust(arguments[1],arguments[2],arguments[3],arguments[4],this._rectMode),i=n.y+this._textLeading,s=0;s<e.length;s++){var a=o+e[s]+" ",u=this.drawingContext.measureText(a),p=u.width;if(i>n.y+n.h)break;p>n.w&&s>0?(this._doFill&&this.drawingContext.fillText(o,n.x,i),this._doStroke&&this.drawingContext.strokeText(o,n.x,i),o=e[s]+" ",i+=this._textLeading):o=a}i<=n.y+n.h&&(this._doFill&&this.drawingContext.fillText(o,n.x,i),this._doStroke&&this.drawingContext.strokeText(o,n.x,i))}},o.prototype.textFont=function(t){this._setProperty("_textFont",t)},o}({},core,canvas),src_app=function(t,e){"use strict";var r=e,o=function(){window.PHANTOMJS||(window.setup&&"function"==typeof window.setup||window.draw&&"function"==typeof window.draw)&&new r};return"complete"===document.readyState?o():window.addEventListener("load",o,!1),window.p5=r,r}({},core,p5Color,p5Element,p5Graphics,p5Image,p5Vector,p5TableRow,p5Table,colorcreating_reading,colorsetting,constants,dataarray_functions,datastring_functions,environment,imageimage,imageloading_displaying,imagepixels,inputfiles,inputkeyboard,inputmouse,inputtime_date,inputtouch,mathmath,mathcalculation,mathrandom,mathnoise,mathtrigonometry,outputfiles,outputimage,outputtext_area,renderingrendering,shape2d_primitives,shapeattributes,shapecurves,shapevertex,structure,transform,typographyattributes,typographyloading_displaying); | royswastik/jsdelivr | files/p5.js/0.3.5/p5.min.js | JavaScript | mit | 78,089 |
/*!
* Copyright 2014 Drifty Co.
* http://drifty.com/
*
* Ionic, v0.9.27
* A powerful HTML5 mobile app framework.
* http://ionicframework.com/
*
* By @maxlynch, @benjsperry, @adamdbradley <3
*
* Licensed under the MIT license. Please see LICENSE for more information.
*
*/
@font-face{font-family:Ionicons;src:url(../fonts/ionicons.eot?v=1.4.1);src:url(../fonts/ionicons.eot?v=1.4.1#iefix) format("embedded-opentype"),url(../fonts/ionicons.ttf?v=1.4.1) format("truetype"),url(../fonts/ionicons.woff?v=1.4.1) format("woff"),url(../fonts/ionicons.svg?v=1.4.1#Ionicons) format("svg");font-weight:400;font-style:normal}.ion,.ion-alert,.ion-alert-circled,.ion-android-add,.ion-android-add-contact,.ion-android-alarm,.ion-android-archive,.ion-android-arrow-back,.ion-android-arrow-down-left,.ion-android-arrow-down-right,.ion-android-arrow-up-left,.ion-android-arrow-up-right,.ion-android-battery,.ion-android-book,.ion-android-calendar,.ion-android-call,.ion-android-camera,.ion-android-chat,.ion-android-checkmark,.ion-android-clock,.ion-android-close,.ion-android-contact,.ion-android-contacts,.ion-android-data,.ion-android-developer,.ion-android-display,.ion-android-download,.ion-android-dropdown,.ion-android-earth,.ion-android-folder,.ion-android-forums,.ion-android-friends,.ion-android-hand,.ion-android-image,.ion-android-inbox,.ion-android-information,.ion-android-keypad,.ion-android-lightbulb,.ion-android-locate,.ion-android-location,.ion-android-mail,.ion-android-microphone,.ion-android-mixer,.ion-android-more,.ion-android-note,.ion-android-playstore,.ion-android-printer,.ion-android-promotion,.ion-android-reminder,.ion-android-remove,.ion-android-search,.ion-android-send,.ion-android-settings,.ion-android-share,.ion-android-social,.ion-android-social-user,.ion-android-sort,.ion-android-star,.ion-android-stopwatch,.ion-android-storage,.ion-android-system-back,.ion-android-system-home,.ion-android-system-windows,.ion-android-timer,.ion-android-trash,.ion-android-volume,.ion-android-wifi,.ion-archive,.ion-arrow-down-a,.ion-arrow-down-b,.ion-arrow-down-c,.ion-arrow-expand,.ion-arrow-graph-down-left,.ion-arrow-graph-down-right,.ion-arrow-graph-up-left,.ion-arrow-graph-up-right,.ion-arrow-left-a,.ion-arrow-left-b,.ion-arrow-left-c,.ion-arrow-move,.ion-arrow-resize,.ion-arrow-return-left,.ion-arrow-return-right,.ion-arrow-right-a,.ion-arrow-right-b,.ion-arrow-right-c,.ion-arrow-shrink,.ion-arrow-swap,.ion-arrow-up-a,.ion-arrow-up-b,.ion-arrow-up-c,.ion-at,.ion-bag,.ion-battery-charging,.ion-battery-empty,.ion-battery-full,.ion-battery-half,.ion-battery-low,.ion-beaker,.ion-beer,.ion-bluetooth,.ion-bookmark,.ion-briefcase,.ion-bug,.ion-calculator,.ion-calendar,.ion-camera,.ion-card,.ion-chatbox,.ion-chatbox-working,.ion-chatboxes,.ion-chatbubble,.ion-chatbubble-working,.ion-chatbubbles,.ion-checkmark,.ion-checkmark-circled,.ion-checkmark-round,.ion-chevron-down,.ion-chevron-left,.ion-chevron-right,.ion-chevron-up,.ion-clipboard,.ion-clock,.ion-close,.ion-close-circled,.ion-close-round,.ion-cloud,.ion-code,.ion-code-download,.ion-code-working,.ion-coffee,.ion-compass,.ion-compose,.ion-connection-bars,.ion-contrast,.ion-disc,.ion-document,.ion-document-text,.ion-drag,.ion-earth,.ion-edit,.ion-egg,.ion-eject,.ion-email,.ion-eye,.ion-eye-disabled,.ion-female,.ion-filing,.ion-film-marker,.ion-flag,.ion-flash,.ion-flash-off,.ion-flask,.ion-folder,.ion-fork,.ion-fork-repo,.ion-forward,.ion-game-controller-a,.ion-game-controller-b,.ion-gear-a,.ion-gear-b,.ion-grid,.ion-hammer,.ion-headphone,.ion-heart,.ion-help,.ion-help-buoy,.ion-help-circled,.ion-home,.ion-icecream,.ion-icon-social-google-plus,.ion-icon-social-google-plus-outline,.ion-image,.ion-images,.ion-information,.ion-information-circled,.ion-ionic,.ion-ios7-alarm,.ion-ios7-alarm-outline,.ion-ios7-albums,.ion-ios7-albums-outline,.ion-ios7-arrow-back,.ion-ios7-arrow-down,.ion-ios7-arrow-forward,.ion-ios7-arrow-left,.ion-ios7-arrow-right,.ion-ios7-arrow-thin-down,.ion-ios7-arrow-thin-left,.ion-ios7-arrow-thin-right,.ion-ios7-arrow-thin-up,.ion-ios7-arrow-up,.ion-ios7-at,.ion-ios7-at-outline,.ion-ios7-bell,.ion-ios7-bell-outline,.ion-ios7-bolt,.ion-ios7-bolt-outline,.ion-ios7-bookmarks,.ion-ios7-bookmarks-outline,.ion-ios7-box,.ion-ios7-box-outline,.ion-ios7-briefcase,.ion-ios7-briefcase-outline,.ion-ios7-browsers,.ion-ios7-browsers-outline,.ion-ios7-calculator,.ion-ios7-calculator-outline,.ion-ios7-calendar,.ion-ios7-calendar-outline,.ion-ios7-camera,.ion-ios7-camera-outline,.ion-ios7-cart,.ion-ios7-cart-outline,.ion-ios7-chatboxes,.ion-ios7-chatboxes-outline,.ion-ios7-chatbubble,.ion-ios7-chatbubble-outline,.ion-ios7-checkmark,.ion-ios7-checkmark-empty,.ion-ios7-checkmark-outline,.ion-ios7-circle-filled,.ion-ios7-circle-outline,.ion-ios7-clock,.ion-ios7-clock-outline,.ion-ios7-close,.ion-ios7-close-empty,.ion-ios7-close-outline,.ion-ios7-cloud,.ion-ios7-cloud-download,.ion-ios7-cloud-download-outline,.ion-ios7-cloud-outline,.ion-ios7-cloud-upload,.ion-ios7-cloud-upload-outline,.ion-ios7-cloudy,.ion-ios7-cloudy-night,.ion-ios7-cloudy-night-outline,.ion-ios7-cloudy-outline,.ion-ios7-cog,.ion-ios7-cog-outline,.ion-ios7-compose,.ion-ios7-compose-outline,.ion-ios7-contact,.ion-ios7-contact-outline,.ion-ios7-copy,.ion-ios7-copy-outline,.ion-ios7-download,.ion-ios7-download-outline,.ion-ios7-drag,.ion-ios7-email,.ion-ios7-email-outline,.ion-ios7-eye,.ion-ios7-eye-outline,.ion-ios7-fastforward,.ion-ios7-fastforward-outline,.ion-ios7-filing,.ion-ios7-filing-outline,.ion-ios7-film,.ion-ios7-film-outline,.ion-ios7-flag,.ion-ios7-flag-outline,.ion-ios7-folder,.ion-ios7-folder-outline,.ion-ios7-gear,.ion-ios7-gear-outline,.ion-ios7-glasses,.ion-ios7-glasses-outline,.ion-ios7-heart,.ion-ios7-heart-outline,.ion-ios7-help,.ion-ios7-help-empty,.ion-ios7-help-outline,.ion-ios7-infinite,.ion-ios7-infinite-outline,.ion-ios7-information,.ion-ios7-information-empty,.ion-ios7-information-outline,.ion-ios7-ionic-outline,.ion-ios7-keypad,.ion-ios7-keypad-outline,.ion-ios7-lightbulb,.ion-ios7-lightbulb-outline,.ion-ios7-location,.ion-ios7-location-outline,.ion-ios7-locked,.ion-ios7-locked-outline,.ion-ios7-medkit,.ion-ios7-medkit-outline,.ion-ios7-mic,.ion-ios7-mic-off,.ion-ios7-mic-outline,.ion-ios7-minus,.ion-ios7-minus-empty,.ion-ios7-minus-outline,.ion-ios7-monitor,.ion-ios7-monitor-outline,.ion-ios7-moon,.ion-ios7-moon-outline,.ion-ios7-more,.ion-ios7-more-outline,.ion-ios7-musical-note,.ion-ios7-musical-notes,.ion-ios7-navigate,.ion-ios7-navigate-outline,.ion-ios7-paperplane,.ion-ios7-paperplane-outline,.ion-ios7-partlysunny,.ion-ios7-partlysunny-outline,.ion-ios7-pause,.ion-ios7-pause-outline,.ion-ios7-people,.ion-ios7-people-outline,.ion-ios7-person,.ion-ios7-person-outline,.ion-ios7-personadd,.ion-ios7-personadd-outline,.ion-ios7-photos,.ion-ios7-photos-outline,.ion-ios7-pie,.ion-ios7-pie-outline,.ion-ios7-play,.ion-ios7-play-outline,.ion-ios7-plus,.ion-ios7-plus-empty,.ion-ios7-plus-outline,.ion-ios7-pricetag,.ion-ios7-pricetag-outline,.ion-ios7-printer,.ion-ios7-printer-outline,.ion-ios7-rainy,.ion-ios7-rainy-outline,.ion-ios7-recording,.ion-ios7-recording-outline,.ion-ios7-redo,.ion-ios7-redo-outline,.ion-ios7-refresh,.ion-ios7-refresh-empty,.ion-ios7-refresh-outline,.ion-ios7-reload,.ion-ios7-reloading,.ion-ios7-rewind,.ion-ios7-rewind-outline,.ion-ios7-search,.ion-ios7-search-strong,.ion-ios7-skipbackward,.ion-ios7-skipbackward-outline,.ion-ios7-skipforward,.ion-ios7-skipforward-outline,.ion-ios7-snowy,.ion-ios7-speedometer,.ion-ios7-speedometer-outline,.ion-ios7-star,.ion-ios7-star-outline,.ion-ios7-stopwatch,.ion-ios7-stopwatch-outline,.ion-ios7-sunny,.ion-ios7-sunny-outline,.ion-ios7-telephone,.ion-ios7-telephone-outline,.ion-ios7-thunderstorm,.ion-ios7-thunderstorm-outline,.ion-ios7-time,.ion-ios7-time-outline,.ion-ios7-timer,.ion-ios7-timer-outline,.ion-ios7-trash,.ion-ios7-trash-outline,.ion-ios7-undo,.ion-ios7-undo-outline,.ion-ios7-unlocked,.ion-ios7-unlocked-outline,.ion-ios7-upload,.ion-ios7-upload-outline,.ion-ios7-videocam,.ion-ios7-videocam-outline,.ion-ios7-volume-high,.ion-ios7-volume-low,.ion-ios7-wineglass,.ion-ios7-wineglass-outline,.ion-ios7-world,.ion-ios7-world-outline,.ion-ipad,.ion-iphone,.ion-ipod,.ion-jet,.ion-key,.ion-knife,.ion-laptop,.ion-leaf,.ion-levels,.ion-lightbulb,.ion-link,.ion-load-a,.ion-load-b,.ion-load-c,.ion-load-d,.ion-loading-a,.ion-loading-b,.ion-loading-c,.ion-loading-d,.ion-location,.ion-locked,.ion-log-in,.ion-log-out,.ion-loop,.ion-looping,.ion-magnet,.ion-male,.ion-man,.ion-map,.ion-medkit,.ion-mic-a,.ion-mic-b,.ion-mic-c,.ion-minus,.ion-minus-circled,.ion-minus-round,.ion-model-s,.ion-monitor,.ion-more,.ion-music-note,.ion-navicon,.ion-navicon-round,.ion-navigate,.ion-no-smoking,.ion-nuclear,.ion-paper-airplane,.ion-paperclip,.ion-pause,.ion-person,.ion-person-add,.ion-person-stalker,.ion-pie-graph,.ion-pin,.ion-pinpoint,.ion-pizza,.ion-plane,.ion-play,.ion-playstation,.ion-plus,.ion-plus-circled,.ion-plus-round,.ion-pound,.ion-power,.ion-pricetag,.ion-pricetags,.ion-printer,.ion-radio-waves,.ion-record,.ion-refresh,.ion-refreshing,.ion-reply,.ion-reply-all,.ion-search,.ion-settings,.ion-share,.ion-shuffle,.ion-skip-backward,.ion-skip-forward,.ion-social-android,.ion-social-android-outline,.ion-social-apple,.ion-social-apple-outline,.ion-social-bitcoin,.ion-social-bitcoin-outline,.ion-social-buffer,.ion-social-buffer-outline,.ion-social-designernews,.ion-social-designernews-outline,.ion-social-dribbble,.ion-social-dribbble-outline,.ion-social-dropbox,.ion-social-dropbox-outline,.ion-social-facebook,.ion-social-facebook-outline,.ion-social-freebsd-devil,.ion-social-github,.ion-social-github-outline,.ion-social-googleplus,.ion-social-googleplus-outline,.ion-social-hackernews,.ion-social-hackernews-outline,.ion-social-linkedin,.ion-social-linkedin-outline,.ion-social-pinterest,.ion-social-pinterest-outline,.ion-social-reddit,.ion-social-reddit-outline,.ion-social-rss,.ion-social-rss-outline,.ion-social-skype,.ion-social-skype-outline,.ion-social-tumblr,.ion-social-tumblr-outline,.ion-social-tux,.ion-social-twitter,.ion-social-twitter-outline,.ion-social-vimeo,.ion-social-vimeo-outline,.ion-social-windows,.ion-social-windows-outline,.ion-social-wordpress,.ion-social-wordpress-outline,.ion-social-yahoo,.ion-social-yahoo-outline,.ion-social-youtube,.ion-social-youtube-outline,.ion-speakerphone,.ion-speedometer,.ion-spoon,.ion-star,.ion-stats-bars,.ion-steam,.ion-stop,.ion-thermometer,.ion-thumbsdown,.ion-thumbsup,.ion-trash-a,.ion-trash-b,.ion-umbrella,.ion-unlocked,.ion-upload,.ion-usb,.ion-videocamera,.ion-volume-high,.ion-volume-low,.ion-volume-medium,.ion-volume-mute,.ion-waterdrop,.ion-wifi,.ion-wineglass,.ion-woman,.ion-wrench,.ion-xbox,.ionicons{display:inline-block;font-family:Ionicons;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;text-rendering:auto;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.ion-ios7-reloading,.ion-loading-a,.ion-loading-b,.ion-loading-c,.ion-loading-d,.ion-looping,.ion-refreshing,.ion-spin{-webkit-animation:spin 1s infinite linear;-moz-animation:spin 1s infinite linear;-o-animation:spin 1s infinite linear;animation:spin 1s infinite linear}@-moz-keyframes spin{0%{-moz-transform:rotate(0deg)}100%{-moz-transform:rotate(359deg)}}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg)}}@-o-keyframes spin{0%{-o-transform:rotate(0deg)}100%{-o-transform:rotate(359deg)}}@-ms-keyframes spin{0%{-ms-transform:rotate(0deg)}100%{-ms-transform:rotate(359deg)}}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(359deg)}}.ion-loading-a{-webkit-animation-timing-function:steps(8,start);-moz-animation-timing-function:steps(8,start);animation-timing-function:steps(8,start)}.ion-alert:before{content:"\f101"}.ion-alert-circled:before{content:"\f100"}.ion-android-add:before{content:"\f2c7"}.ion-android-add-contact:before{content:"\f2c6"}.ion-android-alarm:before{content:"\f2c8"}.ion-android-archive:before{content:"\f2c9"}.ion-android-arrow-back:before{content:"\f2ca"}.ion-android-arrow-down-left:before{content:"\f2cb"}.ion-android-arrow-down-right:before{content:"\f2cc"}.ion-android-arrow-up-left:before{content:"\f2cd"}.ion-android-arrow-up-right:before{content:"\f2ce"}.ion-android-battery:before{content:"\f2cf"}.ion-android-book:before{content:"\f2d0"}.ion-android-calendar:before{content:"\f2d1"}.ion-android-call:before{content:"\f2d2"}.ion-android-camera:before{content:"\f2d3"}.ion-android-chat:before{content:"\f2d4"}.ion-android-checkmark:before{content:"\f2d5"}.ion-android-clock:before{content:"\f2d6"}.ion-android-close:before{content:"\f2d7"}.ion-android-contact:before{content:"\f2d8"}.ion-android-contacts:before{content:"\f2d9"}.ion-android-data:before{content:"\f2da"}.ion-android-developer:before{content:"\f2db"}.ion-android-display:before{content:"\f2dc"}.ion-android-download:before{content:"\f2dd"}.ion-android-dropdown:before{content:"\f2de"}.ion-android-earth:before{content:"\f2df"}.ion-android-folder:before{content:"\f2e0"}.ion-android-forums:before{content:"\f2e1"}.ion-android-friends:before{content:"\f2e2"}.ion-android-hand:before{content:"\f2e3"}.ion-android-image:before{content:"\f2e4"}.ion-android-inbox:before{content:"\f2e5"}.ion-android-information:before{content:"\f2e6"}.ion-android-keypad:before{content:"\f2e7"}.ion-android-lightbulb:before{content:"\f2e8"}.ion-android-locate:before{content:"\f2e9"}.ion-android-location:before{content:"\f2ea"}.ion-android-mail:before{content:"\f2eb"}.ion-android-microphone:before{content:"\f2ec"}.ion-android-mixer:before{content:"\f2ed"}.ion-android-more:before{content:"\f2ee"}.ion-android-note:before{content:"\f2ef"}.ion-android-playstore:before{content:"\f2f0"}.ion-android-printer:before{content:"\f2f1"}.ion-android-promotion:before{content:"\f2f2"}.ion-android-reminder:before{content:"\f2f3"}.ion-android-remove:before{content:"\f2f4"}.ion-android-search:before{content:"\f2f5"}.ion-android-send:before{content:"\f2f6"}.ion-android-settings:before{content:"\f2f7"}.ion-android-share:before{content:"\f2f8"}.ion-android-social:before{content:"\f2fa"}.ion-android-social-user:before{content:"\f2f9"}.ion-android-sort:before{content:"\f2fb"}.ion-android-star:before{content:"\f2fc"}.ion-android-stopwatch:before{content:"\f2fd"}.ion-android-storage:before{content:"\f2fe"}.ion-android-system-back:before{content:"\f2ff"}.ion-android-system-home:before{content:"\f300"}.ion-android-system-windows:before{content:"\f301"}.ion-android-timer:before{content:"\f302"}.ion-android-trash:before{content:"\f303"}.ion-android-volume:before{content:"\f304"}.ion-android-wifi:before{content:"\f305"}.ion-archive:before{content:"\f102"}.ion-arrow-down-a:before{content:"\f103"}.ion-arrow-down-b:before{content:"\f104"}.ion-arrow-down-c:before{content:"\f105"}.ion-arrow-expand:before{content:"\f25e"}.ion-arrow-graph-down-left:before{content:"\f25f"}.ion-arrow-graph-down-right:before{content:"\f260"}.ion-arrow-graph-up-left:before{content:"\f261"}.ion-arrow-graph-up-right:before{content:"\f262"}.ion-arrow-left-a:before{content:"\f106"}.ion-arrow-left-b:before{content:"\f107"}.ion-arrow-left-c:before{content:"\f108"}.ion-arrow-move:before{content:"\f263"}.ion-arrow-resize:before{content:"\f264"}.ion-arrow-return-left:before{content:"\f265"}.ion-arrow-return-right:before{content:"\f266"}.ion-arrow-right-a:before{content:"\f109"}.ion-arrow-right-b:before{content:"\f10a"}.ion-arrow-right-c:before{content:"\f10b"}.ion-arrow-shrink:before{content:"\f267"}.ion-arrow-swap:before{content:"\f268"}.ion-arrow-up-a:before{content:"\f10c"}.ion-arrow-up-b:before{content:"\f10d"}.ion-arrow-up-c:before{content:"\f10e"}.ion-at:before{content:"\f10f"}.ion-bag:before{content:"\f110"}.ion-battery-charging:before{content:"\f111"}.ion-battery-empty:before{content:"\f112"}.ion-battery-full:before{content:"\f113"}.ion-battery-half:before{content:"\f114"}.ion-battery-low:before{content:"\f115"}.ion-beaker:before{content:"\f269"}.ion-beer:before{content:"\f26a"}.ion-bluetooth:before{content:"\f116"}.ion-bookmark:before{content:"\f26b"}.ion-briefcase:before{content:"\f26c"}.ion-bug:before{content:"\f2be"}.ion-calculator:before{content:"\f26d"}.ion-calendar:before{content:"\f117"}.ion-camera:before{content:"\f118"}.ion-card:before{content:"\f119"}.ion-chatbox:before{content:"\f11b"}.ion-chatbox-working:before{content:"\f11a"}.ion-chatboxes:before{content:"\f11c"}.ion-chatbubble:before{content:"\f11e"}.ion-chatbubble-working:before{content:"\f11d"}.ion-chatbubbles:before{content:"\f11f"}.ion-checkmark:before{content:"\f122"}.ion-checkmark-circled:before{content:"\f120"}.ion-checkmark-round:before{content:"\f121"}.ion-chevron-down:before{content:"\f123"}.ion-chevron-left:before{content:"\f124"}.ion-chevron-right:before{content:"\f125"}.ion-chevron-up:before{content:"\f126"}.ion-clipboard:before{content:"\f127"}.ion-clock:before{content:"\f26e"}.ion-close:before{content:"\f12a"}.ion-close-circled:before{content:"\f128"}.ion-close-round:before{content:"\f129"}.ion-cloud:before{content:"\f12b"}.ion-code:before{content:"\f271"}.ion-code-download:before{content:"\f26f"}.ion-code-working:before{content:"\f270"}.ion-coffee:before{content:"\f272"}.ion-compass:before{content:"\f273"}.ion-compose:before{content:"\f12c"}.ion-connection-bars:before{content:"\f274"}.ion-contrast:before{content:"\f275"}.ion-disc:before{content:"\f12d"}.ion-document:before{content:"\f12f"}.ion-document-text:before{content:"\f12e"}.ion-drag:before{content:"\f130"}.ion-earth:before{content:"\f276"}.ion-edit:before{content:"\f2bf"}.ion-egg:before{content:"\f277"}.ion-eject:before{content:"\f131"}.ion-email:before{content:"\f132"}.ion-eye:before{content:"\f133"}.ion-eye-disabled:before{content:"\f306"}.ion-female:before{content:"\f278"}.ion-filing:before{content:"\f134"}.ion-film-marker:before{content:"\f135"}.ion-flag:before{content:"\f279"}.ion-flash:before{content:"\f137"}.ion-flash-off:before{content:"\f136"}.ion-flask:before{content:"\f138"}.ion-folder:before{content:"\f139"}.ion-fork:before{content:"\f27a"}.ion-fork-repo:before{content:"\f2c0"}.ion-forward:before{content:"\f13a"}.ion-game-controller-a:before{content:"\f13b"}.ion-game-controller-b:before{content:"\f13c"}.ion-gear-a:before{content:"\f13d"}.ion-gear-b:before{content:"\f13e"}.ion-grid:before{content:"\f13f"}.ion-hammer:before{content:"\f27b"}.ion-headphone:before{content:"\f140"}.ion-heart:before{content:"\f141"}.ion-help:before{content:"\f143"}.ion-help-buoy:before{content:"\f27c"}.ion-help-circled:before{content:"\f142"}.ion-home:before{content:"\f144"}.ion-icecream:before{content:"\f27d"}.ion-icon-social-google-plus:before{content:"\f146"}.ion-icon-social-google-plus-outline:before{content:"\f145"}.ion-image:before{content:"\f147"}.ion-images:before{content:"\f148"}.ion-information:before{content:"\f14a"}.ion-information-circled:before{content:"\f149"}.ion-ionic:before{content:"\f14b"}.ion-ios7-alarm:before{content:"\f14d"}.ion-ios7-alarm-outline:before{content:"\f14c"}.ion-ios7-albums:before{content:"\f14f"}.ion-ios7-albums-outline:before{content:"\f14e"}.ion-ios7-arrow-back:before{content:"\f150"}.ion-ios7-arrow-down:before{content:"\f151"}.ion-ios7-arrow-forward:before{content:"\f152"}.ion-ios7-arrow-left:before{content:"\f153"}.ion-ios7-arrow-right:before{content:"\f154"}.ion-ios7-arrow-thin-down:before{content:"\f27e"}.ion-ios7-arrow-thin-left:before{content:"\f27f"}.ion-ios7-arrow-thin-right:before{content:"\f280"}.ion-ios7-arrow-thin-up:before{content:"\f281"}.ion-ios7-arrow-up:before{content:"\f155"}.ion-ios7-at:before{content:"\f157"}.ion-ios7-at-outline:before{content:"\f156"}.ion-ios7-bell:before{content:"\f159"}.ion-ios7-bell-outline:before{content:"\f158"}.ion-ios7-bolt:before{content:"\f15b"}.ion-ios7-bolt-outline:before{content:"\f15a"}.ion-ios7-bookmarks:before{content:"\f15d"}.ion-ios7-bookmarks-outline:before{content:"\f15c"}.ion-ios7-box:before{content:"\f15f"}.ion-ios7-box-outline:before{content:"\f15e"}.ion-ios7-briefcase:before{content:"\f283"}.ion-ios7-briefcase-outline:before{content:"\f282"}.ion-ios7-browsers:before{content:"\f161"}.ion-ios7-browsers-outline:before{content:"\f160"}.ion-ios7-calculator:before{content:"\f285"}.ion-ios7-calculator-outline:before{content:"\f284"}.ion-ios7-calendar:before{content:"\f163"}.ion-ios7-calendar-outline:before{content:"\f162"}.ion-ios7-camera:before{content:"\f165"}.ion-ios7-camera-outline:before{content:"\f164"}.ion-ios7-cart:before{content:"\f167"}.ion-ios7-cart-outline:before{content:"\f166"}.ion-ios7-chatboxes:before{content:"\f169"}.ion-ios7-chatboxes-outline:before{content:"\f168"}.ion-ios7-chatbubble:before{content:"\f16b"}.ion-ios7-chatbubble-outline:before{content:"\f16a"}.ion-ios7-checkmark:before{content:"\f16e"}.ion-ios7-checkmark-empty:before{content:"\f16c"}.ion-ios7-checkmark-outline:before{content:"\f16d"}.ion-ios7-circle-filled:before{content:"\f16f"}.ion-ios7-circle-outline:before{content:"\f170"}.ion-ios7-clock:before{content:"\f172"}.ion-ios7-clock-outline:before{content:"\f171"}.ion-ios7-close:before{content:"\f2bc"}.ion-ios7-close-empty:before{content:"\f2bd"}.ion-ios7-close-outline:before{content:"\f2bb"}.ion-ios7-cloud:before{content:"\f178"}.ion-ios7-cloud-download:before{content:"\f174"}.ion-ios7-cloud-download-outline:before{content:"\f173"}.ion-ios7-cloud-outline:before{content:"\f175"}.ion-ios7-cloud-upload:before{content:"\f177"}.ion-ios7-cloud-upload-outline:before{content:"\f176"}.ion-ios7-cloudy:before{content:"\f17a"}.ion-ios7-cloudy-night:before{content:"\f308"}.ion-ios7-cloudy-night-outline:before{content:"\f307"}.ion-ios7-cloudy-outline:before{content:"\f179"}.ion-ios7-cog:before{content:"\f17c"}.ion-ios7-cog-outline:before{content:"\f17b"}.ion-ios7-compose:before{content:"\f17e"}.ion-ios7-compose-outline:before{content:"\f17d"}.ion-ios7-contact:before{content:"\f180"}.ion-ios7-contact-outline:before{content:"\f17f"}.ion-ios7-copy:before{content:"\f182"}.ion-ios7-copy-outline:before{content:"\f181"}.ion-ios7-download:before{content:"\f184"}.ion-ios7-download-outline:before{content:"\f183"}.ion-ios7-drag:before{content:"\f185"}.ion-ios7-email:before{content:"\f187"}.ion-ios7-email-outline:before{content:"\f186"}.ion-ios7-eye:before{content:"\f189"}.ion-ios7-eye-outline:before{content:"\f188"}.ion-ios7-fastforward:before{content:"\f18b"}.ion-ios7-fastforward-outline:before{content:"\f18a"}.ion-ios7-filing:before{content:"\f18d"}.ion-ios7-filing-outline:before{content:"\f18c"}.ion-ios7-film:before{content:"\f18f"}.ion-ios7-film-outline:before{content:"\f18e"}.ion-ios7-flag:before{content:"\f191"}.ion-ios7-flag-outline:before{content:"\f190"}.ion-ios7-folder:before{content:"\f193"}.ion-ios7-folder-outline:before{content:"\f192"}.ion-ios7-gear:before{content:"\f195"}.ion-ios7-gear-outline:before{content:"\f194"}.ion-ios7-glasses:before{content:"\f197"}.ion-ios7-glasses-outline:before{content:"\f196"}.ion-ios7-heart:before{content:"\f199"}.ion-ios7-heart-outline:before{content:"\f198"}.ion-ios7-help:before{content:"\f19c"}.ion-ios7-help-empty:before{content:"\f19a"}.ion-ios7-help-outline:before{content:"\f19b"}.ion-ios7-infinite:before{content:"\f19e"}.ion-ios7-infinite-outline:before{content:"\f19d"}.ion-ios7-information:before{content:"\f1a1"}.ion-ios7-information-empty:before{content:"\f19f"}.ion-ios7-information-outline:before{content:"\f1a0"}.ion-ios7-ionic-outline:before{content:"\f1a2"}.ion-ios7-keypad:before{content:"\f1a4"}.ion-ios7-keypad-outline:before{content:"\f1a3"}.ion-ios7-lightbulb:before{content:"\f287"}.ion-ios7-lightbulb-outline:before{content:"\f286"}.ion-ios7-location:before{content:"\f1a6"}.ion-ios7-location-outline:before{content:"\f1a5"}.ion-ios7-locked:before{content:"\f1a8"}.ion-ios7-locked-outline:before{content:"\f1a7"}.ion-ios7-medkit:before{content:"\f289"}.ion-ios7-medkit-outline:before{content:"\f288"}.ion-ios7-mic:before{content:"\f1ab"}.ion-ios7-mic-off:before{content:"\f1a9"}.ion-ios7-mic-outline:before{content:"\f1aa"}.ion-ios7-minus:before{content:"\f1ae"}.ion-ios7-minus-empty:before{content:"\f1ac"}.ion-ios7-minus-outline:before{content:"\f1ad"}.ion-ios7-monitor:before{content:"\f1b0"}.ion-ios7-monitor-outline:before{content:"\f1af"}.ion-ios7-moon:before{content:"\f1b2"}.ion-ios7-moon-outline:before{content:"\f1b1"}.ion-ios7-more:before{content:"\f1b4"}.ion-ios7-more-outline:before{content:"\f1b3"}.ion-ios7-musical-note:before{content:"\f1b5"}.ion-ios7-musical-notes:before{content:"\f1b6"}.ion-ios7-navigate:before{content:"\f1b8"}.ion-ios7-navigate-outline:before{content:"\f1b7"}.ion-ios7-paperplane:before{content:"\f1ba"}.ion-ios7-paperplane-outline:before{content:"\f1b9"}.ion-ios7-partlysunny:before{content:"\f1bc"}.ion-ios7-partlysunny-outline:before{content:"\f1bb"}.ion-ios7-pause:before{content:"\f1be"}.ion-ios7-pause-outline:before{content:"\f1bd"}.ion-ios7-people:before{content:"\f1c0"}.ion-ios7-people-outline:before{content:"\f1bf"}.ion-ios7-person:before{content:"\f1c2"}.ion-ios7-person-outline:before{content:"\f1c1"}.ion-ios7-personadd:before{content:"\f1c4"}.ion-ios7-personadd-outline:before{content:"\f1c3"}.ion-ios7-photos:before{content:"\f1c6"}.ion-ios7-photos-outline:before{content:"\f1c5"}.ion-ios7-pie:before{content:"\f28b"}.ion-ios7-pie-outline:before{content:"\f28a"}.ion-ios7-play:before{content:"\f1c8"}.ion-ios7-play-outline:before{content:"\f1c7"}.ion-ios7-plus:before{content:"\f1cb"}.ion-ios7-plus-empty:before{content:"\f1c9"}.ion-ios7-plus-outline:before{content:"\f1ca"}.ion-ios7-pricetag:before{content:"\f28d"}.ion-ios7-pricetag-outline:before{content:"\f28c"}.ion-ios7-printer:before{content:"\f1cd"}.ion-ios7-printer-outline:before{content:"\f1cc"}.ion-ios7-rainy:before{content:"\f1cf"}.ion-ios7-rainy-outline:before{content:"\f1ce"}.ion-ios7-recording:before{content:"\f1d1"}.ion-ios7-recording-outline:before{content:"\f1d0"}.ion-ios7-redo:before{content:"\f1d3"}.ion-ios7-redo-outline:before{content:"\f1d2"}.ion-ios7-refresh:before{content:"\f1d6"}.ion-ios7-refresh-empty:before{content:"\f1d4"}.ion-ios7-refresh-outline:before{content:"\f1d5"}.ion-ios7-reload:before,.ion-ios7-reloading:before{content:"\f28e"}.ion-ios7-rewind:before{content:"\f1d8"}.ion-ios7-rewind-outline:before{content:"\f1d7"}.ion-ios7-search:before{content:"\f1da"}.ion-ios7-search-strong:before{content:"\f1d9"}.ion-ios7-skipbackward:before{content:"\f1dc"}.ion-ios7-skipbackward-outline:before{content:"\f1db"}.ion-ios7-skipforward:before{content:"\f1de"}.ion-ios7-skipforward-outline:before{content:"\f1dd"}.ion-ios7-snowy:before{content:"\f309"}.ion-ios7-speedometer:before{content:"\f290"}.ion-ios7-speedometer-outline:before{content:"\f28f"}.ion-ios7-star:before{content:"\f1e0"}.ion-ios7-star-outline:before{content:"\f1df"}.ion-ios7-stopwatch:before{content:"\f1e2"}.ion-ios7-stopwatch-outline:before{content:"\f1e1"}.ion-ios7-sunny:before{content:"\f1e4"}.ion-ios7-sunny-outline:before{content:"\f1e3"}.ion-ios7-telephone:before{content:"\f1e6"}.ion-ios7-telephone-outline:before{content:"\f1e5"}.ion-ios7-thunderstorm:before{content:"\f1e8"}.ion-ios7-thunderstorm-outline:before{content:"\f1e7"}.ion-ios7-time:before{content:"\f292"}.ion-ios7-time-outline:before{content:"\f291"}.ion-ios7-timer:before{content:"\f1ea"}.ion-ios7-timer-outline:before{content:"\f1e9"}.ion-ios7-trash:before{content:"\f1ec"}.ion-ios7-trash-outline:before{content:"\f1eb"}.ion-ios7-undo:before{content:"\f1ee"}.ion-ios7-undo-outline:before{content:"\f1ed"}.ion-ios7-unlocked:before{content:"\f1f0"}.ion-ios7-unlocked-outline:before{content:"\f1ef"}.ion-ios7-upload:before{content:"\f1f2"}.ion-ios7-upload-outline:before{content:"\f1f1"}.ion-ios7-videocam:before{content:"\f1f4"}.ion-ios7-videocam-outline:before{content:"\f1f3"}.ion-ios7-volume-high:before{content:"\f1f5"}.ion-ios7-volume-low:before{content:"\f1f6"}.ion-ios7-wineglass:before{content:"\f294"}.ion-ios7-wineglass-outline:before{content:"\f293"}.ion-ios7-world:before{content:"\f1f8"}.ion-ios7-world-outline:before{content:"\f1f7"}.ion-ipad:before{content:"\f1f9"}.ion-iphone:before{content:"\f1fa"}.ion-ipod:before{content:"\f1fb"}.ion-jet:before{content:"\f295"}.ion-key:before{content:"\f296"}.ion-knife:before{content:"\f297"}.ion-laptop:before{content:"\f1fc"}.ion-leaf:before{content:"\f1fd"}.ion-levels:before{content:"\f298"}.ion-lightbulb:before{content:"\f299"}.ion-link:before{content:"\f1fe"}.ion-load-a:before,.ion-loading-a:before{content:"\f29a"}.ion-load-b:before,.ion-loading-b:before{content:"\f29b"}.ion-load-c:before,.ion-loading-c:before{content:"\f29c"}.ion-load-d:before,.ion-loading-d:before{content:"\f29d"}.ion-location:before{content:"\f1ff"}.ion-locked:before{content:"\f200"}.ion-log-in:before{content:"\f29e"}.ion-log-out:before{content:"\f29f"}.ion-loop:before,.ion-looping:before{content:"\f201"}.ion-magnet:before{content:"\f2a0"}.ion-male:before{content:"\f2a1"}.ion-man:before{content:"\f202"}.ion-map:before{content:"\f203"}.ion-medkit:before{content:"\f2a2"}.ion-mic-a:before{content:"\f204"}.ion-mic-b:before{content:"\f205"}.ion-mic-c:before{content:"\f206"}.ion-minus:before{content:"\f209"}.ion-minus-circled:before{content:"\f207"}.ion-minus-round:before{content:"\f208"}.ion-model-s:before{content:"\f2c1"}.ion-monitor:before{content:"\f20a"}.ion-more:before{content:"\f20b"}.ion-music-note:before{content:"\f20c"}.ion-navicon:before{content:"\f20e"}.ion-navicon-round:before{content:"\f20d"}.ion-navigate:before{content:"\f2a3"}.ion-no-smoking:before{content:"\f2c2"}.ion-nuclear:before{content:"\f2a4"}.ion-paper-airplane:before{content:"\f2c3"}.ion-paperclip:before{content:"\f20f"}.ion-pause:before{content:"\f210"}.ion-person:before{content:"\f213"}.ion-person-add:before{content:"\f211"}.ion-person-stalker:before{content:"\f212"}.ion-pie-graph:before{content:"\f2a5"}.ion-pin:before{content:"\f2a6"}.ion-pinpoint:before{content:"\f2a7"}.ion-pizza:before{content:"\f2a8"}.ion-plane:before{content:"\f214"}.ion-play:before{content:"\f215"}.ion-playstation:before{content:"\f30a"}.ion-plus:before{content:"\f218"}.ion-plus-circled:before{content:"\f216"}.ion-plus-round:before{content:"\f217"}.ion-pound:before{content:"\f219"}.ion-power:before{content:"\f2a9"}.ion-pricetag:before{content:"\f2aa"}.ion-pricetags:before{content:"\f2ab"}.ion-printer:before{content:"\f21a"}.ion-radio-waves:before{content:"\f2ac"}.ion-record:before{content:"\f21b"}.ion-refresh:before,.ion-refreshing:before{content:"\f21c"}.ion-reply:before{content:"\f21e"}.ion-reply-all:before{content:"\f21d"}.ion-search:before{content:"\f21f"}.ion-settings:before{content:"\f2ad"}.ion-share:before{content:"\f220"}.ion-shuffle:before{content:"\f221"}.ion-skip-backward:before{content:"\f222"}.ion-skip-forward:before{content:"\f223"}.ion-social-android:before{content:"\f225"}.ion-social-android-outline:before{content:"\f224"}.ion-social-apple:before{content:"\f227"}.ion-social-apple-outline:before{content:"\f226"}.ion-social-bitcoin:before{content:"\f2af"}.ion-social-bitcoin-outline:before{content:"\f2ae"}.ion-social-buffer:before{content:"\f229"}.ion-social-buffer-outline:before{content:"\f228"}.ion-social-designernews:before{content:"\f22b"}.ion-social-designernews-outline:before{content:"\f22a"}.ion-social-dribbble:before{content:"\f22d"}.ion-social-dribbble-outline:before{content:"\f22c"}.ion-social-dropbox:before{content:"\f22f"}.ion-social-dropbox-outline:before{content:"\f22e"}.ion-social-facebook:before{content:"\f231"}.ion-social-facebook-outline:before{content:"\f230"}.ion-social-freebsd-devil:before{content:"\f2c4"}.ion-social-github:before{content:"\f233"}.ion-social-github-outline:before{content:"\f232"}.ion-social-googleplus:before{content:"\f235"}.ion-social-googleplus-outline:before{content:"\f234"}.ion-social-hackernews:before{content:"\f237"}.ion-social-hackernews-outline:before{content:"\f236"}.ion-social-linkedin:before{content:"\f239"}.ion-social-linkedin-outline:before{content:"\f238"}.ion-social-pinterest:before{content:"\f2b1"}.ion-social-pinterest-outline:before{content:"\f2b0"}.ion-social-reddit:before{content:"\f23b"}.ion-social-reddit-outline:before{content:"\f23a"}.ion-social-rss:before{content:"\f23d"}.ion-social-rss-outline:before{content:"\f23c"}.ion-social-skype:before{content:"\f23f"}.ion-social-skype-outline:before{content:"\f23e"}.ion-social-tumblr:before{content:"\f241"}.ion-social-tumblr-outline:before{content:"\f240"}.ion-social-tux:before{content:"\f2c5"}.ion-social-twitter:before{content:"\f243"}.ion-social-twitter-outline:before{content:"\f242"}.ion-social-vimeo:before{content:"\f245"}.ion-social-vimeo-outline:before{content:"\f244"}.ion-social-windows:before{content:"\f247"}.ion-social-windows-outline:before{content:"\f246"}.ion-social-wordpress:before{content:"\f249"}.ion-social-wordpress-outline:before{content:"\f248"}.ion-social-yahoo:before{content:"\f24b"}.ion-social-yahoo-outline:before{content:"\f24a"}.ion-social-youtube:before{content:"\f24d"}.ion-social-youtube-outline:before{content:"\f24c"}.ion-speakerphone:before{content:"\f2b2"}.ion-speedometer:before{content:"\f2b3"}.ion-spoon:before{content:"\f2b4"}.ion-star:before{content:"\f24e"}.ion-stats-bars:before{content:"\f2b5"}.ion-steam:before{content:"\f30b"}.ion-stop:before{content:"\f24f"}.ion-thermometer:before{content:"\f2b6"}.ion-thumbsdown:before{content:"\f250"}.ion-thumbsup:before{content:"\f251"}.ion-trash-a:before{content:"\f252"}.ion-trash-b:before{content:"\f253"}.ion-umbrella:before{content:"\f2b7"}.ion-unlocked:before{content:"\f254"}.ion-upload:before{content:"\f255"}.ion-usb:before{content:"\f2b8"}.ion-videocamera:before{content:"\f256"}.ion-volume-high:before{content:"\f257"}.ion-volume-low:before{content:"\f258"}.ion-volume-medium:before{content:"\f259"}.ion-volume-mute:before{content:"\f25a"}.ion-waterdrop:before{content:"\f25b"}.ion-wifi:before{content:"\f25c"}.ion-wineglass:before{content:"\f2b9"}.ion-woman:before{content:"\f25d"}.ion-wrench:before{content:"\f2ba"}.ion-xbox:before{content:"\f30c"}a,abbr,acronym,address,applet,article,aside,audio,b,big,blockquote,body,canvas,caption,center,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{margin:0;padding:0;border:0;vertical-align:baseline;font:inherit;font-size:100%}ol,ul{list-style:none}blockquote,q{quotes:none}audio:not([controls]){display:none;height:0}[hidden],template{display:none}script{display:none!important}html{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}:focus,a,a:active,a:focus,a:hover,button,button:focus{outline:0}a{-webkit-user-drag:none;-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-tap-highlight-color:transparent}a[href]:hover{cursor:pointer}b,strong{font-weight:700}dfn{font-style:italic}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}code,kbd,pre,samp{font-size:1em;font-family:monospace,serif}pre{white-space:pre-wrap}q{quotes:"\201C" "\201D" "\2018" "\2019"}sub,sup{position:relative;vertical-align:baseline;font-size:75%;line-height:0}sup{top:-.5em}sub{bottom:-.25em}fieldset{margin:0 2px;padding:.35em .625em .75em;border:1px solid silver}button,input,select,textarea{margin:0;outline-offset:0;outline-style:none;outline-width:0;-webkit-font-smoothing:inherit}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{cursor:pointer;-webkit-appearance:button}button[disabled],html input[disabled]{cursor:default}input[type=search]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}textarea{overflow:auto}img{-webkit-user-drag:none}table{border-spacing:0;border-collapse:collapse}*,:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.ionic-body,body{-webkit-touch-callout:none;-webkit-font-smoothing:antialiased;font-smoothing:antialiased;-webkit-text-size-adjust:none;-moz-text-size-adjust:none;text-size-adjust:none;-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-tap-highlight-color:transparent;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:fixed;top:0;right:0;bottom:0;left:0;overflow:hidden;margin:0;padding:0;color:#000;word-wrap:break-word;font-size:14px;font-family:"Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif;line-height:20px;text-rendering:optimizeLegibility;-webkit-backface-visibility:hidden;-webkit-user-drag:none}body.grade-b,body.grade-c{text-rendering:auto}.content{position:relative}.scroll-content{position:absolute;top:0;right:0;bottom:0;left:0;overflow:hidden;margin-top:-1px;width:auto;height:auto}.scroll-view{position:relative;overflow:hidden;margin-top:-1px;height:100%}.scroll{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-touch-callout:none;-webkit-text-size-adjust:none;-moz-text-size-adjust:none;text-size-adjust:none;-webkit-transform-origin:left top;-moz-transform-origin:left top;transform-origin:left top;-webkit-backface-visibility:hidden}.scroll-bar{position:absolute;z-index:9999}.ng-animate .scroll-bar{visibility:hidden}.scroll-bar-h{right:2px;bottom:3px;left:2px;height:3px}.scroll-bar-h .scroll-bar-indicator{height:100%}.scroll-bar-v{top:2px;right:3px;bottom:2px;width:3px}.scroll-bar-v .scroll-bar-indicator{width:100%}.scroll-bar-indicator{position:absolute;border-radius:4px;background:rgba(0,0,0,.3);opacity:1}.scroll-bar-indicator.scroll-bar-fade-out{-webkit-transition:opacity .3s linear;-moz-transition:opacity .3s linear;transition:opacity .3s linear;opacity:0}.grade-b .scroll-bar-indicator,.grade-c .scroll-bar-indicator{border-radius:0;background:#aaa}.grade-b .scroll-bar-indicator.scroll-bar-fade-out,.grade-c .scroll-bar-indicator.scroll-bar-fade-out{-webkit-transition:none;-moz-transition:none;transition:none}.scroll-refresher{position:absolute;top:-60px;right:0;left:0;overflow:hidden;margin:auto;height:60px}.scroll-refresher .icon-refreshing{-webkit-animation-duration:1.5s;-moz-animation-duration:1.5s;animation-duration:1.5s;display:none}.ionic-refresher-content,.scroll-refresher-content{position:absolute;bottom:15px;left:0;width:100%;color:#666;text-align:center;font-size:30px}.ionic-refresher-content .icon-pulling{-webkit-animation-duration:200ms;-moz-animation-duration:200ms;animation-duration:200ms;-webkit-animation-timing-function:linear;-moz-animation-timing-function:linear;animation-timing-function:linear;-webkit-animation-fill-mode:both;-moz-animation-fill-mode:both;animation-fill-mode:both}@keyframes refresh-spin{0%{transform:rotate(0)}100%{transform:rotate(-180deg)}}@-webkit-keyframes refresh-spin{0%{-webkit-transform:rotate(0)}100%{-webkit-transform:rotate(-180deg)}}.scroll-refresher.active .icon-pulling{display:block}.scroll-refresher.active .icon-refreshing,.scroll-refresher.active.refreshing .icon-pulling{display:none}.scroll-refresher.active.refreshing .icon-refreshing{display:block}.scroll-refresher.active .ionic-refresher-content i.icon.icon-pulling{-webkit-animation-name:refresh-spin;-moz-animation-name:refresh-spin;animation-name:refresh-spin}ion-infinite-scroll .scroll-infinite{position:relative;overflow:hidden;margin-top:-70px;height:60px}.scroll-infinite-content{position:absolute;bottom:15px;left:0;width:100%;color:#666;text-align:center;font-size:30px}ion-infinite-scroll.active .scroll-infinite{margin-top:-30px}.overflow-scroll{overflow-x:hidden;overflow-y:scroll;-webkit-overflow-scrolling:touch}.overflow-scroll .scroll{position:static;height:100%}.has-header{top:44px}.has-subheader{top:88px}.has-footer{bottom:44px}.bar-footer.has-tabs,.has-tabs{bottom:49px}.has-footer.has-tabs{bottom:93px}.pane{-webkit-transform:translate3d(0,0,0);-moz-transform:translate3d(0,0,0);transform:translate3d(0,0,0);z-index:1}.view{z-index:1}.pane,.view{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;background-color:#fff}p{margin:0 0 10px}small{font-size:85%}cite{font-style:normal}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{color:#000;font-weight:500;font-family:"Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif;line-height:1.2}.h1 small,.h2 small,.h3 small,.h4 small,.h5 small,.h6 small,h1 small,h2 small,h3 small,h4 small,h5 small,h6 small{font-weight:400;line-height:1}.h1,.h2,.h3,h1,h2,h3{margin-top:20px;margin-bottom:10px}.h1:first-child,.h2:first-child,.h3:first-child,h1:first-child,h2:first-child,h3:first-child{margin-top:0}.h1+.h1,.h1+.h2,.h1+.h3,.h1+h1,.h1+h2,.h1+h3,.h2+.h1,.h2+.h2,.h2+.h3,.h2+h1,.h2+h2,.h2+h3,.h3+.h1,.h3+.h2,.h3+.h3,.h3+h1,.h3+h2,.h3+h3,h1+.h1,h1+.h2,h1+.h3,h1+h1,h1+h2,h1+h3,h2+.h1,h2+.h2,h2+.h3,h2+h1,h2+h2,h2+h3,h3+.h1,h3+.h2,h3+.h3,h3+h1,h3+h2,h3+h3{margin-top:10px}.h4,.h5,.h6,h4,h5,h6{margin-top:10px;margin-bottom:10px}.h1,h1{font-size:36px}.h2,h2{font-size:30px}.h3,h3{font-size:24px}.h4,h4{font-size:18px}.h5,h5{font-size:14px}.h6,h6{font-size:12px}.h1 small,h1 small{font-size:24px}.h2 small,h2 small{font-size:18px}.h3 small,.h4 small,h3 small,h4 small{font-size:14px}dl{margin-bottom:20px}dd,dt{line-height:1.42857}dt{font-weight:700}blockquote{margin:0 0 20px;padding:10px 20px;border-left:5px solid gray}blockquote p{font-weight:300;font-size:17.5px;line-height:1.25}blockquote p:last-child{margin-bottom:0}blockquote small{display:block;line-height:1.42857}blockquote small:before{content:'\2014 \00A0'}blockquote:after,blockquote:before,q:after,q:before{content:""}address{display:block;margin-bottom:20px;font-style:normal;line-height:1.42857}a.subdued{padding-right:10px;color:#888;text-decoration:none}a.subdued:hover{text-decoration:none}a.subdued:last-child{padding-right:0}.action-sheet-backdrop{-webkit-transition:background-color 300ms ease-in-out;-moz-transition:background-color 300ms ease-in-out;transition:background-color 300ms ease-in-out;position:fixed;top:0;left:0;z-index:11;width:100%;height:100%;background-color:rgba(0,0,0,0)}.action-sheet-backdrop.active{background-color:rgba(0,0,0,.5)}.action-sheet-wrapper{-webkit-transform:translate3d(0,100%,0);-moz-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0);-webkit-transition:all ease-in-out 300ms;-moz-transition:all ease-in-out 300ms;transition:all ease-in-out 300ms;position:absolute;bottom:0;width:100%}.action-sheet-up{-webkit-transform:translate3d(0,0,0);-moz-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.action-sheet{margin-left:15px;margin-right:15px;width:auto;z-index:11;overflow:hidden}.action-sheet .button{display:block;padding:1px;width:100%;border-radius:0;background-color:transparent;color:#4a87ee;font-size:18px}.action-sheet .button.destructive{color:#ef4e3a}.action-sheet-title{padding:10px;color:#666;text-align:center;font-size:12px}.action-sheet-group{margin-bottom:5px;border-radius:3px;background-color:#fff}.action-sheet-group .button{border-width:1px 0 0;border-radius:0}.action-sheet-group .button.active{background-color:transparent;color:inherit}.action-sheet-group .button:first-child:last-child{border-width:0}.action-sheet-open,.action-sheet-open.modal-open .modal{pointer-events:none}.action-sheet-open .action-sheet-backdrop{pointer-events:auto}.bar{display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-moz-flex;display:-ms-flexbox;display:flex;-webkit-transform:translate3d(0,0,0);-moz-transform:translate3d(0,0,0);transform:translate3d(0,0,0);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:absolute;right:0;left:0;z-index:10;box-sizing:border-box;padding:5px;width:100%;height:44px;border-width:0;border-style:solid;border-top:1px solid transparent;border-bottom:1px solid #ddd;background-color:#fff;background-size:0}@media (min--moz-device-pixel-ratio:1.5),(-webkit-min-device-pixel-ratio:1.5),(min-device-pixel-ratio:1.5),(min-resolution:144dpi),(min-resolution:1.5dppx){.bar{border:0;background-image:linear-gradient(0deg,#ddd,#ddd 50%,transparent 50%);background-position:bottom;background-size:100% 1px;background-repeat:no-repeat}}.bar.bar-clear{border:0;background:0 0;color:#fff}.bar.bar-clear .button,.bar.bar-clear .title{color:#fff}.bar.item-input-inset .item-input-wrapper{margin-top:-1px}.bar.item-input-inset .item-input-wrapper input{padding-left:8px;height:28px}.bar.bar-light{background-color:#fff;border-color:#ddd;background-image:linear-gradient(0deg,#ddd,#ddd 50%,transparent 50%);color:#444}.bar.bar-light .title{color:#444}.bar.bar-stable{background-color:#f8f8f8;border-color:#b2b2b2;background-image:linear-gradient(0deg,#b2b2b2,#b2b2b2 50%,transparent 50%);color:#444}.bar.bar-stable .title{color:#444}.bar.bar-positive{background-color:#4a87ee;border-color:#145fd7;background-image:linear-gradient(0deg,#145fd7,#145fd7 50%,transparent 50%);color:#fff}.bar.bar-positive .title{color:#fff}.bar.bar-calm{background-color:#43cee6;border-color:#1aacc3;background-image:linear-gradient(0deg,#1aacc3,#1aacc3 50%,transparent 50%);color:#fff}.bar.bar-calm .title{color:#fff}.bar.bar-assertive{background-color:#ef4e3a;border-color:#cc2311;background-image:linear-gradient(0deg,#cc2311,#cc2311 50%,transparent 50%);color:#fff}.bar.bar-assertive .title{color:#fff}.bar.bar-balanced{background-color:#6c3;border-color:#498f24;background-image:linear-gradient(0deg,#498f24,#498f24 50%,transparent 50%);color:#fff}.bar.bar-balanced .title{color:#fff}.bar.bar-energized{background-color:#f0b840;border-color:#d39211;background-image:linear-gradient(0deg,#d39211,#d39211 50%,transparent 50%);color:#fff}.bar.bar-energized .title{color:#fff}.bar.bar-royal{background-color:#8a6de9;border-color:#552bdf;background-image:linear-gradient(0deg,#552bdf,#552bdf 50%,transparent 50%);color:#fff}.bar.bar-royal .title{color:#fff}.bar.bar-dark{background-color:#444;border-color:#111;background-image:linear-gradient(0deg,#111,#111 50%,transparent 50%);color:#fff}.bar.bar-dark .title{color:#fff}.bar .title{position:absolute;top:0;right:0;left:0;z-index:0;overflow:hidden;margin:0 10px;min-width:30px;text-align:center;text-overflow:ellipsis;white-space:nowrap;font-size:17px;line-height:44px}.bar .title.title-left{text-align:left}.bar .title.title-right{text-align:right}.bar .title a{color:inherit}.bar .button{z-index:1;padding:0 8px;min-width:initial;min-height:31px;font-size:13px;font-weight:400;line-height:32px}.bar .button .icon:before,.bar .button.button-icon:before,.bar .button.icon-left:before,.bar .button.icon-right:before,.bar .button.icon:before{padding-right:2px;padding-left:2px;font-size:20px;line-height:32px}.bar .button.button-icon .icon:before,.bar .button.button-icon.icon-left:before,.bar .button.button-icon.icon-right:before,.bar .button.button-icon:before{vertical-align:top;font-size:32px;line-height:32px}.bar .button.button-clear{font-size:17px;font-weight:300;padding-right:2px;padding-left:2px}.bar .button.button-clear .icon:before,.bar .button.button-clear.icon-left:before,.bar .button.button-clear.icon-right:before,.bar .button.button-clear.icon:before{font-size:32px;line-height:32px}.bar .button.back-button.active{opacity:1}.bar .button-bar>.button,.bar .buttons>.button{min-height:31px;line-height:32px}.bar .button+.button-bar,.bar .button-bar+.button{margin-left:5px}.bar .title+.button:last-child,.bar .title+.buttons,.bar>.button+.button:last-child,.bar>.button.pull-right{position:absolute;top:5px;right:5px;bottom:5px}.bar-light .button{color:#444;background-color:#fff;border-color:#ddd}.bar-light .button:hover{color:#444;text-decoration:none}.bar-light .button.active{background-color:#fafafa;box-shadow:inset 0 1px 3px rgba(0,0,0,.15);border-color:#ccc}.bar-light .button.button-clear{color:#444;background:0 0;border-color:transparent;box-shadow:none;font-size:17px}.bar-light .button.button-icon{background:0 0;border-color:transparent}.bar-stable .button{color:#444;background-color:#f8f8f8;border-color:#b2b2b2}.bar-stable .button:hover{color:#444;text-decoration:none}.bar-stable .button.active{background-color:#e5e5e5;box-shadow:inset 0 1px 3px rgba(0,0,0,.15);border-color:#a2a2a2}.bar-stable .button.button-clear{color:#444;background:0 0;border-color:transparent;box-shadow:none;font-size:17px}.bar-stable .button.button-icon{background:0 0;border-color:transparent}.bar-positive .button{color:#fff;background-color:#4a87ee;border-color:#145fd7}.bar-positive .button:hover{color:#fff;text-decoration:none}.bar-positive .button.active{background-color:#145fd7;box-shadow:inset 0 1px 3px rgba(0,0,0,.15);border-color:#145fd7}.bar-positive .button.button-clear{color:#fff;background:0 0;border-color:transparent;box-shadow:none;font-size:17px}.bar-positive .button.button-icon{background:0 0;border-color:transparent}.bar-calm .button{color:#fff;background-color:#43cee6;border-color:#1aacc3}.bar-calm .button:hover{color:#fff;text-decoration:none}.bar-calm .button.active{background-color:#1aacc3;box-shadow:inset 0 1px 3px rgba(0,0,0,.15);border-color:#1aacc3}.bar-calm .button.button-clear{color:#fff;background:0 0;border-color:transparent;box-shadow:none;font-size:17px}.bar-calm .button.button-icon{background:0 0;border-color:transparent}.bar-assertive .button{color:#fff;background-color:#ef4e3a;border-color:#cc2311}.bar-assertive .button:hover{color:#fff;text-decoration:none}.bar-assertive .button.active{background-color:#cc2311;box-shadow:inset 0 1px 3px rgba(0,0,0,.15);border-color:#cc2311}.bar-assertive .button.button-clear{color:#fff;background:0 0;border-color:transparent;box-shadow:none;font-size:17px}.bar-assertive .button.button-icon{background:0 0;border-color:transparent}.bar-balanced .button{color:#fff;background-color:#6c3;border-color:#498f24}.bar-balanced .button:hover{color:#fff;text-decoration:none}.bar-balanced .button.active{background-color:#498f24;box-shadow:inset 0 1px 3px rgba(0,0,0,.15);border-color:#498f24}.bar-balanced .button.button-clear{color:#fff;background:0 0;border-color:transparent;box-shadow:none;font-size:17px}.bar-balanced .button.button-icon{background:0 0;border-color:transparent}.bar-energized .button{color:#fff;background-color:#f0b840;border-color:#d39211}.bar-energized .button:hover{color:#fff;text-decoration:none}.bar-energized .button.active{background-color:#d39211;box-shadow:inset 0 1px 3px rgba(0,0,0,.15);border-color:#d39211}.bar-energized .button.button-clear{color:#fff;background:0 0;border-color:transparent;box-shadow:none;font-size:17px}.bar-energized .button.button-icon{background:0 0;border-color:transparent}.bar-royal .button{color:#fff;background-color:#8a6de9;border-color:#552bdf}.bar-royal .button:hover{color:#fff;text-decoration:none}.bar-royal .button.active{background-color:#552bdf;box-shadow:inset 0 1px 3px rgba(0,0,0,.15);border-color:#552bdf}.bar-royal .button.button-clear{color:#fff;background:0 0;border-color:transparent;box-shadow:none;font-size:17px}.bar-royal .button.button-icon{background:0 0;border-color:transparent}.bar-dark .button{color:#fff;background-color:#444;border-color:#111}.bar-dark .button:hover{color:#fff;text-decoration:none}.bar-dark .button.active{background-color:#262626;box-shadow:inset 0 1px 3px rgba(0,0,0,.15);border-color:#000}.bar-dark .button.button-clear{color:#fff;background:0 0;border-color:transparent;box-shadow:none;font-size:17px}.bar-dark .button.button-icon{background:0 0;border-color:transparent}.bar-header{top:0;border-top-width:0;border-bottom-width:1px}.bar-footer{bottom:0;border-top-width:1px;border-bottom-width:0;background-position:top}.bar-tabs{padding:0}.bar-subheader{top:44px;display:block}.bar-subfooter{bottom:44px;display:block}.tabs{display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-moz-flex;display:-ms-flexbox;display:flex;-webkit-box-direction:normal;-webkit-box-orient:horizontal;-webkit-flex-direction:horizontal;-moz-flex-direction:horizontal;-ms-flex-direction:horizontal;flex-direction:horizontal;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;-moz-justify-content:center;justify-content:center;-webkit-transform:translate3d(0,0,0);-moz-transform:translate3d(0,0,0);transform:translate3d(0,0,0);background-color:#f8f8f8;background-image:linear-gradient(0deg,#b2b2b2,#b2b2b2 50%,transparent 50%);border-color:#b2b2b2;color:#444;position:absolute;bottom:0;z-index:5;width:100%;height:49px;border-style:solid;border-top-width:1px;background-size:0;line-height:49px}.tabs .tab-item .badge{background-color:#444;color:#f8f8f8}.tabs.tabs-light{background-color:#fff;background-image:linear-gradient(0deg,#ddd,#ddd 50%,transparent 50%);border-color:#ddd;color:#444}.tabs.tabs-light .tab-item .badge{background-color:#444;color:#fff}.tabs.tabs-stable{background-color:#f8f8f8;background-image:linear-gradient(0deg,#b2b2b2,#b2b2b2 50%,transparent 50%);border-color:#b2b2b2;color:#444}.tabs.tabs-stable .tab-item .badge{background-color:#444;color:#f8f8f8}.tabs.tabs-positive{background-color:#4a87ee;background-image:linear-gradient(0deg,#145fd7,#145fd7 50%,transparent 50%);border-color:#145fd7;color:#fff}.tabs.tabs-positive .tab-item .badge{background-color:#fff;color:#4a87ee}.tabs.tabs-calm{background-color:#43cee6;background-image:linear-gradient(0deg,#1aacc3,#1aacc3 50%,transparent 50%);border-color:#1aacc3;color:#fff}.tabs.tabs-calm .tab-item .badge{background-color:#fff;color:#43cee6}.tabs.tabs-assertive{background-color:#ef4e3a;background-image:linear-gradient(0deg,#cc2311,#cc2311 50%,transparent 50%);border-color:#cc2311;color:#fff}.tabs.tabs-assertive .tab-item .badge{background-color:#fff;color:#ef4e3a}.tabs.tabs-balanced{background-color:#6c3;background-image:linear-gradient(0deg,#498f24,#498f24 50%,transparent 50%);border-color:#498f24;color:#fff}.tabs.tabs-balanced .tab-item .badge{background-color:#fff;color:#6c3}.tabs.tabs-energized{background-color:#f0b840;background-image:linear-gradient(0deg,#d39211,#d39211 50%,transparent 50%);border-color:#d39211;color:#fff}.tabs.tabs-energized .tab-item .badge{background-color:#fff;color:#f0b840}.tabs.tabs-royal{background-color:#8a6de9;background-image:linear-gradient(0deg,#552bdf,#552bdf 50%,transparent 50%);border-color:#552bdf;color:#fff}.tabs.tabs-royal .tab-item .badge{background-color:#fff;color:#8a6de9}.tabs.tabs-dark{background-color:#444;background-image:linear-gradient(0deg,#111,#111 50%,transparent 50%);border-color:#111;color:#fff}.tabs.tabs-dark .tab-item .badge{background-color:#fff;color:#444}@media (min--moz-device-pixel-ratio:1.5),(-webkit-min-device-pixel-ratio:1.5),(min-device-pixel-ratio:1.5),(min-resolution:144dpi),(min-resolution:1.5dppx){.tabs{padding-top:2px;border-top:0!important;border-bottom:0!important;background-position:top;background-size:100% 1px;background-repeat:no-repeat}}.tabs-top{top:44px;padding-top:0;padding-bottom:2px;background-position:bottom}.tab-item{-webkit-box-flex:1;-webkit-flex:1;-moz-box-flex:1;-moz-flex:1;-ms-flex:1;flex:1;display:block;overflow:hidden;max-width:150px;height:100%;color:inherit;text-align:center;text-decoration:none;text-overflow:ellipsis;white-space:nowrap;font-weight:400;font-size:14px;font-family:"Helvetica Neue-Light","Helvetica Neue Light","Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif;opacity:.7}.tab-item:hover{cursor:pointer}.tabs-icon-bottom .tab-item,.tabs-icon-top .tab-item{font-size:12px;line-height:14px}.tab-item .icon{display:block;margin:0 auto;height:32px;font-size:32px}.tabs-icon-left .tab-item,.tabs-icon-right .tab-item{font-size:12px}.tabs-icon-left .tab-item .icon,.tabs-icon-right .tab-item .icon{display:inline-block;vertical-align:top}.tabs-icon-left .tab-item .icon:before,.tabs-icon-right .tab-item .icon:before{font-size:24px;line-height:49px}.tabs-icon-left .tab-item .icon{padding-right:3px}.tabs-icon-right .tab-item .icon{padding-left:3px}.tabs-icon-only .icon{line-height:inherit}.tab-item.has-badge{position:relative}.tab-item .badge{position:absolute;padding:1px 6px;top:4%;right:33%;right:calc(50% - 26px);font-size:12px;height:auto;line-height:16px}.tab-item.active{opacity:1}.tab-item.active.tab-item-light{color:#fff}.tab-item.active.tab-item-stable{color:#f8f8f8}.tab-item.active.tab-item-positive{color:#4a87ee}.tab-item.active.tab-item-calm{color:#43cee6}.tab-item.active.tab-item-assertive{color:#ef4e3a}.tab-item.active.tab-item-balanced{color:#6c3}.tab-item.active.tab-item-energized{color:#f0b840}.tab-item.active.tab-item-royal{color:#8a6de9}.tab-item.active.tab-item-dark{color:#444}.item.tabs{display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-moz-flex;display:-ms-flexbox;display:flex;padding:0}.item.tabs .icon:before{position:relative}.menu{position:absolute;top:0;bottom:0;z-index:0;overflow:hidden;min-height:100%;max-height:100%;width:275px;background-color:#fff}.menu-content{-webkit-transform:none;-moz-transform:none;transform:none;box-shadow:-1px 0 2px rgba(0,0,0,.2),1px 0 2px rgba(0,0,0,.2)}.grade-b .menu-content,.grade-c .menu-content{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;right:-1px;left:-1px;border-right:1px solid #ccc;border-left:1px solid #ccc;box-shadow:none}.menu-left{left:0}.menu-right{right:0}.menu-animated{-webkit-transition:-webkit-transform 200ms ease;-moz-transition:-moz-transform 200ms ease;transition:transform 200ms ease}.modal-backdrop{-webkit-transition:background-color 300ms ease-in-out;-moz-transition:background-color 300ms ease-in-out;transition:background-color 300ms ease-in-out;position:fixed;top:0;left:0;z-index:10;width:100%;height:100%;background-color:rgba(0,0,0,0)}.modal-backdrop.active{background-color:rgba(0,0,0,.5)}.modal{position:absolute;top:0;z-index:10;overflow:hidden;min-height:100%;width:100%;background-color:#fff}@media (min-width:680px){.modal{top:20%;right:20%;bottom:20%;left:20%;overflow:visible;min-height:240px;max-width:768px;width:60%}.modal.ng-leave-active{bottom:0}}.modal-open{pointer-events:none}.modal-open .modal{pointer-events:auto}.popup{position:fixed;top:50%;left:50%;z-index:11;visibility:hidden;width:250px;border-radius:0;background-color:rgba(255,255,255,.9)}.popup.popup-hidden{-webkit-animation-name:scaleOut;-moz-animation-name:scaleOut;animation-name:scaleOut;-webkit-animation-duration:.1s;-moz-animation-duration:.1s;animation-duration:.1s;-webkit-animation-timing-function:ease-in-out;-moz-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;-webkit-animation-fill-mode:both;-moz-animation-fill-mode:both;animation-fill-mode:both}.popup.popup-showing{visibility:visible}.popup.active{-webkit-animation-name:superScaleIn;-moz-animation-name:superScaleIn;animation-name:superScaleIn;-webkit-animation-duration:.2s;-moz-animation-duration:.2s;animation-duration:.2s;-webkit-animation-timing-function:ease-in-out;-moz-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;-webkit-animation-fill-mode:both;-moz-animation-fill-mode:both;animation-fill-mode:both}.popup-head{padding:15px 0;border-bottom:1px solid #eee;text-align:center}.popup-title{margin:0;padding:0;font-size:15px}.popup-sub-title{margin:5px 0 0;padding:0;font-weight:400;font-size:11px}.popup-body,.popup-buttons.row{padding:10px}.popup-buttons .button{margin:0 5px;min-height:45px;border-radius:2px;line-height:20px}.popup-buttons .button:first-child{margin-left:0}.popup-buttons .button:last-child{margin-right:0}.popup-backdrop{-webkit-animation-name:fadeIn;-moz-animation-name:fadeIn;animation-name:fadeIn;-webkit-animation-duration:.1s;-moz-animation-duration:.1s;animation-duration:.1s;-webkit-animation-timing-function:linear;-moz-animation-timing-function:linear;animation-timing-function:linear;-webkit-animation-fill-mode:both;-moz-animation-fill-mode:both;animation-fill-mode:both;position:fixed;top:0;left:0;z-index:10;width:100%;height:100%;background-color:rgba(0,0,0,.4)}.loading-backdrop{position:fixed;top:0;left:0;z-index:10;visibility:hidden;width:100%;height:100%}.loading-backdrop.active{-webkit-transition-delay:0s;-moz-transition-delay:0s;transition-delay:0s;visibility:visible}.loading-backdrop{-webkit-transition:visibility 0s linear .3s;-moz-transition:visibility 0s linear .3s;transition:visibility 0s linear .3s}.loading-backdrop.active{background-color:rgba(0,0,0,.7)}.loading{position:fixed;top:50%;left:50%;padding:20px;border-radius:5px;background-color:rgba(0,0,0,.7);color:#fff;text-align:center;text-overflow:ellipsis;font-size:15px}.loading h1,.loading h2,.loading h3,.loading h4,.loading h5,.loading h6{color:#fff}.item{color:#444;background-color:#fff;border-color:#ddd;-webkit-transition:margin-left .2s ease-in-out,margin-right .2s ease-in-out,left .2s ease-in-out;-moz-transition:margin-left .2s ease-in-out,margin-right .2s ease-in-out,left .2s ease-in-out;transition:margin-left .2s ease-in-out,margin-right .2s ease-in-out,left .2s ease-in-out;position:relative;z-index:2;display:block;margin:-1px;padding:15px;border-width:1px;border-style:solid;font-size:16px}.item h2{margin:0 0 4px;font-size:16px}.item h3{margin:0 0 4px;font-size:14px}.item h4{margin:0 0 4px;font-size:12px}.item h5,.item h6{margin:0 0 3px;font-size:10px}.item p{color:#666;font-size:14px}.item h1:last-child,.item h2:last-child,.item h3:last-child,.item h4:last-child,.item h5:last-child,.item h6:last-child,.item p:last-child{margin-bottom:0}.item .badge{display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-moz-flex;display:-ms-flexbox;display:flex;position:absolute;top:15px;right:35px}.item.item-divider .badge{top:7.5px}.item .badge+.badge{margin-right:5px}.item.item-light{color:#444;background-color:#fff;border-color:#ddd}.item.item-stable{color:#444;background-color:#f8f8f8;border-color:#b2b2b2}.item.item-positive{color:#fff;background-color:#4a87ee;border-color:#145fd7}.item.item-calm{color:#fff;background-color:#43cee6;border-color:#1aacc3}.item.item-assertive{color:#fff;background-color:#ef4e3a;border-color:#cc2311}.item.item-balanced{color:#fff;background-color:#6c3;border-color:#498f24}.item.item-energized{color:#fff;background-color:#f0b840;border-color:#d39211}.item.item-royal{color:#fff;background-color:#8a6de9;border-color:#552bdf}.item.item-dark{color:#fff;background-color:#444;border-color:#111}.item-complex.active .item-content,.item.active:not(.item-divider):not(.item-input):not(.item-input-inset){background-color:#D9D9D9;border-color:#ccc}.item-complex.active .item-content.item-light,.item.active:not(.item-divider):not(.item-input):not(.item-input-inset).item-light{background-color:#fafafa;border-color:#ccc}.item-complex.active .item-content.item-stable,.item.active:not(.item-divider):not(.item-input):not(.item-input-inset).item-stable{background-color:#e5e5e5;border-color:#a2a2a2}.item-complex.active .item-content.item-positive,.item.active:not(.item-divider):not(.item-input):not(.item-input-inset).item-positive{background-color:#145fd7;border-color:#145fd7}.item-complex.active .item-content.item-calm,.item.active:not(.item-divider):not(.item-input):not(.item-input-inset).item-calm{background-color:#1aacc3;border-color:#1aacc3}.item-complex.active .item-content.item-assertive,.item.active:not(.item-divider):not(.item-input):not(.item-input-inset).item-assertive{background-color:#cc2311;border-color:#cc2311}.item-complex.active .item-content.item-balanced,.item.active:not(.item-divider):not(.item-input):not(.item-input-inset).item-balanced{background-color:#498f24;border-color:#498f24}.item-complex.active .item-content.item-energized,.item.active:not(.item-divider):not(.item-input):not(.item-input-inset).item-energized{background-color:#d39211;border-color:#d39211}.item-complex.active .item-content.item-royal,.item.active:not(.item-divider):not(.item-input):not(.item-input-inset).item-royal{background-color:#552bdf;border-color:#552bdf}.item-complex.active .item-content.item-dark,.item.active:not(.item-divider):not(.item-input):not(.item-input-inset).item-dark{background-color:#262626;border-color:#000}.item,.item h1,.item h2,.item h3,.item h4,.item h5,.item h6,.item p,.item-content,.item-content h1,.item-content h2,.item-content h3,.item-content h4,.item-content h5,.item-content h6,.item-content p{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}a.item{color:inherit;text-decoration:none}a.item:focus,a.item:hover{text-decoration:none}.item-complex,a.item.item-complex,button.item.item-complex{padding:0}.item-complex .item-content,.item-radio .item-content{-webkit-transition:all .1s ease-in-out;-moz-transition:all .1s ease-in-out;transition:all .1s ease-in-out;position:relative;z-index:2;padding:15px 40px 15px 15px;border:0;background-color:#fff}a.item-content{display:block;color:inherit;text-decoration:none}.item-body h1,.item-body h2,.item-body h3,.item-body h4,.item-body h5,.item-body h6,.item-body p,.item-complex.item-text-wrap .item-content,.item-text-wrap,.item-text-wrap .item,.item-text-wrap h1,.item-text-wrap h2,.item-text-wrap h3,.item-text-wrap h4,.item-text-wrap h5,.item-text-wrap h6,.item-text-wrap p{overflow:hidden;white-space:normal}.item-complex.item-text-wrap,.item-complex.item-text-wrap h1,.item-complex.item-text-wrap h2,.item-complex.item-text-wrap h3,.item-complex.item-text-wrap h4,.item-complex.item-text-wrap h5,.item-complex.item-text-wrap h6,.item-complex.item-text-wrap p{overflow:hidden;white-space:nowrap}.item-icon-left .icon,.item-icon-right .icon{display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-moz-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;-webkit-align-items:center;-moz-align-items:center;align-items:center;position:absolute;top:0;height:100%;font-size:32px}.item-icon-left .icon:before,.item-icon-right .icon:before{display:block;width:32px;text-align:center}.item .fill-icon{min-width:30px;min-height:30px;font-size:28px}.item-icon-left{padding-left:45px}.item-icon-left .icon{left:7.5px}.item-complex.item-icon-left{padding-left:0}.item-complex.item-icon-left .item-content{padding-left:45px}.item-icon-right{padding-right:45px}.item-icon-right .icon{right:7.5px}.item-complex.item-icon-right{padding-right:0}.item-complex.item-icon-right .item-content{padding-right:45px}.item-icon-left.item-icon-right .icon:first-child{right:auto}.item-icon-left.item-icon-right .icon:last-child{left:auto}.item-button-left{padding-left:67.5px}.item-button-left .item-content>.button,.item-button-left>.button{display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-moz-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;-webkit-align-items:center;-moz-align-items:center;align-items:center;position:absolute;top:7.5px;left:7.5px;min-width:34px;min-height:34px;font-size:18px;line-height:32px}.item-button-left .item-content>.button .icon:before,.item-button-left>.button .icon:before{position:relative;left:auto;width:auto;line-height:31px}.item-button-left .item-content>.button>.button,.item-button-left>.button>.button{margin:0 2px;min-height:34px;font-size:18px;line-height:32px}.item-button-right,a.item.item-button-right,button.item.item-button-right{padding-right:75px}.item-button-right .item-content>.button,.item-button-right .item-content>.buttons,.item-button-right>.button,.item-button-right>.buttons{display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-moz-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;-webkit-align-items:center;-moz-align-items:center;align-items:center;position:absolute;top:7.5px;right:15px;min-width:34px;min-height:34px;font-size:18px;line-height:32px}.item-button-right .item-content>.button .icon:before,.item-button-right .item-content>.buttons .icon:before,.item-button-right>.button .icon:before,.item-button-right>.buttons .icon:before{position:relative;left:auto;width:auto;line-height:31px}.item-button-right .item-content>.button>.button,.item-button-right .item-content>.buttons>.button,.item-button-right>.button>.button,.item-button-right>.buttons>.button{margin:0 2px;min-width:34px;min-height:34px;font-size:18px;line-height:32px}.item a[href].item-content,.item[ng-click] a.item-content,a.item,button.item{padding-right:40px}.item a[href].item-content:after,.item[ng-click] a.item-content:after,a.item:after,button.item:after{display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-moz-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;-webkit-align-items:center;-moz-align-items:center;align-items:center;-webkit-font-smoothing:antialiased;font-smoothing:antialiased;position:absolute;top:0;right:11px;height:100%;color:#ccc;content:"\f125";text-transform:none;font-weight:400;font-style:normal;font-variant:normal;font-size:16px;font-family:Ionicons;line-height:1;speak:none}.grade-b .item a[href].item-content:after,.grade-b .item[ng-click] a.item-content:after,.grade-b a.item:after,.grade-b button.item:after,.grade-c .item a[href].item-content:after,.grade-c .item[ng-click] a.item-content:after,.grade-c a.item:after,.grade-c button.item:after{-webkit-font-smoothing:none;font-smoothing:none;content:'>';font-family:monospace}.item a.item-content:after,a.item-button-right:after,a.item-icon-right:after,button.item-button-right:after,button.item-icon-right:after{display:none}.item-avatar{padding-left:70px;min-height:70px}.item-avatar .item-img,.item-avatar img:first-child{position:absolute;top:15px;left:15px;max-width:40px;max-height:40px;width:100%;border-radius:4px}.item-thumbnail-left,.item-thumbnail-left .item-content{padding-left:105px;min-height:100px}.item-thumbnail-left .item-content>.item-image,.item-thumbnail-left .item-content>img:first-child,.item-thumbnail-left>.item-image,.item-thumbnail-left>img:first-child{position:absolute;top:10px;left:10px;max-width:80px;max-height:80px;width:100%}.item-thumbnail-left.item-complex{padding-left:0}.item-thumbnail-right,.item-thumbnail-right .item-content{padding-right:105px;min-height:100px}.item-thumbnail-right .item-content>.item-image,.item-thumbnail-right .item-content>img:first-child,.item-thumbnail-right>.item-image,.item-thumbnail-right>img:first-child{position:absolute;top:10px;right:10px;max-width:80px;max-height:80px;width:100%}.item-thumbnail-left.item-complex{padding-right:0}.item-image{padding:0;text-align:center}.item-image .list-img,.item-image img:first-child{width:100%;vertical-align:middle}.item-body{overflow:auto;padding:15px;text-overflow:inherit;white-space:normal}.item-body h1,.item-body h2,.item-body h3,.item-body h4,.item-body h5,.item-body h6,.item-body p{margin-top:15px;margin-bottom:15px}.item-divider{padding-top:7.5px;padding-bottom:7.5px;min-height:30px;background-color:#f5f5f5;color:#222;font-weight:700}.item-note{float:right;color:#aaa;font-size:14px}.item-reordering{position:absolute;z-index:9;width:100%}.item-placeholder{opacity:.7}.item-edit{-webkit-transition:left .2s ease-in-out,opacity .2s ease-in-out;-moz-transition:left .2s ease-in-out,opacity .2s ease-in-out;transition:left .2s ease-in-out,opacity .2s ease-in-out;position:absolute;top:0;left:8px;z-index:0;width:48px;height:100%;line-height:100%}.item-edit .button{height:100%}.item-edit .button.icon{display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-moz-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;-webkit-align-items:center;-moz-align-items:center;align-items:center;position:absolute;top:0;left:0;height:100%;color:#ef4e3a;font-size:24px}.item-edit.ng-enter{-webkit-transition:left .2s ease-in-out,opacity .2s ease-in-out;-moz-transition:left .2s ease-in-out,opacity .2s ease-in-out;transition:left .2s ease-in-out,opacity .2s ease-in-out;left:-48px;opacity:0}.item-edit.ng-enter-active{left:8px;opacity:1}.item-edit.ng-leave{-webkit-transition:left .2s ease-in-out,opacity .2s ease-in-out;-moz-transition:left .2s ease-in-out,opacity .2s ease-in-out;transition:left .2s ease-in-out,opacity .2s ease-in-out;left:0;opacity:1}.item-edit.ng-leave-active{left:-48px;opacity:0}.item-drag{position:absolute;top:0;right:0;z-index:0;width:50px;height:100%;background:inherit}.item-drag .button{min-width:42px;height:100%}.item-drag .button.icon:before{display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-moz-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;-webkit-align-items:center;-moz-align-items:center;align-items:center;position:absolute;top:0;height:100%;font-size:32px}.item-options{position:absolute;top:0;right:0;z-index:1;height:100%}.item-options .button{height:100%;border:0;border-radius:0}.item-options-hide .item-options{display:none}.list{position:relative;padding-top:1px;padding-bottom:1px;padding-left:0;margin-bottom:20px}.list:last-child{margin-bottom:0}.list-editing .item-content{-webkit-transform:translate3d(50px,0,0);-moz-transform:translate3d(50px,0,0);transform:translate3d(50px,0,0)}.list-reordering .item-content{margin-right:50px}.list-reordering .item-drag{z-index:1}.list-header{margin-top:20px;padding:5px 15px;background-color:transparent;color:#222;font-weight:700}.card.list .list-item{padding-right:1px;padding-left:1px}.card,.list-inset{overflow:hidden;margin:20px 10px;border-radius:2px;background-color:#fff}.card{padding-top:1px;padding-bottom:1px;box-shadow:0 1px 1px rgba(0,0,0,.1)}.card .item:first-child,.card .item:first-child .item-content,.list-inset .item:first-child,.list-inset .item:first-child .item-content,.padding>.list .item:first-child,.padding>.list .item:first-child .item-content{border-top-left-radius:2px;border-top-right-radius:2px}.card .item:last-child,.card .item:last-child .item-content,.list-inset .item:last-child,.list-inset .item:last-child .item-content,.padding>.list .item:last-child,.padding>.list .item:last-child .item-content{border-bottom-right-radius:2px;border-bottom-left-radius:2px}.card .item:last-child,.list-inset .item:last-child{margin-bottom:-1px}.card .item,.list-inset .item,.padding-horizontal>.list .item,.padding>.list .item{margin-right:0;margin-left:0}.padding-left>.list .item{margin-left:0}.padding-right>.list .item{margin-right:0}.badge{background-color:transparent;color:#AAA;display:inline-block;padding:3px 8px;min-width:10px;border-radius:10px;vertical-align:baseline;text-align:center;white-space:nowrap;font-weight:700;font-size:14px;line-height:16px}.badge:empty{display:none}.badge.badge-light,.tabs .tab-item .badge.badge-light{background-color:#fff;color:#444}.badge.badge-stable,.tabs .tab-item .badge.badge-stable{background-color:#f8f8f8;color:#444}.badge.badge-positive,.tabs .tab-item .badge.badge-positive{background-color:#4a87ee;color:#fff}.badge.badge-calm,.tabs .tab-item .badge.badge-calm{background-color:#43cee6;color:#fff}.badge.badge-assertive,.tabs .tab-item .badge.badge-assertive{background-color:#ef4e3a;color:#fff}.badge.badge-balanced,.tabs .tab-item .badge.badge-balanced{background-color:#6c3;color:#fff}.badge.badge-energized,.tabs .tab-item .badge.badge-energized{background-color:#f0b840;color:#fff}.badge.badge-royal,.tabs .tab-item .badge.badge-royal{background-color:#8a6de9;color:#fff}.badge.badge-dark,.tabs .tab-item .badge.badge-dark{background-color:#444;color:#fff}.button .badge{position:relative;top:-1px}.slider{position:relative;overflow:hidden;visibility:hidden}.slider-slides{position:relative;height:100%}.slider-slide{display:block;position:relative;width:100%;height:100%;float:left;vertical-align:top}.slider-slide-image>img{width:100%}.slider-pager{position:absolute;bottom:20px;width:100%;text-align:center;z-index:1}.slider-pager .slider-pager-page{display:inline-block;margin:0 3px;width:15px;color:#000;text-decoration:none;opacity:.3}.slider-pager .slider-pager-page.active{opacity:1;-webkit-transition:opacity .4s ease-in;-moz-transition:opacity .4s ease-in;transition:opacity .4s ease-in}.split-pane{display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-moz-flex;display:-ms-flexbox;display:flex;-webkit-box-align:stretch;-ms-flex-align:stretch;-webkit-align-items:stretch;-moz-align-items:stretch;align-items:stretch;width:100%;height:100%}.split-pane-menu{-webkit-box-flex:0;-webkit-flex:0 0 320px;-moz-box-flex:0;-moz-flex:0 0 320px;-ms-flex:0 0 320px;flex:0 0 320px;overflow-y:auto;width:320px;height:100%;border-right:1px solid #eee}@media all and (max-width:568px){.split-pane-menu{border-right:0}}.split-pane-content{-webkit-box-flex:1;-webkit-flex:1 0 auto;-moz-box-flex:1;-moz-flex:1 0 auto;-ms-flex:1 0 auto;flex:1 0 auto}form{margin:0 0 1.42857}legend{display:block;margin-bottom:1.42857;padding:0;width:100%;border:1px solid #ddd;color:#444;font-size:21px;line-height:2.85714}legend small{color:#f8f8f8;font-size:1.07143}button,input,label,select,textarea{font-size:14px;font-weight:400;line-height:1.42857}button,input,select,textarea{font-family:"Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif}.item-input{display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-moz-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;-webkit-align-items:center;-moz-align-items:center;align-items:center;position:relative;overflow:hidden;padding:6px 8px 5px}.item-input input{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-box-flex:1;-webkit-flex:1 0 220px;-moz-box-flex:1;-moz-flex:1 0 220px;-ms-flex:1 0 220px;flex:1 0 220px;-webkit-appearance:none;-moz-appearance:none;appearance:none;margin:0;background-color:transparent}.item-input .button .icon{-webkit-box-flex:0;-webkit-flex:0 0 24px;-moz-box-flex:0;-moz-flex:0 0 24px;-ms-flex:0 0 24px;flex:0 0 24px;position:static;display:inline-block;height:auto;text-align:center;font-size:16px}.item-input .button-bar{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-box-flex:1;-webkit-flex:1 0 220px;-moz-box-flex:1;-moz-flex:1 0 220px;-ms-flex:1 0 220px;flex:1 0 220px;-webkit-appearance:none;-moz-appearance:none;appearance:none}.item-input .icon{min-width:14px}.item-input-inset{display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-moz-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;-webkit-align-items:center;-moz-align-items:center;align-items:center;position:relative;overflow:hidden;padding:10px}.item-input-wrapper{display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-moz-flex;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-webkit-flex:1 0;-moz-box-flex:1;-moz-flex:1 0;-ms-flex:1 0;flex:1 0;-webkit-box-align:center;-ms-flex-align:center;-webkit-align-items:center;-moz-align-items:center;align-items:center;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;padding-right:8px;padding-left:8px;background:#eee}.item-input-inset .item-input-wrapper input{padding-left:4px;height:29px;background:inherit;line-height:18px}.item-input-wrapper~.button{margin-left:10px}.input-label{-webkit-box-flex:1;-webkit-flex:1 0 100px;-moz-box-flex:1;-moz-flex:1 0 100px;-ms-flex:1 0 100px;flex:1 0 100px;padding:7px 10px 7px 3px;max-width:200px;color:#444;font-weight:700;font-size:14px}.placeholder-icon{color:#aaa}.placeholder-icon:first-child{padding-right:6px}.placeholder-icon:last-child{padding-left:6px}.item-stacked-label{display:block;background-color:transparent;box-shadow:none}.item-stacked-label .icon,.item-stacked-label .input-label{display:inline-block;padding:4px 0;vertical-align:middle}.item-stacked-label input,.item-stacked-label textarea{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;overflow:hidden;padding:4px 8px 3px;border:0;background-color:#fff}.item-stacked-label input{height:46px}input[type=color],input[type=date],input[type=datetime-local],input[type=datetime],input[type=email],input[type=month],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=time],input[type=url],input[type=week],select,textarea{display:block;padding-top:2px;height:34px;color:#111;vertical-align:middle;font-size:14px;line-height:16px}input,textarea{width:100%}textarea{height:auto}input[type=color],input[type=date],input[type=datetime-local],input[type=datetime],input[type=email],input[type=month],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=time],input[type=url],input[type=week],textarea{border:0}input[type=checkbox],input[type=radio]{margin:0;line-height:normal}input[type=button],input[type=checkbox],input[type=file],input[type=image],input[type=radio],input[type=reset],input[type=submit]{width:auto}select[multiple],select[size]{height:auto}input[type=file],select{line-height:34px}select{border:1px solid #ddd;background-color:#fff}input:-moz-placeholder,textarea:-moz-placeholder{color:#aaa}input:-ms-input-placeholder,textarea:-ms-input-placeholder{color:#aaa}input::-webkit-input-placeholder,textarea::-webkit-input-placeholder{color:#aaa}input[disabled],input[readonly],select[disabled],select[readonly],textarea[disabled],textarea[readonly]{background-color:#f8f8f8;cursor:not-allowed}input[type=checkbox][disabled],input[type=checkbox][readonly],input[type=radio][disabled],input[type=radio][readonly]{background-color:transparent}.checkbox{position:relative;display:inline-block;padding:7px;cursor:pointer}.checkbox input:before{border:1px solid #4a87ee}.checkbox input:checked:before{background:#4a87ee}.checkbox.checkbox-light input:before{border:1px solid #ddd}.checkbox.checkbox-light input:checked:before{background:#ddd}.checkbox.checkbox-stable input:before{border:1px solid #b2b2b2}.checkbox.checkbox-stable input:checked:before{background:#b2b2b2}.checkbox.checkbox-positive input:before{border:1px solid #4a87ee}.checkbox.checkbox-positive input:checked:before{background:#4a87ee}.checkbox.checkbox-calm input:before{border:1px solid #43cee6}.checkbox.checkbox-calm input:checked:before{background:#43cee6}.checkbox.checkbox-assertive input:before{border:1px solid #ef4e3a}.checkbox.checkbox-assertive input:checked:before{background:#ef4e3a}.checkbox.checkbox-balanced input:before{border:1px solid #6c3}.checkbox.checkbox-balanced input:checked:before{background:#6c3}.checkbox.checkbox-energized input:before{border:1px solid #f0b840}.checkbox.checkbox-energized input:checked:before{background:#f0b840}.checkbox.checkbox-royal input:before{border:1px solid #8a6de9}.checkbox.checkbox-royal input:checked:before{background:#8a6de9}.checkbox.checkbox-dark input:before{border:1px solid #444}.checkbox.checkbox-dark input:checked:before{background:#444}.checkbox input{position:relative;width:28px;height:28px;border:0;background:0 0;cursor:pointer;-webkit-appearance:none}.checkbox input:before{display:table;width:100%;height:100%;border-radius:28px;background:#fff;content:' ';transition:background-color .1s ease-in-out}.checkbox input:after{-webkit-transition:opacity .05s ease-in-out;-moz-transition:opacity .05s ease-in-out;transition:opacity .05s ease-in-out;-webkit-transform:rotate(-45deg);-moz-transform:rotate(-45deg);transform:rotate(-45deg);position:absolute;top:30%;left:26%;display:table;width:15px;height:10.33333px;border:3px solid #fff;border-top:0;border-right:0;content:' ';opacity:0}.grade-c .checkbox input:after{-webkit-transform:rotate(0);-moz-transform:rotate(0);transform:rotate(0);top:3px;left:4px;border:0;color:#fff;font-weight:700;font-size:20px;content:'\2713'}.checkbox input:checked:after{opacity:1}.item-checkbox{padding-left:58px}.item-checkbox.active{box-shadow:none}.item-checkbox .checkbox{display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-moz-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;-webkit-align-items:center;-moz-align-items:center;align-items:center;position:absolute;top:0;left:7.5px;z-index:3;height:100%}.toggle{position:relative;display:inline-block;margin:-5px;padding:5px}.toggle input:checked+.track{border-color:#4a87ee;background-color:#4a87ee}.toggle.dragging .handle{background-color:#f2f2f2!important}.toggle.toggle-light input:checked+.track{border-color:#ddd;background-color:#ddd}.toggle.toggle-stable input:checked+.track{border-color:#b2b2b2;background-color:#b2b2b2}.toggle.toggle-positive input:checked+.track{border-color:#4a87ee;background-color:#4a87ee}.toggle.toggle-calm input:checked+.track{border-color:#43cee6;background-color:#43cee6}.toggle.toggle-assertive input:checked+.track{border-color:#ef4e3a;background-color:#ef4e3a}.toggle.toggle-balanced input:checked+.track{border-color:#6c3;background-color:#6c3}.toggle.toggle-energized input:checked+.track{border-color:#f0b840;background-color:#f0b840}.toggle.toggle-royal input:checked+.track{border-color:#8a6de9;background-color:#8a6de9}.toggle.toggle-dark input:checked+.track{border-color:#444;background-color:#444}.toggle input{display:none}.toggle .track{-webkit-transition-timing-function:ease-in-out;-moz-transition-timing-function:ease-in-out;transition-timing-function:ease-in-out;-webkit-transition-duration:.2s;-moz-transition-duration:.2s;transition-duration:.2s;-webkit-transition-property:background-color,border;-moz-transition-property:background-color,border;transition-property:background-color,border;display:inline-block;box-sizing:border-box;width:54px;height:32px;border:solid 2px #E5E5E5;border-radius:20px;background-color:#E5E5E5;content:' ';cursor:pointer}.toggle .handle{-webkit-transition:.2s ease-in-out;-moz-transition:.2s ease-in-out;transition:.2s ease-in-out;position:absolute;top:7px;left:7px;display:block;width:28px;height:28px;border-radius:28px;background-color:#fff}.toggle .handle:before{position:absolute;top:-4px;left:-22px;padding:19px 35px;content:" "}.toggle input:checked+.track .handle{-webkit-transform:translate3d(22px,0,0);-moz-transform:translate3d(22px,0,0);transform:translate3d(22px,0,0);background-color:#fff}.item-toggle{padding-right:99px}.item-toggle.active{box-shadow:none}.item-toggle .toggle{position:absolute;top:7.5px;right:15px;z-index:3}.toggle input:disabled+.track{opacity:.6}.item-radio{padding:0}.item-radio:hover{cursor:pointer}.item-radio .item-content{padding-right:60px}.item-radio .radio-icon{position:absolute;top:0;right:0;z-index:3;visibility:hidden;padding:13px;height:100%;font-size:24px}.item-radio input{position:absolute;left:-9999px}.item-radio input:checked~.item-content{background:#f7f7f7}.item-radio input:checked~.radio-icon{visibility:visible}.item-radio{-webkit-animation:androidCheckedbugfix infinite 1s}@-webkit-keyframes androidCheckedbugfix{from,to{padding:0}}input[type=range]{display:inline-block;overflow:hidden;margin-top:5px;margin-bottom:5px;padding-right:2px;padding-left:1px;width:auto;height:35px;outline:0;background:-webkit-gradient(linear,50% 0,50% 100%,color-stop(0%,#ccc),color-stop(100%,#ccc));background:linear-gradient(to right,#ccc 0,#ccc 100%);background-position:center;background-size:99% 4px;background-repeat:no-repeat;-webkit-appearance:none}input[type=range]::-webkit-slider-thumb{position:relative;width:20px;height:20px;border-radius:10px;background-color:#fff;box-shadow:0 0 2px rgba(0,0,0,.5),1px 3px 5px rgba(0,0,0,.25);cursor:pointer;-webkit-appearance:none}input[type=range]::-webkit-slider-thumb:before{position:absolute;top:8px;left:-2001px;width:2000px;height:4px;background:#444;content:' '}input[type=range]::-webkit-slider-thumb:after{position:absolute;top:-20px;left:-20px;padding:30px;content:' '}.range{display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-moz-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;-webkit-align-items:center;-moz-align-items:center;align-items:center;padding:2px 4px}.range.range-light input::-webkit-slider-thumb:before{background:#ddd}.range.range-stable input::-webkit-slider-thumb:before{background:#b2b2b2}.range.range-positive input::-webkit-slider-thumb:before{background:#4a87ee}.range.range-calm input::-webkit-slider-thumb:before{background:#43cee6}.range.range-balanced input::-webkit-slider-thumb:before{background:#6c3}.range.range-assertive input::-webkit-slider-thumb:before{background:#ef4e3a}.range.range-energized input::-webkit-slider-thumb:before{background:#f0b840}.range.range-royal input::-webkit-slider-thumb:before{background:#8a6de9}.range.range-dark input::-webkit-slider-thumb:before{background:#444}.range .icon{-webkit-box-flex:0;-webkit-flex:0;-moz-box-flex:0;-moz-flex:0;-ms-flex:0;flex:0;display:block;min-width:24px;text-align:center;font-size:24px}.range input{-webkit-box-flex:1;-webkit-flex:1;-moz-box-flex:1;-moz-flex:1;-ms-flex:1;flex:1;display:block;margin-right:10px;margin-left:10px}.range-label{-webkit-box-flex:0;-webkit-flex:0 0 auto;-moz-box-flex:0;-moz-flex:0 0 auto;-ms-flex:0 0 auto;flex:0 0 auto;display:block;white-space:nowrap}.range-label:first-child{padding-left:5px}.range input+.range-label{padding-right:5px;padding-left:0}.button{color:#444;background-color:#f8f8f8;border-color:#b2b2b2;position:relative;display:inline-block;margin:0;padding:1px 12px 0;min-width:52px;min-height:47px;border-width:1px;border-style:solid;border-radius:2px;vertical-align:top;text-align:center;text-overflow:ellipsis;font-size:16px;line-height:42px;cursor:pointer}.button:hover{color:#444;text-decoration:none}.button.active{background-color:#e5e5e5;box-shadow:inset 0 1px 3px rgba(0,0,0,.15);border-color:#a2a2a2}.button:after{position:absolute;top:-6px;right:-8px;bottom:-6px;left:-8px;content:' '}.button .icon{vertical-align:top}.button .icon:before,.button.icon-left:before,.button.icon-right:before,.button.icon:before{display:inline-block;padding:0 0 1px;vertical-align:inherit;font-size:24px;line-height:42px}.button.icon-left:before{float:left;padding-right:.2em;padding-left:0}.button.icon-right:before{float:right;padding-right:0;padding-left:.2em}.button.button-block,.button.button-full{margin-top:10px;margin-bottom:10px}.button.button-light{color:#444;background-color:#fff;border-color:#ddd}.button.button-light:hover{color:#444;text-decoration:none}.button.button-light.active{background-color:#fafafa;box-shadow:inset 0 1px 3px rgba(0,0,0,.15);border-color:#ccc}.button.button-light.button-clear{color:#ddd;background:0 0;border-color:transparent;box-shadow:none}.button.button-light.button-icon{background:0 0;border-color:transparent}.button.button-light.button-outline{background:0 0;border-color:#ddd;color:#ddd}.button.button-light.button-outline.active{background-color:#ddd;color:#fff;box-shadow:none}.button.button-stable{color:#444;background-color:#f8f8f8;border-color:#b2b2b2}.button.button-stable:hover{color:#444;text-decoration:none}.button.button-stable.active{background-color:#e5e5e5;box-shadow:inset 0 1px 3px rgba(0,0,0,.15);border-color:#a2a2a2}.button.button-stable.button-clear{color:#b2b2b2;background:0 0;border-color:transparent;box-shadow:none}.button.button-stable.button-icon{background:0 0;border-color:transparent}.button.button-stable.button-outline{background:0 0;border-color:#b2b2b2;color:#b2b2b2}.button.button-stable.button-outline.active{background-color:#b2b2b2;color:#fff;box-shadow:none}.button.button-positive{color:#fff;background-color:#4a87ee;border-color:#145fd7}.button.button-positive:hover{color:#fff;text-decoration:none}.button.button-positive.active{background-color:#145fd7;box-shadow:inset 0 1px 3px rgba(0,0,0,.15);border-color:#145fd7}.button.button-positive.button-clear{color:#4a87ee;background:0 0;border-color:transparent;box-shadow:none}.button.button-positive.button-icon{background:0 0;border-color:transparent}.button.button-positive.button-outline{background:0 0;border-color:#4a87ee;color:#4a87ee}.button.button-positive.button-outline.active{background-color:#4a87ee;color:#fff;box-shadow:none}.button.button-calm{color:#fff;background-color:#43cee6;border-color:#1aacc3}.button.button-calm:hover{color:#fff;text-decoration:none}.button.button-calm.active{background-color:#1aacc3;box-shadow:inset 0 1px 3px rgba(0,0,0,.15);border-color:#1aacc3}.button.button-calm.button-clear{color:#43cee6;background:0 0;border-color:transparent;box-shadow:none}.button.button-calm.button-icon{background:0 0;border-color:transparent}.button.button-calm.button-outline{background:0 0;border-color:#43cee6;color:#43cee6}.button.button-calm.button-outline.active{background-color:#43cee6;color:#fff;box-shadow:none}.button.button-assertive{color:#fff;background-color:#ef4e3a;border-color:#cc2311}.button.button-assertive:hover{color:#fff;text-decoration:none}.button.button-assertive.active{background-color:#cc2311;box-shadow:inset 0 1px 3px rgba(0,0,0,.15);border-color:#cc2311}.button.button-assertive.button-clear{color:#ef4e3a;background:0 0;border-color:transparent;box-shadow:none}.button.button-assertive.button-icon{background:0 0;border-color:transparent}.button.button-assertive.button-outline{background:0 0;border-color:#ef4e3a;color:#ef4e3a}.button.button-assertive.button-outline.active{background-color:#ef4e3a;color:#fff;box-shadow:none}.button.button-balanced{color:#fff;background-color:#6c3;border-color:#498f24}.button.button-balanced:hover{color:#fff;text-decoration:none}.button.button-balanced.active{background-color:#498f24;box-shadow:inset 0 1px 3px rgba(0,0,0,.15);border-color:#498f24}.button.button-balanced.button-clear{color:#6c3;background:0 0;border-color:transparent;box-shadow:none}.button.button-balanced.button-icon{background:0 0;border-color:transparent}.button.button-balanced.button-outline{background:0 0;border-color:#6c3;color:#6c3}.button.button-balanced.button-outline.active{background-color:#6c3;color:#fff;box-shadow:none}.button.button-energized{color:#fff;background-color:#f0b840;border-color:#d39211}.button.button-energized:hover{color:#fff;text-decoration:none}.button.button-energized.active{background-color:#d39211;box-shadow:inset 0 1px 3px rgba(0,0,0,.15);border-color:#d39211}.button.button-energized.button-clear{color:#f0b840;background:0 0;border-color:transparent;box-shadow:none}.button.button-energized.button-icon{background:0 0;border-color:transparent}.button.button-energized.button-outline{background:0 0;border-color:#f0b840;color:#f0b840}.button.button-energized.button-outline.active{background-color:#f0b840;color:#fff;box-shadow:none}.button.button-royal{color:#fff;background-color:#8a6de9;border-color:#552bdf}.button.button-royal:hover{color:#fff;text-decoration:none}.button.button-royal.active{background-color:#552bdf;box-shadow:inset 0 1px 3px rgba(0,0,0,.15);border-color:#552bdf}.button.button-royal.button-clear{color:#8a6de9;background:0 0;border-color:transparent;box-shadow:none}.button.button-royal.button-icon{background:0 0;border-color:transparent}.button.button-royal.button-outline{background:0 0;border-color:#8a6de9;color:#8a6de9}.button.button-royal.button-outline.active{background-color:#8a6de9;color:#fff;box-shadow:none}.button.button-dark{color:#fff;background-color:#444;border-color:#111}.button.button-dark:hover{color:#fff;text-decoration:none}.button.button-dark.active{background-color:#262626;box-shadow:inset 0 1px 3px rgba(0,0,0,.15);border-color:#000}.button.button-dark.button-clear{color:#444;background:0 0;border-color:transparent;box-shadow:none}.button.button-dark.button-icon{background:0 0;border-color:transparent}.button.button-dark.button-outline{background:0 0;border-color:#444;color:#444}.button.button-dark.button-outline.active{background-color:#444;color:#fff;box-shadow:none}.button-small{padding:0 4px;min-width:28px;min-height:31px;font-size:12px;line-height:28px}.button-small .icon:before,.button-small.icon-left:before,.button-small.icon-right:before,.button-small.icon:before{font-size:16px;line-height:26px}.button-large{padding:0 16px;min-width:68px;min-height:59px;font-size:20px;line-height:53px}.button-large .icon:before,.button-large.icon-left:before,.button-large.icon-right:before,.button-large.icon:before{padding-bottom:2px;font-size:32px;line-height:51px}.button-icon{-webkit-transition:opacity .1s;-moz-transition:opacity .1s;transition:opacity .1s;padding:0 6px;min-width:initial;border-color:transparent;background:0 0}.button-icon.button.active{border-color:transparent;background:0 0;box-shadow:none;opacity:.3}.button-icon .icon:before,.button-icon.icon:before{font-size:32px}.button-clear{-webkit-transition:opacity .1s;-moz-transition:opacity .1s;transition:opacity .1s;padding:0 6px;max-height:42px;border-color:transparent;background:0 0;box-shadow:none}.button-clear.button-clear{color:#b2b2b2;background:0 0;border-color:transparent;box-shadow:none}.button-clear.button-icon{background:0 0;border-color:transparent}.button-clear.active{opacity:.3}.button-outline{-webkit-transition:opacity .1s;-moz-transition:opacity .1s;transition:opacity .1s;background:0 0;box-shadow:none}.button-outline.button-outline{background:0 0;border-color:#b2b2b2;color:#b2b2b2}.button-outline.button-outline.active{background-color:#b2b2b2;color:#fff;box-shadow:none}.padding>.button.button-block:first-child{margin-top:0}.button-block{display:block;clear:both}.button-block:after{clear:both}.button-full,.button-full>.button{display:block;margin-right:0;margin-left:0;border-right-width:0;border-left-width:0;border-radius:0}.button-full>button.button,button.button-block,button.button-full,input.button.button-block{width:100%}a.button{text-decoration:none}.button.disabled,.button[disabled]{opacity:.4;cursor:default!important;pointer-events:none}.button-bar{display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-moz-flex;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-webkit-flex:1;-moz-box-flex:1;-moz-flex:1;-ms-flex:1;flex:1;width:100%}.button-bar.button-bar-inline{display:block;width:auto;*zoom:1}.button-bar.button-bar-inline:after,.button-bar.button-bar-inline:before{display:table;content:"";line-height:0}.button-bar.button-bar-inline:after{clear:both}.button-bar.button-bar-inline>.button{width:auto;display:inline-block;float:left}.button-bar>.button{-webkit-box-flex:1;-webkit-flex:1;-moz-box-flex:1;-moz-flex:1;-ms-flex:1;flex:1;display:block;overflow:hidden;padding:0 16px;width:0;border-width:1px 0 1px 1px;border-radius:0;text-align:center;text-overflow:ellipsis;white-space:nowrap}.button-bar>.button .icon:before,.button-bar>.button:before{line-height:44px}.button-bar>.button:first-child{border-radius:2px 0 0 2px}.button-bar>.button:last-child{border-right-width:1px;border-radius:0 2px 2px 0}@-webkit-keyframes slideInUp{0%{-webkit-transform:translate3d(0,100%,0)}100%{-webkit-transform:translate3d(0,0,0)}}@-moz-keyframes slideInUp{0%{-moz-transform:translate3d(0,100%,0)}100%{-moz-transform:translate3d(0,0,0)}}@keyframes slideInUp{0%{transform:translate3d(0,100%,0)}100%{transform:translate3d(0,0,0)}}@-webkit-keyframes slideOutUp{0%{-webkit-transform:translate3d(0,0,0)}100%{-webkit-transform:translate3d(0,100%,0)}}@-moz-keyframes slideOutUp{0%{-moz-transform:translate3d(0,0,0)}100%{-moz-transform:translate3d(0,100%,0)}}@keyframes slideOutUp{0%{transform:translate3d(0,0,0)}100%{transform:translate3d(0,100%,0)}}@-webkit-keyframes slideInFromLeft{from{-webkit-transform:translate3d(-100%,0,0)}to{-webkit-transform:translate3d(0,0,0)}}@-moz-keyframes slideInFromLeft{from{-moz-transform:translateX(-100%)}to{-moz-transform:translateX(0)}}@keyframes slideInFromLeft{from{transform:translateX(-100%)}to{transform:translateX(0)}}@-webkit-keyframes slideInFromRight{from{-webkit-transform:translate3d(100%,0,0)}to{-webkit-transform:translate3d(0,0,0)}}@-moz-keyframes slideInFromRight{from{-moz-transform:translateX(100%)}to{-moz-transform:translateX(0)}}@keyframes slideInFromRight{from{transform:translateX(100%)}to{transform:translateX(0)}}@-webkit-keyframes slideOutToLeft{from{-webkit-transform:translate3d(0,0,0)}to{-webkit-transform:translate3d(-100%,0,0)}}@-moz-keyframes slideOutToLeft{from{-moz-transform:translateX(0)}to{-moz-transform:translateX(-100%)}}@keyframes slideOutToLeft{from{transform:translateX(0)}to{transform:translateX(-100%)}}@-webkit-keyframes slideOutToRight{from{-webkit-transform:translate3d(0,0,0)}to{-webkit-transform:translate3d(100%,0,0)}}@-moz-keyframes slideOutToRight{from{-moz-transform:translateX(0)}to{-moz-transform:translateX(100%)}}@keyframes slideOutToRight{from{transform:translateX(0)}to{transform:translateX(100%)}}@-webkit-keyframes fadeOut{from{opacity:1}to{opacity:0}}@-moz-keyframes fadeOut{from{opacity:1}to{opacity:0}}@keyframes fadeOut{from{opacity:1}to{opacity:0}}@-webkit-keyframes fadeIn{from{opacity:0}to{opacity:1}}@-moz-keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@-webkit-keyframes fadeInHalf{from{background-color:rgba(0,0,0,0)}to{background-color:rgba(0,0,0,.5)}}@-moz-keyframes fadeInHalf{from{background-color:rgba(0,0,0,0)}to{background-color:rgba(0,0,0,.5)}}@keyframes fadeInHalf{from{background-color:rgba(0,0,0,0)}to{background-color:rgba(0,0,0,.5)}}@-webkit-keyframes fadeOutHalf{from{background-color:rgba(0,0,0,.5)}to{background-color:rgba(0,0,0,0)}}@-moz-keyframes fadeOutHalf{from{background-color:rgba(0,0,0,.5)}to{background-color:rgba(0,0,0,0)}}@keyframes fadeOutHalf{from{background-color:rgba(0,0,0,.5)}to{background-color:rgba(0,0,0,0)}}@-webkit-keyframes scaleOut{from{-webkit-transform:scale(1);opacity:1}to{-webkit-transform:scale(0.8);opacity:0}}@-moz-keyframes scaleOut{from{-moz-transform:scale(1);opacity:1}to{-moz-transform:scale(0.8);opacity:0}}@keyframes scaleOut{from{transform:scale(1);opacity:1}to{transform:scale(0.8);opacity:0}}@-webkit-keyframes scaleIn{from{-webkit-transform:scale(0)}to{-webkit-transform:scale(1)}}@-moz-keyframes scaleIn{from{-moz-transform:scale(0)}to{-moz-transform:scale(1)}}@keyframes scaleIn{from{transform:scale(0)}to{transform:scale(1)}}@-webkit-keyframes superScaleIn{from{-webkit-transform:scale(1.2);opacity:0}to{-webkit-transform:scale(1);opacity:1}}@-moz-keyframes superScaleIn{from{-moz-transform:scale(1.2);opacity:0}to{-moz-transform:scale(1);opacity:1}}@keyframes superScaleIn{from{transform:scale(1.2);opacity:0}to{transform:scale(1);opacity:1}}@-webkit-keyframes spin{100%{-webkit-transform:rotate(360deg)}}@-moz-keyframes spin{100%{-moz-transform:rotate(360deg)}}@keyframes spin{100%{transform:rotate(360deg)}}.no-animation.ng-enter,.no-animation.ng-leave,.no-animation>.ng-enter,.no-animation>.ng-leave{-webkit-transition:none;-moz-transition:none;transition:none}.noop-animation.ng-enter,.noop-animation.ng-leave,.noop-animation>.ng-enter,.noop-animation>.ng-leave{-webkit-transition:all cubic-bezier(0.25,.46,.45,.94) 250ms;-moz-transition:all cubic-bezier(0.25,.46,.45,.94) 250ms;transition:all cubic-bezier(0.25,.46,.45,.94) 250ms;position:absolute;top:0;right:0;bottom:0;left:0}.ng-animate .pane{position:absolute}.slide-left-right.ng-enter,.slide-left-right.ng-leave,.slide-left-right>.ng-enter,.slide-left-right>.ng-leave,.slide-right-left.reverse.ng-enter,.slide-right-left.reverse.ng-leave,.slide-right-left.reverse>.ng-enter,.slide-right-left.reverse>.ng-leave{-webkit-transition:all ease-in-out 250ms;-moz-transition:all ease-in-out 250ms;transition:all ease-in-out 250ms;position:absolute;top:0;right:0;bottom:0;left:0}.slide-left-right.ng-enter,.slide-left-right>.ng-enter,.slide-right-left.reverse.ng-enter,.slide-right-left.reverse>.ng-enter{-webkit-transform:translate3d(100%,0,0);-moz-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}.slide-left-right.ng-enter.ng-enter-active,.slide-left-right>.ng-enter.ng-enter-active,.slide-right-left.reverse.ng-enter.ng-enter-active,.slide-right-left.reverse>.ng-enter.ng-enter-active{-webkit-transform:translate3d(0,0,0);-moz-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.slide-left-right.ng-leave.ng-leave-active,.slide-left-right>.ng-leave.ng-leave-active,.slide-right-left.reverse.ng-leave.ng-leave-active,.slide-right-left.reverse>.ng-leave.ng-leave-active{-webkit-transform:translate3d(-100%,0,0);-moz-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.slide-left-right.reverse.ng-enter,.slide-left-right.reverse.ng-leave,.slide-left-right.reverse>.ng-enter,.slide-left-right.reverse>.ng-leave,.slide-right-left.ng-enter,.slide-right-left.ng-leave,.slide-right-left>.ng-enter,.slide-right-left>.ng-leave{-webkit-transition:all ease-in-out 250ms;-moz-transition:all ease-in-out 250ms;transition:all ease-in-out 250ms;position:absolute;top:0;right:0;bottom:0;left:0}.slide-left-right.reverse.ng-enter,.slide-left-right.reverse>.ng-enter,.slide-right-left.ng-enter,.slide-right-left>.ng-enter{-webkit-transform:translate3d(-100%,0,0);-moz-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.slide-left-right.reverse.ng-enter.ng-enter-active,.slide-left-right.reverse>.ng-enter.ng-enter-active,.slide-right-left.ng-enter.ng-enter-active,.slide-right-left>.ng-enter.ng-enter-active{-webkit-transform:translate3d(0,0,0);-moz-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.slide-left-right.reverse.ng-leave.ng-leave-active,.slide-left-right.reverse>.ng-leave.ng-leave-active,.slide-right-left.ng-leave.ng-leave-active,.slide-right-left>.ng-leave.ng-leave-active{-webkit-transform:translate3d(100%,0,0);-moz-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}.slide-left-right-ios7.ng-enter,.slide-left-right-ios7.ng-leave,.slide-left-right-ios7>.ng-enter,.slide-left-right-ios7>.ng-leave,.slide-right-left-ios7.reverse.ng-enter,.slide-right-left-ios7.reverse.ng-leave,.slide-right-left-ios7.reverse>.ng-enter,.slide-right-left-ios7.reverse>.ng-leave{-webkit-transition:all ease-in-out 250ms;-moz-transition:all ease-in-out 250ms;transition:all ease-in-out 250ms;position:absolute;top:0;right:-1px;bottom:0;left:-1px;width:auto;border-right:1px solid #ddd;border-left:1px solid #ddd}.slide-left-right-ios7.ng-enter,.slide-left-right-ios7>.ng-enter,.slide-right-left-ios7.reverse.ng-enter,.slide-right-left-ios7.reverse>.ng-enter{-webkit-transform:translate3d(100%,0,0);-moz-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}.slide-left-right-ios7.ng-enter.ng-enter-active,.slide-left-right-ios7>.ng-enter.ng-enter-active,.slide-right-left-ios7.reverse.ng-enter.ng-enter-active,.slide-right-left-ios7.reverse>.ng-enter.ng-enter-active{-webkit-transform:translate3d(0,0,0);-moz-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.slide-left-right-ios7.ng-leave.ng-leave-active,.slide-left-right-ios7>.ng-leave.ng-leave-active,.slide-right-left-ios7.reverse.ng-leave.ng-leave-active,.slide-right-left-ios7.reverse>.ng-leave.ng-leave-active{-webkit-transform:translate3d(-15%,0,0);-moz-transform:translate3d(-15%,0,0);transform:translate3d(-15%,0,0)}.slide-left-right-ios7.reverse.ng-enter,.slide-left-right-ios7.reverse.ng-leave,.slide-left-right-ios7.reverse>.ng-enter,.slide-left-right-ios7.reverse>.ng-leave,.slide-right-left-ios7.ng-enter,.slide-right-left-ios7.ng-leave,.slide-right-left-ios7>.ng-enter,.slide-right-left-ios7>.ng-leave{-webkit-transition:all ease-in-out 250ms;-moz-transition:all ease-in-out 250ms;transition:all ease-in-out 250ms;position:absolute;top:0;right:-1px;bottom:0;left:-1px;width:auto;border-right:1px solid #ddd;border-left:1px solid #ddd}.slide-left-right-ios7.reverse.ng-enter,.slide-left-right-ios7.reverse>.ng-enter,.slide-right-left-ios7.ng-enter,.slide-right-left-ios7>.ng-enter{-webkit-transform:translate3d(-100%,0,0);-moz-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.slide-left-right-ios7.reverse.ng-enter.ng-enter-active,.slide-left-right-ios7.reverse>.ng-enter.ng-enter-active,.slide-right-left-ios7.ng-enter.ng-enter-active,.slide-right-left-ios7>.ng-enter.ng-enter-active{-webkit-transform:translate3d(0,0,0);-moz-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.slide-left-right-ios7.reverse.ng-leave.ng-leave-active,.slide-left-right-ios7.reverse>.ng-leave.ng-leave-active,.slide-right-left-ios7.ng-leave.ng-leave-active,.slide-right-left-ios7>.ng-leave.ng-leave-active{-webkit-transform:translate3d(15%,0,0);-moz-transform:translate3d(15%,0,0);transform:translate3d(15%,0,0)}.slide-in-left{-webkit-transform:translate3d(0%,0,0);-moz-transform:translate3d(0%,0,0);transform:translate3d(0%,0,0)}.slide-in-left.ng-enter,.slide-in-left>.ng-enter{-webkit-animation-name:slideInFromLeft;-moz-animation-name:slideInFromLeft;animation-name:slideInFromLeft;-webkit-animation-duration:250ms;-moz-animation-duration:250ms;animation-duration:250ms;-webkit-animation-timing-function:ease-in-out;-moz-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;-webkit-animation-fill-mode:both;-moz-animation-fill-mode:both;animation-fill-mode:both}.slide-in-left.ng-leave,.slide-in-left>.ng-leave{-webkit-animation-name:slideOutToLeft;-moz-animation-name:slideOutToLeft;animation-name:slideOutToLeft;-webkit-animation-duration:250ms;-moz-animation-duration:250ms;animation-duration:250ms;-webkit-animation-timing-function:ease-in-out;-moz-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;-webkit-animation-fill-mode:both;-moz-animation-fill-mode:both;animation-fill-mode:both}.slide-in-left-add{-webkit-transform:translate3d(100%,0,0);-moz-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0);-webkit-animation-duration:250ms;-moz-animation-duration:250ms;animation-duration:250ms;-webkit-animation-timing-function:ease-in-out;-moz-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;-webkit-animation-fill-mode:both;-moz-animation-fill-mode:both;animation-fill-mode:both}.slide-in-left-add-active{-webkit-animation-name:slideInFromLeft;-moz-animation-name:slideInFromLeft;animation-name:slideInFromLeft}.slide-out-left{-webkit-transform:translate3d(-100%,0,0);-moz-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.slide-out-left.ng-enter,.slide-out-left.ng-leave,.slide-out-left>.ng-enter,.slide-out-left>.ng-leave{-webkit-animation-name:slideOutToLeft;-moz-animation-name:slideOutToLeft;animation-name:slideOutToLeft;-webkit-animation-duration:250ms;-moz-animation-duration:250ms;animation-duration:250ms;-webkit-animation-timing-function:ease-in-out;-moz-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;-webkit-animation-fill-mode:both;-moz-animation-fill-mode:both;animation-fill-mode:both}.slide-out-left-add{-webkit-transform:translate3d(0,0,0);-moz-transform:translate3d(0,0,0);transform:translate3d(0,0,0);-webkit-animation-duration:250ms;-moz-animation-duration:250ms;animation-duration:250ms;-webkit-animation-timing-function:ease-in-out;-moz-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;-webkit-animation-fill-mode:both;-moz-animation-fill-mode:both;animation-fill-mode:both}.slide-out-left-add-active{-webkit-animation-name:slideOutToLeft;-moz-animation-name:slideOutToLeft;animation-name:slideOutToLeft}.slide-in-right{-webkit-transform:translate3d(0%,0,0);-moz-transform:translate3d(0%,0,0);transform:translate3d(0%,0,0)}.slide-in-right.ng-enter,.slide-in-right.ng-leave,.slide-in-right>.ng-enter,.slide-in-right>.ng-leave{-webkit-animation-name:slideInFromRight;-moz-animation-name:slideInFromRight;animation-name:slideInFromRight;-webkit-animation-duration:250ms;-moz-animation-duration:250ms;animation-duration:250ms;-webkit-animation-timing-function:ease-in-out;-moz-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;-webkit-animation-fill-mode:both;-moz-animation-fill-mode:both;animation-fill-mode:both}.slide-in-right-add{-webkit-transform:translate3d(-100%,0,0);-moz-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0);-webkit-animation-duration:250ms;-moz-animation-duration:250ms;animation-duration:250ms;-webkit-animation-timing-function:ease-in-out;-moz-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;-webkit-animation-fill-mode:both;-moz-animation-fill-mode:both;animation-fill-mode:both}.slide-in-right-add-active{-webkit-animation-name:slideInFromRight;-moz-animation-name:slideInFromRight;animation-name:slideInFromRight}.slide-out-right{-webkit-transform:translate3d(100%,0,0);-moz-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}.slide-out-right.ng-enter,.slide-out-right.ng-leave,.slide-out-right>.ng-enter,.slide-out-right>.ng-leave{-webkit-animation-name:slideOutToRight;-moz-animation-name:slideOutToRight;animation-name:slideOutToRight;-webkit-animation-duration:250ms;-moz-animation-duration:250ms;animation-duration:250ms;-webkit-animation-timing-function:ease-in-out;-moz-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;-webkit-animation-fill-mode:both;-moz-animation-fill-mode:both;animation-fill-mode:both}.slide-out-right-add{-webkit-transform:translate3d(0,0,0);-moz-transform:translate3d(0,0,0);transform:translate3d(0,0,0);-webkit-animation-duration:250ms;-moz-animation-duration:250ms;animation-duration:250ms;-webkit-animation-timing-function:ease-in-out;-moz-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;-webkit-animation-fill-mode:both;-moz-animation-fill-mode:both;animation-fill-mode:both}.slide-out-right-add-active{-webkit-animation-name:slideOutToRight;-moz-animation-name:slideOutToRight;animation-name:slideOutToRight}.slide-in-up{-webkit-transform:translate3d(0,100%,0);-moz-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}.slide-in-up.ng-enter,.slide-in-up>.ng-enter{-webkit-transition:all cubic-bezier(0.1,.7,.1,1) 400ms;-moz-transition:all cubic-bezier(0.1,.7,.1,1) 400ms;transition:all cubic-bezier(0.1,.7,.1,1) 400ms}.slide-in-up.ng-enter-active,.slide-in-up>.ng-enter-active{-webkit-transform:translate3d(0,0,0);-moz-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.slide-in-up.ng-leave,.slide-in-up>.ng-leave{-webkit-transition:all ease-in-out 250ms;-moz-transition:all ease-in-out 250ms;transition:all ease-in-out 250ms}.fade-in{-webkit-animation:fadeOut .3s;-moz-animation:fadeOut .3s;animation:fadeOut .3s}.fade-in.active{-webkit-animation:fadeIn .3s;-moz-animation:fadeIn .3s;animation:fadeIn .3s}.fade-in-not-out .ng-enter,.fade-in-not-out.ng-enter{-webkit-animation:fadeIn .3s;-moz-animation:fadeIn .3s;animation:fadeIn .3s;position:relative}.fade-in-not-out .ng-leave,.fade-in-not-out.ng-leave{display:none}.nav-title-slide-ios7.ng-enter,.nav-title-slide-ios7.ng-leave,.nav-title-slide-ios7>.ng-enter,.nav-title-slide-ios7>.ng-leave{-webkit-transition:all 250ms;-moz-transition:all 250ms;transition:all 250ms;-webkit-transition-timing-function:ease-in-out;-moz-transition-timing-function:ease-in-out;transition-timing-function:ease-in-out;opacity:1}.nav-title-slide-ios7.ng-enter,.nav-title-slide-ios7>.ng-enter{-webkit-transform:translate3d(30%,0,0);-moz-transform:translate3d(30%,0,0);transform:translate3d(30%,0,0);opacity:0}.nav-title-slide-ios7.ng-enter.ng-enter-active,.nav-title-slide-ios7>.ng-enter.ng-enter-active{-webkit-transform:translate3d(0,0,0);-moz-transform:translate3d(0,0,0);transform:translate3d(0,0,0);opacity:1}.nav-title-slide-ios7.ng-leave.ng-leave-active,.nav-title-slide-ios7>.ng-leave.ng-leave-active{-webkit-transform:translate3d(-30%,0,0);-moz-transform:translate3d(-30%,0,0);transform:translate3d(-30%,0,0);opacity:0}.nav-title-slide-ios7.reverse.ng-enter,.nav-title-slide-ios7.reverse.ng-leave,.nav-title-slide-ios7.reverse>.ng-enter,.nav-title-slide-ios7.reverse>.ng-leave{-webkit-transition:all ease-in-out 250ms;-moz-transition:all ease-in-out 250ms;transition:all ease-in-out 250ms;opacity:1}.nav-title-slide-ios7.reverse.ng-enter,.nav-title-slide-ios7.reverse>.ng-enter{-webkit-transform:translate3d(-30%,0,0);-moz-transform:translate3d(-30%,0,0);transform:translate3d(-30%,0,0);opacity:0}.nav-title-slide-ios7.reverse.ng-enter.ng-enter-active,.nav-title-slide-ios7.reverse>.ng-enter.ng-enter-active{-webkit-transform:translate3d(0,0,0);-moz-transform:translate3d(0,0,0);transform:translate3d(0,0,0);opacity:1}.nav-title-slide-ios7.reverse.ng-leave.ng-leave-active,.nav-title-slide-ios7.reverse>.ng-leave.ng-leave-active{-webkit-transform:translate3d(30%,0,0);-moz-transform:translate3d(30%,0,0);transform:translate3d(30%,0,0);opacity:0}.row{display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-moz-flex;display:-ms-flexbox;display:flex;padding:5px;width:100%}.row+.row{margin-top:-5px;padding-top:0}.col{-webkit-box-flex:1;-webkit-flex:1;-moz-box-flex:1;-moz-flex:1;-ms-flex:1;flex:1;display:block;padding:5px;width:100%}.row-top{-webkit-box-align:start;-ms-flex-align:start;-webkit-align-items:flex-start;-moz-align-items:flex-start;align-items:flex-start}.row-bottom{-webkit-box-align:end;-ms-flex-align:end;-webkit-align-items:flex-end;-moz-align-items:flex-end;align-items:flex-end}.row-center{-webkit-box-align:center;-ms-flex-align:center;-webkit-align-items:center;-moz-align-items:center;align-items:center}.col-top{-webkit-align-self:flex-start;-moz-align-self:flex-start;-ms-flex-item-align:start;align-self:flex-start}.col-bottom{-webkit-align-self:flex-end;-moz-align-self:flex-end;-ms-flex-item-align:end;align-self:flex-end}.col-center{-webkit-align-self:center;-moz-align-self:center;-ms-flex-item-align:center;align-self:center}.col-offset-10{margin-left:10%}.col-offset-20{margin-left:20%}.col-offset-25{margin-left:25%}.col-offset-33,.col-offset-34{margin-left:33.3333%}.col-offset-50{margin-left:50%}.col-offset-66,.col-offset-67{margin-left:66.6666%}.col-offset-75{margin-left:75%}.col-offset-80{margin-left:80%}.col-offset-90{margin-left:90%}.col-10{-webkit-box-flex:0;-webkit-flex:0 0 10%;-moz-box-flex:0;-moz-flex:0 0 10%;-ms-flex:0 0 10%;flex:0 0 10%;max-width:10%}.col-20{-webkit-box-flex:0;-webkit-flex:0 0 20%;-moz-box-flex:0;-moz-flex:0 0 20%;-ms-flex:0 0 20%;flex:0 0 20%;max-width:20%}.col-25{-webkit-box-flex:0;-webkit-flex:0 0 25%;-moz-box-flex:0;-moz-flex:0 0 25%;-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.col-33,.col-34{-webkit-box-flex:0;-webkit-flex:0 0 33.3333%;-moz-box-flex:0;-moz-flex:0 0 33.3333%;-ms-flex:0 0 33.3333%;flex:0 0 33.3333%;max-width:33.3333%}.col-50{-webkit-box-flex:0;-webkit-flex:0 0 50%;-moz-box-flex:0;-moz-flex:0 0 50%;-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.col-66,.col-67{-webkit-box-flex:0;-webkit-flex:0 0 66.6666%;-moz-box-flex:0;-moz-flex:0 0 66.6666%;-ms-flex:0 0 66.6666%;flex:0 0 66.6666%;max-width:66.6666%}.col-75{-webkit-box-flex:0;-webkit-flex:0 0 75%;-moz-box-flex:0;-moz-flex:0 0 75%;-ms-flex:0 0 75%;flex:0 0 75%;max-width:75%}.col-80{-webkit-box-flex:0;-webkit-flex:0 0 80%;-moz-box-flex:0;-moz-flex:0 0 80%;-ms-flex:0 0 80%;flex:0 0 80%;max-width:80%}.col-90{-webkit-box-flex:0;-webkit-flex:0 0 90%;-moz-box-flex:0;-moz-flex:0 0 90%;-ms-flex:0 0 90%;flex:0 0 90%;max-width:90%}@media (max-width:567px){.responsive-sm{-webkit-box-direction:normal;-moz-box-direction:normal;-webkit-box-orient:vertical;-moz-box-orient:vertical;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column}.responsive-sm .col{width:100%;margin-bottom:15px}}@media (max-width:767px){.responsive-md{-webkit-box-direction:normal;-moz-box-direction:normal;-webkit-box-orient:vertical;-moz-box-orient:vertical;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column}.responsive-md .col{width:100%;margin-bottom:15px}}@media (max-width:1023px){.responsive-lg{-webkit-box-direction:normal;-moz-box-direction:normal;-webkit-box-orient:vertical;-moz-box-orient:vertical;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column}.responsive-lg .col{width:100%;margin-bottom:15px}}.hide{display:none}.opacity-hide{opacity:0}.grade-b .opacity-hide,.grade-c .opacity-hide{opacity:1;display:none}.show{display:block}.opacity-show{opacity:1}.invisible{visibility:hidden}.hide-footer .bar-footer,.hide-footer .tabs{display:none}.hide-footer .has-footer,.hide-footer .has-tabs{bottom:0}.inline{display:inline-block}.disable-pointer-events{pointer-events:none}.enable-pointer-events{pointer-events:auto}.disable-user-behavior{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-touch-callout:none;-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-tap-highlight-color:transparent;-webkit-user-drag:none;-ms-touch-action:none;-ms-content-zooming:none}.block{display:block;clear:both}.block:after{display:block;visibility:hidden;clear:both;height:0;content:"."}.full-image{width:100%}.clearfix{*zoom:1}.clearfix:after,.clearfix:before{display:table;content:"";line-height:0}.clearfix:after{clear:both}.padding{padding:10px}.padding-top,.padding-vertical{padding-top:10px}.padding-horizontal,.padding-right{padding-right:10px}.padding-bottom,.padding-vertical{padding-bottom:10px}.padding-horizontal,.padding-left{padding-left:10px}.rounded{border-radius:4px}.light,a.light{color:#fff}.light-bg{background-color:#fff}.light-border{border-color:#ddd}.stable,a.stable{color:#f8f8f8}.stable-bg{background-color:#f8f8f8}.stable-border{border-color:#b2b2b2}.positive,a.positive{color:#4a87ee}.positive-bg{background-color:#4a87ee}.positive-border{border-color:#145fd7}.calm,a.calm{color:#43cee6}.calm-bg{background-color:#43cee6}.calm-border{border-color:#1aacc3}.assertive,a.assertive{color:#ef4e3a}.assertive-bg{background-color:#ef4e3a}.assertive-border{border-color:#cc2311}.balanced,a.balanced{color:#6c3}.balanced-bg{background-color:#6c3}.balanced-border{border-color:#498f24}.energized,a.energized{color:#f0b840}.energized-bg{background-color:#f0b840}.energized-border{border-color:#d39211}.royal,a.royal{color:#8a6de9}.royal-bg{background-color:#8a6de9}.royal-border{border-color:#552bdf}.dark,a.dark{color:#444}.dark-bg{background-color:#444}.dark-border{border-color:#111}.platform-ios7.platform-cordova:not(.fullscreen) .bar-header{height:64px}.platform-ios7.platform-cordova:not(.fullscreen) .bar-header.item-input-inset .item-input-wrapper{margin-top:19px!important}.platform-ios7.platform-cordova:not(.fullscreen) .bar-header>*{margin-top:20px}.platform-ios7.platform-cordova:not(.fullscreen) .bar-subheader,.platform-ios7.platform-cordova:not(.fullscreen) .has-header{top:64px}.platform-ios7.platform-cordova:not(.fullscreen) .has-subheader{top:108px}.platform-ios7.status-bar-hide{margin-bottom:20px}.platform-android.platform-cordova .bar-header{height:48px}.platform-android.platform-cordova .bar-subheader,.platform-android.platform-cordova .has-header{top:48px}.platform-android.platform-cordova .has-subheader{top:96px}.platform-android.platform-cordova .title{line-height:48px} | chinakids/cdnjs | ajax/libs/ionic/0.9.27/css/ionic.min.css | CSS | mit | 122,755 |
// enquire.js v2.0.0 - Awesome Media Queries in JavaScript
// Copyright (c) 2013 Nick Williams - http://wicky.nillia.ms/enquire.js
// License: MIT (http://www.opensource.org/licenses/mit-license.php)
window.enquire = (function(matchMedia) {
'use strict';
/*jshint -W098 */
/**
* Helper function for iterating over a collection
*
* @param collection
* @param fn
*/
function each(collection, fn) {
var i = 0,
length = collection.length,
cont;
for(i; i < length; i++) {
cont = fn(collection[i], i);
if(cont === false) {
break; //allow early exit
}
}
}
/**
* Helper function for determining whether target object is an array
*
* @param target the object under test
* @return {Boolean} true if array, false otherwise
*/
function isArray(target) {
return Object.prototype.toString.apply(target) === '[object Array]';
}
/**
* Helper function for determining whether target object is a function
*
* @param target the object under test
* @return {Boolean} true if function, false otherwise
*/
function isFunction(target) {
return typeof target === 'function';
}
/**
* Delegate to handle a media query being matched and unmatched.
*
* @param {object} options
* @param {function} options.match callback for when the media query is matched
* @param {function} [options.unmatch] callback for when the media query is unmatched
* @param {function} [options.setup] one-time callback triggered the first time a query is matched
* @param {boolean} [options.deferSetup=false] should the setup callback be run immediately, rather than first time query is matched?
* @constructor
*/
function QueryHandler(options) {
this.options = options;
!options.deferSetup && this.setup();
}
QueryHandler.prototype = {
/**
* coordinates setup of the handler
*
* @function
*/
setup : function() {
if(this.options.setup) {
this.options.setup();
}
this.initialised = true;
},
/**
* coordinates setup and triggering of the handler
*
* @function
*/
on : function() {
!this.initialised && this.setup();
this.options.match && this.options.match();
},
/**
* coordinates the unmatch event for the handler
*
* @function
*/
off : function() {
this.options.unmatch && this.options.unmatch();
},
/**
* called when a handler is to be destroyed.
* delegates to the destroy or unmatch callbacks, depending on availability.
*
* @function
*/
destroy : function() {
this.options.destroy ? this.options.destroy() : this.off();
},
/**
* determines equality by reference.
* if object is supplied compare options, if function, compare match callback
*
* @function
* @param {object || function} [target] the target for comparison
*/
equals : function(target) {
return this.options === target || this.options.match === target;
}
};
/**
* Represents a single media query, manages it's state and registered handlers for this query
*
* @constructor
* @param {string} query the media query string
* @param {boolean} [isUnconditional=false] whether the media query should run regardless of whether the conditions are met. Primarily for helping older browsers deal with mobile-first design
*/
function MediaQuery(query, isUnconditional) {
this.query = query;
this.isUnconditional = isUnconditional;
this.handlers = [];
this.mql = matchMedia(query);
var self = this;
this.listener = function(mql) {
self.mql = mql;
self.assess();
};
this.mql.addListener(this.listener);
}
MediaQuery.prototype = {
/**
* add a handler for this query, triggering if already active
*
* @function
* @param {object} handler
* @param {function} handler.match callback for when query is activated
* @param {function} [handler.unmatch] callback for when query is deactivated
* @param {function} [handler.setup] callback for immediate execution when a query handler is registered
* @param {boolean} [handler.deferSetup=false] should the setup callback be deferred until the first time the handler is matched?
*/
addHandler : function(handler) {
var qh = new QueryHandler(handler);
this.handlers.push(qh);
this.mql.matches && qh.on();
},
/**
* removes the given handler from the collection, and calls it's destroy methods
*
* @function
* @param {object || function} handler the handler to remove
*/
removeHandler : function(handler) {
var handlers = this.handlers;
each(handlers, function(h, i) {
if(h.equals(handler)) {
h.destroy();
return !handlers.splice(i,1); //remove from array and exit each early
}
});
},
clear : function() {
each(this.handlers, function(handler) {
handler.destroy();
});
this.mql.removeListener(this.listener);
this.handlers.length = 0; //clear array
},
/*
* assesses the query, turning on all handlers if it matches, turning them off if it doesn't match
*
* @function
*/
assess : function() {
var action = (this.mql.matches || this.isUnconditional) ? 'on' : 'off';
each(this.handlers, function(handler) {
handler[action]();
});
}
};
/**
* Allows for registration of query handlers.
* Manages the query handler's state and is responsible for wiring up browser events
*
* @constructor
*/
function MediaQueryDispatch () {
if(!matchMedia) {
throw new Error('matchMedia not present, legacy browsers require a polyfill');
}
this.queries = {};
this.browserIsIncapable = !matchMedia('only all').matches;
}
MediaQueryDispatch.prototype = {
/**
* Registers a handler for the given media query
*
* @function
* @param {string} q the media query
* @param {object || Array || Function} options either a single query handler object, a function, or an array of query handlers
* @param {function} options.match fired when query matched
* @param {function} [options.unmatch] fired when a query is no longer matched
* @param {function} [options.setup] fired when handler first triggered
* @param {boolean} [options.deferSetup=false] whether setup should be run immediately or deferred until query is first matched
* @param {boolean} [shouldDegrade=false] whether this particular media query should always run on incapable browsers
*/
register : function(q, options, shouldDegrade) {
var queries = this.queries,
isUnconditional = shouldDegrade && this.browserIsIncapable;
if(!queries[q]) {
queries[q] = new MediaQuery(q, isUnconditional);
}
//normalise to object in an array
if(isFunction(options)) {
options = { match : options };
}
if(!isArray(options)) {
options = [options];
}
each(options, function(handler) {
queries[q].addHandler(handler);
});
return this;
},
/**
* unregisters a query and all it's handlers, or a specific handler for a query
*
* @function
* @param {string} q the media query to target
* @param {object || function} [handler] specific handler to unregister
*/
unregister : function(q, handler) {
var query = this.queries[q];
if(query) {
if(handler) {
query.removeHandler(handler);
}
else {
query.clear();
delete this.queries[q];
}
}
return this;
}
};
return new MediaQueryDispatch();
}(window.matchMedia)); | deanius/cdnjs | ajax/libs/enquire.js/2.0.0/enquire.js | JavaScript | mit | 8,593 |
/* ========================================================================
* bootstrap-switch - v3.0.2
* http://www.bootstrap-switch.org
* ========================================================================
* Copyright 2012-2013 Mattia Larentis
*
* ========================================================================
* 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.
* ========================================================================
*/
.bootstrap-switch {
display: inline-block;
cursor: pointer;
border-radius: 4px;
border: 1px solid;
border-color: #cccccc;
position: relative;
text-align: left;
overflow: hidden;
line-height: 8px;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
vertical-align: middle;
min-width: 100px;
-webkit-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
}
.bootstrap-switch.bootstrap-switch-mini {
min-width: 71px;
}
.bootstrap-switch.bootstrap-switch-mini .bootstrap-switch-handle-on,
.bootstrap-switch.bootstrap-switch-mini .bootstrap-switch-handle-off,
.bootstrap-switch.bootstrap-switch-mini .bootstrap-switch-label {
padding-bottom: 4px;
padding-top: 4px;
font-size: 10px;
line-height: 9px;
}
.bootstrap-switch.bootstrap-switch-small {
min-width: 79px;
}
.bootstrap-switch.bootstrap-switch-small .bootstrap-switch-handle-on,
.bootstrap-switch.bootstrap-switch-small .bootstrap-switch-handle-off,
.bootstrap-switch.bootstrap-switch-small .bootstrap-switch-label {
padding-bottom: 3px;
padding-top: 3px;
font-size: 12px;
line-height: 18px;
}
.bootstrap-switch.bootstrap-switch-large {
min-width: 120px;
}
.bootstrap-switch.bootstrap-switch-large .bootstrap-switch-handle-on,
.bootstrap-switch.bootstrap-switch-large .bootstrap-switch-handle-off,
.bootstrap-switch.bootstrap-switch-large .bootstrap-switch-label {
padding-bottom: 9px;
padding-top: 9px;
font-size: 16px;
line-height: normal;
}
.bootstrap-switch.bootstrap-switch-animate .bootstrap-switch-container {
-webkit-transition: margin-left 0.5s;
transition: margin-left 0.5s;
}
.bootstrap-switch.bootstrap-switch-on .bootstrap-switch-container {
margin-left: 0%;
}
.bootstrap-switch.bootstrap-switch-on .bootstrap-switch-label {
border-bottom-right-radius: 3px;
border-top-right-radius: 3px;
}
.bootstrap-switch.bootstrap-switch-off .bootstrap-switch-container {
margin-left: -50%;
}
.bootstrap-switch.bootstrap-switch-off .bootstrap-switch-label {
border-bottom-left-radius: 3px;
border-top-left-radius: 3px;
}
.bootstrap-switch.bootstrap-switch-indeterminate .bootstrap-switch-container {
margin-left: -25%;
}
.bootstrap-switch.bootstrap-switch-disabled,
.bootstrap-switch.bootstrap-switch-readonly,
.bootstrap-switch.bootstrap-switch-indeterminate {
opacity: 0.5;
filter: alpha(opacity=50);
cursor: default !important;
}
.bootstrap-switch.bootstrap-switch-disabled .bootstrap-switch-handle-on,
.bootstrap-switch.bootstrap-switch-readonly .bootstrap-switch-handle-on,
.bootstrap-switch.bootstrap-switch-indeterminate .bootstrap-switch-handle-on,
.bootstrap-switch.bootstrap-switch-disabled .bootstrap-switch-handle-off,
.bootstrap-switch.bootstrap-switch-readonly .bootstrap-switch-handle-off,
.bootstrap-switch.bootstrap-switch-indeterminate .bootstrap-switch-handle-off,
.bootstrap-switch.bootstrap-switch-disabled .bootstrap-switch-label,
.bootstrap-switch.bootstrap-switch-readonly .bootstrap-switch-label,
.bootstrap-switch.bootstrap-switch-indeterminate .bootstrap-switch-label {
cursor: default !important;
}
.bootstrap-switch.bootstrap-switch-focused {
border-color: #66afe9;
outline: 0;
-webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);
box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);
}
.bootstrap-switch .bootstrap-switch-container {
display: inline-block;
width: 150%;
top: 0;
border-radius: 4px;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
.bootstrap-switch .bootstrap-switch-handle-on,
.bootstrap-switch .bootstrap-switch-handle-off,
.bootstrap-switch .bootstrap-switch-label {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
cursor: pointer;
display: inline-block !important;
height: 100%;
padding-bottom: 4px;
padding-top: 4px;
font-size: 14px;
line-height: 20px;
}
.bootstrap-switch .bootstrap-switch-handle-on,
.bootstrap-switch .bootstrap-switch-handle-off {
text-align: center;
z-index: 1;
width: 33.333333333%;
}
.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-primary,
.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-primary {
color: #fff;
background: #428bca;
}
.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-info,
.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-info {
color: #fff;
background: #5bc0de;
}
.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-success,
.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-success {
color: #fff;
background: #5cb85c;
}
.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-warning,
.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-warning {
background: #f0ad4e;
color: #fff;
}
.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-danger,
.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-danger {
color: #fff;
background: #d9534f;
}
.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-default,
.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-default {
color: #000;
background: #eeeeee;
}
.bootstrap-switch .bootstrap-switch-handle-on {
border-bottom-left-radius: 3px;
border-top-left-radius: 3px;
}
.bootstrap-switch .bootstrap-switch-handle-off {
border-bottom-right-radius: 3px;
border-top-right-radius: 3px;
}
.bootstrap-switch .bootstrap-switch-label {
text-align: center;
margin-top: -1px;
margin-bottom: -1px;
z-index: 100;
width: 33.333333333%;
color: #333333;
background: #ffffff;
}
.bootstrap-switch input[type='radio'],
.bootstrap-switch input[type='checkbox'] {
position: absolute !important;
top: 0;
left: 0;
opacity: 0;
filter: alpha(opacity=0);
z-index: -1;
}
.bootstrap-switch input[type='radio'].form-control,
.bootstrap-switch input[type='checkbox'].form-control {
height: auto;
}
| timnew/cdnjs | ajax/libs/bootstrap-switch/3.0.2/css/bootstrap3/bootstrap-switch.css | CSS | mit | 7,023 |
<?php
/*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* This software consists of voluntary contributions made by many individuals
* and is licensed under the MIT license. For more information, see
* <http://www.doctrine-project.org>.
*/
namespace Doctrine\Common\Annotations;
/**
* Interface for annotation readers.
*
* @author Johannes M. Schmitt <schmittjoh@gmail.com>
*/
interface Reader
{
/**
* Gets the annotations applied to a class.
*
* @param \ReflectionClass $class The ReflectionClass of the class from which
* the class annotations should be read.
*
* @return array An array of Annotations.
*/
function getClassAnnotations(\ReflectionClass $class);
/**
* Gets a class annotation.
*
* @param \ReflectionClass $class The ReflectionClass of the class from which
* the class annotations should be read.
* @param string $annotationName The name of the annotation.
*
* @return object|null The Annotation or NULL, if the requested annotation does not exist.
*/
function getClassAnnotation(\ReflectionClass $class, $annotationName);
/**
* Gets the annotations applied to a method.
*
* @param \ReflectionMethod $method The ReflectionMethod of the method from which
* the annotations should be read.
*
* @return array An array of Annotations.
*/
function getMethodAnnotations(\ReflectionMethod $method);
/**
* Gets a method annotation.
*
* @param \ReflectionMethod $method The ReflectionMethod to read the annotations from.
* @param string $annotationName The name of the annotation.
*
* @return object|null The Annotation or NULL, if the requested annotation does not exist.
*/
function getMethodAnnotation(\ReflectionMethod $method, $annotationName);
/**
* Gets the annotations applied to a property.
*
* @param \ReflectionProperty $property The ReflectionProperty of the property
* from which the annotations should be read.
*
* @return array An array of Annotations.
*/
function getPropertyAnnotations(\ReflectionProperty $property);
/**
* Gets a property annotation.
*
* @param \ReflectionProperty $property The ReflectionProperty to read the annotations from.
* @param string $annotationName The name of the annotation.
*
* @return object|null The Annotation or NULL, if the requested annotation does not exist.
*/
function getPropertyAnnotation(\ReflectionProperty $property, $annotationName);
}
| jeremie38/tpphp | vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Reader.php | PHP | mit | 3,527 |
/* Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.*/
(function(a){var b={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},c=b[typeof window]&&window||this,d=b[typeof exports]&&exports&&!exports.nodeType&&exports,e=b[typeof module]&&module&&!module.nodeType&&module,f=(e&&e.exports===d&&d,b[typeof global]&&global);!f||f.global!==f&&f.window!==f||(c=f),"function"==typeof define&&define.amd?define(["rx"],function(b,d){return a(c,d,b)}):"object"==typeof module&&module&&module.exports===d?module.exports=a(c,module.exports,require("./rx")):c.Rx=a(c,{},c.Rx)}).call(this,function(a,b,c,d){function e(a,b){return a.groupJoin(this,b,o,function(a,b){return b})}function f(a){var b=this;return new q(function(c){var d=new m,e=new i,f=new j(e);return c.onNext(r(d,f)),e.add(b.subscribe(function(a){d.onNext(a)},function(a){d.onError(a),c.onError(a)},function(){d.onCompleted(),c.onCompleted()})),v(a)&&(a=w(a)),e.add(a.subscribe(function(){d.onCompleted(),d=new m,c.onNext(r(d,f))},function(a){d.onError(a),c.onError(a)},function(){d.onCompleted(),c.onCompleted()})),f})}function g(a){var b=this;return new q(function(c){function d(){var b;try{b=a()}catch(f){return void c.onError(f)}v(b)&&(b=w(b));var i=new k;e.setDisposable(i),i.setDisposable(b.take(1).subscribe(t,function(a){h.onError(a),c.onError(a)},function(){h.onCompleted(),h=new m,c.onNext(r(h,g)),d()}))}var e=new l,f=new i(e),g=new j(f),h=new m;return c.onNext(r(h,g)),f.add(b.subscribe(function(a){h.onNext(a)},function(a){h.onError(a),c.onError(a)},function(){h.onCompleted(),c.onCompleted()})),d(),g})}var h=c.Observable,i=c.CompositeDisposable,j=c.RefCountDisposable,k=c.SingleAssignmentDisposable,l=c.SerialDisposable,m=c.Subject,n=h.prototype,o=h.empty,p=h.never,q=c.AnonymousObservable,r=(c.Observer.create,c.internals.addRef),s=c.internals.isEqual,t=c.helpers.noop,u=c.helpers.identity,v=c.helpers.isPromise,w=h.fromPromise,x=function(){function a(a){if(a&!1)return 2===a;for(var b=Math.sqrt(a),c=3;b>=c;){if(a%c===0)return!1;c+=2}return!0}function b(b){var c,d,e;for(c=0;c<h.length;++c)if(d=h[c],d>=b)return d;for(e=1|b;e<h[h.length-1];){if(a(e))return e;e+=2}return b}function c(a){var b=757602046;if(!a.length)return b;for(var c=0,d=a.length;d>c;c++){var e=a.charCodeAt(c);b=(b<<5)-b+e,b&=b}return b}function e(a){var b=668265261;return a=61^a^a>>>16,a+=a<<3,a^=a>>>4,a*=b,a^=a>>>15}function f(){return{key:null,value:null,next:0,hashCode:0}}function g(a,b){if(0>a)throw new Error("out of range");a>0&&this._initialize(a),this.comparer=b||s,this.freeCount=0,this.size=0,this.freeList=-1}var h=[1,3,7,13,31,61,127,251,509,1021,2039,4093,8191,16381,32749,65521,131071,262139,524287,1048573,2097143,4194301,8388593,16777213,33554393,67108859,134217689,268435399,536870909,1073741789,2147483647],i="no such key",j="duplicate key",k=function(){var a=0;return function(b){if(null==b)throw new Error(i);if("string"==typeof b)return c(b);if("number"==typeof b)return e(b);if("boolean"==typeof b)return b===!0?1:0;if(b instanceof Date)return e(b.valueOf());if(b instanceof RegExp)return c(b.toString());if("function"==typeof b.valueOf){var d=b.valueOf();if("number"==typeof d)return e(d);if("string"==typeof b)return c(d)}if(b.getHashCode)return b.getHashCode();var f=17*a++;return b.getHashCode=function(){return f},f}}(),l=g.prototype;return l._initialize=function(a){var c,d=b(a);for(this.buckets=new Array(d),this.entries=new Array(d),c=0;d>c;c++)this.buckets[c]=-1,this.entries[c]=f();this.freeList=-1},l.add=function(a,b){return this._insert(a,b,!0)},l._insert=function(a,b,c){this.buckets||this._initialize(0);for(var d,e=2147483647&k(a),f=e%this.buckets.length,g=this.buckets[f];g>=0;g=this.entries[g].next)if(this.entries[g].hashCode===e&&this.comparer(this.entries[g].key,a)){if(c)throw new Error(j);return void(this.entries[g].value=b)}this.freeCount>0?(d=this.freeList,this.freeList=this.entries[d].next,--this.freeCount):(this.size===this.entries.length&&(this._resize(),f=e%this.buckets.length),d=this.size,++this.size),this.entries[d].hashCode=e,this.entries[d].next=this.buckets[f],this.entries[d].key=a,this.entries[d].value=b,this.buckets[f]=d},l._resize=function(){var a=b(2*this.size),c=new Array(a);for(e=0;e<c.length;++e)c[e]=-1;var d=new Array(a);for(e=0;e<this.size;++e)d[e]=this.entries[e];for(var e=this.size;a>e;++e)d[e]=f();for(var g=0;g<this.size;++g){var h=d[g].hashCode%a;d[g].next=c[h],c[h]=g}this.buckets=c,this.entries=d},l.remove=function(a){if(this.buckets)for(var b=2147483647&k(a),c=b%this.buckets.length,d=-1,e=this.buckets[c];e>=0;e=this.entries[e].next){if(this.entries[e].hashCode===b&&this.comparer(this.entries[e].key,a))return 0>d?this.buckets[c]=this.entries[e].next:this.entries[d].next=this.entries[e].next,this.entries[e].hashCode=-1,this.entries[e].next=this.freeList,this.entries[e].key=null,this.entries[e].value=null,this.freeList=e,++this.freeCount,!0;d=e}return!1},l.clear=function(){var a,b;if(!(this.size<=0)){for(a=0,b=this.buckets.length;b>a;++a)this.buckets[a]=-1;for(a=0;a<this.size;++a)this.entries[a]=f();this.freeList=-1,this.size=0}},l._findEntry=function(a){if(this.buckets)for(var b=2147483647&k(a),c=this.buckets[b%this.buckets.length];c>=0;c=this.entries[c].next)if(this.entries[c].hashCode===b&&this.comparer(this.entries[c].key,a))return c;return-1},l.count=function(){return this.size-this.freeCount},l.tryGetValue=function(a){var b=this._findEntry(a);return b>=0?this.entries[b].value:d},l.getValues=function(){var a=0,b=[];if(this.entries)for(var c=0;c<this.size;c++)this.entries[c].hashCode>=0&&(b[a++]=this.entries[c].value);return b},l.get=function(a){var b=this._findEntry(a);if(b>=0)return this.entries[b].value;throw new Error(i)},l.set=function(a,b){this._insert(a,b,!1)},l.containskey=function(a){return this._findEntry(a)>=0},g}();n.join=function(a,b,c,d){var e=this;return new q(function(f){var g=new i,h=!1,j=!1,l=0,m=0,n=new x,o=new x;return g.add(e.subscribe(function(a){var c=l++,e=new k;n.add(c,a),g.add(e);var i,j=function(){n.remove(c)&&0===n.count()&&h&&f.onCompleted(),g.remove(e)};try{i=b(a)}catch(m){return void f.onError(m)}e.setDisposable(i.take(1).subscribe(t,f.onError.bind(f),j)),o.getValues().forEach(function(b){var c;try{c=d(a,b)}catch(e){return void f.onError(e)}f.onNext(c)})},f.onError.bind(f),function(){h=!0,(j||0===n.count())&&f.onCompleted()})),g.add(a.subscribe(function(a){var b=m++,e=new k;o.add(b,a),g.add(e);var h,i=function(){o.remove(b)&&0===o.count()&&j&&f.onCompleted(),g.remove(e)};try{h=c(a)}catch(l){return void f.onError(l)}e.setDisposable(h.take(1).subscribe(t,f.onError.bind(f),i)),n.getValues().forEach(function(b){var c;try{c=d(b,a)}catch(e){return void f.onError(e)}f.onNext(c)})},f.onError.bind(f),function(){j=!0,(h||0===o.count())&&f.onCompleted()})),g})},n.groupJoin=function(a,b,c,d){var e=this;return new q(function(f){function g(a){return function(b){b.onError(a)}}var h=new i,l=new j(h),n=new x,o=new x,p=0,q=0;return h.add(e.subscribe(function(a){var c=new m,e=p++;n.add(e,c);var i;try{i=d(a,r(c,l))}catch(j){return n.getValues().forEach(g(j)),void f.onError(j)}f.onNext(i),o.getValues().forEach(function(a){c.onNext(a)});var q=new k;h.add(q);var s,u=function(){n.remove(e)&&c.onCompleted(),h.remove(q)};try{s=b(a)}catch(j){return n.getValues().forEach(g(j)),void f.onError(j)}q.setDisposable(s.take(1).subscribe(t,function(a){n.getValues().forEach(g(a)),f.onError(a)},u))},function(a){n.getValues().forEach(g(a)),f.onError(a)},f.onCompleted.bind(f))),h.add(a.subscribe(function(a){var b=q++;o.add(b,a);var d=new k;h.add(d);var e,i=function(){o.remove(b),h.remove(d)};try{e=c(a)}catch(j){return n.getValues().forEach(g(j)),void f.onError(j)}d.setDisposable(e.take(1).subscribe(t,function(a){n.getValues().forEach(g(a)),f.onError(a)},i)),n.getValues().forEach(function(b){b.onNext(a)})},function(a){n.getValues().forEach(g(a)),f.onError(a)})),l})},n.buffer=function(){return this.window.apply(this,arguments).selectMany(function(a){return a.toArray()})},n.window=function(a,b){return 1===arguments.length&&"function"!=typeof arguments[0]?f.call(this,a):"function"==typeof a?g.call(this,a):e.call(this,a,b)},n.pairwise=function(){var a=this;return new q(function(b){var c,d=!1;return a.subscribe(function(a){d?b.onNext([c,a]):d=!0,c=a},b.onError.bind(b),b.onCompleted.bind(b))})},n.partition=function(a,b){var c=this.publish().refCount();return[c.filter(a,b),c.filter(function(c,d,e){return!a.call(b,c,d,e)})]},n.groupBy=function(a,b,c){return this.groupByUntil(a,b,p,c)},n.groupByUntil=function(a,b,c,d){var e=this;return b||(b=u),d||(d=s),new q(function(f){function g(a){return function(b){b.onError(a)}}var h=new x(0,d),l=new i,n=new j(l);return l.add(e.subscribe(function(d){var e;try{e=a(d)}catch(i){return h.getValues().forEach(g(i)),void f.onError(i)}var j=!1,o=h.tryGetValue(e);if(o||(o=new m,h.set(e,o),j=!0),j){var p=new y(e,o,n),q=new y(e,o);try{duration=c(q)}catch(i){return h.getValues().forEach(g(i)),void f.onError(i)}f.onNext(p);var r=new k;l.add(r);var s=function(){h.remove(e)&&o.onCompleted(),l.remove(r)};r.setDisposable(duration.take(1).subscribe(t,function(a){h.getValues().forEach(g(a)),f.onError(a)},s))}var u;try{u=b(d)}catch(i){return h.getValues().forEach(g(i)),void f.onError(i)}o.onNext(u)},function(a){h.getValues().forEach(g(a)),f.onError(a)},function(){h.getValues().forEach(function(a){a.onCompleted()}),f.onCompleted()})),n})};var y=function(a){function b(a){return this.underlyingObservable.subscribe(a)}function c(c,d,e){a.call(this,b),this.key=c,this.underlyingObservable=e?new q(function(a){return new i(e.getDisposable(),d.subscribe(a))}):d}return inherits(c,a),c}(h);return c});
//# sourceMappingURL=rx.coincidence.map | perdona/cdnjs | ajax/libs/rxjs/2.3.17/rx.coincidence.min.js | JavaScript | mit | 9,755 |
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Transforms;
using osu.Game.Modes.Objects.Drawables;
using osu.Game.Modes.Osu.Objects.Drawables.Pieces;
using OpenTK;
namespace osu.Game.Modes.Osu.Objects.Drawables
{
public class DrawableHitCircle : DrawableOsuHitObject, IDrawableHitObjectWithProxiedApproach
{
private OsuHitObject osuObject;
public ApproachCircle ApproachCircle;
private CirclePiece circle;
private RingPiece ring;
private FlashPiece flash;
private ExplodePiece explode;
private NumberPiece number;
private GlowPiece glow;
public DrawableHitCircle(OsuHitObject h) : base(h)
{
Origin = Anchor.Centre;
osuObject = h;
Position = osuObject.StackedPosition;
Scale = new Vector2(osuObject.Scale);
Children = new Drawable[]
{
glow = new GlowPiece
{
Colour = osuObject.Colour
},
circle = new CirclePiece
{
Colour = osuObject.Colour,
Hit = () =>
{
if (Judgement.Result.HasValue) return false;
((PositionalJudgementInfo)Judgement).PositionOffset = Vector2.Zero; //todo: set to correct value
UpdateJudgement(true);
return true;
},
},
number = new NumberPiece()
{
Text = h is Spinner ? "S" : (HitObject.ComboIndex + 1).ToString(),
},
ring = new RingPiece(),
flash = new FlashPiece(),
explode = new ExplodePiece
{
Colour = osuObject.Colour,
},
ApproachCircle = new ApproachCircle()
{
Colour = osuObject.Colour,
}
};
//may not be so correct
Size = circle.DrawSize;
}
double hit50 = 150;
double hit100 = 80;
double hit300 = 30;
protected override void CheckJudgement(bool userTriggered)
{
if (!userTriggered)
{
if (Judgement.TimeOffset > hit50)
Judgement.Result = HitResult.Miss;
return;
}
double hitOffset = Math.Abs(Judgement.TimeOffset);
OsuJudgementInfo osuJudgement = Judgement as OsuJudgementInfo;
if (hitOffset < hit50)
{
Judgement.Result = HitResult.Hit;
if (hitOffset < hit300)
osuJudgement.Score = OsuScoreResult.Hit300;
else if (hitOffset < hit100)
osuJudgement.Score = OsuScoreResult.Hit100;
else if (hitOffset < hit50)
osuJudgement.Score = OsuScoreResult.Hit50;
}
else
Judgement.Result = HitResult.Miss;
}
protected override void UpdateInitialState()
{
base.UpdateInitialState();
//sane defaults
ring.Alpha = circle.Alpha = number.Alpha = glow.Alpha = 1;
ApproachCircle.Alpha = 0;
ApproachCircle.Scale = new Vector2(4);
explode.Alpha = 0;
}
protected override void UpdatePreemptState()
{
base.UpdatePreemptState();
ApproachCircle.FadeIn(Math.Min(TIME_FADEIN * 2, TIME_PREEMPT));
ApproachCircle.ScaleTo(1.1f, TIME_PREEMPT);
}
protected override void UpdateState(ArmedState state)
{
if (!IsLoaded) return;
base.UpdateState(state);
ApproachCircle.FadeOut();
glow.Delay(osuObject.Duration);
glow.FadeOut(400);
switch (state)
{
case ArmedState.Idle:
Delay(osuObject.Duration + TIME_PREEMPT);
FadeOut(TIME_FADEOUT);
break;
case ArmedState.Miss:
FadeOut(TIME_FADEOUT / 5);
break;
case ArmedState.Hit:
const double flash_in = 40;
flash.FadeTo(0.8f, flash_in);
flash.Delay(flash_in);
flash.FadeOut(100);
explode.FadeIn(flash_in);
Delay(flash_in, true);
//after the flash, we can hide some elements that were behind it
ring.FadeOut();
circle.FadeOut();
number.FadeOut();
FadeOut(800);
ScaleTo(Scale * 1.5f, 400, EasingTypes.OutQuad);
break;
}
}
public Drawable ProxiedLayer => ApproachCircle;
}
}
| NotKyon/lolisu | osu.Game.Modes.Osu/Objects/Drawables/DrawableHitCircle.cs | C# | mit | 5,352 |
'use strict';
/**
* Module dependencies.
*/
var mongoose = require('mongoose'),
Schema = mongoose.Schema;
/**
* Article Schema
*/
var SubdivisionCategoriesSchema = new Schema({
alpha2Code: {
type: String,
required: true,
trim: true
},
alpha3Code: {
type: String,
required: true,
trim: true
},
numericCode: {
type: String,
required: true,
trim: true
},
categoryId: {
type: String,
required: true,
trim: true
},
language: {
type: String,
required: true,
trim: true
},
languageAlpha3Code: {
type: String,
required: true,
trim: true
},
categoryName: {
type: String,
required: true,
trim: true
},
categoryNamePlural: {
type: String,
required: true,
trim: true
}
});
/**
* Validations
*/
SubdivisionCategoriesSchema.path('alpha2Code').validate(function(alpha2Code) {
return alpha2Code.length === 2;
}, 'Alpha2code length must be 2');
SubdivisionCategoriesSchema.path('alpha3Code').validate(function(alpha3Code) {
return alpha3Code.length === 3;
}, 'Alpha3code length must be 3');
SubdivisionCategoriesSchema.path('numericCode').validate(function(numericCode) {
return numericCode.length === 3;
}, 'NmericCode length must be 3');
SubdivisionCategoriesSchema.path('languageAlpha3Code').validate(function(languageAlpha3Code) {
return languageAlpha3Code.length === 3;
}, 'NmericCode length must be 3');
/**
* Statics
*/
SubdivisionCategoriesSchema.statics.load = function(id, cb) {
this.findOne({
_id: id
}).exec(cb);
};
mongoose.model('Subdivision_categories', SubdivisionCategoriesSchema);
| SistCoopEE/mean | packages/custom/iso3166/server/models/subdivision_categories.js | JavaScript | mit | 1,791 |
package enterprise_test
import (
"context"
"fmt"
"reflect"
"testing"
"github.com/influxdata/influxdb/v2/chronograf"
"github.com/influxdata/influxdb/v2/chronograf/enterprise"
)
func TestClient_Add(t *testing.T) {
type fields struct {
Ctrl *mockCtrl
Logger chronograf.Logger
}
type args struct {
ctx context.Context
u *chronograf.User
}
tests := []struct {
name string
fields fields
args args
want *chronograf.User
wantErr bool
}{
{
name: "Successful Create User",
fields: fields{
Ctrl: &mockCtrl{
createUser: func(ctx context.Context, name, passwd string) error {
return nil
},
setUserPerms: func(ctx context.Context, name string, perms enterprise.Permissions) error {
return nil
},
user: func(ctx context.Context, name string) (*enterprise.User, error) {
return &enterprise.User{
Name: "marty",
Password: "johnny be good",
Permissions: map[string][]string{
"": {
"ViewChronograf",
"ReadData",
"WriteData",
},
},
}, nil
},
userRoles: func(ctx context.Context) (map[string]enterprise.Roles, error) {
return map[string]enterprise.Roles{}, nil
},
},
},
args: args{
ctx: context.Background(),
u: &chronograf.User{
Name: "marty",
Passwd: "johnny be good",
},
},
want: &chronograf.User{
Name: "marty",
Permissions: chronograf.Permissions{
{
Scope: chronograf.AllScope,
Allowed: chronograf.Allowances{"ViewChronograf", "ReadData", "WriteData"},
},
},
Roles: []chronograf.Role{},
},
},
{
name: "Successful Create User with roles",
fields: fields{
Ctrl: &mockCtrl{
createUser: func(ctx context.Context, name, passwd string) error {
return nil
},
setUserPerms: func(ctx context.Context, name string, perms enterprise.Permissions) error {
return nil
},
user: func(ctx context.Context, name string) (*enterprise.User, error) {
return &enterprise.User{
Name: "marty",
Password: "johnny be good",
Permissions: map[string][]string{
"": {
"ViewChronograf",
"ReadData",
"WriteData",
},
},
}, nil
},
userRoles: func(ctx context.Context) (map[string]enterprise.Roles, error) {
return map[string]enterprise.Roles{
"marty": enterprise.Roles{
Roles: []enterprise.Role{
{
Name: "admin",
},
},
},
}, nil
},
addRoleUsers: func(ctx context.Context, name string, users []string) error {
return nil
},
},
},
args: args{
ctx: context.Background(),
u: &chronograf.User{
Name: "marty",
Passwd: "johnny be good",
Roles: []chronograf.Role{
{
Name: "admin",
},
},
},
},
want: &chronograf.User{
Name: "marty",
Permissions: chronograf.Permissions{
{
Scope: chronograf.AllScope,
Allowed: chronograf.Allowances{"ViewChronograf", "ReadData", "WriteData"},
},
},
Roles: []chronograf.Role{
{
Name: "admin",
Users: []chronograf.User{},
Permissions: chronograf.Permissions{},
},
},
},
},
{
name: "Failure to Create User",
fields: fields{
Ctrl: &mockCtrl{
createUser: func(ctx context.Context, name, passwd string) error {
return fmt.Errorf("1.21 Gigawatts! Tom, how could I have been so careless?")
},
},
},
args: args{
ctx: context.Background(),
u: &chronograf.User{
Name: "marty",
Passwd: "johnny be good",
},
},
wantErr: true,
},
}
for _, tt := range tests {
c := &enterprise.UserStore{
Ctrl: tt.fields.Ctrl,
Logger: tt.fields.Logger,
}
got, err := c.Add(tt.args.ctx, tt.args.u)
if (err != nil) != tt.wantErr {
t.Errorf("%q. Client.Add() error = %v, wantErr %v", tt.name, err, tt.wantErr)
continue
}
if !reflect.DeepEqual(got, tt.want) {
t.Errorf("%q. Client.Add() = \n%#v\n, want \n%#v\n", tt.name, got, tt.want)
}
}
}
func TestClient_Delete(t *testing.T) {
type fields struct {
Ctrl *mockCtrl
Logger chronograf.Logger
}
type args struct {
ctx context.Context
u *chronograf.User
}
tests := []struct {
name string
fields fields
args args
wantErr bool
}{
{
name: "Successful Delete User",
fields: fields{
Ctrl: &mockCtrl{
deleteUser: func(ctx context.Context, name string) error {
return nil
},
},
},
args: args{
ctx: context.Background(),
u: &chronograf.User{
Name: "marty",
Passwd: "johnny be good",
},
},
},
{
name: "Failure to Delete User",
fields: fields{
Ctrl: &mockCtrl{
deleteUser: func(ctx context.Context, name string) error {
return fmt.Errorf("1.21 Gigawatts! Tom, how could I have been so careless?")
},
},
},
args: args{
ctx: context.Background(),
u: &chronograf.User{
Name: "marty",
Passwd: "johnny be good",
},
},
wantErr: true,
},
}
for _, tt := range tests {
c := &enterprise.UserStore{
Ctrl: tt.fields.Ctrl,
Logger: tt.fields.Logger,
}
if err := c.Delete(tt.args.ctx, tt.args.u); (err != nil) != tt.wantErr {
t.Errorf("%q. Client.Delete() error = %v, wantErr %v", tt.name, err, tt.wantErr)
}
}
}
func TestClient_Get(t *testing.T) {
type fields struct {
Ctrl *mockCtrl
Logger chronograf.Logger
}
type args struct {
ctx context.Context
name string
}
tests := []struct {
name string
fields fields
args args
want *chronograf.User
wantErr bool
}{
{
name: "Successful Get User",
fields: fields{
Ctrl: &mockCtrl{
user: func(ctx context.Context, name string) (*enterprise.User, error) {
return &enterprise.User{
Name: "marty",
Password: "johnny be good",
Permissions: map[string][]string{
"": {
"ViewChronograf",
"ReadData",
"WriteData",
},
},
}, nil
},
userRoles: func(ctx context.Context) (map[string]enterprise.Roles, error) {
return map[string]enterprise.Roles{}, nil
},
},
},
args: args{
ctx: context.Background(),
name: "marty",
},
want: &chronograf.User{
Name: "marty",
Permissions: chronograf.Permissions{
{
Scope: chronograf.AllScope,
Allowed: chronograf.Allowances{"ViewChronograf", "ReadData", "WriteData"},
},
},
Roles: []chronograf.Role{},
},
},
{
name: "Successful Get User with roles",
fields: fields{
Ctrl: &mockCtrl{
user: func(ctx context.Context, name string) (*enterprise.User, error) {
return &enterprise.User{
Name: "marty",
Password: "johnny be good",
Permissions: map[string][]string{
"": {
"ViewChronograf",
"ReadData",
"WriteData",
},
},
}, nil
},
userRoles: func(ctx context.Context) (map[string]enterprise.Roles, error) {
return map[string]enterprise.Roles{
"marty": enterprise.Roles{
Roles: []enterprise.Role{
{
Name: "timetravels",
Permissions: map[string][]string{
"": {
"ViewChronograf",
"ReadData",
"WriteData",
},
},
Users: []string{"marty", "docbrown"},
},
},
},
}, nil
},
},
},
args: args{
ctx: context.Background(),
name: "marty",
},
want: &chronograf.User{
Name: "marty",
Permissions: chronograf.Permissions{
{
Scope: chronograf.AllScope,
Allowed: chronograf.Allowances{"ViewChronograf", "ReadData", "WriteData"},
},
},
Roles: []chronograf.Role{
{
Name: "timetravels",
Permissions: chronograf.Permissions{
{
Scope: chronograf.AllScope,
Allowed: chronograf.Allowances{"ViewChronograf", "ReadData", "WriteData"},
},
},
Users: []chronograf.User{},
},
},
},
},
{
name: "Failure to get User",
fields: fields{
Ctrl: &mockCtrl{
user: func(ctx context.Context, name string) (*enterprise.User, error) {
return nil, fmt.Errorf("1.21 Gigawatts! Tom, how could I have been so careless?")
},
},
},
args: args{
ctx: context.Background(),
name: "marty",
},
wantErr: true,
},
}
for _, tt := range tests {
c := &enterprise.UserStore{
Ctrl: tt.fields.Ctrl,
Logger: tt.fields.Logger,
}
got, err := c.Get(tt.args.ctx, chronograf.UserQuery{Name: &tt.args.name})
if (err != nil) != tt.wantErr {
t.Errorf("%q. Client.Get() error = %v, wantErr %v", tt.name, err, tt.wantErr)
continue
}
if !reflect.DeepEqual(got, tt.want) {
t.Errorf("%q. Client.Get() = %v, want %v", tt.name, got, tt.want)
}
}
}
func TestClient_Update(t *testing.T) {
type fields struct {
Ctrl *mockCtrl
Logger chronograf.Logger
}
type args struct {
ctx context.Context
u *chronograf.User
}
tests := []struct {
name string
fields fields
args args
wantErr bool
}{
{
name: "Successful Change Password",
fields: fields{
Ctrl: &mockCtrl{
changePassword: func(ctx context.Context, name, passwd string) error {
return nil
},
},
},
args: args{
ctx: context.Background(),
u: &chronograf.User{
Name: "marty",
Passwd: "johnny be good",
},
},
},
{
name: "Failure to Change Password",
fields: fields{
Ctrl: &mockCtrl{
changePassword: func(ctx context.Context, name, passwd string) error {
return fmt.Errorf("ronald Reagan, the actor?! Ha Then who’s Vice President Jerry Lewis? I suppose Jane Wyman is First Lady")
},
},
},
args: args{
ctx: context.Background(),
u: &chronograf.User{
Name: "marty",
Passwd: "johnny be good",
},
},
wantErr: true,
},
{
name: "Success setting permissions User",
fields: fields{
Ctrl: &mockCtrl{
setUserPerms: func(ctx context.Context, name string, perms enterprise.Permissions) error {
return nil
},
userRoles: func(ctx context.Context) (map[string]enterprise.Roles, error) {
return map[string]enterprise.Roles{}, nil
},
},
},
args: args{
ctx: context.Background(),
u: &chronograf.User{
Name: "marty",
Permissions: chronograf.Permissions{
{
Scope: chronograf.AllScope,
Allowed: chronograf.Allowances{"ViewChronograf", "KapacitorAPI"},
},
},
},
},
wantErr: false,
},
{
name: "Success setting permissions and roles for user",
fields: fields{
Ctrl: &mockCtrl{
setUserPerms: func(ctx context.Context, name string, perms enterprise.Permissions) error {
return nil
},
addRoleUsers: func(ctx context.Context, name string, users []string) error {
return nil
},
userRoles: func(ctx context.Context) (map[string]enterprise.Roles, error) {
return map[string]enterprise.Roles{}, nil
},
},
},
args: args{
ctx: context.Background(),
u: &chronograf.User{
Name: "marty",
Permissions: chronograf.Permissions{
{
Scope: chronograf.AllScope,
Allowed: chronograf.Allowances{"ViewChronograf", "KapacitorAPI"},
},
},
Roles: []chronograf.Role{
{
Name: "adminrole",
},
},
},
},
wantErr: false,
},
{
name: "Failure setting permissions User",
fields: fields{
Ctrl: &mockCtrl{
setUserPerms: func(ctx context.Context, name string, perms enterprise.Permissions) error {
return fmt.Errorf("they found me, I don't know how, but they found me.")
},
userRoles: func(ctx context.Context) (map[string]enterprise.Roles, error) {
return map[string]enterprise.Roles{}, nil
},
},
},
args: args{
ctx: context.Background(),
u: &chronograf.User{
Name: "marty",
Permissions: chronograf.Permissions{
{
Scope: chronograf.AllScope,
Allowed: chronograf.Allowances{"ViewChronograf", "KapacitorAPI"},
},
},
},
},
wantErr: true,
},
}
for _, tt := range tests {
c := &enterprise.UserStore{
Ctrl: tt.fields.Ctrl,
Logger: tt.fields.Logger,
}
if err := c.Update(tt.args.ctx, tt.args.u); (err != nil) != tt.wantErr {
t.Errorf("%q. Client.Update() error = %v, wantErr %v", tt.name, err, tt.wantErr)
}
}
}
func TestClient_Num(t *testing.T) {
type fields struct {
Ctrl *mockCtrl
Logger chronograf.Logger
}
type args struct {
ctx context.Context
}
tests := []struct {
name string
fields fields
args args
want []chronograf.User
wantErr bool
}{
{
name: "Successful Get User",
fields: fields{
Ctrl: &mockCtrl{
users: func(ctx context.Context, name *string) (*enterprise.Users, error) {
return &enterprise.Users{
Users: []enterprise.User{
{
Name: "marty",
Password: "johnny be good",
Permissions: map[string][]string{
"": {
"ViewChronograf",
"ReadData",
"WriteData",
},
},
},
},
}, nil
},
userRoles: func(ctx context.Context) (map[string]enterprise.Roles, error) {
return map[string]enterprise.Roles{}, nil
},
},
},
args: args{
ctx: context.Background(),
},
want: []chronograf.User{
{
Name: "marty",
Permissions: chronograf.Permissions{
{
Scope: chronograf.AllScope,
Allowed: chronograf.Allowances{"ViewChronograf", "ReadData", "WriteData"},
},
},
Roles: []chronograf.Role{},
},
},
},
{
name: "Failure to get User",
fields: fields{
Ctrl: &mockCtrl{
users: func(ctx context.Context, name *string) (*enterprise.Users, error) {
return nil, fmt.Errorf("1.21 Gigawatts! Tom, how could I have been so careless?")
},
},
},
args: args{
ctx: context.Background(),
},
wantErr: true,
},
}
for _, tt := range tests {
c := &enterprise.UserStore{
Ctrl: tt.fields.Ctrl,
Logger: tt.fields.Logger,
}
got, err := c.Num(tt.args.ctx)
if (err != nil) != tt.wantErr {
t.Errorf("%q. Client.Num() error = %v, wantErr %v", tt.name, err, tt.wantErr)
continue
}
if got != len(tt.want) {
t.Errorf("%q. Client.Num() = %v, want %v", tt.name, got, len(tt.want))
}
}
}
func TestClient_All(t *testing.T) {
type fields struct {
Ctrl *mockCtrl
Logger chronograf.Logger
}
type args struct {
ctx context.Context
}
tests := []struct {
name string
fields fields
args args
want []chronograf.User
wantErr bool
}{
{
name: "Successful Get User",
fields: fields{
Ctrl: &mockCtrl{
users: func(ctx context.Context, name *string) (*enterprise.Users, error) {
return &enterprise.Users{
Users: []enterprise.User{
{
Name: "marty",
Password: "johnny be good",
Permissions: map[string][]string{
"": {
"ViewChronograf",
"ReadData",
"WriteData",
},
},
},
},
}, nil
},
userRoles: func(ctx context.Context) (map[string]enterprise.Roles, error) {
return map[string]enterprise.Roles{}, nil
},
},
},
args: args{
ctx: context.Background(),
},
want: []chronograf.User{
{
Name: "marty",
Permissions: chronograf.Permissions{
{
Scope: chronograf.AllScope,
Allowed: chronograf.Allowances{"ViewChronograf", "ReadData", "WriteData"},
},
},
Roles: []chronograf.Role{},
},
},
},
{
name: "Failure to get User",
fields: fields{
Ctrl: &mockCtrl{
users: func(ctx context.Context, name *string) (*enterprise.Users, error) {
return nil, fmt.Errorf("1.21 Gigawatts! Tom, how could I have been so careless?")
},
},
},
args: args{
ctx: context.Background(),
},
wantErr: true,
},
}
for _, tt := range tests {
c := &enterprise.UserStore{
Ctrl: tt.fields.Ctrl,
Logger: tt.fields.Logger,
}
got, err := c.All(tt.args.ctx)
if (err != nil) != tt.wantErr {
t.Errorf("%q. Client.All() error = %v, wantErr %v", tt.name, err, tt.wantErr)
continue
}
if !reflect.DeepEqual(got, tt.want) {
t.Errorf("%q. Client.All() = %v, want %v", tt.name, got, tt.want)
}
}
}
func Test_ToEnterprise(t *testing.T) {
tests := []struct {
name string
perms chronograf.Permissions
want enterprise.Permissions
}{
{
name: "All Scopes",
want: enterprise.Permissions{"": []string{"ViewChronograf", "KapacitorAPI"}},
perms: chronograf.Permissions{
{
Scope: chronograf.AllScope,
Allowed: chronograf.Allowances{"ViewChronograf", "KapacitorAPI"},
},
},
},
{
name: "DB Scope",
want: enterprise.Permissions{"telegraf": []string{"ReadData", "WriteData"}},
perms: chronograf.Permissions{
{
Scope: chronograf.DBScope,
Name: "telegraf",
Allowed: chronograf.Allowances{"ReadData", "WriteData"},
},
},
},
}
for _, tt := range tests {
if got := enterprise.ToEnterprise(tt.perms); !reflect.DeepEqual(got, tt.want) {
t.Errorf("%q. ToEnterprise() = %v, want %v", tt.name, got, tt.want)
}
}
}
func Test_ToChronograf(t *testing.T) {
tests := []struct {
name string
perms enterprise.Permissions
want chronograf.Permissions
}{
{
name: "All Scopes",
perms: enterprise.Permissions{"": []string{"ViewChronograf", "KapacitorAPI"}},
want: chronograf.Permissions{
{
Scope: chronograf.AllScope,
Allowed: chronograf.Allowances{"ViewChronograf", "KapacitorAPI"},
},
},
},
{
name: "DB Scope",
perms: enterprise.Permissions{"telegraf": []string{"ReadData", "WriteData"}},
want: chronograf.Permissions{
{
Scope: chronograf.DBScope,
Name: "telegraf",
Allowed: chronograf.Allowances{"ReadData", "WriteData"},
},
},
},
}
for _, tt := range tests {
if got := enterprise.ToChronograf(tt.perms); !reflect.DeepEqual(got, tt.want) {
t.Errorf("%q. toChronograf() = %v, want %v", tt.name, got, tt.want)
}
}
}
type mockCtrl struct {
showCluster func(ctx context.Context) (*enterprise.Cluster, error)
user func(ctx context.Context, name string) (*enterprise.User, error)
createUser func(ctx context.Context, name, passwd string) error
deleteUser func(ctx context.Context, name string) error
changePassword func(ctx context.Context, name, passwd string) error
users func(ctx context.Context, name *string) (*enterprise.Users, error)
setUserPerms func(ctx context.Context, name string, perms enterprise.Permissions) error
userRoles func(ctx context.Context) (map[string]enterprise.Roles, error)
roles func(ctx context.Context, name *string) (*enterprise.Roles, error)
role func(ctx context.Context, name string) (*enterprise.Role, error)
createRole func(ctx context.Context, name string) error
deleteRole func(ctx context.Context, name string) error
setRolePerms func(ctx context.Context, name string, perms enterprise.Permissions) error
setRoleUsers func(ctx context.Context, name string, users []string) error
addRoleUsers func(ctx context.Context, name string, users []string) error
removeRoleUsers func(ctx context.Context, name string, users []string) error
}
func (m *mockCtrl) ShowCluster(ctx context.Context) (*enterprise.Cluster, error) {
return m.showCluster(ctx)
}
func (m *mockCtrl) User(ctx context.Context, name string) (*enterprise.User, error) {
return m.user(ctx, name)
}
func (m *mockCtrl) CreateUser(ctx context.Context, name, passwd string) error {
return m.createUser(ctx, name, passwd)
}
func (m *mockCtrl) DeleteUser(ctx context.Context, name string) error {
return m.deleteUser(ctx, name)
}
func (m *mockCtrl) ChangePassword(ctx context.Context, name, passwd string) error {
return m.changePassword(ctx, name, passwd)
}
func (m *mockCtrl) Users(ctx context.Context, name *string) (*enterprise.Users, error) {
return m.users(ctx, name)
}
func (m *mockCtrl) SetUserPerms(ctx context.Context, name string, perms enterprise.Permissions) error {
return m.setUserPerms(ctx, name, perms)
}
func (m *mockCtrl) UserRoles(ctx context.Context) (map[string]enterprise.Roles, error) {
return m.userRoles(ctx)
}
func (m *mockCtrl) Roles(ctx context.Context, name *string) (*enterprise.Roles, error) {
return m.roles(ctx, name)
}
func (m *mockCtrl) Role(ctx context.Context, name string) (*enterprise.Role, error) {
return m.role(ctx, name)
}
func (m *mockCtrl) CreateRole(ctx context.Context, name string) error {
return m.createRole(ctx, name)
}
func (m *mockCtrl) DeleteRole(ctx context.Context, name string) error {
return m.deleteRole(ctx, name)
}
func (m *mockCtrl) SetRolePerms(ctx context.Context, name string, perms enterprise.Permissions) error {
return m.setRolePerms(ctx, name, perms)
}
func (m *mockCtrl) SetRoleUsers(ctx context.Context, name string, users []string) error {
return m.setRoleUsers(ctx, name, users)
}
func (m *mockCtrl) AddRoleUsers(ctx context.Context, name string, users []string) error {
return m.addRoleUsers(ctx, name, users)
}
func (m *mockCtrl) RemoveRoleUsers(ctx context.Context, name string, users []string) error {
return m.removeRoleUsers(ctx, name, users)
}
| nooproblem/influxdb | chronograf/enterprise/users_test.go | GO | mit | 21,638 |
#editor {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
background: #000000;
font-size: 22px;
}
/* Re-usable, generic rules */
.hidden {
display: none !important;
}
.vbox {
display: flex;
display: -webkit-flex;
display: -ms-flexbox;
flex-direction: column;
-webkit-flex-direction: column;
-ms-flex-direction: column;
}
.hbox {
display: flex;
display: -webkit-flex;
display: -ms-flexbox;
}
.flex1 {
flex: 1;
-webkit-flex: 1;
-ms-flex: 1;
}
.flex3 {
flex: 3;
-webkit-flex: 3;
-ms-flex: 3;
}
/* Whole page layout */
body {
margin: 0;
padding: 0;
overflow: hidden;
}
body, input {
font-family: "Segoe UI Light", "Segoe UI", "Segoe WP Light", "Segoe WP",
"HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", sans-serif;
font-size: 1rem;
}
#main {
margin: 0;
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
overflow: hidden;
background: #F2F2F2;
}
#editor {
position: relative;
margin: 0;
}
/* Script info box */
#script-box {
margin-right: 1rem;
margin-left: auto;
}
#script-name {
font-size: 2rem;
color: #1a354c;
overflow: hidden;
max-height: 90px;
}
#script-description {
color: #336699;
padding-bottom: 0.2rem;
overflow: hidden;
max-height: 22px;
}
#script-icons > *:not(:first-child) {
display: inline-block;
cursor: pointer;
}
.zoomer,
.saved-state {
cursor: pointer !important;
}
#script-icons {
width: 54px;
min-width: 54px;
}
#script-icons .status-icon {
width: 2rem;
height: 2rem;
border: 6px solid #FFCC33;
border-radius: 50%;
margin: .2rem;
text-align: center;
font-size: 1.3rem;
line-height: 2.1rem;
padding: .1em;
font-family: "Segoe UI Emoji", "Segoe UI Symbol", "Symbola", sans-serif;
color: #336699;
background: #FFFFFF;
}
#script-icons .holder {
width: 54px;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-flex-direction: column;
-ms-flex-direction: column;
flex-direction: column;
color: #336699;
text-decoration: none;
background-image: url("../img/triangle.svg");
background-size: 100%;
background-repeat: no-repeat;
text-align: center;
padding: 0px;
}
#script-icons .holder:focus, #script-icons #holder:active {
background-image: url("../img/triangle2.svg");
}
/* Popups */
.popup {
width: 500px;
border: 5px solid #666;
position: relative;
background-color: white;
z-index: 999;
}
.popup::after {
content: "";
display: block;
width: 0;
position: absolute;
top: -20px;
right: 10px;
border-style: solid;
border-width: 0 20px 20px;
border-color: #666 transparent;
}
.popup-inner {
padding: 1rem;
}
#popup-edit input {
border: 0;
}
/* Toolbox and commands */
#merge-commands {
margin-left: 3em;
}
#merge-commands > * {
cursor: pointer;
}
#merge-commands > .label {
color: #a40000;
font-weight: bold;
}
#commands {
min-width: 567px;
}
#commands a {
text-align: center;
padding-left: 0.75em;
padding-right: 0.75em;
}
#toolbox {
}
#log {
overflow: auto;
width: 500px;
max-height: 500px;
}
.status {
white-space: pre-wrap;
}
.status:first-letter {
font-family: "Segoe UI Emoji", "Segoe UI Symbol", "Symbola", sans-serif;
}
.status:not(:first-letter) {
font-weight: bold;
}
.status.error {
color: #a40000;
}
.status:not(.error) {
color: #4e9a06;
}
/* Buttons */
.roundbutton {
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-flex-direction: column;
-ms-flex-direction: column;
flex-direction: column;
color: #336699;
text-decoration: none;
background-image: url("../img/triangle.svg");
background-size: 100%;
background-repeat: no-repeat;
min-width: 90px;
}
.roundsymbol {
width: 4rem;
height: 4rem;
border: 6px solid #FFCC33;
border-radius: 50%;
margin: .2rem;
margin-bottom: 0;
text-align: center;
font-size: 2.6rem;
line-height: 4.4rem;
padding: .1em;
font-family: "Segoe UI Emoji", "Segoe UI Symbol", "Symbola", sans-serif;
color: #336699;
background: #FFFFFF;
}
.roundbutton:focus, .roundbutton:active {
background-image: url("../img/triangle2.svg");
}
.roundlabel {
padding-top: .3rem;
padding-bottom: .3rem;
font-size: 80%;
text-align: center;
color: #336699;
}
body:not(.hasFota) .fota {
display: none;
}
body.hasFota .notfota {
display: none;
}
/* Misc */
a.command, a.command:visited {
color: black;
font-weight: bold;
text-decoration: none;
}
a.command:hover {
text-decoration: underline;
}
/* Some overrides for narrow displays */
@media (max-width: 890px) {
.roundbutton {
display: inline;
padding: 0.75em;
min-width: 48px;
}
#script-icons {
display: none;
}
.roundsymbol {
width: 2rem;
height: 2rem;
line-height: 2.05rem;
font-size: 1.3rem;
margin: 0;
}
.roundlabel {
padding-top: 0;
display: none;
}
.roundbutton > * {
/*display: inline-block;*/
}
#script-name {
font-size: 1.2rem;
font-weight: bold;
max-height: 50px;
}
.blocklyTreeRow {
padding-right: .3em !important;
}
.blocklyTreeIcon {
width: 6px !important;
}
.blocklyTreeLabel {
font-size: 12px !important;
}
#commands {
min-width: 289px;
}
}
@media (max-width: 480px) {
#toolbox {
flex-direction: column;
-ms-flex-direction: column;
}
#script-box {
margin-right: 1rem;
margin-left: 1rem;
text-align: left;
width: 100%;
}
}
.snippet-selection:hover {
background: #FFCC33;
cursor: pointer;
}
.snippet-table {
width: 100%;
}
.snippet-table th {
text-align: left;
padding-right: 48px;
}
.snippet-table td {
border-bottom: 1px dotted #CCC;
}
.snippet-name {
display: none;
}
| ben-dent/PythonEditor | static/css/style.css | CSS | mit | 5,787 |
using System;
using BigMath;
using NUnit.Framework;
using Raksha.Crypto;
using Raksha.Crypto.Agreement;
using Raksha.Crypto.Digests;
using Raksha.Crypto.Encodings;
using Raksha.Crypto.Engines;
using Raksha.Crypto.Generators;
using Raksha.Crypto.Macs;
using Raksha.Crypto.Modes;
using Raksha.Crypto.Paddings;
using Raksha.Crypto.Parameters;
using Raksha.Crypto.Signers;
using Raksha.Math;
using Raksha.Math.EC;
using Raksha.Security;
using Raksha.Utilities.Encoders;
using Raksha.Tests.Utilities;
namespace Raksha.Tests.Crypto
{
/// <remarks>Test for ECIES - Elliptic Curve Integrated Encryption Scheme</remarks>
[TestFixture]
public class EcIesTest
: SimpleTest
{
public EcIesTest()
{
}
public override string Name
{
get { return "ECIES"; }
}
private void StaticTest()
{
FpCurve curve = new FpCurve(
new BigInteger("6277101735386680763835789423207666416083908700390324961279"), // q
new BigInteger("fffffffffffffffffffffffffffffffefffffffffffffffc", 16), // a
new BigInteger("64210519e59c80e70fa7e9ab72243049feb8deecc146b9b1", 16)); // b
ECDomainParameters parameters = new ECDomainParameters(
curve,
curve.DecodePoint(Hex.Decode("03188da80eb03090f67cbf20eb43a18800f4ff0afd82ff1012")), // G
new BigInteger("6277101735386680763835789423176059013767194773182842284081")); // n
ECPrivateKeyParameters priKey = new ECPrivateKeyParameters(
"ECDH",
new BigInteger("651056770906015076056810763456358567190100156695615665659"), // d
parameters);
ECPublicKeyParameters pubKey = new ECPublicKeyParameters(
"ECDH",
curve.DecodePoint(Hex.Decode("0262b12d60690cdcf330babab6e69763b471f994dd702d16a5")), // Q
parameters);
AsymmetricCipherKeyPair p1 = new AsymmetricCipherKeyPair(pubKey, priKey);
AsymmetricCipherKeyPair p2 = new AsymmetricCipherKeyPair(pubKey, priKey);
//
// stream test
//
IesEngine i1 = new IesEngine(
new ECDHBasicAgreement(),
new Kdf2BytesGenerator(new Sha1Digest()),
new HMac(new Sha1Digest()));
IesEngine i2 = new IesEngine(
new ECDHBasicAgreement(),
new Kdf2BytesGenerator(new Sha1Digest()),
new HMac(new Sha1Digest()));
byte[] d = new byte[] { 1, 2, 3, 4, 5, 6, 7, 8 };
byte[] e = new byte[] { 8, 7, 6, 5, 4, 3, 2, 1 };
IesParameters p = new IesParameters(d, e, 64);
i1.Init(true, p1.Private, p2.Public, p);
i2.Init(false, p2.Private, p1.Public, p);
byte[] message = Hex.Decode("1234567890abcdef");
byte[] out1 = i1.ProcessBlock(message, 0, message.Length);
if (!AreEqual(out1, Hex.Decode("2442ae1fbf90dd9c06b0dcc3b27e69bd11c9aee4ad4cfc9e50eceb44")))
{
Fail("stream cipher test failed on enc");
}
byte[] out2 = i2.ProcessBlock(out1, 0, out1.Length);
if (!AreEqual(out2, message))
{
Fail("stream cipher test failed");
}
//
// twofish with CBC
//
BufferedBlockCipher c1 = new PaddedBufferedBlockCipher(
new CbcBlockCipher(new TwofishEngine()));
BufferedBlockCipher c2 = new PaddedBufferedBlockCipher(
new CbcBlockCipher(new TwofishEngine()));
i1 = new IesEngine(
new ECDHBasicAgreement(),
new Kdf2BytesGenerator(new Sha1Digest()),
new HMac(new Sha1Digest()),
c1);
i2 = new IesEngine(
new ECDHBasicAgreement(),
new Kdf2BytesGenerator(new Sha1Digest()),
new HMac(new Sha1Digest()),
c2);
d = new byte[] { 1, 2, 3, 4, 5, 6, 7, 8 };
e = new byte[] { 8, 7, 6, 5, 4, 3, 2, 1 };
p = new IesWithCipherParameters(d, e, 64, 128);
i1.Init(true, p1.Private, p2.Public, p);
i2.Init(false, p2.Private, p1.Public, p);
message = Hex.Decode("1234567890abcdef");
out1 = i1.ProcessBlock(message, 0, message.Length);
if (!AreEqual(out1, Hex.Decode("2ea288651e21576215f2424bbb3f68816e282e3931b44bd1c429ebdb5f1b290cf1b13309")))
{
Fail("twofish cipher test failed on enc");
}
out2 = i2.ProcessBlock(out1, 0, out1.Length);
if (!AreEqual(out2, message))
{
Fail("twofish cipher test failed");
}
}
private void DoTest(
AsymmetricCipherKeyPair p1,
AsymmetricCipherKeyPair p2)
{
//
// stream test
//
IesEngine i1 = new IesEngine(
new ECDHBasicAgreement(),
new Kdf2BytesGenerator(new Sha1Digest()),
new HMac(new Sha1Digest()));
IesEngine i2 = new IesEngine(
new ECDHBasicAgreement(),
new Kdf2BytesGenerator(new Sha1Digest()),
new HMac(new Sha1Digest()));
byte[] d = new byte[] { 1, 2, 3, 4, 5, 6, 7, 8 };
byte[] e = new byte[] { 8, 7, 6, 5, 4, 3, 2, 1 };
IesParameters p = new IesParameters(d, e, 64);
i1.Init(true, p1.Private, p2.Public, p);
i2.Init(false, p2.Private, p1.Public, p);
byte[] message = Hex.Decode("1234567890abcdef");
byte[] out1 = i1.ProcessBlock(message, 0, message.Length);
byte[] out2 = i2.ProcessBlock(out1, 0, out1.Length);
if (!AreEqual(out2, message))
{
Fail("stream cipher test failed");
}
//
// twofish with CBC
//
BufferedBlockCipher c1 = new PaddedBufferedBlockCipher(
new CbcBlockCipher(new TwofishEngine()));
BufferedBlockCipher c2 = new PaddedBufferedBlockCipher(
new CbcBlockCipher(new TwofishEngine()));
i1 = new IesEngine(
new ECDHBasicAgreement(),
new Kdf2BytesGenerator(new Sha1Digest()),
new HMac(new Sha1Digest()),
c1);
i2 = new IesEngine(
new ECDHBasicAgreement(),
new Kdf2BytesGenerator(new Sha1Digest()),
new HMac(new Sha1Digest()),
c2);
d = new byte[] { 1, 2, 3, 4, 5, 6, 7, 8 };
e = new byte[] { 8, 7, 6, 5, 4, 3, 2, 1 };
p = new IesWithCipherParameters(d, e, 64, 128);
i1.Init(true, p1.Private, p2.Public, p);
i2.Init(false, p2.Private, p1.Public, p);
message = Hex.Decode("1234567890abcdef");
out1 = i1.ProcessBlock(message, 0, message.Length);
out2 = i2.ProcessBlock(out1, 0, out1.Length);
if (!AreEqual(out2, message))
{
Fail("twofish cipher test failed");
}
}
public override void PerformTest()
{
StaticTest();
FpCurve curve = new FpCurve(
new BigInteger("6277101735386680763835789423207666416083908700390324961279"), // q
new BigInteger("fffffffffffffffffffffffffffffffefffffffffffffffc", 16), // a
new BigInteger("64210519e59c80e70fa7e9ab72243049feb8deecc146b9b1", 16)); // b
ECDomainParameters parameters = new ECDomainParameters(
curve,
curve.DecodePoint(Hex.Decode("03188da80eb03090f67cbf20eb43a18800f4ff0afd82ff1012")), // G
new BigInteger("6277101735386680763835789423176059013767194773182842284081")); // n
ECKeyPairGenerator eGen = new ECKeyPairGenerator();
KeyGenerationParameters gParam = new ECKeyGenerationParameters(parameters, new SecureRandom());
eGen.Init(gParam);
AsymmetricCipherKeyPair p1 = eGen.GenerateKeyPair();
AsymmetricCipherKeyPair p2 = eGen.GenerateKeyPair();
DoTest(p1, p2);
}
public static void Main(
string[] args)
{
RunTest(new EcIesTest());
}
[Test]
public void TestFunction()
{
string resultText = Perform().ToString();
Assert.AreEqual(Name + ": Okay", resultText);
}
}
}
| Taggersoft/Raksha | src/Raksha.Tests (net45)/Crypto/ECIESTest.cs | C# | mit | 7,039 |
/*
* The MIT License
*
* Copyright 2015 Willian Keller (will_levinski@hotmail.com).
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
var RefreshPic = function (nn) {
if (nn < 16) {
if (Fld[nn] >= 0) {
window.document.images[nn].src = Pic[Fld[nn]].src;
} else {
window.document.images[nn].src = Pic[32].src;
}
}
else {
var ii = (nn - 16) % 4;
var jj = (nn - 16 - ii) / 4;
if (Board[ii][jj] >= 0) {
window.document.images[nn].src = Pic[Board[ii][jj]].src;
} else {
window.document.images[nn].src = Pic[32].src;
}
}
};
/*
* Function to restart board
*
* @function RefreshBoard()
* @var ii
* @return RefreshPic()
*/
function RefreshBoard() {
/*
* @var ii
*/
var ii;
for (ii = 16; ii < 32; ii++) {
RefreshPic(ii);
}
}
var RefreshScreen = function () {
/*
* Piece images
* @var ii
*/
var ii;
for (ii = 0; ii < 32; ii++) {
/*
* Restart item by item
* @var ii
*/
RefreshPic(ii);
}
if (MoveCount2 < 10) {
window.document.OptionsForm.Moves.value = ' ' + MoveCount2 + ' ';
} else {
window.document.OptionsForm.Moves.value = MoveCount2;
}
window.document.OptionsForm.NextMove.value = " " + eval(MoveCount2 % 2 + 1) + " ";
}; | williankeller/quarto-game | assets/js/inc/refresh.js | JavaScript | mit | 2,452 |
/*
Template Name: Adminto Dashboard
Author: CoderThemes
Email: coderthemes@gmail.com
File: Responsive
*/
@media only screen and (max-width: 6000px) and (min-width: 700px) {
.wrapper.right-bar-enabled .right-bar {
right: 0;
z-index: 99;
}
}
@media (max-width: 1023px) {
.button-menu-mobile {
display: block !important;
}
}
@media (min-width: 768px) and (max-width: 991px) {
body {
overflow-x: hidden;
}
}
@media (max-width: 767px) {
body {
overflow-x: hidden;
}
.enlarged .left.side-menu {
margin-left: -75px;
}
.topbar-left {
width: 70px !important;
}
.content-page .content {
margin-top: 95px;
}
.topbar .topbar-left {
height: 75px;
}
.navbar-default {
background-color: #ffffff;
box-shadow: 0 0px 24px 0 rgba(0, 0, 0, 0.06), 0 1px 0px 0 rgba(0, 0, 0, 0.02);
}
.navbar-nav {
margin: 0px;
display: inline-block;
}
.navbar-nav li {
display: inline-block;
line-height: 1px;
}
.navbar-nav.navbar-right {
float: right;
}
.notification-box {
display: inline;
}
.notification-box ul li a {
line-height: 46px;
}
.notification-box .pulse {
top: 5px;
}
.notification-box .dot {
top: -7px;
left: -3px;
}
#topnav .navbar-toggle {
margin-right: 5px;
}
.navbar-nav .open .dropdown-menu {
background-color: #ffffff;
box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.26);
left: auto;
position: absolute;
right: 0;
}
.navbar-nav .open .dropdown-menu li {
display: block;
}
.content-page {
margin-left: 0px !important;
}
.footer {
left: 0px !important;
}
.mobile-sidebar {
left: 0px;
}
.mobile-content {
left: 250px;
right: -250px;
}
.wrapper-page {
width: 90%;
}
.dataTables_wrapper .col-xs-6 {
width: 100%;
text-align: left;
}
div#datatable-buttons_info {
float: none;
}
}
@media (max-width: 480px) {
.side-menu {
z-index: 10 !important;
}
.button-menu-mobile {
display: block;
}
.search-bar {
display: none !important;
}
}
@media (max-width: 420px) {
.hide-phone {
display: none !important;
}
}
/* Container-alt */
@media (min-width: 768px) {
.container-alt {
width: 750px;
}
.nav-tabs.nav-justified > li > a {
border-bottom: 2px solid #eeeeee;
}
}
@media (min-width: 992px) {
.container-alt {
width: 970px;
}
}
@media (min-width: 1200px) {
.container-alt {
width: 1170px;
}
}
@media (max-width: 419px) {
.topbar-left {
width: 70px !important;
}
.content-page {
margin-left: 70px;
}
.forced .side-menu.left {
box-shadow: 0 12px 12px rgba(0, 0, 0, 0.1);
position: absolute;
}
.enlarged .side-menu.left {
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1) !important;
}
}
| ajiehatajie/suport-tiket-adonis | public/assets/css/responsive.css | CSS | mit | 2,788 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Gale.Db.Factories
{
/// <summary>
/// Database Factory Resolver
/// </summary>
public class FactoryResolver
{
/// <summary>
/// Retrieves the Default Database Factory from the specified Connection String
/// </summary>
/// <returns></returns>
public static Gale.Db.IDataActions Resolve()
{
var cnx = System.Configuration.ConfigurationManager.ConnectionStrings[Gale.REST.Resources.GALE_CONNECTION_DEFAULT_KEY];
if (cnx == null)
{
throw new Gale.Exception.GaleException("DB002", Gale.REST.Resources.GALE_CONNECTION_DEFAULT_KEY);
}
return ResolveConnection(cnx);
}
/// <summary>
/// Retrieves a Database Factory from the specified Connection String
/// </summary>
/// <param name="connectionString">Connection Key</param>
/// <returns></returns>
public static Gale.Db.IDataActions Resolve(String connectionKey)
{
var cnx = System.Configuration.ConfigurationManager.ConnectionStrings[connectionKey];
if (cnx == null)
{
throw new Gale.Exception.GaleException("DB002", connectionKey);
}
return ResolveConnection(cnx);
}
/// <summary>
/// Retrieves a Database Factory from the specified Connection String
/// </summary>
/// <param name="connectionString">Connection Key</param>
/// <returns></returns>
private static Gale.Db.IDataActions ResolveConnection(System.Configuration.ConnectionStringSettings connection)
{
try
{
Type factory_type = Type.GetType(connection.ProviderName);
var factory = Activator.CreateInstance(factory_type, new object[] { connection.ConnectionString });
return (Gale.Db.IDataActions)factory;
}
catch (System.Exception ex)
{
throw new Gale.Exception.GaleException("DB001", ex.Message);
}
}
}
}
| dmunozgaete/Karma | Db/Factories/FactoryResolver.cs | C# | mit | 2,243 |
/*
* Video.js Hotkeys
* https://github.com/ctd1500/videojs-hotkeys
*
* Copyright (c) 2015 Chris Dougherty
* Licensed under the Apache-2.0 license.
*/
;(function(root, factory) {
if (typeof window !== 'undefined' && window.videojs) {
factory(window.videojs);
} else if (typeof define === 'function' && define.amd) {
define('videojs-hotkeys', ['video.js'], function (module) {
return factory(module.default || module);
});
} else if (typeof module !== 'undefined' && module.exports) {
module.exports = factory(require('video.js'));
}
}(this, function (videojs) {
"use strict";
if (typeof window !== 'undefined') {
window['videojs_hotkeys'] = { version: "0.2.26" };
}
var hotkeys = function(options) {
var player = this;
var pEl = player.el();
var doc = document;
var def_options = {
volumeStep: 0.1,
seekStep: 5,
enableMute: true,
enableVolumeScroll: true,
enableHoverScroll: false,
enableFullscreen: true,
enableNumbers: true,
enableJogStyle: false,
alwaysCaptureHotkeys: false,
captureDocumentHotkeys: false,
documentHotkeysFocusElementFilter: function () { return false },
enableModifiersForNumbers: true,
enableInactiveFocus: true,
skipInitialFocus: false,
playPauseKey: playPauseKey,
rewindKey: rewindKey,
forwardKey: forwardKey,
volumeUpKey: volumeUpKey,
volumeDownKey: volumeDownKey,
muteKey: muteKey,
fullscreenKey: fullscreenKey,
customKeys: {}
};
var cPlay = 1,
cRewind = 2,
cForward = 3,
cVolumeUp = 4,
cVolumeDown = 5,
cMute = 6,
cFullscreen = 7;
// Use built-in merge function from Video.js v5.0+ or v4.4.0+
var mergeOptions = videojs.mergeOptions || videojs.util.mergeOptions;
options = mergeOptions(def_options, options || {});
var volumeStep = options.volumeStep,
seekStep = options.seekStep,
enableMute = options.enableMute,
enableVolumeScroll = options.enableVolumeScroll,
enableHoverScroll = options.enableHoverScroll,
enableFull = options.enableFullscreen,
enableNumbers = options.enableNumbers,
enableJogStyle = options.enableJogStyle,
alwaysCaptureHotkeys = options.alwaysCaptureHotkeys,
captureDocumentHotkeys = options.captureDocumentHotkeys,
documentHotkeysFocusElementFilter = options.documentHotkeysFocusElementFilter,
enableModifiersForNumbers = options.enableModifiersForNumbers,
enableInactiveFocus = options.enableInactiveFocus,
skipInitialFocus = options.skipInitialFocus;
var videojsVer = videojs.VERSION;
// Set default player tabindex to handle keydown and doubleclick events
if (!pEl.hasAttribute('tabIndex')) {
pEl.setAttribute('tabIndex', '-1');
}
// Remove player outline to fix video performance issue
pEl.style.outline = "none";
if (alwaysCaptureHotkeys || !player.autoplay()) {
if (!skipInitialFocus) {
player.one('play', function() {
pEl.focus(); // Fixes the .vjs-big-play-button handing focus back to body instead of the player
});
}
}
if (enableInactiveFocus) {
player.on('userinactive', function() {
// When the control bar fades, re-apply focus to the player if last focus was a control button
var cancelFocusingPlayer = function() {
clearTimeout(focusingPlayerTimeout);
};
var focusingPlayerTimeout = setTimeout(function() {
player.off('useractive', cancelFocusingPlayer);
var activeElement = doc.activeElement;
var controlBar = pEl.querySelector('.vjs-control-bar');
if (activeElement && activeElement.parentElement == controlBar) {
pEl.focus();
}
}, 10);
player.one('useractive', cancelFocusingPlayer);
});
}
player.on('play', function() {
// Fix allowing the YouTube plugin to have hotkey support.
var ifblocker = pEl.querySelector('.iframeblocker');
if (ifblocker && ifblocker.style.display === '') {
ifblocker.style.display = "block";
ifblocker.style.bottom = "39px";
}
});
var keyDown = function keyDown(event) {
var ewhich = event.which, wasPlaying, seekTime;
var ePreventDefault = event.preventDefault.bind(event);
var duration = player.duration();
// When controls are disabled, hotkeys will be disabled as well
if (player.controls()) {
// Don't catch keys if any control buttons are focused, unless alwaysCaptureHotkeys is true
var activeEl = doc.activeElement;
if (
alwaysCaptureHotkeys ||
(captureDocumentHotkeys && documentHotkeysFocusElementFilter(activeEl)) ||
activeEl == pEl ||
activeEl == pEl.querySelector('.vjs-tech') ||
activeEl == pEl.querySelector('.vjs-control-bar') ||
activeEl == pEl.querySelector('.iframeblocker')
) {
switch (checkKeys(event, player)) {
// Spacebar toggles play/pause
case cPlay:
ePreventDefault();
if (alwaysCaptureHotkeys) {
// Prevent control activation with space
event.stopPropagation();
}
if (player.paused()) {
silencePromise(player.play());
} else {
player.pause();
}
break;
// Seeking with the left/right arrow keys
case cRewind: // Seek Backward
wasPlaying = !player.paused();
ePreventDefault();
if (wasPlaying) {
player.pause();
}
seekTime = player.currentTime() - seekStepD(event);
// The flash player tech will allow you to seek into negative
// numbers and break the seekbar, so try to prevent that.
if (seekTime <= 0) {
seekTime = 0;
}
player.currentTime(seekTime);
if (wasPlaying) {
silencePromise(player.play());
}
break;
case cForward: // Seek Forward
wasPlaying = !player.paused();
ePreventDefault();
if (wasPlaying) {
player.pause();
}
seekTime = player.currentTime() + seekStepD(event);
// Fixes the player not sending the end event if you
// try to seek past the duration on the seekbar.
if (seekTime >= duration) {
seekTime = wasPlaying ? duration - .001 : duration;
}
player.currentTime(seekTime);
if (wasPlaying) {
silencePromise(player.play());
}
break;
// Volume control with the up/down arrow keys
case cVolumeDown:
ePreventDefault();
if (!enableJogStyle) {
player.volume(player.volume() - volumeStep);
} else {
seekTime = player.currentTime() - 1;
if (player.currentTime() <= 1) {
seekTime = 0;
}
player.currentTime(seekTime);
}
break;
case cVolumeUp:
ePreventDefault();
if (!enableJogStyle) {
player.volume(player.volume() + volumeStep);
} else {
seekTime = player.currentTime() + 1;
if (seekTime >= duration) {
seekTime = duration;
}
player.currentTime(seekTime);
}
break;
// Toggle Mute with the M key
case cMute:
if (enableMute) {
player.muted(!player.muted());
}
break;
// Toggle Fullscreen with the F key
case cFullscreen:
if (enableFull) {
if (player.isFullscreen()) {
player.exitFullscreen();
} else {
player.requestFullscreen();
}
}
break;
default:
// Number keys from 0-9 skip to a percentage of the video. 0 is 0% and 9 is 90%
if ((ewhich > 47 && ewhich < 59) || (ewhich > 95 && ewhich < 106)) {
// Do not handle if enableModifiersForNumbers set to false and keys are Ctrl, Cmd or Alt
if (enableModifiersForNumbers || !(event.metaKey || event.ctrlKey || event.altKey)) {
if (enableNumbers) {
var sub = 48;
if (ewhich > 95) {
sub = 96;
}
var number = ewhich - sub;
ePreventDefault();
player.currentTime(player.duration() * number * 0.1);
}
}
}
// Handle any custom hotkeys
for (var customKey in options.customKeys) {
var customHotkey = options.customKeys[customKey];
// Check for well formed custom keys
if (customHotkey && customHotkey.key && customHotkey.handler) {
// Check if the custom key's condition matches
if (customHotkey.key(event)) {
ePreventDefault();
customHotkey.handler(player, options, event);
}
}
}
}
}
}
};
var doubleClick = function doubleClick(event) {
// Video.js added double-click fullscreen in 7.1.0
if (videojsVer != null && videojsVer <= "7.1.0") {
// When controls are disabled, hotkeys will be disabled as well
if (player.controls()) {
// Don't catch clicks if any control buttons are focused
var activeEl = event.relatedTarget || event.toElement || doc.activeElement;
if (activeEl == pEl ||
activeEl == pEl.querySelector('.vjs-tech') ||
activeEl == pEl.querySelector('.iframeblocker')) {
if (enableFull) {
if (player.isFullscreen()) {
player.exitFullscreen();
} else {
player.requestFullscreen();
}
}
}
}
}
};
var volumeHover = false;
var volumeSelector = pEl.querySelector('.vjs-volume-menu-button') || pEl.querySelector('.vjs-volume-panel');
if (volumeSelector != null) {
volumeSelector.onmouseover = function() { volumeHover = true; };
volumeSelector.onmouseout = function() { volumeHover = false; };
}
var mouseScroll = function mouseScroll(event) {
if (enableHoverScroll) {
// If we leave this undefined then it can match non-existent elements below
var activeEl = 0;
} else {
var activeEl = doc.activeElement;
}
// When controls are disabled, hotkeys will be disabled as well
if (player.controls()) {
if (alwaysCaptureHotkeys ||
activeEl == pEl ||
activeEl == pEl.querySelector('.vjs-tech') ||
activeEl == pEl.querySelector('.iframeblocker') ||
activeEl == pEl.querySelector('.vjs-control-bar') ||
volumeHover) {
if (enableVolumeScroll) {
event = window.event || event;
var delta = Math.max(-1, Math.min(1, (event.wheelDelta || -event.detail)));
event.preventDefault();
if (delta == 1) {
player.volume(player.volume() + volumeStep);
} else if (delta == -1) {
player.volume(player.volume() - volumeStep);
}
}
}
}
};
var checkKeys = function checkKeys(e, player) {
// Allow some modularity in defining custom hotkeys
// Play/Pause check
if (options.playPauseKey(e, player)) {
return cPlay;
}
// Seek Backward check
if (options.rewindKey(e, player)) {
return cRewind;
}
// Seek Forward check
if (options.forwardKey(e, player)) {
return cForward;
}
// Volume Up check
if (options.volumeUpKey(e, player)) {
return cVolumeUp;
}
// Volume Down check
if (options.volumeDownKey(e, player)) {
return cVolumeDown;
}
// Mute check
if (options.muteKey(e, player)) {
return cMute;
}
// Fullscreen check
if (options.fullscreenKey(e, player)) {
return cFullscreen;
}
};
function playPauseKey(e) {
// Space bar or MediaPlayPause
return (e.which === 32 || e.which === 179);
}
function rewindKey(e) {
// Left Arrow or MediaRewind
return (e.which === 37 || e.which === 177);
}
function forwardKey(e) {
// Right Arrow or MediaForward
return (e.which === 39 || e.which === 176);
}
function volumeUpKey(e) {
// Up Arrow
return (e.which === 38);
}
function volumeDownKey(e) {
// Down Arrow
return (e.which === 40);
}
function muteKey(e) {
// M key
return (e.which === 77);
}
function fullscreenKey(e) {
// F key
return (e.which === 70);
}
function seekStepD(e) {
// SeekStep caller, returns an int, or a function returning an int
return (typeof seekStep === "function" ? seekStep(e) : seekStep);
}
function silencePromise(value) {
if (value != null && typeof value.then === 'function') {
value.then(null, function(e) {});
}
}
player.on('keydown', keyDown);
player.on('dblclick', doubleClick);
player.on('mousewheel', mouseScroll);
player.on("DOMMouseScroll", mouseScroll);
if (captureDocumentHotkeys) {
document.addEventListener('keydown', function (event) { keyDown(event) });
}
return this;
};
var registerPlugin = videojs.registerPlugin || videojs.plugin;
registerPlugin('hotkeys', hotkeys);
}));
| jurgendl/jhaws | jhaws/wicket/src/main/resources/org/jhaws/common/web/wicket/videojs/hotkeys/videojs.hotkeys.js | JavaScript | mit | 14,256 |
<?php
/**
* CodeIgniter
*
* An open source application development framework for PHP
*
* This content is released under the MIT License (MIT)
*
* Copyright (c) 2014 - 2016, British Columbia Institute of Technology
*
* 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.
*
* @package CodeIgniter
* @author EllisLab Dev Team
* @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/)
* @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/)
* @license http://opensource.org/licenses/MIT MIT License
* @link https://codeigniter.com
* @since Version 3.0.0
* @filesource
*/
defined('BASEPATH') OR exit('No direct script access allowed');
/**
* PDO 4D Database Adapter Class
*
* Note: _DB is an extender class that the app controller
* creates dynamically based on whether the query builder
* class is being used or not.
*
* @package CodeIgniter
* @subpackage Drivers
* @category Database
* @author EllisLab Dev Team
* @link https://codeigniter.com/user_guide/database/
*/
class CI_DB_pdo_4d_driver extends CI_DB_pdo_driver {
/**
* Sub-driver
*
* @var string
*/
public $subdriver = '4d';
/**
* Identifier escape character
*
* @var string[]
*/
protected $_escape_char = array('[', ']');
// --------------------------------------------------------------------
/**
* Class constructor
*
* Builds the DSN if not already set.
*
* @param array $params
* @return void
*/
public function __construct($params) {
parent::__construct($params);
if (empty($this->dsn)) {
$this->dsn = '4D:host=' . (empty($this->hostname) ? '127.0.0.1' : $this->hostname);
empty($this->port) OR $this->dsn .= ';port=' . $this->port;
empty($this->database) OR $this->dsn .= ';dbname=' . $this->database;
empty($this->char_set) OR $this->dsn .= ';charset=' . $this->char_set;
} elseif (!empty($this->char_set) && strpos($this->dsn, 'charset=', 3) === FALSE) {
$this->dsn .= ';charset=' . $this->char_set;
}
}
// --------------------------------------------------------------------
/**
* Show table query
*
* Generates a platform-specific query string so that the table names can be fetched
*
* @param bool $prefix_limit
* @return string
*/
protected function _list_tables($prefix_limit = FALSE) {
$sql = 'SELECT ' . $this->escape_identifiers('TABLE_NAME') . ' FROM ' . $this->escape_identifiers('_USER_TABLES');
if ($prefix_limit === TRUE && $this->dbprefix !== '') {
$sql .= ' WHERE ' . $this->escape_identifiers('TABLE_NAME') . " LIKE '" . $this->escape_like_str($this->dbprefix) . "%' "
. sprintf($this->_like_escape_str, $this->_like_escape_chr);
}
return $sql;
}
// --------------------------------------------------------------------
/**
* Show column query
*
* Generates a platform-specific query string so that the column names can be fetched
*
* @param string $table
* @return string
*/
protected function _list_columns($table = '') {
return 'SELECT ' . $this->escape_identifiers('COLUMN_NAME') . ' FROM ' . $this->escape_identifiers('_USER_COLUMNS')
. ' WHERE ' . $this->escape_identifiers('TABLE_NAME') . ' = ' . $this->escape($table);
}
// --------------------------------------------------------------------
/**
* Field data query
*
* Generates a platform-specific query so that the column data can be retrieved
*
* @param string $table
* @return string
*/
protected function _field_data($table) {
return 'SELECT * FROM ' . $this->protect_identifiers($table, TRUE, NULL, FALSE) . ' LIMIT 1';
}
// --------------------------------------------------------------------
/**
* Update statement
*
* Generates a platform-specific update string from the supplied data
*
* @param string $table
* @param array $values
* @return string
*/
protected function _update($table, $values) {
$this->qb_limit = FALSE;
$this->qb_orderby = array();
return parent::_update($table, $values);
}
// --------------------------------------------------------------------
/**
* Delete statement
*
* Generates a platform-specific delete string from the supplied data
*
* @param string $table
* @return string
*/
protected function _delete($table) {
$this->qb_limit = FALSE;
return parent::_delete($table);
}
// --------------------------------------------------------------------
/**
* LIMIT
*
* Generates a platform-specific LIMIT clause
*
* @param string $sql SQL Query
* @return string
*/
protected function _limit($sql) {
return $sql . ' LIMIT ' . $this->qb_limit . ($this->qb_offset ? ' OFFSET ' . $this->qb_offset : '');
}
}
| l3sakyr/4711-frontend | system/database/drivers/pdo/subdrivers/pdo_4d_driver.php | PHP | mit | 6,165 |
import Binding from "../binding";
import splitExportDeclaration from "@babel/helper-split-export-declaration";
import * as t from "@babel/types";
const renameVisitor = {
ReferencedIdentifier({ node }, state) {
if (node.name === state.oldName) {
node.name = state.newName;
}
},
Scope(path, state) {
if (
!path.scope.bindingIdentifierEquals(
state.oldName,
state.binding.identifier,
)
) {
path.skip();
}
},
"AssignmentExpression|Declaration"(path, state) {
const ids = path.getOuterBindingIdentifiers();
for (const name in ids) {
if (name === state.oldName) ids[name].name = state.newName;
}
},
};
export default class Renamer {
constructor(binding: Binding, oldName: string, newName: string) {
this.newName = newName;
this.oldName = oldName;
this.binding = binding;
}
oldName: string;
newName: string;
binding: Binding;
maybeConvertFromExportDeclaration(parentDeclar) {
const maybeExportDeclar = parentDeclar.parentPath;
if (!maybeExportDeclar.isExportDeclaration()) {
return;
}
if (
maybeExportDeclar.isExportDefaultDeclaration() &&
!maybeExportDeclar.get("declaration").node.id
) {
return;
}
splitExportDeclaration(maybeExportDeclar);
}
maybeConvertFromClassFunctionDeclaration(path) {
return; // TODO
// retain the `name` of a class/function declaration
if (!path.isFunctionDeclaration() && !path.isClassDeclaration()) return;
if (this.binding.kind !== "hoisted") return;
path.node.id = t.identifier(this.oldName);
path.node._blockHoist = 3;
path.replaceWith(
t.variableDeclaration("let", [
t.variableDeclarator(
t.identifier(this.newName),
t.toExpression(path.node),
),
]),
);
}
maybeConvertFromClassFunctionExpression(path) {
return; // TODO
// retain the `name` of a class/function expression
if (!path.isFunctionExpression() && !path.isClassExpression()) return;
if (this.binding.kind !== "local") return;
path.node.id = t.identifier(this.oldName);
this.binding.scope.parent.push({
id: t.identifier(this.newName),
});
path.replaceWith(
t.assignmentExpression("=", t.identifier(this.newName), path.node),
);
}
rename(block?) {
const { binding, oldName, newName } = this;
const { scope, path } = binding;
const parentDeclar = path.find(
path =>
path.isDeclaration() ||
path.isFunctionExpression() ||
path.isClassExpression(),
);
if (parentDeclar) {
const bindingIds = parentDeclar.getOuterBindingIdentifiers();
if (bindingIds[oldName] === binding.identifier) {
// When we are renaming an exported identifier, we need to ensure that
// the exported binding keeps the old name.
this.maybeConvertFromExportDeclaration(parentDeclar);
}
}
scope.traverse(block || scope.block, renameVisitor, this);
if (!block) {
scope.removeOwnBinding(oldName);
scope.bindings[newName] = binding;
this.binding.identifier.name = newName;
}
if (binding.type === "hoisted") {
// https://github.com/babel/babel/issues/2435
// todo: hoist and convert function to a let
}
if (parentDeclar) {
this.maybeConvertFromClassFunctionDeclaration(parentDeclar);
this.maybeConvertFromClassFunctionExpression(parentDeclar);
}
}
}
| vadzim/babel | packages/babel-traverse/src/scope/lib/renamer.js | JavaScript | mit | 3,496 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Tabs - Sortable</title>
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
<script src="../../jquery-1.7.1.js"></script>
<script src="../../ui/jquery.ui.core.js"></script>
<script src="../../ui/jquery.ui.widget.js"></script>
<script src="../../ui/jquery.ui.mouse.js"></script>
<script src="../../ui/jquery.ui.sortable.js"></script>
<script src="../../ui/jquery.ui.tabs.js"></script>
<link rel="stylesheet" href="../demos.css">
<script>
$(function () {
$("#tabs").tabs().find(".ui-tabs-nav").sortable({axis: "x"});
});
</script>
</head>
<body>
<div class="demo">
<div id="tabs">
<ul>
<li><a href="#tabs-1">Nunc tincidunt</a></li>
<li><a href="#tabs-2">Proin dolor</a></li>
<li><a href="#tabs-3">Aenean lacinia</a></li>
</ul>
<div id="tabs-1">
<p>Proin elit arcu, rutrum commodo, vehicula tempus, commodo a, risus. Curabitur nec
arcu. Donec sollicitudin mi sit amet mauris. Nam elementum quam ullamcorper ante.
Etiam aliquet massa et lorem. Mauris dapibus lacus auctor risus. Aenean tempor
ullamcorper leo. Vivamus sed magna quis ligula eleifend adipiscing. Duis orci.
Aliquam sodales tortor vitae ipsum. Aliquam nulla. Duis aliquam molestie erat. Ut et
mauris vel pede varius sollicitudin. Sed ut dolor nec orci tincidunt interdum.
Phasellus ipsum. Nunc tristique tempus lectus.</p>
</div>
<div id="tabs-2">
<p>Morbi tincidunt, dui sit amet facilisis feugiat, odio metus gravida ante, ut pharetra
massa metus id nunc. Duis scelerisque molestie turpis. Sed fringilla, massa eget
luctus malesuada, metus eros molestie lectus, ut tempus eros massa ut dolor. Aenean
aliquet fringilla sem. Suspendisse sed ligula in ligula suscipit aliquam. Praesent
in eros vestibulum mi adipiscing adipiscing. Morbi facilisis. Curabitur ornare
consequat nunc. Aenean vel metus. Ut posuere viverra nulla. Aliquam erat volutpat.
Pellentesque convallis. Maecenas feugiat, tellus pellentesque pretium posuere, felis
lorem euismod felis, eu ornare leo nisi vel felis. Mauris consectetur tortor et
purus.</p>
</div>
<div id="tabs-3">
<p>Mauris eleifend est et turpis. Duis id erat. Suspendisse potenti. Aliquam vulputate,
pede vel vehicula accumsan, mi neque rutrum erat, eu congue orci lorem eget lorem.
Vestibulum non ante. Class aptent taciti sociosqu ad litora torquent per conubia
nostra, per inceptos himenaeos. Fusce sodales. Quisque eu urna vel enim commodo
pellentesque. Praesent eu risus hendrerit ligula tempus pretium. Curabitur lorem
enim, pretium nec, feugiat nec, luctus a, lacus.</p>
<p>Duis cursus. Maecenas ligula eros, blandit nec, pharetra at, semper at, magna. Nullam
ac lacus. Nulla facilisi. Praesent viverra justo vitae neque. Praesent blandit
adipiscing velit. Suspendisse potenti. Donec mattis, pede vel pharetra blandit,
magna ligula faucibus eros, id euismod lacus dolor eget odio. Nam scelerisque. Donec
non libero sed nulla mattis commodo. Ut sagittis. Donec nisi lectus, feugiat
porttitor, tempor ac, tempor vitae, pede. Aenean vehicula velit eu tellus interdum
rutrum. Maecenas commodo. Pellentesque nec elit. Fusce in lacus. Vivamus a libero
vitae lectus hendrerit hendrerit.</p>
</div>
</div>
</div>
<!-- End demo -->
<div class="demo-description">
<p>Drag the tabs above to re-order them.</p>
<p>
Making tabs sortable is as simple as calling
<code>.sortable()</code>
on the
<code>.ui-tabs-nav</code>
element.
</p>
</div>
<!-- End demo-description -->
</body>
</html>
| johnchronis/exareme | exareme-master/src/main/static/libs/jquery-ui-1.8.18.custom/development-bundle/demos/tabs/sortable.html | HTML | mit | 4,181 |
<!DOCTYPE html>
<html lang=en>
<head>
<meta charset="utf-8">
<title>Thoughts</title>
<link rel=stylesheet href="{{ url_for('static', filename='css/main.css') }}" media=all>
<script src="https://browserid.org/include.js" type="text/javascript"></script>
<script src="{{ url_for('static', filename='js/lib/jquery.js') }}" type="text/javascript"></script>
<script src="{{ url_for('static', filename='js/login.js') }}" type="text/javascript"></script>
</head>
<body>
<div id="user-info">
{% if 'openconv_email' in session and session['openconv_email'] %}
<p>
Connected as {{ session['openconv_email'] }} -
<a href="{{ url_for('logout') }}">logout</a>
</p>
{% else %}
<a href="#" id="browserid" title="Sign-in with BrowserID">
<img src="{{ url_for('static', filename='images/sign_in_browserid.png') }}" alt="Sign in">
</a>
{% endif %}
</div>
{% block content %}{% endblock %}
</body>
</html>
| adngdb/openconversation | python/templates/shared/template.html | HTML | mit | 1,101 |
<?xml version="1.0" ?><!DOCTYPE TS><TS language="bs" version="2.1">
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About Crave</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+39"/>
<source><b>Crave</b> version</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+41"/>
<source>Copyright © 2009-2014 The Bitcoin developers
Copyright © 2012-2014 The NovaCoin developers
Copyright © 2014 The Crave developers</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+15"/>
<source>
This is experimental software.
Distributed under the MIT/X11 software license, see the accompanying file COPYING or <a href="http://www.opensource.org/licenses/mit-license.php">http://www.opensource.org/licenses/mit-license.php</a>.
This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (<a href="https://www.openssl.org/">https://www.openssl.org/</a>) and cryptographic software written by Eric Young (<a href="mailto:eay@cryptsoft.com">eay@cryptsoft.com</a>) and UPnP software written by Thomas Bernard.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>AddressBookPage</name>
<message>
<location filename="../forms/addressbookpage.ui" line="+14"/>
<source>Address Book</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+22"/>
<source>Double-click to edit address or label</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+24"/>
<source>Create a new address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<source>Copy the currently selected address to the system clipboard</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-7"/>
<source>&New Address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-43"/>
<source>These are your Crave addresses for receiving payments. You may want to give a different one to each sender so you can keep track of who is paying you.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+53"/>
<source>&Copy Address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Show &QR Code</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Sign a message to prove you own a Crave address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Sign &Message</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+17"/>
<source>Delete the currently selected address from the list</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-10"/>
<source>Verify a message to ensure it was signed with a specified Crave address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Verify Message</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<source>&Delete</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../addressbookpage.cpp" line="+65"/>
<source>Copy &Label</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>&Edit</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+250"/>
<source>Export Address Book Data</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Comma separated file (*.csv)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<source>Error exporting</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>Could not write to file %1.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>AddressTableModel</name>
<message>
<location filename="../addresstablemodel.cpp" line="+145"/>
<source>Label</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>Address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+36"/>
<source>(no label)</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>AskPassphraseDialog</name>
<message>
<location filename="../forms/askpassphrasedialog.ui" line="+26"/>
<source>Passphrase Dialog</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+21"/>
<source>Enter passphrase</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+14"/>
<source>New passphrase</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+14"/>
<source>Repeat new passphrase</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+33"/>
<source>Serves to disable the trivial sendmoney when OS account compromised. Provides no real security.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>For staking only</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../askpassphrasedialog.cpp" line="+38"/>
<source>Encrypt wallet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>This operation needs your wallet passphrase to unlock the wallet.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Unlock wallet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>This operation needs your wallet passphrase to decrypt the wallet.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Decrypt wallet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Change passphrase</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Enter the old and new passphrase to the wallet.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+45"/>
<source>Confirm wallet encryption</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR COINS</b>!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>Are you sure you wish to encrypt your wallet?</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+15"/>
<source>IMPORTANT: Any previous backups you have made of your wallet file should be replaced with the newly generated, encrypted wallet file. For security reasons, previous backups of the unencrypted wallet file will become useless as soon as you start using the new, encrypted wallet.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+103"/>
<location line="+24"/>
<source>Warning: The Caps Lock key is on!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-133"/>
<location line="+60"/>
<source>Wallet encrypted</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-140"/>
<source>Enter the new passphrase to the wallet.<br/>Please use a passphrase of <b>ten or more random characters</b>, or <b>eight or more words</b>.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+82"/>
<source>Crave will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<location line="+7"/>
<location line="+44"/>
<location line="+6"/>
<source>Wallet encryption failed</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-56"/>
<source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<location line="+50"/>
<source>The supplied passphrases do not match.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-38"/>
<source>Wallet unlock failed</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<location line="+12"/>
<location line="+19"/>
<source>The passphrase entered for the wallet decryption was incorrect.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-20"/>
<source>Wallet decryption failed</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+14"/>
<source>Wallet passphrase was successfully changed.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>BitcoinGUI</name>
<message>
<location filename="../bitcoingui.cpp" line="+297"/>
<source>Sign &message...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-64"/>
<source>Show general overview of wallet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+17"/>
<source>&Transactions</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Browse transaction history</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>&Address Book</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Edit the list of stored addresses and labels</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-18"/>
<source>Show the list of addresses for receiving payments</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+34"/>
<source>E&xit</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Quit application</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Show information about Crave</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>About &Qt</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Show information about Qt</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>&Options...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>&Encrypt Wallet...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>&Backup Wallet...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>&Change Passphrase...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+9"/>
<source>&Export...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-55"/>
<source>Send coins to a Crave address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+39"/>
<source>Modify configuration options for Crave</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+17"/>
<source>Export the data in the current tab to a file</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-13"/>
<source>Encrypt or decrypt wallet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Backup wallet to another location</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Change the passphrase used for wallet encryption</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<source>&Debug window</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Open debugging and diagnostic console</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-5"/>
<source>&Verify message...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-214"/>
<location line="+551"/>
<source>Crave</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-551"/>
<source>Wallet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+193"/>
<source>&About Crave</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+9"/>
<source>&Show / Hide</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>Unlock wallet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>&Lock Wallet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Lock wallet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+28"/>
<source>&File</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>&Settings</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>&Help</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+17"/>
<source>Tabs toolbar</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+46"/>
<location line="+9"/>
<source>[testnet]</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<location line="+58"/>
<source>Crave client</source>
<translation type="unfinished"/>
</message>
<message numerus="yes">
<location line="+70"/>
<source>%n active connection(s) to Crave network</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message>
<location line="+488"/>
<source>Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>Not staking because wallet is locked</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Not staking because wallet is offline</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Not staking because wallet is syncing</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Not staking because you don't have mature coins</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-808"/>
<source>&Dashboard</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>&Receive</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>&Send</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+49"/>
<source>&Unlock Wallet...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+273"/>
<source>Up to date</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+43"/>
<source>Catching up...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+113"/>
<source>Confirm transaction fee</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+27"/>
<source>Sent transaction</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Incoming transaction</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Date: %1
Amount: %2
Type: %3
Address: %4
</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+100"/>
<location line="+15"/>
<source>URI handling</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-15"/>
<location line="+15"/>
<source>URI can not be parsed! This can be caused by an invalid Crave address or malformed URI parameters.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+9"/>
<source>Wallet is <b>not encrypted</b></source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>Wallet is <b>encrypted</b> and currently <b>unlocked</b></source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>Wallet is <b>encrypted</b> and currently <b>locked</b></source>
<translation type="unfinished"/>
</message>
<message>
<location line="+24"/>
<source>Backup Wallet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>Wallet Data (*.dat)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Backup Failed</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>There was an error trying to save the wallet data to the new location.</source>
<translation type="unfinished"/>
</message>
<message numerus="yes">
<location line="+91"/>
<source>%n second(s)</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message numerus="yes">
<location line="+4"/>
<source>%n minute(s)</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message numerus="yes">
<location line="-429"/>
<location line="+433"/>
<source>%n hour(s)</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message>
<location line="-456"/>
<source>Processed %1 blocks of transaction history.</source>
<translation type="unfinished"/>
</message>
<message numerus="yes">
<location line="+27"/>
<location line="+433"/>
<source>%n day(s)</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message numerus="yes">
<location line="-429"/>
<location line="+6"/>
<source>%n week(s)</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message>
<location line="+0"/>
<source>%1 and %2</source>
<translation type="unfinished"/>
</message>
<message numerus="yes">
<location line="+0"/>
<source>%n year(s)</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message>
<location line="+5"/>
<source>%1 behind</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+15"/>
<source>Last received block was generated %1 ago.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Transactions after this will not yet be visible.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+23"/>
<source>Error</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Warning</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Information</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+69"/>
<source>This transaction is over the size limit. You can still send it for a fee of %1, which goes to the nodes that process your transaction and helps to support the network. Do you want to pay the fee?</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+324"/>
<source>Not staking</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../bitcoin.cpp" line="+104"/>
<source>A fatal error occurred. Crave can no longer continue safely and will quit.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>ClientModel</name>
<message>
<location filename="../clientmodel.cpp" line="+110"/>
<source>Network Alert</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>CoinControlDialog</name>
<message>
<location filename="../forms/coincontroldialog.ui" line="+14"/>
<source>Coin Control</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+31"/>
<source>Quantity:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+32"/>
<source>Bytes:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+48"/>
<source>Amount:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+32"/>
<source>Priority:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+48"/>
<source>Fee:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+35"/>
<source>Low Output:</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../coincontroldialog.cpp" line="+552"/>
<source>no</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../forms/coincontroldialog.ui" line="+51"/>
<source>After Fee:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+35"/>
<source>Change:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+69"/>
<source>(un)select all</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<source>Tree mode</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+16"/>
<source>List mode</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+45"/>
<source>Amount</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Label</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Date</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Confirmations</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Confirmed</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Priority</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../coincontroldialog.cpp" line="-515"/>
<source>Copy address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy label</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<location line="+26"/>
<source>Copy amount</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-25"/>
<source>Copy transaction ID</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+24"/>
<source>Copy quantity</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Copy fee</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy after fee</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy bytes</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy priority</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy low output</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy change</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+317"/>
<source>highest</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>high</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>medium-high</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>medium</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>low-medium</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>low</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>lowest</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+155"/>
<source>DUST</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>yes</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<source>This label turns red, if the transaction size is bigger than 10000 bytes.
This means a fee of at least %1 per kb is required.
Can vary +/- 1 Byte per input.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Transactions with higher priority get more likely into a block.
This label turns red, if the priority is smaller than "medium".
This means a fee of at least %1 per kb is required.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>This label turns red, if any recipient receives an amount smaller than %1.
This means a fee of at least %2 is required.
Amounts below 0.546 times the minimum relay fee are shown as DUST.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>This label turns red, if the change is smaller than %1.
This means a fee of at least %2 is required.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+36"/>
<location line="+66"/>
<source>(no label)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-9"/>
<source>change from %1 (%2)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>(change)</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>EditAddressDialog</name>
<message>
<location filename="../forms/editaddressdialog.ui" line="+14"/>
<source>Edit Address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+11"/>
<source>&Label</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<source>The label associated with this address book entry</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>&Address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<source>The address associated with this address book entry. This can only be modified for sending addresses.</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../editaddressdialog.cpp" line="+21"/>
<source>New receiving address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>New sending address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Edit receiving address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Edit sending address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+76"/>
<source>The entered address "%1" is already in the address book.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-5"/>
<source>The entered address "%1" is not a valid Crave address.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<source>Could not unlock wallet.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>New key generation failed.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>GUIUtil::HelpMessageBox</name>
<message>
<location filename="../guiutil.cpp" line="+426"/>
<location line="+12"/>
<source>Crave-Qt</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-12"/>
<source>version</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Usage:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>command-line options</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>UI options</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Set language, for example "de_DE" (default: system locale)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Start minimized</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Show splash screen on startup (default: 1)</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>OptionsDialog</name>
<message>
<location filename="../forms/optionsdialog.ui" line="+14"/>
<source>Options</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+16"/>
<source>&Main</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. Fee 0.01 recommended.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+15"/>
<source>Pay transaction &fee</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+31"/>
<source>Reserved amount does not participate in staking and is therefore spendable at any time.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+15"/>
<source>Reserve</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+31"/>
<source>Automatically start Crave after logging in to the system.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Start Crave on system login</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+21"/>
<source>&Network</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>Automatically open the Crave client port on the router. This only works when your router supports UPnP and it is enabled.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Map port using &UPnP</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Connect to the Crave network through a SOCKS proxy (e.g. when connecting through Tor).</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Connect through SOCKS proxy:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+9"/>
<source>Proxy &IP:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+19"/>
<source>IP address of the proxy (e.g. 127.0.0.1)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>&Port:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+19"/>
<source>Port of the proxy (e.g. 9050)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>SOCKS &Version:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<source>SOCKS version of the proxy (e.g. 5)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+36"/>
<source>&Window</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>Show only a tray icon after minimizing the window.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Minimize to the tray instead of the taskbar</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Minimize instead of exit the application when the window is closed. When this option is enabled, the application will be closed only after selecting Quit in the menu.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>M&inimize on close</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+21"/>
<source>&Display</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>User Interface &language:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<source>The user interface language can be set here. This setting will take effect after restarting Crave.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+11"/>
<source>&Unit to show amounts in:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+9"/>
<source>Whether to show coin control features or not.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Display coin &control features (experts only!)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Whether to select the coin outputs randomly or with minimal coin age.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Minimize weight consumption (experimental)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Use black visual theme (requires restart)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+71"/>
<source>&OK</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>&Cancel</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<source>&Apply</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../optionsdialog.cpp" line="+53"/>
<source>default</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+149"/>
<location line="+9"/>
<source>Warning</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-9"/>
<location line="+9"/>
<source>This setting will take effect after restarting Crave.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+29"/>
<source>The supplied proxy address is invalid.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>OverviewPage</name>
<message>
<location filename="../forms/overviewpage.ui" line="+14"/>
<source>Form</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+46"/>
<location line="+247"/>
<source>The displayed information may be out of date. Your wallet automatically synchronizes with the Crave network after a connection is established, but this process has not completed yet.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-173"/>
<source>Stake:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+32"/>
<source>Unconfirmed:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-113"/>
<source>Wallet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+49"/>
<source>Spendable:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+16"/>
<source>Your current spendable balance</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+80"/>
<source>Immature:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<source>Mined balance that has not yet matured</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+23"/>
<source>Total:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+16"/>
<source>Your current total balance</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+50"/>
<source><b>Recent transactions</b></source>
<translation type="unfinished"/>
</message>
<message>
<location line="-118"/>
<source>Total of transactions that have yet to be confirmed, and do not yet count toward the current balance</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-32"/>
<source>Total of coins that was staked, and do not yet count toward the current balance</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../overviewpage.cpp" line="+116"/>
<location line="+1"/>
<source>out of sync</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>PaymentServer</name>
<message>
<location filename="../paymentserver.cpp" line="+107"/>
<source>Cannot start crave: click-to-pay handler</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>QRCodeDialog</name>
<message>
<location filename="../forms/qrcodedialog.ui" line="+14"/>
<source>QR Code Dialog</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+59"/>
<source>Request Payment</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+56"/>
<source>Amount:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-44"/>
<source>Label:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+19"/>
<source>Message:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+71"/>
<source>&Save As...</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../qrcodedialog.cpp" line="+62"/>
<source>Error encoding URI into QR Code.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+40"/>
<source>The entered amount is invalid, please check.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+23"/>
<source>Resulting URI too long, try to reduce the text for label / message.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+25"/>
<source>Save QR Code</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>PNG Images (*.png)</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>RPCConsole</name>
<message>
<location filename="../forms/rpcconsole.ui" line="+46"/>
<source>Client name</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<location line="+23"/>
<location line="+26"/>
<location line="+23"/>
<location line="+23"/>
<location line="+36"/>
<location line="+53"/>
<location line="+23"/>
<source>N/A</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-194"/>
<source>Client version</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-45"/>
<source>&Information</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+68"/>
<source>Using OpenSSL version</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+49"/>
<source>Startup time</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+29"/>
<source>Network</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Number of connections</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+23"/>
<source>On testnet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+23"/>
<source>Block chain</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Current number of blocks</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+197"/>
<source>&Network Traffic</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+52"/>
<source>&Clear</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<source>Totals</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+64"/>
<source>In:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+80"/>
<source>Out:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-383"/>
<source>Last block time</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+52"/>
<source>&Open</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+16"/>
<source>Command-line options</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Show the Crave-Qt help message to get a list with possible Crave command-line options.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Show</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+24"/>
<source>&Console</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-237"/>
<source>Build date</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-104"/>
<source>Crave - Debug window</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+25"/>
<source>Crave Core</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+256"/>
<source>Debug log file</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Open the Crave debug log file from the current data directory. This can take a few seconds for large log files.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+102"/>
<source>Clear console</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../rpcconsole.cpp" line="+325"/>
<source>Welcome to the Crave RPC console.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Type <b>help</b> for an overview of available commands.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+127"/>
<source>%1 B</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>%1 KB</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>%1 MB</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>%1 GB</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>%1 m</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>%1 h</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>%1 h %2 m</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>SendCoinsDialog</name>
<message>
<location filename="../forms/sendcoinsdialog.ui" line="+14"/>
<location filename="../sendcoinsdialog.cpp" line="+181"/>
<location line="+5"/>
<location line="+5"/>
<location line="+5"/>
<location line="+6"/>
<location line="+5"/>
<location line="+5"/>
<source>Send Coins</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+76"/>
<source>Coin Control Features</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+20"/>
<source>Inputs...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>automatically selected</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+19"/>
<source>Insufficient funds!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+77"/>
<source>Quantity:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+22"/>
<location line="+35"/>
<source>0</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-19"/>
<source>Bytes:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+51"/>
<source>Amount:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+22"/>
<location line="+86"/>
<location line="+86"/>
<location line="+32"/>
<source>0.00 BC</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-191"/>
<source>Priority:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+19"/>
<source>medium</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+32"/>
<source>Fee:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+35"/>
<source>Low Output:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+19"/>
<source>no</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+32"/>
<source>After Fee:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+35"/>
<source>Change</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+50"/>
<source>custom change address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+106"/>
<source>Send to multiple recipients at once</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Add &Recipient</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+16"/>
<source>Remove all transaction fields</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Clear &All</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+24"/>
<source>Balance:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+16"/>
<source>123.456 BC</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+31"/>
<source>Confirm the send action</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>S&end</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../sendcoinsdialog.cpp" line="-173"/>
<source>Enter a Crave address (e.g. B8gZqgY4r2RoEdqYk3QsAqFckyf9pRHN6i)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+15"/>
<source>Copy quantity</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy amount</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy fee</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy after fee</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy bytes</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy priority</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy low output</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy change</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+86"/>
<source><b>%1</b> to %2 (%3)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Confirm send coins</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Are you sure you want to send %1?</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source> and </source>
<translation type="unfinished"/>
</message>
<message>
<location line="+29"/>
<source>The recipient address is not valid, please recheck.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>The amount to pay must be larger than 0.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>The amount exceeds your balance.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>The total exceeds your balance when the %1 transaction fee is included.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>Duplicate address found, can only send to each address once per send operation.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Error: Transaction creation failed!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Error: The transaction was rejected. This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+247"/>
<source>WARNING: Invalid Crave address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<source>(no label)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>WARNING: unknown change address</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>SendCoinsEntry</name>
<message>
<location filename="../forms/sendcoinsentry.ui" line="+14"/>
<source>Form</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+15"/>
<source>A&mount:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<source>Pay &To:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+34"/>
<source>The address to send the payment to (e.g. B8gZqgY4r2RoEdqYk3QsAqFckyf9pRHN6i)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+60"/>
<location filename="../sendcoinsentry.cpp" line="+26"/>
<source>Enter a label for this address to add it to your address book</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-78"/>
<source>&Label:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+28"/>
<source>Choose address from address book</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<source>Alt+A</source>
<translation>Alt+A</translation>
</message>
<message>
<location line="+7"/>
<source>Paste address from clipboard</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<source>Alt+P</source>
<translation>Alt+P</translation>
</message>
<message>
<location line="+7"/>
<source>Remove this recipient</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../sendcoinsentry.cpp" line="+1"/>
<source>Enter a Crave address (e.g. B8gZqgY4r2RoEdqYk3QsAqFckyf9pRHN6i)</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>SignVerifyMessageDialog</name>
<message>
<location filename="../forms/signverifymessagedialog.ui" line="+14"/>
<source>Signatures - Sign / Verify a Message</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<location line="+124"/>
<source>&Sign Message</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-118"/>
<source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+18"/>
<source>The address to sign the message with (e.g. B8gZqgY4r2RoEdqYk3QsAqFckyf9pRHN6i)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<location line="+203"/>
<source>Choose an address from the address book</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-193"/>
<location line="+203"/>
<source>Alt+A</source>
<translation>Alt+A</translation>
</message>
<message>
<location line="-193"/>
<source>Paste address from clipboard</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<source>Alt+P</source>
<translation>Alt+P</translation>
</message>
<message>
<location line="+12"/>
<source>Enter the message you want to sign here</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+24"/>
<source>Copy the current signature to the system clipboard</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+21"/>
<source>Sign the message to prove you own this Crave address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+17"/>
<source>Reset all sign message fields</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<location line="+146"/>
<source>Clear &All</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-87"/>
<location line="+70"/>
<source>&Verify Message</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-64"/>
<source>Enter the signing address, message (ensure you copy line breaks, spaces, tabs, etc. exactly) and signature below to verify the message. Be careful not to read more into the signature than what is in the signed message itself, to avoid being tricked by a man-in-the-middle attack.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+21"/>
<source>The address the message was signed with (e.g. B8gZqgY4r2RoEdqYk3QsAqFckyf9pRHN6i)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+40"/>
<source>Verify the message to ensure it was signed with the specified Crave address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+17"/>
<source>Reset all verify message fields</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../signverifymessagedialog.cpp" line="+27"/>
<location line="+3"/>
<source>Enter a Crave address (e.g. B8gZqgY4r2RoEdqYk3QsAqFckyf9pRHN6i)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-2"/>
<source>Click "Sign Message" to generate signature</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Enter Crave signature</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+82"/>
<location line="+81"/>
<source>The entered address is invalid.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-81"/>
<location line="+8"/>
<location line="+73"/>
<location line="+8"/>
<source>Please check the address and try again.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-81"/>
<location line="+81"/>
<source>The entered address does not refer to a key.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-73"/>
<source>Wallet unlock was cancelled.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>Private key for the entered address is not available.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+12"/>
<source>Message signing failed.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Message signed.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+59"/>
<source>The signature could not be decoded.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<location line="+13"/>
<source>Please check the signature and try again.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>The signature did not match the message digest.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Message verification failed.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Message verified.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>TrafficGraphWidget</name>
<message>
<location filename="../trafficgraphwidget.cpp" line="+75"/>
<source>KB/s</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>TransactionDesc</name>
<message>
<location filename="../transactiondesc.cpp" line="+25"/>
<source>Open until %1</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>conflicted</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>%1/offline</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>%1/unconfirmed</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>%1 confirmations</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+17"/>
<source>Status</source>
<translation type="unfinished"/>
</message>
<message numerus="yes">
<location line="+7"/>
<source>, broadcast through %n node(s)</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message>
<location line="+4"/>
<source>Date</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Source</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>Generated</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<location line="+17"/>
<source>From</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<location line="+22"/>
<location line="+58"/>
<source>To</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-77"/>
<location line="+2"/>
<source>own address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-2"/>
<source>label</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+37"/>
<location line="+12"/>
<location line="+45"/>
<location line="+17"/>
<location line="+30"/>
<source>Credit</source>
<translation type="unfinished"/>
</message>
<message numerus="yes">
<location line="-102"/>
<source>matures in %n more block(s)</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message>
<location line="+2"/>
<source>not accepted</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+44"/>
<location line="+8"/>
<location line="+15"/>
<location line="+30"/>
<source>Debit</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-39"/>
<source>Transaction fee</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+16"/>
<source>Net amount</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>Message</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Comment</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Transaction ID</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Generated coins must mature 510 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Debug information</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>Transaction</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Inputs</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+21"/>
<source>Amount</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>true</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>false</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-209"/>
<source>, has not been successfully broadcast yet</source>
<translation type="unfinished"/>
</message>
<message numerus="yes">
<location line="-36"/>
<source>Open for %n more block(s)</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message>
<location line="+71"/>
<source>unknown</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>TransactionDescDialog</name>
<message>
<location filename="../forms/transactiondescdialog.ui" line="+14"/>
<source>Transaction details</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>This pane shows a detailed description of the transaction</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>TransactionTableModel</name>
<message>
<location filename="../transactiontablemodel.cpp" line="+231"/>
<source>Date</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>Type</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>Address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>Amount</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+52"/>
<source>Open until %1</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+12"/>
<source>Confirmed (%1 confirmations)</source>
<translation type="unfinished"/>
</message>
<message numerus="yes">
<location line="-15"/>
<source>Open for %n more block(s)</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message>
<location line="+6"/>
<source>Offline</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Unconfirmed</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Confirming (%1 of %2 recommended confirmations)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>Conflicted</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Immature (%1 confirmations, will be available after %2)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>This block was not received by any other nodes and will probably not be accepted!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Generated but not accepted</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+42"/>
<source>Received with</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Received from</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Sent to</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Payment to yourself</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Mined</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+38"/>
<source>(n/a)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+194"/>
<source>Transaction status. Hover over this field to show number of confirmations.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Date and time that the transaction was received.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Type of transaction.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Destination address of transaction.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Amount removed from or added to balance.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>TransactionView</name>
<message>
<location filename="../transactionview.cpp" line="+54"/>
<location line="+17"/>
<source>All</source>
<translation>Sve</translation>
</message>
<message>
<location line="-16"/>
<source>Today</source>
<translation>Danas</translation>
</message>
<message>
<location line="+1"/>
<source>This week</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>This month</source>
<translation>Ovaj mjesec</translation>
</message>
<message>
<location line="+1"/>
<source>Last month</source>
<translation>Prošli mjesec</translation>
</message>
<message>
<location line="+1"/>
<source>This year</source>
<translation>Ove godine</translation>
</message>
<message>
<location line="+1"/>
<source>Range...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+12"/>
<source>Received with</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Sent to</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>To yourself</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Mined</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Other</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Enter address or label to search</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Min amount</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+34"/>
<source>Copy address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy label</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy amount</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy transaction ID</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Edit label</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Show transaction details</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+138"/>
<source>Export Transaction Data</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Comma separated file (*.csv)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>Confirmed</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Date</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Type</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Label</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Amount</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>ID</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Error exporting</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>Could not write to file %1.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+100"/>
<source>Range:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>to</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>WalletModel</name>
<message>
<location filename="../walletmodel.cpp" line="+208"/>
<source>Sending...</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>bitcoin-core</name>
<message>
<location filename="../bitcoinstrings.cpp" line="+173"/>
<source>Crave version</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Usage:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Send command to -server or craved</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>List commands</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Get help for a command</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-147"/>
<source>Options:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Specify configuration file (default: crave.conf)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Specify pid file (default: craved.pid)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Specify wallet file (within data directory)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-1"/>
<source>Specify data directory</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-25"/>
<source>%s, you must set a rpcpassword in the configuration file:
%s
It is recommended you use the following random password:
rpcuser=craverpc
rpcpassword=%s
(you do not need to remember this password)
The username and password MUST NOT be the same.
If the file does not exist, create it with owner-readable-only file permissions.
It is also recommended to set alertnotify so you are notified of problems;
for example: alertnotify=echo %%s | mail -s "Crave Alert" admin@foo.com
</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+27"/>
<source>Set database cache size in megabytes (default: 25)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Set database disk log size in megabytes (default: 100)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>Listen for connections on <port> (default: 15714 or testnet: 25714)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Maintain at most <n> connections to peers (default: 125)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Connect to a node to retrieve peer addresses, and disconnect</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Specify your own public address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Bind to given address. Use [host]:port notation for IPv6</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Always query for peer addresses via DNS lookup (default: 0)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Threshold for disconnecting misbehaving peers (default: 100)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-37"/>
<source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+65"/>
<source>Listen for JSON-RPC connections on <port> (default: 15715 or testnet: 25715)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-17"/>
<source>Accept command line and JSON-RPC commands</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Run in the background as a daemon and accept commands</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Use the test network</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-24"/>
<source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-29"/>
<source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+96"/>
<source>Set maximum size of high-priority/low-fee transactions in bytes (default: 27000)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+12"/>
<source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-103"/>
<source>Warning: Please check that your computer's date and time are correct! If your clock is wrong Crave will not work properly.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+132"/>
<source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-18"/>
<source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-31"/>
<source>Attempt to recover private keys from a corrupt wallet.dat</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Block creation options:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-69"/>
<source>Connect only to the specified node(s)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Discover own IP address (default: 1 when listening and no -externalip)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+101"/>
<source>Failed to listen on any port. Use -listen=0 if you want this.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-91"/>
<source>Sync checkpoints policy (default: strict)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+89"/>
<source>Invalid -tor address: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Invalid amount for -reservebalance=<amount></source>
<translation type="unfinished"/>
</message>
<message>
<location line="-88"/>
<source>Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Maximum per-connection send buffer, <n>*1000 bytes (default: 1000)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-17"/>
<source>Only connect to nodes in network <net> (IPv4, IPv6 or Tor)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+31"/>
<source>Prepend debug output with timestamp</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+41"/>
<source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-81"/>
<source>Select the version of socks proxy to use (4-5, default: 5)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+42"/>
<source>Send trace/debug info to console instead of debug.log file</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Send trace/debug info to debugger</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+30"/>
<source>Set maximum block size in bytes (default: 250000)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-1"/>
<source>Set minimum block size in bytes (default: 0)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-35"/>
<source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-43"/>
<source>Specify connection timeout in milliseconds (default: 5000)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+116"/>
<source>Unable to sign checkpoint, wrong checkpointkey?
</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-86"/>
<source>Use UPnP to map the listening port (default: 0)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-1"/>
<source>Use UPnP to map the listening port (default: 1 when listening)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-26"/>
<source>Use proxy to reach tor hidden services (default: same as -proxy)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+47"/>
<source>Username for JSON-RPC connections</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+51"/>
<source>Verifying database integrity...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+44"/>
<source>Error: Wallet locked, unable to create transaction!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Error: Transaction creation failed!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Warning</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Information</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>WARNING: syncronized checkpoint violation detected, but skipped!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-1"/>
<source>Warning: This version is obsolete, upgrade required!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-54"/>
<source>wallet.dat corrupt, salvage failed</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-56"/>
<source>Password for JSON-RPC connections</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-32"/>
<source>Sync time with other nodes. Disable if time on your system is precise e.g. syncing with NTP (default: 1)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<source>When creating transactions, ignore inputs with value less than this (default: 0.01)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>Output debugging information (default: 0, supplying <category> is optional)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>If <category> is not supplied, output all debugging information.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source><category> can be:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly. This is intended for regression testing tools and app development.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+9"/>
<source>Allow JSON-RPC connections from specified IP address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Send commands to node running on <ip> (default: 127.0.0.1)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Wait for RPC server to start</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Set the number of threads to service RPC calls (default: 4)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Require a confirmations for change (default: 0)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Execute command when a relevant alert is received (%s in cmd is replaced by message)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Upgrade wallet to latest format</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Set key pool size to <n> (default: 100)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Rescan the block chain for missing wallet transactions</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>How thorough the block verification is (0-6, default: 1)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Imports blocks from external blk000?.dat file</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+9"/>
<source>Use OpenSSL (https) for JSON-RPC connections</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Server certificate file (default: server.cert)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Server private key (default: server.pem)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<source>Initialization sanity check failed. Crave is shutting down.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+50"/>
<source>Error: Wallet unlocked for staking only, unable to create transaction.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+17"/>
<source>Error: Disk space is low!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>WARNING: Invalid checkpoint found! Displayed transactions may not be correct! You may need to upgrade, or notify developers.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-174"/>
<source>This help message</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+104"/>
<source>Wallet %s resides outside data directory %s.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+37"/>
<source>Unable to bind to %s on this computer (bind returned error %d, %s)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-133"/>
<source>Connect through socks proxy</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Allow DNS lookups for -addnode, -seednode and -connect</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+126"/>
<source>Loading addresses...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-12"/>
<source>Error loading blkindex.dat</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Error loading wallet.dat: Wallet corrupted</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Error loading wallet.dat: Wallet requires newer version of Crave</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Wallet needed to be rewritten: restart Crave to complete</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Error loading wallet.dat</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-16"/>
<source>Invalid -proxy address: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-1"/>
<source>Unknown network specified in -onlynet: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-1"/>
<source>Unknown -socks proxy version requested: %i</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Cannot resolve -bind address: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Cannot resolve -externalip address: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-23"/>
<source>Invalid amount for -paytxfee=<amount>: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+60"/>
<source>Sending...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Invalid amount</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Insufficient funds</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-40"/>
<source>Loading block index...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-110"/>
<source>Add a node to connect to and attempt to keep the connection open</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+125"/>
<source>Unable to bind to %s on this computer. Crave is probably already running.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-101"/>
<source>Fee per KB to add to transactions you send</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+34"/>
<source>Minimize weight consumption (experimental) (default: 0)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>How many blocks to check at startup (default: 500, 0 = all)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Keep at most <n> unconnectable blocks in memory (default: %u)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+11"/>
<source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Warning: Deprecated argument -debugnet ignored, use -debug=net</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Invalid amount for -mininput=<amount>: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Cannot obtain a lock on data directory %s. Crave is probably already running.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Error initializing wallet database environment %s!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+17"/>
<source>Loading wallet...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>Cannot downgrade wallet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Cannot write default address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Rescanning...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Done loading</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-161"/>
<source>To use the %s option</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+188"/>
<source>Error</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-18"/>
<source>You must set rpcpassword=<password> in the configuration file:
%s
If the file does not exist, create it with owner-readable-only file permissions.</source>
<translation type="unfinished"/>
</message>
</context>
</TS> | ObsidianSorceress/Crave | src/qt/locale/bitcoin_bs.ts | TypeScript | mit | 109,847 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="de">
<head>
<!-- Generated by javadoc (version 1.7.0_01) on Thu Mar 07 20:40:25 CET 2013 -->
<title>Uses of Package com.tyrlib2.ai.steering</title>
<meta name="date" content="2013-03-07">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Uses of Package com.tyrlib2.ai.steering";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!-- -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li>Class</li>
<li class="navBarCell1Rev">Use</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-files/index-1.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?com/tyrlib2/ai/steering/package-use.html" target="_top">Frames</a></li>
<li><a href="package-use.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip-navbar_top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<div class="header">
<h1 title="Uses of Package com.tyrlib2.ai.steering" class="title">Uses of Package<br>com.tyrlib2.ai.steering</h1>
</div>
<div class="contentContainer">
<ul class="blockList">
<li class="blockList">
<table border="0" cellpadding="3" cellspacing="0" summary="Use table, listing packages, and an explanation">
<caption><span>Packages that use <a href="../../../../com/tyrlib2/ai/steering/package-summary.html">com.tyrlib2.ai.steering</a></span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Package</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><a href="#com.tyrlib2.ai.steering">com.tyrlib2.ai.steering</a></td>
<td class="colLast"> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a href="#com.tyrlib2.game">com.tyrlib2.game</a></td>
<td class="colLast"> </td>
</tr>
</tbody>
</table>
</li>
<li class="blockList"><a name="com.tyrlib2.ai.steering">
<!-- -->
</a>
<table border="0" cellpadding="3" cellspacing="0" summary="Use table, listing classes, and an explanation">
<caption><span>Classes in <a href="../../../../com/tyrlib2/ai/steering/package-summary.html">com.tyrlib2.ai.steering</a> used by <a href="../../../../com/tyrlib2/ai/steering/package-summary.html">com.tyrlib2.ai.steering</a></span><span class="tabEnd"> </span></caption>
<tr>
<th class="colOne" scope="col">Class and Description</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colOne"><a href="../../../../com/tyrlib2/ai/steering/class-use/IPattern.html#com.tyrlib2.ai.steering">IPattern</a>
<div class="block">An interface for steering patterns.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colOne"><a href="../../../../com/tyrlib2/ai/steering/class-use/IVehicle.html#com.tyrlib2.ai.steering">IVehicle</a>
<div class="block">An interface for vehicles which will receive steer commands from
the Behaviour layer.</div>
</td>
</tr>
</tbody>
</table>
</li>
<li class="blockList"><a name="com.tyrlib2.game">
<!-- -->
</a>
<table border="0" cellpadding="3" cellspacing="0" summary="Use table, listing classes, and an explanation">
<caption><span>Classes in <a href="../../../../com/tyrlib2/ai/steering/package-summary.html">com.tyrlib2.ai.steering</a> used by <a href="../../../../com/tyrlib2/game/package-summary.html">com.tyrlib2.game</a></span><span class="tabEnd"> </span></caption>
<tr>
<th class="colOne" scope="col">Class and Description</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colOne"><a href="../../../../com/tyrlib2/ai/steering/class-use/Steerer.html#com.tyrlib2.game">Steerer</a>
<div class="block">Main class for steering.</div>
</td>
</tr>
</tbody>
</table>
</li>
</ul>
</div>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!-- -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li>Class</li>
<li class="navBarCell1Rev">Use</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-files/index-1.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?com/tyrlib2/ai/steering/package-use.html" target="_top">Frames</a></li>
<li><a href="package-use.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip-navbar_bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>
| TyrfingX/TyrLib | legacy/TyrLib2/doc/com/tyrlib2/ai/steering/package-use.html | HTML | mit | 6,476 |